Here's an example:
https://fiddle.jshell.net/7mrwjafn/show/light/
As you can see, one of the labels is very long, which makes the chart unusable.
I'd like to have a way to set the maximum size of the legend, probably in pixels.
I could truncate the texts in Javascript, but the effect will be length-wise truncation, unlike pixel-wise truncation.
Perhaps a nice effect, such as fading ellipsis, could be added.
Same issue. Another option would be setting a max width and allowing tooltips to wrap.
@zapnap are you suggesting to set a max width on the legend's color box and remove the text but add a tooltip to the legend with the text?
i have the same issue...
A solution like this would be perfect:
https://www.amcharts.com/kbase/truncating-long-legend-labels-on-pie-chart/
i ended up using a solution like this:
http://stackoverflow.com/questions/37005297/custom-legend-with-chartjs-v2-0
remove legends from chartjs and then build them as html elements which can be customized however needed.
Most helpful comment
@zapnap are you suggesting to set a max width on the legend's color box and remove the text but add a tooltip to the legend with the text?