SBIN2010 commented on code in PR #42941:
URL: https://github.com/apache/superset/pull/42941#discussion_r3745422694
##########
superset-frontend/plugins/plugin-chart-country-map/src/controlPanel.ts:
##########
@@ -71,6 +72,36 @@ const config: ControlPanelConfig = {
],
['currency_format'],
['linear_color_scheme'],
+ [
+ {
+ name: 'conditional_formatting',
+ config: {
+ type: 'ConditionalFormattingControl',
+ renderTrigger: true,
+ label: t('Custom conditional formatting'),
+ description: t(
+ 'Apply conditional color formatting to numeric columns',
+ ),
+ shouldMapStateToProps() {
+ return true;
+ },
+ mapStateToProps(_, chart) {
+ const chartStatus = chart?.chartStatus;
+ const columnOptions = [
+ {
+ value: 'metric',
+ label: 'metric',
+ dataType: GenericDataType.Numeric,
+ },
+ ];
+ return {
+ removeIrrelevantConditions: chartStatus === 'success',
+ columnOptions,
+ };
+ },
+ },
+ },
+ ],
Review Comment:
The absence of `verboseMap` will not cause a failure, because it is
optional; if it is missing, the name is taken from `column`.
`const columnName = (column && verboseMap?.[column]) ?? column;`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]