Antonio-RiveroMartnez commented on code in PR #33559:
URL: https://github.com/apache/superset/pull/33559#discussion_r2102585057
##########
superset-frontend/plugins/plugin-chart-echarts/src/Radar/transformProps.ts:
##########
@@ -111,11 +124,36 @@ export default function transformProps(
const { setDataMask = () => {}, onContextMenu } = hooks;
const colorFn = CategoricalColorNamespace.getScale(colorScheme as string);
const numberFormatter = getNumberFormatter(numberFormat);
+ const denormalizedSeriesValues: SeriesNormalizedMap = {};
+
+ const getDenormalisedSeriesValue = (
Review Comment:
nit: ee need to be consistent in how we name these between American or
British , e.g: `denormalizedSeriesValues`, `getDenormalisedSeriesValue`,
`normalisedValue`, `// Normalize the transformed data`
##########
superset-frontend/plugins/plugin-chart-echarts/src/Radar/controlPanel.tsx:
##########
@@ -210,6 +224,8 @@ const config: ControlPanelConfig = {
columnsPropsObject: { colnames, coltypes },
};
},
+ visibility: ({ controls }) =>
+ Boolean(!controls?.is_normalised?.value),
Review Comment:
Don't we need a tooltip to inform users why the controls disappear and the
implication of selecting or not the normalize?
##########
superset-frontend/plugins/plugin-chart-echarts/src/Radar/controlPanel.tsx:
##########
@@ -91,6 +91,20 @@ const config: ControlPanelConfig = {
},
},
],
+ [
+ {
+ name: 'is_normalised',
+ config: {
+ type: 'CheckboxControl',
+ label: t('Normalise Values'),
+ renderTrigger: true,
+ default: false,
+ description: t(
+ 'Normalise the radar chart values between 0 & 1 to get
consistent plotting.',
+ ),
Review Comment:
I'm not familiar with this chart but is this something that is particular
for this chart type or something we could use elsewhere? Asking because if the
latter, then we need to move the control out to a sharable point.
--
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]