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;
myPane.Title.Text = "My Test Graph";
myPane.XAxis.Title.Text = "X Value";
myPane.YAxis.Title.Text = "My Y Axis";
double x = (int)arrayPosition;
double y = (int)dataArray[arrayPosition];
myCurve.AddPoint(x, y);
myPane.Chart.Fill = new Fill(Color.White, Color.LightGoldenrodYellow, 45F);
myPane.Fill = new Fill(Color.White, Color.FromArgb(220, 220, 255), 45F);
zgc.AxisChange();
zgc.Refresh();
zgc.GraphPane.CurveList.Clear();
}
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.
*Edit*
I think I have explained what I want to do, and put in all relevant code, but if you need any clarification just ask.