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

Horizontal bar chart legend padding & sort order regression in 4.0.2rc2 #29404

Closed
3 tasks
sfirke opened this issue Jun 28, 2024 · 3 comments
Closed
3 tasks

Horizontal bar chart legend padding & sort order regression in 4.0.2rc2 #29404

sfirke opened this issue Jun 28, 2024 · 3 comments
Labels
#bug:regression Bugs that are identified as regessions viz:charts:bar Related to the Bar chart

Comments

@sfirke
Copy link
Member

sfirke commented Jun 28, 2024

Bug description

Testing out #29345 and it introduces a regression on a chart vs. 4.0.0. The top bar of my chart now goes over the legend and its axis label is not visible.

It also seems to have reversed the sorting order.

How to reproduce the bug

Create bar chart and switch on horizontal x-axis. If there are other aspects of my chart that are relevant to the bug I am happy to hop on a Zoom or chat to try to isolate that.

Screenshots/recordings

Before (4.0.0):
image

4.0.2rc2:
image

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

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 #bug:regression Bugs that are identified as regessions viz:charts:bar Related to the Bar chart labels Jun 28, 2024
@michael-s-molina
Copy link
Member

It also seems to have reversed the sorting order.

@sfirke this is expected as described in #29345:

This will change the default y-axis order of horizontal bar charts.

About the problem with the bar that goes over the legend, it looks like it happens in some specific combination of the number of bars and labels length. It's an ECharts problem so we would need a fix there to consistently fix this problem for all charts. @villebro any idea?

Regarding Superset releases, I think the current state is still better than the state before the reverts. You can check the screenshots of #29345 to see the problems.

So, my vote would be to proceed with the release and open a bug in ECharts for this problem.

@sfirke
Copy link
Member Author

sfirke commented Jun 28, 2024

Wow, I had added a legend margin of -75 in my test instance from 4.0.2rc1 when I was seeing how I would work around this. Then I didn't reset the metadata DB for testing RC2. This is just fine now that I have removed my -75.

And re: the sorting, that's fine with me, I had missed that sentence in the PR. I just unchecked the box Y-Axis Sort Ascending and I get back to my original order under 4.0.0. That's easy enough.

Sorry for the false alarm issue, thank you for the quick reply and investigation. I will close this.

@sfirke sfirke closed this as completed Jun 28, 2024
@michael-s-molina
Copy link
Member

😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug:regression Bugs that are identified as regessions viz:charts:bar Related to the Bar chart
Projects
None yet
Development

No branches or pull requests

2 participants