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. JIRA项目跟踪管理工具简介与安装

    1.什么是JIRA JIRA是Atlassian公司出品的项目与事务跟踪工具,被广泛应用于缺陷跟踪.客户服务.需求收集.流程审批.任务跟踪.项目跟踪和敏捷管理等工作领域. Atlassian2002年 ...

  2. 蓝桥杯 BASIC 29 高精度加法(大数)

    [思路]:大数处理都一样. [AC代码]:代码细节能够美化一下. #include <iostream> #include <algorithm> #include <c ...

  3. 实用CSS3属性之 :target伪类实现Tab切换效果

    CSS3 :target伪类用来改变页面中锚链接URL所指向的ID样式,例如你要改变描链接指向#tab的元素字体颜色为蓝色,哪么你可以这样写成#tab:target {color:blue} 浏览器支 ...

  4. js 创建类和继承的几种方法

    在面向对象编程中,类(class)是对象(object)的模板,定义了同一组对象(又称"实例")共有的属性和方法.JavaScript语言里是没有类的概念的,但是我们通过以下方法也 ...

  5. 利用DreamweaverCS5制作一个含有动态标题的教程

    DreamweaverCS5怎么制作一个含有动态标题?做一个网页就先要做一个标题,一个好标题会让网页让人印象深刻,有动态的标题会让网页更生动,下面我就介绍一下怎么制作一个含有动态的标题   做一个网页 ...

  6. 阿里大鱼短信接口整合Tp3.2.3开发整理

    阿里大鱼 http://www.alidayu.com/ 的短信接口总体是不错的,别安驹个人认为不管是从性价比还是稳定性上都是跟同类的短信接口好些,毕竟是大公司的东西不会差到哪去.下面把之前开发的短信 ...

  7. zookeeper_02:zookeeper基础

    ZooKeeper基础概述 ZooKeeper维护一个小型的数据节点,这些节点被称为znode,采用类似于文件系统的层级树状结构进行管理. 针对一个znode,没有数据常常表达了重要的信息.比如,在主 ...

  8. Python基础:11.2_函数调用

    我们已经接触过函数(function)的参数(arguments)传递.当时我们根据位置,传递对应的参数.这种参数传递的方式被称为函数参数的位置传递. 我们将接触更多的参数传递方式. 回忆一下位置传递 ...

  9. spring+hibernate

    添加注解时spring是添加在set方法上而hibernate是添加在get方法上 事务应该加在service层上,而不是加在dao层上,如果加在dao层上回滚的时候只能回滚一个dao的实现. 事务处 ...

  10. 解决jquery zclip 插件点击无效的问题

    使用jquery zclip 用于页面复制文本内容. 首先引入js <script type="text/javascript" src="../js/jquery ...