bikash-barnwal commented on PR #43175: URL: https://github.com/apache/superset/pull/43175#issuecomment-5297796533
This also closes #43068 (stacked **Only Total** counting the sort-only metric's time-comparison column), which turns out to be the same one-line mechanism rather than a separate bug. `extraMetricLabels` feeds two consumers. Besides `sortAndFilterSeries`, it builds `excludedKeys` in `extractDataTotalValues`: ```ts const excludedKeys = new Set([xAxisCol, ...(extraMetricLabels ?? [])]); ``` #42881 excluded the sort-only metric by exact name, so `SortMetric__1 year ago` matched nothing and was summed into the total — and into the `thresholdValues` derived from it, which is why the percentage-threshold cutoff drifted by the same amount. Adding the `<raw label>__<offset>` entries fixes the total for free. Pushed a regression test pinning that: it fails on master (the total label reads `1032` instead of `32`) and passes with this change. Full file is 71/71 green. -- 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]
