index.htm 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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="https://code.jquery.com/jquery-3.1.1.min.js"></script>
  12. <script src="../../code/highcharts.js"></script>
  13. <script src="../../code/highcharts-more.js"></script>
  14. <script src="../../code/modules/exporting.js"></script>
  15. <script src="../../code/modules/export-data.js"></script>
  16. <div id="container" style="min-width: 400px; max-width: 600px; height: 400px; margin: 0 auto"></div>
  17. <script type="text/javascript">
  18. Highcharts.chart('container', {
  19. chart: {
  20. polar: true,
  21. type: 'line'
  22. },
  23. title: {
  24. text: 'Budget vs spending',
  25. x: -80
  26. },
  27. pane: {
  28. size: '80%'
  29. },
  30. xAxis: {
  31. categories: ['Sales', 'Marketing', 'Development', 'Customer Support',
  32. 'Information Technology', 'Administration'],
  33. tickmarkPlacement: 'on',
  34. lineWidth: 0
  35. },
  36. yAxis: {
  37. gridLineInterpolation: 'polygon',
  38. lineWidth: 0,
  39. min: 0
  40. },
  41. tooltip: {
  42. shared: true,
  43. pointFormat: '<span style="color:{series.color}">{series.name}: <b>${point.y:,.0f}</b><br/>'
  44. },
  45. legend: {
  46. align: 'right',
  47. verticalAlign: 'top',
  48. y: 70,
  49. layout: 'vertical'
  50. },
  51. series: [{
  52. name: 'Allocated Budget',
  53. data: [43000, 19000, 60000, 35000, 17000, 10000],
  54. pointPlacement: 'on'
  55. }, {
  56. name: 'Actual Spending',
  57. data: [50000, 39000, 42000, 31000, 26000, 14000],
  58. pointPlacement: 'on'
  59. }]
  60. });
  61. </script>
  62. </body>
  63. </html>