xpen
Posts: 1
Joined: Tue Sep 21, 2010 2:30 am

ie8 selection event

hi all,

everything goes well until i test my page using ie8, what i want to do is just zooming x axies, but when i select an area, ie8 can not feel that event(compatibility view can)!

Code: Select all

 events: {

                                                        // listen to the selection event on the master chart to update the
                                                        // extremes of the detail chart
                                                        selection: function(event) {
                                                                var extremesObject = event.xAxis[0],
                                                                        min = extremesObject.min,
                                                                        max = extremesObject.max,
                                                                        detailData = [],
                                                                        xAxis = this.xAxis[0];
                                                                // reverse engineer the last part of the data
                                                                jQuery.each(this.series[0].data, function(i, point) {
                                                                        if (point.x > min && point.x < max) {
                                                                                detailData.push({
                                                                                        x: point.x,
                                                                                        y: point.y
                                                                                });
                                                                        }
                                                                });

                                                                // move the plot bands to reflect the new detail span
                                                                xAxis.removePlotBand('mask-before');
                                                                xAxis.addPlotBand({
                                                                        id: 'mask-before',
                                                                        from: startDateTime.getTime(),
                                                                        to: min,
                                                                        color: 'rgba(0, 0, 0, 0.2)'
                                                                });

                                                                xAxis.removePlotBand('mask-after');
                                                                xAxis.addPlotBand({
                                                                        id: 'mask-after',
                                                                        from: max,
                                                                        to: endDateTime.getTime(),
                                                                        color: 'rgba(0, 0, 0, 0.2)'
                                                                });

                                                                detailChart.series[0].setData(detailData);

    

help me out here!

thanks!

Return to “Highcharts Usage”