You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "aggarwal-h (via GitHub)" <gi...@apache.org> on 2026/06/21 18:54:19 UTC
[PR] feat(axisPointer): keep pointer on connected charts without data [echarts]
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: commits-unsubscribe@echarts.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
Re: [PR] feat(axisPointer): keep pointer on connected charts without data [echarts]
Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on PR #21656:
URL: https://github.com/apache/echarts/pull/21656#issuecomment-4762962046
Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request).
Please **DO NOT** commit the files in [dist](https://github.com/apache/echarts/tree/master/dist), [i18n](https://github.com/apache/echarts/tree/master/i18n), and [ssr/client/dist](https://github.com/apache/echarts/tree/master/ssr/client/dist) folders in a non-release pull request. These folders are for release use only.
Document changes are required in this PR. Please also make a PR to [apache/echarts-doc](https://github.com/apache/echarts-doc) for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the `PR: awaiting doc` label.
--
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
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