Merge pull request #3 from Abhinandan-Kushwaha/development

Development
This commit is contained in:
Abhinandan Kushwaha 2021-08-05 17:44:12 +05:30 committed by GitHub
commit f724c920d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 138 additions and 128 deletions

18
App.js
View File

@ -19,28 +19,30 @@ const App = () => {
// ];
const data = [
{value: 150},
{value: 80, text: 80},
{value: 90, text: 90, textColor: 'green', textBackgroundColor: 'pink'},
{value: 70},
{value: 15, label: 'Jan'},
{value: 40, label: 'Feb'},
{value: 10, label: 'Mar'},
{value: 0, label: 'Apr'},
];
return (
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<BarChart
showGradient
isThreeD
isAnimated
gradientColor="gray"
frontColor="white"
// frontColor="white"
data={data}
/>
<LineChart data={data} />
<PieChart
{/* <LineChart data={data} /> */}
{/* <PieChart
showText
showTextBackground
showValuesAsLabels
textSize={14}
data={data}
/>
/> */}
{/* <LineChart data={data} curved /> */}
{/* <BarChart
data={data}

View File

@ -1,6 +1,6 @@
{
"name": "react-native-gifted-charts",
"version": "0.0.6",
"version": "0.0.7",
"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": [

View File

@ -118,6 +118,7 @@ const AnimatedBar = (props: animatedBarPropTypes) => {
{opacity: opacity, position: 'absolute', bottom: 0},
props.side === 'right' && {transform: [{rotateY: '180deg'}]},
]}>
{props.height ? (
<View style={{marginTop: width / -2}}>
<TriangleCorner
color={sideColor}
@ -138,9 +139,11 @@ const AnimatedBar = (props: animatedBarPropTypes) => {
style={{transform: [{rotate: '90deg'}], opacity: opacity}}
/>
</View>
) : null}
{/******************* Top View *****************/}
{props.height ? (
<>
<View style={{position: 'absolute', top: width / -2}}>
<TriangleCorner
color={topColor}
@ -159,13 +162,16 @@ const AnimatedBar = (props: animatedBarPropTypes) => {
}}
/>
</View>
<View style={{position: 'absolute', top: width / -2, left: width}}>
<View
style={{position: 'absolute', top: width / -2, left: width}}>
<TriangleCorner
color={topColor}
width={width}
style={{transform: [{rotate: '-90deg'}], opacity: opacity}}
/>
</View>
</>
) : null}
{/*******************************************************************/}

View File

@ -71,6 +71,7 @@ const ThreeDBar = (props: PropTypes) => {
const opacity = props.opacity || 1;
return (
<View style={styles.container}>
{props.height ? (
<View
style={[
styles.row,
@ -147,6 +148,7 @@ const ThreeDBar = (props: PropTypes) => {
)}
</View>
</View>
) : null}
{/******************* Top Label *****************/}