mirror of
https://github.com/apache/superset.git
synced 2026-04-17 07:05:04 +00:00
fix(echarts): pass vizType to enable theme overrides in all chart types (#36389)
This commit is contained in:
committed by
GitHub
parent
4a249a0745
commit
1d8d30e5bb
@@ -379,6 +379,7 @@ function BigNumberVis({
|
||||
height={maxHeight}
|
||||
echartOptions={echartOptions}
|
||||
eventHandlers={eventHandlers}
|
||||
vizType={formData?.vizType}
|
||||
/>
|
||||
)
|
||||
);
|
||||
|
||||
@@ -21,7 +21,8 @@ import { allEventHandlers } from '../utils/eventHandlers';
|
||||
import { BoxPlotChartTransformedProps } from './types';
|
||||
|
||||
export default function EchartsBoxPlot(props: BoxPlotChartTransformedProps) {
|
||||
const { height, width, echartOptions, selectedValues, refs } = props;
|
||||
const { height, width, echartOptions, selectedValues, refs, formData } =
|
||||
props;
|
||||
|
||||
const eventHandlers = allEventHandlers(props);
|
||||
|
||||
@@ -33,6 +34,7 @@ export default function EchartsBoxPlot(props: BoxPlotChartTransformedProps) {
|
||||
echartOptions={echartOptions}
|
||||
eventHandlers={eventHandlers}
|
||||
selectedValues={selectedValues}
|
||||
vizType={formData.vizType}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ export default function EchartsGantt(props: EchartsGanttChartTransformedProps) {
|
||||
echartOptions={echartOptions}
|
||||
selectedValues={selectedValues}
|
||||
eventHandlers={eventHandlers}
|
||||
vizType={formData.vizType}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -175,6 +175,7 @@ export default function EchartsGraph({
|
||||
width={width}
|
||||
echartOptions={echartOptions}
|
||||
eventHandlers={eventHandlers}
|
||||
vizType={formData.vizType}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,13 +20,14 @@ import { HeatmapTransformedProps } from './types';
|
||||
import Echart from '../components/Echart';
|
||||
|
||||
export default function Heatmap(props: HeatmapTransformedProps) {
|
||||
const { height, width, echartOptions, refs } = props;
|
||||
const { height, width, echartOptions, refs, formData } = props;
|
||||
return (
|
||||
<Echart
|
||||
refs={refs}
|
||||
height={height}
|
||||
width={width}
|
||||
echartOptions={echartOptions}
|
||||
vizType={formData.vizType}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ export default function Histogram(props: HistogramTransformedProps) {
|
||||
onFocusedSeries,
|
||||
onLegendStateChanged,
|
||||
refs,
|
||||
formData,
|
||||
} = props;
|
||||
|
||||
const eventHandlers: EventHandlers = {
|
||||
@@ -55,6 +56,7 @@ export default function Histogram(props: HistogramTransformedProps) {
|
||||
width={width}
|
||||
echartOptions={echartOptions}
|
||||
eventHandlers={eventHandlers}
|
||||
vizType={formData.vizType}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -215,6 +215,7 @@ export default function EchartsMixedTimeseries({
|
||||
echartOptions={echartOptions}
|
||||
eventHandlers={eventHandlers}
|
||||
selectedValues={selectedValues}
|
||||
vizType={formData.vizType}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import { SankeyTransformedProps } from './types';
|
||||
import Echart from '../components/Echart';
|
||||
|
||||
export default function Sankey(props: SankeyTransformedProps) {
|
||||
const { height, width, echartOptions, refs } = props;
|
||||
const { height, width, echartOptions, refs, formData } = props;
|
||||
|
||||
return (
|
||||
<Echart
|
||||
@@ -28,6 +28,7 @@ export default function Sankey(props: SankeyTransformedProps) {
|
||||
height={height}
|
||||
width={width}
|
||||
echartOptions={echartOptions}
|
||||
vizType={formData.vizType}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -160,6 +160,7 @@ export default function EchartsSunburst(props: SunburstTransformedProps) {
|
||||
echartOptions={echartOptions}
|
||||
eventHandlers={eventHandlers}
|
||||
selectedValues={selectedValues}
|
||||
vizType={formData.vizType}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -16,21 +16,23 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { EchartsProps } from '../types';
|
||||
import { TreeTransformedProps } from './types';
|
||||
import Echart from '../components/Echart';
|
||||
|
||||
export default function EchartsGraph({
|
||||
export default function EchartsTree({
|
||||
echartOptions,
|
||||
height,
|
||||
refs,
|
||||
width,
|
||||
}: EchartsProps) {
|
||||
formData,
|
||||
}: TreeTransformedProps) {
|
||||
return (
|
||||
<Echart
|
||||
refs={refs}
|
||||
height={height}
|
||||
width={width}
|
||||
echartOptions={echartOptions}
|
||||
vizType={formData.vizType}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -163,6 +163,7 @@ export default function EchartsTreemap({
|
||||
echartOptions={echartOptions}
|
||||
eventHandlers={eventHandlers}
|
||||
selectedValues={selectedValues}
|
||||
vizType={formData.vizType}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ import { EventHandlers } from '../types';
|
||||
export default function EchartsWaterfall(
|
||||
props: WaterfallChartTransformedProps,
|
||||
) {
|
||||
const { height, width, echartOptions, refs, onLegendStateChanged } = props;
|
||||
const { height, width, echartOptions, refs, onLegendStateChanged, formData } =
|
||||
props;
|
||||
|
||||
const eventHandlers: EventHandlers = {
|
||||
legendselectchanged: payload => {
|
||||
@@ -44,6 +45,7 @@ export default function EchartsWaterfall(
|
||||
width={width}
|
||||
echartOptions={echartOptions}
|
||||
eventHandlers={eventHandlers}
|
||||
vizType={formData.vizType}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user