2019-01-15 09:24:12 +01:00
|
|
|
module.exports = {
|
|
|
|
config: {
|
|
|
|
type: 'line',
|
|
|
|
data: {
|
2019-03-21 09:06:39 +01:00
|
|
|
labels: [0, 1, 2, 3],
|
2019-01-15 09:24:12 +01:00
|
|
|
datasets: [
|
|
|
|
{
|
|
|
|
// option in dataset
|
2019-03-21 09:06:39 +01:00
|
|
|
data: [1, 1, 1, 1],
|
|
|
|
borderColor: '#ff0000',
|
|
|
|
borderDash: [20],
|
|
|
|
borderDashOffset: function(ctx) {
|
|
|
|
return ctx.datasetIndex === 0 ? 5.0 : 0.0;
|
|
|
|
}
|
2019-01-15 09:24:12 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
// option in element (fallback)
|
2019-03-21 09:06:39 +01:00
|
|
|
data: [0, 0, 0, 0]
|
2019-01-15 09:24:12 +01:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
options: {
|
|
|
|
elements: {
|
|
|
|
line: {
|
2019-03-21 09:06:39 +01:00
|
|
|
borderColor: '#00ff00',
|
|
|
|
borderDash: [20],
|
|
|
|
borderDashOffset: function(ctx) {
|
|
|
|
return ctx.datasetIndex === 0 ? 5.0 : 0.0;
|
|
|
|
},
|
2019-01-15 09:24:12 +01:00
|
|
|
fill: false,
|
|
|
|
},
|
|
|
|
point: {
|
2019-03-21 09:06:39 +01:00
|
|
|
radius: 10,
|
2019-01-15 09:24:12 +01:00
|
|
|
}
|
|
|
|
},
|
2019-03-21 09:06:39 +01:00
|
|
|
layout: {
|
|
|
|
padding: 32
|
|
|
|
},
|
2019-01-15 09:24:12 +01:00
|
|
|
scales: {
|
2019-11-22 00:46:49 +01:00
|
|
|
x: {display: false},
|
|
|
|
y: {display: false}
|
2019-01-15 09:24:12 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
options: {
|
|
|
|
canvas: {
|
|
|
|
height: 256,
|
|
|
|
width: 512
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|