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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Charts (Diagrams) 181<br />

Charts (Diagrams)<br />

Charts (Diagrams)<br />

<strong>OpenOffice</strong>.<strong>org</strong> can display data as a chart, which creates graphical representations of<br />

numerical data in the form of bars, pie charts, lines or other elements. Data can either be<br />

displayed as 2D or 3D graphics, and the appearance of the chart elements can be<br />

individually adapted in a way similar to the process used for drawing elements.<br />

Charts are not treated as independent documents in <strong>OpenOffice</strong>.<strong>org</strong>, but as objects that are<br />

embedded in an existing document.<br />

A chart may contain its own data or may display data from the container document. For<br />

example charts in spreadsheets can display data obtained from the cell ranges and charts in<br />

text documents can display data obtained from writer tables.<br />

Source: http:/ / <strong>wiki</strong>. services. openoffice. <strong>org</strong>/ w/ index. php? title=Documentation/ <strong>BASIC</strong>_<br />

<strong>Guide</strong>/ Charts&oldid=96886<br />

Principal Authors: Fpe, Ccornell, Iha<br />

Using Charts in Spreadsheets<br />

Charts within spreadsheets can display the data from an assigned cell range within the<br />

spreadsheet. Any modifications made to the data within the spreadsheet will also be<br />

reflected in the assigned chart. The following example shows how to create a chart<br />

assigned to some cell ranges within a spreadsheet document:<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

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

Saved successfully!

Ooh no, something went wrong!