This question is locked. New answers and comments are not allowed.
The x axis labels on my bar chart are overlapping because the text is too long.
At first, I tried to wrap the text by setting the style of the AxisX.AxisStyles.ItemLabelStyle to a style that had TextWraping set to "Wrap", but this didn't appear to do anything.
Then, I found this page: http://www.telerik.com/help/silverlight/radchartingkit-axes-axis.html which talks about something called LabelFitMode, but there is no LabelFitMode property on my AxisX object. The page mentions RadChartingKit, is this a separate download that I can use with RadChart? If so, where can I get this code?
If anyone knows how to wrap the x axis labels, that would be my preferred solution. The text is coming from the database, so I cannot manually wrap the text without some kind of algorithm that knows how big the axis space is for each bar.
Thanks,
Brian
At first, I tried to wrap the text by setting the style of the AxisX.AxisStyles.ItemLabelStyle to a style that had TextWraping set to "Wrap", but this didn't appear to do anything.
Then, I found this page: http://www.telerik.com/help/silverlight/radchartingkit-axes-axis.html which talks about something called LabelFitMode, but there is no LabelFitMode property on my AxisX object. The page mentions RadChartingKit, is this a separate download that I can use with RadChart? If so, where can I get this code?
If anyone knows how to wrap the x axis labels, that would be my preferred solution. The text is coming from the database, so I cannot manually wrap the text without some kind of algorithm that knows how big the axis space is for each bar.
Thanks,
Brian
7 Answers, 1 is accepted
0
Hi Brian,
Consider using the XAxis APIs to mitigate the label overlap problem:
http://www.telerik.com/help/silverlight/radchart-features-axes-x-axis.html
Label step, Rotation angle and StepLabels are the best solutions for this problem.
Regards,
Vladimir Milev
the Telerik team
Consider using the XAxis APIs to mitigate the label overlap problem:
http://www.telerik.com/help/silverlight/radchart-features-axes-x-axis.html
Label step, Rotation angle and StepLabels are the best solutions for this problem.
Regards,
Vladimir Milev
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Brian
Top achievements
Rank 1
answered on 25 Nov 2011, 04:06 PM
Vladimir,
Thanks for the suggestion. I can't use Label Step in this case because my X Axis values are category labels, so I can't leave any of them out. I played around with the StepLabel properties, but the result just looks messy to me. I looked at Rotation, but with some of my long labels the label extends outside of the area between ticks even at 45 degrees of rotation, which makes for confusing reading. I may be able to use 90 degree rotation as a last resort. Unfortunately, since the labels are coming from the database, I will still need to write some kind of algorithm to somehow determine if the labels are "too long" and then rotate them. If I have to write that code, I am more inclined to try to wrap the labels manually by inserting newline characters.
It seems strange to me that a text wrapping feature is not included in the Silverlight RadChart control. This feature is available in the ASP.Net RadChart and TextBlock in Silverlight already provides text wrapping, so it would seem like providing this would be pretty simple. It seems like a significant omission in the functionality of the Silverlight RadChart both compared to the ASP.Net RadChart and other charting packages I have used.
I would like to request that Telerik add text wrapping support for axis labels to the Silverlight RadChart as soon as possible.
Thanks,
Brian
Thanks for the suggestion. I can't use Label Step in this case because my X Axis values are category labels, so I can't leave any of them out. I played around with the StepLabel properties, but the result just looks messy to me. I looked at Rotation, but with some of my long labels the label extends outside of the area between ticks even at 45 degrees of rotation, which makes for confusing reading. I may be able to use 90 degree rotation as a last resort. Unfortunately, since the labels are coming from the database, I will still need to write some kind of algorithm to somehow determine if the labels are "too long" and then rotate them. If I have to write that code, I am more inclined to try to wrap the labels manually by inserting newline characters.
It seems strange to me that a text wrapping feature is not included in the Silverlight RadChart control. This feature is available in the ASP.Net RadChart and TextBlock in Silverlight already provides text wrapping, so it would seem like providing this would be pretty simple. It seems like a significant omission in the functionality of the Silverlight RadChart both compared to the ASP.Net RadChart and other charting packages I have used.
I would like to request that Telerik add text wrapping support for axis labels to the Silverlight RadChart as soon as possible.
Thanks,
Brian
0
Hi Brian,
Thank you for suggestion. We will consider implementing this feature for one of our next releases.
Regards,
Vladimir Milev
the Telerik team
Thank you for suggestion. We will consider implementing this feature for one of our next releases.
Regards,
Vladimir Milev
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Pawar
Top achievements
Rank 1
answered on 18 Apr 2012, 09:30 PM
Am having the same above issue with my ASP.net Radchart is there one to help me out?
http://www.telerik.com/community/forums/aspnet-ajax/chart/radchart-x-axis-points-overlapping.aspx
Thank You,
Satish.
http://www.telerik.com/community/forums/aspnet-ajax/chart/radchart-x-axis-points-overlapping.aspx
Thank You,
Satish.
0
Hello,
Have you tried rotating the label text or using the LabelStep property of the Axis?
Kind regards,
Vladimir Milev
the Telerik team
Have you tried rotating the label text or using the LabelStep property of the Axis?
Kind regards,
Vladimir Milev
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Pawar
Top achievements
Rank 1
answered on 24 Apr 2012, 03:50 PM
Hello Vladimir Milev,
Is there are some 50-100 x-axis points location, axis lable ratation works for us. But in this case, I might get more than 1000 x-Axis points, So that won't work. Looking for dynamic solution.
Thank You,
Pawar.
Is there are some 50-100 x-axis points location, axis lable ratation works for us. But in this case, I might get more than 1000 x-Axis points, So that won't work. Looking for dynamic solution.
Thank You,
Pawar.
0
Hi,
Can you please let us know in how many pixels horizontal image space you are trying to fit 1000 AxisX labels?
Greetings,
Vladimir Milev
the Telerik team
Can you please let us know in how many pixels horizontal image space you are trying to fit 1000 AxisX labels?
Greetings,
Vladimir Milev
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>