Visual Console Refactor: minor fix

Former-commit-id: 67f29813f66ae21e8e1ae2e49a8b8669b355df2d
This commit is contained in:
Alejandro Gallardo Escobar 2019-04-16 19:38:09 +02:00
parent 3057e93b97
commit a8dfe1acaf
1 changed files with 4 additions and 21 deletions

View File

@ -256,23 +256,6 @@ final class BarsGraph extends Item
'url' => \ui_get_full_url(false, false, false, false).'images/logo_vertical_water.png', 'url' => \ui_get_full_url(false, false, false, false).'images/logo_vertical_water.png',
]; ];
switch ($data['label_position']) {
case 'left':
$divStart = '<div style="float:left;height:15px;">';
$divEnd = '</div>';
break;
case 'right':
$divStart = '<div style="float:right;height:15px;">';
$divEnd = '</div>';
break;
default:
$divStart = '';
$divEnd = '';
break;
}
if ((int) $data['width'] === 0 || (int) $data['height'] === 0) { if ((int) $data['width'] === 0 || (int) $data['height'] === 0) {
$width = 400; $width = 400;
$height = 400; $height = 400;
@ -282,7 +265,7 @@ final class BarsGraph extends Item
} }
if ($typeGraph === 'horizontal') { if ($typeGraph === 'horizontal') {
$graph = $divStart.\hbar_graph( $graph = \hbar_graph(
$moduleData, $moduleData,
$width, $width,
$height, $height,
@ -305,9 +288,9 @@ final class BarsGraph extends Item
$config['homeurl'], $config['homeurl'],
$backGroundColor, $backGroundColor,
$gridColor $gridColor
).$divEnd; );
} else { } else {
$graph = $divStart.\vbar_graph( $graph = \vbar_graph(
$moduleData, $moduleData,
$width, $width,
$height, $height,
@ -332,7 +315,7 @@ final class BarsGraph extends Item
true, true,
false, false,
$gridColor $gridColor
).$divEnd; );
} }
// Restore connection. // Restore connection.