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: "10", value: 16.09},
6
{x: "11", value: 14.28},
7
{x: "12", value: 29.64},
8
{x: "13", value: 8.50},
9
{x: "14", value: 16.09},
10
{x: "15", value: 14.28},
11
{x: "16", value: 29.64},
12
{x: "17", value: 8.50},
13
{x: "18", value: 16.09},
14
{x: "19", value: 14.28},
15
{x: "20", value: 29.64},
16
{x: "21", value: 8.50},
17
{x: "22", value: 16.09},
18
{x: "23", value: 14.28},
19
{x: "24", value: 29.64},
20
{x: "25", value: 8.50},
21
{x: "26", value: 8.50},
22
{x: "27", value: 16.09},
23
{x: "28", value: 14.28},
24
{x: "29", value: 29.64},
25
{x: "20", value: 8.50},
26
{x: "1", value: 16.09},
27
];
28
29
// create a 3d column chart
30
var chart = anychart.column3d();
31
32
// create a column series and set the data
33
var series = chart.column(data);
34
35
// set the chart title
36
chart.title("3D Column Chart");
37
38
// set the container id
39
chart.container("container");
40
41
// initiate drawing the chart
42
chart.draw();
43
});