mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 08:50:10 +00:00
3.0 - unitypackage
This commit is contained in:
24
Runtime/Chart/PieChart.cs
Normal file
24
Runtime/Chart/PieChart.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[AddComponentMenu("XCharts/PieChart", 15)]
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent(typeof(RectTransform))]
|
||||
[DisallowMultipleComponent]
|
||||
public class PieChart : BaseChart
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
protected override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
var legend = GetOrAddChartComponent<Legend>();
|
||||
legend.show = true;
|
||||
|
||||
RemoveData();
|
||||
Pie.AddDefaultSerie(this, GenerateDefaultSerieName());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user