amCharts 5 Examples

Each example opens with its chart on top and its source below: a single HTML page with the code inside. JavaScript runs the code; JSON config, where there is one, builds the chart from a config. A basic example is the plain chart of its type, a technique shows one behaviour, a showcase puts several together. The list as data: examples.json.

XY 23

Draggable RangeTechnique

A handle on the date axis that the user drags to move an axis range; the part of the series after it is drawn in another color with a pattern fill.

JavaScriptxy-draggable-range

Drawing a SeriesTechnique

Clicking the plot area adds a point to a line series and its bullets can be dragged, by turning pointer coordinates into axis values.

JavaScriptxy-drawing-series

Highlight Line on Legend HoverTechnique

Ten line series with a legend at the side; hovering a legend item dims all the other lines, done with events on the legend item template.

JavaScriptxy-line-highlight-on-legend-hover

Live DataTechnique

A line that gets a new point every second and drops its oldest one, with the new point animated in from the last.

JavaScriptxy-live-data

Percent Change ComparisonTechnique

Two price series shown as percent change from the start of the zoomed range, so they can be compared, with a volume panel on a second, stacked Y axis.

JavaScriptJSON configxy-percent-change-comparison

Pulsing Last BulletTechnique

A line whose last point has a pulsing bullet, switched on for one data item with templateField and animated with the animations setting.

JavaScriptJSON configxy-pulsing-last-bullet

Real-Time Data SortingTechnique

Columns whose values change on a timer and that slide to their new places as the category axis is sorted again.

JavaScriptxy-real-time-data-sorting

Right-to-Left Line ChartTechnique

A Hebrew line chart with Root direction set to rtl: text reads right to left, and the legend, with values that follow the cursor, wraps over several rows from the right.

JavaScriptxy-right-to-left

Pie and sliced 6

Map 16

Pixel MapBasic

A world map drawn as a grid of dots with PixelMapSeries, with countries colored by value using heat rules.

JavaScriptJSON configmap-pixel-map

Satellite Day and Night MapBasic

A flat map that shows a daytime satellite image where the sun is up right now and city lights where it is night, with MapRasterSeries. The images load from the amCharts CDN, so it needs an internet connection.

JavaScriptJSON configmap-satellite-day-and-night

Satellite Image GlobeBasic

A slowly turning globe that shows a satellite image with MapRasterSeries, with country borders drawn over it. The image loads from the amCharts CDN, so it needs an internet connection.

JavaScriptJSON configmap-satellite-globe

US Heat MapBasic

US states colored by value on a red, yellow and green scale, with heat rules and a heat legend that take several colors.

JavaScriptJSON configmap-us-heat-map

Globe Rotating to a CountryTechnique

A globe that turns and zooms to the clicked country, and back when it is clicked again or the water is clicked: clickZoom on a map that pans by rotating.

JavaScriptJSON configmap-globe-rotate-to-country

Zoom to CountryTechnique

Click a country to zoom in on it; click it again, the water or the home button to zoom back out. One setting, clickZoom, does it.

JavaScriptJSON configmap-zoom-to-country

Stock 6

Comparing StocksTechnique

A stock chart with a comparison control and a searchable dropdown: picked stocks are added with addComparingSeries() and the chart switches to percent change.

JavaScriptstock-chart-comparing-stocks

Live Stock ChartTechnique

A candlestick chart that gets a new price every second: the last candle is updated or a new one is added, and an axis range follows the current value.

JavaScriptstock-chart-live

Stock Chart Data GranularityTechnique

A stock chart with an interval control that swaps minute, day, week and month data and sets the matching base interval on the date axis.

JavaScriptstock-chart-data-granularity

Stock Chart Data GroupingTechnique

Three years of daily prices on a date axis with groupData, which shows them as weekly candlesticks when zoomed out and as daily ones when zoomed in.

JavaScriptstock-chart-data-grouping

Stock Chart with Volume PanelTechnique

A stock chart that shows volume in a second panel, which has its own axes, legend and cursor and stays in sync with the main one.

JavaScriptstock-chart-volume-separate-panel

Stock ChartShowcase

A stock chart with candlesticks, volume, a scrollbar with a preview, a legend and a toolbar for indicators, periods, series type and drawing.

JavaScriptstock-chart

Hierarchy 7

Voronoi TreemapShowcase

World population as a Voronoi treemap, with theme rules that style each level and a click that zooms to a continent.

JavaScriptJSON confighierarchy-voronoi-treemap

Flow 5

Arc DiagramBasic

An arc diagram: nodes in a row, sized by their total, with arcs for the links between them and a label under each node.

JavaScriptJSON configflow-arc-diagram

Radar and gauges 6

Radar Heat MapTechnique

A heat map on a radar chart, hours around the circle and weekdays as rings, with a heat legend that shows the value of the hovered cell.

JavaScriptJSON configradar-heat-map

Radar Timeline with SliderShowcase

Radar columns that animate through the years with a play button and a slider, and continent ranges that zoom in when clicked.

JavaScriptradar-time-line

Timeline 3

Serpentine TimelineBasic

A serpentine chart: tasks as columns along a date axis that winds back and forth, with a circle at each end of a task and flags for events.

JavaScriptJSON configtimeline-serpentine-chart

Spiral ChartBasic

A spiral chart: three years of monthly values as columns along a date axis that winds outwards, with a value axis across it.

JavaScriptJSON configtimeline-spiral-chart

Gantt 3

Other 7

SVG RendererBasic

A column chart drawn as SVG instead of canvas, by choosing the renderer when the root element is created.

JavaScriptsvg-renderer

Chart as an HTML ElementTechnique

The <am5-chart> element builds a chart from a JSON config, with no root and no chart code: for pages, frameworks and tools where writing chart code is not the point.

JavaScriptmisc-chart-element

Micro Charts in a TableTechnique

A table with a tiny line chart and a tiny column chart in every row, each in its own root with the Micro theme.

JavaScriptmisc-microchart-grid