2020-02-29 00:56:22 +01:00
|
|
|
function newDateFromRef(days) {
|
|
|
|
return moment('01/01/2015 12:00', 'DD/MM/YYYY HH:mm').add(days, 'd').toDate();
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
threshold: 0.01,
|
|
|
|
config: {
|
|
|
|
type: 'line',
|
|
|
|
data: {
|
|
|
|
datasets: [{
|
|
|
|
data: [{
|
|
|
|
t: newDateFromRef(0),
|
|
|
|
y: 1
|
|
|
|
}, {
|
|
|
|
t: newDateFromRef(1),
|
|
|
|
y: 10
|
|
|
|
}, {
|
|
|
|
t: newDateFromRef(2),
|
|
|
|
y: 0
|
|
|
|
}, {
|
|
|
|
t: newDateFromRef(4),
|
|
|
|
y: 5
|
|
|
|
}, {
|
|
|
|
t: newDateFromRef(6),
|
|
|
|
y: 77
|
|
|
|
}, {
|
|
|
|
t: newDateFromRef(7),
|
|
|
|
y: 9
|
|
|
|
}, {
|
|
|
|
t: newDateFromRef(9),
|
|
|
|
y: 5
|
|
|
|
}],
|
2020-06-18 23:36:53 +02:00
|
|
|
fill: false,
|
|
|
|
parsing: {
|
|
|
|
xAxisKey: 't'
|
|
|
|
}
|
2020-02-29 00:56:22 +01:00
|
|
|
}],
|
|
|
|
},
|
|
|
|
options: {
|
|
|
|
scales: {
|
|
|
|
x: {
|
|
|
|
type: 'time',
|
2020-06-11 14:50:17 +02:00
|
|
|
position: 'bottom',
|
|
|
|
ticks: {
|
|
|
|
maxRotation: 0
|
|
|
|
}
|
2020-02-29 00:56:22 +01:00
|
|
|
},
|
|
|
|
y: {
|
|
|
|
display: false
|
|
|
|
}
|
2020-11-23 23:58:03 +01:00
|
|
|
}
|
2020-02-29 00:56:22 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
options: {
|
|
|
|
spriteText: true,
|
|
|
|
canvas: {width: 800, height: 200}
|
|
|
|
}
|
|
|
|
};
|