13356-Fix vertical bar percentage label in pdf

This commit is contained in:
Pablo Aragon 2024-04-23 09:58:52 +02:00
parent 2aff3b5d96
commit d10c4bfab2
2 changed files with 10 additions and 2 deletions

View File

@ -3308,7 +3308,8 @@ function graph_custom_sql_graph(
$only_image=false,
$homeurl='',
$ttl=1,
$max_num_elements=8
$max_num_elements=8,
$layout=false
) {
global $config;
@ -3509,6 +3510,10 @@ function graph_custom_sql_graph(
if ((int) $ttl === 2) {
$options['dataLabel'] = ['display' => 'auto'];
if ($layout !== false && is_array($layout) === true) {
$options['layout'] = $layout;
}
}
$output .= vbar_graph(

View File

@ -6686,6 +6686,7 @@ function reporting_sql_graph(
$type_sql_graph
) {
global $config;
$layout = false;
switch ($type_sql_graph) {
case 'sql_graph_hbar':
@ -6694,6 +6695,7 @@ function reporting_sql_graph(
break;
case 'sql_graph_vbar':
$layout = ['padding' => ['top' => '40']];
$return['type'] = 'sql_graph_vbar';
break;
@ -6768,7 +6770,8 @@ function reporting_sql_graph(
$only_image,
ui_get_full_url(false, false, false, false),
$ttl,
$content['top_n_value']
$content['top_n_value'],
$layout
);
break;