Disable wpftoolkit chart datapoint

Does anyone know how to disable datapoints for noraml LineSeries in a WPFToolkit diagram? I find them very annoying and not useful for my purposes, but I cannot find a simple property or something similar in the class itself.

+6
c # charts wpf wpftoolkit
source share
1 answer

Do you want to hide them?

You can set an empty ControlTemplate to the Template property. Here is an 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> 

Although the dots are invisible, you can set other properties, such as Background , and change the appearance of the chart.

enter image description here

+13
source share

All Articles