如何在图表控件asp.net中以24小时格式显示X轴上的小时数 [英] How to display Hours on X-axis in 24 hr format in chart control asp.net

查看:95
本文介绍了如何在图表控件asp.net中以24小时格式显示X轴上的小时数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我从datareader的数据库中获取数字,这些数字是4,5小时,6,7,8,9,10,11,12,13,14,....... 24。



但我想要在图表中显示如上午4点,上午5点,下午4点,下午4点,下午4点,我需要设置哪些属性。


< p style ="border:none; font-family:'Segoe UI','Lucida Grande',Verdana,Arial,Helvetica,sans-serif; padding-right:0px; color:#333333; font-size:13px; line - 高:16px">
谢谢和问候,



Raghu。

解决方案

在你的图表属性中你将有图表区,点击它然后将打开一个新窗口,名为 


" chartAreaCollectionEditor"点击其中的添加按钮


然后转到Axes(收藏)....点击它


再次打开新窗口将打开"Axis Collection Ediitor"


在x轴中查看minortickmark属性


在其中使Intervaltype =小时 点击确定按钮


 你会得到你想要的东西



Hi,

I am getting numbers from database in datareader those are hours like 4,5,6,7,8,9,10,11,12,13,14,.......24.

But i want to display in chart like 4AM,5AM,6AM,........13PM,14PM.........24PM so what properties should i need to set.

Thanks&Regards,

Raghu.

解决方案

In your chart properties u will have chartareas, click on it then a new window will open known as 

"chartAreaCollectionEditor" click add button in it

then go to Axes(collection).... click on it

again new window will b open "Axis Collection Ediitor"

in it for x axis see minortickmark properties

in it make Intervaltype = hour  click ok button

 u will get it what u want


这篇关于如何在图表控件asp.net中以24小时格式显示X轴上的小时数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆