From 31b8213f9adaa22642aec64d8b561c83dab6a90a Mon Sep 17 00:00:00 2001
From: nikogu <644506165@qq.com>
Date: Wed, 10 Jan 2018 17:28:31 +0800
Subject: [PATCH] fixed Pie all 0 NaN #645
---
src/components/Charts/Pie/index.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/components/Charts/Pie/index.js b/src/components/Charts/Pie/index.js
index 23be5f4b..ac5703ce 100644
--- a/src/components/Charts/Pie/index.js
+++ b/src/components/Charts/Pie/index.js
@@ -228,7 +228,9 @@ export default class Pie extends Component {
/>
{item.x}
- {`${(item.percent * 100).toFixed(2)}%`}
+
+ {`${(isNaN(item.percent) ? 0 : item.percent * 100).toFixed(2)}%`}
+