首页 > 其他 > 详细

ZedGraph X轴为时间

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

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轴为时间

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!