Activate/deactivate a pie slice on legend click instead of toggling

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. Setting up To make this work we’ll have to do two things: Disable regular toggling of the items. Add custom event that toggles isActive state […]

Disabling default hover and click effects on Pie Chart

Type tutorial

When you hover over a slice on a Pie Chart it slightly grows. When you click it, it pulls out a bit out of place. This tutorial will show how you can disable this default behavior. How it works? It is controlled by states. When you hover something, a “hover” state is applied to the […]

Sum label inside a donut chart

Type tutorial

The defining characteristic of each donut, including donut charts, is its hole. It’s a space that can be used for good. This tutorial will show how we can easily add some labels inside it to display complementing information, such as sum of values for all the slices. Adding a label Most of the elements in […]

Plugin: Slice Grouper

Type tutorial

This tutorial will show how you can use SliceGrouper plugin (available since version 4.3.11) to automatically group small slices on Pie, Funnel, Pyramid, or Pictorial Stacked series into a single expandable “Other” slice. NOTE SliceGrouper is a plugin. For information about using plugins, refer to this article. Purpose “Percent” charts such as Pie, Funnel, Pyramid, […]

Clustered Pie Charts

Type tutorial

This short tutorial will show how we can leverage amCharts 4 containers and automated layouts to display multiple Pie charts in a single <div>. The challenge of multiple pie series When we have a simple Pie chart, it’s easy. We just create a chart and get a pie. But what if we have several series […]

Creating Pie Series Animations

Type tutorial

By default (if you are using “animated” theme), Pie series will fade in when chart initializes. Let’s explore how we can fancy-up those animations. Base chart Let’s take this chart as a base: As you can see, it just fades in. Boooooring. Let’s fix that. The concepts But, before we jump to unicorns and rainbows, […]

Curved Pie Chart Labels

Type tutorial

Normally, labels for Pie chart’s slices are horizontal, and either arranged in columns or attached to the slice itself. This tutorial will show how you can make labels curve along the outer edge of the slice. Base chart Let’s take a super basic pie chart as our starting point. Making labels cool again To make […]

Hiding Small Pie Slices

Type tutorial

Pie chart sizes its slices proportionally, based on the relative values. Sometimes that means that we end up with a chart that has a bunch of small-value slices that are barely visible, but clutter up the chart. Here’s one chart like that: Ewww. Let’s see what we can do about it. Hiding labels Let’s hide […]

Variable-radius Pie Slices

Type tutorial

This short tutorial will explain how you can create a Pie chart that uses data to vary radius of individual slices. Base chart Let’s take this simple Pie chart as a basis for our further experiments. Introducing radius value Right now, the size of each slice represents a value and its relation to other values […]

One pulled slice per Pie chart

Type tutorial

Normally, when you click/tap a slice on a Pie chart, it would pull out a little. You can have multiple slices pulled out that way. This tutorial will show how you can set up Pie chart in order to allow only one slice to be pulled at any given time. Task We want the slice […]