-
-
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
Doesn't work on web #95
Comments
Hi dude, great to see it on the web, |
Yes, I get that the web isn't a priority. I was just letting you know how it works on the web. The data for the charts is the exact same. It paints the lines correctly on the top graph but on the bottom graph the lines go crazy |
Got it, |
There is a bug in the Path.from function in the web engine - it effectively creates a pointer to the path instead of a deep copy. Fix is to change the 2 occurrences of Path.from to 'shift' in line_chart_painter.dart (I'm sure there are other/better fixes, this happens to be the one that works for me).
|
andymillernz`s method is worked |
Did you test in the new flutter veraion? |
my flutter version is Flutter 1.10.16 • channel master |
May I ask you to check it in 0.12? |
I've created a bug report with the flutter team re: the issue with Path.from... |
Well done, |
@imaNNeoFighT my proposed workaround for web is very simple: Not sure how to test packages locally in my application, any advice on how to do that? :) |
It work in flutter
|
For best results (at this point in time) you need to run in release mode with SKIA enabled.. I assume (hope?) that this will become the default at some point..
|
For me only Pie chart doesn't show up on web.Same code/data that runs fine on mobile doesn't show anything on web. My app has also line chart, bar chart, stacked- bar chart which all work fine on Web. |
me to0.......... did u fix it? |
I think it has been fixed (at least I see it is fixed in beta channel) |
Line chart still not working in web, I tried switch Path.from with shift and didn't work, version 0.9.4 |
Okay tnx |
There are still some limitations in the 'painting/blend/path' functions for the web flutter implementation. In this case the issue relates to using a dash line.. And it looks reasonably correct if you comment out the dashArray in line_chart_sample8.dart
If you want the pie chart to work you need to patch lib/src/pie_chart/pie_chart_painter.dart and remove or change the blendMode in sectionsSpaceClearPaint - this does impact the pie chart functionality. however at least gets things to work..
|
it worked without dash array, great thanks! |
I think it doesn't exist anymore. |
@imaNNeoFighT checked and was not able to reproduce it. We can close it I think. |
Congrats! :)) |
For deploying web package what should i use? |
What do you mean? This package supports web. |
It does not render correctly on the web. I know the web is only in technical preview so I didn't expect it to work but it would be nice if it did.
Render on mobile (good)
Render on web (bad)
The text was updated successfully, but these errors were encountered: