How can I dispatch an annotation event #782
Answered
by
stockiNail
afshinmoshrefi
asked this question in
Q&A
|
I am using the enter and leave events on the box annotation to detect when a user cursor is over the box or outside of the box. It all works as expected on the desktop browsers. I am now adapting it to run on mobile browsers. enter and leave events on box annotation are working when there is a touch inside a box annotation. I have a scenario where I want to dispatch the leave event of box annotation without a user touching the screen. how can I dispatch the leave event? |
Answered by
stockiNail
Aug 3, 2022
Replies: 1 comment 1 reply
|
@afshinmoshrefi The plugin is handling events coming from Chart.js by event hook of plugin interface. Here is a codepen: https://codepen.io/stockinail/pen/ExEENGQ |
1 reply
Answer selected by
afshinmoshrefi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@afshinmoshrefi The plugin is handling events coming from Chart.js by event hook of plugin interface.
Therefore, to dispatch an event, it is needed to dispatch an event on the chart canvas.
Here is a codepen: https://codepen.io/stockinail/pen/ExEENGQ