chart line
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-col style="min-width:550px; max-width:550px;" cols="1">
|
<v-col style="min-width:550px; max-width:550px;" cols="1">
|
||||||
<!-- <LineChart :data="chartData" /> -->
|
<!-- <LineChart :data="chartData" /> -->
|
||||||
|
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<div v-for="(item, index) in items" :key="index" class="grid-item">
|
<div v-for="(item, index) in items" :key="index" class="grid-item">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
@@ -21,9 +20,6 @@ import { Line as LineChart } from 'vue-chartjs';
|
|||||||
Chart.register(LineController, LineElement, CategoryScale, LinearScale, PointElement);
|
Chart.register(LineController, LineElement, CategoryScale, LinearScale, PointElement);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { LineChart },
|
components: { LineChart },
|
||||||
data: () => ({
|
data: () => ({
|
||||||
@@ -67,49 +63,4 @@ export default {
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <template>
|
|
||||||
<v-col style="min-width:550px; max-width:550px;" cols="1">
|
|
||||||
<LineChart :data="chartData" />
|
|
||||||
</v-col>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
|
|
||||||
import { Chart, LineController, LineElement, CategoryScale, LinearScale, PointElement } from 'chart.js';
|
|
||||||
import { Line as LineChart } from 'vue-chartjs';
|
|
||||||
Chart.register(LineController, LineElement, CategoryScale, LinearScale, PointElement);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: { LineChart },
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
chartData: {
|
|
||||||
labels: ['January', 'February', 'March'],
|
|
||||||
datasets: [
|
|
||||||
{
|
|
||||||
label: "CPU Usage",
|
|
||||||
backgroundColor: "#41b883",
|
|
||||||
data: [90, 99, 99, 20, 10]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Mem Usage",
|
|
||||||
backgroundColor: "#FFAA0C",
|
|
||||||
data: [400, 400, 200, 100, 200]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script> -->
|
|
||||||
Reference in New Issue
Block a user