fixed visualization of vertical bars graph when switching values on graph viewer

This commit is contained in:
alejandro.campos@artica.es 2022-01-19 13:33:49 +01:00
parent 49bf10f0f8
commit a0391e3ef2

View File

@ -454,20 +454,28 @@ if ($view_graph) {
data['threshold'] = 1; data['threshold'] = 1;
} }
$.ajax({ (function (stacked) {
type: "POST", $.ajax({
url: "ajax.php", type: "POST",
dataType: "html", url: "ajax.php",
data: data, dataType: "html",
success: function (data) { data: data,
document.getElementById("div-container").innerHTML = ""; success: function (data) {
$("#spinner_loading").hide(); console.log("////////////");
$("#div-container").append(data); console.log(typeof stacked);
}, if (stacked === "<?php echo CUSTOM_GRAPH_VBARS; ?>") {
error: function (data) { document.getElementById("div-container").classList.add('w100p', 'height_600px');
console.error("Fatal error") }
}
}); document.getElementById("div-container").innerHTML = "";
$("#spinner_loading").hide();
$("#div-container").append(data);
},
error: function (data) {
console.error("Fatal error")
}
});
})(data['stacked']);
}); });