Custom zoom in/out buttons
demo
This demo shows how we can use chart’s API to zoom it using external controls.
demo
This demo shows how we can use chart’s API to zoom it using external controls.
demo
This demo shows how we can implement hit event on DateAxis labels to automatically zoom to the clicked period.
tutorial
The XYChart can be zoomed using built-in scrollbar controls or with a chart cursor. This tutorial will show how you can zoom the chart programatically using its API. Zooming chart via API The zooming of a chart happens via zooming of a particular axis. Say we have a DateAxis as chart’s X axis. To zoom […]
tutorial
When XYChart is zoomed in, a small round button appears in the corner to indicate that only partial data is show, and to provide means to zoom back out. This tutorial will show how you can configure, or outright disable this control. Button element The zoom out button is accessible via chart’s zoomOutButton property. It’s […]
tutorial
Any axis in amCharts 4 can be zoomed. And sometimes we need to know when that happens, as well as the range of the new zoom. This tutorial will walk through all the necessary information to make that happen. This works a bit differently on different axis types, so we’ll explore them separately. Catching zoom […]
tutorial
In this tutorial we explained how you can pre-zoom your map to a specific country. This tutorial builds on it to produce an example that pre-zooms the map to several countries. One-country solution In the previous tutorial we have used Map series’ method getPolygonById(id) to extract a polygon object of a specific country by its […]
tutorial
This tutorial will explain how you can set minimal width/height of the chart Scrollbar’s “thumb” – draggable middle section. The problem OK, so you added a scrollbar (or a couple of) to your chart. This is great because it allows your users to zoom the chart as well as pan the selection. The thumb – […]
tutorial
Our Map Chart allows zooming directly to a specific polygon (country). However, for some countries, automatically-calculated zoom settings might not cut it. This tutorial will explain how you can use Polygon series data to override default zoom settings with custom ones. The problem We can make the chart zoom to a specific country using zoomToMapObject() […]
tutorial
You can pre-zoom the map to certain coordinates and level. If you don’t want to do that, you can make the chart pre-zoom to a particular country. This tutorial will explain how. Zooming to country The Map chart has a dedicated method for zooming to a polygon (country) of our choice: zoomToMapObject(object). The name leaves […]
tutorial
Map Chart can be zoomed and panned. There is, however, no built-in “go home” button. This tutorial will show how to add one which resets map’s zoom and position to initial state. Base map Let’s use this very basic map as our test subject. We can pan the map by dragging with a mouse or […]