[bug] fix change color in runtime did not refresh

This commit is contained in:
monitor1394
2022-04-27 08:26:05 +08:00
parent 419c704b23
commit 8c02ce14ac
6 changed files with 120 additions and 27 deletions

View File

@@ -120,14 +120,37 @@ namespace XCharts.Runtime
}
/// <summary>
/// Redraw chart in next frame.
/// |在下一帧刷新图表。
/// |在下一帧刷新整个图表。
/// </summary>
public void RefreshChart()
{
foreach (var serie in m_Series)
serie.ResetInteract();
m_RefreshChart = true;
if (m_Painter) m_Painter.Refresh();
}
/// <summary>
/// Redraw chart serie in next frame.
/// |在下一帧刷新图表的指定serie。
/// </summary>
public void RefreshChart(int serieIndex)
{
RefreshPainter(GetSerie(serieIndex));
}
/// <summary>
/// Redraw chart serie in next frame.
/// |在下一帧刷新图表的指定serie。
/// </summary>
public void RefreshChart(Serie serie)
{
if (serie == null) return;
serie.ResetInteract();
RefreshPainter(serie);
}
/// <summary>
/// Remove all series and legend data.
/// |It just emptying all of serie's data without emptying the list of series.