From 2a108cf3c48a877c98e30e2823e6fa49df447311 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 25 Oct 2017 19:52:36 +0800 Subject: [PATCH] tweak pie position --- src/components/Charts/Pie/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/Charts/Pie/index.js b/src/components/Charts/Pie/index.js index ce5bd308..a5173851 100644 --- a/src/components/Charts/Pie/index.js +++ b/src/components/Charts/Pie/index.js @@ -34,7 +34,6 @@ class Pie extends Component { this.totalNode = n; } - handleLegendClick = (item, i) => { const newItem = item; newItem.checked = !newItem.checked; @@ -180,11 +179,9 @@ class Pie extends Component { }, () => { let left = 0; if (this.totalNode) { - left = -((this.totalNode.offsetWidth / 2) + ((margin || m)[1] / 2)); + left = -((this.totalNode.offsetWidth / 2) + ((margin || m)[1] / 2)) + lineWidth; } - this.setState({ - left, - }); + this.setState({ left }); }); } -- GitLab