score:0

i modified my code like that and it works

Highcharts.chart('graphOnDemand',{

//highchart code...

series: [{
    name: 'during service internal',
    data:dsi,

    //code...

score:1

The variable dsi is local to the oneTowerChart function and as such, is out of scope when you try to access it later. One way you can fix it is to make dsi a global variable by moving its definition outside of your function

var dsi = [];
function oneTowerChart(datas) {
  // your code, without var dsi = [];
}

Related Query