You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.4 KiB

9 years ago
  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. <style type="text/css">
  8. ${demo.css}
  9. </style>
  10. <script type="text/javascript">
  11. $(function () {
  12. $('#container').highcharts({
  13. chart: {
  14. type: 'column'
  15. },
  16. title: {
  17. text: 'Efficiency Optimization by Branch'
  18. },
  19. xAxis: {
  20. categories: [
  21. 'Seattle HQ',
  22. 'San Francisco',
  23. 'Tokyo'
  24. ]
  25. },
  26. yAxis: [{
  27. min: 0,
  28. title: {
  29. text: 'Employees'
  30. }
  31. }, {
  32. title: {
  33. text: 'Profit (millions)'
  34. },
  35. opposite: true
  36. }],
  37. legend: {
  38. shadow: false
  39. },
  40. tooltip: {
  41. shared: true
  42. },
  43. plotOptions: {
  44. column: {
  45. grouping: false,
  46. shadow: false,
  47. borderWidth: 0
  48. }
  49. },
  50. series: [{
  51. name: 'Employees',
  52. color: 'rgba(165,170,217,1)',
  53. data: [150, 73, 20],
  54. pointPadding: 0.3,
  55. pointPlacement: -0.2
  56. }, {
  57. name: 'Employees Optimized',
  58. color: 'rgba(126,86,134,.9)',
  59. data: [140, 90, 40],
  60. pointPadding: 0.4,
  61. pointPlacement: -0.2
  62. }, {
  63. name: 'Profit',
  64. color: 'rgba(248,161,63,1)',
  65. data: [183.6, 178.8, 198.5],
  66. tooltip: {
  67. valuePrefix: '$',
  68. valueSuffix: ' M'
  69. },
  70. pointPadding: 0.3,
  71. pointPlacement: 0.2,
  72. yAxis: 1
  73. }, {
  74. name: 'Profit Optimized',
  75. color: 'rgba(186,60,61,.9)',
  76. data: [203.6, 198.8, 208.5],
  77. tooltip: {
  78. valuePrefix: '$',
  79. valueSuffix: ' M'
  80. },
  81. pointPadding: 0.4,
  82. pointPlacement: 0.2,
  83. yAxis: 1
  84. }]
  85. });
  86. });
  87. </script>
  88. </head>
  89. <body>
  90. <script src="../../js/highcharts.js"></script>
  91. <script src="../../js/modules/exporting.js"></script>
  92. <div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
  93. </body>
  94. </html>