________________________________
From: Jonathan Levi <drjlevi6@aol.com>
To: tomdavies04@yahoo.co.uk
Sent: Sunday, 11 November 2012, 21:45
Subject: Re: [libreoffice-users] Macro Problem: Extending a Chart's X-axis
Tom,
I think the data I need might possibly be accessed according to this statement in the Developer
Guide:
The data of a chart is acquired from the com.sun.star.chart.XChartDocument interface of the chart
document model using the method com.sun.star.chart.XChartDocument:getData(). The current
implementation of OpenOffice.org charts provides a com.sun.star.chart.XChartDataArray interface,
derived from com.sun.star.chart.XChartData and supports the service
com.sun.star.chart.ChartDataArray.
However, if I write
Dim Doc As Object
Dim chartData As Object
Doc = ThisComponent
chartData = com.sun.star.chart.XChartDocument:getData()
I get
Property or method not found: GetData
Same with chartData = com.sun.star.chart.XChartDocument.getData(). "chartData =
com.sun.star.chart.ChartDataArray" runs, but I'm not sure how to retrieve the results. Can you
give me any guidance?
Thanks again,
Jonathan
-----Original Message-----
From: Tom Davies <tomdavies04@yahoo.co.uk>
To: Jonathan Levi <drjlevi6@aol.com>; users <users@global.libreoffice.org>
Sent: Sun, Nov 11, 2012 2:44 pm
Subject: Re: [libreoffice-users] Macro Problem: Extending a Chart's X-axis
Hi :)
Could you cheat? Could the data-range that gives you 1, 2, 3, 4 be extended and then edit the
chart to pick-up the additional values? I don't think you would need corresponding Y values.
Hopefully avoiding needing a macro might simplify things.
Regards from
Tom :)
________________________________
From: Jonathan Levi <drjlevi6@aol.com>
To: users@global.libreoffice.org
Sent: Sunday, 11 November 2012, 17:54
Subject: [libreoffice-users] Macro Problem: Extending a Chart's X-axis
I don't know if this is the right list to query, but I'm having trouble writing a simple Basic
macro to extend a chart's X-axis. The bottom of the chart starts off looking like this:
| |
|-----------|
1 2 3 4
My macro is:
Sub Main
Dim Doc As Object
Dim Charts As Object
Dim Chart as Object
Doc = ThisComponent
Charts = Doc.Sheets(0).Charts
Chart = Charts.getByIndex(0).EmbeddedObject
Chart.Diagram.XAxis.Max = Chart.Diagram.XAxis.Max + 4
End Sub
and in the end, I want the bottom of the chart to be:
| |
|-------------|
1 2 3
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.