效果图一、

    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. Java实现链表的常见操作算法

    链表分为单链表,双向链表和循环链表,是一种链式存储结构,由一个个结点链式构成,结点包含数据域和指针域,其中单链表是只有一个指向后驱结点的指针,双向链表除头结点和尾结点外,每个结点都有一个前驱指针和一个 ...

  2. Android NDK学习(二):编译脚本语法Android.mk和Application.mk

    一.Android.mk Android.mk分为一下几部分: LOCAL_PATH:= $(call my-dir), 返回当前文件在系统中的路径,Android.mk文件开始时必须定义该变量. i ...

  3. ADB驱动

    Windows 7 64位下使用ADB驱动 什么是ADB? adb的全称为Android Debug Bridge,就是起到调试桥的作用.通过adb我们可以在Eclipse中方面通过DDMS来调试An ...

  4. Numpy学习二:数组的索引与切片

    1.一维数组索引与切片#创建一维数组arr1d = np.arange(10)print(arr1d) 结果:[0 1 2 3 4 5 6 7 8 9] #数组的索引从0开始,通过索引获取第三个元素a ...

  5. npm link 命令解析

    文字转的 对开发者而言,这算是最有价值的命令.假设我们开发了一个模块叫 test ,然后我们在 test-example 里引用这个模块 ,每次 test 模块的变动我们都需要反映到 test-exa ...

  6. 10 Tensorflow模型保存与读取

    我们的模型训练出来想给别人用,或者是我今天训练不完,明天想接着训练,怎么办?这就需要模型的保存与读取.看代码: import tensorflow as tf import numpy as np i ...

  7. linux 命令 — find

    find 基本形式 find base_path base_path可以是任何目录,find会从该目录开始往下寻找 find . -print 列出当前目录下所有的文件和目录,以'\n'作为分隔符 f ...

  8. python练习六—简单的论坛

    进行简单的web应用之后,接下来就应该学习python连接数据库,这个练习就是在上个练习的基础上将信息保存到数据库,这个联系也没有什么特别的,有之前java web的经验的话,很好理解,主要还是一个M ...

  9. 【原创】驱动加载之CreateService

    SC_HANDLE WINAPI CreateService( _In_ SC_HANDLE hSCManager, _In_ LPCTSTR lpServiceName, _In_opt_ LPCT ...

  10. Golang中的自动伸缩和自防御设计

    Raygun服务由许多活动组件构成,每个组件用于特定的任务.其中一个模块是用Golang编写的,负责对iOS崩溃报告进行处理.简而言之,它接受本机iOS崩溃报告,查找相关的dSYM文件,并生成开发者可 ...