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,168 @@
1
+ /**
2
+ * (c) 2010-2019 Torstein Honsi
3
+ *
4
+ * License: www.highcharts.com/license
5
+ */
6
+
7
+ 'use strict';
8
+
9
+ import H from './Globals.js';
10
+ import './Utilities.js';
11
+
12
+ var Axis = H.Axis,
13
+ getMagnitude = H.getMagnitude,
14
+ normalizeTickInterval = H.normalizeTickInterval,
15
+ pick = H.pick;
16
+
17
+ /*
18
+ * Methods defined on the Axis prototype
19
+ */
20
+
21
+ /**
22
+ * Set the tick positions of a logarithmic axis.
23
+ *
24
+ * @private
25
+ * @function Highcharts.Axis#getLogTickPositions
26
+ *
27
+ * @param {number} interval
28
+ *
29
+ * @param {number} min
30
+ *
31
+ * @param {number} max
32
+ *
33
+ * @param {number} minor
34
+ *
35
+ * @return {Array<number>}
36
+ */
37
+ Axis.prototype.getLogTickPositions = function (interval, min, max, minor) {
38
+ var axis = this,
39
+ options = axis.options,
40
+ axisLength = axis.len,
41
+ // Since we use this method for both major and minor ticks,
42
+ // use a local variable and return the result
43
+ positions = [];
44
+
45
+ // Reset
46
+ if (!minor) {
47
+ axis._minorAutoInterval = null;
48
+ }
49
+
50
+ // First case: All ticks fall on whole logarithms: 1, 10, 100 etc.
51
+ if (interval >= 0.5) {
52
+ interval = Math.round(interval);
53
+ positions = axis.getLinearTickPositions(interval, min, max);
54
+
55
+ // Second case: We need intermediary ticks. For example
56
+ // 1, 2, 4, 6, 8, 10, 20, 40 etc.
57
+ } else if (interval >= 0.08) {
58
+ var roundedMin = Math.floor(min),
59
+ intermediate,
60
+ i,
61
+ j,
62
+ len,
63
+ pos,
64
+ lastPos,
65
+ break2;
66
+
67
+ if (interval > 0.3) {
68
+ intermediate = [1, 2, 4];
69
+
70
+ // 0.2 equals five minor ticks per 1, 10, 100 etc
71
+ } else if (interval > 0.15) {
72
+ intermediate = [1, 2, 4, 6, 8];
73
+ } else { // 0.1 equals ten minor ticks per 1, 10, 100 etc
74
+ intermediate = [1, 2, 3, 4, 5, 6, 7, 8, 9];
75
+ }
76
+
77
+ for (i = roundedMin; i < max + 1 && !break2; i++) {
78
+ len = intermediate.length;
79
+ for (j = 0; j < len && !break2; j++) {
80
+ pos = axis.log2lin(axis.lin2log(i) * intermediate[j]);
81
+ // #1670, lastPos is #3113
82
+ if (
83
+ pos > min &&
84
+ (!minor || lastPos <= max) &&
85
+ lastPos !== undefined
86
+ ) {
87
+ positions.push(lastPos);
88
+ }
89
+
90
+ if (lastPos > max) {
91
+ break2 = true;
92
+ }
93
+ lastPos = pos;
94
+ }
95
+ }
96
+
97
+ // Third case: We are so deep in between whole logarithmic values that
98
+ // we might as well handle the tick positions like a linear axis. For
99
+ // example 1.01, 1.02, 1.03, 1.04.
100
+ } else {
101
+ var realMin = axis.lin2log(min),
102
+ realMax = axis.lin2log(max),
103
+ tickIntervalOption = minor ?
104
+ this.getMinorTickInterval() :
105
+ options.tickInterval,
106
+ filteredTickIntervalOption = tickIntervalOption === 'auto' ?
107
+ null :
108
+ tickIntervalOption,
109
+ tickPixelIntervalOption =
110
+ options.tickPixelInterval / (minor ? 5 : 1),
111
+ totalPixelLength = minor ?
112
+ axisLength / axis.tickPositions.length :
113
+ axisLength;
114
+
115
+ interval = pick(
116
+ filteredTickIntervalOption,
117
+ axis._minorAutoInterval,
118
+ (realMax - realMin) *
119
+ tickPixelIntervalOption / (totalPixelLength || 1)
120
+ );
121
+
122
+ interval = normalizeTickInterval(
123
+ interval,
124
+ null,
125
+ getMagnitude(interval)
126
+ );
127
+
128
+ positions = axis.getLinearTickPositions(
129
+ interval,
130
+ realMin,
131
+ realMax
132
+ ).map(axis.log2lin);
133
+
134
+ if (!minor) {
135
+ axis._minorAutoInterval = interval / 5;
136
+ }
137
+ }
138
+
139
+ // Set the axis-level tickInterval variable
140
+ if (!minor) {
141
+ axis.tickInterval = interval;
142
+ }
143
+ return positions;
144
+ };
145
+
146
+ /**
147
+ * @private
148
+ * @function Highcharts.Axis#log2lin
149
+ *
150
+ * @param {number} num
151
+ *
152
+ * @return {number}
153
+ */
154
+ Axis.prototype.log2lin = function (num) {
155
+ return Math.log(num) / Math.LN10;
156
+ };
157
+
158
+ /**
159
+ * @private
160
+ * @function Highcharts.Axis#lin2log
161
+ *
162
+ * @param {number} num
163
+ *
164
+ * @return {number}
165
+ */
166
+ Axis.prototype.lin2log = function (num) {
167
+ return Math.pow(10, num);
168
+ };
@@ -0,0 +1,176 @@
1
+ /**
2
+ * (c) 2010-2019 Torstein Honsi
3
+ *
4
+ * License: www.highcharts.com/license
5
+ */
6
+
7
+ 'use strict';
8
+
9
+ import H from './Globals.js';
10
+ import './Utilities.js';
11
+ import './Pointer.js';
12
+
13
+ var addEvent = H.addEvent,
14
+ charts = H.charts,
15
+ css = H.css,
16
+ doc = H.doc,
17
+ extend = H.extend,
18
+ hasTouch = H.hasTouch,
19
+ noop = H.noop,
20
+ Pointer = H.Pointer,
21
+ removeEvent = H.removeEvent,
22
+ win = H.win,
23
+ wrap = H.wrap;
24
+
25
+ if (!hasTouch && (win.PointerEvent || win.MSPointerEvent)) {
26
+
27
+ // The touches object keeps track of the points being touched at all times
28
+ var touches = {},
29
+ hasPointerEvent = !!win.PointerEvent,
30
+ getWebkitTouches = function () {
31
+ var fake = [];
32
+
33
+ fake.item = function (i) {
34
+ return this[i];
35
+ };
36
+ H.objectEach(touches, function (touch) {
37
+ fake.push({
38
+ pageX: touch.pageX,
39
+ pageY: touch.pageY,
40
+ target: touch.target
41
+ });
42
+ });
43
+ return fake;
44
+ },
45
+ translateMSPointer = function (e, method, wktype, func) {
46
+ var p;
47
+
48
+ if (
49
+ (
50
+ e.pointerType === 'touch' ||
51
+ e.pointerType === e.MSPOINTER_TYPE_TOUCH
52
+ ) && charts[H.hoverChartIndex]
53
+ ) {
54
+ func(e);
55
+ p = charts[H.hoverChartIndex].pointer;
56
+ p[method]({
57
+ type: wktype,
58
+ target: e.currentTarget,
59
+ preventDefault: noop,
60
+ touches: getWebkitTouches()
61
+ });
62
+ }
63
+ };
64
+
65
+ // Extend the Pointer prototype with methods for each event handler and more
66
+ extend(Pointer.prototype, /** @lends Pointer.prototype */ {
67
+
68
+ /**
69
+ * @private
70
+ * @function Highcharts.Pointer#onContainerPointerDown
71
+ *
72
+ * @param {Highcharts.PointerEventObject} e
73
+ */
74
+ onContainerPointerDown: function (e) {
75
+ translateMSPointer(
76
+ e,
77
+ 'onContainerTouchStart',
78
+ 'touchstart',
79
+ function (e) {
80
+ touches[e.pointerId] = {
81
+ pageX: e.pageX,
82
+ pageY: e.pageY,
83
+ target: e.currentTarget
84
+ };
85
+ }
86
+ );
87
+ },
88
+
89
+ /**
90
+ * @private
91
+ * @function Highcharts.Pointer#onContainerPointerMove
92
+ *
93
+ * @param {Highcharts.PointerEventObject} e
94
+ */
95
+ onContainerPointerMove: function (e) {
96
+ translateMSPointer(
97
+ e,
98
+ 'onContainerTouchMove',
99
+ 'touchmove',
100
+ function (e) {
101
+ touches[e.pointerId] = { pageX: e.pageX, pageY: e.pageY };
102
+ if (!touches[e.pointerId].target) {
103
+ touches[e.pointerId].target = e.currentTarget;
104
+ }
105
+ }
106
+ );
107
+ },
108
+
109
+ /**
110
+ * @private
111
+ * @function Highcharts.Pointer#onDocumentPointerUp
112
+ *
113
+ * @param {Highcharts.PointerEventObject} e
114
+ */
115
+ onDocumentPointerUp: function (e) {
116
+ translateMSPointer(
117
+ e,
118
+ 'onDocumentTouchEnd',
119
+ 'touchend',
120
+ function (e) {
121
+ delete touches[e.pointerId];
122
+ }
123
+ );
124
+ },
125
+
126
+ /**
127
+ * Add or remove the MS Pointer specific events
128
+ *
129
+ * @private
130
+ * @function Highcharts.Pointer#batchMSEvents
131
+ *
132
+ * @param {Function} fn
133
+ */
134
+ batchMSEvents: function (fn) {
135
+ fn(
136
+ this.chart.container,
137
+ hasPointerEvent ? 'pointerdown' : 'MSPointerDown',
138
+ this.onContainerPointerDown
139
+ );
140
+ fn(
141
+ this.chart.container,
142
+ hasPointerEvent ? 'pointermove' : 'MSPointerMove',
143
+ this.onContainerPointerMove
144
+ );
145
+ fn(
146
+ doc,
147
+ hasPointerEvent ? 'pointerup' : 'MSPointerUp',
148
+ this.onDocumentPointerUp
149
+ );
150
+ }
151
+ });
152
+
153
+ // Disable default IE actions for pinch and such on chart element
154
+ wrap(Pointer.prototype, 'init', function (proceed, chart, options) {
155
+ proceed.call(this, chart, options);
156
+ if (this.hasZoom) { // #4014
157
+ css(chart.container, {
158
+ '-ms-touch-action': 'none',
159
+ 'touch-action': 'none'
160
+ });
161
+ }
162
+ });
163
+
164
+ // Add IE specific touch events to chart
165
+ wrap(Pointer.prototype, 'setDOMEvents', function (proceed) {
166
+ proceed.apply(this);
167
+ if (this.hasZoom || this.followTouchMove) {
168
+ this.batchMSEvents(addEvent);
169
+ }
170
+ });
171
+ // Destroy MS events also
172
+ wrap(Pointer.prototype, 'destroy', function (proceed) {
173
+ this.batchMSEvents(removeEvent);
174
+ proceed.call(this);
175
+ });
176
+ }
@@ -0,0 +1,2486 @@
1
+ /**
2
+ * (c) 2010-2019 Torstein Honsi
3
+ *
4
+ * License: www.highcharts.com/license
5
+ */
6
+
7
+ 'use strict';
8
+
9
+ import H from './Globals.js';
10
+ import './Utilities.js';
11
+ import './Color.js';
12
+ import './Axis.js';
13
+ import './Chart.js';
14
+ import './Series.js';
15
+ import './Options.js';
16
+ import './Scrollbar.js';
17
+
18
+ var addEvent = H.addEvent,
19
+ Axis = H.Axis,
20
+ Chart = H.Chart,
21
+ color = H.color,
22
+ defaultDataGroupingUnits = H.defaultDataGroupingUnits,
23
+ defaultOptions = H.defaultOptions,
24
+ defined = H.defined,
25
+ destroyObjectProperties = H.destroyObjectProperties,
26
+ erase = H.erase,
27
+ extend = H.extend,
28
+ hasTouch = H.hasTouch,
29
+ isArray = H.isArray,
30
+ isNumber = H.isNumber,
31
+ isTouchDevice = H.isTouchDevice,
32
+ merge = H.merge,
33
+ pick = H.pick,
34
+ removeEvent = H.removeEvent,
35
+ Scrollbar = H.Scrollbar,
36
+ Series = H.Series,
37
+ seriesTypes = H.seriesTypes,
38
+
39
+ units = [].concat(defaultDataGroupingUnits), // copy
40
+ defaultSeriesType,
41
+
42
+ // Finding the min or max of a set of variables where we don't know if they
43
+ // are defined, is a pattern that is repeated several places in Highcharts.
44
+ // Consider making this a global utility method.
45
+ numExt = function (extreme) {
46
+ var numbers = [].filter.call(arguments, isNumber);
47
+
48
+ if (numbers.length) {
49
+ return Math[extreme].apply(0, numbers);
50
+ }
51
+ };
52
+
53
+ // add more resolution to units
54
+ units[4] = ['day', [1, 2, 3, 4]]; // allow more days
55
+ units[5] = ['week', [1, 2, 3]]; // allow more weeks
56
+
57
+ defaultSeriesType = seriesTypes.areaspline === undefined ?
58
+ 'line' :
59
+ 'areaspline';
60
+
61
+ extend(defaultOptions, {
62
+
63
+ /**
64
+ * Maximum range which can be set using the navigator's handles.
65
+ * Opposite of [xAxis.minRange](#xAxis.minRange).
66
+ *
67
+ * @sample {highstock} stock/navigator/maxrange/
68
+ * Defined max and min range
69
+ *
70
+ * @type {number}
71
+ * @since 6.0.0
72
+ * @product highstock
73
+ * @apioption xAxis.maxRange
74
+ */
75
+
76
+ /**
77
+ * The navigator is a small series below the main series, displaying
78
+ * a view of the entire data set. It provides tools to zoom in and
79
+ * out on parts of the data as well as panning across the dataset.
80
+ *
81
+ * @product highstock
82
+ * @optionparent navigator
83
+ */
84
+ navigator: {
85
+
86
+ /**
87
+ * Whether the navigator and scrollbar should adapt to updated data
88
+ * in the base X axis. When loading data async, as in the demo below,
89
+ * this should be `false`. Otherwise new data will trigger navigator
90
+ * redraw, which will cause unwanted looping. In the demo below, the
91
+ * data in the navigator is set only once. On navigating, only the main
92
+ * chart content is updated.
93
+ *
94
+ * @sample {highstock} stock/demo/lazy-loading/
95
+ * Set to false with async data loading
96
+ *
97
+ * @type {boolean}
98
+ * @default true
99
+ * @product highstock
100
+ * @apioption navigator.adaptToUpdatedData
101
+ */
102
+
103
+ /**
104
+ * An integer identifying the index to use for the base series, or a
105
+ * string representing the id of the series.
106
+ *
107
+ * **Note**: As of Highcharts 5.0, this is now a deprecated option.
108
+ * Prefer [series.showInNavigator](#plotOptions.series.showInNavigator).
109
+ *
110
+ * @see [series.showInNavigator](#plotOptions.series.showInNavigator)
111
+ *
112
+ * @deprecated
113
+ * @type {*}
114
+ * @default 0
115
+ * @product highstock
116
+ * @apioption navigator.baseSeries
117
+ */
118
+
119
+ /**
120
+ * Enable or disable the navigator.
121
+ *
122
+ * @sample {highstock} stock/navigator/enabled/
123
+ * Disable the navigator
124
+ *
125
+ * @type {boolean}
126
+ * @default true
127
+ * @product highstock
128
+ * @apioption navigator.enabled
129
+ */
130
+
131
+ /**
132
+ * When the chart is inverted, whether to draw the navigator on the
133
+ * opposite side.
134
+ *
135
+ * @type {boolean}
136
+ * @default false
137
+ * @since 5.0.8
138
+ * @product highstock
139
+ * @apioption navigator.opposite
140
+ */
141
+
142
+ /**
143
+ * The height of the navigator.
144
+ *
145
+ * @sample {highstock} stock/navigator/height/
146
+ * A higher navigator
147
+ *
148
+ * @product highstock
149
+ */
150
+ height: 40,
151
+
152
+ /**
153
+ * The distance from the nearest element, the X axis or X axis labels.
154
+ *
155
+ * @sample {highstock} stock/navigator/margin/
156
+ * A margin of 2 draws the navigator closer to the X axis labels
157
+ *
158
+ * @product highstock
159
+ */
160
+ margin: 25,
161
+
162
+ /**
163
+ * Whether the mask should be inside the range marking the zoomed
164
+ * range, or outside. In Highstock 1.x it was always `false`.
165
+ *
166
+ * @sample {highstock} stock/navigator/maskinside-false/
167
+ * False, mask outside
168
+ *
169
+ * @since 2.0
170
+ * @product highstock
171
+ */
172
+ maskInside: true,
173
+
174
+ /**
175
+ * Options for the handles for dragging the zoomed area.
176
+ *
177
+ * @sample {highstock} stock/navigator/handles/
178
+ * Colored handles
179
+ *
180
+ * @product highstock
181
+ */
182
+ handles: {
183
+ /**
184
+ * Width for handles.
185
+ *
186
+ * @sample {highstock} stock/navigator/styled-handles/
187
+ * Styled handles
188
+ *
189
+ * @since 6.0.0
190
+ * @product highstock
191
+ */
192
+ width: 7,
193
+
194
+ /**
195
+ * Height for handles.
196
+ *
197
+ * @sample {highstock} stock/navigator/styled-handles/
198
+ * Styled handles
199
+ *
200
+ * @since 6.0.0
201
+ * @product highstock
202
+ */
203
+ height: 15,
204
+
205
+ /**
206
+ * Array to define shapes of handles. 0-index for left, 1-index for
207
+ * right.
208
+ *
209
+ * Additionally, the URL to a graphic can be given on this form:
210
+ * `url(graphic.png)`. Note that for the image to be applied to
211
+ * exported charts, its URL needs to be accessible by the export
212
+ * server.
213
+ *
214
+ * Custom callbacks for symbol path generation can also be added to
215
+ * `Highcharts.SVGRenderer.prototype.symbols`. The callback is then
216
+ * used by its method name, as shown in the demo.
217
+ *
218
+ * @sample {highstock} stock/navigator/styled-handles/
219
+ * Styled handles
220
+ *
221
+ * @type {Array<string>}
222
+ * @default ["navigator-handle", "navigator-handle"]
223
+ * @since 6.0.0
224
+ * @product highstock
225
+ */
226
+ symbols: ['navigator-handle', 'navigator-handle'],
227
+
228
+ /**
229
+ * Allows to enable/disable handles.
230
+ *
231
+ * @since 6.0.0
232
+ * @product highstock
233
+ */
234
+ enabled: true,
235
+
236
+ /**
237
+ * The width for the handle border and the stripes inside.
238
+ *
239
+ * @sample {highstock} stock/navigator/styled-handles/
240
+ * Styled handles
241
+ *
242
+ * @since 6.0.0
243
+ * @product highstock
244
+ * @apioption navigator.handles.lineWidth
245
+ */
246
+ lineWidth: 1,
247
+
248
+ /**
249
+ * The fill for the handle.
250
+ *
251
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
252
+ * @product highstock
253
+ */
254
+ backgroundColor: '#f2f2f2',
255
+
256
+ /**
257
+ * The stroke for the handle border and the stripes inside.
258
+ *
259
+ * @type {Highcharts.ColorString}
260
+ * @product highstock
261
+ */
262
+ borderColor: '#999999'
263
+ },
264
+
265
+ /**
266
+ * The color of the mask covering the areas of the navigator series
267
+ * that are currently not visible in the main series. The default
268
+ * color is bluish with an opacity of 0.3 to see the series below.
269
+ *
270
+ * @see In styled mode, the mask is styled with the
271
+ * `.highcharts-navigator-mask` and
272
+ * `.highcharts-navigator-mask-inside` classes.
273
+ *
274
+ * @sample {highstock} stock/navigator/maskfill/
275
+ * Blue, semi transparent mask
276
+ *
277
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
278
+ * @default rgba(102,133,194,0.3)
279
+ * @product highstock
280
+ */
281
+ maskFill: color('#6685c2').setOpacity(0.3).get(),
282
+
283
+ /**
284
+ * The color of the line marking the currently zoomed area in the
285
+ * navigator.
286
+ *
287
+ * @sample {highstock} stock/navigator/outline/
288
+ * 2px blue outline
289
+ *
290
+ * @type {Highcharts.ColorString}
291
+ * @default #cccccc
292
+ * @product highstock
293
+ */
294
+ outlineColor: '#cccccc',
295
+
296
+ /**
297
+ * The width of the line marking the currently zoomed area in the
298
+ * navigator.
299
+ *
300
+ * @see In styled mode, the outline stroke width is set with the
301
+ * `.highcharts-navigator-outline` class.
302
+ *
303
+ * @sample {highstock} stock/navigator/outline/
304
+ * 2px blue outline
305
+ *
306
+ * @type {number}
307
+ * @product highstock
308
+ */
309
+ outlineWidth: 1,
310
+
311
+ /**
312
+ * Options for the navigator series. Available options are the same
313
+ * as any series, documented at [plotOptions](#plotOptions.series)
314
+ * and [series](#series).
315
+ *
316
+ * Unless data is explicitly defined on navigator.series, the data
317
+ * is borrowed from the first series in the chart.
318
+ *
319
+ * Default series options for the navigator series are:
320
+ *
321
+ * <pre>series: {
322
+ * type: 'areaspline',
323
+ * fillOpacity: 0.05,
324
+ * dataGrouping: {
325
+ * smoothed: true
326
+ * },
327
+ * lineWidth: 1,
328
+ * marker: {
329
+ * enabled: false
330
+ * }
331
+ * }</pre>
332
+ *
333
+ * @see In styled mode, the navigator series is styled with the
334
+ * `.highcharts-navigator-series` class.
335
+ *
336
+ * @sample {highstock} stock/navigator/series-data/
337
+ * Using a separate data set for the navigator
338
+ * @sample {highstock} stock/navigator/series/
339
+ * A green navigator series
340
+ *
341
+ * @product highstock
342
+ */
343
+ series: {
344
+
345
+ /**
346
+ * The type of the navigator series. Defaults to `areaspline` if
347
+ * defined, otherwise `line`.
348
+ *
349
+ * @type {string}
350
+ * @default areaspline
351
+ */
352
+ type: defaultSeriesType,
353
+
354
+ /**
355
+ * The fill opacity of the navigator series.
356
+ */
357
+ fillOpacity: 0.05,
358
+
359
+ /**
360
+ * The pixel line width of the navigator series.
361
+ */
362
+ lineWidth: 1,
363
+
364
+ /**
365
+ * @ignore-option
366
+ */
367
+ compare: null,
368
+
369
+ /**
370
+ * Data grouping options for the navigator series.
371
+ *
372
+ * @extends plotOptions.series.dataGrouping
373
+ */
374
+ dataGrouping: {
375
+ approximation: 'average',
376
+ enabled: true,
377
+ groupPixelWidth: 2,
378
+ smoothed: true,
379
+ units: units
380
+ },
381
+
382
+ /**
383
+ * Data label options for the navigator series. Data labels are
384
+ * disabled by default on the navigator series.
385
+ *
386
+ * @extends plotOptions.series.dataLabels
387
+ */
388
+ dataLabels: {
389
+ enabled: false,
390
+ zIndex: 2 // #1839
391
+ },
392
+
393
+ id: 'highcharts-navigator-series',
394
+
395
+ className: 'highcharts-navigator-series',
396
+
397
+ /**
398
+ * Line color for the navigator series. Allows setting the color
399
+ * while disallowing the default candlestick setting.
400
+ *
401
+ * @type {Highcharts.ColorString|null}
402
+ */
403
+ lineColor: null, // #4602
404
+
405
+ marker: {
406
+ enabled: false
407
+ },
408
+
409
+ pointRange: 0,
410
+
411
+ /**
412
+ * The threshold option. Setting it to 0 will make the default
413
+ * navigator area series draw its area from the 0 value and up.
414
+ *
415
+ * @type {number|null}
416
+ */
417
+ threshold: null
418
+ },
419
+
420
+ /**
421
+ * Options for the navigator X axis. Default series options
422
+ * for the navigator xAxis are:
423
+ *
424
+ * <pre>xAxis: {
425
+ * tickWidth: 0,
426
+ * lineWidth: 0,
427
+ * gridLineWidth: 1,
428
+ * tickPixelInterval: 200,
429
+ * labels: {
430
+ * align: 'left',
431
+ * style: {
432
+ * color: '#888'
433
+ * },
434
+ * x: 3,
435
+ * y: -4
436
+ * }
437
+ * }</pre>
438
+ *
439
+ * @extends xAxis
440
+ * @excluding linkedTo, maxZoom, minRange, opposite, range, scrollbar,
441
+ * showEmpty, maxRange
442
+ * @product highstock
443
+ */
444
+ xAxis: {
445
+ /**
446
+ * Additional range on the right side of the xAxis. Works similar to
447
+ * xAxis.maxPadding, but value is set in milliseconds.
448
+ * Can be set for both, main xAxis and navigator's xAxis.
449
+ *
450
+ * @since 6.0.0
451
+ * @product highstock
452
+ */
453
+ overscroll: 0,
454
+
455
+ className: 'highcharts-navigator-xaxis',
456
+
457
+ tickLength: 0,
458
+
459
+ lineWidth: 0,
460
+
461
+ gridLineColor: '#e6e6e6',
462
+
463
+ gridLineWidth: 1,
464
+
465
+ tickPixelInterval: 200,
466
+
467
+ labels: {
468
+
469
+ align: 'left',
470
+
471
+ /**
472
+ * @type {Highcharts.CSSObject}
473
+ */
474
+ style: {
475
+ /** @ignore */
476
+ color: '#999999'
477
+ },
478
+
479
+ x: 3,
480
+
481
+ y: -4
482
+
483
+ },
484
+
485
+ crosshair: false
486
+
487
+ },
488
+
489
+ /**
490
+ * Options for the navigator Y axis. Default series options
491
+ * for the navigator yAxis are:
492
+ *
493
+ * <pre>yAxis: {
494
+ * gridLineWidth: 0,
495
+ * startOnTick: false,
496
+ * endOnTick: false,
497
+ * minPadding: 0.1,
498
+ * maxPadding: 0.1,
499
+ * labels: {
500
+ * enabled: false
501
+ * },
502
+ * title: {
503
+ * text: null
504
+ * },
505
+ * tickWidth: 0
506
+ * }</pre>
507
+ *
508
+ * @extends yAxis
509
+ * @excluding height, linkedTo, maxZoom, minRange, ordinal, range,
510
+ * showEmpty, scrollbar, top, units, maxRange, minLength,
511
+ * maxLength, resize
512
+ * @product highstock
513
+ */
514
+ yAxis: {
515
+
516
+ className: 'highcharts-navigator-yaxis',
517
+
518
+ gridLineWidth: 0,
519
+
520
+ startOnTick: false,
521
+
522
+ endOnTick: false,
523
+
524
+ minPadding: 0.1,
525
+
526
+ maxPadding: 0.1,
527
+
528
+ labels: {
529
+ enabled: false
530
+ },
531
+
532
+ crosshair: false,
533
+
534
+ title: {
535
+ text: null
536
+ },
537
+
538
+ tickLength: 0,
539
+
540
+ tickWidth: 0
541
+
542
+ }
543
+
544
+ }
545
+
546
+ });
547
+
548
+ /**
549
+ * Draw one of the handles on the side of the zoomed range in the navigator
550
+ *
551
+ * @function Highcharts.Renderer#symbols.navigator-handle
552
+ *
553
+ * @param {boolean} inverted
554
+ * flag for chart.inverted
555
+ *
556
+ * @return {Highcharts.SVGPathArray}
557
+ * Path to be used in a handle
558
+ */
559
+ H.Renderer.prototype.symbols['navigator-handle'] = function (
560
+ x,
561
+ y,
562
+ w,
563
+ h,
564
+ options
565
+ ) {
566
+ var halfWidth = options.width / 2,
567
+ markerPosition = Math.round(halfWidth / 3) + 0.5,
568
+ height = options.height;
569
+
570
+ return [
571
+ 'M',
572
+ -halfWidth - 1, 0.5,
573
+ 'L',
574
+ halfWidth, 0.5,
575
+ 'L',
576
+ halfWidth, height + 0.5,
577
+ 'L',
578
+ -halfWidth - 1, height + 0.5,
579
+ 'L',
580
+ -halfWidth - 1, 0.5,
581
+ 'M',
582
+ -markerPosition, 4,
583
+ 'L',
584
+ -markerPosition, height - 3,
585
+ 'M',
586
+ markerPosition - 1, 4,
587
+ 'L',
588
+ markerPosition - 1, height - 3
589
+ ];
590
+ };
591
+
592
+ /**
593
+ * The Navigator class
594
+ *
595
+ * @private
596
+ * @class
597
+ * @name Highcharts.Navigator
598
+ *
599
+ * @param {Highcharts.Chart} chart
600
+ * Chart object
601
+ */
602
+ function Navigator(chart) {
603
+ this.init(chart);
604
+ }
605
+
606
+ Navigator.prototype = {
607
+
608
+ /**
609
+ * Draw one of the handles on the side of the zoomed range in the navigator
610
+ *
611
+ * @private
612
+ * @function Highcharts.Navigator#drawHandle
613
+ *
614
+ * @param {number} x
615
+ * The x center for the handle
616
+ *
617
+ * @param {number} index
618
+ * 0 for left and 1 for right
619
+ *
620
+ * @param {boolean} inverted
621
+ * flag for chart.inverted
622
+ *
623
+ * @param {string} verb
624
+ * use 'animate' or 'attr'
625
+ */
626
+ drawHandle: function (x, index, inverted, verb) {
627
+ var navigator = this,
628
+ height = navigator.navigatorOptions.handles.height;
629
+
630
+ // Place it
631
+ navigator.handles[index][verb](inverted ? {
632
+ translateX: Math.round(navigator.left + navigator.height / 2),
633
+ translateY: Math.round(
634
+ navigator.top + parseInt(x, 10) + 0.5 - height
635
+ )
636
+ } : {
637
+ translateX: Math.round(navigator.left + parseInt(x, 10)),
638
+ translateY: Math.round(
639
+ navigator.top + navigator.height / 2 - height / 2 - 1
640
+ )
641
+ });
642
+ },
643
+
644
+ /**
645
+ * Render outline around the zoomed range
646
+ *
647
+ * @private
648
+ * @function Highcharts.Navigator#drawOutline
649
+ *
650
+ * @param {number} zoomedMin
651
+ * in pixels position where zoomed range starts
652
+ *
653
+ * @param {number} zoomedMax
654
+ * in pixels position where zoomed range ends
655
+ *
656
+ * @param {boolean} inverted
657
+ * flag if chart is inverted
658
+ *
659
+ * @param {string} verb
660
+ * use 'animate' or 'attr'
661
+ */
662
+ drawOutline: function (zoomedMin, zoomedMax, inverted, verb) {
663
+ var navigator = this,
664
+ maskInside = navigator.navigatorOptions.maskInside,
665
+ outlineWidth = navigator.outline.strokeWidth(),
666
+ halfOutline = outlineWidth / 2,
667
+ outlineCorrection = (outlineWidth % 2) / 2, // #5800
668
+ outlineHeight = navigator.outlineHeight,
669
+ scrollbarHeight = navigator.scrollbarHeight,
670
+ navigatorSize = navigator.size,
671
+ left = navigator.left - scrollbarHeight,
672
+ navigatorTop = navigator.top,
673
+ verticalMin,
674
+ path;
675
+
676
+ if (inverted) {
677
+ left -= halfOutline;
678
+ verticalMin = navigatorTop + zoomedMax + outlineCorrection;
679
+ zoomedMax = navigatorTop + zoomedMin + outlineCorrection;
680
+
681
+ path = [
682
+ 'M',
683
+ left + outlineHeight,
684
+ navigatorTop - scrollbarHeight - outlineCorrection, // top edge
685
+ 'L',
686
+ left + outlineHeight,
687
+ verticalMin, // top right of zoomed range
688
+ 'L',
689
+ left,
690
+ verticalMin, // top left of z.r.
691
+ 'L',
692
+ left,
693
+ zoomedMax, // bottom left of z.r.
694
+ 'L',
695
+ left + outlineHeight,
696
+ zoomedMax, // bottom right of z.r.
697
+ 'L',
698
+ left + outlineHeight,
699
+ navigatorTop + navigatorSize + scrollbarHeight // bottom edge
700
+ ].concat(maskInside ? [
701
+ 'M',
702
+ left + outlineHeight,
703
+ verticalMin - halfOutline, // upper left of zoomed range
704
+ 'L',
705
+ left + outlineHeight,
706
+ zoomedMax + halfOutline // upper right of z.r.
707
+ ] : []);
708
+ } else {
709
+ zoomedMin += left + scrollbarHeight - outlineCorrection;
710
+ zoomedMax += left + scrollbarHeight - outlineCorrection;
711
+ navigatorTop += halfOutline;
712
+
713
+ path = [
714
+ 'M',
715
+ left,
716
+ navigatorTop, // left
717
+ 'L',
718
+ zoomedMin,
719
+ navigatorTop, // upper left of zoomed range
720
+ 'L',
721
+ zoomedMin,
722
+ navigatorTop + outlineHeight, // lower left of z.r.
723
+ 'L',
724
+ zoomedMax,
725
+ navigatorTop + outlineHeight, // lower right of z.r.
726
+ 'L',
727
+ zoomedMax,
728
+ navigatorTop, // upper right of z.r.
729
+ 'L',
730
+ left + navigatorSize + scrollbarHeight * 2,
731
+ navigatorTop // right
732
+ ].concat(maskInside ? [
733
+ 'M',
734
+ zoomedMin - halfOutline,
735
+ navigatorTop, // upper left of zoomed range
736
+ 'L',
737
+ zoomedMax + halfOutline,
738
+ navigatorTop // upper right of z.r.
739
+ ] : []);
740
+ }
741
+ navigator.outline[verb]({
742
+ d: path
743
+ });
744
+ },
745
+
746
+ /**
747
+ * Render outline around the zoomed range
748
+ *
749
+ * @private
750
+ * @function Highcharts.Navigator#drawMasks
751
+ *
752
+ * @param {number} zoomedMin
753
+ * in pixels position where zoomed range starts
754
+ *
755
+ * @param {number} zoomedMax
756
+ * in pixels position where zoomed range ends
757
+ *
758
+ * @param {boolean} inverted
759
+ * flag if chart is inverted
760
+ *
761
+ * @param {string} verb
762
+ * use 'animate' or 'attr'
763
+ */
764
+ drawMasks: function (zoomedMin, zoomedMax, inverted, verb) {
765
+ var navigator = this,
766
+ left = navigator.left,
767
+ top = navigator.top,
768
+ navigatorHeight = navigator.height,
769
+ height,
770
+ width,
771
+ x,
772
+ y;
773
+
774
+ // Determine rectangle position & size
775
+ // According to (non)inverted position:
776
+ if (inverted) {
777
+ x = [left, left, left];
778
+ y = [top, top + zoomedMin, top + zoomedMax];
779
+ width = [navigatorHeight, navigatorHeight, navigatorHeight];
780
+ height = [
781
+ zoomedMin,
782
+ zoomedMax - zoomedMin,
783
+ navigator.size - zoomedMax
784
+ ];
785
+ } else {
786
+ x = [left, left + zoomedMin, left + zoomedMax];
787
+ y = [top, top, top];
788
+ width = [
789
+ zoomedMin,
790
+ zoomedMax - zoomedMin,
791
+ navigator.size - zoomedMax
792
+ ];
793
+ height = [navigatorHeight, navigatorHeight, navigatorHeight];
794
+ }
795
+ navigator.shades.forEach(function (shade, i) {
796
+ shade[verb]({
797
+ x: x[i],
798
+ y: y[i],
799
+ width: width[i],
800
+ height: height[i]
801
+ });
802
+ });
803
+ },
804
+
805
+ /**
806
+ * Generate DOM elements for a navigator:
807
+ *
808
+ * - main navigator group
809
+ *
810
+ * - all shades
811
+ *
812
+ * - outline
813
+ *
814
+ * - handles
815
+ *
816
+ * @private
817
+ * @function Highcharts.Navigator#renderElements
818
+ */
819
+ renderElements: function () {
820
+ var navigator = this,
821
+ navigatorOptions = navigator.navigatorOptions,
822
+ maskInside = navigatorOptions.maskInside,
823
+ chart = navigator.chart,
824
+ inverted = chart.inverted,
825
+ renderer = chart.renderer,
826
+ navigatorGroup,
827
+ mouseCursor = {
828
+ cursor: inverted ? 'ns-resize' : 'ew-resize'
829
+ };
830
+
831
+ // Create the main navigator group
832
+ navigator.navigatorGroup = navigatorGroup = renderer.g('navigator')
833
+ .attr({
834
+ zIndex: 8,
835
+ visibility: 'hidden'
836
+ })
837
+ .add();
838
+
839
+ // Create masks, each mask will get events and fill:
840
+ [
841
+ !maskInside,
842
+ maskInside,
843
+ !maskInside
844
+ ].forEach(function (hasMask, index) {
845
+ navigator.shades[index] = renderer.rect()
846
+ .addClass('highcharts-navigator-mask' +
847
+ (index === 1 ? '-inside' : '-outside'))
848
+ .add(navigatorGroup);
849
+
850
+ if (!chart.styledMode) {
851
+ navigator.shades[index]
852
+ .attr({
853
+ fill: hasMask ?
854
+ navigatorOptions.maskFill :
855
+ 'rgba(0,0,0,0)'
856
+ })
857
+ .css(index === 1 && mouseCursor);
858
+ }
859
+ });
860
+
861
+ // Create the outline:
862
+ navigator.outline = renderer.path()
863
+ .addClass('highcharts-navigator-outline')
864
+ .add(navigatorGroup);
865
+
866
+ if (!chart.styledMode) {
867
+ navigator.outline.attr({
868
+ 'stroke-width': navigatorOptions.outlineWidth,
869
+ stroke: navigatorOptions.outlineColor
870
+ });
871
+ }
872
+
873
+ // Create the handlers:
874
+ if (navigatorOptions.handles.enabled) {
875
+ [0, 1].forEach(function (index) {
876
+ navigatorOptions.handles.inverted = chart.inverted;
877
+ navigator.handles[index] = renderer.symbol(
878
+ navigatorOptions.handles.symbols[index],
879
+ -navigatorOptions.handles.width / 2 - 1,
880
+ 0,
881
+ navigatorOptions.handles.width,
882
+ navigatorOptions.handles.height,
883
+ navigatorOptions.handles
884
+ );
885
+ // zIndex = 6 for right handle, 7 for left.
886
+ // Can't be 10, because of the tooltip in inverted chart #2908
887
+ navigator.handles[index].attr({ zIndex: 7 - index })
888
+ .addClass(
889
+ 'highcharts-navigator-handle ' +
890
+ 'highcharts-navigator-handle-' +
891
+ ['left', 'right'][index]
892
+ ).add(navigatorGroup);
893
+
894
+ if (!chart.styledMode) {
895
+ var handlesOptions = navigatorOptions.handles;
896
+
897
+ navigator.handles[index]
898
+ .attr({
899
+ fill: handlesOptions.backgroundColor,
900
+ stroke: handlesOptions.borderColor,
901
+ 'stroke-width': handlesOptions.lineWidth
902
+ })
903
+ .css(mouseCursor);
904
+ }
905
+ });
906
+ }
907
+ },
908
+
909
+ /**
910
+ * Update navigator
911
+ *
912
+ * @private
913
+ * @function Highcharts.Navigator#update
914
+ *
915
+ * @param {Highcharts.NavigatorOptions} options
916
+ * Options to merge in when updating navigator
917
+ */
918
+ update: function (options) {
919
+ // Remove references to old navigator series in base series
920
+ (this.series || []).forEach(function (series) {
921
+ if (series.baseSeries) {
922
+ delete series.baseSeries.navigatorSeries;
923
+ }
924
+ });
925
+ // Destroy and rebuild navigator
926
+ this.destroy();
927
+ var chartOptions = this.chart.options;
928
+
929
+ merge(true, chartOptions.navigator, this.options, options);
930
+ this.init(this.chart);
931
+ },
932
+
933
+ /**
934
+ * Render the navigator
935
+ *
936
+ * @private
937
+ * @function Highcharts.Navigator#render
938
+ *
939
+ * @param {number} min
940
+ * X axis value minimum
941
+ *
942
+ * @param {number} max
943
+ * X axis value maximum
944
+ *
945
+ * @param {number} pxMin
946
+ * Pixel value minimum
947
+ *
948
+ * @param {number} pxMax
949
+ * Pixel value maximum
950
+ */
951
+ render: function (min, max, pxMin, pxMax) {
952
+
953
+ var navigator = this,
954
+ chart = navigator.chart,
955
+ navigatorWidth,
956
+ scrollbarLeft,
957
+ scrollbarTop,
958
+ scrollbarHeight = navigator.scrollbarHeight,
959
+ navigatorSize,
960
+ xAxis = navigator.xAxis,
961
+ scrollbarXAxis = xAxis.fake ? chart.xAxis[0] : xAxis,
962
+ navigatorEnabled = navigator.navigatorEnabled,
963
+ zoomedMin,
964
+ zoomedMax,
965
+ rendered = navigator.rendered,
966
+ inverted = chart.inverted,
967
+ verb,
968
+ newMin,
969
+ newMax,
970
+ currentRange,
971
+ minRange = chart.xAxis[0].minRange,
972
+ maxRange = chart.xAxis[0].options.maxRange;
973
+
974
+ // Don't redraw while moving the handles (#4703).
975
+ if (this.hasDragged && !defined(pxMin)) {
976
+ return;
977
+ }
978
+
979
+ // Don't render the navigator until we have data (#486, #4202, #5172).
980
+ if (!isNumber(min) || !isNumber(max)) {
981
+ // However, if navigator was already rendered, we may need to resize
982
+ // it. For example hidden series, but visible navigator (#6022).
983
+ if (rendered) {
984
+ pxMin = 0;
985
+ pxMax = pick(xAxis.width, scrollbarXAxis.width);
986
+ } else {
987
+ return;
988
+ }
989
+ }
990
+
991
+ navigator.left = pick(
992
+ xAxis.left,
993
+ // in case of scrollbar only, without navigator
994
+ chart.plotLeft + scrollbarHeight + (inverted ? chart.plotWidth : 0)
995
+ );
996
+
997
+ navigator.size = zoomedMax = navigatorSize = pick(
998
+ xAxis.len,
999
+ (inverted ? chart.plotHeight : chart.plotWidth) -
1000
+ 2 * scrollbarHeight
1001
+ );
1002
+
1003
+ if (inverted) {
1004
+ navigatorWidth = scrollbarHeight;
1005
+ } else {
1006
+ navigatorWidth = navigatorSize + 2 * scrollbarHeight;
1007
+ }
1008
+
1009
+ // Get the pixel position of the handles
1010
+ pxMin = pick(pxMin, xAxis.toPixels(min, true));
1011
+ pxMax = pick(pxMax, xAxis.toPixels(max, true));
1012
+
1013
+ // Verify (#1851, #2238)
1014
+ if (!isNumber(pxMin) || Math.abs(pxMin) === Infinity) {
1015
+ pxMin = 0;
1016
+ pxMax = navigatorWidth;
1017
+ }
1018
+
1019
+ // Are we below the minRange? (#2618, #6191)
1020
+ newMin = xAxis.toValue(pxMin, true);
1021
+ newMax = xAxis.toValue(pxMax, true);
1022
+ currentRange = Math.abs(H.correctFloat(newMax - newMin));
1023
+ if (currentRange < minRange) {
1024
+ if (this.grabbedLeft) {
1025
+ pxMin = xAxis.toPixels(newMax - minRange, true);
1026
+ } else if (this.grabbedRight) {
1027
+ pxMax = xAxis.toPixels(newMin + minRange, true);
1028
+ }
1029
+ } else if (defined(maxRange) && currentRange > maxRange) {
1030
+ if (this.grabbedLeft) {
1031
+ pxMin = xAxis.toPixels(newMax - maxRange, true);
1032
+ } else if (this.grabbedRight) {
1033
+ pxMax = xAxis.toPixels(newMin + maxRange, true);
1034
+ }
1035
+ }
1036
+
1037
+ // Handles are allowed to cross, but never exceed the plot area
1038
+ navigator.zoomedMax = Math.min(Math.max(pxMin, pxMax, 0), zoomedMax);
1039
+ navigator.zoomedMin = Math.min(
1040
+ Math.max(
1041
+ navigator.fixedWidth ?
1042
+ navigator.zoomedMax - navigator.fixedWidth :
1043
+ Math.min(pxMin, pxMax),
1044
+ 0
1045
+ ),
1046
+ zoomedMax
1047
+ );
1048
+
1049
+ navigator.range = navigator.zoomedMax - navigator.zoomedMin;
1050
+
1051
+ zoomedMax = Math.round(navigator.zoomedMax);
1052
+ zoomedMin = Math.round(navigator.zoomedMin);
1053
+
1054
+ if (navigatorEnabled) {
1055
+ navigator.navigatorGroup.attr({
1056
+ visibility: 'visible'
1057
+ });
1058
+ // Place elements
1059
+ verb = rendered && !navigator.hasDragged ? 'animate' : 'attr';
1060
+
1061
+ navigator.drawMasks(zoomedMin, zoomedMax, inverted, verb);
1062
+ navigator.drawOutline(zoomedMin, zoomedMax, inverted, verb);
1063
+
1064
+ if (navigator.navigatorOptions.handles.enabled) {
1065
+ navigator.drawHandle(zoomedMin, 0, inverted, verb);
1066
+ navigator.drawHandle(zoomedMax, 1, inverted, verb);
1067
+ }
1068
+ }
1069
+
1070
+ if (navigator.scrollbar) {
1071
+ if (inverted) {
1072
+ scrollbarTop = navigator.top - scrollbarHeight;
1073
+ scrollbarLeft = navigator.left - scrollbarHeight +
1074
+ (navigatorEnabled || !scrollbarXAxis.opposite ? 0 :
1075
+ // Multiple axes has offsets:
1076
+ (scrollbarXAxis.titleOffset || 0) +
1077
+ // Self margin from the axis.title
1078
+ scrollbarXAxis.axisTitleMargin
1079
+ );
1080
+ scrollbarHeight = navigatorSize + 2 * scrollbarHeight;
1081
+ } else {
1082
+ scrollbarTop = navigator.top +
1083
+ (navigatorEnabled ? navigator.height : -scrollbarHeight);
1084
+ scrollbarLeft = navigator.left - scrollbarHeight;
1085
+ }
1086
+ // Reposition scrollbar
1087
+ navigator.scrollbar.position(
1088
+ scrollbarLeft,
1089
+ scrollbarTop,
1090
+ navigatorWidth,
1091
+ scrollbarHeight
1092
+ );
1093
+ // Keep scale 0-1
1094
+ navigator.scrollbar.setRange(
1095
+ // Use real value, not rounded because range can be very small
1096
+ // (#1716)
1097
+ navigator.zoomedMin / (navigatorSize || 1),
1098
+ navigator.zoomedMax / (navigatorSize || 1)
1099
+ );
1100
+ }
1101
+ navigator.rendered = true;
1102
+ },
1103
+
1104
+ /**
1105
+ * Set up the mouse and touch events for the navigator
1106
+ *
1107
+ * @private
1108
+ * @function Highcharts.Navigator#addMouseEvents
1109
+ */
1110
+ addMouseEvents: function () {
1111
+ var navigator = this,
1112
+ chart = navigator.chart,
1113
+ container = chart.container,
1114
+ eventsToUnbind = [],
1115
+ mouseMoveHandler,
1116
+ mouseUpHandler;
1117
+
1118
+ /**
1119
+ * Create mouse events' handlers.
1120
+ * Make them as separate functions to enable wrapping them:
1121
+ */
1122
+ navigator.mouseMoveHandler = mouseMoveHandler = function (e) {
1123
+ navigator.onMouseMove(e);
1124
+ };
1125
+ navigator.mouseUpHandler = mouseUpHandler = function (e) {
1126
+ navigator.onMouseUp(e);
1127
+ };
1128
+
1129
+ // Add shades and handles mousedown events
1130
+ eventsToUnbind = navigator.getPartsEvents('mousedown');
1131
+ // Add mouse move and mouseup events. These are bind to doc/container,
1132
+ // because Navigator.grabbedSomething flags are stored in mousedown
1133
+ // events
1134
+ eventsToUnbind.push(
1135
+ addEvent(container, 'mousemove', mouseMoveHandler),
1136
+ addEvent(container.ownerDocument, 'mouseup', mouseUpHandler)
1137
+ );
1138
+
1139
+ // Touch events
1140
+ if (hasTouch) {
1141
+ eventsToUnbind.push(
1142
+ addEvent(container, 'touchmove', mouseMoveHandler),
1143
+ addEvent(container.ownerDocument, 'touchend', mouseUpHandler)
1144
+ );
1145
+ eventsToUnbind.concat(navigator.getPartsEvents('touchstart'));
1146
+ }
1147
+
1148
+ navigator.eventsToUnbind = eventsToUnbind;
1149
+
1150
+ // Data events
1151
+ if (navigator.series && navigator.series[0]) {
1152
+ eventsToUnbind.push(
1153
+ addEvent(
1154
+ navigator.series[0].xAxis,
1155
+ 'foundExtremes',
1156
+ function () {
1157
+ chart.navigator.modifyNavigatorAxisExtremes();
1158
+ }
1159
+ )
1160
+ );
1161
+ }
1162
+ },
1163
+
1164
+ /**
1165
+ * Generate events for handles and masks
1166
+ *
1167
+ * @private
1168
+ * @function Highcharts.Navigator#getPartsEvents
1169
+ *
1170
+ * @param {string} eventName
1171
+ * Event name handler, 'mousedown' or 'touchstart'
1172
+ *
1173
+ * @return {Array<Function>}
1174
+ * An array of functions to remove navigator functions from the
1175
+ * events again.
1176
+ */
1177
+ getPartsEvents: function (eventName) {
1178
+ var navigator = this,
1179
+ events = [];
1180
+
1181
+ ['shades', 'handles'].forEach(function (name) {
1182
+ navigator[name].forEach(function (navigatorItem, index) {
1183
+ events.push(
1184
+ addEvent(
1185
+ navigatorItem.element,
1186
+ eventName,
1187
+ function (e) {
1188
+ navigator[name + 'Mousedown'](e, index);
1189
+ }
1190
+ )
1191
+ );
1192
+ });
1193
+ });
1194
+ return events;
1195
+ },
1196
+
1197
+ /**
1198
+ * Mousedown on a shaded mask, either:
1199
+ *
1200
+ * - will be stored for future drag&drop
1201
+ *
1202
+ * - will directly shift to a new range
1203
+ *
1204
+ * @private
1205
+ * @function Highcharts.Navigator#shadesMousedown
1206
+ *
1207
+ * @param {global.PointerEventObject} e
1208
+ * Mouse event
1209
+ *
1210
+ * @param {number} index
1211
+ * Index of a mask in Navigator.shades array
1212
+ */
1213
+ shadesMousedown: function (e, index) {
1214
+ e = this.chart.pointer.normalize(e);
1215
+
1216
+ var navigator = this,
1217
+ chart = navigator.chart,
1218
+ xAxis = navigator.xAxis,
1219
+ zoomedMin = navigator.zoomedMin,
1220
+ navigatorPosition = navigator.left,
1221
+ navigatorSize = navigator.size,
1222
+ range = navigator.range,
1223
+ chartX = e.chartX,
1224
+ fixedMax,
1225
+ fixedMin,
1226
+ ext,
1227
+ left;
1228
+
1229
+ // For inverted chart, swap some options:
1230
+ if (chart.inverted) {
1231
+ chartX = e.chartY;
1232
+ navigatorPosition = navigator.top;
1233
+ }
1234
+
1235
+ if (index === 1) {
1236
+ // Store information for drag&drop
1237
+ navigator.grabbedCenter = chartX;
1238
+ navigator.fixedWidth = range;
1239
+ navigator.dragOffset = chartX - zoomedMin;
1240
+ } else {
1241
+ // Shift the range by clicking on shaded areas
1242
+ left = chartX - navigatorPosition - range / 2;
1243
+ if (index === 0) {
1244
+ left = Math.max(0, left);
1245
+ } else if (index === 2 && left + range >= navigatorSize) {
1246
+ left = navigatorSize - range;
1247
+ if (navigator.reversedExtremes) {
1248
+ // #7713
1249
+ left -= range;
1250
+ fixedMin = navigator.getUnionExtremes().dataMin;
1251
+ } else {
1252
+ // #2293, #3543
1253
+ fixedMax = navigator.getUnionExtremes().dataMax;
1254
+ }
1255
+ }
1256
+ if (left !== zoomedMin) { // it has actually moved
1257
+ navigator.fixedWidth = range; // #1370
1258
+
1259
+ ext = xAxis.toFixedRange(
1260
+ left,
1261
+ left + range,
1262
+ fixedMin,
1263
+ fixedMax
1264
+ );
1265
+ if (defined(ext.min)) { // #7411
1266
+ chart.xAxis[0].setExtremes(
1267
+ Math.min(ext.min, ext.max),
1268
+ Math.max(ext.min, ext.max),
1269
+ true,
1270
+ null, // auto animation
1271
+ { trigger: 'navigator' }
1272
+ );
1273
+ }
1274
+ }
1275
+ }
1276
+ },
1277
+
1278
+ /**
1279
+ * Mousedown on a handle mask.
1280
+ * Will store necessary information for drag&drop.
1281
+ *
1282
+ * @private
1283
+ * @function Highcharts.Navigator#handlesMousedown
1284
+ *
1285
+ * @param {Highcharts.PointerEventObject} e
1286
+ * Mouse event
1287
+ *
1288
+ * @param {number} index
1289
+ * Index of a handle in Navigator.handles array
1290
+ */
1291
+ handlesMousedown: function (e, index) {
1292
+ e = this.chart.pointer.normalize(e);
1293
+
1294
+ var navigator = this,
1295
+ chart = navigator.chart,
1296
+ baseXAxis = chart.xAxis[0],
1297
+ // For reversed axes, min and max are changed,
1298
+ // so the other extreme should be stored
1299
+ reverse = navigator.reversedExtremes;
1300
+
1301
+ if (index === 0) {
1302
+ // Grab the left handle
1303
+ navigator.grabbedLeft = true;
1304
+ navigator.otherHandlePos = navigator.zoomedMax;
1305
+ navigator.fixedExtreme = reverse ? baseXAxis.min : baseXAxis.max;
1306
+ } else {
1307
+ // Grab the right handle
1308
+ navigator.grabbedRight = true;
1309
+ navigator.otherHandlePos = navigator.zoomedMin;
1310
+ navigator.fixedExtreme = reverse ? baseXAxis.max : baseXAxis.min;
1311
+ }
1312
+
1313
+ chart.fixedRange = null;
1314
+ },
1315
+ /**
1316
+ * Mouse move event based on x/y mouse position.
1317
+ *
1318
+ * @private
1319
+ * @function Highcharts.Navigator#onMouseMove
1320
+ *
1321
+ * @param {Highcharts.PointerEventObject} e
1322
+ * Mouse event
1323
+ */
1324
+ onMouseMove: function (e) {
1325
+ var navigator = this,
1326
+ chart = navigator.chart,
1327
+ left = navigator.left,
1328
+ navigatorSize = navigator.navigatorSize,
1329
+ range = navigator.range,
1330
+ dragOffset = navigator.dragOffset,
1331
+ inverted = chart.inverted,
1332
+ chartX;
1333
+
1334
+
1335
+ // In iOS, a mousemove event with e.pageX === 0 is fired when holding
1336
+ // the finger down in the center of the scrollbar. This should be
1337
+ // ignored.
1338
+ if (!e.touches || e.touches[0].pageX !== 0) { // #4696
1339
+
1340
+ e = chart.pointer.normalize(e);
1341
+ chartX = e.chartX;
1342
+
1343
+ // Swap some options for inverted chart
1344
+ if (inverted) {
1345
+ left = navigator.top;
1346
+ chartX = e.chartY;
1347
+ }
1348
+
1349
+ // Drag left handle or top handle
1350
+ if (navigator.grabbedLeft) {
1351
+ navigator.hasDragged = true;
1352
+ navigator.render(
1353
+ 0,
1354
+ 0,
1355
+ chartX - left,
1356
+ navigator.otherHandlePos
1357
+ );
1358
+ // Drag right handle or bottom handle
1359
+ } else if (navigator.grabbedRight) {
1360
+ navigator.hasDragged = true;
1361
+ navigator.render(
1362
+ 0,
1363
+ 0,
1364
+ navigator.otherHandlePos,
1365
+ chartX - left
1366
+ );
1367
+ // Drag scrollbar or open area in navigator
1368
+ } else if (navigator.grabbedCenter) {
1369
+ navigator.hasDragged = true;
1370
+ if (chartX < dragOffset) { // outside left
1371
+ chartX = dragOffset;
1372
+ // outside right
1373
+ } else if (chartX > navigatorSize + dragOffset - range) {
1374
+ chartX = navigatorSize + dragOffset - range;
1375
+ }
1376
+
1377
+ navigator.render(
1378
+ 0,
1379
+ 0,
1380
+ chartX - dragOffset,
1381
+ chartX - dragOffset + range
1382
+ );
1383
+ }
1384
+ if (
1385
+ navigator.hasDragged &&
1386
+ navigator.scrollbar &&
1387
+ pick(
1388
+ navigator.scrollbar.options.liveRedraw,
1389
+
1390
+ // By default, don't run live redraw on VML, on touch
1391
+ // devices or if the chart is in boost.
1392
+ H.svg && !isTouchDevice && !this.chart.isBoosting
1393
+ )
1394
+ ) {
1395
+ e.DOMType = e.type; // DOMType is for IE8
1396
+ setTimeout(function () {
1397
+ navigator.onMouseUp(e);
1398
+ }, 0);
1399
+ }
1400
+ }
1401
+ },
1402
+
1403
+ /**
1404
+ * Mouse up event based on x/y mouse position.
1405
+ *
1406
+ * @private
1407
+ * @function Highcharts.Navigator#onMouseUp
1408
+ *
1409
+ * @param {Highcharts.PointerEventObject} e
1410
+ * Mouse event
1411
+ */
1412
+ onMouseUp: function (e) {
1413
+ var navigator = this,
1414
+ chart = navigator.chart,
1415
+ xAxis = navigator.xAxis,
1416
+ scrollbar = navigator.scrollbar,
1417
+ unionExtremes,
1418
+ fixedMin,
1419
+ fixedMax,
1420
+ ext,
1421
+ DOMEvent = e.DOMEvent || e;
1422
+
1423
+ if (
1424
+ // MouseUp is called for both, navigator and scrollbar (that order),
1425
+ // which causes calling afterSetExtremes twice. Prevent first call
1426
+ // by checking if scrollbar is going to set new extremes (#6334)
1427
+ (navigator.hasDragged && (!scrollbar || !scrollbar.hasDragged)) ||
1428
+ e.trigger === 'scrollbar'
1429
+ ) {
1430
+ unionExtremes = navigator.getUnionExtremes();
1431
+
1432
+ // When dragging one handle, make sure the other one doesn't change
1433
+ if (navigator.zoomedMin === navigator.otherHandlePos) {
1434
+ fixedMin = navigator.fixedExtreme;
1435
+ } else if (navigator.zoomedMax === navigator.otherHandlePos) {
1436
+ fixedMax = navigator.fixedExtreme;
1437
+ }
1438
+ // Snap to right edge (#4076)
1439
+ if (navigator.zoomedMax === navigator.size) {
1440
+ fixedMax = navigator.reversedExtremes ?
1441
+ unionExtremes.dataMin : unionExtremes.dataMax;
1442
+ }
1443
+
1444
+ // Snap to left edge (#7576)
1445
+ if (navigator.zoomedMin === 0) {
1446
+ fixedMin = navigator.reversedExtremes ?
1447
+ unionExtremes.dataMax : unionExtremes.dataMin;
1448
+ }
1449
+
1450
+ ext = xAxis.toFixedRange(
1451
+ navigator.zoomedMin,
1452
+ navigator.zoomedMax,
1453
+ fixedMin,
1454
+ fixedMax
1455
+ );
1456
+
1457
+ if (defined(ext.min)) {
1458
+ chart.xAxis[0].setExtremes(
1459
+ Math.min(ext.min, ext.max),
1460
+ Math.max(ext.min, ext.max),
1461
+ true,
1462
+ // Run animation when clicking buttons, scrollbar track etc,
1463
+ // but not when dragging handles or scrollbar
1464
+ navigator.hasDragged ? false : null,
1465
+ {
1466
+ trigger: 'navigator',
1467
+ triggerOp: 'navigator-drag',
1468
+ DOMEvent: DOMEvent // #1838
1469
+ }
1470
+ );
1471
+ }
1472
+ }
1473
+
1474
+ if (e.DOMType !== 'mousemove') {
1475
+ navigator.grabbedLeft = navigator.grabbedRight =
1476
+ navigator.grabbedCenter = navigator.fixedWidth =
1477
+ navigator.fixedExtreme = navigator.otherHandlePos =
1478
+ navigator.hasDragged = navigator.dragOffset = null;
1479
+ }
1480
+ },
1481
+
1482
+ /**
1483
+ * Removes the event handlers attached previously with addEvents.
1484
+ *
1485
+ * @private
1486
+ * @function Highcharts.Navigator#removeEvents
1487
+ */
1488
+ removeEvents: function () {
1489
+ if (this.eventsToUnbind) {
1490
+ this.eventsToUnbind.forEach(function (unbind) {
1491
+ unbind();
1492
+ });
1493
+ this.eventsToUnbind = undefined;
1494
+ }
1495
+ this.removeBaseSeriesEvents();
1496
+ },
1497
+
1498
+ /**
1499
+ * Remove data events.
1500
+ *
1501
+ * @private
1502
+ * @function Highcharts.Navigator#removeBaseSeriesEvents
1503
+ */
1504
+ removeBaseSeriesEvents: function () {
1505
+ var baseSeries = this.baseSeries || [];
1506
+
1507
+ if (this.navigatorEnabled && baseSeries[0]) {
1508
+ if (this.navigatorOptions.adaptToUpdatedData !== false) {
1509
+ baseSeries.forEach(function (series) {
1510
+ removeEvent(series, 'updatedData', this.updatedDataHandler);
1511
+ }, this);
1512
+ }
1513
+
1514
+ // We only listen for extremes-events on the first baseSeries
1515
+ if (baseSeries[0].xAxis) {
1516
+ removeEvent(
1517
+ baseSeries[0].xAxis,
1518
+ 'foundExtremes',
1519
+ this.modifyBaseAxisExtremes
1520
+ );
1521
+ }
1522
+ }
1523
+ },
1524
+
1525
+ /**
1526
+ * Initialize the Navigator object
1527
+ *
1528
+ * @private
1529
+ * @function Highcharts.Navigator#init
1530
+ *
1531
+ * @param {Highcharts.Chart} chart
1532
+ */
1533
+ init: function (chart) {
1534
+ var chartOptions = chart.options,
1535
+ navigatorOptions = chartOptions.navigator,
1536
+ navigatorEnabled = navigatorOptions.enabled,
1537
+ scrollbarOptions = chartOptions.scrollbar,
1538
+ scrollbarEnabled = scrollbarOptions.enabled,
1539
+ height = navigatorEnabled ? navigatorOptions.height : 0,
1540
+ scrollbarHeight = scrollbarEnabled ? scrollbarOptions.height : 0;
1541
+
1542
+ this.handles = [];
1543
+ this.shades = [];
1544
+
1545
+ this.chart = chart;
1546
+ this.setBaseSeries();
1547
+
1548
+ this.height = height;
1549
+ this.scrollbarHeight = scrollbarHeight;
1550
+ this.scrollbarEnabled = scrollbarEnabled;
1551
+ this.navigatorEnabled = navigatorEnabled;
1552
+ this.navigatorOptions = navigatorOptions;
1553
+ this.scrollbarOptions = scrollbarOptions;
1554
+ this.outlineHeight = height + scrollbarHeight;
1555
+
1556
+ this.opposite = pick(
1557
+ navigatorOptions.opposite,
1558
+ !navigatorEnabled && chart.inverted
1559
+ ); // #6262
1560
+
1561
+ var navigator = this,
1562
+ baseSeries = navigator.baseSeries,
1563
+ xAxisIndex = chart.xAxis.length,
1564
+ yAxisIndex = chart.yAxis.length,
1565
+ baseXaxis = baseSeries && baseSeries[0] && baseSeries[0].xAxis ||
1566
+ chart.xAxis[0] || { options: {} };
1567
+
1568
+ chart.isDirtyBox = true;
1569
+
1570
+ if (navigator.navigatorEnabled) {
1571
+ // an x axis is required for scrollbar also
1572
+ navigator.xAxis = new Axis(chart, merge({
1573
+ // inherit base xAxis' break and ordinal options
1574
+ breaks: baseXaxis.options.breaks,
1575
+ ordinal: baseXaxis.options.ordinal
1576
+ }, navigatorOptions.xAxis, {
1577
+ id: 'navigator-x-axis',
1578
+ yAxis: 'navigator-y-axis',
1579
+ isX: true,
1580
+ type: 'datetime',
1581
+ index: xAxisIndex,
1582
+ isInternal: true,
1583
+ offset: 0,
1584
+ keepOrdinalPadding: true, // #2436
1585
+ startOnTick: false,
1586
+ endOnTick: false,
1587
+ minPadding: 0,
1588
+ maxPadding: 0,
1589
+ zoomEnabled: false
1590
+ }, chart.inverted ? {
1591
+ offsets: [scrollbarHeight, 0, -scrollbarHeight, 0],
1592
+ width: height
1593
+ } : {
1594
+ offsets: [0, -scrollbarHeight, 0, scrollbarHeight],
1595
+ height: height
1596
+ }));
1597
+
1598
+ navigator.yAxis = new Axis(chart, merge(navigatorOptions.yAxis, {
1599
+ id: 'navigator-y-axis',
1600
+ alignTicks: false,
1601
+ offset: 0,
1602
+ index: yAxisIndex,
1603
+ isInternal: true,
1604
+ zoomEnabled: false
1605
+ }, chart.inverted ? {
1606
+ width: height
1607
+ } : {
1608
+ height: height
1609
+ }));
1610
+
1611
+ // If we have a base series, initialize the navigator series
1612
+ if (baseSeries || navigatorOptions.series.data) {
1613
+ navigator.updateNavigatorSeries(false);
1614
+
1615
+ // If not, set up an event to listen for added series
1616
+ } else if (chart.series.length === 0) {
1617
+
1618
+ navigator.unbindRedraw = addEvent(
1619
+ chart,
1620
+ 'beforeRedraw',
1621
+ function () {
1622
+ // We've got one, now add it as base
1623
+ if (chart.series.length > 0 && !navigator.series) {
1624
+ navigator.setBaseSeries();
1625
+ navigator.unbindRedraw(); // reset
1626
+ }
1627
+ }
1628
+ );
1629
+ }
1630
+
1631
+ navigator.reversedExtremes = (
1632
+ chart.inverted && !navigator.xAxis.reversed
1633
+ ) || (
1634
+ !chart.inverted && navigator.xAxis.reversed
1635
+ );
1636
+
1637
+ // Render items, so we can bind events to them:
1638
+ navigator.renderElements();
1639
+ // Add mouse events
1640
+ navigator.addMouseEvents();
1641
+
1642
+ // in case of scrollbar only, fake an x axis to get translation
1643
+ } else {
1644
+ navigator.xAxis = {
1645
+ translate: function (value, reverse) {
1646
+ var axis = chart.xAxis[0],
1647
+ ext = axis.getExtremes(),
1648
+ scrollTrackWidth = axis.len - 2 * scrollbarHeight,
1649
+ min = numExt('min', axis.options.min, ext.dataMin),
1650
+ valueRange = numExt(
1651
+ 'max',
1652
+ axis.options.max,
1653
+ ext.dataMax
1654
+ ) - min;
1655
+
1656
+ return reverse ?
1657
+ // from pixel to value
1658
+ (value * valueRange / scrollTrackWidth) + min :
1659
+ // from value to pixel
1660
+ scrollTrackWidth * (value - min) / valueRange;
1661
+ },
1662
+ toPixels: function (value) {
1663
+ return this.translate(value);
1664
+ },
1665
+ toValue: function (value) {
1666
+ return this.translate(value, true);
1667
+ },
1668
+ toFixedRange: Axis.prototype.toFixedRange,
1669
+ fake: true
1670
+ };
1671
+ }
1672
+
1673
+
1674
+ // Initialize the scrollbar
1675
+ if (chart.options.scrollbar.enabled) {
1676
+ chart.scrollbar = navigator.scrollbar = new Scrollbar(
1677
+ chart.renderer,
1678
+ merge(chart.options.scrollbar, {
1679
+ margin: navigator.navigatorEnabled ? 0 : 10,
1680
+ vertical: chart.inverted
1681
+ }),
1682
+ chart
1683
+ );
1684
+ addEvent(navigator.scrollbar, 'changed', function (e) {
1685
+ var range = navigator.size,
1686
+ to = range * this.to,
1687
+ from = range * this.from;
1688
+
1689
+ navigator.hasDragged = navigator.scrollbar.hasDragged;
1690
+ navigator.render(0, 0, from, to);
1691
+
1692
+ if (
1693
+ chart.options.scrollbar.liveRedraw ||
1694
+ (
1695
+ e.DOMType !== 'mousemove' &&
1696
+ e.DOMType !== 'touchmove'
1697
+ )
1698
+ ) {
1699
+ setTimeout(function () {
1700
+ navigator.onMouseUp(e);
1701
+ });
1702
+ }
1703
+ });
1704
+ }
1705
+
1706
+ // Add data events
1707
+ navigator.addBaseSeriesEvents();
1708
+ // Add redraw events
1709
+ navigator.addChartEvents();
1710
+ },
1711
+
1712
+ /**
1713
+ * Get the union data extremes of the chart - the outer data extremes of the
1714
+ * base X axis and the navigator axis.
1715
+ *
1716
+ * @private
1717
+ * @function Highcharts.Navigator#getUnionExtremes
1718
+ *
1719
+ * @param {boolean} returnFalseOnNoBaseSeries
1720
+ * as the param says.
1721
+ *
1722
+ * @return {*}
1723
+ */
1724
+ getUnionExtremes: function (returnFalseOnNoBaseSeries) {
1725
+ var baseAxis = this.chart.xAxis[0],
1726
+ navAxis = this.xAxis,
1727
+ navAxisOptions = navAxis.options,
1728
+ baseAxisOptions = baseAxis.options,
1729
+ ret;
1730
+
1731
+ if (!returnFalseOnNoBaseSeries || baseAxis.dataMin !== null) {
1732
+ ret = {
1733
+ dataMin: pick( // #4053
1734
+ navAxisOptions && navAxisOptions.min,
1735
+ numExt(
1736
+ 'min',
1737
+ baseAxisOptions.min,
1738
+ baseAxis.dataMin,
1739
+ navAxis.dataMin,
1740
+ navAxis.min
1741
+ )
1742
+ ),
1743
+ dataMax: pick(
1744
+ navAxisOptions && navAxisOptions.max,
1745
+ numExt(
1746
+ 'max',
1747
+ baseAxisOptions.max,
1748
+ baseAxis.dataMax,
1749
+ navAxis.dataMax,
1750
+ navAxis.max
1751
+ )
1752
+ )
1753
+ };
1754
+ }
1755
+ return ret;
1756
+ },
1757
+
1758
+ /**
1759
+ * Set the base series and update the navigator series from this. With a bit
1760
+ * of modification we should be able to make this an API method to be called
1761
+ * from the outside
1762
+ *
1763
+ * @private
1764
+ * @function Highcharts.Navigator#setBaseSeries
1765
+ *
1766
+ * @param {*} baseSeriesOptions
1767
+ * Additional series options for a navigator
1768
+ *
1769
+ * @param {boolean} [redraw]
1770
+ * Whether to redraw after update.
1771
+ */
1772
+ setBaseSeries: function (baseSeriesOptions, redraw) {
1773
+ var chart = this.chart,
1774
+ baseSeries = this.baseSeries = [];
1775
+
1776
+ baseSeriesOptions = (
1777
+ baseSeriesOptions ||
1778
+ chart.options && chart.options.navigator.baseSeries ||
1779
+ (chart.series.length ?
1780
+ // Find the first non-navigator series (#8430)
1781
+ H.find(chart.series, function (s) {
1782
+ return !s.options.isInternal;
1783
+ }).index : 0)
1784
+ );
1785
+
1786
+ // Iterate through series and add the ones that should be shown in
1787
+ // navigator.
1788
+ (chart.series || []).forEach(function (series, i) {
1789
+ if (
1790
+ // Don't include existing nav series
1791
+ !series.options.isInternal &&
1792
+ (
1793
+ series.options.showInNavigator ||
1794
+ (
1795
+ i === baseSeriesOptions ||
1796
+ series.options.id === baseSeriesOptions
1797
+ ) &&
1798
+ series.options.showInNavigator !== false
1799
+ )
1800
+ ) {
1801
+ baseSeries.push(series);
1802
+ }
1803
+ });
1804
+
1805
+ // When run after render, this.xAxis already exists
1806
+ if (this.xAxis && !this.xAxis.fake) {
1807
+ this.updateNavigatorSeries(true, redraw);
1808
+ }
1809
+ },
1810
+
1811
+ /**
1812
+ * Update series in the navigator from baseSeries, adding new if does not
1813
+ * exist.
1814
+ *
1815
+ * @private
1816
+ * @function Highcharts.Navigator.updateNavigatorSeries
1817
+ *
1818
+ * @param {boolean} addEvents
1819
+ *
1820
+ * @param {boolean} redraw
1821
+ */
1822
+ updateNavigatorSeries: function (addEvents, redraw) {
1823
+ var navigator = this,
1824
+ chart = navigator.chart,
1825
+ baseSeries = navigator.baseSeries,
1826
+ baseOptions,
1827
+ mergedNavSeriesOptions,
1828
+ chartNavigatorSeriesOptions = navigator.navigatorOptions.series,
1829
+ baseNavigatorOptions,
1830
+ navSeriesMixin = {
1831
+ enableMouseTracking: false,
1832
+ index: null, // #6162
1833
+ linkedTo: null, // #6734
1834
+ group: 'nav', // for columns
1835
+ padXAxis: false,
1836
+ xAxis: 'navigator-x-axis',
1837
+ yAxis: 'navigator-y-axis',
1838
+ showInLegend: false,
1839
+ stacking: false, // #4823
1840
+ isInternal: true
1841
+ },
1842
+ // Remove navigator series that are no longer in the baseSeries
1843
+ navigatorSeries = navigator.series =
1844
+ (navigator.series || []).filter(function (navSeries) {
1845
+ var base = navSeries.baseSeries;
1846
+
1847
+ if (baseSeries.indexOf(base) < 0) { // Not in array
1848
+ // If there is still a base series connected to this
1849
+ // series, remove event handler and reference.
1850
+ if (base) {
1851
+ removeEvent(
1852
+ base,
1853
+ 'updatedData',
1854
+ navigator.updatedDataHandler
1855
+ );
1856
+ delete base.navigatorSeries;
1857
+ }
1858
+ // Kill the nav series. It may already have been
1859
+ // destroyed (#8715).
1860
+ if (navSeries.chart) {
1861
+ navSeries.destroy();
1862
+ }
1863
+ return false;
1864
+ }
1865
+ return true;
1866
+ });
1867
+
1868
+ // Go through each base series and merge the options to create new
1869
+ // series
1870
+ if (baseSeries && baseSeries.length) {
1871
+ baseSeries.forEach(function eachBaseSeries(base) {
1872
+ var linkedNavSeries = base.navigatorSeries,
1873
+ userNavOptions = extend(
1874
+ // Grab color and visibility from base as default
1875
+ {
1876
+ color: base.color,
1877
+ visible: base.visible
1878
+ },
1879
+ !isArray(chartNavigatorSeriesOptions) ?
1880
+ chartNavigatorSeriesOptions :
1881
+ defaultOptions.navigator.series
1882
+ );
1883
+
1884
+ // Don't update if the series exists in nav and we have disabled
1885
+ // adaptToUpdatedData.
1886
+ if (
1887
+ linkedNavSeries &&
1888
+ navigator.navigatorOptions.adaptToUpdatedData === false
1889
+ ) {
1890
+ return;
1891
+ }
1892
+
1893
+ navSeriesMixin.name = 'Navigator ' + baseSeries.length;
1894
+
1895
+ baseOptions = base.options || {};
1896
+ baseNavigatorOptions = baseOptions.navigatorOptions || {};
1897
+ mergedNavSeriesOptions = merge(
1898
+ baseOptions,
1899
+ navSeriesMixin,
1900
+ userNavOptions,
1901
+ baseNavigatorOptions
1902
+ );
1903
+
1904
+ // Merge data separately. Do a slice to avoid mutating the
1905
+ // navigator options from base series (#4923).
1906
+ var navigatorSeriesData =
1907
+ baseNavigatorOptions.data || userNavOptions.data;
1908
+
1909
+ navigator.hasNavigatorData =
1910
+ navigator.hasNavigatorData || !!navigatorSeriesData;
1911
+ mergedNavSeriesOptions.data =
1912
+ navigatorSeriesData ||
1913
+ baseOptions.data && baseOptions.data.slice(0);
1914
+
1915
+ // Update or add the series
1916
+ if (linkedNavSeries && linkedNavSeries.options) {
1917
+ linkedNavSeries.update(mergedNavSeriesOptions, redraw);
1918
+ } else {
1919
+ base.navigatorSeries = chart.initSeries(
1920
+ mergedNavSeriesOptions
1921
+ );
1922
+ base.navigatorSeries.baseSeries = base; // Store ref
1923
+ navigatorSeries.push(base.navigatorSeries);
1924
+ }
1925
+ });
1926
+ }
1927
+
1928
+ // If user has defined data (and no base series) or explicitly defined
1929
+ // navigator.series as an array, we create these series on top of any
1930
+ // base series.
1931
+ if (
1932
+ chartNavigatorSeriesOptions.data &&
1933
+ !(baseSeries && baseSeries.length) ||
1934
+ isArray(chartNavigatorSeriesOptions)
1935
+ ) {
1936
+ navigator.hasNavigatorData = false;
1937
+ // Allow navigator.series to be an array
1938
+ chartNavigatorSeriesOptions = H.splat(chartNavigatorSeriesOptions);
1939
+ chartNavigatorSeriesOptions
1940
+ .forEach(function (userSeriesOptions, i) {
1941
+ navSeriesMixin.name =
1942
+ 'Navigator ' + (navigatorSeries.length + 1);
1943
+ mergedNavSeriesOptions = merge(
1944
+ defaultOptions.navigator.series,
1945
+ {
1946
+ // Since we don't have a base series to pull color from,
1947
+ // try to fake it by using color from series with same
1948
+ // index. Otherwise pull from the colors array. We need
1949
+ // an explicit color as otherwise updates will increment
1950
+ // color counter and we'll get a new color for each
1951
+ // update of the nav series.
1952
+ color: chart.series[i] &&
1953
+ !chart.series[i].options.isInternal &&
1954
+ chart.series[i].color ||
1955
+ chart.options.colors[i] ||
1956
+ chart.options.colors[0]
1957
+ },
1958
+ navSeriesMixin,
1959
+ userSeriesOptions
1960
+ );
1961
+ mergedNavSeriesOptions.data = userSeriesOptions.data;
1962
+ if (mergedNavSeriesOptions.data) {
1963
+ navigator.hasNavigatorData = true;
1964
+ navigatorSeries.push(
1965
+ chart.initSeries(mergedNavSeriesOptions)
1966
+ );
1967
+ }
1968
+ });
1969
+ }
1970
+
1971
+ if (addEvents) {
1972
+ this.addBaseSeriesEvents();
1973
+ }
1974
+ },
1975
+
1976
+ /**
1977
+ * Add data events.
1978
+ * For example when main series is updated we need to recalculate extremes
1979
+ *
1980
+ * @private
1981
+ * @function Highcharts.Navigator#addBaseSeriesEvent
1982
+ */
1983
+ addBaseSeriesEvents: function () {
1984
+ var navigator = this,
1985
+ baseSeries = navigator.baseSeries || [];
1986
+
1987
+ // Bind modified extremes event to first base's xAxis only.
1988
+ // In event of > 1 base-xAxes, the navigator will ignore those.
1989
+ // Adding this multiple times to the same axis is no problem, as
1990
+ // duplicates should be discarded by the browser.
1991
+ if (baseSeries[0] && baseSeries[0].xAxis) {
1992
+ addEvent(
1993
+ baseSeries[0].xAxis,
1994
+ 'foundExtremes',
1995
+ this.modifyBaseAxisExtremes
1996
+ );
1997
+ }
1998
+
1999
+ baseSeries.forEach(function (base) {
2000
+ // Link base series show/hide to navigator series visibility
2001
+ addEvent(base, 'show', function () {
2002
+ if (this.navigatorSeries) {
2003
+ this.navigatorSeries.setVisible(true, false);
2004
+ }
2005
+ });
2006
+ addEvent(base, 'hide', function () {
2007
+ if (this.navigatorSeries) {
2008
+ this.navigatorSeries.setVisible(false, false);
2009
+ }
2010
+ });
2011
+
2012
+ // Respond to updated data in the base series, unless explicitily
2013
+ // not adapting to data changes.
2014
+ if (this.navigatorOptions.adaptToUpdatedData !== false) {
2015
+ if (base.xAxis) {
2016
+ addEvent(base, 'updatedData', this.updatedDataHandler);
2017
+ }
2018
+ }
2019
+
2020
+ // Handle series removal
2021
+ addEvent(base, 'remove', function () {
2022
+ if (this.navigatorSeries) {
2023
+ erase(navigator.series, this.navigatorSeries);
2024
+ if (defined(this.navigatorSeries.options)) {
2025
+ this.navigatorSeries.remove(false);
2026
+ }
2027
+ delete this.navigatorSeries;
2028
+ }
2029
+ });
2030
+ }, this);
2031
+ },
2032
+
2033
+ /**
2034
+ * Get minimum from all base series connected to the navigator
2035
+ *
2036
+ * @param {number} currentSeriesMin
2037
+ * Minium from the current series
2038
+ *
2039
+ * @return {number} Minimum from all series
2040
+ */
2041
+ getBaseSeriesMin: function (currentSeriesMin) {
2042
+ return this.baseSeries.reduce(
2043
+ function (min, series) {
2044
+ return Math.min(min, series.xData[0]);
2045
+ },
2046
+ currentSeriesMin
2047
+ );
2048
+ },
2049
+
2050
+ /**
2051
+ * Set the navigator x axis extremes to reflect the total. The navigator
2052
+ * extremes should always be the extremes of the union of all series in the
2053
+ * chart as well as the navigator series.
2054
+ *
2055
+ * @private
2056
+ * @function Highcharts.Navigator#modifyNavigatorAxisExtremes
2057
+ */
2058
+ modifyNavigatorAxisExtremes: function () {
2059
+ var xAxis = this.xAxis,
2060
+ unionExtremes;
2061
+
2062
+ if (xAxis.getExtremes) {
2063
+ unionExtremes = this.getUnionExtremes(true);
2064
+ if (
2065
+ unionExtremes &&
2066
+ (
2067
+ unionExtremes.dataMin !== xAxis.min ||
2068
+ unionExtremes.dataMax !== xAxis.max
2069
+ )
2070
+ ) {
2071
+ xAxis.min = unionExtremes.dataMin;
2072
+ xAxis.max = unionExtremes.dataMax;
2073
+ }
2074
+ }
2075
+ },
2076
+
2077
+ /**
2078
+ * Hook to modify the base axis extremes with information from the Navigator
2079
+ *
2080
+ * @private
2081
+ * @function Highcharts.Navigator#modifyBaseAxisExtremes
2082
+ */
2083
+ modifyBaseAxisExtremes: function () {
2084
+ var baseXAxis = this,
2085
+ navigator = baseXAxis.chart.navigator,
2086
+ baseExtremes = baseXAxis.getExtremes(),
2087
+ baseMin = baseExtremes.min,
2088
+ baseMax = baseExtremes.max,
2089
+ baseDataMin = baseExtremes.dataMin,
2090
+ baseDataMax = baseExtremes.dataMax,
2091
+ range = baseMax - baseMin,
2092
+ stickToMin = navigator.stickToMin,
2093
+ stickToMax = navigator.stickToMax,
2094
+ overscroll = pick(baseXAxis.options.overscroll, 0),
2095
+ newMax,
2096
+ newMin,
2097
+ navigatorSeries = navigator.series && navigator.series[0],
2098
+ hasSetExtremes = !!baseXAxis.setExtremes,
2099
+
2100
+ // When the extremes have been set by range selector button, don't
2101
+ // stick to min or max. The range selector buttons will handle the
2102
+ // extremes. (#5489)
2103
+ unmutable = baseXAxis.eventArgs &&
2104
+ baseXAxis.eventArgs.trigger === 'rangeSelectorButton';
2105
+
2106
+ if (!unmutable) {
2107
+
2108
+ // If the zoomed range is already at the min, move it to the right
2109
+ // as new data comes in
2110
+ if (stickToMin) {
2111
+ newMin = baseDataMin;
2112
+ newMax = newMin + range;
2113
+ }
2114
+
2115
+ // If the zoomed range is already at the max, move it to the right
2116
+ // as new data comes in
2117
+ if (stickToMax) {
2118
+ newMax = baseDataMax + overscroll;
2119
+
2120
+ // if stickToMin is true, the new min value is set above
2121
+ if (!stickToMin) {
2122
+ newMin = Math.max(
2123
+ newMax - range,
2124
+ navigator.getBaseSeriesMin(
2125
+ navigatorSeries && navigatorSeries.xData ?
2126
+ navigatorSeries.xData[0] :
2127
+ -Number.MAX_VALUE
2128
+ )
2129
+ );
2130
+ }
2131
+ }
2132
+
2133
+ // Update the extremes
2134
+ if (hasSetExtremes && (stickToMin || stickToMax)) {
2135
+ if (isNumber(newMin)) {
2136
+ baseXAxis.min = baseXAxis.userMin = newMin;
2137
+ baseXAxis.max = baseXAxis.userMax = newMax;
2138
+ }
2139
+ }
2140
+ }
2141
+
2142
+ // Reset
2143
+ navigator.stickToMin = navigator.stickToMax = null;
2144
+ },
2145
+
2146
+ /**
2147
+ * Handler for updated data on the base series. When data is modified, the
2148
+ * navigator series must reflect it. This is called from the Chart.redraw
2149
+ * function before axis and series extremes are computed.
2150
+ *
2151
+ * @private
2152
+ * @function Highcharts.Navigator#updateDataHandler
2153
+ */
2154
+ updatedDataHandler: function () {
2155
+ var navigator = this.chart.navigator,
2156
+ baseSeries = this,
2157
+ navigatorSeries = this.navigatorSeries,
2158
+ xDataMin = navigator.getBaseSeriesMin(baseSeries.xData[0]);
2159
+
2160
+ // If the scrollbar is scrolled all the way to the right, keep right as
2161
+ // new data comes in.
2162
+ navigator.stickToMax = navigator.reversedExtremes ?
2163
+ Math.round(navigator.zoomedMin) === 0 :
2164
+ Math.round(navigator.zoomedMax) >= Math.round(navigator.size);
2165
+
2166
+ // Detect whether the zoomed area should stick to the minimum or
2167
+ // maximum. If the current axis minimum falls outside the new updated
2168
+ // dataset, we must adjust.
2169
+ navigator.stickToMin = isNumber(baseSeries.xAxis.min) &&
2170
+ (baseSeries.xAxis.min <= xDataMin) &&
2171
+ (!this.chart.fixedRange || !navigator.stickToMax);
2172
+
2173
+ // Set the navigator series data to the new data of the base series
2174
+ if (navigatorSeries && !navigator.hasNavigatorData) {
2175
+ navigatorSeries.options.pointStart = baseSeries.xData[0];
2176
+ navigatorSeries.setData(
2177
+ baseSeries.options.data,
2178
+ false,
2179
+ null,
2180
+ false
2181
+ ); // #5414
2182
+ }
2183
+ },
2184
+
2185
+ /**
2186
+ * Add chart events, like redrawing navigator, when chart requires that.
2187
+ *
2188
+ * @private
2189
+ * @function Highcharts.Navigator#addChartEvents
2190
+ */
2191
+ addChartEvents: function () {
2192
+ if (!this.eventsToUnbind) {
2193
+ this.eventsToUnbind = [];
2194
+ }
2195
+
2196
+ this.eventsToUnbind.push(
2197
+ // Move the scrollbar after redraw, like after data updata even if
2198
+ // axes don't redraw
2199
+ addEvent(
2200
+ this.chart,
2201
+ 'redraw',
2202
+ function () {
2203
+ var navigator = this.navigator,
2204
+ xAxis = navigator && (
2205
+ navigator.baseSeries &&
2206
+ navigator.baseSeries[0] &&
2207
+ navigator.baseSeries[0].xAxis ||
2208
+ navigator.scrollbar && this.xAxis[0]
2209
+ ); // #5709
2210
+
2211
+ if (xAxis) {
2212
+ navigator.render(xAxis.min, xAxis.max);
2213
+ }
2214
+ }
2215
+ ),
2216
+ // Make room for the navigator, can be placed around the chart:
2217
+ addEvent(
2218
+ this.chart,
2219
+ 'getMargins',
2220
+ function () {
2221
+ var chart = this,
2222
+ navigator = chart.navigator,
2223
+ marginName = navigator.opposite ?
2224
+ 'plotTop' : 'marginBottom';
2225
+
2226
+ if (chart.inverted) {
2227
+ marginName = navigator.opposite ?
2228
+ 'marginRight' : 'plotLeft';
2229
+ }
2230
+
2231
+ chart[marginName] = (chart[marginName] || 0) + (
2232
+ navigator.navigatorEnabled || !chart.inverted ?
2233
+ navigator.outlineHeight :
2234
+ 0
2235
+ ) + navigator.navigatorOptions.margin;
2236
+ }
2237
+ )
2238
+ );
2239
+ },
2240
+
2241
+ /**
2242
+ * Destroys allocated elements.
2243
+ *
2244
+ * @private
2245
+ * @function Highcharts.Navigator#destroy
2246
+ */
2247
+ destroy: function () {
2248
+
2249
+ // Disconnect events added in addEvents
2250
+ this.removeEvents();
2251
+
2252
+ if (this.xAxis) {
2253
+ erase(this.chart.xAxis, this.xAxis);
2254
+ erase(this.chart.axes, this.xAxis);
2255
+ }
2256
+ if (this.yAxis) {
2257
+ erase(this.chart.yAxis, this.yAxis);
2258
+ erase(this.chart.axes, this.yAxis);
2259
+ }
2260
+ // Destroy series
2261
+ (this.series || []).forEach(function (s) {
2262
+ if (s.destroy) {
2263
+ s.destroy();
2264
+ }
2265
+ });
2266
+
2267
+ // Destroy properties
2268
+ [
2269
+ 'series', 'xAxis', 'yAxis', 'shades', 'outline', 'scrollbarTrack',
2270
+ 'scrollbarRifles', 'scrollbarGroup', 'scrollbar', 'navigatorGroup',
2271
+ 'rendered'
2272
+ ].forEach(function (prop) {
2273
+ if (this[prop] && this[prop].destroy) {
2274
+ this[prop].destroy();
2275
+ }
2276
+ this[prop] = null;
2277
+ }, this);
2278
+
2279
+ // Destroy elements in collection
2280
+ [this.handles].forEach(function (coll) {
2281
+ destroyObjectProperties(coll);
2282
+ }, this);
2283
+ }
2284
+ };
2285
+
2286
+ H.Navigator = Navigator;
2287
+
2288
+ /*
2289
+ * For Stock charts, override selection zooming with some special features
2290
+ * because X axis zooming is already allowed by the Navigator and Range
2291
+ * selector.
2292
+ */
2293
+ addEvent(Axis, 'zoom', function (e) {
2294
+ var chart = this.chart,
2295
+ chartOptions = chart.options,
2296
+ zoomType = chartOptions.chart.zoomType,
2297
+ pinchType = chartOptions.chart.pinchType,
2298
+ previousZoom,
2299
+ navigator = chartOptions.navigator,
2300
+ rangeSelector = chartOptions.rangeSelector;
2301
+
2302
+ if (this.isXAxis && ((navigator && navigator.enabled) ||
2303
+ (rangeSelector && rangeSelector.enabled))) {
2304
+
2305
+ // For y only zooming, ignore the X axis completely
2306
+ if (zoomType === 'y') {
2307
+ e.zoomed = false;
2308
+
2309
+ // For xy zooming, record the state of the zoom before zoom selection,
2310
+ // then when the reset button is pressed, revert to this state. This
2311
+ // should apply only if the chart is initialized with a range (#6612),
2312
+ // otherwise zoom all the way out.
2313
+ } else if (
2314
+ (
2315
+ (!isTouchDevice && zoomType === 'xy') ||
2316
+ (isTouchDevice && pinchType === 'xy')
2317
+ ) &&
2318
+ this.options.range
2319
+ ) {
2320
+
2321
+ previousZoom = this.previousZoom;
2322
+ if (defined(e.newMin)) {
2323
+ this.previousZoom = [this.min, this.max];
2324
+ } else if (previousZoom) {
2325
+ e.newMin = previousZoom[0];
2326
+ e.newMax = previousZoom[1];
2327
+ delete this.previousZoom;
2328
+ }
2329
+ }
2330
+
2331
+ }
2332
+ if (e.zoomed !== undefined) {
2333
+ e.preventDefault();
2334
+ }
2335
+ });
2336
+
2337
+ /**
2338
+ * For Stock charts. For x only zooming, do not to create the zoom button
2339
+ * because X axis zooming is already allowed by the Navigator and Range
2340
+ * selector. (#9285)
2341
+ */
2342
+ addEvent(Chart, 'beforeShowResetZoom', function () {
2343
+ var chartOptions = this.options,
2344
+ navigator = chartOptions.navigator,
2345
+ rangeSelector = chartOptions.rangeSelector;
2346
+
2347
+ if (
2348
+ (
2349
+ (navigator && navigator.enabled) ||
2350
+ (rangeSelector && rangeSelector.enabled)
2351
+ ) && (
2352
+ (!isTouchDevice && chartOptions.chart.zoomType === 'x') ||
2353
+ (isTouchDevice && chartOptions.chart.pinchType === 'x')
2354
+ )
2355
+ ) {
2356
+ return false;
2357
+ }
2358
+ });
2359
+
2360
+ // Initialize navigator for stock charts
2361
+ addEvent(Chart, 'beforeRender', function () {
2362
+ var options = this.options;
2363
+
2364
+ if (options.navigator.enabled || options.scrollbar.enabled) {
2365
+ this.scroller = this.navigator = new Navigator(this);
2366
+ }
2367
+ });
2368
+
2369
+ /*
2370
+ * For stock charts, extend the Chart.setChartSize method so that we can set the
2371
+ * final top position of the navigator once the height of the chart, including
2372
+ * the legend, is determined. #367. We can't use Chart.getMargins, because
2373
+ * labels offsets are not calculated yet.
2374
+ */
2375
+ addEvent(Chart, 'afterSetChartSize', function () {
2376
+
2377
+ var legend = this.legend,
2378
+ navigator = this.navigator,
2379
+ scrollbarHeight,
2380
+ legendOptions,
2381
+ xAxis,
2382
+ yAxis;
2383
+
2384
+ if (navigator) {
2385
+ legendOptions = legend && legend.options;
2386
+ xAxis = navigator.xAxis;
2387
+ yAxis = navigator.yAxis;
2388
+ scrollbarHeight = navigator.scrollbarHeight;
2389
+
2390
+ // Compute the top position
2391
+ if (this.inverted) {
2392
+ navigator.left = navigator.opposite ?
2393
+ this.chartWidth - scrollbarHeight - navigator.height :
2394
+ this.spacing[3] + scrollbarHeight;
2395
+ navigator.top = this.plotTop + scrollbarHeight;
2396
+ } else {
2397
+ navigator.left = this.plotLeft + scrollbarHeight;
2398
+ navigator.top = navigator.navigatorOptions.top ||
2399
+ this.chartHeight -
2400
+ navigator.height -
2401
+ scrollbarHeight -
2402
+ this.spacing[2] -
2403
+ (
2404
+ this.rangeSelector && this.extraBottomMargin ?
2405
+ this.rangeSelector.getHeight() :
2406
+ 0
2407
+ ) -
2408
+ (
2409
+ (
2410
+ legendOptions &&
2411
+ legendOptions.verticalAlign === 'bottom' &&
2412
+ legendOptions.enabled &&
2413
+ !legendOptions.floating
2414
+ ) ?
2415
+ legend.legendHeight + pick(legendOptions.margin, 10) :
2416
+ 0
2417
+ );
2418
+ }
2419
+
2420
+ if (xAxis && yAxis) { // false if navigator is disabled (#904)
2421
+
2422
+ if (this.inverted) {
2423
+ xAxis.options.left = yAxis.options.left = navigator.left;
2424
+ } else {
2425
+ xAxis.options.top = yAxis.options.top = navigator.top;
2426
+ }
2427
+
2428
+ xAxis.setAxisSize();
2429
+ yAxis.setAxisSize();
2430
+ }
2431
+ }
2432
+ });
2433
+
2434
+ // Merge options, if no scrolling exists yet
2435
+ addEvent(Chart, 'update', function (e) {
2436
+
2437
+ var navigatorOptions = (e.options.navigator || {}),
2438
+ scrollbarOptions = (e.options.scrollbar || {});
2439
+
2440
+ if (!this.navigator && !this.scroller &&
2441
+ (navigatorOptions.enabled || scrollbarOptions.enabled)
2442
+ ) {
2443
+ merge(true, this.options.navigator, navigatorOptions);
2444
+ merge(true, this.options.scrollbar, scrollbarOptions);
2445
+ delete e.options.navigator;
2446
+ delete e.options.scrollbar;
2447
+ }
2448
+
2449
+ });
2450
+
2451
+ // Initialize navigator, if no scrolling exists yet
2452
+ addEvent(Chart, 'afterUpdate', function () {
2453
+
2454
+ if (!this.navigator && !this.scroller &&
2455
+ (this.options.navigator.enabled || this.options.scrollbar.enabled)
2456
+ ) {
2457
+ this.scroller = this.navigator = new Navigator(this);
2458
+ }
2459
+
2460
+ });
2461
+
2462
+ // Handle adding new series
2463
+ addEvent(Chart, 'afterAddSeries', function () {
2464
+ if (this.navigator) {
2465
+ // Recompute which series should be shown in navigator, and add them
2466
+ this.navigator.setBaseSeries(null, false);
2467
+ }
2468
+ });
2469
+
2470
+ // Handle updating series
2471
+ addEvent(Series, 'afterUpdate', function () {
2472
+ if (this.chart.navigator && !this.options.isInternal) {
2473
+ this.chart.navigator.setBaseSeries(null, false);
2474
+ }
2475
+ });
2476
+
2477
+ Chart.prototype.callbacks.push(function (chart) {
2478
+ var extremes,
2479
+ navigator = chart.navigator;
2480
+
2481
+ // Initialize the navigator
2482
+ if (navigator && chart.xAxis[0]) {
2483
+ extremes = chart.xAxis[0].getExtremes();
2484
+ navigator.render(extremes.min, extremes.max);
2485
+ }
2486
+ });