<% Response.Expires = 0 Response.AddHeader "pragma","no-cache" this_script = Request.ServerVariables("SCRIPT_NAME") Dim values(3) if Request.Form("seria").Count = 4 then For i=1 to Request.Form("seria").Count values(i-1) = Request.Form("seria")(i) Next else values(0) = 10 values(1) = 20 values(2) = 30 values(3) = 40 end if checked = -1 if Request.Form("cut")<>"" then checked=Request.Form("cut")*1 iquery = "" For i=0 to UBound(values) if iquery<>"" then iquery = iquery & "&" iquery = iquery & "seria=" & Server.UrlEncode(values(i)) Next iquery = iquery & "&cut=" & checked %> ShotGraph -- ASP examples: Pie chart

Pie chart

Note: all scripts examples included in these Web pages are absolutely free. You can copy, use, and modify these scripts anyway you want. The scripts are published without warranty of any kind.

This example builds pie chart from HTML form data. This form contains four values. You can enter these values and see how the online image chart is built on the fly. The ASP script uses ShotGraph's Pie method to draw slices. The example consists of two scripts: main (HTML generating) ASP script and secondary (image generating) ASP script. The image generating ASP script accepts data from query string.
<% For i=0 to UBound(values) %> <% Next %>
ValueCut
>
  > (No cut)