开发者

Clear ZedGraph Data

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", 开发者_Python百科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.


No Need to clear anything, the think you need to put at the end of the code after generating the graph is zg1.Refresh()

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜