From e55e6bb3f32ad231e0588ecb2e94932691967ad9 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 13 Jun 2016 17:33:26 +0200 Subject: [PATCH] Added tooltips to the horizontal and vertical short labels. Ticket #3634 (cherry picked from commit 1e732146df33449c1450d2bca872792bda81d64b) --- pandora_console/include/graphs/flot/pandora.flot.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 7db304b24f..b32d28d43e 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -337,6 +337,7 @@ function pandoraFlotHBars(graph_id, values, labels, water_mark, $('#' + graph_id).HUseTooltip(); $('#' + graph_id).css("margin-left","auto"); $('#' + graph_id).css("margin-right","auto"); + $('#' + graph_id).find('div.legend-tooltip').tooltip({ track: true }); // Adjust the top of yaxis tick to set it in the middle of the bars //yAxisHeight = $('#' + graph_id + ' .yAxis .tickLabel') //.css('height').split('px')[0]; @@ -464,7 +465,7 @@ function pandoraFlotHBars(graph_id, values, labels, water_mark, title = label; label = shortLabel; } - format.push([i,'
' + format.push([i,'
' + label + '
']); } @@ -623,6 +624,7 @@ function pandoraFlotVBars(graph_id, values, labels, labels_long, legend, colors, $('#' + graph_id).VUseTooltip(); $('#' + graph_id).css("margin-left","auto"); $('#' + graph_id).css("margin-right","auto"); + $('#' + graph_id).find('div.legend-tooltip').tooltip({ track: true }); // Adjust the top of yaxis tick to set it in the middle of the bars //yAxisHeight = $('#'+graph_id+' .yAxis .tickLabel').css('height').split('px')[0]; @@ -693,7 +695,7 @@ function pandoraFlotVBars(graph_id, values, labels, labels_long, legend, colors, label = shortLabel; } format.push([i, - '
' + '
' + label + '
']); }