This is an automated email from the ASF dual-hosted git repository. lilykuang pushed a commit to branch table-time-comparison-color in repository https://gitbox.apache.org/repos/asf/superset.git
commit c5f909ecf13eb64f70ae2aac61488c316657686b Author: lilykuang <[email protected]> AuthorDate: Wed Mar 27 12:46:03 2024 -0700 update tooltip --- .../plugins/plugin-chart-table/src/controlPanel.tsx | 13 ++++++++++--- superset-frontend/plugins/plugin-chart-table/src/types.ts | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx index 641445913b..b76abde8ca 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx @@ -601,10 +601,17 @@ const config: ControlPanelConfig = { name: 'comparison_color_enabled', config: { type: 'CheckboxControl', - label: t('basic conditional formatting for comparison '), + label: t('basic conditional formatting'), renderTrigger: true, + visibility: ({ controls }) => + Boolean(controls?.enable_time_comparison?.value) && + isFeatureEnabled(FeatureFlag.ChartPluginsExperimental), default: false, - description: t('Add color for positive/negative change'), + description: t( + 'This will be applied to the whole table. Arrows (↑ and ↓) will be added to ' + + 'main columns for increase and decrease. Basic conditional formatting can be ' + + 'overwritten by conditional formatting below.', + ), }, }, ], @@ -613,7 +620,7 @@ const config: ControlPanelConfig = { name: 'comparison_color_scheme', config: { type: 'SelectControl', - label: t('color scheme for comparison'), + label: t('color type'), default: ColorSchemeEnum.Green, renderTrigger: true, choices: [ diff --git a/superset-frontend/plugins/plugin-chart-table/src/types.ts b/superset-frontend/plugins/plugin-chart-table/src/types.ts index e8f2ae3f0a..3f77f9c1cb 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/types.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/types.ts @@ -108,6 +108,7 @@ export type BasicColorFormatterType = { arrowColor: string; mainArrow: string; }; + export interface TableChartTransformedProps<D extends DataRecord = DataRecord> { timeGrain?: TimeGranularity; height: number;
