aw-highstock_rails 7.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (697) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.travis.yml +7 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Gemfile +6 -0
  6. data/Gemfile.lock +22 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +53 -0
  9. data/Rakefile +10 -0
  10. data/aw-highstock_rails.gemspec +28 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/lib/aw/highstock_rails.rb +9 -0
  14. data/lib/aw/highstock_rails/version.rb +5 -0
  15. data/vendor/assets/javascripts/highstock/css/annotations/popup.css +229 -0
  16. data/vendor/assets/javascripts/highstock/css/annotations/popup.scss +235 -0
  17. data/vendor/assets/javascripts/highstock/css/highcharts.css +890 -0
  18. data/vendor/assets/javascripts/highstock/css/highcharts.scss +788 -0
  19. data/vendor/assets/javascripts/highstock/css/stocktools/gui.css +268 -0
  20. data/vendor/assets/javascripts/highstock/css/stocktools/gui.scss +270 -0
  21. data/vendor/assets/javascripts/highstock/css/themes/dark-unica.css +951 -0
  22. data/vendor/assets/javascripts/highstock/css/themes/dark-unica.scss +122 -0
  23. data/vendor/assets/javascripts/highstock/css/themes/grid-light.css +904 -0
  24. data/vendor/assets/javascripts/highstock/css/themes/grid-light.scss +33 -0
  25. data/vendor/assets/javascripts/highstock/css/themes/sand-signika.css +920 -0
  26. data/vendor/assets/javascripts/highstock/css/themes/sand-signika.scss +74 -0
  27. data/vendor/assets/javascripts/highstock/es-modules/annotations/ControlPoint.js +130 -0
  28. data/vendor/assets/javascripts/highstock/es-modules/annotations/MockPoint.js +415 -0
  29. data/vendor/assets/javascripts/highstock/es-modules/annotations/annotations.src.js +1231 -0
  30. data/vendor/assets/javascripts/highstock/es-modules/annotations/controllable/ControllableCircle.js +92 -0
  31. data/vendor/assets/javascripts/highstock/es-modules/annotations/controllable/ControllableImage.js +101 -0
  32. data/vendor/assets/javascripts/highstock/es-modules/annotations/controllable/ControllableLabel.js +452 -0
  33. data/vendor/assets/javascripts/highstock/es-modules/annotations/controllable/ControllablePath.js +175 -0
  34. data/vendor/assets/javascripts/highstock/es-modules/annotations/controllable/ControllableRect.js +93 -0
  35. data/vendor/assets/javascripts/highstock/es-modules/annotations/controllable/controllableMixin.js +411 -0
  36. data/vendor/assets/javascripts/highstock/es-modules/annotations/controllable/markerMixin.js +214 -0
  37. data/vendor/assets/javascripts/highstock/es-modules/annotations/eventEmitterMixin.js +271 -0
  38. data/vendor/assets/javascripts/highstock/es-modules/annotations/navigationBindings.js +1283 -0
  39. data/vendor/assets/javascripts/highstock/es-modules/annotations/popup.js +1069 -0
  40. data/vendor/assets/javascripts/highstock/es-modules/annotations/types/CrookedLine.js +191 -0
  41. data/vendor/assets/javascripts/highstock/es-modules/annotations/types/ElliottWave.js +76 -0
  42. data/vendor/assets/javascripts/highstock/es-modules/annotations/types/Fibonacci.js +247 -0
  43. data/vendor/assets/javascripts/highstock/es-modules/annotations/types/InfinityLine.js +185 -0
  44. data/vendor/assets/javascripts/highstock/es-modules/annotations/types/Measure.js +928 -0
  45. data/vendor/assets/javascripts/highstock/es-modules/annotations/types/Pitchfork.js +203 -0
  46. data/vendor/assets/javascripts/highstock/es-modules/annotations/types/Tunnel.js +242 -0
  47. data/vendor/assets/javascripts/highstock/es-modules/annotations/types/VerticalLine.js +157 -0
  48. data/vendor/assets/javascripts/highstock/es-modules/error-messages.js +128 -0
  49. data/vendor/assets/javascripts/highstock/es-modules/error.js +1 -0
  50. data/vendor/assets/javascripts/highstock/es-modules/indicators/acceleration-bands.src.js +199 -0
  51. data/vendor/assets/javascripts/highstock/es-modules/indicators/accumulation-distribution.src.js +129 -0
  52. data/vendor/assets/javascripts/highstock/es-modules/indicators/ao.src.js +206 -0
  53. data/vendor/assets/javascripts/highstock/es-modules/indicators/apo.src.js +148 -0
  54. data/vendor/assets/javascripts/highstock/es-modules/indicators/aroon-oscillator.src.js +128 -0
  55. data/vendor/assets/javascripts/highstock/es-modules/indicators/aroon.src.js +173 -0
  56. data/vendor/assets/javascripts/highstock/es-modules/indicators/atr.src.js +151 -0
  57. data/vendor/assets/javascripts/highstock/es-modules/indicators/bollinger-bands.src.js +209 -0
  58. data/vendor/assets/javascripts/highstock/es-modules/indicators/cci.src.js +131 -0
  59. data/vendor/assets/javascripts/highstock/es-modules/indicators/chaikin.src.js +167 -0
  60. data/vendor/assets/javascripts/highstock/es-modules/indicators/cmf.src.js +246 -0
  61. data/vendor/assets/javascripts/highstock/es-modules/indicators/dema.src.js +191 -0
  62. data/vendor/assets/javascripts/highstock/es-modules/indicators/dpo.src.js +138 -0
  63. data/vendor/assets/javascripts/highstock/es-modules/indicators/ema.src.js +166 -0
  64. data/vendor/assets/javascripts/highstock/es-modules/indicators/ichimoku-kinko-hyo.src.js +850 -0
  65. data/vendor/assets/javascripts/highstock/es-modules/indicators/indicators.src.js +425 -0
  66. data/vendor/assets/javascripts/highstock/es-modules/indicators/keltner-channels.src.js +193 -0
  67. data/vendor/assets/javascripts/highstock/es-modules/indicators/macd.src.js +417 -0
  68. data/vendor/assets/javascripts/highstock/es-modules/indicators/mfi.src.js +198 -0
  69. data/vendor/assets/javascripts/highstock/es-modules/indicators/momentum.src.js +119 -0
  70. data/vendor/assets/javascripts/highstock/es-modules/indicators/natr.src.js +74 -0
  71. data/vendor/assets/javascripts/highstock/es-modules/indicators/pivot-points.src.js +360 -0
  72. data/vendor/assets/javascripts/highstock/es-modules/indicators/ppo.src.js +152 -0
  73. data/vendor/assets/javascripts/highstock/es-modules/indicators/price-channel.src.js +149 -0
  74. data/vendor/assets/javascripts/highstock/es-modules/indicators/price-envelopes.src.js +251 -0
  75. data/vendor/assets/javascripts/highstock/es-modules/indicators/psar.src.js +307 -0
  76. data/vendor/assets/javascripts/highstock/es-modules/indicators/regressions.src.js +427 -0
  77. data/vendor/assets/javascripts/highstock/es-modules/indicators/roc.src.js +149 -0
  78. data/vendor/assets/javascripts/highstock/es-modules/indicators/rsi.src.js +163 -0
  79. data/vendor/assets/javascripts/highstock/es-modules/indicators/stochastic.src.js +193 -0
  80. data/vendor/assets/javascripts/highstock/es-modules/indicators/supertrend.src.js +544 -0
  81. data/vendor/assets/javascripts/highstock/es-modules/indicators/tema.src.js +247 -0
  82. data/vendor/assets/javascripts/highstock/es-modules/indicators/trix.src.js +96 -0
  83. data/vendor/assets/javascripts/highstock/es-modules/indicators/volume-by-price.src.js +671 -0
  84. data/vendor/assets/javascripts/highstock/es-modules/indicators/vwap.src.js +189 -0
  85. data/vendor/assets/javascripts/highstock/es-modules/indicators/williams-r.src.js +128 -0
  86. data/vendor/assets/javascripts/highstock/es-modules/indicators/wma.src.js +146 -0
  87. data/vendor/assets/javascripts/highstock/es-modules/indicators/zigzag.src.js +221 -0
  88. data/vendor/assets/javascripts/highstock/es-modules/masters/highcharts-3d.src.js +17 -0
  89. data/vendor/assets/javascripts/highstock/es-modules/masters/highcharts-more.src.js +22 -0
  90. data/vendor/assets/javascripts/highstock/es-modules/masters/highstock.src.js +11 -0
  91. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/acceleration-bands.src.js +11 -0
  92. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/accumulation-distribution.src.js +11 -0
  93. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/ao.src.js +11 -0
  94. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/apo.src.js +11 -0
  95. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/aroon-oscillator.src.js +11 -0
  96. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/aroon.src.js +11 -0
  97. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/atr.src.js +11 -0
  98. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/bollinger-bands.src.js +11 -0
  99. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/cci.src.js +11 -0
  100. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/chaikin.src.js +11 -0
  101. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/cmf.src.js +10 -0
  102. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/dema.src.js +11 -0
  103. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/dpo.src.js +11 -0
  104. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/ema.src.js +11 -0
  105. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +11 -0
  106. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/indicators-all.src.js +49 -0
  107. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/indicators.src.js +11 -0
  108. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/keltner-channels.src.js +11 -0
  109. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/macd.src.js +11 -0
  110. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/mfi.src.js +11 -0
  111. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/momentum.src.js +11 -0
  112. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/natr.src.js +11 -0
  113. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/pivot-points.src.js +11 -0
  114. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/ppo.src.js +11 -0
  115. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/price-channel.src.js +11 -0
  116. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/price-envelopes.src.js +11 -0
  117. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/psar.src.js +11 -0
  118. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/regressions.src.js +11 -0
  119. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/roc.src.js +11 -0
  120. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/rsi.src.js +11 -0
  121. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/stochastic.src.js +11 -0
  122. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/supertrend.src.js +11 -0
  123. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/tema.src.js +11 -0
  124. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/trix.src.js +11 -0
  125. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/volume-by-price.src.js +11 -0
  126. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/vwap.src.js +11 -0
  127. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/williams-r.src.js +11 -0
  128. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/wma.src.js +11 -0
  129. data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/zigzag.src.js +11 -0
  130. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/accessibility.src.js +13 -0
  131. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/annotations-advanced.src.js +20 -0
  132. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/annotations.src.js +12 -0
  133. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/arrow-symbols.src.js +10 -0
  134. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/boost-canvas.src.js +11 -0
  135. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/boost.src.js +11 -0
  136. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/bullet.src.js +11 -0
  137. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/current-date-indicator.src.js +10 -0
  138. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/cylinder.src.js +10 -0
  139. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/data.src.js +10 -0
  140. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/datagrouping.src.js +12 -0
  141. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/debugger.src.js +13 -0
  142. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/dependency-wheel.src.js +10 -0
  143. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/drag-panes.src.js +11 -0
  144. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/draggable-points.src.js +9 -0
  145. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/drilldown.src.js +10 -0
  146. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/export-data.src.js +10 -0
  147. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/exporting.src.js +10 -0
  148. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/full-screen.src.js +11 -0
  149. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/funnel.src.js +10 -0
  150. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/grid-axis.src.js +10 -0
  151. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/heatmap.src.js +11 -0
  152. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/histogram-bellcurve.src.js +11 -0
  153. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/item-series.src.js +11 -0
  154. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/networkgraph.src.js +10 -0
  155. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/no-data-to-display.src.js +11 -0
  156. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/offline-exporting.src.js +10 -0
  157. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/oldie-polyfills.src.js +11 -0
  158. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/oldie.src.js +11 -0
  159. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/overlapping-datalabels.src.js +9 -0
  160. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/parallel-coordinates.src.js +11 -0
  161. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/pareto.src.js +11 -0
  162. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/pathfinder.src.js +10 -0
  163. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/pattern-fill.src.js +11 -0
  164. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/price-indicator.src.js +11 -0
  165. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/sankey.src.js +10 -0
  166. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/series-label.src.js +9 -0
  167. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/solid-gauge.src.js +10 -0
  168. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/sonification.src.js +12 -0
  169. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/static-scale.src.js +10 -0
  170. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/stock-tools.src.js +12 -0
  171. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/stock.src.js +19 -0
  172. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/streamgraph.src.js +10 -0
  173. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/sunburst.src.js +10 -0
  174. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/tilemap.src.js +10 -0
  175. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/timeline.src.js +11 -0
  176. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/treegrid.src.js +10 -0
  177. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/treemap.src.js +10 -0
  178. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/variable-pie.src.js +11 -0
  179. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/variwide.src.js +10 -0
  180. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/vector.src.js +10 -0
  181. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/venn.src.js +10 -0
  182. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/windbarb.src.js +10 -0
  183. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/wordcloud.src.js +10 -0
  184. data/vendor/assets/javascripts/highstock/es-modules/masters/modules/xrange.src.js +10 -0
  185. data/vendor/assets/javascripts/highstock/es-modules/masters/themes/avocado.js +9 -0
  186. data/vendor/assets/javascripts/highstock/es-modules/masters/themes/avocado.src.js +9 -0
  187. data/vendor/assets/javascripts/highstock/es-modules/masters/themes/dark-blue.src.js +9 -0
  188. data/vendor/assets/javascripts/highstock/es-modules/masters/themes/dark-green.src.js +9 -0
  189. data/vendor/assets/javascripts/highstock/es-modules/masters/themes/dark-unica.src.js +9 -0
  190. data/vendor/assets/javascripts/highstock/es-modules/masters/themes/gray.src.js +9 -0
  191. data/vendor/assets/javascripts/highstock/es-modules/masters/themes/grid-light.src.js +9 -0
  192. data/vendor/assets/javascripts/highstock/es-modules/masters/themes/grid.src.js +9 -0
  193. data/vendor/assets/javascripts/highstock/es-modules/masters/themes/sand-signika.src.js +9 -0
  194. data/vendor/assets/javascripts/highstock/es-modules/masters/themes/skies.src.js +9 -0
  195. data/vendor/assets/javascripts/highstock/es-modules/masters/themes/sunset.js +9 -0
  196. data/vendor/assets/javascripts/highstock/es-modules/masters/themes/sunset.src.js +9 -0
  197. data/vendor/assets/javascripts/highstock/es-modules/mixins/ajax.js +123 -0
  198. data/vendor/assets/javascripts/highstock/es-modules/mixins/centered-series.js +116 -0
  199. data/vendor/assets/javascripts/highstock/es-modules/mixins/derived-series.js +150 -0
  200. data/vendor/assets/javascripts/highstock/es-modules/mixins/download-url.js +103 -0
  201. data/vendor/assets/javascripts/highstock/es-modules/mixins/draw-point.js +51 -0
  202. data/vendor/assets/javascripts/highstock/es-modules/mixins/geometry-circles.js +300 -0
  203. data/vendor/assets/javascripts/highstock/es-modules/mixins/geometry.js +50 -0
  204. data/vendor/assets/javascripts/highstock/es-modules/mixins/indicator-required.js +49 -0
  205. data/vendor/assets/javascripts/highstock/es-modules/mixins/multipe-lines.js +223 -0
  206. data/vendor/assets/javascripts/highstock/es-modules/mixins/navigation.js +59 -0
  207. data/vendor/assets/javascripts/highstock/es-modules/mixins/nodes.js +76 -0
  208. data/vendor/assets/javascripts/highstock/es-modules/mixins/on-series.js +167 -0
  209. data/vendor/assets/javascripts/highstock/es-modules/mixins/polygon.js +293 -0
  210. data/vendor/assets/javascripts/highstock/es-modules/mixins/reduce-array.js +53 -0
  211. data/vendor/assets/javascripts/highstock/es-modules/mixins/tree-series.js +256 -0
  212. data/vendor/assets/javascripts/highstock/es-modules/modules/a11y-i18n.src.js +524 -0
  213. data/vendor/assets/javascripts/highstock/es-modules/modules/annotations-legacy.src.js +1951 -0
  214. data/vendor/assets/javascripts/highstock/es-modules/modules/bellcurve.src.js +173 -0
  215. data/vendor/assets/javascripts/highstock/es-modules/modules/boost-canvas.src.js +732 -0
  216. data/vendor/assets/javascripts/highstock/es-modules/modules/boost.src.js +3730 -0
  217. data/vendor/assets/javascripts/highstock/es-modules/modules/bullet.src.js +361 -0
  218. data/vendor/assets/javascripts/highstock/es-modules/modules/cylinder.src.js +389 -0
  219. data/vendor/assets/javascripts/highstock/es-modules/modules/data.src.js +2417 -0
  220. data/vendor/assets/javascripts/highstock/es-modules/modules/debugger.src.js +109 -0
  221. data/vendor/assets/javascripts/highstock/es-modules/modules/dependency-wheel.src.js +199 -0
  222. data/vendor/assets/javascripts/highstock/es-modules/modules/drag-panes.src.js +624 -0
  223. data/vendor/assets/javascripts/highstock/es-modules/modules/draggable-points.src.js +2625 -0
  224. data/vendor/assets/javascripts/highstock/es-modules/modules/drilldown.src.js +1300 -0
  225. data/vendor/assets/javascripts/highstock/es-modules/modules/export-data.src.js +983 -0
  226. data/vendor/assets/javascripts/highstock/es-modules/modules/exporting.src.js +2149 -0
  227. data/vendor/assets/javascripts/highstock/es-modules/modules/full-screen.src.js +40 -0
  228. data/vendor/assets/javascripts/highstock/es-modules/modules/funnel.src.js +552 -0
  229. data/vendor/assets/javascripts/highstock/es-modules/modules/histogram.src.js +229 -0
  230. data/vendor/assets/javascripts/highstock/es-modules/modules/item-series.src.js +150 -0
  231. data/vendor/assets/javascripts/highstock/es-modules/modules/keyboard-navigation.src.js +1606 -0
  232. data/vendor/assets/javascripts/highstock/es-modules/modules/networkgraph/QuadTree.js +175 -0
  233. data/vendor/assets/javascripts/highstock/es-modules/modules/networkgraph/layouts.js +506 -0
  234. data/vendor/assets/javascripts/highstock/es-modules/modules/networkgraph/networkgraph.src.js +740 -0
  235. data/vendor/assets/javascripts/highstock/es-modules/modules/no-data-to-display.src.js +260 -0
  236. data/vendor/assets/javascripts/highstock/es-modules/modules/offline-exporting.src.js +710 -0
  237. data/vendor/assets/javascripts/highstock/es-modules/modules/oldie-polyfills.src.js +121 -0
  238. data/vendor/assets/javascripts/highstock/es-modules/modules/oldie.src.js +1556 -0
  239. data/vendor/assets/javascripts/highstock/es-modules/modules/overlapping-datalabels.src.js +250 -0
  240. data/vendor/assets/javascripts/highstock/es-modules/modules/parallel-coordinates.src.js +492 -0
  241. data/vendor/assets/javascripts/highstock/es-modules/modules/pareto.src.js +152 -0
  242. data/vendor/assets/javascripts/highstock/es-modules/modules/pattern-fill.src.js +607 -0
  243. data/vendor/assets/javascripts/highstock/es-modules/modules/price-indicator.src.js +149 -0
  244. data/vendor/assets/javascripts/highstock/es-modules/modules/sankey.src.js +809 -0
  245. data/vendor/assets/javascripts/highstock/es-modules/modules/screen-reader.src.js +954 -0
  246. data/vendor/assets/javascripts/highstock/es-modules/modules/series-label.src.js +1042 -0
  247. data/vendor/assets/javascripts/highstock/es-modules/modules/solid-gauge.src.js +486 -0
  248. data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/Earcon.js +184 -0
  249. data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/Instrument.js +582 -0
  250. data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/Timeline.js +702 -0
  251. data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/chartSonify.js +1026 -0
  252. data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/instrumentDefinitions.js +37 -0
  253. data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/musicalFrequencies.js +113 -0
  254. data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/pointSonify.js +385 -0
  255. data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/sonification.js +107 -0
  256. data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/utilities.js +178 -0
  257. data/vendor/assets/javascripts/highstock/es-modules/modules/static-scale.src.js +88 -0
  258. data/vendor/assets/javascripts/highstock/es-modules/modules/stock-tools-bindings.js +1950 -0
  259. data/vendor/assets/javascripts/highstock/es-modules/modules/stock-tools-gui.js +1458 -0
  260. data/vendor/assets/javascripts/highstock/es-modules/modules/streamgraph.src.js +132 -0
  261. data/vendor/assets/javascripts/highstock/es-modules/modules/sunburst.src.js +1041 -0
  262. data/vendor/assets/javascripts/highstock/es-modules/modules/tilemap.src.js +769 -0
  263. data/vendor/assets/javascripts/highstock/es-modules/modules/timeline.src.js +750 -0
  264. data/vendor/assets/javascripts/highstock/es-modules/modules/treemap.src.js +1803 -0
  265. data/vendor/assets/javascripts/highstock/es-modules/modules/variable-pie.src.js +459 -0
  266. data/vendor/assets/javascripts/highstock/es-modules/modules/variwide.src.js +350 -0
  267. data/vendor/assets/javascripts/highstock/es-modules/modules/vector.src.js +354 -0
  268. data/vendor/assets/javascripts/highstock/es-modules/modules/venn.src.js +1192 -0
  269. data/vendor/assets/javascripts/highstock/es-modules/modules/windbarb.src.js +380 -0
  270. data/vendor/assets/javascripts/highstock/es-modules/modules/wordcloud.src.js +1103 -0
  271. data/vendor/assets/javascripts/highstock/es-modules/modules/xrange.src.js +761 -0
  272. data/vendor/assets/javascripts/highstock/es-modules/parts-3d/Axis.js +669 -0
  273. data/vendor/assets/javascripts/highstock/es-modules/parts-3d/Chart.js +1753 -0
  274. data/vendor/assets/javascripts/highstock/es-modules/parts-3d/Column.js +437 -0
  275. data/vendor/assets/javascripts/highstock/es-modules/parts-3d/Math.js +206 -0
  276. data/vendor/assets/javascripts/highstock/es-modules/parts-3d/Pie.js +207 -0
  277. data/vendor/assets/javascripts/highstock/es-modules/parts-3d/SVGRenderer.js +1002 -0
  278. data/vendor/assets/javascripts/highstock/es-modules/parts-3d/Scatter.js +154 -0
  279. data/vendor/assets/javascripts/highstock/es-modules/parts-3d/Series.js +73 -0
  280. data/vendor/assets/javascripts/highstock/es-modules/parts-3d/VMLRenderer.js +62 -0
  281. data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/ArrowSymbols.js +198 -0
  282. data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/CurrentDateIndicator.js +100 -0
  283. data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/GanttChart.js +140 -0
  284. data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/GanttSeries.js +415 -0
  285. data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/GridAxis.js +961 -0
  286. data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/Pathfinder.js +1298 -0
  287. data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/PathfinderAlgorithms.js +816 -0
  288. data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/Tree.js +158 -0
  289. data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/TreeGrid.js +1003 -0
  290. data/vendor/assets/javascripts/highstock/es-modules/parts-map/ColorAxis.js +1103 -0
  291. data/vendor/assets/javascripts/highstock/es-modules/parts-map/ColorSeriesMixin.js +138 -0
  292. data/vendor/assets/javascripts/highstock/es-modules/parts-map/GeoJSON.js +435 -0
  293. data/vendor/assets/javascripts/highstock/es-modules/parts-map/HeatmapSeries.js +474 -0
  294. data/vendor/assets/javascripts/highstock/es-modules/parts-map/Map.js +477 -0
  295. data/vendor/assets/javascripts/highstock/es-modules/parts-map/MapAxis.js +124 -0
  296. data/vendor/assets/javascripts/highstock/es-modules/parts-map/MapBubbleSeries.js +274 -0
  297. data/vendor/assets/javascripts/highstock/es-modules/parts-map/MapLineSeries.js +143 -0
  298. data/vendor/assets/javascripts/highstock/es-modules/parts-map/MapNavigation.js +357 -0
  299. data/vendor/assets/javascripts/highstock/es-modules/parts-map/MapPointSeries.js +187 -0
  300. data/vendor/assets/javascripts/highstock/es-modules/parts-map/MapPointer.js +132 -0
  301. data/vendor/assets/javascripts/highstock/es-modules/parts-map/MapSeries.js +1294 -0
  302. data/vendor/assets/javascripts/highstock/es-modules/parts-more/AreaRangeSeries.js +725 -0
  303. data/vendor/assets/javascripts/highstock/es-modules/parts-more/AreaSplineRangeSeries.js +98 -0
  304. data/vendor/assets/javascripts/highstock/es-modules/parts-more/BoxPlotSeries.js +617 -0
  305. data/vendor/assets/javascripts/highstock/es-modules/parts-more/BubbleLegend.js +1167 -0
  306. data/vendor/assets/javascripts/highstock/es-modules/parts-more/BubbleSeries.js +661 -0
  307. data/vendor/assets/javascripts/highstock/es-modules/parts-more/ColumnPyramidSeries.js +288 -0
  308. data/vendor/assets/javascripts/highstock/es-modules/parts-more/ColumnRangeSeries.js +278 -0
  309. data/vendor/assets/javascripts/highstock/es-modules/parts-more/ErrorBarSeries.js +172 -0
  310. data/vendor/assets/javascripts/highstock/es-modules/parts-more/GaugeSeries.js +618 -0
  311. data/vendor/assets/javascripts/highstock/es-modules/parts-more/PackedBubbleSeries.js +567 -0
  312. data/vendor/assets/javascripts/highstock/es-modules/parts-more/Pane.js +399 -0
  313. data/vendor/assets/javascripts/highstock/es-modules/parts-more/Polar.js +634 -0
  314. data/vendor/assets/javascripts/highstock/es-modules/parts-more/PolygonSeries.js +151 -0
  315. data/vendor/assets/javascripts/highstock/es-modules/parts-more/RadialAxis.js +685 -0
  316. data/vendor/assets/javascripts/highstock/es-modules/parts-more/WaterfallSeries.js +765 -0
  317. data/vendor/assets/javascripts/highstock/es-modules/parts.js +684 -0
  318. data/vendor/assets/javascripts/highstock/es-modules/parts/AreaSeries.js +578 -0
  319. data/vendor/assets/javascripts/highstock/es-modules/parts/AreaSplineSeries.js +122 -0
  320. data/vendor/assets/javascripts/highstock/es-modules/parts/Axis.js +6453 -0
  321. data/vendor/assets/javascripts/highstock/es-modules/parts/BarSeries.js +153 -0
  322. data/vendor/assets/javascripts/highstock/es-modules/parts/CandlestickSeries.js +358 -0
  323. data/vendor/assets/javascripts/highstock/es-modules/parts/Chart.js +2307 -0
  324. data/vendor/assets/javascripts/highstock/es-modules/parts/Color.js +301 -0
  325. data/vendor/assets/javascripts/highstock/es-modules/parts/ColumnSeries.js +1125 -0
  326. data/vendor/assets/javascripts/highstock/es-modules/parts/DataGrouping.js +1115 -0
  327. data/vendor/assets/javascripts/highstock/es-modules/parts/DataLabels.js +1431 -0
  328. data/vendor/assets/javascripts/highstock/es-modules/parts/DateTimeAxis.js +134 -0
  329. data/vendor/assets/javascripts/highstock/es-modules/parts/Dynamics.js +1301 -0
  330. data/vendor/assets/javascripts/highstock/es-modules/parts/FlagsSeries.js +739 -0
  331. data/vendor/assets/javascripts/highstock/es-modules/parts/Globals.js +75 -0
  332. data/vendor/assets/javascripts/highstock/es-modules/parts/Html.js +539 -0
  333. data/vendor/assets/javascripts/highstock/es-modules/parts/Interaction.js +1299 -0
  334. data/vendor/assets/javascripts/highstock/es-modules/parts/Legend.js +1411 -0
  335. data/vendor/assets/javascripts/highstock/es-modules/parts/LogarithmicAxis.js +168 -0
  336. data/vendor/assets/javascripts/highstock/es-modules/parts/MSPointer.js +176 -0
  337. data/vendor/assets/javascripts/highstock/es-modules/parts/Navigator.js +2486 -0
  338. data/vendor/assets/javascripts/highstock/es-modules/parts/OHLCSeries.js +412 -0
  339. data/vendor/assets/javascripts/highstock/es-modules/parts/Options.js +3732 -0
  340. data/vendor/assets/javascripts/highstock/es-modules/parts/OrdinalAxis.js +962 -0
  341. data/vendor/assets/javascripts/highstock/es-modules/parts/PieSeries.js +1328 -0
  342. data/vendor/assets/javascripts/highstock/es-modules/parts/PlotBandSeries.experimental.js +74 -0
  343. data/vendor/assets/javascripts/highstock/es-modules/parts/PlotLineOrBand.js +1061 -0
  344. data/vendor/assets/javascripts/highstock/es-modules/parts/Point.js +681 -0
  345. data/vendor/assets/javascripts/highstock/es-modules/parts/Pointer.js +1332 -0
  346. data/vendor/assets/javascripts/highstock/es-modules/parts/RangeSelector.js +2063 -0
  347. data/vendor/assets/javascripts/highstock/es-modules/parts/Responsive.js +295 -0
  348. data/vendor/assets/javascripts/highstock/es-modules/parts/ScatterSeries.js +278 -0
  349. data/vendor/assets/javascripts/highstock/es-modules/parts/ScrollablePlotArea.js +266 -0
  350. data/vendor/assets/javascripts/highstock/es-modules/parts/Scrollbar.js +1134 -0
  351. data/vendor/assets/javascripts/highstock/es-modules/parts/Series.js +5864 -0
  352. data/vendor/assets/javascripts/highstock/es-modules/parts/SplineSeries.js +267 -0
  353. data/vendor/assets/javascripts/highstock/es-modules/parts/Stacking.js +604 -0
  354. data/vendor/assets/javascripts/highstock/es-modules/parts/StockChart.js +951 -0
  355. data/vendor/assets/javascripts/highstock/es-modules/parts/SvgRenderer.js +5109 -0
  356. data/vendor/assets/javascripts/highstock/es-modules/parts/Tick.js +746 -0
  357. data/vendor/assets/javascripts/highstock/es-modules/parts/Time.js +881 -0
  358. data/vendor/assets/javascripts/highstock/es-modules/parts/Tooltip.js +1318 -0
  359. data/vendor/assets/javascripts/highstock/es-modules/parts/TouchPointer.js +404 -0
  360. data/vendor/assets/javascripts/highstock/es-modules/parts/Utilities.js +2751 -0
  361. data/vendor/assets/javascripts/highstock/es-modules/themes/avocado.js +37 -0
  362. data/vendor/assets/javascripts/highstock/es-modules/themes/dark-blue.js +259 -0
  363. data/vendor/assets/javascripts/highstock/es-modules/themes/dark-green.js +261 -0
  364. data/vendor/assets/javascripts/highstock/es-modules/themes/dark-unica.js +220 -0
  365. data/vendor/assets/javascripts/highstock/es-modules/themes/gray.js +267 -0
  366. data/vendor/assets/javascripts/highstock/es-modules/themes/grid-light.js +81 -0
  367. data/vendor/assets/javascripts/highstock/es-modules/themes/grid.js +110 -0
  368. data/vendor/assets/javascripts/highstock/es-modules/themes/sand-signika.js +111 -0
  369. data/vendor/assets/javascripts/highstock/es-modules/themes/skies.js +100 -0
  370. data/vendor/assets/javascripts/highstock/es-modules/themes/sunset.js +36 -0
  371. data/vendor/assets/javascripts/highstock/highcharts-3d.js +85 -0
  372. data/vendor/assets/javascripts/highstock/highcharts-3d.js.map +1 -0
  373. data/vendor/assets/javascripts/highstock/highcharts-more.js +101 -0
  374. data/vendor/assets/javascripts/highstock/highcharts-more.js.map +1 -0
  375. data/vendor/assets/javascripts/highstock/highstock.js +583 -0
  376. data/vendor/assets/javascripts/highstock/highstock.js.map +1 -0
  377. data/vendor/assets/javascripts/highstock/indicators/acceleration-bands.js +16 -0
  378. data/vendor/assets/javascripts/highstock/indicators/acceleration-bands.js.map +1 -0
  379. data/vendor/assets/javascripts/highstock/indicators/acceleration-bands.src.js +448 -0
  380. data/vendor/assets/javascripts/highstock/indicators/accumulation-distribution.js +12 -0
  381. data/vendor/assets/javascripts/highstock/indicators/accumulation-distribution.js.map +1 -0
  382. data/vendor/assets/javascripts/highstock/indicators/accumulation-distribution.src.js +156 -0
  383. data/vendor/assets/javascripts/highstock/indicators/ao.js +13 -0
  384. data/vendor/assets/javascripts/highstock/indicators/ao.js.map +1 -0
  385. data/vendor/assets/javascripts/highstock/indicators/ao.src.js +233 -0
  386. data/vendor/assets/javascripts/highstock/indicators/apo.js +13 -0
  387. data/vendor/assets/javascripts/highstock/indicators/apo.js.map +1 -0
  388. data/vendor/assets/javascripts/highstock/indicators/apo.src.js +223 -0
  389. data/vendor/assets/javascripts/highstock/indicators/aroon-oscillator.js +15 -0
  390. data/vendor/assets/javascripts/highstock/indicators/aroon-oscillator.js.map +1 -0
  391. data/vendor/assets/javascripts/highstock/indicators/aroon-oscillator.src.js +426 -0
  392. data/vendor/assets/javascripts/highstock/indicators/aroon.js +16 -0
  393. data/vendor/assets/javascripts/highstock/indicators/aroon.js.map +1 -0
  394. data/vendor/assets/javascripts/highstock/indicators/aroon.src.js +423 -0
  395. data/vendor/assets/javascripts/highstock/indicators/atr.js +12 -0
  396. data/vendor/assets/javascripts/highstock/indicators/atr.js.map +1 -0
  397. data/vendor/assets/javascripts/highstock/indicators/atr.src.js +178 -0
  398. data/vendor/assets/javascripts/highstock/indicators/bollinger-bands.js +16 -0
  399. data/vendor/assets/javascripts/highstock/indicators/bollinger-bands.js.map +1 -0
  400. data/vendor/assets/javascripts/highstock/indicators/bollinger-bands.src.js +458 -0
  401. data/vendor/assets/javascripts/highstock/indicators/cci.js +12 -0
  402. data/vendor/assets/javascripts/highstock/indicators/cci.js.map +1 -0
  403. data/vendor/assets/javascripts/highstock/indicators/cci.src.js +158 -0
  404. data/vendor/assets/javascripts/highstock/indicators/chaikin.js +15 -0
  405. data/vendor/assets/javascripts/highstock/indicators/chaikin.js.map +1 -0
  406. data/vendor/assets/javascripts/highstock/indicators/chaikin.src.js +370 -0
  407. data/vendor/assets/javascripts/highstock/indicators/cmf.js +12 -0
  408. data/vendor/assets/javascripts/highstock/indicators/cmf.js.map +1 -0
  409. data/vendor/assets/javascripts/highstock/indicators/cmf.src.js +273 -0
  410. data/vendor/assets/javascripts/highstock/indicators/dema.js +13 -0
  411. data/vendor/assets/javascripts/highstock/indicators/dema.js.map +1 -0
  412. data/vendor/assets/javascripts/highstock/indicators/dema.src.js +266 -0
  413. data/vendor/assets/javascripts/highstock/indicators/dpo.js +12 -0
  414. data/vendor/assets/javascripts/highstock/indicators/dpo.js.map +1 -0
  415. data/vendor/assets/javascripts/highstock/indicators/dpo.src.js +166 -0
  416. data/vendor/assets/javascripts/highstock/indicators/ema.js +12 -0
  417. data/vendor/assets/javascripts/highstock/indicators/ema.js.map +1 -0
  418. data/vendor/assets/javascripts/highstock/indicators/ema.src.js +193 -0
  419. data/vendor/assets/javascripts/highstock/indicators/ichimoku-kinko-hyo.js +22 -0
  420. data/vendor/assets/javascripts/highstock/indicators/ichimoku-kinko-hyo.js.map +1 -0
  421. data/vendor/assets/javascripts/highstock/indicators/ichimoku-kinko-hyo.src.js +877 -0
  422. data/vendor/assets/javascripts/highstock/indicators/indicators-all.js +117 -0
  423. data/vendor/assets/javascripts/highstock/indicators/indicators-all.js.map +1 -0
  424. data/vendor/assets/javascripts/highstock/indicators/indicators-all.src.js +9389 -0
  425. data/vendor/assets/javascripts/highstock/indicators/indicators.js +17 -0
  426. data/vendor/assets/javascripts/highstock/indicators/indicators.js.map +1 -0
  427. data/vendor/assets/javascripts/highstock/indicators/indicators.src.js +500 -0
  428. data/vendor/assets/javascripts/highstock/indicators/keltner-channels.js +16 -0
  429. data/vendor/assets/javascripts/highstock/indicators/keltner-channels.js.map +1 -0
  430. data/vendor/assets/javascripts/highstock/indicators/keltner-channels.src.js +442 -0
  431. data/vendor/assets/javascripts/highstock/indicators/macd.js +18 -0
  432. data/vendor/assets/javascripts/highstock/indicators/macd.js.map +1 -0
  433. data/vendor/assets/javascripts/highstock/indicators/macd.src.js +444 -0
  434. data/vendor/assets/javascripts/highstock/indicators/mfi.js +13 -0
  435. data/vendor/assets/javascripts/highstock/indicators/mfi.js.map +1 -0
  436. data/vendor/assets/javascripts/highstock/indicators/mfi.src.js +225 -0
  437. data/vendor/assets/javascripts/highstock/indicators/momentum.js +12 -0
  438. data/vendor/assets/javascripts/highstock/indicators/momentum.js.map +1 -0
  439. data/vendor/assets/javascripts/highstock/indicators/momentum.src.js +146 -0
  440. data/vendor/assets/javascripts/highstock/indicators/natr.js +12 -0
  441. data/vendor/assets/javascripts/highstock/indicators/natr.js.map +1 -0
  442. data/vendor/assets/javascripts/highstock/indicators/natr.src.js +101 -0
  443. data/vendor/assets/javascripts/highstock/indicators/pivot-points.js +16 -0
  444. data/vendor/assets/javascripts/highstock/indicators/pivot-points.js.map +1 -0
  445. data/vendor/assets/javascripts/highstock/indicators/pivot-points.src.js +387 -0
  446. data/vendor/assets/javascripts/highstock/indicators/ppo.js +13 -0
  447. data/vendor/assets/javascripts/highstock/indicators/ppo.js.map +1 -0
  448. data/vendor/assets/javascripts/highstock/indicators/ppo.src.js +227 -0
  449. data/vendor/assets/javascripts/highstock/indicators/price-channel.js +16 -0
  450. data/vendor/assets/javascripts/highstock/indicators/price-channel.js.map +1 -0
  451. data/vendor/assets/javascripts/highstock/indicators/price-channel.src.js +450 -0
  452. data/vendor/assets/javascripts/highstock/indicators/price-envelopes.js +15 -0
  453. data/vendor/assets/javascripts/highstock/indicators/price-envelopes.js.map +1 -0
  454. data/vendor/assets/javascripts/highstock/indicators/price-envelopes.src.js +278 -0
  455. data/vendor/assets/javascripts/highstock/indicators/psar.js +13 -0
  456. data/vendor/assets/javascripts/highstock/indicators/psar.js.map +1 -0
  457. data/vendor/assets/javascripts/highstock/indicators/psar.src.js +334 -0
  458. data/vendor/assets/javascripts/highstock/indicators/regressions.js +14 -0
  459. data/vendor/assets/javascripts/highstock/indicators/regressions.js.map +1 -0
  460. data/vendor/assets/javascripts/highstock/indicators/regressions.src.js +454 -0
  461. data/vendor/assets/javascripts/highstock/indicators/roc.js +12 -0
  462. data/vendor/assets/javascripts/highstock/indicators/roc.js.map +1 -0
  463. data/vendor/assets/javascripts/highstock/indicators/roc.src.js +176 -0
  464. data/vendor/assets/javascripts/highstock/indicators/rsi.js +12 -0
  465. data/vendor/assets/javascripts/highstock/indicators/rsi.js.map +1 -0
  466. data/vendor/assets/javascripts/highstock/indicators/rsi.src.js +190 -0
  467. data/vendor/assets/javascripts/highstock/indicators/stochastic.js +17 -0
  468. data/vendor/assets/javascripts/highstock/indicators/stochastic.js.map +1 -0
  469. data/vendor/assets/javascripts/highstock/indicators/stochastic.src.js +494 -0
  470. data/vendor/assets/javascripts/highstock/indicators/supertrend.js +17 -0
  471. data/vendor/assets/javascripts/highstock/indicators/supertrend.js.map +1 -0
  472. data/vendor/assets/javascripts/highstock/indicators/supertrend.src.js +571 -0
  473. data/vendor/assets/javascripts/highstock/indicators/tema.js +14 -0
  474. data/vendor/assets/javascripts/highstock/indicators/tema.js.map +1 -0
  475. data/vendor/assets/javascripts/highstock/indicators/tema.src.js +322 -0
  476. data/vendor/assets/javascripts/highstock/indicators/trix.js +12 -0
  477. data/vendor/assets/javascripts/highstock/indicators/trix.js.map +1 -0
  478. data/vendor/assets/javascripts/highstock/indicators/trix.src.js +171 -0
  479. data/vendor/assets/javascripts/highstock/indicators/volume-by-price.js +21 -0
  480. data/vendor/assets/javascripts/highstock/indicators/volume-by-price.js.map +1 -0
  481. data/vendor/assets/javascripts/highstock/indicators/volume-by-price.src.js +698 -0
  482. data/vendor/assets/javascripts/highstock/indicators/vwap.js +12 -0
  483. data/vendor/assets/javascripts/highstock/indicators/vwap.js.map +1 -0
  484. data/vendor/assets/javascripts/highstock/indicators/vwap.src.js +216 -0
  485. data/vendor/assets/javascripts/highstock/indicators/williams-r.js +13 -0
  486. data/vendor/assets/javascripts/highstock/indicators/williams-r.js.map +1 -0
  487. data/vendor/assets/javascripts/highstock/indicators/williams-r.src.js +207 -0
  488. data/vendor/assets/javascripts/highstock/indicators/wma.js +12 -0
  489. data/vendor/assets/javascripts/highstock/indicators/wma.js.map +1 -0
  490. data/vendor/assets/javascripts/highstock/indicators/wma.src.js +173 -0
  491. data/vendor/assets/javascripts/highstock/indicators/zigzag.js +13 -0
  492. data/vendor/assets/javascripts/highstock/indicators/zigzag.js.map +1 -0
  493. data/vendor/assets/javascripts/highstock/indicators/zigzag.src.js +248 -0
  494. data/vendor/assets/javascripts/highstock/lib/canvg.js +130 -0
  495. data/vendor/assets/javascripts/highstock/lib/canvg.src.js +3073 -0
  496. data/vendor/assets/javascripts/highstock/lib/jspdf.js +283 -0
  497. data/vendor/assets/javascripts/highstock/lib/jspdf.src.js +21627 -0
  498. data/vendor/assets/javascripts/highstock/lib/rgbcolor.js +17 -0
  499. data/vendor/assets/javascripts/highstock/lib/rgbcolor.src.js +299 -0
  500. data/vendor/assets/javascripts/highstock/lib/svg2pdf.js +38 -0
  501. data/vendor/assets/javascripts/highstock/lib/svg2pdf.src.js +4390 -0
  502. data/vendor/assets/javascripts/highstock/modules/accessibility.js +73 -0
  503. data/vendor/assets/javascripts/highstock/modules/accessibility.js.map +1 -0
  504. data/vendor/assets/javascripts/highstock/modules/accessibility.src.js +3103 -0
  505. data/vendor/assets/javascripts/highstock/modules/annotations-advanced.js +132 -0
  506. data/vendor/assets/javascripts/highstock/modules/annotations-advanced.js.map +1 -0
  507. data/vendor/assets/javascripts/highstock/modules/annotations-advanced.src.js +8230 -0
  508. data/vendor/assets/javascripts/highstock/modules/annotations.js +94 -0
  509. data/vendor/assets/javascripts/highstock/modules/annotations.js.map +1 -0
  510. data/vendor/assets/javascripts/highstock/modules/annotations.src.js +6001 -0
  511. data/vendor/assets/javascripts/highstock/modules/arrow-symbols.js +11 -0
  512. data/vendor/assets/javascripts/highstock/modules/arrow-symbols.js.map +1 -0
  513. data/vendor/assets/javascripts/highstock/modules/arrow-symbols.src.js +225 -0
  514. data/vendor/assets/javascripts/highstock/modules/boost-canvas.js +23 -0
  515. data/vendor/assets/javascripts/highstock/modules/boost-canvas.js.map +1 -0
  516. data/vendor/assets/javascripts/highstock/modules/boost-canvas.src.js +756 -0
  517. data/vendor/assets/javascripts/highstock/modules/boost.js +65 -0
  518. data/vendor/assets/javascripts/highstock/modules/boost.js.map +1 -0
  519. data/vendor/assets/javascripts/highstock/modules/boost.src.js +3752 -0
  520. data/vendor/assets/javascripts/highstock/modules/bullet.js +14 -0
  521. data/vendor/assets/javascripts/highstock/modules/bullet.js.map +1 -0
  522. data/vendor/assets/javascripts/highstock/modules/bullet.src.js +388 -0
  523. data/vendor/assets/javascripts/highstock/modules/current-date-indicator.js +11 -0
  524. data/vendor/assets/javascripts/highstock/modules/current-date-indicator.js.map +1 -0
  525. data/vendor/assets/javascripts/highstock/modules/current-date-indicator.src.js +127 -0
  526. data/vendor/assets/javascripts/highstock/modules/cylinder.js +14 -0
  527. data/vendor/assets/javascripts/highstock/modules/cylinder.js.map +1 -0
  528. data/vendor/assets/javascripts/highstock/modules/cylinder.src.js +413 -0
  529. data/vendor/assets/javascripts/highstock/modules/data.js +37 -0
  530. data/vendor/assets/javascripts/highstock/modules/data.js.map +1 -0
  531. data/vendor/assets/javascripts/highstock/modules/data.src.js +2565 -0
  532. data/vendor/assets/javascripts/highstock/modules/datagrouping.js +25 -0
  533. data/vendor/assets/javascripts/highstock/modules/datagrouping.js.map +1 -0
  534. data/vendor/assets/javascripts/highstock/modules/datagrouping.src.js +1140 -0
  535. data/vendor/assets/javascripts/highstock/modules/debugger.js +28 -0
  536. data/vendor/assets/javascripts/highstock/modules/debugger.js.map +1 -0
  537. data/vendor/assets/javascripts/highstock/modules/debugger.src.js +267 -0
  538. data/vendor/assets/javascripts/highstock/modules/dependency-wheel.js +15 -0
  539. data/vendor/assets/javascripts/highstock/modules/dependency-wheel.js.map +1 -0
  540. data/vendor/assets/javascripts/highstock/modules/dependency-wheel.src.js +301 -0
  541. data/vendor/assets/javascripts/highstock/modules/drag-panes.js +18 -0
  542. data/vendor/assets/javascripts/highstock/modules/drag-panes.js.map +1 -0
  543. data/vendor/assets/javascripts/highstock/modules/drag-panes.src.js +649 -0
  544. data/vendor/assets/javascripts/highstock/modules/draggable-points.js +40 -0
  545. data/vendor/assets/javascripts/highstock/modules/draggable-points.js.map +1 -0
  546. data/vendor/assets/javascripts/highstock/modules/draggable-points.src.js +2650 -0
  547. data/vendor/assets/javascripts/highstock/modules/drilldown.js +29 -0
  548. data/vendor/assets/javascripts/highstock/modules/drilldown.js.map +1 -0
  549. data/vendor/assets/javascripts/highstock/modules/drilldown.src.js +1321 -0
  550. data/vendor/assets/javascripts/highstock/modules/export-data.js +27 -0
  551. data/vendor/assets/javascripts/highstock/modules/export-data.js.map +1 -0
  552. data/vendor/assets/javascripts/highstock/modules/export-data.src.js +1234 -0
  553. data/vendor/assets/javascripts/highstock/modules/exporting.js +35 -0
  554. data/vendor/assets/javascripts/highstock/modules/exporting.js.map +1 -0
  555. data/vendor/assets/javascripts/highstock/modules/exporting.src.js +2233 -0
  556. data/vendor/assets/javascripts/highstock/modules/full-screen.js +11 -0
  557. data/vendor/assets/javascripts/highstock/modules/full-screen.js.map +1 -0
  558. data/vendor/assets/javascripts/highstock/modules/full-screen.src.js +68 -0
  559. data/vendor/assets/javascripts/highstock/modules/funnel.js +14 -0
  560. data/vendor/assets/javascripts/highstock/modules/funnel.js.map +1 -0
  561. data/vendor/assets/javascripts/highstock/modules/funnel.src.js +576 -0
  562. data/vendor/assets/javascripts/highstock/modules/grid-axis.js +23 -0
  563. data/vendor/assets/javascripts/highstock/modules/grid-axis.js.map +1 -0
  564. data/vendor/assets/javascripts/highstock/modules/grid-axis.src.js +988 -0
  565. data/vendor/assets/javascripts/highstock/modules/heatmap.js +28 -0
  566. data/vendor/assets/javascripts/highstock/modules/heatmap.js.map +1 -0
  567. data/vendor/assets/javascripts/highstock/modules/heatmap.src.js +1731 -0
  568. data/vendor/assets/javascripts/highstock/modules/histogram-bellcurve.js +16 -0
  569. data/vendor/assets/javascripts/highstock/modules/histogram-bellcurve.js.map +1 -0
  570. data/vendor/assets/javascripts/highstock/modules/histogram-bellcurve.src.js +570 -0
  571. data/vendor/assets/javascripts/highstock/modules/item-series.js +13 -0
  572. data/vendor/assets/javascripts/highstock/modules/item-series.js.map +1 -0
  573. data/vendor/assets/javascripts/highstock/modules/item-series.src.js +176 -0
  574. data/vendor/assets/javascripts/highstock/modules/networkgraph.js +31 -0
  575. data/vendor/assets/javascripts/highstock/modules/networkgraph.js.map +1 -0
  576. data/vendor/assets/javascripts/highstock/modules/networkgraph.src.js +1348 -0
  577. data/vendor/assets/javascripts/highstock/modules/no-data-to-display.js +13 -0
  578. data/vendor/assets/javascripts/highstock/modules/no-data-to-display.js.map +1 -0
  579. data/vendor/assets/javascripts/highstock/modules/no-data-to-display.src.js +285 -0
  580. data/vendor/assets/javascripts/highstock/modules/offline-exporting.js +22 -0
  581. data/vendor/assets/javascripts/highstock/modules/offline-exporting.js.map +1 -0
  582. data/vendor/assets/javascripts/highstock/modules/offline-exporting.src.js +838 -0
  583. data/vendor/assets/javascripts/highstock/modules/oldie-polyfills.js +13 -0
  584. data/vendor/assets/javascripts/highstock/modules/oldie-polyfills.js.map +1 -0
  585. data/vendor/assets/javascripts/highstock/modules/oldie-polyfills.src.js +150 -0
  586. data/vendor/assets/javascripts/highstock/modules/oldie.js +35 -0
  587. data/vendor/assets/javascripts/highstock/modules/oldie.js.map +1 -0
  588. data/vendor/assets/javascripts/highstock/modules/oldie.src.js +1582 -0
  589. data/vendor/assets/javascripts/highstock/modules/overlapping-datalabels.js +9 -0
  590. data/vendor/assets/javascripts/highstock/modules/overlapping-datalabels.js.map +1 -0
  591. data/vendor/assets/javascripts/highstock/modules/overlapping-datalabels.src.js +22 -0
  592. data/vendor/assets/javascripts/highstock/modules/parallel-coordinates.js +18 -0
  593. data/vendor/assets/javascripts/highstock/modules/parallel-coordinates.js.map +1 -0
  594. data/vendor/assets/javascripts/highstock/modules/parallel-coordinates.src.js +517 -0
  595. data/vendor/assets/javascripts/highstock/modules/pareto.js +14 -0
  596. data/vendor/assets/javascripts/highstock/modules/pareto.js.map +1 -0
  597. data/vendor/assets/javascripts/highstock/modules/pareto.src.js +327 -0
  598. data/vendor/assets/javascripts/highstock/modules/pathfinder.js +34 -0
  599. data/vendor/assets/javascripts/highstock/modules/pathfinder.js.map +1 -0
  600. data/vendor/assets/javascripts/highstock/modules/pathfinder.src.js +2336 -0
  601. data/vendor/assets/javascripts/highstock/modules/pattern-fill.js +21 -0
  602. data/vendor/assets/javascripts/highstock/modules/pattern-fill.js.map +1 -0
  603. data/vendor/assets/javascripts/highstock/modules/pattern-fill.src.js +634 -0
  604. data/vendor/assets/javascripts/highstock/modules/price-indicator.js +13 -0
  605. data/vendor/assets/javascripts/highstock/modules/price-indicator.js.map +1 -0
  606. data/vendor/assets/javascripts/highstock/modules/price-indicator.src.js +176 -0
  607. data/vendor/assets/javascripts/highstock/modules/sankey.js +22 -0
  608. data/vendor/assets/javascripts/highstock/modules/sankey.js.map +1 -0
  609. data/vendor/assets/javascripts/highstock/modules/sankey.src.js +911 -0
  610. data/vendor/assets/javascripts/highstock/modules/series-label.js +23 -0
  611. data/vendor/assets/javascripts/highstock/modules/series-label.js.map +1 -0
  612. data/vendor/assets/javascripts/highstock/modules/series-label.src.js +1065 -0
  613. data/vendor/assets/javascripts/highstock/modules/solid-gauge.js +15 -0
  614. data/vendor/assets/javascripts/highstock/modules/solid-gauge.js.map +1 -0
  615. data/vendor/assets/javascripts/highstock/modules/solid-gauge.src.js +510 -0
  616. data/vendor/assets/javascripts/highstock/modules/sonification.js +53 -0
  617. data/vendor/assets/javascripts/highstock/modules/sonification.js.map +1 -0
  618. data/vendor/assets/javascripts/highstock/modules/sonification.src.js +3341 -0
  619. data/vendor/assets/javascripts/highstock/modules/static-scale.js +12 -0
  620. data/vendor/assets/javascripts/highstock/modules/static-scale.js.map +1 -0
  621. data/vendor/assets/javascripts/highstock/modules/static-scale.src.js +114 -0
  622. data/vendor/assets/javascripts/highstock/modules/stock-tools.js +65 -0
  623. data/vendor/assets/javascripts/highstock/modules/stock-tools.js.map +1 -0
  624. data/vendor/assets/javascripts/highstock/modules/stock-tools.src.js +3437 -0
  625. data/vendor/assets/javascripts/highstock/modules/stock.js +151 -0
  626. data/vendor/assets/javascripts/highstock/modules/stock.js.map +1 -0
  627. data/vendor/assets/javascripts/highstock/modules/stock.src.js +10907 -0
  628. data/vendor/assets/javascripts/highstock/modules/streamgraph.js +10 -0
  629. data/vendor/assets/javascripts/highstock/modules/streamgraph.js.map +1 -0
  630. data/vendor/assets/javascripts/highstock/modules/streamgraph.src.js +158 -0
  631. data/vendor/assets/javascripts/highstock/modules/sunburst.js +52 -0
  632. data/vendor/assets/javascripts/highstock/modules/sunburst.js.map +1 -0
  633. data/vendor/assets/javascripts/highstock/modules/sunburst.src.js +3174 -0
  634. data/vendor/assets/javascripts/highstock/modules/tilemap.js +26 -0
  635. data/vendor/assets/javascripts/highstock/modules/tilemap.js.map +1 -0
  636. data/vendor/assets/javascripts/highstock/modules/tilemap.src.js +1402 -0
  637. data/vendor/assets/javascripts/highstock/modules/timeline.js +23 -0
  638. data/vendor/assets/javascripts/highstock/modules/timeline.js.map +1 -0
  639. data/vendor/assets/javascripts/highstock/modules/timeline.src.js +778 -0
  640. data/vendor/assets/javascripts/highstock/modules/treegrid.js +50 -0
  641. data/vendor/assets/javascripts/highstock/modules/treegrid.js.map +1 -0
  642. data/vendor/assets/javascripts/highstock/modules/treegrid.src.js +2917 -0
  643. data/vendor/assets/javascripts/highstock/modules/treemap.js +39 -0
  644. data/vendor/assets/javascripts/highstock/modules/treemap.js.map +1 -0
  645. data/vendor/assets/javascripts/highstock/modules/treemap.src.js +2083 -0
  646. data/vendor/assets/javascripts/highstock/modules/variable-pie.js +16 -0
  647. data/vendor/assets/javascripts/highstock/modules/variable-pie.js.map +1 -0
  648. data/vendor/assets/javascripts/highstock/modules/variable-pie.src.js +485 -0
  649. data/vendor/assets/javascripts/highstock/modules/variwide.js +15 -0
  650. data/vendor/assets/javascripts/highstock/modules/variwide.js.map +1 -0
  651. data/vendor/assets/javascripts/highstock/modules/variwide.src.js +376 -0
  652. data/vendor/assets/javascripts/highstock/modules/vector.js +13 -0
  653. data/vendor/assets/javascripts/highstock/modules/vector.js.map +1 -0
  654. data/vendor/assets/javascripts/highstock/modules/vector.src.js +381 -0
  655. data/vendor/assets/javascripts/highstock/modules/venn.js +30 -0
  656. data/vendor/assets/javascripts/highstock/modules/venn.js.map +1 -0
  657. data/vendor/assets/javascripts/highstock/modules/venn.src.js +1624 -0
  658. data/vendor/assets/javascripts/highstock/modules/windbarb.js +17 -0
  659. data/vendor/assets/javascripts/highstock/modules/windbarb.js.map +1 -0
  660. data/vendor/assets/javascripts/highstock/modules/windbarb.src.js +574 -0
  661. data/vendor/assets/javascripts/highstock/modules/wordcloud.js +25 -0
  662. data/vendor/assets/javascripts/highstock/modules/wordcloud.js.map +1 -0
  663. data/vendor/assets/javascripts/highstock/modules/wordcloud.src.js +1475 -0
  664. data/vendor/assets/javascripts/highstock/modules/xrange.js +20 -0
  665. data/vendor/assets/javascripts/highstock/modules/xrange.js.map +1 -0
  666. data/vendor/assets/javascripts/highstock/modules/xrange.src.js +788 -0
  667. data/vendor/assets/javascripts/highstock/themes/avocado.js +9 -0
  668. data/vendor/assets/javascripts/highstock/themes/avocado.js.map +1 -0
  669. data/vendor/assets/javascripts/highstock/themes/avocado.src.js +63 -0
  670. data/vendor/assets/javascripts/highstock/themes/dark-blue.js +15 -0
  671. data/vendor/assets/javascripts/highstock/themes/dark-blue.js.map +1 -0
  672. data/vendor/assets/javascripts/highstock/themes/dark-blue.src.js +285 -0
  673. data/vendor/assets/javascripts/highstock/themes/dark-green.js +15 -0
  674. data/vendor/assets/javascripts/highstock/themes/dark-green.js.map +1 -0
  675. data/vendor/assets/javascripts/highstock/themes/dark-green.src.js +287 -0
  676. data/vendor/assets/javascripts/highstock/themes/dark-unica.js +14 -0
  677. data/vendor/assets/javascripts/highstock/themes/dark-unica.js.map +1 -0
  678. data/vendor/assets/javascripts/highstock/themes/dark-unica.src.js +246 -0
  679. data/vendor/assets/javascripts/highstock/themes/gray.js +15 -0
  680. data/vendor/assets/javascripts/highstock/themes/gray.js.map +1 -0
  681. data/vendor/assets/javascripts/highstock/themes/gray.src.js +293 -0
  682. data/vendor/assets/javascripts/highstock/themes/grid-light.js +11 -0
  683. data/vendor/assets/javascripts/highstock/themes/grid-light.js.map +1 -0
  684. data/vendor/assets/javascripts/highstock/themes/grid-light.src.js +107 -0
  685. data/vendor/assets/javascripts/highstock/themes/grid.js +11 -0
  686. data/vendor/assets/javascripts/highstock/themes/grid.js.map +1 -0
  687. data/vendor/assets/javascripts/highstock/themes/grid.src.js +136 -0
  688. data/vendor/assets/javascripts/highstock/themes/sand-signika.js +11 -0
  689. data/vendor/assets/javascripts/highstock/themes/sand-signika.js.map +1 -0
  690. data/vendor/assets/javascripts/highstock/themes/sand-signika.src.js +137 -0
  691. data/vendor/assets/javascripts/highstock/themes/skies.js +11 -0
  692. data/vendor/assets/javascripts/highstock/themes/skies.js.map +1 -0
  693. data/vendor/assets/javascripts/highstock/themes/skies.src.js +126 -0
  694. data/vendor/assets/javascripts/highstock/themes/sunset.js +9 -0
  695. data/vendor/assets/javascripts/highstock/themes/sunset.js.map +1 -0
  696. data/vendor/assets/javascripts/highstock/themes/sunset.src.js +62 -0
  697. metadata +781 -0
@@ -0,0 +1,2063 @@
1
+ /**
2
+ * (c) 2010-2019 Torstein Honsi
3
+ *
4
+ * License: www.highcharts.com/license
5
+ */
6
+
7
+ /**
8
+ * Callback function to react on button clicks.
9
+ *
10
+ * @callback Highcharts.RangeSelectorClickCallbackFunction
11
+ *
12
+ * @param {global.Event} e
13
+ * Event arguments.
14
+ *
15
+ * @param {boolean|undefined}
16
+ * Return false to cancel the default button event.
17
+ */
18
+
19
+ /**
20
+ * Callback function to parse values entered in the input boxes and return a
21
+ * valid JavaScript time as milliseconds since 1970.
22
+ *
23
+ * @callback Highcharts.RangeSelectorParseCallbackFunction
24
+ *
25
+ * @param {string} value
26
+ * Input value to parse.
27
+ *
28
+ * @return {number}
29
+ * Parsed JavaScript time value.
30
+ */
31
+
32
+ 'use strict';
33
+
34
+ import H from './Globals.js';
35
+ import './Axis.js';
36
+ import './Chart.js';
37
+
38
+ var addEvent = H.addEvent,
39
+ Axis = H.Axis,
40
+ Chart = H.Chart,
41
+ css = H.css,
42
+ createElement = H.createElement,
43
+ defaultOptions = H.defaultOptions,
44
+ defined = H.defined,
45
+ destroyObjectProperties = H.destroyObjectProperties,
46
+ discardElement = H.discardElement,
47
+ extend = H.extend,
48
+ fireEvent = H.fireEvent,
49
+ isNumber = H.isNumber,
50
+ merge = H.merge,
51
+ pick = H.pick,
52
+ pInt = H.pInt,
53
+ splat = H.splat;
54
+
55
+ /* ****************************************************************************
56
+ * Start Range Selector code *
57
+ *****************************************************************************/
58
+ extend(defaultOptions, {
59
+
60
+ /**
61
+ * The range selector is a tool for selecting ranges to display within
62
+ * the chart. It provides buttons to select preconfigured ranges in
63
+ * the chart, like 1 day, 1 week, 1 month etc. It also provides input
64
+ * boxes where min and max dates can be manually input.
65
+ *
66
+ * @product highstock
67
+ * @optionparent rangeSelector
68
+ */
69
+ rangeSelector: {
70
+
71
+ /**
72
+ * Whether to enable all buttons from the start. By default buttons are
73
+ * only enabled if the corresponding time range exists on the X axis,
74
+ * but enabling all buttons allows for dynamically loading different
75
+ * time ranges.
76
+ *
77
+ * @sample {highstock} stock/rangeselector/allbuttonsenabled-true/
78
+ * All buttons enabled
79
+ *
80
+ * @type {boolean}
81
+ * @default false
82
+ * @since 2.0.3
83
+ * @apioption rangeSelector.allButtonsEnabled
84
+ */
85
+
86
+ /**
87
+ * An array of configuration objects for the buttons.
88
+ *
89
+ * Defaults to
90
+ *
91
+ * <pre>buttons: [{
92
+ * type: 'month',
93
+ * count: 1,
94
+ * text: '1m'
95
+ * }, {
96
+ * type: 'month',
97
+ * count: 3,
98
+ * text: '3m'
99
+ * }, {
100
+ * type: 'month',
101
+ * count: 6,
102
+ * text: '6m'
103
+ * }, {
104
+ * type: 'ytd',
105
+ * text: 'YTD'
106
+ * }, {
107
+ * type: 'year',
108
+ * count: 1,
109
+ * text: '1y'
110
+ * }, {
111
+ * type: 'all',
112
+ * text: 'All'
113
+ * }]</pre>
114
+ *
115
+ * @sample {highstock} stock/rangeselector/datagrouping/
116
+ * Data grouping by buttons
117
+ *
118
+ * @type {Array<*>}
119
+ * @apioption rangeSelector.buttons
120
+ */
121
+
122
+ /**
123
+ * How many units of the defined type the button should span. If `type`
124
+ * is "month" and `count` is 3, the button spans three months.
125
+ *
126
+ * @type {number}
127
+ * @default 1
128
+ * @apioption rangeSelector.buttons.count
129
+ */
130
+
131
+ /**
132
+ * Fires when clicking on the rangeSelector button. One parameter,
133
+ * event, is passed to the function, containing common event
134
+ * information.
135
+ *
136
+ * <pre>
137
+ * click: function(e) {
138
+ * console.log(this);
139
+ * }
140
+ * </pre>
141
+ *
142
+ * Return false to stop default button's click action.
143
+ *
144
+ * @sample {highstock} stock/rangeselector/button-click/
145
+ * Click event on the button
146
+ *
147
+ * @type {Highcharts.RangeSelectorClickCallbackFunction}
148
+ * @apioption rangeSelector.buttons.events.click
149
+ */
150
+
151
+ /**
152
+ * Additional range (in milliseconds) added to the end of the calculated
153
+ * time span.
154
+ *
155
+ * @sample {highstock} stock/rangeselector/min-max-offsets/
156
+ * Button offsets
157
+ *
158
+ * @type {number}
159
+ * @default 0
160
+ * @since 6.0.0
161
+ * @apioption rangeSelector.buttons.offsetMax
162
+ */
163
+
164
+ /**
165
+ * Additional range (in milliseconds) added to the start of the
166
+ * calculated time span.
167
+ *
168
+ * @sample {highstock} stock/rangeselector/min-max-offsets/
169
+ * Button offsets
170
+ *
171
+ * @type {number}
172
+ * @default 0
173
+ * @since 6.0.0
174
+ * @apioption rangeSelector.buttons.offsetMin
175
+ */
176
+
177
+ /**
178
+ * When buttons apply dataGrouping on a series, by default zooming
179
+ * in/out will deselect buttons and unset dataGrouping. Enable this
180
+ * option to keep buttons selected when extremes change.
181
+ *
182
+ * @sample {highstock} stock/rangeselector/preserve-datagrouping/
183
+ * Different preserveDataGrouping settings
184
+ *
185
+ * @type {boolean}
186
+ * @default false
187
+ * @since 6.1.2
188
+ * @apioption rangeSelector.buttons.preserveDataGrouping
189
+ */
190
+
191
+ /**
192
+ * A custom data grouping object for each button.
193
+ *
194
+ * @see [series.dataGrouping](#plotOptions.series.dataGrouping)
195
+ *
196
+ * @sample {highstock} stock/rangeselector/datagrouping/
197
+ * Data grouping by range selector buttons
198
+ *
199
+ * @type {*}
200
+ * @extends plotOptions.series.dataGrouping
201
+ * @apioption rangeSelector.buttons.dataGrouping
202
+ */
203
+
204
+ /**
205
+ * The text for the button itself.
206
+ *
207
+ * @type {string}
208
+ * @apioption rangeSelector.buttons.text
209
+ */
210
+
211
+ /**
212
+ * Defined the time span for the button. Can be one of `millisecond`,
213
+ * `second`, `minute`, `hour`, `day`, `week`, `month`, `ytd`, `all`.
214
+ *
215
+ * @type {string}
216
+ * @validvalue ["millisecond", "second", "minute", "day", "week", "month", "ytd", "all"]
217
+ * @apioption rangeSelector.buttons.type
218
+ */
219
+
220
+ /**
221
+ * The space in pixels between the buttons in the range selector.
222
+ *
223
+ * @type {number}
224
+ * @default 0
225
+ * @apioption rangeSelector.buttonSpacing
226
+ */
227
+
228
+ /**
229
+ * Enable or disable the range selector.
230
+ *
231
+ * @sample {highstock} stock/rangeselector/enabled/
232
+ * Disable the range selector
233
+ *
234
+ * @type {boolean}
235
+ * @default true
236
+ * @apioption rangeSelector.enabled
237
+ */
238
+
239
+ /**
240
+ * The vertical alignment of the rangeselector box. Allowed properties
241
+ * are `top`, `middle`, `bottom`.
242
+ *
243
+ * @sample {highstock} stock/rangeselector/vertical-align-middle/
244
+ * Middle
245
+ * @sample {highstock} stock/rangeselector/vertical-align-bottom/
246
+ * Bottom
247
+ *
248
+ * @type {Highcharts.VerticalAlignType}
249
+ * @since 6.0.0
250
+ */
251
+ verticalAlign: 'top',
252
+
253
+ /**
254
+ * A collection of attributes for the buttons. The object takes SVG
255
+ * attributes like `fill`, `stroke`, `stroke-width`, as well as `style`,
256
+ * a collection of CSS properties for the text.
257
+ *
258
+ * The object can also be extended with states, so you can set
259
+ * presentational options for `hover`, `select` or `disabled` button
260
+ * states.
261
+ *
262
+ * CSS styles for the text label.
263
+ *
264
+ * In styled mode, the buttons are styled by the
265
+ * `.highcharts-range-selector-buttons .highcharts-button` rule with its
266
+ * different states.
267
+ *
268
+ * @sample {highstock} stock/rangeselector/styling/
269
+ * Styling the buttons and inputs
270
+ *
271
+ * @type {Highcharts.SVGAttributes}
272
+ */
273
+ buttonTheme: {
274
+ /** @ignore */
275
+ width: 28,
276
+ /** @ignore */
277
+ height: 18,
278
+ /** @ignore */
279
+ padding: 2,
280
+ /** @ignore */
281
+ zIndex: 7 // #484, #852
282
+ },
283
+
284
+ /**
285
+ * When the rangeselector is floating, the plot area does not reserve
286
+ * space for it. This opens for positioning anywhere on the chart.
287
+ *
288
+ * @sample {highstock} stock/rangeselector/floating/
289
+ * Placing the range selector between the plot area and the
290
+ * navigator
291
+ *
292
+ * @since 6.0.0
293
+ */
294
+ floating: false,
295
+
296
+ /**
297
+ * The x offset of the range selector relative to its horizontal
298
+ * alignment within `chart.spacingLeft` and `chart.spacingRight`.
299
+ *
300
+ * @since 6.0.0
301
+ */
302
+ x: 0,
303
+
304
+ /**
305
+ * The y offset of the range selector relative to its horizontal
306
+ * alignment within `chart.spacingLeft` and `chart.spacingRight`.
307
+ *
308
+ * @since 6.0.0
309
+ */
310
+ y: 0,
311
+
312
+ /**
313
+ * Deprecated. The height of the range selector. Currently it is
314
+ * calculated dynamically.
315
+ *
316
+ * @deprecated
317
+ * @type {number|undefined}
318
+ * @since 2.1.9
319
+ */
320
+ height: undefined, // reserved space for buttons and input
321
+
322
+ /**
323
+ * The border color of the date input boxes.
324
+ *
325
+ * @sample {highstock} stock/rangeselector/styling/
326
+ * Styling the buttons and inputs
327
+ *
328
+ * @type {Highcharts.ColorString}
329
+ * @default #cccccc
330
+ * @since 1.3.7
331
+ * @apioption rangeSelector.inputBoxBorderColor
332
+ */
333
+
334
+ /**
335
+ * The pixel height of the date input boxes.
336
+ *
337
+ * @sample {highstock} stock/rangeselector/styling/
338
+ * Styling the buttons and inputs
339
+ *
340
+ * @type {number}
341
+ * @default 17
342
+ * @since 1.3.7
343
+ * @apioption rangeSelector.inputBoxHeight
344
+ */
345
+
346
+ /**
347
+ * CSS for the container DIV holding the input boxes. Deprecated as
348
+ * of 1.2.5\. Use [inputPosition](#rangeSelector.inputPosition) instead.
349
+ *
350
+ * @sample {highstock} stock/rangeselector/styling/
351
+ * Styling the buttons and inputs
352
+ *
353
+ * @deprecated
354
+ * @type {Highcharts.CSSObject}
355
+ * @apioption rangeSelector.inputBoxStyle
356
+ */
357
+
358
+ /**
359
+ * The pixel width of the date input boxes.
360
+ *
361
+ * @sample {highstock} stock/rangeselector/styling/
362
+ * Styling the buttons and inputs
363
+ *
364
+ * @type {number}
365
+ * @default 90
366
+ * @since 1.3.7
367
+ * @apioption rangeSelector.inputBoxWidth
368
+ */
369
+
370
+ /**
371
+ * The date format in the input boxes when not selected for editing.
372
+ * Defaults to `%b %e, %Y`.
373
+ *
374
+ * @sample {highstock} stock/rangeselector/input-format/
375
+ * Milliseconds in the range selector
376
+ *
377
+ * @type {string}
378
+ * @default %b %e, %Y
379
+ * @apioption rangeSelector.inputDateFormat
380
+ */
381
+
382
+ /**
383
+ * A custom callback function to parse values entered in the input boxes
384
+ * and return a valid JavaScript time as milliseconds since 1970.
385
+ *
386
+ * @sample {highstock} stock/rangeselector/input-format/
387
+ * Milliseconds in the range selector
388
+ *
389
+ * @type {Highcharts.RangeSelectorParseCallbackFunction}
390
+ * @since 1.3.3
391
+ * @apioption rangeSelector.inputDateParser
392
+ */
393
+
394
+ /**
395
+ * The date format in the input boxes when they are selected for
396
+ * editing. This must be a format that is recognized by JavaScript
397
+ * Date.parse.
398
+ *
399
+ * @sample {highstock} stock/rangeselector/input-format/
400
+ * Milliseconds in the range selector
401
+ *
402
+ * @type {string}
403
+ * @default %Y-%m-%d
404
+ * @apioption rangeSelector.inputEditDateFormat
405
+ */
406
+
407
+ /**
408
+ * Enable or disable the date input boxes. Defaults to enabled when
409
+ * there is enough space, disabled if not (typically mobile).
410
+ *
411
+ * @sample {highstock} stock/rangeselector/input-datepicker/
412
+ * Extending the input with a jQuery UI datepicker
413
+ *
414
+ * @type {boolean}
415
+ * @default true
416
+ * @apioption rangeSelector.inputEnabled
417
+ */
418
+
419
+ /**
420
+ * Positioning for the input boxes. Allowed properties are `align`,
421
+ * `x` and `y`.
422
+ *
423
+ * @since 1.2.4
424
+ */
425
+ inputPosition: {
426
+
427
+ /**
428
+ * The alignment of the input box. Allowed properties are `left`,
429
+ * `center`, `right`.
430
+ *
431
+ * @sample {highstock} stock/rangeselector/input-button-position/
432
+ * Alignment
433
+ *
434
+ * @type {Highcharts.AlignType}
435
+ * @since 6.0.0
436
+ */
437
+ align: 'right',
438
+
439
+ /**
440
+ * X offset of the input row.
441
+ */
442
+ x: 0,
443
+
444
+ /**
445
+ * Y offset of the input row.
446
+ */
447
+ y: 0
448
+ },
449
+
450
+ /**
451
+ * The index of the button to appear pre-selected.
452
+ *
453
+ * @type {number}
454
+ * @product highstock
455
+ * @apioption rangeSelector.selected
456
+ */
457
+
458
+ /**
459
+ * Positioning for the button row.
460
+ *
461
+ * @since 1.2.4
462
+ */
463
+ buttonPosition: {
464
+
465
+ /**
466
+ * The alignment of the input box. Allowed properties are `left`,
467
+ * `center`, `right`.
468
+ *
469
+ * @sample {highstock} stock/rangeselector/input-button-position/
470
+ * Alignment
471
+ *
472
+ * @since 6.0.0
473
+ * @validvalue ["left", "center", "right"]
474
+ */
475
+ align: 'left',
476
+
477
+ /**
478
+ * X offset of the button row.
479
+ */
480
+ x: 0,
481
+
482
+ /**
483
+ * Y offset of the button row.
484
+ */
485
+ y: 0
486
+ },
487
+
488
+ /**
489
+ * CSS for the HTML inputs in the range selector.
490
+ *
491
+ * In styled mode, the inputs are styled by the
492
+ * `.highcharts-range-input text` rule in SVG mode, and
493
+ * `input.highcharts-range-selector` when active.
494
+ *
495
+ * @sample {highstock} stock/rangeselector/styling/
496
+ * Styling the buttons and inputs
497
+ *
498
+ * @type {Highcharts.CSSObject}
499
+ * @apioption rangeSelector.inputStyle
500
+ */
501
+
502
+ /**
503
+ * CSS styles for the labels - the Zoom, From and To texts.
504
+ *
505
+ * In styled mode, the labels are styled by the
506
+ * `.highcharts-range-label` class.
507
+ *
508
+ * @sample {highstock} stock/rangeselector/styling/
509
+ * Styling the buttons and inputs
510
+ *
511
+ * @type {Highcharts.CSSObject}
512
+ */
513
+ labelStyle: {
514
+ /** @ignore */
515
+ color: '#666666'
516
+ }
517
+ }
518
+ });
519
+
520
+ defaultOptions.lang = merge(
521
+
522
+ defaultOptions.lang,
523
+
524
+ /**
525
+ * Language object. The language object is global and it can't be set
526
+ * on each chart initialization. Instead, use `Highcharts.setOptions` to
527
+ * set it before any chart is initialized.
528
+ *
529
+ * <pre>Highcharts.setOptions({
530
+ * lang: {
531
+ * months: [
532
+ * 'Janvier', 'Février', 'Mars', 'Avril',
533
+ * 'Mai', 'Juin', 'Juillet', 'Août',
534
+ * 'Septembre', 'Octobre', 'Novembre', 'Décembre'
535
+ * ],
536
+ * weekdays: [
537
+ * 'Dimanche', 'Lundi', 'Mardi', 'Mercredi',
538
+ * 'Jeudi', 'Vendredi', 'Samedi'
539
+ * ]
540
+ * }
541
+ * });</pre>
542
+ *
543
+ * @optionparent lang
544
+ */
545
+ {
546
+
547
+ /**
548
+ * The text for the label for the range selector buttons.
549
+ *
550
+ * @product highstock
551
+ */
552
+ rangeSelectorZoom: 'Zoom',
553
+
554
+ /**
555
+ * The text for the label for the "from" input box in the range
556
+ * selector.
557
+ *
558
+ * @product highstock
559
+ */
560
+ rangeSelectorFrom: 'From',
561
+
562
+ /**
563
+ * The text for the label for the "to" input box in the range selector.
564
+ *
565
+ * @product highstock
566
+ */
567
+ rangeSelectorTo: 'To'
568
+ }
569
+ );
570
+
571
+ /**
572
+ * The range selector.
573
+ *
574
+ * @private
575
+ * @class
576
+ * @name Highcharts.RangeSelector
577
+ *
578
+ * @param {Highcharts.Chart} chart
579
+ */
580
+ function RangeSelector(chart) {
581
+
582
+ // Run RangeSelector
583
+ this.init(chart);
584
+ }
585
+
586
+ RangeSelector.prototype = {
587
+ /**
588
+ * The method to run when one of the buttons in the range selectors is
589
+ * clicked
590
+ *
591
+ * @private
592
+ * @function Highcharts.RangeSelector#clickButton
593
+ *
594
+ * @param {number} i
595
+ * The index of the button
596
+ *
597
+ * @param {boolean} redraw
598
+ */
599
+ clickButton: function (i, redraw) {
600
+ var rangeSelector = this,
601
+ chart = rangeSelector.chart,
602
+ rangeOptions = rangeSelector.buttonOptions[i],
603
+ baseAxis = chart.xAxis[0],
604
+ unionExtremes = (
605
+ chart.scroller && chart.scroller.getUnionExtremes()
606
+ ) || baseAxis || {},
607
+ dataMin = unionExtremes.dataMin,
608
+ dataMax = unionExtremes.dataMax,
609
+ newMin,
610
+ newMax = baseAxis && Math.round(
611
+ Math.min(baseAxis.max, pick(dataMax, baseAxis.max))
612
+ ), // #1568
613
+ type = rangeOptions.type,
614
+ baseXAxisOptions,
615
+ range = rangeOptions._range,
616
+ rangeMin,
617
+ minSetting,
618
+ rangeSetting,
619
+ ctx,
620
+ ytdExtremes,
621
+ dataGrouping = rangeOptions.dataGrouping;
622
+
623
+ // chart has no data, base series is removed
624
+ if (dataMin === null || dataMax === null) {
625
+ return;
626
+ }
627
+
628
+ // Set the fixed range before range is altered
629
+ chart.fixedRange = range;
630
+
631
+ // Apply dataGrouping associated to button
632
+ if (dataGrouping) {
633
+ this.forcedDataGrouping = true;
634
+ Axis.prototype.setDataGrouping.call(
635
+ baseAxis || { chart: this.chart },
636
+ dataGrouping,
637
+ false
638
+ );
639
+
640
+ this.frozenStates = rangeOptions.preserveDataGrouping;
641
+ }
642
+
643
+ // Apply range
644
+ if (type === 'month' || type === 'year') {
645
+ if (!baseAxis) {
646
+ // This is set to the user options and picked up later when the
647
+ // axis is instantiated so that we know the min and max.
648
+ range = rangeOptions;
649
+ } else {
650
+ ctx = {
651
+ range: rangeOptions,
652
+ max: newMax,
653
+ chart: chart,
654
+ dataMin: dataMin,
655
+ dataMax: dataMax
656
+ };
657
+ newMin = baseAxis.minFromRange.call(ctx);
658
+ if (isNumber(ctx.newMax)) {
659
+ newMax = ctx.newMax;
660
+ }
661
+ }
662
+
663
+ // Fixed times like minutes, hours, days
664
+ } else if (range) {
665
+ newMin = Math.max(newMax - range, dataMin);
666
+ newMax = Math.min(newMin + range, dataMax);
667
+
668
+ } else if (type === 'ytd') {
669
+
670
+ // On user clicks on the buttons, or a delayed action running from
671
+ // the beforeRender event (below), the baseAxis is defined.
672
+ if (baseAxis) {
673
+ // When "ytd" is the pre-selected button for the initial view,
674
+ // its calculation is delayed and rerun in the beforeRender
675
+ // event (below). When the series are initialized, but before
676
+ // the chart is rendered, we have access to the xData array
677
+ // (#942).
678
+ if (dataMax === undefined) {
679
+ dataMin = Number.MAX_VALUE;
680
+ dataMax = Number.MIN_VALUE;
681
+ chart.series.forEach(function (series) {
682
+ // reassign it to the last item
683
+ var xData = series.xData;
684
+
685
+ dataMin = Math.min(xData[0], dataMin);
686
+ dataMax = Math.max(xData[xData.length - 1], dataMax);
687
+ });
688
+ redraw = false;
689
+ }
690
+ ytdExtremes = rangeSelector.getYTDExtremes(
691
+ dataMax,
692
+ dataMin,
693
+ chart.time.useUTC
694
+ );
695
+ newMin = rangeMin = ytdExtremes.min;
696
+ newMax = ytdExtremes.max;
697
+
698
+ // "ytd" is pre-selected. We don't yet have access to processed
699
+ // point and extremes data (things like pointStart and pointInterval
700
+ // are missing), so we delay the process (#942)
701
+ } else {
702
+ rangeSelector.deferredYTDClick = i;
703
+ return;
704
+ }
705
+ } else if (type === 'all' && baseAxis) {
706
+ newMin = dataMin;
707
+ newMax = dataMax;
708
+ }
709
+
710
+ newMin += rangeOptions._offsetMin;
711
+ newMax += rangeOptions._offsetMax;
712
+
713
+ rangeSelector.setSelected(i);
714
+
715
+ // Update the chart
716
+ if (!baseAxis) {
717
+ // Axis not yet instanciated. Temporarily set min and range
718
+ // options and remove them on chart load (#4317).
719
+ baseXAxisOptions = splat(chart.options.xAxis)[0];
720
+ rangeSetting = baseXAxisOptions.range;
721
+ baseXAxisOptions.range = range;
722
+ minSetting = baseXAxisOptions.min;
723
+ baseXAxisOptions.min = rangeMin;
724
+ addEvent(chart, 'load', function resetMinAndRange() {
725
+ baseXAxisOptions.range = rangeSetting;
726
+ baseXAxisOptions.min = minSetting;
727
+ });
728
+ } else {
729
+ // Existing axis object. Set extremes after render time.
730
+ baseAxis.setExtremes(
731
+ newMin,
732
+ newMax,
733
+ pick(redraw, 1),
734
+ null, // auto animation
735
+ {
736
+ trigger: 'rangeSelectorButton',
737
+ rangeSelectorButton: rangeOptions
738
+ }
739
+ );
740
+ }
741
+ },
742
+
743
+ /**
744
+ * Set the selected option. This method only sets the internal flag, it
745
+ * doesn't update the buttons or the actual zoomed range.
746
+ *
747
+ * @private
748
+ * @function Highcharts.RangeSelector#setSelected
749
+ *
750
+ * @param {boolean} selected
751
+ */
752
+ setSelected: function (selected) {
753
+ this.selected = this.options.selected = selected;
754
+ },
755
+
756
+ /**
757
+ * The default buttons for pre-selecting time frames
758
+ */
759
+ defaultButtons: [{
760
+ type: 'month',
761
+ count: 1,
762
+ text: '1m'
763
+ }, {
764
+ type: 'month',
765
+ count: 3,
766
+ text: '3m'
767
+ }, {
768
+ type: 'month',
769
+ count: 6,
770
+ text: '6m'
771
+ }, {
772
+ type: 'ytd',
773
+ text: 'YTD'
774
+ }, {
775
+ type: 'year',
776
+ count: 1,
777
+ text: '1y'
778
+ }, {
779
+ type: 'all',
780
+ text: 'All'
781
+ }],
782
+
783
+ /**
784
+ * Initialize the range selector
785
+ *
786
+ * @private
787
+ * @function Highcharts.RangeSelector#init
788
+ *
789
+ * @param {Highcharts.Chart} chart
790
+ */
791
+ init: function (chart) {
792
+ var rangeSelector = this,
793
+ options = chart.options.rangeSelector,
794
+ buttonOptions = options.buttons ||
795
+ [].concat(rangeSelector.defaultButtons),
796
+ selectedOption = options.selected,
797
+ blurInputs = function () {
798
+ var minInput = rangeSelector.minInput,
799
+ maxInput = rangeSelector.maxInput;
800
+
801
+ // #3274 in some case blur is not defined
802
+ if (minInput && minInput.blur) {
803
+ fireEvent(minInput, 'blur');
804
+ }
805
+ if (maxInput && maxInput.blur) {
806
+ fireEvent(maxInput, 'blur');
807
+ }
808
+ };
809
+
810
+ rangeSelector.chart = chart;
811
+ rangeSelector.options = options;
812
+ rangeSelector.buttons = [];
813
+
814
+ chart.extraTopMargin = options.height;
815
+ rangeSelector.buttonOptions = buttonOptions;
816
+
817
+ this.unMouseDown = addEvent(chart.container, 'mousedown', blurInputs);
818
+ this.unResize = addEvent(chart, 'resize', blurInputs);
819
+
820
+ // Extend the buttonOptions with actual range
821
+ buttonOptions.forEach(rangeSelector.computeButtonRange);
822
+
823
+ // zoomed range based on a pre-selected button index
824
+ if (selectedOption !== undefined && buttonOptions[selectedOption]) {
825
+ this.clickButton(selectedOption, false);
826
+ }
827
+
828
+
829
+ addEvent(chart, 'load', function () {
830
+ // If a data grouping is applied to the current button, release it
831
+ // when extremes change
832
+ if (chart.xAxis && chart.xAxis[0]) {
833
+ addEvent(chart.xAxis[0], 'setExtremes', function (e) {
834
+ if (
835
+ this.max - this.min !== chart.fixedRange &&
836
+ e.trigger !== 'rangeSelectorButton' &&
837
+ e.trigger !== 'updatedData' &&
838
+ rangeSelector.forcedDataGrouping &&
839
+ !rangeSelector.frozenStates
840
+ ) {
841
+ this.setDataGrouping(false, false);
842
+ }
843
+ });
844
+ }
845
+ });
846
+ },
847
+
848
+ /**
849
+ * Dynamically update the range selector buttons after a new range has been
850
+ * set
851
+ *
852
+ * @private
853
+ * @function Highcharts.RangeSelector#updateButtonStates
854
+ */
855
+ updateButtonStates: function () {
856
+ var rangeSelector = this,
857
+ chart = this.chart,
858
+ baseAxis = chart.xAxis[0],
859
+ actualRange = Math.round(baseAxis.max - baseAxis.min),
860
+ hasNoData = !baseAxis.hasVisibleSeries,
861
+ day = 24 * 36e5, // A single day in milliseconds
862
+ unionExtremes = (
863
+ chart.scroller &&
864
+ chart.scroller.getUnionExtremes()
865
+ ) || baseAxis,
866
+ dataMin = unionExtremes.dataMin,
867
+ dataMax = unionExtremes.dataMax,
868
+ ytdExtremes = rangeSelector.getYTDExtremes(
869
+ dataMax,
870
+ dataMin,
871
+ chart.time.useUTC
872
+ ),
873
+ ytdMin = ytdExtremes.min,
874
+ ytdMax = ytdExtremes.max,
875
+ selected = rangeSelector.selected,
876
+ selectedExists = isNumber(selected),
877
+ allButtonsEnabled = rangeSelector.options.allButtonsEnabled,
878
+ buttons = rangeSelector.buttons;
879
+
880
+ rangeSelector.buttonOptions.forEach(function (rangeOptions, i) {
881
+ var range = rangeOptions._range,
882
+ type = rangeOptions.type,
883
+ count = rangeOptions.count || 1,
884
+ button = buttons[i],
885
+ state = 0,
886
+ disable,
887
+ select,
888
+ offsetRange = rangeOptions._offsetMax - rangeOptions._offsetMin,
889
+ isSelected = i === selected,
890
+ // Disable buttons where the range exceeds what is allowed in
891
+ // the current view
892
+ isTooGreatRange = range > dataMax - dataMin,
893
+ // Disable buttons where the range is smaller than the minimum
894
+ // range
895
+ isTooSmallRange = range < baseAxis.minRange,
896
+ // Do not select the YTD button if not explicitly told so
897
+ isYTDButNotSelected = false,
898
+ // Disable the All button if we're already showing all
899
+ isAllButAlreadyShowingAll = false,
900
+ isSameRange = range === actualRange;
901
+
902
+ // Months and years have a variable range so we check the extremes
903
+ if (
904
+ (type === 'month' || type === 'year') &&
905
+ (
906
+ actualRange + 36e5 >=
907
+ { month: 28, year: 365 }[type] * day * count - offsetRange
908
+ ) &&
909
+ (
910
+ actualRange - 36e5 <=
911
+ { month: 31, year: 366 }[type] * day * count + offsetRange
912
+ )
913
+ ) {
914
+ isSameRange = true;
915
+ } else if (type === 'ytd') {
916
+ isSameRange = (ytdMax - ytdMin + offsetRange) === actualRange;
917
+ isYTDButNotSelected = !isSelected;
918
+ } else if (type === 'all') {
919
+ isSameRange = baseAxis.max - baseAxis.min >= dataMax - dataMin;
920
+ isAllButAlreadyShowingAll = (
921
+ !isSelected &&
922
+ selectedExists &&
923
+ isSameRange
924
+ );
925
+ }
926
+
927
+ // The new zoom area happens to match the range for a button - mark
928
+ // it selected. This happens when scrolling across an ordinal gap.
929
+ // It can be seen in the intraday demos when selecting 1h and scroll
930
+ // across the night gap.
931
+ disable = (
932
+ !allButtonsEnabled &&
933
+ (
934
+ isTooGreatRange ||
935
+ isTooSmallRange ||
936
+ isAllButAlreadyShowingAll ||
937
+ hasNoData
938
+ )
939
+ );
940
+ select = (
941
+ (isSelected && isSameRange) ||
942
+ (isSameRange && !selectedExists && !isYTDButNotSelected) ||
943
+ (isSelected && rangeSelector.frozenStates)
944
+ );
945
+
946
+ if (disable) {
947
+ state = 3;
948
+ } else if (select) {
949
+ selectedExists = true; // Only one button can be selected
950
+ state = 2;
951
+ }
952
+
953
+ // If state has changed, update the button
954
+ if (button.state !== state) {
955
+ button.setState(state);
956
+
957
+ // Reset (#9209)
958
+ if (state === 0 && selected === i) {
959
+ rangeSelector.setSelected(null);
960
+ }
961
+ }
962
+ });
963
+ },
964
+
965
+ /**
966
+ * Compute and cache the range for an individual button
967
+ *
968
+ * @private
969
+ * @function Highcharts.RangeSelector#computeButtonRange
970
+ *
971
+ * @param {Highcharts.RangeSelectorOptions} rangeOptions
972
+ */
973
+ computeButtonRange: function (rangeOptions) {
974
+ var type = rangeOptions.type,
975
+ count = rangeOptions.count || 1,
976
+
977
+ // these time intervals have a fixed number of milliseconds, as
978
+ // opposed to month, ytd and year
979
+ fixedTimes = {
980
+ millisecond: 1,
981
+ second: 1000,
982
+ minute: 60 * 1000,
983
+ hour: 3600 * 1000,
984
+ day: 24 * 3600 * 1000,
985
+ week: 7 * 24 * 3600 * 1000
986
+ };
987
+
988
+ // Store the range on the button object
989
+ if (fixedTimes[type]) {
990
+ rangeOptions._range = fixedTimes[type] * count;
991
+ } else if (type === 'month' || type === 'year') {
992
+ rangeOptions._range =
993
+ { month: 30, year: 365 }[type] * 24 * 36e5 * count;
994
+ }
995
+
996
+ rangeOptions._offsetMin = pick(rangeOptions.offsetMin, 0);
997
+ rangeOptions._offsetMax = pick(rangeOptions.offsetMax, 0);
998
+ rangeOptions._range +=
999
+ rangeOptions._offsetMax - rangeOptions._offsetMin;
1000
+ },
1001
+
1002
+ /**
1003
+ * Set the internal and displayed value of a HTML input for the dates
1004
+ *
1005
+ * @private
1006
+ * @function Highcharts.RangeSelector#setInputValue
1007
+ *
1008
+ * @param {string} name
1009
+ *
1010
+ * @param {number} inputTime
1011
+ */
1012
+ setInputValue: function (name, inputTime) {
1013
+ var options = this.chart.options.rangeSelector,
1014
+ time = this.chart.time,
1015
+ input = this[name + 'Input'];
1016
+
1017
+ if (defined(inputTime)) {
1018
+ input.previousValue = input.HCTime;
1019
+ input.HCTime = inputTime;
1020
+ }
1021
+
1022
+ input.value = time.dateFormat(
1023
+ options.inputEditDateFormat || '%Y-%m-%d',
1024
+ input.HCTime
1025
+ );
1026
+ this[name + 'DateBox'].attr({
1027
+ text: time.dateFormat(
1028
+ options.inputDateFormat || '%b %e, %Y',
1029
+ input.HCTime
1030
+ )
1031
+ });
1032
+ },
1033
+
1034
+ /**
1035
+ * @private
1036
+ * @function Highcharts.RangeSelector#showInput
1037
+ *
1038
+ * @param {string} name
1039
+ */
1040
+ showInput: function (name) {
1041
+ var inputGroup = this.inputGroup,
1042
+ dateBox = this[name + 'DateBox'];
1043
+
1044
+ css(this[name + 'Input'], {
1045
+ left: (inputGroup.translateX + dateBox.x) + 'px',
1046
+ top: inputGroup.translateY + 'px',
1047
+ width: (dateBox.width - 2) + 'px',
1048
+ height: (dateBox.height - 2) + 'px',
1049
+ border: '2px solid silver'
1050
+ });
1051
+ },
1052
+
1053
+ /**
1054
+ * @private
1055
+ * @function Highcharts.RangeSelector#hideInput
1056
+ *
1057
+ * @param {string} name
1058
+ */
1059
+ hideInput: function (name) {
1060
+ css(this[name + 'Input'], {
1061
+ border: 0,
1062
+ width: '1px',
1063
+ height: '1px'
1064
+ });
1065
+ this.setInputValue(name);
1066
+ },
1067
+
1068
+ /**
1069
+ * Draw either the 'from' or the 'to' HTML input box of the range selector
1070
+ *
1071
+ * @private
1072
+ * @function Highcharts.RangeSelector#drawInput
1073
+ *
1074
+ * @param {string} name
1075
+ */
1076
+ drawInput: function (name) {
1077
+ var rangeSelector = this,
1078
+ chart = rangeSelector.chart,
1079
+ chartStyle = chart.renderer.style || {},
1080
+ renderer = chart.renderer,
1081
+ options = chart.options.rangeSelector,
1082
+ lang = defaultOptions.lang,
1083
+ div = rangeSelector.div,
1084
+ isMin = name === 'min',
1085
+ input,
1086
+ label,
1087
+ dateBox,
1088
+ inputGroup = this.inputGroup;
1089
+
1090
+ function updateExtremes() {
1091
+ var inputValue = input.value,
1092
+ value = (options.inputDateParser || Date.parse)(inputValue),
1093
+ chartAxis = chart.xAxis[0],
1094
+ dataAxis = chart.scroller && chart.scroller.xAxis ?
1095
+ chart.scroller.xAxis :
1096
+ chartAxis,
1097
+ dataMin = dataAxis.dataMin,
1098
+ dataMax = dataAxis.dataMax;
1099
+
1100
+ if (value !== input.previousValue) {
1101
+ input.previousValue = value;
1102
+ // If the value isn't parsed directly to a value by the
1103
+ // browser's Date.parse method, like YYYY-MM-DD in IE, try
1104
+ // parsing it a different way
1105
+ if (!isNumber(value)) {
1106
+ value = inputValue.split('-');
1107
+ value = Date.UTC(
1108
+ pInt(value[0]),
1109
+ pInt(value[1]) - 1,
1110
+ pInt(value[2])
1111
+ );
1112
+ }
1113
+
1114
+ if (isNumber(value)) {
1115
+
1116
+ // Correct for timezone offset (#433)
1117
+ if (!chart.time.useUTC) {
1118
+ value =
1119
+ value + new Date().getTimezoneOffset() * 60 * 1000;
1120
+ }
1121
+
1122
+ // Validate the extremes. If it goes beyound the data min or
1123
+ // max, use the actual data extreme (#2438).
1124
+ if (isMin) {
1125
+ if (value > rangeSelector.maxInput.HCTime) {
1126
+ value = undefined;
1127
+ } else if (value < dataMin) {
1128
+ value = dataMin;
1129
+ }
1130
+ } else {
1131
+ if (value < rangeSelector.minInput.HCTime) {
1132
+ value = undefined;
1133
+ } else if (value > dataMax) {
1134
+ value = dataMax;
1135
+ }
1136
+ }
1137
+
1138
+ // Set the extremes
1139
+ if (value !== undefined) {
1140
+ chartAxis.setExtremes(
1141
+ isMin ? value : chartAxis.min,
1142
+ isMin ? chartAxis.max : value,
1143
+ undefined,
1144
+ undefined,
1145
+ { trigger: 'rangeSelectorInput' }
1146
+ );
1147
+ }
1148
+ }
1149
+ }
1150
+ }
1151
+
1152
+ // Create the text label
1153
+ this[name + 'Label'] = label = renderer.label(
1154
+ lang[isMin ? 'rangeSelectorFrom' : 'rangeSelectorTo'],
1155
+ this.inputGroup.offset
1156
+ )
1157
+ .addClass('highcharts-range-label')
1158
+ .attr({
1159
+ padding: 2
1160
+ })
1161
+ .add(inputGroup);
1162
+ inputGroup.offset += label.width + 5;
1163
+
1164
+ // Create an SVG label that shows updated date ranges and and records
1165
+ // click events that bring in the HTML input.
1166
+ this[name + 'DateBox'] = dateBox = renderer.label('', inputGroup.offset)
1167
+ .addClass('highcharts-range-input')
1168
+ .attr({
1169
+ padding: 2,
1170
+ width: options.inputBoxWidth || 90,
1171
+ height: options.inputBoxHeight || 17,
1172
+ 'text-align': 'center'
1173
+ })
1174
+ .on('click', function () {
1175
+ // If it is already focused, the onfocus event doesn't fire
1176
+ // (#3713)
1177
+ rangeSelector.showInput(name);
1178
+ rangeSelector[name + 'Input'].focus();
1179
+ });
1180
+
1181
+ if (!chart.styledMode) {
1182
+ dateBox.attr({
1183
+ stroke:
1184
+ options.inputBoxBorderColor || '#cccccc',
1185
+ 'stroke-width': 1
1186
+ });
1187
+ }
1188
+
1189
+ dateBox.add(inputGroup);
1190
+
1191
+ inputGroup.offset += dateBox.width + (isMin ? 10 : 0);
1192
+
1193
+
1194
+ // Create the HTML input element. This is rendered as 1x1 pixel then set
1195
+ // to the right size when focused.
1196
+ this[name + 'Input'] = input = createElement('input', {
1197
+ name: name,
1198
+ className: 'highcharts-range-selector',
1199
+ type: 'text'
1200
+ }, {
1201
+ top: chart.plotTop + 'px' // prevent jump on focus in Firefox
1202
+ }, div);
1203
+
1204
+ if (!chart.styledMode) {
1205
+ // Styles
1206
+ label.css(merge(chartStyle, options.labelStyle));
1207
+
1208
+ dateBox.css(merge({
1209
+ color: '#333333'
1210
+ }, chartStyle, options.inputStyle));
1211
+
1212
+ css(input, extend({
1213
+ position: 'absolute',
1214
+ border: 0,
1215
+ width: '1px', // Chrome needs a pixel to see it
1216
+ height: '1px',
1217
+ padding: 0,
1218
+ textAlign: 'center',
1219
+ fontSize: chartStyle.fontSize,
1220
+ fontFamily: chartStyle.fontFamily,
1221
+ top: '-9999em' // #4798
1222
+ }, options.inputStyle));
1223
+ }
1224
+
1225
+ // Blow up the input box
1226
+ input.onfocus = function () {
1227
+ rangeSelector.showInput(name);
1228
+ };
1229
+ // Hide away the input box
1230
+ input.onblur = function () {
1231
+ if (input === H.doc.activeElement) { // Only when focused
1232
+ // Update also when no `change` event is triggered, like when
1233
+ // clicking inside the SVG (#4710)
1234
+ updateExtremes();
1235
+ rangeSelector.hideInput(name);
1236
+ }
1237
+ };
1238
+
1239
+ // handle changes in the input boxes
1240
+ input.onchange = updateExtremes;
1241
+
1242
+ input.onkeypress = function (event) {
1243
+ // IE does not fire onchange on enter
1244
+ if (event.keyCode === 13) {
1245
+ updateExtremes();
1246
+ }
1247
+ };
1248
+ },
1249
+
1250
+ /**
1251
+ * Get the position of the range selector buttons and inputs. This can be
1252
+ * overridden from outside for custom positioning.
1253
+ *
1254
+ * @private
1255
+ * @function Highcharts.RangeSelector#getPosition
1256
+ *
1257
+ * @return {Highcharts.Dictionary<number>}
1258
+ */
1259
+ getPosition: function () {
1260
+ var chart = this.chart,
1261
+ options = chart.options.rangeSelector,
1262
+ top = options.verticalAlign === 'top' ?
1263
+ chart.plotTop - chart.axisOffset[0] :
1264
+ 0; // set offset only for varticalAlign top
1265
+
1266
+ return {
1267
+ buttonTop: top + options.buttonPosition.y,
1268
+ inputTop: top + options.inputPosition.y - 10
1269
+ };
1270
+ },
1271
+ /**
1272
+ * Get the extremes of YTD. Will choose dataMax if its value is lower than
1273
+ * the current timestamp. Will choose dataMin if its value is higher than
1274
+ * the timestamp for the start of current year.
1275
+ *
1276
+ * @private
1277
+ * @function Highcharts.RangeSelector#getYTDExtremes
1278
+ *
1279
+ * @param {number} dataMax
1280
+ *
1281
+ * @param {number} dataMin
1282
+ *
1283
+ * @return {*}
1284
+ * Returns min and max for the YTD
1285
+ */
1286
+ getYTDExtremes: function (dataMax, dataMin, useUTC) {
1287
+ var time = this.chart.time,
1288
+ min,
1289
+ now = new time.Date(dataMax),
1290
+ year = time.get('FullYear', now),
1291
+ startOfYear = useUTC ?
1292
+ time.Date.UTC(year, 0, 1) : // eslint-disable-line new-cap
1293
+ +new time.Date(year, 0, 1);
1294
+
1295
+ min = Math.max(dataMin || 0, startOfYear);
1296
+ now = now.getTime();
1297
+ return {
1298
+ max: Math.min(dataMax || now, now),
1299
+ min: min
1300
+ };
1301
+ },
1302
+
1303
+ /**
1304
+ * Render the range selector including the buttons and the inputs. The first
1305
+ * time render is called, the elements are created and positioned. On
1306
+ * subsequent calls, they are moved and updated.
1307
+ *
1308
+ * @private
1309
+ * @function Highcharts.RangeSelector#render
1310
+ *
1311
+ * @param {number} min
1312
+ * X axis minimum
1313
+ *
1314
+ * @param {number} max
1315
+ * X axis maximum
1316
+ */
1317
+ render: function (min, max) {
1318
+
1319
+ var rangeSelector = this,
1320
+ chart = rangeSelector.chart,
1321
+ renderer = chart.renderer,
1322
+ container = chart.container,
1323
+ chartOptions = chart.options,
1324
+ navButtonOptions = (
1325
+ chartOptions.exporting &&
1326
+ chartOptions.exporting.enabled !== false &&
1327
+ chartOptions.navigation &&
1328
+ chartOptions.navigation.buttonOptions
1329
+ ),
1330
+ lang = defaultOptions.lang,
1331
+ div = rangeSelector.div,
1332
+ options = chartOptions.rangeSelector,
1333
+ // Place inputs above the container
1334
+ inputsZIndex = pick(
1335
+ chartOptions.chart.style &&
1336
+ chartOptions.chart.style.zIndex,
1337
+ 0
1338
+ ) + 1,
1339
+ floating = options.floating,
1340
+ buttons = rangeSelector.buttons,
1341
+ inputGroup = rangeSelector.inputGroup,
1342
+ buttonTheme = options.buttonTheme,
1343
+ buttonPosition = options.buttonPosition,
1344
+ inputPosition = options.inputPosition,
1345
+ inputEnabled = options.inputEnabled,
1346
+ states = buttonTheme && buttonTheme.states,
1347
+ plotLeft = chart.plotLeft,
1348
+ buttonLeft,
1349
+ buttonGroup = rangeSelector.buttonGroup,
1350
+ group,
1351
+ groupHeight,
1352
+ rendered = rangeSelector.rendered,
1353
+ verticalAlign = rangeSelector.options.verticalAlign,
1354
+ legend = chart.legend,
1355
+ legendOptions = legend && legend.options,
1356
+ buttonPositionY = buttonPosition.y,
1357
+ inputPositionY = inputPosition.y,
1358
+ animate = rendered || false,
1359
+ verb = animate ? 'animate' : 'attr',
1360
+ exportingX = 0,
1361
+ alignTranslateY,
1362
+ legendHeight,
1363
+ minPosition,
1364
+ translateY = 0,
1365
+ translateX;
1366
+
1367
+ if (options.enabled === false) {
1368
+ return;
1369
+ }
1370
+
1371
+ // create the elements
1372
+ if (!rendered) {
1373
+
1374
+ rangeSelector.group = group = renderer.g('range-selector-group')
1375
+ .attr({
1376
+ zIndex: 7
1377
+ })
1378
+ .add();
1379
+
1380
+ rangeSelector.buttonGroup = buttonGroup =
1381
+ renderer.g('range-selector-buttons').add(group);
1382
+
1383
+ rangeSelector.zoomText = renderer.text(
1384
+ lang.rangeSelectorZoom,
1385
+ 0,
1386
+ 15
1387
+ )
1388
+ .add(buttonGroup);
1389
+
1390
+ if (!chart.styledMode) {
1391
+
1392
+ rangeSelector.zoomText.css(options.labelStyle);
1393
+
1394
+ buttonTheme['stroke-width'] =
1395
+ pick(buttonTheme['stroke-width'], 0);
1396
+ }
1397
+
1398
+ rangeSelector.buttonOptions.forEach(function (rangeOptions, i) {
1399
+
1400
+ buttons[i] = renderer.button(
1401
+ rangeOptions.text,
1402
+ 0,
1403
+ 0,
1404
+ function () {
1405
+
1406
+ // extract events from button object and call
1407
+ var buttonEvents = (
1408
+ rangeOptions.events &&
1409
+ rangeOptions.events.click
1410
+ ),
1411
+ callDefaultEvent;
1412
+
1413
+ if (buttonEvents) {
1414
+ callDefaultEvent =
1415
+ buttonEvents.call(rangeOptions);
1416
+ }
1417
+
1418
+ if (callDefaultEvent !== false) {
1419
+ rangeSelector.clickButton(i);
1420
+ }
1421
+
1422
+ rangeSelector.isActive = true;
1423
+ },
1424
+ buttonTheme,
1425
+ states && states.hover,
1426
+ states && states.select,
1427
+ states && states.disabled
1428
+ )
1429
+ .attr({
1430
+ 'text-align': 'center'
1431
+ })
1432
+ .add(buttonGroup);
1433
+ });
1434
+
1435
+ // first create a wrapper outside the container in order to make
1436
+ // the inputs work and make export correct
1437
+ if (inputEnabled !== false) {
1438
+ rangeSelector.div = div = createElement('div', null, {
1439
+ position: 'relative',
1440
+ height: 0,
1441
+ zIndex: inputsZIndex
1442
+ });
1443
+
1444
+ container.parentNode.insertBefore(div, container);
1445
+
1446
+ // Create the group to keep the inputs
1447
+ rangeSelector.inputGroup = inputGroup =
1448
+ renderer.g('input-group').add(group);
1449
+ inputGroup.offset = 0;
1450
+
1451
+ rangeSelector.drawInput('min');
1452
+ rangeSelector.drawInput('max');
1453
+ }
1454
+ }
1455
+
1456
+ // #8769, allow dynamically updating margins
1457
+ rangeSelector.zoomText[verb]({
1458
+ x: pick(plotLeft + buttonPosition.x, plotLeft)
1459
+ });
1460
+ // button start position
1461
+ buttonLeft = pick(plotLeft + buttonPosition.x, plotLeft) +
1462
+ rangeSelector.zoomText.getBBox().width + 5;
1463
+ rangeSelector.buttonOptions.forEach(function (rangeOptions, i) {
1464
+
1465
+ buttons[i][verb]({ x: buttonLeft });
1466
+
1467
+ // increase button position for the next button
1468
+ buttonLeft += buttons[i].width + pick(options.buttonSpacing, 5);
1469
+ });
1470
+
1471
+
1472
+ plotLeft = chart.plotLeft - chart.spacing[3];
1473
+ rangeSelector.updateButtonStates();
1474
+
1475
+ // detect collisiton with exporting
1476
+ if
1477
+ (
1478
+ navButtonOptions &&
1479
+ this.titleCollision(chart) &&
1480
+ verticalAlign === 'top' &&
1481
+ buttonPosition.align === 'right' &&
1482
+ (
1483
+ (buttonPosition.y + buttonGroup.getBBox().height - 12) <
1484
+ ((navButtonOptions.y || 0) + navButtonOptions.height)
1485
+ )
1486
+ ) {
1487
+ exportingX = -40;
1488
+ }
1489
+
1490
+ if (buttonPosition.align === 'left') {
1491
+ translateX = buttonPosition.x - chart.spacing[3];
1492
+ } else if (buttonPosition.align === 'right') {
1493
+ translateX = buttonPosition.x + exportingX - chart.spacing[1];
1494
+ }
1495
+
1496
+ // align button group
1497
+ buttonGroup.align({
1498
+ y: buttonPosition.y,
1499
+ width: buttonGroup.getBBox().width,
1500
+ align: buttonPosition.align,
1501
+ x: translateX
1502
+ }, true, chart.spacingBox);
1503
+
1504
+ // skip animation
1505
+ rangeSelector.group.placed = animate;
1506
+ rangeSelector.buttonGroup.placed = animate;
1507
+
1508
+ if (inputEnabled !== false) {
1509
+
1510
+ var inputGroupX,
1511
+ inputGroupWidth,
1512
+ buttonGroupX,
1513
+ buttonGroupWidth;
1514
+
1515
+ // detect collision with exporting
1516
+ if
1517
+ (
1518
+ navButtonOptions &&
1519
+ this.titleCollision(chart) &&
1520
+ verticalAlign === 'top' &&
1521
+ inputPosition.align === 'right' &&
1522
+ (
1523
+ (inputPosition.y - inputGroup.getBBox().height - 12) <
1524
+ (
1525
+ (navButtonOptions.y || 0) +
1526
+ navButtonOptions.height +
1527
+ chart.spacing[0]
1528
+ )
1529
+ )
1530
+ ) {
1531
+ exportingX = -40;
1532
+ } else {
1533
+ exportingX = 0;
1534
+ }
1535
+
1536
+ if (inputPosition.align === 'left') {
1537
+ translateX = plotLeft;
1538
+ } else if (inputPosition.align === 'right') {
1539
+ translateX = -Math.max(chart.axisOffset[1], -exportingX);
1540
+ }
1541
+
1542
+ // Update the alignment to the updated spacing box
1543
+ inputGroup.align({
1544
+ y: inputPosition.y,
1545
+ width: inputGroup.getBBox().width,
1546
+ align: inputPosition.align,
1547
+ // fix wrong getBBox() value on right align
1548
+ x: inputPosition.x + translateX - 2
1549
+ }, true, chart.spacingBox);
1550
+
1551
+ // detect collision
1552
+ inputGroupX = (
1553
+ inputGroup.alignAttr.translateX +
1554
+ inputGroup.alignOptions.x -
1555
+ exportingX +
1556
+ // getBBox for detecing left margin
1557
+ inputGroup.getBBox().x +
1558
+ // 2px padding to not overlap input and label
1559
+ 2
1560
+ );
1561
+
1562
+ inputGroupWidth = inputGroup.alignOptions.width;
1563
+
1564
+ buttonGroupX = buttonGroup.alignAttr.translateX +
1565
+ buttonGroup.getBBox().x;
1566
+ // 20 is minimal spacing between elements
1567
+ buttonGroupWidth = buttonGroup.getBBox().width + 20;
1568
+
1569
+ if (
1570
+ (inputPosition.align === buttonPosition.align) ||
1571
+ (
1572
+ (buttonGroupX + buttonGroupWidth > inputGroupX) &&
1573
+ (inputGroupX + inputGroupWidth > buttonGroupX) &&
1574
+ (
1575
+ buttonPositionY <
1576
+ (inputPositionY + inputGroup.getBBox().height)
1577
+ )
1578
+ )
1579
+ ) {
1580
+
1581
+ inputGroup.attr({
1582
+ translateX: inputGroup.alignAttr.translateX +
1583
+ (chart.axisOffset[1] >= -exportingX ? 0 : -exportingX),
1584
+ translateY: inputGroup.alignAttr.translateY +
1585
+ buttonGroup.getBBox().height + 10
1586
+ });
1587
+
1588
+ }
1589
+
1590
+ // Set or reset the input values
1591
+ rangeSelector.setInputValue('min', min);
1592
+ rangeSelector.setInputValue('max', max);
1593
+
1594
+ // skip animation
1595
+ rangeSelector.inputGroup.placed = animate;
1596
+ }
1597
+
1598
+ // vertical align
1599
+ rangeSelector.group.align({
1600
+ verticalAlign: verticalAlign
1601
+ }, true, chart.spacingBox);
1602
+
1603
+ // set position
1604
+ groupHeight = rangeSelector.group.getBBox().height + 20; // # 20 padding
1605
+ alignTranslateY = rangeSelector.group.alignAttr.translateY;
1606
+
1607
+ // calculate bottom position
1608
+ if (verticalAlign === 'bottom') {
1609
+ legendHeight = (
1610
+ legendOptions &&
1611
+ legendOptions.verticalAlign === 'bottom' &&
1612
+ legendOptions.enabled &&
1613
+ !legendOptions.floating ?
1614
+ legend.legendHeight + pick(legendOptions.margin, 10) :
1615
+ 0
1616
+ );
1617
+
1618
+ groupHeight = groupHeight + legendHeight - 20;
1619
+ translateY = (
1620
+ alignTranslateY -
1621
+ groupHeight -
1622
+ (floating ? 0 : options.y) -
1623
+ 10 // 10 spacing
1624
+ );
1625
+
1626
+ }
1627
+
1628
+ if (verticalAlign === 'top') {
1629
+ if (floating) {
1630
+ translateY = 0;
1631
+ }
1632
+
1633
+ if (chart.titleOffset) {
1634
+ translateY = chart.titleOffset + chart.options.title.margin;
1635
+ }
1636
+
1637
+ translateY += ((chart.margin[0] - chart.spacing[0]) || 0);
1638
+
1639
+ } else if (verticalAlign === 'middle') {
1640
+ if (inputPositionY === buttonPositionY) {
1641
+ if (inputPositionY < 0) {
1642
+ translateY = alignTranslateY + minPosition;
1643
+ } else {
1644
+ translateY = alignTranslateY;
1645
+ }
1646
+ } else if (inputPositionY || buttonPositionY) {
1647
+ if (inputPositionY < 0 || buttonPositionY < 0) {
1648
+ translateY -= Math.min(inputPositionY, buttonPositionY);
1649
+ } else {
1650
+ translateY = alignTranslateY - groupHeight + minPosition;
1651
+ }
1652
+ }
1653
+ }
1654
+
1655
+ rangeSelector.group.translate(
1656
+ options.x,
1657
+ options.y + Math.floor(translateY)
1658
+ );
1659
+
1660
+ // translate HTML inputs
1661
+ if (inputEnabled !== false) {
1662
+ rangeSelector.minInput.style.marginTop =
1663
+ rangeSelector.group.translateY + 'px';
1664
+ rangeSelector.maxInput.style.marginTop =
1665
+ rangeSelector.group.translateY + 'px';
1666
+ }
1667
+
1668
+ rangeSelector.rendered = true;
1669
+ },
1670
+
1671
+ /**
1672
+ * Extracts height of range selector
1673
+ *
1674
+ * @private
1675
+ * @function Highcharts.RangeSelector#getHeight
1676
+ *
1677
+ * @return {number}
1678
+ * Returns rangeSelector height
1679
+ */
1680
+ getHeight: function () {
1681
+ var rangeSelector = this,
1682
+ options = rangeSelector.options,
1683
+ rangeSelectorGroup = rangeSelector.group,
1684
+ inputPosition = options.inputPosition,
1685
+ buttonPosition = options.buttonPosition,
1686
+ yPosition = options.y,
1687
+ buttonPositionY = buttonPosition.y,
1688
+ inputPositionY = inputPosition.y,
1689
+ rangeSelectorHeight = 0,
1690
+ minPosition;
1691
+
1692
+ rangeSelectorHeight = rangeSelectorGroup ?
1693
+ // 13px to keep back compatibility
1694
+ (rangeSelectorGroup.getBBox(true).height) + 13 + yPosition :
1695
+ 0;
1696
+
1697
+ minPosition = Math.min(inputPositionY, buttonPositionY);
1698
+
1699
+ if (
1700
+ (inputPositionY < 0 && buttonPositionY < 0) ||
1701
+ (inputPositionY > 0 && buttonPositionY > 0)
1702
+ ) {
1703
+ rangeSelectorHeight += Math.abs(minPosition);
1704
+ }
1705
+
1706
+ return rangeSelectorHeight;
1707
+ },
1708
+
1709
+ /**
1710
+ * Detect collision with title or subtitle
1711
+ *
1712
+ * @private
1713
+ * @function Highcharts.RangeSelector#titleCollision
1714
+ *
1715
+ * @param {Highcharts.Chart} chart
1716
+ *
1717
+ * @return {boolean}
1718
+ * Returns collision status
1719
+ */
1720
+ titleCollision: function (chart) {
1721
+ return !(chart.options.title.text || chart.options.subtitle.text);
1722
+ },
1723
+
1724
+ /**
1725
+ * Update the range selector with new options
1726
+ *
1727
+ * @private
1728
+ * @function Highcharts.RangeSelector#update
1729
+ *
1730
+ * @param {Highcharts.RangeSelectorOptions} options
1731
+ */
1732
+ update: function (options) {
1733
+ var chart = this.chart;
1734
+
1735
+ merge(true, chart.options.rangeSelector, options);
1736
+ this.destroy();
1737
+ this.init(chart);
1738
+ chart.rangeSelector.render();
1739
+ },
1740
+
1741
+ /**
1742
+ * Destroys allocated elements.
1743
+ *
1744
+ * @private
1745
+ * @function Highcharts.RangeSelector#destroy
1746
+ */
1747
+ destroy: function () {
1748
+ var rSelector = this,
1749
+ minInput = rSelector.minInput,
1750
+ maxInput = rSelector.maxInput;
1751
+
1752
+ rSelector.unMouseDown();
1753
+ rSelector.unResize();
1754
+
1755
+ // Destroy elements in collections
1756
+ destroyObjectProperties(rSelector.buttons);
1757
+
1758
+ // Clear input element events
1759
+ if (minInput) {
1760
+ minInput.onfocus = minInput.onblur = minInput.onchange = null;
1761
+ }
1762
+ if (maxInput) {
1763
+ maxInput.onfocus = maxInput.onblur = maxInput.onchange = null;
1764
+ }
1765
+
1766
+ // Destroy HTML and SVG elements
1767
+ H.objectEach(rSelector, function (val, key) {
1768
+ if (val && key !== 'chart') {
1769
+ if (val.destroy) { // SVGElement
1770
+ val.destroy();
1771
+ } else if (val.nodeType) { // HTML element
1772
+ discardElement(this[key]);
1773
+ }
1774
+ }
1775
+ if (val !== RangeSelector.prototype[key]) {
1776
+ rSelector[key] = null;
1777
+ }
1778
+ }, this);
1779
+ }
1780
+ };
1781
+
1782
+ /**
1783
+ * Add logic to normalize the zoomed range in order to preserve the pressed
1784
+ * state of range selector buttons
1785
+ *
1786
+ * @private
1787
+ * @function Highcharts.Axis#toFixedRange
1788
+ *
1789
+ * @param {number} pxMin
1790
+ *
1791
+ * @param {number} pxMax
1792
+ *
1793
+ * @param {number} fixedMin
1794
+ *
1795
+ * @param {number} fixedMax
1796
+ *
1797
+ * @return {*}
1798
+ */
1799
+ Axis.prototype.toFixedRange = function (pxMin, pxMax, fixedMin, fixedMax) {
1800
+ var fixedRange = this.chart && this.chart.fixedRange,
1801
+ newMin = pick(fixedMin, this.translate(pxMin, true, !this.horiz)),
1802
+ newMax = pick(fixedMax, this.translate(pxMax, true, !this.horiz)),
1803
+ changeRatio = fixedRange && (newMax - newMin) / fixedRange;
1804
+
1805
+ // If the difference between the fixed range and the actual requested range
1806
+ // is too great, the user is dragging across an ordinal gap, and we need to
1807
+ // release the range selector button.
1808
+ if (changeRatio > 0.7 && changeRatio < 1.3) {
1809
+ if (fixedMax) {
1810
+ newMin = newMax - fixedRange;
1811
+ } else {
1812
+ newMax = newMin + fixedRange;
1813
+ }
1814
+ }
1815
+ if (!isNumber(newMin) || !isNumber(newMax)) { // #1195, #7411
1816
+ newMin = newMax = undefined;
1817
+ }
1818
+
1819
+ return {
1820
+ min: newMin,
1821
+ max: newMax
1822
+ };
1823
+ };
1824
+
1825
+ /**
1826
+ * Get the axis min value based on the range option and the current max. For
1827
+ * stock charts this is extended via the {@link RangeSelector} so that if the
1828
+ * selected range is a multiple of months or years, it is compensated for
1829
+ * various month lengths.
1830
+ *
1831
+ * @private
1832
+ * @function Highcharts.Axis#minFromRange
1833
+ *
1834
+ * @return {number}
1835
+ * The new minimum value.
1836
+ */
1837
+ Axis.prototype.minFromRange = function () {
1838
+ var rangeOptions = this.range,
1839
+ type = rangeOptions.type,
1840
+ timeName = { month: 'Month', year: 'FullYear' }[type],
1841
+ min,
1842
+ max = this.max,
1843
+ dataMin,
1844
+ range,
1845
+ // Get the true range from a start date
1846
+ getTrueRange = function (base, count) {
1847
+ var date = new Date(base),
1848
+ basePeriod = date['get' + timeName]();
1849
+
1850
+ date['set' + timeName](basePeriod + count);
1851
+
1852
+ if (basePeriod === date['get' + timeName]()) {
1853
+ date.setDate(0); // #6537
1854
+ }
1855
+
1856
+ return date.getTime() - base;
1857
+ };
1858
+
1859
+ if (isNumber(rangeOptions)) {
1860
+ min = max - rangeOptions;
1861
+ range = rangeOptions;
1862
+ } else {
1863
+ min = max + getTrueRange(max, -rangeOptions.count);
1864
+
1865
+ // Let the fixedRange reflect initial settings (#5930)
1866
+ if (this.chart) {
1867
+ this.chart.fixedRange = max - min;
1868
+ }
1869
+ }
1870
+
1871
+ dataMin = pick(this.dataMin, Number.MIN_VALUE);
1872
+ if (!isNumber(min)) {
1873
+ min = dataMin;
1874
+ }
1875
+ if (min <= dataMin) {
1876
+ min = dataMin;
1877
+ if (range === undefined) { // #4501
1878
+ range = getTrueRange(min, rangeOptions.count);
1879
+ }
1880
+ this.newMax = Math.min(min + range, this.dataMax);
1881
+ }
1882
+ if (!isNumber(max)) {
1883
+ min = undefined;
1884
+ }
1885
+ return min;
1886
+
1887
+ };
1888
+
1889
+ // Initialize rangeselector for stock charts
1890
+ addEvent(Chart, 'afterGetContainer', function () {
1891
+ if (this.options.rangeSelector.enabled) {
1892
+ this.rangeSelector = new RangeSelector(this);
1893
+ }
1894
+ });
1895
+
1896
+ addEvent(Chart, 'beforeRender', function () {
1897
+
1898
+ var chart = this,
1899
+ axes = chart.axes,
1900
+ rangeSelector = chart.rangeSelector,
1901
+ verticalAlign;
1902
+
1903
+ if (rangeSelector) {
1904
+
1905
+ if (isNumber(rangeSelector.deferredYTDClick)) {
1906
+ rangeSelector.clickButton(rangeSelector.deferredYTDClick);
1907
+ delete rangeSelector.deferredYTDClick;
1908
+ }
1909
+
1910
+ axes.forEach(function (axis) {
1911
+ axis.updateNames();
1912
+ axis.setScale();
1913
+ });
1914
+
1915
+ chart.getAxisMargins();
1916
+
1917
+ rangeSelector.render();
1918
+ verticalAlign = rangeSelector.options.verticalAlign;
1919
+
1920
+ if (!rangeSelector.options.floating) {
1921
+ if (verticalAlign === 'bottom') {
1922
+ this.extraBottomMargin = true;
1923
+ } else if (verticalAlign !== 'middle') {
1924
+ this.extraTopMargin = true;
1925
+ }
1926
+ }
1927
+ }
1928
+
1929
+ });
1930
+
1931
+ addEvent(Chart, 'update', function (e) {
1932
+
1933
+ var chart = this,
1934
+ options = e.options,
1935
+ optionsRangeSelector = options.rangeSelector,
1936
+ rangeSelector = chart.rangeSelector,
1937
+ verticalAlign,
1938
+ extraBottomMarginWas = this.extraBottomMargin,
1939
+ extraTopMarginWas = this.extraTopMargin;
1940
+
1941
+ if (
1942
+ optionsRangeSelector &&
1943
+ optionsRangeSelector.enabled &&
1944
+ !defined(rangeSelector)
1945
+ ) {
1946
+ this.options.rangeSelector.enabled = true;
1947
+ this.rangeSelector = new RangeSelector(this);
1948
+ }
1949
+
1950
+
1951
+ this.extraBottomMargin = false;
1952
+ this.extraTopMargin = false;
1953
+
1954
+ if (rangeSelector) {
1955
+
1956
+ rangeSelector.render();
1957
+
1958
+ verticalAlign = (
1959
+ optionsRangeSelector &&
1960
+ optionsRangeSelector.verticalAlign
1961
+ ) || (
1962
+ rangeSelector.options && rangeSelector.options.verticalAlign
1963
+ );
1964
+
1965
+ if (!rangeSelector.options.floating) {
1966
+ if (verticalAlign === 'bottom') {
1967
+ this.extraBottomMargin = true;
1968
+ } else if (verticalAlign !== 'middle') {
1969
+ this.extraTopMargin = true;
1970
+ }
1971
+ }
1972
+
1973
+ if (
1974
+ this.extraBottomMargin !== extraBottomMarginWas ||
1975
+ this.extraTopMargin !== extraTopMarginWas
1976
+ ) {
1977
+ this.isDirtyBox = true;
1978
+ }
1979
+
1980
+ }
1981
+
1982
+ });
1983
+
1984
+ addEvent(Chart, 'render', function () {
1985
+ var chart = this,
1986
+ rangeSelector = chart.rangeSelector,
1987
+ verticalAlign;
1988
+
1989
+ if (rangeSelector && !rangeSelector.options.floating) {
1990
+
1991
+ rangeSelector.render();
1992
+ verticalAlign = rangeSelector.options.verticalAlign;
1993
+
1994
+ if (verticalAlign === 'bottom') {
1995
+ this.extraBottomMargin = true;
1996
+ } else if (verticalAlign !== 'middle') {
1997
+ this.extraTopMargin = true;
1998
+ }
1999
+ }
2000
+ });
2001
+
2002
+ addEvent(Chart, 'getMargins', function () {
2003
+ var rangeSelector = this.rangeSelector,
2004
+ rangeSelectorHeight;
2005
+
2006
+ if (rangeSelector) {
2007
+ rangeSelectorHeight = rangeSelector.getHeight();
2008
+
2009
+ if (this.extraTopMargin) {
2010
+ this.plotTop += rangeSelectorHeight;
2011
+ }
2012
+
2013
+ if (this.extraBottomMargin) {
2014
+ this.marginBottom += rangeSelectorHeight;
2015
+ }
2016
+ }
2017
+ });
2018
+
2019
+ Chart.prototype.callbacks.push(function (chart) {
2020
+ var extremes,
2021
+ rangeSelector = chart.rangeSelector,
2022
+ unbindRender,
2023
+ unbindSetExtremes;
2024
+
2025
+ function renderRangeSelector() {
2026
+ extremes = chart.xAxis[0].getExtremes();
2027
+ if (isNumber(extremes.min)) {
2028
+ rangeSelector.render(extremes.min, extremes.max);
2029
+ }
2030
+ }
2031
+
2032
+ if (rangeSelector) {
2033
+ // redraw the scroller on setExtremes
2034
+ unbindSetExtremes = addEvent(
2035
+ chart.xAxis[0],
2036
+ 'afterSetExtremes',
2037
+ function (e) {
2038
+ rangeSelector.render(e.min, e.max);
2039
+ }
2040
+ );
2041
+
2042
+ // redraw the scroller chart resize
2043
+ unbindRender = addEvent(chart, 'redraw', renderRangeSelector);
2044
+
2045
+ // do it now
2046
+ renderRangeSelector();
2047
+ }
2048
+
2049
+ // Remove resize/afterSetExtremes at chart destroy
2050
+ addEvent(chart, 'destroy', function destroyEvents() {
2051
+ if (rangeSelector) {
2052
+ unbindRender();
2053
+ unbindSetExtremes();
2054
+ }
2055
+ });
2056
+ });
2057
+
2058
+
2059
+ H.RangeSelector = RangeSelector;
2060
+
2061
+ /* ****************************************************************************
2062
+ * End Range Selector code *
2063
+ *****************************************************************************/