antvis/G2

图表重绘时会重置slider的范围 #3427

Otocolobus-manul posted onGitHub

  • I have searched the issues of this repository and believe that this is not a duplicate.

https://antv-g2.gitee.io/zh/examples/area/basic#area-large

Steps to reproduce

  1. 随意拖动slider范围
  2. 缩放浏览器窗口
  3. slider又回到初始范围
Environment Info
g2 4.1.16
System -
Browser -

在修改data时也会触发重绘遇到这个bug,在一些需要slider和data联动的场景中十分不便

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


目前这个问题确实不是很好解决,slider 的状态目前没有办法很好的存储起来。后续新版本解决,时间暂时给不出来~

posted by hustcc almost 4 years ago

这个需要自己通过 chart.on('slider:change',() => {}) 去存储状态,然后再重新渲染的时候,通过 chart.emit('slider:change', {}) 去设置状态,可以参考这个文档

posted by pearmini over 1 year ago

Fund this Issue

$0.00
Funded

Pull requests