Просмотр исходного кода

#2362 Studio > Dashboard > Chart isn't shown because of some negative values

RomanL 6 лет назад
Родитель
Сommit
32c73d92bf
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      studio/template/scripts/BxBaseStudioDashboard.php

+ 4 - 2
studio/template/scripts/BxBaseStudioDashboard.php

@@ -159,8 +159,10 @@ class BxBaseStudioDashboard extends BxDolStudioDashboard
 	    	$iSizeTotal = 0;
 	        $aChartData = array();
 	        foreach($aItems as $sColor => $aItem) {
-	        	$iSizeTotal += $aItem['value'];
-	            $aChartData[] = array(bx_js_string(strip_tags(_t($aItem['label'])), BX_ESCAPE_STR_APOS), array('v' => $aItem['value'], 'f' => bx_js_string(_t_format_size($aItem['value']))));
+                if ($aItem['value'] > 0){
+	        	    $iSizeTotal += $aItem['value'];
+	                $aChartData[] = array(bx_js_string(strip_tags(_t($aItem['label'])), BX_ESCAPE_STR_APOS), array('v' => $aItem['value'], 'f' => bx_js_string(_t_format_size($aItem['value']))));
+                }
 	        }
     	}