export function zhuzhuangliti_new_consume(dom, option, click) { var barWidth = 30; var dataName = option.dataName; var dataReal = option.dataReal; var datafor1 = option.datafor1; option = { xAxis: [{ formatter: '{a} <br/>{b}: {c} ({d})', axisLabel: { color: '#ffffff', textStyle: { fontSize: 12 }, interval: 0, }, axisLine: { show: false, }, axisTick: { show: false, }, // data: ['一看', '而看', '三看', '进贤县', '南昌市', '是看', '南朝鲜'] data: dataName }], tooltip: { trigger: 'axis', formatter: '{b}<br/>{c}', axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' } }, grid: { top: '18%', left: option.id ? '3%' : '1.5%', right: option.id ? '3%' : '1.5%', bottom: '2%', containLabel: true }, yAxis: { splitLine: { show: true, lineStyle: { color: 'rgb(76,76,76)', type: 'dashed' } }, axisLine: { show: false, }, axisTick: { show: false, }, splitLine: { show: true, lineStyle: { color: ['#a8abad'], type: 'dashed' } }, axisLabel: { textStyle: { color: option.color ? option.color : '#999' } }, }, series: [{ z: 1, type: 'bar', barWidth: barWidth, // data: [220, 182, 191, 234, 290, 330, 310], data: dataReal, label: { show: option.id ? true : false, position: 'top', color: '#74F9FF' }, itemStyle: { normal: { //线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’,则该四个值是绝对像素位置。 color: new eCharts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(3, 210, 190, .8)' }, { offset: 1, color: 'rgba(3,227,205,.5)' } ], false), } }, }, { z: 2, name: '底部', type: 'pictorialBar', data: [1, 1, 1, 1, 1, 1, 1], // data: datafor1, symbol: 'diamond', symbolOffset: [0, '50%'], symbolSize: [barWidth, 10], itemStyle: { normal: { color: 'rgba(3, 210, 190, .8)' } }, }, { z: 3, name: '上部1', type: 'pictorialBar', symbolPosition: 'end', //data: [1, 0, 191, 234, 290, 330, 310,1], //前两个值为0时会出现样式问题 data: datafor1, symbol: 'diamond', symbolOffset: [1, '-50%'], symbolSize: [barWidth - 4, 10 * (barWidth - 4) / barWidth], itemStyle: { normal: { borderColor: 'rgba(3, 210, 190, 1)', borderWidth: 2, color: 'rgba(3, 210, 190, 1)' } }, }] }; setOptions(dom, option, click);}