13357-Fix datalabel in horizontal bars graph pdf

This commit is contained in:
Pablo Aragon 2024-05-06 14:38:53 +02:00
parent ca7c0f26a3
commit 55f2eb1fad
2 changed files with 6 additions and 1 deletions

View File

@ -3508,7 +3508,11 @@ function graph_custom_sql_graph(
} }
if ((int) $ttl === 2) { if ((int) $ttl === 2) {
$options['dataLabel'] = ['display' => 'auto']; $options['dataLabel'] = ['display' => true];
if ($layout !== false && is_array($layout) === true) {
$options['layout'] = $layout;
}
} }
$output .= vbar_graph( $output .= vbar_graph(

View File

@ -6690,6 +6690,7 @@ function reporting_sql_graph(
switch ($type_sql_graph) { switch ($type_sql_graph) {
case 'sql_graph_hbar': case 'sql_graph_hbar':
default: default:
$layout = ['padding' => ['right' => '40']];
$return['type'] = 'sql_graph_hbar'; $return['type'] = 'sql_graph_hbar';
break; break;