Skip to content

Some dashboard charts intermittently fall back to color_scheme instead of label_colors on initial render #40708

@lliudspace

Description

@lliudspace

Bug description

When using label_colors in dashboard JSON metadata, some charts intermittently do not apply the defined colors in "label_colors" and instead fall back to the chart's default color_scheme on initial render.

This issue does not affect all charts consistently:

  • Most of the charts correctly apply label_colors
  • Some charts (often the first one) fall back to the default color scheme
  • The behavior is highly intermittent and not reproducible on every page load

Observed behavior

  • Only some charts are affected, while others display correct colors
  • After user interaction (e.g. clicking legend or refreshing the page), the colors become correct

Expected behavior

All charts should consistently apply the label_colors defined in dashboard metadata on initial render.


Dashboard label_colors configuration

The dashboard uses the following label_colors configuration:

{
  "label_colors": {
    "60_Crashed": "#8b0000",
    "50_Error": "#ff0000",
    "40_Failed": "#ff8c00",
    "30_Undefined": "#ffd700",
    "20_Passed": "#008000",
    "10_Executed": "#0000ff",
    "01_Invalid": "#ff00ff",
    "00_NoResult": "#808080"
  }
}

Dashboard-level color_scheme is empty, the charts use "supersetColors" as color_scheme.


Screenshots/recordings

The following screenshot shows the case when the issue occurs

Image

After refreshing or clicking legend, the colors become correct

Image

Superset version

6.0.0


Python version

I don't know

Node version

I don't know

Browser

Chrome

Additional context

I have reviewed similar issues related to color assignment and dashboard behavior (e.g. #36406), but I could not find a case fully matching this behavior (intermittent fallback to color_scheme with label_colors defined).

Based on the observed behavior, it seems likely that this is related to rendering order or timing in the frontend. However, this is only a hypothesis.

I would appreciate confirmation from maintainers whether this is an expected limitation, a known issue, or a bug in the current rendering pipeline. Thanks.
``

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dashboard:colorsRelated to the color scheme of the Dashboardvalidation:requiredA committer should validate the issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions