Dealing with PieChart labels that don’t fit

Type tutorial

We’ve all been there: creating a Pie chart with labels a tad too long to fit. This tutorial lists a few things you can do to work around it. The problem The PieChart does not measure and resize actual diagram based on the length and quantity of labels. It’s by design, because doing so would […]

Dotted and dashed lines

Type tutorial

Every line in amCharts – including outlines of other shapes – can be made dotted or dashed. This short tutorial will show how it works. Enabling dashed line You probably already know that setting color of a line (or and outline of a shape) is as easy as setting its stroke property, e.g.: The above […]

Fixing gradients and filters on straight lines

Type tutorial

Due to how SVG handles filters and gradients if you have a perfectly straight line, e.g. on a LineSeries with some filter applied, say a DropShadowFilter or a LinearGradient, browser will cause it to render completely invisible. This short tutorial will show how to fix that. The problem Let’s start with a very basic chart […]

Using axis ranges to place labels at arbitrary values or dates

Type tutorial

Axes of various types follow their own logic when they choose where to place its grid and labels. However, sometimes you need to place those labels at precisely value X, or on date Y. That’s where axis ranges might come in handy, which is the focus of this tutorial. Prerequisites Just to refresh your memory […]

Using MapChart with Google Maps API

Type demo

This short demo shows how our own MapChart can be overlaid over Google Maps using JavaScript Maps API, complete with total syncing of zoom and pan.

Make AM/PM prompts lowercase or change them

Type tutorial

amCharts’ number formatter supports various version of the AM/PM indicators (AM/PM; A.M./P.M.; A/P) in date/time formats, however they are all in upper case. This short tutorial will show how you can make them lowercase, or change them altogether. Modifying locale Since AM/PM are translatable strings, they are represented in your current locale (or collection of […]

County maps

Type tutorial

The geodata package for MapChart includes not only country and world maps. It also has special county maps for some of the worlds countries, like United States, Canada, and Mexico. This tutorial will show how you can use them. Using county maps The county map files for each available country are located under regionsubdirectory of […]

Fixed ValueAxis scale

Type demo

This demo shows how we can use ValueAxis event “ready” to fix its scale (min and max values) on load so it does not change when chart is zoomed or scrolled.

Funnel chart with relative percent in labels/tooltips

Type demo

Normally, Funnel chart calculates and shows percentage of each slice based on its value in comparison to the sum of all values. This demo shows how we can use adapters to calculate percentage based on the first slice value, rather than the sum.

Labels outside Sunburst slices

Type demo

These two demos show how we can use adapters to selectively display labels outside some of the Sunburst slices. Labels on last level This demo puts labels outside of slices for the outside series. Labels on child-less slices This demo shows how we can selectively display labels outside of those slices that do not have […]