Copilot commented on code in PR #38120:
URL: https://github.com/apache/superset/pull/38120#discussion_r2885379349
##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx:
##########
@@ -129,7 +129,10 @@ export default function EchartsTimeseries({
values.length === 0
? []
: groupby.map((col, idx) => {
- const val = groupbyValues.map(v => v[idx]);
+ const val = groupbyValues.map(v => {
+ const metricsCount = v.length - groupby.length;
+ return v[metricsCount + idx];
+ });
Review Comment:
This change fixes stacked/multi-metric cross-filtering in
`getCrossFilterDataMask`, but there isn’t a unit test covering the multi-metric
+ groupby click path in `EchartsTimeseries` (the reported regression case).
Adding a test that simulates a click on a stacked-bar seriesName like `'Intent,
cancellations'` and asserts the emitted filter uses the dimension value would
prevent regressions.
--
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]