Closed front100 closed 1 week ago
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} />
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 }, ];
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 }, ];
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 }, ];
No response
1.4.44
0.74.5
Android
Expo Dev Client
Hi @front100 👋 Thanks for reporting the issue. It has been fixed from versions 1.4.45 onwards.
1.4.45
Please use the latest version of the library.
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
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 }, ];
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