Pre-zooming Map to a list of countries

Type 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 […]

Highlighting column series on legend click

Type tutorial

During the course of this tutorial we’ll modify the functionality of the legend from toggling series on and off, to rather highlighting it. Base chart Here’s our base chart we’re going to be working with: It has a legend, which acts normally: toggles relative series on and off on click. We’ve also set up our […]

Toggling series via API

Type tutorial

Need to toggle series on and off via code? This short tutorial will show how. Hiding or showing Series in amCharts is a Sprite object. And just like any Sprite object, it can be toggled off by calling its hide() method, and shown back on by show(). That is it. You just call the respective […]

Generating multi-content PDF export

Type tutorial

This extensive tutorial will show how you can use pdfmake library, which is bundled with amCharts, to generate full page, multi-content report PDF documents. Disclaimer Majority of this tutorial is based on using pdfmake. It’s an excellent third party library enabling generating PDF documents in JavaScript. Our aim is to walk you through basics of […]

Custom static multi-value tooltip

Type tutorial

Its easy to consolidate a lot of data into a single tooltip that is displayed over Series using Cursor. We’ve covered it in this tutorial. But what if we don’t want a huge square following our cursor, and would rather display that info in a fixed place in the corner? Read on, as we show […]

Individual legend item for each column

Type tutorial

Normally on an XY Chart, Legend creates a single item for each Series. This brief tutorial will show how you can create custom legend which will show an item for each individual column in a single Column series. Base chart Let’s take this chart as a base. It uses an adapter to color each column […]

Retrieving information of a clicked Map Object

Type tutorial

In this tutorial we’ve seen how we can zoom in on a clicked country. We’re going to build on that to retrieve information about clicked object. Base map As mentioned in the preamble, we’re going to be using a map, created in another tutorial. The “Zooming to a map area on click” tutorial explains how […]

Using “fill rules” on a Date Axis

Type tutorial

This tutorial will show how to highlight weekends on a Date Axis. It will explain how you can use custom function to force your own custom logic in determining what ranges of dates should be highlighted and how. Base chart Let’s take a simple Date-based chart. Enabling axis fills We do have nice clean grid. […]

Using custom map zoom settings for individual countries

Type 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() […]

Creating custom filters

Type tutorial

amCharts 4 comes with a few basic rudimentary filters like “drop shadow”, “desaturate”, and a few others. However, you can do much much more with SVG filters. This tutorial will explain how you can create your own custom amCharts 4-compatible filter classes. What is a Filter? SVG filters An SVG filter (represented by <filter> tag) […]