index.htm 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. #container {
  9. min-width: 310px;
  10. max-width: 800px;
  11. height: 400px;
  12. margin: 0 auto
  13. }
  14. </style>
  15. </head>
  16. <body>
  17. <script src="../../code/highcharts.js"></script>
  18. <script src="../../code/modules/series-label.js"></script>
  19. <script src="../../code/modules/exporting.js"></script>
  20. <script src="../../code/modules/export-data.js"></script>
  21. <div id="container"></div>
  22. <script type="text/javascript">
  23. Highcharts.chart('container', {
  24. title: {
  25. text: 'Solar Employment Growth by Sector, 2010-2016'
  26. },
  27. subtitle: {
  28. text: 'Source: thesolarfoundation.com'
  29. },
  30. yAxis: {
  31. title: {
  32. text: 'Number of Employees'
  33. }
  34. },
  35. legend: {
  36. layout: 'vertical',
  37. align: 'right',
  38. verticalAlign: 'middle'
  39. },
  40. plotOptions: {
  41. series: {
  42. label: {
  43. connectorAllowed: false
  44. },
  45. pointStart: 2010
  46. }
  47. },
  48. series: [{
  49. name: 'Installation',
  50. data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
  51. }, {
  52. name: 'Manufacturing',
  53. data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]
  54. }, {
  55. name: 'Sales & Distribution',
  56. data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]
  57. }, {
  58. name: 'Project Development',
  59. data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227]
  60. }, {
  61. name: 'Other',
  62. data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
  63. }],
  64. responsive: {
  65. rules: [{
  66. condition: {
  67. maxWidth: 500
  68. },
  69. chartOptions: {
  70. legend: {
  71. layout: 'horizontal',
  72. align: 'center',
  73. verticalAlign: 'bottom'
  74. }
  75. }
  76. }]
  77. }
  78. });
  79. </script>
  80. </body>
  81. </html>