$totals[0] = $PKB; $totals[1] = $PW; $totals[2] = $GP; $totals[3] = $PT; $totals[4] = $PA; $totals[] = $LAN; $BPK[0] = "PKB"; $BPK[1] = "PW"; $BPK[2] = "GP"; $BPK[3] = "PT"; $BPK[4] = "PA"; $BPK[5] = "LANSIA"; // JPGraph seems to be fixed.. no longer needed // setlocale(LC_ALL, 'C'); // Include JPGraph library and the bar graph drawing module LoadLib_JPGraph(bar); // Start Graphing ----------------------------> // Create the graph and setup the basic parameters $graph = new Graph(285, 200, 'auto'); $graph->img->SetMargin(32, 15, 30, 15); $graph->SetScale("textint"); $graph->title->SetColor("darkblue"); $graph->SetMarginColor('white'); //$graph->SetShadow(); // Add some grace to the top so that the scale doesn't // end exactly at the max value. //$graph->yaxis->scale->SetGrace(5); // Setup X-axis labels $graph->xaxis->SetTickLabels($BPK); $graph->xaxis->SetFont(FF_FONT1); $graph->xaxis->SetColor('darkblue', 'black');
* the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ******************************************************************************/ require "../Include/Config.php"; require "../Include/Functions.php"; require "../Include/ReportFunctions.php"; if (!$_SESSION['bFinance']) { Redirect("Menu.php"); exit; } $sDate = FilterInput($_GET['date'], 'char', 10); // JPGraph seems to be fixed.. no longer needed // setlocale(LC_ALL, 'C'); // Include JPGraph library and the pie chart drawing modules LoadLib_JPGraph(pie, pie3d); $sSQL = "SELECT fun_Name as Fund, SUM(dna_Amount) as Total\n\tFROM donations_don\n\tLEFT JOIN donationamounts_dna ON donations_don.don_ID = donationamounts_dna.dna_don_ID\n\tLEFT JOIN donationfund_fun ON donationamounts_dna.dna_fun_ID = donationfund_fun.fun_ID\n\tWHERE don_Date = '{$sDate}'\n\tGROUP BY fun_ID ORDER BY fun_Name ASC"; $result = RunQuery($sSQL); $i = 0; while ($row = mysql_fetch_array($result)) { extract($row); $funds[$i] = $Fund; $totals[$i] = $Total; $funds[$i] = $funds[$i] . " (" . formatNumber($Total, 'money') . ")"; $i++; } // Start Graphing ----------------------------> // Create the graph. $graph = new PieGraph(550, 200); $graph->SetShadow(); // Set A title for the plot