Selectively positioning Sankey diagram labels

Type tutorial

It’s possible to selectively specify the location of Sankey diagram labels, based on the position of their parent Nodes. This tutorial will show how. Base chart The labels are all placed to the right of their respective nodes. To make the chart look nicer, lets make labels of the right-most nodes placed to the left […]

Using label bullets on a horizontal bar chart

Type tutorial

This tutorial will show how you can use LabelBullet to decorate your horizontal bar chart with data labels. Preparing Prerequisites This tutorial will rely heavily on using Series’ bullets. If you’re not familiar on how bullets work in amCharts 4, please go through “Bullets” article first. Also, since we’re going to be binding our labels to […]

Titles on top of vertical (value) axis

Type tutorial

Adding titles to axes is easy – just use axis’ title property. It will add a vertical or horizontal title next to axis depending on its position. However, you might want to place axis label directly on top of the vertical axis. This tutorial will show how. Prerequisites Containers This tutorial will refer to the concept […]

Labels inside Pie chart slices

Type tutorial

Normally, Pie chart positions its slice labels in neat columns to the left and right of the pie. As a space-saving tip, this tutorial shows how to arrange them inside slices. Base chart Target functionality To achieve our target functionality, we’re going to do this: Place labels circularly around the pie; Remove ticks; Replace information […]

Wrapping and truncating axis labels

Type tutorial

This tutorial will explain how you can deal with very long axis labels, by wrapping and/or truncating them. Prerequisites If you haven’t done that already, we suggest you take a look at the “Positioning Axis Elements” article, which explains the principles about configuring Axis elements, including the concept of “axis renderer”. Moving forward we will […]

Adding chart titles and bottom text

Type tutorial

This short tutorial shows how you can add arbitrary text labels to the top or bottom of the chart, that will automatically adjust the size of the chart itself. Adding chart titles For chart titles, every chart instance has a titles property which holds a list template of Label objects. To create new title object, we just […]

Placing labels anywhere on the chart

Type tutorial

This tutorial shows how you can place arbitrary labels anywhere on the chart. Adding a label A label is represented by object of type Label. A chart is an instance of Container. Therefore, to create a child element (a label) in chart (container) we will use chart’s createChild(type) method: let label = chart.createChild(am4core.Label); label.text = “Hello […]