ClarkeRubber

fiddle

Feb 12th, 2014
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. $(function () {
  2. $('#container').highcharts({
  3. chart: {
  4. zoomType: 'x',
  5. spacingRight: 1
  6. },
  7. title: {
  8. text: 'USD to EUR exchange rate from 2006 through 2008'
  9. },
  10. subtitle: {
  11. text: document.ontouchstart === undefined ?
  12. 'Click and drag in the plot area to zoom in' :
  13. 'Pinch the chart to zoom in'
  14. },
  15. xAxis: {
  16. type: 'linear',
  17. ordinance: false,
  18. maxZoom: 10, // fourteen days
  19. title: {
  20. text: null
  21. }
  22. },
  23. yAxis: {
  24. title: {
  25. text: 'Exchange rate'
  26. }
  27. },
  28. tooltip: {
  29. shared: true
  30. },
  31. legend: {
  32. enabled: false
  33. },
  34. plotOptions: {
  35. area: {
  36. fillColor: {
  37. linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1},
  38. stops: [
  39. [0, Highcharts.getOptions().colors[0]],
  40. [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
  41. ]
  42. },
  43. lineWidth: 1,
  44. marker: {
  45. enabled: false
  46. },
  47. shadow: false,
  48. states: {
  49. hover: {
  50. lineWidth: 1
  51. }
  52. },
  53. threshold: null
  54. }
  55. },
  56.  
  57. series: [{
  58. type: 'area',
  59. name: 'USD to EUR',
  60. pointInterval: 1,
  61. pointStart: 0,
  62. data: [
  63. {name: '1970/ 9/ 27', y: 0 },
  64. {name: '1970/ 10/ 10', y: 0.6 },
  65. {name: '1970/ 10/ 18', y: 0.7 },
  66. {name: '1970/ 11/ 2', y: 0.8 },
  67. {name: '1970/ 11/ 9', y: 0.6 },
  68. {name: '1970/ 11/ 16', y: 0.6 },
  69. {name: '1970/ 11/ 28', y: 0.67},
  70. {name: '1971/ 0/ 1', y: 0.81},
  71. {name: '1971/ 0/ 8', y: 0.78},
  72. {name: '1971/ 0/ 12', y: 0.98},
  73. {name: '1971/ 0/ 27', y: 1.84},
  74. {name: '1971/ 1/ 10', y: 1.80},
  75. {name: '1971/ 1/ 18', y: 1.80},
  76. {name: '1971/ 1/ 24', y: 1.92},
  77. {name: '1971/ 2/ 4', y: 2.49},
  78. {name: '1971/ 2/ 11', y: 2.79},
  79. {name: '1971/ 2/ 15', y: 2.73},
  80. {name: '1971/ 2/ 25', y: 2.61},
  81. {name: '1971/ 3/ 2', y: 2.76},
  82. {name: '1971/ 3/ 6', y: 2.82},
  83. {name: '1971/ 3/ 13', y: 2.8 },
  84. {name: '1971/ 4/ 3', y: 2.1 },
  85. {name: '1971/ 4/ 26', y: 1.1 },
  86. {name: '1971/ 5/ 9', y: 0.25},
  87. {name: '1971/ 5/ 12', y: 0 }
  88. ]
  89. }]
  90. });
  91. });
Advertisement
Add Comment
Please, Sign In to add comment