index : website | |
Archlinux32 website - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-02-18 20:12:17 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-02-18 20:12:17 +0100 |
commit | 4c6b074e85d7d8e97b9f125f5fbc2949bc8839dd (patch) | |
tree | b1049ef75f830be56aa5dbba951872d794b11b2a /buildmaster/statistics.php | |
parent | 4376c50ded25fff8ab6c59c045522091b3eb038b (diff) |
-rw-r--r-- | buildmaster/statistics.php | 12 |
diff --git a/buildmaster/statistics.php b/buildmaster/statistics.php index 4f2398b..05d06c6 100644 --- a/buildmaster/statistics.php +++ b/buildmaster/statistics.php @@ -133,9 +133,9 @@ function print_graph($data, $color) { ImageLine( $im, scale($last_t,$t_min,$t_max,$width-2*$border,false)+$border+$legend_line_length, - scale($last_val,0,$val_max,-$height+2*$border,isset($_GET["log"]))+$border, + scale($last_val,0,$val_max,-$height+2*$border,array_key_exists("log", $_GET))+$border, scale($t,$t_min,$t_max,$width-2*$border,false)+$border+$legend_line_length, - scale($val,0,$val_max,-$height+2*$border,isset($_GET["log"]))+$border, + scale($val,0,$val_max,-$height+2*$border,array_key_exists("log", $_GET))+$border, $color ); $last_t = $t; @@ -145,7 +145,7 @@ function print_graph($data, $color) { $im, 5, $width+$legend_line_length, - scale($last_val,0,$val_max,-$height+2*$border,isset($_GET["log"]))+$border - ImageFontHeight(5)/2, + scale($last_val,0,$val_max,-$height+2*$border,array_key_exists("log", $_GET))+$border - ImageFontHeight(5)/2, " ".$data[$t_max], $color ); @@ -178,12 +178,12 @@ for ($val=0; $val<=$val_max;) { ImageLine( $im, 0, - scale($val,0,$val_max,-$height+2*$border,isset($_GET["log"]))+$border, + scale($val,0,$val_max,-$height+2*$border,array_key_exists("log", $_GET))+$border, $legend_line_length, - scale($val,0,$val_max,-$height+2*$border,isset($_GET["log"]))+$border, + scale($val,0,$val_max,-$height+2*$border,array_key_exists("log", $_GET))+$border, $foreground_color ); - if (! isset($_GET["log"])) + if (! array_key_exists("log", $_GET)) $val+=pow(10,round(log($val_max)/log(10))-1); elseif ($val==0) $val++; |