Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammed-baban committed Apr 8, 2024
1 parent d724207 commit 0d2bdc0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 2 additions & 0 deletions superset-frontend/src/pages/DvtChart/dvtChartFormPayloads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,11 @@ const DvtChartFormPayloads: DvtChartFormPayloadsProps[] = [
'rowSubTotals',
'rowTotals',
'row_limit',
'series_limit',
'series_limit_metric',
'temporal_columns_lookup',
'time_grain_sqla',
'transposePivot',
'url_params',
'valueFormat',
'viz_type',
Expand Down
15 changes: 9 additions & 6 deletions superset-frontend/src/pages/DvtChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,6 @@ const DvtChart = () => {
case 'gauge_chart':
return [[metricsFormation('metric')[0], false]];
case 'bubble_v2':
case 'pivot_table_v2':
return values.timeseries_limit_metric.length
? [[metricsFormation('timeseries_limit_metric')[0], false]]
: undefined;
Expand Down Expand Up @@ -1142,9 +1141,11 @@ const DvtChart = () => {
server_page_length: values.server_page_length.value,
show_cell_bars: true,
table_timestamp_format: 'smart_date',
temporal_columns_lookup: selectedChart?.dataset?.columns
?.filter((item: any) => item.is_dttm === true)
.map((item: any) => ({ [item.column_name]: true })),
temporal_columns_lookup: Object.fromEntries(
selectedChart?.dataset?.columns
?.filter((item: any) => item.is_dttm === true)
.map((item: any) => [item.column_name, true]),
),
server_pagination: values.server_pagination,
entity: droppedOnlyLabels('entity')[0],
orderby: values.timeseries_limit_metric.length
Expand Down Expand Up @@ -1194,7 +1195,6 @@ const DvtChart = () => {
colSubTotals: values.colSubTotals,
colTotals: values.colTotals,
combineMetric: values.combineMetric,
conditional_formatting: [],
groupbyColumns: values?.groupbyColumns
? values.groupbyColumns.map((v: any) => v.label)
: [],
Expand All @@ -1210,6 +1210,9 @@ const DvtChart = () => {
: undefined,
transposePivot: values.transposePivot,
valueFormat: 'SMART_NUMBER',
series_limit: values.series_limit.value
? Number(values.series_limit.value)
: 0,
},
queries: [
{
Expand Down Expand Up @@ -1252,7 +1255,7 @@ const DvtChart = () => {
row_limit: Number(values.row_limit.value),
series_columns: droppedOnlyLabels('groupby'),
series_limit:
active === 'pivot_table_v2' ? values.series_limit.value : 0,
active === 'pivot_table_v2' ? Number(values.series_limit.value) : 0,
order_desc: active === 'pivot_table_v2' ? values.order_desc : true,
url_params: selectedChart?.form_data?.url_params,
custom_params: {},
Expand Down

0 comments on commit 0d2bdc0

Please sign in to comment.