From 2aa420e6231506e8572f6abecc0d3d115be04c81 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 30 May 2016 17:33:13 +0200 Subject: [PATCH] Re-calculate the area graph height with the legend height --- pandora_console/include/graphs/flot/pandora.flot.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 0170dfc1c2..845239ecfd 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -1524,6 +1524,10 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, var plot = $.plot($('#' + graph_id), datas, options); + // Re-calculate the graph height with the legend height + $('#'+graph_id).css('height', + $('#'+graph_id).height() - $('#legend_'+graph_id).height()); + if (vconsole) { var myCanvas = plot.getCanvas(); plot.setupGrid(); // redraw plot to new size