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

display x axis labels intermittenly

1 Answer 41 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
prayag ganoje
Top achievements
Rank 1
prayag ganoje asked on 05 May 2011, 03:57 AM
Hello,

I am crating a radchart programatically. On x axis labels are dates. if user selects larger date range then there will be so many dates on x axis,

I want to x axis should intellegently display selected dates depending up on no of x axis values are assigned.

So that x axis labels will not overlap on each another. Is it possible with radchart ?

1 Answer, 1 is accepted

Sort by
0
Gimmik
Top achievements
Rank 1
answered on 05 May 2011, 08:47 PM
Hi Prayag,

I don't think there is a way to automatically display the x-axis labels intermittently, however - you can always do it intelligently! Since you're setting up the x-axis programmaticly, you can manually step through the dates before you bind them to the RadChart. The algorithm can be as simple or as complex as you need it to be. At it's most basic you can just determine the maximum number of labels you want to display (N), then count the number of entries in your date range (C). Then calculate the step as S = ceiling(C / N); When you design your function to iterate through the list of dates and bind them so the x-axis, simply bind every (S)th label.

Here's the link to the RadChart documentation if you need more information.
http://www.telerik.com/help/aspnet-ajax/radchart-chartoverview.html

Hope this helps,
-Gimmik
Tags
Chart (Obsolete)
Asked by
prayag ganoje
Top achievements
Rank 1
Answers by
Gimmik
Top achievements
Rank 1
Share this question
or