增加Remove All Chart Object移除图表下的所有子节点

This commit is contained in:
monitor1394
2020-09-18 22:24:51 +08:00
parent 166a94012d
commit 9117a198a1
5 changed files with 14 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
# 更新日志
* (2020.09.18) Added `Remove All Chart Object` to Remove All child nodes under the Chart (automatically reinitialized)
* (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

View File

@@ -1,6 +1,7 @@
# 更新日志
* (2020.09.18) 增加`Remove All Chart Object`移除图表下的所有子节点(会自动重新初始化)
* (2020.09.18) 修复`SerieLabel`在点击图例隐藏`Serie`后还显示的问题#94
* (2020.09.18) 优化坐标轴刻度和文本显示#93
* (2020.09.17) 修复`Package`导入时缺失`meta`文件导致失败的问题#92

View File

@@ -116,6 +116,10 @@ namespace XCharts
private void CheckWarning()
{
if (GUILayout.Button("Remove All Chart Object"))
{
m_Target.RemoveChartObject();
}
if (GUILayout.Button("Check XCharts Update "))
{
CheckVersionEditor.ShowWindow();

View File

@@ -134,5 +134,13 @@ namespace XCharts
warningInfo = CheckHelper.CheckChart(this);
return warningInfo;
}
/// <summary>
/// 移除所有图表子节点,会自动重现初始化。
/// </summary>
public void RemoveChartObject()
{
ChartHelper.DestroyAllChildren(transform);
}
}
}

View File

@@ -1543,7 +1543,6 @@ namespace XCharts
}
else
{
Debug.LogError("lable not show:" + i + "," + j);
serieData.SetLabelActive(false);
}
}