var colors = ['#5793f3', '#8B7500']; var xData = function() { var data = []; for (var i = 1; i < 13; i++) { data.push(i+'月'); } return data; }(); option = { title: { text: '吊销企业趋势', textStyle:{ fontSize: '15' } }, "tooltip": { "trigger": "axis", "axisPointer": { "type": "shadow", textStyle: { color: "#fff" } }, }, grid: { top:80, }, legend: { data:['吊销企业数','吊销企业环比率'], align: 'left', left: 10, top:30 }, "calculable": true, "xAxis": [{ "type": "category", "axisLine": { lineStyle: { color: '#000' } }, "splitLine": { "show": false }, "axisTick": { "show": false }, "splitArea": { "show": false }, "axisLabel": { "interval": 0, textStyle:{ fontSize:10 } }, "data": xData, }], yAxis: [ { type: 'value', name: '', min: 0, max: 1000, position: 'left', axisLine: { lineStyle: { color: colors[0] } }, axisLabel: { formatter: '{value} ' } }, { type: 'value', name: '', position: 'right', axisLine: { lineStyle: { color: colors[1] } }, axisLabel: { formatter: '{value} %' } } ], series: [ {name:'吊销企业数', type:'bar', color: colors[0], barWidth : 30, data:[421,356,719,658,458,443,620,416,551,721,466,632]}, { name:'吊销企业环比率', color: colors[1], yAxisIndex: 1, type:'line', itemStyle : { normal : { lineStyle:{ width:3,//折线宽度 }, opacity: 0.4 } }, data:[11,4,7,8,6,2,10,8,10,5,5,4] }] };