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

How can you make StepLabelLevelCount & LabelRotationAngle Dynamic?

4 Answers 39 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Rodney Foley
Top achievements
Rank 1
Rodney Foley asked on 09 Nov 2010, 11:58 PM
It seems it would be very useful if the Chart dynamically would set the StepLabelLevelCount and LabelRotationAngle based on the labels overlapping with each other. For example StepLabelLevelCount could go between 1 and 3 to as label collisions occur, and then after it reaches 3 and it still has collisions it can switch to LabelRotationAngel of 90. That would cover a large majority of cases I would think, and the max step level could be even provided to set how high it steps before resorting to rotation.

This seems best to be inside the chart itself and just exposed as properties.  However if there is a way to get access to these labels before they are rendered and be able to calculate there expect size and then set the stepping and/or rotation accordingly I don't mind doing that.

In case you are wondering why I would do this, for some of my charts I have very short labels for my AxisX usually just a date (MM/dd/yyyy), and the charts are dynamic based on the filters a user applies so if they are only looking at a few days and I set the rotation to 90 it doesn't look good with all the white space, it looks better at a step of 1, but as soon as you start increasing the number of days they start colliding quickly

Kind Regards,
-Rodney

4 Answers, 1 is accepted

Sort by
0
Accepted
Yavor
Telerik team
answered on 12 Nov 2010, 12:07 PM
Hello Rodney,

At present, the required functionality can be achieved by using code. This behavior, however, cannot be handled by the control automatically, at present. I will pass this suggestion to our developers, who will consider its feasibility, as well as possible ways to implement it for one of the upcoming versions of the control. For the time being, you can dynamically set the rotation angle via the designated property.

Greetings,
Yavor
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Rodney Foley
Top achievements
Rank 1
answered on 12 Nov 2010, 04:21 PM
Hi Yavor,

Thanks and that is what I figured.  Was hopping I was missing something.  I appreciate you passing the feature request on to the team, and I will look forward to see if they think it feasible and if they implement it.

Kind Regards,

-Rodney
0
Rahul
Top achievements
Rank 1
answered on 05 Jan 2012, 06:30 AM
Is this problem solved now?

Thanks,
Rahul Techie.
0
Yavor
Telerik team
answered on 05 Jan 2012, 07:40 AM
Hi,

The initial suggestion has not been implemented at present. The reason for this is that it is a little beyond the scope of the control to check the data itself, in addition to the fact that one could take steps to manually check the values and either rotate the labels, or truncate the text.

Greetings,
Yavor
the Telerik team

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

Tags
Chart
Asked by
Rodney Foley
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Rodney Foley
Top achievements
Rank 1
Rahul
Top achievements
Rank 1
Share this question
or