Files
XCharts/Runtime/Serie/Heatmap/Heatmap.cs

28 lines
965 B
C#
Raw Normal View History

2021-11-23 13:20:07 +08:00
using UnityEngine;
namespace XCharts
{
[System.Serializable]
[SerieHandler(typeof(HeatmapHandler), true)]
2021-12-12 18:05:26 +08:00
[DefaultAnimation(AnimationType.LeftToRight)]
2021-12-28 08:18:24 +08:00
[SerieExtraComponent(typeof(LabelStyle), typeof(Emphasis))]
2021-11-23 13:20:07 +08:00
public class Heatmap : Serie, INeedSerieContainer
{
public int containerIndex { get; internal set; }
public int containterInstanceId { get; internal set; }
public static void AddDefaultSerie(BaseChart chart, string serieName)
{
var serie = chart.AddSerie<Heatmap>(serieName);
serie.itemStyle.show = true;
serie.itemStyle.borderWidth = 1;
serie.itemStyle.borderColor = Color.clear;
2022-01-22 21:08:26 +08:00
2021-12-28 08:18:24 +08:00
var emphasis = serie.AddExtraComponent<Emphasis>();
emphasis.show = true;
emphasis.itemStyle.show = true;
emphasis.itemStyle.borderWidth = 1;
emphasis.itemStyle.borderColor = Color.black;
2021-11-23 13:20:07 +08:00
}
}
}