Skip to content

Commit

Permalink
Expanded the exmaples to show how to use the 'plotdblclick' event.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashrafhasson committed Apr 24, 2013
1 parent 1b3977d commit f1a2073
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/interacting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@
}
});

$("#placeholder").bind("plotdblclick", function (event, pos, item) {
if (item) {
$("dblclickdata").text(" - dblclick point " + item.dataIndex + " in " + item.series.label);
}
});

// Add the Flot version string to the footer

$("#footer").prepend("Flot " + $.plot.version + " – ");
Expand All @@ -114,6 +120,7 @@ <h2>Interactivity</h2>
<label><input id="enablePosition" type="checkbox"></input>Show mouse position</label>
<span id="hoverdata"></span>
<span id="clickdata"></span>
<span id="dblclickdata"></span>
</p>

<p>A tooltip is easy to build with a bit of jQuery code and the data returned from the plot.</p>
Expand Down

0 comments on commit f1a2073

Please sign in to comment.