修复Seriestate在代码动态设置时不刷新的问题

This commit is contained in:
monitor1394
2024-06-04 08:40:43 +08:00
parent 74cf4fe4ce
commit 96cb7ffc74
4 changed files with 15 additions and 0 deletions

View File

@@ -150,6 +150,18 @@ namespace XCharts.Runtime
}
if (serie.interactDirty)
{
if (serie.animation.enable && serie.animation.interaction.enable)
{
Color32 color1, toColor1;
bool needInteract = false;
foreach (var serieData in serie.data)
{
var state = SerieHelper.GetSerieState(serie, serieData, true);
SerieHelper.GetItemColor(out color1, out toColor1, serie, serieData, chart.theme, state);
serieData.interact.SetColor(ref needInteract, color1, toColor1);
}
}
chart.RefreshChart();
serie.interactDirty = false;
m_ForceUpdateSerieContext = true;
}