本文介绍了WPF工具箱图表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以更改LineSeries的厚度?
是否可能将LineSeries显示为虚线?
我有关于AreaSeries的问题,无论我的所有区域系列是从x轴绘制。我想要的是,我可以画出一个面积为这四点(2,2),(2,6),(8,6),(8,2)。
我如何管理它?
Is it possible to change the thickness of the LineSeries?Is it possible to show LineSeries as dashed lines?I have othe question about AreaSeries, no matter what all my Area Series are drawing from x-Axis. What I want is that I can draw let say a area for these four point (2,2), (2,6), (8,6), (8,2).How can I manage it?
推荐答案
要设置LineSeries的粗细和虚线样式,如下所示:
For setting the thickness and dashed line style of a LineSeries, use a Style like the one shown here:
<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>
这篇关于WPF工具箱图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!