for (int i = 0; i < intarr.Length; i++)
{
Series series = this.chart1.Series.Add(strarr[i]);
series.Points.Add(intarr[i]);
series.XValueType = ChartValueType.Int32;
}
这是我的代码,我有
chart1.Series.Clear();
在我正在调用的函数的顶部。第一次打,还好。但是我第二次收到此错误
A chart element with the name 'NSW' already exists in the 'SeriesCollection'.
在这条线上
Series series = this.chart1.Series.Add(strarr[i]);
谢谢