Added page to actually show a chart on.

This commit is contained in:
neviyn 2018-09-17 13:36:13 +01:00
parent b78ce805a7
commit 0eeee408ec

View 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>