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

Inconsistent behavior for stacked bar-chart #30914

Open
2 of 3 tasks
Wardormeur opened this issue Nov 13, 2024 · 1 comment
Open
2 of 3 tasks

Inconsistent behavior for stacked bar-chart #30914

Wardormeur opened this issue Nov 13, 2024 · 1 comment
Labels
viz:charts:bar Related to the Bar chart

Comments

@Wardormeur
Copy link

Bug description

Hello :)
The bug seems to present itself when using a stacked barchart and contribution mode = row.
Any slice that is below a threshold will not show, which is weird when used in coordination with contribution mode because it should always reach 100%.
This behavior seems to be inconsistent depending on ordering.
The following data is the same between the 2 screenshots, only the configuration on the left is changing.
The disappearing category is just under 3%.
We are running 4.0.1 but I didn't see anything in the changelog relating to barcharts (https://github.com/apache/superset/blob/58f9be9b85cfd34f861d232cf834c96747133a39/CHANGELOG/4.0.2.md)
If I'm wrong and this was fixed, I'll be deeply sorry for your time.

Screenshots/recordings

Screenshot 2024-11-13 at 18 57 14 Screenshot 2024-11-13 at 18 57 44

Superset version

4.0.2

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.
Copy link

dosubot bot commented Nov 13, 2024

Hey @Wardormeur! I'm here to help you with the issue you've encountered. I'm a bot designed to assist with bug fixes, questions, and contributions. Let's work together to resolve the issue you've come across.

The issue you're experiencing with the stacked bar chart in contribution mode is related to the getOverMaxHiddenFormatter function. This function hides values that are over a certain maximum threshold, which can cause categories with very small contributions (like those below 3%) to not be displayed if they fall below this threshold [1].

Additionally, there is a configuration option called percentageThresholdControl that allows you to adjust the minimum threshold in percentage points for showing labels. This might help in ensuring that smaller categories are displayed [2].

Regarding the changelog for version 4.0.2, the only change related to bar charts was a fix for "Excess padding in horizontal Bar charts" [3]. This does not directly address the issue you're facing, so it seems the behavior you're observing might not have been fixed in the update.

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the viz:charts:bar Related to the Bar chart label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
viz:charts:bar Related to the Bar chart
Projects
None yet
Development

No branches or pull requests

1 participant