优化清空并重新添加数据后的自动刷新问题

This commit is contained in:
monitor1394
2020-03-11 08:41:42 +08:00
parent cb86799e44
commit 4606d65a5c
7 changed files with 29 additions and 8 deletions

View File

@@ -421,7 +421,7 @@ namespace XCharts
string key = serie.name;
float xValue, yValue;
serie.GetXYData(index, m_DataZoom, out xValue, out yValue);
var isIngore = ChartHelper.IsIngore(serie.dataPoints[index]);
var isIngore = serie.IsIngorePoint(index);
if (isCartesian)
{
var serieData = serie.GetSerieData(index, m_DataZoom);
@@ -1521,7 +1521,7 @@ namespace XCharts
{
content = serie.label.GetFormatterContent(serie.name, serieData.name, value, total);
}
serieData.SetLabelActive(value != 0);
serieData.SetLabelActive(value != 0 && serieData.labelPosition != Vector3.zero);
serieData.SetLabelPosition(serie.label.offset);
if (serieData.SetLabelText(content)) RefreshChart();
}