Replacing default export icon

Type tutorial

This tutorial will show how you can easily replace the default … in export menu’s top level item with a custom image. Default behavior Export menu displays a button with a triple dot in it: Let’s change it to something else. Top-menu item The menu which is an object of type ExportMenu has a property […]

Using “sticky” tooltips

Type tutorial

Any element on a chart can have tooltipText set to display in form of a tooltip when hovered or touched. This tutorial will show how you can turn those tooltips into “sticky”, so they are always shown, without requiring to hover/touch the element. Requirements The functionality was introduced in version 4.5.4, so if you happen […]

Plugin: Bullets

Type tutorial

“Bullets” is a collection of configurable shapes (stars, pins, flags, etc.) that you can use as chart bullets, map markers, and anywhere else. Availability Bullets plugin is available since amCharts 4 version 4.5.7. Including the module Before you can use this plugin you need to make sure you include it. If you are using it […]

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. Enabling PREREQUISITE If you don’t know how square bracket text formatting works, make sure you read the “Visual formatting” section in our Text formatting article. Basically, a square bracket blocks in any […]

Plugin: Annotation

Type tutorial

This tutorial will show how you can use Annotation plugin (available since 4.5.5) to, well annotate the charts using some basic UI and tools. NOTE Annotation is a plugin. For information about using plugins, refer to this article. Using the plugin Including the module Before you can use this plugin you need to make sure […]

Clickable links in tooltips

Type tutorial

Tooltips are used in a number of places to provide contextual information on a hovered/tapped object, like a Slice of a Pie Chart, or a country on a map. By default, tooltips are completely static with no way to interact with them. This tutorial will explain how you can make them interactive, adding clickable links […]

Non-standard legend alignment

Type tutorial

You can use position to place chart Legend on top, bottom, left, or right. In all those cases, Legend will center across the edge it is placed on. This tutorial will show some other alignment options. Left and right positions When legend position is set to either “left” or “right”, it is aligned vertically to […]

Toggling series via API

Type tutorial

Need to toggle series on and off via code? This short tutorial will show how. Hiding or showing Series in amCharts is a Sprite object. And just like any Sprite object, it can be toggled off by calling its hide() method, and shown back on by show(). That is it. You just call the respective […]

Generating multi-content PDF export

Type tutorial

This extensive tutorial will show how you can use pdfmake library, which is bundled with amCharts, to generate full page, multi-content report PDF documents. Disclaimer Majority of this tutorial is based on using pdfmake. It’s an excellent third party library enabling generating PDF documents in JavaScript. Our aim is to walk you through basics of […]

Automating report generation using Selenium Webdriver

Type tutorial

If you need to automate the generation of chart images or PDF, Selenium Webdriver might be the best option. It can handle different browsers even though this example only shows it using Firefox. Setting up Install NodeJS Install Firefox Create a folder Create a file called package.json in the new folder with the content shown […]