Bug description

Superset deployment information - version: superset 4.1.2 - deployment: deployed via the helm chart on Kubernetes

Brief Description Deck.GL scatterplots are adding colors that are not present in the legend.

How to reproduce 1. I create a Deck.GL scatterplot and define point colors according to a column that can have 3 values: A, B or C.3. 2. The preview in the chart editing view is correct and properly assigns a color for each value type: 3 colors total 4. I add the chart to a newly created dashboard 5. The chart now displays 4 colors instead of the 3 that can be seen in the legend.

In chart editing: Image

In dashboard: Image

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.10

Node version

16

Browser

Safari

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]

@OOub Hello there! I'm here to help you with any bugs, questions, or contributions you have. Let's work together to solve this issue.

The issue with the Deck.GL scatterplot chart displaying incorrect legend colors when added to a dashboard after the Superset 4.1.2 update may be related to changes in the DeckGL legend layout. According to the changelog, there was an update titled "DeckGL legend layout" associated with issue #30140 and commit af066a4. This update could have impacted how colors are displayed in the legend. It might be worth checking if these changes align with the issues you are experiencing and if any further updates or patches have been released to address this specific problem [1][2].

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: sadpandajoe

@OOub does this bug also appear in 5.0.0rc1? I know @geido had worked on color consistency not too long ago so this issue could be fixed in 5.0.0 already

Comment From: OOub

@sadpandajoe Took me a while to get back to this issue but I can reproduce on 4.1.2 and on the latest 5.0.0rc2. Seems like the color consistency work was done in 4.1.2.

Rolling back to 4.1.1 fixes the issue

Comment From: rea725

We are seeing the issue also, and I think we have a fix. @anantaoutlook has fixed it in his test environment (v5.0), and will create a PR.

Comment From: geido

We are seeing the issue also, and I think we have a fix. @anantaoutlook has fixed it in his test environment (v5.0), and will create a PR.

Nice @rea725! Looking forward to it!

Comment From: anantaoutlook

@rea725, I checked master branch & it looks like the issue is fixed already in master branch. (tested with our same data)

Comment From: rusackas

More than happy to close this, if it's no longer an issue... if anyone knows what PR fixed it, it'd be nice to link that here :)

Comment From: DarksChoise

If anyone knows if this has been fixed, when I am in the dashboard the colors of the dots are not the same as the colors of the filter. Image

Comment From: DarksChoise

@geido ?

Comment From: anantaoutlook

I have raised a pull request which covers this fix> https://github.com/apache/superset/pull/33748 Its a simple & minor change

Comment From: DarksChoise

@anantaoutlook Thank you very much, it helped me a lot!!!