Mouse event does not triggers onHover callback. #10536
Unanswered
henryfruit
asked this question in
Q&A
Replies: 1 comment
-
The onHover seems to be working just fine, the reason it does not work on the legend is that it is limmited to the chart area, if you want to hover over the legend you will need to use the onHover callback of the legend and not the one from the chart. https://www.chartjs.org/docs/3.8.2/configuration/legend.html#configuration-options |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I create and dispatch an event to canvas.
It works fine for all elements in dataset ecxept one. I've checked the event on canvas DOM element - the event is triggered. But not triggered in chart.js onHover callback.
Config:
`config: {
type: 'doughnut',
borderWidth: 0,
data: {},
options: {
onHover: (e, elements) => {
console.log('55555', e);
if (!elements || !elements.length) return;
`[
Beta Was this translation helpful? Give feedback.
All reactions