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 {
extends: Line,
props: {
chartdata: {
chartData: {
type: Object,
default: null
},
@@ -13,8 +13,16 @@ export default {
default: null
}
},
watch: {
chartData() {
// debugger;
// this.$data._chart.update();
// this.$data._chart.renderChart();
this.renderChart(this.chartData, this.options);
}
},
mounted() {
this.renderChart(this.chartdata, this.options);
this.renderChart(this.chartData, this.options);
}
};
</script>

View File

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