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

Bar chart (echart) does not show NULL values in categorical x-axis #31481

Open
2 of 3 tasks
sfirke opened this issue Dec 16, 2024 · 2 comments
Open
2 of 3 tasks

Bar chart (echart) does not show NULL values in categorical x-axis #31481

sfirke opened this issue Dec 16, 2024 · 2 comments
Labels
validation:validated A committer has validated / submitted the issue or it was reported by multiple users viz:charts:bar Related to the Bar chart

Comments

@sfirke
Copy link
Member

sfirke commented Dec 16, 2024

Bug description

When creating a bar chart with categorical x-axis, NULL values are omitted from the resulting chart.

Data:
image

Bar chart fails to show NULL value:
image

Pie chart shows the correct data:
image

Expected behavior
NULL should be a series in the chart, as on the pie chart. In many cases it's valuable to know there are NULL values in the data. Users can always filter them out if desired.

If you wish to create the data table used here, you can run this Postgres statement:

CREATE TABLE browser_stats (browser VARCHAR(50), page VARCHAR(50));
INSERT INTO browser_stats (browser, page) 
VALUES 
    ('Firefox', 'home'),
    ('Chrome', 'home'),
    ('Chrome', 'home'),
    ('Safari', 'about'),
    (NULL, 'about');

Screenshots/recordings

No response

Superset version

4.0.2

Python version

I don't know

Node version

I don't know

Browser

Firefox

Additional context

I could find no relevant issues on GitHub or reports about this on Slack, which surprised me.

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 Dec 16, 2024
@sfirke sfirke added the validation:validated A committer has validated / submitted the issue or it was reported by multiple users label Dec 16, 2024
@rusackas
Copy link
Member

I wonder, does turning on the "zero imputation" fill method work here?

@sfirke
Copy link
Member Author

sfirke commented Dec 16, 2024

I wonder, does turning on the "zero imputation" fill method work here?

The "advanced analytics" section is not shown if the x-axis is categorical so not an option, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validation:validated A committer has validated / submitted the issue or it was reported by multiple users viz:charts:bar Related to the Bar chart
Projects
None yet
Development

No branches or pull requests

2 participants