You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.5 KiB

9 years ago
  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. <style type="text/css">
  8. ${demo.css}
  9. </style>
  10. <script type="text/javascript">
  11. $(function () {
  12. $('#container').highcharts({
  13. chart: {
  14. type: 'line'
  15. },
  16. title: {
  17. text: 'Monthly Average Temperature'
  18. },
  19. subtitle: {
  20. text: 'Source: WorldClimate.com'
  21. },
  22. xAxis: {
  23. categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
  24. },
  25. yAxis: {
  26. title: {
  27. text: 'Temperature (°C)'
  28. }
  29. },
  30. plotOptions: {
  31. line: {
  32. dataLabels: {
  33. enabled: true
  34. },
  35. enableMouseTracking: false
  36. }
  37. },
  38. series: [{
  39. name: 'Tokyo',
  40. 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]
  41. }, {
  42. name: 'London',
  43. 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]
  44. }]
  45. });
  46. });
  47. </script>
  48. </head>
  49. <body>
  50. <script src="../../js/highcharts.js"></script>
  51. <script src="../../js/modules/exporting.js"></script>
  52. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  53. </body>
  54. </html>