tree event graphs

This commit is contained in:
fbsanchez 2021-08-12 14:24:16 +02:00
parent c0b64735a5
commit 486abde989
2 changed files with 15 additions and 3 deletions

View File

@ -817,7 +817,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
$events_graph .= graph_graphic_agentevents(
$id_agente,
'340px;margin:0',
45,
'130px',
SECONDS_1DAY,
'',
true,

View File

@ -760,11 +760,23 @@ function flot_slicesbar_graph(
$graph_id = uniqid('graph_');
// Set some containers to legend, graph, timestamp tooltip, etc.
$height = ((int) $height + 15);
if (is_numeric($height) === true) {
$height = ((int) $height + 15);
}
$style = 'width:'.$width.'%;';
// Fixed height size.
$style .= 'height: 100%;';
if (empty($height) === true) {
$style .= 'height: 100%;';
} else {
if (is_numeric($height) === true) {
$style .= 'height: '.$height.'px;';
} else {
$style .= 'height: '.$height.';';
}
}
$return = "<div id='".$graph_id."' class='noresizevc graph ".$adapt_key."' style='".$style."'></div>";
$return .= "<div id='value_".$graph_id."' class='flot_container'></div>";