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
// Creates Pyramid chart.
4
var chart = anychart.pyramid([
5
{name: 'Fantasy', value: 637166},
6
{name: 'Science Fiction', value: 721630},
7
{name: 'Detective', value: 148662},
8
{name: 'Classics', value: 78662},
9
{name: 'Textbooks', value: 90000}
10
]);
11
12
chart.title('Create a Pyramid chart');
13
chart.container('container');
14
chart.draw();
15
});