Bug description
This is observed in version 5.0.0. It was not an issue in 3.x. Not sure about 4.x.
The value label in the stacked bar chart is always showing 0.0, and not the actual stacked bar value.
Screenshots/recordings
Superset version
master / latest-dev
Python version
3.11
Node version
I don't know
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.
Comment From: dosubot[bot]
Hey @rea725! 👋 I'm here to help you with any bugs, questions, or contributions you have for the project. Let's squash those bugs together!
The issue with value labels on a stacked bar chart showing 0.0 instead of the actual values in Superset version 5.0.0 could be related to the getNumberFormatter
function not being correctly configured or returning a formatter that defaults to 0.0. The drawBarValues
function uses this formatter to display the values on the chart. If getNumberFormatter(axisFormat)
is not returning the correct formatter, it could lead to the labels displaying 0.0. You may need to check the configuration or implementation of getNumberFormatter
to ensure it is set up to format the numbers correctly based on the axisFormat
provided [1].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
Comment From: mistercrunch
[just a thought] - it'd be great to have a way to reproduce issues in ephemeral environments. On PRs it's easy to get an ephemeral environment created, and from there, you could create a new chart on top of the existing datasets that shows the issues, allowing for devs to start from a clear repro. Would even be easy to export-from-eph-env and import in local dev environment. Anyhow, not related to your issue, but thinking of ways to make people more productive on the repo.
This would require tweaking the eph env GHA to be triggered in issues, ideally could take in a SHA parameter as to what to build.
In any case, clearly looks like a bug that needs to be addressed.
Comment From: sadpandajoe
Looks like it might be addressed already in https://github.com/apache/superset/pull/32337 if you're using a stacked bar scenario.
Comment From: rusackas
Assuming the linked PR solved this issue, so I'll close it out. Let me know if you find otherwise, and we can revisit/reopen.