diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx index a07ea02f755..90f1049f240 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx @@ -380,6 +380,7 @@ function BigNumberVis({ height={maxHeight} echartOptions={echartOptions} eventHandlers={eventHandlers} + vizType={formData?.vizType} /> ) ); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/EchartsBoxPlot.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/EchartsBoxPlot.tsx index d293361f1da..637e8236fa8 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/EchartsBoxPlot.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/EchartsBoxPlot.tsx @@ -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} /> ); } diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/EchartsGantt.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/EchartsGantt.tsx index adf51b47b88..bf8aa4e65fd 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/EchartsGantt.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/EchartsGantt.tsx @@ -83,6 +83,7 @@ export default function EchartsGantt(props: EchartsGanttChartTransformedProps) { echartOptions={echartOptions} selectedValues={selectedValues} eventHandlers={eventHandlers} + vizType={formData.vizType} /> ); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Graph/EchartsGraph.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Graph/EchartsGraph.tsx index 830af8f9e80..b765bb6bc0e 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Graph/EchartsGraph.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Graph/EchartsGraph.tsx @@ -175,6 +175,7 @@ export default function EchartsGraph({ width={width} echartOptions={echartOptions} eventHandlers={eventHandlers} + vizType={formData.vizType} /> ); } diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/Heatmap.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/Heatmap.tsx index 96bd0ed4139..21ca3ae0152 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/Heatmap.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/Heatmap.tsx @@ -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 ( ); } diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/Histogram.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/Histogram.tsx index 5ab12ff77aa..4f7b5c220d7 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/Histogram.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/Histogram.tsx @@ -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} /> ); } diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/EchartsMixedTimeseries.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/EchartsMixedTimeseries.tsx index c3fda189c72..d3625f1c955 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/EchartsMixedTimeseries.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/EchartsMixedTimeseries.tsx @@ -217,6 +217,7 @@ export default function EchartsMixedTimeseries({ echartOptions={echartOptions} eventHandlers={eventHandlers} selectedValues={selectedValues} + vizType={formData.vizType} /> ); } diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Sankey/Sankey.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Sankey/Sankey.tsx index b01da214c37..88c5b14f93d 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Sankey/Sankey.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Sankey/Sankey.tsx @@ -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 ( ); } diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/EchartsSunburst.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/EchartsSunburst.tsx index 4d2c13d9434..8ba09fd5d8f 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/EchartsSunburst.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/EchartsSunburst.tsx @@ -160,6 +160,7 @@ export default function EchartsSunburst(props: SunburstTransformedProps) { echartOptions={echartOptions} eventHandlers={eventHandlers} selectedValues={selectedValues} + vizType={formData.vizType} /> ); } diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/EchartsTree.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/EchartsTree.tsx index 8e561154c43..cb1ef9b904c 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/EchartsTree.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/EchartsTree.tsx @@ -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 ( ); } diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/EchartsTreemap.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/EchartsTreemap.tsx index e00f9cb52b1..6fb4f57e371 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/EchartsTreemap.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/EchartsTreemap.tsx @@ -163,6 +163,7 @@ export default function EchartsTreemap({ echartOptions={echartOptions} eventHandlers={eventHandlers} selectedValues={selectedValues} + vizType={formData.vizType} /> ); } diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/EchartsWaterfall.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/EchartsWaterfall.tsx index 99d81354ebc..58c86a87841 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/EchartsWaterfall.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/EchartsWaterfall.tsx @@ -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} /> ); } diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/components/Echart.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/components/Echart.tsx index 77f03521fcf..f55cc43f24b 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/components/Echart.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/components/Echart.tsx @@ -131,6 +131,7 @@ function Echart( zrEventHandlers, selectedValues = {}, refs, + vizType, }: EchartsProps, ref: Ref, ) { diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/types.ts b/superset-frontend/plugins/plugin-chart-echarts/src/types.ts index fe923003b3c..33c9cc07b9a 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/types.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/types.ts @@ -55,6 +55,7 @@ export interface EchartsProps { selectedValues?: Record; forceClear?: boolean; refs: Refs; + vizType?: string; } export interface EchartsHandler {