mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-24 09:50:15 +00:00
修复Serie的state在代码动态设置时不刷新的问题
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user