From a912fafb6d592703c5b66f59be180220329ab9c4 Mon Sep 17 00:00:00 2001 From: Antonio Rivero <38889534+Antonio-RiveroMartnez@users.noreply.github.com> Date: Tue, 13 Feb 2024 18:35:31 +0100 Subject: [PATCH] chore(plugins): Update dropdown control for BigNumber with Time Comparison range (#27090) --- .../src/plugin/controlPanel.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-period-over-period-kpi/src/plugin/controlPanel.ts b/superset-frontend/plugins/plugin-chart-period-over-period-kpi/src/plugin/controlPanel.ts index 3d2504f639..8f16a2b8d4 100644 --- a/superset-frontend/plugins/plugin-chart-period-over-period-kpi/src/plugin/controlPanel.ts +++ b/superset-frontend/plugins/plugin-chart-period-over-period-kpi/src/plugin/controlPanel.ts @@ -61,15 +61,21 @@ const config: ControlPanelConfig = { config: { type: 'SelectControl', label: t('Range for Comparison'), - default: 'y', + default: 'r', choices: [ + ['r', 'Inherit range from time filters'], ['y', 'Year'], - ['w', 'Week'], ['m', 'Month'], - ['r', 'Range'], + ['w', 'Week'], ['c', 'Custom'], ], rerender: ['adhoc_custom'], + description: t( + 'Set the time range that will be used for the comparison metrics. ' + + 'For example, "Year" will compare to the same dates one year earlier. ' + + 'Use "Inherit range from time filters" to shift the comparison time range' + + 'by the same length as your time range and use "Custom" to set a custom comparison range.', + ), }, }, ],