initial commit
[power-brultech.git] / charts / canvas / examples / 08-bubble-chart / bubble-chart-with-tooltip-customization.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                         {\r
8                                 title: {\r
9                                         text: "Comparison among Countries on Fertility Rate Vs Life Expectancy in 2009"\r
10                                 },\r
11                                 axisX: {\r
12                                         title: "Life Expectancy",\r
13                                         maximum: 85\r
14                                 },\r
15                                 axisY: {\r
16                                         title: "Fertility Rate"\r
17                                 },\r
18 \r
19                                 legend: {\r
20                                         verticalAlign: "bottom",\r
21                                         horizontalAlign: "left"\r
22                                 },\r
23                                 data: [\r
24                                 {\r
25                                         type: "bubble",\r
26                                         legendText: "Size of Bubble Represents Population",\r
27                                         showInLegend: true,\r
28                                         legendMarkerType: "circle",\r
29                                         toolTipContent: "<strong>{name}</strong> <br/> Fetility Rate: {y}<br/> Life Expectancy: {x} yrs<br/> Population: {z} mn",\r
30                                         dataPoints: [\r
31                                                 { x: 78.1, y: 2.00, z: 306.77, name: "US" },\r
32                                                 { x: 68.5, y: 2.15, z: 237.414, name: "Indonesia" },\r
33                                                 { x: 72.5, y: 1.86, z: 193.24, name: "Brazil" },\r
34                                                 { x: 76.5, y: 2.36, z: 112.24, name: "Mexico" },\r
35                                                 { x: 50.9, y: 5.56, z: 154.48, name: "Nigeria" },\r
36                                                 { x: 68.6, y: 1.54, z: 141.91, name: "Russia" },\r
37                                                 { x: 82.9, y: 1.37, z: 127.55, name: "Japan" },\r
38                                                 { x: 79.8, y: 1.36, z: 81.90, name: "Australia" },\r
39                                                 { x: 72.7, y: 2.78, z: 79.71, name: "Egypt" },\r
40                                                 { x: 80.1, y: 1.94, z: 61.81, name: "UK" },\r
41                                                 { x: 55.8, y: 4.76, z: 39.24, name: "Kenya" },\r
42                                                 { x: 81.5, y: 1.93, z: 21.95, name: "Australia" },\r
43                                                 { x: 68.1, y: 4.77, z: 31.09, name: "Iraq" },\r
44                                                 { x: 47.9, y: 6.42, z: 33.42, name: "Afganistan" },\r
45                                                 { x: 50.3, y: 5.58, z: 18.55, name: "Angola" }\r
46                                         ]\r
47                                 }\r
48                                 ]\r
49                         });\r
50 \r
51                         chart.render();\r
52                 }\r
53         </script>\r
54         <script src="../../canvasjs.min.js"></script>\r
55         <title>CanvasJS Example</title>\r
56 </head>\r
57 <body>\r
58         <div id="chartContainer" style="height: 400px; width: 100%;">\r
59         </div>\r
60 </body>\r
61 </html>