禁用wpftoolkit图表数据点 [英] disable wpftoolkit chart datapoint

查看:194
本文介绍了禁用wpftoolkit图表数据点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有人知道如何关闭数据点的WPFToolkit图表中的noraml供LineSeries?我觉得他们是很烦人的,而不是用我的目的,但我无法找到一个简单的财产或任何类似的类本身。

Does anybody know how to turn off the datapoints for a noraml LineSeries in a WPFToolkit chart? I find them to be very annoying, and not useful to my purposes, but I can't find a simple property or anything like that on the class itself.

推荐答案

您要隐藏呢?

有可能的,如果设置为空控件模板模板属性。
下面是例子:

It is possible if to set the empty ControlTemplate to the Template property. Here is the example:

<Window.Resources>
    <Style x:Key="InvisibleDataPoint" TargetType="{x:Type charting:DataPoint}">
        <Setter Property="Background" Value="Blue"/>
        <Setter Property="Template" Value="{x:Null}"/>
    </Style>
</Window.Resources>
<Grid>
    <charting:Chart>
        <charting:LineSeries ItemsSource="{Binding ChartItems}" IndependentValuePath="XValue" DependentValuePath="YValue" 
                                 DataPointStyle="{StaticResource InvisibleDataPoint}"/>
    </charting:Chart>
</Grid>

和虽然点是不可见的,可以设置其他属性,如背景并更改图表的外观。

And although the points are invisible, you can set other properties, like Background and change the look of chart.

在这里输入的形象描述

这篇关于禁用wpftoolkit图表数据点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆