[Bug] type custom 增加dataZoom缩小在放大后消失
Version
5.3.3
Link to Minimal Reproduction
No response
Steps to Reproduce
option = { legend: {
}, dataZoom: {
}, grid: { left: '3%', right: '3%', top: '1%', bottom: '10%', containLabel: true }, xAxis: { type: 'time', min: '2018-08-25 00:00:00', max: '2018-08-27 00:00:00', textStyle: { color: '#f0f0f0' } }, yAxis: { data: ['test'], textStyle: { color: '#f0f0f0' } }, series: [ { avoidLabelOverlap: true, type: 'custom', selectedMode: 'single', labelLayout: { hideOverlap: false }, legendHoverLink: false, renderItem: function (params, api) { var categoryIndex = api.value(0) var start = api.coord([api.value(1), categoryIndex]) var end = api.coord([api.value(2), categoryIndex]) var height = 24
return {
type: 'rect',
shape: echarts.graphic.clipRectByRect({
x: start[0],
y: start[1] - height / 2,
width: end[0] - start[0],
height: height
}, {
x: params.coordSys.x,
y: params.coordSys.y,
width: params.coordSys.width,
height: params.coordSys.height
}),
style: api.style()
}
},
encode: {
x: [1, 2],
y: 0
},
data: [
{
z: 10000,
itemStyle: { normal: { color: 'red' }},
name: 'test1',
value: [1, '2018-08-25 00:00:00', '2018-08-25 23:59:59']
},
// dataItem
{
z: 0,
name: 'test2',
value: [1, '2018-08-25 02:00:00', '2018-08-25 03:00:00']
}
]
}
] }
Current Behavior
- dataZoom缩小后在重置后,中间蓝色条消失。
- 悬浮在红色上面,有没有方法蓝色不消失
Expected Behavior
- dataZoom缩小后在重置后,蓝色条和初始值一样。
- 悬浮在红色上面,蓝色不消失
Environment
- OS:window 10
- Browser:Chrome
- Framework:vue2
Any additional comments?
No response
@a949066041 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
TRANSLATED
TITLE
[Bug] type custom add dataZoom to zoom out and disappear after zooming in