Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for Legend label centering and wrapping #31

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

jentfoo
Copy link
Member

@jentfoo jentfoo commented Jan 3, 2025

This PR fixes and improves legend label positioning with the following changes:

  • The legend was previously incorrectly calculating the center position, this is now fixed for cases where wrapping is not necessary (and resulted in a lot of test assertion updates)
  • When horizontal legends wrap the starting position is now based off the original start position instead of just 0.
  • In addition Align center is now supported. This is similar to a left align, but when wrapping the next line will be centered under the above line (including any set Left adjustment).

This PR fixes #29
multiple-charts-2

This change fixes and improves legend label positioning with the following changes:
* The legend was previously incorrectly calculating the center position, this is now fixed for cases where wrapping is not necessary (and resulted in a lot of test assertion updates)
* When horizontal legends wrap the starting position is now based off the original start positon instead of just `0`.
* In addition `Align` `center` is now supported. This is similar to a `left` align, but when wrapping the next line will be centered under the above line (including any set Left adjustement).
@jentfoo jentfoo added the bug Something isn't working label Jan 3, 2025
@jentfoo jentfoo self-assigned this Jan 3, 2025
@jentfoo jentfoo merged commit 2e15c54 into main Jan 3, 2025
8 checks passed
@jentfoo jentfoo deleted the jent/legend_wrap_fixes branch January 15, 2025 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Horizontal legends with an offset from the center wrap to the far left side
1 participant