【TeeChart Pro ActiveX教程】(十五):3D图表

下载TeeChart Pro ActiveX最新版本

图表显示模式

Teechart

2D图表

[C#]

tChart1.Aspect.View3D = false;

[VB.Net]

TChart1.Aspect.View3D = False

使用2D图表不会出现任何特殊问题。所有对象坐标都是相对于图表面板或图表矩形的位置,不需要对3D偏移进行任何限制(请参阅以下部分)。

3D正交图

此示例在图表中绘制一条对角线,刷新到图表的前面:

[C#]

private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g) {        Point p1 = new Point(tChart1.Axes.Left.Position, tChart1.Axes.Top.Position);        Point p2 = new Point(tChart1.Axes.Right.Position, tChart1.Axes.Bottom.Position);        g.MoveTo(p1);        g.LineTo(p2, 0);}

[VB.Net]

Private Sub TChart1_AfterDraw(ByVal sender As Object, ByVal g As Steema.TeeChart.Drawing.Graphics3D) Handles TChart1.AfterDraw        Dim P1 As New Point(TChart1.Axes.Left.Position, TChart1.Axes.Top.Position)        Dim P2 As New Point(TChart1.Axes.Right.Position, TChart1.Axes.Bottom.Position)        g.MoveTo(P1)        g.LineTo(P2, 0)End Sub 

此示例在图表中绘制一条对角线,并在图表背面绘制

[C#]

private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g) {        int width3D = tChart1.Aspect.Width3D;        Point p1 = new Point(tChart1.Axes.Left.Position, tChart1.Axes.Top.Position);        Point p2 = new Point(tChart1.Axes.Right.Position, tChart1.Axes.Bottom.Position);        g.MoveTo(p1, width3D);        g.LineTo(p2, width3D);} 

[VB.Net]

Private Sub TChart1_AfterDraw(ByVal sender As Object, ByVal g As Steema.TeeChart.Drawing.Graphics3D) Handles TChart1.AfterDraw        Dim Width3D As Integer = TChart1.Aspect.Width3D        Dim P1 As New Point(TChart1.Axes.Left.Position, TChart1.Axes.Top.Position)        Dim P2 As New Point(TChart1.Axes.Right.Position, TChart1.Axes.Bottom.Position)        g.MoveTo(P1, Width3D)        g.LineTo(P2, Width3D)End Sub

在运行时使用3D图表的显示属性时使用Aspect界面。

3D“原生”Windows图表

原生Windows模式3D提供图表旋转和高度90°。您可以放大和缩小整个图表(图表中的缩放也可用,请参阅缩放/滚动教程)。 通过取消选择3D Editor页面上的Orthogonal复选框,在设计时为TeeChart选择Native Windows mode 3D。

[C#]

tChart1.Aspect.Orthogonal = false;

[VB.Net]

TChart1.Aspect.Orthogonal = False

购买TeeChart Pro AciveX正版授权,请点击“咨询在线客服”哟!

标签:图表图表控件teechart

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2019年1月15日
下一篇 2019年1月15日

相关推荐

发表回复

登录后才能评论