-
Notifications
You must be signed in to change notification settings - Fork 379
Closed
Labels
Milestone
Description
Hi,
I use chartjs-plugin-annotation to draw box annotations on stacked chart.
According to the documentation I added the property yScaleID to each box annotation in accordance with the related scale id.
I expected that the annotations position will be only on the specific scale, but the reality is that the annotations ״smeared״ on all scales from top to bottom.
The creation of the annotation is done as follows:
const annotation = {
type: 'box',
xMin:"2022-01-26T02:00:00",
xMax:"2022-01-26T16:30:00",
yMin:undefined,
yMax:undefined,
backgroundColor:"#FFF2B2",
drawTime: 'beforeDraw',
borderWidth: 0,
yScaleID:'y'
}
Note that I set the properties yMin and yMax to undefined in order the box will be painted on the entire height of the scale.
Result:

naomipol
