michael-s-molina commented on code in PR #32253:
URL: https://github.com/apache/superset/pull/32253#discussion_r1955038154


##########
superset-frontend/plugins/plugin-chart-echarts/src/Histogram/transformProps.ts:
##########
@@ -58,19 +59,33 @@ export default function transformProps(
     showLegend,
     showValue,
     sliceId,
+    xAxisFormat,
     xAxisTitle,
     yAxisTitle,
+    yAxisFormat,
   } = formData;
   const { data } = queriesData[0];
   const colorFn = CategoricalColorNamespace.getScale(colorScheme);
-  const formatter = getNumberFormatter(
-    normalize ? NumberFormats.FLOAT_2_POINT : NumberFormats.INTEGER,
-  );
+
+  const formatter = (format: string) =>
+    getValueFormatter(
+      column,
+      currencyFormats,
+      columnFormats,
+      format,
+      undefined,
+    );
+  const xAxisFormatter = formatter(xAxisFormat);
+  const yAxisFormatter = formatter(yAxisFormat);
+
   const percentFormatter = getPercentFormatter(NumberFormats.PERCENT_2_POINT);
   const groupbySet = new Set(groupby);
-  const xAxisData: string[] = Object.keys(data[0]).filter(
-    key => !groupbySet.has(key),
-  );
+  const xAxisData: string[] = Object.keys(data[0])
+    .filter(key => !groupbySet.has(key))
+    .map(key => {
+      const array = key.split(' - ').map(value => parseFloat(value));

Review Comment:
   We don't expect non-numbers and in such case NaN will be a good 
representation.



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