From daf6ebe4542b3b704f68c2919c8e3ef0652ee808 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 2 Apr 2020 12:38:16 +0200 Subject: [PATCH] add table with data below chart --- views/bootstrap/class.Charts.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Charts.php b/views/bootstrap/class.Charts.php index 0592214e2..b79a8a7d9 100644 --- a/views/bootstrap/class.Charts.php +++ b/views/bootstrap/class.Charts.php @@ -228,6 +228,29 @@ $(document).ready( function() {
contentContainerEnd(); + echo ""; + echo ""; + $total = 0; + switch($type) { + case 'docspermonth': + case 'docsperuser': + case 'docspermimetype': + case 'docspercategory': + case 'docsperstatus': + foreach($data as $item) { + echo ""; + $total += $item['total']; + } + break; + case 'docsaccumulated': + foreach($data as $item) { + echo ""; + $total += $item['total']; + } + break; + } + echo ""; + echo "
".getMLText('chart_'.$type.'_title')."".getMLText('total')."
".htmlspecialchars($item['key'])."".$item['total']."
".date('Y-m-d', $item['key']/1000)."".$item['total']."
".$total."
"; echo "\n"; if(!in_array($type, array('docspermonth', 'docsaccumulated'))) { @@ -245,4 +268,3 @@ $(document).ready( function() { $this->htmlEndPage(); } /* }}} */ } -?>