From 8e43a0fec128ad379bcdf432ddb034db66097c7e Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 17 Jan 2007 23:06:24 +0000 Subject: Modification: the history summary graph does not use a true image anymore, CSS divs are faster and don't require GD library. git-svn-id: http://piwigo.org/svn/trunk@1729 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/images/stats.img.php | 241 --------------------------------------------- 1 file changed, 241 deletions(-) delete mode 100644 admin/images/stats.img.php (limited to 'admin/images/stats.img.php') diff --git a/admin/images/stats.img.php b/admin/images/stats.img.php deleted file mode 100644 index 7a9d676a8..000000000 --- a/admin/images/stats.img.php +++ /dev/null @@ -1,241 +0,0 @@ -SetX(10); - -// Set the starting y position -$myBarGraph->SetY(10); - -// Set how wide the bargraph will be -$myBarGraph->SetWidth($imageWidth-20); - -// Set how tall the bargraph will be -$myBarGraph->SetHeight($imageHeight-20); - -// Set this to zero if you don't want to show any. These are the vertical -// bars to help see the values. -// $myBarGraph->SetNumOfValueTicks(3); - - -// You can try uncommenting these lines below for different looks. -// -// The default is true. Setting this to false will cause phpBarGraph to not -// print the labels of each bar. -$myBarGraph->SetShowLabels(true); - -// The default is true. Setting this to false will cause phpBarGraph to not -// print the values of each bar. -$myBarGraph->SetShowValues(false); - -// The default is true. Setting this to false will cause phpBarGraph to not -// print the border of each bar. -$myBarGraph->SetBarBorder(true); - -// The default is true. Setting this to false will cause phpBarGraph to not -// print each bar as a gradient. -$myBarGraph->SetShowFade(true); - -// The default is true. Setting this to false will cause phpBarGraph to not -// print the outside box. -$myBarGraph->SetShowOuterBox(true); - -// The default is 10. This changes the space inbetween each bar. -$myBarGraph->SetBarSpacing(5); - - -// Add Values to the bargraph.. -$result = pwg_query($query); -$datas = array(); -while ($row = mysql_fetch_array($result)) -{ - $datas[$row['x']] = $row['y']; -} - -if (!isset($min_x) and !isset($max_x)) -{ - $min_x = min(array_keys($datas)); - $max_x = max(array_keys($datas)); -} - -for ($i = $min_x; $i <= $max_x; $i++) -{ - if (!isset($datas[$i])) - { - $datas[$i] = 0; - } - - $myBarGraph->AddValue($i, $datas[$i]); -} - -// Set the colors of the bargraph.. -// -// This is the color on the top of every bar. -$myBarGraph->SetStartBarColor("6666ff"); - -// This is the color on the bottom of every bar. This is not used when -// SetShowFade() is set to false. -$myBarGraph->SetEndBarColor("2222aa"); - -// This is the color all the lines and text are printed out with. -$myBarGraph->SetLineColor("000000"); - -// Print the BarGraph to the image.. -$myBarGraph->DrawBarGraph($image); -Imagestring($image, 2, 2, $imageHeight-14, $legend, $white); - -//------------------------------------------------ Image output -if ($outputFormat == "png") -{ - header("Content-type: image/png"); - ImagePNG($image); -} -else if (in_array($outputFormat, array("jpg", "jpeg"))) -{ - header("Content-type: image/jpeg"); - Imagejpeg($image); -} -// Destroy the image. -Imagedestroy($image); -?> \ No newline at end of file -- cgit v1.2.3