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
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!!!!!