<%@ language="vbscript" %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<img src="ChartGen.asp"/>
<P> </P>
<%
Set cd = Server.CreateObject("ChartDirector.API")
' The data for the bar chart
data = Array(5, 20, 25, 19, 15)
' The labels for the bar chart
labels = Array("Mon", "Tue", "Wed", "Thu", "Fri")
' Create a XYChart object of size 250 x 250 pixels
Set c = cd.XYChart(250, 250)
' Set the plotarea at (30, 20) and of size 200 x 200 pixels
Call c.setPlotArea(30, 20, 200, 200)
' Add a bar chart layer using the given data
Call c.addBarLayer(data)
' Set the labels on the x axis.
Call c.xAxis().setLabels(labels)
' output the chart
Response.ContentType = "image/png"
Response.BinaryWrite c.makeChart2(cd.PNG)
Response.End
%>
</BODY>
</HTML>
Partager