react-native-pathjs-charts
react-native-pathjs-charts copied to clipboard
Pie chart will not render properly if has 2 items and one of the item has 0 value
- [x] I have searched for existing issues
- [x] I have provided detailed instructions that can reproduce the issue (including code and data necessary)
It happened to me after generate a chart with 2 items, and one of the item has 0 value.
chartData: [{ "labelColor": '#8dc63f', "name": "Label 1", "value": 100 }, { "labelColor": '#134a83', "name": "Label 2", "value": 0 }]
It should render full 100% round of Label 1, but it's not.
Agreed this library should handle that edge case better. I guess the best way around this is to add validation to whatever it is generating your data to exclude whatever item comes up with a value of 0.
Yes, I've exclude all 0 value, but it seems that the stroke and inner circle couldn't be removed using the current options. I've create a new issue for this. Thank you.
yes this.
let pieData = [
{"label":"Exellent", "total":1},
{"label":"Good", "total":0},
{"label":"Regular", "total":0},
{"label":"Bad", "total":0}
];
