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
close icon

SfCircularGauge not rendering in iOS

Hi,

I am new to Syncfusion and trying to get a little familiar with you great controls using XAML. I installed Syncfusing using NuGet and working with Xamarin Studio.

Code of my ContentPage looks like this:

<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
        xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
        xmlns:local="clr-namespace:SyncfusionTest"
        x:Class="SyncfusionTest.SyncfusionTestPage"
        xmlns:gauge="clr-namespace:Syncfusion.SfGauge.XForms;assembly=Syncfusion.SfGauge.XForms">
    <Grid Padding="20">
        <Grid.RowDefinitions>
            <RowDefinition Height="200"/>
            <RowDefinition Height="400"/>
        </Grid.RowDefinitions>
        <Label Grid.Row="0" Text="Welcome to Xamarin Forms!" VerticalOptions="Center" HorizontalOptions="Center" />
        <gauge:SfCircularGauge Grid.Row="1"
                BackgroundColor="Gray">
        <gauge:SfCircularGauge.Scales>
            <gauge:Scale
                StartValue   ="0"
                EndValue     ="100"
                Interval     ="20" >
                 <gauge:Scale.MajorTickSettings>
                 <gauge:TickSettings Length="22" Color="Red">
                 </gauge:TickSettings>
                 </gauge:Scale.MajorTickSettings>
                 <gauge:Scale.MinorTickSettings>
                 <gauge:TickSettings  Length="12" Color="Green">
                 </gauge:TickSettings>
                 </gauge:Scale.MinorTickSettings>
                    <gauge:Scale.Pointers>
                    <gauge:NeedlePointer Value="60" />
                    </gauge:Scale.Pointers>
            </gauge:Scale>
        </gauge:SfCircularGauge.Scales>
    <gauge:SfCircularGauge.Headers>
      <gauge:Header Text="Speedometer" Position="0.3,0.6" ForegroundColor="Maroon"  />
    </gauge:SfCircularGauge.Headers>
    </gauge:SfCircularGauge> 
    </Grid>

</ContentPage>


Unfortunately after running page I only see gray grid row with no scale, header, pointer etc. (I changed background color to see if control is there)

I'll be glad for any help :)

Regards,
Greg


4 Replies

GB Grzegorz B September 13, 2016 11:56 AM UTC

Ok, I figured it out...

Of course the new renderer in AppDelegate was missing.




SP Subburaj Pandian Veluchamy Syncfusion Team September 14, 2016 11:49 AM UTC

Hi Grzegorzbojarczuk,

Thank you for your interest in Syncfusion products.

We are happy that the mentioned issue got resolved with your end, to know more about CircularGauge you can refer our online user guide documentation by the following link,

UG link: https://help.syncfusion.com/xamarin/circulargauge/getting-started

please let us know if you have any query.

Regards,
Subburaj Pandian V




PE Pekka replied to Grzegorz Bojarczuk March 5, 2018 08:40 PM UTC

Ok, I figured it out...

Of course the new renderer in AppDelegate was missing.



What do you mean by "the new renderer in AppDelegate was missing"? I have the same problem.


SG Sri Gayathri Gopalakrishnan Syncfusion Team March 6, 2018 06:12 AM UTC

 
Query: the new renderer in AppDelegate was missing 
 
For iOS projects, Renderer instance should be created manually to render the controls. So, In AppDelegate file, the following code should be added, 
 
public override bool FinishedLaunching(UIApplication app, NSDictionary options) 
{ 
     ...       
      new Syncfusion.SfGauge.XForms.iOS.SfGaugeRenderer();    
     ...   
} 
 
 
 
Please refer our KB article, 
 
 
Regards, 
Sri Gayathri. G 


Loader.
Live Chat Icon For mobile
Up arrow icon