c# - WPF图表控件更改**系列**图例中的标题

标签 c# xaml mvvm charts

关闭。这个问题需要更多 focused .它目前不接受答案。












想改进这个问题?更新问题,使其仅关注一个问题 editing this post .

5年前关闭。




Improve this question




enter image description here

如何将系列更改为另一个单词?
我需要帮助在一个图表中添加两个属性(例如:一个人的高度和体重)

最佳答案

默认情况下 Name每个 Series 的属性显示,但您也可以在 Legend 中显示其他内容通过设置 LegendText属性(property):

yourSeries.Name = "PersData";
yourSeries.LegendText= "Height & Weight";

请注意 Name属性也可用于索引 Series :
yourChart.Series["PersData"].LegendText =  "Height & Weight";

要显示更多类别,您可以添加更多 Series :
Series S2 = yourChart.Series.Add("anotherSeriesName");    
Series S3 = yourChart.Series.Add("yetAnotherSeriesName");

关于c# - WPF图表控件更改**系列**图例中的标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39015307/

相关文章:

c# - LINQ 和 SQL 注入(inject)

c# - 以编程方式翻转 Metro FlipView

android - 如何在 Android 中实现 ViewModel 工厂

c# - WPF 两个列表框之间的单选

c# - 检索具有 CLSID {00024500-0000-0000-C000-000000000046} 的组件的 COM 类工厂失败 - 80080005

c# - 我可以有可变数量的通用参数吗?

用于用户控件的 C# WPF 可滚动容器

c# - 使用依赖属性设置标签内容

c# - 在 ViewModel SelectedItem 中实现 iNotifypropertychanged 后,在 listview 上不起作用

c# - 独立调试窗口?