WPF常用的第三方控制項集,DevExpress 下麵介紹如何生成Chart界面: DevExpress官方下載地址 ...
WPF常用的第三方控制項集,DevExpress
下麵介紹如何生成Chart界面:
<dxc:ChartControl AnimationMode="OnDataChanged" Background="Transparent" BorderThickness="0" BorderBrush="Transparent" SelectionMode="Single" SeriesSelectionMode="Point"> <dxc:XYDiagram2D PaneOrientation="Vertical" EqualBarWidth="True"> <dxc:XYDiagram2D.DefaultPane> <dxc:Pane DomainBrush="Transparent" Foreground="White" /> </dxc:XYDiagram2D.DefaultPane> <dxc:XYDiagram2D.AxisY> <dxc:AxisY2D TickmarksMinorVisible="False" Brush="White" Thickness="2" GridLinesVisible="True" Interlaced="False" TickmarksVisible="False"> <dxc:AxisY2D.CustomLabels> <dxc:CustomAxisLabel Content="0" Value="0"/> <dxc:CustomAxisLabel Content="20" Value="20"/> <dxc:CustomAxisLabel Content="40" Value="40"/> <dxc:CustomAxisLabel Content="60" Value="60"/> <dxc:CustomAxisLabel Content="80" Value="80"/> <dxc:CustomAxisLabel Content="100" Value="100"/> </dxc:AxisY2D.CustomLabels> <dxc:AxisY2D.WholeRange> <dxc:Range MaxValue="100" MinValue="0" AutoSideMargins="False"/> </dxc:AxisY2D.WholeRange> <dxc:AxisY2D.Label> <dxc:AxisLabel Background="Transparent" Foreground="White" /> </dxc:AxisY2D.Label> </dxc:AxisY2D> </dxc:XYDiagram2D.AxisY> <dxc:XYDiagram2D.AxisX> <dxc:AxisX2D Brush="Transparent" TickmarksVisible="True" TickmarksMinorVisible="False" Reverse="False" Logarithmic="False" TickmarksCrossAxis="False"> <dxc:AxisX2D.Label> <dxc:AxisLabel Background="Transparent" Foreground="White" /> </dxc:AxisX2D.Label> </dxc:AxisX2D> </dxc:XYDiagram2D.AxisX> <dxc:BarSideBySideSeries2D DisplayName="BarSeries" LabelsVisibility="True" ColorEach="True" BarWidth="0.3" CrosshairEnabled="False" CrosshairLabelVisibility="False" > <dxc:BarSideBySideSeries2D.Model> <dxc:BorderlessSimpleBar2DModel/> </dxc:BarSideBySideSeries2D.Model> <dxc:BarSideBySideSeries2D.Label> <dxc:SeriesLabel ConnectorVisible="False" Indent="0" dxc:BarSideBySideSeries2D.LabelPosition="Outside"> <dxc:SeriesLabel.ElementTemplate> <DataTemplate> <Label Content="{Binding Text}" Foreground="White" FontSize="17"/> </DataTemplate> </dxc:SeriesLabel.ElementTemplate> </dxc:SeriesLabel> </dxc:BarSideBySideSeries2D.Label> <dxc:SeriesPoint Argument="1" Value="96.4"/> <dxc:SeriesPoint Argument="2" Value="45.5"/> <dxc:SeriesPoint Argument="3" Value="12.5"/> <dxc:SeriesPoint Argument="4" Value="81.5"/> <dxc:SeriesPoint Argument="5" Value="88.5"/> <dxc:SeriesPoint Argument="6" Value="30.5"/> </dxc:BarSideBySideSeries2D> </dxc:XYDiagram2D> <dxc:ChartControl.Legend> <dxc:Legend Background="LightSteelBlue" BorderBrush="Transparent"></dxc:Legend> </dxc:ChartControl.Legend> </dxc:ChartControl>