chartjs / chartjs/chartjs-plugin-datalabels
Collision
- Dominant language
- JavaScript
- Stars
- 920
- Forks
- 507
- PR merge metrics
- No merged PRs in 30d
Description
I am using datalabels on my bubble chart, but sometimes the bubbles and datalabels collide. Is there any solution to fix collision or detect when they are overlapping?
I can see that in the path `chart > $datalabels > labels > [1] > [..n] > Label > _hitbox > _rect` I have this
```
cx: 434.368
cy: 74.09599999999998
x0: 388.0193671875
x1: 481.7166328125
y0: 58.69599999999998
y1: 90.49599999999998
```
Should I check if there's something overlapping there?
### update
I can see a problem with this approach as the `_rect` isn't updated until there has been a mouse over.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.