public async void GetList() { await Task.Run(() => { //007301 //161725 var data = WebTool.GetFunDetail(_RESTService, "161725").data; LineVm.ChartTitle = data.name; UnitLineVm.ChartTitle = data.name; List <List <string> > worth = data.netWorthData; List <WorthBase> datas = new List <WorthBase>(); foreach (List <string> arr in worth) { WorthBase worthBase = new WorthBase(DateTime.Parse(arr[0]), arr[1], arr[2]); datas.Add(worthBase); } datas = datas.Where(p => p.Date >= DateTime.Parse("2020-01-01")).ToList(); foreach (var dt in datas) { ChartDataBase line_data = new ChartDataBase("净值涨幅", dt.Date, string.Format("{0}", dt.Rate)); this.LineVm.DataSource.Add(line_data); LineVm.DataSource.Add(new ChartDataBase("单位净值", dt.Date, string.Format("{0}", dt.Unit_worth))); UnitLineVm.DataSource.Add(new ChartDataBase("单位净值", dt.Date, string.Format("{0}", dt.Unit_worth))); } }); }