WinForm msChart 多次设置数据源纵坐标刻度线不变的问题

 /// <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);
        }

 

posted @ 2013-05-15 17:06  newShit  阅读(512)  评论(0编辑  收藏  举报