index.htm 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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; max-width: 800px; height: 400px; margin: 0 auto"></div>
  15. <script type="text/javascript">
  16. Highcharts.chart('container', {
  17. chart: {
  18. type: 'bar'
  19. },
  20. title: {
  21. text: 'Historic World Population by Region'
  22. },
  23. subtitle: {
  24. text: 'Source: <a href="https://en.wikipedia.org/wiki/World_population">Wikipedia.org</a>'
  25. },
  26. xAxis: {
  27. categories: ['Africa', 'America', 'Asia', 'Europe', 'Oceania'],
  28. title: {
  29. text: null
  30. }
  31. },
  32. yAxis: {
  33. min: 0,
  34. title: {
  35. text: 'Population (millions)',
  36. align: 'high'
  37. },
  38. labels: {
  39. overflow: 'justify'
  40. }
  41. },
  42. tooltip: {
  43. valueSuffix: ' millions'
  44. },
  45. plotOptions: {
  46. bar: {
  47. dataLabels: {
  48. enabled: true
  49. }
  50. }
  51. },
  52. legend: {
  53. layout: 'vertical',
  54. align: 'right',
  55. verticalAlign: 'top',
  56. x: -40,
  57. y: 80,
  58. floating: true,
  59. borderWidth: 1,
  60. backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
  61. shadow: true
  62. },
  63. credits: {
  64. enabled: false
  65. },
  66. series: [{
  67. name: 'Year 1800',
  68. data: [107, 31, 635, 203, 2]
  69. }, {
  70. name: 'Year 1900',
  71. data: [133, 156, 947, 408, 6]
  72. }, {
  73. name: 'Year 2000',
  74. data: [814, 841, 3714, 727, 31]
  75. }, {
  76. name: 'Year 2016',
  77. data: [1216, 1001, 4436, 738, 40]
  78. }]
  79. });
  80. </script>
  81. </body>
  82. </html>