Advertisement
Guest User

highcharts.html

a guest
Mar 28th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.67 KB | None | 0 0
  1. <div id="line"></div>
  2.  
  3. <script type="text/javascript">
  4.   //basic line chart
  5.   Highcharts.chart('line', {
  6.  
  7.       title: {
  8.           text: 'Solar Employment Growth by Sector, 2010-2016'
  9.       },
  10.  
  11.       subtitle: {
  12.           text: 'Source: thesolarfoundation.com'
  13.       },
  14.  
  15.       yAxis: {
  16.           title: {
  17.               text: 'Number of Employees'
  18.           }
  19.       },
  20.       legend: {
  21.           layout: 'vertical',
  22.           align: 'right',
  23.           verticalAlign: 'middle'
  24.       },
  25.  
  26.       plotOptions: {
  27.           series: {
  28.               label: {
  29.                   connectorAllowed: false
  30.               },
  31.               pointStart: 2010
  32.           }
  33.       },
  34.  
  35.       series: [{
  36.           name: 'Installation',
  37.           data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
  38.       }, {
  39.           name: 'Manufacturing',
  40.           data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]
  41.       }, {
  42.           name: 'Sales & Distribution',
  43.          data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]
  44.      }, {
  45.          name: 'Project Development',
  46.          data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227]
  47.      }, {
  48.          name: 'Other',
  49.          data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
  50.      }],
  51.  
  52.      responsive: {
  53.          rules: [{
  54.              condition: {
  55.                  maxWidth: 500
  56.              },
  57.              chartOptions: {
  58.                  legend: {
  59.                      layout: 'horizontal',
  60.                      align: 'center',
  61.                      verticalAlign: 'bottom'
  62.                  }
  63.              }
  64.          }]
  65.      }
  66.  
  67.  
  68.  });
  69. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement