Brak opisu
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.

ParallelChart.cs 964B

123456789101112131415161718192021222324252627282930
  1. using System.Collections.Generic;
  2. using UnityEngine;
  3. namespace XCharts.Runtime
  4. {
  5. [AddComponentMenu("XCharts/ParallelChart", 25)]
  6. [ExecuteInEditMode]
  7. [RequireComponent(typeof(RectTransform))]
  8. [DisallowMultipleComponent]
  9. public class ParallelChart : BaseChart
  10. {
  11. protected override void DefaultChart()
  12. {
  13. RemoveData();
  14. AddChartComponent<ParallelCoord>();
  15. for (int i = 0; i < 3; i++)
  16. {
  17. var valueAxis = AddChartComponent<ParallelAxis>();
  18. valueAxis.type = Axis.AxisType.Value;
  19. }
  20. var categoryAxis = AddChartComponent<ParallelAxis>();
  21. categoryAxis.type = Axis.AxisType.Category;
  22. categoryAxis.position = Axis.AxisPosition.Right;
  23. categoryAxis.data = new List<string>() { "x1", "x2", "x3", "x4", "x5" };
  24. Parallel.AddDefaultSerie(this, GenerateDefaultSerieName());
  25. }
  26. }
  27. }