This question is locked. New answers and comments are not allowed.
Hello!
Having some problems with a gauge that has negative values. My range is from -70 to 70.
Is it possible to set the bar to start from 0 or the middle of the gauge?
With the code below the bar goes from -70 or left side of the gauge to the value that is set.
/ Jonas
Having some problems with a gauge that has negative values. My range is from -70 to 70.
Is it possible to set the bar to start from 0 or the middle of the gauge?
With the code below the bar goes from -70 or left side of the gauge to the value that is set.
/ Jonas
<
gauges:RadialGaugeRange
x:Name
=
"range3"
MaxValue
=
"70"
MinValue
=
"-70"
TickStep
=
"10"
LabelStep
=
"20"
LabelRadiusScale
=
"1.68"
TickRadiusScale
=
"1.39"
CenterMode
=
"BottomCenter"
Margin
=
"28,0,60,0"
>
<
gauges:RadialGaugeRange.TickTemplate
>
<
DataTemplate
>
<
Rectangle
Width
=
"7"
Height
=
"1"
Fill
=
"{Binding Converter={StaticResource valueToBrushConverter}}"
/>
</
DataTemplate
>
</
gauges:RadialGaugeRange.TickTemplate
>
<
gauges:RadialGaugeRange.LabelTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding}"
FontSize
=
"13.0"
Foreground
=
"White"
FontWeight
=
"Bold"
>
</
TextBlock
>
</
DataTemplate
>
</
gauges:RadialGaugeRange.LabelTemplate
>
<
gauges:SegmentedRadialGaugeIndicator
gauges:RadialGaugeRange.MaxAngle
=
"180"
Value
=
"70"
gauges:RadialGaugeRange.IndicatorRadiusScale
=
"1.33"
>
<
gauges:BarIndicatorSegment
Thickness
=
"2"
Stroke
=
"Gray"
Length
=
"3"
/>
<
gauges:BarIndicatorSegment
Thickness
=
"2"
Stroke
=
"#FF333333"
Length
=
"7"
/>
<
gauges:BarIndicatorSegment
Thickness
=
"2"
Stroke
=
"Gray"
Length
=
"3"
/>
</
gauges:SegmentedRadialGaugeIndicator
>
<
gauges:RadialBarGaugeIndicator
gauges:RadialGaugeRange.MaxAngle
=
"180"
Value
=
"70"
BarThickness
=
"12"
BarBrush
=
"{StaticResource PhoneChromeBrush}"
gauges:RadialGaugeRange.IndicatorRadiusScale
=
"1.12"
/>
<
gauges:RadialBarGaugeIndicator
x:Name
=
"indicatorTimingAdvance"
gauges:RadialGaugeRange.MaxAngle
=
"180"
Value
=
"-33"
BarThickness
=
"12"
BarBrush
=
"{StaticResource PhoneForegroundBrush}"
gauges:RadialGaugeRange.IndicatorRadiusScale
=
"1.12"
IsAnimated
=
"True"
StartValue
=
"0"
/>
<
gauges:MarkerGaugeIndicator
Value
=
"105"
gauges:RadialGaugeRange.MaxAngle
=
"180"
gauges:RadialGaugeRange.IndicatorRadiusScale
=
"1.12"
MarkerTemplate
=
"{StaticResource starTemplate}"
>
</
gauges:MarkerGaugeIndicator
>
</
gauges:RadialGaugeRange
>