From 715574b483374bcb891126c22de9ed9589bb740c Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Thu, 18 Jun 2020 08:57:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D`SerieLabel`=E5=9C=A8?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE=E6=97=B6?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + Runtime/Component/Sub/SerieData.cs | 4 +++- Runtime/Internal/BaseChart.cs | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f441c2f..62e20a49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # 更新日志 +* (2020.06.18) 修复`SerieLabel`在重新添加数据时可能不显示的问题 * (2020.06.17) 增加`SerieData`可单独设置`SerieSymbol`#66 * (2020.06.17) 修复`Check For Update`在`Unity 2018`部分版本报错的问题#63 * (2020.06.16) 增加`Serie`的`avoidLabelOverlap`参数避免饼图标签堆叠的情况#56 diff --git a/Runtime/Component/Sub/SerieData.cs b/Runtime/Component/Sub/SerieData.cs index 834082a8..2457d5ac 100644 --- a/Runtime/Component/Sub/SerieData.cs +++ b/Runtime/Component/Sub/SerieData.cs @@ -176,9 +176,11 @@ namespace XCharts { index = 0; labelObject = null; + highlighted = false; m_Name = string.Empty; + m_Show = true; m_Selected = false; - m_CanShowLabel = false; + m_CanShowLabel = true; m_EnableSymbol = false; m_EnableLabel = false; m_EnableEmphasis = false; diff --git a/Runtime/Internal/BaseChart.cs b/Runtime/Internal/BaseChart.cs index 20d3e6f9..1a3210b2 100644 --- a/Runtime/Internal/BaseChart.cs +++ b/Runtime/Internal/BaseChart.cs @@ -435,6 +435,7 @@ namespace XCharts for (int i = 0; i < m_Series.Count; i++) { var serie = m_Series.list[i]; + serie.index = i; SerieHelper.UpdateCenter(serie, chartPosition, chartWidth, chartHeight); for (int j = 0; j < serie.data.Count; j++) {