麻雀工具包

时间:2014-08-05 10:04:31

标签: c# windows-phone-8 sparrow-framework

<sparrow:SparrowChart Height="400" Width="400">                
<sparrow:SparrowChart.XAxis>
    <sparrow:LinearXAxis/>
</sparrow:SparrowChart.XAxis>
<sparrow:SparrowChart.YAxis>
    <sparrow:LinearYAxis/>
</sparrow:SparrowChart.YAxis>
<sparrow:AreaSeries Fill="Red" Stroke="White">
    <sparrow:AreaSeries.Points>
        <sparrow:DoublePoint Data="0" Value="1"/>
        <sparrow:DoublePoint Data="1" Value="2"/>
        <sparrow:DoublePoint Data="2" Value="1"/>
        <sparrow:DoublePoint Data="3" Value="4"/>
        <sparrow:DoublePoint Data="4" Value="0"/>
    </sparrow:AreaSeries.Points>
</sparrow:AreaSeries>

enter image description here

如何从x轴和y轴擦除0.8,1.6 ...的平行线?

1 个答案:

答案 0 :(得分:1)

呵呵,这是我从Sparrow Chart

获得的代码和图片

要擦除填充中的垂直线,只需将笔触设置为与填充相同的颜色即可。要摆脱网格线,您需要设置一些样式。

<Application.Resources>
    <Style TargetType="Line" x:Key="crossLineStyle">
        <Setter Property="Stroke" Value="#00000000"/>
        <Setter Property="StrokeThickness" Value="1"/>
    </Style>
    <Style TargetType="Line" x:Key="axisLineStyle">
        <Setter Property="Stroke" Value="#00000000"/>
        <Setter Property="StrokeThickness" Value="0"/>
    </Style>
    <Style TargetType="Line" x:Key="minorcrossLineStyle">
        <Setter Property="Stroke" Value="#00000000"/>
        <Setter Property="StrokeThickness" Value="0.25"/>
    </Style>
</Application.Resources>



<sparrow:SparrowChart Height="400" Width="400">
    <sparrow:SparrowChart.XAxis>

        <sparrow:LinearXAxis CrossLineStyle="{StaticResource crossLineStyle}" MinorLineStyle="{StaticResource minorcrossLineStyle}" MajorLineStyle="{StaticResource crossLineStyle}" AxisLineStyle="{StaticResource axisLineStyle}"/>
    </sparrow:SparrowChart.XAxis>
    <sparrow:SparrowChart.YAxis>
        <sparrow:LinearYAxis CrossLineStyle="{StaticResource crossLineStyle}" MinorLineStyle="{StaticResource minorcrossLineStyle}" MajorLineStyle="{StaticResource crossLineStyle}" AxisLineStyle="{StaticResource axisLineStyle}"/>
    </sparrow:SparrowChart.YAxis>
    <sparrow:AreaSeries Fill="Red" Stroke="Red">
        <sparrow:AreaSeries.Points>
            <sparrow:DoublePoint Data="0" Value="1"/>
            <sparrow:DoublePoint Data="1" Value="2"/>
            <sparrow:DoublePoint Data="2" Value="1"/>
            <sparrow:DoublePoint Data="3" Value="4"/>
            <sparrow:DoublePoint Data="4" Value="0"/>
        </sparrow:AreaSeries.Points>
    </sparrow:AreaSeries>
</sparrow:SparrowChart>

enter image description here