UI update 02
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Runtime
|
||||
{
|
||||
[System.Serializable]
|
||||
[SerieHandler(typeof(BarHandler), true)]
|
||||
[SerieConvert(typeof(Line), typeof(Pie))]
|
||||
[CoordOptions(typeof(GridCoord), typeof(PolarCoord))]
|
||||
[DefaultAnimation(AnimationType.BottomToTop)]
|
||||
[DefaultTooltip(Tooltip.Type.Shadow, Tooltip.Trigger.Axis)]
|
||||
[SerieComponent(typeof(TitleStyle), typeof(LabelStyle), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
|
||||
[SerieDataComponent(typeof(ItemStyle), typeof(TitleStyle), typeof(LabelStyle), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
|
||||
[SerieDataExtraField("m_Ignore")]
|
||||
public class Bar : Serie, INeedSerieContainer
|
||||
{
|
||||
public override bool useSortData { get { return realtimeSort; } }
|
||||
|
||||
public int containerIndex { get; internal set; }
|
||||
public int containterInstanceId { get; internal set; }
|
||||
|
||||
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
|
||||
{
|
||||
var serie = chart.AddSerie<Bar>(serieName);
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
chart.AddData(serie.index, UnityEngine.Random.Range(10, 90));
|
||||
}
|
||||
return serie;
|
||||
}
|
||||
|
||||
public static Bar ConvertSerie(Serie serie)
|
||||
{
|
||||
var newSerie = SerieHelper.CloneSerie<Bar>(serie);
|
||||
return newSerie;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user