We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SfChart won't render in simulator (white screen) but shows in Visual Studio Preview?

Today I'm playing around with my new Community License of SFCharts. I've created a simple chart solution in Xamarin from a tutorial, and by all accounts it works fine. I'm authoring it in Visual Studio 2019 (Mac) although I do a fair bit of work on the PC too.

When I view the project in Preview mode in Visual Studio it appears to render just fine (see screenshot).

When I launch it in Android it appears to render just fine (see screenshot).

But when I launch it in the iOS simulator, I get nothing but a white screen. Not even headlines or anything, just white.

Any thoughts as to where this might be going wrong?

Thanks.

1 Reply

RA Rachel A Syncfusion Team August 6, 2019 05:45 AM UTC

Hi Dan, 
 
Greetings from Syncfusion. 
 
To launch the chart in iOS, call the SfChartRenderer.Init() method in the FinishedLaunching overridden method of the AppDelegate class after the Xamarin.Forms framework initialization and before the LoadApplication method is called as demonstrated in the following code sample. 
 
[C#] 
public override bool FinishedLaunching(UIApplication app, NSDictionary options)  
{  
 
global::Xamarin.Forms.Forms.Init();  
Syncfusion.SfChart.XForms.iOS.Renderers.SfChartRenderer.Init();  
LoadApplication(new App());  
 
} 
 
You can also refer the following documentation link to know about initializing chart. 
 
 
Please let us know if you need any further assistance. 
 
Thanks, 
Rachel. 


Loader.
Up arrow icon