1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<script>
window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer", {
animationEnabled: true,
exportEnabled: true,
title:{
text: "Product Manufacturing Expenses"
},
data: [{
type: "pyramid",
indexLabelFontSize: 18,
valueRepresents: "area",
showInLegend: true,
legendText: "{indexLabel}",
toolTipContent: "<b>{indexLabel}:</b> {y}%",
dataPoints: [
{ y: 30, indexLabel: "Research and Design" },
{ y: 30, indexLabel: "Manufacturing" },
{ y: 15, indexLabel: "Marketing" },
{ y: 13, indexLabel: "Shipping" },
{ y: 12, indexLabel: "Retail" }
]
}]
});
chart.render();
}
</script>
</head>
<body>
<div id="chartContainer" style="height: 370px; max-width: 920px; margin: 0px auto;"></div>
<script src="../../asset/js/canvasjs/canvasjs.min.js"></script>
</body>
</html>