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

Avoiding Labels overlaping in X Axis

2 Answers 78 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Daní
Top achievements
Rank 1
Daní asked on 28 Oct 2009, 10:36 AM
Hi,

I'm using the RadChart in an application where the number of point to plots is variable. That means that when many points are supplied the labels on x-axis are overlapped. Is there any workaround to draw only as many x-labels to ensure they are not overlapped.

Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Ves
Telerik team
answered on 30 Oct 2009, 09:19 AM
Hello DanĂ­,

If you have databound the XValue of the chart DataPoints (like adding an ItemMapping for XValue) you can take advantage of the TicksDistance property of AxisX. This property defines the minimum distance between two ticks along the X axis. In case there are lots of items, RadChart will calculate the ticks and label in a way that ticks are no closer than the value of this property.

If you are not setting XValue, TicksDistance will be ignored, so you may consider using the LabelStep property. Setting it to 3 will force the chart to display only every third label.

Best regards,
Ves
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Daní
Top achievements
Rank 1
answered on 30 Oct 2009, 10:55 AM
Thanks Ves, that solves my problem.
Tags
Chart
Asked by
Daní
Top achievements
Rank 1
Answers by
Ves
Telerik team
Daní
Top achievements
Rank 1
Share this question
or