简体   繁体   中英

How to Add Chart Title in WPF LiveCharts

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>

There is no such property. You can use labels to achieve the same thing by placing them inside of a StackPanel with your chart.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM