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

Need nearest point data in event on hovering on series line #18262

Closed
b09h opened this issue Feb 13, 2023 · 8 comments
Closed

Need nearest point data in event on hovering on series line #18262

b09h opened this issue Feb 13, 2023 · 8 comments
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.

Comments

@b09h
Copy link

b09h commented Feb 13, 2023

Version

upto latest version

Link to Minimal Reproduction

No response

Steps to Reproduce

  1. Create line chart
  2. You can capture event on hover on data point using mouseover event, but you cannot capture on hover of series.
  3. Getting tooltip on hovering on series, but not able to capture event
    image

Current Behavior

  1. Unable to get event from series

Expected Behavior

  1. Capture mouseover event on hovering on series as well as data point based on the type (series, datapoint)

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

Please add one more event to capture on hovering on the empty space inside the chart. Getting event for hovering outside of the chart i.e., globalout which won't solve my problem
If this is not comes under bug, then please let me know. I will add in features list

@b09h b09h added the bug label Feb 13, 2023
@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 Feb 13, 2023
@susiwen8
Copy link
Contributor

susiwen8 commented Feb 13, 2023

https://echarts.apache.org/en/option.html#series-line.triggerLineEvent
Does this option match your require?

@b09h
Copy link
Author

b09h commented Feb 14, 2023

No.
Unable to capture the below (mouseover) event on hovering on series, but getting the event on hovering on data point
https://echarts.apache.org/en/api.html#events.Mouse%20events.mouseover

@helgasoft
Copy link

yes, all you need is triggerLineEvent
check mouseover example in Demo Code at bottom of #2941

@b09h
Copy link
Author

b09h commented Feb 15, 2023

image

Hovering on the data point got the event with data. After adding the trigger line event, i am able to capture event.
On hovering on the series line or data point, I need the nearest data point also.

@b09h b09h changed the title Unable to capture event on hovering the series instead of hovering data point Need nearest point data in event on hovering on series line Feb 17, 2023
@b09h
Copy link
Author

b09h commented Feb 23, 2023

Ok, Its fine with 18288
But, is it possible to get nearest data point when we hover on the series?

@b09h
Copy link
Author

b09h commented Feb 23, 2023

Closed the ticket number #18288 & we will check/follow this thread only. Please help me to get the nearest data point on hovering series.

@helgasoft
Copy link

Nearest point with tooltip: {trigger:'axis'} - Demo Code

@b09h
Copy link
Author

b09h commented Jun 13, 2023

Thank you, it worked for me! :)

@b09h b09h closed this as completed Jun 13, 2023
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

3 participants