Reputation: 461
I have a realtime data and i want to draw it with using zedgraph. I write these codes but it does not draw a graph.
public void AddPointToGraph(double x, double y)
{
GraphPane gp = zedGraphControl1.GraphPane;
PointPairList pairlist1 = new PointPairList();
pairlist.Add(x,y);
LineItem linus = gp.AddCurve("Label", pairlist, Color.Red , SymbolType.None);
linus.Symbol.Type = SymbolType.None;
linus.Line.Width = 1.5f;
zedGraphControl1.GraphPane.IsFontsScaled = false;
zedGraphControl1.AxisChange();
}
I call AddPointToGraph()
func in time function and give them x and y double values but nothing seems.
Upvotes: 1
Views: 470
Reputation: 2060
You can use RollingPointPairList instead of PointPairList , there's an example available for real time plot
Upvotes: 1