I designed a real time graph application using zedGraph class RollingPointPairList()
. User should be able to hide specific curve when checkBox
is checked and show it when unchecked.
The problem is that it never shows a curve again once it had been hidden. Actually, it should show curve with all points which were hide, but it draws straight line & drops specific points from list. How to do it correctly?
This is a sample code I'm using:
if (chkXScale.Checked == true) {
zedGraphControl1.GraphPane.CurveList[0].Clear();
zedGraphControl1.Refresh();
}
i Guess by calling
zedGraphControl1.GraphPane.CurveList[0].Clear();
the data is removed so once you try to bring it back by checking the checkBox it finds no data to Draw !i suggest that by the time you acquire data do 2 things:
list.Add(x,y);
To save the data for late use you can choose any simple way you master, i just suggest using
Queue
As follows, so the whole operation becomes:I hope that's all what you need, give me feedback when you try it