rusackas commented on code in PR #43116:
URL: https://github.com/apache/superset/pull/43116#discussion_r3943100560
##########
superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts:
##########
@@ -403,10 +407,21 @@ export function extractDataTotalValues(
extraMetricLabels,
} = opts;
const excludedKeys = new Set([xAxisCol, ...(extraMetricLabels ?? [])]);
+ // Time comparison post-processing emits a derived column per metric, named
+ // `<label>__<offset>`. Sort-only metrics are part of the query, so they get
+ // one too and it must be excluded alongside the base label. Matching on the
+ // separator keeps a distinct metric that merely shares a prefix (`SortTotal`
+ // vs `Sort`) in the total.
+ const excludedPrefixes = (extraMetricLabels ?? []).map(
+ label => `${label}${TIME_COMPARISON_SEPARATOR}`,
+ );
Review Comment:
Looks like this one got addressed in 79c2d79. The exclusion now builds the
exact `<label>__<offset>` keys from `time_compare` instead of prefix-matching,
so a displayed metric like `Sort__Total` still counts toward the total.
Resolving.
--
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]