Random run = new Random ();
Lista PointPairList = new PointPairList ();
LineItem myCurve;
this.zedGraphControl1.GraphPane.Title.Text = "Gráfico dinámico de líneas";
this.zedGraphControl1.GraphPane.XAxis.Title.Text = "时间";
this.zedGraphControl1.GraphPane.YAxis.Title.Text = "数量";
this.zedGraphControl1.GraphPane.XAxis.Type = ZedGraph.AxisType.DateAsOrdinal;
para (int i = 0; i <= 10000; i ++)
{
double x = (double) new XDate (DateTime.Now.AddSeconds (- (10000 - i)));
double y = ran.NextDouble ();
list.Add (x, y);
}
DateTime dt = DateTime.Now;
myCurve = zedGraphControl1.GraphPane.AddCurve ("Mi curva",
lista, Color.DarkGreen, SymbolType.None);
this.zedGraphControl1.AxisChange ();
this.zedGraphControl1.Refresh ();