且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在图表控件asp.net中以24小时格式显示X轴上的小时数

更新时间:2023-10-08 16:34:46

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


" 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