Home forums Feature Requests & Feedback Legend minimum width

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  ssd-dev 5 months, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11461

    ssd-dev
    Member

    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.

    #11470

    Sanjoy
    Moderator

    Sorry, as of now this feature is not available. For aligning individual legends you can use itemWidth. Here is an example.

    #11477

    ssd-dev
    Member

    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 http://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.

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

You must be logged in to reply to this topic.