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

Excess Padding in Horizontal Bar Charts When Legend is Added #29342

Closed
3 tasks done
seandiacono opened this issue Jun 24, 2024 · 1 comment · Fixed by #29345
Closed
3 tasks done

Excess Padding in Horizontal Bar Charts When Legend is Added #29342

seandiacono opened this issue Jun 24, 2024 · 1 comment · Fixed by #29345
Labels
#bug:cosmetic Cosmetic/layout/design tweak needed validation:validated A committer has validated / submitted the issue or it was reported by multiple users

Comments

@seandiacono
Copy link

seandiacono commented Jun 24, 2024

Bug description

Horizontal bar charts in Apache Superset are created with extra padding when a legend is added, affecting the chart's layout and appearance. This issue was introduced in PR #27883.

Expected Behavior:
The chart should adjust the layout to accommodate the legend without adding excessive padding.

How to reproduce the bug

  1. Create a horizontal bar chart
  2. Ensure that the legend is enabled and the margin is set to 0 or none
  3. You should see extra padding between the chart and the legend

Screenshots/recordings

image

Superset version

4.0.1

Python version

3.9

Node version

16

Browser

Chrome

Additional context

This bug was validated by @sfirke in Slack

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@dosubot dosubot bot added the #bug:cosmetic Cosmetic/layout/design tweak needed label Jun 24, 2024
@apache apache deleted a comment from dosubot bot Jun 24, 2024
@sfirke sfirke added the validation:validated A committer has validated / submitted the issue or it was reported by multiple users label Jun 24, 2024
@sfirke
Copy link
Member

sfirke commented Jun 24, 2024

This caused existing charts to display differently on dashboards upon upgrading from 4.0.0. The temporary fix is to set legend margin in chart to -100, but that would require modifying every affected chart -- then presumably undoing it once the bug is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug:cosmetic Cosmetic/layout/design tweak needed validation:validated A committer has validated / submitted the issue or it was reported by multiple users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants