%@ language="vbscript" %>
<%
Set cd = CreateObject("ChartDirector.API")
'The data for the bar chart
data = Array(100, 125, 245, 147, 67)
'data1 = Array(85, 156, 179, 211, 123)
'data2 = Array(97, 87, 56, 267, 157)
labels = Array("Mon", "Tue", "Wed", "Thu", "Fri")
Dim Notas : Dim Discip : Dim MedTur
Notas = Split(request.QueryString("notas"), ";")
Discip = Split(request.QueryString("Discip"), ";")
MedTur = Split(request.QueryString("MedTur"), ";")
'Response.Write UBound(Notas) : Response.End()
Dim DiscipReord : redim DiscipReord(ubound(discip))
Dim NotasReord : redim NotasReord(ubound(discip))
Dim MedTurReord : redim MedTurReord(ubound(discip))
Dim N : N = -1
for i = ubound(discip) to 0 step -1
N = N + 1
DiscipReord(N) = Discip(i)
NotasReord(N) = Notas(i)
MedTurReord(N) = MedTur(i)
'response.write i & "
"
next
'For N = 0 to UBound(DiscipReord)
' Discip(N) = Left(Discip(N),3)
' Response.Write DiscipReord(N) & " = " & CDbl(notas(N)) & "
"
'Next
'Response.End()
'Create a XYChart object of size 300 x 240 pixels
'Set c = cd.XYChart(700, 550)
Set c = cd.XYChart(500, 400)
'Add a title to the chart using 10 pt Arial font
Call c.addTitle("Bimestre " & Request.QueryString("bimestre"), "", 10)
'Set the plot area at (45, 25) and of size 239 x 180. Use two alternative
'background colors (0xffffc0 and 0xffffe0)
'Call c.setPlotArea(50, 30, 640, 500).setBackground(&Hffffc0, &Hffffe0)
Call c.setPlotArea(180, 50, 300, 300).setBackground(&Hffffc0, &Hffffe0)
Call c.swapXY()
Call c.yAxis().setLinearScale(0,10,1)
'Add a legend box at (45, 20) using horizontal layout. Use 8 pt Arial font, with
'transparent background
'Call c.addLegend(45, 20, False, "", 8).setBackground(cd.Transparent)
'Add a title to the y-axis
'Call c.yAxis().setTitle("Throughput (MBytes Per Hour)")
'Reserve 20 pixels at the top of the y-axis for the legend box
'Call c.yAxis().setTopMargin(20)
'Set the x axis labels
'Call c.xAxis().setLabels(Discip)
Call c.addLegend(45, 20, False, "", 8).setBackground(cd.Transparent)
'Add a multi-bar layer with 3 data sets
Set layer = c.addBarLayer2(cd.Side, 2)
Call layer.addDataSet(NotasReord, &Hff8080, "Aluno")
Call layer.addDataSet(MedTurReord, &H80ff80, "Turma")
'Call layer.addDataSet(data2, &H8080ff, "Server #3")
'Call c.setLabelLayout(cd.SideLayout)
'Call layer.setDataLabelStyle()
'Response.Write UBound(Notas) : Response.End()
'output the chart
'Call c.addBarLayer(notas)
'Set the labels on the x axis.
Call c.xAxis().setLabels(discipReord)
Response.ContentType = "image/png"
Response.BinaryWrite c.makeChart2(cd.PNG)
Response.End
%>