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