1<?php 2# --------------------------------------------------------------------- 3# rth is a requirement, test, and bugtracking system 4# Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net 5# This program is distributed under the terms and conditions of the GPL 6# See the README and LICENSE files for details 7#---------------------------------------------------------------------- 8# ------------------------------------ 9# Pie Chart 10# 11# $RCSfile: pie_chart_image.php,v $ $Revision: 1.2 $ 12# ------------------------------------ 13 14include"../jpgraph-1.8/src/jpgraph.php"; 15include"../jpgraph-1.8/src/jpgraph_pie.php"; 16 17$title = $_GET['graph_title']; 18$theme = $_GET['theme']; 19 20$legend = eval( "return Array(".stripslashes($_GET['legend']).");" ); 21$data = eval( "return Array(".stripslashes($_GET['data']).");" ); 22 23# Create the Pie Graph. 24$graph = new PieGraph(380,200); 25//$graph->SetShadow(); 26 27# Set A title for the plot 28$graph->title->Set($title); 29$graph->title->SetFont(FF_FONT1,FS_BOLD); 30 31# Create 32$p1 = new PiePlot($data); 33$p1->SetLegends($legend); 34$p1->SetTheme($theme); //Sets the colour scheme defined in jpgraph_pie.php 35 36$graph->Add($p1); 37$graph->Stroke(); 38 39 40# ------------------------------------ 41# $Log: pie_chart_image.php,v $ 42# Revision 1.2 2005/12/08 19:40:10 gth2 43# updating reports containing calls to jp-graph - gth 44# 45# Revision 1.1.1.1 2005/11/30 23:01:26 gth2 46# importing initial version - gth 47# 48# ------------------------------------ 49 50?>