Merge pull request #27 from Abhinandan-Kushwaha/development
Development
This commit is contained in:
commit
a67f44b9d4
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "react-native-gifted-charts",
|
||||
"version": "0.1.10",
|
||||
"version": "0.1.11",
|
||||
"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": [
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, {useEffect, useState} from 'react';
|
||||
import React from 'react';
|
||||
import {ColorValue, View} from 'react-native';
|
||||
import Canvas from 'react-native-canvas';
|
||||
|
||||
|
@ -83,12 +83,6 @@ export const PieChart = (props: propTypes) => {
|
|||
const canvasHeight = isThreeD ? radius * 2.5 + 60 : radius * 2 + 60;
|
||||
const canvasWidth = radius * 2 + 60;
|
||||
|
||||
const [visibility, setVisibility] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(() => setVisibility(true), 410);
|
||||
}, []);
|
||||
|
||||
const handleCanvas = async (canvas: Canvas) => {
|
||||
if (!canvas) {
|
||||
return null;
|
||||
|
@ -285,7 +279,7 @@ export const PieChart = (props: propTypes) => {
|
|||
return (
|
||||
<View style={isThreeD && {transform: [{scaleY: 0.5}]}}>
|
||||
<Canvas ref={handleCanvas} />
|
||||
{visibility && (props.centerLabelComponent || (donut && !isDataShifted)) && (
|
||||
{(props.centerLabelComponent || (donut && !isDataShifted)) && (
|
||||
<View
|
||||
style={[
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue