翻譯|使用教程|編輯:凌霄漢|2022-04-08 17:22:59.590|閱讀 304 次
概述:此次的報表開發工具TeeChart Pro .NET使用教程將為大家帶來如何制作3D圖表。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
TeeChart Pro 將自動為您定義所有 Axis 標簽,并提供足夠的靈活性來定制您可能有的任何特定要求。 TeeChart Pro 提供真正的多軸。 這些在設計或運行時可用,并為 Axis 定義提供了無數的可能性和靈活性。
您可以在設計時使用圖表編輯器定義主要的 2D/3D 顯示選項。
可以在設計時使用圖表編輯器選擇 2D 圖表。 取消選擇編輯器頁面上的 3D 復選框會將圖表置于 2D 模式。 在運行時,您可以隨時將圖表更改為 2D:
[C#] tChart1.Aspect.View3D = false; [VB.Net] TChart1.Aspect.View3D = False
3D 正交模式是獲得 3D 效果的默認方式。 TeeChart 根據 TChart1.Aspect.Chart3DPercent 屬性設置(也可在圖表編輯器頁面上的設計時使用)以正交角度繪制深度效果。 您不能旋轉 3D 正交圖表,底軸始終是水平的。
使用 3D 正交圖表時,您需要在自定義繪制到 Canvas 時考慮 Width3D 和 Height3D 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 This example draws a diagonal line across the Chart flush to the Back of the Chart [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 界面(*注意。并非所有選項都可用于正交圖表)。
原生 Windows 模式 3D 提供圖表旋轉和 90° 仰角。 您可以放大和縮小整個圖表(圖表內的縮放也可用,請參閱縮放/滾動教程)。
通過取消選擇 3D 編輯器頁面上的正交復選框,在設計時為 TeeChart 選擇本地 Windows 模式 3D。
[C#] tChart1.Aspect.Orthogonal = false; [VB.Net] TChart1.Aspect.Orthogonal = False
在圖表編輯器中,禁用 Orthogonal 將同時激活 Elevation 和 Rotation 的滑動條,從而允許更改這些顯示屬性的設計時間。
如果您想了解TeeChart for .NET正版價格,歡迎咨詢
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn