index.htm 1.8 KB

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