mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-15 20:51:40 +00:00
37 lines
972 B
C#
37 lines
972 B
C#
|
|
/******************************************/
|
|
/* */
|
|
/* Copyright (c) 2018 monitor1394 */
|
|
/* https://github.com/monitor1394 */
|
|
/* */
|
|
/******************************************/
|
|
|
|
using UnityEngine;
|
|
|
|
namespace XCharts
|
|
{
|
|
[AddComponentMenu("XCharts/LineChart", 13)]
|
|
[ExecuteInEditMode]
|
|
[RequireComponent(typeof(RectTransform))]
|
|
[DisallowMultipleComponent]
|
|
public class LineChart : CoordinateChart
|
|
{
|
|
|
|
#if UNITY_EDITOR
|
|
protected override void Reset()
|
|
{
|
|
base.Reset();
|
|
m_Title.text = "LineChart";
|
|
m_Tooltip.type = Tooltip.Type.Line;
|
|
RemoveData();
|
|
AddSerie(SerieType.Line, "serie1");
|
|
for (int i = 0; i < 5; i++)
|
|
{
|
|
AddXAxisData("x" + (i + 1));
|
|
AddData(0, UnityEngine.Random.Range(10, 90));
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
}
|