What's the object hierarchy inside ThisComponent.Sheets(i).Charts?

I’m trying to write a macro using VB, Calc to make changes to a chart, but I couldn’t find information on this subject here:

nor in the old OO documentation, nor on Google.
[EDIT] To be precise, much information is here:
but not about data ranges.

I’ve made educated guessings, but that’s not enough.

Thanks a lot to anyone willing to answer. :slight_smile:

I would suggest having a look at the Spreadsheets Documents and Charts parts of the AOO Developer’s Guide. I am not sure there is an LO equivalent of this level of detail on an LO site somewhere yet, but if there is I am sure someone will chime in and set me straight. The module chart of the LO API appears to be the object you require. Evidently data series are termed “rows” in the API, so you will need to use something like ChartDataArray or ChartDataRowProperties I imagine.

Thank you for your answer. I looked around your link but I couldn’t find information about the dataserie ranges inside a chart. Hope I searched well…

Sorry. I misread the chart part of your question. I will add a link to the Chart section of the AOO Dev Guide. What type of chart are you using? I am not familiar with using the API so can only offer general help in this respect.

It is a line chart, but (I guess) the data series ranges should not depend on the data type (maybe).

I asked as there is a section of common chart parts: http://wiki.openoffice.org/wiki/Documentation/DevGuide/Charts/Common_Parts_of_all_Chart_Types and a different section for special chart (statistics, 3-D, pie, and stock) parts: http://wiki.openoffice.org/wiki/Documentation/DevGuide/Charts/Features_of_Special_Chart_Types