码迷,mamicode.com
首页 > 其他好文 > 详细

ZedGraph X轴为时间

时间:2020-04-12 14:36:01      阅读:227      评论:0      收藏:0      [点我收藏+]

标签:int   tle   lin   rand   type   sch   php   折线   poi   

Random ran = new Random();

PointPairList list = 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",

list, Color.DarkGreen, SymbolType.None);

 

this.zedGraphControl1.AxisChange();

this.zedGraphControl1.Refresh();

ZedGraph X轴为时间

标签:int   tle   lin   rand   type   sch   php   折线   poi   

原文地址:https://www.cnblogs.com/qq1151219115/p/12684700.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!