mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 08:50:10 +00:00
增加Chart的更多快捷创建图表菜单
This commit is contained in:
@@ -2,6 +2,10 @@ using UnityEngine;
|
||||
|
||||
namespace XCharts.Runtime
|
||||
{
|
||||
/// <summary>
|
||||
/// Ring chart is mainly used to show the proportion of each item and the relationship between the items.
|
||||
/// || 环形图主要用于显示每一项的比例以及各项之间的关系。
|
||||
/// </summary>
|
||||
[AddComponentMenu("XCharts/RingChart", 20)]
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent(typeof(RectTransform))]
|
||||
@@ -15,5 +19,18 @@ namespace XCharts.Runtime
|
||||
RemoveData();
|
||||
Ring.AddDefaultSerie(this, GenerateDefaultSerieName());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// default multiple ring chart.
|
||||
/// || 默认多圆环图。
|
||||
/// </summary>
|
||||
public void DefaultMultipleRingChart()
|
||||
{
|
||||
CheckChartInit();
|
||||
var serie = GetSerie(0);
|
||||
serie.label.show = false;
|
||||
AddData(0, UnityEngine.Random.Range(30, 90), 100, "data2");
|
||||
AddData(0, UnityEngine.Random.Range(30, 90), 100, "data3");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user