修复Legend控制的Serie颜色有时候异常的问题

This commit is contained in:
monitor1394
2019-10-03 09:42:03 +08:00
parent 437f985b45
commit b4a7969b91
9 changed files with 163 additions and 217 deletions

View File

@@ -311,7 +311,8 @@ namespace XCharts
var serie = m_Series.GetSerie(serieIndex);
if (serie != null && !string.IsNullOrEmpty(serie.name))
{
var bgColor1 = active ? m_ThemeInfo.GetColor(serie.index) : m_ThemeInfo.legendUnableColor;
var legendIndex = m_LegendRealShowName.IndexOf(serie.name);
var bgColor1 = active ? m_ThemeInfo.GetColor(legendIndex) : m_ThemeInfo.legendUnableColor;
m_Legend.UpdateButtonColor(serie.name, bgColor1);
}
}