print scale factor as float number
authorRobert Kaiser <kairo@kairo.at>
Thu, 23 Jun 2016 23:21:26 +0000 (01:21 +0200)
committerRobert Kaiser <kairo@kairo.at>
Thu, 23 Jun 2016 23:21:26 +0000 (01:21 +0200)
include/classes/rrdstat.php-class

index 7ac9c04..55d0c37 100644 (file)
@@ -630,7 +630,7 @@ class rrdstat {
           $grow = array();
           $grow['dType'] = 'CDEF';
           $grow['name'] = $erow['name'];
-          $grow['rpn_expr'] = $erow['name'].'_tmp,'.$erow['scale'].',*';
+          $grow['rpn_expr'] = $erow['name'].'_tmp,'.sprintf('%F', $erow['scale']).',*';
         }
         if ($use_gcrows) { $grow['gType'] = isset($erow['gType'])?$erow['gType']:'LINE1'; }
         else { $grow['gType'] = ((count($grow_def)==2) && ($key==0))?'AREA':'LINE1'; }