当legend里面有''(空字符串)的话,箭头无法点击
配置项如下
option = {
title: {
text: '医保/非医保人次',
right: 'center'
},
toolbox: {
feature: {
dataView: {
show: true,
readOnly: false
},
saveAsImage: {
show: true,
backgroundColor: '#ffffff'
},
magicType: {
type: ['stack', 'tiled']
},
restore: {}
}
},
legend: {
data: ['', '三八节八折优惠', '企业离休', '体检', '公益医保', '其他', '市居民医保', '市直离休', '市直离休(社区)', '市职工医保', '市领导', '市领导.', '政府门诊', '新农合', '淇河门诊', '科室备药', '铁路医保', '鹤翔门诊', '黎阳门诊', '其他(免费)', '富士康门诊', '贫困精神人', '归侨(门诊)', '归侨直系亲属(住院)', '归侨直系亲属(门诊)'],
type: 'scroll',
top: '8%'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
grid: {
top: '20%',
left: '5%',
right: '4%',
bottom: '12%',
containLabel: true
},
xAxis: [{
type: 'category',
axisLine: {
lineStyle: {
color: '#000'
}
},
data: ['2013', '2014', '2015'],
axisLabel: {
interval: 0,
rotate: 50,
textStyle: {
color: '#000'
}
}
}],
yAxis: [{
name: '',
type: 'value',
axisLine: {
lineStyle: {
color: '#000'
}
},
axisLabel: {
textStyle: {
color: '#000'
},
formatter: function(value) {
if (value >= 100000000) {
return value / 100000000 + ' 亿'
} else if (value >= 1000000) {
return value / 10000 + ' 万'
} else {
return value + ''
}
},
}
}],
dataZoom: [{
show: true,
height: 30,
bottom: 10,
start: 0,
end: 100,
handleSize: '110%',
}, {
type: 'inside'
}],
series: [{
name: '未填',
type: 'bar',
data: [25284, 32682, 22137],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '三八节八折优惠',
type: 'bar',
data: [2, 0, 0],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '企业离休',
type: 'bar',
data: [727, 542, 283],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '体检',
type: 'bar',
data: [66, 304, 19],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '公益医保',
type: 'bar',
data: [17, 10, 0],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '其他',
type: 'bar',
data: [198283, 287583, 206637],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '市居民医保',
type: 'bar',
data: [271, 314, 419],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '市直离休',
type: 'bar',
data: [674, 760, 981],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '市直离休(社区)',
type: 'bar',
data: [477, 296, 0],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '市职工医保',
type: 'bar',
data: [60348, 65452, 50920],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '市领导',
type: 'bar',
data: [931, 1217, 905],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '市领导.',
type: 'bar',
data: [1004, 971, 658],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '政府门诊',
type: 'bar',
data: [12, 9, 1],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '新农合',
type: 'bar',
data: [1, 0, 1],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '淇河门诊',
type: 'bar',
data: [48, 9, 4],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '科室备药',
type: 'bar',
data: [235, 344, 352],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '铁路医保',
type: 'bar',
data: [254, 268, 37],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '鹤翔门诊',
type: 'bar',
data: [104, 118, 142],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '黎阳门诊',
type: 'bar',
data: [19, 13, 3],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '其他(免费)',
type: 'bar',
data: [0, 1, 0],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '富士康门诊',
type: 'bar',
data: [0, 114, 58],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '贫困精神人',
type: 'bar',
data: [0, 206, 153],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '归侨(门诊)',
type: 'bar',
data: [0, 0, 1],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '归侨直系亲属(住院)',
type: 'bar',
data: [0, 0, 1],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}, {
name: '归侨直系亲属(门诊)',
type: 'bar',
data: [0, 0, 9],
itemStyle: {
normal: {
color: ''
}
},
label: {
normal: {
show: true,
position: 'top'
}
},
barWidth: ''
}]
};