Files
mobile-darmasaba/components/division/reportChartProgress.tsx
amaliadwiy 42bf1589b4 upd: tampilan
Deskripsi:
- masang toast
- ganti tag Text

No Issues
2025-07-29 11:41:03 +08:00

32 lines
1.0 KiB
TypeScript

import Styles from "@/constants/Styles";
import { View } from "react-native";
import { PieChart } from "react-native-gifted-charts";
import Text from "../Text";
export default function ReportChartProgress({ data }: { data: { color: string; text: string; value: number; }[] }) {
const pieData = [
{ value: 54, text: "54%", color: '#177AD5' },
{ value: 40, text: "40%", color: '#92cc76' },
{ value: 20, text: "20%", color: '#ED6665' },
{ value: 0, text: "0%", color: '#fac858' },
];
return (
<View style={[Styles.wrapPaper, Styles.contentItemCenter, Styles.mb15]}>
<Text style={[Styles.textSubtitle, Styles.mv15]}>PROGRES KEGIATAN</Text>
<PieChart
data={data}
showText
showValuesAsTooltipText
textColor="black"
radius={120}
textSize={15}
focusOnPress={false}
showValuesAsLabels
showTextBackground={false}
textBackgroundRadius={0}
isAnimated
/>
</View>
)
}