feat(theme): enable generalized ECharts theme overrides for array properties (#37965)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Evan Rusackas
2026-03-02 22:51:09 -05:00
committed by GitHub
parent 6e84d29707
commit 0681df3d02
5 changed files with 618 additions and 243 deletions

View File

@@ -29,7 +29,6 @@ import {
} from 'react';
import { useSelector } from 'react-redux';
import { mergeReplaceArrays } from '@superset-ui/core';
import { styled, useTheme } from '@apache-superset/core/ui';
import { use, init, EChartsType, registerLocale } from 'echarts/core';
import {
@@ -66,6 +65,7 @@ import {
import { LabelLayout } from 'echarts/features';
import { EchartsHandler, EchartsProps, EchartsStylesProps } from '../types';
import { DEFAULT_LOCALE } from '../constants';
import { mergeEchartsThemeOverrides } from '../utils/themeOverrides';
// Define this interface here to avoid creating a dependency back to superset-frontend,
// TODO: to move the type to @superset-ui/core
@@ -258,7 +258,7 @@ function Echart(
}
: {};
const themedEchartOptions = mergeReplaceArrays(
const themedEchartOptions = mergeEchartsThemeOverrides(
baseTheme,
echartOptions,
globalOverrides,