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,2149 @@
1
+ /**
2
+ * Exporting module
3
+ *
4
+ * (c) 2010-2019 Torstein Honsi
5
+ *
6
+ * License: www.highcharts.com/license
7
+ */
8
+
9
+ /**
10
+ * Gets fired after a chart is printed through the context menu item or the
11
+ * Chart.print method.
12
+ *
13
+ * @callback Highcharts.ExportingAfterPrintCallbackFunction
14
+ *
15
+ * @param {Highcharts.Chart} chart
16
+ * The chart on which the event occured.
17
+ *
18
+ * @param {global.Event} event
19
+ * The event that occured.
20
+ */
21
+
22
+ /**
23
+ * Gets fired before a chart is printed through the context menu item or the
24
+ * Chart.print method.
25
+ *
26
+ * @callback Highcharts.ExportingBeforePrintCallbackFunction
27
+ *
28
+ * @param {Highcharts.Chart} chart
29
+ * The chart on which the event occured.
30
+ *
31
+ * @param {global.Event} event
32
+ * The event that occured.
33
+ */
34
+
35
+ /**
36
+ * Function to call if the offline-exporting module fails to export a chart on
37
+ * the client side.
38
+ *
39
+ * @callback Highcharts.ExportingErrorCallbackFunction
40
+ *
41
+ * @param {Highcharts.ExportingOptions} options
42
+ * The exporting options.
43
+ *
44
+ * @param {global.Error} err
45
+ * The error from the module.
46
+ */
47
+
48
+ /**
49
+ * Definition for a menu item in the context menu.
50
+ *
51
+ * @interface Highcharts.ExportingMenuObject
52
+ *//**
53
+ * The text for the menu item.
54
+ *
55
+ * @name Highcharts.ExportingMenuObject#text
56
+ * @type {string|undefined}
57
+ *//**
58
+ * If internationalization is required, the key to a language string.
59
+ *
60
+ * @name Highcharts.ExportingMenuObject#textKey
61
+ * @type {string|undefined}
62
+ *//**
63
+ * The click handler for the menu item.
64
+ *
65
+ * @name Highcharts.ExportingMenuObject#onclick
66
+ * @type {Function|undefined}
67
+ *//**
68
+ * Indicates a separator line instead of an item.
69
+ *
70
+ * @name Highcharts.ExportingMenuObject#separator
71
+ * @type {boolean|undefined}
72
+ */
73
+
74
+ 'use strict';
75
+
76
+ import H from '../parts/Globals.js';
77
+ import '../parts/Utilities.js';
78
+ import '../parts/Options.js';
79
+ import '../parts/Chart.js';
80
+ import chartNavigationMixin from '../mixins/navigation.js';
81
+
82
+ // create shortcuts
83
+ var defaultOptions = H.defaultOptions,
84
+ doc = H.doc,
85
+ Chart = H.Chart,
86
+ addEvent = H.addEvent,
87
+ removeEvent = H.removeEvent,
88
+ fireEvent = H.fireEvent,
89
+ createElement = H.createElement,
90
+ discardElement = H.discardElement,
91
+ css = H.css,
92
+ merge = H.merge,
93
+ pick = H.pick,
94
+ objectEach = H.objectEach,
95
+ extend = H.extend,
96
+ isTouchDevice = H.isTouchDevice,
97
+ win = H.win,
98
+ userAgent = win.navigator.userAgent,
99
+ SVGRenderer = H.SVGRenderer,
100
+ symbols = H.Renderer.prototype.symbols,
101
+ isMSBrowser = /Edge\/|Trident\/|MSIE /.test(userAgent),
102
+ isFirefoxBrowser = /firefox/i.test(userAgent);
103
+
104
+ // Add language
105
+ extend(defaultOptions.lang
106
+ /**
107
+ * @optionparent lang
108
+ */
109
+ , {
110
+
111
+ /**
112
+ * Exporting module only. The text for the menu item to print the chart.
113
+ *
114
+ * @since 3.0.1
115
+ */
116
+ printChart: 'Print chart',
117
+
118
+ /**
119
+ * Exporting module only. The text for the PNG download menu item.
120
+ *
121
+ * @since 2.0
122
+ */
123
+ downloadPNG: 'Download PNG image',
124
+
125
+ /**
126
+ * Exporting module only. The text for the JPEG download menu item.
127
+ *
128
+ * @since 2.0
129
+ */
130
+ downloadJPEG: 'Download JPEG image',
131
+
132
+ /**
133
+ * Exporting module only. The text for the PDF download menu item.
134
+ *
135
+ * @since 2.0
136
+ */
137
+ downloadPDF: 'Download PDF document',
138
+
139
+ /**
140
+ * Exporting module only. The text for the SVG download menu item.
141
+ *
142
+ * @since 2.0
143
+ */
144
+ downloadSVG: 'Download SVG vector image',
145
+
146
+ /**
147
+ * Exporting module menu. The tooltip title for the context menu holding
148
+ * print and export menu items.
149
+ *
150
+ * @since 3.0
151
+ */
152
+ contextButtonTitle: 'Chart context menu'
153
+
154
+ });
155
+
156
+ if (!defaultOptions.navigation) {
157
+ // Buttons and menus are collected in a separate config option set called
158
+ // 'navigation'. This can be extended later to add control buttons like
159
+ // zoom and pan right click menus.
160
+ /**
161
+ * A collection of options for buttons and menus appearing in the exporting
162
+ * module.
163
+ *
164
+ * @optionparent navigation
165
+ */
166
+ defaultOptions.navigation = {};
167
+ }
168
+ merge(true, defaultOptions.navigation, {
169
+
170
+ buttonOptions: {
171
+
172
+ theme: {},
173
+
174
+ /**
175
+ * Whether to enable buttons.
176
+ *
177
+ * @sample highcharts/navigation/buttonoptions-enabled/
178
+ * Exporting module loaded but buttons disabled
179
+ *
180
+ * @type {boolean}
181
+ * @default true
182
+ * @since 2.0
183
+ * @apioption navigation.buttonOptions.enabled
184
+ */
185
+
186
+ /**
187
+ * The pixel size of the symbol on the button.
188
+ *
189
+ * @sample highcharts/navigation/buttonoptions-height/
190
+ * Bigger buttons
191
+ *
192
+ * @since 2.0
193
+ */
194
+ symbolSize: 14,
195
+
196
+ /**
197
+ * The x position of the center of the symbol inside the button.
198
+ *
199
+ * @sample highcharts/navigation/buttonoptions-height/
200
+ * Bigger buttons
201
+ *
202
+ * @since 2.0
203
+ */
204
+ symbolX: 12.5,
205
+
206
+ /**
207
+ * The y position of the center of the symbol inside the button.
208
+ *
209
+ * @sample highcharts/navigation/buttonoptions-height/
210
+ * Bigger buttons
211
+ *
212
+ * @since 2.0
213
+ */
214
+ symbolY: 10.5,
215
+
216
+ /**
217
+ * Alignment for the buttons.
218
+ *
219
+ * @sample highcharts/navigation/buttonoptions-align/
220
+ * Center aligned
221
+ *
222
+ * @type {Highcharts.AlignType}
223
+ * @since 2.0
224
+ */
225
+ align: 'right',
226
+
227
+ /**
228
+ * The pixel spacing between buttons.
229
+ *
230
+ * @since 2.0
231
+ */
232
+ buttonSpacing: 3,
233
+
234
+ /**
235
+ * Pixel height of the buttons.
236
+ *
237
+ * @sample highcharts/navigation/buttonoptions-height/
238
+ * Bigger buttons
239
+ *
240
+ * @since 2.0
241
+ */
242
+ height: 22,
243
+
244
+ /**
245
+ * A text string to add to the individual button.
246
+ *
247
+ * @sample highcharts/exporting/buttons-text/
248
+ * Full text button
249
+ * @sample highcharts/exporting/buttons-text-symbol/
250
+ * Combined symbol and text
251
+ *
252
+ * @type {string}
253
+ * @default null
254
+ * @since 3.0
255
+ * @apioption navigation.buttonOptions.text
256
+ */
257
+
258
+ /**
259
+ * The vertical offset of the button's position relative to its
260
+ * `verticalAlign`.
261
+ *
262
+ * @sample highcharts/navigation/buttonoptions-verticalalign/
263
+ * Buttons at lower right
264
+ *
265
+ * @type {number}
266
+ * @default 0
267
+ * @since 2.0
268
+ * @apioption navigation.buttonOptions.y
269
+ */
270
+
271
+ /**
272
+ * The vertical alignment of the buttons. Can be one of "top", "middle"
273
+ * or "bottom".
274
+ *
275
+ * @sample highcharts/navigation/buttonoptions-verticalalign/
276
+ * Buttons at lower right
277
+ *
278
+ * @type {Highcharts.VerticalAlignType}
279
+ * @since 2.0
280
+ */
281
+ verticalAlign: 'top',
282
+
283
+ /**
284
+ * The pixel width of the button.
285
+ *
286
+ * @sample highcharts/navigation/buttonoptions-height/
287
+ * Bigger buttons
288
+ *
289
+ * @since 2.0
290
+ */
291
+ width: 24
292
+
293
+ }
294
+
295
+ });
296
+
297
+ // Presentational attributes
298
+ merge(true, defaultOptions.navigation
299
+ /**
300
+ * A collection of options for buttons and menus appearing in the exporting
301
+ * module.
302
+ *
303
+ * @optionparent navigation
304
+ */
305
+ , {
306
+
307
+ /**
308
+ * CSS styles for the popup menu appearing by default when the export
309
+ * icon is clicked. This menu is rendered in HTML.
310
+ *
311
+ * @see In styled mode, the menu is styled with the `.highcharts-menu`
312
+ * class.
313
+ *
314
+ * @sample highcharts/navigation/menustyle/
315
+ * Light gray menu background
316
+ *
317
+ * @type {Highcharts.CSSObject}
318
+ * @default {"border": "1px solid #999999", "background": "#ffffff", "padding": "5px 0"}
319
+ * @since 2.0
320
+ */
321
+ menuStyle: {
322
+ /** @ignore-option */
323
+ border: '1px solid #999999',
324
+ /** @ignore-option */
325
+ background: '#ffffff',
326
+ /** @ignore-option */
327
+ padding: '5px 0'
328
+ },
329
+
330
+ /**
331
+ * CSS styles for the individual items within the popup menu appearing
332
+ * by default when the export icon is clicked. The menu items are
333
+ * rendered in HTML. Font size defaults to `11px` on desktop and `14px`
334
+ * on touch devices.
335
+ *
336
+ * @see In styled mode, the menu items are styled with the
337
+ * `.highcharts-menu-item` class.
338
+ *
339
+ * @sample {highcharts} highcharts/navigation/menuitemstyle/
340
+ * Add a grey stripe to the left
341
+ *
342
+ * @type {Highcharts.CSSObject}
343
+ * @default {"padding": "0.5em 1em", "color": "#333333", "background": "none", "fontSize": "11px/14px", "transition": "background 250ms, color 250ms"}
344
+ * @since 2.0
345
+ */
346
+ menuItemStyle: {
347
+ /** @ignore-option */
348
+ padding: '0.5em 1em',
349
+ /** @ignore-option */
350
+ color: '#333333',
351
+ /** @ignore-option */
352
+ background: 'none',
353
+ /** @ignore-option */
354
+ fontSize: isTouchDevice ? '14px' : '11px',
355
+ /** @ignore-option */
356
+ transition: 'background 250ms, color 250ms'
357
+ },
358
+
359
+ /**
360
+ * CSS styles for the hover state of the individual items within the
361
+ * popup menu appearing by default when the export icon is clicked. The
362
+ * menu items are rendered in HTML.
363
+ *
364
+ * @see In styled mode, the menu items are styled with the
365
+ * `.highcharts-menu-item` class.
366
+ *
367
+ * @sample highcharts/navigation/menuitemhoverstyle/
368
+ * Bold text on hover
369
+ *
370
+ * @type {Highcharts.CSSObject}
371
+ * @default {"background": "#335cad", "color": "#ffffff"}
372
+ * @since 2.0
373
+ */
374
+ menuItemHoverStyle: {
375
+ /** @ignore-option */
376
+ background: '#335cad',
377
+ /** @ignore-option */
378
+ color: '#ffffff'
379
+ },
380
+
381
+ /**
382
+ * A collection of options for buttons appearing in the exporting
383
+ * module.
384
+ *
385
+ * In styled mode, the buttons are styled with the
386
+ * `.highcharts-contextbutton` and `.highcharts-button-symbol` classes.
387
+ */
388
+ buttonOptions: {
389
+
390
+ /**
391
+ * Fill color for the symbol within the button.
392
+ *
393
+ * @sample highcharts/navigation/buttonoptions-symbolfill/
394
+ * Blue symbol stroke for one of the buttons
395
+ *
396
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
397
+ * @since 2.0
398
+ */
399
+ symbolFill: '#666666',
400
+
401
+ /**
402
+ * The color of the symbol's stroke or line.
403
+ *
404
+ * @sample highcharts/navigation/buttonoptions-symbolstroke/
405
+ * Blue symbol stroke
406
+ *
407
+ * @type {Highcharts.ColorString}
408
+ * @since 2.0
409
+ */
410
+ symbolStroke: '#666666',
411
+
412
+ /**
413
+ * The pixel stroke width of the symbol on the button.
414
+ *
415
+ * @sample highcharts/navigation/buttonoptions-height/
416
+ * Bigger buttons
417
+ *
418
+ * @since 2.0
419
+ */
420
+ symbolStrokeWidth: 3,
421
+
422
+ /**
423
+ * A configuration object for the button theme. The object accepts
424
+ * SVG properties like `stroke-width`, `stroke` and `fill`.
425
+ * Tri-state button styles are supported by the `states.hover` and
426
+ * `states.select` objects.
427
+ *
428
+ * @sample highcharts/navigation/buttonoptions-theme/
429
+ * Theming the buttons
430
+ *
431
+ * @since 3.0
432
+ */
433
+ theme: {
434
+
435
+ /**
436
+ * The default fill exists only to capture hover events.
437
+ *
438
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
439
+ * @default #ffffff
440
+ * @apioption navigation.buttonOptions.theme.fill
441
+ */
442
+
443
+ /**
444
+ * Default stroke for the buttons.
445
+ * @type {Highcharts.ColorString}
446
+ * @default none
447
+ * @apioption navigation.buttonOptions.theme.stroke
448
+ */
449
+
450
+ /**
451
+ * Padding for the button.
452
+ */
453
+ padding: 5
454
+
455
+ }
456
+
457
+ }
458
+
459
+ });
460
+
461
+
462
+ // Add the export related options
463
+
464
+ /**
465
+ * Options for the exporting module. For an overview on the matter, see
466
+ * [the docs](https://www.highcharts.com/docs/export-module/export-module-overview).
467
+ *
468
+ * @optionparent exporting
469
+ */
470
+ defaultOptions.exporting = {
471
+
472
+ /**
473
+ * Experimental setting to allow HTML inside the chart (added through
474
+ * the `useHTML` options), directly in the exported image. This allows
475
+ * you to preserve complicated HTML structures like tables or bi-directional
476
+ * text in exported charts.
477
+ *
478
+ * Disclaimer: The HTML is rendered in a `foreignObject` tag in the
479
+ * generated SVG. The official export server is based on PhantomJS,
480
+ * which supports this, but other SVG clients, like Batik, does not
481
+ * support it. This also applies to downloaded SVG that you want to
482
+ * open in a desktop client.
483
+ *
484
+ * @type {boolean}
485
+ * @default false
486
+ * @since 4.1.8
487
+ * @apioption exporting.allowHTML
488
+ */
489
+
490
+ /**
491
+ * Additional chart options to be merged into an exported chart. For
492
+ * example, a common use case is to add data labels to improve readability
493
+ * of the exported chart, or to add a printer-friendly color scheme.
494
+ *
495
+ * @sample {highcharts} highcharts/exporting/chartoptions-data-labels/
496
+ * Added data labels
497
+ * @sample {highstock} highcharts/exporting/chartoptions-data-labels/
498
+ * Added data labels
499
+ *
500
+ * @type {Highcharts.Options}
501
+ * @apioption exporting.chartOptions
502
+ */
503
+
504
+ /**
505
+ * Whether to enable the exporting module. Disabling the module will
506
+ * hide the context button, but API methods will still be available.
507
+ *
508
+ * @sample {highcharts} highcharts/exporting/enabled-false/
509
+ * Exporting module is loaded but disabled
510
+ * @sample {highstock} highcharts/exporting/enabled-false/
511
+ * Exporting module is loaded but disabled
512
+ *
513
+ * @type {boolean}
514
+ * @default true
515
+ * @since 2.0
516
+ * @apioption exporting.enabled
517
+ */
518
+
519
+ /**
520
+ * Function to call if the offline-exporting module fails to export
521
+ * a chart on the client side, and [fallbackToExportServer](
522
+ * #exporting.fallbackToExportServer) is disabled. If left undefined, an
523
+ * exception is thrown instead. Receives two parameters, the exporting
524
+ * options, and the error from the module.
525
+ *
526
+ * @see [fallbackToExportServer](#exporting.fallbackToExportServer)
527
+ *
528
+ * @type {Highcharts.ExportingErrorCallbackFunction}
529
+ * @since 5.0.0
530
+ * @apioption exporting.error
531
+ */
532
+
533
+ /**
534
+ * Whether or not to fall back to the export server if the offline-exporting
535
+ * module is unable to export the chart on the client side. This happens for
536
+ * certain browsers, and certain features (e.g.
537
+ * [allowHTML](#exporting.allowHTML)), depending on the image type exporting
538
+ * to. For very complex charts, it is possible that export can fail in
539
+ * browsers that don't support Blob objects, due to data URL length limits.
540
+ * It is recommended to define the [exporting.error](#exporting.error)
541
+ * handler if disabling fallback, in order to notify users in case export
542
+ * fails.
543
+ *
544
+ * @type {boolean}
545
+ * @default true
546
+ * @since 4.1.8
547
+ * @apioption exporting.fallbackToExportServer
548
+ */
549
+
550
+ /**
551
+ * The filename, without extension, to use for the exported chart.
552
+ *
553
+ * @sample {highcharts} highcharts/exporting/filename/
554
+ * Custom file name
555
+ * @sample {highstock} highcharts/exporting/filename/
556
+ * Custom file name
557
+ *
558
+ * @type {string}
559
+ * @default chart
560
+ * @since 2.0
561
+ * @apioption exporting.filename
562
+ */
563
+
564
+ /**
565
+ * An object containing additional key value data for the POST form that
566
+ * sends the SVG to the export server. For example, a `target` can be set to
567
+ * make sure the generated image is received in another frame, or a custom
568
+ * `enctype` or `encoding` can be set.
569
+ *
570
+ * @type {*}
571
+ * @since 3.0.8
572
+ * @apioption exporting.formAttributes
573
+ */
574
+
575
+ /**
576
+ * Path where Highcharts will look for export module dependencies to
577
+ * load on demand if they don't already exist on `window`. Should currently
578
+ * point to location of [CanVG](https://github.com/canvg/canvg) library,
579
+ * [RGBColor.js](https://github.com/canvg/canvg),
580
+ * [jsPDF](https://github.com/yWorks/jsPDF) and
581
+ * [svg2pdf.js](https://github.com/yWorks/svg2pdf.js), required for client
582
+ * side export in certain browsers.
583
+ *
584
+ * @type {string}
585
+ * @default https://code.highcharts.com/{version}/lib
586
+ * @since 5.0.0
587
+ * @apioption exporting.libURL
588
+ */
589
+
590
+ /**
591
+ * Analogous to [sourceWidth](#exporting.sourceWidth).
592
+ *
593
+ * @type {number}
594
+ * @since 3.0
595
+ * @apioption exporting.sourceHeight
596
+ */
597
+
598
+ /**
599
+ * The width of the original chart when exported, unless an explicit
600
+ * [chart.width](#chart.width) is set, or a pixel width is set on the
601
+ * container. The width exported raster image is then multiplied by
602
+ * [scale](#exporting.scale).
603
+ *
604
+ * @sample {highcharts} highcharts/exporting/sourcewidth/
605
+ * Source size demo
606
+ * @sample {highstock} highcharts/exporting/sourcewidth/
607
+ * Source size demo
608
+ * @sample {highmaps} maps/exporting/sourcewidth/
609
+ * Source size demo
610
+ *
611
+ * @type {number}
612
+ * @since 3.0
613
+ * @apioption exporting.sourceWidth
614
+ */
615
+
616
+ /**
617
+ * The pixel width of charts exported to PNG or JPG. As of Highcharts
618
+ * 3.0, the default pixel width is a function of the [chart.width](
619
+ * #chart.width) or [exporting.sourceWidth](#exporting.sourceWidth) and the
620
+ * [exporting.scale](#exporting.scale).
621
+ *
622
+ * @sample {highcharts} highcharts/exporting/width/
623
+ * Export to 200px wide images
624
+ * @sample {highstock} highcharts/exporting/width/
625
+ * Export to 200px wide images
626
+ *
627
+ * @type {number}
628
+ * @since 2.0
629
+ * @apioption exporting.width
630
+ */
631
+
632
+ /**
633
+ * Default MIME type for exporting if `chart.exportChart()` is called
634
+ * without specifying a `type` option. Possible values are `image/png`,
635
+ * `image/jpeg`, `application/pdf` and `image/svg+xml`.
636
+ *
637
+ * @since 2.0
638
+ * @validvalue ["image/png", "image/jpeg", "application/pdf", "image/svg+xml"]
639
+ */
640
+ type: 'image/png',
641
+
642
+ /**
643
+ * The URL for the server module converting the SVG string to an image
644
+ * format. By default this points to Highchart's free web service.
645
+ *
646
+ * @since 2.0
647
+ */
648
+ url: 'https://export.highcharts.com/',
649
+
650
+ /**
651
+ * When printing the chart from the menu item in the burger menu, if
652
+ * the on-screen chart exceeds this width, it is resized. After printing
653
+ * or cancelled, it is restored. The default width makes the chart
654
+ * fit into typical paper format. Note that this does not affect the
655
+ * chart when printing the web page as a whole.
656
+ *
657
+ * @since 4.2.5
658
+ */
659
+ printMaxWidth: 780,
660
+
661
+ /**
662
+ * Defines the scale or zoom factor for the exported image compared
663
+ * to the on-screen display. While for instance a 600px wide chart
664
+ * may look good on a website, it will look bad in print. The default
665
+ * scale of 2 makes this chart export to a 1200px PNG or JPG.
666
+ *
667
+ * @see [chart.width](#chart.width)
668
+ * @see [exporting.sourceWidth](#exporting.sourceWidth)
669
+ *
670
+ * @sample {highcharts} highcharts/exporting/scale/
671
+ * Scale demonstrated
672
+ * @sample {highstock} highcharts/exporting/scale/
673
+ * Scale demonstrated
674
+ * @sample {highmaps} maps/exporting/scale/
675
+ * Scale demonstrated
676
+ *
677
+ * @since 3.0
678
+ */
679
+ scale: 2,
680
+
681
+ /**
682
+ * Options for the export related buttons, print and export. In addition
683
+ * to the default buttons listed here, custom buttons can be added.
684
+ * See [navigation.buttonOptions](#navigation.buttonOptions) for general
685
+ * options.
686
+ *
687
+ * @type {Highcharts.Dictionary<Highcharts.ExportingButtonsContextButtonOptions>}
688
+ */
689
+ buttons: {
690
+
691
+ /**
692
+ * Options for the export button.
693
+ *
694
+ * In styled mode, export button styles can be applied with the
695
+ * `.highcharts-contextbutton` class.
696
+ *
697
+ * @extends navigation.buttonOptions
698
+ */
699
+ contextButton: {
700
+
701
+ /**
702
+ * A click handler callback to use on the button directly instead of
703
+ * the popup menu.
704
+ *
705
+ * @sample highcharts/exporting/buttons-contextbutton-onclick/
706
+ * Skip the menu and export the chart directly
707
+ *
708
+ * @type {Function}
709
+ * @since 2.0
710
+ * @apioption exporting.buttons.contextButton.onclick
711
+ */
712
+
713
+ /**
714
+ * See [navigation.buttonOptions.symbolFill](
715
+ * #navigation.buttonOptions.symbolFill).
716
+ *
717
+ * @type {Highcharts.ColorString}
718
+ * @default #666666
719
+ * @since 2.0
720
+ * @apioption exporting.buttons.contextButton.symbolFill
721
+ */
722
+
723
+ /**
724
+ * The horizontal position of the button relative to the `align`
725
+ * option.
726
+ *
727
+ * @type {number}
728
+ * @default -10
729
+ * @since 2.0
730
+ * @apioption exporting.buttons.contextButton.x
731
+ */
732
+
733
+ /**
734
+ * The class name of the context button.
735
+ */
736
+ className: 'highcharts-contextbutton',
737
+
738
+ /**
739
+ * The class name of the menu appearing from the button.
740
+ */
741
+ menuClassName: 'highcharts-contextmenu',
742
+
743
+ /**
744
+ * The symbol for the button. Points to a definition function in
745
+ * the `Highcharts.Renderer.symbols` collection. The default
746
+ * `exportIcon` function is part of the exporting module. Possible
747
+ * values are "circle", "square", "diamond", "triangle",
748
+ * "triangle-down", "menu", "menuball" or custom shape.
749
+ *
750
+ * @sample highcharts/exporting/buttons-contextbutton-symbol/
751
+ * Use a circle for symbol
752
+ * @sample highcharts/exporting/buttons-contextbutton-symbol-custom/
753
+ * Custom shape as symbol
754
+ *
755
+ * @since 2.0
756
+ * @validvalue ["menu", "menuball", "exportIcon", "circle", "square", "diamond", "triangle", "triangle-down"]
757
+ */
758
+ symbol: 'menu',
759
+
760
+ /**
761
+ * The key to a [lang](#lang) option setting that is used for the
762
+ * button's title tooltip. When the key is `contextButtonTitle`, it
763
+ * refers to [lang.contextButtonTitle](#lang.contextButtonTitle)
764
+ * that defaults to "Chart context menu".
765
+ *
766
+ * @since 6.1.4
767
+ */
768
+ titleKey: 'contextButtonTitle',
769
+
770
+ /**
771
+ * This option is deprecated, use
772
+ * [titleKey](#exporting.buttons.contextButton.titleKey) instead.
773
+ *
774
+ * @deprecated
775
+ * @type {string}
776
+ * @apioption exporting.buttons.contextButton._titleKey
777
+ */
778
+
779
+ /**
780
+ * A collection of strings pointing to config options for the menu
781
+ * items. The config options are defined in the
782
+ * `menuItemDefinitions` option.
783
+ *
784
+ * By default, there is the "Print" menu item plus one menu item
785
+ * for each of the available export types.
786
+ *
787
+ * @sample {highcharts} highcharts/exporting/menuitemdefinitions/
788
+ * Menu item definitions
789
+ * @sample {highstock} highcharts/exporting/menuitemdefinitions/
790
+ * Menu item definitions
791
+ * @sample {highmaps} highcharts/exporting/menuitemdefinitions/
792
+ * Menu item definitions
793
+ *
794
+ * @type {Array<string>}
795
+ * @default ["printChart", "separator", "downloadPNG", "downloadJPEG", "downloadPDF", "downloadSVG"]
796
+ * @since 2.0
797
+ */
798
+ menuItems: [
799
+ 'printChart',
800
+ 'separator',
801
+ 'downloadPNG',
802
+ 'downloadJPEG',
803
+ 'downloadPDF',
804
+ 'downloadSVG'
805
+ ]
806
+
807
+ }
808
+
809
+ },
810
+ /**
811
+ * An object consisting of definitions for the menu items in the context
812
+ * menu. Each key value pair has a `key` that is referenced in the
813
+ * [menuItems](#exporting.buttons.contextButton.menuItems) setting,
814
+ * and a `value`, which is an object with the following properties:
815
+ *
816
+ * - **onclick:** The click handler for the menu item
817
+ *
818
+ * - **text:** The text for the menu item
819
+ *
820
+ * - **textKey:** If internationalization is required, the key to a language
821
+ * string
822
+ *
823
+ * @sample {highcharts} highcharts/exporting/menuitemdefinitions/
824
+ * Menu item definitions
825
+ * @sample {highstock} highcharts/exporting/menuitemdefinitions/
826
+ * Menu item definitions
827
+ * @sample {highmaps} highcharts/exporting/menuitemdefinitions/
828
+ * Menu item definitions
829
+ *
830
+ * @type {Highcharts.Dictionary<Highcharts.ExportingMenuObject>}
831
+ * @default {"printChart": {}, "separator": {}, "downloadPNG": {}, "downloadJPEG": {}, "downloadPDF": {}, "downloadSVG": {}}
832
+ * @since 5.0.13
833
+ */
834
+ menuItemDefinitions: {
835
+
836
+ /**
837
+ * @ignore
838
+ */
839
+ printChart: {
840
+ textKey: 'printChart',
841
+ onclick: function () {
842
+ this.print();
843
+ }
844
+ },
845
+
846
+ /**
847
+ * @ignore
848
+ */
849
+ separator: {
850
+ separator: true
851
+ },
852
+
853
+ /**
854
+ * @ignore
855
+ */
856
+ downloadPNG: {
857
+ textKey: 'downloadPNG',
858
+ onclick: function () {
859
+ this.exportChart();
860
+ }
861
+ },
862
+
863
+ /**
864
+ * @ignore
865
+ */
866
+ downloadJPEG: {
867
+ textKey: 'downloadJPEG',
868
+ onclick: function () {
869
+ this.exportChart({
870
+ type: 'image/jpeg'
871
+ });
872
+ }
873
+ },
874
+
875
+ /**
876
+ * @ignore
877
+ */
878
+ downloadPDF: {
879
+ textKey: 'downloadPDF',
880
+ onclick: function () {
881
+ this.exportChart({
882
+ type: 'application/pdf'
883
+ });
884
+ }
885
+ },
886
+
887
+ /**
888
+ * @ignore
889
+ */
890
+ downloadSVG: {
891
+ textKey: 'downloadSVG',
892
+ onclick: function () {
893
+ this.exportChart({
894
+ type: 'image/svg+xml'
895
+ });
896
+ }
897
+ }
898
+
899
+ }
900
+
901
+ };
902
+
903
+ /**
904
+ * Fires after a chart is printed through the context menu item or the
905
+ * `Chart.print` method. Requires the exporting module.
906
+ *
907
+ * @sample highcharts/chart/events-beforeprint-afterprint/
908
+ * Rescale the chart to print
909
+ *
910
+ * @type {Highcharts.ExportingAfterPrintCallbackFunction}
911
+ * @since 4.1.0
912
+ * @context Highcharts.Chart
913
+ * @apioption chart.events.afterPrint
914
+ */
915
+
916
+ /**
917
+ * Fires before a chart is printed through the context menu item or
918
+ * the `Chart.print` method. Requires the exporting module.
919
+ *
920
+ * @sample highcharts/chart/events-beforeprint-afterprint/
921
+ * Rescale the chart to print
922
+ *
923
+ * @type {Highcharts.ExportingBeforePrintCallbackFunction}
924
+ * @since 4.1.0
925
+ * @context Highcharts.Chart
926
+ * @apioption chart.events.beforePrint
927
+ */
928
+
929
+ /**
930
+ * The post utility
931
+ *
932
+ * @private
933
+ * @function Highcharts.post
934
+ *
935
+ * @param {string} url
936
+ *
937
+ * @param {*} data
938
+ *
939
+ * @param {*} formAttributes
940
+ */
941
+ H.post = function (url, data, formAttributes) {
942
+ // create the form
943
+ var form = createElement('form', merge({
944
+ method: 'post',
945
+ action: url,
946
+ enctype: 'multipart/form-data'
947
+ }, formAttributes), {
948
+ display: 'none'
949
+ }, doc.body);
950
+
951
+ // add the data
952
+ objectEach(data, function (val, name) {
953
+ createElement('input', {
954
+ type: 'hidden',
955
+ name: name,
956
+ value: val
957
+ }, null, form);
958
+ });
959
+
960
+ // submit
961
+ form.submit();
962
+
963
+ // clean up
964
+ discardElement(form);
965
+ };
966
+
967
+ extend(Chart.prototype, /** @lends Highcharts.Chart.prototype */ {
968
+
969
+ /**
970
+ * Exporting module only. A collection of fixes on the produced SVG to
971
+ * account for expando properties, browser bugs, VML problems and other.
972
+ * Returns a cleaned SVG.
973
+ *
974
+ * @private
975
+ * @function Highcharts.Chart#sanitizeSVG
976
+ *
977
+ * @param {string} svg
978
+ *
979
+ * @param {Highcharts.Options} options
980
+ *
981
+ * @return {string}
982
+ */
983
+ sanitizeSVG: function (svg, options) {
984
+ // Move HTML into a foreignObject
985
+ if (options && options.exporting && options.exporting.allowHTML) {
986
+ var html = svg.match(/<\/svg>(.*?$)/);
987
+
988
+ if (html && html[1]) {
989
+ html = '<foreignObject x="0" y="0" ' +
990
+ 'width="' + options.chart.width + '" ' +
991
+ 'height="' + options.chart.height + '">' +
992
+ '<body xmlns="http://www.w3.org/1999/xhtml">' +
993
+ html[1] +
994
+ '</body>' +
995
+ '</foreignObject>';
996
+ svg = svg.replace('</svg>', html + '</svg>');
997
+ }
998
+ }
999
+
1000
+ svg = svg
1001
+ .replace(/zIndex="[^"]+"/g, '')
1002
+ .replace(/symbolName="[^"]+"/g, '')
1003
+ .replace(/jQuery[0-9]+="[^"]+"/g, '')
1004
+ .replace(/url\(("|&quot;)(\S+)("|&quot;)\)/g, 'url($2)')
1005
+ .replace(/url\([^#]+#/g, 'url(#')
1006
+ .replace(
1007
+ /<svg /,
1008
+ '<svg xmlns:xlink="http://www.w3.org/1999/xlink" '
1009
+ )
1010
+ .replace(/ (|NS[0-9]+\:)href=/g, ' xlink:href=') // #3567
1011
+ .replace(/\n/, ' ')
1012
+ // Any HTML added to the container after the SVG (#894)
1013
+ .replace(/<\/svg>.*?$/, '</svg>')
1014
+ // Batik doesn't support rgba fills and strokes (#3095)
1015
+ .replace(
1016
+ /(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g, // eslint-disable-line max-len
1017
+ '$1="rgb($2)" $1-opacity="$3"'
1018
+ )
1019
+
1020
+ // Replace HTML entities, issue #347
1021
+ .replace(/&nbsp;/g, '\u00A0') // no-break space
1022
+ .replace(/&shy;/g, '\u00AD'); // soft hyphen
1023
+
1024
+ // Further sanitize for oldIE
1025
+ if (this.ieSanitizeSVG) {
1026
+ svg = this.ieSanitizeSVG(svg);
1027
+ }
1028
+
1029
+ return svg;
1030
+ },
1031
+
1032
+ /**
1033
+ * Return the unfiltered innerHTML of the chart container. Used as hook for
1034
+ * plugins. In styled mode, it also takes care of inlining CSS style rules.
1035
+ *
1036
+ * @see Chart#getSVG
1037
+ *
1038
+ * @function Highcharts.Chart#getChartHTML
1039
+ *
1040
+ * @returns {string}
1041
+ * The unfiltered SVG of the chart.
1042
+ */
1043
+ getChartHTML: function () {
1044
+ if (this.styledMode) {
1045
+ this.inlineStyles();
1046
+ }
1047
+
1048
+ return this.container.innerHTML;
1049
+ },
1050
+
1051
+ /**
1052
+ * Return an SVG representation of the chart.
1053
+ *
1054
+ * @sample highcharts/members/chart-getsvg/
1055
+ * View the SVG from a button
1056
+ *
1057
+ * @function Highcharts.Chart#getSVG
1058
+ *
1059
+ * @param {Highcharts.Options} chartOptions
1060
+ * Additional chart options for the generated SVG representation. For
1061
+ * collections like `xAxis`, `yAxis` or `series`, the additional
1062
+ * options is either merged in to the orininal item of the same
1063
+ * `id`, or to the first item if a common id is not found.
1064
+ *
1065
+ * @return {string}
1066
+ * The SVG representation of the rendered chart.
1067
+ *
1068
+ * @fires Highcharts.Chart#event:getSVG
1069
+ */
1070
+ getSVG: function (chartOptions) {
1071
+ var chart = this,
1072
+ chartCopy,
1073
+ sandbox,
1074
+ svg,
1075
+ seriesOptions,
1076
+ sourceWidth,
1077
+ sourceHeight,
1078
+ cssWidth,
1079
+ cssHeight,
1080
+ // Copy the options and add extra options
1081
+ options = merge(chart.options, chartOptions);
1082
+
1083
+
1084
+ // create a sandbox where a new chart will be generated
1085
+ sandbox = createElement('div', null, {
1086
+ position: 'absolute',
1087
+ top: '-9999em',
1088
+ width: chart.chartWidth + 'px',
1089
+ height: chart.chartHeight + 'px'
1090
+ }, doc.body);
1091
+
1092
+ // get the source size
1093
+ cssWidth = chart.renderTo.style.width;
1094
+ cssHeight = chart.renderTo.style.height;
1095
+ sourceWidth = options.exporting.sourceWidth ||
1096
+ options.chart.width ||
1097
+ (/px$/.test(cssWidth) && parseInt(cssWidth, 10)) ||
1098
+ (options.isGantt ? 800 : 600);
1099
+ sourceHeight = options.exporting.sourceHeight ||
1100
+ options.chart.height ||
1101
+ (/px$/.test(cssHeight) && parseInt(cssHeight, 10)) ||
1102
+ 400;
1103
+
1104
+ // override some options
1105
+ extend(options.chart, {
1106
+ animation: false,
1107
+ renderTo: sandbox,
1108
+ forExport: true,
1109
+ renderer: 'SVGRenderer',
1110
+ width: sourceWidth,
1111
+ height: sourceHeight
1112
+ });
1113
+ options.exporting.enabled = false; // hide buttons in print
1114
+ delete options.data; // #3004
1115
+
1116
+ // prepare for replicating the chart
1117
+ options.series = [];
1118
+ chart.series.forEach(function (serie) {
1119
+ seriesOptions = merge(serie.userOptions, { // #4912
1120
+ animation: false, // turn off animation
1121
+ enableMouseTracking: false,
1122
+ showCheckbox: false,
1123
+ visible: serie.visible
1124
+ });
1125
+
1126
+ // Used for the navigator series that has its own option set
1127
+ if (!seriesOptions.isInternal) {
1128
+ options.series.push(seriesOptions);
1129
+ }
1130
+ });
1131
+
1132
+ // Assign an internal key to ensure a one-to-one mapping (#5924)
1133
+ chart.axes.forEach(function (axis) {
1134
+ if (!axis.userOptions.internalKey) { // #6444
1135
+ axis.userOptions.internalKey = H.uniqueKey();
1136
+ }
1137
+ });
1138
+
1139
+ // generate the chart copy
1140
+ chartCopy = new H.Chart(options, chart.callback);
1141
+
1142
+ // Axis options and series options (#2022, #3900, #5982)
1143
+ if (chartOptions) {
1144
+ ['xAxis', 'yAxis', 'series'].forEach(function (coll) {
1145
+ var collOptions = {};
1146
+
1147
+ if (chartOptions[coll]) {
1148
+ collOptions[coll] = chartOptions[coll];
1149
+ chartCopy.update(collOptions);
1150
+ }
1151
+ });
1152
+ }
1153
+
1154
+ // Reflect axis extremes in the export (#5924)
1155
+ chart.axes.forEach(function (axis) {
1156
+ var axisCopy = H.find(chartCopy.axes, function (copy) {
1157
+ return copy.options.internalKey ===
1158
+ axis.userOptions.internalKey;
1159
+ }),
1160
+ extremes = axis.getExtremes(),
1161
+ userMin = extremes.userMin,
1162
+ userMax = extremes.userMax;
1163
+
1164
+ if (
1165
+ axisCopy &&
1166
+ (
1167
+ (userMin !== undefined && userMin !== axisCopy.min) ||
1168
+ (userMax !== undefined && userMax !== axisCopy.max)
1169
+ )
1170
+ ) {
1171
+ axisCopy.setExtremes(userMin, userMax, true, false);
1172
+ }
1173
+ });
1174
+
1175
+ // Get the SVG from the container's innerHTML
1176
+ svg = chartCopy.getChartHTML();
1177
+ fireEvent(this, 'getSVG', { chartCopy: chartCopy });
1178
+
1179
+ svg = chart.sanitizeSVG(svg, options);
1180
+
1181
+ // free up memory
1182
+ options = null;
1183
+ chartCopy.destroy();
1184
+ discardElement(sandbox);
1185
+
1186
+ return svg;
1187
+ },
1188
+
1189
+ /**
1190
+ * @private
1191
+ * @function Highcharts.Chart#getSVGForExport
1192
+ *
1193
+ * @param {Highcharts.ExportingOptions} options
1194
+ *
1195
+ * @param {Highcharts.Options} chartOptions
1196
+ *
1197
+ * @return {string}
1198
+ */
1199
+ getSVGForExport: function (options, chartOptions) {
1200
+ var chartExportingOptions = this.options.exporting;
1201
+
1202
+ return this.getSVG(merge(
1203
+ { chart: { borderRadius: 0 } },
1204
+ chartExportingOptions.chartOptions,
1205
+ chartOptions,
1206
+ {
1207
+ exporting: {
1208
+ sourceWidth: (
1209
+ (options && options.sourceWidth) ||
1210
+ chartExportingOptions.sourceWidth
1211
+ ),
1212
+ sourceHeight: (
1213
+ (options && options.sourceHeight) ||
1214
+ chartExportingOptions.sourceHeight
1215
+ )
1216
+ }
1217
+ }
1218
+ ));
1219
+ },
1220
+
1221
+ /**
1222
+ * Get the default file name used for exported charts. By default it creates
1223
+ * a file name based on the chart title.
1224
+ *
1225
+ * @function Highcharts.Chart#getFilename
1226
+ *
1227
+ * @return {string} A file name without extension.
1228
+ */
1229
+ getFilename: function () {
1230
+ var s = this.userOptions.title && this.userOptions.title.text,
1231
+ filename = this.options.exporting.filename;
1232
+
1233
+ if (filename) {
1234
+ return filename;
1235
+ }
1236
+
1237
+ if (typeof s === 'string') {
1238
+ filename = s
1239
+ .toLowerCase()
1240
+ .replace(/<\/?[^>]+(>|$)/g, '') // strip HTML tags
1241
+ .replace(/[\s_]+/g, '-')
1242
+ .replace(/[^a-z0-9\-]/g, '') // preserve only latin
1243
+ .replace(/^[\-]+/g, '') // dashes in the start
1244
+ .replace(/[\-]+/g, '-') // dashes in a row
1245
+ .substr(0, 24)
1246
+ .replace(/[\-]+$/g, ''); // dashes in the end;
1247
+ }
1248
+
1249
+ if (!filename || filename.length < 5) {
1250
+ filename = 'chart';
1251
+ }
1252
+ return filename;
1253
+ },
1254
+
1255
+ /**
1256
+ * Exporting module required. Submit an SVG version of the chart to a server
1257
+ * along with some parameters for conversion.
1258
+ *
1259
+ * @sample highcharts/members/chart-exportchart/
1260
+ * Export with no options
1261
+ * @sample highcharts/members/chart-exportchart-filename/
1262
+ * PDF type and custom filename
1263
+ * @sample highcharts/members/chart-exportchart-custom-background/
1264
+ * Different chart background in export
1265
+ * @sample stock/members/chart-exportchart/
1266
+ * Export with Highstock
1267
+ *
1268
+ * @function Highcharts.Chart#exportChart
1269
+ *
1270
+ * @param {Highcharts.ExportingOptions} exportingOptions
1271
+ * Exporting options in addition to those defined in
1272
+ * [exporting](https://api.highcharts.com/highcharts/exporting).
1273
+ *
1274
+ * @param {Highcharts.Options} chartOptions
1275
+ * Additional chart options for the exported chart. For example a
1276
+ * different background color can be added here, or `dataLabels` for
1277
+ * export only.
1278
+ */
1279
+ exportChart: function (exportingOptions, chartOptions) {
1280
+
1281
+ var svg = this.getSVGForExport(exportingOptions, chartOptions);
1282
+
1283
+ // merge the options
1284
+ exportingOptions = merge(this.options.exporting, exportingOptions);
1285
+
1286
+ // do the post
1287
+ H.post(exportingOptions.url, {
1288
+ filename: exportingOptions.filename || this.getFilename(),
1289
+ type: exportingOptions.type,
1290
+ // IE8 fails to post undefined correctly, so use 0
1291
+ width: exportingOptions.width || 0,
1292
+ scale: exportingOptions.scale,
1293
+ svg: svg
1294
+ }, exportingOptions.formAttributes);
1295
+
1296
+ },
1297
+
1298
+ /**
1299
+ * Exporting module required. Clears away other elements in the page and
1300
+ * prints the chart as it is displayed. By default, when the exporting
1301
+ * module is enabled, a context button with a drop down menu in the upper
1302
+ * right corner accesses this function.
1303
+ *
1304
+ * @sample highcharts/members/chart-print/
1305
+ * Print from a HTML button
1306
+ *
1307
+ * @function Highcharts.Chart#print
1308
+ *
1309
+ * @fires Highcharts.Chart#event:beforePrint
1310
+ * @fires Highcharts.Chart#event:afterPrint
1311
+ */
1312
+ print: function () {
1313
+
1314
+ var chart = this,
1315
+ origDisplay = [],
1316
+ body = doc.body,
1317
+ childNodes = body.childNodes,
1318
+ printMaxWidth = chart.options.exporting.printMaxWidth,
1319
+ resetParams,
1320
+ handleMaxWidth;
1321
+
1322
+ // Move the chart container(s) to another div
1323
+ function moveContainers(moveTo) {
1324
+ (
1325
+ chart.fixedDiv ? // When scrollablePlotArea is active (#9533)
1326
+ [chart.fixedDiv, chart.scrollingContainer] :
1327
+ [chart.container]
1328
+
1329
+ ).forEach(function (div) {
1330
+ moveTo.appendChild(div);
1331
+ });
1332
+ }
1333
+
1334
+ if (chart.isPrinting) { // block the button while in printing mode
1335
+ return;
1336
+ }
1337
+
1338
+ chart.isPrinting = true;
1339
+ chart.pointer.reset(null, 0);
1340
+
1341
+ fireEvent(chart, 'beforePrint');
1342
+
1343
+ // Handle printMaxWidth
1344
+ handleMaxWidth = printMaxWidth && chart.chartWidth > printMaxWidth;
1345
+ if (handleMaxWidth) {
1346
+ resetParams = [chart.options.chart.width, undefined, false];
1347
+ chart.setSize(printMaxWidth, undefined, false);
1348
+ }
1349
+
1350
+ // hide all body content
1351
+ childNodes.forEach(function (node, i) {
1352
+ if (node.nodeType === 1) {
1353
+ origDisplay[i] = node.style.display;
1354
+ node.style.display = 'none';
1355
+ }
1356
+ });
1357
+
1358
+ // pull out the chart
1359
+ moveContainers(body);
1360
+
1361
+ // Give the browser time to draw WebGL content, an issue that randomly
1362
+ // appears (at least) in Chrome ~67 on the Mac (#8708).
1363
+ setTimeout(function () {
1364
+
1365
+ win.focus(); // #1510
1366
+ win.print();
1367
+
1368
+ // allow the browser to prepare before reverting
1369
+ setTimeout(function () {
1370
+
1371
+ // put the chart back in
1372
+ moveContainers(chart.renderTo);
1373
+
1374
+ // restore all body content
1375
+ childNodes.forEach(function (node, i) {
1376
+ if (node.nodeType === 1) {
1377
+ node.style.display = origDisplay[i];
1378
+ }
1379
+ });
1380
+
1381
+ chart.isPrinting = false;
1382
+
1383
+ // Reset printMaxWidth
1384
+ if (handleMaxWidth) {
1385
+ chart.setSize.apply(chart, resetParams);
1386
+ }
1387
+
1388
+ fireEvent(chart, 'afterPrint');
1389
+
1390
+ }, 1000);
1391
+ }, 1);
1392
+
1393
+ },
1394
+
1395
+ /**
1396
+ * Display a popup menu for choosing the export type.
1397
+ *
1398
+ * @private
1399
+ * @function Highcharts.Chart#contextMenu
1400
+ *
1401
+ * @param {string} className
1402
+ * An identifier for the menu.
1403
+ *
1404
+ * @param {Array<string|Highcharts.ExportingMenuObject>} items
1405
+ * A collection with text and onclicks for the items.
1406
+ *
1407
+ * @param {number} x
1408
+ * The x position of the opener button
1409
+ *
1410
+ * @param {number} y
1411
+ * The y position of the opener button
1412
+ *
1413
+ * @param {number} width
1414
+ * The width of the opener button
1415
+ *
1416
+ * @param {number} height
1417
+ * The height of the opener button
1418
+ */
1419
+ contextMenu: function (className, items, x, y, width, height, button) {
1420
+ var chart = this,
1421
+ navOptions = chart.options.navigation,
1422
+ chartWidth = chart.chartWidth,
1423
+ chartHeight = chart.chartHeight,
1424
+ cacheName = 'cache-' + className,
1425
+ menu = chart[cacheName],
1426
+ menuPadding = Math.max(width, height), // for mouse leave detection
1427
+ innerMenu,
1428
+ menuStyle;
1429
+
1430
+ // create the menu only the first time
1431
+ if (!menu) {
1432
+
1433
+ // create a HTML element above the SVG
1434
+ chart.exportContextMenu = chart[cacheName] = menu =
1435
+ createElement('div', {
1436
+ className: className
1437
+ }, {
1438
+ position: 'absolute',
1439
+ zIndex: 1000,
1440
+ padding: menuPadding + 'px',
1441
+ pointerEvents: 'auto'
1442
+ }, chart.fixedDiv || chart.container);
1443
+
1444
+ innerMenu = createElement(
1445
+ 'div',
1446
+ { className: 'highcharts-menu' },
1447
+ null,
1448
+ menu
1449
+ );
1450
+
1451
+ // Presentational CSS
1452
+ if (!chart.styledMode) {
1453
+ css(innerMenu, extend({
1454
+ MozBoxShadow: '3px 3px 10px #888',
1455
+ WebkitBoxShadow: '3px 3px 10px #888',
1456
+ boxShadow: '3px 3px 10px #888'
1457
+ }, navOptions.menuStyle));
1458
+ }
1459
+
1460
+ // hide on mouse out
1461
+ menu.hideMenu = function () {
1462
+ css(menu, { display: 'none' });
1463
+ if (button) {
1464
+ button.setState(0);
1465
+ }
1466
+ chart.openMenu = false;
1467
+ H.clearTimeout(menu.hideTimer);
1468
+ };
1469
+
1470
+ // Hide the menu some time after mouse leave (#1357)
1471
+ chart.exportEvents.push(
1472
+ addEvent(menu, 'mouseleave', function () {
1473
+ menu.hideTimer = setTimeout(menu.hideMenu, 500);
1474
+ }),
1475
+ addEvent(menu, 'mouseenter', function () {
1476
+ H.clearTimeout(menu.hideTimer);
1477
+ }),
1478
+
1479
+ // Hide it on clicking or touching outside the menu (#2258,
1480
+ // #2335, #2407)
1481
+ addEvent(doc, 'mouseup', function (e) {
1482
+ if (!chart.pointer.inClass(e.target, className)) {
1483
+ menu.hideMenu();
1484
+ }
1485
+ }),
1486
+
1487
+ addEvent(menu, 'click', function () {
1488
+ if (chart.openMenu) {
1489
+ menu.hideMenu();
1490
+ }
1491
+ })
1492
+ );
1493
+
1494
+ // create the items
1495
+ items.forEach(function (item) {
1496
+
1497
+ if (typeof item === 'string') {
1498
+ item = chart.options.exporting.menuItemDefinitions[item];
1499
+ }
1500
+
1501
+ if (H.isObject(item, true)) {
1502
+ var element;
1503
+
1504
+ if (item.separator) {
1505
+ element = createElement('hr', null, null, innerMenu);
1506
+
1507
+ } else {
1508
+ element = createElement('div', {
1509
+ className: 'highcharts-menu-item',
1510
+ onclick: function (e) {
1511
+ if (e) { // IE7
1512
+ e.stopPropagation();
1513
+ }
1514
+ menu.hideMenu();
1515
+ if (item.onclick) {
1516
+ item.onclick.apply(chart, arguments);
1517
+ }
1518
+ },
1519
+ innerHTML: (
1520
+ item.text ||
1521
+ chart.options.lang[item.textKey]
1522
+ )
1523
+ }, null, innerMenu);
1524
+
1525
+ if (!chart.styledMode) {
1526
+ element.onmouseover = function () {
1527
+ css(this, navOptions.menuItemHoverStyle);
1528
+ };
1529
+ element.onmouseout = function () {
1530
+ css(this, navOptions.menuItemStyle);
1531
+ };
1532
+ css(element, extend({
1533
+ cursor: 'pointer'
1534
+ }, navOptions.menuItemStyle));
1535
+ }
1536
+ }
1537
+
1538
+ // Keep references to menu divs to be able to destroy them
1539
+ chart.exportDivElements.push(element);
1540
+ }
1541
+ });
1542
+
1543
+ // Keep references to menu and innerMenu div to be able to destroy
1544
+ // them
1545
+ chart.exportDivElements.push(innerMenu, menu);
1546
+
1547
+ chart.exportMenuWidth = menu.offsetWidth;
1548
+ chart.exportMenuHeight = menu.offsetHeight;
1549
+ }
1550
+
1551
+ menuStyle = { display: 'block' };
1552
+
1553
+ // if outside right, right align it
1554
+ if (x + chart.exportMenuWidth > chartWidth) {
1555
+ menuStyle.right = (chartWidth - x - width - menuPadding) + 'px';
1556
+ } else {
1557
+ menuStyle.left = (x - menuPadding) + 'px';
1558
+ }
1559
+ // if outside bottom, bottom align it
1560
+ if (
1561
+ y + height + chart.exportMenuHeight > chartHeight &&
1562
+ button.alignOptions.verticalAlign !== 'top'
1563
+ ) {
1564
+ menuStyle.bottom = (chartHeight - y - menuPadding) + 'px';
1565
+ } else {
1566
+ menuStyle.top = (y + height - menuPadding) + 'px';
1567
+ }
1568
+
1569
+ css(menu, menuStyle);
1570
+ chart.openMenu = true;
1571
+ },
1572
+
1573
+ /**
1574
+ * Add the export button to the chart, with options.
1575
+ *
1576
+ * @private
1577
+ * @function Highcharts.Chart#addButton
1578
+ *
1579
+ * @param {Highcharts.NavigationButtonOptions} options
1580
+ */
1581
+ addButton: function (options) {
1582
+ var chart = this,
1583
+ renderer = chart.renderer,
1584
+ btnOptions = merge(chart.options.navigation.buttonOptions, options),
1585
+ onclick = btnOptions.onclick,
1586
+ menuItems = btnOptions.menuItems,
1587
+ symbol,
1588
+ button,
1589
+ symbolSize = btnOptions.symbolSize || 12;
1590
+
1591
+ if (!chart.btnCount) {
1592
+ chart.btnCount = 0;
1593
+ }
1594
+
1595
+ // Keeps references to the button elements
1596
+ if (!chart.exportDivElements) {
1597
+ chart.exportDivElements = [];
1598
+ chart.exportSVGElements = [];
1599
+ }
1600
+
1601
+ if (btnOptions.enabled === false) {
1602
+ return;
1603
+ }
1604
+
1605
+
1606
+ var attr = btnOptions.theme,
1607
+ states = attr.states,
1608
+ hover = states && states.hover,
1609
+ select = states && states.select,
1610
+ callback;
1611
+
1612
+ if (!chart.styledMode) {
1613
+ attr.fill = pick(attr.fill, '#ffffff');
1614
+ attr.stroke = pick(attr.stroke, 'none');
1615
+ }
1616
+
1617
+ delete attr.states;
1618
+
1619
+ if (onclick) {
1620
+ callback = function (e) {
1621
+ if (e) {
1622
+ e.stopPropagation();
1623
+ }
1624
+ onclick.call(chart, e);
1625
+ };
1626
+
1627
+ } else if (menuItems) {
1628
+ callback = function (e) {
1629
+ // consistent with onclick call (#3495)
1630
+ if (e) {
1631
+ e.stopPropagation();
1632
+ }
1633
+ chart.contextMenu(
1634
+ button.menuClassName,
1635
+ menuItems,
1636
+ button.translateX,
1637
+ button.translateY,
1638
+ button.width,
1639
+ button.height,
1640
+ button
1641
+ );
1642
+ button.setState(2);
1643
+ };
1644
+ }
1645
+
1646
+
1647
+ if (btnOptions.text && btnOptions.symbol) {
1648
+ attr.paddingLeft = pick(attr.paddingLeft, 25);
1649
+
1650
+ } else if (!btnOptions.text) {
1651
+ extend(attr, {
1652
+ width: btnOptions.width,
1653
+ height: btnOptions.height,
1654
+ padding: 0
1655
+ });
1656
+ }
1657
+
1658
+
1659
+ if (!chart.styledMode) {
1660
+ attr['stroke-linecap'] = 'round';
1661
+ attr.fill = pick(attr.fill, '#ffffff');
1662
+ attr.stroke = pick(attr.stroke, 'none');
1663
+ }
1664
+
1665
+ button = renderer
1666
+ .button(btnOptions.text, 0, 0, callback, attr, hover, select)
1667
+ .addClass(options.className)
1668
+ .attr({
1669
+ title: pick(chart.options.lang[
1670
+ btnOptions._titleKey || btnOptions.titleKey
1671
+ ], '')
1672
+ });
1673
+
1674
+ button.menuClassName = (
1675
+ options.menuClassName ||
1676
+ 'highcharts-menu-' + chart.btnCount++
1677
+ );
1678
+
1679
+ if (btnOptions.symbol) {
1680
+ symbol = renderer
1681
+ .symbol(
1682
+ btnOptions.symbol,
1683
+ btnOptions.symbolX - (symbolSize / 2),
1684
+ btnOptions.symbolY - (symbolSize / 2),
1685
+ symbolSize,
1686
+ symbolSize
1687
+ // If symbol is an image, scale it (#7957)
1688
+ , {
1689
+ width: symbolSize,
1690
+ height: symbolSize
1691
+ }
1692
+ )
1693
+ .addClass('highcharts-button-symbol')
1694
+ .attr({
1695
+ zIndex: 1
1696
+ })
1697
+ .add(button);
1698
+
1699
+ if (!chart.styledMode) {
1700
+ symbol.attr({
1701
+ stroke: btnOptions.symbolStroke,
1702
+ fill: btnOptions.symbolFill,
1703
+ 'stroke-width': btnOptions.symbolStrokeWidth || 1
1704
+ });
1705
+ }
1706
+ }
1707
+
1708
+ button.add(chart.exportingGroup)
1709
+ .align(extend(btnOptions, {
1710
+ width: button.width,
1711
+ x: pick(btnOptions.x, chart.buttonOffset) // #1654
1712
+ }), true, 'spacingBox');
1713
+
1714
+ chart.buttonOffset += (
1715
+ (button.width + btnOptions.buttonSpacing) *
1716
+ (btnOptions.align === 'right' ? -1 : 1)
1717
+ );
1718
+
1719
+ chart.exportSVGElements.push(button, symbol);
1720
+
1721
+ },
1722
+
1723
+ /**
1724
+ * Destroy the export buttons.
1725
+ *
1726
+ * @private
1727
+ * @function Highcharts.Chart#destroyExport
1728
+ *
1729
+ * @param {global.Event} e
1730
+ */
1731
+ destroyExport: function (e) {
1732
+ var chart = e ? e.target : this,
1733
+ exportSVGElements = chart.exportSVGElements,
1734
+ exportDivElements = chart.exportDivElements,
1735
+ exportEvents = chart.exportEvents,
1736
+ cacheName;
1737
+
1738
+ // Destroy the extra buttons added
1739
+ if (exportSVGElements) {
1740
+ exportSVGElements.forEach(function (elem, i) {
1741
+
1742
+ // Destroy and null the svg elements
1743
+ if (elem) { // #1822
1744
+ elem.onclick = elem.ontouchstart = null;
1745
+ cacheName = 'cache-' + elem.menuClassName;
1746
+
1747
+ if (chart[cacheName]) {
1748
+ delete chart[cacheName];
1749
+ }
1750
+
1751
+ chart.exportSVGElements[i] = elem.destroy();
1752
+ }
1753
+ });
1754
+ exportSVGElements.length = 0;
1755
+ }
1756
+
1757
+ // Destroy the exporting group
1758
+ if (chart.exportingGroup) {
1759
+ chart.exportingGroup.destroy();
1760
+ delete chart.exportingGroup;
1761
+ }
1762
+
1763
+ // Destroy the divs for the menu
1764
+ if (exportDivElements) {
1765
+ exportDivElements.forEach(function (elem, i) {
1766
+
1767
+ // Remove the event handler
1768
+ H.clearTimeout(elem.hideTimer); // #5427
1769
+ removeEvent(elem, 'mouseleave');
1770
+
1771
+ // Remove inline events
1772
+ chart.exportDivElements[i] =
1773
+ elem.onmouseout =
1774
+ elem.onmouseover =
1775
+ elem.ontouchstart =
1776
+ elem.onclick = null;
1777
+
1778
+ // Destroy the div by moving to garbage bin
1779
+ discardElement(elem);
1780
+ });
1781
+ exportDivElements.length = 0;
1782
+ }
1783
+
1784
+ if (exportEvents) {
1785
+ exportEvents.forEach(function (unbind) {
1786
+ unbind();
1787
+ });
1788
+ exportEvents.length = 0;
1789
+ }
1790
+ }
1791
+ });
1792
+
1793
+ // These ones are translated to attributes rather than styles
1794
+ SVGRenderer.prototype.inlineToAttributes = [
1795
+ 'fill',
1796
+ 'stroke',
1797
+ 'strokeLinecap',
1798
+ 'strokeLinejoin',
1799
+ 'strokeWidth',
1800
+ 'textAnchor',
1801
+ 'x',
1802
+ 'y'
1803
+ ];
1804
+
1805
+ // These CSS properties are not inlined. Remember camelCase.
1806
+ SVGRenderer.prototype.inlineBlacklist = [
1807
+ /-/, // In Firefox, both hyphened and camelCased names are listed
1808
+ /^(clipPath|cssText|d|height|width)$/, // Full words
1809
+ /^font$/, // more specific props are set
1810
+ /[lL]ogical(Width|Height)$/,
1811
+ /perspective/,
1812
+ /TapHighlightColor/,
1813
+ /^transition/,
1814
+ /^length$/ // #7700
1815
+ // /^text (border|color|cursor|height|webkitBorder)/
1816
+ ];
1817
+
1818
+ SVGRenderer.prototype.unstyledElements = [
1819
+ 'clipPath',
1820
+ 'defs',
1821
+ 'desc'
1822
+ ];
1823
+
1824
+ /**
1825
+ * Analyze inherited styles from stylesheets and add them inline
1826
+ *
1827
+ * @private
1828
+ * @function Highcharts.Chart#inlineStyles
1829
+ *
1830
+ * @todo: What are the border styles for text about? In general, text has a lot
1831
+ * of properties.
1832
+ * @todo: Make it work with IE9 and IE10.
1833
+ */
1834
+ Chart.prototype.inlineStyles = function () {
1835
+ var renderer = this.renderer,
1836
+ inlineToAttributes = renderer.inlineToAttributes,
1837
+ blacklist = renderer.inlineBlacklist,
1838
+ whitelist = renderer.inlineWhitelist, // For IE
1839
+ unstyledElements = renderer.unstyledElements,
1840
+ defaultStyles = {},
1841
+ dummySVG,
1842
+ iframe,
1843
+ iframeDoc;
1844
+
1845
+ // Create an iframe where we read default styles without pollution from this
1846
+ // body
1847
+ iframe = doc.createElement('iframe');
1848
+ css(iframe, {
1849
+ width: '1px',
1850
+ height: '1px',
1851
+ visibility: 'hidden'
1852
+ });
1853
+ doc.body.appendChild(iframe);
1854
+ iframeDoc = iframe.contentWindow.document;
1855
+ iframeDoc.open();
1856
+ iframeDoc.write('<svg xmlns="http://www.w3.org/2000/svg"></svg>');
1857
+ iframeDoc.close();
1858
+
1859
+
1860
+ /**
1861
+ * Make hyphenated property names out of camelCase
1862
+ */
1863
+ function hyphenate(prop) {
1864
+ return prop.replace(
1865
+ /([A-Z])/g,
1866
+ function (a, b) {
1867
+ return '-' + b.toLowerCase();
1868
+ }
1869
+ );
1870
+ }
1871
+
1872
+ /**
1873
+ * Call this on all elements and recurse to children
1874
+ */
1875
+ function recurse(node) {
1876
+ var styles,
1877
+ parentStyles,
1878
+ cssText = '',
1879
+ dummy,
1880
+ styleAttr,
1881
+ blacklisted,
1882
+ whitelisted,
1883
+ i;
1884
+
1885
+ // Check computed styles and whether they are in the white/blacklist for
1886
+ // styles or atttributes
1887
+ function filterStyles(val, prop) {
1888
+
1889
+ // Check against whitelist & blacklist
1890
+ blacklisted = whitelisted = false;
1891
+ if (whitelist) {
1892
+ // Styled mode in IE has a whitelist instead.
1893
+ // Exclude all props not in this list.
1894
+ i = whitelist.length;
1895
+ while (i-- && !whitelisted) {
1896
+ whitelisted = whitelist[i].test(prop);
1897
+ }
1898
+ blacklisted = !whitelisted;
1899
+ }
1900
+
1901
+ // Explicitly remove empty transforms
1902
+ if (prop === 'transform' && val === 'none') {
1903
+ blacklisted = true;
1904
+ }
1905
+
1906
+ i = blacklist.length;
1907
+ while (i-- && !blacklisted) {
1908
+ blacklisted = (
1909
+ blacklist[i].test(prop) ||
1910
+ typeof val === 'function'
1911
+ );
1912
+ }
1913
+
1914
+ if (!blacklisted) {
1915
+ // If parent node has the same style, it gets inherited, no need
1916
+ // to inline it. Top-level props should be diffed against parent
1917
+ // (#7687).
1918
+ if (
1919
+ (parentStyles[prop] !== val || node.nodeName === 'svg') &&
1920
+ defaultStyles[node.nodeName][prop] !== val
1921
+ ) {
1922
+ // Attributes
1923
+ if (inlineToAttributes.indexOf(prop) !== -1) {
1924
+ node.setAttribute(hyphenate(prop), val);
1925
+ // Styles
1926
+ } else {
1927
+ cssText += hyphenate(prop) + ':' + val + ';';
1928
+ }
1929
+ }
1930
+ }
1931
+ }
1932
+
1933
+ if (
1934
+ node.nodeType === 1 &&
1935
+ unstyledElements.indexOf(node.nodeName) === -1
1936
+ ) {
1937
+ styles = win.getComputedStyle(node, null);
1938
+ parentStyles = node.nodeName === 'svg' ?
1939
+ {} :
1940
+ win.getComputedStyle(node.parentNode, null);
1941
+
1942
+ // Get default styles from the browser so that we don't have to add
1943
+ // these
1944
+ if (!defaultStyles[node.nodeName]) {
1945
+ /*
1946
+ if (!dummySVG) {
1947
+ dummySVG = doc.createElementNS(H.SVG_NS, 'svg');
1948
+ dummySVG.setAttribute('version', '1.1');
1949
+ doc.body.appendChild(dummySVG);
1950
+ }
1951
+ */
1952
+ dummySVG = iframeDoc.getElementsByTagName('svg')[0];
1953
+ dummy = iframeDoc.createElementNS(
1954
+ node.namespaceURI,
1955
+ node.nodeName
1956
+ );
1957
+ dummySVG.appendChild(dummy);
1958
+ // Copy, so we can remove the node
1959
+ defaultStyles[node.nodeName] = merge(
1960
+ win.getComputedStyle(dummy, null)
1961
+ );
1962
+ // Remove default fill, otherwise text disappears when exported
1963
+ if (node.nodeName === 'text') {
1964
+ delete defaultStyles.text.fill;
1965
+ }
1966
+ dummySVG.removeChild(dummy);
1967
+ }
1968
+
1969
+ // Loop through all styles and add them inline if they are ok
1970
+ if (isFirefoxBrowser || isMSBrowser) {
1971
+ // Some browsers put lots of styles on the prototype
1972
+ for (var p in styles) {
1973
+ filterStyles(styles[p], p);
1974
+ }
1975
+ } else {
1976
+ objectEach(styles, filterStyles);
1977
+ }
1978
+
1979
+ // Apply styles
1980
+ if (cssText) {
1981
+ styleAttr = node.getAttribute('style');
1982
+ node.setAttribute(
1983
+ 'style',
1984
+ (styleAttr ? styleAttr + ';' : '') + cssText
1985
+ );
1986
+ }
1987
+
1988
+ // Set default stroke width (needed at least for IE)
1989
+ if (node.nodeName === 'svg') {
1990
+ node.setAttribute('stroke-width', '1px');
1991
+ }
1992
+
1993
+ if (node.nodeName === 'text') {
1994
+ return;
1995
+ }
1996
+
1997
+ // Recurse
1998
+ [].forEach.call(node.children || node.childNodes, recurse);
1999
+ }
2000
+ }
2001
+
2002
+ /**
2003
+ * Remove the dummy objects used to get defaults
2004
+ */
2005
+ function tearDown() {
2006
+ dummySVG.parentNode.removeChild(dummySVG);
2007
+ }
2008
+
2009
+ recurse(this.container.querySelector('svg'));
2010
+ tearDown();
2011
+
2012
+ };
2013
+
2014
+
2015
+ symbols.menu = function (x, y, width, height) {
2016
+ var arr = [
2017
+ 'M', x, y + 2.5,
2018
+ 'L', x + width, y + 2.5,
2019
+ 'M', x, y + height / 2 + 0.5,
2020
+ 'L', x + width, y + height / 2 + 0.5,
2021
+ 'M', x, y + height - 1.5,
2022
+ 'L', x + width, y + height - 1.5
2023
+ ];
2024
+
2025
+ return arr;
2026
+ };
2027
+
2028
+ symbols.menuball = function (x, y, width, height) {
2029
+ var path = [],
2030
+ h = (height / 3) - 2;
2031
+
2032
+ path = path.concat(
2033
+ this.circle(width - h, y, h, h),
2034
+ this.circle(width - h, y + h + 4, h, h),
2035
+ this.circle(width - h, y + 2 * (h + 4), h, h)
2036
+ );
2037
+ return path;
2038
+ };
2039
+
2040
+ /**
2041
+ * Add the buttons on chart load
2042
+ *
2043
+ * @private
2044
+ * @function Highcharts.Chart#renderExporting
2045
+ */
2046
+ Chart.prototype.renderExporting = function () {
2047
+ var chart = this,
2048
+ exportingOptions = chart.options.exporting,
2049
+ buttons = exportingOptions.buttons,
2050
+ isDirty = chart.isDirtyExporting || !chart.exportSVGElements;
2051
+
2052
+ chart.buttonOffset = 0;
2053
+ if (chart.isDirtyExporting) {
2054
+ chart.destroyExport();
2055
+ }
2056
+
2057
+ if (isDirty && exportingOptions.enabled !== false) {
2058
+ chart.exportEvents = [];
2059
+
2060
+ chart.exportingGroup = chart.exportingGroup ||
2061
+ chart.renderer.g('exporting-group').attr({
2062
+ zIndex: 3 // #4955, // #8392
2063
+ }).add();
2064
+
2065
+ objectEach(buttons, function (button) {
2066
+ chart.addButton(button);
2067
+ });
2068
+
2069
+ chart.isDirtyExporting = false;
2070
+ }
2071
+
2072
+ // Destroy the export elements at chart destroy
2073
+ addEvent(chart, 'destroy', chart.destroyExport);
2074
+ };
2075
+
2076
+ // Add update methods to handle chart.update and chart.exporting.update and
2077
+ // chart.navigation.update. These must be added to the chart instance rather
2078
+ // than the Chart prototype in order to use the chart instance inside the update
2079
+ // function.
2080
+ addEvent(Chart, 'init', function () {
2081
+ var chart = this;
2082
+
2083
+ function update(prop, options, redraw) {
2084
+ chart.isDirtyExporting = true;
2085
+ merge(true, chart.options[prop], options);
2086
+ if (pick(redraw, true)) {
2087
+ chart.redraw();
2088
+ }
2089
+ }
2090
+
2091
+ chart.exporting = {
2092
+ update: function (options, redraw) {
2093
+ update('exporting', options, redraw);
2094
+ }
2095
+ };
2096
+
2097
+ // Register update() method for navigation. Can not be set the same way as
2098
+ // for exporting, because navigation options are shared with bindings which
2099
+ // has separate update() logic.
2100
+ chartNavigationMixin.addUpdate(
2101
+ function (options, redraw) {
2102
+ update('navigation', options, redraw);
2103
+ },
2104
+ chart
2105
+ );
2106
+ });
2107
+
2108
+ Chart.prototype.callbacks.push(function (chart) {
2109
+
2110
+ chart.renderExporting();
2111
+
2112
+ addEvent(chart, 'redraw', chart.renderExporting);
2113
+
2114
+
2115
+ // Uncomment this to see a button directly below the chart, for quick
2116
+ // testing of export
2117
+ /*
2118
+ var button, viewImage, viewSource;
2119
+ if (!chart.renderer.forExport) {
2120
+ viewImage = function () {
2121
+ var div = doc.createElement('div');
2122
+ div.innerHTML = chart.getSVGForExport();
2123
+ chart.renderTo.parentNode.appendChild(div);
2124
+ };
2125
+
2126
+ viewSource = function () {
2127
+ var pre = doc.createElement('pre');
2128
+ pre.innerHTML = chart.getSVGForExport()
2129
+ .replace(/</g, '\n&lt;')
2130
+ .replace(/>/g, '&gt;');
2131
+ chart.renderTo.parentNode.appendChild(pre);
2132
+ };
2133
+
2134
+ viewImage();
2135
+
2136
+ // View SVG Image
2137
+ button = doc.createElement('button');
2138
+ button.innerHTML = 'View SVG Image';
2139
+ chart.renderTo.parentNode.appendChild(button);
2140
+ button.onclick = viewImage;
2141
+
2142
+ // View SVG Source
2143
+ button = doc.createElement('button');
2144
+ button.innerHTML = 'View SVG Source';
2145
+ chart.renderTo.parentNode.appendChild(button);
2146
+ button.onclick = viewSource;
2147
+ }
2148
+ //*/
2149
+ });