Conversation
…elative to the title
| }, | ||
| indentation: { | ||
| valType: 'number', | ||
| min: 0, |
There was a problem hiding this comment.
I could see us allowing negative indentation, to remove or reduce the padding to the left of many of the symbols. Many if not most legend symbols don't use the full itemwidth. The risk here is allowing symbols to bleed off the edge of the legend if you go too far, but I think that's acceptable if you have explicitly set a negative indentation. Maybe min: -15, ie half the minimum itemwidth?
There was a problem hiding this comment.
Yes the bleeding off the left edge was my concern as well. I have adapted the test image to showcase how it looks to indent with -15 for a line and a bar legend entry.
There was a problem hiding this comment.
Oh cool, we clip at the edge of the legend, that's perfect.
alexcjohnson
left a comment
There was a problem hiding this comment.
💃 Great job @my-tien!
legend indentation
This PR adds the property
indentationtolayout.legendso that legend entries can be indented relative to the title.I have set the min value of this to 0 for now to avoid having to deal with adjusting the legend width and title positioning when the legend extends towards the left.