Skip to content

Commit

Permalink
datalabels issue in bubble chart; fixes #4031
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed Sep 29, 2023
1 parent 9936ffc commit 739063a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/modules/DataLabels.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ class DataLabels {
let lastDataLabelRect = w.globals.dataLabelsRects[i][lastDrawnIndex]
if (
// next label forward and x not intersecting
x > lastDataLabelRect.x + lastDataLabelRect.width + 2 ||
y > lastDataLabelRect.y + lastDataLabelRect.height + 2 ||
x > lastDataLabelRect.x + lastDataLabelRect.width ||
y > lastDataLabelRect.y + lastDataLabelRect.height ||
y + height < lastDataLabelRect.y ||
x + width < lastDataLabelRect.x // next label is going to be drawn backwards
) {
// the 2 indexes don't override, so OK to draw next label
Expand Down

0 comments on commit 739063a

Please sign in to comment.