mirror of
https://github.com/apache/superset.git
synced 2026-04-25 19:14:27 +00:00
feat(explore): Apply denormalization to tier 2 charts form data (#20524)
* feat(explore): Denormalize form data in Calendar Heatmap * feat(explore): Denormalize form data in Bubble * feat(explore): Denormalize form data in Chord * Dimensions -> Dimension for single selection * feat(explore): Denormalize form data in Country Map * feat(explore): Denormalize form data in Heatmap * feat(explore): Denormalize form data in Histogram * feat(explore): Denormalize form data in Handlebars * feat(explore): Denormalize form data in Percent Change * Use new standardized form data interface
This commit is contained in:
committed by
GitHub
parent
c348a095b9
commit
e12ee59b13
@@ -16,8 +16,12 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { t, validateNonEmpty } from '@superset-ui/core';
|
||||
import { ControlPanelConfig, sections } from '@superset-ui/chart-controls';
|
||||
import { ensureIsArray, t, validateNonEmpty } from '@superset-ui/core';
|
||||
import {
|
||||
ControlPanelConfig,
|
||||
getStandardizedControls,
|
||||
sections,
|
||||
} from '@superset-ui/chart-controls';
|
||||
|
||||
const config: ControlPanelConfig = {
|
||||
controlPanelSections: [
|
||||
@@ -69,6 +73,16 @@ const config: ControlPanelConfig = {
|
||||
description: t('Choose a target'),
|
||||
},
|
||||
},
|
||||
formDataOverrides: formData => {
|
||||
const groupby = getStandardizedControls()
|
||||
.popAllColumns()
|
||||
.filter(col => !ensureIsArray(formData.columns).includes(col));
|
||||
return {
|
||||
...formData,
|
||||
groupby,
|
||||
metric: getStandardizedControls().shiftMetric(),
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
Reference in New Issue
Block a user