-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Negative BarChartRodStackItem are not drawn correctly in Flutter 3.10.5 (stable) #1347
Comments
we are not going to support the |
BarChartRodStackItem is also broken on Flutter 3.10.5 stable channel. To Reproduce Use Flutter 3.10.5 from stable. |
I am AFK and did not test it on stable channel lately. But this is probably an issue related to Impeller (new render engine). It could be interesting if some could use the stable channel that fails and try to disable Impeller https://docs.flutter.dev/perf/impeller @imaNNeo wanna give it a try, bugs from master are now included in stable? 😁 |
Disabling the impeller didn't do anything. But it seems that the impeller is not activated at all? I added:
To |
I used a mac to develop on and impeller is enabled by default there on iOS. Impeller back then had a lot of issues so almost every gfx-related issue pointed to Impeller 😁 So your testing shows that Android with stable 3.10.x impeller disabled = failed and enabled = ok? |
It is quite slow and jerky with the impeller enabled, and it seems that it is very volatile as my other project crashed a lot, when I enabled the impeller (to test it). |
I have tested stable 3.10.5 on a Android emulator with same results as @k0psutin. iOS emulator: Downgraded to Flutter 3.7.12; Android emu (performance good), impeller is not possible to enable here. I find it hard to find the reason for why this happens, maybe a test could be written for the canvasroutine to test?
After looking at the canvas code I wanted to test to start drawing from outer to inner on negative numbers to. //Loop through all costs
for (int stack = 0; stack < 4; stack++) {
double startPoint = item.barRods.last.rodStackItems.isEmpty ? 0 : item.barRods.last.rodStackItems.last.toY;
double add = i / 3;
if(add>0)
{
item.barRods.last.rodStackItems.add(BarChartRodStackItem(startPoint,
startPoint + add, stack.isEven ? Colors.cyan : Colors.red));
}
else //writing from outer point against zero
{
item.barRods.last.rodStackItems.add(BarChartRodStackItem(add * (4-stack),
add * (3-stack), stack.isOdd ? Colors.cyan : Colors.red));
}
} It would be best if fl_chart handled it though... |
I found the bug 🎉 |
I have same issue in version ^0.63.0 and flutter 3.10.x |
Fixed in Check it out in 0.64.0 |
Describe the bug
When using stacked bars the negative values are not shown correct on flutter v3.11.xx (master channel).
Same code compiled with Flutter v3.7.12 works as expected.
I have also created an issue within Flutter, but I just wanted you to have a heads up
flutter/flutter#123123 (comment)
To Reproduce
See this reproduction code: https://github.com/large/partlyflicker
(Little messy since I used code from a bigger app that had issues)
Screenshots
Flutter 3.10.5 stable & Flutter 3.11.xx-pre
Flutter 3.7.12
Versions
Flutter 3.7.12 (as expected)
Flutter 3.10.5 stable & masterchannel 3.11.xx-pre channel (not as expected)
fl_chart v0.62.0
The text was updated successfully, but these errors were encountered: