mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 09:20:08 +00:00
[bug] fix change color in runtime did not refresh
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -211,6 +211,7 @@ namespace XCharts.Runtime
|
||||
|
||||
public void RefreshPainter(Serie serie)
|
||||
{
|
||||
if (serie == null) return;
|
||||
RefreshPainter(GetPainterIndexBySerie(serie));
|
||||
}
|
||||
|
||||
@@ -363,9 +364,7 @@ namespace XCharts.Runtime
|
||||
if (m_Painter == null) return;
|
||||
if (m_RefreshChart)
|
||||
{
|
||||
m_Painter.Refresh();
|
||||
foreach (var painter in m_PainterList) painter.Refresh();
|
||||
if (m_PainterTop != null) m_PainterTop.Refresh();
|
||||
CheckRefreshPainter();
|
||||
m_RefreshChart = false;
|
||||
}
|
||||
}
|
||||
@@ -553,6 +552,8 @@ namespace XCharts.Runtime
|
||||
serie.context.dataPoints.Clear();
|
||||
serie.context.dataIgnores.Clear();
|
||||
serie.animation.context.isAllItemAnimationEnd = true;
|
||||
if (!serie.context.pointerEnter)
|
||||
serie.ResetInteract();
|
||||
|
||||
if (m_OnDrawSerieBefore != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user