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] How to synchronize two or more graphics with converFromPixel in same echarts.instance? #20628

Open
gioneves opened this issue Dec 28, 2024 · 2 comments
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.

Comments

@gioneves
Copy link

gioneves commented Dec 28, 2024

Version

5.5.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor?code=MYewdgzgLgBMAWBDATlAygT2gUwLYwF4YAKASkID4YBvAKBjnGhgBMAzASTAEtYizKNeg0aRYAc2QgArgAcIhGAG0A5JJmyAjCoA0MNVLkAmXfvVyAzCoC6AblrCGoMa0RREipXYciYbEMgkADbYsNyKAAy2MOEAPDAWUTEA1MnkdL4MLG6IAHSy0hDwxEqOmcQAsm7wuciIYCwguAIAVDCaEZrkAD4wETplvpXVtfWNzeRtHV0wvf2DIubySsNQNXUNTa0wSxC5IWDiaz191gvWpPa-AL5lyKHSyGCu7lcw1_bC91CPzxkiEBkyGA2AAXEJMn5uMhoOD2FxeGQyrcGB9aGjaAB6TEwCDYBq0EKwApBIIAERyeL4ym8tGczAQKHQ-JYigEBCo_3psGoUJhsGuikZqEwOAmuUBjxBnwYJPJlNC-UKxX-DElwLBylUAA9tHoVNqTPrdjY9LlzWxodAzqjLujPsLmQ0yJ82NIwMAoNxwHAkKgAGJ1XDYNAAd14CAiAi5TFgXqgIQinjKqpEUGw2qg4JUzgAbtgA1JcAAFbja7BBGLPCCIYNV6D1EEkXAYADCfqgpF0CxCbCz-hBYHTyG7kPTmbQUAwIXBqd8_iHaG4AC9NYkBpCnCAggFswBiIwAFiMAA4LCYFiiRFfaVuXFAQNuvbIk0RU1BkNxxOIC9nENruAgUcRH_QDixAbgh1_CFMiCSCQynGcYMhUAd2QfcIkwlRL2RYQMTvZhJG4FhX2UFMe2wPtswAVgAUmA3wH1k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Op_Yq41mFsI4Xw0-b0ea-EiQI9qwi3jw3htcS4QA

Steps to Reproduce

I have two dot graphics (scatter) and I need to move the mouse (mousemove) over one of them and pass the tooltip effect to the other. That is, when I move the mouse over series[0], the tooltip must also appear in series[1] and vice versa. I tried synchronizing the charts with myChart.getZr().on(...) but I couldn't get it to work. Also, it wouldn't be interesting to use echarts.connect to do this, as I need the charts to be in the same instance.

Current Behavior

The tooltip is not transferred to the other charts as it naturally is with echarts.connect.

Expected Behavior

The tooltip needs to work on all the graphics programmed for the tooltip action to take place, so if I hover over the first graphic, the tooltip should appear at the same point (axis) as the second and vice versa. Note that all graphs must have the same scale axis.

Another alternative would be to use the component type axisPointer, but how do you make each tooltip appear in its corresponding graphic instead of being aggregated? Example:

https://echarts.apache.org/examples/en/editor?code=MYewdgzgLgBMAWBDATlAygT2gUwLYwF4YAKASkID4YBvAKBjnGhgBMAzASTAEtYizKNeg0aRYAc2QgArgAcIhGAG0A5JJmyAjCoA0MNVLkAmXfvVyAzCoC6AblrCGoMa0RREipXYciYbEMgkADbYsNyKAAy2MOEAPDAWUTEA1MnkdL4MLG6IAHSy0hDwxEqOmcQAsm7wuciIYCwguAIAVDCaEZrkAD4wETplvpXVtfWNzeRtHV0wvf2DIubySsNQNXUNTa0wSxC5IWDiaz191gvWpPa-AL5lyKHSyGCu7lcw1_bC91CPzxkiEBkyGA2AAXEJMn5uMhoOD2FxeGQyrcGB9aGjaAB6TEwCDYBq0EKwApBIIAERyeL4ym8tGczAQKHQ-JYigEBCo_3psGoUJhsGuikZqEwOAmuUBjxBnwYJPJlNC-UKxX-DElwLBylUAA9tHoVNqTPrdjY9LlzWxodAzqjLujPsLmQ0yDKGGxpGBgFBuOA4EhUAAxOq4bBoADuvAQEQEqpE3Jg3qgIQingWDFjkKg2G1UHBACJnAA3bCBqS4AAK3G12CCMWeEEQIbr0HqIJIjoAqnjSHmBpDfCE2LmYAX8VnkL20yIszm0FAMCFwRn-_4wOhuAAvTWJPv93ygIIBfMAYiMABYjAAOCxGSd71G7yHXR8iM4LeNQEAgILe2QpojLgwUDINw4jiCW-aINq3AQHe_ZQTB5YgNwa4QRC_ZBIgABGNZLlOarwCAYbgsB0jYFOKJPgstzvkwsAIRASEoeO_7oZmGCyJqKhFIgjRhroU7AaB4HIAAKl-P7cLIJHIGRL6-C2PwQOCKjwNwLDYAJe5CWBJYAKK4LISAQDB4JsIgQR4vJIhBChobzoubH9geR4jseEQeXBT7WQwmE4UEeH3rihHEQmsnYD5IhYYgwAANbmA0ADC36uSox5sB5KgUZFtlgLF4KlEFgGZNqACC0EQFwGnagV_TtDa96UZC1jWTRkLxpI6msYV_bFb52BDvmACsACkXn9p-0kjpoRhjZFDARiwaz5meERzfhMDwNgoHwMOeYWKN403JFfUwCB4i7cN61BZN-Yzdd96LctI6rQ9e5bTte0HW9mTPucPiZPGZUVd1U6nfOnH5oWFlkUdmSdSwVXZuC8x7n9e7gxxmp5tDQSw_NOwgYjDTI-0kXo5kb7tXRMAYOVMGgxjG0Q9juP4xtCNIzVfTkydzNY1DMPYHDvicyT3OaLz_20S4eIgdgECM71_OQyOEDAG444iyI2TuFSXMowTwMwQbPMbXTFWm6j974qAGmBUFMDc9bQUYOCksbRT3lgyr2Pq5rJba1kCpQFbRv05V4vuwTFsm1HZMbbbID205e7OwTDBuwnQVe791lU4DNMgLI3q-gBgm8I5ibJpFn7fr-JESb-LuZAxTGocg4Jt8hHct6LRPggjfc6yHBVyhSeuhEoETWC1U7G8pTsR8PmcR-CseK5FcvcAr4Lbwrw9tZkuAYIl_pQBKoQAPIlz6YDEMXpdgKQyIA0459Bo2oYRlAUYukAA

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@gioneves gioneves added the bug label Dec 28, 2024
@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 Dec 28, 2024
@helgasoft
Copy link

I do not think this is a bug. Two series in a single chart have a single tooltip activated on mousemove by default.
Event mousemove has precedence over action showTip. So once a tooltip is activated in one series, showTip will not work in the other because only one tooltip is allowed.

@gioneves
Copy link
Author

gioneves commented Dec 29, 2024

How can I make two tooltips (or more) appear in the same instance? Is there a hack to make this work? Or would it be more appropriate to recommend a new feature with this possibility in axisPointer, something like:

axisPointer.link: [ { xAxisIndex: [0, 1, ..., 2], multipleTooltip: true } ]

For behavior similar to echarts.connect?

In other words, it would be an echarts.connect for series of the same instance.

Thanks.

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