How to Format X axis value on Chart

2 posts, 0 answers
  1. Rahul Khinvasara
    Rahul Khinvasara avatar
    303 posts
    Member since:
    Aug 2007

    Posted 07 Feb 2008 Link to this post

    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.

  2. Chavdar
    Admin
    Chavdar avatar
    898 posts

    Posted 08 Feb 2008 Link to this post

    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
  3. DevCraft banner
Back to Top