echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] `echarts.connect` - Tooltip is not shown on connected chart if y-axis value is `NaN`

Open fpiemontese-dku opened this issue 1 year ago • 0 comments

Version

5.5.0

Link to Minimal Reproduction

https://codepen.io/Francesco-Piemontese-the-sasster/pen/RNbpdJr

Steps to Reproduce

The attached CodePen should be all you need in order to reproduce - it's just two very basic line charts, with identical data on the x axis, connected via echarts.connect. The only peculiarity that some of the y-axis data points are NaN.

To trigger the tooltip behaviour in question, simply hover either of the charts on an x-axis value for which the other chart's y-axis value is NaN.

Current Behavior

When the yAxis data is not NaN in both charts, both tooltips are displayed (as expected), and their position is correctly synced.

image

If, however, in the top chart I hover a datapoint for which the bottom chart has a NaN value, only the tooltip for the top chart is shown.

image

This is despite the fact that the top chart's tooltip is also displayed for NaN values.

image

Expected Behavior

The expected tooltip for each datapoint is shown on both charts, even if the datapoint being hovered is NaN

Environment

Originally experienced this working in Angular 18 (both Chrome and Firefox), but could reproduce this in the plain JS environment of CodePen

Any additional comments?

Thank you so much for your help! 💚

fpiemontese-dku avatar Dec 19 '24 17:12 fpiemontese-dku