DevExpress控件使用交流,DevExpress中国社区 售前咨询
当前位置: 首页 > 开发资源 » 使用教程 » DevExpress DXCharts应用教程三:创建2D气泡图

DevExpress DXCharts应用教程三:创建2D气泡图

作者:mayz   来源:本站原创   浏览:Loading...次   发布时间:2013-01-11   评论:0条

如何用 DevExpress DXCharts 创建2D气泡图?将 ChartControl.Diagram 属性放到XYDiagram2D下,然后添加两个 BubbleSeries2D 对象到图像的 Diagram.Series集合。这个示例同时显示了如何添加图例(显示序列名称)到图表,示例如下:


<Window x:Class="Bubble2DChart.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:BubbleSeries2D DisplayName="First Series" Transparency="0.25" MinSize="0.4" MaxSize="0.7">
                            <dxc:BubbleSeries2D.Points>
                                <dxc:SeriesPoint Argument="A" Value="1" dxc:BubbleSeries2D.Weight="0.3" />
                                <dxc:SeriesPoint Argument="B" Value="3" dxc:BubbleSeries2D.Weight="0.2" />
                                <dxc:SeriesPoint Argument="C" Value="7" dxc:BubbleSeries2D.Weight="0.8" />
                                <dxc:SeriesPoint Argument="D" Value="4" dxc:BubbleSeries2D.Weight="0.95" />
                            </dxc:BubbleSeries2D.Points>
                        </dxc:BubbleSeries2D>
                        <dxc:BubbleSeries2D DisplayName="Second Series" Transparency="0.25" MinSize="0.4" MaxSize="0.7">
                            <dxc:BubbleSeries2D.Points>
                                <dxc:SeriesPoint Argument="A" Value="2" dxc:BubbleSeries2D.Weight="0.6" />
                                <dxc:SeriesPoint Argument="B" Value="2" dxc:BubbleSeries2D.Weight="0.4" />
                                <dxc:SeriesPoint Argument="C" Value="5" dxc:BubbleSeries2D.Weight="0.2" />
                                <dxc:SeriesPoint Argument="D" Value="2" dxc:BubbleSeries2D.Weight="0.2" />
                            </dxc:BubbleSeries2D.Points>
                        </dxc:BubbleSeries2D>
                    </dxc:XYDiagram2D.Series>
                </dxc:XYDiagram2D>
            </dxc:ChartControl.Diagram>
            <dxc:ChartControl.Legend>
                <dxc:Legend />
            </dxc:ChartControl.Legend>
        </dxc:ChartControl>
    </Grid>
</Window>
效果图:


气泡图,DevExpress DXCharts,2D气泡图

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

评论列表

暂无评论

请谈谈你的看法 请使用IE或者Firefox浏览器,暂不支持Chrome!

昵称 不填则默认为游客评论

DevExpress DXperience DXv2 v12

DevExpress DXperience 下载 download

DevExpress购买、价格、授权

慧都控件网为DevExpress界面控件的中国地区唯一正式授权经销商,正版控件销售公司,授权代理商,经销商及合作伙伴。

电话:400-700-1020
        023-66090381

邮箱:sales@evget.com

>>如何选择正规控件购买渠道