Copilot commented on code in PR #21737:
URL: https://github.com/apache/echarts/pull/21737#discussion_r3994404909
##########
src/component/tooltip/TooltipView.ts:
##########
@@ -578,6 +578,9 @@ class TooltipView extends ComponentView {
each(axisItem.seriesDataIndices, function (idxItem) {
const series =
ecModel.getSeriesByIndex(idxItem.seriesIndex);
+ if (!series) {
Review Comment:
Skipping the missing series prevents the exception, but it can still leave
stale series in the rendered tooltip. The cached `dataByCoordSys` remains
unchanged, and `_updateContentNotChangedOnAxis` ignores cached entries whose
new `cbParams` is absent; if the surviving series data is unchanged, it returns
`true` and the old DOM is retained with the removed series still listed.
Invalidate the cached content when a series is skipped (or make the unchanged
check compare the valid series set).
--
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]