initial commit
[power-brultech.git] / charts / canvas / examples / 09-stacked-column-chart / stacked-column-with-total-shown-on-top.html
1 <!DOCTYPE HTML>\r
2 <html>\r
3 <head>\r
4         <script type="text/javascript">\r
5                 window.onload = function () {\r
6                         var chart = new CanvasJS.Chart("chartContainer", {\r
7                                 title: {\r
8                                         text: "Coal Reserves of Countries"\r
9                                 },\r
10                                 axisY: {\r
11                                         title: "Coal (bn tonnes)",\r
12                                         valueFormatString: "#0.#,.",\r
13                                 },\r
14                                 data: [{\r
15                                         type: "stackedColumn",\r
16                                         legendText: "Anthracite & Bituminous",\r
17                                         showInLegend: "true",\r
18                                         dataPoints: [\r
19                                                 { y: 111338, label: "USA" },\r
20                                                 { y: 49088, label: "Russia" },\r
21                                                 { y: 62200, label: "China" },\r
22                                                 { y: 90085, label: "India" },\r
23                                                 { y: 38600, label: "Australia" },\r
24                                                 { y: 25400, label: "Germany" },\r
25                                                 { y: 33873, label: "Ukraine" },\r
26                                                 { y: 6746, label: "Colombia" },\r
27                                                 { y: 6582, label: "Canada" }\r
28                                         ]\r
29                                 }, {\r
30                                         type: "stackedColumn",\r
31                                         legendText: "SubBituminous & Lignite",\r
32                                         showInLegend: "true",\r
33                                         indexLabel: "#total bn",\r
34                                         yValueFormatString: "#0.#,.",\r
35                                         indexLabelPlacement: "outside",\r
36                                         dataPoints: [\r
37                                                 { y: 135305, label: "USA" },\r
38                                                 { y: 107922, label: "Russia" },\r
39                                                 { y: 52300, label: "China" },\r
40                                                 { y: 3360, label: "India" },\r
41                                                 { y: 39900, label: "Australia" },\r
42                                                 { y: 3680, label: "Germany" },\r
43                                                 { y: 3200, label: "Ukraine" },\r
44                                                 { y: 0, label: "Colombia" },\r
45                                                 { y: 6582, label: "Canada" }\r
46                                         ]\r
47                                 }\r
48                                 ]\r
49                         });\r
50                         chart.render();\r
51                 }\r
52         </script>\r
53         <script src="../../canvasjs.min.js"></script>\r
54         <title>CanvasJS Example</title>\r
55 </head>\r
56 <body>\r
57         <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
58 </body>\r
59 </html>