javascript - highstock chart cancel zoom area selection using "Esc" -
does 1 have idea how cancel zoom area selection after dragging mouse on chart not release mouse yet?
see connected request here.
and example: http://jsfiddle.net/highcharts/72ga7/7/
snippet:
// generic code add zoom cancelling hitting escape highcharts.pointer.prototype.canceldrag = function () { if (this.selectionmarker) { this.selectionmarker = this.selectionmarker.destroy(); } this.drop(); }; $(document).keyup(function (e) { if (e.charcode == 27) { // esc $.each(highcharts.charts, function () { this.pointer.canceldrag(); }); } // esc });
Comments
Post a Comment