.net chart clear and re-add

后端 未结 5 849
情话喂你
情话喂你 2021-01-04 00:35

I have a chart and I need to clear it in order to populate it with different values. The chart has 3 series, all defined in the .aspx page.

The problem is when I ca

5条回答
  •  半阙折子戏
    2021-01-04 01:00

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

提交回复
热议问题