/    Sign up×
Community /Pin to ProfileBookmark

Visual Fox Pro

Hey i am working on a program in VFP, making pie charts using ChartDirector

I having one error that i cant figure out for the life of me.
Following is the code:

oChart = Createobject(“ChartDirector.API”)
DIMENSION data[3] = (25,25,75)
DIMENSION labels[3]=(“Labor”,”Licenses”,”Taxes”)
pie = oChart.PieChart(450,240)
pie.setPieSize(150,100,80)
pie.addTitle2(oChart.Bottom, “Project Cost Breakdown”,”arialbi.ttf”)
pie.set3D()
pie.addLegend(330,40)
pie.setLabelFormat(“{label} ${value}K<*br*>({percent}%)”)

pie.setData(data,labels) ***PROBLEM***
pie.setExplode(0)
viewer.Picture = pie.makePicture()

viewer.ImageMap = pie.getHTMLImageMap(“Clickabe”, “”,_”title='{label}: US${value}K ({percent}%)'”)

At setData (a chartDirector Function) i get the following Error:

OLE IDispatch exception code 0 from ChartDirector: Error converting argument 1 to Type class DoubleArray.

Thanks for the help!!!!!

to post a comment
Full-stack Developer

1 Comments(s)

Copy linkTweet thisAlerts:
@myauuuuFeb 12.2009 — PUBLIC ochart,pie

oChart = Createobject("ChartDirector.API")

DIMENSION deata(3)

deata(1)=25 && TIENE QUE SER NUMERICO

deata(2)=35 && TIENE QUE SER NUMERICO

deata(3)=75 && TIENE QUE SER NUMERICO

pie = oChart.PieChart(450,240)

pie.setPieSize(150,100,80)

pie.addTitle2(oChart.Bottom, "Project Cost Breakdown","arialbi.ttf")

pie.set3D()

pie.addLegend(330,40)

pie.setLabelFormat("{label} ${value}K<*br*>({percent}%)")

pie.setData(@deata) && ***SOLUCION ***

pie.makechart("testje.png")

????????
×

Success!

Help @suni spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.13,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...