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
["Total Market", 232000],
6
["Prospects", 94480],
7
["Leads", 47390],
8
["Sales", 22181]
9
];
10
11
var chart = anychart.funnel(data);
12
13
// configure the visual settings of the chart
14
chart.normal().fill("#004d39", 0.3);
15
chart.hovered().fill("#004d39", 0.1);
16
chart.selected().fill("#004d39", 0.5);
17
chart.hovered().hatchFill("forward-diagonal", "#004d39", 1, 15);
18
chart.selected().hatchFill("forward-diagonal", "#004d39", 1, 15);
19
chart.normal().stroke("white");
20
chart.hovered().stroke("white", 2);
21
chart.selected().stroke("white", 2);
22
23
// set the container id
24
chart.container("container");
25
26
// initiate drawing the chart
27
chart.draw();
28
});