a590e530595a96642527acf894ed6ca30407eb9f.svn-base 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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://cdn.hcharts.cn/jquery/jquery-1.8.3.min.js"></script>
  7. <style type="text/css">
  8. ${demo.css}
  9. </style>
  10. <script type="text/javascript">
  11. $(function () {
  12. $('#container').highcharts({
  13. chart: {
  14. type: 'area',
  15. inverted: true
  16. },
  17. title: {
  18. text: 'Average fruit consumption during one week'
  19. },
  20. subtitle: {
  21. style: {
  22. position: 'absolute',
  23. right: '0px',
  24. bottom: '10px'
  25. }
  26. },
  27. legend: {
  28. layout: 'vertical',
  29. align: 'right',
  30. verticalAlign: 'top',
  31. x: -150,
  32. y: 100,
  33. floating: true,
  34. borderWidth: 1,
  35. backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
  36. },
  37. xAxis: {
  38. categories: [
  39. 'Monday',
  40. 'Tuesday',
  41. 'Wednesday',
  42. 'Thursday',
  43. 'Friday',
  44. 'Saturday',
  45. 'Sunday'
  46. ]
  47. },
  48. yAxis: {
  49. title: {
  50. text: 'Number of units'
  51. },
  52. labels: {
  53. formatter: function () {
  54. return this.value;
  55. }
  56. },
  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. });
  73. </script>
  74. </head>
  75. <body>
  76. <script src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
  77. <script src="http://cdn.hcharts.cn/highcharts/modules/exporting.js"></script>
  78. <div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
  79. </body>
  80. </html>