index.htm 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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/series-label.js"></script>
  13. <script src="../../code/modules/exporting.js"></script>
  14. <script src="../../code/modules/export-data.js"></script>
  15. <div id="container" style="min-width: 310px; height: 400px; max-width: 800px; margin: 0 auto"></div>
  16. <script type="text/javascript">
  17. Highcharts.chart('container', {
  18. chart: {
  19. type: 'area'
  20. },
  21. title: {
  22. text: 'Historic and Estimated Worldwide Population Distribution by Region'
  23. },
  24. subtitle: {
  25. text: 'Source: Wikipedia.org'
  26. },
  27. xAxis: {
  28. categories: ['1750', '1800', '1850', '1900', '1950', '1999', '2050'],
  29. tickmarkPlacement: 'on',
  30. title: {
  31. enabled: false
  32. }
  33. },
  34. yAxis: {
  35. title: {
  36. text: 'Percent'
  37. }
  38. },
  39. tooltip: {
  40. pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.percentage:.1f}%</b> ({point.y:,.0f} millions)<br/>',
  41. split: true
  42. },
  43. plotOptions: {
  44. area: {
  45. stacking: 'percent',
  46. lineColor: '#ffffff',
  47. lineWidth: 1,
  48. marker: {
  49. lineWidth: 1,
  50. lineColor: '#ffffff'
  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. </script>
  72. </body>
  73. </html>