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 […]

Formatting date/time and numbers using “Intl” object

Type tutorial

The Intl object is the namespace for the ECMAScript Internationalization API, which provides language sensitive string comparison, number formatting, and date and time formatting. This tutorial will show how you can use Intl options and locales for date/time and number formatting in place of string-based amCharts format definitions. Intro amCharts 4 uses DateFormatter and NumberFormatter objects to […]

Using superscript and subscript in labels

Type tutorial

This short tutorial will show how you can make parts of any label super- or sub-script using amCharts 4’s in-line text formatting syntax. IMPORTANT The baseline-shift used in this tutorial is being deprecated, and thus may not work in all browsers. Use with care. Enabling PREREQUISITE If you don’t know how square bracket text formatting […]

Using percent values in series

Type tutorial

In our everyday charting we mainly use absolute values. However, sometimes we might need to show how specific value relates to other elements. In this case relative percent value is much more representative than absolute one. This tutorial will explain ways we can use such relative values. Intro Let’s start with a fairly simple stacked […]

Modifying big number prefixes

Type tutorial

amCharts’ number formatter has a way of formatting numbers in a variety of ways, including converting to prefix/suffix-based shorter equivalents. This tutorial will explain how you can tweak it according to your needs. The problem Extremely big numbers on a chart can be confusing and wasteful of space: Let’s see how we can fix that. […]