I need to add points to a curve one by one and display the curve after every point has been added (since the graph is only updated ever two seconds). Before I was adding all 64 points to a list, then drawing a curve based on list elements.
Here is the code I have so far.
private void CreateGraph(ZedGraphControl zgc)
GraphPane myPane = zgc.GraphPane;
// Set the titles and axis labels
myPane.Title.Text = "My Test Graph";
myPane.XAxis.Title.Text = "X Value";
myPane.YAxis.Title.Text = "My Y Axis";
// Make up some data points from the Sine function
//PointPairList list = new PointPairList();
// Generate a blue curve with circle symbols , and "My Curve 2" in the legend
//myPane.AddCurve("My Curve", list , Color.Blue, SymbolType.XCross);
double x = (int)arrayPosition;
double y = (int)dataArray[arrayPosition];
// Fill symboles with black
//myCurve.Symbol.Fill = new Fill(Color.Black);
// Fill the axis background with a color gradient
myPane.Chart.Fill = new Fill(Color.White, Color.LightGoldenrodYellow, 45F);
// Fill the pane background with a color gradient
myPane.Fill = new Fill(Color.White, Color.FromArgb(220, 220, 255), 45F);
// Calculate the Axis Scale Ranges
the problem is I don't know how to display the myCurve in myPane.
There is a function .draw, but I have no idea how to use it, and haven't found anything helpful googleing so far. Any help would be appreciated.
I think I have explained what I want to do, and put in all relevant code, but if you need any clarification just ask.