X Axis Labels Overlapping

8 posts, 0 answers
  1. Brian
    Brian avatar
    58 posts
    Member since:
    Jul 2011

    Posted 21 Nov 2011 Link to this post

    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
  2. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 24 Nov 2011 Link to this post

    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

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

  3. DevCraft banner
  4. Brian
    Brian avatar
    58 posts
    Member since:
    Jul 2011

    Posted 25 Nov 2011 Link to this post

    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 
  5. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 30 Nov 2011 Link to this post

    Hi Brian,

    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 >>

  6. Pawar
    Pawar avatar
    15 posts
    Member since:
    Apr 2012

    Posted 18 Apr 2012 Link to this post

    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.    
  7. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 23 Apr 2012 Link to this post

    Hello,

    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 >>

  8. Pawar
    Pawar avatar
    15 posts
    Member since:
    Apr 2012

    Posted 24 Apr 2012 Link to this post

    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.    
  9. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 27 Apr 2012 Link to this post

    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

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

Back to Top
DevCraft banner