mirror of
https://github.com/apache/superset.git
synced 2026-07-19 05:05:39 +00:00
feat: added conditional formatting enhancements string to pivot table (#35863)
This commit is contained in:
@@ -31,6 +31,7 @@ import {
|
||||
QueryFormMetric,
|
||||
SMART_DATE_ID,
|
||||
validateNonEmpty,
|
||||
QueryFormColumn,
|
||||
} from '@superset-ui/core';
|
||||
import { MetricsLayoutEnum } from '../types';
|
||||
|
||||
@@ -403,10 +404,21 @@ const config: ControlPanelConfig = {
|
||||
renderTrigger: true,
|
||||
label: t('Conditional formatting'),
|
||||
description: t('Apply conditional color formatting to metrics'),
|
||||
shouldMapStateToProps() {
|
||||
return true;
|
||||
},
|
||||
mapStateToProps(explore, _, chart) {
|
||||
const values =
|
||||
const metrics =
|
||||
(explore?.controls?.metrics?.value as QueryFormMetric[]) ??
|
||||
[];
|
||||
const columns =
|
||||
(explore?.controls?.groupbyColumns
|
||||
?.value as QueryFormColumn[]) ?? [];
|
||||
const rows =
|
||||
(explore?.controls?.groupbyRows
|
||||
?.value as QueryFormColumn[]) ?? [];
|
||||
const values = [...new Set([...metrics, ...columns, ...rows])];
|
||||
|
||||
const verboseMap = explore?.datasource?.hasOwnProperty(
|
||||
'verbose_map',
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user