diff --git a/pandora_console/godmode/reporting/graph_container.php b/pandora_console/godmode/reporting/graph_container.php index 5be4af15a2..613370d256 100644 --- a/pandora_console/godmode/reporting/graph_container.php +++ b/pandora_console/godmode/reporting/graph_container.php @@ -102,7 +102,7 @@ echo ""; } $('div[class *= bullet]').css('margin-left','0'); - $('div[class *= graph]').css('margin-left','0'); + $('div[class = graph]').css('margin-left','0'); $('div[id *= gauge_]').css('width','100%'); $('select[id *= period_container_'+hash+']').change(function() { diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 6fe97ae606..abec37f45b 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -1601,6 +1601,12 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, // Adjust the overview plot to the width and position of the main plot adjust_left_width_canvas(graph_id, 'overview_'+graph_id); + update_left_width_canvas(graph_id); + + // Adjust overview when main chart is resized + $('#'+graph_id).resize(function(){ + update_left_width_canvas(graph_id); + }); // Adjust linked graph to the width and position of the main plot @@ -2139,6 +2145,12 @@ function adjust_left_width_canvas(adapter_id, adapted_id) { $('#'+adapted_id).css('margin-left', adapter_left_margin); } + +function update_left_width_canvas(graph_id) { + $('#overview_'+graph_id).width($('#'+graph_id).width() - 30); + $('#overview_'+graph_id).css('margin-left', $('#'+graph_id+' .yAxis .tickLabel').width()); +} + function check_adaptions(graph_id) { var classes = $('#'+graph_id).attr('class').split(' ');