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

Word wrap category group label in chart

1 Answer 123 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 10 May 2016, 08:10 PM

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.

1 Answer, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 13 May 2016, 12:53 PM
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 you can also use DataPointLabelAngle, DataPointLabelOffset and DataPointLabelAlignment properties - Formatting Graph Series.


Regards,
Katia
Telerik
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
Tags
General Discussions
Asked by
James
Top achievements
Rank 1
Answers by
Katia
Telerik team
Share this question
or