From: opi Date: Sun, 22 Feb 2015 10:09:36 +0000 (+0100) Subject: Correction du calcul de minTime & maxTime pour les graphes de BP. X-Git-Url: https://nos-oignons.net/gitweb/website.git/commitdiff_plain/3c424d37cc1c861916564a407d0818d95379c237 Correction du calcul de minTime & maxTime pour les graphes de BP. --- diff --git a/assets/bw_graphs.js b/assets/bw_graphs.js index bcd0216..900e126 100644 --- a/assets/bw_graphs.js +++ b/assets/bw_graphs.js @@ -104,11 +104,11 @@ BwDrawer.draw_bandwidth_graph = function(raw_data, selector, period) { throw "PANIC: Different interval for different relays in the same time period."; } }); - var minTime = d3.max(raw_data.relays, function(d) { + var minTime = d3.min(raw_data.relays, function(d) { return d['read_history'][period] && BwDrawer.parseTime(d['read_history'][period].first) && d['write_history'][period] && BwDrawer.parseTime(d['write_history'][period].first); }); - var maxTime = d3.min(raw_data.relays, function(d) { + var maxTime = d3.max(raw_data.relays, function(d) { return d['read_history'][period] && BwDrawer.parseTime(d['read_history'][period].last) && d['write_history'][period] && BwDrawer.parseTime(d['write_history'][period].last); });