Reputation: 1121
I have gone through the tutorials and examples in LiveChart's documentation (for WPF) but could not find any clue on how to add chart titles and subtitles. The ones available are axis title like the code below:
How can I add a title and subtitle to the WPF LiveChart (preferably in XAML)?
Axis Title:
<lvc:CartesianChart.AxisX>
<lvc:Axis Title="X-Axis Title"> </lvc:Axis>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis Title="Y-Axis Title" ></lvc:Axis>
</lvc:CartesianChart.AxisY>
Chart Title: ???
<lvc:CartesianChart LegendLocation="Right" >
</lvc:CartesianChart>
Upvotes: 2
Views: 3980
Reputation: 605
I am not sure how about WPF, but in livecharts MAUI there is a Title property:
<Page xmlns:chart="clr-namespace:LiveChartsCore.SkiaSharpView.Maui;assembly=LiveChartsCore.SkiaSharpView.Maui"
xmlns:chartv="clr-namespace:LiveChartsCore.SkiaSharpView.VisualElements;assembly=LiveChartsCore.SkiaSharpView">
<chart:CartesianChart>
<chart:CartesianChart.Title>
<chartv:LabelVisual Text="title 1" />
</chart:CartesianChart.Title>
</chart:CartesianChart>
</Page>
Upvotes: 0
Reputation: 91
There is no such property. You can use labels to achieve the same thing by placing them inside of a StackPanel with your chart.
Upvotes: 3