- Home
- Forum
- Xamarin.Forms
- System.ArgumentNullException: Value cannot be null. Parameter name: value CircularGauge iOS only
System.ArgumentNullException: Value cannot be null. Parameter name: value CircularGauge iOS only
I am getting an error when running my program on iOS with a gauge, but it works fine on Android. I have tried everything. I cleaned and rebuild the project, I reinstalled the dlls for the project and still get the error.
The gauge that is causing the error is here.
<gauge:SfCircularGauge x:Name="powGauge"
GaugeType="Default"
IsVisible="{Binding IsLoaded}">
<gauge:SfCircularGauge.Scales>
<gauge:Scale StartValue="0"
EndValue="1"
RimColor="Black"
StartAngle="180"
SweepAngle="360"
MinorTicksPerInterval="0"
LabelColor="Transparent">
<gauge:Scale.MajorTickSettings>
<gauge:TickSettings Color="Transparent"/>
</gauge:Scale.MajorTickSettings>
<gauge:Scale.MinorTickSettings>
<gauge:TickSettings Color="Transparent"/>
</gauge:Scale.MinorTickSettings>
<gauge:Scale.Ranges>
<gauge:Range Thickness="75"
Color="Silver"
StartValue="0"
EndValue="1"
Offset="0.05"/>
</gauge:Scale.Ranges>
</gauge:Scale>
<gauge:Scale StartValue="0"
EndValue="{Binding MaxPower}"
RimColor="Black"
StartAngle="157.5"
SweepAngle="225"
MinorTicksPerInterval="1"
LabelColor="Black"
Interval="{Binding PowerScaleInterval}"
LabelOffset="0.3">
<gauge:Scale.MajorTickSettings>
<gauge:TickSettings Length="6"
Thickness="2"
Offset="0.05"
Color="Black"/>
</gauge:Scale.MajorTickSettings>
<gauge:Scale.MinorTickSettings>
<gauge:TickSettings Length="3"
Thickness="2"
Offset="0.05"
Color="Black"/>
</gauge:Scale.MinorTickSettings>
<gauge:Scale.Ranges>
<gauge:Range Thickness="50"
Color="Gray"
StartValue="0"
EndValue="{Binding MaxPower}"
Offset="0.05"/>
<gauge:Range Color="Green"
StartValue="0"
EndValue="{Binding PowerNow}"
Thickness="50"
Offset="0.15"/>
</gauge:Scale.Ranges>
<gauge:Scale.Pointers>
<gauge:NeedlePointer Color="White"
Thickness="1.5"
LengthFactor="0.85"
Type="Bar"
KnobRadius="5"
KnobColor="White"
Value="{Binding PowerNow}"/>
</gauge:Scale.Pointers>
</gauge:Scale>
</gauge:SfCircularGauge.Scales>
<gauge:SfCircularGauge.Headers>
<gauge:Header Text="AC Power"
ForegroundColor="Black"/>
<gauge:Header Text="{Binding PowerNowString}"
ForegroundColor="Black"
Position="0.5, 0.8"/>
</gauge:SfCircularGauge.Headers>
</gauge:SfCircularGauge>
I get a slightly different error if I remove the last header in the gauge. I get this error:
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSRangeException Reason: *** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array
Any help would be great!
SIGN IN To post a reply.
1 Reply
SP
Subburaj Pandian Veluchamy
Syncfusion Team
January 24, 2017 01:24 PM UTC
Hi Seymen,
We have created a support incident under your account to track the status of this query, please log on to our support website to check for further updates.
Subburaj Pandian V.
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
SE Seymen Ertas
- Jan 23, 2017 11:32 PM UTC
- Jan 24, 2017 01:24 PM UTC