index.htm 2.3 KB

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