Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] AxisPointer sync not work acros multiple synced graphs #20823

Open
Tolomaj opened this issue Mar 13, 2025 · 2 comments
Open

[Bug] AxisPointer sync not work acros multiple synced graphs #20823

Tolomaj opened this issue Mar 13, 2025 · 2 comments
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.

Comments

@Tolomaj
Copy link

Tolomaj commented Mar 13, 2025

Version

5.3.2

Link to Minimal Reproduction

https://codepen.io/tolomaj/pen/WbNXyeY

Steps to Reproduce

Create two or more charts with relatively large dataset and then sync them with echarts.connect.
Then move cursor on raphs and see the behavior.

Current Behavior

the axisPointer is not synced correctly across charts

Expected Behavior

axisPointer to be at the same position and visible on all synchronized characters.

Environment

- OS: windows 11
- Browser: firefox 136.0.1 64bit
- Framework: none (plain js)

Any additional comments?

in codepen actual js code starts after "//after data" line before that is only data

Zaznam.obrazovky.2025-03-13.181650.mp4

If I just set something up incorrectly in the graphs let me know but I can't find anything that would help the only thing that would help is to reduce the size or have the same times in the points.

@Tolomaj Tolomaj added the bug label Mar 13, 2025
@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels Mar 13, 2025
@helgasoft
Copy link

axisPointer to be at the same position and visible on all synchronized characters.

To align all xAxes, add min: new Date("2025-01-18T07:12:22.900Z") to xAxis of speed series.
Your speed series has 20 values between 8:00 and 9:00, while the other two series have only 2 values. So you can't expect the vertical axisPointers to be synchronized.

Maybe your project does not need 'connected' charts, see official simpler solution with two grids and shared dataZooom and axisPointer..

@Tolomaj
Copy link
Author

Tolomaj commented Mar 14, 2025

To align all xAxes, add min: new Date("2025-01-18T07:12:22.900Z") to xAxis of speed series.

I update the values to have matched start time and end time.
updated example
But with same result.

Your speed series has 20 values between 8:00 and 9:00, while the other two series have only 2 values. So you can't expect the vertical axisPointers to be synchronized.

To be true I expect to sync axis pointer on xAxis based on time not the samples when snap: false and sometimes this work:
Video showing zoom:
https://github.com/user-attachments/assets/6789c6a2-4640-46ec-a657-28675bb1b977

But when I hover with pointer on second green graph the axisPointers won't sync at all and when hovering on first blue graph the pointer works reliably only on 100% zoom.

Maybe your project does not need 'connected' charts, see official simpler solution with two grids and shared dataZooom and axisPointer..

urfonutely i need the graps in separated html elements for userfrendlyness

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

2 participants