Ei kuvausta
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Bar.cs 1.2KB

1234567891011121314151617181920212223242526272829303132
  1. namespace XCharts.Runtime
  2. {
  3. [System.Serializable]
  4. [SerieHandler(typeof(BarHandler), true)]
  5. [SerieConvert(typeof(Line), typeof(Pie))]
  6. [CoordOptions(typeof(GridCoord), typeof(PolarCoord))]
  7. [DefaultAnimation(AnimationType.BottomToTop)]
  8. [SerieComponent(typeof(LabelStyle), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
  9. [SerieDataComponent(typeof(ItemStyle), typeof(LabelStyle), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
  10. [SerieDataExtraField("m_Ignore")]
  11. public class Bar : Serie, INeedSerieContainer
  12. {
  13. public int containerIndex { get; internal set; }
  14. public int containterInstanceId { get; internal set; }
  15. public static Serie AddDefaultSerie(BaseChart chart, string serieName)
  16. {
  17. var serie = chart.AddSerie<Bar>(serieName);
  18. for (int i = 0; i < 5; i++)
  19. {
  20. chart.AddData(serie.index, UnityEngine.Random.Range(10, 90));
  21. }
  22. return serie;
  23. }
  24. public static Bar ConvertSerie(Serie serie)
  25. {
  26. var newSerie = SerieHelper.CloneSerie<Bar>(serie);
  27. return newSerie;
  28. }
  29. }
  30. }