A.R*_*.R. 6 c# wpf charts wpftoolkit
有人知道如何在WPFToolkit图表中关闭noraml LineSeries的数据点吗?我发现它们非常烦人,对我的目的没用,但是我找不到一个简单的属性或类似的东西本身.
vor*_*olf 14
你想隐藏它们吗?
可以将空值ControlTemplate
设置为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>
Run Code Online (Sandbox Code Playgroud)
虽然这些点是不可见的,但您可以设置其他属性,例如Background
并更改图表的外观.