A column chart bent into a ring: twenty bars stand around an open middle, each in its own color, with a gap at the top for the scale.
Bent around a circle, a column chart takes less width and catches the eye, which suits a dashboard tile or an infographic. The bars grow outwards, so the outer ones look bigger than they are: for careful comparisons, keep the columns straight.
Built with amCharts 5, a JavaScript library. The JavaScript includes your theme and renderer (canvas or SVG); the JSON also follows the changes you make with the controls.
npm install @amcharts/amcharts5. See Getting started.
The same chart as a JSON config. Chart Maker reads and writes this format, the library's JSON parser turns it into a chart, and the <am5-chart> element puts it on a page with no code."type" is the class to create and "settings" what you would pass to its new() in code; "properties" fill in its parts, lists such as series and axes or templates such as columns.template; "refs" holds objects used in more than one place ("#series-0" stands for the one named series-0); a string starting with "@" takes a value from another object, such as "@series.get('fill')".
A complete page. Save it as an .html file and open it in a browser.
Paste this into an AI coding assistant to build the chart from scratch. More in amCharts & AI.
// Create root element
// https://www.amcharts.com/docs/v5/getting-started/#Root_element
var root = am5.Root.new("chartdiv");
// Set themes
// https://www.amcharts.com/docs/v5/concepts/themes/
root.setThemes([
am5themes_Animated.new(root),
am5themes_Responsive.new(root)
]);
// Create chart
// https://www.amcharts.com/docs/v5/charts/radar-chart/
var chart = root.container.children.push(am5radar.RadarChart.new(root, {
panX: false, // no dragging the plot around
panY: false,
wheelX: "none", // the wheel doesn't zoom...
wheelY: "none", // ...so the page scrolls past the chart
// almost a full circle, with a 12-degree gap at the top
startAngle: -84,
endAngle: 264,
innerRadius: am5.percent(40) // a hole in the middle, 40% of the radius
}));
// Add cursor
// https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/
const cursor = chart.set("cursor", am5radar.RadarCursor.new(root, {
behavior: "zoomX" // drag around the circle to zoom in on some columns
}));
cursor.lineY.set("forceHidden", true); // no circle through the pointer, only the line from the center
// Add scrollbar, under the chart (opposite), hidden at first
// https://www.amcharts.com/docs/v5/charts/xy-chart/scrollbars/
chart.set("scrollbarX", am5.Scrollbar.new(root, {
orientation: "horizontal",
opposite: true,
exportable: false, // left out of exported images
forceHidden: true
}));
// Create axes
// https://www.amcharts.com/docs/v5/charts/xy-chart/axes/
var xRenderer = am5radar.AxisRendererCircular.new(root, {
minGridDistance: 30 // at least 30px between the column labels
});
xRenderer.grid.template.set("forceHidden", true); // no lines between the columns
var xAxis = chart.xAxes.push(am5xy.CategoryAxis.new(root, {
maxDeviation: 0, // can't be zoomed or panned past the first or last column
categoryField: "category",
renderer: xRenderer
}));
var yRenderer = am5radar.AxisRendererRadial.new(root, {});
yRenderer.labels.template.set("centerX", am5.p50); // value labels centered on the axis line
var yAxis = chart.yAxes.push(am5xy.ValueAxis.new(root, {
maxDeviation: 0.3,
min: 0, // the columns start at zero
renderer: yRenderer
}));
// Add series
// https://www.amcharts.com/docs/v5/charts/xy-chart/series/
var series = chart.series.push(am5radar.RadarColumnSeries.new(root, {
name: "Series 1",
// on load the columns grow one after another
sequencedInterpolation: true,
xAxis: xAxis,
yAxis: yAxis,
valueYField: "value",
categoryXField: "category",
// Each column takes its own color from the series palette
colorByDataItem: true
}));
// Rounded corners for columns
series.columns.template.setAll({
cornerRadius: 5,
tooltipText: "{categoryX}: {valueY}" // the column's number and its value
});
// Set data
var data = [];
// 20 columns, numbered 1 to 20, with random values from 0 to 100
for (var i = 1; i < 21; i++) {
data.push({ category: i, value: Math.round(Math.random() * 100) });
}
xAxis.data.setAll(data);
series.data.setAll(data);
// Make stuff animate on load
// https://www.amcharts.com/docs/v5/concepts/animations/
series.appear(1000);
chart.appear(1000, 100);
{
"type": "RadarChart",
"settings": {
"panX": false,
"panY": false,
"wheelX": "none",
"wheelY": "none",
"startAngle": -84,
"endAngle": 264,
"innerRadius": {
"type": "Percent",
"value": 40
},
"cursor": {
"type": "RadarCursor",
"settings": {
"behavior": "zoomX"
},
"properties": {
"lineY": {
"settings": {
"forceHidden": true
}
}
}
},
"scrollbarX": {
"type": "Scrollbar",
"settings": {
"orientation": "horizontal",
"opposite": true,
"exportable": false,
"forceHidden": true
}
}
},
"properties": {
"series": [
"#series-0"
],
"xAxes": [
"#axis-0"
],
"yAxes": [
"#axis-1"
]
},
"refs": [
{
"data-0": [
{
"category": 1,
"value": 24
},
{
"category": 2,
"value": 73
},
{
"category": 3,
"value": 85
},
{
"category": 4,
"value": 86
},
{
"category": 5,
"value": 45
},
{
"category": 6,
"value": 21
},
{
"category": 7,
"value": 63
},
{
"category": 8,
"value": 97
},
{
"category": 9,
"value": 49
},
{
"category": 10,
"value": 85
},
{
"category": 11,
"value": 37
},
{
"category": 12,
"value": 9
},
{
"category": 13,
"value": 49
},
{
"category": 14,
"value": 74
},
{
"category": 15,
"value": 12
},
{
"category": 16,
"value": 60
},
{
"category": 17,
"value": 96
},
{
"category": 18,
"value": 24
},
{
"category": 19,
"value": 37
},
{
"category": 20,
"value": 94
}
]
},
{
"axis-0": {
"type": "CategoryAxis",
"settings": {
"maxDeviation": 0,
"categoryField": "category",
"renderer": {
"type": "AxisRendererCircular",
"settings": {
"minGridDistance": 30
},
"properties": {
"grid": {
"properties": {
"template": {
"settings": {
"forceHidden": true
}
}
}
}
}
}
},
"properties": {
"data": "#data-0"
}
}
},
{
"axis-1": {
"type": "ValueAxis",
"settings": {
"maxDeviation": 0.3,
"min": 0,
"renderer": {
"type": "AxisRendererRadial",
"properties": {
"labels": {
"properties": {
"template": {
"settings": {
"centerX": {
"type": "Percent",
"value": 50
}
}
}
}
}
}
}
}
}
},
{
"series-0": {
"type": "RadarColumnSeries",
"settings": {
"name": "Series 1",
"sequencedInterpolation": true,
"xAxis": "#axis-0",
"yAxis": "#axis-1",
"valueYField": "value",
"categoryXField": "category",
"colorByDataItem": true
},
"properties": {
"data": "#data-0",
"columns": {
"properties": {
"template": {
"settings": {
"cornerRadius": 5,
"tooltipText": "{categoryX}: {valueY}"
}
}
}
}
}
}
}
]
}