4802020623b50b8c936fc1834b0461e0bde082cf.svn-base 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. $.getJSON('http://www.hcharts.cn/datas/jsonp.php?filename=usdeur.json&callback=?', function (data) {
  13. $('#container').highcharts({
  14. chart: {
  15. zoomType: 'x'
  16. },
  17. title: {
  18. text: 'USD to EUR exchange rate over time'
  19. },
  20. subtitle: {
  21. text: document.ontouchstart === undefined ?
  22. 'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in'
  23. },
  24. xAxis: {
  25. type: 'datetime'
  26. },
  27. yAxis: {
  28. title: {
  29. text: 'Exchange rate'
  30. }
  31. },
  32. legend: {
  33. enabled: false
  34. },
  35. plotOptions: {
  36. area: {
  37. fillColor: {
  38. linearGradient: {
  39. x1: 0,
  40. y1: 0,
  41. x2: 0,
  42. y2: 1
  43. },
  44. stops: [
  45. [0, Highcharts.getOptions().colors[0]],
  46. [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
  47. ]
  48. },
  49. marker: {
  50. radius: 2
  51. },
  52. lineWidth: 1,
  53. states: {
  54. hover: {
  55. lineWidth: 1
  56. }
  57. },
  58. threshold: null
  59. }
  60. },
  61. series: [{
  62. type: 'area',
  63. name: 'USD to EUR',
  64. data: data
  65. }]
  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; margin: 0 auto"></div>
  75. </body>
  76. </html>