2021-01-11 08:54:28 +08:00
|
|
|
|
/************************************************/
|
|
|
|
|
|
/* */
|
|
|
|
|
|
/* Copyright (c) 2018 - 2021 monitor1394 */
|
|
|
|
|
|
/* https://github.com/monitor1394 */
|
|
|
|
|
|
/* */
|
|
|
|
|
|
/************************************************/
|
2019-10-22 04:09:04 +08:00
|
|
|
|
|
2021-04-26 19:37:02 +08:00
|
|
|
|
using System.Collections.Generic;
|
2019-05-11 04:33:54 +08:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
|
|
namespace XCharts
|
|
|
|
|
|
{
|
2019-07-15 00:24:04 +08:00
|
|
|
|
[AddComponentMenu("XCharts/RadarChart", 16)]
|
|
|
|
|
|
[ExecuteInEditMode]
|
|
|
|
|
|
[RequireComponent(typeof(RectTransform))]
|
|
|
|
|
|
[DisallowMultipleComponent]
|
2021-01-11 08:54:28 +08:00
|
|
|
|
public class RadarChart : BaseChart
|
2019-05-11 04:33:54 +08:00
|
|
|
|
{
|
2021-04-26 19:37:02 +08:00
|
|
|
|
protected override void InitComponent()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.InitComponent();
|
|
|
|
|
|
if (m_Radars.Count == 0) m_Radars = new List<Radar>() { Radar.defaultRadar };
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2019-07-15 00:24:04 +08:00
|
|
|
|
#if UNITY_EDITOR
|
|
|
|
|
|
protected override void Reset()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Reset();
|
|
|
|
|
|
RemoveData();
|
2021-04-26 19:37:02 +08:00
|
|
|
|
m_Radars.Clear();
|
2021-01-11 08:54:28 +08:00
|
|
|
|
title.text = "RadarChart";
|
|
|
|
|
|
SerieTemplate.AddDefaultRadarSerie(this, "serie1");
|
2020-03-05 20:25:19 +08:00
|
|
|
|
}
|
2019-07-15 00:24:04 +08:00
|
|
|
|
#endif
|
2019-05-11 04:33:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|