tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
backgroundColor: 'rgba(0,0,0,0.7)',
borderColor: '#415265',
borderWidth: 1,
textStyle: {
color: '#fff',
fontWeight:'bold',
},
borderRadius:6,
formatter: function (params) {
let str = '<div style="width:100%">'+params[0].name+'</div>'
for (let item of params) {
if(item.seriesType=="bar"&&item.seriesName=="实际量"){
str += "<div> <span style='display:inline-block;width:12px;height:2px;font-size: 12px; font-family: Source Han Sans SC; background-color: #8fb9e3; margin-right: 5px; margin-bottom: 5px'></span>实际量 :<span style='font-family: DIN Next LT Pro; font-size: 14px'> " + item.value+"</span></div>"
}
if(item.seriesType=="bar"&&item.seriesName=="计划量"){
str +=
"<div> <span style='display:inline-block;width:12px;height:2px;font-size: 12px; font-family: Source Han Sans SC; background-color: #f9ce94; margin-right: 5px; margin-bottom: 5px'></span>计划量 :<span style='font-family: DIN Next LT Pro; font-size: 14px'> " + item.value+"</span></div>"
}
}
return str
},
},
dataZoom: [
{
xAxisIndex: 0,
show: false,
type: "slider",
startValue: 0,
endValue: 3,
}],
