OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Change data of a chart by Delphi

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
cpri
General User
General User


Joined: 13 Sep 2005
Posts: 40

PostPosted: Thu Oct 06, 2005 6:07 am    Post subject: Change data of a chart by Delphi Reply with quote

I want to change the data of a chart. I know already how to retrieve the data from a chart but if I want to set the data i run into trouble.
This is the code I found at the OOo sdk but I can't converted to Delphi.
Code:

' create data with dimensions 2 x 3
' 2 is called outer dimension and 3 inner dimension
' assume that oChartDocument contains a valid
' com.sun.star.chart.XChartDocument

Dim oData As Object
Dim oDataArray( 0 To 1 ) As Object
Dim oSeries1( 0 To 2 )   As Double
Dim oSeries2( 0 To 2 )   As Double

oSeries1( 0 ) = 3.141
oSeries1( 1 ) = 2.718
oSeries1( 2 ) = 1.0

oSeries2( 0 ) = 17.0
oSeries2( 1 ) = 23.0
oSeries2( 2 ) = 42.0

oDataArray( 0 ) = oSeries1()
oDataArray( 1 ) = oSeries2()

' call getData() method of XChartDocument to get the XChartDataArray
oData = oChartDocument.Data
' call setData() method of XChartDataArray to apply the data
oData.Data = oDataArray()

' Note: to use the series arrays here as values for the series in the chart
'       you have to set the DataRowSource of the XDiagram object to
'       com.sun.star.chart.ChartDataRowSource.ROWS (default is COLUMNS)

Is there anybody how can help me converting this code to a valid Delphi syntax.
The problem occurs when I want to assign the oSeries to oDataArray. Delphi gives me a compiler error "incompitble types"
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group