有谁知道如何关闭 WPFToolkit 图表中 noraml LineSeries 的数据点?我发现它们非常烦人,对我的目的没有用,但我在类本身上找不到简单的属性或类似的东西。
你想隐藏它们吗?
如果设置为空是可以的ControlTemplate
to the Template
财产。
这是示例:
<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>
尽管这些点是不可见的,但您可以设置其他属性,例如Background
并更改图表的外观。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)