diff --git a/backend/src/main/java/io/metersphere/reportstatistics/service/TestCaseCountService.java b/backend/src/main/java/io/metersphere/reportstatistics/service/TestCaseCountService.java index 81f2d4a73a..5a1f97f29e 100644 --- a/backend/src/main/java/io/metersphere/reportstatistics/service/TestCaseCountService.java +++ b/backend/src/main/java/io/metersphere/reportstatistics/service/TestCaseCountService.java @@ -496,11 +496,11 @@ public class TestCaseCountService { this.add("50%"); }}); - Map labelMap = new HashMap<>(); - Map normalMap = new HashMap<>(); - normalMap.put("show",true); - normalMap.put("formatter","{b}: {c}({d}%)"); - labelMap.put("normal",normalMap); + Map labelMap = new HashMap<>(); + Map normalMap = new HashMap<>(); + normalMap.put("show", true); + normalMap.put("formatter", "{b}: {c}({d}%)"); + labelMap.put("normal", normalMap); series.setLabel(labelMap); Title title = new Title(); diff --git a/frontend/src/business/components/reportstatistics/projectstatistics/casecount/chart/TestCaseCountChart.vue b/frontend/src/business/components/reportstatistics/projectstatistics/casecount/chart/TestCaseCountChart.vue index 4b7345b1cf..cc9ac7a427 100644 --- a/frontend/src/business/components/reportstatistics/projectstatistics/casecount/chart/TestCaseCountChart.vue +++ b/frontend/src/business/components/reportstatistics/projectstatistics/casecount/chart/TestCaseCountChart.vue @@ -31,7 +31,8 @@
@@ -148,14 +149,19 @@ export default { this.originalW = this.w; this.originalH = this.h; this.w = document.body.clientWidth - 50; - this.h = document.body.clientHeight; this.isFullScreen = true; + if (this.chartType === 'bar') { + this.chartWidthNumber = this.w; + } this.$emit('hidePage', true); }, unFullScreen() { this.w = this.originalW; this.h = this.originalH; this.isFullScreen = false; + if (this.chartType === 'bar') { + this.chartWidthNumber = this.w; + } this.$emit('hidePage', false); }, getImages(command) { @@ -167,7 +173,6 @@ export default { if (document.getElementById('picChart')) { let chartsCanvas = document.getElementById('picChart').querySelectorAll('canvas')[0]; if (chartsCanvas) { - // toDataURL()是canvas对象的一种方法,用于将canvas对象转换为base64位编码 returnImageDatas = chartsCanvas && chartsCanvas.toDataURL(imageType); } }