修复Legendformatter在数据变更时没有自动刷新的问题

This commit is contained in:
monitor1394
2023-11-11 22:46:08 +08:00
parent 83db4dd951
commit 509bd97741
3 changed files with 6 additions and 0 deletions

View File

@@ -69,6 +69,7 @@ slug: /changelog
## master
* (2023.11.11) 修复`Legend``formatter`在数据变更时没有自动刷新的问题
* (2023.11.05) 修复`SerieEventData``value`一直是0的问题 (#287)
* (2023.11.03) 修复`Bar`设置渐变色时鼠标移出效果异常的问题 (#285)
* (2023.11.02) 优化`SerieData`设置`ignore``formatter`的忽略问题

View File

@@ -47,6 +47,10 @@ namespace XCharts.Example
{
UpdateData();
}
else if (Input.GetKeyDown(KeyCode.C))
{
chart.ClearData();
}
lastAddTime += Time.deltaTime;
if (loopAdd && lastAddTime >= loopAddTime)
{

View File

@@ -108,6 +108,7 @@ namespace XCharts.Runtime
if (serie.dataDirty)
{
SeriesHelper.UpdateSerieNameList(chart, ref chart.m_LegendRealShowName);
chart.OnSerieDataUpdate(serie.index);
serie.OnDataUpdate();
serie.dataDirty = false;
}