Hello,
I am using version 3.1 of Open Office on Linux. I have created a plot but cannot seem to find how to attach an axis labels. Ideally I would like to do it programatically. I am able to set the title but cannot change the axis label...
I am trying
diagram = chartDoc.getDiagram()
xAxis = diagram.XAxis
xAxis.AxisTitle.String = "X Axis Label"
does not work....
Saleem
Chart Axis Labels
Chart Axis Labels
OpenOffice 3.4.0
Mac OS X 10.5.8
Mac OS X 10.5.8
Re: Chart Axis Labels
Try
Code: Select all
oDiagram = Chart.Diagram
XAxisTitle = oDiagram.XAxisTitle
XAxisTitle.String = "X Axis Label"
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Chart Axis Labels
No luck -- I am using python in an Addon if that makes a difference
diagram = chartDoc.Diagram
xAxisTitle = diagram.XAxisTitle
xAxisTitle.String = xlabel
diagram = chartDoc.Diagram
xAxisTitle = diagram.XAxisTitle
xAxisTitle.String = xlabel
OpenOffice 3.4.0
Mac OS X 10.5.8
Mac OS X 10.5.8
Re: Chart Axis Labels
This Python code works for me for adding an X axis title to an existing chart.
Code: Select all
import uno
def AddXAxisTitle():
oDoc = XSCRIPTCONTEXT.getDocument()
oSheets = oDoc.getSheets()
oSheet= oSheets.getByIndex(0)
oCharts = oSheet.getCharts()
oChart = oCharts.getByIndex(0).EmbeddedObject
oDiagram = oChart.Diagram
oDiagram.XAxisTitle.String = 'New String'
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.