|
发表于 2016-11-22 13:46:40
|
显示全部楼层
同样效果的wpf代码
<dxc:ChartControl>
<dxc:ChartControl.Legend>
<dxc:Legend HorizontalPosition="Center" VerticalPosition="BottomOutside" ReverseItems="False" Orientation="Horizontal" >
</dxc:Legend>
</dxc:ChartControl.Legend>
<dxc:ChartControl.Titles>
<dxc:Title Content="Cartesian Chart" HorizontalAlignment="Center"/>
</dxc:ChartControl.Titles>
<dxc:XYDiagram2D Rotated="False" PaneOrientation="Horizontal">
<dxc:XYDiagram2D.AxisY>
<dxc:AxisY2D>
<dxc:AxisY2D.ConstantLinesInFront>
<dxc:ConstantLine Brush="#CFFF002F" LegendText="最低保障工资">
<dxc:ConstantLine.Title>
<dxc:ConstantLineTitle Content="最低保障工资"/>
</dxc:ConstantLine.Title>
<dxc:ConstantLine.Value>
<System:Object>3500</System:Object>
</dxc:ConstantLine.Value>
</dxc:ConstantLine>
<dxc:ConstantLine Brush="#CF00FF6E" Visible="True" LegendText="平均工资">
<dxc:ConstantLine.Title>
<dxc:ConstantLineTitle Content="平均工资"/>
</dxc:ConstantLine.Title>
<dxc:ConstantLine.Value>
<System:Object>8500</System:Object>
</dxc:ConstantLine.Value>
</dxc:ConstantLine>
</dxc:AxisY2D.ConstantLinesInFront>
</dxc:AxisY2D>
</dxc:XYDiagram2D.AxisY>
<dxc:BarSideBySideSeries2D DisplayName="员工工资" Brush="#FF4F81BD" LabelsVisibility="True">
<dxc:BarSideBySideSeries2D.Label>
<dxc:SeriesLabel dxc:BarSideBySideSeries2D.LabelPosition="Center"/>
</dxc:BarSideBySideSeries2D.Label>
<dxc:SeriesPoint Argument="A" Value="10000"/>
<dxc:SeriesPoint Argument="B" Value="10000"/>
<dxc:SeriesPoint Argument="C" Value="6000"/>
<dxc:SeriesPoint Argument="D" Value="5000"/>
<dxc:SeriesPoint Argument="E" Value="4000"/>
<dxc:SeriesPoint Argument="F" Value="10000"/>
<dxc:SeriesPoint Argument="G" Value="9000"/>
</dxc:BarSideBySideSeries2D>
</dxc:XYDiagram2D>
</dxc:ChartControl> |
|