viharnani opened a new pull request, #43238:
URL: https://github.com/apache/superset/pull/43238

   ## Summary
   Fixes #33882
   
   When "Split stack by" (`stackDimension`) is configured on a stacked bar 
chart,
   ECharts creates separate stack groups per x-axis position.
   
   Previously, `extractShowValueIndexes` tracked a single global "topmost 
series"
   index across ALL groups, so with "Only Total" enabled only ONE label appeared
   for the entire cluster instead of one per stack group.
   
   ## Changes
   - `extractShowValueIndexes` now returns `Record<string, number[]>` keyed by
     stack group (defaults to `__default__` for non-split charts — backward 
compatible)
   - `transformSeries` resolves per-group index array and totals in the label 
formatter
   - `transformProps` computes `seriesStackIds[]` and 
`perGroupTotalStackedValues`
     before calling `extractShowValueIndexes`
   
   ## Before / After
   **Before:** Only 1 label for the entire bar cluster with `onlyTotal`  
   <img width="1462" height="693" alt="image" 
src="https://github.com/user-attachments/assets/8dda003f-3a71-4d89-bc51-4d756fe9fd9f";
 />
   
   
   **After:** Each stack group shows its own total label ✅
   
   
   ## Testing
   - All 101 existing unit tests pass ✅
   - New unit test added for multi-group stackDimension case ✅
   


-- 
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]

Reply via email to