Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PieChart is not displayed if there is a big difference between several 'values' #874

Closed
front100 opened this issue Oct 18, 2024 · 1 comment

Comments

@front100
Copy link

Description

If there is a big difference in values ('value') in the data array for PieChart, PieChart is not displayed. For example:

const pieData = [ { 'categoryId': 'id-4', 'color': 'rgb(71, 85, 182)', 'focused': true, 'value': 5931310.94 }, { 'categoryId': 'id-3', 'color': 'green', 'focused': false, 'value': 0.31 }, ];

But if the first value is reduced, PieChart displays normally again.

const pieData = [ { 'categoryId': 'id-4', 'color': 'rgb(71, 85, 182)', 'focused': true, 'value': 296565.55}, { 'categoryId': 'id-3', 'color': 'green', 'focused': false, 'value': 0.31 }, ];

<PieChart innerCircleColor='grey' radius={70} sectionAutoFocus donut innerRadius={60} data={pieData} />

Steps to reproduce

  1. Set data for PieChart
    const pieData = [ { 'categoryId': 'id-4', 'color': 'rgb(71, 85, 182)', 'focused': true, 'value': 5931310.94 }, { 'categoryId': 'id-3', 'color': 'green', 'focused': false, 'value': 0.31 }, ];

  2. Set another data for PieChart
    const pieData2 = [ { 'categoryId': 'id-4', 'color': 'rgb(71, 85, 182)', 'focused': true, 'value': 296565.55}, { 'categoryId': 'id-3', 'color': 'green', 'focused': false, 'value': 0.31 }, ];

Snack or a link to a repository

No response

version of react-native-gifted-charts

1.4.44

React Native version

0.74.5

Platforms

Android

Workflow

Expo Dev Client

@Abhinandan-Kushwaha
Copy link
Owner

Hi @front100 👋
Thanks for reporting the issue. It has been fixed from versions 1.4.45 onwards.

Please use the latest version of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants