修复SerieLabel在点击图例隐藏Serie后还显示的问题#94

This commit is contained in:
monitor1394
2020-09-18 22:00:03 +08:00
parent f266655d24
commit ecb09e4ca4
3 changed files with 8 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
# 更新日志
* (2020.09.18) Fixed `SerieLabel` also displayed after hided `Serie` by clicked the legend #94
* (2020.09.18) Optimize coordinate axis calibration and text display #93
* (2020.09.17) fixed `Package` import missing `meta` file causing failure #92
* (2020.09.08) Optimize the color of `Legend` to automatically match the custom color of `ItemStyle`

View File

@@ -1,6 +1,7 @@
# 更新日志
* (2020.09.18) 修复`SerieLabel`在点击图例隐藏`Serie`后还显示的问题#94
* (2020.09.18) 优化坐标轴刻度和文本显示#93
* (2020.09.17) 修复`Package`导入时缺失`meta`文件导致失败的问题#92
* (2020.09.08) 优化`Legend`的颜色可自动匹配`ItemStyle`的自定义颜色#89

View File

@@ -1498,9 +1498,13 @@ namespace XCharts
var isPercentStack = SeriesHelper.IsPercentStack(m_Series, serie.stack, SerieType.Bar);
for (int j = 0; j < serie.data.Count; j++)
{
if (j >= serie.dataPoints.Count) break;
var serieData = serie.data[j];
if (serieData.labelObject == null) continue;
if (j >= serie.dataPoints.Count)
{
serieData.SetLabelActive(false);
continue;
}
var pos = serie.dataPoints[j];
var serieLabel = SerieHelper.GetSerieLabel(serie, serieData);
var dimension = 1;
@@ -1539,6 +1543,7 @@ namespace XCharts
}
else
{
Debug.LogError("lable not show:" + i + "," + j);
serieData.SetLabelActive(false);
}
}