diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php
index 50939b4271..259876c896 100644
--- a/pandora_console/include/graphs/fgraph.php
+++ b/pandora_console/include/graphs/fgraph.php
@@ -653,13 +653,13 @@ function hbar_graph($flash_chart, $chart_data, $width, $height,
else {
foreach ($chart_data as $key => $value) {
- if(strlen($key) > 40){
- if(strpos($key, ' - ') != -1){
- $key_temp = explode(" - ",$key);
- $key_temp[0] = $key_temp[0]." \n";
+ $str_key = io_safe_output($key);
+ if(strlen($str_key) > 40){
+ if(strpos($str_key, ' - ') != -1){
+ $key_temp = explode(" - ",$str_key);
+ $key_temp[0] = $key_temp[0]."
";
$key_temp[1]= '...'.substr($key_temp[1],-20);
$key2 = $key_temp[0].$key_temp[1];
- io_safe_output($key2);
}
$chart_data[$key2]['g'] = $chart_data[$key]['g'];
unset($chart_data[$key]);
diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js
index 9719f77642..400125a219 100644
--- a/pandora_console/include/graphs/flot/pandora.flot.js
+++ b/pandora_console/include/graphs/flot/pandora.flot.js
@@ -419,28 +419,22 @@ function pandoraFlotHBars(graph_id, values, labels, water_mark,
for (i = 0; i < labels_total.length; i++) {
var label = labels_total[i][1];
// var shortLabel = reduceText(label, 25);
- var title = '';
- // if (label !== shortLabel) {
- title = label;
- // label = shortLabel;
- // }
-
- if(label.length > 30){
- if(label.indexOf(" - ")){
- var label_temp = label.split(" - ");
- }
- else if(label.indexOf(" ")){
- var label_temp = label.split(" ");
- }
- else{
- var label_temp = '';
- label_temp[0] = label.substring(0, (label.length/2));
- label_temp[1] = label.substring((label.length/2));
- }
- label = reduceText(label_temp[0], 20)+"
"+reduceText(label_temp[1], 20);
+ var title = label;
+ var margin_top = 0;
+ if(label.length > 33){
+ label = reduceText(label, 33);
}
-
- format.push([i,'