How do I run a function when the mouse double-clicks when using flot? If I do the following it only traps the single click.
$(graph).bind('plotclick', function(event, pos, item) {
if (item) {
....
item.series.data[0][2].key
}
}
If I use the dblclick I only have the event and no longer have the item.
$(graph).bind('dblclick', function(event) {
....
}
How do I use double-click with flot? I need to get the name of the bar chart that I am double-clicking on.
Edit: See here for a fiddle http://jsfiddle.net/hcszv7wb/1/
Edit 2: This post helps get the bar chart details by assigning the item to a variable in plothover. I just need to work out how to have the plotclick and dblclick work together now. http://jsfiddle.net/hcszv7wb/2/