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
Post a Comment