I have a problem with loading the .json file:
[
[
[
"2014-11-19 06:00:00",
"1.1"
],
[
"2014-11-19 14:00:00",
"4.9"
],
[
"2014-11-19 15:00:00",
"4.9"
],
[
"2014-11-19 16:00:00",
"4.9"
],
[
"2014-11-19 17:00:00",
"4.9"
],
[
"2014-11-19 18:00:00",
"4.9"
]
],
[
[
"2014-11-13 23:00:00",
"194"
],
[
"2014-11-14 00:00:00",
"195"
],
[
"2014-11-14 01:00:00",
"187"
],
[
"2014-11-14 02:00:00",
"191"
],
[
"2014-11-14 03:00:00",
"218"
],
[
"2014-11-14 04:00:00",
"170"
]
]
]
values:
[[data, valueTemperature],[data,WindMax]]
I tried in this way, but does not work:
$(document).ready(function () {
var options = {
chart: {
renderTo: 'container',
type: 'spline',
zoomType: 'xy'
},
title: {
text: 'Temperatura'
},
subtitle: {
text: '5 dni'
},
xAxis: {
type: 'datetime',
},
yAxis: [{ // Primary yAxis
labels: {
format: '{value}°C',
style: {
color: Highcharts.getOptions().colors[1]
}
},
title: {
text: 'Temperature',
style: {
color: Highcharts.getOptions().colors[1]
}
},
min: -25,
max: 25,
}, { // Secondary yAxis
title: {
text: 'Prędkość wiatru',
style: {
color: Highcharts.getOptions().colors[0]
}
},
labels: {
format: '{value} m/s',
style: {
color: Highcharts.getOptions().colors[0]
}
},
min: 0,
max: 15,
opposite: true
}],
tooltip: {
shared: true
},
series: [{}]
};
var chart;
$.getJSON('test.json', function (data) {
options.series[0].data = data;
chart = new Highcharts.Chart(options);
});
});
How to correctly write it for a data type?