简体   繁体   中英

How to get the month label on ASP.Net chart control

I have created an ASP.Net chart control which is receiving date from database and I have the following code to show it on the chart eg (Monday, 01-12-2015)

<LabelStyle Format="dddd, dd-MM-yy" Angle="-90" IsEndLabelVisible="false" />

I am wondering how can I change it to show only month. eg (December)? Please help.

"Format" parameter define how the date will be displayed. To show only month name, it will be "MMMM":

<LabelStyle Format="MMMM" Angle="-90" IsEndLabelVisible="false" />

You can use "MMMM" format.

Here is the reference: https://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM