1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
| const option = { grid: [ { show: false, left: 70, top: 40, bottom: 20, right: 70, }, ], textStyle: { color: 'white', }, tooltip: { formatter: '{c}', backgroundColor: 'transparent', borderColor: 'transparent', padding: 0, borderWidth: 0, textStyle: { color: 'red', fontSize: 16, fontWeight: 'bold', }, position: 'top', }, xAxis: { type: 'category', data: stateData.yearData, boundaryGap: false, }, yAxis: [ { type: 'value', offset: 15, splitLine: { lineStyle: { color: ['#fff'], type: 'dashed', }, }, position: 'left', axisTick: { show: true, }, scale: false, name: '面积(m²)', splitNumber: 5, min: stateData.mjYAxis.min, max: stateData.mjYAxis.max, interval: (stateData.mjYAxis.max - stateData.mjYAxis.min) / 5, }, { type: 'value', name: '增长率', position: 'right', offset: 15, nameTextStyle: { align: 'left' }, axisLabel: { formatter: '{value} %', }, axisLine: { lineStyle: { color: '#5e859e', width: 2, }, },
splitNumber: 5, min: stateData.zzlYAxis.min, max: stateData.zzlYAxis.max, interval: (stateData.zzlYAxis.max - stateData.zzlYAxis.min) / 5, }, ], series: [ { data: stateData.mjData, type: 'line', smooth: true, symbol: 'emptyCircle', symbolSize: 10, itemStyle: { normal: { lineStyle: { width: 5, color: 'rgba(14, 232, 79, 1)', }, }, }, }, { data: stateData.zzlData, yAxisIndex: '1', type: 'bar', itemStyle: { normal: { color: new echarts.graphic.LinearGradient( 0, 1, 0, 0, [ { offset: 0, color: 'rgba(109, 183, 255, 0.97)', }, { offset: 1, color: 'rgba(49, 98, 255, 0.97)', }, ], false ), }, }, }, ], };
|