a0600fbd497493c3c12f935165fc7a9f1ff5143b.svn-base 2.2 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. spacingBottom: 30
  16. },
  17. title: {
  18. text: 'Fruit consumption *'
  19. },
  20. subtitle: {
  21. text: '* Jane\'s banana consumption is unknown',
  22. floating: true,
  23. align: 'right',
  24. verticalAlign: 'bottom',
  25. y: 15
  26. },
  27. legend: {
  28. layout: 'vertical',
  29. align: 'left',
  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: ['Apples', 'Pears', 'Oranges', 'Bananas', 'Grapes', 'Plums', 'Strawberries', 'Raspberries']
  39. },
  40. yAxis: {
  41. title: {
  42. text: 'Y-Axis'
  43. },
  44. labels: {
  45. formatter: function () {
  46. return this.value;
  47. }
  48. }
  49. },
  50. tooltip: {
  51. formatter: function () {
  52. return '<b>' + this.series.name + '</b><br/>' +
  53. this.x + ': ' + this.y;
  54. }
  55. },
  56. plotOptions: {
  57. area: {
  58. fillOpacity: 0.5
  59. }
  60. },
  61. credits: {
  62. enabled: false
  63. },
  64. series: [{
  65. name: 'John',
  66. data: [0, 1, 4, 4, 5, 2, 3, 7]
  67. }, {
  68. name: 'Jane',
  69. data: [1, 0, 3, null, 3, 1, 2, 1]
  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; margin: 0 auto"></div>
  79. </body>
  80. </html>