index.htm 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. <script src="../../code/modules/export-data.js"></script>
  14. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  15. <script type="text/javascript">
  16. Highcharts.chart('container', {
  17. chart: {
  18. type: 'area'
  19. },
  20. title: {
  21. text: 'US and USSR nuclear stockpiles'
  22. },
  23. subtitle: {
  24. text: 'Sources: <a href="https://thebulletin.org/2006/july/global-nuclear-stockpiles-1945-2006">' +
  25. 'thebulletin.org</a> &amp; <a href="https://www.armscontrol.org/factsheets/Nuclearweaponswhohaswhat">' +
  26. 'armscontrol.org</a>'
  27. },
  28. xAxis: {
  29. allowDecimals: false,
  30. labels: {
  31. formatter: function () {
  32. return this.value; // clean, unformatted number for year
  33. }
  34. }
  35. },
  36. yAxis: {
  37. title: {
  38. text: 'Nuclear weapon states'
  39. },
  40. labels: {
  41. formatter: function () {
  42. return this.value / 1000 + 'k';
  43. }
  44. }
  45. },
  46. tooltip: {
  47. pointFormat: '{series.name} had stockpiled <b>{point.y:,.0f}</b><br/>warheads in {point.x}'
  48. },
  49. plotOptions: {
  50. area: {
  51. pointStart: 1940,
  52. marker: {
  53. enabled: false,
  54. symbol: 'circle',
  55. radius: 2,
  56. states: {
  57. hover: {
  58. enabled: true
  59. }
  60. }
  61. }
  62. }
  63. },
  64. series: [{
  65. name: 'USA',
  66. data: [
  67. null, null, null, null, null, 6, 11, 32, 110, 235,
  68. 369, 640, 1005, 1436, 2063, 3057, 4618, 6444, 9822, 15468,
  69. 20434, 24126, 27387, 29459, 31056, 31982, 32040, 31233, 29224, 27342,
  70. 26662, 26956, 27912, 28999, 28965, 27826, 25579, 25722, 24826, 24605,
  71. 24304, 23464, 23708, 24099, 24357, 24237, 24401, 24344, 23586, 22380,
  72. 21004, 17287, 14747, 13076, 12555, 12144, 11009, 10950, 10871, 10824,
  73. 10577, 10527, 10475, 10421, 10358, 10295, 10104, 9914, 9620, 9326,
  74. 5113, 5113, 4954, 4804, 4761, 4717, 4368, 4018
  75. ]
  76. }, {
  77. name: 'USSR/Russia',
  78. data: [null, null, null, null, null, null, null, null, null, null,
  79. 5, 25, 50, 120, 150, 200, 426, 660, 869, 1060,
  80. 1605, 2471, 3322, 4238, 5221, 6129, 7089, 8339, 9399, 10538,
  81. 11643, 13092, 14478, 15915, 17385, 19055, 21205, 23044, 25393, 27935,
  82. 30062, 32049, 33952, 35804, 37431, 39197, 45000, 43000, 41000, 39000,
  83. 37000, 35000, 33000, 31000, 29000, 27000, 25000, 24000, 23000, 22000,
  84. 21000, 20000, 19000, 18000, 18000, 17000, 16000, 15537, 14162, 12787,
  85. 12600, 11400, 5500, 4512, 4502, 4502, 4500, 4500
  86. ]
  87. }]
  88. });
  89. </script>
  90. </body>
  91. </html>