diff --git a/pandora_console/operation/reporting/graph_viewer.php b/pandora_console/operation/reporting/graph_viewer.php index d7a5551f8a..be2f6be0b8 100644 --- a/pandora_console/operation/reporting/graph_viewer.php +++ b/pandora_console/operation/reporting/graph_viewer.php @@ -454,20 +454,28 @@ if ($view_graph) { data['threshold'] = 1; } - $.ajax({ - type: "POST", - url: "ajax.php", - dataType: "html", - data: data, - success: function (data) { - document.getElementById("div-container").innerHTML = ""; - $("#spinner_loading").hide(); - $("#div-container").append(data); - }, - error: function (data) { - console.error("Fatal error") - } - }); + (function (stacked) { + $.ajax({ + type: "POST", + url: "ajax.php", + dataType: "html", + data: data, + success: function (data) { + console.log("////////////"); + console.log(typeof stacked); + if (stacked === "") { + document.getElementById("div-container").classList.add('w100p', 'height_600px'); + } + + document.getElementById("div-container").innerHTML = ""; + $("#spinner_loading").hide(); + $("#div-container").append(data); + }, + error: function (data) { + console.error("Fatal error") + } + }); + })(data['stacked']); });