Added page to actually show a chart on.
This commit is contained in:
parent
b78ce805a7
commit
0eeee408ec
25
frontend/src/views/Stats.vue
Normal file
25
frontend/src/views/Stats.vue
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<template>
|
||||||
|
<stats-view v-if="chartData != null && chartData != {}" :data="chartData" :options="options" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Vue from "vue";
|
||||||
|
import StatsView from "../components/StatsView";
|
||||||
|
export default {
|
||||||
|
components: { StatsView },
|
||||||
|
data() {
|
||||||
|
chartData: null;
|
||||||
|
options: null;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getAllTimeAverage: function() {
|
||||||
|
Vue.axios.get("/api/average/all/chartjs").then(response => {
|
||||||
|
this.chartData = response.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getAllTimeAverage();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in New Issue
Block a user