eschutho commented on code in PR #31333:
URL: https://github.com/apache/superset/pull/31333#discussion_r1947332421


##########
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts:
##########
@@ -291,12 +292,20 @@ export default function transformProps(
   const showValueIndexesB = extractShowValueIndexes(rawSeriesB, {
     stack,
   });
+
+  const metricsLabels = metrics
+    .map(metric => getMetricLabel(metric, undefined, undefined, verboseMap))

Review Comment:
   Since the map function is always going to pass the index and array as second 
and third args, I can't move them around, but I was thinking of changing 
`getMetricLabel` to accept an object, but there are over 40 places in the 
codebase where this map function is used, and in some cases, it's passed in 
directly like `map(getMetricLabel)` instead of as an anonymous function. It 
just seemed less risky to do it this way, but I agree that it's not pretty.



-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to