Files
XCharts/Runtime/LineChart.cs

37 lines
972 B
C#
Raw Normal View History


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