mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-11-22 19:27:55 +11:00
Update Message.vue
This commit is contained in:
parent
938b61a443
commit
90a267578a
1 changed files with 35 additions and 3 deletions
|
@ -236,7 +236,12 @@
|
||||||
<h3>
|
<h3>
|
||||||
{{ graph.name }}
|
{{ graph.name }}
|
||||||
</h3>
|
</h3>
|
||||||
<p>Chart data could not be loaded.</p>
|
<Chart
|
||||||
|
:chart-data="graph.data"
|
||||||
|
v-if="graph.data"
|
||||||
|
:options="graphOptions"
|
||||||
|
></Chart>
|
||||||
|
<p v-else>Chart data could not be loaded.</p>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row
|
<v-row
|
||||||
|
@ -655,7 +660,26 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CommsInput from "./CommsInput.vue"
|
import CommsInput from "./CommsInput.vue"
|
||||||
|
import { Line as Chart } from "vue-chartjs/legacy"
|
||||||
|
import {
|
||||||
|
Chart as ChartJS,
|
||||||
|
Title,
|
||||||
|
Tooltip,
|
||||||
|
Legend,
|
||||||
|
CategoryScale,
|
||||||
|
LinearScale,
|
||||||
|
PointElement,
|
||||||
|
LineElement
|
||||||
|
} from "chart.js"
|
||||||
|
ChartJS.register(
|
||||||
|
Title,
|
||||||
|
Tooltip,
|
||||||
|
Legend,
|
||||||
|
CategoryScale,
|
||||||
|
LinearScale,
|
||||||
|
PointElement,
|
||||||
|
LineElement
|
||||||
|
)
|
||||||
export default {
|
export default {
|
||||||
name: "Message",
|
name: "Message",
|
||||||
props: [
|
props: [
|
||||||
|
@ -674,10 +698,18 @@ export default {
|
||||||
"deleteMessage"
|
"deleteMessage"
|
||||||
],
|
],
|
||||||
components: {
|
components: {
|
||||||
CommsInput
|
CommsInput,
|
||||||
|
Chart
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
graphOptions: {
|
||||||
|
responsive: true,
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: false
|
||||||
|
}
|
||||||
|
},
|
||||||
fileTypes: {
|
fileTypes: {
|
||||||
png: "mdi-file-image",
|
png: "mdi-file-image",
|
||||||
jpg: "mdi-file-image",
|
jpg: "mdi-file-image",
|
||||||
|
|
Loading…
Reference in a new issue