diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2002-12-27 18:10:30 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2002-12-27 18:10:30 +0000 |
commit | 3f4fb0cd9e216fa21c47cf6652c6c951b4ecdfde (patch) | |
tree | 9d44fd98f7b9672d0eff2cf2eeb077e27c6bd02b /frontends/php/chart2.php | |
parent | a95958e564bcd16f44395ed7d45f7994b198e9b2 (diff) | |
download | zabbix-3f4fb0cd9e216fa21c47cf6652c6c951b4ecdfde.tar.gz zabbix-3f4fb0cd9e216fa21c47cf6652c6c951b4ecdfde.tar.xz zabbix-3f4fb0cd9e216fa21c47cf6652c6c951b4ecdfde.zip |
- improvements for chart.php (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@611 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/chart2.php')
-rw-r--r-- | frontends/php/chart2.php | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/frontends/php/chart2.php b/frontends/php/chart2.php index 18109767..a00e9853 100644 --- a/frontends/php/chart2.php +++ b/frontends/php/chart2.php @@ -111,7 +111,6 @@ $from_time = time(NULL)-$HTTP_GET_VARS["period"]-3600*$HTTP_GET_VARS["from"]; $to_time = time(NULL)-3600*$HTTP_GET_VARS["from"]; - $len=array(); $x=array(); $y=array(); @@ -158,13 +157,6 @@ $maxY = $HTTP_GET_VARS["force_maxy"]; } - if(!isset($maxY)) - { - $maxY=1; - } - - $maxY=1; - $my_exp = floor(log10($maxY)); $my_mant = $maxY/pow(10,$my_exp); @@ -262,15 +254,15 @@ { ImageDashedLine($im,$shiftX,$i/$my_steps*$sizeY+$shiftYup,$sizeX+$shiftX,$i/$my_steps*$sizeY+$shiftYup,$gray); } + for($j=$stepTime-$correctTime;$j<=($maxX-$minX);$j+=$stepTime) + { + ImageDashedLine($im,$shiftX+($sizeX*$j)/($maxX-$minX),$shiftYup,$shiftX+($sizeX*$j)/($maxX-$minX),$sizeY+$shiftYup,$gray); + } if($nodata == 0) { - for($j=$stepTime-$correctTime;$j<=($maxX-$minX);$j+=$stepTime) - { - ImageDashedLine($im,$shiftX+($sizeX*$j)/($maxX-$minX),$shiftYup,$shiftX+($sizeX*$j)/($maxX-$minX),$sizeY+$shiftYup,$gray); - } for($i=0;$i<=$my_steps;$i++) { ImageString($im, 1, $sizeX+5+$shiftX, $i/$my_steps*$sizeY+$shiftYup-4, $maxY-$i/$my_steps*($maxY-$minY) , $darkred); |