If the chart once contains one section that takes up 100%, then after an update, pie slices will all be black.
To Reproduce
Create a chart with one PieChartSectionData that represents 100 percent
Then update the chart with multiple pie charts (say: two sections with each 50 percent)
The color of the slices of the pie chart will be black
Version
0.66.0
Potential root cause
With change 68cf161f2623cedda2bf1b51bef758cf62beb812, the blendMode is set to BlendMode.srcOut on the _sectionPaint if there is a slice that takes up 100%. Later, if there are multiple slices, the drawSection is using the same _sectionPaint with the altered blendMode.
I can confirm that the following code fixes the problem:
Problem
If the chart once contains one section that takes up 100%, then after an update, pie slices will all be black.
To Reproduce
Version 0.66.0
Potential root cause
With change 68cf161f2623cedda2bf1b51bef758cf62beb812, the
blendMode
is set toBlendMode.srcOut
on the_sectionPaint
if there is a slice that takes up 100%. Later, if there are multiple slices, thedrawSection
is using the same_sectionPaint
with the alteredblendMode
.I can confirm that the following code fixes the problem: