2021-08-14 13:37:21 +00:00
|
|
|
import React from 'react';
|
|
|
|
import {View} from 'react-native';
|
|
|
|
import {PieChart} from '../../src/PieChart';
|
|
|
|
|
|
|
|
const ThreeDPie = () => {
|
|
|
|
const pieData = [
|
2022-04-27 23:25:32 +00:00
|
|
|
{value: 54, color: '#177AD5'},
|
|
|
|
{value: 40, color: '#79D2DE'},
|
|
|
|
{value: 20, color: '#ED6665'},
|
2021-08-14 13:37:21 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
return (
|
|
|
|
<View>
|
|
|
|
<PieChart
|
|
|
|
donut
|
|
|
|
isThreeD
|
2022-04-27 23:25:32 +00:00
|
|
|
shadow
|
2021-08-14 13:37:21 +00:00
|
|
|
showText
|
2022-04-27 23:25:32 +00:00
|
|
|
showValuesAsLabels
|
2021-08-14 13:37:21 +00:00
|
|
|
innerCircleBorderWidth={6}
|
|
|
|
innerCircleBorderColor="lightgray"
|
|
|
|
shiftInnerCenterX={-10}
|
|
|
|
shiftInnerCenterY={-15}
|
|
|
|
textColor="black"
|
|
|
|
radius={170}
|
|
|
|
textSize={20}
|
|
|
|
showTextBackground
|
|
|
|
textBackgroundRadius={26}
|
|
|
|
data={pieData}
|
|
|
|
/>
|
|
|
|
</View>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default ThreeDPie;
|