WPF toolkit charting Lineseries styling

房东的猫 提交于 2019-12-13 02:59:35

问题


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?


回答1:


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>


来源:https://stackoverflow.com/questions/7792694/wpf-toolkit-charting-lineseries-styling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!