You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "fpiemontese-dku (via GitHub)" <gi...@apache.org> on 2024/12/19 17:27:15 UTC

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

fpiemontese-dku opened a new issue, #20607:
URL: https://github.com/apache/echarts/issues/20607

   ### 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.
   
   <img width="582" alt="image" src="https://github.com/user-attachments/assets/d5a15ed6-c71c-4b60-8c7a-2a74e32bb81e" />
   
   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. 
   
   <img width="607" alt="image" src="https://github.com/user-attachments/assets/d0e27c25-9a79-4a81-a53a-bbb7f5483524" />
   
   This is despite the fact that the top chart's tooltip is also displayed for NaN values.
   
   <img width="588" alt="image" src="https://github.com/user-attachments/assets/74609734-5821-4009-9dec-1bb1a8a50f8d" />
   
   
   
   
   
   ### Expected Behavior
   
   The expected tooltip for each datapoint is shown on both charts, even if the datapoint being hovered is `NaN`
   
   ### Environment
   
   ```markdown
   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! 💚 


-- 
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: commits-unsubscribe@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org