fix!: Remove non-functional borderData from PieChartData#2066
fix!: Remove non-functional borderData from PieChartData#2066mahmoodhamdi wants to merge 1 commit intoimaNNeo:mainfrom
Conversation
The borderData parameter inherited from BaseChartData was never used by PieChartPainter to draw any borders. Users should use PieChartSectionData.borderSide instead for section borders. Removed borderData from PieChartData constructor, copyWith, lerp, and equality props. Updated docs, examples, and tests accordingly. Closes imaNNeo#1182
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2066 +/- ##
=======================================
Coverage 92.92% 92.92%
=======================================
Files 50 50
Lines 3873 3873
=======================================
Hits 3599 3599
Misses 274 274
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Comment from here:
|
Problem
PieChartDatainheritsborderDatafromBaseChartData, butPieChartPainternever uses it to draw any borders. When users setborderData: FlBorderData(show: true)on aPieChartData, nothing happens — the parameter is silently ignored.This was reported in #1182 and confirmed by the maintainer.
Solution
Removed the
borderDataparameter fromPieChartData:copyWith,lerp, andpropsPieChartDatanow always passesFlBorderData(show: false)toBaseChartDataUsers should use
PieChartSectionData.borderSidefor section borders.Breaking Change
Code that passes
borderDatatoPieChartData(...)will get a compile error. The fix is to simply remove theborderDataparameter — it was never functional.Migration:
Testing
flutter analyze— zero warningsmake checkstyle— passesborderDataequality onPieChartDataChecklist
flutter analyzepasses with zero warningsflutter testpasses (573 tests)dart format .appliedCloses #1182