1.chart图显示点和数值:
<dxc:LineSeries2D AxisY="{Binding ElementName=axisy1}" DisplayName="Ratio" ArgumentDataMember="UserName" ValueDataMember="DefectRatio" CrosshairLabelPattern="{}{S}: {V:0.00%}" LabelsVisibility="False" MarkerVisible="True"> <dxc:LineSeries2D.LineStyle> <dxc:LineStyle Thickness="3"/> </dxc:LineSeries2D.LineStyle> </dxc:LineSeries2D>
LabelsVisibility :是否显示数值
MarkerVisible:是否显示点
2.设置Y轴不从0开始显示:
<dxc:XYDiagram2D.AxisY> <dxc:AxisY2D> <dxc:AxisY2D.Label> <dxc:AxisLabel TextPattern="{}{V:p}"/> </dxc:AxisY2D.Label> <dxc:AxisY2D.WholeRange> <dxc:Range dxc:AxisY2D.AlwaysShowZeroLevel="False"/> </dxc:AxisY2D.WholeRange> </dxc:AxisY2D> </dxc:XYDiagram2D.AxisY>
3.设置Line:
<dxc:LineSeries2D DisplayName="Dwell Yield Target" AxisY="{Binding ElementName=axisy0}" ArgumentDataMember="X" ValueDataMember="Y5" Brush="#9D3D3A" MarkerVisible="False" LabelsVisibility="True" CrosshairLabelPattern="{}{S}: {V:0.00%}"> <dxc:LineSeries2D.MarkerModel> <dxc:SquareMarker2DModel/> </dxc:LineSeries2D.MarkerModel> <dxc:LineSeries2D.Label> <dxc:SeriesLabel TextPattern="{}{V:0.0%}" ConnectorVisible="False" ResolveOverlappingMode="HideOverlapped"> <dxc:SeriesLabel.ElementTemplate> <DataTemplate> <Border> <Label Content="{Binding Path=Text}" Foreground="Black" FontSize="10"/> </Border> </DataTemplate> </dxc:SeriesLabel.ElementTemplate> </dxc:SeriesLabel> </dxc:LineSeries2D.Label> <dxc:LineSeries2D.LineStyle> <dxc:LineStyle Thickness="2"> <dxc:LineStyle.DashStyle> <DashStyle Dashes="3" Offset="0"> </DashStyle> </dxc:LineStyle.DashStyle> </dxc:LineStyle> </dxc:LineSeries2D.LineStyle> </dxc:LineSeries2D>
Thickness:设置Line的宽度
Dashes:点与线之前的长度