index.htm 1.8 KB

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