Hi ch'prof,

A Calc sheet contains myDiagram which refers to A1:B31 cells.

myDiagram.ChartRangeAddress sends the following string :
'mySheet'.$A$1:.$B$31
I want my macro to add a new curve in it, with datas located in A32:C33. I used myDiagram.ChartRangeAddress= "'mySheet'.$A$1:.$C$33" and multiple variations on this string.

myDiagram.ChartRangeAddress is correctly changed but the diagram itself refers to the lone A1 cell or various ref errors.

If ChartRangeAddress is the right property to use, how should its argument be set ?

The following macro adds two rows to the existing Range of the first chart in a CalcDocument

    theRanges = ThisComponent.Sheets(0).Charts(0).getRanges()
    theRanges(0).EndRow = theRanges(0).EndRow+2
    ThisComponent.Sheets(0).Charts(0).setRanges(theRanges)

Hope that helps

Regards

Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to