mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Added resize functionality to flot graphs and fix overview in container graphs
This commit is contained in:
parent
6a71b9a359
commit
78ef64ead2
@ -102,7 +102,7 @@ echo "</div>";
|
|||||||
}
|
}
|
||||||
|
|
||||||
$('div[class *= bullet]').css('margin-left','0');
|
$('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%');
|
$('div[id *= gauge_]').css('width','100%');
|
||||||
|
|
||||||
$('select[id *= period_container_'+hash+']').change(function() {
|
$('select[id *= period_container_'+hash+']').change(function() {
|
||||||
|
@ -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 the overview plot to the width and position of the main plot
|
||||||
adjust_left_width_canvas(graph_id, 'overview_'+graph_id);
|
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
|
// 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);
|
$('#'+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) {
|
function check_adaptions(graph_id) {
|
||||||
var classes = $('#'+graph_id).attr('class').split(' ');
|
var classes = $('#'+graph_id).attr('class').split(' ');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user