initial commit
[power-brultech.git] / charts / canvas / examples / 26-some-common-options-across-all-chart-types / export-chart.html
1 <!DOCTYPE HTML>\r
2 <html>\r
3 \r
4 <head>\r
5         <script type="text/javascript">\r
6                 window.onload = function () {\r
7                         var chart = new CanvasJS.Chart("chartContainer", {\r
8                                 title: {\r
9                                         text: "Top Categories of New Year's Resolution"\r
10                                 },\r
11                                 exportFileName: "CanvasJS Chart",\r
12                                 exportEnabled: true,\r
13                                 animationEnabled: true,\r
14                                 legend: {\r
15                                         verticalAlign: "bottom",\r
16                                         horizontalAlign: "center"\r
17                                 },\r
18                                 data: [\r
19                                 {\r
20                                         type: "pie",\r
21                                         showInLegend: true,\r
22                                         toolTipContent: "{legendText}: <strong>{y}%</strong>",\r
23                                         indexLabel: "{label} {y}%",\r
24                                         dataPoints: [\r
25                                                 { y: 35, legendText: "Health", exploded: true, label: "Health" },\r
26                                                 { y: 20, legendText: "Finance", label: "Finance" },\r
27                                                 { y: 18, legendText: "Career", label: "Career" },\r
28                                                 { y: 15, legendText: "Education", label: "Education" },\r
29                                                 { y: 5, legendText: "Family", label: "Family" },\r
30                                                 { y: 7, legendText: "Real Estate", label: "Real Estate" }\r
31                                         ]\r
32                                 }\r
33                                 ]\r
34                         });\r
35                         chart.render();\r
36                 }\r
37         </script>\r
38 \r
39         <script src="../../canvasjs.min.js"></script>\r
40         <title>CanvasJS Example</title>\r
41 </head>\r
42 <body>\r
43         <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
44 </body>\r
45 \r
46 </html>\r