Skip to content

[v5] legend positioning #4986

Closed Answered by Aarebecca
clmz asked this question in Q&A
Discussion options

You must be logged in to vote

In v5, there are two separate configuration items for layout: position and layout.
The position configuration determines where the components are located within different areas of the icon, such as up, down, left, and right.
The layout configuration, on the other hand, determines how the components are arranged within their respective areas.

For example, in the following code snippet, we position the legend to the left, which may result in a crowded space. To solve this issue, we adjust the size of the legend to provide enough space.

.legend('color', {
    size: 100,
    position: 'left'
  })

If we want to achieve the layout shown in the bottom left of the image, we can use the "layout" …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hustcc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #4725 on May 10, 2023 05:27.