From aae0016191813377e92549018f1a7c556d0a9e48 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 23 Nov 2021 13:14:56 +0100 Subject: [PATCH] fix chart area --- pandora_console/operation/reporting/graph_viewer.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pandora_console/operation/reporting/graph_viewer.php b/pandora_console/operation/reporting/graph_viewer.php index c35f450261..549c7ba08e 100644 --- a/pandora_console/operation/reporting/graph_viewer.php +++ b/pandora_console/operation/reporting/graph_viewer.php @@ -48,7 +48,7 @@ if ($id_graph !== 0) { } } -// Delete module SQL code +// Delete module SQL code. if ($delete_graph) { if (check_acl($config['id_user'], 0, 'AW')) { $res = db_process_sql_delete('tgraph_source', ['id_graph' => $id_graph]); @@ -239,7 +239,7 @@ if ($view_graph) { ] ).''; - // In full screen, the manage options are not available + // In full screen, the manage options are not available. $options = [ 'view' => $options['view'], 'screen' => $options['screen'], @@ -277,6 +277,12 @@ if ($view_graph) { 'fullscale' => $fullscale, ]; + if ($stacked === CUSTOM_GRAPH_AREA || $stacked === CUSTOM_GRAPH_STACKED_AREA) { + $params['type_graph'] = 'area'; + } else if ($stacked === CUSTOM_GRAPH_LINE || $stacked === CUSTOM_GRAPH_STACKED_LINE) { + $params['type_graph'] = 'line'; + } + $params_combined = [ 'stacked' => $stacked, 'id_graph' => $id_graph,