Abhinandan-Kushwaha / react-native-gifted-charts

The most complete library for Bar, Line, Area, Pie, Donut, Stacked Bar and Population Pyramid charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.
https://www.npmjs.com/package/react-native-gifted-charts
MIT License
790 stars 152 forks source link

PieChartPro reverses data #897

Open sladik-maksym opened 2 weeks ago

sladik-maksym commented 2 weeks ago

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

image

PieChart

image

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