Bug description

When colors are applied to stacked bar charts, Superset is making adjacent sections of the bar utlilize the same color despite many remaining colors. As an example, I chose a color scheme with 20 colors, yet my 3 section bar chart uses the same color adjacently, making the 2 colored sections appear like one large section.

This was apparently claimed to be fixed in 3.1.0 but I am on version 4.0.1 and it is still as prevalent as ever. I have seen other posts on version 4.x claiming the same.

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

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]

Hi @azsun1! I'm Dosu and I’m helping the superset team.

This color duplication issue in stacked bar charts is a known problem that persisted through Superset 4.x, even though it was previously claimed to be fixed. Recent discussions confirm that rolling back to 4.1.1 can resolve it, but the real fix appears to be in the master branch and will be included in the upcoming 5.x release. A pull request was raised to address this, and users have confirmed the fix works in master with their data. There are no release notes or docs confirming a fix in 3.1.0 or 4.x, but you can track the discussion and PR here: GitHub Issue & PR. If you need a workaround now, testing with the latest master or rolling back to 4.1.1 are your best options.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X