From 68285fb56347e83ce36fc611482a09c84754f488 Mon Sep 17 00:00:00 2001 From: artem Date: Thu, 18 Oct 2007 11:03:14 +0000 Subject: - [DEV-14] improved viewing values in pie graphs (Artem) git-svn-id: svn://svn.zabbix.com/trunk@4873 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/classes/pie.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'frontends/php/include/classes') diff --git a/frontends/php/include/classes/pie.inc.php b/frontends/php/include/classes/pie.inc.php index e31f4769..6657b765 100644 --- a/frontends/php/include/classes/pie.inc.php +++ b/frontends/php/include/classes/pie.inc.php @@ -307,15 +307,15 @@ function drawLegend(){ $proc = ($datavalue * 100)/ $this->sum; if(isset($data) && isset($datavalue)){ - $strvalue = sprintf("Value: %0.4f (%0.2f%s)",$datavalue,$proc,'%'); - $str = sprintf("%s: %s [%s] ", + $strvalue = sprintf(S_VALUE.': '.((round($datavalue)!=$datavalue)?'%0.4f':'%s').' ('.((round($proc)!=$proc)?'%0.2f':'%s')."%s)",$datavalue,$proc,'%'); + $str = sprintf('%s: %s [%s] ', str_pad($this->items[$i]['host'],$max_host_len,' '), str_pad($this->items[$i]['description'],$max_desc_len,' '), $fnc_name); } else{ - $strvalue = sprintf("Value: no data"); - $str=sprintf("%s: %s [ no data ]", + $strvalue = sprintf(S_VALUE.': '.S_NO_DATA_SMALL); + $str=sprintf('%s: %s [ '.S_NO_DATA_SMALL.' ]', str_pad($this->items[$i]['host'],$max_host_len,' '), str_pad($this->items[$i]['description'],$max_desc_len,' ')); } -- cgit