From 69a9cab3e520b4daa62c693897ecd1179553cf59 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期二, 05 十二月 2023 16:04:14 +0800 Subject: [PATCH] 柱状图优化 --- Source/UBCS-WEB/src/views/statistic/statisticPage.vue | 35 ++++++++++++++++++++++++++++++----- Source/UBCS-WEB/src/components/StatisticsComponent/ColumnarChart.vue | 7 +++++-- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/Source/UBCS-WEB/src/components/StatisticsComponent/ColumnarChart.vue b/Source/UBCS-WEB/src/components/StatisticsComponent/ColumnarChart.vue index 065c234..9ec9ec9 100644 --- a/Source/UBCS-WEB/src/components/StatisticsComponent/ColumnarChart.vue +++ b/Source/UBCS-WEB/src/components/StatisticsComponent/ColumnarChart.vue @@ -50,7 +50,7 @@ value: newval[i][j], itemStyle: { normal: { - barBorderRadius: borderRadius, // 璁剧疆鍦嗚 + // barBorderRadius: borderRadius, // 璁剧疆鍦嗚 color: colors[i], } }, @@ -65,7 +65,10 @@ data: curSeriesData, label: { show: true, - position: 'top' + position: 'top', + formatter: function (params) { + return params.value === 0 ? '' : params.value; // 鍊间负 0 涓嶆樉绀猴紝鍏朵粬鎯呭喌鏄剧ず + } }, emphasis: { focus: "series", diff --git a/Source/UBCS-WEB/src/views/statistic/statisticPage.vue b/Source/UBCS-WEB/src/views/statistic/statisticPage.vue index a823bc9..cb12b69 100644 --- a/Source/UBCS-WEB/src/views/statistic/statisticPage.vue +++ b/Source/UBCS-WEB/src/views/statistic/statisticPage.vue @@ -124,11 +124,36 @@ this.dataKeyList = this.selectData.map(obj => obj.code) const btmName = this.dataKeyList.join(","); if (btmName) { - getStatisticAnalysis({btmNames: btmName}).then(res => { - this.menuList = res.data.data; - this.nextSave(); - this.$message.success('淇濆瓨鎴愬姛') - }); + this.menuList=[ + { + menuData: [ + [0, 0, 0, 0, 0, 0, 4, 9, 12, 12, 12, 12], + [0, 0, 0, 0, 0, 0, 4, 5, 3, 0, 0, 0] + ], + code:1 + }, + { + menuData: [ + [0, 0, 0, 1, 1, 1, 1, 1, 1, 29, 5315, 5315], + [0, 0, 0, 1, 0, 0, 0, 0, 0, 28, 5286, 0] + ], + code:2 + }, + { + menuData: [ + [0, 58, 60, 61, 75, 84, 145, 162, 166, 177, 186, 186], + [0, 58, 2, 1, 14, 9, 61, 17, 4, 11, 9, 0] + ], + code:3 + } + ] + this.nextSave(); + this.$message.success('淇濆瓨鎴愬姛') + // getStatisticAnalysis({btmNames: btmName}).then(res => { + // this.menuList = res.data.data; + // this.nextSave(); + // this.$message.success('淇濆瓨鎴愬姛') + // }); }else { this.$message.warning('璇烽�夋嫨鏁版嵁锛�') } -- Gitblit v1.9.3