10715-Fix width tree view graph

This commit is contained in:
Pablo Aragon 2023-03-22 20:00:42 +01:00
parent d6bf16f536
commit bd48dba65f
1 changed files with 14 additions and 0 deletions

View File

@ -946,6 +946,20 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
function widthGraph () {
var parentWidth = $('.max-graph-tree-view').parent().width();
$('.max-graph-tree-view').children().width(parentWidth + 5);
$('<input>').attr({
type: 'hidden',
id: 'graph-counter',
value: 1
}).appendTo('#container');
if ($('#graph-counter').val() == 1) {
$('.max-graph-tree-view div.flot-x-axis').css('inset', '-25px').css('margin-top', '10px').css('margin-left', '10px');
$('.max-graph-tree-view canvas.flot-base').css('height', '85px');
$('#graph-counter').val(2);
}
}
</script>";