Reputation: 2617
I am using jqplot version 1.0.8r1250 and I can't figure out how to get the mouseOver event to work on the pie chart slice. The normal seriesColors work fine though.
Here is my code:
$.jqplot('pieChart', [pieChartData],
{
seriesColors: [color1, color2, color3, color4],
grid: {
background:'#FFFFFF',
borderWidth:0,
shadow:0
},
seriesDefaults: {
renderer: $.jqplot.PieRenderer,
rendererOptions: {
highlightMouseOver: true,
highlightMouseDown: false,
highlightColor: [hoverColor1,
hoverColor2,
hoverColor3,
hoverColor4],
},
},
legend: {
show: true,
location: 'e'
},
});
Upvotes: 0
Views: 1698
Reputation: 13578
This should help you:
//On mouseover
$('.jqplot-target').bind('jqplotDataHighlight', function(evt, seriesIndex, pointIndex, data) {
//place your logic here
});
//On mouseout
$('.jqplot-target').bind('jqplotDataUnhighlight', function(evt, seriesIndex, pointIndex, data){
//place your logic here
});
Upvotes: 2