need some help. How can i limit min and max values from json array with js.
This is my problem, working on highstocks and my date is first day in unix but in array i have correct date. So my navigator and range scale is't working?
My json array is in variable
var data = <?php echo $data; ?>;
but i want to limit it like this
$.getJSON('https://www.highcharts.com/samples/data/from-sql.php?start=' + Math.round(e.min) +
'&end=' + Math.round(e.max) + '&callback=?', function (data)
This is my json structure
[1233014400000,12.96],
[1233100800000,13.46],
[1233187200000,13.29],
[1233273600000,12.88],
$(function () {
var data = <?php echo $data; ?>; // geting json array [1233014400000,12.96] //
// Create the chart
$('#container_small').highcharts('StockChart', {
rangeSelector : {
selected : 1,
enabled: true
},
title : {
text : 'Tankerska Next Generation d.d.'
},
navigator : {
enabled: true
},
series : [{
name : 'Tankerska Next Generation d.d.',
data : data,
marker : {
enabled : true,
radius : 4
},
shadow : true,
tooltip : {
valueDecimals : 2
}
}]
});
});
Thank you for help