itemmouseover: Function

Sets the mouseover event handler for the legend, which is triggered when the user moves the mouse(input device) over a legend item. After the event is triggered, the event related data is passed as a parameter to the assigned event handler. Parameters passed to the function are shown in the Event Object section below.

var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
 legend: {
  
   itemmouseover: function(e){
          alert( "Mouse moved over the legend item");
        }

 },

 .
 . 
});
chart.render();


Event Object

e:{ 
	x, 
	y,
        chart,
	dataPoint, 
	dataSeries, 
	dataPointIndex, 
	dataSeriesIndex
}



Try it Yourself by Editing the Code below.

  Also See:    



In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.

Comments 3

  1. Pingback: CanvasJS Version 1.4 Beta with StripLines, Legend Events & Empty Data Points in Chart | CanvasJS

  2. Fyi, you have a typo: “itemclick: function(e){
    alert( “Mouse moved over the legend item”);
    }

    },” should be itemmouseover

In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.