i try to change point size in wpf toolkit
<charting:Chart Name="Charts" Margin="87,48,0,0" Grid.Column="1">
<charting:LineSeries Name="ChartOne" DependentValuePath="Y" IndependentValuePath="X" Title="График функции" AnimationSequence="FirstToLast"/>
<charting:Chart.Axes>
<charting:LinearAxis Orientation="Y" Title="Y" ShowGridLines="True" Minimum="0"/>
<charting:LinearAxis Orientation="X" Title="X" ShowGridLines="True" Minimum="0"/>
</charting:Chart.Axes>
<charting:LineSeries.DataPointStyle>
<Style TargetType="chartingToolkit:LineDataPoint">
<Setter Property="Width" Value="20"/>
<Setter Property="Height" Value="20"/>
</Style>
</charting:LineSeries.DataPointStyle>
</charting:Chart>
but i have an error "The attachable property 'DataPointStyle' was not found in type 'LineSeries'" what am I doing wrong ?
This code works for me
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:charting="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
Title="MainWindow" Height="350" Width="525">
<Grid>
<charting:Chart Name="Charts" Margin="87,48,0,0" Grid.Column="1">
<charting:Chart.Axes>
<charting:LinearAxis Orientation="Y" Title="Y" ShowGridLines="True" Minimum="0"/>
<charting:LinearAxis Orientation="X" Title="X" ShowGridLines="True" Minimum="0"/>
</charting:Chart.Axes>
<charting:LineSeries Name="ChartOne" DependentValuePath="Y" IndependentValuePath="X"
Title="График функции" AnimationSequence="FirstToLast">
<charting:LineSeries.DataPointStyle>
<Style TargetType="{x:Type charting:LineDataPoint}">
<Setter Property="Width" Value="20"/>
<Setter Property="Height" Value="20"/>
</Style>
</charting:LineSeries.DataPointStyle>
</charting:LineSeries>
</charting:Chart>
</Grid>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With