disable wpftoolkit chart datapoint
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.
You want to hide them?
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.
精彩评论