From 19ae7b374b4a2a356de70dbc61f49ce00d1bd83f Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期一, 14 十月 2024 16:40:54 +0800
Subject: [PATCH] 1.看板字段修改
---
src/utils/myEcharts.js | 80 ++++++++++++++++++++++++---------------
1 files changed, 49 insertions(+), 31 deletions(-)
diff --git a/src/utils/myEcharts.js b/src/utils/myEcharts.js
index b659d64..089d936 100644
--- a/src/utils/myEcharts.js
+++ b/src/utils/myEcharts.js
@@ -329,25 +329,25 @@
},
series: [
{
- name: '鏃堕棿',
- type: 'line',
- smooth: false,
- showAllSymbol: true,
- symbol: 'emptyCircle',
- symbolSize: 8,
- itemStyle: {
- normal: {
- color: `rgba(42, 197, 137, 1)`
- }
- },
- lineStyle: {
- normal: {
- width: 2,
- color: `rgba(42, 197, 137, 1)`
- }
- },
- data: dataY
- }
+ name: '鏃堕棿',
+ type: 'line',
+ smooth: false,
+ showAllSymbol: true,
+ symbol: 'emptyCircle',
+ symbolSize: 8,
+ itemStyle: {
+ normal: {
+ color: `rgba(42, 197, 137, 1)`
+ }
+ },
+ lineStyle: {
+ normal: {
+ width: 2,
+ color: `rgba(42, 197, 137, 1)`
+ }
+ },
+ data: dataY
+ }
]
}
@@ -356,8 +356,8 @@
// 缁煎悎鐪嬫澘鍥�
export function bar02(dataArr, titlenameArr) {
- // const data = [70, 60, 50, 40, 30]
- // const titlename = ['澶栬鍒掍激', '琛ㄩ潰娌规薄', '灏哄', '棰滆壊', '澶у皬']
+ // const data = [700, 600, 50, 40, 30]
+ // const titlename = ['500ml鎻愭墜鐩栧挅鍟℃澂 钃濊壊 鍠峰', '500ml鎻愭墜鐩栧挅鍟℃澂 钃濊壊 鍠峰', '灏哄', '棰滆壊', '澶у皬']
// const data = val.map(i => i.cont)
// const titlename = val.map(i => i.name)
const data = dataArr.filter((item, index) => index < 5)
@@ -371,7 +371,9 @@
}
}
- const valdata = [683, 500, 400, 300, 200]
+ console.log(titlename, 123)
+
+ // const valdata = [683, 500, 400, 300, 200]
// const myColor = ['#FF0000', '#FF5511', '#FF8800', '#FFBB00', '#FFFF00']
// const myColor = ['#0000FF']
// const myColor = ['#7af5f5', '#00FFFF', '#00FFFF', '#00FFFF', '#00FFFF']
@@ -421,11 +423,16 @@
show: false
},
axisLabel: {
+ show: false,
// color: '#fff',
color: function(value, index) {
return value === '0' ? 'transparent' : '#fff'
},
+ verticalAlign: 'bottom',
+ // align: 'left',
+ // margin: 80,
fontSize: 20,
+
// formatter: function(value, index) {
// return [
// '{lg|' + (index + 1) + '銆� }' + '{title|' + value + '} '
@@ -455,12 +462,12 @@
}
},
{
- show: false,
+ show: true,
inverse: true,
- data: valdata,
+ data: data,
axisLabel: {
textStyle: {
- fontSize: 12,
+ fontSize: 20,
color: '#fff'
}
},
@@ -495,13 +502,24 @@
},
label: {
normal: {
+ color: '#fff',
show: true,
- position: 'right',
- formatter: '{c}',
- fontSize: 20,
- color: '#fff'
- // formatter: '{c}%',
+ position: [0, '-20px'],
+ textStyle: {
+ fontSize: 16
+ },
+ formatter: function(a, b) {
+ return a.name
+ }
}
+ // normal: {
+ // show: true,
+ // position: 'right',
+ // formatter: '{c}',
+ // fontSize: 20,
+ // color: '#fff'
+ // // formatter: '{c}%',
+ // }
}
}
]
@@ -1874,7 +1892,7 @@
containLabel: true
},
title: {
- text: '鍚勮溅闂村綋鏈堣鍗曟暟/鍏ュ簱鏁伴噺',
+ text: '鍚勮溅闂磋繎涓ゆ湀璁㈠崟鏁�/鍏ュ簱鏁伴噺',
left: '50%',
top: '0%',
textAlign: 'center',
--
Gitblit v1.9.3