Hi Steve,
Insert as you have done as object. Add a series and the x column will
be present. The chart is created with some demo data, delete these
series.
thanks, that works fine.
But what I am really trying to do is to write a Macro to create a
XY-Chart. See below. Whatever data I pass to setData() I never succeed
in getting an X-Column. Is this a bug in the API? There is no method to
simply clear out the example data, either.
Sub Main
xTC =
ThisComponent.createInstance(com.sun.star.text.TextEmbeddedObject)
xTC.CLSID = 12dcae26-281f-416f-a234-c3086127382e
xText = ThisComponent.getText()
cursor = xText.createTextCursor()
xText.insertTextContent(cursor, xTC, 0)
chart = xTC.getEmbeddedObject()
diagram = chart.createInstance(com.sun.star.chart.XYDiagram)
chart.setDiagram(diagram)
data = chart.getData()
Dim cdata(1,1)
data.setData(cdata)
End Sub
Jan
--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted