From 4ba5217a087ff710486a2ed00d136fd4fd0a4d67 Mon Sep 17 00:00:00 2001 From: corpglory-dev Date: Thu, 14 Mar 2019 18:18:40 +0300 Subject: [PATCH] Right tooltip position --- packages/grafana-ui/src/components/PieChart/PieChart.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/grafana-ui/src/components/PieChart/PieChart.tsx b/packages/grafana-ui/src/components/PieChart/PieChart.tsx index ee1cf28021e..1fc86b60956 100644 --- a/packages/grafana-ui/src/components/PieChart/PieChart.tsx +++ b/packages/grafana-ui/src/components/PieChart/PieChart.tsx @@ -96,8 +96,7 @@ export class PieChart extends PureComponent { }) .on('mousemove', () => { select(this.tooltipElement) - // TODO: right position - .style('top', `${event.pageY}px`) + .style('top', `${event.pageY - height / 2}px`) .style('left', `${event.pageX}px`); }) .on('mouseout', () => {