博客
关于我
【TeeChart Pro ActiveX教程】(十六):TeeChart的其他调色板组件
阅读量:676 次
发布时间:2019-03-15

本文共 3482 字,大约阅读时间需要 11 分钟。

使用附加的TeeChart控件

TeeChart for.Net包含几个可以添加到项目中的附加控件,以增强Charting应用程序的运行时功能。

Teechart

选择和插入组件

将.e组件的TeeChart添加到Visual Studio .Net ToolBox时,也会自动添加其他控件。

将组件与TChart相关联

您可以使用Chart属性将Commander和其他非Chart组件与TChart相关联。

[C#]

commander1.Chart = tChart1;

[VB.Net]

Commander1.Chart = TChart1

ButtonColor

ButtonColor显示颜色编辑器,可以与TeeChart对象的Color属性关联,以修改其颜色和透明度。

[C#]

private void Form1_Load(object sender, System.EventArgs e) {         tChart1.Aspect.View3D = false;         line1.FillSampleValues(20);         colorBand1.Axis = tChart1.Axes.Left;         colorBand1.Start = line1.YValues.Maximum * 0.8;         colorBand1.End = line1.YValues.Minimum * 1.2;         buttonPen1.Pen = colorBand1.Pen; } private void buttonColor1_Click(object sender, System.EventArgs e) {         colorBand1.Color = buttonColor1.Color; }

[VB.Net]

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         TChart1.Aspect.View3D = False         Line1.FillSampleValues(20)         ColorBand1.Axis = TChart1.Axes.Left         ColorBand1.Start = Line1.YValues.Maximum * 0.8         ColorBand1.End = Line1.YValues.Minimum * 1.2         ButtonPen1.Pen = ColorBand1.Pen End Sub          Private Sub ButtonColor1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonColor1.Click         ColorBand1.Color = ButtonColor1.Color End Sub

ButtonPen

ButtonPen显示边框编辑器,可以与TeeChart对象的Pen属性关联,以修改其可见性,颜色,结尾,破折号样式,宽度,样式和透明度。

[C#]

private void Form1_Load(object sender, System.EventArgs e) {         tChart1.Aspect.View3D = false;         line1.FillSampleValues(20);         colorBand1.Axis = tChart1.Axes.Left;         colorBand1.Start = line1.YValues.Maximum * 0.8;         colorBand1.End = line1.YValues.Minimum * 1.2;         buttonPen1.Pen = colorBand1.Pen; }  private void buttonColor1_Click(object sender, System.EventArgs e) {         colorBand1.Color = buttonColor1.Color; }

[VB.Net]

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         TChart1.Aspect.View3D = False         Line1.FillSampleValues(20)         ColorBand1.Axis = TChart1.Axes.Left         ColorBand1.Start = Line1.YValues.Maximum * 0.8         ColorBand1.End = Line1.YValues.Minimum * 1.2         ButtonPen1.Pen = ColorBand1.Pen End Sub          Private Sub ButtonColor1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonColor1.Click         ColorBand1.Color = ButtonColor1.Color End Sub

TeeListBox

ChartListBox在运行时显示图表中的Series列表。ChartListBox可用于为用户提供有限的自定义和显示/隐藏图表系列。

Commander

Commander栏允许在运行时向用户提供导航和参数更改控制(通过TeeChart编辑器)。选择导航按钮并按下鼠标左键,拖动图表面板以移动图表。

编辑器

[C#]

private void Form1_Load(object sender, System.EventArgs e) {         editor1.Chart = tChart1;         line1.FillSampleValues(20); }  private void button1_Click(object sender, System.EventArgs e) {         editor1.DefaultTab = Steema.TeeChart.Editors.ChartEditorTabs.Legend;         editor1.Title = "My Application Title";         editor1.ShowModal(); }

[VB.Net]

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         Editor1.Chart = TChart1         Line1.FillSampleValues(20) End Sub          Private Sub ButtonColor1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonColor1.Click         Editor1.DefaultTab = Steema.TeeChart.Editors.ChartEditorTabs.Legend         Editor1.Title = "My Application Title"         Editor1.ShowModal() End Sub

GalleryPanel

GalleryPanel显示可自定义的TeeChart系列图库。

转载地址:http://dbbqz.baihongyu.com/

你可能感兴趣的文章
Mysql 时间操作(当天,昨天,7天,30天,半年,全年,季度)
查看>>
MySQL 是如何加锁的?
查看>>
MySQL 是怎样运行的 - InnoDB数据页结构
查看>>
mysql 更新子表_mysql 在update中实现子查询的方式
查看>>
MySQL 有什么优点?
查看>>
mysql 权限整理记录
查看>>
mysql 权限登录问题:ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
查看>>
MYSQL 查看最大连接数和修改最大连接数
查看>>
MySQL 查看有哪些表
查看>>
mysql 查看锁_阿里/美团/字节面试官必问的Mysql锁机制,你真的明白吗
查看>>
MySql 查询以逗号分隔的字符串的方法(正则)
查看>>
MySQL 查询优化:提速查询效率的13大秘籍(避免使用SELECT 、分页查询的优化、合理使用连接、子查询的优化)(上)
查看>>
mysql 查询,正数降序排序,负数升序排序
查看>>
MySQL 树形结构 根据指定节点 获取其下属的所有子节点(包含路径上的枝干节点和叶子节点)...
查看>>
mysql 死锁 Deadlock found when trying to get lock; try restarting transaction
查看>>
mysql 死锁(先delete 后insert)日志分析
查看>>
MySQL 死锁了,怎么办?
查看>>
MySQL 深度分页性能急剧下降,该如何优化?
查看>>
MySQL 深度分页性能急剧下降,该如何优化?
查看>>
MySQL 添加列,修改列,删除列
查看>>