Aucune description
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Line.cs 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. namespace XCharts.Runtime
  3. {
  4. [Serializable]
  5. [SerieHandler(typeof(LineHandler), true)]
  6. [SerieConvert(typeof(Bar), typeof(Pie))]
  7. [CoordOptions(typeof(GridCoord), typeof(PolarCoord))]
  8. [DefaultAnimation(AnimationType.LeftToRight)]
  9. [SerieExtraComponent(
  10. typeof(LabelStyle),
  11. typeof(EndLabelStyle),
  12. typeof(LineArrow),
  13. typeof(AreaStyle),
  14. typeof(EmphasisStyle),
  15. typeof(BlurStyle),
  16. typeof(SelectStyle))]
  17. [SerieDataExtraComponent(
  18. typeof(ItemStyle),
  19. typeof(LabelStyle),
  20. typeof(SerieSymbol),
  21. typeof(EmphasisStyle),
  22. typeof(BlurStyle),
  23. typeof(SelectStyle))]
  24. [SerieDataExtraField("m_State", "m_Ignore")]
  25. public class Line : Serie, INeedSerieContainer
  26. {
  27. public int containerIndex { get; internal set; }
  28. public int containterInstanceId { get; internal set; }
  29. public static Serie AddDefaultSerie(BaseChart chart, string serieName)
  30. {
  31. var serie = chart.AddSerie<Line>(serieName);
  32. serie.symbol.show = true;
  33. for (int i = 0; i < 5; i++)
  34. {
  35. chart.AddData(serie.index, UnityEngine.Random.Range(10, 90));
  36. }
  37. return serie;
  38. }
  39. public static Line ConvertSerie(Serie serie)
  40. {
  41. var newSerie = serie.Clone<Line>();
  42. return newSerie;
  43. }
  44. }
  45. }