Path: C:\
Sub createChart(img)
Set cd = CreateObject("ChartDirector.API")
' The data for the pyramid chart
data = Array(156, 123, 211, 179)
' The colors for the pyramid layers
colors = Array(&H66aaee, &Heebb22, &Hcccccc, &Hcc88ff)
' The elevation angle
angle = CInt(img) * 15
' Create a PyramidChart object of size 200 x 200 pixels, with white (ffffff)
' background and grey (888888) border
Set c = cd.PyramidChart(200, 200, &Hffffff, &H888888)
' Set the pyramid center at (100, 100), and width x height to 60 x 120 pixels
Call c.setPyramidSize(100, 100, 60, 120)
' Set the elevation angle
Call c.addTitle("Elevation = " & angle, "ariali.ttf", 15)
Call c.setViewAngle(angle)
' Set the pyramid data
Call c.setData(data)
' Set the layer colors to the given colors
Call c.setColors2(cd.DataColor, colors)
' Leave 1% gaps between layers
Call c.setLayerGap(0.01)
' Output the chart
Call c.makeChart(WScript.ScriptFullName & "/../pyramidelevation" & img & ".png")
End Sub
Call createChart(0)
Call createChart(1)
Call createChart(2)
Call createChart(3)
Call createChart(4)
Call createChart(5)
Call createChart(6)