HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function () {
2
3
// create data
4
var data = [
5
{x: "A", value: 4},
6
{x: "B", value: 2},
7
{x: "C", value: 8},
8
{x: "D", value: 5},
9
{x: "E", value: 3},
10
{x: "F", value: 9}
11
];
12
13
// create a chart
14
var chart = anychart.polar();
15
16
// create a column series and set the data
17
var series = chart.column(data);
18
19
// set the type of the x-scale
20
chart.xScale("ordinal");
21
22
// enable sorting points by x
23
chart.sortPointsByX(true);
24
25
// set the inner radius
26
chart.innerRadius(50);
27
28
// set the chart title
29
chart.title("Polar Column Chart");
30
31
// set the container id
32
chart.container("container");
33
34
// initiate drawing the chart
35
chart.draw();
36
});