Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. content-type: text/html
  2. <html>
  3. <head>
  4. <title> Test Chart </title>
  5. <script type="text/javascript" src="https://code.highcharts.com/highcharts.js"></script>
  6. <script type="text/javascript" src="https://code.highcharts.com/modules/exporting.js"></script>
  7. <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.2.1/jquery.min.js"></script>
  8. <script type="text/javascript">
  9.  
  10. $(function () {
  11. $('#container').highcharts({
  12. title: {
  13. text: 'Monthly Average Temperature',
  14. x: -20 //center
  15. },
  16. subtitle: {
  17. text: 'Source: WorldClimate.com',
  18. x: -20
  19. },
  20. xAxis: {
  21. categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
  22. 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
  23. },
  24. yAxis: {
  25. title: {
  26. text: 'Temperature (°C)'
  27. },
  28. plotLines: [{
  29. value: 0,
  30. width: 1,
  31. color: '#808080'
  32. }]
  33. },
  34. tooltip: {
  35. valueSuffix: '°C'
  36. },
  37. legend: {
  38. layout: 'vertical',
  39. align: 'right',
  40. verticalAlign: 'middle',
  41. borderWidth: 0
  42. },
  43. series: [{
  44. name: 'Tokyo',
  45. data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
  46. }, {
  47. name: 'New York',
  48. data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
  49. }, {
  50. name: 'Berlin',
  51. data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
  52. }, {
  53. name: 'London',
  54. 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]
  55. }]
  56. });
  57. $('#container2').highcharts({
  58. title: {
  59. text: 'Monthly Average Temperature',
  60. x: -20 //center
  61. },
  62. subtitle: {
  63. text: 'Source: WorldClimate.com',
  64. x: -20
  65. },
  66. xAxis: {
  67. categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
  68. '1', 'Aug', 'Sep', 'h', 'Nov', 'Dec']
  69. },
  70. yAxis: {
  71. title: {
  72. text: 'Temperature (°C)'
  73. },
  74. plotLines: [{
  75. value: 0,
  76. width: 1,
  77. color: '#808080'
  78. }]
  79. },
  80. tooltip: {
  81. valueSuffix: '°C'
  82. },
  83. legend: {
  84. layout: 'vertical',
  85. align: 'right',
  86. verticalAlign: 'middle',
  87. borderWidth: 0
  88. },
  89. series: [{
  90. name: 'Tokyo',
  91. data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
  92. }, {
  93. name: 'New York',
  94. data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
  95. }, {
  96. name: 'Berlin',
  97. data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
  98. }, {
  99. name: 'London',
  100. 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]
  101. }]
  102. });
  103. });
  104.  
  105. </script>
  106. </head>
  107. <body>
  108. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  109. <div id="container2" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  110. </body>
  111. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement