mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-16 21:40:41 +00:00
3.10.0
This commit is contained in:
@@ -38,7 +38,11 @@ namespace XCharts.Example
|
||||
IEnumerator AddSimpleBar()
|
||||
{
|
||||
chart = gameObject.GetComponent<BarChart>();
|
||||
if (chart == null) chart = gameObject.AddComponent<BarChart>();
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<BarChart>();
|
||||
chart.Init();
|
||||
}
|
||||
chart.EnsureChartComponent<Title>().text = "BarChart - 柱状图";
|
||||
chart.EnsureChartComponent<Title>().subText = "普通柱状图";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user