MrStuff88
MrStuff88

Reputation: 327

How to zoom out graph programmatically via using GraphView?

I`m using graph library - GraphView. User can zoom in/zoom out graph. I want to zoom out graph on click button in the default state. Is there are any available methods that can zoom out graph programmatically? Or I should Override some standard gesture method.

If I should then what methods I have to override??

Show me way please!

Upvotes: 1

Views: 1456

Answers (1)

appsthatmatter
appsthatmatter

Reputation: 6417

just change the viewport:

mGraph.getViewport().setMinX(...); mGraph.getViewport().setMaxX(...); mGraph.getViewport().setMinY(...); mGraph.getViewport().setMaxY(...);

Upvotes: 1

Related Questions