Open sladik-maksym opened 2 weeks ago
data reverses when use PieChartPro
import { Colors, useTheme } from '@rneui/themed'; import { PieChartPro } from 'react-native-gifted-charts';
import { CHART } from '@src/constants';
const RADIUS = CHART.WIDTH * 0.4;
const getMockData = (colors: Colors) => { return [ { value: 100, color: colors.categoriesShopping }, { value: 200, color: colors.categoriesHome }, { value: 50, color: colors.categoriesTaxes }, { value: 250, color: colors.categoriesFood }, { value: 150, color: colors.categoriesTravel }, ]; };
export const PieChart = () => { const { theme } = useTheme();
return ( <PieChartPro data={getMockData(theme.colors)} donut isAnimated animationDuration={200} semiCircle radius={RADIUS} strokeWidth={4} strokeColor={theme.colors.baseWhite} /> ); };
PieChartPro
PieChart
No response
1.4.47
0.75.4
iOS
None
Description
data reverses when use PieChartPro
Steps to reproduce
import { Colors, useTheme } from '@rneui/themed'; import { PieChartPro } from 'react-native-gifted-charts';
import { CHART } from '@src/constants';
const RADIUS = CHART.WIDTH * 0.4;
const getMockData = (colors: Colors) => { return [ { value: 100, color: colors.categoriesShopping }, { value: 200, color: colors.categoriesHome }, { value: 50, color: colors.categoriesTaxes }, { value: 250, color: colors.categoriesFood }, { value: 150, color: colors.categoriesTravel }, ]; };
export const PieChart = () => { const { theme } = useTheme();
return ( <PieChartPro data={getMockData(theme.colors)} donut isAnimated animationDuration={200} semiCircle radius={RADIUS} strokeWidth={4} strokeColor={theme.colors.baseWhite} /> ); };
PieChartPro
PieChart
Snack or a link to a repository
No response
version of react-native-gifted-charts
1.4.47
React Native version
0.75.4
Platforms
iOS
Workflow
None