Skip to content

Commit

Permalink
fixes pie label conflict resolution (elastic#15410)
Browse files Browse the repository at this point in the history
* fixes pie label conflict resolution

* fixing based on review
  • Loading branch information
ppisljar committed Dec 5, 2017
1 parent de9fdcb commit e169dd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui/public/vislib/visualizations/pie_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ export function VislibVisualizationsPieChartProvider(Private) {
const current = d.position;
if (point) {
const horizontalConflict = (point.left < 0 && current.left < 0) || (point.left > 0 && current.left > 0);
const verticalConflict = (point.top > current.top && point.top <= current.bottom) ||
(point.top < current.top && point.bottom >= current.top);
const verticalConflict = (point.top >= current.top && point.top <= current.bottom) ||
(point.top <= current.top && point.bottom >= current.top);

if (horizontalConflict && verticalConflict) {
point.point = node.point;
Expand Down

0 comments on commit e169dd3

Please sign in to comment.