IAspect.HorizOffset
IAspect
property HorizOffset: Integer;
Type Library
TeeChartx
Description
Moves the entire Chart on a horizontal plane. Not Active for 2D or 3D orthogonal Charts.
3D Rotation Example
The following example in VBScript for Internet Explorer will generate a webpage with animated Chart rotation, Elevation and Zoom. The Chart uses Perspective and animation is activated by TeeChart's its own timer events.
<SCRIPT LANGUAGE="VBScript">
<!--
Dim DeltaRot
Dim DeltaElev
Dim DeltaZoom
DeltaRot=2
DeltaElev=2
DeltaZoom=2
Sub TChart1_OnTimer()
if TChart1.SeriesCount > 0 then
TChart1.Aspect.Rotation = TChart1.Aspect.Rotation + DeltaRot
If (TChart1.Aspect.Rotation <= 275) Or (TChart1.Aspect.Rotation >= 355) Then
DeltaRot = -DeltaRot
End If
TChart1.Aspect.Elevation = TChart1.Aspect.Elevation + DeltaElev
If (TChart1.Aspect.Elevation <= 275) Or (TChart1.Aspect.Elevation >= 355) Then
DeltaElev = -DeltaElev
End If
TChart1.Aspect.Zoom = TChart1.Aspect.Zoom + DeltaZoom
If (TChart1.Aspect.Zoom <= 40) Or (TChart1.Aspect.Zoom >= 280) Then
DeltaZoom = -DeltaZoom
End If
end if
end sub
Sub Animate()
TChart1.TimerInterval=100
TChart1.TimerEnabled=not TChart1.TimerEnabled
End sub
Sub LoadChart()
TChart1.AddSeries(1)
TChart1.AddSeries(0)
TChart1.Series(0).FillSampleValues(10)
TChart1.Series(1).FillSampleValues(10)
TChart1.Series(0).asBar.AutoBarSize=True
TChart1.Series(0).asBar.BarPen.Color=RGB(153,0,0)
TChart1.Aspect.Orthogonal=False
TChart1.Aspect.Chart3DPercent=80
TChart1.Aspect.Perspective=50
TChart1.Panel.Gradient.Visible=true
If TChart1.Canvas.IsScreenHighColor = True then
TChart1.Panel.Gradient.EndColor=RGB(0,0,151)
TChart1.Header.Font.Color = vbYellow
else
TChart1.Header.Font.Color = vbBlack
end if
TChart1.Header.Font.Bold=True
TChart1.Header.Font.Size=10
TChart1.Header.Text(0)="TeeChart 3D example"
cmdChart1.disabled=True
End sub
'To use OpenGL add TChart1.Aspect.OpenGL.Active = True
-->
</SCRIPT>
<html><head><TITLE>TeeChart 3D animation example</TITLE></head>
<BODY bgcolor=#FFFFFF>
<p><input type="button" value="LoadChart" onclick="LoadChart()" name="cmdChart1"> <br>
<input type="button" value="Stop/Start animation !" onclick="Animate()"
name="cmdChart3"> </p>
<OBJECT ID="TChart1" WIDTH=450 HEIGHT=290
CLASSID="CLSID:008BBE7E-C096-11D0-B4E3-00A0C901D681">
codebase="TeeChart.ocx#version=4,0,0,0" TYPE="application/x-oleobject"
</OBJECT>
</BODY>
</html>