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

[Solved] Axis labels - only show as many as can fit?

2 Answers 27 Views
Chart for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paul
Top achievements
Rank 2
Paul asked on 11 May 2014, 03:04 PM
I'm really struggling with one aspect of the chart....how to make it show only enough labels that the screen can fit, on a single line (not stacking).
I don't mind if each tick doesn't have a label (without zooming).

Is that possible?
Thanks!
Paul

2 Answers, 1 is accepted

Sort by
0
Paul
Top achievements
Rank 2
answered on 11 May 2014, 03:17 PM
Answer to my own question seems to be to calculate an appropriate number to set on MajorTickInterval property. Any better suggestions are welcome. It would be nice if a new AxisLabelFitMode option would be added to do this for you.
0
Rosy Topchiyska
Telerik team
answered on 14 May 2014, 11:30 AM
Hi Paul,

Thank you for writing.

If I understand you correctly, you would like to have a mechanism to display a part of the labels in such a way that they will fit horizontally in the provided space. The problem is that the labels are very scenario specific and it will be very hard to define which labels to display, because there will be no unique solution to that problem. At this moment the only way to control how many labels are displayed is via the MajorTickInterval property.

We appreciate your feedback and if you have any suggestions, please, feel free to share them with us.

Regards,
Rosy Topchiyska
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Chart for XAML
Asked by
Paul
Top achievements
Rank 2
Answers by
Paul
Top achievements
Rank 2
Rosy Topchiyska
Telerik team
Share this question
or