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

Value labels on stacked bar chart now show 0.0 regardless of the actual value #32531

Open
3 tasks done
rea725 opened this issue Mar 6, 2025 · 3 comments
Open
3 tasks done
Assignees
Labels
viz:charts:bar Related to the Bar chart

Comments

@rea725
Copy link

rea725 commented Mar 6, 2025

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

Image

Superset version

master / latest-dev

Python version

3.11

Node version

I don't know

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 the viz:charts:bar Related to the Bar chart label Mar 6, 2025
Copy link

dosubot bot commented Mar 6, 2025

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

@mistercrunch
Copy link
Member

[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.

@sadpandajoe
Copy link
Member

Looks like it might be addressed already in #32337 if you're using a stacked bar scenario.

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

3 participants