Reverse Y-Axis in Chart

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
User avatar
hl7
Posts: 1
Joined: Fri May 02, 2008 5:11 pm
Location: Rotenburg, Germany

Reverse Y-Axis in Chart

Post by hl7 »

Hi Folks,

first i may introduce myself:
My real name is Olaf, I'm a mid-age Sysadmin from northern Germany ( So please excuse my terrible english), who's involved in Linux since 1995.
My current System is Kubuntu 8.04 with OOo 2.4
Automate as much as i can automate in OpenOffice is one of my favorite things, and so i will start this introduction with a question that takes my
time for now about 2 weeks or so:

In OOo 2.4 is it possible to reverse the y-axis of a chart. I found out that i can do this with com.sun.star.chart2.AxisOrientation. But how?
Normally i make my chart like this:

Code: Select all

[...]
	Charts.addNewByName("pace", Rect, RangeAddress(), True, True)
	Chart = Charts.getByName("pace").embeddedObject
	Chart.HasMainTitle = True
	Chart.Title.String = "Pace: Durchschnitt p. Runde"
	Chart.HasLegend = False
	Chart.Diagram = Chart.createInstance("com.sun.star.chart.LineDiagram")
	Chart.Diagram.SplineType = 1
	Chart.Diagram.SymbolType = 2
[...]
But how can i use now com.sun.star.chart2.AxisOrientation to reverse the y-axis of the above diagram?
I'm a little bit frustrated, because i'm experimenting with this for 2 week or so and will be very glad if one
of the Gurus may give me a hint.
Thank you very much
and greetings from sunny Germany,

--
hl7
Post Reply