WPF DEV控件-ChartControl用法_.NET_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > .NET > WPF DEV控件-ChartControl用法

WPF DEV控件-ChartControl用法

 2016/8/26 5:30:16  WinterFish  程序员俱乐部  我要评论(0)
  • 摘要:WPF常用的第三方控件集,DevExpress下面介绍如何生成Chart界面:<dxc:ChartControlAnimationMode="OnDataChanged"Background="Transparent"BorderThickness="0"BorderBrush="Transparent"SelectionMode="Single"SeriesSelectionMode="Point"><dxc
  • 标签:用法 控件

 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>

 

 

DevExpress官方下载地址 

 

发表评论
用户名: 匿名