echarts [Feature] Lock one side of the dataZoom slider

xzabzqsa  于 2个月前  发布在  Echarts
关注(0)|答案(2)|浏览(33)

What problem does this feature solve?

Currently, dataZoom allows users to freely adjust both ends of the slider handle for zooming. However, I was wondering if it would be possible to consider adding an option to lock one end of the slider handle, preventing users from zooming outwards from that end.

What does the proposed API look like?

dataZoom: [{
    zoomLock: true / false,
    leftSliderLock: true / false,
    rightSliderLock: true / false,
 }],
acruukt9

acruukt91#

Can you provide a real-world example when it's necessary to lock one side? And if inside typed dataZoom is also presented in the same chart, can the user drag the chart area to move to the left when it's locked on the left side?

vq8itlhq

vq8itlhq2#

Hi, so for my case I had a line graph with dates on the x axis and values ​​on the y axis.
The values ​​were for two lines, to see the difference between two objects, however the data of these two lines were rebased to 100, so it was convenient that the zoom was blocked on the left so by zooming only on the right the value 100 would remain as initial.
Maybe it is not convenient to put inside if there is one side blocked in slider ..
Thank you

相关问题