Change point size and color on hover in chartjs

Viewed 27426

I have made a line chart using chartjs. Now I want is whenever someone hover on the points the points size and color will change. I tried with some options but didn’t manage to get it working. Can someone help me on this please?

javascript:

var ctx = $('#chart');
var myLineChart = new Chart(ctx, {
  type: 'line',
  data: {
   labels: [1, 2, 3, 4, 5],
   datasets: [{
    label: '# of votes',
     data: [1, 2, 3, 4, 5],
     fill: false
   }]
 }
})
2 Answers
Related