From 7610df9f2155c82f4a5f554b9f4c7f0446be6261 Mon Sep 17 00:00:00 2001
From: yuxc <653031404@qq.com>
Date: 星期四, 14 十二月 2023 15:44:47 +0800
Subject: [PATCH] 1、图形统计用户新增图形保存功能
---
Source/UBCS-WEB/src/components/StatisticsComponent/ColumnarChart.vue | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/StatisticsComponent/ColumnarChart.vue b/Source/UBCS-WEB/src/components/StatisticsComponent/ColumnarChart.vue
index cffc3c5..3824b23 100644
--- a/Source/UBCS-WEB/src/components/StatisticsComponent/ColumnarChart.vue
+++ b/Source/UBCS-WEB/src/components/StatisticsComponent/ColumnarChart.vue
@@ -36,7 +36,7 @@
);
});
- let colors = ["#91CC75", "#5470C6"];
+ let colors = ['#84C9E5', '#F68686'];
const seriesData = [];
for (let i = 0; i < newval.length; i++) {
@@ -50,7 +50,7 @@
value: newval[i][j],
itemStyle: {
normal: {
- barBorderRadius: borderRadius, // 璁剧疆鍦嗚
+ // barBorderRadius: borderRadius, // 璁剧疆鍦嗚
color: colors[i],
}
},
@@ -61,10 +61,14 @@
name: seriesName,
type: "bar",
stack: "鎬婚噺",
+ barWidth: 60,
data: curSeriesData,
label: {
show: true,
- position: 'top'
+ position: 'top',
+ formatter: function (params) {
+ return params.value === 0 ? '' : params.value; // 鍊间负 0 涓嶆樉绀猴紝鍏朵粬鎯呭喌鏄剧ず
+ }
},
emphasis: {
focus: "series",
@@ -78,7 +82,6 @@
chartName:{
handler(newval,oldval){
if(newval){
- console.log(newval)
this.chartOptions.title.text = newval + "鏁版嵁缁熻"
}
},
@@ -89,7 +92,7 @@
data() {
return {
chartOptions: {
- color:["#91CC75", "#5470C6"],
+ color:['#84C9E5', '#F68686'],
title: {
text: "",
},
--
Gitblit v1.9.3