From 134377316d7e2ee5913649101ac063746f9bb69e Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 26 十二月 2023 14:49:31 +0800
Subject: [PATCH] 1.车间综合 100%
---
src/utils/myEcharts.js | 196 +++++++++++++++++++++++++++++++++++++-----------
1 files changed, 150 insertions(+), 46 deletions(-)
diff --git a/src/utils/myEcharts.js b/src/utils/myEcharts.js
index 6964f24..94c7eb2 100644
--- a/src/utils/myEcharts.js
+++ b/src/utils/myEcharts.js
@@ -101,19 +101,19 @@
data: salvProValue
},
- {
- name: '鑳屾櫙',
- type: 'bar',
- barWidth: 15,
- barGap: '-100%',
- data: Value,
- itemStyle: {
- normal: {
- color: `rgba(${color[1]},0.8)`,
- barBorderRadius: 30
- }
+ {
+ name: '鑳屾櫙',
+ type: 'bar',
+ barWidth: 15,
+ barGap: '-100%',
+ data: Value,
+ itemStyle: {
+ normal: {
+ color: `rgba(${color[1]},0.8)`,
+ barBorderRadius: 30
}
}
+ }
]
}
@@ -358,9 +358,9 @@
// const titlename = ['澶栬鍒掍激', '琛ㄩ潰娌规薄', '灏哄', '棰滆壊', '澶у皬']
// const data = val.map(i => i.cont)
// const titlename = val.map(i => i.name)
- const data = dataArr.filter((item, index) => index < 5)
+ const data = dataArr.filter((item, index) => index < 10)
- const titlename = titlenameArr.filter((item, index) => index < 5)
+ const titlename = titlenameArr.filter((item, index) => index < 10)
const length = titlename.length
if (titlename.length < 5) {
@@ -373,7 +373,10 @@
// const myColor = ['#FF0000', '#FF5511', '#FF8800', '#FFBB00', '#FFFF00']
// const myColor = ['#0000FF']
// const myColor = ['#7af5f5', '#00FFFF', '#00FFFF', '#00FFFF', '#00FFFF']
- const myColor = ['rgba(122,245,245,1)', 'rgba(122,245,245,0.95)', 'rgba(122,245,245,0.9)', 'rgba(122,245,245,0.85)', 'rgba(122,245,245,0.8)']
+ const myColor = [
+ 'rgba(122,245,245,1)', 'rgba(122,245,245,0.95)', 'rgba(122,245,245,0.9)', 'rgba(122,245,245,0.85)', 'rgba(122,245,245,0.8)',
+ 'rgba(122,245,245,0.75)', 'rgba(122,245,245,0.7)', 'rgba(122,245,245,0.65)', 'rgba(122,245,245,0.6)', 'rgba(122,245,245,0.55)'
+ ]
const option = {
animation: false,
backgroundColor: 'transparent',
@@ -1040,10 +1043,10 @@
offset: 0,
color: 'rgba(0,154,120,1)'
},
- {
- offset: 1,
- color: 'rgba(0,0,0, 0)'
- }
+ {
+ offset: 1,
+ color: 'rgba(0,0,0, 0)'
+ }
], false),
shadowColor: 'rgba(53,142,215, 0.9)', // 闃村奖棰滆壊
shadowBlur: 20 // shadowBlur璁惧浘褰㈤槾褰辩殑妯$硦澶у皬銆傞厤鍚坰hadowColor,shadowOffsetX/Y, 璁剧疆鍥惧舰鐨勯槾褰辨晥鏋溿��
@@ -1868,17 +1871,17 @@
var color = ['#00ffff', '#ff5b00', '#006ced', '#ffe000', '#ffa800', '#ff3000']
for (var i = 0; i < scaleData.length; i++) {
data.push({
- value: scaleData[i].value,
- name: scaleData[i].name,
- itemStyle: {
- normal: {
- borderWidth: 5,
- shadowBlur: 20,
- borderColor: color[i],
- shadowColor: color[i]
- }
+ value: scaleData[i].value,
+ name: scaleData[i].name,
+ itemStyle: {
+ normal: {
+ borderWidth: 5,
+ shadowBlur: 20,
+ borderColor: color[i],
+ shadowColor: color[i]
}
}
+ }
)
}
var seriesObj = [{
@@ -1964,17 +1967,17 @@
var color = ['#00ffff', '#ff3000', '#ffe000', '#ffa800', '#ff5b00']
for (var i = 0; i < scaleData.length; i++) {
data.push({
- value: scaleData[i].value,
- name: scaleData[i].name,
- itemStyle: {
- normal: {
- borderWidth: 5,
- shadowBlur: 20,
- borderColor: color[i],
- shadowColor: [i]
- }
+ value: scaleData[i].value,
+ name: scaleData[i].name,
+ itemStyle: {
+ normal: {
+ borderWidth: 5,
+ shadowBlur: 20,
+ borderColor: color[i],
+ shadowColor: [i]
}
}
+ }
)
}
var seriesObj = [{
@@ -2960,12 +2963,12 @@
return option
}
-export function all02(data) {
+export function all02(data, title) {
return {
backgroundColor: 'transparent',
// tooltip: {},
title: {
- text: '姣忔湀璁㈠崟鏁伴噺/鍑哄簱鏁伴噺',
+ text: title,
left: '50%',
top: '0%',
textAlign: 'center',
@@ -3094,10 +3097,10 @@
offset: 0,
color: 'rgba(0,154,120,1)'
},
- {
- offset: 1,
- color: 'rgba(0,0,0, 0)'
- }
+ {
+ offset: 1,
+ color: 'rgba(0,0,0, 0)'
+ }
], false),
shadowColor: 'rgba(53,142,215, 0.9)', // 闃村奖棰滆壊
shadowBlur: 20 // shadowBlur璁惧浘褰㈤槾褰辩殑妯$硦澶у皬銆傞厤鍚坰hadowColor,shadowOffsetX/Y, 璁剧疆鍥惧舰鐨勯槾褰辨晥鏋溿��
@@ -3127,10 +3130,10 @@
offset: 0,
color: 'rgba(0,154,120,1)'
},
- {
- offset: 1,
- color: 'rgba(0,0,0, 0)'
- }
+ {
+ offset: 1,
+ color: 'rgba(0,0,0, 0)'
+ }
], false),
shadowColor: 'rgba(53,142,215, 0.9)', // 闃村奖棰滆壊
shadowBlur: 20 // shadowBlur璁惧浘褰㈤槾褰辩殑妯$硦澶у皬銆傞厤鍚坰hadowColor,shadowOffsetX/Y, 璁剧疆鍥惧舰鐨勯槾褰辨晥鏋溿��
@@ -3162,3 +3165,104 @@
]
}
}
+
+export function all03(ydata, data) {
+ const option = {
+ backgroundColor: 'transparent',
+ // tooltip: {
+ // formatter: '{b} ({c})'
+ // },
+ title: {
+ text: '鍚勮溅闂村綋鏈堝畬宸ユ暟閲�',
+ left: '50%',
+ top: '0%',
+ textAlign: 'center',
+ textStyle: {
+ // color: '#fff',
+ color: '#00ffff',
+ fontSize: '20',
+ fontWeight: 'bolder'
+ }
+ },
+ grid: {
+ left: '8%',
+ right: '8%',
+ bottom: '10%',
+ top: '15%',
+ containLabel: true
+ },
+ xAxis: [{
+ // gridIndex: 0,
+ axisTick: {
+ show: false
+ },
+ axisLabel: {
+ show: false
+ },
+ splitLine: {
+ show: false
+ },
+ axisLine: {
+ show: false
+ }
+
+ }],
+ yAxis: [{
+ gridIndex: 0,
+ interval: 0,
+ // data: yAxisData.reverse(),
+ data: ydata.reverse(),
+ axisTick: {
+ show: false
+ },
+ axisLabel: {
+ show: true,
+ textStyle: {
+ fontSize: 18,
+ color: colorX
+ }
+ },
+ splitLine: {
+ show: false
+ },
+ axisLine: {
+ show: false
+ }
+
+ }],
+ series: [
+ {
+ type: 'bar',
+ xAxisIndex: 0,
+ yAxisIndex: 0,
+ barWidth: '45%',
+ itemStyle: {
+ normal: {
+ barBorderRadius: 15,
+ color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
+ offset: 0,
+ color: 'rgba(0,255,205,.6)'
+ }, {
+ offset: 0.8,
+
+ color: 'rgba(41,134,207,1)'
+ }], false)
+ }
+ },
+ label: {
+ normal: {
+ show: true,
+ position: 'right',
+ textStyle: {
+ color: colorX
+ },
+ fontSize: 18
+ }
+ },
+ data: data.map(i => i.quantity).reverse()
+ }
+
+ ]
+ }
+ return option
+}
--
Gitblit v1.9.3