js/highcharts-master/samples/highcharts/chart/events-selection-points/demo.js
/**
 * Custom selection handler that selects points and cancels the default zoom behaviour
 */
Custom selection handler that selects points and cancels the default zoom behaviour
Custom selection handler that selects points and cancels the default zoom behaviour
function selectPointsByDrag(e) {
    Highcharts.each(this.series, function (series) {
        Highcharts.each(series.points, function (point) {
            if (point.x >= e.xAxis[0].min && point.x <= e.xAxis[0].max &&
                    point.y >= e.yAxis[0].min && point.y <= e.yAxis[0].max) {
                point.select(true, true);
            }
        });
    });
    Highcharts.fireEvent(this, 'selectedpoints', { points: this.getSelectedPoints() });
    return false; 
}
function selectPointsByDrag ( e ) { Highcharts . each ( this . series , function ( series ) { Highcharts . each ( series . points , function ( point ) { if ( point . x >= e . xAxis [ 0 ] . min && point . x <= e . xAxis [ 0 ] . max && point . y >= e . yAxis [ 0 ] . min && point . y <= e . yAxis [ 0 ] . max ) { point . select ( true , true ) ; } } ) ; } ) ; Highcharts . fireEvent ( this , 'selectedpoints' , { points : this . getSelectedPoints ( ) } ) ; return false ; }
Custom selection handler that selects points and cancels the default zoom behaviour
Custom selection handler that selects points and cancels the default zoom behaviour
// Select points // Fire a custom event // Don't zoom