index.htm 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title>Highcharts Example</title>
  6. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
  7. <script type="text/javascript">
  8. $(function () {
  9. $('#container').highcharts({
  10. chart: {
  11. type: 'column',
  12. margin: [ 50, 50, 100, 80]
  13. },
  14. title: {
  15. text: 'World\'s largest cities per 2008'
  16. },
  17. xAxis: {
  18. categories: [
  19. 'Tokyo',
  20. 'Jakarta',
  21. 'New York',
  22. 'Seoul',
  23. 'Manila',
  24. 'Mumbai',
  25. 'Sao Paulo',
  26. 'Mexico City',
  27. 'Dehli',
  28. 'Osaka',
  29. 'Cairo',
  30. 'Kolkata',
  31. 'Los Angeles',
  32. 'Shanghai',
  33. 'Moscow',
  34. 'Beijing',
  35. 'Buenos Aires',
  36. 'Guangzhou',
  37. 'Shenzhen',
  38. 'Istanbul'
  39. ],
  40. labels: {
  41. rotation: -45,
  42. align: 'right',
  43. style: {
  44. fontSize: '13px',
  45. fontFamily: 'Verdana, sans-serif'
  46. }
  47. }
  48. },
  49. yAxis: {
  50. min: 0,
  51. title: {
  52. text: 'Population (millions)'
  53. }
  54. },
  55. legend: {
  56. enabled: false
  57. },
  58. tooltip: {
  59. pointFormat: 'Population in 2008: <b>{point.y:.1f} millions</b>',
  60. },
  61. series: [{
  62. name: 'Population',
  63. data: [34.4, 21.8, 20.1, 20, 19.6, 19.5, 19.1, 18.4, 18,
  64. 17.3, 16.8, 15, 14.7, 14.5, 13.3, 12.8, 12.4, 11.8,
  65. 11.7, 11.2],
  66. dataLabels: {
  67. enabled: true,
  68. rotation: -90,
  69. color: '#FFFFFF',
  70. align: 'right',
  71. x: 4,
  72. y: 10,
  73. style: {
  74. fontSize: '13px',
  75. fontFamily: 'Verdana, sans-serif',
  76. textShadow: '0 0 3px black'
  77. }
  78. }
  79. }]
  80. });
  81. });
  82. </script>
  83. </head>
  84. <body>
  85. <script src="../../js/highcharts.js"></script>
  86. <script src="../../js/modules/exporting.js"></script>
  87. <div id="container" style="min-width: 500px; height: 400px; margin: 0 auto"></div>
  88. </body>
  89. </html>