From 892128a4be5bb3cfbf3b6dc2531be178706003e7 Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Wed, 19 Dec 2018 10:32:10 +0000 Subject: [PATCH] Added quick time period selection buttons. --- frontend/src/views/Stats.vue | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/Stats.vue b/frontend/src/views/Stats.vue index cf4a962..970d5f5 100644 --- a/frontend/src/views/Stats.vue +++ b/frontend/src/views/Stats.vue @@ -13,9 +13,23 @@ - - Trends - AFIs + + + + Select Chart: + Trends + AFIs + + + + + Quick Interval: + 1 Week + 1 Month + 3 Months + 1 Year + + @@ -228,6 +242,10 @@ export default { }, changeEndDate: function(e) { this.endDate = e.date; + }, + setInterval: function(amount, timeType){ + this.endDate = moment(); + this.startDate = moment().subtract(amount, timeType); } }, watch: {