Home Forums Feature Requests & Feedback Legend minimum width

Legend minimum width

Viewing 5 posts - 1 through 5 (of 5 total)
  • #11461

    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.


    Hi Sanjoy,

    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.

    Shashi Ranjan
    Team CanvasJS

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.