From f651320ef3e0b6e0b5632ddf92903e492bc692e9 Mon Sep 17 00:00:00 2001 From: Sasha Romijn Date: Wed, 9 Oct 2019 15:46:22 +0000 Subject: [PATCH] Fix #2331 - Show stacked bar graph for in time and late reviews. On the stats page, a single stacked bar graph is now shown which combines in time and late reviews, replacing the separate graphs for these statistics. Tests for the charts are also expanded to validate the actual graph content for both stacked and non-stacked charts. Commit ready for merge. - Legacy-Id: 16852 --- .../static/flot/jquery.flot.stack.min.js | 7 ++++ ietf/stats/tests.py | 20 +++++++++- ietf/stats/views.py | 37 ++++++++++++------- ietf/templates/stats/review_stats.html | 3 +- 4 files changed, 52 insertions(+), 15 deletions(-) create mode 100644 ietf/externals/static/flot/jquery.flot.stack.min.js diff --git a/ietf/externals/static/flot/jquery.flot.stack.min.js b/ietf/externals/static/flot/jquery.flot.stack.min.js new file mode 100644 index 000000000..920764f5e --- /dev/null +++ b/ietf/externals/static/flot/jquery.flot.stack.min.js @@ -0,0 +1,7 @@ +/* Javascript plotting library for jQuery, version 0.8.3. + +Copyright (c) 2007-2014 IOLA and Ole Laursen. +Licensed under the MIT license. + +*/ +(function($){var options={series:{stack:null}};function init(plot){function findMatchingSeries(s,allseries){var res=null;for(var i=0;i2&&(horizontal?datapoints.format[2].x:datapoints.format[2].y),withsteps=withlines&&s.lines.steps,fromgap=true,keyOffset=horizontal?1:0,accumulateOffset=horizontal?0:1,i=0,j=0,l,m;while(true){if(i>=points.length)break;l=newpoints.length;if(points[i]==null){for(m=0;m=otherpoints.length){if(!withlines){for(m=0;mqx){if(withlines&&i>0&&points[i-ps]!=null){intery=py+(points[i-ps+accumulateOffset]-py)*(qx-px)/(points[i-ps+keyOffset]-px);newpoints.push(qx);newpoints.push(intery+qy);for(m=2;m0&&otherpoints[j-otherps]!=null)bottom=qy+(otherpoints[j-otherps+accumulateOffset]-qy)*(px-qx)/(otherpoints[j-otherps+keyOffset]-qx);newpoints[l+accumulateOffset]+=bottom;i+=ps}fromgap=false;if(l!=newpoints.length&&withbottom)newpoints[l+2]+=bottom}if(withsteps&&l!=newpoints.length&&l>0&&newpoints[l]!=null&&newpoints[l]!=newpoints[l-ps]&&newpoints[l+1]!=newpoints[l-ps+1]){for(m=0;m + {% endif %} {% endblock %}