diff --git a/mindinsight/ui/src/views/train-manage/data-traceback.vue b/mindinsight/ui/src/views/train-manage/data-traceback.vue index 2bf0f4487116e62beb63a66df945e485283adf1d..2b62566f1c88cbf9999d86615197a1fc3db0f280 100644 --- a/mindinsight/ui/src/views/train-manage/data-traceback.vue +++ b/mindinsight/ui/src/views/train-manage/data-traceback.vue @@ -811,6 +811,9 @@ export default { unhideRecords() { this.showEchartPic = true; this.$refs.table.clearSelection(); + if (this.parallelEchart) { + this.parallelEchart.clear(); + } this.$store.commit('setHidenDirChecked', []); if (this.hidenDirChecked.length) { this.checkedSummary = []; @@ -1421,8 +1424,11 @@ export default { this.echart.showData = this.echart.brushData; this.showEchartPic = true; } + this.resizeChart(); this.setEchartValue(); - this.initChart(); + this.$nextTick(() => { + this.initChart(); + }); // Total number of pages in the table this.pagination.total = res.data.count; // Data encapsulation of the table @@ -1469,7 +1475,13 @@ export default { * The window size changes. Resizing Chart */ resizeChart() { - this.parallelEchart.resize(); + if ( + document.getElementById('data-echart') && + document.getElementById('data-echart').style.display !== 'none' && + this.parallelEchart + ) { + this.parallelEchart.resize(); + } }, /** diff --git a/mindinsight/ui/src/views/train-manage/model-traceback.vue b/mindinsight/ui/src/views/train-manage/model-traceback.vue index d9c92d4702790edf5204719da8c7fbb97e988e52..a2cf2e54b7e6c290d3743b6a9b55fbd28023fcaa 100644 --- a/mindinsight/ui/src/views/train-manage/model-traceback.vue +++ b/mindinsight/ui/src/views/train-manage/model-traceback.vue @@ -1386,7 +1386,10 @@ export default { this.echart.allData = list; this.echart.brushData = list; this.echart.showData = this.echart.brushData; - this.initChart(); + this.$nextTick(() => { + this.resizeChart(); + this.initChart(); + }); const showList = list.slice( (this.pagination.currentPage - 1) * this.pagination.pageSize, this.pagination.currentPage * this.pagination.pageSize,