From 3a73bd3b24e841fe182d423df47b35a8d8c69408 Mon Sep 17 00:00:00 2001 From: jbostoen <-> Date: Fri, 18 Jun 2021 12:10:49 +0200 Subject: [PATCH] Version 2021-06-18 12:10:49 * support decimals in aggregate functions in dashlets --- application/displayblock.class.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/displayblock.class.inc.php b/application/displayblock.class.inc.php index 3eb3e84caa..eaecea7984 100644 --- a/application/displayblock.class.inc.php +++ b/application/displayblock.class.inc.php @@ -1141,7 +1141,7 @@ JS $aValues[$iRow] = $sValue; $sHtmlValue = $oGroupByExp->MakeValueLabel($this->m_oFilter, $sValue, $sValue); $aLabels[$iRow] = $sHtmlValue; - $aGroupBy[$iRow] = (int)$aRow[$sFctVar]; + $aGroupBy[$iRow] = (float)$aRow[$sFctVar]; $iTotalCount += $aRow['_itop_count_']; } @@ -1541,7 +1541,7 @@ JS $aValues[] = array( 'label' => html_entity_decode(strip_tags($sHtmlValue), ENT_QUOTES, 'UTF-8'), 'label_html' => $sHtmlValue, - 'value' => (int)$aRow[$sFctVar], + 'value' => (float)$aRow[$sFctVar], ); // Build the search for this subset @@ -1576,7 +1576,7 @@ JS $aColumns = array(); $aNames = array(); foreach ($aValues as $idx => $aValue) { - $aColumns[] = array('series_'.$idx, (int)$aValue['value']); + $aColumns[] = array('series_'.$idx, (float)$aValue['value']); $aNames['series_'.$idx] = $aValue['label']; } $oBlock = new BlockChartAjaxPie();