Vishvendu Palawat
Vishvendu Palawat

Reputation: 576

Print Array in HighChart

I am facing a problem printing an array into HighCharts.

var FirstTurnOver =new Array();

This array Contains 100,345,212,444,121,111,65 all values are dynamically fetching from the server. Now I have to show them in series.

series: [{
    data: FirstTurnOver  
}]

This doesn't print anything on my Y axis.

Upvotes: 3

Views: 160

Answers (1)

Oleksandr T.
Oleksandr T.

Reputation: 77482

Your array contains numbers of strings, you just need to convert strings to numbers

FirstTurnOver.map(function (el) { return +el  })
// The same but a little shorter
// FirstTurnOver.map(Number) 
// or before push 
// FirstTurnOver.push(+billerdetails1);

Example

Upvotes: 2

Related Questions