gauge:SfCircularGauge x:Name="CircularGauge" > <gauge:SfCircularGauge.Scales> <gauge:Scale NumberOfDecimalDigits="0" StartValue="0" EndValue="{Binding AccountTarget}" Interval="{Binding IntervalGauge}" StartAngle="180" ShowRim="False" SweepAngle="180" MinorTicksPerInterval="{Binding MinorTicksPerIntervalGauge}" LabelFont="Bold" LabelFontSize="12" ShowLabels="True"> <gauge:Scale.LabelOffset> <OnPlatform x:TypeArguments="x:Double"> <On Platform="iOS" Value="0.9"></On> <On Platform="Android" Value="0.9"></On> </OnPlatform> </gauge:Scale.LabelOffset> <gauge:Scale.Ranges> <gauge:Range StartValue="0" EndValue="90" Thickness="10" Color="#FFFF0000" Offset="0.8" /> <gauge:Range StartValue="90" EndValue="180" Thickness="10" Color="#FFDAA520" Offset="0.8" /> <gauge:Range StartValue="180" EndValue="{Binding AccountTarget}" Thickness="10" Color="Purple" Offset="0.8" /> </gauge:Scale.Ranges> <gauge:Scale.Pointers> <gauge:NeedlePointer Type="Triangle" Value="{Binding CurrentTarget}" Color="Red" Thickness="2.5" LengthFactor="0.7" KnobRadius="10" KnobColor="#2bbfb8" /> <gauge:NeedlePointer Value="{Binding Number}" Color="Black" Thickness="4" LengthFactor="0.7" KnobRadius="5" KnobColor="White" /> </gauge:Scale.Pointers> <gauge:Scale.MajorTickSettings> <gauge:TickSettings Length="8" Color ="DarkGray" Thickness="2" Offset="0.8" /> </gauge:Scale.MajorTickSettings> <gauge:Scale.MinorTickSettings> <gauge:TickSettings Length="4" Color ="Gray" Thickness="1.5" Offset="0.78"/> </gauge:Scale.MinorTickSettings> </gauge:Scale> </gauge:SfCircularGauge.Scales> </gauge:SfCircularGauge>
Any help would be appreciated.
Thanks
Stef
Hi Ashwin,
So I looked at your example and i found it probably the way i am loading the data into my view model.
I am using Asynchronous calls to load the model like below :
private async void LoadDataTask() { var dataServices = new DataServices(); IntervalGauge = ""; MinorTicksPerIntervalGauge = ""; try { var snmPredictionAccountCount = await dataServices.GetSnmPredictionAccounts(); AccountTarget = snmPredictionAccountCount.target; CurrentTarget = snmPredictionAccountCount.CurrentAccountTarget; Number = snmPredictionAccountCount.number; IntervalGauge = RoundUp((Convert.ToInt32(AccountTarget) / 10)).ToString(); MinorTicksPerIntervalGauge = (Convert.ToInt32(IntervalGauge) / 10).ToString(); } catch (Exception e) { var s = e.Message; } }
Is there way you suggest to load a gauge using Asynchronous calls ? to make it more consistent with your components, as it works fine on Android.
Thanks
Stefan
Hi Ashwin,
I have changed your sample app you uploaded before, to try to mimic my issue( So its a bit of a hack).
So andriod looks nice but ios looks wrong.
Thanks
Stefan