mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-21 07:50:16 +00:00
增加Remove All Chart Object移除图表下的所有子节点
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -134,5 +134,13 @@ namespace XCharts
|
||||
warningInfo = CheckHelper.CheckChart(this);
|
||||
return warningInfo;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 移除所有图表子节点,会自动重现初始化。
|
||||
/// </summary>
|
||||
public void RemoveChartObject()
|
||||
{
|
||||
ChartHelper.DestroyAllChildren(transform);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1543,7 +1543,6 @@ namespace XCharts
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("lable not show:" + i + "," + j);
|
||||
serieData.SetLabelActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user