HighCharts zoom in selection event -


how make ajax call when graph zoomed in. tried chart.events.selection javascript error.

selection: function(event) {     // log min , max of primary, datetime x-axis     console.log(         highcharts.dateformat('%y-%m-%d %h:%m:%s', event.xaxis[0].min),         highcharts.dateformat('%y-%m-%d %h:%m:%s', event.xaxis[0].max)     ); } 

gives error "uncaught typeerror: cannot read property '0' of undefined". function gets called when graph plotted infinite no of times. how prevent that?

http://api.highcharts.com/highcharts/chart.events.selection says should fired when area under graph selected.

here jsfiddle https://jsfiddle.net/dhptnfkt/36/ (you need un-comment code highlighted error).

in example have:

events: {     selection: getselection(event) } 

when not define function on spot need pass function reference, or else passing parameter event in case undefined variable.

instead should (jsfiddle):

events: {     selection: getselection } 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -