Monthly x-axis

3 posts, 0 answers
  1. AndrewRick
    AndrewRick avatar
    5 posts
    Member since:
    Mar 2010

    Posted 04 Nov 2011 Link to this post


    I want to display multiple series on RadChart, say 2 lines, where X-axis is DateTime.

    The data could be something like (note that date is formatted as dd.MM.yyyy):

    Series 1:
    Date - value
    01.01.2011 - 10.2 €
    01.02.2011 - 96.7 €
    01.01.2012 - 17.9 €

    Series 2:
    Date - value
    01.05.2011 - 12.2 €
    01.06.2011 - 91.2 €
    01.02.2012 - 12.5 €

    The series min start is 01.01.2011 (series1) and max end is 01.02.2012 (series2)

    Is it possible to have x-axis only show ticks from start to the end of the period (series1 -> series2) with one tick being one month exacly ? In other words, I want the x-axis to show months between the range of data. How would that be achievable ?

    This is quite urgent, please advice.

  2. AndrewRichards
    AndrewRichards avatar
    9 posts
    Member since:
    Oct 2011

    Posted 07 Nov 2011 Link to this post

    Any development on this ?
  3. Evgenia
    Evgenia avatar
    1437 posts

    Posted 09 Nov 2011 Link to this post

    Hi Andres,

    I believe you understand that there is no way that you can set a strict Step of one month since the different months have different number of days - i.e. December has 31 days and February - 28 or 29.
    To achieve your scenario I can suggest you two approaches:

    1. Provide your own range for the AxisX by turning off the AutoRange property and supply a Step of 27 days. This way you will be able to have a step of month but the day won't be every first day of the month. More information on the matter can be found here.

    2. You may set your dates as categories which are treated as a sequence of non-numerical text labels for the RadChart and this way you will be able to provide whatever date you want. You may find more information in our help topic.

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top