I am using ZedGraph on a windows form to display bar chart. Following code executes when user click on a button.
zg1.GraphPane.AddBar("Series", null, y, Color.Red);
It adds an extra bar every time user click on button. I am looking for a way to reset or clear data already in chart.
How can i do that????
zg1.GraphPane.CurveList.Clear();
zg1.GraphPane.GraphObjList.Clear();
don't forget to give zg1.Refresh() if never see the result if you don't refresh.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With