现在的柱子是没有数值的 要加上左右两边的指引线
配置项如下
option = {
xAxis: [{
data: ['一月','二月','三月','四月','五月'],
show:false,
}, {
data: ['一月','二月','三月','四月','五月'],
axisTick:{
show:false
},
gridIndex: 1,
axisLabel:{
color:'#93A4B5',
}
}],
yAxis: [{
// splitLine: {show: false}
show:false,
splitLine: {show: false},
axisLine:{
show:false
}
}, {
// splitLine: {show: false},
show:false,
splitLine: {show: false},
axisLine:{
show:false
},
gridIndex: 1
}],
grid: [{
left:'10%'
}, {
top: '0%'
}],
dataZoom: {
show: true,
realtime: true,
//orient: 'vertical', // 'horizontal'
//x: 0,
// y: 190,
//width: 400,
height: 0,
backgroundColor: '#F5F5F8',
dataBackgroundColor: '#F5F5F8',
fillerColor: '#28A2E2',
handleColor: '#FFFFFF',
//xAxisIndex:[],
//yAxisIndex:[],
start: 90,
end: 100,
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
handleSize: '120%',
handleStyle: {
color: '#28A2E2',
shadowBlur: 3,
shadowColor: 'rgba(0, 0, 0, 0.6)',
shadowOffsetX: 2,
shadowOffsetY: 2
},
bottom: 0,
type: 'inside',
zoomLock: true,
preventDefaultMouseMove: false,
xAxisIndex: [0, 1]
},
series: [{
type: 'bar',
z:10,
showSymbol: false,
barCategoryGap:'80%',
barGap:'100%',
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{offset: 0, color: '#5FCAE3'},
{offset: 1, color: '#45CCCF'},
]),
barBorderRadius: [5, 5, 0, 0],
}
},
// barWidth:20,
data: [100,200,300,400,300]
}, {
type: 'bar',
showSymbol: false,
data: [150,200,400,200,150],
itemStyle: {
normal: {
barBorderColor:'#5FCAE3',
barBorderWidth:2,
color:'transparent',
barBorderRadius: [5, 5, 0, 0],
},
emphasis:{
barBorderColor:'#5FCAE3',
barBorderWidth:2
}
},
barCategoryGap:'30%',
xAxisIndex: 1,
yAxisIndex: 1
},{
type: 'bar',
z:10,
showSymbol: false,
barCategoryGap:'40%',
// barGap:'100%',
// barWidth:20,
itemStyle: {
normal: {
color: '#D4DCE4',
barBorderRadius: [5, 5, 0, 0],
},
emphasis:{
color: '#D4DCE4',
}
},
data: [120,220,320,440,220]
}, {
type: 'bar',
showSymbol: false,
data: [60,130,300,200,340],
itemStyle: {
normal: {
barBorderColor:'#D4DCE4',
barBorderWidth:2,
color:'transparent',
barBorderRadius: [5, 5, 0, 0],
},
emphasis:{
barBorderColor:'#D4DCE4',
barBorderWidth:2,
}
},
barCategoryGap:'30%',
xAxisIndex: 1,
yAxisIndex: 1
}]
};