是否可以更改 LineSeries 的粗细?是否可以将 LineSeries 显示为虚线?我有其他关于 AreaSeries 的问题,无论我的所有区域系列都是从 x 轴绘制的。我想要的是我可以为这四个点(2,2),(2,6),(8,6),(8,2)绘制一个区域。我该如何管理?
要设置 LineSeries 的粗细和虚线样式,请使用如下所示的样式:
<Window.Resources>
<Style x:Key="DashedPolyLine" TargetType="{x:Type Polyline}">
<Setter Property="Stroke" Value="Red" />
<Setter Property="Width" Value="3" />
<Setter Property="StrokeDashArray" Value="4, 2" />
</Style>
</Window.Resources>
.
.
.
<charting:LineSeries
ItemsSource="{Binding MyItems}"
IndependentValuePath="myIndValue"
DependentValuePath="myDepValue"
PolylineStyle="{StaticResource DashedPolyLine}"
</charting:LineSeries>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
5184 次 |
最近记录: |