I'm using LiveCharts to draw a row diagram.
Xaml-Code:
<lvc:CartesianChart Grid.Column="0" Zoom="None" Margin="0,0,0,8" AnimationsSpeed="0" DataTooltip="{x:Null}">
<lvc:CartesianChart.Resources>
<Style TargetType="lvc:Separator">
<Setter Property="Stroke" Value="CadetBlue" />
<Setter Property="StrokeThickness" Value="0.4" />
</Style>
</lvc:CartesianChart.Resources>
<lvc:CartesianChart.Series>
<lvc:RowSeries Name="AlarmTypeSeries" Values="{Binding AlarmTypeHistogramValues}" Configuration="{Binding AlarmTypeHistogramMapper}" />
</lvc:CartesianChart.Series>
<lvc:CartesianChart.AxisX>
<lvc:Axis Name="XAxis" MinValue="0" MaxValue="{Binding MaxXAxisValue}" FontSize="13.3" Title="Alarmanzahl"/>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis Name="YAxis" MinValue="-7" MaxValue="1" ShowLabels="False" />
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>
The resulting graph is on the left in the image below.
What I'd like to achieve is to draw the X-Axis, resulting in something like the graph on the right.
I would assume that the axis would be drawn automatically, but maybe I'm missing something.
Apparently there was a bug in LiveCharts that could explain this behavior, but it was reported in 2016: https://github.com/beto-rodriguez/Live-Charts/issues/142
I already tried to add a Section at the appropriate point of the Y axis (XAML-Code below) and the result looked ok, but the exact point would have to be determined dynamically.
<lvc:Axis.Sections>
<lvc:AxisSection Value="-6.45" StrokeThickness="1" Stroke="CadetBlue"/>
</lvc:Axis.Sections>
So all in all I'm a bit clueless on the best way to do this, and every help is appreciated.