react-native-svg-charts icon indicating copy to clipboard operation
react-native-svg-charts copied to clipboard

items are not being shown in an ascending order in pie chart

Open HadisSharif opened this issue 4 years ago • 4 comments

After adding the 7th item to pie chart, the order of the items is disturbed. Before adding the 7th item all items are shown in ascending order.

react: 16.13.1 react-device-detect: 1.14.0 react-dom: 16.13.1 react-native: 0.63.3 react-native-svg-charts: 5.4.0

HadisSharif avatar Dec 13 '20 10:12 HadisSharif

This is also happening to our app, it works until 6 slices, but once you add the 7th slice the order gets distorted. It only happens on android but not in ios. In my pie, the value of each slices are the same, 100 / number of slices

aprilmintacpineda avatar Apr 07 '21 10:04 aprilmintacpineda

@HadisSharif maybe you should renamed this to "PieChart shows incorrect order"

aprilmintacpineda avatar Apr 07 '21 10:04 aprilmintacpineda

Got it, it's because of this https://github.com/JesperLekland/react-native-svg-charts/blob/dev/src/pie-chart.js#L196 remove that and everything will be fine

EDIT:

If you're going to ask how I removed it, i removed it using patch-package.

aprilmintacpineda avatar Apr 07 '21 10:04 aprilmintacpineda