屏蔽ChartInit()接口,动态创建图表不再需要调用

This commit is contained in:
monitor1394
2024-01-12 13:23:46 +08:00
parent c44583772c
commit 3c233d1cb1
4 changed files with 21 additions and 23 deletions

View File

@@ -165,19 +165,10 @@ namespace XCharts.Runtime
/// ||鼠标退出图例回调。参数legendIndex, legendName
/// </summary>
public Action<Legend, int, string> onLegendExit { set { m_OnLegendExit = value; } internal get { return m_OnLegendExit; } }
public void Init(bool defaultChart = true)
{
if (defaultChart)
{
OnInit();
DefaultChart();
m_DefaultChartInited = true;
}
else
{
OnBeforeSerialize();
}
}
[Obsolete("No need to call Init() anymore.", true)]
public void Init(bool defaultChart = true) { }
/// <summary>
/// Redraw chart in next frame.
/// ||在下一帧刷新整个图表。