Inconsistent behavior for stacked bar-chart
Opened this issue · 1 comments
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
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.
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.