index.htm 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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: 'area'
  12. },
  13. title: {
  14. text: 'Historic and Estimated Worldwide Population Growth by Region'
  15. },
  16. subtitle: {
  17. text: 'Source: Wikipedia.org'
  18. },
  19. xAxis: {
  20. categories: ['1750', '1800', '1850', '1900', '1950', '1999', '2050'],
  21. tickmarkPlacement: 'on',
  22. title: {
  23. enabled: false
  24. }
  25. },
  26. yAxis: {
  27. title: {
  28. text: 'Billions'
  29. },
  30. labels: {
  31. formatter: function() {
  32. return this.value / 1000;
  33. }
  34. }
  35. },
  36. tooltip: {
  37. shared: true,
  38. valueSuffix: ' millions'
  39. },
  40. plotOptions: {
  41. area: {
  42. stacking: 'normal',
  43. lineColor: '#666666',
  44. lineWidth: 1,
  45. marker: {
  46. lineWidth: 1,
  47. lineColor: '#666666'
  48. }
  49. }
  50. },
  51. series: [{
  52. name: 'Asia',
  53. data: [502, 635, 809, 947, 1402, 3634, 5268]
  54. }, {
  55. name: 'Africa',
  56. data: [106, 107, 111, 133, 221, 767, 1766]
  57. }, {
  58. name: 'Europe',
  59. data: [163, 203, 276, 408, 547, 729, 628]
  60. }, {
  61. name: 'America',
  62. data: [18, 31, 54, 156, 339, 818, 1201]
  63. }, {
  64. name: 'Oceania',
  65. data: [2, 2, 2, 6, 13, 30, 46]
  66. }]
  67. });
  68. });
  69. </script>
  70. </head>
  71. <body>
  72. <script src="../../js/highcharts.js"></script>
  73. <script src="../../js/modules/exporting.js"></script>
  74. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  75. </body>
  76. </html>