<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>
如何从x轴和y轴上删除0.8,1.6 ...的平行线?
最佳答案
呵呵,这是我从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>
关于c# - 麻雀工具包,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/25136093/