var attaData1 = [62, 52, 34, 61, 15]; var attaData2 = [162, 152, 134, 161, 115]; option = { backgroundColor: '#000', tooltip: { trigger: 'axis', }, grid: { top:50, left:80, bottom:50, right:80, }, xAxis: { show: true, type: 'value', name: '单位:㎡', axisLine: { show: true, lineStyle: { color: 'rgba(255, 255, 255, 0.5)', type:'dashed' }, }, axisLabel: { textStyle: { color: 'rgba(255, 255, 255, 0.5)', }, }, axisTick: { show: false, }, splitLine: { show: true, lineStyle: { color: 'rgba(255, 255, 255, 0.5)', type:'dashed' }, }, }, yAxis: { data: ['杭州市', '宁波市', '绍兴市', '湖州市', '温州市'], axisLine: { lineStyle: { color: 'rgba(255, 255, 255, 0.5)', }, }, axisLabel: { textStyle: { color: 'rgba(255, 255, 255, 0.5)', }, }, axisTick: { show: false, }, splitLine: { show: false, }, }, series: [ { name: '水域', type: 'bar', barWidth: 12, zlevel: 2, itemStyle: { color: '#268AFF' }, data: attaData1, }, { name: '山脉', type: 'bar', barWidth: 12, zlevel: 2, itemStyle: { color: '#36F097' }, data: attaData2, }, ], };