<%@ language="vbscript" %> <% Set cd = CreateObject("ChartDirector.API") 'The data for the bar chart data0 = Array(100, 125, 156, 147, 87, 124, 178, 109, 140, 106, 192, 122) data1 = Array(122, 156, 179, 211, 198, 177, 160, 220, 190, 188, 220, 270) data2 = Array(167, 190, 213, 267, 250, 320, 212, 199, 245, 267, 240, 310) labels = Array("Mon", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", _ "Oct", "Nov", "Dec") 'Create a XYChart object of size 580 x 280 pixels Set c = cd.XYChart(580, 280) 'Add a title to the chart using 14 pts Arial Bold Italic font Call c.addTitle("Product Revenue For Last 3 Years", "arialbi.ttf", 14) 'Set the plot area at (50, 50) and of size 500 x 200. Use two alternative 'background colors (EEEEEE and FFFFFF) Call c.setPlotArea(50, 50, 500, 200, &Heeeeee, &Hffffff) 'Add a legend box at (50, 25) using horizontal layout. Use 8pts Arial as font, 'with transparent background. Call c.addLegend(50, 25, False, "arial.ttf", 8).setBackground(cd.Transparent) 'Set the x axis labels Call c.xAxis().setLabels(labels) 'Draw the ticks between label positions (instead of at label positions) Call c.xAxis().setTickOffset(0.5) 'Add a multi-bar layer with 3 data sets and 9 pixels 3D depth Set layer = c.addBarLayer2(cd.Side) Call layer.addDataSet(data0, &Hff8080, "Year 2002") Call layer.addDataSet(data1, &H80ff80, "Year 2003") Call layer.addDataSet(data2, &H8080ff, "Year 2004") 'Set 50% overlap between bars Call layer.setOverlapRatio(0.5) 'Add a title to the y-axis Call c.yAxis().setTitle("Revenue (USD in millions)") 'output the chart Response.ContentType = "image/png" Response.BinaryWrite c.makeChart2(cd.PNG) Response.End %>