【问题标题】:How to Add Chart Title in WPF LiveCharts如何在 WPF LiveCharts 中添加图表标题
【发布时间】:2020-03-16 23:37:27
【问题描述】:

我浏览了 LiveChart 文档(针对 WPF)中的 tutorials and examples,但找不到任何关于如何添加图表标题和副标题的线索。可用的是轴标题,如下面的代码:

如何向 WPF LiveChart(最好在 XAML 中)添加标题和副标题?

轴标题:

 <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>

图表标题:???

<lvc:CartesianChart LegendLocation="Right" >
</lvc:CartesianChart>

【问题讨论】:

  • 我会使用两个标签以及堆栈面板中的图表
  • 我想到了@SirRufo,但我不想走那条路。我希望 LiveCharts 中有一个我必须设置的属性。

标签: c# wpf xaml livecharts


【解决方案1】:

没有这样的属性。您可以通过将标签与图表一起放置在 StackPanel 中来使用标签来实现相同的目的。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-12-18
    • 1970-01-01
    • 2021-01-08
    • 1970-01-01
    • 1970-01-01
    • 2015-02-05
    • 2013-03-07
    相关资源
    最近更新 更多