imaNNeo / fl_chart

FL Chart is a highly customizable Flutter chart library that supports Line Chart, Bar Chart, Pie Chart, Scatter Chart, and Radar Chart.
https://flchart.dev
MIT License
6.87k stars 1.78k forks source link

Dithering bug #1702

Closed Artein closed 4 months ago

Artein commented 4 months ago

Don't create a duplicate issue. No similar open issue was found.

Describe the bug LinearChart and PieChart (probably other charts as well) constantly change the size by a few pixels, creating a dithering appearance.

To Reproduce Use values with very long fractional parts (high precision), such as 0.124325346342756236. Edit: Well, seems like the issue is not in that. My LinearChart uses small integers (DateTime.weekday as X, and [0; 12] as Y). Edit 2: Lowering precision in PieChart values also didn't help.

Screenshots https://github.com/imaNNeo/fl_chart/assets/1109722/8e0899d0-ca0c-4ef5-b59b-9536ddd67e75 The effect can be seen in the center of PieChart (kinda a starting line from which bottom part shifts down and up a bit), and on horizontal values of LiniearChart (especially on values between Thu and Sun)

Versions Flutter: 3.19.6 FlChart: 0.68.0

techouse commented 4 months ago

Screenshots https://github.com/imaNNeo/fl_chart/assets/1109722/8e0899d0-ca0c-4ef5-b59b-9536ddd67e75

From the screenshot I see that you use Impeller because of the line chart rendering issue. Can you try with Skia?

Artein commented 4 months ago

Screenshots https://github.com/imaNNeo/fl_chart/assets/1109722/8e0899d0-ca0c-4ef5-b59b-9536ddd67e75

From the screenshot I see that you use Impeller because of the line chart rendering issue. Can you try with Skia?

Yes, it fixes the issue. Unfortunately, having shaders lazy compilation across the whole app is even worse.

Is there any workaround for the Impeller?

techouse commented 4 months ago

Unfortunately, having shaders lazy compilation across the whole app is even worse.

Just profile your app for iOS, like you have to for Android (which still uses Skia). 🤷

Is there any workaround for the Impeller?

https://github.com/imaNNeo/fl_chart/issues/1625#issuecomment-2165505325

imaNNeo commented 4 months ago

Let's follow it on #1625