DevExpress方案式技术服务正式上线!

DevExpress控件使用交流,DevExpress中国社区Dev联系电话 联系电话:023-68661681

DevExpress DXCharts应用教程七:创建2D点图

来源:本站原创   发布时间:2013-02-18   浏览:3159次

本文演示如何用 DevExpress WPF控件的 DXCharts 创建2D点图。首先将 ChartControl.Diagram 属性部署到XYDiagram2D下,然后添加两个 PointSeries2D 对象到图像的 Diagram.Series集合。具体示例如下:

<Window x:Class="Point2DChart.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts" Title="Window1" Height="350" Width="620">
    <Grid>
        <dxc:ChartControl Name="chartControl1">
            <dxc:ChartControl.Diagram>
                <dxc:XYDiagram2D>
                    <dxc:XYDiagram2D.Series>
                        <dxc:PointSeries2D ColorEach="True" MarkerSize="20">
                            <dxc:PointSeries2D.Points>
                                <dxc:SeriesPoint Argument="A" Value="1" />
                                <dxc:SeriesPoint Argument="B" Value="3" />
                                <dxc:SeriesPoint Argument="C" Value="7" />
                                <dxc:SeriesPoint Argument="D" Value="4" />
                                <dxc:SeriesPoint Argument="E" Value="5" />
                                <dxc:SeriesPoint Argument="F" Value="3" />
                                <dxc:SeriesPoint Argument="G" Value="9" />
                                <dxc:SeriesPoint Argument="H" Value="11" />
                            </dxc:PointSeries2D.Points>
                            <!--region #PointOptions-->
                            <dxc:PointSeries2D.PointOptions>
                                <dxc:PointOptions PointView="ArgumentAndValues" />
                            </dxc:PointSeries2D.PointOptions>
                            <!--endregion #PointOptions-->
                            <!--region #MarkerModel-->
                            <dxc:PointSeries2D.MarkerModel>
                                <dxc:DollarMarker2DModel />
                            </dxc:PointSeries2D.MarkerModel>
                            <!--endregion #MarkerModel-->
                            <!--region #Label-->
                            <dxc:PointSeries2D.Label>
                                <dxc:SeriesLabel ConnectorVisible="False" Indent="15" dxc:MarkerSeries2D.Angle="90" />
                            </dxc:PointSeries2D.Label>
                            <!--endregion #Label-->
                        </dxc:PointSeries2D>
                    </dxc:XYDiagram2D.Series>
                </dxc:XYDiagram2D>
            </dxc:ChartControl.Diagram>
        </dxc:ChartControl>
    </Grid>
</Window>
效果如图所示:

点图,Devexpress

本站文章除注明转载外,均为本站原创或翻译
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:DevExpress控件中文网 [https://www.devexpresscn.com/]
本文地址:https://www.devexpresscn.com/post/468.html

联系我们
  • 重庆总部 023-68661681 400-700-1020
购买
  • sales@evget.com
合作
  • business@evget.com


在线
客服
在线
QQ
电话
咨询
023-68661681
返回
顶部