index.htm 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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: 'area',
  19. spacingBottom: 30
  20. },
  21. title: {
  22. text: 'Fruit consumption *'
  23. },
  24. subtitle: {
  25. text: '* Jane\'s banana consumption is unknown',
  26. floating: true,
  27. align: 'right',
  28. verticalAlign: 'bottom',
  29. y: 15
  30. },
  31. legend: {
  32. layout: 'vertical',
  33. align: 'left',
  34. verticalAlign: 'top',
  35. x: 100,
  36. y: 70,
  37. floating: true,
  38. borderWidth: 1,
  39. backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
  40. },
  41. xAxis: {
  42. categories: ['Apples', 'Pears', 'Oranges', 'Bananas', 'Grapes', 'Plums', 'Strawberries', 'Raspberries']
  43. },
  44. yAxis: {
  45. title: {
  46. text: 'Y-Axis'
  47. },
  48. labels: {
  49. formatter: function () {
  50. return this.value;
  51. }
  52. }
  53. },
  54. tooltip: {
  55. formatter: function () {
  56. return '<b>' + this.series.name + '</b><br/>' +
  57. this.x + ': ' + this.y;
  58. }
  59. },
  60. plotOptions: {
  61. area: {
  62. fillOpacity: 0.5
  63. }
  64. },
  65. credits: {
  66. enabled: false
  67. },
  68. series: [{
  69. name: 'John',
  70. data: [0, 1, 4, 4, 5, 2, 3, 7]
  71. }, {
  72. name: 'Jane',
  73. data: [1, 0, 3, null, 3, 1, 2, 1]
  74. }]
  75. });
  76. </script>
  77. </body>
  78. </html>