apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.08k stars 13.62k forks source link

Cannot set color scheme for dashboard-associated chart even when dashboard color scheme is cleared #23874

Open jonhoo opened 1 year ago

jonhoo commented 1 year ago

Once a chart is associated with a dashboard, it is no longer possible to change its color scheme. In the customize panel, the color scheme dropdown displays the warning:

The color scheme is determined by the related dashboard. Edit the color scheme in the dashboard properties.

And disabled the dropdown via this code: https://github.com/apache/superset/blob/594d3e0e0c4add06c1216490c63cdc6ac43e2f5a/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx#L111-L121

However, if the dashboard does not have a color scheme selected (or it's been cleared), the chart's color scheme is still respected (you can see this by selecting a color scheme for a chart before assigning it to a dashboard without a color scheme). In this situation, it does make sense to change the chart's color scheme, and so the dropdown shouldn't be disabled (the warning could still be shown though).

How to reproduce the bug

  1. Create a chart not associated with any dashboard
  2. Set its color scheme to something that's not the default.
  3. Create a dashboard. Do not set its color scheme (or set it to "" in the JSON config).
  4. Add the chart to the dashboard. Notice that it still renders with the chosen color scheme.
  5. Go to the chart's "Customize" tab. Notice that you cannot change its color scheme (nor is its current color scheme shown).

Expected results

Since the dashboard has no color scheme set, and the chart's color scheme is thus used, I expect to be able to change it.

Actual results

I am unable to change the chart's color scheme except by removing it from the dashboard, changing the color scheme, and adding it back.

Environment

(please complete the following information):

Checklist

Make sure to follow these steps before submitting your issue - thank you!

Additional context

I can't for the life of me find the exact point in the code where dashboard color scheme is chosen over the chart color scheme when the former is set, but I'm pretty sure that code is going to show that if the dashboard color scheme is unset (or ""), then the chart color scheme will be used.

cshami commented 1 year ago

Any update/workaround on this issue? Im facing the same problem

maratbakiev2 commented 1 year ago

+1. I also don't have any color scheme specified on dashboard level, but chart level scheme is still block. As a workaround, when I need to change color scheme of the chart, I delete chart from dashboard, edit its color scheme and then add back.

jess-goddard commented 1 year ago

+1; I updated to version 3.0.0rc4 and when I clear the dashboard color scheme and save, it appears that it still blocks the chart level. I also noticed that the dashboard reverts back to having a color scheme despite having cleared and saved it – though perhaps this is another issue.

rusackas commented 6 months ago

It's been a while since this issue was commented on, but I believe this is still an issue in current master. CC @geido who I believe has this on a punch list of things to tackle in the dashboard color palette project he's working on.

geido commented 6 months ago

Thanks. I am looking into this

hk-the-analyst commented 6 months ago

We are also facing the same issue- Everytime we refresh the dashboard- The chart color is getting changed- We tried clearing the color scheme of Dashboard but it is not getting reflected, for this reason we are unable to change the color scheme of the chart as well

OrwaRebootMob commented 4 months ago

Any update on this issue?

rusackas commented 4 months ago

This is still an issue AFAIK.

OrwaRebootMob commented 4 months ago

Is there anyone working on the issue at the moment?

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Evan Rusackas @.> Sent: Monday, June 3, 2024 8:09:16 PM To: apache/superset @.> Cc: Orwa Diraneyya @.>; Comment @.> Subject: Re: [apache/superset] Cannot set color scheme for dashboard-associated chart even when dashboard color scheme is cleared (Issue #23874)

This is still an issue AFAIK.

— Reply to this email directly, view it on GitHubhttps://github.com/apache/superset/issues/23874#issuecomment-2145825744, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BFZDGTYLTGEAGAHOEGEQIRDZFSWMZAVCNFSM6AAAAAAXPX76F6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBVHAZDKNZUGQ. You are receiving this because you commented.Message ID: @.***>

rusackas commented 4 months ago

Is there anyone working on the issue at the moment?

Not that I'm aware of... go for it!

geido commented 3 months ago

This is not prioritized still. It would be good for someone to pick this up. Marked this as a good first issue

Rohitpandey357 commented 2 weeks ago

Hi @geido, I would like to work on the issue.

Can you please guide me on where I should start looking in the codebase?

geido commented 1 week ago

This is not prioritized still. It would be good for someone to pick this up. Marked this as a good first issue

Hey @Rohitpandey357 join me on Apache Superset Slack. I am Diego Pucci in there. Let's plan around this. Happy to get you up and running with this!