ChartControl ViewType.Pie3D 用法测试
效果图一、

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 用法测试的更多相关文章
- chartControl ViewType.Bar 用法测试
使用方法 一. Datatable : chartControl1.Series.Clear(); DataTable dt = new DataTable(); dt.Columns.Add(&qu ...
- php set_time_limit()用法测试详解
在php中set_time_limit函数是用来限制页面执行时间的,如我想把一个php页面的执行时间定义为5秒就可以set_time_limit(5)了. 一个php脚本通过crontab每5分钟 ...
- DevExpress ChartControl ViewType.Line
源码地址:https://files.cnblogs.com/files/lanyubaicl/ChartControl.Line.7z public partial class Form1 : Fo ...
- 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(); ...
- telnet用法 测试端口号
Telnet是进行远程登录的标准协议和主要方式它为用户提供了在本地计算机上完成远程主机工作的能力.可以用telnet命令来测试端口号是否正常打开还是关闭状态. 工具/原料 电脑 cmd命令 方法/步骤 ...
- python 用法测试
Python 3.5.6 1.js风格的回调测试 def b(): ') def a(fn): if callable(fn): fn() a(b) class Sample: def q(self) ...
- chartControl 饼状图小Demo
Short Description The Pie Chart is represented by the Pie3DSeriesView object, which belongs to P ...
- 关于jQuery.when()用法
1.该方法在jQuery1.5开始被引入. 2.用法测试 a. var url1 = "/resource/ar/hometab/index_tab_games.json", ur ...
- Java 枚举(enum) 详解7种常见的用法
Java 枚举(enum) 详解7种常见的用法 来源 https://blog.csdn.net/qq_27093465/article/details/52180865 JDK1.5引入了新的类型— ...
随机推荐
- 网络编程懒人入门(九):通俗讲解,有了IP地址,为何还要用MAC地址?
1.前言 标题虽然是为了解释有了 IP 地址,为什么还要用 MAC 地址,但是本文的重点在于理解为什么要有 IP 这样的东西.本文对读者的定位是知道 MAC 地址是什么,IP 地址是什么. (本文同步 ...
- Git使用详细教程(7):.gitignore使用详解
Git提供了一个.gitignore文件,帮助我们忽略掉一些不想或者不能提交到版本控制器中的文件.这个文件的使用时必须要掌握的. *.a # 忽略所有目录下的.a结尾的文件 !lib.a # 但lib ...
- Kali学习笔记27:Burpsuite(上)
文章的格式也许不是很好看,也没有什么合理的顺序 完全是想到什么写一些什么,但各个方面都涵盖到了 能耐下心看的朋友欢迎一起学习,大牛和杠精们请绕道 如果我只能选择一款工具进行Web渗透,那么一定就是Bu ...
- 机器学习入门06 - 训练集和测试集 (Training and Test Sets)
原文链接:https://developers.google.com/machine-learning/crash-course/training-and-test-sets 测试集是用于评估根据训练 ...
- Tools - 电子书
搜索电子书 电子书搜索:https://www.jiumodiary.com/ InfoQ-迷你书 InfoQ-迷你书:http://www.infoq.com/cn/minibooks/ 免费电子书 ...
- 【app】Hybrid?Native?不知道你就out了!
Hybrid?是个啥? 相信大家在平常生活中也会经常见到这个词,比如现在比较火的hybrid汽车(混合动力汽车) 那如果是针对于App而言呢? 那就要从App的分类说起了 目前主流应用程序大体分为三类 ...
- RabbitMQ集群简介
一个RabbitMQ消息代理是一个由一个或多个Erlang节点组成的逻辑组,其中的每个节点都共享users, virtual hosts, queues, exchanges, bindings, a ...
- Velocity CheckingForNull
Q: I want to check for null, something like this: #if ($car.fuel == null) A: There are several appro ...
- Salesforce Sales Cloud 零基础学习(四) Chatter
Chatter是一个Salesforce实时协作应用程序,它允许你的用户一起工作.互相交谈和共享信息,不管用户角色或位置如何,连接.并激励用户在整个组织内高效工作. Chatter 让用户们在 Opp ...
- Python快速学习02:基本数据类型 & 序列
前言 系列文章:[传送门] 也就每点一点点的开始咯,“还有两年时间,两年可以学很多东西的” Python ['paɪθən] n. 巨蛇,大蟒 基本数据类型 变量不需要声明 a=10 # int 整 ...