I am trying to display a line chart by providing x and y value pairs that get displayed by a cartesian chart. Is this possoble with LiveCharts? I can't find an example for this online.
I know, that you can provide the labels for the x axis, but my values on the x axis are not linear, therefore they should have different spacing.
This is my Xaml so far:
<liveCharts:CartesianChart Grid.Column="0"
Margin="5 0 5 0"
Series="{Binding TemperatureSeries}">
<liveCharts:CartesianChart.AxisX>
<liveCharts:Axis Title="Zeit"
FontSize="15"
FontWeight="Bold"
Labels="{Binding Labels}" />
</liveCharts:CartesianChart.AxisX>
<liveCharts:CartesianChart.AxisY>
<liveCharts:Axis Title="Temperature (°C)"
FontSize="15"
FontWeight="Bold"
LabelFormatter="{Binding DoubleToStingConverter}" />
</liveCharts:CartesianChart.AxisY>
</liveCharts:CartesianChart>
This is how the TemperatureSeries Property looks like.
this.TemperatureSeries =
new SeriesCollection
{
new LineSeries
{
Values = new ChartValues<double>(),
Stroke = redStroke,
Fill = redFill
}
};