Skip to content

Commit

Permalink
tweak label placement
Browse files Browse the repository at this point in the history
  • Loading branch information
face committed Jun 14, 2018
1 parent 9d925c2 commit 31af607
Show file tree
Hide file tree
Showing 5 changed files with 9,415 additions and 9 deletions.
8 changes: 4 additions & 4 deletions dist/chartjs-plugin-piechart-outlabels.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,9 @@ var classes = {
offset = 5;
}

return this.labelRect.x - offset <= point.x && point.x <= this.labelRect.x + this.labelRect.width + offset
return this.textRect.x - offset <= point.x && point.x <= this.textRect.x + this.textRect.width + offset
&&
this.labelRect.y - offset <= point.y && point.y <= this.labelRect.y + this.labelRect.height + offset;
this.textRect.y - offset <= point.y && point.y <= this.textRect.y + this.textRect.height + offset;
};


Expand Down Expand Up @@ -629,9 +629,9 @@ var classes = {
}

if (!valid) {
this.center.x -= 2;
this.center.x -= 1.5;
this.center.y += .5;
this.center.copy.x -= 2;
this.center.copy.x -= 1.5;
this.center.copy.y += .5;
}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/chartjs-plugin-piechart-outlabels.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified dist/chartjs-plugin-piechart-outlabels.zip
Binary file not shown.
Loading

0 comments on commit 31af607

Please sign in to comment.