/// <summary> /// 设置曲线图的值 /// </summary> private void SetChart() { this.myChart.Series.Clear(); //在设置数据之前重新设置autoValue,清空纵坐标刻度线的value myChart.ResetAutoValues(); //横坐标时间 DateTime dt = Convert.ToDateTime("04/1/2013"); Series series = this.SetSeriesStyle(0); for (int j = 0; j < result.Count; j++) { series.Points.AddXY(dt, result[j]); dt = dt.AddDays(1); } this.myChart.Series.Add(series); }