bito-code-review[bot] commented on PR #42755:
URL: https://github.com/apache/superset/pull/42755#issuecomment-5180840468
<!-- Bito Reply -->
The flagged issue is correct. The `extraMetricLabels` are currently passed
as raw metric labels, but the data keys in `rebasedData` have been transformed
(e.g., via `verboseMap` or time-comparison suffixes). Consequently,
`excludedKeys.has(curr)` fails to match, causing hidden metrics to be
incorrectly included in stacked totals.
To resolve this, you should normalize the `extraMetricLabels` using the same
transformation logic applied to the data keys before passing them to
`extractDataTotalValues`.
Would you like me to implement this normalization fix and check the rest of
the PR comments for further issues?
**superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts**
```
const extraMetricLabels = extractExtraMetrics(chartProps.rawFormData).map(
getMetricLabel,
);
// Normalize labels here using the same logic as rebasedData keys
const normalizedExtraLabels = extraMetricLabels.map(label =>
verboseMap[label] ?? label);
```
--
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]