index.htm 1.7 KB

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