-
Notifications
You must be signed in to change notification settings - Fork 601
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
MAUI basic sample only display when navigated using Shell for both Android and iOS. Normal navigation does not render #481
Comments
Hi! Thanks for the report, did you try https://lvcharts.com/docs/Maui/2.0.0-beta.220/Overview.Installation This will be moved before the Create a View Model section to clarify |
Yes, its in there. Unfortunately. |
Hi My sincere apologies! I forgot to add [.UseSkiaSharp(true)] in the repro project. It now works with the chart defined in XAML. However (as it started for me), I prefer defining my GUIs using code-behind, and the code I created to embed a graph does not render.
Any idea what I'm doing wrong? Thanks and regards |
Glad to hear that, so the control is working! I think that you second question is not related with the library, try to add another control first, like a button or something from MAUI, then see if it renders, if it does but the chart does not then the issue is from this library. Something that helps me is to set a background color to the grid, then you can see if the grid has a valid size, some times depending on the container it does not renders as we think it would, |
I've now noticed that if I navigate to the code-behind page using [Shell], it renders.
Any ideas maybe? |
Not completely sure. Being honest, I think that that kind of issues have a low chance to be an issue in this library, it could be an issue with SkiaSharp or MAUI. but feel free to re-open this issue if you think that this issue is related with this library. |
Thanks for looking at this. |
Issue raised at MAUI: dotnet/maui#7350 |
I've now discovered the chart does not display while running under the debugger. If running outside the debugger, all works fine. Any possibility there is a [if (Debugger.IsAttached)... somewhere inside your code? |
Thanks for the Research, it seems that the error is here in LiveCharts, I tested your repo and added a view containing a
Not as far as I remember... need to find what is wrong here |
Hope you find it. Its a great library! |
This seems a Maui issue, I added information to the issue you opened in Maui, lets wait for them to fix that, if they do not, then we could build a workaround. |
Great, Thanks |
Since beta.860 we removed the support for the XAML preview in MAUI, so this should be already working. Thanks for the report. |
Describe the bug
Initially:
MAUI basic sample crashes for both Android and iOS with[LiveChartsCore.SkiaSharpView.Maui.MotionCanvas is incompatible].
Sample app is a simple CartesianChart based on MAUI install example
Finally: Realized it has to do with [Shell] or normal navigation (see later discussion).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Line chart should display
Screenshots
![image](https://user-images.githubusercontent.com/7484186/169195876-33019a15-f573-4ca5-89c1-4f1e9ce638cb.png)
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: