rusackas commented on code in PR #34876:
URL: https://github.com/apache/superset/pull/34876#discussion_r2320500999


##########
superset-frontend/packages/superset-ui-core/src/theme/types.ts:
##########
@@ -127,6 +127,15 @@ export interface SupersetSpecificTokens {
   // Spinner-related
   brandSpinnerUrl?: string;
   brandSpinnerSvg?: string;
+
+  // ECharts-related
+  /** Global ECharts configuration overrides applied to all chart types */
+  echartsOptionsOverrides?: any;

Review Comment:
   Agreed. The more I think about this, it kind of couples ECharts to the core 
codebase fairly tightly, where we're also making an active effort to _decouple_ 
these libraries/visualizations from the core, to have a more 
extensible/agnostic Superset. I'm a little worried about the proliferation of 
themes within a theme... it might not be long until we have the Superset Theme 
containing sets of overrides for any number of viz libraries that get loaded in 
as extensions.
   
   A couple of alternative options have come up before - though they don't seem 
quite sufficient:
   1) Having an "advanced" control that lets you override this on a per-chart 
basis
   2) Adopting the tokens we want to apply to viz components _in general_ into 
the core Superset theme, and then adding a means of mapping them in the chart 
implementations (e.g. coding ECharts extensions to map Superset's 
`borderRadius` to Echart's `barBorderRadius` for the bar chart, `radius` for 
Pie, etc.)
   
   Another way to handle that *might* be to brainstorm a way to make Themes 
themselves be extendable. I.e. if you add one or more extensions for ECharts, 
you could unlock an additional panel to tweak ECharts options... and get even 
more mapping control surfaces if you add new things to the mix like Observable 
Plot / Keppler / Plotly / Visx / Whatever :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to