I have an event handler declared as:
.on('jqplotMouseMove', function (e, gridpos, datapos, neighbor, plot)
If neighbor is true I need to find the color of the datapoint they clicked on. Is there some method I can call that will give me that?
I have an event handler declared as:
.on('jqplotMouseMove', function (e, gridpos, datapos, neighbor, plot)
If neighbor is true I need to find the color of the datapoint they clicked on. Is there some method I can call that will give me that?
You can get the seriesIndex from the neighbor variable, which you can use to get the color.
$('#chart1').bind('jqplotMouseMove',
function (e, gridpos, datapos, neighbor, plot) {
if (neighbor != null){
alert(plot1.series[neighbor.seriesIndex].color);
}
}
);
Fiddle here.