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

Monthly x-axis

2 Answers 64 Views
Chart
This is a migrated thread and some comments may be shown as answers.
AndrewRick
Top achievements
Rank 1
AndrewRick asked on 04 Nov 2011, 02:37 PM
Hello,

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.

Thanks!

2 Answers, 1 is accepted

Sort by
0
AndrewRichards
Top achievements
Rank 1
answered on 07 Nov 2011, 08:06 AM
Any development on this ?
0
Evgenia
Telerik team
answered on 09 Nov 2011, 09:28 AM
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.

Greetings,
Evgenia
the Telerik team

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

Tags
Chart
Asked by
AndrewRick
Top achievements
Rank 1
Answers by
AndrewRichards
Top achievements
Rank 1
Evgenia
Telerik team
Share this question
or