When viewing a "Pie Chart" and a "3d Pie Chart", Integer values are displaying as floating numbers and not Integers.
To correct this modify the file
zabbix/include/classes/pie.inc.php
Before:
After:
To correct this modify the file
zabbix/include/classes/pie.inc.php
Before:
$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] ",
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 ]",
str_pad($this->items[$i]['host'],$max_host_len,' '),
str_pad($this->items[$i]['description'],$max_desc_len,' '));
}
if(isset($data) && isset($datavalue)){
$strvalue = sprintf("Value: %0.4f (%0.2f%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 ]",
str_pad($this->items[$i]['host'],$max_host_len,' '),
str_pad($this->items[$i]['description'],$max_desc_len,' '));
}
After:
$proc = ($datavalue * 100)/ $this->sum;
if(isset($data) && isset($datavalue)){
$strvalue = sprintf("Value: %s (%0.2f%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 ]",
str_pad($this->items[$i]['host'],$max_host_len,' '),
str_pad($this->items[$i]['description'],$max_desc_len,' '));
}
if(isset($data) && isset($datavalue)){
$strvalue = sprintf("Value: %s (%0.2f%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 ]",
str_pad($this->items[$i]['host'],$max_host_len,' '),
str_pad($this->items[$i]['description'],$max_desc_len,' '));
}
Comment