antvis/G2

Drag and zoom functionality #3480

mostopalove posted onGitHub

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

https://codepen.io/mostopalove/pen/gOmqNWw

Steps to reproduce

I have two goals. 1 - make the view-zoom interaction work only for the Y axis (in this example, it is a year axis) 2 - make the drag-move interaction work for this type of chart. And also it must work only for the Y axis.

Are there any solution? Please, update my simple example. Thank you!

Environment Info
g2 4.1.18
System MacOS
Browser latest

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


you can see the code of view-zoom. https://github.com/antvis/G2/blob/731294d4a07447f609bc8a4e3f1a16c345de0352/src/interaction/action/view/scale-zoom.ts#L33

zoom interaction is zooming the field scale(x / y).

posted by hustcc almost 4 years ago

@hustcc Can you give me an example of this? Since I did it above.

posted by mostopalove almost 4 years ago

@hustcc Could you show me an example of y-axis scaling?

posted by mostopalove almost 4 years ago

Fund this Issue

$0.00
Funded

Pull requests