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.

79 lines
2.0 KiB

8 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. 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="../../js/highcharts.js"></script>
  73. <script src="../../js/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>