RaShe RaShe - 1 year ago 129
Javascript Question

Highcharts leave selected like on selection

I want to make custom selection, on select I want to leave the selection layer pointed in image:
enter image description here

chart: {
events: {
selection: function (event) {
event.xAxis[0].axis.chart.series[0].points.forEach(function (point) {
point.select(true, true);
zoomType: 'x'

Example is here, but I just selected the points.

Answer Source

You can create a plot band which looks exactly the same as the selection fill.

selection: function (e) {
               var axis = this.xAxis[0];


                color: Highcharts.color('#335cad').setOpacity(0.25).get(),
                from: e.xAxis[0].min,
                to: e.xAxis[0].max,
                id: 'selection-plot-band',
                zIndex: 6

example: http://jsfiddle.net/L8nbapeu/1/

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download