waterWang commented on issue #21732:
URL: https://github.com/apache/echarts/issues/21732#issuecomment-5306522864
I've submitted PR #21737 to fix this.
## Root cause
`TooltipView._showAxisTooltip` iterates `axisItem.seriesDataIndices` whose
`seriesIndex` values come from the cached `_lastDataByCoordSys` pointer state.
When a merged `setOption` removes series (e.g. `replaceMerge: ['series']`),
those cached indices become stale and `getSeriesByIndex` returns `undefined`,
causing the `getDataParams` crash.
## Fix (two guards)
1. Skip stale `seriesDataIndices` entries whose series no longer exists (`if
(!series) { return; }`)
2. Moved the existing `!axisModel` guard **before** the `axisModel.axis`
access (it was previously checked after being dereferenced)
The fix is a pure TypeScript change in
`src/component/tooltip/TooltipView.ts`, no API changes required.
--
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]