ECharts Configuration Overrides not working for me. #41620
|
Since superset 6.0, Superset provides fine-grained control over ECharts visualizations through theme-level configuration overrides, which allows user to customize the appearance and behavior of all ECharts-based charts without modifying individual chart configurations. But even though configuring the echartsOptionsOverrides and echartsOptionsOverridesByChartType in superset_config.py THEME_DEFAULT, the changes are not reflected in the dashboard. I have ENABLE_UI_THEME_ADMINISTRATION=True also enabled in the config. Any help will be appreciated. |
Replies: 1 comment 1 reply
|
This usually points to Superset not rendering with the theme object you think it is using, rather than ECharts ignoring the option itself. The first thing I would check is the interaction with A good debugging pattern is to start with an intentionally obvious global override, not a subtle chart-type-specific one: THEME_DEFAULT = {
"themeName": "Custom theme",
"echartsOptionsOverrides": {
"backgroundColor": "#ffefef",
"animation": False,
"textStyle": {
"fontFamily": "Arial",
},
},
"echartsOptionsOverridesByChartType": {
"echarts_timeseries_line": {
"grid": {
"left": 80,
"right": 40,
},
},
},
}If A few concrete things worth checking:
One subtle point: if a theme has already been created or selected via UI theme administration, updating If it still does not apply, the most useful details would be the exact If my answer solved your problem, you can click answered the question. I'm really here to help, and along the way I'm also collecting Galaxy Brain badges haha 😆 |
This usually points to Superset not rendering with the theme object you think it is using, rather than ECharts ignoring the option itself.
The first thing I would check is the interaction with
ENABLE_UI_THEME_ADMINISTRATION=True. Once theme administration is enabled, the active theme can come from the metadata DB / UI-managed theme configuration. In that case, changingTHEME_DEFAULTinsuperset_config.pymay not affect dashboards that are already using a UI-managed theme. As a quick test, either temporarily disable theme administration or add the sameechartsOptionsOverridesdirectly to the active theme in the UI and refresh the dashboard.A good debugging pattern is to start with an inte…