Merge branch 'ent-5945-Fallo-visual-en-graficas-de-tipo-sparse' into 'develop'

Fixed minor error graph sparse width

See merge request artica/pandorafms!3274
This commit is contained in:
Daniel Rodriguez 2020-06-25 15:18:33 +02:00
commit fad08b9d66
1 changed files with 7 additions and 1 deletions

View File

@ -139,7 +139,13 @@ function flot_area_graph(
}
// Parent layer.
$return = "<div class='parent_graph' style='width: ".$params['width'].'px;'.$background_style."'>";
if (strpos($params['width'], '%') === false) {
$width = 'width: '.$params['width'].'px;';
} else {
$width = 'width: '.$params['width'].';';
}
$return = "<div class='parent_graph' style='".$width.$background_style."'>";
if ($params['title'] === true && empty($params['title']) === false) {
$return .= '<p style="text-align:center;">'.$params['title'].'</p>';