Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
jonhoo opened this issue Apr 28, 2023 · 13 comments · May be fixed by #30646
Open
3 tasks done
Labels
#bug Bug report good first issue Good first issues for new contributors

Comments

@jonhoo
Copy link

jonhoo commented Apr 28, 2023

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:

if (dashboardId) {
return [
{
value: 'dashboard',
label: t('dashboard'),
customLabel: (
<Tooltip title={DASHBOARD_ALERT}>{t('Dashboard scheme')}</Tooltip>
),
},
];
}

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

  • browser type and version: Firefox 112.0.1.
  • superset version: Hosted custom build, so I'm not 100% sure. I think it's close to master.
  • python version: Hosted, so unknown.
  • node.js version: Hosted, so unknown.
  • any feature flags active: Hosted, so unknown.

Checklist

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

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

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.

@jonhoo jonhoo added the #bug Bug report label Apr 28, 2023
@cshami
Copy link

cshami commented Aug 31, 2023

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

@maratbakiev2
Copy link

+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
Copy link

+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
Copy link
Member

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
Copy link
Member

geido commented Mar 15, 2024

Thanks. I am looking into this

@hk-the-analyst
Copy link

hk-the-analyst commented Apr 2, 2024

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
Copy link

Any update on this issue?

@rusackas
Copy link
Member

rusackas commented Jun 3, 2024

This is still an issue AFAIK.

@OrwaRebootMob
Copy link

OrwaRebootMob commented Jun 3, 2024 via email

@rusackas
Copy link
Member

rusackas commented Jun 4, 2024

Is there anyone working on the issue at the moment?

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

@geido geido added the good first issue Good first issues for new contributors label Jun 26, 2024
@geido
Copy link
Member

geido commented Jun 26, 2024

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

@Rohitpandey357
Copy link

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
Copy link
Member

geido commented Sep 25, 2024

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!

@geido geido linked a pull request Oct 22, 2024 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report good first issue Good first issues for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants