Skip to content

NULL values are visualized inconsistently across different plugins #43547

Description

@vhogberg

Bug description

NULL values are visualized inconsistently across different plugins, which can be misleading for users.

There are three main inconsistencies, listed in order of severity, in my opinion:

  1. NULL value dimensions are not shown in certain charts
  2. NULL_STRING is not shown next to NULL value dimensions in certain charts
  3. NULL_STRING is not shown in tooltips for NULL value dimensions in certain charts

Perhaps these are three separate bugs with three separate fixes, but I wanted to report it in one sweep as general NULL visualization issues as I think it needs a general refactor/consolidation.

1. NULL value dimensions are not shown in certain charts
In certain charts, NULL value dimensions are not shown entirely. I've spotted this when comparing a box plot and bar chart using the same dataset and configuration, notice 7 boxes vs 8 bars:

Image Image

Histograms seem to have the same issue.

I think it's because aggregate.py calls df.groupby(by=groupby) without dropna=False. Pandas defaults to dropping NaN keys, so the whole group vanishes before it reaches the frontend.

2. NULL_STRING is not shown next to NULL value dimensions in certain charts
NULL_STRING is not shown next to NULL value dimensions in certain charts, I've spotted it in Chord diagrams, graph charts, and partition charts.

Here's an example of it in a chord diagram, the biggest dimension is NULL, but it's not possible to tell as NULL_STRING is omitted:

Image

For Graph, it seems transformProps returns the literal 'N/A' for null categories instead of NULL_STRING.

3. NULL_STRING is not shown in tooltips for NULL value dimensions in certain charts

Here's an example of a NULL value dimension for a bubble chart, the tooltip does not have NULL_STRING in the tooltip title:

Image

I have spotted this same issue in Radar charts and Treemap charts, though it could be visible in more.

To reproduce

  1. Use a virtual dataset with NULL dimensions via SQL lab, such as:
SELECT 'alpha' AS category, 10 AS value
UNION ALL SELECT 'alpha', 20
UNION ALL SELECT 'alpha', 35
UNION ALL SELECT 'beta', 15
UNION ALL SELECT 'beta', 25
UNION ALL SELECT 'beta', 40
UNION ALL SELECT NULL, 12
UNION ALL SELECT NULL, 22
UNION ALL SELECT NULL, 38
  1. Configure category as the dimension and reproduce see the different issues across the different chart types.

Thoughts
How null representation is defined is also scattered, refactor and consolidate a single null constant + formatter into @superset-ui/core, and pass dropna=False in postprocessing for issue 1.

Superset version

6.1.0

Python version

3.11

Node version

16

Browser

Chrome

Additional context

I use postgres as the DB

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.

Activity

  1. dosubot commented on Aug 26, 2026

    @dosubot

    @vhogberg great write-up — the code confirms all three issues. Here's what's happening in each case:

    Issue 1: NULL groups dropped in aggregate/boxplot

    In aggregate.py, df.groupby(by=groupby) is called without dropna=False. Pandas defaults to dropna=True, so any group whose key is NaN is silently discarded before it reaches the frontend. The fix is straightforward: pass dropna=False there.

    Issue 2: Graph chart returns 'N/A' instead of NULL_STRING

    In Graph/transformProps.ts, the getCategoryName helper returns the hardcoded string 'N/A' for null categories instead of importing and using NULL_STRING from ../constants. For comparison, the Bubble plugin correctly imports NULL_STRING and uses it for its series name [1].

    For the Chord diagram, the legacy plugin's transformProps.js passes queriesData[0].data straight through, and Chord.js renders node labels directly from the nodes array without any null substitution — so a null node renders as empty text.

    Issue 3: Bubble chart tooltip title is blank for NULL entities

    In Bubble/transformProps.ts, formatTooltip constructs the tooltip title from params.data[3] (the entity value). When the entity is null, the title ends up empty — NULL_STRING is never substituted in the formatter, even though it is imported and used for the series name on line 146.

    On consolidation: NULL_STRING is currently defined redundantly — in superset/constants.py as "<NULL>" [2] and separately in the eCharts plugin constants. The comment in constants.py even notes: "If you change any constants, make sure to also change utils/common.js". Centralizing NULL_STRING into @superset-ui/core and having all plugins import from there would prevent drift like the Graph 'N/A' issue.

    I also see you've filed a related issue about drill-to-detail showing blank instead of <NULL> — these likely share the same root cause on the frontend side.

    To reply, just mention @dosu.


    Docs are dead. Just use Dosu.

    Leave Feedback Ask Dosu about superset Share Dosu with your team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions