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 a data set
4
var data = [
5
["Total Market", 232000],
6
["Prospects", 94480],
7
["Leads", 47390],
8
["Sales", 22181]
9
];
10
11
var chart = anychart.funnel(data);
12
13
// adjust colors
14
chart.fill("#DEB887");
15
chart.hoverFill("#FFEBCD");
16
chart.selectFill("#A0522D");
17
chart.hatchFill("forwardDiagonal");
18
chart.hoverHatchFill("#backwardDiagonal");
19
chart.selectHatchFill("diagonalCross");
20
chart.stroke("#fff");
21
chart.hoverStroke("#fff", 2);
22
chart.selectStroke("fff", 4);
23
24
// set the container id
25
chart.container("container");
26
27
// initiate drawing the chart
28
chart.draw();
29
});