Forum Discussion

davem145's avatar
davem145
New Member
7 years ago

Custom Visual - How to create word wrap text labels on a chart

Dear Forum,

 

I am creating my own custom visual and would like to wordwrap the data labels on a chart. I have been able to display labels returning textMeasurementService.getTailoredTextOrDefault (from the PowerBI formatting utils) but, of course, that truncates long labels with an ellipsis. I was hoping to use textMeasurementService.wordBreakOverflowingText but have not been able to find an example of how to work with that. Can anyone help with an example code snippet please?

No RepliesBe the first to reply