Line break in XAxis Label

3 posts, 0 answers
  1. Andy
    Andy avatar
    27 posts
    Member since:
    May 2011

    Posted 10 Sep 2012 Link to this post

    Is there a way to add a manual line break to an XAxis label? I've tried setting the label text (from code-behind) as follows:

    Line 1<br>Line 2
    Line 1<p>Line 2</p>
    Line 1\nLine 2

    I'm not particularly familiar with svg text formatting, so I'm hoping someone can point me in the right direction.
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 11 Sep 2012 Link to this post

    Hi Andy, 

    SVG does not offer line breaks in a text element directly. This is part of the element's specification: http://www.w3.org/TR/SVG11/text.html#Introduction : SVG performs no automatic line breaking or word wrapping. I am afraid that line breaks are, therefore, not supported in the RadHtmlChart either.

    Regards,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Andy
    Andy avatar
    27 posts
    Member since:
    May 2011

    Posted 11 Sep 2012 Link to this post

    That's a pretty big limitation.  

    In case anyone else is looking for this functionality, there's a case in the PITS for tooltip and label templates that might help in this regard.  Vote if you're interested.

    http://www.telerik.com/support/pits.aspx#/details/Issue=12070 
Back to Top