index.htm 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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: 'areaspline'
  12. },
  13. title: {
  14. text: 'Average fruit consumption during one week'
  15. },
  16. legend: {
  17. layout: 'vertical',
  18. align: 'left',
  19. verticalAlign: 'top',
  20. x: 150,
  21. y: 100,
  22. floating: true,
  23. borderWidth: 1,
  24. backgroundColor: '#FFFFFF'
  25. },
  26. xAxis: {
  27. categories: [
  28. 'Monday',
  29. 'Tuesday',
  30. 'Wednesday',
  31. 'Thursday',
  32. 'Friday',
  33. 'Saturday',
  34. 'Sunday'
  35. ],
  36. plotBands: [{ // visualize the weekend
  37. from: 4.5,
  38. to: 6.5,
  39. color: 'rgba(68, 170, 213, .2)'
  40. }]
  41. },
  42. yAxis: {
  43. title: {
  44. text: 'Fruit units'
  45. }
  46. },
  47. tooltip: {
  48. shared: true,
  49. valueSuffix: ' units'
  50. },
  51. credits: {
  52. enabled: false
  53. },
  54. plotOptions: {
  55. areaspline: {
  56. fillOpacity: 0.5
  57. }
  58. },
  59. series: [{
  60. name: 'John',
  61. data: [3, 4, 3, 5, 4, 10, 12]
  62. }, {
  63. name: 'Jane',
  64. data: [1, 3, 4, 3, 3, 5, 4]
  65. }]
  66. });
  67. });
  68. </script>
  69. </head>
  70. <body>
  71. <script src="../../js/highcharts.js"></script>
  72. <script src="../../js/modules/exporting.js"></script>
  73. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  74. </body>
  75. </html>