You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.1 KiB

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