From 19151d1e4a6d735f4229a28eae2c6b00e1409227 Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Tue, 22 Oct 2024 23:07:40 +0300 Subject: [PATCH 01/10] fix: fixed Add Metrics to Tree Chart (#29158) --- .../plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx index 34d65a27d315..26fafbdc1b7f 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx @@ -89,9 +89,7 @@ const controlPanel: ControlPanelConfig = { { name: 'metric', config: { - ...optionalEntity, - type: 'DndMetricSelect', - label: t('Metric'), + ...sharedControls.metric, description: t('Metric for node values'), }, }, From 35aaeb66bf9d01a4e3f1cb7c9c92989b1503b25e Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Tue, 22 Oct 2024 23:45:27 +0300 Subject: [PATCH 02/10] fix: clear modal after CSS templates is added --- .../src/features/cssTemplates/CssTemplateModal.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx b/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx index 16af9e7039d3..74f0491543ea 100644 --- a/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx +++ b/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx @@ -131,7 +131,10 @@ const CssTemplateModal: FunctionComponent = ({ if (onCssTemplateAdd) { onCssTemplateAdd(); } - + setCurrentCssTemplate({ + template_name: '', + css: '', + }); hide(); }); } From db3afda17db52cf217af4f20b09a4d1e09848117 Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Wed, 23 Oct 2024 22:15:52 +0300 Subject: [PATCH 03/10] Revert "fix: clear modal after CSS templates is added" This reverts commit 35aaeb66bf9d01a4e3f1cb7c9c92989b1503b25e. --- .../src/features/cssTemplates/CssTemplateModal.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx b/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx index 74f0491543ea..16af9e7039d3 100644 --- a/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx +++ b/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx @@ -131,10 +131,7 @@ const CssTemplateModal: FunctionComponent = ({ if (onCssTemplateAdd) { onCssTemplateAdd(); } - setCurrentCssTemplate({ - template_name: '', - css: '', - }); + hide(); }); } From 9eea2e6fd6ac5cf4f41ae91b2941a9bfea82718b Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Mon, 25 Nov 2024 21:45:32 +0300 Subject: [PATCH 04/10] fix: tree metrics exclude validator --- .../plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx index 26fafbdc1b7f..4d8b0fa978ee 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx @@ -90,6 +90,8 @@ const controlPanel: ControlPanelConfig = { name: 'metric', config: { ...sharedControls.metric, + clearable: true, + validators: [], description: t('Metric for node values'), }, }, From 601dde2bb5fbde32df0a7311559b2ccf7e4773e0 Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Tue, 25 Mar 2025 15:06:36 +0300 Subject: [PATCH 05/10] fix: revert #30679 --- .../plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx index 4d8b0fa978ee..34d65a27d315 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx @@ -89,9 +89,9 @@ const controlPanel: ControlPanelConfig = { { name: 'metric', config: { - ...sharedControls.metric, - clearable: true, - validators: [], + ...optionalEntity, + type: 'DndMetricSelect', + label: t('Metric'), description: t('Metric for node values'), }, }, From 1bf4fdda7732c9c57c2bddcf001078e3cf9fe68a Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Sun, 20 Jul 2025 22:04:40 +0300 Subject: [PATCH 06/10] fix --- .../plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx index 34d65a27d315..4d8b0fa978ee 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx @@ -89,9 +89,9 @@ const controlPanel: ControlPanelConfig = { { name: 'metric', config: { - ...optionalEntity, - type: 'DndMetricSelect', - label: t('Metric'), + ...sharedControls.metric, + clearable: true, + validators: [], description: t('Metric for node values'), }, }, From 838215a46b8dd377a8a66938889ee001950c354c Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Sat, 11 Apr 2026 01:38:16 +0300 Subject: [PATCH 07/10] feat: add add tooltip to table header --- .../plugin-chart-ag-grid-table/src/AgGridTable/index.tsx | 1 + .../plugin-chart-ag-grid-table/src/transformProps.ts | 8 ++++++++ .../plugins/plugin-chart-ag-grid-table/src/types.ts | 1 + .../plugin-chart-ag-grid-table/src/utils/useColDefs.ts | 1 + 4 files changed, 11 insertions(+) diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/index.tsx b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/index.tsx index 011c2cf0ef9f..07f632f09fe6 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/index.tsx +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/index.tsx @@ -506,6 +506,7 @@ const AgGridDataTable: FunctionComponent = memo( paginationPageSizeSelector={PAGE_SIZE_OPTIONS} suppressDragLeaveHidesColumns pinnedBottomRowData={showTotals ? [cleanedTotals] : undefined} + tooltipShowDelay={500} localeText={{ // Pagination controls next: t('Next'), diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/transformProps.ts b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/transformProps.ts index c27bd856d890..8db3ac0cd1d5 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/transformProps.ts @@ -345,6 +345,7 @@ const processColumns = memoizeOne(function processColumns( column_config: columnConfig = {}, query_mode: queryMode, }, + rawDatasource, queriesData, } = props; const granularity = extractTimegrain(props.rawFormData); @@ -384,6 +385,12 @@ const processColumns = memoizeOne(function processColumns( ? config.currencyFormat : savedCurrency; + const description = + rawDatasource.columns?.find((item: any) => item.column_name === key) + ?.description ?? + rawDatasource.metrics?.find((item: any) => item.metric_name === key) + ?.description; + let formatter; if (isTime || config.d3TimeFormat) { @@ -430,6 +437,7 @@ const processColumns = memoizeOne(function processColumns( isPercentMetric, formatter, config, + description, }; }); return [metrics, percentMetrics, columns] as [ diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/types.ts b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/types.ts index e3d6bf070793..498f93575baa 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/types.ts +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/types.ts @@ -192,6 +192,7 @@ export interface InputColumn { | CurrencyFormatter; originalLabel?: string; metricName?: string; + description?: string; } export type ValueRange = [number, number] | null; diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useColDefs.ts b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useColDefs.ts index 48f713aabbeb..cd40e4a995af 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useColDefs.ts +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useColDefs.ts @@ -280,6 +280,7 @@ export const useColDefs = ({ return { field: colId, headerName: getHeaderLabel(col), + headerTooltip: col.description || '', valueFormatter: p => valueFormatter(p, col), valueGetter: p => valueGetter(p, col), cellStyle: p => { From 67c3ac492aff3f95a366ce8ff261795f527db059 Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Sat, 11 Apr 2026 01:56:30 +0300 Subject: [PATCH 08/10] fix: conmments ai --- .../src/transformProps.ts | 13 +++++++++---- .../src/utils/useColDefs.ts | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/transformProps.ts b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/transformProps.ts index 8db3ac0cd1d5..7e2bf672a8c3 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/transformProps.ts @@ -385,11 +385,16 @@ const processColumns = memoizeOne(function processColumns( ? config.currencyFormat : savedCurrency; + const metricLookupKey = key.startsWith('%') ? key.slice(1) : key; const description = - rawDatasource.columns?.find((item: any) => item.column_name === key) - ?.description ?? - rawDatasource.metrics?.find((item: any) => item.metric_name === key) - ?.description; + rawDatasource.columns?.find( + (item: { column_name?: string; description?: string | null }) => + item.column_name === key, + )?.description ?? + rawDatasource.metrics?.find( + (item: { metric_name?: string; description?: string | null }) => + item.metric_name === metricLookupKey, + )?.description; let formatter; diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useColDefs.ts b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useColDefs.ts index cd40e4a995af..2c08d6f8754d 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useColDefs.ts +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useColDefs.ts @@ -280,7 +280,7 @@ export const useColDefs = ({ return { field: colId, headerName: getHeaderLabel(col), - headerTooltip: col.description || '', + headerTooltip: col.description, valueFormatter: p => valueFormatter(p, col), valueGetter: p => valueGetter(p, col), cellStyle: p => { From ce41a742f7124b5e0ac420691cdaca5fc3530c1b Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Sun, 12 Apr 2026 00:32:20 +0300 Subject: [PATCH 09/10] fix: add test to transformProps.test --- .../test/transformProps.test.ts | 266 ++++++++++++++++++ 1 file changed, 266 insertions(+) create mode 100644 superset-frontend/plugins/plugin-chart-ag-grid-table/test/transformProps.test.ts diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/test/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-ag-grid-table/test/transformProps.test.ts new file mode 100644 index 000000000000..454fa2e63d75 --- /dev/null +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/test/transformProps.test.ts @@ -0,0 +1,266 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import transformProps from '../src/transformProps'; +import { TableChartProps } from '../src/types'; +import { GenericDataType } from '@apache-superset/core/common'; +import { QueryMode } from '@superset-ui/core'; + +function createMockChartProps( + overrides: Partial = {}, +): TableChartProps { + const defaultProps = { + height: 400, + width: 800, + rawFormData: { + viz_type: 'table', + datasource: '1__table', + query_mode: QueryMode.Aggregate, + metrics: [], + percent_metrics: [], + column_config: {}, + table_timestamp_format: '', + granularity_sqla: 'day', + time_range: 'No filter', + }, + queriesData: [ + { + data: [], + colnames: [], + coltypes: [], + rowcount: 0, + applied_filters: [], + rejected_filters: [], + }, + ], + datasource: { + columns: [], + metrics: [], + columnFormats: {}, + currencyFormats: {}, + verboseMap: {}, + }, + rawDatasource: { + columns: [], + metrics: [], + }, + filterState: {}, + hooks: { setDataMask: jest.fn(), onChartStateChange: jest.fn() }, + ownState: {}, + emitCrossFilters: false, + theme: {}, + ...overrides, + }; + return defaultProps as unknown as TableChartProps; +} + +test('extracts description from datasource.columns for a regular column', () => { + const props = createMockChartProps({ + queriesData: [ + { + data: [{ col1: 'value' }], + colnames: ['col1'], + coltypes: [GenericDataType.String], + rowcount: 1, + applied_filters: [], + rejected_filters: [], + } as any, + ], + rawDatasource: { + columns: [ + { column_name: 'col1', description: 'This is a column description' }, + ], + metrics: [], + }, + }); + + const result = transformProps(props); + const {columns} = result; + const columnMeta = columns.find(c => c.key === 'col1'); + expect(columnMeta).toBeDefined(); + expect(columnMeta!.description).toBe('This is a column description'); +}); + +test('extracts description from datasource.metrics for a metric column', () => { + const props = createMockChartProps({ + rawFormData: { + viz_type: 'table', + datasource: '1__table', + query_mode: QueryMode.Aggregate, + metrics: ['sum_sales'], + percent_metrics: [], + column_config: {}, + table_timestamp_format: '', + granularity_sqla: 'day', + time_range: 'No filter', + }, + queriesData: [ + { + data: [{ sum_sales: 100 }], + colnames: ['sum_sales'], + coltypes: [GenericDataType.Numeric], + rowcount: 1, + applied_filters: [], + rejected_filters: [], + }, + ] as any, + rawDatasource: { + columns: [], + metrics: [ + { metric_name: 'sum_sales', description: 'Total sales amount' }, + ], + }, + }); + + const result = transformProps(props); + const {columns} = result; + const columnMeta = columns.find(c => c.key === 'sum_sales'); + expect(columnMeta).toBeDefined(); + expect(columnMeta!.description).toBe('Total sales amount'); +}); + +test('prefers column description over metric description when both exist with same key', () => { + const props = createMockChartProps({ + rawFormData: { + viz_type: 'table', + datasource: '1__table', + query_mode: QueryMode.Aggregate, + metrics: ['revenue'], + percent_metrics: [], + column_config: {}, + table_timestamp_format: '', + granularity_sqla: 'day', + time_range: 'No filter', + }, + queriesData: [ + { + data: [{ revenue: 500 }], + colnames: ['revenue'], + coltypes: [GenericDataType.Numeric], + rowcount: 1, + applied_filters: [], + rejected_filters: [], + }, + ] as any, + rawDatasource: { + columns: [{ column_name: 'revenue', description: 'Column desc' }], + metrics: [{ metric_name: 'revenue', description: 'Metric desc' }], + }, + }); + + const result = transformProps(props); + const {columns} = result; + const columnMeta = columns.find(c => c.key === 'revenue'); + expect(columnMeta!.description).toBe('Column desc'); +}); + +test('handles percent metrics correctly – uses base metric name for lookup', () => { + const props = createMockChartProps({ + rawFormData: { + viz_type: 'table', + datasource: '1__table', + query_mode: QueryMode.Aggregate, + metrics: ['profit'], + percent_metrics: ['profit'], + column_config: {}, + table_timestamp_format: '', + granularity_sqla: 'day', + time_range: 'No filter', + }, + queriesData: [ + { + data: [{ '%profit': 0.15 }], + colnames: ['%profit'], + coltypes: [GenericDataType.Numeric], + rowcount: 1, + applied_filters: [], + rejected_filters: [], + }, + ] as any, + rawDatasource: { + columns: [], + metrics: [ + { metric_name: 'profit', description: 'Profit margin percent' }, + ], + }, + }); + + const result = transformProps(props); + const {columns} = result; + const columnMeta = columns.find(c => c.key === '%profit'); + expect(columnMeta).toBeDefined(); + expect(columnMeta!.description).toBe('Profit margin percent'); +}); + +test('sets description to undefined when no matching column or metric is found', () => { + const props = createMockChartProps({ + queriesData: [ + { + data: [{ unknown_col: 'x' }], + colnames: ['unknown_col'], + coltypes: [GenericDataType.String], + rowcount: 1, + applied_filters: [], + rejected_filters: [], + }, + ] as any, + rawDatasource: { + columns: [], + metrics: [], + }, + }); + + const result = transformProps(props); + const {columns} = result; + const columnMeta = columns.find(c => c.key === 'unknown_col'); + expect(columnMeta!.description).toBeUndefined(); +}); + +test('uses description from column even when verboseMap renames the column', () => { + const props = createMockChartProps({ + queriesData: [ + { + data: [{ col_x: 10 }], + colnames: ['col_x'], + coltypes: [GenericDataType.Numeric], + rowcount: 1, + applied_filters: [], + rejected_filters: [], + }, + ] as any, + datasource: { + columns: [], + metrics: [], + columnFormats: {}, + currencyFormats: {}, + verboseMap: { col_x: 'Custom Label' }, + } as any, + rawDatasource: { + columns: [ + { column_name: 'col_x', description: 'Original column description' }, + ], + metrics: [], + }, + }); + + const result = transformProps(props); + const {columns} = result; + const columnMeta = columns.find(c => c.key === 'col_x'); + expect(columnMeta!.label).toBe('Custom Label'); + expect(columnMeta!.description).toBe('Original column description'); +}); From 2d73c4670243ac9a53106ebf0e08e647004b7683 Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Sun, 12 Apr 2026 00:52:04 +0300 Subject: [PATCH 10/10] fix: test type --- .../test/transformProps.test.ts | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/test/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-ag-grid-table/test/transformProps.test.ts index 454fa2e63d75..7b870c5ab72c 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/test/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/test/transformProps.test.ts @@ -79,7 +79,7 @@ test('extracts description from datasource.columns for a regular column', () => rowcount: 1, applied_filters: [], rejected_filters: [], - } as any, + } as unknown as TableChartProps['queriesData'][number], ], rawDatasource: { columns: [ @@ -90,7 +90,7 @@ test('extracts description from datasource.columns for a regular column', () => }); const result = transformProps(props); - const {columns} = result; + const { columns } = result; const columnMeta = columns.find(c => c.key === 'col1'); expect(columnMeta).toBeDefined(); expect(columnMeta!.description).toBe('This is a column description'); @@ -118,7 +118,7 @@ test('extracts description from datasource.metrics for a metric column', () => { applied_filters: [], rejected_filters: [], }, - ] as any, + ] as unknown as TableChartProps['queriesData'], rawDatasource: { columns: [], metrics: [ @@ -128,7 +128,7 @@ test('extracts description from datasource.metrics for a metric column', () => { }); const result = transformProps(props); - const {columns} = result; + const { columns } = result; const columnMeta = columns.find(c => c.key === 'sum_sales'); expect(columnMeta).toBeDefined(); expect(columnMeta!.description).toBe('Total sales amount'); @@ -156,7 +156,7 @@ test('prefers column description over metric description when both exist with sa applied_filters: [], rejected_filters: [], }, - ] as any, + ] as unknown as TableChartProps['queriesData'], rawDatasource: { columns: [{ column_name: 'revenue', description: 'Column desc' }], metrics: [{ metric_name: 'revenue', description: 'Metric desc' }], @@ -164,7 +164,7 @@ test('prefers column description over metric description when both exist with sa }); const result = transformProps(props); - const {columns} = result; + const { columns } = result; const columnMeta = columns.find(c => c.key === 'revenue'); expect(columnMeta!.description).toBe('Column desc'); }); @@ -191,7 +191,7 @@ test('handles percent metrics correctly – uses base metric name for lookup', ( applied_filters: [], rejected_filters: [], }, - ] as any, + ] as unknown as TableChartProps['queriesData'], rawDatasource: { columns: [], metrics: [ @@ -201,7 +201,7 @@ test('handles percent metrics correctly – uses base metric name for lookup', ( }); const result = transformProps(props); - const {columns} = result; + const { columns } = result; const columnMeta = columns.find(c => c.key === '%profit'); expect(columnMeta).toBeDefined(); expect(columnMeta!.description).toBe('Profit margin percent'); @@ -218,7 +218,7 @@ test('sets description to undefined when no matching column or metric is found', applied_filters: [], rejected_filters: [], }, - ] as any, + ] as unknown as TableChartProps['queriesData'], rawDatasource: { columns: [], metrics: [], @@ -226,7 +226,7 @@ test('sets description to undefined when no matching column or metric is found', }); const result = transformProps(props); - const {columns} = result; + const { columns } = result; const columnMeta = columns.find(c => c.key === 'unknown_col'); expect(columnMeta!.description).toBeUndefined(); }); @@ -242,14 +242,14 @@ test('uses description from column even when verboseMap renames the column', () applied_filters: [], rejected_filters: [], }, - ] as any, + ] as unknown as TableChartProps['queriesData'], datasource: { columns: [], metrics: [], columnFormats: {}, currencyFormats: {}, verboseMap: { col_x: 'Custom Label' }, - } as any, + } as unknown as TableChartProps['datasource'], rawDatasource: { columns: [ { column_name: 'col_x', description: 'Original column description' }, @@ -259,7 +259,7 @@ test('uses description from column even when verboseMap renames the column', () }); const result = transformProps(props); - const {columns} = result; + const { columns } = result; const columnMeta = columns.find(c => c.key === 'col_x'); expect(columnMeta!.label).toBe('Custom Label'); expect(columnMeta!.description).toBe('Original column description');