Fleet diagrams - selection of external bars

I use flot http://code.google.com/p/flot/ and would like to highlight a specific stroke in the series when the user hovers over the link, does anyone know how to do this?

Greetings

Tim

+3
source share
1 answer

What you are looking for is the highlightone described in API.txt :

highlight(series, datapoint)

Highlight a specific datapoint in the data series. You can either
specify the actual objects, e.g. if you got them from a
"plotclick" event, or you can specify the indices, e.g.
highlight(1, 3) to highlight the fourth point in the second series
(remember, zero-based indexing).

So your code will look something like this:

//before this, $.plot has been called and assigned to "plot"
$('#mylink').mouseover(function(){
   plot.highlight(1,3);
}).mouseout(function(){
   plot.unhighlight(1,3);
});
+4
source

All Articles