#!/usr/bin/perl ################################################################# # Author Joseph Harnish big_joe1008@yahoo.com # # Date 5/1/2001 # # # # This script is a wrapper for GD::Graph::Bars for use on # # web pages. It is a quicky that is used inside of an # # IFRAME. # # # # Usage: piegraph.pl?cols=A,B,C&vals=1,2,3 # # It is required to have a "cols" and a "vals" but there are # # options you can also add. These options are: # # title # ################################################################# use GD::Graph::pie; use CGI; my $q = new CGI; my $cols = $q->param("cols"); my $title = $q->param("title"); my $vals = $q->param("vals"); my @col = split(/\,/, $cols); my @val = split(/\,/, $vals); my $temp; # Test the values comming in. foreach (@val) { $temp += $_; } if($temp != 100){ print $q->header; print "