amaannawab923 commented on code in PR #33559:
URL: https://github.com/apache/superset/pull/33559#discussion_r2102275213


##########
superset-frontend/plugins/plugin-chart-echarts/src/Radar/transformProps.ts:
##########
@@ -212,7 +250,40 @@ export default function transformProps(
     {},
   );
 
+  // Add normalization function
+  const normalizeArray = (arr: number[], decimals = 10, seriesName: string) => 
{
+    const max = Math.max(...arr);
+    return arr.map(value => {
+      const normalisedValue = Number((value / max).toFixed(decimals));
+      denormalizedSeriesValues[seriesName][String(normalisedValue)] = value;
+      return normalisedValue;
+    });
+  };

Review Comment:
   The normalise function gets max value from each series & consider it as 1.0 
and then calculates the normalised value & then goes onto put a reference of 
normalised -> denormalised value in our denormalised values map 



-- 
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]

Reply via email to