From cda8b6dfb9f30d9f4db710025d4daa7e376e6ddf Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Thu, 15 Mar 2018 09:28:26 +1100 Subject: [PATCH] show charts on dashboard --- Vue_Full_Project/package.json | 4 +- Vue_Full_Project/src/dex/Chart.vue | 26 +++++++++++ Vue_Full_Project/src/dex/Database.vue | 40 ++++++++++++++++- Vue_Full_Project/src/dex/Endpoint.vue | 55 +++++++++++++++++++++++- Vue_Full_Project/src/main.js | 3 ++ Vue_Full_Project/src/views/Dashboard.vue | 9 ++-- 6 files changed, 128 insertions(+), 9 deletions(-) create mode 100644 Vue_Full_Project/src/dex/Chart.vue diff --git a/Vue_Full_Project/package.json b/Vue_Full_Project/package.json index c77269b..52e8183 100644 --- a/Vue_Full_Project/package.json +++ b/Vue_Full_Project/package.json @@ -20,13 +20,13 @@ "axios": "^0.18.0", "bootstrap": "4.0.0", "bootstrap-vue": "2.0.0-rc.1", - "chart.js": "2.7.1", + "chart.js": "^2.7.1", "flag-icon-css": "2.9.0", "font-awesome": "^4.7.0", "lodash": "^4.17.5", "simple-line-icons": "^2.4.1", "vue": "2.5.13", - "vue-chartjs": "3.1.0", + "vue-chartjs": "^3.1.0", "vue-router": "3.0.1", "vuetrend": "^0.3.2", "vuex": "^3.0.1" diff --git a/Vue_Full_Project/src/dex/Chart.vue b/Vue_Full_Project/src/dex/Chart.vue new file mode 100644 index 0000000..fffef50 --- /dev/null +++ b/Vue_Full_Project/src/dex/Chart.vue @@ -0,0 +1,26 @@ + diff --git a/Vue_Full_Project/src/dex/Database.vue b/Vue_Full_Project/src/dex/Database.vue index 24c8346..7640a7f 100644 --- a/Vue_Full_Project/src/dex/Database.vue +++ b/Vue_Full_Project/src/dex/Database.vue @@ -20,6 +20,7 @@ Today + + + \ No newline at end of file diff --git a/Vue_Full_Project/src/main.js b/Vue_Full_Project/src/main.js index ac8dad7..36afbef 100644 --- a/Vue_Full_Project/src/main.js +++ b/Vue_Full_Project/src/main.js @@ -5,6 +5,9 @@ import BootstrapVue from 'bootstrap-vue' import App from './App' import router from './router' import store from './vuex.js' +import Trend from 'vuetrend' + +Vue.use(Trend) Vue.use(BootstrapVue) /* eslint-disable no-new */ diff --git a/Vue_Full_Project/src/views/Dashboard.vue b/Vue_Full_Project/src/views/Dashboard.vue index 7966117..c50eae7 100644 --- a/Vue_Full_Project/src/views/Dashboard.vue +++ b/Vue_Full_Project/src/views/Dashboard.vue @@ -1,12 +1,13 @@