chart line
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<v-col style="min-width:550px; max-width:550px;" cols="1">
|
||||
<!-- <LineChart :data="chartData" /> -->
|
||||
|
||||
<div class="grid">
|
||||
<div v-for="(item, index) in items" :key="index" class="grid-item">
|
||||
{{ item.name }}
|
||||
@@ -21,9 +20,6 @@ import { Line as LineChart } from 'vue-chartjs';
|
||||
Chart.register(LineController, LineElement, CategoryScale, LinearScale, PointElement);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
components: { LineChart },
|
||||
data: () => ({
|
||||
@@ -68,48 +64,3 @@ export default {
|
||||
})
|
||||
}
|
||||
</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