viharnani commented on code in PR #43238:
URL: https://github.com/apache/superset/pull/43238#discussion_r3794216349
##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts:
##########
@@ -480,11 +480,57 @@ export default function transformProps(
? [minMarkerSize, maxMarkerSize]
: [maxMarkerSize, minMarkerSize];
+ // When stackDimension is configured, each series is assigned to a separate
+ // ECharts stack group keyed by the dimension value. Compute this mapping
+ // before calling extractShowValueIndexes so each group's topmost series is
+ // tracked independently (fixing the bug where only the last series across
+ // all groups was flagged to show the total label).
+ const idxSelectedDimension =
+ stack === StackControlsValue.Stack &&
+ stackDimension &&
+ chartProps.rawFormData?.groupby
+ ? formData.metrics.length > 1
+ ? 1
+ : 0 + chartProps.rawFormData.groupby.indexOf(stackDimension)
Review Comment:
"Fixed in the latest commit — idxSelectedDimension now correctly computes
(metrics.length > 1 ? 1 : 0) + groupby.indexOf(stackDimension) so multi-metric
charts with a non-first stackDimension work correctly."
--
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]