Custom X-Axis labels at non-set intervals

Thread is closed for posting
2 posts, 0 answers
  1. Greg
    Greg avatar
    8 posts
    Member since:
    Sep 2011

    Posted 02 Jan 2013 Link to this post

    I have a RadChart that will always contain 365 plot points. Each plot points represents a dollar value for a day. The last point being today and the first point being 365 days ago.

    I bind a list of a simple object containing properties for Dollar and DateTime to the radgrid.

    What I'm trying to figure out is how to display a X-Axis Tick line and Label for the point corresponding to the first of every month.

    See my screenshot below with point ranging from Apr 22, 2011 to Apr 21, 2012. The result I am looking for is in purple (Note that I didn't draw out all of the labels, just enough to give an idea):

    Link To Screen Shot
  2. Petar Kirov
    Petar Kirov avatar
    425 posts

    Posted 07 Jan 2013 Link to this post

    Hi Greg,

    The ASP.NET RadChart does not offer a way of displaying x-axis labels on good-looking date-time intervals (such as month). However it is possible to achieve this by manually removing the unneeded axis items on the BeforeLayout event. I have attached a sample project demonstrating this and a screenshot of the end result.

    I hope this helps.
    Petar Kirov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top