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

Legend size is calculated incorrectly with orientation 'v', yref 'container' #7386

Open
camdecoster opened this issue Mar 6, 2025 · 0 comments
Labels
bug something broken P2 considered for next cycle

Comments

@camdecoster
Copy link
Contributor

As mentioned in this PR comment (#7359), there appears to be a bug related to the legend size calculation (possible due to an incorrect margin calculation) when the orientation is set to v and the yref is set to container. You can see the issue by going through the following steps:

  • Be on master
  • Start up the developer dashboard
  • Load the legend_horizontal_autowrap mock
  • Note that it loads fine
  • Edit the JSON for the mock to switch "orientation" to "v"
  • Edit the JSON for the mock to add "yref" with a value of "container" under the "legend" key
  • Reload the mock
  • Note that the legend gets scrunched up into the top right corner of the plot
  • Switch to this branch
  • Reload the mock
  • Note that an error is produced (due to a bad reaction to a negative margin value)

An example of the bug is seen in the following image:

image showing bug

The legend height should be calculated using the plot height (the "container"), but something is going wrong in this configuration.

@gvwilson gvwilson added bug something broken P2 considered for next cycle labels Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P2 considered for next cycle
Projects
None yet
Development

No branches or pull requests

2 participants