This commit is contained in:
2020-05-27 14:02:03 +00:00
parent ee9bfb9bfc
commit ce8bb7b7df
2 changed files with 11 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ import { Line } from "vue-chartjs";
export default { export default {
extends: Line, extends: Line,
props: { props: {
chartdata: { chartData: {
type: Object, type: Object,
default: null default: null
}, },
@@ -13,8 +13,16 @@ export default {
default: null default: null
} }
}, },
watch: {
chartData() {
// debugger;
// this.$data._chart.update();
// this.$data._chart.renderChart();
this.renderChart(this.chartData, this.options);
}
},
mounted() { mounted() {
this.renderChart(this.chartdata, this.options); this.renderChart(this.chartData, this.options);
} }
}; };
</script> </script>

View File

@@ -16,7 +16,7 @@
</v-col> --> </v-col> -->
{{ $vuetify.breakpoint.name }} {{ $vuetify.breakpoint.name }}
<v-col cols="12"> <v-col cols="12">
<gz-chart-line :chartdata="cpuChartData" :options="chartOptions" /> <gz-chart-line :chartData="cpuChartData" :options="chartOptions" />
</v-col> </v-col>
<!-- <v-col cols="12"> <!-- <v-col cols="12">