.net chart clear and re-add

后端 未结 5 889
情话喂你
情话喂你 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:13

    This works for me

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

提交回复
热议问题