ChartDirector - Problem passing data

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ChartDirector - Problem passing data

leofields
Hi there,

i am using a trial version of ChartDirector Ver. 4.0 as a COM Server
and Dolphin X6 as client.

My Code:

x := CD_API new.
y := x xyChart: 250 height: 250.
y setPlotArea: 20 y: 20 width: 200 height: 200.
data := SAFEARRAY new: 3.

data at: 1 put: 4.0;
at: 2 put: 5.0;
at: 3 put: 3.0.
col := SAFEARRAY new: 1. "Empty"
nam := SAFEARRAY new:1. "Empty"
z:=y addBarLayer3: data colors: col names: nam depth: 1.

labels := SAFEARRAY new: 3 .
labels at: 1 put: 'ASOne' ;
at: 2 put: 'Two' ;
at: 3 put: 'Three' .
y xAxis setLabels: labels.
y addTitle: 'Testbild'.
y makeChart: 'c:\test.png'.

I used the Active-X Wizard to build the CD (=ChartDirector) Classes.
I have modified the return values to return the correct element of the
return array. (eg. y := x xyChart: 250 height: 250. Element 6 of the
returned array returns the CD_XYChart object.
If I comment out lines 3-8 I get a very nice test.png with all the
text, just without data.

The error I get with lines 3-8 is in the makeChart method in the last
line: a HRESULTError('HRESULT Error: Automation error (FACILITY_RPC)').

Any help would be gratly appreciated. Thanks
It works almost perfectly - I am just unable to pass my data
(=SAFEARRAY in line 3 ff.)


Reply | Threaded
Open this post in threaded view
|

Re: ChartDirector - Problem passing data

leofields
No Ideas?


Reply | Threaded
Open this post in threaded view
|

Re: ChartDirector - Problem passing data

Stefan Schmiedl
On Tue, 25 Apr 2006 03:03:06 -0700, leofields wrote:

> No Ideas?

I don't know ChartDirector and am *not* the COM-guru,
but I'd suggest searching the archives for SAFEARRAY
discussions. There are some ...

s.


Reply | Threaded
Open this post in threaded view
|

Re: ChartDirector - Problem passing data

GallegO-2
In reply to this post by leofields
leofields wrote:
> No Ideas?
>

Yes, I suggest you use TeeChart.
The Dolphin Active-X component wizard wraps TeeChart very nice.
There is no need of use SAFEARRAYS with the TeeChart wrapper. I strongly
recommend you.

Regards
Jose Sebastian Calvo