diff --git a/pandora_console/include/lib/Dashboard/Widgets/BasicChart.php b/pandora_console/include/lib/Dashboard/Widgets/BasicChart.php index 8041cf77d9..ec02614285 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/BasicChart.php +++ b/pandora_console/include/lib/Dashboard/Widgets/BasicChart.php @@ -561,7 +561,6 @@ class BasicChart extends Widget global $config; $size = parent::getSize(); - hd($size, true); include_once $config['homedir'].'/include/functions_graph.php'; include_once $config['homedir'].'/include/functions_agents.php'; @@ -625,16 +624,20 @@ class BasicChart extends Widget ], ]; + $graph = \grafico_modulo_sparse($params); $output = '
'; - $output .= '
'; - $output .= ''; - $output .= ((bool) $this->values['showLabel'] === true) ? $title : ''; - $output .= ''; - $output .= ''; - $output .= ((bool) $this->values['showValue'] === true) ? $value : ''; - $output .= ''; - $output .= '
'; - $output .= \grafico_modulo_sparse($params); + if (str_contains($graph, 'values['colorLabel'].'; font-size:'.$this->values['sizeLabel'].'px;">'; + $output .= ((bool) $this->values['showLabel'] === true) ? $title : ''; + $output .= ''; + $output .= ''; + $output .= ((bool) $this->values['showValue'] === true) ? $value : ''; + $output .= ''; + $output .= '
'; + } + + $output .= $graph; $output .= ''; return $output; }