javascript - How to get the highest value in a json format dataset? -


i'm using highcharts, uses data series plot chart similar this:

series:

[{     data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }] 

i know can use json file feed dataset so, how can highest value?

this how can highest value in data array.

data = [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]  var highest_value = math.max.apply(math, data); console.log(highest_value) //216.4 

Comments

Popular posts from this blog

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -