index.htm 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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: 'spline'
  12. },
  13. title: {
  14. text: 'Monthly Average Temperature'
  15. },
  16. subtitle: {
  17. text: 'Source: WorldClimate.com'
  18. },
  19. xAxis: {
  20. categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
  21. 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
  22. },
  23. yAxis: {
  24. title: {
  25. text: 'Temperature'
  26. },
  27. labels: {
  28. formatter: function() {
  29. return this.value +'°'
  30. }
  31. }
  32. },
  33. tooltip: {
  34. crosshairs: true,
  35. shared: true
  36. },
  37. plotOptions: {
  38. spline: {
  39. marker: {
  40. radius: 4,
  41. lineColor: '#666666',
  42. lineWidth: 1
  43. }
  44. }
  45. },
  46. series: [{
  47. name: 'Tokyo',
  48. marker: {
  49. symbol: 'square'
  50. },
  51. data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, {
  52. y: 26.5,
  53. marker: {
  54. symbol: 'url(http://www.highcharts.com/demo/gfx/sun.png)'
  55. }
  56. }, 23.3, 18.3, 13.9, 9.6]
  57. }, {
  58. name: 'London',
  59. marker: {
  60. symbol: 'diamond'
  61. },
  62. data: [{
  63. y: 3.9,
  64. marker: {
  65. symbol: 'url(http://www.highcharts.com/demo/gfx/snow.png)'
  66. }
  67. }, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
  68. }]
  69. });
  70. });
  71. </script>
  72. </head>
  73. <body>
  74. <script src="../../js/highcharts.js"></script>
  75. <script src="../../js/modules/exporting.js"></script>
  76. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  77. </body>
  78. </html>