fl_chart
fl_chart copied to clipboard
Add shadow for Pie Chart
This adds the drop shadow to the Pie Chart with some cool customizations
-
You can add simply a drop shadow like this (check the pie chart sample 4 here)
-
Also you can simulate the third dimension like this (check the pie chart sample 5 here)
solves #1482
Codecov Report
Attention: Patch coverage is 9.25926%
with 49 lines
in your changes missing coverage. Please review.
Please upload report for BASE (
main@0ae88cf
). Learn more about missing BASE report.
Files | Patch % | Lines |
---|---|---|
lib/src/chart/pie_chart/pie_chart_painter.dart | 9.25% | 49 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1497 +/- ##
=======================================
Coverage ? 85.34%
=======================================
Files ? 45
Lines ? 3078
Branches ? 0
=======================================
Hits ? 2627
Misses ? 451
Partials ? 0
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
It seems there is an issue, it freezes the app (tested on iPhone and macOS)
It seems there is an issue, it freezes the app (tested on iPhone and macOS)
Can you test again? I changed the number of layers to be drawn, it should fix this issue.
Tested on iPhone 15 Pro and simulator on MacBook Pro (2023). Seems to work now!
Okay, I found the freeze issue, if you change the offset to Offset(0, 0), it freezes the app process (it seems a low-level exception happens)
Please update the pie_chart.md and base_chart.md docs. Also please write some unit-tests. Read more about the contributing guideline here
Also, please use different style/color/value for the new charts. You just copy-pasted the sample1 and they look exactly the same except the shadow. It doesn't feel good to see some duplicate charts. You can combine the sample 4 and 5 together and add some options to change the shadow style (it helps users/developers to understand how it works). For example you can add a slider to allow user/developer to increase the shadow layers, offset, ... Or when you hover/touch it, instead of adding stroke radius, you can increase/decrease the shadow.