30a47e9943b5204522981857d8c8b89d97775486.svn-base 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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: 'spline',
  15. inverted: true
  16. },
  17. title: {
  18. text: 'Atmosphere Temperature by Altitude'
  19. },
  20. subtitle: {
  21. text: 'According to the Standard Atmosphere Model'
  22. },
  23. xAxis: {
  24. reversed: false,
  25. title: {
  26. enabled: true,
  27. text: 'Altitude'
  28. },
  29. labels: {
  30. formatter: function () {
  31. return this.value + 'km';
  32. }
  33. },
  34. maxPadding: 0.05,
  35. showLastLabel: true
  36. },
  37. yAxis: {
  38. title: {
  39. text: 'Temperature'
  40. },
  41. labels: {
  42. formatter: function () {
  43. return this.value + '°';
  44. }
  45. },
  46. lineWidth: 2
  47. },
  48. legend: {
  49. enabled: false
  50. },
  51. tooltip: {
  52. headerFormat: '<b>{series.name}</b><br/>',
  53. pointFormat: '{point.x} km: {point.y}°C'
  54. },
  55. plotOptions: {
  56. spline: {
  57. marker: {
  58. enable: false
  59. }
  60. }
  61. },
  62. series: [{
  63. name: 'Temperature',
  64. data: [[0, 15], [10, -50], [20, -56.5], [30, -46.5], [40, -22.1],
  65. [50, -2.5], [60, -27.7], [70, -55.7], [80, -76.5]]
  66. }]
  67. });
  68. });
  69. </script>
  70. </head>
  71. <body>
  72. <script src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
  73. <script src="http://cdn.hcharts.cn/highcharts/modules/exporting.js"></script>
  74. <div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
  75. </body>
  76. </html>