Home › forums › Feature Requests & Feedback › Legend minimum width
Tagged: line chart, pie chart
This topic contains 4 replies, has 4 voices, and was last updated by Shashi Ranjan 3 days, 6 hours 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.
Is there any update on this?
I want to make the lengend area scrollable
Sorry, we don’t have a scrollable legend area as of now but you can achieve the above requirement using this workaround.
You must be logged in to reply to this topic.