mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-16 05:10:12 +00:00
29 lines
686 B
C#
29 lines
686 B
C#
using UnityEngine;
|
|
|
|
namespace XCharts
|
|
{
|
|
[AddComponentMenu("XCharts/BarChart", 14)]
|
|
[ExecuteInEditMode]
|
|
[RequireComponent(typeof(RectTransform))]
|
|
[DisallowMultipleComponent]
|
|
public class BarChart : CoordinateChart
|
|
{
|
|
|
|
#if UNITY_EDITOR
|
|
protected override void Reset()
|
|
{
|
|
base.Reset();
|
|
m_Title.text = "BarChart";
|
|
m_Tooltip.type = Tooltip.Type.Shadow;
|
|
RemoveData();
|
|
AddSerie(SerieType.Bar, "serie1");
|
|
for (int i = 0; i < 5; i++)
|
|
{
|
|
AddXAxisData("x" + (i + 1));
|
|
AddData(0, Random.Range(10, 90));
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
}
|