【下载TeeChart.Net最新版本】
图表显示模式

1.2 2D图表
[C#.Net]
tChart1.Aspect.View3D = false;
[VB.Net]
TChart1.Aspect.View3D = False
使用2D图表不会出现任何特殊问题,所有对象坐标都是相对于图表面板或图表矩形的位置,不需要对3D偏移进行任何限制。
1.3 3D正交图
[C#.Net]
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#.Net]
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界面(*注意:并非所有选项都可用于正交图表)。
1.4 3D“原生”Windows图表
原生Windows模式3D提供图表旋转和高度90°,您可以放大和缩小整个图表。通过取消选择3D Editor页面上的Orthogonal复选框,在设计时为TeeChart选择Native Windows mode 3D。
[C#.Net]
tChart1.Aspect.Orthogonal = false;
[VB.Net]
TChart1.Aspect.Orthogonal = False
标签:图表3Dteechart
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!