This commit is contained in:
monitor1394
2024-01-21 22:33:45 +08:00
parent e68e41a939
commit 653b81cc48
17 changed files with 41 additions and 11 deletions

View File

@@ -166,8 +166,18 @@ namespace XCharts.Runtime
/// </summary>
public Action<Legend, int, string> onLegendExit { set { m_OnLegendExit = value; } internal get { return m_OnLegendExit; } }
[Obsolete("No need to call Init() anymore.", true)]
public void Init(bool defaultChart = true) { }
public void Init(bool defaultChart = true)
{
if (defaultChart)
{
OnInit();
DefaultChart();
}
else
{
OnBeforeSerialize();
}
}
/// <summary>
/// Redraw chart in next frame.