rlei-odes commented on code in PR #45421:
URL: https://github.com/apache/superset/pull/45421#discussion_r4303033929
##########
superset-frontend/plugins/plugin-chart-echarts/src/utils/mergeCustomEChartOptions.ts:
##########
@@ -67,6 +68,20 @@ export function mergeCustomEChartOptions<T extends
EChartsCoreOption>(
baseValue as EChartsCoreOption,
customValue as CustomEChartOptions,
);
+ } else if (
+ key === 'series' &&
+ isPlainObject(customValue) &&
+ Array.isArray(baseValue)
+ ) {
+ // Apply a single series object to every series
+ (result as PlainObject)[key] = baseValue.map(series =>
+ isPlainObject(series)
+ ? mergeCustomEChartOptions(
+ series as EChartsCoreOption,
+ customValue as CustomEChartOptions,
+ )
+ : series,
+ );
Review Comment:
Good fined, fiexed in e08b217ddd
name and id identify a single series, so they're no longer copied from a
series object into every series; a duplicated id would also make ECharts throw.
Added a test, and updated the existing custom-legend test, which had only
passed because the names collapsed into one.
--
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]