index.htm 3.3 KB

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