Reputation: 121
I am using a gauge chart from the livecharts package. My problem is that the value text does not seem to be centred. The user has the option on what currency to display the value in so when they change the preference the text alignment moves. I have included screenshots. Does anyone know why the text alignment is changing
XAML
<lvc:Gauge x:Name="TotalExpenseGauge" Grid.Row="2" Grid.Column="0" From="0" To="{Binding gaugeTo}" Value="{Binding gaugeValue}" Height="100" Width="180" GaugeBackground="#c1c2c2" FontSize="10" HorizontalContentAlignment="Center" VerticalAlignment="Top" HighFontSize="16" LabelFormatter="{Binding FormatterGauge}">
<lvc:Gauge.GaugeActiveFill>
<LinearGradientBrush>
<GradientStop Offset="0.0" Color="#FC5C7D" />
<GradientStop Offset="1.0" Color="#6A82FB" />
</LinearGradientBrush>
</lvc:Gauge.GaugeActiveFill>
</lvc:Gauge>
Screenshots:
Upvotes: 0
Views: 477
Reputation: 121
I finally fixed this issue. I think it is due to a bug with livecharts gauges.
It seemed to be when I changed the value of my 'To' it would centre the text again. So I made sure to reset the 'To' back to 0 and then back to my original value which seemed to force a refresh on the control and fix the alignment
Upvotes: 1