List<Statbydate> rest = server.LineChart(bdate, edate);
int max = 0, min = 0;
if (rest.Count > 0)
{
max = rest[0].maxRegister; //最大值
min = rest[0].minRegister; //最小值
}
IsoDateTimeConverter fmt = new IsoDateTimeConverter(); ///需要安装这个包
fmt.DateTimeFormat = "yyyy-MM-dd";
return Content(string.Format("{{"max":{0},"min":{1},"data":{2}}}", max, min, Newtonsoft.Json.JsonConvert.SerializeObject(rest,fmt)));