mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 09:20:08 +00:00
修复SerieLabel在点击图例隐藏Serie后还显示的问题#94
This commit is contained in:
@@ -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.18) Optimize coordinate axis calibration and text display #93
|
||||||
* (2020.09.17) fixed `Package` import missing `meta` file causing failure #92
|
* (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`
|
* (2020.09.08) Optimize the color of `Legend` to automatically match the custom color of `ItemStyle`
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
|
* (2020.09.18) 修复`SerieLabel`在点击图例隐藏`Serie`后还显示的问题#94
|
||||||
* (2020.09.18) 优化坐标轴刻度和文本显示#93
|
* (2020.09.18) 优化坐标轴刻度和文本显示#93
|
||||||
* (2020.09.17) 修复`Package`导入时缺失`meta`文件导致失败的问题#92
|
* (2020.09.17) 修复`Package`导入时缺失`meta`文件导致失败的问题#92
|
||||||
* (2020.09.08) 优化`Legend`的颜色可自动匹配`ItemStyle`的自定义颜色#89
|
* (2020.09.08) 优化`Legend`的颜色可自动匹配`ItemStyle`的自定义颜色#89
|
||||||
|
|||||||
@@ -1498,9 +1498,13 @@ namespace XCharts
|
|||||||
var isPercentStack = SeriesHelper.IsPercentStack(m_Series, serie.stack, SerieType.Bar);
|
var isPercentStack = SeriesHelper.IsPercentStack(m_Series, serie.stack, SerieType.Bar);
|
||||||
for (int j = 0; j < serie.data.Count; j++)
|
for (int j = 0; j < serie.data.Count; j++)
|
||||||
{
|
{
|
||||||
if (j >= serie.dataPoints.Count) break;
|
|
||||||
var serieData = serie.data[j];
|
var serieData = serie.data[j];
|
||||||
if (serieData.labelObject == null) continue;
|
if (serieData.labelObject == null) continue;
|
||||||
|
if (j >= serie.dataPoints.Count)
|
||||||
|
{
|
||||||
|
serieData.SetLabelActive(false);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
var pos = serie.dataPoints[j];
|
var pos = serie.dataPoints[j];
|
||||||
var serieLabel = SerieHelper.GetSerieLabel(serie, serieData);
|
var serieLabel = SerieHelper.GetSerieLabel(serie, serieData);
|
||||||
var dimension = 1;
|
var dimension = 1;
|
||||||
@@ -1539,6 +1543,7 @@ namespace XCharts
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Debug.LogError("lable not show:" + i + "," + j);
|
||||||
serieData.SetLabelActive(false);
|
serieData.SetLabelActive(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user