mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 04:09:29 +02:00
Add chart
This commit is contained in:
27
luckydiamond/package-lock.json
generated
27
luckydiamond/package-lock.json
generated
@@ -18,6 +18,7 @@
|
|||||||
"save": "^2.9.0",
|
"save": "^2.9.0",
|
||||||
"swiper": "^11.0.5",
|
"swiper": "^11.0.5",
|
||||||
"vue": "^3.2.13",
|
"vue": "^3.2.13",
|
||||||
|
"vue-chart-3": "^3.1.8",
|
||||||
"vue-recaptcha": "^3.0.0-alpha.6",
|
"vue-recaptcha": "^3.0.0-alpha.6",
|
||||||
"vue-router": "^4.2.5",
|
"vue-router": "^4.2.5",
|
||||||
"vue3-recaptcha2": "^1.8.0"
|
"vue3-recaptcha2": "^1.8.0"
|
||||||
@@ -4306,6 +4307,12 @@
|
|||||||
"node": ">=4"
|
"node": ">=4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/chart.js": {
|
||||||
|
"version": "3.9.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.9.1.tgz",
|
||||||
|
"integrity": "sha512-Ro2JbLmvg83gXF5F4sniaQ+lTbSv18E+TIf2cOeiH1Iqd2PGFOtem+DUufMZsCJwFE7ywPOpfXFBwRTGq7dh6w==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
"node_modules/chokidar": {
|
"node_modules/chokidar": {
|
||||||
"version": "3.5.3",
|
"version": "3.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
|
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
|
||||||
@@ -7807,6 +7814,11 @@
|
|||||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/lodash-es": {
|
||||||
|
"version": "4.17.21",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
|
||||||
|
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
|
||||||
|
},
|
||||||
"node_modules/lodash.assign": {
|
"node_modules/lodash.assign": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz",
|
||||||
@@ -11561,6 +11573,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/vue-chart-3": {
|
||||||
|
"version": "3.1.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue-chart-3/-/vue-chart-3-3.1.8.tgz",
|
||||||
|
"integrity": "sha512-zX5ajjQi/PocEqLETlej3vp92q/tnI/Fvu2RVb++Kap8qOrXu6PXCpodi73BFrWzEGZIAnqoUxC3OIkRWD657g==",
|
||||||
|
"dependencies": {
|
||||||
|
"@vue/runtime-core": "latest",
|
||||||
|
"@vue/runtime-dom": "latest",
|
||||||
|
"csstype": "latest",
|
||||||
|
"lodash-es": "latest"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"chart.js": "=> ^3.1.0",
|
||||||
|
"vue": ">= 3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/vue-demi": {
|
"node_modules/vue-demi": {
|
||||||
"version": "0.14.6",
|
"version": "0.14.6",
|
||||||
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz",
|
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz",
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
"save": "^2.9.0",
|
"save": "^2.9.0",
|
||||||
"swiper": "^11.0.5",
|
"swiper": "^11.0.5",
|
||||||
"vue": "^3.2.13",
|
"vue": "^3.2.13",
|
||||||
|
"vue-chart-3": "^3.1.8",
|
||||||
"vue-recaptcha": "^3.0.0-alpha.6",
|
"vue-recaptcha": "^3.0.0-alpha.6",
|
||||||
"vue-router": "^4.2.5",
|
"vue-router": "^4.2.5",
|
||||||
"vue3-recaptcha2": "^1.8.0"
|
"vue3-recaptcha2": "^1.8.0"
|
||||||
|
|||||||
@@ -1,28 +1,50 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="content__grid-profile" >
|
<LineChart
|
||||||
<aside-bar-component></aside-bar-component>
|
:chart-data="data"
|
||||||
|
:options="options"
|
||||||
<chat-component></chat-component>
|
css-classes="chart-container"
|
||||||
|
/>
|
||||||
<header-component></header-component>
|
</template>
|
||||||
|
|
||||||
<section class="settings"></section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import AsideBarComponent from "@/components/AsidebarComponent.vue";
|
|
||||||
import ChatComponent from "@/components/ChatComponent.vue";
|
|
||||||
import HeaderComponent from "@/components/HeaderComponent.vue";
|
|
||||||
|
|
||||||
import '@/assets/css/PagesStyles/SettingsPage.css'
|
<script setup>
|
||||||
export default {
|
import { ref, computed } from "vue"
|
||||||
components: {
|
import { LineChart } from "vue-chart-3"
|
||||||
ChatComponent,
|
import {
|
||||||
HeaderComponent,
|
Chart,
|
||||||
AsideBarComponent
|
LineController,
|
||||||
}
|
CategoryScale,
|
||||||
|
LinearScale,
|
||||||
|
PointElement,
|
||||||
|
LineElement
|
||||||
|
} from "chart.js"
|
||||||
|
|
||||||
|
Chart.register(
|
||||||
|
LineController,
|
||||||
|
CategoryScale,
|
||||||
|
LinearScale,
|
||||||
|
PointElement,
|
||||||
|
LineElement
|
||||||
|
)
|
||||||
|
|
||||||
|
const dataValues = ref([13, 14,16])
|
||||||
|
|
||||||
|
const data = computed(() => ({
|
||||||
|
labels: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
||||||
|
|
||||||
|
datasets: [
|
||||||
|
{
|
||||||
|
label: "Foo",
|
||||||
|
data: dataValues.value,
|
||||||
|
backgroundColor: "#dc322f"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}))
|
||||||
|
|
||||||
|
const options = ref({
|
||||||
|
plugins: {
|
||||||
|
title: {
|
||||||
|
text: "Line"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
})
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user