From 0fd3ad8e689633a2492f88f3a6bf875124362249 Mon Sep 17 00:00:00 2001 From: Peter Pisljar Date: Tue, 5 Dec 2017 17:49:16 +0100 Subject: [PATCH] fixes pie label conflict resolution (#15410) * fixes pie label conflict resolution * fixing based on review --- src/ui/public/vislib/visualizations/pie_chart.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/public/vislib/visualizations/pie_chart.js b/src/ui/public/vislib/visualizations/pie_chart.js index 1442f61d79c06..f7a38cf3a7524 100644 --- a/src/ui/public/vislib/visualizations/pie_chart.js +++ b/src/ui/public/vislib/visualizations/pie_chart.js @@ -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;