using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using XCharts.Runtime; public class SixServerManager : UpdateManager { public List items; public Text flops; public override void updateData() { base.updateData(); DataManager.Instance.GetSixServer((data) => { for (int i = 0; i < items.Count; i++) { items[i].GetChartComponent().text = data[i].title; items[i].GetComponent<PieValue>().setData(data[i]); items[i].GetChartComponent<Legend>().data = new List<string>(); items[i].series[0].GetSerieData(0).data[1] = data[i].items[0].value; items[i].series[0].GetSerieData(0).name = data[i].items[0].name + " " + data[i].items[0].value; items[i].GetChartComponent<Legend>().data.Add(data[i].items[0].name + " " + data[i].items[0].value); items[i].series[0].GetSerieData(1).data[1] = data[i].items[1].value; items[i].series[0].GetSerieData(1).name = data[i].items[1].name + " " + data[i].items[1].value; items[i].GetChartComponent<Legend>().data.Add(data[i].items[1].name + " " + data[i].items[1].value); } flops.text= data[5].value.ToString(); }); } }