.net chart clear and re-add .net chart clear and re-add asp.net asp.net

.net chart clear and re-add


This should work:

foreach(var series in chart.Series) {    series.Points.Clear();}


This should work

 chartnameHERE.Series["SeriesNameHERE"].Points.Clear();


This will actually completely remove the series from the chart (not just remove the points from the series).

while (chart1.Series.Count > 0) { chart1.Series.RemoveAt(0); }