Bug description

I have added an extra color palette in EXTRA_CATEGORICAL_COLOR_SCHEMES section in the config.py file but the added color palette is not visible in the frontend I tried restarting and redeploying once the changes are done, but the issue wasn't fixed.

Image

Image

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

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.

Comment From: dosubot[bot]

Hey @DarshanP010! I'm here to help you with any bugs, questions, or contributions you have for the project. Let's tackle this issue together!

I found a similar unsolved discussion regarding adding color palettes to charts and dashboards in Apache Superset. You can view it here [1].

To address the issue of your custom color palette not appearing in the frontend, ensure that you have followed the correct process for registering new color schemes in the frontend. This involves creating color scheme configurations, instantiating color schemes, and registering them using the appropriate registry functions. You can refer to the detailed steps and code snippet provided in the setupColors.ts file [2].

Additionally, check if there is a specific order or dependency for loading configuration files that might affect the visibility of new color palettes. The superset/config.py file allows configurations to be overridden by a custom superset_config.py file, which could impact the loading of your new color palettes [3].

If the issue persists, consider clearing or refreshing the cache to ensure new configurations are loaded. This can be done using the cache_manager.cache.clear() and cache_manager.data_cache.clear() methods [4].

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

Cc @sadpandajoe @michael-s-molina

Comment From: rusackas

Tagging @geido here too... I don't think anything changed with 5.0 necessarily, so I'm not sure what's up with this one.

Comment From: Quatters

I can't reproduce this. Maybe EXTRA_CATEGORICAL_COLOR_SCHEMES is overwritten somewhere?

Comment From: rusackas

My only hunch here is that they uncommented the example code, and didn't comment out the empty "merely a default" part in this code block:

# EXTRA_CATEGORICAL_COLOR_SCHEMES is used for adding custom categorical color schemes
# example code for "My custom warm to hot" color scheme
# EXTRA_CATEGORICAL_COLOR_SCHEMES = [
#     {
#         "id": 'myVisualizationColors',
#         "description": '',
#         "label": 'My Visualization Colors',
#         "isDefault": True,
#         "colors":
#          ['#006699', '#009DD9', '#5AAA46', '#44AAAA', '#DDAA77', '#7799BB', '#88AA77',
#          '#552288', '#5AAA46', '#CC7788', '#EEDD55', '#9977BB', '#BBAA44', '#DDCCDD']
#     }]

# This is merely a default
EXTRA_CATEGORICAL_COLOR_SCHEMES: list[dict[str, Any]] = []

Comment From: rusackas

Closing as non-reproducible/inactive, but happy to revisit if we can get more info here.