[Chartjs]-Get the list of all annotations

1👍

You are configuring your annotations in the options.plugins.annotation namespace so you also need to retrieve them from there instead of options.annotation.

So using this onHover will list your annotations:

onHover: (event, elements, chart) => {
  console.log(chart.options.plugins.annotation.annotations)
}

Leave a comment