效果图
option的值
var colors = ['#5793f3', '#d14a61', '#675bba'];
option = {
color: colors,
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross'
}
},
grid: {
right: '20%'
},
xAxis:
{
type: 'category',
axisTick: {
alignWithLabel:true
},
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月']
}
,
yAxis: [
{
type: 'value',
position: 'left',
min:0,
axisLine: {
show: false
},
axisLabel: {
formatter: '{value}'
},
axisTick: {
show: false
},
splitArea: {show: false}
}
],
series: [
{
name: '蒸发量',
type: 'bar',
barMaxWidth:"20",
barGap: "-100%",
itemStyle:{
color:"#2C9DFF",
barBorderRadius:[0,0,10,10]
},
label:{
show:true,
position:"insideTop"
},
z:10,
data: [99,150,100,20,20,10,15,23,30,60]
},
{
name: '总数',
type: 'bar',
barMaxWidth:"20",
itemStyle:{
barBorderRadius:[10,10,0,0],
color:"#E7E7E7",
},
label:{
show:true,
position:"top",
color:"#000"
},
data: [100,200,500,100,100,150,600,150,130,175]
},
]
};
重点属性
barGap: "-100%",
z:10,