在WPF RadChart中禁用点标记和项标签

时间:2011-06-15 13:26:35

标签: c# wpf telerik radchart

如何在WPF RadChart中关闭点标记和项标签?

2 个答案:

答案 0 :(得分:4)

喜欢这个;

<telerik:SeriesMapping.SeriesDefinition>
    <telerik:LineSeriesDefinition ShowItemLabels="False" ShowPointMarks="False"/>
</telerik:SeriesMapping.SeriesDefinition>

答案 1 :(得分:1)

您也可以将SeriesDefinition.ShowItemLabels属性设置为false,查看以下代码:

var smartSeriesMapping = new SeriesMapping
{
    LegendLabel = "smartSeries",
    SeriesDefinition = new LineSeriesDefinition()
};
smartSeriesMapping.ItemMappings.Add(new ItemMapping("Time", DataPointMember.XCategory));
smartSeriesMapping.ItemMappings.Add(new ItemMapping("SmartVal", DataPointMember.YValue));
smartSeriesMapping.SeriesDefinition.ShowItemLabels = false; //This line make lables go away :D

SmsRadChart.SeriesMappings.Add(smartSeriesMapping);