Using canvas as content
const config = {
type: 'line',
data,
options: {
scales: {
y: {
beginAtZero: true,
}
},
plugins: {
annotation: {
annotations: {
annotation1,
annotation2
}
}
}
}
};
const annotation1 = {
type: 'label',
content: Utils.getHouse(),
xValue: 9,
yValue: 30
};
const annotation2 = {
type: 'label',
content: Utils.getSpiral(),
xValue: 2,
yValue: 50
};
const DATA_COUNT = 12;
const MIN = 0;
const MAX = 100;
const numberCfg = {count: DATA_COUNT, min: MIN, max: MAX};
const data = {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
datasets: [{
data: Utils.numbers(numberCfg)
}]
};