A small fix I made while working on a personal project using react-native-chart-kit. Currently, when I have a Pie chart with empty data values, the chart crashes. My fix is to default the sum to 1 in that case, so there's no 0 division, while the chart will remain empty. I tried to write a test case for this, but I'm not sure if it makes sense.
A small fix I made while working on a personal project using react-native-chart-kit. Currently, when I have a Pie chart with empty data values, the chart crashes. My fix is to default the sum to 1 in that case, so there's no 0 division, while the chart will remain empty. I tried to write a test case for this, but I'm not sure if it makes sense.
I hope this helps!