有人知道如何在WPFToolkit图表中关闭noraml LineSeries的数据点吗?我发现它们非常烦人,对我的目的没有用处,但我在类本身上找不到简单的属性或任何类似的东西。
发布于 2011-03-19 02:11:11
你想把它们藏起来?
可以将空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>
尽管这些点是不可见的,但您可以设置其他属性,如Background
和更改图表的外观。
https://stackoverflow.com/questions/5355425
复制相似问题