Is there a way to run a function when the mouse double-clicks while using flot? Currently, I am only able to trap the single click with the following code:
$(graph).bind('plotclick', function(event, pos, item) {
if (item) {
....
item.series.data[0][2].key
}
}
If I try using dblclick, I lose access to the item and only have the event:
$(graph).bind('dblclick', function(event) {
....
}
How can I implement double-click functionality with flot? Specifically, I need to retrieve the name of the bar chart that was double-clicked.
Update: A working fiddle can be found here.
Update 2: This informative post explains how to obtain bar chart details by storing the item in a variable during plothover. Now, the challenge is to make plotclick and dblclick work harmoniously together: Check out the updated fiddle here.