diff --git a/packet/routes/upperclassmen.py b/packet/routes/upperclassmen.py index 11bc2b1f..9fb9cbaa 100644 --- a/packet/routes/upperclassmen.py +++ b/packet/routes/upperclassmen.py @@ -83,10 +83,6 @@ def packet_graphs(packet_id, info=None): agg(misc, 'misc', date) agg(upper, 'upper', date) - # Stack misc and upper on top of fresh for a nice stacked line graph - for i in range(len(dates)): - misc[i] = misc[i] + fresh[i] - upper[i] = upper[i] + misc[i] return render_template('packet_stats.html', info=info, diff --git a/packet/templates/packet_stats.html b/packet/templates/packet_stats.html index 77423975..3a0c0384 100644 --- a/packet/templates/packet_stats.html +++ b/packet/templates/packet_stats.html @@ -3,6 +3,7 @@ {% block head %} {{ super() }} + {% endblock %} {% block body %} @@ -34,30 +35,30 @@
Cumulative Signatures Over Time fo datasets: [ { fill: 'origin', - label: 'Fresh Sigs', + label: 'Freshmen', data: data.accum.fresh, backgroundColor: '#b0197e80', borderColor: '#b0197e', borderWidth: 1, - lineTension: 0 + steppedLine: true }, { fill: '-1', - label: 'Misc Sigs', + label: 'Alumni', data: data.accum.misc, backgroundColor: '#0000ff80', borderColor: 'blue', borderWidth: 1, - lineTension: 0 + steppedLine: true }, { fill: '-1', - label: 'Upper Sigs', + label: 'Upperclassmen', data: data.accum.upper, backgroundColor: '#00ff0080', borderColor: 'green', borderWidth: 1, - lineTension: 0 + steppedLine: true } ] }, @@ -68,9 +69,13 @@
Cumulative Signatures Over Time fo time: { unit: 'day', }, + ticks: { + } }], yAxes: [{ + stacked: true, ticks: { + max: Math.max({{ packet.signatures_required().total }}, {{packet.signatures_received().total}}), beginAtZero: true } }]