ZedGraph X軸は時間です

Random ran = new Random();

PointPairListリスト= new PointPairList();

LineItem myCurve;

 

this.zedGraphControl1.GraphPane.Title.Text = "動的折れ線グラフ";

this.zedGraphControl1.GraphPane.XAxis.Title.Text = "時間间";

this.zedGraphControl1.GraphPane.YAxis.Title.Text = "数量";

this.zedGraphControl1.GraphPane.XAxis.Type = ZedGraph.AxisType.DateAsOrdinal;

 

for(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( "My Curve"、

リスト、Color.DarkGreen、SymbolType.None);

 

this.zedGraphControl1.AxisChange();

this.zedGraphControl1.Refresh();

おすすめ

転載: www.cnblogs.com/qq1151219115/p/12684700.html