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
var stage = anychart.graphics.create("container");
3
4
var pyramidChart = anychart.pyramid([
5
{x: "Physical", value: 70},
6
{x: "Data Link", value: 60},
7
{x: "Network", value: 50},
8
{x: "Transport", value: 40},
9
{x: "Session", value: 30},
10
{x: "Presentation", value: 20},
11
{x: "Application", value: 10}
12
]);
13
pyramidChart.labels({fontColor: "#000000", position: "outside"});
14
pyramidChart.bounds(0, 0, "50%", "100%");
15
pyramidChart.connectorStroke("#607D8B", 2, "5 2", "round");
16
pyramidChart.container(stage);
17
pyramidChart.draw();
18
19
var funnelChart = anychart.funnel([10, 3, 7, 10, 5]);
20
funnelChart.bounds("50%", 0, "50%", "100%");
21
22
// Get connector stroke.
23
var pyramidConnectorStroke = pyramidChart.connectorStroke();
24
25
funnelChart.connectorStroke(pyramidConnectorStroke);
26
funnelChart.container(stage);
27
funnelChart.draw();
28
29
var customTitle = anychart.standalones.title();
30
customTitle.text("Get and use chart stroke.");
31
customTitle.container(stage);
32
customTitle.draw();
33
});