C# 3D Charting
来源:互联网 发布:勇者盟约图腾升星数据 编辑:程序博客网 时间:2024/04/29 14:38
文章标题:C# 3D Charting
原 作 者:Vincent DUVERNET (No
原 出 处:CodeProject
发 布 者:loose_went
发布类型:翻译
发布日期:2005-10-18
今日浏览:7
总 浏 览:1056
下载代码:
介绍
首先我要感谢CodeProject提供这么好的例子,还特别感谢代码的作者提供用户定制面板。
背景
如果你知道EBP products,你也许会记得它主界面上那很酷的3D等距图表。现在就让我们来实现它。所有代码均在Microsoft FxCop 1.32下验证过。
写这篇文章有点吃力,不象用法语写那么容易,英文不太好,呵呵。
使用代码
代码最能说明问题,让我们来看一下:
// Object declaration
Nolme.WinForms.Chart m_chartSample1;
// Create object
this.m_chartSample1 = new Nolme.WinForms.Chart(this.components);
this.m_chartSample1.BackColor = System.Drawing.Color.Silver;
this.m_chartSample1.BottomMargin = 20;
this.m_chartSample1.ColumnFont = new System.Drawing.Font("Arial", 8F,
System.Drawing.FontStyle.Italic);
this.m_chartSample1.ColumnTitleFont = new System.Drawing.Font("Arial",
10F, System.Drawing.FontStyle.Underline);
this.m_chartSample1.Curvature = 15;
this.m_chartSample1.DeltaDepth = 10;
this.m_chartSample1.DisplayHiddenSides = true;
this.m_chartSample1.DisplayTextOnColumns = true;
this.m_chartSample1.GradientMode =
System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal;
this.m_chartSample1.LeftMargin = 50;
this.m_chartSample1.LegendFont = new System.Drawing.Font("Arial",
11F, System.Drawing.FontStyle.Bold);
this.m_chartSample1.Location = new System.Drawing.Point(8, 8);
this.m_chartSample1.MainTitle = "Main title";
this.m_chartSample1.MainTitleFont = new System.Drawing.Font("Arial", 16F,
((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold |
System.Drawing.FontStyle.Underline))));
this.m_chartSample1.MarginBetweenColumn = 20;
this.m_chartSample1.Name = "m_chartSample1";
this.m_chartSample1.RightMargin = 20;
this.m_chartSample1.Size = new System.Drawing.Size(456, 304);
this.m_chartSample1.TabIndex = 4;
this.m_chartSample1.TopMargin = 20;
this.m_chartSample1.VerticalAxisMaxValue = 10000;
this.m_chartSample1.VerticalAxisStep = 1000;
增加一列的代码:
ChartColumn column1 = m_chartSample1.AddColumn (1500, 210, 0, 500);
在一个新列中,每一个数字代表一个次值,如果你有很多个值,你可以通过一个数组来传递。
你可以象这样来设置列的标题:
column1.Title = "January";
其它象页边距、主标题等属性也可以更改。
关于图表中的图例,有两种选择,第一,我们可以把图例整合到当前的面板中,第二,再建一个独立的对象。主要的意图是当在同一个页面使用多个图表时,能够提供一个集中在一起的图例。
总而言之,一个Chart
(从 CustomPanel
继承而来
)包含一个或多个CharColumn
。一个ChartLegend
由
CharLegendItem
组成。在
CharColumn
中有跟次值同样多的
CharLegendItem
。
有趣的地方
我已经使代码尽量简单,以便每个人都能读懂并升级它。
- C# 3D Charting
- 牛X 3D报表 ASP.NET Charting Control(图表控制) Scott写
- c# 3d
- C# 3D
- C# 3D到2D投射
- 流型Charting
- 第五章 CHARTING组件
- Best JS Charting Libs
- unity 3D登录界面C#脚本
- c# 3D图形处理库
- 3D贝塞尔曲线C#实现
- Unity 3d C#脚本(1)
- Unity 3D Coroutine&yield(C#脚本)
- 构建基础的C#3D工程
- ComponentArt Charting 2008.1 for .NET
- New ASP.NET Charting Control:
- ComponentArt.Charting.WebChart 控件Demo
- Javascript图表库: Dojo Charting
- 将 ASP.NET 2.0 应用程序服务配置为使用 SQL Server 2000 或 SQL Server 2005
- "以商业功能为驱动、以服务为导向"的企业信息门户(许龄艺)
- ERP国标制定工作启动
- 程序员生涯之我见 找到自己的兴趣所在[转载]
- 转:P2P之UDP穿透NAT的原理与实现 - 增强篇(附修改过的源代码)
- C# 3D Charting
- 转:P2P之UDP穿透NAT的原理与实现(附源代码)
- 小论“关于HTML文件?传递参数=参数值”的“奇路”应用
- 有关水晶报表的使用经验和资料总结
- 人生有几次危机?
- windows2000服务安全与建议
- 为javascript的Array添加个has(value),remove(value),removeAt(index)方法
- IME输入法
- 自动转移到下一个焦点