效果图一、

    public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
} private void Form3_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)); DataTable dt = new DataTable();
dt.Columns.Add("X轴", Type.GetType("System.String"));
dt.Columns.Add("线①", Type.GetType("System.Int32"));
dt.Columns.Add("线②", Type.GetType("System.Int32"));
dt.Columns.Add("线③", Type.GetType("System.Int32"));
dt.Columns.Add("线④", Type.GetType("System.Int32")); for (int i = ; i < ; i++)
{
Random rd = new Random();
DataRow dr = dt.NewRow();
dr["X轴"] = ("类别" + i.ToString());
dr["线①"] = rd.Next(i * , (i + ) * ); ;
dr["线②"] = rd.Next(i * , (i + ) * );
dr["线③"] = rd.Next(i * , (i + ) * );
dr["线④"] = rd.Next(i * , (i + ) * );
dt.Rows.Add(dr);
}
series1.DataSource = dt;
series1.ArgumentDataMember = "X轴"; //设置公共的X轴值(刻度)
series1.ValueScaleType = ScaleType.Numerical;
//设置 单个Series2 Y轴的(值)
series1.ValueDataMembers.AddRange(new string[] { "线①" }); // Add the series to the chart.
PieChart3D.Series.Add(series1);
//series1.LegendPointOptions.PointView = PointView.ArgumentAndValues;//格式:【类别:百分比】
series1.LegendPointOptions.PointView = PointView.Argument;//格式:【类别】
//series1.LegendPointOptions.PointView = PointView.Values;//格式:【百分比】
//series1.LegendPointOptions.PointView = PointView.SeriesName;//显示series1的Name
//series1.LegendPointOptions.PointView = PointView.Undefined;//显示效果:【百分比】
// Adjust the value numeric options of the series.
//series1.Label.TextPattern = "{VP:P0}"; PieChart3D.Legend.Visible = true; //设置 右边 标注框是否显示
PieChart3D.Legend.TextVisible = true; //设置标注框是否显示 每项目的数值 // Adjust the view-type-specific options of the series.
((Pie3DSeriesView)series1.View).Depth = ;//设置饼的厚度
((Pie3DSeriesView)series1.View).ExplodedPoints.Add(series1.Points[]); //选中一个需要突出的项目
((Pie3DSeriesView)series1.View).ExplodedDistancePercentage = ;//将其中一个项目(SeriesPoint)推出来的距离 // Access the diagram's options.
((SimpleDiagram3D)PieChart3D.Diagram).RotationType = RotationType.UseAngles;
((SimpleDiagram3D)PieChart3D.Diagram).RotationAngleX = -;//设置平面的倾斜度 // 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.Visibility = DevExpress.Utils.DefaultBoolean.False; // Add the chart to the form.
PieChart3D.Dock = DockStyle.Fill;
this.Controls.Add(PieChart3D); }
}

效果图二、

    public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
} private void Form3_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)); //DataTable dt = new DataTable();
//dt.Columns.Add("X轴", Type.GetType("System.String"));
//dt.Columns.Add("线①", Type.GetType("System.Int32"));
//dt.Columns.Add("线②", Type.GetType("System.Int32"));
//dt.Columns.Add("线③", Type.GetType("System.Int32"));
//dt.Columns.Add("线④", Type.GetType("System.Int32")); //for (int i = 0; i < 10; i++)
//{
// Random rd = new Random();
// DataRow dr = dt.NewRow();
// dr["X轴"] = ("类别" + i.ToString());
// dr["线①"] = rd.Next(i * 10, (i + 1) * 10); ;
// dr["线②"] = rd.Next(i * 10, (i + 1) * 10);
// dr["线③"] = rd.Next(i * 10, (i + 1) * 10);
// dr["线④"] = rd.Next(i * 10, (i + 1) * 10);
// dt.Rows.Add(dr);
//}
//series1.DataSource = dt;
//series1.ArgumentDataMember = "X轴"; //设置公共的X轴值(刻度)
//series1.ValueScaleType = ScaleType.Numerical;
////设置 单个Series2 Y轴的(值)
//series1.ValueDataMembers.AddRange(new string[] { "线①" }); // Add the series to the chart.
PieChart3D.Series.Add(series1);
series1.LegendPointOptions.PointView = PointView.ArgumentAndValues;//格式:【类别:百分比】
//series1.LegendPointOptions.PointView = PointView.Argument;//格式:【类别】
//series1.LegendPointOptions.PointView = PointView.Values;//格式:【百分比】
//series1.LegendPointOptions.PointView = PointView.SeriesName;//显示series1的Name
//series1.LegendPointOptions.PointView = PointView.Undefined;//显示效果:【百分比】
// Adjust the value numeric options of the series.
//series1.Label.TextPattern = "{VP:P0}"; PieChart3D.Legend.Visible = true; //设置 右边 标注框是否显示
PieChart3D.Legend.TextVisible = true; //设置标注框是否显示 每项目的数值 // Adjust the view-type-specific options of the series.
((Pie3DSeriesView)series1.View).Depth = ;//设置饼的厚度
((Pie3DSeriesView)series1.View).ExplodedPoints.Add(series1.Points[]); //选中一个需要突出的项目
((Pie3DSeriesView)series1.View).ExplodedDistancePercentage = ;//将其中一个项目(SeriesPoint)推出来的距离 // Access the diagram's options.
((SimpleDiagram3D)PieChart3D.Diagram).RotationType = RotationType.UseAngles;
((SimpleDiagram3D)PieChart3D.Diagram).RotationAngleX = -;//设置平面的倾斜度 // Add a title to the chart and hide the legend.
ChartTitle chartTitle1 = new ChartTitle();
chartTitle1.Text = "3D Pie 测试效果图2";//设置标题
PieChart3D.Titles.Add(chartTitle1);//添加标题
//PieChart3D.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False; // Add the chart to the form.
PieChart3D.Dock = DockStyle.Fill;
this.Controls.Add(PieChart3D); }
}

ChartControl ViewType.Pie3D 用法测试的更多相关文章

  1. chartControl ViewType.Bar 用法测试

    使用方法 一. Datatable : chartControl1.Series.Clear(); DataTable dt = new DataTable(); dt.Columns.Add(&qu ...

  2. php set_time_limit()用法测试详解

    在php中set_time_limit函数是用来限制页面执行时间的,如我想把一个php页面的执行时间定义为5秒就可以set_time_limit(5)了.   一个php脚本通过crontab每5分钟 ...

  3. DevExpress ChartControl ViewType.Line

    源码地址:https://files.cnblogs.com/files/lanyubaicl/ChartControl.Line.7z public partial class Form1 : Fo ...

  4. DevExpress中ChartControl柱状图(Bar)用法

    我的数据 代码如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 chartControl1.Series.Clear(); ...

  5. telnet用法 测试端口号

    Telnet是进行远程登录的标准协议和主要方式它为用户提供了在本地计算机上完成远程主机工作的能力.可以用telnet命令来测试端口号是否正常打开还是关闭状态. 工具/原料 电脑 cmd命令 方法/步骤 ...

  6. python 用法测试

    Python 3.5.6 1.js风格的回调测试 def b(): ') def a(fn): if callable(fn): fn() a(b) class Sample: def q(self) ...

  7. chartControl 饼状图小Demo

    Short Description     The Pie Chart is represented by the Pie3DSeriesView object, which belongs to P ...

  8. 关于jQuery.when()用法

    1.该方法在jQuery1.5开始被引入. 2.用法测试 a. var url1 = "/resource/ar/hometab/index_tab_games.json", ur ...

  9. Java 枚举(enum) 详解7种常见的用法

    Java 枚举(enum) 详解7种常见的用法 来源 https://blog.csdn.net/qq_27093465/article/details/52180865 JDK1.5引入了新的类型— ...

随机推荐

  1. IntelliJ IDEA 常用快捷键使用说明

    Ctrl + / 可以实现单行注释的快速添加和取消.xml和html注释也能操作. Ctrl + Y 删除选中的代码,或者光标所在行,同时删除代码所占的空间. Ctrl + Alt + V 快速抽取变 ...

  2. [部署]CentOS安装PHP环境

    环境 虚拟机:VMWare10.0.1 build-1379776 操作系统:CentOS7 64位 HTTP Server:Apache(httpd) 步骤 PHP环境需要HTTP服务器支持,本文使 ...

  3. LSTMs和递归神经网络的初学者指南

    本文是读A Beginner's Guide to LSTMs and Recurrent Neural Networks的个人摘要. 递归网络 Recurrent nets 递归网络是一种人工神经网 ...

  4. odoo开发笔记 -- many2one搜索更多增加默认过滤条件

    没加过滤条件的时候,效果如下,点击下拉框,搜索更多出现所有模型下的模板: 改进方法(增加默认过滤条件,显示指定模型下的内容): class IrCloudReport(models.Model): _ ...

  5. 缓存日志截取字段上传FTP

    #!/bin/bash awk '{print $3,$4,$5,$6,$9,$11,$12,$14,$15,$18}' /usr/local/tcacheserver/var/log/traffic ...

  6. IntelliJ IDEA中用Git插件操作

  7. mysql 开发进阶篇系列 16 MySQL Server(myisam key_buffer)

    一.概述 mysql 提供了很多参数来进行服务器的设置,当服务第一次启动的时候,所有启动参数值都是系统默认的.这些参数在很多生产环境下并不能满足实际的应用需求.在这个系列中涉及到了liunx 服务器, ...

  8. sql server 性能调优之 资源等待 CXPACKET

    一.概述  CXPACKET是指:线程正在等待彼此完成并行处理.什么意思呢? 当sql server发现一条指令复杂时,会决定用多个线程并行来执行,由于某些并行线程已完成工作,在等待其它并行线程来同步 ...

  9. 【原】git常用命令笔记

    平时要用一些命令老是去网上找还挺麻烦的,所以总结起来,还是写在了github上,博客园啥时候也支持一个markdown啊!! https://xianyulaodi.github.io/2017/03 ...

  10. C#系列之聊聊.Net Core的InMemoryCache

    作者:暴王 个人博客:http://www.boydwang.com/2017/12/net-core-in-memory-cache/ 这两天在看.net core的in memory cache, ...