index.htm 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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: 'Historic and Estimated Worldwide Population Distribution by Region'
  15. },
  16. subtitle: {
  17. text: 'Source: Wikipedia.org'
  18. },
  19. xAxis: {
  20. categories: ['1750', '1800', '1850', '1900', '1950', '1999', '2050'],
  21. tickmarkPlacement: 'on',
  22. title: {
  23. enabled: false
  24. }
  25. },
  26. yAxis: {
  27. title: {
  28. text: 'Percent'
  29. }
  30. },
  31. tooltip: {
  32. pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.percentage:.1f}%</b> ({point.y:,.0f} millions)<br/>',
  33. shared: true
  34. },
  35. plotOptions: {
  36. area: {
  37. stacking: 'percent',
  38. lineColor: '#ffffff',
  39. lineWidth: 1,
  40. marker: {
  41. lineWidth: 1,
  42. lineColor: '#ffffff'
  43. }
  44. }
  45. },
  46. series: [{
  47. name: 'Asia',
  48. data: [502, 635, 809, 947, 1402, 3634, 5268]
  49. }, {
  50. name: 'Africa',
  51. data: [106, 107, 111, 133, 221, 767, 1766]
  52. }, {
  53. name: 'Europe',
  54. data: [163, 203, 276, 408, 547, 729, 628]
  55. }, {
  56. name: 'America',
  57. data: [18, 31, 54, 156, 339, 818, 1201]
  58. }, {
  59. name: 'Oceania',
  60. data: [2, 2, 2, 6, 13, 30, 46]
  61. }]
  62. });
  63. });
  64. </script>
  65. </head>
  66. <body>
  67. <script src="../../js/highcharts.js"></script>
  68. <script src="../../js/modules/exporting.js"></script>
  69. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  70. </body>
  71. </html>