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,1231 @@
1
+ /**
2
+ * (c) 2009-2017 Highsoft, Black Label
3
+ *
4
+ * License: www.highcharts.com/license
5
+ */
6
+ 'use strict';
7
+ import H from '../parts/Globals.js';
8
+ import '../parts/Utilities.js';
9
+ import '../parts/Chart.js';
10
+ import controllableMixin from './controllable/controllableMixin.js';
11
+ import ControllableRect from './controllable/ControllableRect.js';
12
+ import ControllableCircle from './controllable/ControllableCircle.js';
13
+ import ControllablePath from './controllable/ControllablePath.js';
14
+ import ControllableImage from './controllable/ControllableImage.js';
15
+ import ControllableLabel from './controllable/ControllableLabel.js';
16
+ import eventEmitterMixin from './eventEmitterMixin.js';
17
+ import MockPoint from './MockPoint.js';
18
+ import ControlPoint from './ControlPoint.js';
19
+
20
+ var merge = H.merge,
21
+ addEvent = H.addEvent,
22
+ defined = H.defined,
23
+ erase = H.erase,
24
+ find = H.find,
25
+ isString = H.isString,
26
+ pick = H.pick,
27
+ reduce = H.reduce,
28
+ splat = H.splat,
29
+ destroyObjectProperties = H.destroyObjectProperties;
30
+
31
+ /* *********************************************************************
32
+ *
33
+ * ANNOTATION
34
+ *
35
+ ******************************************************************** */
36
+
37
+ /**
38
+ * @typedef {
39
+ * Annotation.ControllableCircle|
40
+ * Annotation.ControllableImage|
41
+ * Annotation.ControllablePath|
42
+ * Annotation.ControllableRect
43
+ * }
44
+ * Annotation.Shape
45
+ */
46
+
47
+ /**
48
+ * @typedef {Annotation.ControllableLabel} Annotation.Label
49
+ */
50
+
51
+ /**
52
+ * An annotation class which serves as a container for items like labels or
53
+ * shapes. Created items are positioned on the chart either by linking them to
54
+ * existing points or created mock points
55
+ *
56
+ * @class
57
+ * @mixes Annotation.controllableMixin
58
+ * @mixes Annotation.eventEmitterMixin
59
+ *
60
+ * @param {Highcharts.Chart} chart a chart instance
61
+ * @param {AnnotationOptions} options the options object
62
+ */
63
+ var Annotation = H.Annotation = function (chart, options) {
64
+ var labelsAndShapes;
65
+
66
+ /**
67
+ * The chart that the annotation belongs to.
68
+ *
69
+ * @type {Highcharts.Chart}
70
+ */
71
+ this.chart = chart;
72
+
73
+ /**
74
+ * The array of points which defines the annotation.
75
+ *
76
+ * @type {Array<Annotation.PointLike>}
77
+ */
78
+ this.points = [];
79
+
80
+ /**
81
+ * The array of control points.
82
+ *
83
+ * @type {Array<Annotation.ControlPoint>}
84
+ */
85
+ this.controlPoints = [];
86
+
87
+ this.coll = 'annotations';
88
+
89
+ /**
90
+ * The array of labels which belong to the annotation.
91
+ *
92
+ * @type {Array<Annotation.Label>}
93
+ */
94
+ this.labels = [];
95
+
96
+ /**
97
+ * The array of shapes which belong to the annotation.
98
+ *
99
+ * @type {Array<Annotation.Shape>}
100
+ */
101
+ this.shapes = [];
102
+
103
+ /**
104
+ * The options for the annotations.
105
+ *
106
+ * @type {AnnotationOptions}
107
+ */
108
+ // this.options = merge(this.defaultOptions, userOptions);
109
+ this.options = options;
110
+
111
+ /**
112
+ * The user options for the annotations.
113
+ *
114
+ * @type {AnnotationOptions}
115
+ */
116
+ this.userOptions = merge(true, {}, options);
117
+
118
+ // Handle labels and shapes - those are arrays
119
+ // Merging does not work with arrays (stores reference)
120
+ labelsAndShapes = this.getLabelsAndShapesOptions(
121
+ this.userOptions,
122
+ options
123
+ );
124
+ this.userOptions.labels = labelsAndShapes.labels;
125
+ this.userOptions.shapes = labelsAndShapes.shapes;
126
+
127
+ /**
128
+ * The callback that reports to the overlapping-labels module which
129
+ * labels it should account for.
130
+ *
131
+ * @name labelCollector
132
+ * @memberOf Annotation#
133
+ * @type {Function}
134
+ */
135
+
136
+ /**
137
+ * The group svg element.
138
+ *
139
+ * @name group
140
+ * @memberOf Annotation#
141
+ * @type {Highcharts.SVGElement}
142
+ */
143
+
144
+ /**
145
+ * The group svg element of the annotation's shapes.
146
+ *
147
+ * @name shapesGroup
148
+ * @memberOf Annotation#
149
+ * @type {Highcharts.SVGElement}
150
+ */
151
+
152
+ /**
153
+ * The group svg element of the annotation's labels.
154
+ *
155
+ * @name labelsGroup
156
+ * @memberOf Annotation#
157
+ * @type {Highcharts.SVGElement}
158
+ */
159
+
160
+ this.init(chart, options);
161
+ };
162
+
163
+
164
+ merge(
165
+ true,
166
+ Annotation.prototype,
167
+ controllableMixin,
168
+ eventEmitterMixin, /** @lends Annotation# */ {
169
+ /**
170
+ * A basic type of an annotation. It allows to add custom labels
171
+ * or shapes. The items can be tied to points, axis coordinates
172
+ * or chart pixel coordinates.
173
+ *
174
+ * @private
175
+ * @type {Object}
176
+ * @ignore-options base, annotations.crookedLine
177
+ * @sample highcharts/annotations/basic/
178
+ * Basic annotations
179
+ * @sample highcharts/demo/annotations/
180
+ * Advanced annotations
181
+ * @sample highcharts/css/annotations
182
+ * Styled mode
183
+ * @sample highcharts/annotations-advanced/controllable
184
+ * Controllable items
185
+ * @sample {highstock} stock/annotations/fibonacci-retracements
186
+ * Custom annotation, Fibonacci retracement
187
+ * @since 6.0.0
188
+ * @optionparent annotations.crookedLine
189
+ */
190
+ defaultOptions: {
191
+ /**
192
+ * Whether the annotation is visible.
193
+ *
194
+ * @sample highcharts/annotations/visible/
195
+ * Set annotation visibility
196
+ */
197
+ visible: true,
198
+
199
+ /**
200
+ * Allow an annotation to be draggable by a user. Possible
201
+ * values are `"x"`, `"xy"`, `"y"` and `""` (disabled).
202
+ *
203
+ * @type {string}
204
+ * @validvalue ["x", "xy", "y", ""]
205
+ */
206
+ draggable: 'xy',
207
+
208
+ /**
209
+ * Options for annotation's labels. Each label inherits options
210
+ * from the labelOptions object. An option from the labelOptions
211
+ * can be overwritten by config for a specific label.
212
+ */
213
+ labelOptions: {
214
+
215
+ /**
216
+ * The alignment of the annotation's label. If right,
217
+ * the right side of the label should be touching the point.
218
+ *
219
+ * @validvalue ["left", "center", "right"]
220
+ * @sample highcharts/annotations/label-position/
221
+ * Set labels position
222
+ */
223
+ align: 'center',
224
+
225
+ /**
226
+ * Whether to allow the annotation's labels to overlap.
227
+ * To make the labels less sensitive for overlapping,
228
+ * the can be set to 0.
229
+ *
230
+ * @sample highcharts/annotations/tooltip-like/
231
+ * Hide overlapping labels
232
+ */
233
+ allowOverlap: false,
234
+
235
+ /**
236
+ * The background color or gradient for the annotation's label.
237
+ *
238
+ * @type {Color}
239
+ * @sample highcharts/annotations/label-presentation/
240
+ * Set labels graphic options
241
+ */
242
+ backgroundColor: 'rgba(0, 0, 0, 0.75)',
243
+
244
+ /**
245
+ * The border color for the annotation's label.
246
+ *
247
+ * @type {Color}
248
+ * @sample highcharts/annotations/label-presentation/
249
+ * Set labels graphic options
250
+ */
251
+ borderColor: 'black',
252
+
253
+ /**
254
+ * The border radius in pixels for the annotaiton's label.
255
+ *
256
+ * @sample highcharts/annotations/label-presentation/
257
+ * Set labels graphic options
258
+ */
259
+ borderRadius: 3,
260
+
261
+ /**
262
+ * The border width in pixels for the annotation's label
263
+ *
264
+ * @sample highcharts/annotations/label-presentation/
265
+ * Set labels graphic options
266
+ */
267
+ borderWidth: 1,
268
+
269
+ /**
270
+ * A class name for styling by CSS.
271
+ *
272
+ * @sample highcharts/css/annotations
273
+ * Styled mode annotations
274
+ * @since 6.0.5
275
+ */
276
+ className: '',
277
+
278
+ /**
279
+ * Whether to hide the annotation's label
280
+ * that is outside the plot area.
281
+ *
282
+ * @sample highcharts/annotations/label-crop-overflow/
283
+ * Crop or justify labels
284
+ */
285
+ crop: false,
286
+
287
+ /**
288
+ * The label's pixel distance from the point.
289
+ *
290
+ * @type {number}
291
+ * @sample highcharts/annotations/label-position/
292
+ * Set labels position
293
+ * @default undefined
294
+ * @apioption annotations.crookedLine.labelOptions.distance
295
+ */
296
+
297
+ /**
298
+ * A [format](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting) string for the data label.
299
+ *
300
+ * @type {string}
301
+ * @see [plotOptions.series.dataLabels.format](
302
+ * plotOptions.series.dataLabels.format.html)
303
+ * @sample highcharts/annotations/label-text/
304
+ * Set labels text
305
+ * @default undefined
306
+ * @apioption annotations.crookedLine.labelOptions.format
307
+ */
308
+
309
+ /**
310
+ * Alias for the format option.
311
+ *
312
+ * @type {string}
313
+ * @see [format](annotations.labelOptions.format.html)
314
+ * @sample highcharts/annotations/label-text/
315
+ * Set labels text
316
+ * @default undefined
317
+ * @apioption annotations.crookedLine.labelOptions.text
318
+ */
319
+
320
+ /**
321
+ * Callback JavaScript function to format
322
+ * the annotation's label. Note that if a `format` or `text`
323
+ * are defined, the format or text take precedence and
324
+ * the formatter is ignored. `This` refers to a * point object.
325
+ *
326
+ * @type {function}
327
+ * @sample highcharts/annotations/label-text/
328
+ * Set labels text
329
+ * @default function () {
330
+ * return defined(this.y) ? this.y : 'Annotation label';
331
+ * }
332
+ */
333
+ formatter: function () {
334
+ return defined(this.y) ? this.y : 'Annotation label';
335
+ },
336
+
337
+ /**
338
+ * How to handle the annotation's label that flow
339
+ * outside the plot area. The justify option aligns the label
340
+ * inside the plot area.
341
+ *
342
+ * @validvalue ["none", "justify"]
343
+ * @sample highcharts/annotations/label-crop-overflow/
344
+ * Crop or justify labels
345
+ **/
346
+ overflow: 'justify',
347
+
348
+ /**
349
+ * When either the borderWidth or the backgroundColor is set,
350
+ * this is the padding within the box.
351
+ *
352
+ * @sample highcharts/annotations/label-presentation/
353
+ * Set labels graphic options
354
+ */
355
+ padding: 5,
356
+
357
+ /**
358
+ * The shadow of the box. The shadow can be
359
+ * an object configuration containing
360
+ * `color`, `offsetX`, `offsetY`, `opacity` and `width`.
361
+ *
362
+ * @type {Boolean|Object}
363
+ * @sample highcharts/annotations/label-presentation/
364
+ * Set labels graphic options
365
+ */
366
+ shadow: false,
367
+
368
+ /**
369
+ * The name of a symbol to use for the border around the label.
370
+ * Symbols are predefined functions on the Renderer object.
371
+ *
372
+ * @type {string}
373
+ * @sample highcharts/annotations/shapes/
374
+ * Available shapes for labels
375
+ */
376
+ shape: 'callout',
377
+
378
+ /**
379
+ * Styles for the annotation's label.
380
+ *
381
+ * @type {CSSObject}
382
+ * @sample highcharts/annotations/label-presentation/
383
+ * Set labels graphic options
384
+ * @see [plotOptions.series.dataLabels.style](
385
+ * plotOptions.series.dataLabels.style.html)
386
+ */
387
+ style: {
388
+ fontSize: '11px',
389
+ fontWeight: 'normal',
390
+ color: 'contrast'
391
+ },
392
+
393
+ /**
394
+ * Whether to [use HTML](http://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)
395
+ * to render the annotation's label.
396
+ *
397
+ * @type {boolean}
398
+ * @default false
399
+ */
400
+ useHTML: false,
401
+
402
+ /**
403
+ * The vertical alignment of the annotation's label.
404
+ *
405
+ * @type {string}
406
+ * @validvalue ["top", "middle", "bottom"]
407
+ * @sample highcharts/annotations/label-position/
408
+ * Set labels position
409
+ */
410
+ verticalAlign: 'bottom',
411
+
412
+ /**
413
+ * The x position offset of the label relative to the point.
414
+ * Note that if a `distance` is defined, the distance takes
415
+ * precedence over `x` and `y` options.
416
+ *
417
+ * @sample highcharts/annotations/label-position/
418
+ * Set labels position
419
+ */
420
+ x: 0,
421
+
422
+ /**
423
+ * The y position offset of the label relative to the point.
424
+ * Note that if a `distance` is defined, the distance takes
425
+ * precedence over `x` and `y` options.
426
+ *
427
+ * @sample highcharts/annotations/label-position/
428
+ * Set labels position
429
+ */
430
+ y: -16
431
+ },
432
+
433
+ /**
434
+ * An array of labels for the annotation. For options that apply to
435
+ * multiple labels, they can be added to the
436
+ * [labelOptions](annotations.labelOptions.html).
437
+ *
438
+ * @type {Array<Object>}
439
+ * @extends annotations.crookedLine.labelOptions
440
+ * @apioption annotations.crookedLine.labels
441
+ */
442
+
443
+ /**
444
+ * This option defines the point to which the label
445
+ * will be connected.
446
+ * It can be either the point which exists in the series - it is
447
+ * referenced by the point's id - or a new point with defined x, y
448
+ * properies and optionally axes.
449
+ *
450
+ * @type {string|MockPointOptions}
451
+ * @sample highcharts/annotations/mock-point/
452
+ * Attach annotation to a mock point
453
+ * @apioption annotations.crookedLine.labels.point
454
+ */
455
+
456
+ /**
457
+ * The x position of the point. Units can be either in axis
458
+ * or chart pixel coordinates.
459
+ *
460
+ * @type {number}
461
+ * @apioption annotations.crookedLine.labels.point.x
462
+ */
463
+
464
+ /**
465
+ * The y position of the point. Units can be either in axis
466
+ * or chart pixel coordinates.
467
+ *
468
+ * @type {number}
469
+ * @apioption annotations.crookedLine.labels.point.y
470
+ */
471
+
472
+ /**
473
+ * This number defines which xAxis the point is connected to.
474
+ * It refers to either the axis id or the index of the axis
475
+ * in the xAxis array. If the option is not configured or
476
+ * the axis is not found the point's
477
+ * x coordinate refers to the chart pixels.
478
+ *
479
+ * @type {number|string}
480
+ * @apioption annotations.crookedLine.labels.point.xAxis
481
+ */
482
+
483
+ /**
484
+ * This number defines which yAxis the point is connected to.
485
+ * It refers to either the axis id or the index of the axis
486
+ * in the yAxis array. If the option is not configured or
487
+ * the axis is not found the point's
488
+ * y coordinate refers to the chart pixels.
489
+ *
490
+ * @type {number|string}
491
+ * @apioption annotations.crookedLine.labels.point.yAxis
492
+ */
493
+
494
+
495
+ /**
496
+ * An array of shapes for the annotation. For options that apply to
497
+ * multiple shapes, then can be added to the
498
+ * [shapeOptions](annotations.shapeOptions.html).
499
+ *
500
+ * @type {Array<Object>}
501
+ * @extends annotations.crookedLine.shapeOptions
502
+ * @apioption annotations.crookedLine.shapes
503
+ */
504
+
505
+ /**
506
+ * This option defines the point to which the shape will be
507
+ * connected.
508
+ * It can be either the point which exists in the series - it is
509
+ * referenced by the point's id - or a new point with defined x, y
510
+ * properties and optionally axes.
511
+ *
512
+ * @type {string|MockPointOptions}
513
+ * @extends annotations.crookedLine.labels.point
514
+ * @apioption annotations.crookedLine.shapes.point
515
+ */
516
+
517
+ /**
518
+ * An array of points for the shape. This option is available
519
+ * for shapes which can use multiple points such as path.
520
+ * A point can be either a point object or a point's id.
521
+ *
522
+ * @type {Array<string|Highcharts.MockPoint.Options>}
523
+ * @see [annotations.shapes.point](annotations.shapes.point.html)
524
+ * @apioption annotations.crookedLine.shapes.points
525
+ */
526
+
527
+ /**
528
+ * Id of the marker which will be drawn at the final
529
+ * vertex of the path.
530
+ * Custom markers can be defined in defs property.
531
+ *
532
+ * @type {string}
533
+ * @see [defs.markers](defs.markers.html)
534
+ * @sample highcharts/annotations/custom-markers/
535
+ * Define a custom marker for annotations
536
+ * @apioption annotations.crookedLine.shapes.markerEnd
537
+ */
538
+
539
+ /**
540
+ * Id of the marker which will be drawn at the first
541
+ * vertex of the path.
542
+ * Custom markers can be defined in defs property.
543
+ *
544
+ * @type {string}
545
+ * @see [defs.markers](defs.markers.html)
546
+ * @sample {highcharts} highcharts/annotations/custom-markers/
547
+ * Define a custom marker for annotations
548
+ * @apioption annotations.crookedLine.shapes.markerStart
549
+ */
550
+
551
+
552
+ /**
553
+ * Options for annotation's shapes. Each shape inherits options
554
+ * from the shapeOptions object. An option from the shapeOptions
555
+ * can be overwritten by config for a specific shape.
556
+ *
557
+ * @type {Object}
558
+ */
559
+ shapeOptions: {
560
+ /**
561
+ * The width of the shape.
562
+ *
563
+ * @type {number}
564
+ * @sample highcharts/annotations/shape/
565
+ * Basic shape annotation
566
+ * @apioption annotations.crookedLine.shapeOptions.width
567
+ **/
568
+
569
+ /**
570
+ * The height of the shape.
571
+ *
572
+ * @type {number}
573
+ * @sample highcharts/annotations/shape/
574
+ * Basic shape annotation
575
+ * @apioption annotations.crookedLine.shapeOptions.height
576
+ */
577
+
578
+ /**
579
+ * The color of the shape's stroke.
580
+ *
581
+ * @type {Color}
582
+ * @sample highcharts/annotations/shape/
583
+ * Basic shape annotation
584
+ */
585
+ stroke: 'rgba(0, 0, 0, 0.75)',
586
+
587
+ /**
588
+ * The pixel stroke width of the shape.
589
+ *
590
+ * @sample highcharts/annotations/shape/
591
+ * Basic shape annotation
592
+ */
593
+ strokeWidth: 1,
594
+
595
+ /**
596
+ * The color of the shape's fill.
597
+ *
598
+ * @type {Color}
599
+ * @sample highcharts/annotations/shape/
600
+ * Basic shape annotation
601
+ */
602
+ fill: 'rgba(0, 0, 0, 0.75)',
603
+
604
+ /**
605
+ * The type of the shape, e.g. circle or rectangle.
606
+ *
607
+ * @type {string}
608
+ * @sample highcharts/annotations/shape/
609
+ * Basic shape annotation
610
+ * @default 'rect'
611
+ * @apioption annotations.crookedLine.shapeOptions.type
612
+ */
613
+
614
+ /**
615
+ * The radius of the shape.
616
+ *
617
+ * @sample highcharts/annotations/shape/
618
+ * Basic shape annotation
619
+ */
620
+ r: 0,
621
+
622
+ /**
623
+ * Defines additional snapping area around an annotation
624
+ * making this annotation to focus. Defined in pixels.
625
+ */
626
+ snap: 2
627
+ },
628
+
629
+ /**
630
+ * Options for annotation's control points. Each control point
631
+ * inherits options from controlPointOptions object.
632
+ * Options from the controlPointOptions can be overwritten
633
+ * by options in a specific control point.
634
+ *
635
+ * @type {Annotation.ControlPoint.Options}
636
+ * @apioption annotations.crookedLine.controlPointOptions
637
+ */
638
+ controlPointOptions: {
639
+ symbol: 'circle',
640
+ width: 10,
641
+ height: 10,
642
+ style: {
643
+ stroke: 'black',
644
+ 'stroke-width': 2,
645
+ fill: 'white'
646
+ },
647
+ visible: false,
648
+
649
+ /**
650
+ * @function {Annotation.ControlPoint.Positioner}
651
+ * @apioption annotations.crookedLine.controlPointOptions.positioner
652
+ */
653
+
654
+
655
+ events: {}
656
+ },
657
+
658
+
659
+ /**
660
+ * @type {Object}
661
+ */
662
+ events: {},
663
+
664
+ /**
665
+ * The Z index of the annotation.
666
+ *
667
+ * @type {number}
668
+ * @default 6
669
+ */
670
+ zIndex: 6
671
+ },
672
+
673
+ /**
674
+ * Initialize the annotation.
675
+ *
676
+ * @param {Highcharts.Chart} - the chart
677
+ * @param {AnnotationOptions} - the user options for the annotation
678
+ */
679
+ init: function () {
680
+ this.linkPoints();
681
+ this.addControlPoints();
682
+ this.addShapes();
683
+ this.addLabels();
684
+ this.addClipPaths();
685
+ this.setLabelCollector();
686
+ },
687
+
688
+ getLabelsAndShapesOptions: function (baseOptions, newOptions) {
689
+ var mergedOptions = {};
690
+
691
+ ['labels', 'shapes'].forEach(function (name) {
692
+ if (baseOptions[name]) {
693
+ mergedOptions[name] = splat(newOptions[name]).map(
694
+ function (basicOptions, i) {
695
+ return merge(baseOptions[name][i], basicOptions);
696
+ }
697
+ );
698
+ }
699
+ });
700
+
701
+ return mergedOptions;
702
+ },
703
+
704
+ addShapes: function () {
705
+ (this.options.shapes || []).forEach(function (shapeOptions, i) {
706
+ var shape = this.initShape(shapeOptions, i);
707
+
708
+ this.options.shapes[i] = shape.options;
709
+ }, this);
710
+ },
711
+
712
+ addLabels: function () {
713
+ (this.options.labels || []).forEach(function (labelOptions, i) {
714
+ var label = this.initLabel(labelOptions, i);
715
+
716
+ this.options.labels[i] = label.options;
717
+ }, this);
718
+ },
719
+
720
+ addClipPaths: function () {
721
+ this.setClipAxes();
722
+
723
+ if (this.clipXAxis && this.clipYAxis) {
724
+ this.clipRect = this.chart.renderer.clipRect(
725
+ this.getClipBox()
726
+ );
727
+ }
728
+ },
729
+
730
+ setClipAxes: function () {
731
+ var xAxes = this.chart.xAxis,
732
+ yAxes = this.chart.yAxis,
733
+ linkedAxes = reduce(
734
+ (this.options.labels || [])
735
+ .concat(this.options.shapes || []),
736
+ function (axes, labelOrShape) {
737
+ return [
738
+ xAxes[
739
+ labelOrShape &&
740
+ labelOrShape.point &&
741
+ labelOrShape.point.xAxis
742
+ ] || axes[0],
743
+ yAxes[
744
+ labelOrShape &&
745
+ labelOrShape.point &&
746
+ labelOrShape.point.yAxis
747
+ ] || axes[1]
748
+ ];
749
+ },
750
+ []
751
+ );
752
+
753
+ this.clipXAxis = linkedAxes[0];
754
+ this.clipYAxis = linkedAxes[1];
755
+ },
756
+
757
+ getClipBox: function () {
758
+ return {
759
+ x: this.clipXAxis.left,
760
+ y: this.clipYAxis.top,
761
+ width: this.clipXAxis.width,
762
+ height: this.clipYAxis.height
763
+ };
764
+ },
765
+
766
+ setLabelCollector: function () {
767
+ var annotation = this;
768
+
769
+ annotation.labelCollector = function () {
770
+ return annotation.labels.reduce(
771
+ function (labels, label) {
772
+ if (!label.options.allowOverlap) {
773
+ labels.push(label.graphic);
774
+ }
775
+
776
+ return labels;
777
+ },
778
+ []
779
+ );
780
+ };
781
+
782
+ annotation.chart.labelCollectors.push(
783
+ annotation.labelCollector
784
+ );
785
+ },
786
+
787
+ /**
788
+ * Set an annotation options.
789
+ *
790
+ * @param {AnnotationOptions} - user options for an annotation
791
+ */
792
+ setOptions: function (userOptions) {
793
+ this.options = merge(this.defaultOptions, userOptions);
794
+ },
795
+
796
+ redraw: function (animation) {
797
+ this.linkPoints();
798
+
799
+ if (!this.graphic) {
800
+ this.render();
801
+ }
802
+
803
+ if (this.clipRect) {
804
+ this.clipRect.animate(this.getClipBox());
805
+ }
806
+
807
+ this.redrawItems(this.shapes, animation);
808
+ this.redrawItems(this.labels, animation);
809
+
810
+
811
+ controllableMixin.redraw.call(this, animation);
812
+ },
813
+
814
+ /**
815
+ * @param {Array<(Annotation.Label|Annotation.Shape)>} items
816
+ * @param {boolean} [animation]
817
+ */
818
+ redrawItems: function (items, animation) {
819
+ var i = items.length;
820
+
821
+ // needs a backward loop
822
+ // labels/shapes array might be modified
823
+ // due to destruction of the item
824
+ while (i--) {
825
+ this.redrawItem(items[i], animation);
826
+ }
827
+ },
828
+
829
+ render: function () {
830
+ var renderer = this.chart.renderer;
831
+
832
+ this.graphic = renderer
833
+ .g('annotation')
834
+ .attr({
835
+ zIndex: this.options.zIndex,
836
+ visibility: this.options.visible ?
837
+ 'visible' :
838
+ 'hidden'
839
+ })
840
+ .add();
841
+
842
+ this.shapesGroup = renderer
843
+ .g('annotation-shapes')
844
+ .add(this.graphic)
845
+ .clip(this.chart.plotBoxClip);
846
+
847
+ this.labelsGroup = renderer
848
+ .g('annotation-labels')
849
+ .attr({
850
+ // hideOverlappingLabels requires translation
851
+ translateX: 0,
852
+ translateY: 0
853
+ })
854
+ .add(this.graphic);
855
+
856
+ if (this.clipRect) {
857
+ this.graphic.clip(this.clipRect);
858
+ }
859
+
860
+ this.addEvents();
861
+
862
+ controllableMixin.render.call(this);
863
+ },
864
+
865
+ /**
866
+ * Set the annotation's visibility.
867
+ *
868
+ * @param {Boolean} [visible] - Whether to show or hide an annotation.
869
+ * If the param is omitted, the annotation's visibility is toggled.
870
+ */
871
+ setVisibility: function (visibility) {
872
+ var options = this.options,
873
+ visible = pick(visibility, !options.visible);
874
+
875
+ this.graphic.attr(
876
+ 'visibility',
877
+ visible ? 'visible' : 'hidden'
878
+ );
879
+
880
+ if (!visible) {
881
+ this.setControlPointsVisibility(false);
882
+ }
883
+
884
+ options.visible = visible;
885
+ },
886
+
887
+ setControlPointsVisibility: function (visible) {
888
+ var setItemControlPointsVisibility = function (item) {
889
+ item.setControlPointsVisibility(visible);
890
+ };
891
+
892
+ controllableMixin.setControlPointsVisibility.call(
893
+ this,
894
+ visible
895
+ );
896
+
897
+ this.shapes.forEach(setItemControlPointsVisibility);
898
+ this.labels.forEach(setItemControlPointsVisibility);
899
+ },
900
+
901
+ /**
902
+ * Destroy the annotation. This function does not touch the chart
903
+ * that the annotation belongs to (all annotations are kept in
904
+ * the chart.annotations array) - it is recommended to use
905
+ * {@link Highcharts.Chart#removeAnnotation} instead.
906
+ */
907
+ destroy: function () {
908
+ var chart = this.chart,
909
+ destroyItem = function (item) {
910
+ item.destroy();
911
+ };
912
+
913
+ this.labels.forEach(destroyItem);
914
+ this.shapes.forEach(destroyItem);
915
+
916
+ this.clipXAxis = null;
917
+ this.clipYAxis = null;
918
+
919
+ erase(chart.labelCollectors, this.labelCollector);
920
+
921
+ eventEmitterMixin.destroy.call(this);
922
+ controllableMixin.destroy.call(this);
923
+
924
+ destroyObjectProperties(this, chart);
925
+ },
926
+
927
+ /**
928
+ * See {@link Highcharts.Annotation#destroy}.
929
+ */
930
+ remove: function () {
931
+ return this.destroy();
932
+ },
933
+
934
+ update: function (userOptions) {
935
+ var chart = this.chart,
936
+ labelsAndShapes = this.getLabelsAndShapesOptions(
937
+ this.userOptions,
938
+ userOptions
939
+ ),
940
+ userOptionsIndex = chart.annotations.indexOf(this),
941
+ options = H.merge(true, this.userOptions, userOptions);
942
+
943
+ options.labels = labelsAndShapes.labels;
944
+ options.shapes = labelsAndShapes.shapes;
945
+
946
+ this.destroy();
947
+ this.constructor(chart, options);
948
+
949
+ // Update options in chart options, used in exporting (#9767):
950
+ chart.options.annotations[userOptionsIndex] = options;
951
+
952
+ this.redraw();
953
+ },
954
+
955
+ /* *************************************************************
956
+ * ITEM SECTION
957
+ * Contains methods for handling a single item in an annotation
958
+ **************************************************************** */
959
+
960
+ /**
961
+ * Initialisation of a single shape
962
+ *
963
+ * @param {Object} shapeOptions - a confg object for a single shape
964
+ **/
965
+ initShape: function (shapeOptions, index) {
966
+ var options = merge(
967
+ this.options.shapeOptions,
968
+ {
969
+ controlPointOptions: this.options.controlPointOptions
970
+ },
971
+ shapeOptions
972
+ ),
973
+ shape = new Annotation.shapesMap[options.type](
974
+ this,
975
+ options,
976
+ index
977
+ );
978
+
979
+ shape.itemType = 'shape';
980
+
981
+ this.shapes.push(shape);
982
+
983
+ return shape;
984
+ },
985
+
986
+ /**
987
+ * Initialisation of a single label
988
+ *
989
+ * @param {Object} labelOptions
990
+ **/
991
+ initLabel: function (labelOptions, index) {
992
+ var options = merge(
993
+ this.options.labelOptions,
994
+ {
995
+ controlPointOptions: this.options.controlPointOptions
996
+ },
997
+ labelOptions
998
+ ),
999
+ label = new ControllableLabel(
1000
+ this,
1001
+ options,
1002
+ index
1003
+ );
1004
+
1005
+ label.itemType = 'label';
1006
+
1007
+ this.labels.push(label);
1008
+
1009
+ return label;
1010
+ },
1011
+
1012
+ /**
1013
+ * Redraw a single item.
1014
+ *
1015
+ * @param {Annotation.Label|Annotation.Shape} item
1016
+ * @param {boolean} [animation]
1017
+ */
1018
+ redrawItem: function (item, animation) {
1019
+ item.linkPoints();
1020
+
1021
+ if (!item.shouldBeDrawn()) {
1022
+ this.destroyItem(item);
1023
+ } else {
1024
+ if (!item.graphic) {
1025
+ this.renderItem(item);
1026
+ }
1027
+
1028
+ item.redraw(
1029
+ H.pick(animation, true) && item.graphic.placed
1030
+ );
1031
+
1032
+ if (item.points.length) {
1033
+ this.adjustVisibility(item);
1034
+ }
1035
+ }
1036
+ },
1037
+
1038
+ /**
1039
+ * Hide or show annotaiton attached to points.
1040
+ *
1041
+ * @param {Annotation.Label|Annotation.Shape} item
1042
+ */
1043
+
1044
+ adjustVisibility: function (item) { // #9481
1045
+ var hasVisiblePoints = false,
1046
+ label = item.graphic;
1047
+
1048
+ item.points.forEach(function (point) {
1049
+ if (
1050
+ point.series.visible !== false &&
1051
+ point.visible !== false
1052
+ ) {
1053
+ hasVisiblePoints = true;
1054
+ }
1055
+ });
1056
+
1057
+ if (!hasVisiblePoints) {
1058
+ label.hide();
1059
+
1060
+ } else if (label.visibility === 'hidden') {
1061
+ label.show();
1062
+ }
1063
+ },
1064
+
1065
+ /**
1066
+ * Destroy a single item.
1067
+ *
1068
+ * @param {Annotation.Label|Annotation.Shape} item
1069
+ */
1070
+ destroyItem: function (item) {
1071
+ // erase from shapes or labels array
1072
+ erase(this[item.itemType + 's'], item);
1073
+ item.destroy();
1074
+ },
1075
+
1076
+ /*
1077
+ * @private
1078
+ */
1079
+ renderItem: function (item) {
1080
+ item.render(
1081
+ item.itemType === 'label' ?
1082
+ this.labelsGroup :
1083
+ this.shapesGroup
1084
+ );
1085
+ }
1086
+ }
1087
+ );
1088
+
1089
+ /**
1090
+ * An object uses for mapping between a shape type and a constructor.
1091
+ * To add a new shape type extend this object with type name as a key
1092
+ * and a constructor as its value.
1093
+ **/
1094
+ Annotation.shapesMap = {
1095
+ 'rect': ControllableRect,
1096
+ 'circle': ControllableCircle,
1097
+ 'path': ControllablePath,
1098
+ 'image': ControllableImage
1099
+ };
1100
+
1101
+ Annotation.types = {};
1102
+
1103
+ Annotation.MockPoint = MockPoint;
1104
+ Annotation.ControlPoint = ControlPoint;
1105
+
1106
+ H.extendAnnotation = function (
1107
+ Constructor,
1108
+ BaseConstructor,
1109
+ prototype,
1110
+ defaultOptions
1111
+ ) {
1112
+ BaseConstructor = BaseConstructor || Annotation;
1113
+
1114
+ merge(
1115
+ true,
1116
+ Constructor.prototype,
1117
+ BaseConstructor.prototype,
1118
+ prototype
1119
+ );
1120
+
1121
+ Constructor.prototype.defaultOptions = merge(
1122
+ Constructor.prototype.defaultOptions,
1123
+ defaultOptions || {}
1124
+ );
1125
+ };
1126
+
1127
+ /* *********************************************************************
1128
+ *
1129
+ * EXTENDING CHART PROTOTYPE
1130
+ *
1131
+ ******************************************************************** */
1132
+
1133
+ // Let chart.update() work with annotations
1134
+ H.Chart.prototype.collectionsWithUpdate.push('annotations');
1135
+
1136
+ H.extend(H.Chart.prototype, /** @lends Highcharts.Chart# */ {
1137
+ initAnnotation: function (userOptions) {
1138
+ var Constructor =
1139
+ Annotation.types[userOptions.type] || Annotation,
1140
+ options = H.merge(
1141
+ Constructor.prototype.defaultOptions,
1142
+ userOptions
1143
+ ),
1144
+ annotation = new Constructor(this, options);
1145
+
1146
+ this.annotations.push(annotation);
1147
+
1148
+ return annotation;
1149
+ },
1150
+
1151
+ /**
1152
+ * Add an annotation to the chart after render time.
1153
+ *
1154
+ * @param {AnnotationOptions} options
1155
+ * The annotation options for the new, detailed annotation.
1156
+ * @param {boolean} [redraw]
1157
+ *
1158
+ * @return {Highcharts.Annotation} - The newly generated annotation.
1159
+ */
1160
+ addAnnotation: function (userOptions, redraw) {
1161
+ var annotation = this.initAnnotation(userOptions);
1162
+
1163
+ this.options.annotations.push(annotation.options);
1164
+
1165
+ if (pick(redraw, true)) {
1166
+ annotation.redraw();
1167
+ }
1168
+
1169
+ return annotation;
1170
+ },
1171
+
1172
+ /**
1173
+ * Remove an annotation from the chart.
1174
+ *
1175
+ * @param {String|Annotation} idOrAnnotation - The annotation's id or
1176
+ * direct annotation object.
1177
+ */
1178
+ removeAnnotation: function (idOrAnnotation) {
1179
+ var annotations = this.annotations,
1180
+ annotation = isString(idOrAnnotation) ? find(
1181
+ annotations,
1182
+ function (annotation) {
1183
+ return annotation.options.id === idOrAnnotation;
1184
+ }
1185
+ ) : idOrAnnotation;
1186
+
1187
+ if (annotation) {
1188
+ erase(this.options.annotations, annotation.options);
1189
+ erase(annotations, annotation);
1190
+ annotation.destroy();
1191
+ }
1192
+ },
1193
+
1194
+ drawAnnotations: function () {
1195
+ this.plotBoxClip.attr(this.plotBox);
1196
+
1197
+ this.annotations.forEach(function (annotation) {
1198
+ annotation.redraw();
1199
+ });
1200
+ }
1201
+ });
1202
+
1203
+
1204
+ H.Chart.prototype.callbacks.push(function (chart) {
1205
+ chart.annotations = [];
1206
+
1207
+ if (!chart.options.annotations) {
1208
+ chart.options.annotations = [];
1209
+ }
1210
+
1211
+ chart.plotBoxClip = this.renderer.clipRect(this.plotBox);
1212
+
1213
+ chart.controlPointsGroup = chart.renderer
1214
+ .g('control-points')
1215
+ .attr({ zIndex: 99 })
1216
+ .clip(chart.plotBoxClip)
1217
+ .add();
1218
+
1219
+ chart.options.annotations.forEach(function (annotationOptions, i) {
1220
+ var annotation = chart.initAnnotation(annotationOptions);
1221
+
1222
+ chart.options.annotations[i] = annotation.options;
1223
+ });
1224
+
1225
+ chart.drawAnnotations();
1226
+ addEvent(chart, 'redraw', chart.drawAnnotations);
1227
+ addEvent(chart, 'destroy', function () {
1228
+ chart.plotBoxClip.destroy();
1229
+ chart.controlPointsGroup.destroy();
1230
+ });
1231
+ });