chartjs / chartjs-plugin-annotation

Annotation plugin for Chart.js
MIT License
609 stars 329 forks source link

Callout is shown even if box label and the margin is beyond the point #741

Closed stockiNail closed 2 years ago

stockiNail commented 2 years ago

Currently the callout is not shown if the the point, which represents the annotation calculated location, is inRange.

The following picture shows how the margin is not considered in the check if the point is inRange or not (and it should) and then to draw callout or not.

Callout conf:

callout: {
  display: true,
  margin: 20,
  position: 'bottom'
}

image