Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Legend style improvements #215

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

d-Rickyy-b
Copy link

@d-Rickyy-b d-Rickyy-b commented Sep 13, 2023

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:
output_old

New:
output_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.

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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant