I have a horizontal single bar chart showing percentage inside of an ag-grid row, I would like to add a line at a certain percentage to show a target. I am using the annotations plugin which is registered. I have tried several different versions of the annotation options but cannot get anything to show on the chart. Any help would be greatly appreciated :)
const options = {
indexAxis: 'y' as const,
responsive: true,
scales: {
xAxis: {
max: 100,
min: 0,
display: false,
},
yAxis: {
display: false,
},
},
plugin: {
annotation: {
annotations: [
{
type: 'line' as const,
mode: 'vertical',
scaleID: 'x',
value: 80,
borderColor: 'black',
borderWidth: 2,
},
],
},
},
};
const dataset = {
labels: ['In-session utilisation (%)'],
datasets: [
{
id: 1,
label: '',
data: [theatreUtilisation],
backgroundColor: theme.color.accentB,
},
],
};
return (
<>
<Bar data={dataset} options={options} />
</>
);