From f933cead7da2cd3731738bf39a12557d8c48257a Mon Sep 17 00:00:00 2001 From: Dominik Vitt Date: Tue, 4 Jun 2019 15:52:13 +0200 Subject: [PATCH] Fixed issue #14954: Charts in Statistics are not showing completely --- application/helpers/admin/statistics_helper.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/helpers/admin/statistics_helper.php b/application/helpers/admin/statistics_helper.php index ad10b05a456..838fefebbf7 100644 --- a/application/helpers/admin/statistics_helper.php +++ b/application/helpers/admin/statistics_helper.php @@ -2165,6 +2165,7 @@ protected function displayResults($outputs, $results, $rt, $outputType, $surveyi $sDatabaseType = Yii::app()->db->getDriverName(); $tempdir = Yii::app()->getConfig("tempdir"); $astatdata = array(); + $TotalIncomplete = 0; $sColumnName = null; @@ -3400,6 +3401,11 @@ protected function displayResults($outputs, $results, $rt, $outputType, $surveyi // Labels for graphs $iMaxLabelLength = 0; + // add "Not completed or Not displayed" label if missing + if ($_POST['noncompleted'] == 0 && count($labels) > count($aGraphLabels)){ + $aGraphLabels[] = gT("Not completed or Not displayed"); + } + foreach ($aGraphLabels as $key => $label) { $cleanLabel = $label; $cleanLabel = viewHelper::flatEllipsizeText($cleanLabel, true, 20);