GitHub user dosubot[bot] added a comment to the discussion: ECharts options 
overrides in themes: How to target specific chart instance

<!-- Answer -->
Superset’s theme system only supports ECharts options overrides globally 
(`echartsOptionsOverrides`) or per chart type 
(`echartsOptionsOverridesByChartType`). There’s no built-in way to target a 
specific chart instance (like by slice ID, chart ID, or dashboard 
context)—overrides always apply uniformly to all charts of a given type, not 
per instance [ThemeController 
code](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/theme/ThemeController.tsx)
 [PR discussion](https://github.com/apache/superset/pull/36389) 
[Docs](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docs/docs/configuration/theming.mdx).

There’s a CSS workaround for visual tweaks: you can use dashboard CSS to target 
a chart by its chart ID (e.g., `#chart-id-146`) for things like hiding columns 
in Table charts, but this only affects styling, not ECharts options [CSS 
example](https://github.com/apache/superset/issues/20453).

For advanced or per-instance ECharts customizations, you’d need to modify the 
frontend code (e.g., chart plugin files like `transformProps.ts`) or build a 
custom plugin 
[Discussion](https://github.com/apache/superset/discussions/34256). There’s no 
evidence of ongoing development or roadmap plans for instance-level ECharts 
overrides.

If you want to explore further or propose a feature, check out the [theming 
docs](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docs/docs/configuration/theming.mdx)
 and [related 
discussions](https://github.com/apache/superset/discussions/34256).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/ab518efc-be16-45e2-881d-c785350f4a69?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/ab518efc-be16-45e2-881d-c785350f4a69?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/ab518efc-be16-45e2-881d-c785350f4a69?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/ab518efc-be16-45e2-881d-c785350f4a69?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/ab518efc-be16-45e2-881d-c785350f4a69?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/ab518efc-be16-45e2-881d-c785350f4a69?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/ab518efc-be16-45e2-881d-c785350f4a69?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Superset%E2%80%99s%20theme%20system%20only%20supports%20ECharts%20options%20overrides%20globally%20%28%60echartsOptionsOverrides%60%29%20or%20per%20chart%20type%20%28%60echartsOptionsOverridesByChartType%60%29.%20There%E2%80%99s%20no%20built-in%20way%20to%20target%20a%20specific%20chart%20instance%20%28like%20by%20slice%20ID%2C%20chart%20ID%2C%20or%20dashboard%20context%29%E2%80%94overrides%20always%20apply%20uniformly%20to%20all%20charts%20of%20a%20given%20type%2C%20not%20per%20instance%20%5BThemeController%20code%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/theme/ThemeController.tsx%29%20%5BPR%20discussion%5D%28https%3A//github.com/apache/superset/pull/36389%29%20%5BDocs%5D%28https%3A/
 
/github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docs/docs/configuration/theming.mdx%29.%0A%0AThere%E2%80%99s%20a%20CSS%20workaround%20for%20visual%20tweaks%3A%20you%20can%20use%20dashboard%20CSS%20to%20target%20a%20chart%20by%20its%20chart%20ID%20%28e.g.%2C%20%60%23chart-id-146%60%29%20for%20things%20like%20hiding%20columns%20in%20Table%20charts%2C%20but%20this%20only%20affects%20styling%2C%20not%20ECharts%20options%20%5BCSS%20example%5D%28https%3A//github.com/apache/superset/issues/20453%29.%0A%0AFor%20advanced%20or%20per-instance%20ECharts%20customizations%2C%20you%E2%80%99d%20need%20to%20modify%20the%20frontend%20code%20%28e.g.%2C%20chart%20plugin%20files%20like%20%60transformProps.ts%60%29%20or%20build%20a%20custom%20plugin%20%5BDiscussion%5D%28https%3A//github.com/apache/superset/discussions/34256%29.%20There%E2%80%99s%20no%20evidence%20of%20ongoing%20development%20or%20roadmap%20plans%20for%20instance-level%20ECharts%20overrides.%0A%0AIf%20you%20want%
 
20to%20explore%20further%20or%20propose%20a%20feature%2C%20check%20out%20the%20%5Btheming%20docs%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docs/docs/configuration/theming.mdx%29%20and%20%5Brelated%20discussions%5D%28https%3A//github.com/apache/superset/discussions/34256%29.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36851)

GitHub link: 
https://github.com/apache/superset/discussions/36851#discussioncomment-15359669

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to