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
{name: "Total Market", value: 232000},
6
{name: "Prospects", value: 94480, fill: "#1976d2", selectFill: "#1976d2", hatchFill: "backwardDiagonal", hoverHatchFill:"forwardDiagonal", selectHatchFill: "diagonalCross", stroke: "#455a64"},
7
{name: "Leads", value: 47390, fill: "#87CEFA", selectFill: "#00BFFF"},
8
{name: "Sales", value: 22181, fill: "#B0E0E6", selectFill: "#87CEFA"}
9
];
10
11
var chart = anychart.funnel(data);
12
13
chart.fill("#64b5f6 0.9");
14
15
// set the container id
16
chart.container("container");
17
18
// initiate drawing the chart
19
chart.draw();
20
});