Added quick time period selection buttons.
This commit is contained in:
parent
28d75df455
commit
892128a4be
@ -13,9 +13,23 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</b-modal>
|
</b-modal>
|
||||||
<b-row>
|
<b-row class="pb-2">
|
||||||
<b-col><b-button @click="chartMode = 0; getFilteredAverage()">Trends</b-button></b-col>
|
<b-col>
|
||||||
<b-col><b-button @click="chartMode = 1; getFilteredAverage()">AFIs</b-button></b-col>
|
<b-button-group size="sm">
|
||||||
|
<b-button variant="dark">Select Chart:</b-button>
|
||||||
|
<b-button variant="outline-primary" @click="chartMode = 0; getFilteredAverage()">Trends</b-button>
|
||||||
|
<b-button variant="outline-primary" @click="chartMode = 1; getFilteredAverage()">AFIs</b-button>
|
||||||
|
</b-button-group>
|
||||||
|
</b-col>
|
||||||
|
<b-col>
|
||||||
|
<b-button-group size="sm">
|
||||||
|
<b-button variant="dark">Quick Interval:</b-button>
|
||||||
|
<b-button variant="outline-primary" v-on:click="setInterval(1, 'w'); getFilteredAverage()">1 Week</b-button>
|
||||||
|
<b-button variant="outline-primary" v-on:click="setInterval(1, 'M'); getFilteredAverage()">1 Month</b-button>
|
||||||
|
<b-button variant="outline-primary" v-on:click="setInterval(3, 'M'); getFilteredAverage()">3 Months</b-button>
|
||||||
|
<b-button variant="outline-primary" v-on:click="setInterval(1, 'y'); getFilteredAverage()">1 Year</b-button>
|
||||||
|
</b-button-group>
|
||||||
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
@ -228,6 +242,10 @@ export default {
|
|||||||
},
|
},
|
||||||
changeEndDate: function(e) {
|
changeEndDate: function(e) {
|
||||||
this.endDate = e.date;
|
this.endDate = e.date;
|
||||||
|
},
|
||||||
|
setInterval: function(amount, timeType){
|
||||||
|
this.endDate = moment();
|
||||||
|
this.startDate = moment().subtract(amount, timeType);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
Loading…
Reference in New Issue
Block a user