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
var chart = anychart.pyramid([
4
{name: "Fantasy", value: 637166},
5
{name: "Science Fiction", value: 721630},
6
{name: "Detective", value: 148662},
7
{name: "Classics", value: 78662},
8
{name: "Textbooks", value: 90000}
9
]);
10
11
chart.connectorStroke({
12
// set thickness of the connectors
13
thickness: 2,
14
// set color of the connectors
15
color: '#444',
16
// set dashed connectors. Dashes are 4px and gaps are 2px
17
dash: '4 2'
18
});
19
20
// draw chart
21
chart.container("container");
22
chart.draw();
23
});