K8SManager.cs 726 B

12345678910111213141516171819202122232425
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using XCharts.Runtime;
  5. public class K8SManager : UpdateManager
  6. {
  7. public List<RingChart> items;
  8. public override void updateData()
  9. {
  10. base.updateData();
  11. DataManager.Instance.GetK8s((data) => {
  12. for (int i = 0; i < items.Count; i++)
  13. {
  14. SerieData data1 = items[i].series[0].GetSerieData(0);
  15. data1.data[0] = double.Parse(data[i].value);
  16. data1.data[1] = double.Parse(data[i].max);
  17. items[i].gameObject.GetComponent<RingValue>().setData(data[i]);
  18. items[i].gameObject.SetActive(true);
  19. }
  20. });
  21. }
  22. }