Home › forums › Feature Requests & Feedback › Legend minimum width
Tagged: pie chart
This topic contains 2 replies, has 2 voices, and was last updated by ssd-dev 2 years, 1 month ago.
You can set the legend’s maximum width using legend.maxWidth, but it is not possible to set the minimum width.
This, however, would be quite useful to achieve a consistent alignment of pie charts on a single page. The issue can be observed in this fiddle.
With the ability to specify the minimum width in addition to the maximum width, all pie charts could be aligned. Of course, this would also be possible if we were able to specify a fixed width for the legend.
Sorry, as of now this feature is not available. For aligning individual legends you can use itemWidth. Here is an example.
thank you for your response. I’ve already checked out itemWidth. Unfortunately, this does not resolve my problem. Although I am able to align the legends (and thereby the pie charts), choosing a rather large itemWidth (e.g. 280 as in your example) results in having a single legend item per line.
This, in turn, results in legend items overflowing the canvas and hence being cut off (see https://canvasjs.com/docs/charts/chart-options/legend/#comment-81298 where you already answered me and linked to this thread).
I’m looking forward to future releases.
You must be logged in to reply to this topic.