Clear ZedGraph Data

I am using a ZedGraph in the form of a window to display a histogram. The following code is executed when the user clicks a button.

zg1.GraphPane.AddBar("Series", null, y, Color.Red);

It adds an additional panel every time the user clicks a button. I am looking for a way to reset or clear data already in a chart.

How can i do this?

+5
source share
3 answers
zg1.GraphPane.CurveList.Clear();
zg1.GraphPane.GraphObjList.Clear();
+13
source

don't forget to give zg1.Refresh () if you never see the result, if you are not updating.

+1
source

-, , zg1.Refresh()

0

All Articles