I try to do things myself by looking at examples on this forum, and reading any documentation that I can, and I suspect this shouldn't be too hard, but..
I am trying to get an Activex Charting control called ChartDirector to work in A5V9. I know the Activex control is installed and working because I can run the following vbscript and it generates the attached files just file.
I drop the Activex control on my form, but the OLE Object browser doesn't look right to me, and I can't seem to change from the vbs syntax to A5's.
I am willing to try suggestions, it's just having spent 3-4 hours last night on it, I'm ready for someone who knows what they're doing to help.
Thanks in advance,
Alan
vbscript code is here:
I am trying to get an Activex Charting control called ChartDirector to work in A5V9. I know the Activex control is installed and working because I can run the following vbscript and it generates the attached files just file.
I drop the Activex control on my form, but the OLE Object browser doesn't look right to me, and I can't seem to change from the vbs syntax to A5's.
I am willing to try suggestions, it's just having spent 3-4 hours last night on it, I'm ready for someone who knows what they're doing to help.
Thanks in advance,
Alan
vbscript code is here:
Code:
Sub createChart(img) Set cd = CreateObject("ChartDirector.API") ' query string to determine the starting angle and direction angle = 0 clockwise = True If img <> "0" Then angle = 90 clockwise = False End If ' The data for the pie chart data = Array(25, 18, 15, 12, 8, 30, 35) ' The labels for the pie chart labels = Array("Labor", "Licenses", "Taxes", "Legal", "Insurance", _ "Facilities", "Production") ' Create a PieChart object of size 280 x 240 pixels Set c = cd.PieChart(280, 240) ' Set the center of the pie at (140, 130) and the radius to 80 pixels Call c.setPieSize(140, 130, 80) ' Add a title to the pie to show the start angle and direction If clockwise Then Call c.addTitle("Start Angle = " & angle & _ " degrees<*br*>Direction = Clockwise") Else Call c.addTitle("Start Angle = " & angle & _ " degrees<*br*>Direction = AntiClockwise") End If ' Set the pie start angle and direction Call c.setStartAngle(angle, clockwise) ' Draw the pie in 3D Call c.set3D() ' Set the pie data and the pie labels Call c.setData(data, labels) ' Explode the 1st sector (index = 0) Call c.setExplode(0) ' output the chart Call c.makeChart("anglepie" & img & ".png") End Sub Call createChart(0) Call createChart(1)
Comment