求大神指教,dataZoom-inside模式下能否默认选中窗口中中间的条柱,在滑动中自动选中,并返回该组柱图的数据,求大神支招
配置项如下
option = {
tooltip: {},
xAxis: {
axisLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
show: true,
textStyle: {
color: '#54a4f7',
fontWeight: 'bold',
fontSize: 16
}
},
show: true,
position: 'top',
data: ['', '', '2010年', '2011年', '2012年', '2013年', '2014年', '2015年', '2016年', '2017年', '', '']
},
yAxis: {
show: false
},
dataZoom: [{
type: 'inside',
startValue: 7,
endValue: 11
}],
series: [{
itemStyle: {
normal: {
barBorderRadius: [16, 16, 0, 0],
color: new echarts.graphic.LinearGradient(
0, 0, 0, 1, [{
offset: 0,
color: '#3d94ef'
}, {
offset: 0.5,
color: '#95c5f7'
}, {
offset: 1,
color: '#ffffff'
}]
)
}
},
name: '接单总数',
type: 'bar',
barWidth: 32,
data: ['', '', 1124, 1358, 1460, 1788, 1906, 1982, 2056, 2100, '', '']
}]
};