21.08.2013 Views

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The Structure of Charts 195<br />

Perspective of 3D charts ( [0,100] ) (available since <strong>OpenOffice</strong>.<strong>org</strong> 2.4.1)<br />

RotationHorizontal (Long)<br />

Horizontal rotation of 3D charts in degrees ( [-180,180] ) (available since<br />

<strong>OpenOffice</strong>.<strong>org</strong> 2.4.1)<br />

RotationVertical (Long)<br />

Vertical rotation of 3D charts in degrees ( [-180,180] ) (available since <strong>OpenOffice</strong>.<strong>org</strong><br />

2.4.1)<br />

The following example creates a 3D area chart.<br />

Dim Doc As Object<br />

Dim Charts As Object<br />

Dim Chart as Object<br />

Dim Rect As New com.sun.star.awt.Rectangle<br />

Dim RangeAddress(0) As New com.sun.star.table.CellRangeAddress<br />

Doc = StarDesktop.CurrentComponent<br />

Charts = Doc.Sheets(0).Charts<br />

Rect.X = 8000<br />

Rect.Y = 1000<br />

Rect.Width = 10000<br />

Rect.Height = 7000<br />

RangeAddress(0).Sheet = 0<br />

RangeAddress(0).StartColumn = 0<br />

RangeAddress(0).StartRow = 0<br />

RangeAddress(0).EndColumn = 2<br />

RangeAddress(0).EndRow = 12<br />

Charts.addNewByName("MyChart", Rect, RangeAddress(), True, True)<br />

Chart = Charts.getByName("MyChart").embeddedObject<br />

Chart.Diagram = Chart.createInstance("com.sun.star.chart.AreaDiagram")<br />

Chart.Diagram.Dim3D = true<br />

Chart.Diagram.Deep = true<br />

Chart.Diagram.RightAngledAxes = true 'needs <strong>OpenOffice</strong>.<strong>org</strong> 2.3 or newer<br />

Chart.Diagram.D3DScenePerspective =<br />

com.sun.star.drawing.ProjectionMode.PERSPECTIVE<br />

Chart.Diagram.Perspective = 100 'needs <strong>OpenOffice</strong>.<strong>org</strong> 2.4.1 or newer<br />

Chart.Diagram.RotationHorizontal = 60 'needs <strong>OpenOffice</strong>.<strong>org</strong> 2.4.1 or<br />

newer<br />

Chart.Diagram.RotationVertical = 30 'needs <strong>OpenOffice</strong>.<strong>org</strong> 2.4.1 or<br />

newer

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!