waterWang opened a new pull request, #21727:
URL: https://github.com/apache/echarts/pull/21727

   fix #21725
   
   ## Problem
   
   `getInitialData()` and `getBaseAxis()` in `WhiskerBoxCommonMixin` (used by 
candlestick and boxplot series) were hardcoded to use 
`ecModel.getComponent(mainType, this.get('xAxisIndex'))`. When a series 
specifies `xAxisId`/`yAxisId` instead of `xAxisIndex`/`yAxisIndex`, 
`this.get('xAxisIndex')` returns `undefined`, causing `ecModel.getComponent` to 
fall back to the first axis component. This leads to incorrect axis resolution 
in multi-grid layouts.
   
   ## Fix
   
   Replace `ecModel.getComponent` with `this.getReferringComponents(mainType, 
SINGLE_REFERRING)` which properly handles both `xAxisIndex`/`xAxisId` (and 
`yAxisIndex`/`yAxisId`). Falls back to the first axis when neither is 
specified, preserving backward compatibility.
   
   ## Test
   
   New unit test `whiskerBoxCommon.test.ts`:
   - Verifies that each series in a multi-grid config gets the correct base 
axis when using `xAxisId`
   - Verifies backward compatibility (no index/id → first axis)


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