echarts icon indicating copy to clipboard operation
echarts copied to clipboard

fix(axisPointer): always show for connected charts with null values

Open sjcobb opened this issue 5 months ago • 3 comments

Brief Information

This pull request is in the type of:

  • [x] bug fixing
  • [ ] new feature
  • [ ] others

What does this PR do?

Add axisPointer.alwaysShowContent: true option to force axisPointer to show when charts are connected. A common case is for all time series charts on a dashboard to share an xAxis axisPointer to correlate across charts when hovering. Currently this does not work if series data is aligned differently / has null values, the axisPointer flickers instead of showing at the correct timestamp

Fixed issues

  • #20058
  • #20823

Details

Before: What was the problem?

Inconsistent display of axisPointer for charts using 'connect':

https://github.com/user-attachments/assets/e212d268-c3b8-43c2-ba4b-0a66ae6f0419

After: How does it behave after the fixing?

axisPointer always shows on all connected charts:

https://github.com/user-attachments/assets/0ba3e841-dfb5-4992-956a-eca2a8fe6395

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

Misc

ZRender Changes

  • [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

N.A.

Others

Merging options

  • [ ] Please squash the commits into a single one when merging.

Other information

sjcobb avatar Jun 26 '25 19:06 sjcobb

Thanks for your contribution! The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

Document changes are required in this PR. Please also make a PR to 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.

echarts-bot[bot] avatar Jun 26 '25 19:06 echarts-bot[bot]

Consider adding axisPointer.alwaysShowContent as tooltip.alwaysShowContent.

Thanks for the feedback! This is fixed now to be axisPointer.alwaysShowContent

sjcobb avatar Aug 15 '25 17:08 sjcobb

Hi @Ovilia, can we get this reviewed? It is a small change that really improves experience when designing dashboards as stated in the original post.

Thanks!

DavidNepozitek avatar Dec 05 '25 12:12 DavidNepozitek