summaryrefslogtreecommitdiffstats
path: root/frontends/php/chart2.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-06-13 04:10:19 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-06-13 04:10:19 +0000
commit2c4f702b3b36fe0161a6d5e7c8834a06bd663592 (patch)
tree831f10000f24aecfd5ee3a8c3282c7861ce12f9c /frontends/php/chart2.php
parentf7cac54c235db36f17074bf78de5b30dd9415bcb (diff)
downloadzabbix-2c4f702b3b36fe0161a6d5e7c8834a06bd663592.tar.gz
zabbix-2c4f702b3b36fe0161a6d5e7c8834a06bd663592.tar.xz
zabbix-2c4f702b3b36fe0161a6d5e7c8834a06bd663592.zip
Graphs to support units.
git-svn-id: svn://svn.zabbix.com/trunk@820 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/chart2.php')
-rw-r--r--frontends/php/chart2.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/frontends/php/chart2.php b/frontends/php/chart2.php
index f9c39d96..980fe15b 100644
--- a/frontends/php/chart2.php
+++ b/frontends/php/chart2.php
@@ -334,7 +334,15 @@
{
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);
+ if(isset($itemid))
+ {
+ $z=get_item_by_itemid($itemid);
+ ImageString($im, 1, $sizeX+5+$shiftX, $i/$my_steps*$sizeY+$shiftYup-4, convert_units($maxY-$i/$my_steps*($maxY-$minY),$z["units"],$z["multiplier"]) , $darkred);
+ }
+ else
+ {
+ ImageString($im, 1, $sizeX+5+$shiftX, $i/$my_steps*$sizeY+$shiftYup-4, $maxY-$i/$my_steps*($maxY-$minY) , $darkred);
+ }
}
for($j=$stepTime-$correctTime;$j<=($maxX-$minX);$j+=$stepTime)
{