Hey, thank's for this usefull plugin !
I would like to get the width of an annotation from within another annotation scriptable option (to place the 2nd annotation next to the first relative to the width of the 1st annotation).
I want to accomplish something like that:
annotation1: {
type: 'label',
xValue: () => 0,
yValue: () => 1,
content: () => "Annotation 1",
padding: 5,
color: 'black',
},
annotation2: {
type: 'label',
xValue: () => 0,
yValue: () => 1,
xAjust: (cxt) => {
return ctx.chart.options.plugins.annotation.annotations.annotation1.width
},
content: () => "Annotation 2",
padding: 5,
color: 'black',
}
But the problem is ctx.chart.options.plugins.annotation.annotations.annotation1.width doesn't exists.
Is it possible to achieve ?
Thanks in advance.
Hey, thank's for this usefull plugin !
I would like to get the width of an annotation from within another annotation scriptable option (to place the 2nd annotation next to the first relative to the width of the 1st annotation).
I want to accomplish something like that:
But the problem is ctx.chart.options.plugins.annotation.annotations.annotation1.width doesn't exists.
Is it possible to achieve ?
Thanks in advance.