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.

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