Files
XCharts/Runtime/BarChart.cs

36 lines
957 B
C#
Raw Normal View History

/******************************************/
/* */
/* Copyright (c) 2018 monitor1394 */
/* https://github.com/monitor1394 */
/* */
/******************************************/
using UnityEngine;
namespace XCharts
{
2019-07-15 00:24:04 +08:00
[AddComponentMenu("XCharts/BarChart", 14)]
[ExecuteInEditMode]
[RequireComponent(typeof(RectTransform))]
[DisallowMultipleComponent]
public class BarChart : CoordinateChart
{
2019-05-15 09:44:18 +08:00
2019-07-15 00:24:04 +08:00
#if UNITY_EDITOR
protected override void Reset()
{
base.Reset();
2019-07-15 19:21:22 +08:00
m_Title.text = "BarChart";
m_Tooltip.type = Tooltip.Type.Shadow;
2019-07-15 00:24:04 +08:00
RemoveData();
2019-09-29 09:16:15 +08:00
AddSerie(SerieType.Bar, "serie1");
2019-07-15 00:24:04 +08:00
for (int i = 0; i < 5; i++)
{
AddXAxisData("x" + (i + 1));
AddData(0, Random.Range(10, 90));
}
}
#endif
}
}