Short Description
 
 

The Pie Chart is represented by the Pie3DSeriesView object, which belongs to Pie, Doughnut and Funnel Series Views. This view is useful when it's necessary to compare the percentage values of different point arguments in the same series, and to illustrate these values as easy to understand pie slices. In addition, the 3D look makes it possible to rotate a chart to position pie slices in an attractive and easy-to-understand way.

A Pie chart is shown in the image below.

Chart Type Characteristics
 
 

The table below lists the main characteristics of this chart type.

Feature

Value

Series View type Pie3DSeriesView
Diagram type SimpleDiagram3D
Number of arguments per series point 1
Number of values per series point 1
Note

For information on which chart types can be combined with the Pie Chart, refer to the Combining Different Series Views document.

Example
 
 

The following example demonstrates how to create a ChartControl with a series of the Pie3DSeriesView type, set its general properties, and add this chart to a form at runtime. Before proceeding with this example, first create a Windows Forms Application in Visual Studio, and include all necessary assemblies to the References list of your project.

使用ChartControl创建饼图,使用序列集类型为Pie3DSeriesView,设置通用属性,并添加图表到运行时。在运行例子之前,首先新建窗体应用程序,并添加需要的程序集到引用列表。

Then, add the following code to the Form.Load event handler.添加如下代码到Form.Load事件处理中

C#   VB  
using System;
using System.Windows.Forms;
using DevExpress.XtraCharts;
// ... private void Form1_Load(object sender, EventArgs e) {
// Create an empty chart.
ChartControl PieChart3D = new ChartControl(); // Create a pie series.
Series series1 = new Series("Pie Series 1", ViewType.Pie3D); // Populate the series with points.
series1.Points.Add(new SeriesPoint("Russia", 17.0752));
series1.Points.Add(new SeriesPoint("Canada", 9.98467));
series1.Points.Add(new SeriesPoint("USA", 9.63142));
series1.Points.Add(new SeriesPoint("China", 9.59696));
series1.Points.Add(new SeriesPoint("Brazil", 8.511965));
series1.Points.Add(new SeriesPoint("Australia", 7.68685));
series1.Points.Add(new SeriesPoint("India", 3.28759));
series1.Points.Add(new SeriesPoint("Others", 81.2)); // Add the series to the chart.
PieChart3D.Series.Add(series1); // Adjust the value numeric options of the series.
series1.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
series1.PointOptions.ValueNumericOptions.Precision = 0; // Adjust the view-type-specific options of the series.
((Pie3DSeriesView)series1.View).Depth = 30;
((Pie3DSeriesView)series1.View).ExplodedPoints.Add(series1.Points[0]);
((Pie3DSeriesView)series1.View).ExplodedDistancePercentage = 30; // Access the diagram's options.
((SimpleDiagram3D)PieChart3D.Diagram).RotationType = RotationType.UseAngles;
((SimpleDiagram3D)PieChart3D.Diagram).RotationAngleX = -35; // Add a title to the chart and hide the legend.
ChartTitle chartTitle1 = new ChartTitle();
chartTitle1.Text = "3D Pie Chart";
PieChart3D.Titles.Add(chartTitle1);
PieChart3D.Legend.Visible = false; // Add the chart to the form.
PieChart3D.Dock = DockStyle.Fill;
this.Controls.Add(PieChart3D);
}

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The complete sample project is available in the DevExpress Code Central database at http://www.devexpress.com/example=E1028. Depending on the target platform type (ASP.NET, WinForms, etc), you can either run this example online or download an auto-executable sample.

chartControl 饼状图小Demo的更多相关文章

  1. DevExpress使用之ChartControl控件绘制图表(多坐标折线图、柱状图、饼状图)

    最近因为公司项目需要用到WinForm的DecExpress控件,在这里把一些使用方法总结一下. DevExpress中有一个专门用来绘制图表的插件ChartControl,可以绘制折线图.饼状图.柱 ...

  2. FusionChart实现柱状图、饼状图的动态数据显示 附Demo

    最近做的项目中需要用饼状图显示——'问卷调查'的统计结果(之前用过FusionChart做过柱状图的数据展示,那还是两年前的事了),在网上查了下FusionChart实现饼状图显示方面的资料,却发现资 ...

  3. 第三方Charts绘制图表四种形式:饼状图,雷达图,柱状图,直线图

    对于第三方框架Charts(Swift版本,在OC项目中需要添加桥接头文件),首先要解决在项目中集成的问题,集成步骤: 一.下载Charts框架 下载地址:https://github.com/dan ...

  4. 用CAShapeLayer实现一个简单的饼状图(PieView)

    自己写了一个简单的PieView,demo在这里:https://github.com/Phelthas/LXMPieView 效果如图: 参考了https://github.com/kevinzho ...

  5. AngularJS in Action读书笔记5(实战篇)——在directive中引入D3饼状图显示

    前言: "宁肯像种子一样等待  也不愿像疲惫的陀螺  旋转得那样勉强" 这是前几天在查资料无意间看到的一位园友的签名,看完后又读了两遍,觉得很有味道.后来一寻根究底才知这是出资大诗 ...

  6. 【 D3.js 进阶系列 — 6.2 】 饼状图的拖拽

    本文讲解稍微复杂一些的拖拽应用,即拖拽饼图的各部分. 在[入门 - 第 9.1 章]讲解了如何制作饼状图.饼状图的各部分是用具有宽度的弧线来表示的.在与用户进行交互的时候,如果每一部分都能拖拽,是很有 ...

  7. Yii 2.0: yii2-highcharts-widget创建饼状图

    安装 The preferred way to install this extension is through composer. 项目根目录下执行: php composer.phar requ ...

  8. ExtJS 饼状图报表

    简单的ExtJS饼状图报表. 先上源码,咱再慢慢解析: Ext.onReady(function(){ var store = Ext.create('Ext.data.JsonStore', { f ...

  9. iOS 饼状图

    首先先看一下效果: 一.创建饼状图对象   创建饼状图对象用到类是PieChartView.h, 代码如下: self.pieChartView = [[PieChartView alloc] ini ...

随机推荐

  1. linux守护进程解读

    Linux系统守护进程详解   不要关闭下面这几个服务: acpid, haldaemon, messagebus, klogd, network, syslogd   1. NetworkManag ...

  2. CGFW时装发布及活动整体一览表

    CGFW时装发布及活动整体一览表 CGFW时装发布及活动整体一览表

  3. MediaInfo使用简介(新版本支持HEVC)

    MediaInfo 用来分析视频和音频文件的编码和内容信息,是一款是自由软件 (免费使用.免费获得源代码).他除了提供DLL之外,本身也提供GUI工具用于查看视频信息.我使用中发现,新版本的Media ...

  4. make的命令行选项

    make的命令行选项 -b -m 忽略,提供其它版本make兼容性. -B --always-make 强制重建所有规则的目标,不根据规则的依赖描述决定是否重建目标文件. -C DIR --direc ...

  5. Error:/bin/bash: /bin/java: No such file or directory

    描述:在Hadoop运行Job的时候,可能会报这样的一个错误“/bin/bash: /bin/java: No such file or directory”,那是因可能有些地方用到了/bin/jav ...

  6. png图片的loading旋转

    img{ animation:rotate 1s linear infinite; -webkit-animation:rotate 1s linear infinite; } @keyframes ...

  7. 字符编码介绍及java中的应用

    字符编码,就是对日常的控制符号.文字和常用符号的二进制表示.为了准确的表示如何编号,怎么生产八位字节流,Unicode Technical Report (UTR) #17提出现代编码模型的5个层次: ...

  8. 【枚举+小技巧】【TOJ4115】【Find the number】

    题目大意 找到一个最小的奇数 约数个数为n 结果mod10^9+7 根据 约数个数=(p1+1)*(p2+1)............ 将n 枚举分解成连乘式.(枚举个数,dfs) 比较大小 log ...

  9. 阻止JS事件冒泡传递(cancelBubble 、stopPropagation)

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx. ...

  10. android经典Demo(转载)

    一篇不错的资源博文,转载分享给大家:   1.Android团队提供的示例项目  如果不是从学习Android SDK中提供的那些样例代码开始,可能没有更好的方法来掌握在Android这个框架上开发. ...