function getOptions(data) { let d = '//img.isqqw.com/profile/upload/2023/10/16/f99ebbad-fdf9-4872-b2bc-cc09a454690f.png' let a = [{ "other": "0.1634", "sort": 1645454.7071, "value": "1645454.7071", "key": "柱子1" }, { "other": "0.1292", "sort": 1301048.301, "value": "1301048.3010", "key": "园区柱子" }, { "other": "0.1178", "sort": 1186222.7467, "value": "1186222.7467", "key": "柱子2" }, { "other": "0.1102", "sort": 1109709.0521, "value": "1109709.0521", "key": "柱子3" }, { "other": "0.1102", "sort": 1109698.4473, "value": "1109698.4473", "key": "柱子4" }, { "other": "0.0912", "sort": 918409.5712, "value": "918409.5712", "key": "柱子5" }, { "other": "0.0912", "sort": 918388.3616, "value": "918388.3616", "key": "柱子6" }, ], e; let u = new echarts.graphic.LinearGradient( 0, 1, 0, 0, [{ offset: 0, color: '#54FF9F', }, { offset: 1, color: '#008B45', }, ], !1 ), y = new echarts.graphic.LinearGradient( 0, 1, 0, 0, [{ offset: 0, color: '#FFD700', }, { offset: 1, color: '#8B6914', }, ], !1 ); let c = [], h = []; a.forEach(item => { const { key } = item; if (key === '园区柱子') { c.push(y); h.push('#FFD700'); } else { c.push(u); h.push('#54FF9F'); } }); e = { backgroundColor: 'rgb(6 14 26)', color: c, color2: h, animation: !0, xAxis: { type: 'category', axisLabel: { margin: 11, fontSize: 16, color: 'white', }, data: [], axisTick: { show: !1, }, axisLine: { show: !1, }, }, yAxis: { type: 'value', axisLabel: { show: !1, }, axisLine: { show: !0, lineStyle: { type: 'dashed', color: 'rgba(0,204,255,0.3)', }, }, position: 'right', splitNumber: 3, splitLine: { show: !0, lineStyle: { type: 'dashed', color: 'rgba(0,204,255,0.3)', }, }, }, grid: { show: !1, top: '18%', bottom: '11%', left: '2%', right: '5%', }, series: [{ name: '标签', type: 'pictorialBar', animation: !0, symbol: 'rect', symbolSize: ['32', '100%'], data: [], z: 2, symbolOffset: ['0', '-15'], }, { name: 'b', stack: 'amount', tooltip: { show: !1, }, type: 'pictorialBar', symbol: 'diamond', symbolSize: ['32', '15'], symbolOffset: ['0', '-22'], symbolPosition: 'end', data: [], z: 3, }, { name: 'c', stack: 'amount', tooltip: { show: !1, }, type: 'pictorialBar', symbol: 'diamond', symbolSize: ['32', '15'], symbolOffset: ['0', '-7'], symbolPosition: 'start', data: [], z: 3, }, { name: 'd', tooltip: { show: !1, }, type: 'pictorialBar', symbol: 'rect', symbolSize: ['32', '100%'], data: [], z: 0, symbolOffset: ['0', '-15'], }, { name: 'd2', tooltip: { show: !1, }, type: 'pictorialBar', symbol: 'image://' + d, symbolSize: ['1', '100%'], data: [], z: 10, symbolOffset: ['0', '-6'], }, { name: 'e', stack: 'amount', tooltip: { show: !1, }, type: 'pictorialBar', symbol: 'diamond', symbolSize: ['32', '15'], symbolOffset: ['0', '-21.4'], symbolPosition: 'end', data: [], z: 0, label: { show: !0, position: 'top', padding: [0, 0, -8, 0], formatter: function (i) { let n = i.dataIndex, l = a[n].value, p = a[n].other; return ( (l = l > 9999 ? (l / 1e4).toFixed(1) + '万' : l), i.name == '园区柱子' ? '{a|' + l + `} {c|` + p + '}' : '{b|' + l + `} {c|` + p + '}' ); }, rich: { a: { color: '#FFD200', fontSize: 23, fontWeight: 'bold', align: 'center', }, b: { color: '#4BF3F9', fontSize: 23, fontWeight: 'bold', align: 'center', }, c: { color: '#FF5353', fontSize: 14, align: 'center', borderWitdh: 10, borderColor: 'red', verticalAlign: 'top', }, }, fontSize: 20, fontWeight: 'bold', }, }, ], }; e.series[0].name = '数量'; a.forEach((item, t) => { e.xAxis.data.push(item.key); e.series[0].data.push({ value: Number(a[t].value), itemStyle: { color: e.color[t % e.color.length], }, animation: !1, }); e.series[1].data.push({ value: Number(a[t].value) + 4.5, itemStyle: { color: e.color[t % e.color.length], }, animation: !1, }); e.series[2].data.push({ value: 4.5, itemStyle: { color: e.color2[t % e.color2.length], }, animation: !1, }); e.series[3].data.push({ value: Number(a[0].value) * 1.3, itemStyle: { color: e.color2[t % e.color.length], opacity: 0.3, }, emphasis: { itemStyle: { color: e.color2[t % e.color.length], }, }, animation: !1, }); e.series[4].data.push({ value: Number(a[0].value) * 1.3 + 4.5, itemStyle: { color: e.color2[t % e.color.length], opacity: 0.4, }, emphasis: { itemStyle: { color: e.color2[t % e.color.length], }, }, animation: !1, }); e.series[5].data.push({ value: Number(a[0].value) * 1.3 + 4.5, itemStyle: { color: e.color2[t % e.color.length], opacity: 0.7, }, emphasis: { itemStyle: { color: e.color2[t % e.color.length], }, }, animation: !1, }); }); return e; } option =getOptions()