aggarwal-h opened a new pull request, #21656: URL: https://github.com/apache/echarts/pull/21656
## Brief Information This pull request is in the type of: - [ ] bug fixing - [x] new feature - [ ] others ### What does this PR do? Adds `axisPointer.triggerOnNoData` so connected charts keep showing the axisPointer at the linked axis value even where they have no data, instead of hiding it. ## Details ### Before: What was the problem? With `echarts.connect`, hovering over one chart replays the action on the others. On a connected chart, the original pixel point is meaningless, so the point is treated as illegal. When that chart also has no data at the sample location, the point stays illegal, `shouldHide` becomes true, and the axisPointer is hidden, even though the hovered axis value is known and the chart has a valid axis range. The pointer disappears on the chart with no data, which is confusing for synced time-series dashboards. ### After: How does it behave after the fixing? Two opt-in options on `axisPointer` (both default to current behavior): - `triggerOnNoData` (default `false`): when `true`, the axis is still processed for an illegal point (e.g. on a connected chart) as long as a value is available from the input `axesInfo` (the linked value) and it is not a `leave` event. The pointer is positioned by the axis value, independent of series data. The `leave` guard and the input-axis restriction are preserved, so hide-on-leave and `dispatchAction` axis targeting are unchanged. - `findPointOnConnectedCharts` (default `true`): chart-wide option to skip looking up a sample series point when the incoming point is illegal, so the pointer follows the linked value instead of snapping to a sample data point. ## Document Info One of the following should be checked. - [ ] This PR doesn't relate to document changes - [x] The document should be updated later - [ ] The document changes have been made in apache/echarts-doc#xxx (New options `axisPointer.triggerOnNoData` and `axisPointer.findPointOnConnectedCharts` need entries in apache/echarts-doc.) ## Misc ### Security Checking - [ ] This PR uses security-sensitive Web APIs. ### ZRender Changes - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx). ### Related test cases or examples to use the new APIs test/axisPointer-triggerOnNoData.html ### Merging options - [x] Please squash the commits into a single one when merging. -- 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]
