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. GIS 相关知识扫盲

    1.什么是GIS GIS:地理信息系统,它是一种特定的十分重要的空间信息系统.它是在计算机硬.软件系统支持下,对整个或部分地球表层(包括大气层)空间中的有关地理分布数据进行采集.储存.管理.运算.分析 ...

  2. Stackoverflow上人气最旺的10个Java问题(转ImportNew)

    本文转自:http://www.importnew.com/16841.html 写的确实太好了 1.为什么两个(1927年)时间相减得到一个奇怪的结果? 如果执行下面的程序,程序解析两个间隔1秒的日 ...

  3. 修改Chrome的User Agent的方法 真实有效

    如何修改Chrome的User Agent: 通过网络上查找,修改Chrome的Usre Agent有3种方式,但有的方式是不起作用的. 给Chrome添加启动参数(有作用) 通过扩展-User-Ag ...

  4. 查看oracle锁及解决办法

    SQL> select t2.username,t2.sid,t2.serial#,t2.logon_time from v$locked_object t1, v$session t2 whe ...

  5. Oracle视图基础

    --表的另一种形式,看起来很像表 --用view可以实现复杂的query====select --创建一个视图 --当经常使用这个查询时封装成view /*create or replace 表示在创 ...

  6. apple程序生命周期

    iphone程序的生命周期分析 做iphone开发首先第一件就是得知道iphone程序的生命周期,说白点就是当点击程序图标启动程序开始到退出程序整个使用运行过程中底下的代码都发生了什么,只有理解了这个 ...

  7. codevs1304 拓扑序计数

    题目描述                     Description 求一颗有根树/树形图的拓扑序个数. 输入描述                 Input Description        ...

  8. html css float left与 float right的使用说明

    点评: CSS中很多时候会用到浮动来布局,也就是经常见到的float:left或者float:right,简单点来说,前者是左浮动(往左侧向前边的非浮动元素飘,全是飘得元素的话,就按照流式来浮动从左到 ...

  9. golang Rsa

    package models import ( "crypto/rand" "crypto/rsa" "crypto/x509" " ...

  10. ZRender源码分析3:Painter(View层)-上

    回顾 上一篇说到:ZRender源码分析2:Storage(Model层),这次咱看来看看Painter-View层 总体理解 Painter这个类主要负责MVC中的V(View)层,负责将Stora ...