Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

Hi! i have some problem with function onHover on the Pie chart.

Open Zulfia73 opened this issue 9 years ago • 4 comments

Expected Behavior

reaction to the event mousemove, when i used onHover

Current Behavior

no reaction to the event mousemove, when i used onHover. Although, reaction to the onClick works

Example my code

getOptions = () => { return({ legend: { display: false, }, onClick: (e, legendItem) => { this.setState({ isColor: legendItem[0]._model.label }); }, onHover: (e, legendItem) => { console.log('навели на часть pie, e:', e, 'legendItem: ', legendItem); } }); }

##Answer

hover: { onHover: (e, legendItem) => { console.log('навели на часть pie, e:', e, 'legendItem: ', legendItem); } } but in documentation say

onHover function(event, legendItem) {}

event - includes pie item, legendItem - undefined

Zulfia73 avatar Jan 17 '17 09:01 Zulfia73

@Zulfia73 do you have a fiddle with a test of this?

etimberg avatar Jan 17 '17 12:01 etimberg

I have experienced the same issue on a mixed (line/bar) chart.

alpendergrass avatar Jan 22 '17 20:01 alpendergrass

Installing the latest version of Chart.js fixed the problem for me.

alpendergrass avatar Jan 22 '17 20:01 alpendergrass

Closing since there is no test case for this

etimberg avatar Jan 29 '17 14:01 etimberg