apache / apache/superset

Show value on stacked bar chart is incorrect

Open
#33,882 15 comments 0 reactions 0 assignees View on GitHub
#bug:newfeature viz:charts:bar
Dominant language
Python
Stars
74.8k
Forks
18.3k
Avg merge
2d 4h
Merged PRs (30d)
664

Description

### Bug description

The stacking functionality for bar charts was introduced recently, but it broke the option to show bar values.

When selecting Only Total, then Instead of displaying the number for each bar, it now shows a single value for the entire cluster. In the example below, it should show two separate numbers, not just one.
![Image](https://github.com/user-attachments/assets/8c322e4c-62fb-47bf-b8ca-fb60817d2304)

When Only Total is unselected, it is completely broken
![Image](https://github.com/user-attachments/assets/54eeb504-faf1-43ee-8e34-92db824f6daa)

### Superset version

master / latest-dev

### Python version

3.9

### Node version

16

### Browser

Chrome

### Additional context

_No response_

### Checklist

- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] 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.

Contributor guide

Open the contributing guide

Research direction

No file or test is named in the issue. First reproduce the stacked bar chart with Show value enabled, comparing Only Total selected and unselected; trace the chart's value-label rendering and add coverage for both cases. Done means each bar displays its own value and the unstacked behavior is no longer broken.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.