index.htm 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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: 'line'
  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', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
  21. },
  22. yAxis: {
  23. title: {
  24. text: 'Temperature (°C)'
  25. }
  26. },
  27. tooltip: {
  28. enabled: false,
  29. formatter: function() {
  30. return '<b>'+ this.series.name +'</b><br/>'+
  31. this.x +': '+ this.y +'°C';
  32. }
  33. },
  34. plotOptions: {
  35. line: {
  36. dataLabels: {
  37. enabled: true
  38. },
  39. enableMouseTracking: false
  40. }
  41. },
  42. series: [{
  43. name: 'Tokyo',
  44. data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
  45. }, {
  46. name: 'London',
  47. data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
  48. }]
  49. });
  50. });
  51. </script>
  52. </head>
  53. <body>
  54. <script src="../../js/highcharts.js"></script>
  55. <script src="../../js/modules/exporting.js"></script>
  56. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  57. </body>
  58. </html>