Word wrap category group label in chart

2 posts, 0 answers
  1. James
    James avatar
    1 posts
    Member since:
    Apr 2016

    Posted 10 May 2016 Link to this post

    I have a report that contains a chart and it has category groups that are somewhat long.  I'd like to either specify the max size of these so that it wraps the text down or be able to insert a line break in the Label formula.  I can't seem to figure out how to do that in the editor and was hoping someone else knew how to do it.  See the screen shot attached for an example of the long labels.  The middle one I'd like to at least have as "Shops at Branson Meadows" on one line and Parking Zone 1 on the second.

  2. Katia
    Katia avatar
    599 posts

    Posted 13 May 2016 Link to this post

    Hi James,

    You can insert line break into DataPointLabels text with text built-in functions, for example:

    = IIf(Len(Fields.MyDataField) > 10, Insert(Fields.MyDataField, 10, "
    "), Fields.MyDataField)

    You also have the option to add your custom function that will format the labels values - check Extending Expressions help article.

    To position DataPointLabels you can also use DataPointLabelAngle, DataPointLabelOffset and DataPointLabelAlignment properties - Formatting Graph Series.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top