新手求助LineSeries折线的圆点怎么去掉
由于数据比较密集,LineSeries的圆点很大程度上影响了折线图的展示,请问可不可以设置式样把圆点去除。
[解决办法]
可以哈。参考以下代码
<UserControl.Resources> <Style x:Key="MyLineDataPointStyle" TargetType="toolkit:LineDataPoint"> <Setter Property="Background" Value="Orange"/> <Setter Property="BorderBrush" Value="Gray"/> <Setter Property="BorderThickness" Value="1"/> <Setter Property="IsTabStop" Value="False"/> <Setter Property="Width" Value="8"/> <Setter Property="Height" Value="8"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="toolkit:LineDataPoint"/> </Setter.Value> </Setter> </Style> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <toolkit:Chart HorizontalAlignment="Left" Margin="30,30,0,0" Name="mychart" Title="Chart Title" VerticalAlignment="Top" Height="300" Width="500"> <toolkit:Chart.Series> <toolkit:LineSeries x:Name="myLineChart" Loaded="lineChart_Loaded" IndependentValueBinding="{Binding Key}" DependentValueBinding="{Binding Value}" DataPointStyle="{StaticResource MyLineDataPointStyle}"> </toolkit:LineSeries> </toolkit:Chart.Series> </toolkit:Chart> </Grid>