TransWar File Browser

Path: C:\

<%@ language="vbscript" %>
<%
Set cd = CreateObject("ChartDirector.API")

' The data for the pie chart
data0 = Array(25, 18, 15)
data1 = Array(14, 32, 24)
data2 = Array(25, 23, 9)

' The labels for the pie chart
labels = Array("Software", "Hardware", "Services")

' Create a PieChart object of size 180 x 160 pixels
Set c = cd.PieChart(180, 160)

' Set the center of the pie at (90, 80) and the radius to 60 pixels
Call c.setPieSize(90, 80, 60)

' Set the border color of the sectors to white (ffffff)
Call c.setLineColor(&Hffffff)

' Set the background color of the sector label to pale yellow (ffffc0) with a black
' border (000000)
Call c.setLabelStyle().setBackground(&Hffffc0, &H000000)

' Set the label to be slightly inside the perimeter of the circle
Call c.setLabelLayout(cd.CircleLayout, -10)

' Set the title, data and colors according to which pie to draw
If Request("img") = "0" Then
    Call c.addTitle("Alpha Division", "arialbd.ttf", 8)
    Call c.setData(data0, labels)
    Call c.setColors2(cd.DataColor, Array(&Hff3333, &Hff9999, &Hffcccc))
ElseIf Request("img") = "1" Then
    Call c.addTitle("Beta Division", "arialbd.ttf", 8)
    Call c.setData(data1, labels)
    Call c.setColors2(cd.DataColor, Array(&H33ff33, &H99ff99, &Hccffcc))
Else
    Call c.addTitle("Gamma Division", "arialbd.ttf", 8)
    Call c.setData(data2, labels)
    Call c.setColors2(cd.DataColor, Array(&H3333ff, &H9999ff, &Hccccff))
End If

' Output the chart
Response.ContentType = "image/png"
Response.BinaryWrite c.makeChart2(cd.PNG)
Response.End
%>