Rank: Advanced Member
Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered Joined: 1/3/2011(UTC) Posts: 483
Thanks: 0 times Was thanked: 87 time(s) in 87 post(s)
|
Currently you can't detect if it is right click or not in the 'dataPointMouseDown' event (we should change this), but you can use this code as workaround: Code: var context;
$('#jqChart').bind('mousedown', function (e, data) {
if (!context) { return; }
var right = e.which === 3;
if (right) { context = null;
var x = context.x; var y = context.y; // do something } });
$('#jqChart').bind('dataPointMouseDown', function (e, data) {
context = data; });
$('#jqChart').bind("contextmenu", function (e) { // don't show context menu return false; }); Best Regards, Dragan Matek jqChart Inc.
|