Toggle pie slice pullout via legend

Type tutorial

Normally, when you click an item in PieChart’s legend, relative slice is hidden or revealed. This quick tutorial will show you how to make the slice activate/deactivate (pull out/in) instead.

Totals on column stacks

Type tutorial

This tutorial will explain how we can place an automatically-calculated total on a stack of columns. Preparing value axis Normally, the chart would not calculate totals, saving CPU for us. We need to enable it by setting calculateTotals: true on our value axis: Adding a label bullet To place labels on or in a column, […]

Sum label inside a donut chart

Type tutorial

This tutorial will show how we can easily add some labels inside a donut chart to display complementing information, such as sum of values for all the slices. Adding a label Most of the elements in amCharts 5 is a Container, meaning it can contain other elements. Chart itself is a container. Series is a […]

Show “no data” warning on a chart

Type tutorial

This demo shows how we can use chart series’ davalidated event to display a “no data” message in a modal if data contains no items.

Grouping several series into single legend item

Type tutorial

This demo shows how we can selectively add series to legend, then toggle multiple series with a single legend item. The code uses series’ on() method to watch for changes in its visible setting, which is triggered when series is toggled via legend. It then hides or shows related series. It also uses series’ legendLabelText […]

Adding check marks to legend markers

Type tutorial

This tutorial will walk through the steps needed to turn legend markers into checkboxes. Adding a check mark Each marker in the legend is created from a template, which is accessible via legend’s markers.template. Besides enabling us to set any setting that would be applied to any new marker created by the legend, a template […]

Limit to single open branch in ForceDirectedSeries

Type tutorial

This demo shows how we can use setting-bound event to limit open branches in ForceDirectedSeries to one. The following code ensures that all open branches are collapsed, when another branch is expanded.