OpenOffice.org BASIC Guide - OpenOffice.org wiki
OpenOffice.org BASIC Guide - OpenOffice.org wiki
OpenOffice.org BASIC Guide - OpenOffice.org wiki
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
TextRotation (Long)<br />
angle of rotation of text in 100ths of a degree<br />
The legend (com.sun.star.chart.ChartLegend) contains the following additional property:<br />
Alignment (Enum)<br />
position at which the legend appears (value of type com.sun.star.chart.ChartLegendPosition)<br />
The Structure of Charts<br />
The following example creates a chart with a title "Main Title String", a subtitle "Subtitle String" and a legend. The<br />
legend has a gray background color, is placed at the bottom of the chart, and has a character size of 7 points.<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 />
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 />
Doc = ThisComponent<br />
Charts = Doc.Sheets(0).Charts<br />
Charts.addNewByName("MyChart", Rect, RangeAddress(), True, True)<br />
Chart = Charts.getByName("MyChart").EmbeddedObject<br />
Chart.HasMainTitle = True<br />
Chart.Title.String = "Main Title String"<br />
Chart.HasSubTitle = True<br />
Chart.Subtitle.String = "Subtitle String"<br />
Chart.HasLegend = True<br />
Chart.Legend.Alignment = com.sun.star.chart.ChartLegendPosition.BOTTOM<br />
Chart.Legend.FillStyle = com.sun.star.drawing.FillStyle.SOLID<br />
Chart.Legend.FillColor = RGB(210, 210, 210)<br />
Chart.Legend.CharHeight = 7<br />
Background<br />
Every chart has a background area. The Chart object provides the property Area to format the background:<br />
Area (Object)<br />
background area of the chart (supports com.sun.star.chart.ChartArea service)<br />
The background of a chart covers its complete area, including the area under the title, subtitle and legend. The<br />
associated com.sun.star.chart.ChartArea service supports line and fill properties.<br />
Diagram<br />
The Chart object provides the property Diagram which forms the coordinate system with axes and grids, where<br />
the data finally is displayed:<br />
Diagram (Object)<br />
object forming the coordinate system where the data is plotted. It supports com.sun.star.chart.Diagram<br />
service and:<br />
com.sun.star.chart.StackableDiagram<br />
com.sun.star.chart.ChartAxisXSupplier<br />
com.sun.star.chart.ChartAxisYSupplier<br />
Chapter 9 · Charts (Diagrams) 133