You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by yo...@apache.org on 2022/09/04 01:39:11 UTC

[superset] branch master updated: feat(explore): standardized controls for time pivot chart (#21321)

This is an automated email from the ASF dual-hosted git repository.

yongjiezhao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 79525dfaf2 feat(explore): standardized controls for time pivot chart (#21321)
79525dfaf2 is described below

commit 79525dfaf29b810af668e3b6c5a56cd866370d92
Author: Stephen Liu <75...@qq.com>
AuthorDate: Sun Sep 4 09:38:53 2022 +0800

    feat(explore): standardized controls for time pivot chart (#21321)
---
 .../plugins/legacy-preset-chart-nvd3/src/TimePivot/controlPanel.ts   | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/controlPanel.ts
index 2d1f765c31..36d6189c05 100644
--- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/controlPanel.ts
+++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/controlPanel.ts
@@ -20,6 +20,7 @@ import { t } from '@superset-ui/core';
 import {
   ControlPanelConfig,
   D3_FORMAT_OPTIONS,
+  getStandardizedControls,
   sections,
 } from '@superset-ui/chart-controls';
 import {
@@ -123,6 +124,10 @@ const config: ControlPanelConfig = {
       clearable: false,
     },
   },
+  formDataOverrides: formData => ({
+    ...formData,
+    metric: getStandardizedControls().shiftMetric,
+  }),
 };
 
 export default config;