From b530ff1ee2126ec0cda37e6a5cf81f22db6f26f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Fri, 25 Jun 2021 12:56:03 +0200 Subject: [PATCH] Added control for font-size in events graph in agent view --- pandora_console/include/graphs/flot/pandora.flot.js | 10 +++++----- pandora_console/include/graphs/functions_flot.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 317be091e7..213cbb1c05 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -806,11 +806,7 @@ function pandoraFlotSlicebar( tickFormatter: xFormatter, color: "", tickSize: intervaltick, - tickLength: 0, - font: { - size: font_size + 2, - family: font - } + tickLength: 0 } ], yaxes: [ @@ -834,6 +830,10 @@ function pandoraFlotSlicebar( $.plot($("#" + graph_id), datas, options); + // Added for correct handle of the font size. + // xaxes-yaxes object not handle font-size properly. + $(".flot-x-axis .flot-tick-label").css("font-size", font_size); + if (match == null && not_interactive == 0) { // Events $("#" + graph_id).bind("plothover", function(event, pos, item) { diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index eabaa8c6b9..247dc911b8 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -778,7 +778,7 @@ function flot_slicesbar_graph( $datacolor = []; - $fontsize = $config['font_size']; + $fontsize = ((int) $config['font_size'] + 2); $fontpath = $config['fontpath']; $return .= '';