highcharts 6.1.1 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (871) hide show
  1. package/bower.json +1 -1
  2. package/css/highcharts.css +29 -0
  3. package/css/highcharts.scss +25 -1
  4. package/css/themes/dark-unica.css +29 -0
  5. package/css/themes/grid-light.css +29 -0
  6. package/css/themes/sand-signika.css +29 -0
  7. package/es-modules/indicators/accumulation-distribution.src.js +1 -1
  8. package/es-modules/indicators/atr.src.js +1 -1
  9. package/es-modules/indicators/bollinger-bands.src.js +2 -2
  10. package/es-modules/indicators/cci.src.js +1 -1
  11. package/es-modules/indicators/cmf.src.js +1 -1
  12. package/es-modules/indicators/ema.src.js +1 -1
  13. package/es-modules/indicators/ichimoku-kinko-hyo.src.js +1 -1
  14. package/es-modules/indicators/indicators.src.js +29 -14
  15. package/es-modules/indicators/macd.src.js +4 -4
  16. package/es-modules/indicators/mfi.src.js +1 -1
  17. package/es-modules/indicators/momentum.src.js +2 -2
  18. package/es-modules/indicators/pivot-points.src.js +7 -2
  19. package/es-modules/indicators/price-envelopes.src.js +2 -2
  20. package/es-modules/indicators/psar.src.js +1 -1
  21. package/es-modules/indicators/roc.src.js +1 -1
  22. package/es-modules/indicators/rsi.src.js +1 -1
  23. package/es-modules/indicators/stochastic.src.js +9 -7
  24. package/es-modules/indicators/volume-by-price.src.js +1 -1
  25. package/es-modules/indicators/vwap.src.js +1 -1
  26. package/es-modules/indicators/wma.src.js +1 -1
  27. package/es-modules/indicators/zigzag.src.js +1 -1
  28. package/es-modules/masters/highcharts-gantt.src.js +11 -0
  29. package/es-modules/masters/modules/annotations.src.js +1 -1
  30. package/es-modules/masters/modules/arrow-symbols.src.js +12 -0
  31. package/es-modules/masters/modules/broken-axis.src.js +1 -1
  32. package/es-modules/masters/modules/current-date-indicator.src.js +12 -0
  33. package/es-modules/masters/modules/data.src.js +1 -1
  34. package/es-modules/masters/modules/draggable-points.src.js +9 -0
  35. package/es-modules/masters/modules/export-data.src.js +1 -1
  36. package/es-modules/masters/modules/exporting.src.js +1 -1
  37. package/es-modules/masters/modules/funnel.src.js +1 -1
  38. package/es-modules/masters/modules/gantt.src.js +2 -1
  39. package/es-modules/masters/modules/grid-axis.src.js +1 -1
  40. package/es-modules/masters/modules/heatmap.src.js +1 -1
  41. package/es-modules/masters/modules/item-series.src.js +1 -1
  42. package/es-modules/masters/modules/map.src.js +1 -1
  43. package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
  44. package/es-modules/masters/modules/pathfinder.src.js +12 -0
  45. package/es-modules/masters/modules/sankey.src.js +1 -1
  46. package/es-modules/masters/modules/series-label.src.js +1 -1
  47. package/es-modules/masters/modules/solid-gauge.src.js +1 -1
  48. package/es-modules/masters/modules/stock.src.js +1 -1
  49. package/es-modules/masters/modules/streamgraph.src.js +1 -1
  50. package/es-modules/masters/modules/treegrid.src.js +12 -0
  51. package/es-modules/masters/modules/variwide.src.js +1 -1
  52. package/es-modules/masters/modules/vector.src.js +1 -1
  53. package/es-modules/masters/modules/windbarb.src.js +1 -1
  54. package/es-modules/masters/modules/xrange.src.js +1 -1
  55. package/es-modules/masters/themes/dark-blue.src.js +1 -1
  56. package/es-modules/masters/themes/dark-green.src.js +1 -1
  57. package/es-modules/masters/themes/dark-unica.src.js +1 -1
  58. package/es-modules/masters/themes/gray.src.js +1 -1
  59. package/es-modules/masters/themes/grid-light.src.js +1 -1
  60. package/es-modules/masters/themes/grid.src.js +1 -1
  61. package/es-modules/masters/themes/sand-signika.src.js +1 -1
  62. package/es-modules/masters/themes/skies.src.js +1 -1
  63. package/es-modules/mixins/centered-series.js +36 -5
  64. package/es-modules/mixins/on-series.js +1 -1
  65. package/es-modules/mixins/polygon.js +4 -4
  66. package/es-modules/modules/annotations.src.js +2 -2
  67. package/es-modules/modules/boost-canvas.src.js +19 -8
  68. package/es-modules/modules/boost.src.js +300 -137
  69. package/es-modules/modules/broken-axis.src.js +169 -134
  70. package/es-modules/modules/bullet.src.js +2 -2
  71. package/es-modules/modules/data.src.js +8 -6
  72. package/es-modules/modules/draggable-points.src.js +2257 -0
  73. package/es-modules/modules/drilldown.src.js +4 -2
  74. package/es-modules/modules/export-data.src.js +11 -1
  75. package/es-modules/modules/exporting.src.js +62 -36
  76. package/es-modules/modules/funnel.src.js +5 -5
  77. package/es-modules/modules/histogram.src.js +30 -28
  78. package/es-modules/modules/item-series.src.js +36 -11
  79. package/es-modules/modules/keyboard-navigation.src.js +81 -44
  80. package/es-modules/modules/no-data-to-display.src.js +5 -5
  81. package/es-modules/modules/oldie.src.js +14 -9
  82. package/es-modules/modules/overlapping-datalabels.src.js +45 -21
  83. package/es-modules/modules/parallel-coordinates.src.js +4 -3
  84. package/es-modules/modules/pareto.src.js +1 -1
  85. package/es-modules/modules/sankey.src.js +28 -10
  86. package/es-modules/modules/series-label.src.js +6 -6
  87. package/es-modules/modules/solid-gauge.src.js +10 -7
  88. package/es-modules/modules/static-scale.src.js +67 -28
  89. package/es-modules/modules/streamgraph.src.js +4 -4
  90. package/es-modules/modules/sunburst.src.js +4 -4
  91. package/es-modules/modules/tilemap.src.js +231 -134
  92. package/es-modules/modules/treemap.src.js +30 -27
  93. package/es-modules/modules/variable-pie.src.js +3 -3
  94. package/es-modules/modules/variwide.src.js +36 -24
  95. package/es-modules/modules/vector.src.js +98 -28
  96. package/es-modules/modules/windbarb.src.js +4 -4
  97. package/es-modules/modules/wordcloud.src.js +133 -48
  98. package/es-modules/modules/xrange.src.js +258 -78
  99. package/es-modules/parts/AreaSeries.js +83 -50
  100. package/es-modules/parts/AreaSplineSeries.js +66 -29
  101. package/es-modules/parts/Axis.js +2184 -745
  102. package/es-modules/parts/BarSeries.js +70 -53
  103. package/es-modules/parts/CandlestickSeries.js +20 -10
  104. package/es-modules/parts/Chart.js +349 -157
  105. package/es-modules/parts/Color.js +74 -25
  106. package/es-modules/parts/ColumnSeries.js +274 -147
  107. package/es-modules/parts/DataGrouping.js +36 -3
  108. package/es-modules/parts/DataLabels.js +318 -144
  109. package/es-modules/parts/DateTimeAxis.js +27 -5
  110. package/es-modules/parts/Dynamics.js +236 -144
  111. package/es-modules/parts/FlagsSeries.js +49 -7
  112. package/es-modules/parts/Globals.js +4 -3
  113. package/es-modules/parts/Html.js +82 -16
  114. package/es-modules/parts/Interaction.js +198 -65
  115. package/es-modules/parts/Legend.js +181 -31
  116. package/es-modules/parts/LogarithmicAxis.js +36 -3
  117. package/es-modules/parts/MSPointer.js +31 -4
  118. package/es-modules/parts/Navigator.js +479 -187
  119. package/es-modules/parts/OHLCSeries.js +11 -5
  120. package/es-modules/parts/Options.js +1052 -686
  121. package/es-modules/parts/OrdinalAxis.js +20 -6
  122. package/es-modules/parts/PieSeries.js +258 -142
  123. package/es-modules/parts/PlotBandSeries.experimental.js +2 -2
  124. package/es-modules/parts/PlotLineOrBand.js +671 -35
  125. package/es-modules/parts/Point.js +189 -73
  126. package/es-modules/parts/Pointer.js +263 -62
  127. package/es-modules/parts/RangeSelector.js +601 -91
  128. package/es-modules/parts/Responsive.js +82 -36
  129. package/es-modules/parts/ScatterSeries.js +59 -27
  130. package/es-modules/parts/ScrollablePlotArea.js +30 -9
  131. package/es-modules/parts/Scrollbar.js +284 -113
  132. package/es-modules/parts/Series.js +1105 -836
  133. package/es-modules/parts/SplineSeries.js +53 -31
  134. package/es-modules/parts/Stacking.js +108 -7
  135. package/es-modules/parts/StockChart.js +26 -8
  136. package/es-modules/parts/SvgRenderer.js +1251 -613
  137. package/es-modules/parts/Tick.js +164 -30
  138. package/es-modules/parts/Time.js +171 -71
  139. package/es-modules/parts/Tooltip.js +271 -49
  140. package/es-modules/parts/TouchPointer.js +70 -3
  141. package/es-modules/parts/Utilities.js +1024 -429
  142. package/es-modules/parts-3d/Axis.js +4 -3
  143. package/es-modules/parts-3d/Chart.js +8 -9
  144. package/es-modules/parts-3d/Column.js +1 -1
  145. package/es-modules/parts-3d/Math.js +1 -1
  146. package/es-modules/parts-3d/Pie.js +1 -1
  147. package/es-modules/parts-3d/SVGRenderer.js +13 -10
  148. package/es-modules/parts-3d/Scatter.js +4 -4
  149. package/es-modules/parts-3d/Series.js +1 -1
  150. package/es-modules/parts-3d/VMLRenderer.js +1 -1
  151. package/es-modules/parts-gantt/ArrowSymbols.js +110 -0
  152. package/es-modules/parts-gantt/CurrentDateIndicator.js +92 -0
  153. package/es-modules/parts-gantt/GanttChart.js +111 -0
  154. package/es-modules/parts-gantt/GanttSeries.js +376 -0
  155. package/es-modules/parts-gantt/GridAxis.js +965 -0
  156. package/es-modules/parts-gantt/Pathfinder.js +1247 -0
  157. package/es-modules/parts-gantt/PathfinderAlgorithms.js +746 -0
  158. package/es-modules/parts-gantt/Tree.js +146 -0
  159. package/es-modules/parts-gantt/TreeGrid.js +917 -0
  160. package/es-modules/parts-map/ColorAxis.js +4 -5
  161. package/es-modules/parts-map/ColorSeriesMixin.js +3 -1
  162. package/es-modules/parts-map/GeoJSON.js +1 -1
  163. package/es-modules/parts-map/HeatmapSeries.js +126 -55
  164. package/es-modules/parts-map/Map.js +144 -51
  165. package/es-modules/parts-map/MapAxis.js +1 -1
  166. package/es-modules/parts-map/MapBubbleSeries.js +6 -5
  167. package/es-modules/parts-map/MapLineSeries.js +4 -4
  168. package/es-modules/parts-map/MapNavigation.js +50 -12
  169. package/es-modules/parts-map/MapPointSeries.js +3 -3
  170. package/es-modules/parts-map/MapPointer.js +1 -1
  171. package/es-modules/parts-map/MapSeries.js +7 -7
  172. package/es-modules/parts-more/AreaRangeSeries.js +82 -40
  173. package/es-modules/parts-more/AreaSplineRangeSeries.js +3 -3
  174. package/es-modules/parts-more/BoxPlotSeries.js +3 -3
  175. package/es-modules/parts-more/BubbleSeries.js +9 -4
  176. package/es-modules/parts-more/ColumnRangeSeries.js +3 -3
  177. package/es-modules/parts-more/ErrorBarSeries.js +6 -4
  178. package/es-modules/parts-more/GaugeSeries.js +3 -3
  179. package/es-modules/parts-more/Pane.js +3 -2
  180. package/es-modules/parts-more/Polar.js +1 -1
  181. package/es-modules/parts-more/PolygonSeries.js +3 -3
  182. package/es-modules/parts-more/RadialAxis.js +5 -4
  183. package/es-modules/parts-more/WaterfallSeries.js +9 -4
  184. package/es-modules/supplemental.docs.js +0 -1955
  185. package/es-modules/themes/dark-blue.js +1 -1
  186. package/es-modules/themes/dark-green.js +1 -1
  187. package/es-modules/themes/dark-unica.js +1 -1
  188. package/es-modules/themes/gray.js +1 -1
  189. package/es-modules/themes/grid-light.js +1 -1
  190. package/es-modules/themes/grid.js +1 -1
  191. package/es-modules/themes/sand-signika.js +1 -1
  192. package/es-modules/themes/skies.js +1 -1
  193. package/highcharts-3d.js +77 -75
  194. package/highcharts-3d.js.map +1 -8
  195. package/highcharts-3d.src.js +39 -32
  196. package/highcharts-gantt.js +503 -0
  197. package/highcharts-gantt.js.map +1 -0
  198. package/highcharts-gantt.src.js +49289 -0
  199. package/highcharts-more.js +66 -64
  200. package/highcharts-more.js.map +1 -8
  201. package/highcharts-more.src.js +135 -75
  202. package/highcharts.js +413 -403
  203. package/highcharts.js.map +1 -8
  204. package/highcharts.src.js +11114 -4781
  205. package/highmaps.js +442 -433
  206. package/highmaps.js.map +1 -8
  207. package/highmaps.src.js +10740 -4598
  208. package/highstock.js +553 -540
  209. package/highstock.js.map +1 -8
  210. package/highstock.src.js +12807 -5343
  211. package/indicators/accumulation-distribution.js +4 -3
  212. package/indicators/accumulation-distribution.js.map +1 -8
  213. package/indicators/accumulation-distribution.src.js +6 -2
  214. package/indicators/atr.js +4 -3
  215. package/indicators/atr.js.map +1 -8
  216. package/indicators/atr.src.js +6 -2
  217. package/indicators/bollinger-bands.js +7 -6
  218. package/indicators/bollinger-bands.js.map +1 -8
  219. package/indicators/bollinger-bands.src.js +7 -3
  220. package/indicators/cci.js +4 -3
  221. package/indicators/cci.js.map +1 -8
  222. package/indicators/cci.src.js +6 -2
  223. package/indicators/cmf.js +5 -4
  224. package/indicators/cmf.js.map +1 -8
  225. package/indicators/cmf.src.js +6 -2
  226. package/indicators/ema.js +4 -3
  227. package/indicators/ema.js.map +1 -8
  228. package/indicators/ema.src.js +6 -2
  229. package/indicators/ichimoku-kinko-hyo.js +10 -9
  230. package/indicators/ichimoku-kinko-hyo.js.map +1 -8
  231. package/indicators/ichimoku-kinko-hyo.src.js +6 -2
  232. package/indicators/indicators.js +6 -5
  233. package/indicators/indicators.js.map +1 -8
  234. package/indicators/indicators.src.js +34 -15
  235. package/indicators/macd.js +11 -10
  236. package/indicators/macd.js.map +1 -8
  237. package/indicators/macd.src.js +10 -6
  238. package/indicators/mfi.js +5 -3
  239. package/indicators/mfi.js.map +1 -8
  240. package/indicators/mfi.src.js +6 -2
  241. package/indicators/momentum.js +4 -3
  242. package/indicators/momentum.js.map +1 -8
  243. package/indicators/momentum.src.js +7 -3
  244. package/indicators/pivot-points.js +8 -7
  245. package/indicators/pivot-points.js.map +1 -8
  246. package/indicators/pivot-points.src.js +12 -3
  247. package/indicators/price-envelopes.js +7 -6
  248. package/indicators/price-envelopes.js.map +1 -8
  249. package/indicators/price-envelopes.src.js +7 -3
  250. package/indicators/psar.js +5 -4
  251. package/indicators/psar.js.map +1 -8
  252. package/indicators/psar.src.js +6 -2
  253. package/indicators/roc.js +4 -3
  254. package/indicators/roc.js.map +1 -8
  255. package/indicators/roc.src.js +6 -2
  256. package/indicators/rsi.js +4 -3
  257. package/indicators/rsi.js.map +1 -8
  258. package/indicators/rsi.src.js +6 -2
  259. package/indicators/stochastic.js +7 -5
  260. package/indicators/stochastic.js.map +1 -8
  261. package/indicators/stochastic.src.js +14 -8
  262. package/indicators/volume-by-price.js +13 -12
  263. package/indicators/volume-by-price.js.map +1 -8
  264. package/indicators/volume-by-price.src.js +6 -2
  265. package/indicators/vwap.js +4 -3
  266. package/indicators/vwap.js.map +1 -8
  267. package/indicators/vwap.src.js +6 -2
  268. package/indicators/wma.js +4 -3
  269. package/indicators/wma.js.map +1 -8
  270. package/indicators/wma.src.js +6 -2
  271. package/indicators/zigzag.js +5 -3
  272. package/indicators/zigzag.js.map +1 -8
  273. package/indicators/zigzag.src.js +6 -2
  274. package/js/es-modules/indicators/accumulation-distribution.src.js +1 -1
  275. package/js/es-modules/indicators/atr.src.js +1 -1
  276. package/js/es-modules/indicators/bollinger-bands.src.js +2 -2
  277. package/js/es-modules/indicators/cci.src.js +1 -1
  278. package/js/es-modules/indicators/cmf.src.js +1 -1
  279. package/js/es-modules/indicators/ema.src.js +1 -1
  280. package/js/es-modules/indicators/ichimoku-kinko-hyo.src.js +1 -1
  281. package/js/es-modules/indicators/indicators.src.js +29 -14
  282. package/js/es-modules/indicators/macd.src.js +4 -4
  283. package/js/es-modules/indicators/mfi.src.js +1 -1
  284. package/js/es-modules/indicators/momentum.src.js +2 -2
  285. package/js/es-modules/indicators/pivot-points.src.js +7 -2
  286. package/js/es-modules/indicators/price-envelopes.src.js +2 -2
  287. package/js/es-modules/indicators/psar.src.js +1 -1
  288. package/js/es-modules/indicators/roc.src.js +1 -1
  289. package/js/es-modules/indicators/rsi.src.js +1 -1
  290. package/js/es-modules/indicators/stochastic.src.js +9 -7
  291. package/js/es-modules/indicators/volume-by-price.src.js +1 -1
  292. package/js/es-modules/indicators/vwap.src.js +1 -1
  293. package/js/es-modules/indicators/wma.src.js +1 -1
  294. package/js/es-modules/indicators/zigzag.src.js +1 -1
  295. package/js/es-modules/masters/highcharts-gantt.src.js +11 -0
  296. package/js/es-modules/masters/modules/annotations.src.js +1 -1
  297. package/js/es-modules/masters/modules/arrow-symbols.src.js +12 -0
  298. package/js/es-modules/masters/modules/broken-axis.src.js +1 -1
  299. package/js/es-modules/masters/modules/current-date-indicator.src.js +12 -0
  300. package/js/es-modules/masters/modules/data.src.js +1 -1
  301. package/js/es-modules/masters/modules/draggable-points.src.js +9 -0
  302. package/js/es-modules/masters/modules/export-data.src.js +1 -1
  303. package/js/es-modules/masters/modules/exporting.src.js +1 -1
  304. package/js/es-modules/masters/modules/funnel.src.js +1 -1
  305. package/js/es-modules/masters/modules/gantt.src.js +2 -1
  306. package/js/es-modules/masters/modules/grid-axis.src.js +1 -1
  307. package/js/es-modules/masters/modules/heatmap.src.js +1 -1
  308. package/js/es-modules/masters/modules/item-series.src.js +1 -1
  309. package/js/es-modules/masters/modules/map.src.js +1 -1
  310. package/js/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
  311. package/js/es-modules/masters/modules/pathfinder.src.js +12 -0
  312. package/js/es-modules/masters/modules/sankey.src.js +1 -1
  313. package/js/es-modules/masters/modules/series-label.src.js +1 -1
  314. package/js/es-modules/masters/modules/solid-gauge.src.js +1 -1
  315. package/js/es-modules/masters/modules/stock.src.js +1 -1
  316. package/js/es-modules/masters/modules/streamgraph.src.js +1 -1
  317. package/js/es-modules/masters/modules/treegrid.src.js +12 -0
  318. package/js/es-modules/masters/modules/variwide.src.js +1 -1
  319. package/js/es-modules/masters/modules/vector.src.js +1 -1
  320. package/js/es-modules/masters/modules/windbarb.src.js +1 -1
  321. package/js/es-modules/masters/modules/xrange.src.js +1 -1
  322. package/js/es-modules/masters/themes/dark-blue.src.js +1 -1
  323. package/js/es-modules/masters/themes/dark-green.src.js +1 -1
  324. package/js/es-modules/masters/themes/dark-unica.src.js +1 -1
  325. package/js/es-modules/masters/themes/gray.src.js +1 -1
  326. package/js/es-modules/masters/themes/grid-light.src.js +1 -1
  327. package/js/es-modules/masters/themes/grid.src.js +1 -1
  328. package/js/es-modules/masters/themes/sand-signika.src.js +1 -1
  329. package/js/es-modules/masters/themes/skies.src.js +1 -1
  330. package/js/es-modules/mixins/centered-series.js +36 -5
  331. package/js/es-modules/mixins/on-series.js +1 -1
  332. package/js/es-modules/mixins/polygon.js +4 -4
  333. package/js/es-modules/modules/annotations.src.js +2 -2
  334. package/js/es-modules/modules/boost-canvas.src.js +19 -8
  335. package/js/es-modules/modules/boost.src.js +300 -137
  336. package/js/es-modules/modules/broken-axis.src.js +169 -134
  337. package/js/es-modules/modules/bullet.src.js +2 -2
  338. package/js/es-modules/modules/data.src.js +8 -6
  339. package/js/es-modules/modules/draggable-points.src.js +2257 -0
  340. package/js/es-modules/modules/drilldown.src.js +4 -2
  341. package/js/es-modules/modules/export-data.src.js +11 -1
  342. package/js/es-modules/modules/exporting.src.js +62 -36
  343. package/js/es-modules/modules/funnel.src.js +5 -5
  344. package/js/es-modules/modules/histogram.src.js +30 -28
  345. package/js/es-modules/modules/item-series.src.js +36 -11
  346. package/js/es-modules/modules/keyboard-navigation.src.js +81 -44
  347. package/js/es-modules/modules/no-data-to-display.src.js +5 -5
  348. package/js/es-modules/modules/oldie.src.js +14 -9
  349. package/js/es-modules/modules/overlapping-datalabels.src.js +45 -21
  350. package/js/es-modules/modules/parallel-coordinates.src.js +4 -3
  351. package/js/es-modules/modules/pareto.src.js +1 -1
  352. package/js/es-modules/modules/sankey.src.js +23 -7
  353. package/js/es-modules/modules/series-label.src.js +6 -6
  354. package/js/es-modules/modules/solid-gauge.src.js +8 -5
  355. package/js/es-modules/modules/static-scale.src.js +67 -28
  356. package/js/es-modules/modules/streamgraph.src.js +4 -4
  357. package/js/es-modules/modules/sunburst.src.js +4 -4
  358. package/js/es-modules/modules/tilemap.src.js +231 -134
  359. package/js/es-modules/modules/treemap.src.js +29 -26
  360. package/js/es-modules/modules/variable-pie.src.js +3 -3
  361. package/js/es-modules/modules/variwide.src.js +36 -24
  362. package/js/es-modules/modules/vector.src.js +98 -28
  363. package/js/es-modules/modules/windbarb.src.js +4 -4
  364. package/js/es-modules/modules/wordcloud.src.js +133 -48
  365. package/js/es-modules/modules/xrange.src.js +256 -69
  366. package/js/es-modules/parts/AreaSeries.js +83 -50
  367. package/js/es-modules/parts/AreaSplineSeries.js +66 -29
  368. package/js/es-modules/parts/Axis.js +2089 -694
  369. package/js/es-modules/parts/BarSeries.js +70 -53
  370. package/js/es-modules/parts/CandlestickSeries.js +20 -10
  371. package/js/es-modules/parts/Chart.js +349 -157
  372. package/js/es-modules/parts/Color.js +74 -25
  373. package/js/es-modules/parts/ColumnSeries.js +241 -128
  374. package/js/es-modules/parts/DataGrouping.js +36 -3
  375. package/js/es-modules/parts/DataLabels.js +287 -116
  376. package/js/es-modules/parts/DateTimeAxis.js +27 -5
  377. package/js/es-modules/parts/Dynamics.js +236 -144
  378. package/js/es-modules/parts/FlagsSeries.js +49 -7
  379. package/js/es-modules/parts/Globals.js +4 -3
  380. package/js/es-modules/parts/Html.js +82 -16
  381. package/js/es-modules/parts/Interaction.js +187 -67
  382. package/js/es-modules/parts/Legend.js +181 -31
  383. package/js/es-modules/parts/LogarithmicAxis.js +36 -3
  384. package/js/es-modules/parts/MSPointer.js +31 -4
  385. package/js/es-modules/parts/Navigator.js +432 -162
  386. package/js/es-modules/parts/OHLCSeries.js +5 -5
  387. package/js/es-modules/parts/Options.js +855 -592
  388. package/js/es-modules/parts/OrdinalAxis.js +20 -6
  389. package/js/es-modules/parts/PieSeries.js +247 -134
  390. package/js/es-modules/parts/PlotBandSeries.experimental.js +2 -2
  391. package/js/es-modules/parts/PlotLineOrBand.js +671 -35
  392. package/js/es-modules/parts/Point.js +182 -70
  393. package/js/es-modules/parts/Pointer.js +263 -62
  394. package/js/es-modules/parts/RangeSelector.js +579 -91
  395. package/js/es-modules/parts/Responsive.js +82 -36
  396. package/js/es-modules/parts/ScatterSeries.js +58 -27
  397. package/js/es-modules/parts/ScrollablePlotArea.js +30 -9
  398. package/js/es-modules/parts/Scrollbar.js +201 -71
  399. package/js/es-modules/parts/Series.js +995 -745
  400. package/js/es-modules/parts/SplineSeries.js +53 -31
  401. package/js/es-modules/parts/Stacking.js +108 -7
  402. package/js/es-modules/parts/StockChart.js +26 -8
  403. package/js/es-modules/parts/SvgRenderer.js +1208 -598
  404. package/js/es-modules/parts/Tick.js +164 -30
  405. package/js/es-modules/parts/Time.js +171 -71
  406. package/js/es-modules/parts/Tooltip.js +276 -49
  407. package/js/es-modules/parts/TouchPointer.js +70 -3
  408. package/js/es-modules/parts/Utilities.js +1024 -429
  409. package/js/es-modules/parts-3d/Axis.js +4 -3
  410. package/js/es-modules/parts-3d/Chart.js +8 -9
  411. package/js/es-modules/parts-3d/Column.js +1 -1
  412. package/js/es-modules/parts-3d/Math.js +1 -1
  413. package/js/es-modules/parts-3d/Pie.js +1 -1
  414. package/js/es-modules/parts-3d/SVGRenderer.js +13 -10
  415. package/js/es-modules/parts-3d/Scatter.js +4 -4
  416. package/js/es-modules/parts-3d/Series.js +1 -1
  417. package/js/es-modules/parts-3d/VMLRenderer.js +1 -1
  418. package/js/es-modules/parts-gantt/ArrowSymbols.js +110 -0
  419. package/js/es-modules/parts-gantt/CurrentDateIndicator.js +92 -0
  420. package/js/es-modules/parts-gantt/GanttChart.js +111 -0
  421. package/js/es-modules/parts-gantt/GanttSeries.js +371 -0
  422. package/js/es-modules/parts-gantt/GridAxis.js +962 -0
  423. package/js/es-modules/parts-gantt/Pathfinder.js +1225 -0
  424. package/js/es-modules/parts-gantt/PathfinderAlgorithms.js +746 -0
  425. package/js/es-modules/parts-gantt/Tree.js +146 -0
  426. package/js/es-modules/parts-gantt/TreeGrid.js +891 -0
  427. package/js/es-modules/parts-map/ColorAxis.js +4 -5
  428. package/js/es-modules/parts-map/ColorSeriesMixin.js +3 -1
  429. package/js/es-modules/parts-map/GeoJSON.js +1 -1
  430. package/js/es-modules/parts-map/HeatmapSeries.js +124 -54
  431. package/js/es-modules/parts-map/Map.js +136 -47
  432. package/js/es-modules/parts-map/MapAxis.js +1 -1
  433. package/js/es-modules/parts-map/MapBubbleSeries.js +6 -5
  434. package/js/es-modules/parts-map/MapLineSeries.js +4 -4
  435. package/js/es-modules/parts-map/MapNavigation.js +50 -12
  436. package/js/es-modules/parts-map/MapPointSeries.js +3 -3
  437. package/js/es-modules/parts-map/MapPointer.js +1 -1
  438. package/js/es-modules/parts-map/MapSeries.js +5 -5
  439. package/js/es-modules/parts-more/AreaRangeSeries.js +82 -40
  440. package/js/es-modules/parts-more/AreaSplineRangeSeries.js +3 -3
  441. package/js/es-modules/parts-more/BoxPlotSeries.js +3 -3
  442. package/js/es-modules/parts-more/BubbleSeries.js +9 -4
  443. package/js/es-modules/parts-more/ColumnRangeSeries.js +3 -3
  444. package/js/es-modules/parts-more/ErrorBarSeries.js +6 -4
  445. package/js/es-modules/parts-more/GaugeSeries.js +3 -3
  446. package/js/es-modules/parts-more/Pane.js +3 -2
  447. package/js/es-modules/parts-more/Polar.js +1 -1
  448. package/js/es-modules/parts-more/PolygonSeries.js +3 -3
  449. package/js/es-modules/parts-more/RadialAxis.js +5 -4
  450. package/js/es-modules/parts-more/WaterfallSeries.js +9 -4
  451. package/js/es-modules/supplemental.docs.js +0 -1955
  452. package/js/es-modules/themes/dark-blue.js +1 -1
  453. package/js/es-modules/themes/dark-green.js +1 -1
  454. package/js/es-modules/themes/dark-unica.js +1 -1
  455. package/js/es-modules/themes/gray.js +1 -1
  456. package/js/es-modules/themes/grid-light.js +1 -1
  457. package/js/es-modules/themes/grid.js +1 -1
  458. package/js/es-modules/themes/sand-signika.js +1 -1
  459. package/js/es-modules/themes/skies.js +1 -1
  460. package/js/highcharts-3d.js +75 -74
  461. package/js/highcharts-3d.js.map +1 -8
  462. package/js/highcharts-3d.src.js +39 -32
  463. package/js/highcharts-gantt.js +480 -0
  464. package/js/highcharts-gantt.js.map +1 -0
  465. package/js/highcharts-gantt.src.js +47011 -0
  466. package/js/highcharts-more.js +63 -61
  467. package/js/highcharts-more.js.map +1 -8
  468. package/js/highcharts-more.src.js +135 -75
  469. package/js/highcharts.js +396 -387
  470. package/js/highcharts.js.map +1 -8
  471. package/js/highcharts.src.js +10765 -4659
  472. package/js/highmaps.js +419 -411
  473. package/js/highmaps.js.map +1 -8
  474. package/js/highmaps.src.js +10198 -4285
  475. package/js/highstock.js +529 -516
  476. package/js/highstock.js.map +1 -8
  477. package/js/highstock.src.js +12108 -4962
  478. package/js/indicators/accumulation-distribution.js +4 -3
  479. package/js/indicators/accumulation-distribution.js.map +1 -8
  480. package/js/indicators/accumulation-distribution.src.js +6 -2
  481. package/js/indicators/atr.js +4 -3
  482. package/js/indicators/atr.js.map +1 -8
  483. package/js/indicators/atr.src.js +6 -2
  484. package/js/indicators/bollinger-bands.js +7 -6
  485. package/js/indicators/bollinger-bands.js.map +1 -8
  486. package/js/indicators/bollinger-bands.src.js +7 -3
  487. package/js/indicators/cci.js +4 -3
  488. package/js/indicators/cci.js.map +1 -8
  489. package/js/indicators/cci.src.js +6 -2
  490. package/js/indicators/cmf.js +5 -4
  491. package/js/indicators/cmf.js.map +1 -8
  492. package/js/indicators/cmf.src.js +6 -2
  493. package/js/indicators/ema.js +4 -3
  494. package/js/indicators/ema.js.map +1 -8
  495. package/js/indicators/ema.src.js +6 -2
  496. package/js/indicators/ichimoku-kinko-hyo.js +10 -9
  497. package/js/indicators/ichimoku-kinko-hyo.js.map +1 -8
  498. package/js/indicators/ichimoku-kinko-hyo.src.js +6 -2
  499. package/js/indicators/indicators.js +6 -5
  500. package/js/indicators/indicators.js.map +1 -8
  501. package/js/indicators/indicators.src.js +34 -15
  502. package/js/indicators/macd.js +11 -10
  503. package/js/indicators/macd.js.map +1 -8
  504. package/js/indicators/macd.src.js +10 -6
  505. package/js/indicators/mfi.js +5 -3
  506. package/js/indicators/mfi.js.map +1 -8
  507. package/js/indicators/mfi.src.js +6 -2
  508. package/js/indicators/momentum.js +4 -3
  509. package/js/indicators/momentum.js.map +1 -8
  510. package/js/indicators/momentum.src.js +7 -3
  511. package/js/indicators/pivot-points.js +8 -7
  512. package/js/indicators/pivot-points.js.map +1 -8
  513. package/js/indicators/pivot-points.src.js +12 -3
  514. package/js/indicators/price-envelopes.js +7 -6
  515. package/js/indicators/price-envelopes.js.map +1 -8
  516. package/js/indicators/price-envelopes.src.js +7 -3
  517. package/js/indicators/psar.js +5 -4
  518. package/js/indicators/psar.js.map +1 -8
  519. package/js/indicators/psar.src.js +6 -2
  520. package/js/indicators/roc.js +4 -3
  521. package/js/indicators/roc.js.map +1 -8
  522. package/js/indicators/roc.src.js +6 -2
  523. package/js/indicators/rsi.js +4 -3
  524. package/js/indicators/rsi.js.map +1 -8
  525. package/js/indicators/rsi.src.js +6 -2
  526. package/js/indicators/stochastic.js +7 -5
  527. package/js/indicators/stochastic.js.map +1 -8
  528. package/js/indicators/stochastic.src.js +14 -8
  529. package/js/indicators/volume-by-price.js +13 -12
  530. package/js/indicators/volume-by-price.js.map +1 -8
  531. package/js/indicators/volume-by-price.src.js +6 -2
  532. package/js/indicators/vwap.js +4 -3
  533. package/js/indicators/vwap.js.map +1 -8
  534. package/js/indicators/vwap.src.js +6 -2
  535. package/js/indicators/wma.js +4 -3
  536. package/js/indicators/wma.js.map +1 -8
  537. package/js/indicators/wma.src.js +6 -2
  538. package/js/indicators/zigzag.js +5 -3
  539. package/js/indicators/zigzag.js.map +1 -8
  540. package/js/indicators/zigzag.src.js +6 -2
  541. package/js/modules/accessibility.js +52 -51
  542. package/js/modules/accessibility.js.map +1 -8
  543. package/js/modules/accessibility.src.js +86 -45
  544. package/js/modules/annotations.js +22 -21
  545. package/js/modules/annotations.js.map +1 -8
  546. package/js/modules/annotations.src.js +8 -4
  547. package/js/modules/arrow-symbols.js +13 -0
  548. package/js/modules/arrow-symbols.js.map +1 -0
  549. package/js/modules/arrow-symbols.src.js +138 -0
  550. package/js/modules/boost-canvas.js +15 -13
  551. package/js/modules/boost-canvas.js.map +1 -8
  552. package/js/modules/boost-canvas.src.js +24 -9
  553. package/js/modules/boost.js +57 -52
  554. package/js/modules/boost.js.map +1 -8
  555. package/js/modules/boost.src.js +305 -138
  556. package/js/modules/broken-axis.js +12 -10
  557. package/js/modules/broken-axis.js.map +1 -8
  558. package/js/modules/broken-axis.src.js +175 -136
  559. package/js/modules/bullet.js +3 -2
  560. package/js/modules/bullet.js.map +1 -8
  561. package/js/modules/bullet.src.js +7 -3
  562. package/js/modules/current-date-indicator.js +13 -0
  563. package/js/modules/current-date-indicator.js.map +1 -0
  564. package/js/modules/current-date-indicator.src.js +120 -0
  565. package/js/modules/data.js +25 -24
  566. package/js/modules/data.js.map +1 -8
  567. package/js/modules/data.src.js +14 -8
  568. package/js/modules/drag-panes.js +9 -8
  569. package/js/modules/drag-panes.js.map +1 -8
  570. package/js/modules/drag-panes.src.js +5 -1
  571. package/js/modules/draggable-points.js +38 -0
  572. package/js/modules/draggable-points.js.map +1 -0
  573. package/js/modules/draggable-points.src.js +2281 -0
  574. package/js/modules/drilldown.js +20 -19
  575. package/js/modules/drilldown.js.map +1 -8
  576. package/js/modules/drilldown.src.js +9 -3
  577. package/js/modules/export-data.js +20 -19
  578. package/js/modules/export-data.js.map +1 -8
  579. package/js/modules/export-data.src.js +17 -3
  580. package/js/modules/exporting.js +24 -23
  581. package/js/modules/exporting.js.map +1 -8
  582. package/js/modules/exporting.src.js +68 -38
  583. package/js/modules/funnel.js +8 -6
  584. package/js/modules/funnel.js.map +1 -8
  585. package/js/modules/funnel.src.js +11 -7
  586. package/js/modules/gantt.js +81 -18
  587. package/js/modules/gantt.js.map +1 -8
  588. package/js/modules/gantt.src.js +5494 -372
  589. package/js/modules/grid-axis.js +16 -10
  590. package/js/modules/grid-axis.js.map +1 -8
  591. package/js/modules/grid-axis.src.js +735 -293
  592. package/js/modules/heatmap.js +22 -21
  593. package/js/modules/heatmap.js.map +1 -8
  594. package/js/modules/heatmap.src.js +137 -62
  595. package/js/modules/histogram-bellcurve.js +9 -8
  596. package/js/modules/histogram-bellcurve.js.map +1 -8
  597. package/js/modules/histogram-bellcurve.src.js +35 -29
  598. package/js/modules/item-series.js +6 -4
  599. package/js/modules/item-series.js.map +1 -8
  600. package/js/modules/item-series.src.js +42 -13
  601. package/js/modules/map.js +63 -62
  602. package/js/modules/map.js.map +1 -8
  603. package/js/modules/map.src.js +353 -145
  604. package/js/modules/no-data-to-display.js +5 -4
  605. package/js/modules/no-data-to-display.js.map +1 -8
  606. package/js/modules/no-data-to-display.src.js +10 -6
  607. package/js/modules/offline-exporting.js +14 -13
  608. package/js/modules/offline-exporting.js.map +1 -8
  609. package/js/modules/offline-exporting.src.js +6 -2
  610. package/js/modules/oldie.js +29 -27
  611. package/js/modules/oldie.js.map +1 -8
  612. package/js/modules/oldie.src.js +20 -11
  613. package/js/modules/overlapping-datalabels.js +4 -3
  614. package/js/modules/overlapping-datalabels.js.map +1 -8
  615. package/js/modules/overlapping-datalabels.src.js +6 -2
  616. package/js/modules/parallel-coordinates.js +10 -9
  617. package/js/modules/parallel-coordinates.js.map +1 -8
  618. package/js/modules/parallel-coordinates.src.js +9 -4
  619. package/js/modules/pareto.js +5 -4
  620. package/js/modules/pareto.js.map +1 -8
  621. package/js/modules/pareto.src.js +6 -2
  622. package/js/modules/pathfinder.js +34 -0
  623. package/js/modules/pathfinder.js.map +1 -0
  624. package/js/modules/pathfinder.src.js +2106 -0
  625. package/js/modules/pattern-fill.js +13 -12
  626. package/js/modules/pattern-fill.js.map +1 -8
  627. package/js/modules/pattern-fill.src.js +5 -1
  628. package/js/modules/sankey.js +13 -12
  629. package/js/modules/sankey.js.map +1 -8
  630. package/js/modules/sankey.src.js +29 -9
  631. package/js/modules/series-label.js +17 -15
  632. package/js/modules/series-label.js.map +1 -8
  633. package/js/modules/series-label.src.js +12 -8
  634. package/js/modules/solid-gauge.js +9 -8
  635. package/js/modules/solid-gauge.js.map +1 -8
  636. package/js/modules/solid-gauge.src.js +14 -7
  637. package/js/modules/static-scale.js +4 -3
  638. package/js/modules/static-scale.js.map +1 -8
  639. package/js/modules/static-scale.src.js +69 -26
  640. package/js/modules/stock.js +136 -132
  641. package/js/modules/stock.js.map +1 -8
  642. package/js/modules/stock.src.js +1543 -499
  643. package/js/modules/streamgraph.js +4 -3
  644. package/js/modules/streamgraph.js.map +1 -8
  645. package/js/modules/streamgraph.src.js +10 -6
  646. package/js/modules/sunburst.js +40 -39
  647. package/js/modules/sunburst.js.map +1 -8
  648. package/js/modules/sunburst.src.js +38 -31
  649. package/js/modules/tilemap.js +19 -18
  650. package/js/modules/tilemap.js.map +1 -8
  651. package/js/modules/tilemap.src.js +363 -190
  652. package/js/modules/treegrid.js +51 -0
  653. package/js/modules/treegrid.js.map +1 -0
  654. package/js/modules/treegrid.src.js +2759 -0
  655. package/js/modules/treemap.js +27 -26
  656. package/js/modules/treemap.js.map +1 -8
  657. package/js/modules/treemap.src.js +34 -27
  658. package/js/modules/variable-pie.js +8 -7
  659. package/js/modules/variable-pie.js.map +1 -8
  660. package/js/modules/variable-pie.src.js +8 -4
  661. package/js/modules/variwide.js +8 -7
  662. package/js/modules/variwide.js.map +1 -8
  663. package/js/modules/variwide.src.js +42 -26
  664. package/js/modules/vector.js +7 -6
  665. package/js/modules/vector.js.map +1 -8
  666. package/js/modules/vector.src.js +104 -30
  667. package/js/modules/windbarb.js +11 -10
  668. package/js/modules/windbarb.js.map +1 -8
  669. package/js/modules/windbarb.src.js +11 -7
  670. package/js/modules/wordcloud.js +18 -15
  671. package/js/modules/wordcloud.js.map +1 -8
  672. package/js/modules/wordcloud.src.js +142 -53
  673. package/js/modules/xrange.js +12 -10
  674. package/js/modules/xrange.js.map +1 -8
  675. package/js/modules/xrange.src.js +262 -71
  676. package/js/themes/avocado.js +3 -2
  677. package/js/themes/avocado.js.map +1 -8
  678. package/js/themes/avocado.src.js +5 -1
  679. package/js/themes/dark-blue.js +9 -8
  680. package/js/themes/dark-blue.js.map +1 -8
  681. package/js/themes/dark-blue.src.js +7 -3
  682. package/js/themes/dark-green.js +9 -8
  683. package/js/themes/dark-green.js.map +1 -8
  684. package/js/themes/dark-green.src.js +7 -3
  685. package/js/themes/dark-unica.js +9 -7
  686. package/js/themes/dark-unica.js.map +1 -8
  687. package/js/themes/dark-unica.src.js +7 -3
  688. package/js/themes/gray.js +10 -8
  689. package/js/themes/gray.js.map +1 -8
  690. package/js/themes/gray.src.js +7 -3
  691. package/js/themes/grid-light.js +5 -4
  692. package/js/themes/grid-light.js.map +1 -8
  693. package/js/themes/grid-light.src.js +7 -3
  694. package/js/themes/grid.js +6 -5
  695. package/js/themes/grid.js.map +1 -8
  696. package/js/themes/grid.src.js +7 -3
  697. package/js/themes/sand-signika.js +6 -5
  698. package/js/themes/sand-signika.js.map +1 -8
  699. package/js/themes/sand-signika.src.js +7 -3
  700. package/js/themes/skies.js +6 -5
  701. package/js/themes/skies.js.map +1 -8
  702. package/js/themes/skies.src.js +7 -3
  703. package/js/themes/sunset.js +3 -2
  704. package/js/themes/sunset.js.map +1 -8
  705. package/js/themes/sunset.src.js +5 -1
  706. package/modules/accessibility.js +53 -51
  707. package/modules/accessibility.js.map +1 -8
  708. package/modules/accessibility.src.js +86 -45
  709. package/modules/annotations.js +24 -22
  710. package/modules/annotations.js.map +1 -8
  711. package/modules/annotations.src.js +8 -4
  712. package/modules/arrow-symbols.js +13 -0
  713. package/modules/arrow-symbols.js.map +1 -0
  714. package/modules/arrow-symbols.src.js +138 -0
  715. package/modules/boost-canvas.js +15 -13
  716. package/modules/boost-canvas.js.map +1 -8
  717. package/modules/boost-canvas.src.js +24 -9
  718. package/modules/boost.js +57 -52
  719. package/modules/boost.js.map +1 -8
  720. package/modules/boost.src.js +305 -138
  721. package/modules/broken-axis.js +12 -10
  722. package/modules/broken-axis.js.map +1 -8
  723. package/modules/broken-axis.src.js +175 -136
  724. package/modules/bullet.js +6 -5
  725. package/modules/bullet.js.map +1 -8
  726. package/modules/bullet.src.js +7 -3
  727. package/modules/current-date-indicator.js +13 -0
  728. package/modules/current-date-indicator.js.map +1 -0
  729. package/modules/current-date-indicator.src.js +120 -0
  730. package/modules/data.js +25 -24
  731. package/modules/data.js.map +1 -8
  732. package/modules/data.src.js +14 -8
  733. package/modules/drag-panes.js +9 -8
  734. package/modules/drag-panes.js.map +1 -8
  735. package/modules/drag-panes.src.js +5 -1
  736. package/modules/draggable-points.js +38 -0
  737. package/modules/draggable-points.js.map +1 -0
  738. package/modules/draggable-points.src.js +2281 -0
  739. package/modules/drilldown.js +16 -15
  740. package/modules/drilldown.js.map +1 -8
  741. package/modules/drilldown.src.js +9 -3
  742. package/modules/export-data.js +20 -19
  743. package/modules/export-data.js.map +1 -8
  744. package/modules/export-data.src.js +17 -3
  745. package/modules/exporting.js +23 -21
  746. package/modules/exporting.js.map +1 -8
  747. package/modules/exporting.src.js +68 -38
  748. package/modules/funnel.js +8 -7
  749. package/modules/funnel.js.map +1 -8
  750. package/modules/funnel.src.js +11 -7
  751. package/modules/gantt.js +84 -19
  752. package/modules/gantt.js.map +1 -8
  753. package/modules/gantt.src.js +5557 -379
  754. package/modules/grid-axis.js +17 -10
  755. package/modules/grid-axis.js.map +1 -8
  756. package/modules/grid-axis.src.js +736 -293
  757. package/modules/heatmap.js +22 -21
  758. package/modules/heatmap.js.map +1 -8
  759. package/modules/heatmap.src.js +139 -63
  760. package/modules/histogram-bellcurve.js +9 -8
  761. package/modules/histogram-bellcurve.js.map +1 -8
  762. package/modules/histogram-bellcurve.src.js +35 -29
  763. package/modules/item-series.js +6 -4
  764. package/modules/item-series.js.map +1 -8
  765. package/modules/item-series.src.js +42 -13
  766. package/modules/map.js +65 -64
  767. package/modules/map.js.map +1 -8
  768. package/modules/map.src.js +365 -152
  769. package/modules/no-data-to-display.js +5 -4
  770. package/modules/no-data-to-display.js.map +1 -8
  771. package/modules/no-data-to-display.src.js +10 -6
  772. package/modules/offline-exporting.js +14 -12
  773. package/modules/offline-exporting.js.map +1 -8
  774. package/modules/offline-exporting.src.js +6 -2
  775. package/modules/oldie.js +29 -27
  776. package/modules/oldie.js.map +1 -8
  777. package/modules/oldie.src.js +20 -11
  778. package/modules/overlapping-datalabels.js +4 -3
  779. package/modules/overlapping-datalabels.js.map +1 -8
  780. package/modules/overlapping-datalabels.src.js +6 -2
  781. package/modules/parallel-coordinates.js +10 -9
  782. package/modules/parallel-coordinates.js.map +1 -8
  783. package/modules/parallel-coordinates.src.js +9 -4
  784. package/modules/pareto.js +5 -4
  785. package/modules/pareto.js.map +1 -8
  786. package/modules/pareto.src.js +6 -2
  787. package/modules/pathfinder.js +35 -0
  788. package/modules/pathfinder.js.map +1 -0
  789. package/modules/pathfinder.src.js +2128 -0
  790. package/modules/pattern-fill.js +13 -12
  791. package/modules/pattern-fill.js.map +1 -8
  792. package/modules/pattern-fill.src.js +5 -1
  793. package/modules/sankey.js +13 -12
  794. package/modules/sankey.js.map +1 -8
  795. package/modules/sankey.src.js +34 -12
  796. package/modules/series-label.js +17 -15
  797. package/modules/series-label.js.map +1 -8
  798. package/modules/series-label.src.js +12 -8
  799. package/modules/solid-gauge.js +9 -8
  800. package/modules/solid-gauge.js.map +1 -8
  801. package/modules/solid-gauge.src.js +16 -9
  802. package/modules/static-scale.js +4 -3
  803. package/modules/static-scale.js.map +1 -8
  804. package/modules/static-scale.src.js +69 -26
  805. package/modules/stock.js +143 -139
  806. package/modules/stock.js.map +1 -8
  807. package/modules/stock.src.js +1701 -566
  808. package/modules/streamgraph.js +4 -3
  809. package/modules/streamgraph.js.map +1 -8
  810. package/modules/streamgraph.src.js +10 -6
  811. package/modules/sunburst.js +42 -41
  812. package/modules/sunburst.js.map +1 -8
  813. package/modules/sunburst.src.js +39 -32
  814. package/modules/tilemap.js +18 -17
  815. package/modules/tilemap.js.map +1 -8
  816. package/modules/tilemap.src.js +365 -191
  817. package/modules/treegrid.js +52 -0
  818. package/modules/treegrid.js.map +1 -0
  819. package/modules/treegrid.src.js +2797 -0
  820. package/modules/treemap.js +29 -28
  821. package/modules/treemap.js.map +1 -8
  822. package/modules/treemap.src.js +35 -28
  823. package/modules/variable-pie.js +8 -7
  824. package/modules/variable-pie.js.map +1 -8
  825. package/modules/variable-pie.src.js +8 -4
  826. package/modules/variwide.js +8 -7
  827. package/modules/variwide.js.map +1 -8
  828. package/modules/variwide.src.js +42 -26
  829. package/modules/vector.js +7 -6
  830. package/modules/vector.js.map +1 -8
  831. package/modules/vector.src.js +104 -30
  832. package/modules/windbarb.js +11 -10
  833. package/modules/windbarb.js.map +1 -8
  834. package/modules/windbarb.src.js +11 -7
  835. package/modules/wordcloud.js +18 -15
  836. package/modules/wordcloud.js.map +1 -8
  837. package/modules/wordcloud.src.js +142 -53
  838. package/modules/xrange.js +13 -11
  839. package/modules/xrange.js.map +1 -8
  840. package/modules/xrange.src.js +264 -80
  841. package/package.json +1 -1
  842. package/themes/avocado.js +3 -2
  843. package/themes/avocado.js.map +1 -8
  844. package/themes/avocado.src.js +5 -1
  845. package/themes/dark-blue.js +9 -8
  846. package/themes/dark-blue.js.map +1 -8
  847. package/themes/dark-blue.src.js +7 -3
  848. package/themes/dark-green.js +9 -8
  849. package/themes/dark-green.js.map +1 -8
  850. package/themes/dark-green.src.js +7 -3
  851. package/themes/dark-unica.js +9 -7
  852. package/themes/dark-unica.js.map +1 -8
  853. package/themes/dark-unica.src.js +7 -3
  854. package/themes/gray.js +10 -8
  855. package/themes/gray.js.map +1 -8
  856. package/themes/gray.src.js +7 -3
  857. package/themes/grid-light.js +5 -4
  858. package/themes/grid-light.js.map +1 -8
  859. package/themes/grid-light.src.js +7 -3
  860. package/themes/grid.js +6 -5
  861. package/themes/grid.js.map +1 -8
  862. package/themes/grid.src.js +7 -3
  863. package/themes/sand-signika.js +6 -5
  864. package/themes/sand-signika.js.map +1 -8
  865. package/themes/sand-signika.src.js +7 -3
  866. package/themes/skies.js +6 -5
  867. package/themes/skies.js.map +1 -8
  868. package/themes/skies.src.js +7 -3
  869. package/themes/sunset.js +3 -2
  870. package/themes/sunset.js.map +1 -8
  871. package/themes/sunset.src.js +5 -1
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @license Highcharts JS v6.1.1 (2018-06-27)
2
+ * @license Highcharts JS v6.2.0 (2018-10-17)
3
3
  * Highstock as a plugin for Highcharts
4
4
  *
5
- * (c) 2017 Torstein Honsi
5
+ * (c) 2018 Torstein Honsi
6
6
  *
7
7
  * License: www.highcharts.com/license
8
8
  */
@@ -10,13 +10,17 @@
10
10
  (function (factory) {
11
11
  if (typeof module === 'object' && module.exports) {
12
12
  module.exports = factory;
13
+ } else if (typeof define === 'function' && define.amd) {
14
+ define(function () {
15
+ return factory;
16
+ });
13
17
  } else {
14
18
  factory(Highcharts);
15
19
  }
16
20
  }(function (Highcharts) {
17
21
  (function (H) {
18
22
  /**
19
- * (c) 2010-2017 Torstein Honsi
23
+ * (c) 2010-2018 Torstein Honsi
20
24
  *
21
25
  * License: www.highcharts.com/license
22
26
  */
@@ -78,9 +82,14 @@
78
82
  tickPixelIntervalOption = this.options.tickPixelInterval,
79
83
  time = this.chart.time;
80
84
 
81
- // The positions are not always defined, for example for ordinal positions when data
82
- // has regular interval (#1557, #2090)
83
- if ((!this.options.ordinal && !this.options.breaks) || !positions || positions.length < 3 || min === undefined) {
85
+ // The positions are not always defined, for example for ordinal positions
86
+ // when data has regular interval (#1557, #2090)
87
+ if (
88
+ (!this.options.ordinal && !this.options.breaks) ||
89
+ !positions ||
90
+ positions.length < 3 ||
91
+ min === undefined
92
+ ) {
84
93
  return proceed.call(this, normalizedInterval, min, max, startOfWeek);
85
94
  }
86
95
 
@@ -247,7 +256,8 @@
247
256
  overscrollPointsRange = Number.MAX_VALUE,
248
257
  ignoreHiddenSeries = axis.chart.options.chart.ignoreHiddenSeries,
249
258
  isNavigatorAxis = axis.options.className === 'highcharts-navigator-xaxis',
250
- i;
259
+ i,
260
+ hasBoostedSeries;
251
261
 
252
262
  if (
253
263
  axis.options.overscroll &&
@@ -327,8 +337,16 @@
327
337
  }
328
338
  }
329
339
 
340
+ if (series.isSeriesBoosting) {
341
+ hasBoostedSeries = true;
342
+ }
343
+
330
344
  });
331
345
 
346
+ if (hasBoostedSeries) {
347
+ ordinalPositions.length = 0;
348
+ }
349
+
332
350
  // cache the length
333
351
  len = ordinalPositions.length;
334
352
 
@@ -687,7 +705,7 @@
687
705
  * Make the tick intervals closer because the ordinal gaps make the ticks spread out or cluster
688
706
  */
689
707
  postProcessTickInterval: function (tickInterval) {
690
- // Problem: http://jsfiddle.net/highcharts/FQm4E/1/
708
+ // Problem: https://jsfiddle.net/highcharts/FQm4E/1/
691
709
  // This is a case where this algorithm doesn't work optimally. In this case, the
692
710
  // tick labels are spread out per week, but all the gaps reside within weeks. So
693
711
  // we have a situation where the labels are courser than the ordinal gaps, and
@@ -816,7 +834,7 @@
816
834
  }(Highcharts));
817
835
  (function (H) {
818
836
  /**
819
- * (c) 2009-2017 Torstein Honsi
837
+ * (c) 2009-2018 Torstein Honsi
820
838
  *
821
839
  * License: www.highcharts.com/license
822
840
  */
@@ -888,8 +906,14 @@
888
906
  }
889
907
  });
890
908
 
909
+ addEvent(Axis, 'afterInit', function () {
910
+ if (typeof this.setBreaks === 'function') {
911
+ this.setBreaks(this.options.breaks, false);
912
+ }
913
+ });
914
+
891
915
  addEvent(Axis, 'afterSetTickPositions', function () {
892
- if (this.options.breaks) {
916
+ if (this.isBroken) {
893
917
  var axis = this,
894
918
  tickPositions = this.tickPositions,
895
919
  info = this.tickPositions.info,
@@ -909,55 +933,77 @@
909
933
 
910
934
  // Force Axis to be not-ordinal when breaks are defined
911
935
  addEvent(Axis, 'afterSetOptions', function () {
912
- if (this.options.breaks && this.options.breaks.length) {
936
+ if (this.isBroken) {
913
937
  this.options.ordinal = false;
914
938
  }
915
939
  });
916
940
 
917
- addEvent(Axis, 'afterInit', function () {
941
+ /**
942
+ * Dynamically set or unset breaks in an axis. This function in lighter than
943
+ * usin Axis.update, and it also preserves animation.
944
+ * @param {Array} [breaks]
945
+ * The breaks to add. When `undefined` it removes existing breaks.
946
+ * @param {Boolean} [redraw=true]
947
+ * Whether to redraw the chart immediately.
948
+ */
949
+ Axis.prototype.setBreaks = function (breaks, redraw) {
918
950
  var axis = this,
919
- breaks;
920
-
921
- breaks = this.options.breaks;
922
- axis.isBroken = (isArray(breaks) && !!breaks.length);
923
- if (axis.isBroken) {
924
- axis.val2lin = function (val) {
925
- var nval = val,
926
- brk,
927
- i;
928
-
929
- for (i = 0; i < axis.breakArray.length; i++) {
930
- brk = axis.breakArray[i];
931
- if (brk.to <= val) {
932
- nval -= brk.len;
933
- } else if (brk.from >= val) {
934
- break;
935
- } else if (axis.isInBreak(brk, val)) {
936
- nval -= (val - brk.from);
937
- break;
938
- }
951
+ isBroken = (isArray(breaks) && !!breaks.length);
952
+
953
+ function breakVal2Lin(val) {
954
+ var nval = val,
955
+ brk,
956
+ i;
957
+
958
+ for (i = 0; i < axis.breakArray.length; i++) {
959
+ brk = axis.breakArray[i];
960
+ if (brk.to <= val) {
961
+ nval -= brk.len;
962
+ } else if (brk.from >= val) {
963
+ break;
964
+ } else if (axis.isInBreak(brk, val)) {
965
+ nval -= (val - brk.from);
966
+ break;
939
967
  }
968
+ }
940
969
 
941
- return nval;
942
- };
970
+ return nval;
971
+ }
943
972
 
944
- axis.lin2val = function (val) {
945
- var nval = val,
946
- brk,
947
- i;
973
+ function breakLin2Val(val) {
974
+ var nval = val,
975
+ brk,
976
+ i;
948
977
 
949
- for (i = 0; i < axis.breakArray.length; i++) {
950
- brk = axis.breakArray[i];
951
- if (brk.from >= nval) {
952
- break;
953
- } else if (brk.to < nval) {
954
- nval += brk.len;
955
- } else if (axis.isInBreak(brk, nval)) {
956
- nval += brk.len;
957
- }
978
+ for (i = 0; i < axis.breakArray.length; i++) {
979
+ brk = axis.breakArray[i];
980
+ if (brk.from >= nval) {
981
+ break;
982
+ } else if (brk.to < nval) {
983
+ nval += brk.len;
984
+ } else if (axis.isInBreak(brk, nval)) {
985
+ nval += brk.len;
958
986
  }
959
- return nval;
960
- };
987
+ }
988
+ return nval;
989
+ }
990
+
991
+
992
+ axis.isDirty = axis.isBroken !== isBroken;
993
+ axis.isBroken = isBroken;
994
+ axis.options.breaks = axis.userOptions.breaks = breaks;
995
+ axis.forceRedraw = true; // Force recalculation in setScale
996
+
997
+ if (!isBroken && axis.val2lin === breakVal2Lin) {
998
+ // Revert to prototype functions
999
+ delete axis.val2lin;
1000
+ delete axis.lin2val;
1001
+ }
1002
+
1003
+ if (isBroken) {
1004
+ axis.userOptions.ordinal = false;
1005
+ axis.val2lin = breakVal2Lin;
1006
+ axis.lin2val = breakLin2Val;
961
1007
 
962
1008
  axis.setExtremes = function (
963
1009
  newMin,
@@ -968,11 +1014,13 @@
968
1014
  ) {
969
1015
  // If trying to set extremes inside a break, extend it to before and
970
1016
  // after the break ( #3857 )
971
- while (this.isInAnyBreak(newMin)) {
972
- newMin -= this.closestPointRange;
973
- }
974
- while (this.isInAnyBreak(newMax)) {
975
- newMax -= this.closestPointRange;
1017
+ if (this.isBroken) {
1018
+ while (this.isInAnyBreak(newMin)) {
1019
+ newMin -= this.closestPointRange;
1020
+ }
1021
+ while (this.isInAnyBreak(newMax)) {
1022
+ newMax -= this.closestPointRange;
1023
+ }
976
1024
  }
977
1025
  Axis.prototype.setExtremes.call(
978
1026
  this,
@@ -987,108 +1035,113 @@
987
1035
  axis.setAxisTranslation = function (saveOld) {
988
1036
  Axis.prototype.setAxisTranslation.call(this, saveOld);
989
1037
 
990
- var breaks = axis.options.breaks,
991
- breakArrayT = [], // Temporary one
992
- breakArray = [],
993
- length = 0,
994
- inBrk,
995
- repeat,
996
- min = axis.userMin || axis.min,
997
- max = axis.userMax || axis.max,
998
- pointRangePadding = pick(axis.pointRangePadding, 0),
999
- start,
1000
- i;
1001
-
1002
- // Min & max check (#4247)
1003
- each(breaks, function (brk) {
1004
- repeat = brk.repeat || Infinity;
1005
- if (axis.isInBreak(brk, min)) {
1006
- min += (brk.to % repeat) - (min % repeat);
1007
- }
1008
- if (axis.isInBreak(brk, max)) {
1009
- max -= (max % repeat) - (brk.from % repeat);
1010
- }
1011
- });
1038
+ this.unitLength = null;
1039
+ if (this.isBroken) {
1040
+ var breaks = axis.options.breaks,
1041
+ breakArrayT = [], // Temporary one
1042
+ breakArray = [],
1043
+ length = 0,
1044
+ inBrk,
1045
+ repeat,
1046
+ min = axis.userMin || axis.min,
1047
+ max = axis.userMax || axis.max,
1048
+ pointRangePadding = pick(axis.pointRangePadding, 0),
1049
+ start,
1050
+ i;
1051
+
1052
+ // Min & max check (#4247)
1053
+ each(breaks, function (brk) {
1054
+ repeat = brk.repeat || Infinity;
1055
+ if (axis.isInBreak(brk, min)) {
1056
+ min += (brk.to % repeat) - (min % repeat);
1057
+ }
1058
+ if (axis.isInBreak(brk, max)) {
1059
+ max -= (max % repeat) - (brk.from % repeat);
1060
+ }
1061
+ });
1012
1062
 
1013
- // Construct an array holding all breaks in the axis
1014
- each(breaks, function (brk) {
1015
- start = brk.from;
1016
- repeat = brk.repeat || Infinity;
1063
+ // Construct an array holding all breaks in the axis
1064
+ each(breaks, function (brk) {
1065
+ start = brk.from;
1066
+ repeat = brk.repeat || Infinity;
1017
1067
 
1018
- while (start - repeat > min) {
1019
- start -= repeat;
1020
- }
1021
- while (start < min) {
1022
- start += repeat;
1023
- }
1068
+ while (start - repeat > min) {
1069
+ start -= repeat;
1070
+ }
1071
+ while (start < min) {
1072
+ start += repeat;
1073
+ }
1024
1074
 
1025
- for (i = start; i < max; i += repeat) {
1026
- breakArrayT.push({
1027
- value: i,
1028
- move: 'in'
1029
- });
1030
- breakArrayT.push({
1031
- value: i + (brk.to - brk.from),
1032
- move: 'out',
1033
- size: brk.breakSize
1034
- });
1035
- }
1036
- });
1075
+ for (i = start; i < max; i += repeat) {
1076
+ breakArrayT.push({
1077
+ value: i,
1078
+ move: 'in'
1079
+ });
1080
+ breakArrayT.push({
1081
+ value: i + (brk.to - brk.from),
1082
+ move: 'out',
1083
+ size: brk.breakSize
1084
+ });
1085
+ }
1086
+ });
1037
1087
 
1038
- breakArrayT.sort(function (a, b) {
1039
- var ret;
1040
- if (a.value === b.value) {
1041
- ret = (a.move === 'in' ? 0 : 1) - (b.move === 'in' ? 0 : 1);
1042
- } else {
1043
- ret = a.value - b.value;
1044
- }
1045
- return ret;
1046
- });
1088
+ breakArrayT.sort(function (a, b) {
1089
+ return (
1090
+ (a.value === b.value) ?
1091
+ (a.move === 'in' ? 0 : 1) - (b.move === 'in' ? 0 : 1) :
1092
+ a.value - b.value
1093
+ );
1094
+ });
1047
1095
 
1048
- // Simplify the breaks
1049
- inBrk = 0;
1050
- start = min;
1096
+ // Simplify the breaks
1097
+ inBrk = 0;
1098
+ start = min;
1051
1099
 
1052
- each(breakArrayT, function (brk) {
1053
- inBrk += (brk.move === 'in' ? 1 : -1);
1100
+ each(breakArrayT, function (brk) {
1101
+ inBrk += (brk.move === 'in' ? 1 : -1);
1054
1102
 
1055
- if (inBrk === 1 && brk.move === 'in') {
1056
- start = brk.value;
1057
- }
1058
- if (inBrk === 0) {
1059
- breakArray.push({
1060
- from: start,
1061
- to: brk.value,
1062
- len: brk.value - start - (brk.size || 0)
1063
- });
1064
- length += brk.value - start - (brk.size || 0);
1065
- }
1066
- });
1103
+ if (inBrk === 1 && brk.move === 'in') {
1104
+ start = brk.value;
1105
+ }
1106
+ if (inBrk === 0) {
1107
+ breakArray.push({
1108
+ from: start,
1109
+ to: brk.value,
1110
+ len: brk.value - start - (brk.size || 0)
1111
+ });
1112
+ length += brk.value - start - (brk.size || 0);
1113
+ }
1114
+ });
1067
1115
 
1068
- axis.breakArray = breakArray;
1116
+ axis.breakArray = breakArray;
1069
1117
 
1070
- // Used with staticScale, and below, the actual axis length when
1071
- // breaks are substracted.
1072
- axis.unitLength = max - min - length + pointRangePadding;
1118
+ // Used with staticScale, and below, the actual axis length when
1119
+ // breaks are substracted.
1120
+ axis.unitLength = max - min - length + pointRangePadding;
1073
1121
 
1074
- fireEvent(axis, 'afterBreaks');
1122
+ fireEvent(axis, 'afterBreaks');
1075
1123
 
1076
- if (axis.options.staticScale) {
1077
- axis.transA = axis.options.staticScale;
1078
- } else if (axis.unitLength) {
1079
- axis.transA *= (max - axis.min + pointRangePadding) /
1080
- axis.unitLength;
1081
- }
1124
+ if (axis.staticScale) {
1125
+ axis.transA = axis.staticScale;
1126
+ } else if (axis.unitLength) {
1127
+ axis.transA *= (max - axis.min + pointRangePadding) /
1128
+ axis.unitLength;
1129
+ }
1082
1130
 
1083
- if (pointRangePadding) {
1084
- axis.minPixelPadding = axis.transA * axis.minPointOffset;
1085
- }
1131
+ if (pointRangePadding) {
1132
+ axis.minPixelPadding = axis.transA * axis.minPointOffset;
1133
+ }
1086
1134
 
1087
- axis.min = min;
1088
- axis.max = max;
1135
+ axis.min = min;
1136
+ axis.max = max;
1137
+ }
1089
1138
  };
1090
1139
  }
1091
- });
1140
+
1141
+ if (pick(redraw, true)) {
1142
+ this.chart.redraw();
1143
+ }
1144
+ };
1092
1145
 
1093
1146
  wrap(Series.prototype, 'generatePoints', function (proceed) {
1094
1147
 
@@ -1295,7 +1348,7 @@
1295
1348
  }());
1296
1349
  (function (H) {
1297
1350
  /**
1298
- * (c) 2010-2017 Torstein Honsi
1351
+ * (c) 2010-2018 Torstein Honsi
1299
1352
  *
1300
1353
  * License: www.highcharts.com/license
1301
1354
  */
@@ -1330,7 +1383,11 @@
1330
1383
  *
1331
1384
  * If data grouping is applied, the grouping information of grouped
1332
1385
  * points can be read from the [Point.dataGroup](
1333
- * /class-reference/Highcharts.Point#.dataGroup).
1386
+ * /class-reference/Highcharts.Point#.dataGroup). If point options other than
1387
+ * the data itself are set, for example `name` or `color` or custom properties,
1388
+ * the grouping logic doesn't know how to group it. In this case the options of
1389
+ * the first point instance are copied over to the group point. This can be
1390
+ * altered through a custom `approximation` callback function.
1334
1391
  *
1335
1392
  * @product highstock
1336
1393
  * @apioption plotOptions.series.dataGrouping
@@ -1778,6 +1835,7 @@
1778
1835
  ) || approximations[commonOptions.approximation],
1779
1836
  pointArrayMap = series.pointArrayMap,
1780
1837
  pointArrayMapLength = pointArrayMap && pointArrayMap.length,
1838
+ extendedPointArrayMap = ['x'].concat(pointArrayMap || ['y']),
1781
1839
  pos = 0,
1782
1840
  start = 0,
1783
1841
  valuesLen,
@@ -1814,6 +1872,28 @@
1814
1872
  series.dataGroupInfo = { start: start, length: values[0].length };
1815
1873
  groupedY = approximationFn.apply(series, values);
1816
1874
 
1875
+ // By default, let options of the first grouped point be passed over
1876
+ // to the grouped point. This allows preserving properties like
1877
+ // `name` and `color` or custom properties. Implementers can
1878
+ // override this from the approximation function, where they can
1879
+ // write custom options to `this.dataGroupInfo.options`.
1880
+ if (!defined(series.dataGroupInfo.options)) {
1881
+ // Convert numbers and arrays into objects
1882
+ series.dataGroupInfo.options = merge(
1883
+ series.pointClass.prototype
1884
+ .optionsToObject.call(
1885
+ { series: series },
1886
+ series.options.data[start]
1887
+ )
1888
+ );
1889
+
1890
+ // Make sure the raw data (x, y, open, high etc) is not copied
1891
+ // over and overwriting approximated data.
1892
+ each(extendedPointArrayMap, function (key) {
1893
+ delete series.dataGroupInfo.options[key];
1894
+ });
1895
+ }
1896
+
1817
1897
  // push the grouped data
1818
1898
  if (groupedY !== undefined) {
1819
1899
  groupedXData.push(pointX);
@@ -1984,7 +2064,13 @@
1984
2064
  groupedXData[0] < xAxis.dataMin &&
1985
2065
  visible
1986
2066
  ) {
1987
- if (xAxis.min <= xAxis.dataMin) {
2067
+ if (
2068
+ (
2069
+ !defined(xAxis.options.min) &&
2070
+ xAxis.min <= xAxis.dataMin
2071
+ ) ||
2072
+ xAxis.min === xAxis.dataMin
2073
+ ) {
1988
2074
  xAxis.min = groupedXData[0];
1989
2075
  }
1990
2076
  xAxis.dataMin = groupedXData[0];
@@ -2298,7 +2384,7 @@
2298
2384
  }(Highcharts));
2299
2385
  (function (H) {
2300
2386
  /**
2301
- * (c) 2010-2017 Torstein Honsi
2387
+ * (c) 2010-2018 Torstein Honsi
2302
2388
  *
2303
2389
  * License: www.highcharts.com/license
2304
2390
  */
@@ -2319,8 +2405,8 @@
2319
2405
  * point.
2320
2406
  *
2321
2407
  * @sample stock/demo/ohlc/ OHLC chart
2322
- * @extends {plotOptions.column}
2323
- * @excluding borderColor,borderRadius,borderWidth,crisp
2408
+ * @extends plotOptions.column
2409
+ * @excluding borderColor,borderRadius,borderWidth,crisp,stacking,stack
2324
2410
  * @product highstock
2325
2411
  * @optionparent plotOptions.ohlc
2326
2412
  */
@@ -2423,6 +2509,12 @@
2423
2509
  'stroke-width': 'lineWidth'
2424
2510
  },
2425
2511
 
2512
+ init: function () {
2513
+ seriesTypes.column.prototype.init.apply(this, arguments);
2514
+
2515
+ this.options.stacking = false; // #8817
2516
+ },
2517
+
2426
2518
  /**
2427
2519
  * Postprocess mapping between options and SVG attributes
2428
2520
  */
@@ -2614,8 +2706,8 @@
2614
2706
  * ]
2615
2707
  * ```
2616
2708
  *
2617
- * 2. An array of objects with named values. The objects are point
2618
- * configuration objects as seen below. If the total number of data
2709
+ * 2. An array of objects with named values. The following snippet shows only a
2710
+ * few settings, see the complete options set below. If the total number of data
2619
2711
  * points exceeds the series' [turboThreshold](#series.ohlc.turboThreshold),
2620
2712
  * this option is not available.
2621
2713
  *
@@ -2665,7 +2757,7 @@
2665
2757
  }(Highcharts));
2666
2758
  (function (H) {
2667
2759
  /**
2668
- * (c) 2010-2017 Torstein Honsi
2760
+ * (c) 2010-2018 Torstein Honsi
2669
2761
  *
2670
2762
  * License: www.highcharts.com/license
2671
2763
  */
@@ -2681,7 +2773,7 @@
2681
2773
  *
2682
2774
  * @sample stock/demo/candlestick/ Candlestick chart
2683
2775
  *
2684
- * @extends {plotOptions.ohlc}
2776
+ * @extends plotOptions.ohlc
2685
2777
  * @excluding borderColor,borderRadius,borderWidth
2686
2778
  * @product highstock
2687
2779
  * @optionparent plotOptions.candlestick
@@ -2726,7 +2818,7 @@
2726
2818
  },
2727
2819
 
2728
2820
  /**
2729
- * @extends {plotOptions.ohlc.tooltip}
2821
+ * @extends plotOptions.ohlc.tooltip
2730
2822
  */
2731
2823
  tooltip: defaultPlotOptions.ohlc.tooltip,
2732
2824
 
@@ -2831,7 +2923,8 @@
2831
2923
  drawPoints: function () {
2832
2924
  var series = this,
2833
2925
  points = series.points,
2834
- chart = series.chart;
2926
+ chart = series.chart,
2927
+ reversedYAxis = series.yAxis.reversed;
2835
2928
 
2836
2929
 
2837
2930
  each(points, function (point) {
@@ -2872,9 +2965,12 @@
2872
2965
  topBox = Math.min(plotOpen, plotClose);
2873
2966
  bottomBox = Math.max(plotOpen, plotClose);
2874
2967
  halfWidth = Math.round(point.shapeArgs.width / 2);
2875
- hasTopWhisker =
2968
+ hasTopWhisker = reversedYAxis ?
2969
+ bottomBox !== point.yBottom :
2876
2970
  Math.round(topBox) !== Math.round(point.plotHigh);
2877
- hasBottomWhisker = bottomBox !== point.yBottom;
2971
+ hasBottomWhisker = reversedYAxis ?
2972
+ Math.round(topBox) !== Math.round(point.plotHigh) :
2973
+ bottomBox !== point.yBottom;
2878
2974
  topBox = Math.round(topBox) + crispCorr;
2879
2975
  bottomBox = Math.round(bottomBox) + crispCorr;
2880
2976
 
@@ -2898,13 +2994,19 @@
2898
2994
  crispX, topBox,
2899
2995
  'L',
2900
2996
  // #460, #2094
2901
- crispX, hasTopWhisker ? Math.round(point.plotHigh) : topBox,
2997
+ crispX, hasTopWhisker ?
2998
+ Math.round(
2999
+ reversedYAxis ? point.yBottom : point.plotHigh
3000
+ ) :
3001
+ topBox,
2902
3002
  'M',
2903
3003
  crispX, bottomBox,
2904
3004
  'L',
2905
3005
  // #460, #2094
2906
3006
  crispX, hasBottomWhisker ?
2907
- Math.round(point.yBottom) :
3007
+ Math.round(
3008
+ reversedYAxis ? point.plotHigh : point.yBottom
3009
+ ) :
2908
3010
  bottomBox
2909
3011
  );
2910
3012
 
@@ -2951,8 +3053,8 @@
2951
3053
  * ]
2952
3054
  * ```
2953
3055
  *
2954
- * 2. An array of objects with named values. The objects are point
2955
- * configuration objects as seen below. If the total number of data
3056
+ * 2. An array of objects with named values. The following snippet shows only a
3057
+ * few settings, see the complete options set below. If the total number of data
2956
3058
  * points exceeds the series' [turboThreshold](
2957
3059
  * #series.candlestick.turboThreshold), this option is not available.
2958
3060
  *
@@ -2986,7 +3088,7 @@
2986
3088
  }(Highcharts));
2987
3089
  var onSeriesMixin = (function (H) {
2988
3090
  /**
2989
- * (c) 2010-2017 Torstein Honsi
3091
+ * (c) 2010-2018 Torstein Honsi
2990
3092
  *
2991
3093
  * License: www.highcharts.com/license
2992
3094
  */
@@ -3141,7 +3243,7 @@
3141
3243
  }(Highcharts));
3142
3244
  (function (H, onSeriesMixin) {
3143
3245
  /**
3144
- * (c) 2010-2017 Torstein Honsi
3246
+ * (c) 2010-2018 Torstein Honsi
3145
3247
  *
3146
3248
  * License: www.highcharts.com/license
3147
3249
  */
@@ -3219,7 +3321,7 @@
3219
3321
 
3220
3322
  /**
3221
3323
  * The shape of the marker. Can be one of "flag", "circlepin", "squarepin",
3222
- * or an image on the format `url(/path-to-image.jpg)`. Individual
3324
+ * or an image of the format `url(/path-to-image.jpg)`. Individual
3223
3325
  * shapes can also be set for each point.
3224
3326
  *
3225
3327
  * @validvalue ["flag", "circlepin", "squarepin"]
@@ -3296,6 +3398,27 @@
3296
3398
  * @apioption plotOptions.flags.useHTML
3297
3399
  */
3298
3400
 
3401
+ /**
3402
+ * Fixed width of the flag's shape. By default, width is autocalculated
3403
+ * according to the flag's title.
3404
+ *
3405
+ * @type {Number}
3406
+ * @default undefined
3407
+ * @product highstock
3408
+ * @sample {highstock} stock/demo/flags-shapes/ Flags with fixed width
3409
+ * @apioption plotOptions.flags.width
3410
+ */
3411
+
3412
+ /**
3413
+ * Fixed height of the flag's shape. By default, height is autocalculated
3414
+ * according to the flag's title.
3415
+ *
3416
+ * @type {Number}
3417
+ * @default undefined
3418
+ * @product highstock
3419
+ * @apioption plotOptions.flags.height
3420
+ */
3421
+
3299
3422
 
3300
3423
 
3301
3424
  /**
@@ -3559,7 +3682,16 @@
3559
3682
  x: box.pos,
3560
3683
  anchorX: point.anchorX
3561
3684
  });
3562
- point.graphic.isNew = false;
3685
+ // Hide flag when its box position is not specified (#8573)
3686
+ if (!box.pos) {
3687
+ point.graphic.attr({
3688
+ x: -9999,
3689
+ anchorX: -9999
3690
+ });
3691
+ point.graphic.isNew = true;
3692
+ } else {
3693
+ point.graphic.isNew = false;
3694
+ }
3563
3695
  }
3564
3696
  });
3565
3697
  }
@@ -3623,9 +3755,21 @@
3623
3755
  });
3624
3756
  },
3625
3757
 
3626
- animate: noop, // Disable animation
3758
+ // Disable animation, but keep clipping (#8546):
3759
+ animate: function (init) {
3760
+ if (init) {
3761
+ this.setClip();
3762
+ } else {
3763
+ this.animate = null;
3764
+ }
3765
+ },
3766
+ setClip: function () {
3767
+ Series.prototype.setClip.apply(this, arguments);
3768
+ if (this.options.clip !== false && this.sharedClipKey) {
3769
+ this.markerGroup.clip(this.chart[this.sharedClipKey]);
3770
+ }
3771
+ },
3627
3772
  buildKDTree: noop,
3628
- setClip: noop,
3629
3773
  /**
3630
3774
  * Don't invert the flag marker group (#4960)
3631
3775
  */
@@ -3725,8 +3869,8 @@
3725
3869
  * An array of data points for the series. For the `flags` series type,
3726
3870
  * points can be given in the following ways:
3727
3871
  *
3728
- * 1. An array of objects with named values. The objects are point
3729
- * configuration objects as seen below. If the total number of data
3872
+ * 1. An array of objects with named values. The following snippet shows only a
3873
+ * few settings, see the complete options set below. If the total number of data
3730
3874
  * points exceeds the series' [turboThreshold](#series.flags.turboThreshold),
3731
3875
  * this option is not available.
3732
3876
  *
@@ -3776,7 +3920,7 @@
3776
3920
  }(Highcharts, onSeriesMixin));
3777
3921
  (function (H) {
3778
3922
  /**
3779
- * (c) 2010-2017 Torstein Honsi
3923
+ * (c) 2010-2018 Torstein Honsi
3780
3924
  *
3781
3925
  * License: www.highcharts.com/license
3782
3926
  */
@@ -3793,8 +3937,6 @@
3793
3937
  merge = H.merge,
3794
3938
  pick = H.pick,
3795
3939
  removeEvent = H.removeEvent,
3796
- svg = H.svg,
3797
- wrap = H.wrap,
3798
3940
  swapXY;
3799
3941
 
3800
3942
  /**
@@ -3824,172 +3966,263 @@
3824
3966
  * of the scroll arrows so that they are always squares. Defaults to
3825
3967
  * 20 for touch devices and 14 for mouse devices.
3826
3968
  *
3827
- * @type {Number}
3828
- * @sample {highstock} stock/scrollbar/height/ A 30px scrollbar
3829
- * @product highstock
3969
+ * @sample {highstock} stock/scrollbar/height/
3970
+ * A 30px scrollbar
3971
+ *
3972
+ * @type {number}
3973
+ * @default 20/14
3974
+ * @product highstock
3975
+ * @apioption scrollbar.height
3830
3976
  */
3831
3977
  height: isTouchDevice ? 20 : 14,
3832
3978
 
3833
3979
  /**
3834
3980
  * The border rounding radius of the bar.
3835
3981
  *
3836
- * @type {Number}
3837
- * @sample {highstock} stock/scrollbar/style/ Scrollbar styling
3838
- * @default 0
3839
- * @product highstock
3982
+ * @sample {highstock} stock/scrollbar/style/
3983
+ * Scrollbar styling
3984
+ *
3985
+ * @type {number}
3986
+ * @default 0
3987
+ * @product highstock
3988
+ * @apioption scrollbar.barBorderRadius
3840
3989
  */
3841
3990
  barBorderRadius: 0,
3842
3991
 
3843
3992
  /**
3844
3993
  * The corner radius of the scrollbar buttons.
3845
3994
  *
3846
- * @type {Number}
3847
- * @sample {highstock} stock/scrollbar/style/ Scrollbar styling
3848
- * @default 0
3849
- * @product highstock
3995
+ * @sample {highstock} stock/scrollbar/style/
3996
+ * Scrollbar styling
3997
+ *
3998
+ * @type {number}
3999
+ * @default 0
4000
+ * @product highstock
4001
+ * @apioption scrollbar.buttonBorderRadius
3850
4002
  */
3851
4003
  buttonBorderRadius: 0,
3852
4004
 
4005
+ /**
4006
+ * Enable or disable the scrollbar.
4007
+ *
4008
+ * @type {boolean}
4009
+ * @sample {highstock} stock/scrollbar/enabled/
4010
+ * Disable the scrollbar, only use navigator
4011
+ * @default true
4012
+ * @product highstock
4013
+ * @apioption scrollbar.enabled
4014
+ */
4015
+
3853
4016
  /**
3854
4017
  * Whether to redraw the main chart as the scrollbar or the navigator
3855
4018
  * zoomed window is moved. Defaults to `true` for modern browsers and
3856
4019
  * `false` for legacy IE browsers as well as mobile devices.
3857
4020
  *
3858
- * @type {Boolean}
3859
- * @since 1.3
3860
- * @product highstock
4021
+ * @type {boolean}
4022
+ * @since 1.3
4023
+ * @product highstock
4024
+ *
4025
+ * @sample stock/scrollbar/liveredraw Setting live redraw to false
4026
+ *
4027
+ * @apioption scrollbar.liveRedraw
3861
4028
  */
3862
- liveRedraw: svg && !isTouchDevice,
4029
+ liveRedraw: undefined,
3863
4030
 
3864
4031
  /**
3865
4032
  * The margin between the scrollbar and its axis when the scrollbar is
3866
4033
  * applied directly to an axis.
4034
+ *
4035
+ * @type {number}
4036
+ * @default 10
4037
+ * @apioption scrollbar.margin
3867
4038
  */
3868
4039
  margin: 10,
3869
4040
 
3870
4041
  /**
3871
4042
  * The minimum width of the scrollbar.
3872
4043
  *
3873
- * @type {Number}
3874
- * @default 6
3875
- * @since 1.2.5
3876
- * @product highstock
4044
+ * @type {number}
4045
+ * @default 6
4046
+ * @since 1.2.5
4047
+ * @product highstock
4048
+ * @apioption scrollbar.minWidth
3877
4049
  */
3878
4050
  minWidth: 6,
3879
4051
 
4052
+ /**
4053
+ * Whether to show or hide the scrollbar when the scrolled content is
4054
+ * zoomed out to it full extent.
4055
+ *
4056
+ * @type {boolean}
4057
+ * @default true
4058
+ * @product highstock
4059
+ * @apioption scrollbar.showFull
4060
+ */
4061
+
4062
+ /**
4063
+ * @type {number}
4064
+ * @default 0.2
4065
+ * @apioption scrollbar.step
4066
+ */
3880
4067
  step: 0.2,
3881
4068
 
3882
4069
  /**
3883
4070
  * The z index of the scrollbar group.
4071
+ *
4072
+ * @type {number}
4073
+ * @default 3
4074
+ * @apioption scrollbar.zIndex
3884
4075
  */
3885
4076
  zIndex: 3,
4077
+
3886
4078
 
3887
4079
 
3888
4080
  /**
3889
4081
  * The background color of the scrollbar itself.
3890
4082
  *
3891
- * @type {Color}
3892
- * @sample {highstock} stock/scrollbar/style/ Scrollbar styling
3893
- * @default #cccccc
3894
- * @product highstock
4083
+ * @sample {highstock} stock/scrollbar/style/
4084
+ * Scrollbar styling
4085
+ *
4086
+ * @type {Highcharts.ColorString}
4087
+ * @default #cccccc
4088
+ * @product highstock
4089
+ * @apioption scrollbar.barBackgroundColor
3895
4090
  */
3896
4091
  barBackgroundColor: '#cccccc',
3897
4092
 
3898
4093
  /**
3899
4094
  * The width of the bar's border.
3900
4095
  *
3901
- * @type {Number}
3902
- * @sample {highstock} stock/scrollbar/style/ Scrollbar styling
3903
- * @default 1
3904
- * @product highstock
4096
+ * @sample {highstock} stock/scrollbar/style/
4097
+ * Scrollbar styling
4098
+ *
4099
+ * @type {number}
4100
+ * @default 1
4101
+ * @product highstock
4102
+ * @apioption scrollbar.barBorderWidth
3905
4103
  */
3906
4104
  barBorderWidth: 1,
3907
4105
 
3908
4106
  /**
3909
4107
  * The color of the scrollbar's border.
3910
4108
  *
3911
- * @type {Color}
3912
- * @default #cccccc
3913
- * @product highstock
4109
+ * @type {Highcharts.ColorString}
4110
+ * @default #cccccc
4111
+ * @product highstock
4112
+ * @apioption scrollbar.barBorderColor
3914
4113
  */
3915
4114
  barBorderColor: '#cccccc',
3916
4115
 
3917
4116
  /**
3918
4117
  * The color of the small arrow inside the scrollbar buttons.
3919
4118
  *
3920
- * @type {Color}
3921
- * @sample {highstock} stock/scrollbar/style/ Scrollbar styling
3922
- * @default #333333
3923
- * @product highstock
4119
+ * @sample {highstock} stock/scrollbar/style/
4120
+ * Scrollbar styling
4121
+ *
4122
+ * @type {Highcharts.ColorString}
4123
+ * @default #333333
4124
+ * @product highstock
4125
+ * @apioption scrollbar.buttonArrowColor
3924
4126
  */
3925
4127
  buttonArrowColor: '#333333',
3926
4128
 
3927
4129
  /**
3928
4130
  * The color of scrollbar buttons.
3929
4131
  *
3930
- * @type {Color}
3931
- * @sample {highstock} stock/scrollbar/style/ Scrollbar styling
3932
- * @default #e6e6e6
3933
- * @product highstock
4132
+ * @sample {highstock} stock/scrollbar/style/
4133
+ * Scrollbar styling
4134
+ *
4135
+ * @type {Highcharts.ColorString}
4136
+ * @default #e6e6e6
4137
+ * @product highstock
4138
+ * @apioption scrollbar.buttonBackgroundColor
3934
4139
  */
3935
4140
  buttonBackgroundColor: '#e6e6e6',
3936
4141
 
3937
4142
  /**
3938
4143
  * The color of the border of the scrollbar buttons.
3939
4144
  *
3940
- * @type {Color}
3941
- * @sample {highstock} stock/scrollbar/style/ Scrollbar styling
3942
- * @default #cccccc
3943
- * @product highstock
4145
+ * @sample {highstock} stock/scrollbar/style/
4146
+ * Scrollbar styling
4147
+ *
4148
+ * @type {Highcharts.ColorString}
4149
+ * @default #cccccc
4150
+ * @product highstock
4151
+ * @apioption scrollbar.buttonBorderColor
3944
4152
  */
3945
4153
  buttonBorderColor: '#cccccc',
3946
4154
 
3947
4155
  /**
3948
4156
  * The border width of the scrollbar buttons.
3949
4157
  *
3950
- * @type {Number}
3951
- * @sample {highstock} stock/scrollbar/style/ Scrollbar styling
3952
- * @default 1
3953
- * @product highstock
4158
+ * @sample {highstock} stock/scrollbar/style/
4159
+ * Scrollbar styling
4160
+ *
4161
+ * @type {number}
4162
+ * @default 1
4163
+ * @product highstock
4164
+ * @apioption scrollbar.buttonBorderWidth
3954
4165
  */
3955
4166
  buttonBorderWidth: 1,
3956
4167
 
3957
4168
  /**
3958
4169
  * The color of the small rifles in the middle of the scrollbar.
3959
4170
  *
3960
- * @type {Color}
3961
- * @default #333333
3962
- * @product highstock
4171
+ * @type {Highcharts.ColorString}
4172
+ * @default #333333
4173
+ * @product highstock
4174
+ * @apioption scrollbar.rifleColor
3963
4175
  */
3964
4176
  rifleColor: '#333333',
3965
4177
 
3966
4178
  /**
3967
4179
  * The color of the track background.
3968
4180
  *
3969
- * @type {Color}
3970
- * @sample {highstock} stock/scrollbar/style/ Scrollbar styling
3971
- * @default #f2f2f2
3972
- * @product highstock
4181
+ * @sample {highstock} stock/scrollbar/style/
4182
+ * Scrollbar styling
4183
+ *
4184
+ * @type {Highcharts.ColorString}
4185
+ * @default #f2f2f2
4186
+ * @product highstock
4187
+ * @apioption scrollbar.trackBackgroundColor
3973
4188
  */
3974
4189
  trackBackgroundColor: '#f2f2f2',
3975
4190
 
3976
4191
  /**
3977
4192
  * The color of the border of the scrollbar track.
3978
4193
  *
3979
- * @type {Color}
3980
- * @sample {highstock} stock/scrollbar/style/ Scrollbar styling
3981
- * @default #f2f2f2
3982
- * @product highstock
4194
+ * @sample {highstock} stock/scrollbar/style/
4195
+ * Scrollbar styling
4196
+ *
4197
+ * @type {Highcharts.ColorString}
4198
+ * @default #f2f2f2
4199
+ * @product highstock
4200
+ * @apioption scrollbar.trackBorderColor
3983
4201
  */
3984
4202
  trackBorderColor: '#f2f2f2',
3985
4203
 
4204
+ /**
4205
+ * The corner radius of the border of the scrollbar track.
4206
+ *
4207
+ * @sample {highstock} stock/scrollbar/style/
4208
+ * Scrollbar styling
4209
+ *
4210
+ * @type {number}
4211
+ * @default 0
4212
+ * @product highstock
4213
+ * @apioption scrollbar.trackBorderRadius
4214
+ */
4215
+
3986
4216
  /**
3987
4217
  * The width of the border of the scrollbar track.
3988
4218
  *
3989
- * @type {Number}
3990
- * @sample {highstock} stock/scrollbar/style/ Scrollbar styling
3991
- * @default 1
3992
- * @product highstock
4219
+ * @sample {highstock} stock/scrollbar/style/
4220
+ * Scrollbar styling
4221
+ *
4222
+ * @type {number}
4223
+ * @default 1
4224
+ * @product highstock
4225
+ * @apioption scrollbar.trackBorderWidth
3993
4226
  */
3994
4227
  trackBorderWidth: 1
3995
4228
 
@@ -4002,11 +4235,19 @@
4002
4235
  );
4003
4236
 
4004
4237
  /**
4005
- * When we have vertical scrollbar, rifles and arrow in buttons should be
4006
- * rotated. The same method is used in Navigator's handles, to rotate them.
4007
- * @param {Array} path - path to be rotated
4008
- * @param {Boolean} vertical - if vertical scrollbar, swap x-y values
4009
- */
4238
+ * When we have vertical scrollbar, rifles and arrow in buttons should be
4239
+ * rotated. The same method is used in Navigator's handles, to rotate them.
4240
+ *
4241
+ * @function Highcharts.swapXY
4242
+ *
4243
+ * @param {Array<number|string>} path
4244
+ * Path to be rotated.
4245
+ *
4246
+ * @param {boolean} vertical
4247
+ * If vertical scrollbar, swap x-y values.
4248
+ *
4249
+ * @return {Array<number|string>}
4250
+ */
4010
4251
  H.swapXY = swapXY = function (path, vertical) {
4011
4252
  var i,
4012
4253
  len = path.length,
@@ -4027,10 +4268,13 @@
4027
4268
  * A reusable scrollbar, internally used in Highstock's navigator and optionally
4028
4269
  * on individual axes.
4029
4270
  *
4030
- * @class
4031
- * @param {Object} renderer
4032
- * @param {Object} options
4033
- * @param {Object} chart
4271
+ * @class Highcharts.Scrollbar
4272
+ *
4273
+ * @param {Highcharts.SVGRenderer} renderer
4274
+ *
4275
+ * @param {Highcharts.ScrollbarOptions} options
4276
+ *
4277
+ * @param {Highcharts.Chart} chart
4034
4278
  */
4035
4279
  function Scrollbar(renderer, options, chart) { // docs
4036
4280
  this.init(renderer, options, chart);
@@ -4038,6 +4282,17 @@
4038
4282
 
4039
4283
  Scrollbar.prototype = {
4040
4284
 
4285
+ /**
4286
+ * @function Highcharts.Scrollbar#init
4287
+ *
4288
+ * @param {Highcharts.SVGRenderer} renderer
4289
+ *
4290
+ * @param {Highcharts.ScrollbarOptions} options
4291
+ *
4292
+ * @param {Highcharts.Chart} chart
4293
+ *
4294
+ * @return {void}
4295
+ */
4041
4296
  init: function (renderer, options, chart) {
4042
4297
 
4043
4298
  this.scrollbarButtons = [];
@@ -4062,6 +4317,10 @@
4062
4317
 
4063
4318
  /**
4064
4319
  * Render scrollbar with all required items.
4320
+ *
4321
+ * @function Highcharts.Scrollbar#render
4322
+ *
4323
+ * @return {void}
4065
4324
  */
4066
4325
  render: function () {
4067
4326
  var scroller = this,
@@ -4153,10 +4412,22 @@
4153
4412
  /**
4154
4413
  * Position the scrollbar, method called from a parent with defined
4155
4414
  * dimensions.
4156
- * @param {Number} x - x-position on the chart
4157
- * @param {Number} y - y-position on the chart
4158
- * @param {Number} width - width of the scrollbar
4159
- * @param {Number} height - height of the scorllbar
4415
+ *
4416
+ * @function Highcharts.Scrollbar#position
4417
+ *
4418
+ * @param {number} x
4419
+ * x-position on the chart
4420
+ *
4421
+ * @param {number} y
4422
+ * y-position on the chart
4423
+ *
4424
+ * @param {number} width
4425
+ * width of the scrollbar
4426
+ *
4427
+ * @param {number} height
4428
+ * height of the scorllbar
4429
+ *
4430
+ * @return {void}
4160
4431
  */
4161
4432
  position: function (x, y, width, height) {
4162
4433
  var scroller = this,
@@ -4207,7 +4478,13 @@
4207
4478
 
4208
4479
  /**
4209
4480
  * Draw the scrollbar buttons with arrows
4210
- * @param {Number} index 0 is left, 1 is right
4481
+ *
4482
+ * @function Highcharts.Scrollbar#drawScrollbarButton
4483
+ *
4484
+ * @param {number} index
4485
+ * 0 is left, 1 is right
4486
+ *
4487
+ * @return {void}
4211
4488
  */
4212
4489
  drawScrollbarButton: function (index) {
4213
4490
  var scroller = this,
@@ -4269,8 +4546,16 @@
4269
4546
 
4270
4547
  /**
4271
4548
  * Set scrollbar size, with a given scale.
4272
- * @param {Number} from - scale (0-1) where bar should start
4273
- * @param {Number} to - scale (0-1) where bar should end
4549
+ *
4550
+ * @function Highcharts.Scrollbar#setRange
4551
+ *
4552
+ * @param {number} from
4553
+ * scale (0-1) where bar should start
4554
+ *
4555
+ * @param {number} to
4556
+ * scale (0-1) where bar should end
4557
+ *
4558
+ * @return {void}
4274
4559
  */
4275
4560
  setRange: function (from, to) {
4276
4561
  var scroller = this,
@@ -4283,7 +4568,11 @@
4283
4568
  newPos,
4284
4569
  newSize,
4285
4570
  newRiflesPos,
4286
- method = this.rendered && !this.hasDragged ? 'animate' : 'attr';
4571
+ method = (
4572
+ this.rendered &&
4573
+ !this.hasDragged &&
4574
+ !(this.chart.navigator && this.chart.navigator.hasDragged)
4575
+ ) ? 'animate' : 'attr';
4287
4576
 
4288
4577
  if (!defined(fullWidth)) {
4289
4578
  return;
@@ -4352,6 +4641,13 @@
4352
4641
 
4353
4642
  /**
4354
4643
  * Init events methods, so we have an access to the Scrollbar itself
4644
+ *
4645
+ * @function Highcharts.Scrollbar#initEvents
4646
+ *
4647
+ * @return {void}
4648
+ *
4649
+ * @todo
4650
+ * Make events official: Fires the event `changed`.
4355
4651
  */
4356
4652
  initEvents: function () {
4357
4653
  var scroller = this;
@@ -4492,9 +4788,14 @@
4492
4788
 
4493
4789
  /**
4494
4790
  * Get normalized (0-1) cursor position over the scrollbar
4495
- * @param {Event} normalizedEvent - normalized event, with chartX and chartY
4496
- * values
4497
- * @return {Object} Local position {chartX, chartY}
4791
+ *
4792
+ * @function Highcharts.Scrollbar#cursorToScrollbarPosition
4793
+ *
4794
+ * @param {*} normalizedEvent
4795
+ * normalized event, with chartX and chartY values
4796
+ *
4797
+ * @return {*}
4798
+ * Local position {chartX, chartY}
4498
4799
  */
4499
4800
  cursorToScrollbarPosition: function (normalizedEvent) {
4500
4801
  var scroller = this,
@@ -4513,6 +4814,14 @@
4513
4814
 
4514
4815
  /**
4515
4816
  * Update position option in the Scrollbar, with normalized 0-1 scale
4817
+ *
4818
+ * @function Highcharts.Scrollbar#updatePosition
4819
+ *
4820
+ * @param {number} from
4821
+ *
4822
+ * @param {number} to
4823
+ *
4824
+ * @return {void}
4516
4825
  */
4517
4826
  updatePosition: function (from, to) {
4518
4827
  if (to > 1) {
@@ -4531,6 +4840,12 @@
4531
4840
 
4532
4841
  /**
4533
4842
  * Update the scrollbar with new options
4843
+ *
4844
+ * @function Highcharts.Scrollbar#update
4845
+ *
4846
+ * @param {Highcharts.ScrollbarOptions} options
4847
+ *
4848
+ * @return {void}
4534
4849
  */
4535
4850
  update: function (options) {
4536
4851
  this.destroy();
@@ -4543,6 +4858,10 @@
4543
4858
 
4544
4859
  /**
4545
4860
  * Set up the mouse and touch events for the Scrollbar
4861
+ *
4862
+ * @function Highcharts.Scrollbar#addEvents
4863
+ *
4864
+ * @return {void}
4546
4865
  */
4547
4866
  addEvents: function () {
4548
4867
  var buttonsOrder = this.options.inverted ? [1, 0] : [0, 1],
@@ -4582,6 +4901,10 @@
4582
4901
 
4583
4902
  /**
4584
4903
  * Removes the event handlers attached previously with addEvents.
4904
+ *
4905
+ * @function Highcharts.Scrollbar#removeEvents
4906
+ *
4907
+ * @return {void}
4585
4908
  */
4586
4909
  removeEvents: function () {
4587
4910
  each(this._events, function (args) {
@@ -4592,6 +4915,10 @@
4592
4915
 
4593
4916
  /**
4594
4917
  * Destroys allocated elements.
4918
+ *
4919
+ * @function Highcharts.Scrollbar#destroy
4920
+ *
4921
+ * @return {void}
4595
4922
  */
4596
4923
  destroy: function () {
4597
4924
 
@@ -4627,14 +4954,17 @@
4627
4954
  }
4628
4955
  };
4629
4956
 
4630
- /**
4631
- * Wrap axis initialization and create scrollbar if enabled:
4632
- */
4633
- wrap(Axis.prototype, 'init', function (proceed) {
4957
+ /*
4958
+ * Wrap axis initialization and create scrollbar if enabled:
4959
+ */
4960
+ addEvent(Axis, 'afterInit', function () {
4634
4961
  var axis = this;
4635
- proceed.apply(axis, Array.prototype.slice.call(arguments, 1));
4636
4962
 
4637
- if (axis.options.scrollbar && axis.options.scrollbar.enabled) {
4963
+ if (
4964
+ axis.options &&
4965
+ axis.options.scrollbar &&
4966
+ axis.options.scrollbar.enabled
4967
+ ) {
4638
4968
  // Predefined options:
4639
4969
  axis.options.scrollbar.vertical = !axis.horiz;
4640
4970
  axis.options.startOnTick = axis.options.endOnTick = false;
@@ -4678,10 +5008,10 @@
4678
5008
  }
4679
5009
  });
4680
5010
 
4681
- /**
4682
- * Wrap rendering axis, and update scrollbar if one is created:
4683
- */
4684
- wrap(Axis.prototype, 'render', function (proceed) {
5011
+ /*
5012
+ * Wrap rendering axis, and update scrollbar if one is created:
5013
+ */
5014
+ addEvent(Axis, 'afterRender', function () {
4685
5015
  var axis = this,
4686
5016
  scrollMin = Math.min(
4687
5017
  pick(axis.options.min, axis.min),
@@ -4699,8 +5029,6 @@
4699
5029
  from,
4700
5030
  to;
4701
5031
 
4702
- proceed.apply(axis, Array.prototype.slice.call(arguments, 1));
4703
-
4704
5032
  if (scrollbar) {
4705
5033
 
4706
5034
  if (axis.horiz) {
@@ -4759,16 +5087,14 @@
4759
5087
  }
4760
5088
  });
4761
5089
 
4762
- /**
4763
- * Make space for a scrollbar
4764
- */
4765
- wrap(Axis.prototype, 'getOffset', function (proceed) {
5090
+ /*
5091
+ * Make space for a scrollbar
5092
+ */
5093
+ addEvent(Axis, 'afterGetOffset', function () {
4766
5094
  var axis = this,
4767
5095
  index = axis.horiz ? 2 : 1,
4768
5096
  scrollbar = axis.scrollbar;
4769
5097
 
4770
- proceed.apply(axis, Array.prototype.slice.call(arguments, 1));
4771
-
4772
5098
  if (scrollbar) {
4773
5099
  axis.chart.scrollbarsOffsets = [0, 0]; // reset scrollbars offsets
4774
5100
  axis.chart.axisOffset[index] +=
@@ -4776,58 +5102,17 @@
4776
5102
  }
4777
5103
  });
4778
5104
 
4779
- /**
4780
- * Destroy scrollbar when connected to the specific axis
4781
- */
4782
- wrap(Axis.prototype, 'destroy', function (proceed) {
4783
- if (this.scrollbar) {
4784
- this.scrollbar = this.scrollbar.destroy();
4785
- }
4786
-
4787
- proceed.apply(this, Array.prototype.slice.call(arguments, 1));
4788
- });
4789
-
4790
5105
  H.Scrollbar = Scrollbar;
4791
5106
 
4792
5107
  }(Highcharts));
4793
5108
  (function (H) {
4794
5109
  /**
4795
- * (c) 2010-2017 Torstein Honsi
5110
+ * (c) 2010-2018 Torstein Honsi
4796
5111
  *
4797
5112
  * License: www.highcharts.com/license
4798
5113
  */
4799
5114
 
4800
5115
 
4801
- /**
4802
- * Options for the corresponding navigator series if `showInNavigator`
4803
- * is `true` for this series. Available options are the same as any
4804
- * series, documented at [plotOptions](#plotOptions.series) and
4805
- * [series](#series).
4806
- *
4807
- *
4808
- * These options are merged with options in [navigator.series](
4809
- * #navigator.series), and will take precedence if the same option is defined
4810
- * both places.
4811
- *
4812
- * @type {Object}
4813
- * @see [navigator.series](#navigator.series)
4814
- * @default undefined
4815
- * @since 5.0.0
4816
- * @product highstock
4817
- * @apioption plotOptions.series.navigatorOptions
4818
- */
4819
-
4820
- /**
4821
- * Whether or not to show the series in the navigator. Takes precedence
4822
- * over [navigator.baseSeries](#navigator.baseSeries) if defined.
4823
- *
4824
- * @type {Boolean}
4825
- * @default undefined
4826
- * @since 5.0.0
4827
- * @product highstock
4828
- * @apioption plotOptions.series.showInNavigator
4829
- */
4830
-
4831
5116
  var addEvent = H.addEvent,
4832
5117
  Axis = H.Axis,
4833
5118
  Chart = H.Chart,
@@ -4886,24 +5171,85 @@
4886
5171
  * @optionparent navigator
4887
5172
  */
4888
5173
  navigator: {
5174
+
5175
+ /**
5176
+ * Whether the navigator and scrollbar should adapt to updated data
5177
+ * in the base X axis. When loading data async, as in the demo below,
5178
+ * this should be `false`. Otherwise new data will trigger navigator
5179
+ * redraw, which will cause unwanted looping. In the demo below, the
5180
+ * data in the navigator is set only once. On navigating, only the main
5181
+ * chart content is updated.
5182
+ *
5183
+ * @sample {highstock} stock/demo/lazy-loading/
5184
+ * Set to false with async data loading
5185
+ *
5186
+ * @type {boolean}
5187
+ * @default true
5188
+ * @product highstock
5189
+ * @apioption navigator.adaptToUpdatedData
5190
+ */
5191
+
5192
+ /**
5193
+ * An integer identifying the index to use for the base series, or a
5194
+ * string representing the id of the series.
5195
+ *
5196
+ * **Note**: As of Highcharts 5.0, this is now a deprecated option.
5197
+ * Prefer [series.showInNavigator](#plotOptions.series.showInNavigator).
5198
+ *
5199
+ * @see [series.showInNavigator](#plotOptions.series.showInNavigator)
5200
+ *
5201
+ * @deprecated
5202
+ * @type {*}
5203
+ * @default 0
5204
+ * @product highstock
5205
+ * @apioption navigator.baseSeries
5206
+ */
5207
+
5208
+ /**
5209
+ * Enable or disable the navigator.
5210
+ *
5211
+ * @sample {highstock} stock/navigator/enabled/ Disable the navigator
5212
+ *
5213
+ * @type {boolean}
5214
+ * @default true
5215
+ * @product highstock
5216
+ * @apioption navigator.enabled
5217
+ */
5218
+
5219
+ /**
5220
+ * When the chart is inverted, whether to draw the navigator on the
5221
+ * opposite side.
5222
+ *
5223
+ * @type {boolean}
5224
+ * @default false
5225
+ * @since 5.0.8
5226
+ * @product highstock
5227
+ * @apioption navigator.opposite
5228
+ */
5229
+
4889
5230
  /**
4890
5231
  * The height of the navigator.
4891
5232
  *
4892
- * @type {Number}
4893
- * @sample {highstock} stock/navigator/height/ A higher navigator
4894
- * @default 40
4895
- * @product highstock
5233
+ * @sample {highstock} stock/navigator/height/
5234
+ * A higher navigator
5235
+ *
5236
+ * @type {number}
5237
+ * @default 40
5238
+ * @product highstock
5239
+ * @apioption navigator.height
4896
5240
  */
4897
5241
  height: 40,
4898
5242
 
4899
5243
  /**
4900
5244
  * The distance from the nearest element, the X axis or X axis labels.
4901
5245
  *
4902
- * @type {Number}
4903
5246
  * @sample {highstock} stock/navigator/margin/
4904
5247
  * A margin of 2 draws the navigator closer to the X axis labels
4905
- * @default 25
4906
- * @product highstock
5248
+ *
5249
+ * @type {number}
5250
+ * @default 25
5251
+ * @product highstock
5252
+ * @apioption navigator.margin
4907
5253
  */
4908
5254
  margin: 25,
4909
5255
 
@@ -4911,44 +5257,53 @@
4911
5257
  * Whether the mask should be inside the range marking the zoomed
4912
5258
  * range, or outside. In Highstock 1.x it was always `false`.
4913
5259
  *
4914
- * @type {Boolean}
4915
5260
  * @sample {highstock} stock/navigator/maskinside-false/
4916
5261
  * False, mask outside
4917
- * @default true
4918
- * @since 2.0
4919
- * @product highstock
5262
+ *
5263
+ * @type {boolean}
5264
+ * @default true
5265
+ * @since 2.0
5266
+ * @product highstock
5267
+ * @apioption navigator.maskInside
4920
5268
  */
4921
5269
  maskInside: true,
4922
5270
 
4923
5271
  /**
4924
5272
  * Options for the handles for dragging the zoomed area.
4925
5273
  *
4926
- * @type {Object}
4927
- * @sample {highstock} stock/navigator/handles/ Colored handles
4928
- * @product highstock
5274
+ * @sample {highstock} stock/navigator/handles/
5275
+ * Colored handles
5276
+ *
5277
+ * @type {*}
5278
+ * @product highstock
5279
+ * @apioption navigator.handles
4929
5280
  */
4930
5281
  handles: {
4931
5282
  /**
4932
5283
  * Width for handles.
4933
5284
  *
4934
- * @type {Number}
4935
- * @default 7
4936
- * @product highstock
4937
5285
  * @sample {highstock} stock/navigator/styled-handles/
4938
5286
  * Styled handles
4939
- * @since 6.0.0
5287
+ *
5288
+ * @type {number}
5289
+ * @default 7
5290
+ * @since 6.0.0
5291
+ * @product highstock
5292
+ * @apioption navigator.handles.width
4940
5293
  */
4941
5294
  width: 7,
4942
5295
 
4943
5296
  /**
4944
5297
  * Height for handles.
4945
5298
  *
4946
- * @type {Number}
4947
- * @default 15
4948
- * @product highstock
4949
5299
  * @sample {highstock} stock/navigator/styled-handles/
4950
5300
  * Styled handles
4951
- * @since 6.0.0
5301
+ *
5302
+ * @type {number}
5303
+ * @default 15
5304
+ * @since 6.0.0
5305
+ * @product highstock
5306
+ * @apioption navigator.handles.height
4952
5307
  */
4953
5308
  height: 15,
4954
5309
 
@@ -4965,22 +5320,25 @@
4965
5320
  * `Highcharts.SVGRenderer.prototype.symbols`. The callback is then
4966
5321
  * used by its method name, as shown in the demo.
4967
5322
  *
4968
- * @type {Array}
4969
- * @default ['navigator-handle', 'navigator-handle']
4970
- * @product highstock
4971
5323
  * @sample {highstock} stock/navigator/styled-handles/
4972
5324
  * Styled handles
4973
- * @since 6.0.0
5325
+ *
5326
+ * @type {Array<string>}
5327
+ * @default ['navigator-handle', 'navigator-handle']
5328
+ * @since 6.0.0
5329
+ * @product highstock
5330
+ * @apioption navigator.handles.symbols
4974
5331
  */
4975
5332
  symbols: ['navigator-handle', 'navigator-handle'],
4976
5333
 
4977
5334
  /**
4978
5335
  * Allows to enable/disable handles.
4979
5336
  *
4980
- * @type {Boolean}
4981
- * @default true
4982
- * @product highstock
4983
- * @since 6.0.0
5337
+ * @type {boolean}
5338
+ * @default true
5339
+ * @since 6.0.0
5340
+ * @product highstock
5341
+ * @apioption navigator.handles.enabled
4984
5342
  */
4985
5343
  enabled: true,
4986
5344
 
@@ -4988,28 +5346,32 @@
4988
5346
  /**
4989
5347
  * The width for the handle border and the stripes inside.
4990
5348
  *
4991
- * @type {Number}
4992
- * @default 7
4993
- * @product highstock
4994
5349
  * @sample {highstock} stock/navigator/styled-handles/
4995
5350
  * Styled handles
4996
- * @since 6.0.0
5351
+ *
5352
+ * @type {number}
5353
+ * @default 7
5354
+ * @since 6.0.0
5355
+ * @product highstock
5356
+ * @apioption navigator.handles.lineWidth
4997
5357
  */
4998
5358
  lineWidth: 1,
4999
5359
 
5000
5360
  /**
5001
5361
  * The fill for the handle.
5002
5362
  *
5003
- * @type {Color}
5004
- * @product highstock
5363
+ * @type {Highcharts.ColorString}
5364
+ * @product highstock
5365
+ * @apioption navigator.handles.backgroundColor
5005
5366
  */
5006
5367
  backgroundColor: '#f2f2f2',
5007
5368
 
5008
5369
  /**
5009
5370
  * The stroke for the handle border and the stripes inside.
5010
5371
  *
5011
- * @type {Color}
5012
- * @product highstock
5372
+ * @type {Highcharts.ColorString}
5373
+ * @product highstock
5374
+ * @apioption navigator.handles.borderColor
5013
5375
  */
5014
5376
  borderColor: '#999999'
5015
5377
 
@@ -5023,14 +5385,17 @@
5023
5385
  * that are currently not visible in the main series. The default
5024
5386
  * color is bluish with an opacity of 0.3 to see the series below.
5025
5387
  *
5026
- * @type {Color}
5027
- * @see In styled mode, the mask is styled with the
5028
- * `.highcharts-navigator-mask` and
5029
- * `.highcharts-navigator-mask-inside` classes.
5030
- * @sample {highstock} stock/navigator/maskfill/
5031
- * Blue, semi transparent mask
5032
- * @default rgba(102,133,194,0.3)
5033
- * @product highstock
5388
+ * @see In styled mode, the mask is styled with the
5389
+ * `.highcharts-navigator-mask` and
5390
+ * `.highcharts-navigator-mask-inside` classes.
5391
+ *
5392
+ * @sample {highstock} stock/navigator/maskfill/
5393
+ * Blue, semi transparent mask
5394
+ *
5395
+ * @type {Highcharts.ColorString}
5396
+ * @default rgba(102,133,194,0.3)
5397
+ * @product highstock
5398
+ * @apioption navigator.maskFill
5034
5399
  */
5035
5400
  maskFill: color('#6685c2').setOpacity(0.3).get(),
5036
5401
 
@@ -5038,10 +5403,13 @@
5038
5403
  * The color of the line marking the currently zoomed area in the
5039
5404
  * navigator.
5040
5405
  *
5041
- * @type {Color}
5042
- * @sample {highstock} stock/navigator/outline/ 2px blue outline
5043
- * @default #cccccc
5044
- * @product highstock
5406
+ * @sample {highstock} stock/navigator/outline/
5407
+ * 2px blue outline
5408
+ *
5409
+ * @type {Highcharts.ColorString}
5410
+ * @default #cccccc
5411
+ * @product highstock
5412
+ * @apioption navigator.outlineColor
5045
5413
  */
5046
5414
  outlineColor: '#cccccc',
5047
5415
 
@@ -5049,12 +5417,16 @@
5049
5417
  * The width of the line marking the currently zoomed area in the
5050
5418
  * navigator.
5051
5419
  *
5052
- * @type {Number}
5053
5420
  * @see In styled mode, the outline stroke width is set with the
5054
- * `.highcharts-navigator-outline` class.
5055
- * @sample {highstock} stock/navigator/outline/ 2px blue outline
5056
- * @default 2
5057
- * @product highstock
5421
+ * `.highcharts-navigator-outline` class.
5422
+ *
5423
+ * @sample {highstock} stock/navigator/outline/
5424
+ * 2px blue outline
5425
+ *
5426
+ * @type {number}
5427
+ * @default 2
5428
+ * @product highstock
5429
+ * @apioption navigator.outlineWidth
5058
5430
  */
5059
5431
  outlineWidth: 1,
5060
5432
 
@@ -5081,14 +5453,17 @@
5081
5453
  * }
5082
5454
  * }</pre>
5083
5455
  *
5084
- * @type {Object}
5085
5456
  * @see In styled mode, the navigator series is styled with the
5086
5457
  * `.highcharts-navigator-series` class.
5458
+ *
5087
5459
  * @sample {highstock} stock/navigator/series-data/
5088
5460
  * Using a separate data set for the navigator
5089
5461
  * @sample {highstock} stock/navigator/series/
5090
5462
  * A green navigator series
5091
- * @product highstock
5463
+ *
5464
+ * @type {*}
5465
+ * @product highstock
5466
+ * @apioption navigator.series
5092
5467
  */
5093
5468
  series: {
5094
5469
 
@@ -5096,7 +5471,9 @@
5096
5471
  * The type of the navigator series. Defaults to `areaspline` if
5097
5472
  * defined, otherwise `line`.
5098
5473
  *
5099
- * @type {String}
5474
+ * @type {string}
5475
+ * @default areaspline
5476
+ * @apioption navigator.series.type
5100
5477
  */
5101
5478
  type: defaultSeriesType,
5102
5479
 
@@ -5104,11 +5481,19 @@
5104
5481
 
5105
5482
  /**
5106
5483
  * The fill opacity of the navigator series.
5484
+ *
5485
+ * @type {number}
5486
+ * @default 0.05
5487
+ * @apioption navigator.series.fillOpacity
5107
5488
  */
5108
5489
  fillOpacity: 0.05,
5109
5490
 
5110
5491
  /**
5111
5492
  * The pixel line width of the navigator series.
5493
+ *
5494
+ * @type {number}
5495
+ * @default 1
5496
+ * @apioption navigator.series.lineWidth
5112
5497
  */
5113
5498
  lineWidth: 1,
5114
5499
 
@@ -5121,7 +5506,9 @@
5121
5506
  /**
5122
5507
  * Data grouping options for the navigator series.
5123
5508
  *
5124
- * @extends {plotOptions.series.dataGrouping}
5509
+ * @type {*}
5510
+ * @extends plotOptions.series.dataGrouping
5511
+ * @apioption navigator.series.dataGrouping
5125
5512
  */
5126
5513
  dataGrouping: {
5127
5514
  approximation: 'average',
@@ -5135,7 +5522,9 @@
5135
5522
  * Data label options for the navigator series. Data labels are
5136
5523
  * disabled by default on the navigator series.
5137
5524
  *
5138
- * @extends {plotOptions.series.dataLabels}
5525
+ * @type {*}
5526
+ * @extends plotOptions.series.dataLabels
5527
+ * @apioption navigator.series.dataLabels
5139
5528
  */
5140
5529
  dataLabels: {
5141
5530
  enabled: false,
@@ -5149,7 +5538,9 @@
5149
5538
  * Line color for the navigator series. Allows setting the color
5150
5539
  * while disallowing the default candlestick setting.
5151
5540
  *
5152
- * @type {Color}
5541
+ * @type {Highcharts.ColorString|null}
5542
+ * @default null
5543
+ * @apioption navigator.series.lineColor
5153
5544
  */
5154
5545
  lineColor: null, // #4602
5155
5546
 
@@ -5161,7 +5552,10 @@
5161
5552
  /**
5162
5553
  * The threshold option. Setting it to 0 will make the default
5163
5554
  * navigator area series draw its area from the 0 value and up.
5164
- * @type {Number}
5555
+ *
5556
+ * @type {number|null}
5557
+ * @default null
5558
+ * @apioption navigator.series.threshold
5165
5559
  */
5166
5560
  threshold: null
5167
5561
  },
@@ -5185,11 +5579,12 @@
5185
5579
  * }
5186
5580
  * }</pre>
5187
5581
  *
5188
- * @type {Object}
5189
- * @extends {xAxis}
5190
- * @excluding linkedTo,maxZoom,minRange,opposite,range,scrollbar,
5191
- * showEmpty,maxRange
5192
- * @product highstock
5582
+ * @type {*}
5583
+ * @extends xAxis
5584
+ * @excluding linkedTo,maxZoom,minRange,opposite,range,scrollbar,
5585
+ * showEmpty,maxRange
5586
+ * @product highstock
5587
+ * @apioption navigator.xAxis
5193
5588
  */
5194
5589
  xAxis: {
5195
5590
  /**
@@ -5197,11 +5592,11 @@
5197
5592
  * xAxis.maxPadding, but value is set in milliseconds.
5198
5593
  * Can be set for both, main xAxis and navigator's xAxis.
5199
5594
  *
5200
- * @type {Number}
5201
- * @default 0
5202
- * @since 6.0.0
5203
- * @product highstock
5204
- * @apioption xAxis.overscroll
5595
+ * @type {number}
5596
+ * @default 0
5597
+ * @since 6.0.0
5598
+ * @product highstock
5599
+ * @apioption navigator.xAxis.overscroll
5205
5600
  */
5206
5601
  overscroll: 0,
5207
5602
 
@@ -5251,11 +5646,12 @@
5251
5646
  * tickWidth: 0
5252
5647
  * }</pre>
5253
5648
  *
5254
- * @type {Object}
5255
- * @extends {yAxis}
5256
- * @excluding height,linkedTo,maxZoom,minRange,ordinal,range,showEmpty,
5257
- * scrollbar,top,units,maxRange,minLength,maxLength,resize
5258
- * @product highstock
5649
+ * @type {*}
5650
+ * @extends yAxis
5651
+ * @excluding height,linkedTo,maxZoom,minRange,ordinal,range,showEmpty,
5652
+ * scrollbar,top,units,maxRange,minLength,maxLength,resize
5653
+ * @product highstock
5654
+ * @apioption navigator.yAxis
5259
5655
  */
5260
5656
  yAxis: {
5261
5657
 
@@ -5284,8 +5680,14 @@
5284
5680
 
5285
5681
  /**
5286
5682
  * Draw one of the handles on the side of the zoomed range in the navigator
5287
- * @param {Boolean} inverted flag for chart.inverted
5288
- * @returns {Array} Path to be used in a handle
5683
+ *
5684
+ * @function Highcharts.Renderer#symbols.navigator-handle
5685
+ *
5686
+ * @param {boolean} inverted
5687
+ * flag for chart.inverted
5688
+ *
5689
+ * @return {Array<number|string>}
5690
+ * Path to be used in a handle
5289
5691
  */
5290
5692
  H.Renderer.prototype.symbols['navigator-handle'] = function (
5291
5693
  x,
@@ -5322,8 +5724,11 @@
5322
5724
 
5323
5725
  /**
5324
5726
  * The Navigator class
5325
- * @param {Object} chart - Chart object
5326
- * @class
5727
+ *
5728
+ * @class Highcharts.Navigator
5729
+ *
5730
+ * @param {Highcharts.Chart} chart
5731
+ * Chart object
5327
5732
  */
5328
5733
  function Navigator(chart) {
5329
5734
  this.init(chart);
@@ -5332,10 +5737,20 @@
5332
5737
  Navigator.prototype = {
5333
5738
  /**
5334
5739
  * Draw one of the handles on the side of the zoomed range in the navigator
5335
- * @param {Number} x The x center for the handle
5336
- * @param {Number} index 0 for left and 1 for right
5337
- * @param {Boolean} inverted flag for chart.inverted
5338
- * @param {String} verb use 'animate' or 'attr'
5740
+ *
5741
+ * @function Highcharts.Navigator#drawHandle
5742
+ *
5743
+ * @param {number} x
5744
+ * The x center for the handle
5745
+ *
5746
+ * @param {number} index
5747
+ * 0 for left and 1 for right
5748
+ * @param {boolean} inverted
5749
+ * flag for chart.inverted
5750
+ * @param {string} verb
5751
+ * use 'animate' or 'attr'
5752
+ *
5753
+ * @return {void}
5339
5754
  */
5340
5755
  drawHandle: function (x, index, inverted, verb) {
5341
5756
  var navigator = this,
@@ -5357,10 +5772,22 @@
5357
5772
 
5358
5773
  /**
5359
5774
  * Render outline around the zoomed range
5360
- * @param {Number} zoomedMin in pixels position where zoomed range starts
5361
- * @param {Number} zoomedMax in pixels position where zoomed range ends
5362
- * @param {Boolean} inverted flag if chart is inverted
5363
- * @param {String} verb use 'animate' or 'attr'
5775
+ *
5776
+ * @function Highcharts.Navigator#drawOutline
5777
+ *
5778
+ * @param {number} zoomedMin
5779
+ * in pixels position where zoomed range starts
5780
+ *
5781
+ * @param {number} zoomedMax
5782
+ * in pixels position where zoomed range ends
5783
+ *
5784
+ * @param {boolean} inverted
5785
+ * flag if chart is inverted
5786
+ *
5787
+ * @param {string} verb
5788
+ * use 'animate' or 'attr'
5789
+ *
5790
+ * @return {void}
5364
5791
  */
5365
5792
  drawOutline: function (zoomedMin, zoomedMax, inverted, verb) {
5366
5793
  var navigator = this,
@@ -5448,10 +5875,22 @@
5448
5875
 
5449
5876
  /**
5450
5877
  * Render outline around the zoomed range
5451
- * @param {Number} zoomedMin in pixels position where zoomed range starts
5452
- * @param {Number} zoomedMax in pixels position where zoomed range ends
5453
- * @param {Boolean} inverted flag if chart is inverted
5454
- * @param {String} verb use 'animate' or 'attr'
5878
+ *
5879
+ * @function Highcharts.Navigator#drawMasks
5880
+ *
5881
+ * @param {number} zoomedMin
5882
+ * in pixels position where zoomed range starts
5883
+ *
5884
+ * @param {number} zoomedMax
5885
+ * in pixels position where zoomed range ends
5886
+ *
5887
+ * @param {boolean} inverted
5888
+ * flag if chart is inverted
5889
+ *
5890
+ * @param {string} verb
5891
+ * use 'animate' or 'attr'
5892
+ *
5893
+ * @return {void}
5455
5894
  */
5456
5895
  drawMasks: function (zoomedMin, zoomedMax, inverted, verb) {
5457
5896
  var navigator = this,
@@ -5500,6 +5939,10 @@
5500
5939
  * - all shades
5501
5940
  * - outline
5502
5941
  * - handles
5942
+ *
5943
+ * @function Highcharts.Navigator#renderElements
5944
+ *
5945
+ * @return {void}
5503
5946
  */
5504
5947
  renderElements: function () {
5505
5948
  var navigator = this,
@@ -5587,7 +6030,13 @@
5587
6030
 
5588
6031
  /**
5589
6032
  * Update navigator
5590
- * @param {Object} options Options to merge in when updating navigator
6033
+ *
6034
+ * @function Highcharts.Navigator#update
6035
+ *
6036
+ * @param {Highcharts.NavigatorOptions} options
6037
+ * Options to merge in when updating navigator
6038
+ *
6039
+ * @return {void}
5591
6040
  */
5592
6041
  update: function (options) {
5593
6042
  // Remove references to old navigator series in base series
@@ -5605,10 +6054,22 @@
5605
6054
 
5606
6055
  /**
5607
6056
  * Render the navigator
5608
- * @param {Number} min X axis value minimum
5609
- * @param {Number} max X axis value maximum
5610
- * @param {Number} pxMin Pixel value minimum
5611
- * @param {Number} pxMax Pixel value maximum
6057
+ *
6058
+ * @function Highcharts.Navigator#render
6059
+ *
6060
+ * @param {number} min
6061
+ * X axis value minimum
6062
+ *
6063
+ * @param {number} max
6064
+ * X axis value maximum
6065
+ *
6066
+ * @param {number} pxMin
6067
+ * Pixel value minimum
6068
+ *
6069
+ * @param {number} pxMax
6070
+ * Pixel value maximum
6071
+ *
6072
+ * @return {void}
5612
6073
  */
5613
6074
  render: function (min, max, pxMin, pxMax) {
5614
6075
 
@@ -5768,8 +6229,8 @@
5768
6229
  navigator.scrollbar.setRange(
5769
6230
  // Use real value, not rounded because range can be very small
5770
6231
  // (#1716)
5771
- navigator.zoomedMin / navigatorSize,
5772
- navigator.zoomedMax / navigatorSize
6232
+ navigator.zoomedMin / (navigatorSize || 1),
6233
+ navigator.zoomedMax / (navigatorSize || 1)
5773
6234
  );
5774
6235
  }
5775
6236
  navigator.rendered = true;
@@ -5777,6 +6238,10 @@
5777
6238
 
5778
6239
  /**
5779
6240
  * Set up the mouse and touch events for the navigator
6241
+ *
6242
+ * @function Highcharts.Navigator#addMouseEvents
6243
+ *
6244
+ * @return {void}
5780
6245
  */
5781
6246
  addMouseEvents: function () {
5782
6247
  var navigator = this,
@@ -5834,8 +6299,14 @@
5834
6299
 
5835
6300
  /**
5836
6301
  * Generate events for handles and masks
5837
- * @param {String} eventName Event name handler, 'mousedown' or 'touchstart'
5838
- * @returns {Array} An array of arrays: [DOMElement, eventName, callback].
6302
+ *
6303
+ * @function Highcharts.Navigator#getPartsEvents
6304
+ *
6305
+ * @param {string} eventName
6306
+ * Event name handler, 'mousedown' or 'touchstart'
6307
+ *
6308
+ * @return {Array<*>}
6309
+ * An array of arrays: [DOMElement, eventName, callback].
5839
6310
  */
5840
6311
  getPartsEvents: function (eventName) {
5841
6312
  var navigator = this,
@@ -5861,8 +6332,15 @@
5861
6332
  * - will be stored for future drag&drop
5862
6333
  * - will directly shift to a new range
5863
6334
  *
5864
- * @param {Object} e Mouse event
5865
- * @param {Number} index Index of a mask in Navigator.shades array
6335
+ * @function Highcharts.Navigator#shadesMousedown
6336
+ *
6337
+ * @param {*} e
6338
+ * Mouse event
6339
+ *
6340
+ * @param {number} index
6341
+ * Index of a mask in Navigator.shades array
6342
+ *
6343
+ * @return {void}
5866
6344
  */
5867
6345
  shadesMousedown: function (e, index) {
5868
6346
  e = this.chart.pointer.normalize(e);
@@ -5898,7 +6376,7 @@
5898
6376
  left = Math.max(0, left);
5899
6377
  } else if (index === 2 && left + range >= navigatorSize) {
5900
6378
  left = navigatorSize - range;
5901
- if (xAxis.reversed) {
6379
+ if (navigator.reversedExtremes) {
5902
6380
  // #7713
5903
6381
  left -= range;
5904
6382
  fixedMin = navigator.getUnionExtremes().dataMin;
@@ -5933,8 +6411,15 @@
5933
6411
  * Mousedown on a handle mask.
5934
6412
  * Will store necessary information for drag&drop.
5935
6413
  *
5936
- * @param {Object} e Mouse event
5937
- * @param {Number} index Index of a handle in Navigator.handles array
6414
+ * @function Highcharts.Navigator#handlesMousedown
6415
+ *
6416
+ * @param {*} e
6417
+ * Mouse event
6418
+ *
6419
+ * @param {number} index
6420
+ * Index of a handle in Navigator.handles array
6421
+ *
6422
+ * @return {void}
5938
6423
  */
5939
6424
  handlesMousedown: function (e, index) {
5940
6425
  e = this.chart.pointer.normalize(e);
@@ -5942,10 +6427,9 @@
5942
6427
  var navigator = this,
5943
6428
  chart = navigator.chart,
5944
6429
  baseXAxis = chart.xAxis[0],
5945
- // For reversed axes, min and max are chagned,
6430
+ // For reversed axes, min and max are changed,
5946
6431
  // so the other extreme should be stored
5947
- reverse = (chart.inverted && !baseXAxis.reversed) ||
5948
- (!chart.inverted && baseXAxis.reversed);
6432
+ reverse = navigator.reversedExtremes;
5949
6433
 
5950
6434
  if (index === 0) {
5951
6435
  // Grab the left handle
@@ -5963,7 +6447,13 @@
5963
6447
  },
5964
6448
  /**
5965
6449
  * Mouse move event based on x/y mouse position.
5966
- * @param {Object} e Mouse event
6450
+ *
6451
+ * @function Highcharts.Navigator#onMouseMove
6452
+ *
6453
+ * @param {*} e
6454
+ * Mouse event
6455
+ *
6456
+ * @return {void}
5967
6457
  */
5968
6458
  onMouseMove: function (e) {
5969
6459
  var navigator = this,
@@ -6028,7 +6518,13 @@
6028
6518
  if (
6029
6519
  navigator.hasDragged &&
6030
6520
  navigator.scrollbar &&
6031
- navigator.scrollbar.options.liveRedraw
6521
+ pick(
6522
+ navigator.scrollbar.options.liveRedraw,
6523
+
6524
+ // By default, don't run live redraw on VML, on touch
6525
+ // devices or if the chart is in boost.
6526
+ H.svg && !isTouchDevice && !this.chart.isBoosting
6527
+ )
6032
6528
  ) {
6033
6529
  e.DOMType = e.type; // DOMType is for IE8
6034
6530
  setTimeout(function () {
@@ -6040,13 +6536,18 @@
6040
6536
 
6041
6537
  /**
6042
6538
  * Mouse up event based on x/y mouse position.
6043
- * @param {Object} e Mouse event
6539
+ *
6540
+ * @function Highcharts.Navigator#onMouseUp
6541
+ *
6542
+ * @param {*} e
6543
+ * Mouse event
6544
+ *
6545
+ * @return {void}
6044
6546
  */
6045
6547
  onMouseUp: function (e) {
6046
6548
  var navigator = this,
6047
6549
  chart = navigator.chart,
6048
6550
  xAxis = navigator.xAxis,
6049
- reversed = xAxis && xAxis.reversed,
6050
6551
  scrollbar = navigator.scrollbar,
6051
6552
  unionExtremes,
6052
6553
  fixedMin,
@@ -6071,13 +6572,13 @@
6071
6572
  }
6072
6573
  // Snap to right edge (#4076)
6073
6574
  if (navigator.zoomedMax === navigator.size) {
6074
- fixedMax = reversed ?
6575
+ fixedMax = navigator.reversedExtremes ?
6075
6576
  unionExtremes.dataMin : unionExtremes.dataMax;
6076
6577
  }
6077
6578
 
6078
6579
  // Snap to left edge (#7576)
6079
6580
  if (navigator.zoomedMin === 0) {
6080
- fixedMin = reversed ?
6581
+ fixedMin = navigator.reversedExtremes ?
6081
6582
  unionExtremes.dataMax : unionExtremes.dataMin;
6082
6583
  }
6083
6584
 
@@ -6115,6 +6616,10 @@
6115
6616
 
6116
6617
  /**
6117
6618
  * Removes the event handlers attached previously with addEvents.
6619
+ *
6620
+ * @function Highcharts.Navigator#removeEvents
6621
+ *
6622
+ * @return {void}
6118
6623
  */
6119
6624
  removeEvents: function () {
6120
6625
  if (this.eventsToUnbind) {
@@ -6128,6 +6633,10 @@
6128
6633
 
6129
6634
  /**
6130
6635
  * Remove data events.
6636
+ *
6637
+ * @function Highcharts.Navigator#removeBaseSeriesEvents
6638
+ *
6639
+ * @return {void}
6131
6640
  */
6132
6641
  removeBaseSeriesEvents: function () {
6133
6642
  var baseSeries = this.baseSeries || [];
@@ -6151,6 +6660,12 @@
6151
6660
 
6152
6661
  /**
6153
6662
  * Initiate the Navigator object
6663
+ *
6664
+ * @function Highcharts.Navigator#init
6665
+ *
6666
+ * @param {Highcharts.Chart} chart
6667
+ *
6668
+ * @return {void}
6154
6669
  */
6155
6670
  init: function (chart) {
6156
6671
  var chartOptions = chart.options,
@@ -6187,22 +6702,6 @@
6187
6702
  baseXaxis = baseSeries && baseSeries[0] && baseSeries[0].xAxis ||
6188
6703
  chart.xAxis[0] || { options: {} };
6189
6704
 
6190
-
6191
- // Make room for the navigator, can be placed around the chart:
6192
- addEvent(chart, 'getMargins', function () {
6193
- var marginName = navigator.opposite ? 'plotTop' : 'marginBottom';
6194
- if (chart.inverted) {
6195
- marginName = navigator.opposite ? 'marginRight' : 'plotLeft';
6196
- }
6197
-
6198
- chart[marginName] = (chart[marginName] || 0) + (
6199
- navigatorEnabled || !chart.inverted ?
6200
- navigator.outlineHeight :
6201
- 0
6202
- ) + navigatorOptions.margin;
6203
-
6204
- });
6205
-
6206
6705
  chart.isDirtyBox = true;
6207
6706
 
6208
6707
  if (navigator.navigatorEnabled) {
@@ -6217,6 +6716,7 @@
6217
6716
  isX: true,
6218
6717
  type: 'datetime',
6219
6718
  index: xAxisIndex,
6719
+ isInternal: true,
6220
6720
  offset: 0,
6221
6721
  keepOrdinalPadding: true, // #2436
6222
6722
  startOnTick: false,
@@ -6237,6 +6737,7 @@
6237
6737
  alignTicks: false,
6238
6738
  offset: 0,
6239
6739
  index: yAxisIndex,
6740
+ isInternal: true,
6240
6741
  zoomEnabled: false
6241
6742
  }, chart.inverted ? {
6242
6743
  width: height
@@ -6264,6 +6765,12 @@
6264
6765
  );
6265
6766
  }
6266
6767
 
6768
+ navigator.reversedExtremes = (
6769
+ chart.inverted && !navigator.xAxis.reversed
6770
+ ) || (
6771
+ !chart.inverted && navigator.xAxis.reversed
6772
+ );
6773
+
6267
6774
  // Render items, so we can bind events to them:
6268
6775
  navigator.renderElements();
6269
6776
  // Add mouse events
@@ -6342,7 +6849,13 @@
6342
6849
  /**
6343
6850
  * Get the union data extremes of the chart - the outer data extremes of the
6344
6851
  * base X axis and the navigator axis.
6345
- * @param {boolean} returnFalseOnNoBaseSeries - as the param says.
6852
+ *
6853
+ * @function Highcharts.Navigator#getUnionExtremes
6854
+ *
6855
+ * @param {boolean} returnFalseOnNoBaseSeries
6856
+ * as the param says.
6857
+ *
6858
+ * @return {*}
6346
6859
  */
6347
6860
  getUnionExtremes: function (returnFalseOnNoBaseSeries) {
6348
6861
  var baseAxis = this.chart.xAxis[0],
@@ -6382,10 +6895,16 @@
6382
6895
  * Set the base series and update the navigator series from this. With a bit
6383
6896
  * of modification we should be able to make this an API method to be called
6384
6897
  * from the outside
6385
- * @param {Object} baseSeriesOptions
6898
+ *
6899
+ * @function Highcharts.Navigator#setBaseSeries
6900
+ *
6901
+ * @param {*} baseSeriesOptions
6386
6902
  * Additional series options for a navigator
6387
- * @param {Boolean} [redraw]
6903
+ *
6904
+ * @param {boolean} [redraw]
6388
6905
  * Whether to redraw after update.
6906
+ *
6907
+ * @return {void}
6389
6908
  */
6390
6909
  setBaseSeries: function (baseSeriesOptions, redraw) {
6391
6910
  var chart = this.chart,
@@ -6422,9 +6941,17 @@
6422
6941
  }
6423
6942
  },
6424
6943
 
6425
- /*
6944
+ /**
6426
6945
  * Update series in the navigator from baseSeries, adding new if does not
6427
6946
  * exist.
6947
+ *
6948
+ * @function Highcharts.Navigator.updateNavigatorSeries
6949
+ *
6950
+ * @param {boolean} addEvents
6951
+ *
6952
+ * @param {boolean} redraw
6953
+ *
6954
+ * @return {void}
6428
6955
  */
6429
6956
  updateNavigatorSeries: function (addEvents, redraw) {
6430
6957
  var navigator = this,
@@ -6461,8 +6988,11 @@
6461
6988
  );
6462
6989
  delete base.navigatorSeries;
6463
6990
  }
6464
- // Kill the nav series
6465
- navSeries.destroy();
6991
+ // Kill the nav series. It may already have been
6992
+ // destroyed (#8715).
6993
+ if (navSeries.chart) {
6994
+ navSeries.destroy();
6995
+ }
6466
6996
  return false;
6467
6997
  }
6468
6998
  return true;
@@ -6578,6 +7108,10 @@
6578
7108
  /**
6579
7109
  * Add data events.
6580
7110
  * For example when main series is updated we need to recalculate extremes
7111
+ *
7112
+ * @function Highcharts.Navigator#addBaseSeriesEvent
7113
+ *
7114
+ * @return {void}
6581
7115
  */
6582
7116
  addBaseSeriesEvents: function () {
6583
7117
  var navigator = this,
@@ -6629,10 +7163,32 @@
6629
7163
  }, this);
6630
7164
  },
6631
7165
 
7166
+ /**
7167
+ * Get minimum from all base series connected to the navigator
7168
+ *
7169
+ * @param {number} currentSeriesMin
7170
+ * Minium from the current series
7171
+ *
7172
+ * @return {number} Minimum from all series
7173
+ */
7174
+ getBaseSeriesMin: function (currentSeriesMin) {
7175
+ return H.reduce(
7176
+ this.baseSeries,
7177
+ function (min, series) {
7178
+ return Math.min(min, series.xData[0]);
7179
+ },
7180
+ currentSeriesMin
7181
+ );
7182
+ },
7183
+
6632
7184
  /**
6633
7185
  * Set the navigator x axis extremes to reflect the total. The navigator
6634
7186
  * extremes should always be the extremes of the union of all series in the
6635
7187
  * chart as well as the navigator series.
7188
+ *
7189
+ * @function Highcharts.Navigator#modifyNavigatorAxisExtremes
7190
+ *
7191
+ * @return {void}
6636
7192
  */
6637
7193
  modifyNavigatorAxisExtremes: function () {
6638
7194
  var xAxis = this.xAxis,
@@ -6655,6 +7211,10 @@
6655
7211
 
6656
7212
  /**
6657
7213
  * Hook to modify the base axis extremes with information from the Navigator
7214
+ *
7215
+ * @function Highcharts.Navigator#modifyBaseAxisExtremes
7216
+ *
7217
+ * @return {void}
6658
7218
  */
6659
7219
  modifyBaseAxisExtremes: function () {
6660
7220
  var baseXAxis = this,
@@ -6697,8 +7257,11 @@
6697
7257
  if (!stickToMin) {
6698
7258
  newMin = Math.max(
6699
7259
  newMax - range,
6700
- navigatorSeries && navigatorSeries.xData ?
6701
- navigatorSeries.xData[0] : -Number.MAX_VALUE
7260
+ navigator.getBaseSeriesMin(
7261
+ navigatorSeries && navigatorSeries.xData ?
7262
+ navigatorSeries.xData[0] :
7263
+ -Number.MAX_VALUE
7264
+ )
6702
7265
  );
6703
7266
  }
6704
7267
  }
@@ -6720,15 +7283,20 @@
6720
7283
  * Handler for updated data on the base series. When data is modified, the
6721
7284
  * navigator series must reflect it. This is called from the Chart.redraw
6722
7285
  * function before axis and series extremes are computed.
7286
+ *
7287
+ * @function Highcharts.Navigator#updateDataHandler
7288
+ *
7289
+ * @return {void}
6723
7290
  */
6724
7291
  updatedDataHandler: function () {
6725
7292
  var navigator = this.chart.navigator,
6726
7293
  baseSeries = this,
6727
- navigatorSeries = this.navigatorSeries;
7294
+ navigatorSeries = this.navigatorSeries,
7295
+ xDataMin = navigator.getBaseSeriesMin(baseSeries.xData[0]);
6728
7296
 
6729
7297
  // If the scrollbar is scrolled all the way to the right, keep right as
6730
7298
  // new data comes in.
6731
- navigator.stickToMax = navigator.xAxis.reversed ?
7299
+ navigator.stickToMax = navigator.reversedExtremes ?
6732
7300
  Math.round(navigator.zoomedMin) === 0 :
6733
7301
  Math.round(navigator.zoomedMax) >= Math.round(navigator.size);
6734
7302
 
@@ -6736,7 +7304,7 @@
6736
7304
  // maximum. If the current axis minimum falls outside the new updated
6737
7305
  // dataset, we must adjust.
6738
7306
  navigator.stickToMin = isNumber(baseSeries.xAxis.min) &&
6739
- (baseSeries.xAxis.min <= baseSeries.xData[0]) &&
7307
+ (baseSeries.xAxis.min <= xDataMin) &&
6740
7308
  (!this.chart.fixedRange || !navigator.stickToMax);
6741
7309
 
6742
7310
  // Set the navigator series data to the new data of the base series
@@ -6753,27 +7321,66 @@
6753
7321
 
6754
7322
  /**
6755
7323
  * Add chart events, like redrawing navigator, when chart requires that.
7324
+ *
7325
+ * @function Highcharts.Navigator#addChartEvents
7326
+ *
7327
+ * @return {void}
6756
7328
  */
6757
7329
  addChartEvents: function () {
6758
- addEvent(this.chart, 'redraw', function () {
7330
+ if (!this.eventsToUnbind) {
7331
+ this.eventsToUnbind = [];
7332
+ }
7333
+
7334
+ this.eventsToUnbind.push(
6759
7335
  // Move the scrollbar after redraw, like after data updata even if
6760
7336
  // axes don't redraw
6761
- var navigator = this.navigator,
6762
- xAxis = navigator && (
6763
- navigator.baseSeries &&
6764
- navigator.baseSeries[0] &&
6765
- navigator.baseSeries[0].xAxis ||
6766
- navigator.scrollbar && this.xAxis[0]
6767
- ); // #5709
6768
-
6769
- if (xAxis) {
6770
- navigator.render(xAxis.min, xAxis.max);
6771
- }
6772
- });
7337
+ addEvent(
7338
+ this.chart,
7339
+ 'redraw',
7340
+ function () {
7341
+ var navigator = this.navigator,
7342
+ xAxis = navigator && (
7343
+ navigator.baseSeries &&
7344
+ navigator.baseSeries[0] &&
7345
+ navigator.baseSeries[0].xAxis ||
7346
+ navigator.scrollbar && this.xAxis[0]
7347
+ ); // #5709
7348
+
7349
+ if (xAxis) {
7350
+ navigator.render(xAxis.min, xAxis.max);
7351
+ }
7352
+ }
7353
+ ),
7354
+ // Make room for the navigator, can be placed around the chart:
7355
+ addEvent(
7356
+ this.chart,
7357
+ 'getMargins',
7358
+ function () {
7359
+ var chart = this,
7360
+ navigator = chart.navigator,
7361
+ marginName = navigator.opposite ?
7362
+ 'plotTop' : 'marginBottom';
7363
+ if (chart.inverted) {
7364
+ marginName = navigator.opposite ?
7365
+ 'marginRight' : 'plotLeft';
7366
+ }
7367
+
7368
+ chart[marginName] = (chart[marginName] || 0) + (
7369
+ navigator.navigatorEnabled || !chart.inverted ?
7370
+ navigator.outlineHeight :
7371
+ 0
7372
+ ) + navigator.navigatorOptions.margin;
7373
+ }
7374
+ )
7375
+ );
6773
7376
  },
6774
7377
 
6775
7378
  /**
6776
7379
  * Destroys allocated elements.
7380
+ *
7381
+ * @function Highcharts.Navigator#destroy
7382
+ *
7383
+ * @return {void}
6777
7384
  */
6778
7385
  destroy: function () {
6779
7386
 
@@ -7022,7 +7629,7 @@
7022
7629
  }(Highcharts));
7023
7630
  (function (H) {
7024
7631
  /**
7025
- * (c) 2010-2017 Torstein Honsi
7632
+ * (c) 2010-2018 Torstein Honsi
7026
7633
  *
7027
7634
  * License: www.highcharts.com/license
7028
7635
  */
@@ -7060,20 +7667,201 @@
7060
7667
  * @optionparent rangeSelector
7061
7668
  */
7062
7669
  rangeSelector: {
7063
- // allButtonsEnabled: false,
7064
- // enabled: true,
7065
- // buttons: {Object}
7066
- // buttonSpacing: 0,
7670
+
7671
+ /**
7672
+ * Whether to enable all buttons from the start. By default buttons are
7673
+ * only enabled if the corresponding time range exists on the X axis,
7674
+ * but enabling all buttons allows for dynamically loading different
7675
+ * time ranges.
7676
+ *
7677
+ * @sample {highstock} stock/rangeselector/allbuttonsenabled-true/
7678
+ * All buttons enabled
7679
+ *
7680
+ * @type {boolean}
7681
+ * @default false
7682
+ * @since 2.0.3
7683
+ * @product highstock
7684
+ * @apioption rangeSelector.allButtonsEnabled
7685
+ */
7686
+
7687
+ /**
7688
+ * An array of configuration objects for the buttons.
7689
+ *
7690
+ * Defaults to
7691
+ *
7692
+ * <pre>buttons: [{
7693
+ * type: 'month',
7694
+ * count: 1,
7695
+ * text: '1m'
7696
+ * }, {
7697
+ * type: 'month',
7698
+ * count: 3,
7699
+ * text: '3m'
7700
+ * }, {
7701
+ * type: 'month',
7702
+ * count: 6,
7703
+ * text: '6m'
7704
+ * }, {
7705
+ * type: 'ytd',
7706
+ * text: 'YTD'
7707
+ * }, {
7708
+ * type: 'year',
7709
+ * count: 1,
7710
+ * text: '1y'
7711
+ * }, {
7712
+ * type: 'all',
7713
+ * text: 'All'
7714
+ * }]</pre>
7715
+ *
7716
+ * @sample {highstock} stock/rangeselector/datagrouping/
7717
+ * Data grouping by buttons
7718
+ *
7719
+ * @type {Array<*>}
7720
+ * @product highstock
7721
+ * @apioption rangeSelector.buttons
7722
+ */
7723
+
7724
+ /**
7725
+ * How many units of the defined type the button should span. If `type`
7726
+ * is "month" and `count` is 3, the button spans three months.
7727
+ *
7728
+ * @type {number}
7729
+ * @default 1
7730
+ * @product highstock
7731
+ * @apioption rangeSelector.buttons.count
7732
+ */
7733
+
7734
+ /**
7735
+ * Fires when clicking on the rangeSelector button. One parameter,
7736
+ * event, is passed to the function, containing common event
7737
+ * information.
7738
+ *
7739
+ * <pre>
7740
+ * click: function(e) {
7741
+ * console.log(this);
7742
+ * }
7743
+ * </pre>
7744
+ *
7745
+ * Return false to stop default button's click action.
7746
+ *
7747
+ * @sample {highstock} stock/rangeselector/button-click/
7748
+ * Click event on the button
7749
+ *
7750
+ * @type {Function}
7751
+ * @product highstock
7752
+ * @apioption rangeSelector.buttons.events.click
7753
+ */
7754
+
7755
+ /**
7756
+ * Additional range (in milliseconds) added to the end of the calculated
7757
+ * time span.
7758
+ *
7759
+ * @sample {highstock} stock/rangeselector/min-max-offsets/
7760
+ * Button offsets
7761
+ *
7762
+ * @type {number}
7763
+ * @default 0
7764
+ * @since 6.0.0
7765
+ * @product highstock
7766
+ * @apioption rangeSelector.buttons.offsetMax
7767
+ */
7768
+
7769
+ /**
7770
+ * Additional range (in milliseconds) added to the start of the
7771
+ * calculated time span.
7772
+ *
7773
+ * @sample {highstock} stock/rangeselector/min-max-offsets/
7774
+ * Button offsets
7775
+ *
7776
+ * @type {number}
7777
+ * @default 0
7778
+ * @since 6.0.0
7779
+ * @product highstock
7780
+ * @apioption rangeSelector.buttons.offsetMin
7781
+ */
7782
+
7783
+ /**
7784
+ * When buttons apply dataGrouping on a series, by default zooming
7785
+ * in/out will deselect buttons and unset dataGrouping. Enable this
7786
+ * option to keep buttons selected when extremes change.
7787
+ *
7788
+ * @sample {highstock} stock/rangeselector/preserve-datagrouping/
7789
+ * Different preserveDataGrouping settings
7790
+ *
7791
+ * @type {boolean}
7792
+ * @since 6.1.2
7793
+ * @default false
7794
+ * @product highstock
7795
+ * @apioption rangeSelector.buttons.preserveDataGrouping
7796
+ */
7797
+
7798
+ /**
7799
+ * A custom data grouping object for each button.
7800
+ *
7801
+ * @see [series.dataGrouping](#plotOptions.series.dataGrouping)
7802
+ *
7803
+ * @sample {highstock} stock/rangeselector/datagrouping/
7804
+ * Data grouping by range selector buttons
7805
+ *
7806
+ * @type {*}
7807
+ * @extends plotOptions.series.dataGrouping
7808
+ * @product highstock
7809
+ * @apioption rangeSelector.buttons.dataGrouping
7810
+ */
7811
+
7812
+ /**
7813
+ * The text for the button itself.
7814
+ *
7815
+ * @type {string}
7816
+ * @product highstock
7817
+ * @apioption rangeSelector.buttons.text
7818
+ */
7819
+
7820
+ /**
7821
+ * Defined the time span for the button. Can be one of `millisecond`,
7822
+ * `second`, `minute`, `hour`, `day`, `week`, `month`, `ytd`, `all`.
7823
+ *
7824
+ * @type {string}
7825
+ * @product highstock
7826
+ * @validvalue ["millisecond", "second", "minute", "day", "week", "month", "ytd", "all"]
7827
+ * @apioption rangeSelector.buttons.type
7828
+ */
7829
+
7830
+ /**
7831
+ * The space in pixels between the buttons in the range selector.
7832
+ *
7833
+ * @type {number}
7834
+ * @default 0
7835
+ * @product highstock
7836
+ * @apioption rangeSelector.buttonSpacing
7837
+ */
7838
+
7839
+ /**
7840
+ * Enable or disable the range selector.
7841
+ *
7842
+ * @sample {highstock} stock/rangeselector/enabled/
7843
+ * Disable the range selector
7844
+ *
7845
+ * @type {boolean}
7846
+ * @default true
7847
+ * @product highstock
7848
+ * @apioption rangeSelector.enabled
7849
+ */
7067
7850
 
7068
7851
  /**
7069
7852
  * The vertical alignment of the rangeselector box. Allowed properties
7070
7853
  * are `top`, `middle`, `bottom`.
7071
7854
  *
7072
- * @since 6.0.0
7073
- * @validvalue ["top", "middle", "bottom"]
7074
- * @sample {highstock} stock/rangeselector/vertical-align-middle/ Middle
7855
+ * @sample {highstock} stock/rangeselector/vertical-align-middle/
7856
+ * Middle
7857
+ * @sample {highstock} stock/rangeselector/vertical-align-bottom/
7858
+ * Bottom
7075
7859
  *
7076
- * @sample {highstock} stock/rangeselector/vertical-align-bottom/ Bottom
7860
+ * @type {string}
7861
+ * @default top
7862
+ * @since 6.0.0
7863
+ * @validvalue ["top", "middle", "bottom"]
7864
+ * @apioption rangeSelector.verticalAlign
7077
7865
  */
7078
7866
  verticalAlign: 'top',
7079
7867
 
@@ -7092,13 +7880,17 @@
7092
7880
  * `.highcharts-range-selector-buttons .highcharts-button` rule with its
7093
7881
  * different states.
7094
7882
  *
7095
- * @type {Object}
7096
7883
  * @sample {highstock} stock/rangeselector/styling/
7097
7884
  * Styling the buttons and inputs
7098
- * @product highstock
7885
+ *
7886
+ * @type {Highcharts.CSSObject}
7887
+ * @product highstock
7888
+ * @apioption rangeSelector.buttonTheme
7099
7889
  */
7100
7890
  buttonTheme: {
7891
+
7101
7892
  'stroke-width': 0,
7893
+
7102
7894
  width: 28,
7103
7895
  height: 18,
7104
7896
  padding: 2,
@@ -7112,8 +7904,12 @@
7112
7904
  * @sample {highstock} stock/rangeselector/floating/
7113
7905
  * Placing the range selector between the plot area and the
7114
7906
  * navigator
7115
- * @since 6.0.0
7116
- * @product highstock
7907
+ *
7908
+ * @type {boolean}
7909
+ * @default false
7910
+ * @since 6.0.0
7911
+ * @product highstock
7912
+ * @apioption rangeSelector.floating
7117
7913
  */
7118
7914
  floating: false,
7119
7915
 
@@ -7121,8 +7917,11 @@
7121
7917
  * The x offset of the range selector relative to its horizontal
7122
7918
  * alignment within `chart.spacingLeft` and `chart.spacingRight`.
7123
7919
  *
7124
- * @since 6.0.0
7125
- * @product highstock
7920
+ * @type {number}
7921
+ * @default 0
7922
+ * @since 6.0.0
7923
+ * @product highstock
7924
+ * @apioption rangeSelector.x
7126
7925
  */
7127
7926
  x: 0,
7128
7927
 
@@ -7130,8 +7929,11 @@
7130
7929
  * The y offset of the range selector relative to its horizontal
7131
7930
  * alignment within `chart.spacingLeft` and `chart.spacingRight`.
7132
7931
  *
7133
- * @since 6.0.0
7134
- * @product highstock
7932
+ * @type {number}
7933
+ * @default 0
7934
+ * @since 6.0.0
7935
+ * @product highstock
7936
+ * @apioption rangeSelector.y
7135
7937
  */
7136
7938
  y: 0,
7137
7939
 
@@ -7139,69 +7941,232 @@
7139
7941
  * Deprecated. The height of the range selector. Currently it is
7140
7942
  * calculated dynamically.
7141
7943
  *
7142
- * @type {Number}
7143
- * @default undefined
7144
- * @since 2.1.9
7145
- * @product highstock
7146
- * @deprecated true
7944
+ * @deprecated
7945
+ * @type {number}
7946
+ * @default undefined
7947
+ * @since 2.1.9
7948
+ * @product highstock
7949
+ * @apioption rangeSelector.height
7147
7950
  */
7148
7951
  height: undefined, // reserved space for buttons and input
7149
7952
 
7953
+ /**
7954
+ * The border color of the date input boxes.
7955
+ *
7956
+ * @sample {highstock} stock/rangeselector/styling/
7957
+ * Styling the buttons and inputs
7958
+ *
7959
+ * @type {Highcharts.ColorString}
7960
+ * @default #cccccc
7961
+ * @since 1.3.7
7962
+ * @product highstock
7963
+ * @apioption rangeSelector.inputBoxBorderColor
7964
+ */
7965
+
7966
+ /**
7967
+ * The pixel height of the date input boxes.
7968
+ *
7969
+ * @sample {highstock} stock/rangeselector/styling/
7970
+ * Styling the buttons and inputs
7971
+ *
7972
+ * @type {number}
7973
+ * @default 17
7974
+ * @since 1.3.7
7975
+ * @product highstock
7976
+ * @apioption rangeSelector.inputBoxHeight
7977
+ */
7978
+
7979
+ /**
7980
+ * CSS for the container DIV holding the input boxes. Deprecated as
7981
+ * of 1.2.5\. Use [inputPosition](#rangeSelector.inputPosition) instead.
7982
+ *
7983
+ * @sample {highstock} stock/rangeselector/styling/
7984
+ * Styling the buttons and inputs
7985
+ *
7986
+ * @deprecated
7987
+ * @type {Highcharts.CSSObject}
7988
+ * @product highstock
7989
+ * @apioption rangeSelector.inputBoxStyle
7990
+ */
7991
+
7992
+ /**
7993
+ * The pixel width of the date input boxes.
7994
+ *
7995
+ * @sample {highstock} stock/rangeselector/styling/
7996
+ * Styling the buttons and inputs
7997
+ *
7998
+ * @type {number}
7999
+ * @default 90
8000
+ * @since 1.3.7
8001
+ * @product highstock
8002
+ * @apioption rangeSelector.inputBoxWidth
8003
+ */
8004
+
8005
+ /**
8006
+ * The date format in the input boxes when not selected for editing.
8007
+ * Defaults to `%b %e, %Y`.
8008
+ *
8009
+ * @sample {highstock} stock/rangeselector/input-format/
8010
+ * Milliseconds in the range selector
8011
+ *
8012
+ * @type {string}
8013
+ * @default %b %e %Y,
8014
+ * @product highstock
8015
+ * @apioption rangeSelector.inputDateFormat
8016
+ */
8017
+
8018
+ /**
8019
+ * A custom callback function to parse values entered in the input boxes
8020
+ * and return a valid JavaScript time as milliseconds since 1970.
8021
+ *
8022
+ * @sample {highstock} stock/rangeselector/input-format/
8023
+ * Milliseconds in the range selector
8024
+ *
8025
+ * @type {Function}
8026
+ * @since 1.3.3
8027
+ * @product highstock
8028
+ * @apioption rangeSelector.inputDateParser
8029
+ */
8030
+
8031
+ /**
8032
+ * The date format in the input boxes when they are selected for
8033
+ * editing. This must be a format that is recognized by JavaScript
8034
+ * Date.parse.
8035
+ *
8036
+ * @sample {highstock} stock/rangeselector/input-format/
8037
+ * Milliseconds in the range selector
8038
+ *
8039
+ * @type {string}
8040
+ * @default %Y-%m-%d
8041
+ * @product highstock
8042
+ * @apioption rangeSelector.inputEditDateFormat
8043
+ */
8044
+
8045
+ /**
8046
+ * Enable or disable the date input boxes. Defaults to enabled when
8047
+ * there is enough space, disabled if not (typically mobile).
8048
+ *
8049
+ * @sample {highstock} stock/rangeselector/input-datepicker/
8050
+ * Extending the input with a jQuery UI datepicker
8051
+ *
8052
+ * @type {boolean}
8053
+ * @default true
8054
+ * @product highstock
8055
+ * @apioption rangeSelector.inputEnabled
8056
+ */
8057
+
7150
8058
  /**
7151
8059
  * Positioning for the input boxes. Allowed properties are `align`,
7152
8060
  * `x` and `y`.
7153
8061
  *
7154
- * @type {Object}
7155
- * @default { align: "right" }
7156
- * @since 1.2.4
7157
- * @product highstock
8062
+ * @type {*}
8063
+ * @since 1.2.4
8064
+ * @product highstock
8065
+ * @apioption rangeSelector.inputPosition
7158
8066
  */
7159
8067
  inputPosition: {
7160
8068
  /**
7161
8069
  * The alignment of the input box. Allowed properties are `left`,
7162
8070
  * `center`, `right`.
7163
- * @validvalue ["left", "center", "right"]
7164
- * @sample {highstock} stock/rangeselector/input-button-position/
7165
- * Alignment
7166
- * @since 6.0.0
8071
+ *
8072
+ * @sample {highstock} stock/rangeselector/input-button-position/
8073
+ * Alignment
8074
+ *
8075
+ * @type {string}
8076
+ * @default right
8077
+ * @since 6.0.0
8078
+ * @validvalue ["left", "center", "right"]
8079
+ * @apioption rangeSelector.inputPosition.align
7167
8080
  */
7168
8081
  align: 'right',
8082
+
8083
+ /**
8084
+ * X offset of the input row.
8085
+ *
8086
+ * @type {number}
8087
+ * @default 0
8088
+ * @apioption rangeSelector.inputPosition.x
8089
+ */
7169
8090
  x: 0,
8091
+
8092
+ /**
8093
+ * Y offset of the input row.
8094
+ *
8095
+ * @type {number}
8096
+ * @default 0
8097
+ * @apioption rangeSelector.inputPosition.y
8098
+ */
7170
8099
  y: 0
7171
8100
  },
7172
8101
 
8102
+ /**
8103
+ * The index of the button to appear pre-selected.
8104
+ *
8105
+ * @type {number}
8106
+ * @product highstock
8107
+ * @apioption rangeSelector.selected
8108
+ */
8109
+
7173
8110
  /**
7174
8111
  * Positioning for the button row.
7175
8112
  *
7176
- * @since 1.2.4
7177
- * @product highstock
8113
+ * @type {*}
8114
+ * @since 1.2.4
8115
+ * @product highstock
8116
+ * @apioption rangeSelector.buttonPosition
7178
8117
  */
7179
8118
  buttonPosition: {
8119
+
7180
8120
  /**
7181
8121
  * The alignment of the input box. Allowed properties are `left`,
7182
8122
  * `center`, `right`.
7183
- *
7184
- * @validvalue ["left", "center", "right"]
7185
- * @sample {highstock} stock/rangeselector/input-button-position/
7186
- * Alignment
7187
- * @since 6.0.0
8123
+ *
8124
+ * @sample {highstock} stock/rangeselector/input-button-position/
8125
+ * Alignment
8126
+ *
8127
+ * @type {string}
8128
+ * @default left
8129
+ * @since 6.0.0
8130
+ * @validvalue ["left", "center", "right"]
8131
+ * @apioption rangeSelector.buttonPosition.align
7188
8132
  */
7189
8133
  align: 'left',
8134
+
7190
8135
  /**
7191
8136
  * X offset of the button row.
8137
+ *
8138
+ * @type {number}
8139
+ * @default 0
8140
+ * @apioption rangeSelector.buttonPosition.x
7192
8141
  */
7193
8142
  x: 0,
8143
+
7194
8144
  /**
7195
8145
  * Y offset of the button row.
8146
+ *
8147
+ * @type {number}
8148
+ * @default 0
8149
+ * @apioption rangeSelector.buttonPosition.y
7196
8150
  */
7197
8151
  y: 0
7198
8152
  },
7199
- // inputDateFormat: '%b %e, %Y',
7200
- // inputEditDateFormat: '%Y-%m-%d',
7201
- // inputEnabled: true,
7202
- // selected: undefined,
8153
+
7203
8154
 
7204
- // inputStyle: {},
8155
+
8156
+ /**
8157
+ * CSS for the HTML inputs in the range selector.
8158
+ *
8159
+ * In styled mode, the inputs are styled by the
8160
+ * `.highcharts-range-input text` rule in SVG mode, and
8161
+ * `input.highcharts-range-selector` when active.
8162
+ *
8163
+ * @sample {highstock} stock/rangeselector/styling/
8164
+ * Styling the buttons and inputs
8165
+ *
8166
+ * @type {Highcharts.CSSObject}
8167
+ * @product highstock
8168
+ * @apioption rangeSelector.inputStyle
8169
+ */
7205
8170
 
7206
8171
  /**
7207
8172
  * CSS styles for the labels - the Zoom, From and To texts.
@@ -7209,10 +8174,12 @@
7209
8174
  * In styled mode, the labels are styled by the
7210
8175
  * `.highcharts-range-label` class.
7211
8176
  *
7212
- * @type {CSSObject}
7213
8177
  * @sample {highstock} stock/rangeselector/styling/
7214
8178
  * Styling the buttons and inputs
7215
- * @product highstock
8179
+ *
8180
+ * @type {Highcharts.CSSObject}
8181
+ * @product highstock
8182
+ * @apioption rangeSelector.labelStyle
7216
8183
  */
7217
8184
  labelStyle: {
7218
8185
  color: '#666666'
@@ -7250,9 +8217,10 @@
7250
8217
  /**
7251
8218
  * The text for the label for the range selector buttons.
7252
8219
  *
7253
- * @type {String}
7254
- * @default Zoom
7255
- * @product highstock
8220
+ * @type {string}
8221
+ * @default Zoom
8222
+ * @product highstock
8223
+ * @apioption lang.rangeSelectorZoom
7256
8224
  */
7257
8225
  rangeSelectorZoom: 'Zoom',
7258
8226
 
@@ -7260,18 +8228,20 @@
7260
8228
  * The text for the label for the "from" input box in the range
7261
8229
  * selector.
7262
8230
  *
7263
- * @type {String}
7264
- * @default From
7265
- * @product highstock
8231
+ * @type {string}
8232
+ * @default From
8233
+ * @product highstock
8234
+ * @apioption lang.rangeSelectorFrom
7266
8235
  */
7267
8236
  rangeSelectorFrom: 'From',
7268
8237
 
7269
8238
  /**
7270
8239
  * The text for the label for the "to" input box in the range selector.
7271
8240
  *
7272
- * @type {String}
7273
- * @default To
7274
- * @product highstock
8241
+ * @type {string}
8242
+ * @default To
8243
+ * @product highstock
8244
+ * @apioption lang.rangeSelectorTo
7275
8245
  */
7276
8246
  rangeSelectorTo: 'To'
7277
8247
  }
@@ -7279,8 +8249,10 @@
7279
8249
 
7280
8250
  /**
7281
8251
  * The range selector.
7282
- * @class
7283
- * @param {Object} chart
8252
+ *
8253
+ * @class Highcharts.RangeSelector
8254
+ *
8255
+ * @param {Highcharts.Chart} chart
7284
8256
  */
7285
8257
  function RangeSelector(chart) {
7286
8258
 
@@ -7292,9 +8264,15 @@
7292
8264
  /**
7293
8265
  * The method to run when one of the buttons in the range selectors is
7294
8266
  * clicked
7295
- * @param {Number} i The index of the button
7296
- * @param {Object} rangeOptions
7297
- * @param {Boolean} redraw
8267
+ *
8268
+ * @function Highcharts.RangeSelector#clickButton
8269
+ *
8270
+ * @param {number} i
8271
+ * The index of the button
8272
+ *
8273
+ * @param {boolean} redraw
8274
+ *
8275
+ * @return {void}
7298
8276
  */
7299
8277
  clickButton: function (i, redraw) {
7300
8278
  var rangeSelector = this,
@@ -7336,6 +8314,8 @@
7336
8314
  dataGrouping,
7337
8315
  false
7338
8316
  );
8317
+
8318
+ this.frozenStates = rangeOptions.preserveDataGrouping;
7339
8319
  }
7340
8320
 
7341
8321
  // Apply range
@@ -7442,6 +8422,12 @@
7442
8422
  /**
7443
8423
  * Set the selected option. This method only sets the internal flag, it
7444
8424
  * doesn't update the buttons or the actual zoomed range.
8425
+ *
8426
+ * @function Highcharts.RangeSelector#setSelected
8427
+ *
8428
+ * @param {boolean} selected
8429
+ *
8430
+ * @return {void}
7445
8431
  */
7446
8432
  setSelected: function (selected) {
7447
8433
  this.selected = this.options.selected = selected;
@@ -7476,6 +8462,12 @@
7476
8462
 
7477
8463
  /**
7478
8464
  * Initialize the range selector
8465
+ *
8466
+ * @function Highcharts.RangeSelector#init
8467
+ *
8468
+ * @param {Highcharts.Chart} chart
8469
+ *
8470
+ * @return {void}
7479
8471
  */
7480
8472
  init: function (chart) {
7481
8473
  var rangeSelector = this,
@@ -7524,7 +8516,8 @@
7524
8516
  this.max - this.min !== chart.fixedRange &&
7525
8517
  e.trigger !== 'rangeSelectorButton' &&
7526
8518
  e.trigger !== 'updatedData' &&
7527
- rangeSelector.forcedDataGrouping
8519
+ rangeSelector.forcedDataGrouping &&
8520
+ !rangeSelector.frozenStates
7528
8521
  ) {
7529
8522
  this.setDataGrouping(false, false);
7530
8523
  }
@@ -7536,6 +8529,10 @@
7536
8529
  /**
7537
8530
  * Dynamically update the range selector buttons after a new range has been
7538
8531
  * set
8532
+ *
8533
+ * @function Highcharts.RangeSelector#updateButtonStates
8534
+ *
8535
+ * @return {void}
7539
8536
  */
7540
8537
  updateButtonStates: function () {
7541
8538
  var rangeSelector = this,
@@ -7623,7 +8620,8 @@
7623
8620
  );
7624
8621
  select = (
7625
8622
  (isSelected && isSameRange) ||
7626
- (isSameRange && !selectedExists && !isYTDButNotSelected)
8623
+ (isSameRange && !selectedExists && !isYTDButNotSelected) ||
8624
+ (isSelected && rangeSelector.frozenStates)
7627
8625
  );
7628
8626
 
7629
8627
  if (disable) {
@@ -7642,6 +8640,12 @@
7642
8640
 
7643
8641
  /**
7644
8642
  * Compute and cache the range for an individual button
8643
+ *
8644
+ * @function Highcharts.RangeSelector#computeButtonRange
8645
+ *
8646
+ * @param {Highcharts.RangeSelectorOptions} rangeOptions
8647
+ *
8648
+ * @return {void}
7645
8649
  */
7646
8650
  computeButtonRange: function (rangeOptions) {
7647
8651
  var type = rangeOptions.type,
@@ -7674,8 +8678,14 @@
7674
8678
 
7675
8679
  /**
7676
8680
  * Set the internal and displayed value of a HTML input for the dates
7677
- * @param {String} name
7678
- * @param {Number} inputTime
8681
+ *
8682
+ * @function Highcharts.RangeSelector#setInputValue
8683
+ *
8684
+ * @param {string} name
8685
+ *
8686
+ * @param {number} inputTime
8687
+ *
8688
+ * @return {void}
7679
8689
  */
7680
8690
  setInputValue: function (name, inputTime) {
7681
8691
  var options = this.chart.options.rangeSelector,
@@ -7699,6 +8709,13 @@
7699
8709
  });
7700
8710
  },
7701
8711
 
8712
+ /**
8713
+ * @function Highcharts.RangeSelector#showInput
8714
+ *
8715
+ * @param {string} name
8716
+ *
8717
+ * @return {void}
8718
+ */
7702
8719
  showInput: function (name) {
7703
8720
  var inputGroup = this.inputGroup,
7704
8721
  dateBox = this[name + 'DateBox'];
@@ -7712,6 +8729,13 @@
7712
8729
  });
7713
8730
  },
7714
8731
 
8732
+ /**
8733
+ * @function Highcharts.RangeSelector#hideInput
8734
+ *
8735
+ * @param {string} name
8736
+ *
8737
+ * @return {void}
8738
+ */
7715
8739
  hideInput: function (name) {
7716
8740
  css(this[name + 'Input'], {
7717
8741
  border: 0,
@@ -7723,7 +8747,12 @@
7723
8747
 
7724
8748
  /**
7725
8749
  * Draw either the 'from' or the 'to' HTML input box of the range selector
7726
- * @param {Object} name
8750
+ *
8751
+ * @function Highcharts.RangeSelector#drawInput
8752
+ *
8753
+ * @param {string} name
8754
+ *
8755
+ * @return {void}
7727
8756
  */
7728
8757
  drawInput: function (name) {
7729
8758
  var rangeSelector = this,
@@ -7820,10 +8849,12 @@
7820
8849
  padding: 2,
7821
8850
  width: options.inputBoxWidth || 90,
7822
8851
  height: options.inputBoxHeight || 17,
8852
+ 'text-align': 'center',
8853
+
7823
8854
  stroke:
7824
8855
  options.inputBoxBorderColor || '#cccccc',
7825
- 'stroke-width': 1,
7826
- 'text-align': 'center'
8856
+ 'stroke-width': 1
8857
+
7827
8858
  })
7828
8859
  .on('click', function () {
7829
8860
  // If it is already focused, the onfocus event doesn't fire
@@ -7889,6 +8920,10 @@
7889
8920
  /**
7890
8921
  * Get the position of the range selector buttons and inputs. This can be
7891
8922
  * overridden from outside for custom positioning.
8923
+ *
8924
+ * @function Highcharts.RangeSelector#getPosition
8925
+ *
8926
+ * @return {Highcharts.Dictionary<number>}
7892
8927
  */
7893
8928
  getPosition: function () {
7894
8929
  var chart = this.chart,
@@ -7903,13 +8938,18 @@
7903
8938
  };
7904
8939
  },
7905
8940
  /**
7906
- * Get the extremes of YTD.
7907
- * Will choose dataMax if its value is lower than the current timestamp.
7908
- * Will choose dataMin if its value is higher than the timestamp for
7909
- * the start of current year.
8941
+ * Get the extremes of YTD. Will choose dataMax if its value is lower than
8942
+ * the current timestamp. Will choose dataMin if its value is higher than
8943
+ * the timestamp for the start of current year.
8944
+ *
8945
+ * @function Highcharts.RangeSelector#getYTDExtremes
8946
+ *
7910
8947
  * @param {number} dataMax
8948
+ *
7911
8949
  * @param {number} dataMin
7912
- * @return {object} Returns min and max for the YTD
8950
+ *
8951
+ * @return {*}
8952
+ * Returns min and max for the YTD
7913
8953
  */
7914
8954
  getYTDExtremes: function (dataMax, dataMin, useUTC) {
7915
8955
  var time = this.chart.time,
@@ -7931,8 +8971,16 @@
7931
8971
  * Render the range selector including the buttons and the inputs. The first
7932
8972
  * time render is called, the elements are created and positioned. On
7933
8973
  * subsequent calls, they are moved and updated.
7934
- * @param {Number} min X axis minimum
7935
- * @param {Number} max X axis maximum
8974
+ *
8975
+ * @function Highcharts.RangeSelector#render
8976
+ *
8977
+ * @param {number} min
8978
+ * X axis minimum
8979
+ *
8980
+ * @param {number} max
8981
+ * X axis maximum
8982
+ *
8983
+ * @return {void}
7936
8984
  */
7937
8985
  render: function (min, max) {
7938
8986
 
@@ -7950,6 +8998,12 @@
7950
8998
  lang = defaultOptions.lang,
7951
8999
  div = rangeSelector.div,
7952
9000
  options = chartOptions.rangeSelector,
9001
+ // Place inputs above the container
9002
+ inputsZIndex = pick(
9003
+ chartOptions.chart.style &&
9004
+ chartOptions.chart.style.zIndex,
9005
+ 0
9006
+ ) + 1,
7953
9007
  floating = options.floating,
7954
9008
  buttons = rangeSelector.buttons,
7955
9009
  inputGroup = rangeSelector.inputGroup,
@@ -7970,6 +9024,7 @@
7970
9024
  buttonPositionY = buttonPosition.y,
7971
9025
  inputPositionY = inputPosition.y,
7972
9026
  animate = rendered || false,
9027
+ verb = animate ? 'animate' : 'attr',
7973
9028
  exportingX = 0,
7974
9029
  alignTranslateY,
7975
9030
  legendHeight,
@@ -7995,20 +9050,17 @@
7995
9050
 
7996
9051
  rangeSelector.zoomText = renderer.text(
7997
9052
  lang.rangeSelectorZoom,
7998
- pick(plotLeft + buttonPosition.x, plotLeft), 15
9053
+ 0,
9054
+ 15
7999
9055
  )
8000
9056
  .css(options.labelStyle)
8001
9057
  .add(buttonGroup);
8002
9058
 
8003
- // button start position
8004
- buttonLeft = pick(plotLeft + buttonPosition.x, plotLeft) +
8005
- rangeSelector.zoomText.getBBox().width + 5;
8006
-
8007
9059
  each(rangeSelector.buttonOptions, function (rangeOptions, i) {
8008
9060
 
8009
9061
  buttons[i] = renderer.button(
8010
9062
  rangeOptions.text,
8011
- buttonLeft,
9063
+ 0,
8012
9064
  0,
8013
9065
  function () {
8014
9066
 
@@ -8039,9 +9091,6 @@
8039
9091
  'text-align': 'center'
8040
9092
  })
8041
9093
  .add(buttonGroup);
8042
-
8043
- // increase button position for the next button
8044
- buttonLeft += buttons[i].width + pick(options.buttonSpacing, 5);
8045
9094
  });
8046
9095
 
8047
9096
  // first create a wrapper outside the container in order to make
@@ -8050,7 +9099,7 @@
8050
9099
  rangeSelector.div = div = createElement('div', null, {
8051
9100
  position: 'relative',
8052
9101
  height: 0,
8053
- zIndex: 1 // above container
9102
+ zIndex: inputsZIndex
8054
9103
  });
8055
9104
 
8056
9105
  container.parentNode.insertBefore(div, container);
@@ -8065,6 +9114,22 @@
8065
9114
  }
8066
9115
  }
8067
9116
 
9117
+ // #8769, allow dynamically updating margins
9118
+ rangeSelector.zoomText[verb]({
9119
+ x: pick(plotLeft + buttonPosition.x, plotLeft)
9120
+ });
9121
+ // button start position
9122
+ buttonLeft = pick(plotLeft + buttonPosition.x, plotLeft) +
9123
+ rangeSelector.zoomText.getBBox().width + 5;
9124
+ each(rangeSelector.buttonOptions, function (rangeOptions, i) {
9125
+
9126
+ buttons[i][verb]({ x: buttonLeft });
9127
+
9128
+ // increase button position for the next button
9129
+ buttonLeft += buttons[i].width + pick(options.buttonSpacing, 5);
9130
+ });
9131
+
9132
+
8068
9133
  plotLeft = chart.plotLeft - chart.spacing[3];
8069
9134
  rangeSelector.updateButtonStates();
8070
9135
 
@@ -8266,7 +9331,11 @@
8266
9331
 
8267
9332
  /**
8268
9333
  * Extracts height of range selector
8269
- * @return {Number} Returns rangeSelector height
9334
+ *
9335
+ * @function Highcharts.RangeSelector#getHeight
9336
+ *
9337
+ * @return {number}
9338
+ * Returns rangeSelector height
8270
9339
  */
8271
9340
  getHeight: function () {
8272
9341
  var rangeSelector = this,
@@ -8299,8 +9368,13 @@
8299
9368
 
8300
9369
  /**
8301
9370
  * Detect collision with title or subtitle
8302
- * @param {object} chart
8303
- * @return {Boolean} Returns collision status
9371
+ *
9372
+ * @function Highcharts.RangeSelector#titleCollision
9373
+ *
9374
+ * @param {Highcharts.Chart} chart
9375
+ *
9376
+ * @return {boolean}
9377
+ * Returns collision status
8304
9378
  */
8305
9379
  titleCollision: function (chart) {
8306
9380
  return !(chart.options.title.text || chart.options.subtitle.text);
@@ -8308,7 +9382,12 @@
8308
9382
 
8309
9383
  /**
8310
9384
  * Update the range selector with new options
8311
- * @param {object} options
9385
+ *
9386
+ * @function Highcharts.RangeSelector#update
9387
+ *
9388
+ * @param {Highcharts.RangeSelectorOptions} options
9389
+ *
9390
+ * @return {void}
8312
9391
  */
8313
9392
  update: function (options) {
8314
9393
  var chart = this.chart;
@@ -8321,6 +9400,10 @@
8321
9400
 
8322
9401
  /**
8323
9402
  * Destroys allocated elements.
9403
+ *
9404
+ * @function Highcharts.RangeSelector#destroy
9405
+ *
9406
+ * @return {void}
8324
9407
  */
8325
9408
  destroy: function () {
8326
9409
  var rSelector = this,
@@ -8360,6 +9443,18 @@
8360
9443
  /**
8361
9444
  * Add logic to normalize the zoomed range in order to preserve the pressed
8362
9445
  * state of range selector buttons
9446
+ *
9447
+ * @function Highcharts.Axis#toFixedRange
9448
+ *
9449
+ * @param {number} pxMin
9450
+ *
9451
+ * @param {number} pxMax
9452
+ *
9453
+ * @param {number} fixedMin
9454
+ *
9455
+ * @param {number} fixedMax
9456
+ *
9457
+ * @return {*}
8363
9458
  */
8364
9459
  Axis.prototype.toFixedRange = function (pxMin, pxMax, fixedMin, fixedMax) {
8365
9460
  var fixedRange = this.chart && this.chart.fixedRange,
@@ -8393,7 +9488,10 @@
8393
9488
  * selected range is a multiple of months or years, it is compensated for
8394
9489
  * various month lengths.
8395
9490
  *
8396
- * @return {number} The new minimum value.
9491
+ * @function Highcharts.Axis#minFromRange
9492
+ *
9493
+ * @return {number}
9494
+ * The new minimum value.
8397
9495
  */
8398
9496
  Axis.prototype.minFromRange = function () {
8399
9497
  var rangeOptions = this.range,
@@ -8490,20 +9588,32 @@
8490
9588
 
8491
9589
  var chart = this,
8492
9590
  options = e.options,
9591
+ optionsRangeSelector = options.rangeSelector,
8493
9592
  rangeSelector = chart.rangeSelector,
8494
- verticalAlign;
9593
+ verticalAlign,
9594
+ extraBottomMarginWas = this.extraBottomMargin,
9595
+ extraTopMarginWas = this.extraTopMargin;
9596
+
9597
+ if (
9598
+ optionsRangeSelector &&
9599
+ optionsRangeSelector.enabled &&
9600
+ !defined(rangeSelector)
9601
+ ) {
9602
+ this.options.rangeSelector.enabled = true;
9603
+ this.rangeSelector = new RangeSelector(this);
9604
+ }
9605
+
8495
9606
 
8496
9607
  this.extraBottomMargin = false;
8497
9608
  this.extraTopMargin = false;
8498
- this.isDirtyBox = true; // #7684 - ignored spacingBottom after update
8499
9609
 
8500
9610
  if (rangeSelector) {
8501
9611
 
8502
9612
  rangeSelector.render();
8503
9613
 
8504
9614
  verticalAlign = (
8505
- options.rangeSelector &&
8506
- options.rangeSelector.verticalAlign
9615
+ optionsRangeSelector &&
9616
+ optionsRangeSelector.verticalAlign
8507
9617
  ) || (
8508
9618
  rangeSelector.options && rangeSelector.options.verticalAlign
8509
9619
  );
@@ -8516,6 +9626,13 @@
8516
9626
  }
8517
9627
  }
8518
9628
 
9629
+ if (
9630
+ this.extraBottomMargin !== extraBottomMarginWas ||
9631
+ this.extraTopMargin !== extraTopMarginWas
9632
+ ) {
9633
+ this.isDirtyBox = true;
9634
+ }
9635
+
8519
9636
  }
8520
9637
 
8521
9638
  });
@@ -8606,7 +9723,7 @@
8606
9723
  }(Highcharts));
8607
9724
  (function (H) {
8608
9725
  /**
8609
- * (c) 2010-2017 Torstein Honsi
9726
+ * (c) 2010-2018 Torstein Honsi
8610
9727
  *
8611
9728
  * License: www.highcharts.com/license
8612
9729
  */
@@ -8646,7 +9763,8 @@
8646
9763
  * zero value in the visible range. The y axis will show percentage
8647
9764
  * or absolute change depending on whether `compare` is set to `"percent"`
8648
9765
  * or `"value"`. When this is applied to multiple series, it allows
8649
- * comparing the development of the series against each other.
9766
+ * comparing the development of the series against each other. Adds
9767
+ * a `change` field to every point object.
8650
9768
  *
8651
9769
  * @type {String}
8652
9770
  * @see [compareBase](#plotOptions.series.compareBase),
@@ -8660,7 +9778,7 @@
8660
9778
  */
8661
9779
 
8662
9780
  /**
8663
- * Defines if comparisson should start from the first point within the visible
9781
+ * Defines if comparison should start from the first point within the visible
8664
9782
  * range or should start from the first point <b>before</b> the range.
8665
9783
  * In other words, this flag determines if first point within the visible range
8666
9784
  * will have 0% (`compareStart=true`) or should have been already calculated
@@ -8999,7 +10117,7 @@
8999
10117
  inArray(axis2, uniqueAxes) === -1 &&
9000
10118
  // Do not draw on axis which overlap completely. #5424
9001
10119
  !H.find(uniqueAxes, function (unique) {
9002
- return unique.pos === axis2.pos && unique.len && axis2.len;
10120
+ return unique.pos === axis2.pos && unique.len === axis2.len;
9003
10121
  })
9004
10122
  ) {
9005
10123
  uniqueAxes.push(axis2);
@@ -9017,7 +10135,10 @@
9017
10135
  x1 = x2 = Math.round(transVal + axis.transB);
9018
10136
 
9019
10137
  // outside plot area
9020
- if (x1 < axisLeft || x1 > axisLeft + axis.width) {
10138
+ if (
10139
+ force !== 'pass' &&
10140
+ (x1 < axisLeft || x1 > axisLeft + axis.width)
10141
+ ) {
9021
10142
  if (force) {
9022
10143
  x1 = x2 = Math.min(
9023
10144
  Math.max(axisLeft, x1),
@@ -9040,7 +10161,10 @@
9040
10161
  y1 = y2 = Math.round(axisTop + axis.height - transVal);
9041
10162
 
9042
10163
  // outside plot area
9043
- if (y1 < axisTop || y1 > axisTop + axis.height) {
10164
+ if (
10165
+ force !== 'pass' &&
10166
+ (y1 < axisTop || y1 > axisTop + axis.height)
10167
+ ) {
9044
10168
  if (force) {
9045
10169
  y1 = y2 = Math.min(
9046
10170
  Math.max(axisTop, y1),
@@ -9128,7 +10252,18 @@
9128
10252
  offset = 0,
9129
10253
  // Use last available event (#5287)
9130
10254
  e = event.e || (this.cross && this.cross.e),
9131
- point = event.point;
10255
+ point = event.point,
10256
+ lin2log = this.lin2log,
10257
+ min,
10258
+ max;
10259
+
10260
+ if (this.isLog) {
10261
+ min = lin2log(this.min);
10262
+ max = lin2log(this.max);
10263
+ } else {
10264
+ min = this.min;
10265
+ max = this.max;
10266
+ }
9132
10267
 
9133
10268
  align = (horiz ? 'center' : opposite ?
9134
10269
  (this.labelAlign === 'right' ? 'right' : 'left') :
@@ -9201,7 +10336,7 @@
9201
10336
  x: posx,
9202
10337
  y: posy,
9203
10338
  // Crosshair should be rendered within Axis range (#7219)
9204
- visibility: value < this.min || value > this.max ? 'hidden' : 'visible'
10339
+ visibility: value < min || value > max ? 'hidden' : 'visible'
9205
10340
  });
9206
10341
 
9207
10342
  crossBox = crossLabel.getBBox();