Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove legacy treemap/area #20639

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions superset-frontend/spec/fixtures/mockSliceEntities.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand All @@ -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: '',
Expand Down
4 changes: 0 additions & 4 deletions superset-frontend/src/visualizations/presets/MainPreset.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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' }),
Expand Down Expand Up @@ -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({
Expand Down
8 changes: 4 additions & 4 deletions superset/examples/birth_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")],
Expand All @@ -361,15 +361,15 @@ 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,
),
),
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")],
Expand All @@ -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,
),
Expand Down
8 changes: 4 additions & 4 deletions superset/examples/world_bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
Expand All @@ -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"],
),
Expand Down