配置项如下
const datas = [
['1月', 78],
['2月', 46],
['3月', 70],
['4月', 26],
['5月', 68],
['6月', 92],
['7月', 58],
['8月', 76],
['9月', 79],
['10月', 33],
['11月', 66],
['12月', 77],
]
const datas2 = [
['1月', 98],
['2月', 146],
['3月', 170],
['4月', 126],
['5月', 168],
['6月', 192],
['7月', 158],
['8月', 176],
['9月', 179],
['10月', 113],
['11月', 98],
['12月', 177],
];
option = {
color: ['#3760EA'],
tooltip: {},
grid: {
left: '30',
bottom: '3%',
containLabel: true
},
legend: {
data: ['客户总数量', '客户增长数量'],
top: '9%'
},
xAxis: [{
type: 'category',
name: '年/月',
nameTextStyle: {
color: '#666666'
},
axisLabel: {
margin: 20,
textStyle: {
color: "#A4ABBA"
}
},
axisLine: {
show: false,
},
axisTick: {
show: false
}
}],
yAxis: [{
name: '数量',
type: 'value',
nameTextStyle: {
color: '#666666',
align: 'right',
padding: [0, 20, 0, 0]
},
axisLine: {
show: false,
},
axisLabel: {
margin: 20,
textStyle: {
color: "#A4ABBA"
}
},
axisTick: {
show: false
},
splitLine: {
color: '#F4F5FA'
},
}],
series: [{
name: '客户增长数量',
type: 'bar',
barWidth: "16",
data: datas,
},
{
name: '客户总数量',
type: 'line',
symbolSize: 8,
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#B8C8FF'
}, {
offset: 1,
color: '#FAFAFA'
}])
}
},
lineStyle: {
width: 1
},
data: datas2,
}
],
dataZoom: [{
'show': true,
'height': 8,
'xAxisIndex': [
0
],
bottom: '1%',
'start': 0,
'end': 100,
handleIcon: 'image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAABGdBTUEAALGPC/xhBQAAACBjSFJN AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABZVBMVEUAAAC/zNnCy9jGy9jF zNjFzNjFzdjEzNjEy9jGzNjGzNjGzNjFzNjFzdjEy9jHztjFy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/GXkQR6P56P0cSIuJUo Boew2R4cDA8NiluIpq9/QI2Mgf4+ceuY6EngMtWY6E30iFvGTGcXLg8STXdXp7hVXLS1o7JscXS0 t4lbxE9rHJONDmLHW8VtEaWpGXNqw4GW5iZxK+TQGOB+XboDjeL3l0lkbp45Vvx4fi4ifmcF+KIL 6DfGXoj6dNvrTCQaC9oOFTHCdjAW9eYfUQpfRaU/EKyqtkM14dracE3Irq4KBvyVFar+hj+twqn7 m4nq5AAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0wNS0yM1QwNzo1OTozNSswMDowMONkZukAAAAl dEVYdGRhdGU6bW9kaWZ5ADIwMjAtMDUtMjNUMDc6NTk6MzUrMDA6MDCSOd5VAAAAAElFTkSuQmCC',
handleSize: '110%',
handleStyle: {
color: '#CCC'
},
textStyle: {
color: 'rgba(170,176,185,1)'
},
borderColor: 'transparent',
fillerColor: '#CCC'
}, {
'type': 'inside',
'show': false,
'height': 10,
'start': 0,
'end': 35,
minValueSpan: 5,
}]
};