diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/area.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/area.test.js index 59b8beabe38b9..898839e8aff84 100644 --- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/area.test.js +++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/area.test.js @@ -19,7 +19,7 @@ describe('Visualization > Area', () => { const AREA_FORM_DATA = { datasource: '2__table', - viz_type: 'area', + viz_type: 'echarts_area', slice_id: 48, granularity_sqla: 'year', time_grain_sqla: 'P1D', diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/treemap.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/treemap.test.js index 1be85e9e4cdfb..2c9177676ec00 100644 --- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/treemap.test.js +++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/treemap.test.js @@ -19,12 +19,12 @@ describe('Visualization > Treemap', () => { const TREEMAP_FORM_DATA = { datasource: '2__table', - viz_type: 'treemap', + viz_type: 'treemap_v2', slice_id: 10, granularity_sqla: 'year', time_grain_sqla: 'P1D', time_range: 'No filter', - metrics: ['sum__SP_POP_TOTL'], + metric: 'sum__SP_POP_TOTL', adhoc_filters: [], groupby: ['country_code'], row_limit: 50000, diff --git a/superset-frontend/spec/fixtures/mockSliceEntities.js b/superset-frontend/spec/fixtures/mockSliceEntities.js index 69570c5c8f874..f049755ed510a 100644 --- a/superset-frontend/spec/fixtures/mockSliceEntities.js +++ b/superset-frontend/spec/fixtures/mockSliceEntities.js @@ -161,7 +161,7 @@ export const sliceEntitiesForDashboard = { slice_url: '/superset/explore/?form_data=%7B%22slice_id%22%3A%20134%7D', slice_name: "World's Pop Growth", form_data: {}, - viz_type: 'area', + viz_type: 'echarts_area', datasource: '2__table', description: null, description_markeddown: '', @@ -185,7 +185,7 @@ export const sliceEntitiesForDashboard = { slice_url: '/superset/explore/?form_data=%7B%22slice_id%22%3A%20136%7D', slice_name: 'Treemap', form_data: {}, - viz_type: 'treemap', + viz_type: 'treemap_v2', datasource: '2__table', description: null, description_markeddown: '', diff --git a/superset-frontend/src/visualizations/presets/MainPreset.js b/superset-frontend/src/visualizations/presets/MainPreset.js index 837cd98a7aa53..3194b746cbf24 100644 --- a/superset-frontend/src/visualizations/presets/MainPreset.js +++ b/superset-frontend/src/visualizations/presets/MainPreset.js @@ -33,11 +33,9 @@ import RoseChartPlugin from '@superset-ui/legacy-plugin-chart-rose'; import SankeyChartPlugin from '@superset-ui/legacy-plugin-chart-sankey'; import SunburstChartPlugin from '@superset-ui/legacy-plugin-chart-sunburst'; import TableChartPlugin from '@superset-ui/plugin-chart-table'; -import TreemapChartPlugin from '@superset-ui/legacy-plugin-chart-treemap'; import { WordCloudChartPlugin } from '@superset-ui/plugin-chart-word-cloud'; import WorldMapChartPlugin from '@superset-ui/legacy-plugin-chart-world-map'; import { - AreaChartPlugin, BarChartPlugin, BubbleChartPlugin, BulletChartPlugin, @@ -94,7 +92,6 @@ export default class MainPreset extends Preset { name: 'Legacy charts', presets: [new DeckGLChartPreset()], plugins: [ - new AreaChartPlugin().configure({ key: 'area' }), new BarChartPlugin().configure({ key: 'bar' }), new BigNumberChartPlugin().configure({ key: 'big_number' }), new BigNumberTotalChartPlugin().configure({ key: 'big_number_total' }), @@ -135,7 +132,6 @@ export default class MainPreset extends Preset { new TableChartPlugin().configure({ key: 'table' }), new TimePivotChartPlugin().configure({ key: 'time_pivot' }), new TimeTableChartPlugin().configure({ key: 'time_table' }), - new TreemapChartPlugin().configure({ key: 'treemap' }), new WordCloudChartPlugin().configure({ key: 'word_cloud' }), new WorldMapChartPlugin().configure({ key: 'world_map' }), new EchartsAreaChartPlugin().configure({ diff --git a/superset/examples/birth_names.py b/superset/examples/birth_names.py index 6b37fe9d08dcf..c1da195d5ce47 100644 --- a/superset/examples/birth_names.py +++ b/superset/examples/birth_names.py @@ -352,7 +352,7 @@ def create_slices(tbl: SqlaTable, admin_owner: bool) -> Tuple[List[Slice], List[ Slice( **slice_props, slice_name="Top 10 Girl Name Share", - viz_type="area", + viz_type="echarts_area", params=get_slice_json( defaults, adhoc_filters=[gen_filter("gender", "girl")], @@ -361,7 +361,7 @@ def create_slices(tbl: SqlaTable, admin_owner: bool) -> Tuple[List[Slice], List[ limit=10, stacked_style="expand", time_grain_sqla="P1D", - viz_type="area", + viz_type="echarts_area", x_axis_forma="smart_date", metrics=metrics, ), @@ -369,7 +369,7 @@ def create_slices(tbl: SqlaTable, admin_owner: bool) -> Tuple[List[Slice], List[ Slice( **slice_props, slice_name="Top 10 Boy Name Share", - viz_type="area", + viz_type="echarts_area", params=get_slice_json( defaults, adhoc_filters=[gen_filter("gender", "boy")], @@ -378,7 +378,7 @@ def create_slices(tbl: SqlaTable, admin_owner: bool) -> Tuple[List[Slice], List[ limit=10, stacked_style="expand", time_grain_sqla="P1D", - viz_type="area", + viz_type="echarts_area", x_axis_forma="smart_date", metrics=metrics, ), diff --git a/superset/examples/world_bank.py b/superset/examples/world_bank.py index 39b982aa52468..a39bf542fcacf 100644 --- a/superset/examples/world_bank.py +++ b/superset/examples/world_bank.py @@ -313,14 +313,14 @@ def create_slices(tbl: BaseDatasource) -> List[Slice]: ), Slice( slice_name="World's Pop Growth", - viz_type="area", + viz_type="echarts_area", datasource_type=DatasourceType.TABLE, datasource_id=tbl.id, params=get_slice_json( defaults, since="1960-01-01", until="now", - viz_type="area", + viz_type="echarts_area", groupby=["region"], metrics=metrics, ), @@ -343,14 +343,14 @@ def create_slices(tbl: BaseDatasource) -> List[Slice]: ), Slice( slice_name="Treemap", - viz_type="treemap", + viz_type="treemap_v2", datasource_type=DatasourceType.TABLE, datasource_id=tbl.id, params=get_slice_json( defaults, since="1960-01-01", until="now", - viz_type="treemap", + viz_type="treemap_v2", metrics=["sum__SP_POP_TOTL"], groupby=["region", "country_code"], ),