This repository was archived by the owner on Aug 23, 2024. It is now read-only.
Open
Conversation
Prior to this commit we simply defined a hardcoded padding. This commit respects the passed style and inherits from a default padding defined in legendDefaults.
The stroke length was just way too long, so I first tried to decrease the length by subtracting the padding from it, but it was not a big difference. I ended up using a hardcoded value because it gave the best visual results on different resolutions.
Prior to this commit the paddings passed within the style struct for the different legend objects were ignored. This commit fixes that behavior.
Legends need to use their individual text spacing - not use the Tick spacing. For vertical lists it looks a lot better to use a spacing of 10 instead of 20. Prior to this commit this couldn't be set in the defaults without also manipulating the axis tick spacing. Using their own constant, this can be now easily configured.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a clone of #200 due to changes to the branch names!
This PR builds on top of #199 (new #214) and it improves some visual issues such as some poorly chosen paddings and it fixes the issue that for several legends users weren't able to provide custom paddings.
To get a feeling how I adjusted the default paddings between vertical legend elements:
Old:

New:

PS: This is a clone of #190 since my PR was stale and I wanted to create a clone of this project. Hence I merged other changes into my branch. To have a clean feature branch, I created a new one.