index.htm 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. <script type="text/javascript">
  8. $(function () {
  9. $('#container').highcharts({
  10. chart: {
  11. type: 'area',
  12. inverted: true
  13. },
  14. title: {
  15. text: 'Average fruit consumption during one week'
  16. },
  17. subtitle: {
  18. style: {
  19. position: 'absolute',
  20. right: '0px',
  21. bottom: '10px'
  22. }
  23. },
  24. legend: {
  25. layout: 'vertical',
  26. align: 'right',
  27. verticalAlign: 'top',
  28. x: -150,
  29. y: 100,
  30. floating: true,
  31. borderWidth: 1,
  32. backgroundColor: '#FFFFFF'
  33. },
  34. xAxis: {
  35. categories: [
  36. 'Monday',
  37. 'Tuesday',
  38. 'Wednesday',
  39. 'Thursday',
  40. 'Friday',
  41. 'Saturday',
  42. 'Sunday'
  43. ]
  44. },
  45. yAxis: {
  46. title: {
  47. text: 'Number of units'
  48. },
  49. labels: {
  50. formatter: function() {
  51. return this.value;
  52. }
  53. },
  54. min: 0
  55. },
  56. plotOptions: {
  57. area: {
  58. fillOpacity: 0.5
  59. }
  60. },
  61. series: [{
  62. name: 'John',
  63. data: [3, 4, 3, 5, 4, 10, 12]
  64. }, {
  65. name: 'Jane',
  66. data: [1, 3, 4, 3, 3, 5, 4]
  67. }]
  68. });
  69. });
  70. </script>
  71. </head>
  72. <body>
  73. <script src="../../js/highcharts.js"></script>
  74. <script src="../../js/modules/exporting.js"></script>
  75. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  76. </body>
  77. </html>