Maps with displaced areas and dividers

Type tutorial

amCharts 5 comes with a few maps that has some of their areas (islands) deliberately displaced, so they are closer to the mainland. Maps like that usually make a much better effective use of the available screen space at the expense of displaced areas not being compatible with actual lat/long coordinates. Map list Below is […]

Axis zoom end event

Type tutorial

This demo shows how we can use value change events of the start and end axis settings, as well as use debouncing techniques on the handlers to detect when the zoom animation has finished. Code Demo

Solving overlapping bullets

Type tutorial

This short tutorial shows a couple of ways to solve the situations where multiple series can have label bullets shown, and thus may overlap with each other. Repositioning with an adapter We can use an adapter, to dynamically check for overlap with other bullets, and change bullet’s centerY setting, so it is either moved down […]

Dynamically changing legend position

Type tutorial

This short tutorial will show the steps involved in dynamically changing position of the legend. Changing position The following steps are involved when changing the position of the legend, e.g. from bottom to left: For example, the below code will move the legend from bottom, to left: Demo

Grouping legend items

Type tutorial

This short tutorial will introduce two approaches that can be used to group legend items by inserting a label between its items. Approach #1 The easiest approach is to create a legend like we would do on any chart, set its data, then insert Label elements at predefined places in legend’s children list. The downside […]

Pie chart with a legend with dynamically-sized labels

Type tutorial

This demo shows how we can use events to dynamically set width for the Pie chart’s legend labels, so that the legend takes up all available space, left from the pie itself, as well as truncates the labels if there’s no space available.