Handled sum=0 case for Pie and Donut charts
This commit is contained in:
parent
fdd1b085cb
commit
706bc008ef
|
@ -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": [
|
||||
|
|
|
@ -278,7 +278,7 @@ export const PieChart = (props: propTypes) => {
|
|||
});
|
||||
};
|
||||
|
||||
return (
|
||||
return total === 0 ? null : (
|
||||
<View style={{transform: [{scaleY: tilt}]}}>
|
||||
<Canvas ref={handleCanvas} />
|
||||
{(props.centerLabelComponent || (donut && !isDataShifted)) && (
|
||||
|
|
Loading…
Reference in New Issue