c# winform mschart 怎么样能使x轴显示系统获取的时间,要是这样的类型:2011-11-11 11:11:11的

xcxandrew 2011-11-06 04:58:14
chart1.ChartAreas["ChartArea1"]或者chart1.Series["Series1"]应该怎么设置?

还有就是mschart曲线图怎么样才能实时显示,就是数据自然滚动,x轴设置一定的view范围,例如只显示当前1分钟的曲线,之前的数据可以通过拖动 滚动条查看。


请高人指点啊,头都痛了。

而且我发现3D效果不能拖动。。。
...全文
724 9 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
tomguan 2012-10-18
  • 打赏
  • 举报
回复
DataPoint 有个 AxisLabel属性,是设置x轴显示的。
DataPoint point = new DataPoint(y轴值);
point.AxisLabel = "2012年10月18日";
Chart1.Series[0].Points.Add(point)
就可以了。我这样做的。
liangchengfck1 2012-10-18
  • 打赏
  • 举报
回复
Chartareas>axes>LableStyle>Format="yyyy-MM-dd hh:mm"在属性里改
这样就是按照分钟来分隔的
dayChart.ChartAreas["ChartArea1"].AxisX.MajorGrid.Interval = 1;
dayChart.ChartAreas["ChartArea1"].AxisX.LabelStyle.Interval = 1;
没隔一分钟显示一条数据
googlg 2012-08-27
  • 打赏
  • 举报
回复
不知道这个方法对不对。
[Quote=引用 6 楼 的回复:]

引用 5 楼 zhlhoney 的回复:

引用 4 楼 taiyangzhiya 的回复:
引用 2 楼 jefftian2008 的回复:

X轴刻度格式:
chart1.ChartAreas[0].AxisX.LabelStyle.Format = "yyyy-MM-dd HH:mm:ss";
+1


请问给时间轴设定最大和最小范围,如何设定?


设置X轴时间……
[/Quote]
隽永Jasen 2011-12-24
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 zhlhoney 的回复:]

引用 4 楼 taiyangzhiya 的回复:
引用 2 楼 jefftian2008 的回复:

X轴刻度格式:
chart1.ChartAreas[0].AxisX.LabelStyle.Format = "yyyy-MM-dd HH:mm:ss";
+1


请问给时间轴设定最大和最小范围,如何设定?
[/Quote]

设置X轴时间轴最大值和最小值,比如只显示一分钟内的时间 ,可以设置最小值为1,最大值为60,然后动态向X轴添加数据点,数据点的X值为当前系统时间,代码如下:
DataPoint dpt = new DataPoint();
dpt.SetValueXY(DateTime.Now.ToLongTimeString(), dResultCmd);
chart1.Series["Series1"].Points.Add(dpt);
zhlhoney 2011-12-18
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 taiyangzhiya 的回复:]
引用 2 楼 jefftian2008 的回复:

X轴刻度格式:
chart1.ChartAreas[0].AxisX.LabelStyle.Format = "yyyy-MM-dd HH:mm:ss";
+1
[/Quote]

请问给时间轴设定最大和最小范围,如何设定?
taiyangzhiya 2011-11-24
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 jefftian2008 的回复:]

X轴刻度格式:
chart1.ChartAreas[0].AxisX.LabelStyle.Format = "yyyy-MM-dd HH:mm:ss";
[/Quote]+1
taiyangzhiya 2011-11-24
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 jefftian2008 的回复:]

X轴刻度格式:
chart1.ChartAreas[0].AxisX.LabelStyle.Format = "yyyy-MM-dd HH:mm:ss";
[/Quote]这位兄弟,知道怎么设置时间格式的轴最大值和最小值吗,因为chartareas.axisx.minimum和maximum都是double型的,我想动态给时间轴设定最大和最小范围
菊花古剑和酒 2011-11-15
  • 打赏
  • 举报
回复
X轴刻度格式:
chart1.ChartAreas[0].AxisX.LabelStyle.Format = "yyyy-MM-dd HH:mm:ss";
xcxandrew 2011-11-06
  • 打赏
  • 举报
回复
求高人出来指点迷津啊!!!!啊啊啊啊啊啊啊啊

4,819

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧