Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Parallel.cs 1.3KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System.Collections.Generic;
  2. using UnityEngine;
  3. namespace XCharts.Runtime
  4. {
  5. [System.Serializable]
  6. [SerieHandler(typeof(ParallelHandler), true)]
  7. [RequireChartComponent(typeof(ParallelCoord))]
  8. [SerieExtraComponent(typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
  9. [SerieDataExtraComponent(typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
  10. [SerieDataExtraField()]
  11. public class Parallel : 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<Parallel>(serieName);
  18. serie.lineStyle.width = 0.8f;
  19. serie.lineStyle.opacity = 0.6f;
  20. for (int i = 0; i < 100; i++)
  21. {
  22. var data = new List<double>()
  23. {
  24. Random.Range(0f, 50f),
  25. Random.Range(0f, 100f),
  26. Random.Range(0f, 1000f),
  27. Random.Range(0, 5),
  28. };
  29. serie.AddData(data, "data" + i);
  30. }
  31. chart.RefreshChart();
  32. return serie;
  33. }
  34. }
  35. }