From fc2ad48243a04090e0ce8df907d7c0beea738c9c Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 12 九月 2023 17:36:27 +0800
Subject: [PATCH] 1.车间质量看板60%
---
src/utils/myEcharts.js | 1569 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 1,569 insertions(+), 0 deletions(-)
diff --git a/src/utils/myEcharts.js b/src/utils/myEcharts.js
index 8add81c..19e7769 100644
--- a/src/utils/myEcharts.js
+++ b/src/utils/myEcharts.js
@@ -1853,3 +1853,1572 @@
}
return option
}
+
+// 杞﹂棿璐ㄩ噺
+export function cjzl01(scaleData) {
+ console.log(scaleData, 3)
+ // var scaleData = [
+ // {
+ // 'name': '姣涘埡',
+ // 'value': 30
+ // },
+ // {
+ // 'name': '鑹插樊',
+ // 'value': 20
+ // },
+ // {
+ // 'name': '鎶涘厜',
+ // 'value': 10
+ // },
+ // {
+ // 'name': '鎵撶(',
+ // 'value': 5
+ // },
+ // {
+ // 'name': '鎶樺集銆佸帇閾搞�佹墦瀛�',
+ // 'value': 10
+ // }
+ // ]
+ var rich = {
+ white: {
+ color: colorX,
+ align: 'center',
+ padding: [3, 0]
+ // fontSize: 16
+ }
+ }
+ var placeHolderStyle = {
+ normal: {
+ label: {
+ show: false
+ },
+ labelLine: {
+ show: false
+ },
+ color: 'rgba(0, 0, 0, 0)',
+ borderColor: 'rgba(0, 0, 0, 0)',
+ borderWidth: 0
+ }
+ }
+ var data = []
+ var color = ['#00ffff', '#ff3000', '#006ced', '#ffe000', '#ffa800', '#ff5b00', '#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: 2,
+ // name: '',
+ // itemStyle: placeHolderStyle
+ // }
+ )
+ }
+ var seriesObj = [{
+ name: '',
+ type: 'pie',
+ clockWise: false,
+ radius: [60, 65],
+ hoverAnimation: false,
+ top: '10%',
+ itemStyle: {
+ normal: {
+ label: {
+ show: true,
+ position: 'outside',
+ color: colorX,
+ formatter: function(params) {
+ if (params.name !== '') {
+ return params.name + '\n{white|' + params.value + '}'
+ } else {
+ return ''
+ }
+ },
+ rich: rich
+ },
+ labelLine: {
+ length: 10,
+ length2: 10,
+ show: true,
+ color: '#00ffff'
+ }
+ }
+ },
+ data: data
+ }]
+ const option = {
+ backgroundColor: 'transparent',
+ tooltip: {
+ show: false
+ },
+ legend: {
+ show: false
+ },
+ toolbox: {
+ show: false
+ },
+ title: {
+ text: '鎬诲拰',
+ left: '49%',
+ top: '45%',
+ textAlign: 'center',
+ textStyle: {
+ color: '#00ffff',
+ fontSize: '20',
+ fontWeight: 'bolder'
+ },
+ subtext: scaleData.length > 0 ? scaleData.map(i => parseFloat(i.value)).reduce((pre, curr) => {
+ return pre + curr
+ }) : [0],
+ subtextStyle: {
+ color: '#00ffff',
+ fontSize: '20',
+ fontWeight: 'bolder'
+ }
+ },
+ series: seriesObj
+ }
+
+ return option
+}
+
+export function cjzl02(title, scaleData) {
+ var rich = {
+ white: {
+ color: '#ddd',
+ align: 'center',
+ padding: [5, 0]
+ }
+ }
+
+ var placeHolderStyle = {
+ normal: {
+ label: {
+ show: false
+ },
+ labelLine: {
+ show: false
+ },
+ color: 'rgba(0, 0, 0, 0)',
+ borderColor: 'rgba(0, 0, 0, 0)',
+ borderWidth: 0
+ }
+ }
+ var data = []
+ var color = ['#00ffff', '#ff3000', '#006ced', '#ffe000', '#ffa800', '#ff5b00', '#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: [i]
+ }
+ }
+ }
+ // {
+ // value: 4,
+ // name: '',
+ // itemStyle: placeHolderStyle
+ // }
+ )
+ }
+ var seriesObj = [{
+ name: '',
+ type: 'pie',
+ clockWise: false,
+ radius: [60, 65],
+ top: '10%',
+ hoverAnimation: false,
+ itemStyle: {
+ normal: {
+ label: {
+ show: true,
+ position: 'outside',
+ // color: '#ddd',
+ color: colorX,
+ formatter: function(params) {
+ // var percent = 0
+ // var total = 0
+ // for (var i = 0; i < scaleData.length; i++) {
+ // total += scaleData[i].value
+ // }
+ // percent = ((params.value / total) * 100).toFixed(0)
+ if (params.name !== '') {
+ return params.name + '\n{white|' + '' + params.value + '}'
+ } else {
+ return ''
+ }
+ },
+ rich: rich
+ },
+ labelLine: {
+ length: 10,
+ length2: 10,
+ show: true,
+ color: '#00ffff'
+ }
+ }
+ },
+ data: data
+ }]
+ const option = {
+ backgroundColor: 'transparent',
+ tooltip: {
+ show: false
+ },
+ top: 'middle',
+ title: {
+ text: title,
+ left: '49%',
+ top: '45%',
+ textAlign: 'center',
+ textStyle: {
+ color: '#00ffff',
+ fontSize: '20',
+ fontWeight: 'bolder'
+ },
+ subtext: scaleData.length > 0 ? scaleData.map(i => parseFloat(i.value)).reduce((pre, curr) => {
+ return pre + curr
+ }) : [0],
+ subtextStyle: {
+ color: '#00ffff',
+ fontSize: '20',
+ fontWeight: 'bolder'
+ }
+ },
+ legend: {
+ show: false
+ },
+ toolbox: {
+ show: false
+ },
+ series: seriesObj
+ }
+
+ return option
+}
+
+// export function cjzl03() {
+// // mock鏁版嵁
+// const dataArr = {
+// xdata: ['9鏈�4鍙�', '9鏈�5鍙�', '9鏈�6鍙�', '9鏈�7鍙�', '9鏈�8鍙�', '9鏈�9鍙�', '9鏈�10鍙�'],
+// vaccination: [1000, 1300, 1200, 800, 600, 700, 900],
+// unvaccinated: [700, 800, 900, 500, 300, 400, 500],
+// unvaccinatedTwo: [400, 300, 500, 200, 100, 100, 300],
+// rateDataOne: [98, 96, 97, 92, 94, 95, 100],
+// rateDataTwo: [3, 4, 5, 1, 3, 2, 3]
+// }
+//
+// // tooltip
+// const tooltip = {
+// trigger: 'axis',
+// textStyle: { fontSize: '100%' },
+// formatter: params => {
+// const rander = params.map(item => item.seriesType !== 'pictorialBar' ? `<div>${item.seriesName}: ${item.seriesType !== 'line' ? item.value : item.value + '%'}</div>` : '').join('')
+// return `
+// <div>${params[0].axisValue}</div>
+// ${rander}
+// `
+// }
+// }
+// const legend = {
+// data: ['浠诲姟鏁�', '鍚堟牸鏁�', '涓嶈壇鏁�', '鍚堟牸鐜�', '涓嶈壇鐜�'],
+// textStyle: { fontSize: 14, color: '#fff' },
+// itemWidth: 25,
+// itemHeight: 15,
+// itemGap: 15,
+// bottom: '5%',
+// selectedMode: false
+// }
+// const grid = {
+// left: '2%',
+// right: '2%',
+// bottom: '20%',
+// top: '10%',
+// containLabel: true
+// }
+// // xAxis
+// const xAxis = {
+// // axisTick: { show: true },
+// // axisLine: { lineStyle: { color: 'rgba(255,255,255, .2)' }},
+// // axisLabel: { textStyle: { fontSize: 12, color: '#fff' }},
+//
+// type: 'category',
+// boundaryGap: true,
+// axisLabel: {
+// interval: 0,
+// formatter: '{value}',
+// fontSize: 14,
+// // margin: 20,
+// textStyle: {
+// color: colorX
+// }
+// },
+// axisLine: {
+// lineStyle: {
+// color: '#032c58'
+// }
+// },
+// splitLine: {
+// show: false,
+// lineStyle: {
+// color: '#032c58'
+// }
+// },
+// axisTick: {
+// show: false
+// },
+//
+// data: dataArr.xdata
+// }
+//
+// // yAxis
+// const yAxis = [{
+// // max: 800,
+// boundaryGap: false,
+// splitNumber: 4,
+// type: 'value',
+// axisLabel: {
+// textStyle: {
+// fontSize: 14,
+// color: colorY
+// }
+// },
+// // name: '鍗�',
+// // nameTextStyle: {
+// // color: colorY,
+// // fontSize: 14,
+// // lineHeight: 20
+// // },
+// splitLine: {
+// show: true,
+// lineStyle: {
+// color: '#032c58'
+// }
+// },
+// axisLine: {
+// show: true,
+// lineStyle: {
+// color: '#032c58'
+// }
+// },
+// axisTick: {
+// show: true
+// }
+// // axisTick: { show: false },
+// // axisLine: { show: false },
+// // splitLine: { lineStyle: { color: 'rgba(255,255,255, .05)' }},
+// // axisLabel: { textStyle: { fontSize: 16, color: '#fff' }}
+// }, {
+// show: true,
+// max: 100,
+// splitLine: { show: false },
+// axisLine: { show: false },
+// axisTick: { show: false },
+// axisLabel: {
+// textStyle: {
+// fontSize: 14,
+// color: colorY
+// },
+// formatter: params => {
+// return `${params}%`
+// }
+// }
+// }]
+//
+// // series
+// const series = [{
+// z: 1,
+// name: '涓婇儴1',
+// type: 'pictorialBar',
+// symbolPosition: 'end',
+// data: dataArr.vaccination,
+// symbol: 'diamond',
+// symbolOffset: ['-50%', '-50%'],
+// symbolSize: [29, 19],
+// itemStyle: {
+// borderColor: '#2fffa4',
+// color: '#2fffa4'
+// }
+// },
+// {
+// z: 1,
+// type: 'bar',
+// name: '浠诲姟鏁�',
+// barWidth: 30,
+// barGap: '-50%',
+// data: dataArr.vaccination,
+// itemStyle: {
+// color: {
+// type: 'linear',
+// x: 0, x2: 1, y: 0, y2: 0,
+// colorStops: [
+// { offset: 0, color: 'rgba(29, 245, 160, .7)' },
+// { offset: 0.5, color: 'rgba(29, 245, 160, .7)' },
+// { offset: 0.5, color: 'rgba(29, 245, 160, .3)' },
+// { offset: 1, color: 'rgba(29, 245, 160, .3)' }
+// ]
+// }
+// }
+// }, {
+// z: 2,
+// name: '涓婇儴1',
+// type: 'pictorialBar',
+// symbolPosition: 'end',
+// data: dataArr.unvaccinated,
+// symbol: 'diamond',
+// symbolOffset: [0, '-50%'],
+// symbolSize: [29, 19],
+// itemStyle: {
+// borderColor: '#32ffee',
+// color: '#32ffee'
+// }
+// },
+// {
+// z: 2,
+// type: 'bar',
+// name: '鍚堟牸鏁�',
+// barWidth: 30,
+// data: dataArr.unvaccinated,
+// itemStyle: {
+// color: {
+// type: 'linear',
+// x: 0, x2: 1, y: 0, y2: 0,
+// colorStops: [
+// { offset: 0, color: 'rgba(50, 255, 238, .7)' },
+// { offset: 0.5, color: 'rgba(50, 255, 238, .7)' },
+// { offset: 0.5, color: 'rgba(50, 255, 238, .3)' },
+// { offset: 1, color: 'rgba(50, 255, 238, .3)' }
+// ]
+// }
+// }
+// }, {
+// z: 3,
+// name: '涓婇儴1',
+// type: 'pictorialBar',
+// symbolPosition: 'end',
+// data: dataArr.unvaccinatedTwo,
+// symbol: 'diamond',
+// symbolOffset: ['50%', '-50%'],
+// symbolSize: [29, 19],
+// itemStyle: {
+// borderColor: '#ffd11a',
+// color: '#ffd11a'
+// }
+// }, {
+// z: 3,
+// type: 'bar',
+// name: '涓嶈壇鏁�',
+// barWidth: 30,
+// data: dataArr.unvaccinatedTwo,
+// itemStyle: {
+// color: {
+// type: 'linear',
+// x: 0, x2: 1, y: 0, y2: 0,
+// colorStops: [
+// { offset: 0, color: 'rgba(255, 209, 26, .7)' },
+// { offset: 0.5, color: 'rgba(255, 209, 26, .7)' },
+// { offset: 0.5, color: 'rgba(255, 209, 26, .3)' },
+// { offset: 1, color: 'rgba(255, 209, 26, .3)' }
+// ]
+// }
+// }
+// }, {
+// z: 9,
+// yAxisIndex: 1,
+// name: '鍚堟牸鐜�', type: 'line',
+// // symbol: 'emptyCircle',
+// symbol: `path://M9.312,4.594 C12.074,4.594 14.313,6.832 14.313,9.594 C14.313,12.355 12.074,14.594 9.312,14.594 C6.551,14.594 4.312,12.355 4.312,9.594 C4.312,6.832 6.551,4.594 9.312,4.594 Z`,
+// symbolSize: [10, 10],
+// color: {
+// type: 'linear', x: 1, y: 0, x2: 0, y2: 0,
+// // 0% 澶勭殑棰滆壊 // 100% 澶勭殑棰滆壊
+// colorStops: [{ offset: 0, color: '#32ffee' }, { offset: 1, color: '#8afff5' }],
+// global: false // 缂虹渷涓� false
+// },
+// lineStyle: {
+// color: {
+// type: 'linear', x: 1, y: 0, x2: 0, y2: 0,
+// // 0% 澶勭殑棰滆壊 // 100% 澶勭殑棰滆壊
+// colorStops: [{ offset: 0, color: '#32ffee' }, { offset: 1, color: '#8afff5' }],
+// global: false // 缂虹渷涓� false
+// }
+// },
+// // 淇敼鐨勬槸绾夸笅鍖哄煙鐨勯鑹�
+// areaStyle: {
+// color: new echarts.graphic.LinearGradient(
+// // 鍙�/涓�/宸�/涓�
+// 0, 0, 0, 1, [
+// { offset: 0, color: 'rgba(50, 255, 238, .1)' },
+// { offset: 1, color: 'transparent' }
+// ])
+// },
+// label: {
+// show: true,
+// position: 'insideBottomLeft',
+// formatter: params => {
+// return `${params.value}%`
+// },
+// textStyle: { fontSize: 14, color: '#32ffee' }
+// },
+// data: dataArr.rateDataOne
+// }, {
+// z: 9,
+// yAxisIndex: 1,
+// name: '涓嶈壇鐜�', type: 'line',
+// symbol: `path://M9.312,4.594 C12.074,4.594 14.313,6.832 14.313,9.594 C14.313,12.355 12.074,14.594 9.312,14.594 C6.551,14.594 4.312,12.355 4.312,9.594 C4.312,6.832 6.551,4.594 9.312,4.594 Z`,
+// // symbol: 'emptyCircle',
+// symbolSize: [10, 10],
+// color: {
+// type: 'linear', x: 1, y: 0, x2: 0, y2: 0,
+// // 0% 澶勭殑棰滆壊 // 100% 澶勭殑棰滆壊
+// colorStops: [{ offset: 0, color: colorX }, { offset: 1, color: '#fff5cc' }],
+// global: false // 缂虹渷涓� false
+// },
+// lineStyle: {
+// color: {
+// type: 'linear', x: 1, y: 0, x2: 0, y2: 0,
+// // 0% 澶勭殑棰滆壊 // 100% 澶勭殑棰滆壊
+// colorStops: [{ offset: 0, color: colorX }, { offset: 1, color: '#fff5cc' }],
+// global: false // 缂虹渷涓� false
+// }
+// },
+// // 淇敼鐨勬槸绾夸笅鍖哄煙鐨勯鑹�
+// areaStyle: {
+// color: new echarts.graphic.LinearGradient(
+// // 鍙�/涓�/宸�/涓�
+// 0, 0, 0, 1, [
+// { offset: 0, color: 'rgba(255, 209, 26, .2)' },
+// { offset: 1, color: 'transparent' }
+// ])
+// },
+// label: {
+// show: true,
+// position: 'insideBottomRight',
+// formatter: params => {
+// return `${params.value}%`
+// },
+// // textStyle: { fontSize: 14, color: '#ffd11a' }
+// textStyle: { fontSize: 14, color: colorX }
+// },
+// data: dataArr.rateDataTwo
+// }]
+// // const option = { tooltip, xAxis, yAxis, series, grid, legend, backgroundColor: 'rgba(0, 0, 0, .7)' }
+// const option = { xAxis, yAxis, series, grid, legend, backgroundColor: 'transparent' }
+// return option
+// }
+
+export function cjzl04() {
+ return {
+ backgroundColor: 'transparent',
+ tooltip: {},
+ // title: {
+ // text: '璁㈠崟瀹屾垚鎬绘暟',
+ // left: '50%',
+ // top: '5%',
+ // textAlign: 'center',
+ // textStyle: {
+ // // color: '#fff',
+ // color: '#00ffff',
+ // fontSize: '20',
+ // fontWeight: 'bolder'
+ // }
+ // },
+ grid: {
+ left: '2%',
+ right: '2%',
+ bottom: '20%',
+ top: '10%',
+ containLabel: true
+ },
+ legend: {
+ // show: true,
+ // itemGap: 20,
+ // data: ['娉ㄥ唽鎬婚噺', '鏈�鏂版敞鍐岄噺'],
+ // textStyle: {
+ // color: '#f9f9f9',
+ // borderColor: '#fff'
+ // }
+ data: ['绮惧伐杞﹂棿', '瑁呴厤杞﹂棿', '鏈哄姞宸ヨ溅闂�', '鎶涘厜杞﹂棿', '鎵撶(杞﹂棿'],
+ textStyle: { fontSize: 14, color: '#fff' },
+ itemWidth: 25,
+ itemHeight: 10,
+ itemGap: 15,
+ bottom: '5%',
+ selectedMode: false
+ },
+ xAxis: [{
+ type: 'category',
+ boundaryGap: true,
+ axisLabel: {
+ interval: 0,
+ formatter: '{value}',
+ fontSize: 14,
+ margin: 20,
+ textStyle: {
+ color: colorX
+ }
+ },
+ axisLine: {
+ lineStyle: {
+ color: '#032c58'
+ }
+ },
+ splitLine: {
+ show: false,
+ lineStyle: {
+ color: '#032c58'
+ }
+ },
+ axisTick: {
+ show: false
+ },
+ data: ['9鏈�4鍙�', '9鏈�5鍙�', '9鏈�6鍙�', '9鏈�7鍙�', '9鏈�8鍙�', '9鏈�9鍙�', '9鏈�10鍙�']
+ }],
+ yAxis: [
+ {
+ // max: 800,
+ boundaryGap: false,
+ splitNumber: 4,
+ type: 'value',
+ axisLabel: {
+ textStyle: {
+ fontSize: 14,
+ color: colorY
+ }
+ },
+ // name: '鍗�',
+ // nameTextStyle: {
+ // color: colorY,
+ // fontSize: 14,
+ // lineHeight: 20
+ // },
+ splitLine: {
+ show: true,
+ lineStyle: {
+ color: '#032c58'
+ }
+ },
+ axisLine: {
+ show: true,
+ lineStyle: {
+ color: '#032c58'
+ }
+ },
+ axisTick: {
+ show: true
+ }
+ }
+ ],
+ series: [
+ {
+ name: '绮惧伐杞﹂棿',
+ type: 'line',
+ // smooth: true, //鏄惁骞虫粦鏇茬嚎鏄剧ず
+ // symbol:'circle', // 榛樿鏄┖蹇冨渾锛堜腑闂存槸鐧借壊鐨勶級锛屾敼鎴愬疄蹇冨渾
+ showAllSymbol: true,
+ symbol: 'emptyCircle',
+ symbolSize: 6,
+ lineStyle: {
+ normal: {
+ color: `rgb(71, 226, 194)` // 绾挎潯棰滆壊
+ },
+ borderColor: `rgb(71, 226, 194)`
+ },
+ // label: {
+ // show: true,
+ // position: 'top',
+ // textStyle: {
+ // color: '#fff'
+ // }
+ // },
+ itemStyle: {
+ normal: {
+ color: `rgb(71, 226, 194)`
+ }
+ },
+ tooltip: {
+ show: false
+ },
+ // areaStyle: { // 鍖哄煙濉厖鏍峰紡
+ // normal: {
+ // // 绾挎�ф笎鍙橈紝鍓�4涓弬鏁板垎鍒槸x0,y0,x2,y2(鑼冨洿0~1);鐩稿綋浜庡浘褰㈠寘鍥寸洅涓殑鐧惧垎姣斻�傚鏋滄渶鍚庝竴涓弬鏁版槸鈥榯rue鈥欙紝鍒欒鍥涗釜鍊兼槸缁濆鍍忕礌浣嶇疆銆�
+ // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+ // offset: 0,
+ // color: 'rgba(0,154,120,1)'
+ // },
+ // {
+ // offset: 1,
+ // color: 'rgba(0,0,0, 0)'
+ // }
+ // ], false),
+ // shadowColor: 'rgba(53,142,215, 0.9)', // 闃村奖棰滆壊
+ // shadowBlur: 20 // shadowBlur璁惧浘褰㈤槾褰辩殑妯$硦澶у皬銆傞厤鍚坰hadowColor,shadowOffsetX/Y, 璁剧疆鍥惧舰鐨勯槾褰辨晥鏋溿��
+ // }
+ // },
+ data: [393, 438, 485, 631, 689, 824, 987]
+ // data: [600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100)]
+ },
+ {
+ name: '瑁呴厤杞﹂棿',
+ type: 'line',
+ // smooth: true, //鏄惁骞虫粦鏇茬嚎鏄剧ず
+ // symbol:'circle', // 榛樿鏄┖蹇冨渾锛堜腑闂存槸鐧借壊鐨勶級锛屾敼鎴愬疄蹇冨渾
+ showAllSymbol: true,
+ symbol: 'emptyCircle',
+ symbolSize: 6,
+ lineStyle: {
+ normal: {
+ color: '#32ffee' // 绾挎潯棰滆壊
+ },
+ borderColor: '#32ffee'
+ },
+ // label: {
+ // show: true,
+ // position: 'top',
+ // textStyle: {
+ // color: '#fff'
+ // }
+ // },
+ itemStyle: {
+ normal: {
+ color: '#32ffee'
+ }
+ },
+ tooltip: {
+ show: false
+ },
+ // areaStyle: { // 鍖哄煙濉厖鏍峰紡
+ // normal: {
+ // // 绾挎�ф笎鍙橈紝鍓�4涓弬鏁板垎鍒槸x0,y0,x2,y2(鑼冨洿0~1);鐩稿綋浜庡浘褰㈠寘鍥寸洅涓殑鐧惧垎姣斻�傚鏋滄渶鍚庝竴涓弬鏁版槸鈥榯rue鈥欙紝鍒欒鍥涗釜鍊兼槸缁濆鍍忕礌浣嶇疆銆�
+ // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+ // offset: 0,
+ // color: 'rgba(0,154,120,1)'
+ // },
+ // {
+ // offset: 1,
+ // color: 'rgba(0,0,0, 0)'
+ // }
+ // ], false),
+ // shadowColor: 'rgba(53,142,215, 0.9)', // 闃村奖棰滆壊
+ // shadowBlur: 20 // shadowBlur璁惧浘褰㈤槾褰辩殑妯$硦澶у皬銆傞厤鍚坰hadowColor,shadowOffsetX/Y, 璁剧疆鍥惧舰鐨勯槾褰辨晥鏋溿��
+ // }
+ // },
+ // data: [393, 438, 485, 631, 689, 824, 987]
+ data: [10, 102, 30, 203, 40, 20, 405]
+ },
+ {
+ name: '鏈哄姞宸ヨ溅闂�',
+ type: 'line',
+ // smooth: true, //鏄惁骞虫粦鏇茬嚎鏄剧ず
+ // symbol:'circle', // 榛樿鏄┖蹇冨渾锛堜腑闂存槸鐧借壊鐨勶級锛屾敼鎴愬疄蹇冨渾
+ showAllSymbol: true,
+ symbol: 'emptyCircle',
+ symbolSize: 6,
+ lineStyle: {
+ normal: {
+ color: '#ffd11a' // 绾挎潯棰滆壊
+ },
+ borderColor: '#ffd11a'
+ },
+ // label: {
+ // show: true,
+ // position: 'top',
+ // textStyle: {
+ // color: '#fff'
+ // }
+ // },
+ itemStyle: {
+ normal: {
+ color: '#ffd11a'
+ }
+ },
+ tooltip: {
+ show: false
+ },
+ // areaStyle: { // 鍖哄煙濉厖鏍峰紡
+ // normal: {
+ // // 绾挎�ф笎鍙橈紝鍓�4涓弬鏁板垎鍒槸x0,y0,x2,y2(鑼冨洿0~1);鐩稿綋浜庡浘褰㈠寘鍥寸洅涓殑鐧惧垎姣斻�傚鏋滄渶鍚庝竴涓弬鏁版槸鈥榯rue鈥欙紝鍒欒鍥涗釜鍊兼槸缁濆鍍忕礌浣嶇疆銆�
+ // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+ // offset: 0,
+ // color: 'rgba(0,154,120,1)'
+ // },
+ // {
+ // offset: 1,
+ // color: 'rgba(0,0,0, 0)'
+ // }
+ // ], false),
+ // shadowColor: 'rgba(53,142,215, 0.9)', // 闃村奖棰滆壊
+ // shadowBlur: 20 // shadowBlur璁惧浘褰㈤槾褰辩殑妯$硦澶у皬銆傞厤鍚坰hadowColor,shadowOffsetX/Y, 璁剧疆鍥惧舰鐨勯槾褰辨晥鏋溿��
+ // }
+ // },
+ data: [93, 48, 45, 61, 89, 84, 97]
+ // data: [600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100)]
+ },
+ {
+ name: '鎶涘厜杞﹂棿',
+ type: 'line',
+ // smooth: true, //鏄惁骞虫粦鏇茬嚎鏄剧ず
+ // symbol:'circle', // 榛樿鏄┖蹇冨渾锛堜腑闂存槸鐧借壊鐨勶級锛屾敼鎴愬疄蹇冨渾
+ showAllSymbol: true,
+ symbol: 'emptyCircle',
+ symbolSize: 6,
+ lineStyle: {
+ normal: {
+ color: `rgb(254, 94, 94)` // 绾挎潯棰滆壊
+ },
+ borderColor: `rgb(254, 94, 94)`
+ },
+ // label: {
+ // show: true,
+ // position: 'top',
+ // textStyle: {
+ // color: '#fff'
+ // }
+ // },
+ itemStyle: {
+ normal: {
+ color: `rgb(254, 94, 94)`
+ }
+ },
+ tooltip: {
+ show: false
+ },
+ // areaStyle: { // 鍖哄煙濉厖鏍峰紡
+ // normal: {
+ // // 绾挎�ф笎鍙橈紝鍓�4涓弬鏁板垎鍒槸x0,y0,x2,y2(鑼冨洿0~1);鐩稿綋浜庡浘褰㈠寘鍥寸洅涓殑鐧惧垎姣斻�傚鏋滄渶鍚庝竴涓弬鏁版槸鈥榯rue鈥欙紝鍒欒鍥涗釜鍊兼槸缁濆鍍忕礌浣嶇疆銆�
+ // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+ // offset: 0,
+ // color: 'rgba(0,154,120,1)'
+ // },
+ // {
+ // offset: 1,
+ // color: 'rgba(0,0,0, 0)'
+ // }
+ // ], false),
+ // shadowColor: 'rgba(53,142,215, 0.9)', // 闃村奖棰滆壊
+ // shadowBlur: 20 // shadowBlur璁惧浘褰㈤槾褰辩殑妯$硦澶у皬銆傞厤鍚坰hadowColor,shadowOffsetX/Y, 璁剧疆鍥惧舰鐨勯槾褰辨晥鏋溿��
+ // }
+ // },
+ data: [33, 438, 48, 63, 69, 82, 487]
+ // data: [600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100)]
+ },
+ {
+ name: '鎵撶(杞﹂棿',
+ type: 'line',
+ // smooth: true, //鏄惁骞虫粦鏇茬嚎鏄剧ず
+ // symbol:'circle', // 榛樿鏄┖蹇冨渾锛堜腑闂存槸鐧借壊鐨勶級锛屾敼鎴愬疄蹇冨渾
+ showAllSymbol: true,
+ symbol: 'emptyCircle',
+ symbolSize: 6,
+ lineStyle: {
+ normal: {
+ color: `rgb(255, 221, 97)` // 绾挎潯棰滆壊
+ },
+ borderColor: `rgb(255, 221, 97)`
+ },
+ // label: {
+ // show: true,
+ // position: 'top',
+ // textStyle: {
+ // color: '#fff'
+ // }
+ // },
+ itemStyle: {
+ normal: {
+ color: `rgb(255, 221, 97)`
+ }
+ },
+ tooltip: {
+ show: false
+ },
+ // areaStyle: { // 鍖哄煙濉厖鏍峰紡
+ // normal: {
+ // // 绾挎�ф笎鍙橈紝鍓�4涓弬鏁板垎鍒槸x0,y0,x2,y2(鑼冨洿0~1);鐩稿綋浜庡浘褰㈠寘鍥寸洅涓殑鐧惧垎姣斻�傚鏋滄渶鍚庝竴涓弬鏁版槸鈥榯rue鈥欙紝鍒欒鍥涗釜鍊兼槸缁濆鍍忕礌浣嶇疆銆�
+ // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+ // offset: 0,
+ // color: 'rgba(0,154,120,1)'
+ // },
+ // {
+ // offset: 1,
+ // color: 'rgba(0,0,0, 0)'
+ // }
+ // ], false),
+ // shadowColor: 'rgba(53,142,215, 0.9)', // 闃村奖棰滆壊
+ // shadowBlur: 20 // shadowBlur璁惧浘褰㈤槾褰辩殑妯$硦澶у皬銆傞厤鍚坰hadowColor,shadowOffsetX/Y, 璁剧疆鍥惧舰鐨勯槾褰辨晥鏋溿��
+ // }
+ // },
+ data: [93, 38, 85, 666, 555, 444, 333]
+ // data: [600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100)]
+ }
+
+ ]
+ }
+}
+
+// export function cjzl03() {
+// const option = {
+// backgroundColor: 'transparent',
+// grid: {
+// left: '2%',
+// top: '10%',
+// right: '2%',
+// bottom: '20%',
+// containLabel: true
+// },
+// legend: {
+// // show: true,
+// // itemGap: 20,
+// // data: ['娉ㄥ唽鎬婚噺', '鏈�鏂版敞鍐岄噺'],
+// // textStyle: {
+// // color: '#f9f9f9',
+// // borderColor: '#fff'
+// // }
+// data: ['瀹屾垚鏁�', '瀹屾垚鐜�'],
+// textStyle: { fontSize: 14, color: '#fff' },
+// itemWidth: 25,
+// itemHeight: 10,
+// itemGap: 15,
+// bottom: '5%',
+// selectedMode: false
+// },
+// // tooltip: {
+// // show: true,
+// // trigger: 'axis', // axis , item
+// // backgroundColor: 'RGBA(0, 0, 0, 0.3)',
+// // borderColor: 'rgba(0, 151, 251, 0.6)',
+// // borderWidth: 1,
+// // borderRadius: 0,
+// // textStyle: {
+// // color: '#BCE9FC',
+// // fontSize: 14,
+// // align: 'left'
+// // },
+// // // formatter:'{b0}<br />{a0}:{c0}<br />{a1}:{c4}%'
+// //
+// // // formatter: '{b0}<br/>' +
+// // // '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:rgb(255,224,144)"></span>鎻愬嚭鍐嶅妫�瀵熷缓璁暟:{c0}<br/>' +
+// // // '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:rgb(72,226,198)"></span>閲囩撼鐜�:{c4}%<br/>'
+// //
+// // formatter: function(params) {
+// // var res = '' + params[0].name
+// // var valueMap = new Map()
+// // for (var i = 0, l = params.length; i < l; i++) {
+// // if (params[i].value !== '-') {
+// // valueMap.set(params[i].seriesName, params[i])
+// // }
+// // }
+// // valueMap.forEach((value, key) => {
+// // if (value.seriesName === '鎻愬嚭鍐嶅妫�瀵熷缓璁暟') {
+// // res += '<br/>' + value.marker + value.seriesName + ' : ' + value.value
+// // } else if (value.seriesName === '閲囩撼鐜�' && value.value !== '-') {
+// // res += '<br/>' + value.marker + value.seriesName + ' : ' + value.value
+// // }
+// // })
+// // return res
+// // }
+// //
+// // },
+// xAxis: {
+// type: 'category',
+// boundaryGap: true,
+// axisLabel: {
+// interval: 0,
+// formatter: '{value}',
+// fontSize: 14,
+// margin: 20,
+// textStyle: {
+// color: colorX
+// }
+// },
+// axisLine: {
+// lineStyle: {
+// color: '#032c58'
+// }
+// },
+// splitLine: {
+// show: false,
+// lineStyle: {
+// color: '#032c58'
+// }
+// },
+// axisTick: {
+// show: false
+// },
+// data: ['绮惧伐杞﹂棿', '鏈哄姞宸ヨ溅闂�', '杞﹁埞杞﹂棿', '绮楄溅杞﹂棿', '杞﹁埞杞﹂棿']
+// },
+// yAxis: [
+// {
+// boundaryGap: false,
+// // splitNumber: 4,
+// type: 'value',
+// // max: 100,
+// axisLabel: {
+// textStyle: {
+// fontSize: 14,
+// color: colorY
+// }
+// },
+// nameTextStyle: {
+// color: '#fff',
+// fontSize: 14,
+// lineHeight: 40
+// },
+// splitLine: {
+// show: true,
+// lineStyle: {
+// color: '#032c58'
+// }
+// },
+// axisLine: {
+// show: true,
+// lineStyle: {
+// color: '#032c58'
+// }
+// },
+// axisTick: {
+// show: false
+// }
+// },
+// {
+// boundaryGap: false,
+// splitNumber: 4,
+// type: 'value',
+// axisLabel: {
+// textStyle: {
+// fontSize: 14,
+// color: colorY
+// }
+// },
+// nameTextStyle: {
+// color: '#fff',
+// fontSize: 14,
+// lineHeight: 40
+// },
+// splitLine: {
+// lineStyle: {
+// color: '#032c58'
+// }
+// },
+// axisLine: {
+// show: false,
+// lineStyle: {
+// color: '#032c58'
+// }
+// },
+// axisTick: {
+// show: false
+// }
+// }
+// ],
+// series: [
+// {
+// name: '瀹屾垚鏁�',
+// type: 'bar',
+// yAxisIndex: 0,
+// showSymbol: true,
+// showAllSymbol: true,
+// symbolSize: 4,
+// barWidth: 14,
+// zlevel: 1,
+// itemStyle: {
+// color: {
+// type: 'linear',
+// x: 0,
+// y: 0,
+// x2: 0,
+// y2: 1,
+// colorStops: [{
+// offset: 0,
+// color: `rgba(255,224,144,1)` // 0% 澶勭殑棰滆壊
+// }, {
+// offset: 1,
+// color: `rgba(72,226,198,1)` // 100% 澶勭殑棰滆壊
+// }]
+// }
+// },
+// label: {
+// show: false,
+// position: 'top',
+// distance: 10,
+// fontSize: 16,
+// fontFamily: 'DIN',
+// color: '#ffffff',
+// zlevel: 4,
+// z: 10,
+// formatter: '{c}%'
+// },
+// data: [560, 760, 850, 490, 380]
+// },
+// {
+// // 鍊煎垎闅�
+// type: 'pictorialBar',
+// itemStyle: {
+// normal: {
+// color: '#0F375F'
+// }
+// },
+// symbolRepeat: 'fixed',
+// symbolMargin: 3,
+// symbol: 'rect',
+// symbolClip: true,
+// symbolSize: [14, 3],
+// symbolPosition: 'start',
+// symbolOffset: [0, -1],
+// // symbolBoundingData: this.total,
+// // data: [100, 100, 100, 100, 100],
+// data: [1000, 1000, 1000, 1000, 1000],
+// width: 25,
+// z: 0,
+// zlevel: 2
+// },
+// {
+// // 杈呭姪鑳屾櫙鍥惧舰
+// name: '浠诲姟鏁�',
+// type: 'bar', // pictorialBar
+// barWidth: '14',
+// barGap: '-100%',
+// itemStyle: {
+// normal: {
+// borderWidth: 0,
+// // color: 'rgba(146,158,48,0)'
+// color: 'rgba(146,158,48,0)'
+// },
+// barBorderRadius: 10
+// },
+// data: [800, 900, 1000, 600, 700],
+// z: 0,
+// zlevel: 0
+// },
+// {
+// name: '瀹屾垚鐜�',
+// type: 'line',
+// yAxisIndex: 1,
+// showSymbol: true,
+// showAllSymbol: true,
+// symbolSize: 6,
+// barWidth: 14,
+// zlevel: 3,
+// lineStyle: {
+// normal: {
+// width: 2,
+// color: `rgba(72,226,198)`
+// }
+// },
+// areaStyle: {
+// normal: {
+// color: {
+// type: 'linear',
+// x: 0,
+// y: 0,
+// x2: 0,
+// y2: 1,
+// colorStops: [
+// {
+// offset: 0,
+// color: `rgba(72,226,198, 0.3)`// 0% 澶勭殑棰滆壊
+// },
+// {
+// offset: 1,
+// color: `rgba(72,226,198, 0.2)` // 100% 澶勭殑棰滆壊
+// }
+// ],
+// globalCoord: false // 缂虹渷涓� false
+// } // 娓愬彉棰滆壊
+// }
+// },
+// itemStyle: {
+// normal: {
+// color: {
+// type: 'linear',
+// x: 0,
+// y: 0,
+// x2: 0,
+// y2: 1,
+// colorStops: [
+// {
+// offset: 0,
+// color: `rgba(72,226,198, 1)`// 0% 澶勭殑棰滆壊
+// },
+// {
+// offset: 1,
+// color: `rgba(72,226,198, 0.2)` // 100% 澶勭殑棰滆壊
+// }
+// ],
+// globalCoord: false // 缂虹渷涓� false
+// } // 娓愬彉棰滆壊
+// }
+// },
+// data: [70, 80, 90, 20, 30]
+// }
+// ]
+// }
+// return option
+// }
+
+export function cjzl03() {
+ const data1 = [300, 100, 200, 200, 100]
+ const data2 = [300, 200, 300, 300, 400]
+
+ // let percent=[]
+
+ const option = {
+ backgroundColor: 'transparent',
+ grid: {
+ left: '2%',
+ top: '10%',
+ right: '2%',
+ bottom: '20%',
+ containLabel: true
+ },
+ legend: {
+ // show: true,
+ // itemGap: 20,
+ // data: ['娉ㄥ唽鎬婚噺', '鏈�鏂版敞鍐岄噺'],
+ // textStyle: {
+ // color: '#f9f9f9',
+ // borderColor: '#fff'
+ // }
+ data: ['瀹屾垚鏁�', '浠诲姟鏁�', '瀹屾垚鐜�'],
+ textStyle: { fontSize: 14, color: '#fff' },
+ itemWidth: 25,
+ itemHeight: 10,
+ itemGap: 15,
+ bottom: '5%',
+ selectedMode: false
+ },
+ xAxis: {
+ type: 'category',
+ boundaryGap: true,
+ axisLabel: {
+ interval: 0,
+ formatter: '{value}',
+ fontSize: 14,
+ margin: 20,
+ textStyle: {
+ color: colorX
+ }
+ },
+ axisLine: {
+ lineStyle: {
+ color: '#032c58'
+ }
+ },
+ splitLine: {
+ show: false,
+ lineStyle: {
+ color: '#032c58'
+ }
+ },
+ axisTick: {
+ show: false
+ },
+ data: ['绮惧伐杞﹂棿', '鏈哄姞宸ヨ溅闂�', '瑁呴厤杞﹂棿', '绮楄溅杞﹂棿', '鍖呰杞﹂棿']
+ },
+ yAxis: [
+ {
+ boundaryGap: false,
+ // splitNumber: 4,
+ type: 'value',
+ // max: 100,
+ axisLabel: {
+ textStyle: {
+ fontSize: 14,
+ color: colorY
+ }
+ },
+ nameTextStyle: {
+ color: '#fff',
+ fontSize: 14,
+ lineHeight: 40
+ },
+ splitLine: {
+ show: true,
+ lineStyle: {
+ color: '#032c58'
+ }
+ },
+ axisLine: {
+ show: true,
+ lineStyle: {
+ color: '#032c58'
+ }
+ },
+ axisTick: {
+ show: false
+ }
+ },
+ {
+ boundaryGap: false,
+ // splitNumber: 4,
+ max: 100,
+ type: 'value',
+ axisLabel: {
+ textStyle: {
+ fontSize: 14,
+ color: colorY
+ }
+ },
+ nameTextStyle: {
+ color: '#fff',
+ fontSize: 14,
+ lineHeight: 40
+ },
+ splitLine: {
+ show: false,
+ lineStyle: {
+ color: '#032c58'
+ }
+ },
+ axisLine: {
+ show: false,
+ lineStyle: {
+ color: '#032c58'
+ }
+ },
+ axisTick: {
+ show: false
+ }
+ }
+ ],
+ series: [
+ { // 涓変釜鏈�搴曚笅鐨勫渾鐗�
+ 'name': '',
+ 'type': 'pictorialBar',
+ 'symbolSize': [45, 25],
+ 'symbolOffset': [0, 10],
+ 'z': 12,
+ itemStyle: {
+ opacity: 1,
+ color: function(params) {
+ return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+ offset: 0,
+ color: '#00EC28' // 0% 澶勭殑棰滆壊
+ }, {
+ offset: 1,
+ color: '#5DF076'// 100% 澶勭殑棰滆壊
+ }], false)
+ }
+ // color: function(params) {
+ // var a = params.name.slice(0, 2)
+ // if (a === '绮惧伐') {
+ // return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+ // offset: 0,
+ // color: '#FF9A22' // 0% 澶勭殑棰滆壊
+ // }, {
+ // offset: 1,
+ // color: '#FFD56E'// 100% 澶勭殑棰滆壊
+ // }], false)
+ // } else if (a === '鏈哄姞' || a === '绮楄溅') {
+ // return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+ // offset: 0,
+ // color: '#00EC28' // 0% 澶勭殑棰滆壊
+ // }, {
+ // offset: 1,
+ // color: '#5DF076'// 100% 澶勭殑棰滆壊
+ // }], false)
+ // } else if (a === '瑁呴厤' || a === '鍖呰') {
+ // return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+ // offset: 0,
+ // color: '#12B9DB' // 0% 澶勭殑棰滆壊
+ // }, {
+ // offset: 1,
+ // color: '#6F8EF2'// 100% 澶勭殑棰滆壊
+ // }], false)
+ // }
+ // }
+ },
+ 'data': [1, 1, 1, 1, 1]
+ },
+
+ // 涓嬪崐鎴煴鐘跺浘
+ {
+ name: '瀹屾垚鏁�',
+ type: 'bar',
+ barWidth: 45,
+ barGap: '-100%',
+ itemStyle: { // lenged鏂囨湰
+ opacity: 0.7,
+ color: function(params) {
+ return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+ offset: 0,
+ color: '#00EC28' // 0% 澶勭殑棰滆壊
+ }, {
+ offset: 1,
+ color: '#5DF076'// 100% 澶勭殑棰滆壊
+ }], false)
+ }
+ },
+ data: data1
+ },
+
+ { // 鏇夸唬鏌辩姸鍥� 榛樿涓嶆樉绀洪鑹诧紝鏄渶涓嬫柟鏌卞浘锛堥偖浠惰惀閿�锛夌殑value鍊� - 20
+ type: 'bar',
+ barWidth: 45,
+ barGap: '-100%',
+ stack: '骞垮憡',
+ itemStyle: {
+ color: 'transparent'
+ },
+ label: {
+ normal: {
+ show: true,
+ position: 'left',
+
+ fontSize: 14,
+ color: colorX,
+ // offset: [-50, 15],
+ zIndex: 10
+ }
+ },
+ data: data1
+ },
+
+ {
+ 'name': '', // 澶撮儴
+ 'type': 'pictorialBar',
+ 'symbolSize': [45, 25],
+ 'symbolOffset': [0, -10],
+ 'z': 12,
+ 'symbolPosition': 'end',
+ itemStyle: {
+ color: '#163F7A',
+ opacity: 1
+ },
+ 'data': data2
+ },
+
+ {
+ 'name': '',
+ 'type': 'pictorialBar',
+ 'symbolSize': [45, 25],
+ 'symbolOffset': [0, -10],
+ 'z': 12,
+ itemStyle: {
+ opacity: 1,
+ color: function(params) {
+ return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+ offset: 0,
+ color: '#00EC28' // 0% 澶勭殑棰滆壊
+ }, {
+ offset: 1,
+ color: '#5DF076'// 100% 澶勭殑棰滆壊
+ }], false)
+ }
+ },
+ 'symbolPosition': 'end',
+ 'data': data1
+ },
+
+ {
+ name: '浠诲姟鏁�',
+ type: 'bar',
+ barWidth: 45,
+ barGap: '-100%',
+ z: 0,
+ itemStyle: {
+ color: '#163F7A',
+ opacity: 0.7
+ },
+ label: {
+ normal: {
+ show: true,
+ position: 'top',
+
+ fontSize: 14,
+ color: colorX,
+ offset: [0, -5]
+ }
+ },
+ data: data2
+ },
+
+ {
+ name: '瀹屾垚鐜�',
+ type: 'line',
+ yAxisIndex: 1,
+ showSymbol: true,
+ showAllSymbol: true,
+ symbolSize: 6,
+ barWidth: 14,
+ zlevel: 3,
+ lineStyle: {
+ normal: {
+ width: 2,
+ color: `rgba(72, 226, 198)`
+ }
+ },
+ // areaStyle: {
+ // normal: {
+ // color: {
+ // type: 'linear',
+ // x: 0,
+ // y: 0,
+ // x2: 0,
+ // y2: 1,
+ // colorStops: [
+ // {
+ // offset: 0,
+ // color: `rgba(72,226,198, 0.3)`// 0% 澶勭殑棰滆壊
+ // },
+ // {
+ // offset: 1,
+ // color: `rgba(72,226,198, 0.2)` // 100% 澶勭殑棰滆壊
+ // }
+ // ],
+ // globalCoord: false // 缂虹渷涓� false
+ // } // 娓愬彉棰滆壊
+ // }
+ // },
+ itemStyle: {
+ normal: {
+ color: {
+ type: 'linear',
+ x: 0,
+ y: 0,
+ x2: 0,
+ y2: 1,
+ colorStops: [
+ {
+ offset: 0,
+ color: `rgba(72, 226, 198, 1)`// 0% 澶勭殑棰滆壊
+ },
+ {
+ offset: 1,
+ color: `rgba(72, 226, 198, 0.2)` // 100% 澶勭殑棰滆壊
+ }
+ ],
+ globalCoord: false // 缂虹渷涓� false
+ } // 娓愬彉棰滆壊
+ }
+ },
+ label: {
+ normal: {
+ show: true,
+ position: 'top',
+ fontSize: 14,
+ color: colorX,
+ formatter: params => {
+ return `${params.value}%`
+ }
+ // offset: [0, -5]
+ }
+ },
+ data: [100, 50, 66.7, 66.7, 25]
+ }
+ ]
+ }
+ return option
+}
--
Gitblit v1.9.3