Charts - How to break the label in two lines

Charts - How to break the label in two lines

  

Hello,

I want to know how can i break the pie chart label in two lines when the text it's too big.

I tried to change the style in the tooltip by adding word-wrap or word-break but nothing seems to work.


Thanks

Hi Filipa,

You are talking about two different things. The label (or rather, data label) is the label name that's shown alongside the pie chart, while the tooltip is what is shown when hovering over a data point.

I don't think the data label can be styled beyond setting the colour etc. The tooltip can be styled, setting the useHTML option to true, and using the format or formatter to style it (see e.g. here).