Recenter Chart after zoom and\or pan - achartengine

Is there a way to re-center the chart after a user has zoomed in\out or panned the chart? I would like to give the user the ability to be able to get the chart back to its original zoomed and panned view. Use case would be if they zoomed in to far or off of the chart line completely.

If you do renderer.setZoomButtonsVisible(true) you will see three buttons on the bottom right side of the screen. One of them does what you need.
Otherwise, you can call chartView.zoomReset() in order to programmatically trigger this.

Related

Free Scrolling in Xcode 8.3.3

I want to create a page with a big image as background and buttons that users can interact with.
So imagine I put a big image such as a piece of map into the screen, but I only show a corner of the map in the display. So if a user wants to see other parts of the map, they have to "scroll" and navigate to wherever they want.
Meanwhile I also want to put a button they can tap on, and that button should lead to a php webpage (in-app, not opening in safari or else) or information page about sites and buildings in this location.
I am a rookie and I haven't have any code written down yet. I am thinking about using UIScrollView and UIButton, but am I on the right direction? Any advice?
Thanks in advance!
First you need a way to pinch zoom the image. In this mode, you can drag the image in any direction that you want. A common method can be found here. A scroll view can only scroll horizontally or vertically but with that image zooming, each image can be zoomed in and then dragged to any direction you want. You can have a scroll view with only one image.
After you have the image zooming ready, all you need to do is to create a subview on your screen to cover part of the image view or scroll view, whatever you used.

Highmaps: how to disable map zoom by mouse scroll

I am able to display a map on a page. However, when I scroll up or down the page with the mouse middle scroll button (Logitech mouse), the map zooms in and out. I hope to disable it.
How can I do it?
There's option for that, see mapNavigation.enableMouseWheelZoom.

HighCharts moves screen position on load

I have four HighCharts on a page, stacked vertically. In each of these charts I have buttons that change the data range and re-load the chart.
This works fine for the top two, but when the chart re-loads on the bottom two it moves the screen up the page, always to the same point.
With some testing I found that it doesn't matter what order the charts are in, and also if you click the button on the top form and scroll down the page, it moves the page back up to the same position.
It's like HighCharts has a lower limit on where the page an be and always moves it back to this position when a chart is loaded.
I can't find any settings within HighCharts or anything on Google that will sort this.
I thank you all in advance for your help
Paul
It's because chart container height for a moment gets smaller on chart reload. You can fix this by setting fixed container height.

How to move (drag) a zoomed graph in overview pane?

When I'm in overview window and zoom in, some part of the graph is not visible. I want to drag the graph so that I can see it at the zoomed in size.
I tried the "Center on graph" button, but it zooms out the graph and centers it on the screen. I tried the direct and drag tool, which doesn't seem to do anything. What to do to accomplish this?
I want to drag the node in upper left corner so that I can see what it connects to:
Right-click and drag (Gephi 0.9.1 for Mac).
To move the graph at a given level of zoom, you can right click.
The keyword was "navigation" :)
Happy work!
I figured out a way to do this with the mouse. If you want to zoom in on an area, you need to position your mouse over the area you want to see, and then use the scroll wheel to zoom in. So for the case above, zoom out until you can see everything, and then hover your mouse over the area you want to zoom in on (the upper left node in this case), and you scroll your mouse wheel to zoom. That will allow you to zoom in on an area without having to move the object on the canvas first.

Draw animations dynamically (interactively) on MKMapView

I want to draw an animation over MKMapView. I want it to be something like a compass arrow, that follows (rotates) user's taps / swipes .
So the arrow goes from the center of the screen and is of a fixed length. I don't need the line to be coordinate-specific, but I need to keep the map interactions intact (i.e. still being able to pinch-zoom on the map).
I tried to do that via MKPolyline (creating and then destroying a line), but that does not work (and from the way I had to do that I feel like it won't work). I wonder what would be the best way to handle that? Quartz?
I would accept just an explanation (which kind of view overlay over what, which classes to use), no code is necessary (but if you have a working example that's so much better ))
I draw views like a map ruler not as subview from MkMapView. I put kMapView and my ruler view into a container view. This works for views which positions are fixed on screen, like on center of screen, and are not related to a geographical position.

Resources