PieChart centerSpace disapearing
- Dominant language
- Dart
- Stars
- 7.6k
- Forks
- 2k
- Avg merge
- 9d 1h
- Merged PRs (30d)
- 2
Description
I have a pieChart with only 2 sections where the section values are calculated dynamically.
I saw that the innerCircle disappears when the first section's value is 0.
I tested with switching the values, i.e. first section has a value and second section value = 0, then the bug is not there, the innerCircle is drawn as normal.
(PieChartSectionData radius and PieChartData centerSpaceRadius is been given explicitly in all instances)
**Steps to Reproduce**
create a PieChart with 2 PieChartSectionData( ) in sections parameter.
provide value = 0 to first section and any value to 2nd section
**Screenshots**
When values provided to both sections

value = 0, in 1st section (value > 0 given to 2nd section)

value = 0, in 2nd section (value > 0 given to 1st section)

### Versions
**flutter version**
Flutter 3.19.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ba39319843 (3 weeks ago) • 2024-03-07 15:22:21 -0600
Engine • revision 2e4ba9c6fb
Tools • Dart 3.3.1 • DevTools 2.31.1
**fl_chart version**
fl_chart: ^0.66.2
FYI: I didn't check behavior with any other number of sections
Contributor guide
Research direction
Start by locating the PieChart rendering entry point and any tests covering PieChartSectionData values or centerSpaceRadius. Reproduce the two-section case with a zero first value, then compare it with the reversed values. Done means the inner circle remains visible in both cases, with a regression test covering the zero-first-section scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100