mubix
Posts: 32
Joined: Wed May 25, 2022 12:32 pm

legend doesn't not follow ellipsis

in styledMode .. legend doesn't trim data in case of width is set

fiddle link : https://jsfiddle.net/g0vin_d_Vitara/me24xho5/94/

what sort of changes do i need to get those attribute working in styledMode?
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: legend doesn't not follow ellipsis

Hello,

You didn't include CSS styles in the demo, so it's hard for me to see what it looks like in your case. Can you send a working demo?

Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
mubix
Posts: 32
Joined: Wed May 25, 2022 12:32 pm

Re: legend doesn't not follow ellipsis

for the sake of simplicity
i used same css from highcharts.css

but with styledMode on
here you can see that ellipsis is not working
fiddleLink: https://jsfiddle.net/g0vin_d_Vitara/me24xho5/97/
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: legend doesn't not follow ellipsis

Hi,

There is already a topic like this on StackOverflow: https://stackoverflow.com/questions/467 ... to-ellipsi

Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
mubix
Posts: 32
Joined: Wed May 25, 2022 12:32 pm

Re: legend doesn't not follow ellipsis

hi,
the problem with that approach is that buildText function works on all types of labels including legend
and i am not sure how to identify whether it's a legend

is there anything i can do specific to legend??
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: legend doesn't not follow ellipsis

Hello,

You can add logic that will check if a given label in the string contains the name of one of the series.
Demo: http://jsfiddle.net/BlackLabel/danc410k/

Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Usage”