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
["Winter", 12000, 12000, 10000],
6
["Spring", 13000, 12000, 17000],
7
["Summer", 25000, 15000, 19000],
8
["Autumn", 16000, 16000, 16000]
9
];
10
11
// create a 3d column chart
12
var chart = anychart.column3d();
13
14
// enable the z-axis distribution
15
chart.zDistribution(true);
16
17
// set the data
18
chart.data(data);
19
20
// set the chart title
21
chart.title("3D Charts: Z-Axis Distribution");
22
23
// set the container id
24
chart.container("container");
25
26
// initiate drawing the chart
27
chart.draw();
28
});