Fix error showing image when there is no data to show in graphs - #1283

This commit is contained in:
enriquecd 2017-09-20 10:49:52 +02:00
parent 2b5240cedc
commit 3ae202ff15

View File

@ -5503,13 +5503,13 @@ function graph_nodata_image($width = 300, $height = 110, $type = 'area', $text =
$image = ui_get_full_url('images/image_problem_' . $type . '.png',
false, false, false);
if ($text == '') {
$text = __('No data to show');
}
// if ($text == '') {
// $text = __('No data to show');
// }
$text_div = '<div class="nodata_text">' . $text . '</div>';
$image_div = '<div class="nodata_container" style="background-image: url(\'' . $image . '\');">' .
$image_div = '<div class="nodata_container" style="width:80%;height:80%;background-size: 80% 80%;background-image: url(\'' . $image . '\');">' .
$text_div . '</div>';
$div = '<div style="width:' . $width . 'px; height:' . $height . 'px; border: 1px dotted #ddd; background-color: white; margin: 0 auto;">' .