From 706bc008ef0f1db6ac29d615ffbf37d53248ac39 Mon Sep 17 00:00:00 2001 From: Abhinandan Kushwaha Date: Wed, 20 Oct 2021 00:23:55 +0530 Subject: [PATCH] Handled sum=0 case for Pie and Donut charts --- package.json | 2 +- src/PieChart/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fa8f6aa..446a661 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-gifted-charts", - "version": "0.1.12", + "version": "0.1.13", "description": "The most complete library for Bar, Line, Area, Pie and Donut charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.", "main": "src/index.tsx", "files": [ diff --git a/src/PieChart/index.tsx b/src/PieChart/index.tsx index fa55e1c..ee9d072 100644 --- a/src/PieChart/index.tsx +++ b/src/PieChart/index.tsx @@ -278,7 +278,7 @@ export const PieChart = (props: propTypes) => { }); }; - return ( + return total === 0 ? null : ( {(props.centerLabelComponent || (donut && !isDataShifted)) && (