I have created a linear chart using this type of option:
Code: Select all
return options = {
chart: {
type: 'line'
},
title: {
text: 'Grafico del PH'
},
subtitle: {
text: 'Andamento del ph nell\' intrvallo di tempo selezionato'
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: {
month: '%e. %b',
},
title: {
text: 'Date'
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle'
},
yAxis: {
title: {
text: 'PH'
}
},
series: [{
name: "PH",
data: dps
}],
plotOptions: {
series: {
cursor: 'pointer',
point: {
events: {
click: function () {
showimg(this.x);
}
}
}
}
},
};
Code: Select all
[1538762403000, 64][1538766003000, 63][1538769602000, 60][1538773203000, 65]
[date,y1,y2]
example:
Code: Select all
[1538762403000, 64,1000][1538766003000, 63,2000][1538769602000, 60,2500][1538773203000, 65,5000]