index.htm 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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://cdn.hcharts.cn/jquery/jquery-1.8.3.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="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
  91. <script src="http://cdn.hcharts.cn/highcharts/modules/exporting.js"></script>
  92. <div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
  93. </body>
  94. </html>