This is a migrated thread and some comments may be shown as answers.

How to Format X axis value on Chart

1 Answer 182 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rahul Khinvasara
Top achievements
Rank 1
Rahul Khinvasara asked on 07 Feb 2008, 11:05 AM
How can we format XAxis data in

"dd-MMM-yy" format.
 
I have used this code--

Chart1.PlotArea.XAxis.DataLabelsColumn =

"EntryDate"

Chart1.PlotArea.XAxis.Appearance.CustomFormat =

"dd-MMM-yy"

But this shows "dd-MMM-yy" string on XAxis instead of  date in the above format.

1 Answer, 1 is accepted

Sort by
0
Chavdar
Telerik team
answered on 08 Feb 2008, 03:06 PM
Hi Rahul,

You have to set also the ValueFormat property of the XAxis.Appearance to one of the following values: ShortDate, ShortTime, LongDate or LongTime to indicate the the custom format value refers to a date-time value.

Sincerely yours,
Chavdar
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Rahul Khinvasara
Top achievements
Rank 1
Answers by
Chavdar
Telerik team
Share this question
or