0π
β
I managed to solve it. Itβs possible to do that with an external plugin called
chartjs annotation
annotation: {
// Should be one of: afterDraw, afterDatasetsDraw, beforeDatasetsDraw
drawTime: 'afterDatasetsDraw', // (default)
annotations: [
{
type: 'line',
mode: 'vertical',
scaleID: 'x-axis-0',
value: 'January',
borderColor: 'transparent',
borderWidth: 0,
label: {
backgroundColor: 'rgba(0,0,0,0.8)',
fontSize: 10,
fontStyle: "bold",
fontColor: "#fff",
xPadding: 6,
yPadding: 6,
cornerRadius: 6,
position: "center",
xAdjust: 0,
yAdjust: -80,
enabled: true,
content: "Totals etc"
}
}
]
}