index.htm 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>Highcharts Example</title>
  7. <style type="text/css">
  8. </style>
  9. </head>
  10. <body>
  11. <script src="../../code/highcharts.js"></script>
  12. <script src="../../code/modules/series-label.js"></script>
  13. <script src="../../code/modules/exporting.js"></script>
  14. <script src="../../code/modules/export-data.js"></script>
  15. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  16. <script type="text/javascript">
  17. Highcharts.chart('container', {
  18. chart: {
  19. type: 'spline'
  20. },
  21. title: {
  22. text: 'Monthly Average Temperature'
  23. },
  24. subtitle: {
  25. text: 'Source: WorldClimate.com'
  26. },
  27. xAxis: {
  28. categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
  29. 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
  30. },
  31. yAxis: {
  32. title: {
  33. text: 'Temperature'
  34. },
  35. labels: {
  36. formatter: function () {
  37. return this.value + '°';
  38. }
  39. }
  40. },
  41. tooltip: {
  42. crosshairs: true,
  43. shared: true
  44. },
  45. plotOptions: {
  46. spline: {
  47. marker: {
  48. radius: 4,
  49. lineColor: '#666666',
  50. lineWidth: 1
  51. }
  52. }
  53. },
  54. series: [{
  55. name: 'Tokyo',
  56. marker: {
  57. symbol: 'square'
  58. },
  59. data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, {
  60. y: 26.5,
  61. marker: {
  62. symbol: 'url(https://www.highcharts.com/samples/graphics/sun.png)'
  63. }
  64. }, 23.3, 18.3, 13.9, 9.6]
  65. }, {
  66. name: 'London',
  67. marker: {
  68. symbol: 'diamond'
  69. },
  70. data: [{
  71. y: 3.9,
  72. marker: {
  73. symbol: 'url(https://www.highcharts.com/samples/graphics/snow.png)'
  74. }
  75. }, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
  76. }]
  77. });
  78. </script>
  79. </body>
  80. </html>