highcharts 10.2.1 → 10.3.1

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 (732) hide show
  1. package/bower.json +1 -1
  2. package/es-modules/Accessibility/Accessibility.js +1 -1
  3. package/es-modules/Accessibility/Components/InfoRegionsComponent.js +9 -6
  4. package/es-modules/Accessibility/Components/LegendComponent.js +36 -32
  5. package/es-modules/Accessibility/Components/RangeSelectorComponent.js +1 -1
  6. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +16 -16
  7. package/es-modules/Accessibility/Options/LangDefaults.js +4 -0
  8. package/es-modules/Core/Axis/Axis.js +42 -32
  9. package/es-modules/Core/Axis/Axis3DComposition.js +501 -0
  10. package/es-modules/Core/Axis/Axis3DDefaults.js +130 -0
  11. package/es-modules/Core/Axis/AxisDefaults.js +20 -7
  12. package/es-modules/Core/Axis/Color/ColorAxis.js +46 -52
  13. package/es-modules/Core/Axis/Color/ColorAxisComposition.js +4 -2
  14. package/es-modules/Core/Axis/NavigatorAxisComposition.js +161 -0
  15. package/es-modules/Core/Axis/OrdinalAxis.js +2 -1
  16. package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +1 -1
  17. package/es-modules/Core/Axis/RadialAxis.js +19 -5
  18. package/es-modules/Core/Axis/Tick.js +1 -1
  19. package/es-modules/Core/Axis/Tick3DComposition.js +71 -0
  20. package/es-modules/Core/Chart/Chart.js +16 -20
  21. package/es-modules/Core/Chart/Chart3D.js +4 -4
  22. package/es-modules/Core/Chart/ChartDefaults.js +33 -43
  23. package/es-modules/Core/Chart/GanttChart.js +1 -1
  24. package/es-modules/Core/Chart/MapChart.js +1 -1
  25. package/es-modules/Core/Chart/StockChart.js +11 -28
  26. package/es-modules/Core/{DefaultOptions.js → Defaults.js} +21 -37
  27. package/es-modules/Core/FormatUtilities.js +1 -1
  28. package/es-modules/Core/Globals.js +1 -1
  29. package/es-modules/Core/Legend/Legend.js +114 -110
  30. package/es-modules/Core/Legend/LegendSymbol.js +9 -6
  31. package/es-modules/Core/MSPointer.js +4 -2
  32. package/es-modules/Core/Pointer.js +125 -75
  33. package/es-modules/Core/Renderer/SVG/SVGElement.js +0 -3
  34. package/es-modules/Core/Renderer/SVG/SVGRenderer.js +28 -14
  35. package/es-modules/Core/Series/DataLabel.js +8 -5
  36. package/es-modules/Core/Series/Point.js +38 -22
  37. package/es-modules/Core/Series/Series.js +12 -9
  38. package/es-modules/Core/Series/SeriesDefaults.js +36 -24
  39. package/es-modules/Core/Series/SeriesRegistry.js +2 -2
  40. package/es-modules/Core/Time.js +6 -5
  41. package/es-modules/Core/Tooltip.js +6 -28
  42. package/es-modules/Core/Utilities.js +6 -8
  43. package/es-modules/Extensions/Annotations/Annotation.js +1 -1
  44. package/es-modules/Extensions/Annotations/AnnotationDefaults.js +13 -8
  45. package/es-modules/Extensions/Annotations/MockPoint.js +2 -1
  46. package/es-modules/Extensions/Annotations/NavigationBindings.js +4 -5
  47. package/es-modules/Extensions/Annotations/NavigationBindingsDefaults.js +1 -1
  48. package/es-modules/Extensions/Annotations/Popup/Popup.js +2 -2
  49. package/es-modules/Extensions/Annotations/Popup/PopupAnnotations.js +4 -4
  50. package/es-modules/Extensions/Annotations/Popup/PopupComposition.js +1 -1
  51. package/es-modules/Extensions/Boost/BoostSeries.js +11 -8
  52. package/es-modules/Extensions/Breadcrumbs.js +2 -2
  53. package/es-modules/Extensions/Data.js +2 -2
  54. package/es-modules/Extensions/DataGrouping/ApproximationDefaults.js +157 -0
  55. package/es-modules/Extensions/DataGrouping/ApproximationRegistry.js +35 -0
  56. package/es-modules/Extensions/DataGrouping/DataGrouping.js +469 -0
  57. package/es-modules/Extensions/DataGrouping/DataGroupingAxisComposition.js +174 -0
  58. package/es-modules/Extensions/DataGrouping/DataGroupingDefaults.js +143 -0
  59. package/es-modules/Extensions/DataGrouping/DataGroupingSeriesComposition.js +479 -0
  60. package/es-modules/Extensions/Debugger/Debugger.js +1 -1
  61. package/es-modules/Extensions/DraggablePoints.js +6 -2
  62. package/es-modules/Extensions/Drilldown.js +3 -5
  63. package/es-modules/Extensions/ExportData/ExportData.js +31 -5
  64. package/es-modules/Extensions/Exporting/Exporting.js +47 -60
  65. package/es-modules/Extensions/Exporting/ExportingDefaults.js +22 -24
  66. package/es-modules/Extensions/GeoJSON.js +3 -1
  67. package/es-modules/Extensions/MarkerClusters.js +1 -1
  68. package/es-modules/Extensions/NoDataToDisplay.js +1 -1
  69. package/es-modules/Extensions/OfflineExporting/OfflineExporting.js +5 -5
  70. package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
  71. package/es-modules/Extensions/Oldie/Oldie.js +3 -3
  72. package/es-modules/Extensions/Oldie/VMLRenderer3D.js +1 -1
  73. package/es-modules/Extensions/OldiePolyfills.js +3 -1
  74. package/es-modules/Extensions/Pane.js +42 -5
  75. package/es-modules/Extensions/ParallelCoordinates.js +5 -1
  76. package/es-modules/Extensions/PatternFill.js +10 -10
  77. package/es-modules/Extensions/SeriesLabel/SeriesLabel.js +2 -2
  78. package/es-modules/Extensions/SeriesLabel/SeriesLabelDefaults.js +4 -0
  79. package/es-modules/Extensions/Sonification/Sonification.js +1 -1
  80. package/es-modules/Extensions/Themes/Avocado.js +1 -1
  81. package/es-modules/Extensions/Themes/BrandDark.js +1 -1
  82. package/es-modules/Extensions/Themes/BrandLight.js +1 -1
  83. package/es-modules/Extensions/Themes/DarkBlue.js +1 -1
  84. package/es-modules/Extensions/Themes/DarkGreen.js +1 -1
  85. package/es-modules/Extensions/Themes/DarkUnica.js +1 -1
  86. package/es-modules/Extensions/Themes/Gray.js +1 -1
  87. package/es-modules/Extensions/Themes/Grid.js +1 -1
  88. package/es-modules/Extensions/Themes/GridLight.js +1 -1
  89. package/es-modules/Extensions/Themes/HighContrastDark.js +1 -1
  90. package/es-modules/Extensions/Themes/HighContrastLight.js +1 -1
  91. package/es-modules/Extensions/Themes/SandSignika.js +1 -1
  92. package/es-modules/Extensions/Themes/Skies.js +1 -1
  93. package/es-modules/Extensions/Themes/Sunset.js +1 -1
  94. package/es-modules/Gantt/Connection.js +5 -5
  95. package/es-modules/Gantt/Pathfinder.js +6 -6
  96. package/es-modules/Maps/MapNavigation.js +1 -1
  97. package/es-modules/Maps/{MapNavigationOptionsDefault.js → MapNavigationDefaults.js} +4 -4
  98. package/es-modules/Maps/MapViewOptionsDefault.js +4 -4
  99. package/es-modules/Series/ArcDiagram/ArcDiagramSeries.js +3 -5
  100. package/es-modules/Series/AreaRange/AreaRangePoint.js +6 -10
  101. package/es-modules/Series/AreaRange/AreaRangeSeries.js +59 -48
  102. package/es-modules/Series/BoxPlot/BoxPlotSeries.js +4 -1
  103. package/es-modules/Series/Bubble/BubbleLegendComposition.js +22 -16
  104. package/es-modules/Series/Bubble/BubbleLegendItem.js +17 -21
  105. package/es-modules/Series/Candlestick/CandlestickSeries.js +15 -175
  106. package/es-modules/Series/Candlestick/CandlestickSeriesDefaults.js +179 -0
  107. package/es-modules/Series/Column/ColumnSeries.js +25 -506
  108. package/es-modules/Series/Column/ColumnSeriesDefaults.js +487 -0
  109. package/es-modules/Series/ColumnRange/ColumnRangeSeries.js +40 -36
  110. package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +2 -106
  111. package/es-modules/Series/DependencyWheel/DependencyWheelSeriesDefaults.js +183 -0
  112. package/es-modules/Series/DotPlot/DotPlotSeries.js +11 -12
  113. package/es-modules/Series/DrawPointUtilities.js +2 -14
  114. package/es-modules/Series/Dumbbell/DumbbellPoint.js +5 -4
  115. package/es-modules/Series/Dumbbell/DumbbellSeries.js +11 -7
  116. package/es-modules/Series/ErrorBar/ErrorBarSeries.js +19 -136
  117. package/es-modules/Series/ErrorBar/ErrorBarSeriesDefaults.js +147 -0
  118. package/es-modules/Series/Flags/FlagsPoint.js +2 -3
  119. package/es-modules/Series/Flags/FlagsSeries.js +31 -298
  120. package/es-modules/Series/Flags/FlagsSeriesDefaults.js +295 -0
  121. package/es-modules/Series/Flags/FlagsSymbols.js +96 -71
  122. package/es-modules/Series/HLC/HLCPoint.js +2 -2
  123. package/es-modules/Series/HLC/HLCSeries.js +7 -172
  124. package/es-modules/Series/HLC/HLCSeriesDefaults.js +184 -0
  125. package/es-modules/Series/Heatmap/HeatmapSeries.js +3 -0
  126. package/es-modules/Series/HeikinAshi/HeikinAshiPoint.js +3 -20
  127. package/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +78 -139
  128. package/es-modules/Series/HeikinAshi/HeikinAshiSeriesDefaults.js +102 -0
  129. package/es-modules/Series/Item/ItemPoint.js +0 -1
  130. package/es-modules/Series/Item/ItemSeries.js +13 -8
  131. package/es-modules/Series/Line/LineSeries.js +8 -4
  132. package/es-modules/Series/Map/MapPoint.js +19 -1
  133. package/es-modules/Series/Map/MapSeries.js +7 -3
  134. package/es-modules/Series/MapBubble/MapBubbleSeries.js +4 -0
  135. package/es-modules/Series/MapPoint/MapPointPoint.js +0 -5
  136. package/es-modules/Series/MapPoint/MapPointSeries.js +24 -9
  137. package/es-modules/Series/Networkgraph/NetworkgraphSeries.js +2 -5
  138. package/es-modules/Series/Networkgraph/NetworkgraphSeriesDefaults.js +2 -0
  139. package/es-modules/Series/OHLC/OHLCPoint.js +0 -2
  140. package/es-modules/Series/OHLC/OHLCSeries.js +64 -160
  141. package/es-modules/Series/OHLC/OHLCSeriesDefaults.js +151 -0
  142. package/es-modules/Series/Organization/OrganizationPoint.js +0 -2
  143. package/es-modules/Series/Organization/OrganizationSeries.js +96 -469
  144. package/es-modules/Series/Organization/OrganizationSeriesDefaults.js +415 -0
  145. package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +3 -10
  146. package/es-modules/Series/PackedBubble/PackedBubbleSeriesDefaults.js +2 -0
  147. package/es-modules/Series/PathUtilities.js +74 -0
  148. package/es-modules/Series/Pie/PieSeries.js +2 -644
  149. package/es-modules/Series/Pie/PieSeriesDefaults.js +660 -0
  150. package/es-modules/Series/PolarComposition.js +233 -15
  151. package/es-modules/Series/Sankey/SankeySeries.js +27 -530
  152. package/es-modules/Series/Sankey/SankeySeriesDefaults.js +522 -0
  153. package/es-modules/Series/Scatter/ScatterSeries.js +2 -172
  154. package/es-modules/Series/Scatter/ScatterSeriesDefaults.js +188 -0
  155. package/es-modules/Series/SolidGauge/SolidGaugeSeries.js +12 -182
  156. package/es-modules/Series/SolidGauge/SolidGaugeSeriesDefaults.js +199 -0
  157. package/es-modules/Series/Sunburst/SunburstNode.js +34 -0
  158. package/es-modules/Series/Sunburst/SunburstPoint.js +2 -1
  159. package/es-modules/Series/Sunburst/SunburstSeries.js +3 -1
  160. package/es-modules/Series/Timeline/TimelineSeries.js +2 -231
  161. package/es-modules/Series/Timeline/TimelineSeriesDefaults.js +248 -0
  162. package/es-modules/Series/TreeUtilities.js +1 -2
  163. package/es-modules/Series/Treegraph/TreegraphLayout.js +338 -0
  164. package/es-modules/Series/Treegraph/TreegraphLink.js +92 -0
  165. package/es-modules/Series/Treegraph/TreegraphNode.js +206 -0
  166. package/es-modules/Series/Treegraph/TreegraphPoint.js +175 -0
  167. package/es-modules/Series/Treegraph/TreegraphSeries.js +510 -0
  168. package/es-modules/Series/Treegraph/TreegraphSeriesDefaults.js +231 -0
  169. package/es-modules/Series/Treemap/TreemapNode.js +48 -0
  170. package/es-modules/Series/Treemap/TreemapPoint.js +2 -1
  171. package/es-modules/Series/Treemap/TreemapSeries.js +29 -27
  172. package/es-modules/Series/Variwide/VariwideComposition.js +70 -26
  173. package/es-modules/Series/Variwide/VariwidePoint.js +8 -7
  174. package/es-modules/Series/Variwide/VariwideSeries.js +19 -14
  175. package/es-modules/Series/Vector/VectorSeries.js +2 -2
  176. package/es-modules/Series/Venn/VennSeries.js +14 -0
  177. package/es-modules/Series/Waterfall/WaterfallSeries.js +0 -1
  178. package/es-modules/Series/Windbarb/WindbarbSeries.js +3 -2
  179. package/es-modules/Series/Wordcloud/WordcloudSeries.js +3 -0
  180. package/es-modules/Stock/Indicators/AO/AOIndicator.js +1 -2
  181. package/es-modules/Stock/Indicators/BB/BBIndicator.js +15 -4
  182. package/es-modules/Stock/Indicators/IKH/IKHIndicator.js +21 -18
  183. package/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +1 -2
  184. package/es-modules/Stock/Indicators/MACD/MACDIndicator.js +1 -2
  185. package/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +1 -1
  186. package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +0 -1
  187. package/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +3 -4
  188. package/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +1 -2
  189. package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +6 -7
  190. package/es-modules/{Core → Stock/Navigator}/Navigator.js +112 -686
  191. package/es-modules/Stock/Navigator/NavigatorComposition.js +218 -0
  192. package/es-modules/Stock/Navigator/NavigatorDefaults.js +490 -0
  193. package/es-modules/Stock/Navigator/NavigatorSymbols.js +44 -0
  194. package/es-modules/{Extensions → Stock/RangeSelector}/RangeSelector.js +154 -818
  195. package/es-modules/Stock/RangeSelector/RangeSelectorComposition.js +286 -0
  196. package/es-modules/Stock/RangeSelector/RangeSelectorDefaults.js +521 -0
  197. package/es-modules/{Core → Stock/Scrollbar}/Scrollbar.js +4 -4
  198. package/es-modules/{Core → Stock/Scrollbar}/ScrollbarDefaults.js +1 -1
  199. package/es-modules/Stock/{StockToolbar.js → StockTools/StockToolbar.js} +2 -2
  200. package/es-modules/Stock/{StockTools.js → StockTools/StockTools.js} +3 -3
  201. package/es-modules/Stock/{StockToolsBindings.js → StockTools/StockToolsBindings.js} +3 -3
  202. package/es-modules/Stock/{StockToolsDefaults.js → StockTools/StockToolsDefaults.js} +4 -4
  203. package/es-modules/Stock/{StockToolsGui.js → StockTools/StockToolsGui.js} +4 -4
  204. package/es-modules/Stock/{StockToolsUtilities.js → StockTools/StockToolsUtilities.js} +4 -4
  205. package/es-modules/masters/highcharts-3d.src.js +3 -5
  206. package/es-modules/masters/highcharts-gantt.src.js +1 -1
  207. package/es-modules/masters/highcharts-more.src.js +1 -1
  208. package/es-modules/masters/highcharts.src.js +6 -6
  209. package/es-modules/masters/highmaps.src.js +1 -1
  210. package/es-modules/masters/highstock.src.js +1 -1
  211. package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
  212. package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
  213. package/es-modules/masters/indicators/ao.src.js +1 -1
  214. package/es-modules/masters/indicators/apo.src.js +1 -1
  215. package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
  216. package/es-modules/masters/indicators/aroon.src.js +1 -1
  217. package/es-modules/masters/indicators/atr.src.js +1 -1
  218. package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
  219. package/es-modules/masters/indicators/cci.src.js +1 -1
  220. package/es-modules/masters/indicators/chaikin.src.js +1 -1
  221. package/es-modules/masters/indicators/cmf.src.js +1 -1
  222. package/es-modules/masters/indicators/cmo.src.js +1 -1
  223. package/es-modules/masters/indicators/dema.src.js +1 -1
  224. package/es-modules/masters/indicators/disparity-index.src.js +1 -1
  225. package/es-modules/masters/indicators/dmi.src.js +1 -1
  226. package/es-modules/masters/indicators/dpo.src.js +1 -1
  227. package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
  228. package/es-modules/masters/indicators/indicators-all.src.js +1 -1
  229. package/es-modules/masters/indicators/indicators.src.js +1 -1
  230. package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
  231. package/es-modules/masters/indicators/klinger.src.js +1 -1
  232. package/es-modules/masters/indicators/macd.src.js +1 -1
  233. package/es-modules/masters/indicators/mfi.src.js +1 -1
  234. package/es-modules/masters/indicators/momentum.src.js +1 -1
  235. package/es-modules/masters/indicators/natr.src.js +1 -1
  236. package/es-modules/masters/indicators/obv.src.js +1 -1
  237. package/es-modules/masters/indicators/pivot-points.src.js +1 -1
  238. package/es-modules/masters/indicators/ppo.src.js +1 -1
  239. package/es-modules/masters/indicators/price-channel.src.js +1 -1
  240. package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
  241. package/es-modules/masters/indicators/psar.src.js +1 -1
  242. package/es-modules/masters/indicators/regressions.src.js +1 -1
  243. package/es-modules/masters/indicators/roc.src.js +1 -1
  244. package/es-modules/masters/indicators/rsi.src.js +1 -1
  245. package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
  246. package/es-modules/masters/indicators/stochastic.src.js +1 -1
  247. package/es-modules/masters/indicators/supertrend.src.js +1 -1
  248. package/es-modules/masters/indicators/tema.src.js +1 -1
  249. package/es-modules/masters/indicators/trendline.src.js +1 -1
  250. package/es-modules/masters/indicators/trix.src.js +1 -1
  251. package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
  252. package/es-modules/masters/indicators/vwap.src.js +1 -1
  253. package/es-modules/masters/indicators/williams-r.src.js +1 -1
  254. package/es-modules/masters/indicators/wma.src.js +1 -1
  255. package/es-modules/masters/indicators/zigzag.src.js +1 -1
  256. package/es-modules/masters/modules/accessibility.src.js +1 -1
  257. package/es-modules/masters/modules/annotations-advanced.src.js +1 -1
  258. package/es-modules/masters/modules/annotations.src.js +1 -1
  259. package/es-modules/masters/modules/arc-diagram.src.js +1 -1
  260. package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
  261. package/es-modules/masters/modules/boost-canvas.src.js +1 -1
  262. package/es-modules/masters/modules/boost.src.js +1 -1
  263. package/es-modules/masters/modules/broken-axis.src.js +1 -1
  264. package/es-modules/masters/modules/bullet.src.js +1 -1
  265. package/es-modules/masters/modules/coloraxis.src.js +1 -1
  266. package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
  267. package/es-modules/masters/modules/cylinder.src.js +1 -1
  268. package/es-modules/masters/modules/data.src.js +1 -1
  269. package/es-modules/masters/modules/datagrouping.src.js +11 -3
  270. package/es-modules/masters/modules/debugger.src.js +1 -1
  271. package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
  272. package/es-modules/masters/modules/dotplot.src.js +1 -1
  273. package/es-modules/masters/modules/drag-panes.src.js +1 -1
  274. package/es-modules/masters/modules/draggable-points.src.js +1 -1
  275. package/es-modules/masters/modules/drilldown.src.js +1 -1
  276. package/es-modules/masters/modules/dumbbell.src.js +1 -1
  277. package/es-modules/masters/modules/export-data.src.js +1 -1
  278. package/es-modules/masters/modules/exporting.src.js +1 -1
  279. package/es-modules/masters/modules/full-screen.src.js +1 -1
  280. package/es-modules/masters/modules/funnel.src.js +1 -1
  281. package/es-modules/masters/modules/funnel3d.src.js +1 -1
  282. package/es-modules/masters/modules/gantt.src.js +9 -5
  283. package/es-modules/masters/modules/grid-axis.src.js +1 -1
  284. package/es-modules/masters/modules/heatmap.src.js +1 -1
  285. package/es-modules/masters/modules/heikinashi.src.js +5 -2
  286. package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
  287. package/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
  288. package/es-modules/masters/modules/item-series.src.js +1 -1
  289. package/es-modules/masters/modules/lollipop.src.js +1 -1
  290. package/es-modules/masters/modules/map.src.js +1 -1
  291. package/es-modules/masters/modules/marker-clusters.src.js +1 -1
  292. package/es-modules/masters/modules/networkgraph.src.js +1 -1
  293. package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
  294. package/es-modules/masters/modules/offline-exporting.src.js +1 -1
  295. package/es-modules/masters/modules/oldie-polyfills.src.js +1 -1
  296. package/es-modules/masters/modules/oldie.src.js +1 -1
  297. package/es-modules/masters/modules/organization.src.js +1 -1
  298. package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
  299. package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
  300. package/es-modules/masters/modules/pareto.src.js +1 -1
  301. package/es-modules/masters/modules/pathfinder.src.js +1 -1
  302. package/es-modules/masters/modules/pattern-fill.src.js +1 -1
  303. package/es-modules/masters/modules/price-indicator.src.js +1 -1
  304. package/es-modules/masters/modules/pyramid3d.src.js +1 -1
  305. package/es-modules/masters/modules/sankey.src.js +1 -1
  306. package/es-modules/masters/modules/series-label.src.js +1 -1
  307. package/es-modules/masters/modules/series-on-point.src.js +1 -1
  308. package/es-modules/masters/modules/solid-gauge.src.js +1 -1
  309. package/es-modules/masters/modules/sonification.src.js +1 -1
  310. package/es-modules/masters/modules/static-scale.src.js +1 -1
  311. package/es-modules/masters/modules/stock-tools.src.js +4 -4
  312. package/es-modules/masters/modules/stock.src.js +17 -11
  313. package/es-modules/masters/modules/streamgraph.src.js +1 -1
  314. package/es-modules/masters/modules/sunburst.src.js +1 -1
  315. package/es-modules/masters/modules/tilemap.src.js +1 -1
  316. package/es-modules/masters/modules/timeline.src.js +1 -1
  317. package/es-modules/masters/modules/treegraph.src.js +13 -0
  318. package/es-modules/masters/modules/treegrid.src.js +1 -1
  319. package/es-modules/masters/modules/treemap.src.js +1 -1
  320. package/es-modules/masters/modules/variable-pie.src.js +1 -1
  321. package/es-modules/masters/modules/variwide.src.js +5 -2
  322. package/es-modules/masters/modules/vector.src.js +1 -1
  323. package/es-modules/masters/modules/venn.src.js +1 -1
  324. package/es-modules/masters/modules/windbarb.src.js +1 -1
  325. package/es-modules/masters/modules/wordcloud.src.js +1 -1
  326. package/es-modules/masters/modules/xrange.src.js +1 -1
  327. package/es-modules/masters/themes/avocado.src.js +1 -1
  328. package/es-modules/masters/themes/brand-dark.src.js +1 -1
  329. package/es-modules/masters/themes/brand-light.src.js +1 -1
  330. package/es-modules/masters/themes/dark-blue.src.js +1 -1
  331. package/es-modules/masters/themes/dark-green.src.js +1 -1
  332. package/es-modules/masters/themes/dark-unica.src.js +1 -1
  333. package/es-modules/masters/themes/gray.src.js +1 -1
  334. package/es-modules/masters/themes/grid-light.src.js +1 -1
  335. package/es-modules/masters/themes/grid.src.js +1 -1
  336. package/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
  337. package/es-modules/masters/themes/high-contrast-light.src.js +1 -1
  338. package/es-modules/masters/themes/sand-signika.src.js +1 -1
  339. package/es-modules/masters/themes/skies.src.js +1 -1
  340. package/es-modules/masters/themes/sunset.src.js +1 -1
  341. package/highcharts-3d.js +97 -98
  342. package/highcharts-3d.js.map +1 -1
  343. package/highcharts-3d.src.js +476 -449
  344. package/highcharts-gantt.js +811 -808
  345. package/highcharts-gantt.js.map +1 -1
  346. package/highcharts-gantt.src.js +14619 -14112
  347. package/highcharts-more.d.ts +0 -8
  348. package/highcharts-more.js +208 -201
  349. package/highcharts-more.js.map +1 -1
  350. package/highcharts-more.src.d.ts +0 -8
  351. package/highcharts-more.src.js +679 -289
  352. package/highcharts.d.ts +30739 -6156
  353. package/highcharts.js +590 -589
  354. package/highcharts.js.map +1 -1
  355. package/highcharts.src.d.ts +30739 -6156
  356. package/highcharts.src.js +1988 -1799
  357. package/highmaps.js +759 -757
  358. package/highmaps.js.map +1 -1
  359. package/highmaps.src.js +2339 -2077
  360. package/highstock.js +802 -794
  361. package/highstock.js.map +1 -1
  362. package/highstock.src.js +12349 -11416
  363. package/indicators/acceleration-bands.js +1 -1
  364. package/indicators/acceleration-bands.src.js +1 -1
  365. package/indicators/accumulation-distribution.js +1 -1
  366. package/indicators/accumulation-distribution.src.js +1 -1
  367. package/indicators/ao.js +6 -6
  368. package/indicators/ao.js.map +1 -1
  369. package/indicators/ao.src.js +4 -3
  370. package/indicators/apo.js +1 -1
  371. package/indicators/apo.src.js +1 -1
  372. package/indicators/aroon-oscillator.js +1 -1
  373. package/indicators/aroon-oscillator.src.js +1 -1
  374. package/indicators/aroon.js +1 -1
  375. package/indicators/aroon.src.js +1 -1
  376. package/indicators/atr.js +1 -1
  377. package/indicators/atr.src.js +1 -1
  378. package/indicators/bollinger-bands.js +1 -1
  379. package/indicators/bollinger-bands.js.map +1 -1
  380. package/indicators/bollinger-bands.src.js +16 -5
  381. package/indicators/cci.js +1 -1
  382. package/indicators/cci.src.js +1 -1
  383. package/indicators/chaikin.js +1 -1
  384. package/indicators/chaikin.src.js +1 -1
  385. package/indicators/cmf.js +1 -1
  386. package/indicators/cmf.src.js +1 -1
  387. package/indicators/cmo.d.ts +17 -0
  388. package/indicators/cmo.js +1 -1
  389. package/indicators/cmo.src.d.ts +17 -0
  390. package/indicators/cmo.src.js +1 -1
  391. package/indicators/dema.js +1 -1
  392. package/indicators/dema.src.js +1 -1
  393. package/indicators/disparity-index.d.ts +17 -0
  394. package/indicators/disparity-index.js +1 -1
  395. package/indicators/disparity-index.src.d.ts +17 -0
  396. package/indicators/disparity-index.src.js +1 -1
  397. package/indicators/dmi.d.ts +17 -0
  398. package/indicators/dmi.js +1 -1
  399. package/indicators/dmi.src.d.ts +17 -0
  400. package/indicators/dmi.src.js +1 -1
  401. package/indicators/dpo.js +1 -1
  402. package/indicators/dpo.src.js +1 -1
  403. package/indicators/ichimoku-kinko-hyo.js +14 -14
  404. package/indicators/ichimoku-kinko-hyo.js.map +1 -1
  405. package/indicators/ichimoku-kinko-hyo.src.js +22 -19
  406. package/indicators/indicators-all.js +198 -199
  407. package/indicators/indicators-all.js.map +1 -1
  408. package/indicators/indicators-all.src.js +63 -57
  409. package/indicators/indicators.js +13 -13
  410. package/indicators/indicators.js.map +1 -1
  411. package/indicators/indicators.src.js +1 -15
  412. package/indicators/keltner-channels.js +1 -1
  413. package/indicators/keltner-channels.src.js +1 -1
  414. package/indicators/klinger.d.ts +17 -0
  415. package/indicators/klinger.js +12 -12
  416. package/indicators/klinger.js.map +1 -1
  417. package/indicators/klinger.src.d.ts +17 -0
  418. package/indicators/klinger.src.js +4 -3
  419. package/indicators/macd.js +1 -1
  420. package/indicators/macd.js.map +1 -1
  421. package/indicators/macd.src.js +4 -3
  422. package/indicators/mfi.js +1 -1
  423. package/indicators/mfi.src.js +1 -1
  424. package/indicators/momentum.js +1 -1
  425. package/indicators/momentum.src.js +1 -1
  426. package/indicators/natr.js +1 -1
  427. package/indicators/natr.src.js +1 -1
  428. package/indicators/obv.d.ts +17 -0
  429. package/indicators/obv.js +1 -1
  430. package/indicators/obv.src.d.ts +17 -0
  431. package/indicators/obv.src.js +1 -1
  432. package/indicators/pivot-points.js +2 -2
  433. package/indicators/pivot-points.js.map +1 -1
  434. package/indicators/pivot-points.src.js +2 -2
  435. package/indicators/ppo.js +1 -1
  436. package/indicators/ppo.src.js +1 -1
  437. package/indicators/price-channel.js +1 -1
  438. package/indicators/price-channel.src.js +1 -1
  439. package/indicators/price-envelopes.js +1 -1
  440. package/indicators/price-envelopes.src.js +1 -1
  441. package/indicators/psar.js +1 -1
  442. package/indicators/psar.src.js +1 -1
  443. package/indicators/regressions.js +1 -1
  444. package/indicators/regressions.src.js +1 -1
  445. package/indicators/roc.js +1 -1
  446. package/indicators/roc.src.js +1 -1
  447. package/indicators/rsi.js +1 -1
  448. package/indicators/rsi.src.js +1 -1
  449. package/indicators/slow-stochastic.js +5 -5
  450. package/indicators/slow-stochastic.js.map +1 -1
  451. package/indicators/slow-stochastic.src.js +6 -5
  452. package/indicators/stochastic.js +1 -1
  453. package/indicators/stochastic.src.js +1 -1
  454. package/indicators/supertrend.js +7 -7
  455. package/indicators/supertrend.js.map +1 -1
  456. package/indicators/supertrend.src.js +4 -3
  457. package/indicators/tema.js +1 -1
  458. package/indicators/tema.src.js +1 -1
  459. package/indicators/trendline.js +1 -1
  460. package/indicators/trendline.src.js +1 -1
  461. package/indicators/trix.js +1 -1
  462. package/indicators/trix.src.js +1 -1
  463. package/indicators/volume-by-price.js +17 -17
  464. package/indicators/volume-by-price.js.map +1 -1
  465. package/indicators/volume-by-price.src.js +9 -8
  466. package/indicators/vwap.js +1 -1
  467. package/indicators/vwap.src.js +1 -1
  468. package/indicators/williams-r.js +1 -1
  469. package/indicators/williams-r.src.js +1 -1
  470. package/indicators/wma.js +1 -1
  471. package/indicators/wma.src.js +1 -1
  472. package/indicators/zigzag.js +1 -1
  473. package/indicators/zigzag.src.js +1 -1
  474. package/modules/accessibility.js +214 -213
  475. package/modules/accessibility.js.map +1 -1
  476. package/modules/accessibility.src.js +991 -835
  477. package/modules/annotations-advanced.js +16 -16
  478. package/modules/annotations-advanced.js.map +1 -1
  479. package/modules/annotations-advanced.src.js +29 -24
  480. package/modules/annotations.js +91 -91
  481. package/modules/annotations.js.map +1 -1
  482. package/modules/annotations.src.js +29 -24
  483. package/modules/arc-diagram.d.ts +17 -0
  484. package/modules/arc-diagram.js +15 -15
  485. package/modules/arc-diagram.js.map +1 -1
  486. package/modules/arc-diagram.src.d.ts +17 -0
  487. package/modules/arc-diagram.src.js +6 -6
  488. package/modules/arrow-symbols.js +1 -1
  489. package/modules/arrow-symbols.src.js +1 -1
  490. package/modules/boost-canvas.js +19 -19
  491. package/modules/boost-canvas.js.map +1 -1
  492. package/modules/boost-canvas.src.js +13 -8
  493. package/modules/boost.js +37 -37
  494. package/modules/boost.js.map +1 -1
  495. package/modules/boost.src.js +13 -8
  496. package/modules/broken-axis.js +1 -1
  497. package/modules/broken-axis.src.js +1 -1
  498. package/modules/bullet.js +1 -1
  499. package/modules/bullet.src.js +1 -1
  500. package/modules/coloraxis.js +25 -24
  501. package/modules/coloraxis.js.map +1 -1
  502. package/modules/coloraxis.src.js +77 -58
  503. package/modules/current-date-indicator.js +1 -1
  504. package/modules/current-date-indicator.src.js +1 -1
  505. package/modules/cylinder.js +1 -1
  506. package/modules/cylinder.src.js +1 -1
  507. package/modules/data.js +27 -27
  508. package/modules/data.js.map +1 -1
  509. package/modules/data.src.js +3 -3
  510. package/modules/datagrouping.d.ts +31 -0
  511. package/modules/datagrouping.js +23 -21
  512. package/modules/datagrouping.js.map +1 -1
  513. package/modules/datagrouping.src.d.ts +31 -0
  514. package/modules/datagrouping.src.js +921 -640
  515. package/modules/debugger.js +3 -3
  516. package/modules/debugger.js.map +1 -1
  517. package/modules/debugger.src.js +2 -2
  518. package/modules/dependency-wheel.js +12 -12
  519. package/modules/dependency-wheel.js.map +1 -1
  520. package/modules/dependency-wheel.src.js +191 -108
  521. package/modules/dotplot.js +6 -6
  522. package/modules/dotplot.js.map +1 -1
  523. package/modules/dotplot.src.js +10 -13
  524. package/modules/drag-panes.js +1 -1
  525. package/modules/drag-panes.src.js +1 -1
  526. package/modules/draggable-points.js +5 -5
  527. package/modules/draggable-points.js.map +1 -1
  528. package/modules/draggable-points.src.js +7 -3
  529. package/modules/drilldown.js +37 -37
  530. package/modules/drilldown.js.map +1 -1
  531. package/modules/drilldown.src.js +5 -6
  532. package/modules/dumbbell.js +17 -17
  533. package/modules/dumbbell.js.map +1 -1
  534. package/modules/dumbbell.src.js +27 -22
  535. package/modules/export-data.js +26 -25
  536. package/modules/export-data.js.map +1 -1
  537. package/modules/export-data.src.js +33 -6
  538. package/modules/exporting.js +36 -35
  539. package/modules/exporting.js.map +1 -1
  540. package/modules/exporting.src.js +81 -88
  541. package/modules/full-screen.js +1 -1
  542. package/modules/full-screen.src.js +1 -1
  543. package/modules/funnel.js +1 -1
  544. package/modules/funnel.src.js +1 -1
  545. package/modules/funnel3d.js +1 -1
  546. package/modules/funnel3d.src.js +1 -1
  547. package/modules/gantt.js +221 -219
  548. package/modules/gantt.js.map +1 -1
  549. package/modules/gantt.src.js +12842 -12524
  550. package/modules/grid-axis.js +1 -1
  551. package/modules/grid-axis.src.js +1 -1
  552. package/modules/heatmap.js +40 -40
  553. package/modules/heatmap.js.map +1 -1
  554. package/modules/heatmap.src.js +80 -58
  555. package/modules/heikinashi.d.ts +17 -0
  556. package/modules/heikinashi.js +9 -8
  557. package/modules/heikinashi.js.map +1 -1
  558. package/modules/heikinashi.src.d.ts +17 -0
  559. package/modules/heikinashi.src.js +192 -165
  560. package/modules/histogram-bellcurve.js +1 -1
  561. package/modules/histogram-bellcurve.src.js +1 -1
  562. package/modules/hollowcandlestick.d.ts +17 -0
  563. package/modules/hollowcandlestick.js +1 -1
  564. package/modules/hollowcandlestick.src.d.ts +17 -0
  565. package/modules/hollowcandlestick.src.js +1 -1
  566. package/modules/item-series.js +12 -12
  567. package/modules/item-series.js.map +1 -1
  568. package/modules/item-series.src.js +14 -10
  569. package/modules/lollipop.js +1 -1
  570. package/modules/lollipop.src.js +1 -1
  571. package/modules/map.js +172 -171
  572. package/modules/map.js.map +1 -1
  573. package/modules/map.src.js +194 -121
  574. package/modules/marker-clusters.js +2 -2
  575. package/modules/marker-clusters.js.map +1 -1
  576. package/modules/marker-clusters.src.js +2 -2
  577. package/modules/networkgraph.js +8 -8
  578. package/modules/networkgraph.js.map +1 -1
  579. package/modules/networkgraph.src.js +5 -6
  580. package/modules/no-data-to-display.js +4 -4
  581. package/modules/no-data-to-display.js.map +1 -1
  582. package/modules/no-data-to-display.src.js +2 -2
  583. package/modules/offline-exporting.js +4 -4
  584. package/modules/offline-exporting.js.map +1 -1
  585. package/modules/offline-exporting.src.js +7 -7
  586. package/modules/oldie-polyfills.js +7 -7
  587. package/modules/oldie-polyfills.js.map +1 -1
  588. package/modules/oldie-polyfills.src.js +9 -7
  589. package/modules/oldie.js +30 -30
  590. package/modules/oldie.js.map +1 -1
  591. package/modules/oldie.src.js +5 -5
  592. package/modules/organization.js +18 -16
  593. package/modules/organization.js.map +1 -1
  594. package/modules/organization.src.js +659 -495
  595. package/modules/overlapping-datalabels.js +1 -1
  596. package/modules/overlapping-datalabels.src.js +1 -1
  597. package/modules/parallel-coordinates.js +10 -10
  598. package/modules/parallel-coordinates.js.map +1 -1
  599. package/modules/parallel-coordinates.src.js +6 -2
  600. package/modules/pareto.js +1 -1
  601. package/modules/pareto.src.js +1 -1
  602. package/modules/pathfinder.js +31 -31
  603. package/modules/pathfinder.js.map +1 -1
  604. package/modules/pathfinder.src.js +19 -23
  605. package/modules/pattern-fill.js +2 -2
  606. package/modules/pattern-fill.js.map +1 -1
  607. package/modules/pattern-fill.src.js +11 -11
  608. package/modules/price-indicator.js +1 -1
  609. package/modules/price-indicator.src.js +1 -1
  610. package/modules/pyramid3d.js +1 -1
  611. package/modules/pyramid3d.src.js +1 -1
  612. package/modules/sankey.js +33 -32
  613. package/modules/sankey.js.map +1 -1
  614. package/modules/sankey.src.js +571 -550
  615. package/modules/series-label.js +17 -17
  616. package/modules/series-label.js.map +1 -1
  617. package/modules/series-label.src.js +7 -3
  618. package/modules/series-on-point.d.ts +17 -0
  619. package/modules/series-on-point.js +1 -1
  620. package/modules/series-on-point.src.d.ts +17 -0
  621. package/modules/series-on-point.src.js +1 -1
  622. package/modules/solid-gauge.js +11 -10
  623. package/modules/solid-gauge.js.map +1 -1
  624. package/modules/solid-gauge.src.js +220 -192
  625. package/modules/sonification.js +2 -2
  626. package/modules/sonification.js.map +1 -1
  627. package/modules/sonification.src.js +2 -2
  628. package/modules/static-scale.js +1 -1
  629. package/modules/static-scale.src.js +1 -1
  630. package/modules/stock-tools.js +59 -59
  631. package/modules/stock-tools.js.map +1 -1
  632. package/modules/stock-tools.src.js +19 -21
  633. package/modules/stock.d.ts +26 -6
  634. package/modules/stock.js +212 -205
  635. package/modules/stock.js.map +1 -1
  636. package/modules/stock.src.d.ts +26 -6
  637. package/modules/stock.src.js +11361 -10617
  638. package/modules/streamgraph.js +1 -1
  639. package/modules/streamgraph.src.js +1 -1
  640. package/modules/sunburst.js +75 -73
  641. package/modules/sunburst.js.map +1 -1
  642. package/modules/sunburst.src.js +133 -57
  643. package/modules/tilemap.js +1 -1
  644. package/modules/tilemap.src.js +1 -1
  645. package/modules/timeline.js +18 -18
  646. package/modules/timeline.js.map +1 -1
  647. package/modules/timeline.src.js +257 -233
  648. package/modules/treegraph.d.ts +17 -0
  649. package/modules/treegraph.js +44 -0
  650. package/modules/treegraph.js.map +1 -0
  651. package/modules/treegraph.src.d.ts +17 -0
  652. package/modules/treegraph.src.js +1829 -0
  653. package/modules/treegrid.js +2 -2
  654. package/modules/treegrid.js.map +1 -1
  655. package/modules/treegrid.src.js +2 -3
  656. package/modules/treemap.js +54 -53
  657. package/modules/treemap.js.map +1 -1
  658. package/modules/treemap.src.js +90 -52
  659. package/modules/variable-pie.js +1 -1
  660. package/modules/variable-pie.src.js +1 -1
  661. package/modules/variwide.js +12 -12
  662. package/modules/variwide.js.map +1 -1
  663. package/modules/variwide.src.js +158 -106
  664. package/modules/vector.js +1 -1
  665. package/modules/vector.src.js +3 -3
  666. package/modules/venn.js +31 -31
  667. package/modules/venn.js.map +1 -1
  668. package/modules/venn.src.js +17 -16
  669. package/modules/windbarb.js +15 -15
  670. package/modules/windbarb.js.map +1 -1
  671. package/modules/windbarb.src.js +41 -4
  672. package/modules/wordcloud.js +23 -23
  673. package/modules/wordcloud.js.map +1 -1
  674. package/modules/wordcloud.src.js +6 -15
  675. package/modules/xrange.js +1 -1
  676. package/modules/xrange.src.js +1 -1
  677. package/package.json +1 -1
  678. package/themes/avocado.js +2 -3
  679. package/themes/avocado.js.map +1 -1
  680. package/themes/avocado.src.js +2 -2
  681. package/themes/brand-dark.d.ts +22 -0
  682. package/themes/brand-dark.js +3 -3
  683. package/themes/brand-dark.js.map +1 -1
  684. package/themes/brand-dark.src.d.ts +22 -0
  685. package/themes/brand-dark.src.js +2 -2
  686. package/themes/brand-light.d.ts +22 -0
  687. package/themes/brand-light.js +2 -2
  688. package/themes/brand-light.js.map +1 -1
  689. package/themes/brand-light.src.d.ts +22 -0
  690. package/themes/brand-light.src.js +2 -2
  691. package/themes/dark-blue.js +2 -2
  692. package/themes/dark-blue.js.map +1 -1
  693. package/themes/dark-blue.src.js +2 -2
  694. package/themes/dark-green.js +2 -2
  695. package/themes/dark-green.js.map +1 -1
  696. package/themes/dark-green.src.js +2 -2
  697. package/themes/dark-unica.js +2 -2
  698. package/themes/dark-unica.js.map +1 -1
  699. package/themes/dark-unica.src.js +2 -2
  700. package/themes/gray.js +2 -2
  701. package/themes/gray.js.map +1 -1
  702. package/themes/gray.src.js +2 -2
  703. package/themes/grid-light.js +2 -2
  704. package/themes/grid-light.js.map +1 -1
  705. package/themes/grid-light.src.js +2 -2
  706. package/themes/grid.js +2 -2
  707. package/themes/grid.js.map +1 -1
  708. package/themes/grid.src.js +2 -2
  709. package/themes/high-contrast-dark.d.ts +22 -0
  710. package/themes/high-contrast-dark.js +2 -2
  711. package/themes/high-contrast-dark.js.map +1 -1
  712. package/themes/high-contrast-dark.src.d.ts +22 -0
  713. package/themes/high-contrast-dark.src.js +2 -2
  714. package/themes/high-contrast-light.d.ts +22 -0
  715. package/themes/high-contrast-light.js +2 -2
  716. package/themes/high-contrast-light.js.map +1 -1
  717. package/themes/high-contrast-light.src.d.ts +22 -0
  718. package/themes/high-contrast-light.src.js +2 -2
  719. package/themes/sand-signika.js +2 -2
  720. package/themes/sand-signika.js.map +1 -1
  721. package/themes/sand-signika.src.js +2 -2
  722. package/themes/skies.js +2 -2
  723. package/themes/skies.js.map +1 -1
  724. package/themes/skies.src.js +2 -2
  725. package/themes/sunset.js +2 -2
  726. package/themes/sunset.js.map +1 -1
  727. package/themes/sunset.src.js +2 -2
  728. package/es-modules/Core/Axis/Axis3D.js +0 -612
  729. package/es-modules/Core/Axis/NavigatorAxis.js +0 -159
  730. package/es-modules/Core/Axis/Tick3D.js +0 -68
  731. package/es-modules/Extensions/DataGrouping.js +0 -1177
  732. package/es-modules/Stock/Indicators/SMA/SMAComposition.js +0 -12
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v10.2.1 (2022-08-29)
2
+ * @license Highcharts JS v10.3.1 (2022-10-31)
3
3
  *
4
4
  * Accessibility module
5
5
  *
@@ -2267,12 +2267,15 @@
2267
2267
  this.addEvent(chart, 'aftergetTableAST', function (e) {
2268
2268
  component.onDataTableCreated(e);
2269
2269
  });
2270
- this.addEvent(chart, 'afterViewData', function (tableDiv) {
2271
- component.dataTableDiv = tableDiv;
2272
- // Use small delay to give browsers & AT time to register new table
2273
- setTimeout(function () {
2274
- component.focusDataTable();
2275
- }, 300);
2270
+ this.addEvent(chart, 'afterViewData', function (e) {
2271
+ if (e.wasHidden) {
2272
+ component.dataTableDiv = e.element;
2273
+ // Use a small delay to give browsers & AT time to
2274
+ // register the new table.
2275
+ setTimeout(function () {
2276
+ component.focusDataTable();
2277
+ }, 300);
2278
+ }
2276
2279
  });
2277
2280
  this.announcer = new Announcer(chart, 'assertive');
2278
2281
  };
@@ -3666,7 +3669,7 @@
3666
3669
  * @private
3667
3670
  */
3668
3671
  function scrollLegendToItem(legend, itemIx) {
3669
- var itemPage = legend.allItems[itemIx].pageIx,
3672
+ var itemPage = (legend.allItems[itemIx].legendItem || {}).pageIx,
3670
3673
  curPage = legend.currentPage;
3671
3674
  if (typeof itemPage !== 'undefined' && itemPage + 1 !== curPage) {
3672
3675
  legend.scroll(1 + itemPage - curPage);
@@ -3686,15 +3689,17 @@
3686
3689
  /**
3687
3690
  * @private
3688
3691
  */
3689
- function setLegendItemHoverState(hoverActive, legendItem) {
3690
- legendItem.setState(hoverActive ? 'hover' : '', true);
3691
- ['legendGroup', 'legendItem', 'legendSymbol'].forEach(function (i) {
3692
- var obj = legendItem[i];
3693
- var el = obj && obj.element || obj;
3694
- if (el) {
3695
- fireEvent(el, hoverActive ? 'mouseover' : 'mouseout');
3692
+ function setLegendItemHoverState(hoverActive, item) {
3693
+ var legendItem = item.legendItem || {};
3694
+ item.setState(hoverActive ? 'hover' : '', true);
3695
+ for (var _i = 0, _a = ['group', 'label', 'symbol']; _i < _a.length; _i++) {
3696
+ var key = _a[_i];
3697
+ var svgElement = legendItem[key];
3698
+ var element = svgElement && svgElement.element || svgElement;
3699
+ if (element) {
3700
+ fireEvent(element, hoverActive ? 'mouseover' : 'mouseout');
3696
3701
  }
3697
- });
3702
+ }
3698
3703
  }
3699
3704
  /* *
3700
3705
  *
@@ -3771,16 +3776,18 @@
3771
3776
  var items = legend.allItems || [];
3772
3777
  var curPage = legend.currentPage || 1;
3773
3778
  var clipHeight = legend.clipHeight || 0;
3779
+ var legendItem;
3774
3780
  items.forEach(function (item) {
3775
3781
  if (item.a11yProxyElement) {
3776
3782
  var hasPages = legend.pages && legend.pages.length;
3777
3783
  var proxyEl = item.a11yProxyElement.element;
3778
3784
  var hide = false;
3785
+ legendItem = item.legendItem || {};
3779
3786
  if (hasPages) {
3780
- var itemPage = item.pageIx || 0;
3781
- var y = item._legendItemPos ? item._legendItemPos[1] : 0;
3782
- var h = item.legendItem ?
3783
- Math.round(item.legendItem.getBBox().height) :
3787
+ var itemPage = legendItem.pageIx || 0;
3788
+ var y = legendItem.y || 0;
3789
+ var h = legendItem.label ?
3790
+ Math.round(legendItem.label.getBBox().height) :
3784
3791
  0;
3785
3792
  hide = y + h - legend.pages[itemPage] > clipHeight ||
3786
3793
  itemPage !== curPage - 1;
@@ -3818,15 +3825,17 @@
3818
3825
  var newPageIx = curPageIx + direction;
3819
3826
  var pages = legend.pages || [];
3820
3827
  if (newPageIx > 0 && newPageIx <= pages.length) {
3821
- var len = legend.allItems.length;
3822
- for (var i = 0; i < len; ++i) {
3823
- if (legend.allItems[i].pageIx + 1 === newPageIx) {
3824
- var res = chart.highlightLegendItem(i);
3828
+ var i = 0,
3829
+ res = void 0;
3830
+ for (var _i = 0, _a = legend.allItems; _i < _a.length; _i++) {
3831
+ var item = _a[_i];
3832
+ if (((item.legendItem || {}).pageIx || 0) + 1 === newPageIx) {
3833
+ res = chart.highlightLegendItem(i);
3825
3834
  if (res) {
3826
3835
  this.highlightedLegendItemIx = i;
3827
3836
  }
3828
- return;
3829
3837
  }
3838
+ ++i;
3830
3839
  }
3831
3840
  }
3832
3841
  };
@@ -3904,10 +3913,11 @@
3904
3913
  */
3905
3914
  LegendComponent.prototype.proxyLegendItems = function () {
3906
3915
  var component = this,
3907
- items = (this.chart.legend &&
3908
- this.chart.legend.allItems || []);
3916
+ items = (this.chart.legend || {}).allItems || [];
3917
+ var legendItem;
3909
3918
  items.forEach(function (item) {
3910
- if (item.legendItem && item.legendItem.element) {
3919
+ legendItem = item.legendItem || {};
3920
+ if (legendItem.label && legendItem.label.element) {
3911
3921
  component.proxyLegendItem(item);
3912
3922
  }
3913
3923
  });
@@ -3917,7 +3927,8 @@
3917
3927
  * @param {Highcharts.BubbleLegendItem|Point|Highcharts.Series} item
3918
3928
  */
3919
3929
  LegendComponent.prototype.proxyLegendItem = function (item) {
3920
- if (!item.legendItem || !item.legendGroup) {
3930
+ var legendItem = item.legendItem || {};
3931
+ if (!legendItem.label || !legendItem.group) {
3921
3932
  return;
3922
3933
  }
3923
3934
  var itemLabel = this.chart.langFormat('accessibility.legend.legendItem', {
@@ -3931,11 +3942,11 @@
3931
3942
  'aria-label': itemLabel
3932
3943
  };
3933
3944
  // Considers useHTML
3934
- var proxyPositioningElement = item.legendGroup.div ?
3935
- item.legendItem :
3936
- item.legendGroup;
3945
+ var proxyPositioningElement = legendItem.group.div ?
3946
+ legendItem.label :
3947
+ legendItem.group;
3937
3948
  item.a11yProxyElement = this.proxyProvider.addProxyElement('legend', {
3938
- click: item.legendItem,
3949
+ click: legendItem.label,
3939
3950
  visual: proxyPositioningElement.element
3940
3951
  }, attribs);
3941
3952
  };
@@ -3957,10 +3968,7 @@
3957
3968
  ],
3958
3969
  [
3959
3970
  [keys.enter, keys.space],
3960
- function (keyCode) {
3961
- if (H.isFirefox && keyCode === keys.space) { // #15520
3962
- return this.response.success;
3963
- }
3971
+ function () {
3964
3972
  return component.onKbdClick(this);
3965
3973
  }
3966
3974
  ],
@@ -4068,13 +4076,14 @@
4068
4076
  var items = this.legend.allItems;
4069
4077
  var oldIx = this.accessibility &&
4070
4078
  this.accessibility.components.legend.highlightedLegendItemIx;
4071
- var itemToHighlight = items[ix];
4079
+ var itemToHighlight = items[ix],
4080
+ legendItem = itemToHighlight.legendItem || {};
4072
4081
  if (itemToHighlight) {
4073
4082
  if (isNumber(oldIx) && items[oldIx]) {
4074
4083
  setLegendItemHoverState(false, items[oldIx]);
4075
4084
  }
4076
4085
  scrollLegendToItem(this.legend, ix);
4077
- var legendItemProp = itemToHighlight.legendItem;
4086
+ var legendItemProp = legendItem.label;
4078
4087
  var proxyBtn = itemToHighlight.a11yProxyElement &&
4079
4088
  itemToHighlight.a11yProxyElement.buttonElement;
4080
4089
  if (legendItemProp && legendItemProp.element && proxyBtn) {
@@ -4169,11 +4178,11 @@
4169
4178
  }) || null;
4170
4179
  }
4171
4180
  /**
4172
- * Whether or not we should add a dummy point element in
4181
+ * Whether or not we should add a mock point element in
4173
4182
  * order to describe a point that has no graphic.
4174
4183
  * @private
4175
4184
  */
4176
- function shouldAddDummyPoint(point) {
4185
+ function shouldAddMockPoint(point) {
4177
4186
  // Note: Sunburst series use isNull for hidden points on drilldown.
4178
4187
  // Ignore these.
4179
4188
  var series = point.series,
@@ -4188,30 +4197,30 @@
4188
4197
  /**
4189
4198
  * @private
4190
4199
  */
4191
- function makeDummyElement(point, pos) {
4200
+ function makeMockElement(point, pos) {
4192
4201
  var renderer = point.series.chart.renderer,
4193
- dummy = renderer.rect(pos.x,
4202
+ mock = renderer.rect(pos.x,
4194
4203
  pos.y, 1, 1);
4195
- dummy.attr({
4196
- 'class': 'highcharts-a11y-dummy-point',
4204
+ mock.attr({
4205
+ 'class': 'highcharts-a11y-mock-point',
4197
4206
  fill: 'none',
4198
4207
  opacity: 0,
4199
4208
  'fill-opacity': 0,
4200
4209
  'stroke-opacity': 0
4201
4210
  });
4202
- return dummy;
4211
+ return mock;
4203
4212
  }
4204
4213
  /**
4205
4214
  * @private
4206
4215
  */
4207
- function addDummyPointElement(point) {
4216
+ function addMockPointElement(point) {
4208
4217
  var series = point.series,
4209
4218
  firstPointWithGraphic = findFirstPointWithGraphic(point),
4210
4219
  firstGraphic = firstPointWithGraphic && firstPointWithGraphic.graphic,
4211
4220
  parentGroup = firstGraphic ?
4212
4221
  firstGraphic.parentGroup :
4213
4222
  series.graph || series.group,
4214
- dummyPos = firstPointWithGraphic ? {
4223
+ mockPos = firstPointWithGraphic ? {
4215
4224
  x: pick(point.plotX,
4216
4225
  firstPointWithGraphic.plotX, 0),
4217
4226
  y: pick(point.plotY,
@@ -4220,15 +4229,15 @@
4220
4229
  x: pick(point.plotX, 0),
4221
4230
  y: pick(point.plotY, 0)
4222
4231
  },
4223
- dummyElement = makeDummyElement(point,
4224
- dummyPos);
4232
+ mockElement = makeMockElement(point,
4233
+ mockPos);
4225
4234
  if (parentGroup && parentGroup.element) {
4226
- point.graphic = dummyElement;
4227
- point.hasDummyGraphic = true;
4228
- dummyElement.add(parentGroup);
4235
+ point.graphic = mockElement;
4236
+ point.hasMockGraphic = true;
4237
+ mockElement.add(parentGroup);
4229
4238
  // Move to correct pos in DOM
4230
- parentGroup.element.insertBefore(dummyElement.element, firstGraphic ? firstGraphic.element : null);
4231
- return dummyElement.element;
4239
+ parentGroup.element.insertBefore(mockElement.element, firstGraphic ? firstGraphic.element : null);
4240
+ return mockElement.element;
4232
4241
  }
4233
4242
  }
4234
4243
  /**
@@ -4471,7 +4480,7 @@
4471
4480
  if (setScreenReaderProps || setKeyboardProps) {
4472
4481
  series.points.forEach(function (point) {
4473
4482
  var pointEl = point.graphic && point.graphic.element ||
4474
- shouldAddDummyPoint(point) && addDummyPointElement(point),
4483
+ shouldAddMockPoint(point) && addMockPointElement(point),
4475
4484
  pointA11yDisabled = (point.options &&
4476
4485
  point.options.accessibility &&
4477
4486
  point.options.accessibility.enabled === false);
@@ -5467,7 +5476,7 @@
5467
5476
 
5468
5477
  return ProxyProvider;
5469
5478
  });
5470
- _registerModule(_modules, 'Extensions/RangeSelector.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (Axis, Chart, H, D, SVGElement, U) {
5479
+ _registerModule(_modules, 'Stock/RangeSelector/RangeSelectorDefaults.js', [], function () {
5471
5480
  /* *
5472
5481
  *
5473
5482
  * (c) 2010-2021 Torstein Honsi
@@ -5477,65 +5486,67 @@
5477
5486
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
5478
5487
  *
5479
5488
  * */
5480
- var defaultOptions = D.defaultOptions;
5481
- var addEvent = U.addEvent,
5482
- createElement = U.createElement,
5483
- css = U.css,
5484
- defined = U.defined,
5485
- destroyObjectProperties = U.destroyObjectProperties,
5486
- discardElement = U.discardElement,
5487
- extend = U.extend,
5488
- find = U.find,
5489
- fireEvent = U.fireEvent,
5490
- isNumber = U.isNumber,
5491
- merge = U.merge,
5492
- objectEach = U.objectEach,
5493
- pad = U.pad,
5494
- pick = U.pick,
5495
- pInt = U.pInt,
5496
- splat = U.splat;
5497
- /**
5498
- * Define the time span for the button
5489
+ /* *
5499
5490
  *
5500
- * @typedef {"all"|"day"|"hour"|"millisecond"|"minute"|"month"|"second"|"week"|"year"|"ytd"} Highcharts.RangeSelectorButtonTypeValue
5501
- */
5502
- /**
5503
- * Callback function to react on button clicks.
5491
+ * Declarations
5504
5492
  *
5505
- * @callback Highcharts.RangeSelectorClickCallbackFunction
5493
+ * */
5494
+ /**
5495
+ * Language object. The language object is global and it can't be set
5496
+ * on each chart initialization. Instead, use `Highcharts.setOptions` to
5497
+ * set it before any chart is initialized.
5506
5498
  *
5507
- * @param {global.Event} e
5508
- * Event arguments.
5499
+ * ```js
5500
+ * Highcharts.setOptions({
5501
+ * lang: {
5502
+ * months: [
5503
+ * 'Janvier', 'Février', 'Mars', 'Avril',
5504
+ * 'Mai', 'Juin', 'Juillet', 'Août',
5505
+ * 'Septembre', 'Octobre', 'Novembre', 'Décembre'
5506
+ * ],
5507
+ * weekdays: [
5508
+ * 'Dimanche', 'Lundi', 'Mardi', 'Mercredi',
5509
+ * 'Jeudi', 'Vendredi', 'Samedi'
5510
+ * ]
5511
+ * }
5512
+ * });
5513
+ * ```
5509
5514
  *
5510
- * @param {boolean|undefined}
5511
- * Return false to cancel the default button event.
5515
+ * @optionparent lang
5512
5516
  */
5517
+ var lang = {
5518
+ /**
5519
+ * The text for the label for the range selector buttons.
5520
+ *
5521
+ * @product highstock gantt
5522
+ */
5523
+ rangeSelectorZoom: 'Zoom',
5524
+ /**
5525
+ * The text for the label for the "from" input box in the range
5526
+ * selector. Since v9.0,
5527
+ this string is empty as the label is not
5528
+ * rendered by default.
5529
+ *
5530
+ * @product highstock gantt
5531
+ */
5532
+ rangeSelectorFrom: '',
5533
+ /**
5534
+ * The text for the label for the "to" input box in the range selector.
5535
+ *
5536
+ * @product highstock gantt
5537
+ */
5538
+ rangeSelectorTo: '→'
5539
+ };
5513
5540
  /**
5514
- * Callback function to parse values entered in the input boxes and return a
5515
- * valid JavaScript time as milliseconds since 1970.
5516
- *
5517
- * @callback Highcharts.RangeSelectorParseCallbackFunction
5518
- *
5519
- * @param {string} value
5520
- * Input value to parse.
5541
+ * The range selector is a tool for selecting ranges to display within
5542
+ * the chart. It provides buttons to select preconfigured ranges in
5543
+ * the chart, like 1 day, 1 week, 1 month etc. It also provides input
5544
+ * boxes where min and max dates can be manually input.
5521
5545
  *
5522
- * @return {number}
5523
- * Parsed JavaScript time value.
5546
+ * @product highstock gantt
5547
+ * @optionparent rangeSelector
5524
5548
  */
5525
- /* ************************************************************************** *
5526
- * Start Range Selector code *
5527
- * ************************************************************************** */
5528
- extend(defaultOptions, {
5529
- /**
5530
- * The range selector is a tool for selecting ranges to display within
5531
- * the chart. It provides buttons to select preconfigured ranges in
5532
- * the chart, like 1 day, 1 week, 1 month etc. It also provides input
5533
- * boxes where min and max dates can be manually input.
5534
- *
5535
- * @product highstock gantt
5536
- * @optionparent rangeSelector
5537
- */
5538
- rangeSelector: {
5549
+ var rangeSelector = {
5539
5550
  /**
5540
5551
  * Whether to enable all buttons from the start. By default buttons are
5541
5552
  * only enabled if the corresponding time range exists on the X axis,
@@ -5592,7 +5603,8 @@
5592
5603
  buttons: void 0,
5593
5604
  /**
5594
5605
  * How many units of the defined type the button should span. If `type`
5595
- * is "month" and `count` is 3, the button spans three months.
5606
+ * is "month" and `count` is 3,
5607
+ the button spans three months.
5596
5608
  *
5597
5609
  * @type {number}
5598
5610
  * @default 1
@@ -5600,431 +5612,770 @@
5600
5612
  */
5601
5613
  /**
5602
5614
  * Fires when clicking on the rangeSelector button. One parameter,
5603
- * event, is passed to the function, containing common event
5615
+ * event,
5616
+ is passed to the function,
5617
+ containing common event
5604
5618
  * information.
5605
5619
  *
5606
5620
  * ```js
5607
5621
  * click: function(e) {
5608
5622
  * console.log(this);
5609
- * }
5610
- * ```
5611
- *
5612
- * Return false to stop default button's click action.
5613
- *
5614
- * @sample {highstock} stock/rangeselector/button-click/
5615
- * Click event on the button
5616
- *
5617
- * @type {Highcharts.RangeSelectorClickCallbackFunction}
5618
- * @apioption rangeSelector.buttons.events.click
5619
- */
5620
- /**
5621
- * Additional range (in milliseconds) added to the end of the calculated
5622
- * time span.
5623
- *
5624
- * @sample {highstock} stock/rangeselector/min-max-offsets/
5625
- * Button offsets
5626
- *
5627
- * @type {number}
5628
- * @default 0
5629
- * @since 6.0.0
5630
- * @apioption rangeSelector.buttons.offsetMax
5631
- */
5632
- /**
5633
- * Additional range (in milliseconds) added to the start of the
5634
- * calculated time span.
5635
- *
5636
- * @sample {highstock} stock/rangeselector/min-max-offsets/
5637
- * Button offsets
5638
- *
5639
- * @type {number}
5640
- * @default 0
5641
- * @since 6.0.0
5642
- * @apioption rangeSelector.buttons.offsetMin
5643
- */
5644
- /**
5645
- * When buttons apply dataGrouping on a series, by default zooming
5646
- * in/out will deselect buttons and unset dataGrouping. Enable this
5647
- * option to keep buttons selected when extremes change.
5648
- *
5649
- * @sample {highstock} stock/rangeselector/preserve-datagrouping/
5650
- * Different preserveDataGrouping settings
5651
- *
5652
- * @type {boolean}
5653
- * @default false
5654
- * @since 6.1.2
5655
- * @apioption rangeSelector.buttons.preserveDataGrouping
5656
- */
5657
- /**
5658
- * A custom data grouping object for each button.
5659
- *
5660
- * @see [series.dataGrouping](#plotOptions.series.dataGrouping)
5661
- *
5662
- * @sample {highstock} stock/rangeselector/datagrouping/
5663
- * Data grouping by range selector buttons
5664
- *
5665
- * @type {*}
5666
- * @extends plotOptions.series.dataGrouping
5667
- * @apioption rangeSelector.buttons.dataGrouping
5668
- */
5669
- /**
5670
- * The text for the button itself.
5671
- *
5672
- * @type {string}
5673
- * @apioption rangeSelector.buttons.text
5674
- */
5675
- /**
5676
- * Explanation for the button, shown as a tooltip on hover, and used by
5677
- * assistive technology.
5678
- *
5679
- * @type {string}
5680
- * @apioption rangeSelector.buttons.title
5681
- */
5682
- /**
5683
- * Defined the time span for the button. Can be one of `millisecond`,
5684
- * `second`, `minute`, `hour`, `day`, `week`, `month`, `year`, `ytd`,
5685
- * and `all`.
5686
- *
5687
- * @type {Highcharts.RangeSelectorButtonTypeValue}
5688
- * @apioption rangeSelector.buttons.type
5689
- */
5690
- /**
5691
- * The space in pixels between the buttons in the range selector.
5692
- */
5693
- buttonSpacing: 5,
5694
- /**
5695
- * Whether to collapse the range selector buttons into a dropdown when
5696
- * there is not enough room to show everything in a single row, instead
5697
- * of dividing the range selector into multiple rows.
5698
- * Can be one of the following:
5699
- * - `always`: Always collapse
5700
- * - `responsive`: Only collapse when there is not enough room
5701
- * - `never`: Never collapse
5702
- *
5703
- * @sample {highstock} stock/rangeselector/dropdown/
5704
- * Dropdown option
5705
- *
5706
- * @validvalue ["always", "responsive", "never"]
5707
- * @since 9.0.0
5708
- */
5709
- dropdown: 'responsive',
5710
- /**
5711
- * Enable or disable the range selector. Default to `true` for stock
5712
- * charts, using the `stockChart` factory.
5713
- *
5714
- * @sample {highstock} stock/rangeselector/enabled/
5715
- * Disable the range selector
5716
- *
5717
- * @type {boolean|undefined}
5718
- * @default {highstock} true
5719
- */
5720
- enabled: void 0,
5623
+ * }
5624
+ * ```
5625
+ *
5626
+ * Return false to stop default button's click action.
5627
+ *
5628
+ * @sample {highstock} stock/rangeselector/button-click/
5629
+ * Click event on the button
5630
+ *
5631
+ * @type {Highcharts.RangeSelectorClickCallbackFunction}
5632
+ * @apioption rangeSelector.buttons.events.click
5633
+ */
5634
+ /**
5635
+ * Additional range (in milliseconds) added to the end of the calculated
5636
+ * time span.
5637
+ *
5638
+ * @sample {highstock} stock/rangeselector/min-max-offsets/
5639
+ * Button offsets
5640
+ *
5641
+ * @type {number}
5642
+ * @default 0
5643
+ * @since 6.0.0
5644
+ * @apioption rangeSelector.buttons.offsetMax
5645
+ */
5646
+ /**
5647
+ * Additional range (in milliseconds) added to the start of the
5648
+ * calculated time span.
5649
+ *
5650
+ * @sample {highstock} stock/rangeselector/min-max-offsets/
5651
+ * Button offsets
5652
+ *
5653
+ * @type {number}
5654
+ * @default 0
5655
+ * @since 6.0.0
5656
+ * @apioption rangeSelector.buttons.offsetMin
5657
+ */
5658
+ /**
5659
+ * When buttons apply dataGrouping on a series, by default zooming
5660
+ * in/out will deselect buttons and unset dataGrouping. Enable this
5661
+ * option to keep buttons selected when extremes change.
5662
+ *
5663
+ * @sample {highstock} stock/rangeselector/preserve-datagrouping/
5664
+ * Different preserveDataGrouping settings
5665
+ *
5666
+ * @type {boolean}
5667
+ * @default false
5668
+ * @since 6.1.2
5669
+ * @apioption rangeSelector.buttons.preserveDataGrouping
5670
+ */
5671
+ /**
5672
+ * A custom data grouping object for each button.
5673
+ *
5674
+ * @see [series.dataGrouping](#plotOptions.series.dataGrouping)
5675
+ *
5676
+ * @sample {highstock} stock/rangeselector/datagrouping/
5677
+ * Data grouping by range selector buttons
5678
+ *
5679
+ * @type {*}
5680
+ * @extends plotOptions.series.dataGrouping
5681
+ * @apioption rangeSelector.buttons.dataGrouping
5682
+ */
5683
+ /**
5684
+ * The text for the button itself.
5685
+ *
5686
+ * @type {string}
5687
+ * @apioption rangeSelector.buttons.text
5688
+ */
5689
+ /**
5690
+ * Explanation for the button, shown as a tooltip on hover, and used by
5691
+ * assistive technology.
5692
+ *
5693
+ * @type {string}
5694
+ * @apioption rangeSelector.buttons.title
5695
+ */
5696
+ /**
5697
+ * Defined the time span for the button. Can be one of `millisecond`,
5698
+ * `second`, `minute`, `hour`, `day`, `week`, `month`, `year`, `ytd`,
5699
+ * and `all`.
5700
+ *
5701
+ * @type {Highcharts.RangeSelectorButtonTypeValue}
5702
+ * @apioption rangeSelector.buttons.type
5703
+ */
5704
+ /**
5705
+ * The space in pixels between the buttons in the range selector.
5706
+ */
5707
+ buttonSpacing: 5,
5708
+ /**
5709
+ * Whether to collapse the range selector buttons into a dropdown when
5710
+ * there is not enough room to show everything in a single row, instead
5711
+ * of dividing the range selector into multiple rows.
5712
+ * Can be one of the following:
5713
+ * - `always`: Always collapse
5714
+ * - `responsive`: Only collapse when there is not enough room
5715
+ * - `never`: Never collapse
5716
+ *
5717
+ * @sample {highstock} stock/rangeselector/dropdown/
5718
+ * Dropdown option
5719
+ *
5720
+ * @validvalue ["always", "responsive", "never"]
5721
+ * @since 9.0.0
5722
+ */
5723
+ dropdown: 'responsive',
5724
+ /**
5725
+ * Enable or disable the range selector. Default to `true` for stock
5726
+ * charts, using the `stockChart` factory.
5727
+ *
5728
+ * @sample {highstock} stock/rangeselector/enabled/
5729
+ * Disable the range selector
5730
+ *
5731
+ * @type {boolean|undefined}
5732
+ * @default {highstock} true
5733
+ */
5734
+ enabled: void 0,
5735
+ /**
5736
+ * The vertical alignment of the rangeselector box. Allowed properties
5737
+ * are `top`, `middle`, `bottom`.
5738
+ *
5739
+ * @sample {highstock} stock/rangeselector/vertical-align-middle/
5740
+ * Middle
5741
+ * @sample {highstock} stock/rangeselector/vertical-align-bottom/
5742
+ * Bottom
5743
+ *
5744
+ * @type {Highcharts.VerticalAlignValue}
5745
+ * @since 6.0.0
5746
+ */
5747
+ verticalAlign: 'top',
5748
+ /**
5749
+ * A collection of attributes for the buttons. The object takes SVG
5750
+ * attributes like `fill`, `stroke`, `stroke-width`, as well as `style`,
5751
+ * a collection of CSS properties for the text.
5752
+ *
5753
+ * The object can also be extended with states, so you can set
5754
+ * presentational options for `hover`, `select` or `disabled` button
5755
+ * states.
5756
+ *
5757
+ * CSS styles for the text label.
5758
+ *
5759
+ * In styled mode, the buttons are styled by the
5760
+ * `.highcharts-range-selector-buttons .highcharts-button` rule with its
5761
+ * different states.
5762
+ *
5763
+ * @sample {highstock} stock/rangeselector/styling/
5764
+ * Styling the buttons and inputs
5765
+ *
5766
+ * @type {Highcharts.SVGAttributes}
5767
+ */
5768
+ buttonTheme: {
5769
+ /** @ignore */
5770
+ width: 28,
5771
+ /** @ignore */
5772
+ height: 18,
5773
+ /** @ignore */
5774
+ padding: 2,
5775
+ /** @ignore */
5776
+ zIndex: 7 // #484, #852
5777
+ },
5778
+ /**
5779
+ * When the rangeselector is floating, the plot area does not reserve
5780
+ * space for it. This opens for positioning anywhere on the chart.
5781
+ *
5782
+ * @sample {highstock} stock/rangeselector/floating/
5783
+ * Placing the range selector between the plot area and the
5784
+ * navigator
5785
+ *
5786
+ * @since 6.0.0
5787
+ */
5788
+ floating: false,
5789
+ /**
5790
+ * The x offset of the range selector relative to its horizontal
5791
+ * alignment within `chart.spacingLeft` and `chart.spacingRight`.
5792
+ *
5793
+ * @since 6.0.0
5794
+ */
5795
+ x: 0,
5796
+ /**
5797
+ * The y offset of the range selector relative to its horizontal
5798
+ * alignment within `chart.spacingLeft` and `chart.spacingRight`.
5799
+ *
5800
+ * @since 6.0.0
5801
+ */
5802
+ y: 0,
5803
+ /**
5804
+ * Deprecated. The height of the range selector. Currently it is
5805
+ * calculated dynamically.
5806
+ *
5807
+ * @deprecated
5808
+ * @type {number|undefined}
5809
+ * @since 2.1.9
5810
+ */
5811
+ height: void 0,
5812
+ /**
5813
+ * The border color of the date input boxes.
5814
+ *
5815
+ * @sample {highstock} stock/rangeselector/styling/
5816
+ * Styling the buttons and inputs
5817
+ *
5818
+ * @type {Highcharts.ColorString}
5819
+ * @since 1.3.7
5820
+ */
5821
+ inputBoxBorderColor: 'none',
5822
+ /**
5823
+ * The pixel height of the date input boxes.
5824
+ *
5825
+ * @sample {highstock} stock/rangeselector/styling/
5826
+ * Styling the buttons and inputs
5827
+ *
5828
+ * @since 1.3.7
5829
+ */
5830
+ inputBoxHeight: 17,
5831
+ /**
5832
+ * The pixel width of the date input boxes. When `undefined`, the width
5833
+ * is fitted to the rendered content.
5834
+ *
5835
+ * @sample {highstock} stock/rangeselector/styling/
5836
+ * Styling the buttons and inputs
5837
+ *
5838
+ * @type {number|undefined}
5839
+ * @since 1.3.7
5840
+ */
5841
+ inputBoxWidth: void 0,
5842
+ /**
5843
+ * The date format in the input boxes when not selected for editing.
5844
+ * Defaults to `%b %e, %Y`.
5845
+ *
5846
+ * This is used to determine which type of input to show,
5847
+ * `datetime-local`, `date` or `time` and falling back to `text` when
5848
+ * the browser does not support the input type or the format contains
5849
+ * milliseconds.
5850
+ *
5851
+ * @sample {highstock} stock/rangeselector/input-type/
5852
+ * Input types
5853
+ * @sample {highstock} stock/rangeselector/input-format/
5854
+ * Milliseconds in the range selector
5855
+ *
5856
+ */
5857
+ inputDateFormat: '%b %e, %Y',
5858
+ /**
5859
+ * A custom callback function to parse values entered in the input boxes
5860
+ * and return a valid JavaScript time as milliseconds since 1970.
5861
+ * The first argument passed is a value to parse,
5862
+ * second is a boolean indicating use of the UTC time.
5863
+ *
5864
+ * This will only get called for inputs of type `text`. Since v8.2.3,
5865
+ * the input type is dynamically determined based on the granularity
5866
+ * of the `inputDateFormat` and the browser support.
5867
+ *
5868
+ * @sample {highstock} stock/rangeselector/input-format/
5869
+ * Milliseconds in the range selector
5870
+ *
5871
+ * @type {Highcharts.RangeSelectorParseCallbackFunction}
5872
+ * @since 1.3.3
5873
+ */
5874
+ inputDateParser: void 0,
5875
+ /**
5876
+ * The date format in the input boxes when they are selected for
5877
+ * editing. This must be a format that is recognized by JavaScript
5878
+ * Date.parse.
5879
+ *
5880
+ * This will only be used for inputs of type `text`. Since v8.2.3,
5881
+ * the input type is dynamically determined based on the granularity
5882
+ * of the `inputDateFormat` and the browser support.
5883
+ *
5884
+ * @sample {highstock} stock/rangeselector/input-format/
5885
+ * Milliseconds in the range selector
5886
+ *
5887
+ */
5888
+ inputEditDateFormat: '%Y-%m-%d',
5889
+ /**
5890
+ * Enable or disable the date input boxes.
5891
+ */
5892
+ inputEnabled: true,
5893
+ /**
5894
+ * Positioning for the input boxes. Allowed properties are `align`,
5895
+ * `x` and `y`.
5896
+ *
5897
+ * @since 1.2.4
5898
+ */
5899
+ inputPosition: {
5721
5900
  /**
5722
- * The vertical alignment of the rangeselector box. Allowed properties
5723
- * are `top`, `middle`, `bottom`.
5901
+ * The alignment of the input box. Allowed properties are `left`,
5902
+ * `center`, `right`.
5724
5903
  *
5725
- * @sample {highstock} stock/rangeselector/vertical-align-middle/
5726
- * Middle
5727
- * @sample {highstock} stock/rangeselector/vertical-align-bottom/
5728
- * Bottom
5904
+ * @sample {highstock} stock/rangeselector/input-button-position/
5905
+ * Alignment
5729
5906
  *
5730
- * @type {Highcharts.VerticalAlignValue}
5907
+ * @type {Highcharts.AlignValue}
5731
5908
  * @since 6.0.0
5732
5909
  */
5733
- verticalAlign: 'top',
5910
+ align: 'right',
5734
5911
  /**
5735
- * A collection of attributes for the buttons. The object takes SVG
5736
- * attributes like `fill`, `stroke`, `stroke-width`, as well as `style`,
5737
- * a collection of CSS properties for the text.
5738
- *
5739
- * The object can also be extended with states, so you can set
5740
- * presentational options for `hover`, `select` or `disabled` button
5741
- * states.
5742
- *
5743
- * CSS styles for the text label.
5744
- *
5745
- * In styled mode, the buttons are styled by the
5746
- * `.highcharts-range-selector-buttons .highcharts-button` rule with its
5747
- * different states.
5748
- *
5749
- * @sample {highstock} stock/rangeselector/styling/
5750
- * Styling the buttons and inputs
5751
- *
5752
- * @type {Highcharts.SVGAttributes}
5912
+ * X offset of the input row.
5753
5913
  */
5754
- buttonTheme: {
5755
- /** @ignore */
5756
- width: 28,
5757
- /** @ignore */
5758
- height: 18,
5759
- /** @ignore */
5760
- padding: 2,
5761
- /** @ignore */
5762
- zIndex: 7 // #484, #852
5763
- },
5914
+ x: 0,
5764
5915
  /**
5765
- * When the rangeselector is floating, the plot area does not reserve
5766
- * space for it. This opens for positioning anywhere on the chart.
5767
- *
5768
- * @sample {highstock} stock/rangeselector/floating/
5769
- * Placing the range selector between the plot area and the
5770
- * navigator
5771
- *
5772
- * @since 6.0.0
5916
+ * Y offset of the input row.
5773
5917
  */
5774
- floating: false,
5918
+ y: 0
5919
+ },
5920
+ /**
5921
+ * The space in pixels between the labels and the date input boxes in
5922
+ * the range selector.
5923
+ *
5924
+ * @since 9.0.0
5925
+ */
5926
+ inputSpacing: 5,
5927
+ /**
5928
+ * The index of the button to appear pre-selected.
5929
+ *
5930
+ * @type {number}
5931
+ */
5932
+ selected: void 0,
5933
+ /**
5934
+ * Positioning for the button row.
5935
+ *
5936
+ * @since 1.2.4
5937
+ */
5938
+ buttonPosition: {
5775
5939
  /**
5776
- * The x offset of the range selector relative to its horizontal
5777
- * alignment within `chart.spacingLeft` and `chart.spacingRight`.
5940
+ * The alignment of the input box. Allowed properties are `left`,
5941
+ * `center`, `right`.
5778
5942
  *
5779
- * @since 6.0.0
5780
- */
5781
- x: 0,
5782
- /**
5783
- * The y offset of the range selector relative to its horizontal
5784
- * alignment within `chart.spacingLeft` and `chart.spacingRight`.
5943
+ * @sample {highstock} stock/rangeselector/input-button-position/
5944
+ * Alignment
5785
5945
  *
5946
+ * @type {Highcharts.AlignValue}
5786
5947
  * @since 6.0.0
5787
5948
  */
5788
- y: 0,
5949
+ align: 'left',
5789
5950
  /**
5790
- * Deprecated. The height of the range selector. Currently it is
5791
- * calculated dynamically.
5792
- *
5793
- * @deprecated
5794
- * @type {number|undefined}
5795
- * @since 2.1.9
5951
+ * X offset of the button row.
5796
5952
  */
5797
- height: void 0,
5953
+ x: 0,
5798
5954
  /**
5799
- * The border color of the date input boxes.
5800
- *
5801
- * @sample {highstock} stock/rangeselector/styling/
5802
- * Styling the buttons and inputs
5803
- *
5804
- * @type {Highcharts.ColorString}
5805
- * @since 1.3.7
5955
+ * Y offset of the button row.
5806
5956
  */
5807
- inputBoxBorderColor: 'none',
5808
- /**
5809
- * The pixel height of the date input boxes.
5810
- *
5811
- * @sample {highstock} stock/rangeselector/styling/
5812
- * Styling the buttons and inputs
5813
- *
5814
- * @since 1.3.7
5815
- */
5816
- inputBoxHeight: 17,
5817
- /**
5818
- * The pixel width of the date input boxes. When `undefined`, the width
5819
- * is fitted to the rendered content.
5820
- *
5821
- * @sample {highstock} stock/rangeselector/styling/
5822
- * Styling the buttons and inputs
5823
- *
5824
- * @type {number|undefined}
5825
- * @since 1.3.7
5826
- */
5827
- inputBoxWidth: void 0,
5828
- /**
5829
- * The date format in the input boxes when not selected for editing.
5830
- * Defaults to `%b %e, %Y`.
5831
- *
5832
- * This is used to determine which type of input to show,
5833
- * `datetime-local`, `date` or `time` and falling back to `text` when
5834
- * the browser does not support the input type or the format contains
5835
- * milliseconds.
5836
- *
5837
- * @sample {highstock} stock/rangeselector/input-type/
5838
- * Input types
5839
- * @sample {highstock} stock/rangeselector/input-format/
5840
- * Milliseconds in the range selector
5841
- *
5842
- */
5843
- inputDateFormat: '%b %e, %Y',
5844
- /**
5845
- * A custom callback function to parse values entered in the input boxes
5846
- * and return a valid JavaScript time as milliseconds since 1970.
5847
- * The first argument passed is a value to parse,
5848
- * second is a boolean indicating use of the UTC time.
5849
- *
5850
- * This will only get called for inputs of type `text`. Since v8.2.3,
5851
- * the input type is dynamically determined based on the granularity
5852
- * of the `inputDateFormat` and the browser support.
5853
- *
5854
- * @sample {highstock} stock/rangeselector/input-format/
5855
- * Milliseconds in the range selector
5856
- *
5857
- * @type {Highcharts.RangeSelectorParseCallbackFunction}
5858
- * @since 1.3.3
5859
- */
5860
- inputDateParser: void 0,
5861
- /**
5862
- * The date format in the input boxes when they are selected for
5863
- * editing. This must be a format that is recognized by JavaScript
5864
- * Date.parse.
5865
- *
5866
- * This will only be used for inputs of type `text`. Since v8.2.3,
5867
- * the input type is dynamically determined based on the granularity
5868
- * of the `inputDateFormat` and the browser support.
5869
- *
5870
- * @sample {highstock} stock/rangeselector/input-format/
5871
- * Milliseconds in the range selector
5872
- *
5873
- */
5874
- inputEditDateFormat: '%Y-%m-%d',
5875
- /**
5876
- * Enable or disable the date input boxes.
5877
- */
5878
- inputEnabled: true,
5879
- /**
5880
- * Positioning for the input boxes. Allowed properties are `align`,
5881
- * `x` and `y`.
5882
- *
5883
- * @since 1.2.4
5884
- */
5885
- inputPosition: {
5886
- /**
5887
- * The alignment of the input box. Allowed properties are `left`,
5888
- * `center`, `right`.
5889
- *
5890
- * @sample {highstock} stock/rangeselector/input-button-position/
5891
- * Alignment
5892
- *
5893
- * @type {Highcharts.AlignValue}
5894
- * @since 6.0.0
5895
- */
5896
- align: 'right',
5897
- /**
5898
- * X offset of the input row.
5899
- */
5900
- x: 0,
5901
- /**
5902
- * Y offset of the input row.
5903
- */
5904
- y: 0
5905
- },
5906
- /**
5907
- * The space in pixels between the labels and the date input boxes in
5908
- * the range selector.
5909
- *
5910
- * @since 9.0.0
5911
- */
5912
- inputSpacing: 5,
5913
- /**
5914
- * The index of the button to appear pre-selected.
5915
- *
5916
- * @type {number}
5917
- */
5918
- selected: void 0,
5919
- /**
5920
- * Positioning for the button row.
5921
- *
5922
- * @since 1.2.4
5923
- */
5924
- buttonPosition: {
5925
- /**
5926
- * The alignment of the input box. Allowed properties are `left`,
5927
- * `center`, `right`.
5928
- *
5929
- * @sample {highstock} stock/rangeselector/input-button-position/
5930
- * Alignment
5931
- *
5932
- * @type {Highcharts.AlignValue}
5933
- * @since 6.0.0
5934
- */
5935
- align: 'left',
5936
- /**
5937
- * X offset of the button row.
5938
- */
5939
- x: 0,
5940
- /**
5941
- * Y offset of the button row.
5942
- */
5943
- y: 0
5944
- },
5945
- /**
5946
- * CSS for the HTML inputs in the range selector.
5947
- *
5948
- * In styled mode, the inputs are styled by the
5949
- * `.highcharts-range-input text` rule in SVG mode, and
5950
- * `input.highcharts-range-selector` when active.
5951
- *
5952
- * @sample {highstock} stock/rangeselector/styling/
5953
- * Styling the buttons and inputs
5954
- *
5955
- * @type {Highcharts.CSSObject}
5956
- * @apioption rangeSelector.inputStyle
5957
- */
5958
- inputStyle: {
5959
- /** @ignore */
5960
- color: "#335cad" /* Palette.highlightColor80 */,
5961
- /** @ignore */
5962
- cursor: 'pointer'
5963
- },
5964
- /**
5965
- * CSS styles for the labels - the Zoom, From and To texts.
5966
- *
5967
- * In styled mode, the labels are styled by the
5968
- * `.highcharts-range-label` class.
5969
- *
5970
- * @sample {highstock} stock/rangeselector/styling/
5971
- * Styling the buttons and inputs
5972
- *
5973
- * @type {Highcharts.CSSObject}
5974
- */
5975
- labelStyle: {
5976
- /** @ignore */
5977
- color: "#666666" /* Palette.neutralColor60 */
5957
+ y: 0
5958
+ },
5959
+ /**
5960
+ * CSS for the HTML inputs in the range selector.
5961
+ *
5962
+ * In styled mode, the inputs are styled by the
5963
+ * `.highcharts-range-input text` rule in SVG mode, and
5964
+ * `input.highcharts-range-selector` when active.
5965
+ *
5966
+ * @sample {highstock} stock/rangeselector/styling/
5967
+ * Styling the buttons and inputs
5968
+ *
5969
+ * @type {Highcharts.CSSObject}
5970
+ * @apioption rangeSelector.inputStyle
5971
+ */
5972
+ inputStyle: {
5973
+ /** @ignore */
5974
+ color: "#335cad" /* Palette.highlightColor80 */,
5975
+ /** @ignore */
5976
+ cursor: 'pointer'
5977
+ },
5978
+ /**
5979
+ * CSS styles for the labels - the Zoom, From and To texts.
5980
+ *
5981
+ * In styled mode, the labels are styled by the
5982
+ * `.highcharts-range-label` class.
5983
+ *
5984
+ * @sample {highstock} stock/rangeselector/styling/
5985
+ * Styling the buttons and inputs
5986
+ *
5987
+ * @type {Highcharts.CSSObject}
5988
+ */
5989
+ labelStyle: {
5990
+ /** @ignore */
5991
+ color: "#666666" /* Palette.neutralColor60 */
5992
+ }
5993
+ };
5994
+ /* *
5995
+ *
5996
+ * Default Export
5997
+ *
5998
+ * */
5999
+ var RangeSelectorDefaults = {
6000
+ lang: lang,
6001
+ rangeSelector: rangeSelector
6002
+ };
6003
+
6004
+ return RangeSelectorDefaults;
6005
+ });
6006
+ _registerModule(_modules, 'Stock/RangeSelector/RangeSelectorComposition.js', [_modules['Core/Defaults.js'], _modules['Stock/RangeSelector/RangeSelectorDefaults.js'], _modules['Core/Utilities.js']], function (D, RangeSelectorDefaults, U) {
6007
+ /* *
6008
+ *
6009
+ * (c) 2010-2021 Torstein Honsi
6010
+ *
6011
+ * License: www.highcharts.com/license
6012
+ *
6013
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
6014
+ *
6015
+ * */
6016
+ var defaultOptions = D.defaultOptions,
6017
+ setOptions = D.setOptions;
6018
+ var addEvent = U.addEvent,
6019
+ defined = U.defined,
6020
+ extend = U.extend,
6021
+ find = U.find,
6022
+ isNumber = U.isNumber,
6023
+ merge = U.merge,
6024
+ pick = U.pick;
6025
+ /* *
6026
+ *
6027
+ * Constants
6028
+ *
6029
+ * */
6030
+ var chartDestroyEvents = [];
6031
+ var composedMembers = [];
6032
+ /* *
6033
+ *
6034
+ * Variables
6035
+ *
6036
+ * */
6037
+ var RangeSelectorConstructor;
6038
+ /* *
6039
+ *
6040
+ * Functions
6041
+ *
6042
+ * */
6043
+ /**
6044
+ * Get the axis min value based on the range option and the current max. For
6045
+ * stock charts this is extended via the {@link RangeSelector} so that if the
6046
+ * selected range is a multiple of months or years, it is compensated for
6047
+ * various month lengths.
6048
+ *
6049
+ * @private
6050
+ * @function Highcharts.Axis#minFromRange
6051
+ * @return {number|undefined}
6052
+ * The new minimum value.
6053
+ */
6054
+ function axisMinFromRange() {
6055
+ var rangeOptions = this.range,
6056
+ type = rangeOptions.type,
6057
+ max = this.max,
6058
+ time = this.chart.time,
6059
+ // Get the true range from a start date
6060
+ getTrueRange = function (base,
6061
+ count) {
6062
+ var timeName = type === 'year' ?
6063
+ 'FullYear' : 'Month';
6064
+ var date = new time.Date(base);
6065
+ var basePeriod = time.get(timeName,
6066
+ date);
6067
+ time.set(timeName, date, basePeriod + count);
6068
+ if (basePeriod === time.get(timeName, date)) {
6069
+ time.set('Date', date, 0); // #6537
6070
+ }
6071
+ return date.getTime() - base;
6072
+ };
6073
+ var min,
6074
+ range;
6075
+ if (isNumber(rangeOptions)) {
6076
+ min = max - rangeOptions;
6077
+ range = rangeOptions;
6078
+ }
6079
+ else if (rangeOptions) {
6080
+ min = max + getTrueRange(max, -(rangeOptions.count || 1));
6081
+ // Let the fixedRange reflect initial settings (#5930)
6082
+ if (this.chart) {
6083
+ this.chart.fixedRange = max - min;
6084
+ }
6085
+ }
6086
+ var dataMin = pick(this.dataMin,
6087
+ Number.MIN_VALUE);
6088
+ if (!isNumber(min)) {
6089
+ min = dataMin;
6090
+ }
6091
+ if (min <= dataMin) {
6092
+ min = dataMin;
6093
+ if (typeof range === 'undefined') { // #4501
6094
+ range = getTrueRange(min, rangeOptions.count);
6095
+ }
6096
+ this.newMax = Math.min(min + range, pick(this.dataMax, Number.MAX_VALUE));
6097
+ }
6098
+ if (!isNumber(max)) {
6099
+ min = void 0;
6100
+ }
6101
+ else if (!isNumber(rangeOptions) &&
6102
+ rangeOptions &&
6103
+ rangeOptions._offsetMin) {
6104
+ min += rangeOptions._offsetMin;
6105
+ }
6106
+ return min;
6107
+ }
6108
+ /**
6109
+ * @private
6110
+ */
6111
+ function compose(AxisClass, ChartClass, RangeSelectorClass) {
6112
+ RangeSelectorConstructor = RangeSelectorClass;
6113
+ if (composedMembers.indexOf(AxisClass) === -1) {
6114
+ composedMembers.push(AxisClass);
6115
+ AxisClass.prototype.minFromRange = axisMinFromRange;
6116
+ }
6117
+ if (composedMembers.indexOf(ChartClass) === -1) {
6118
+ composedMembers.push(ChartClass);
6119
+ addEvent(ChartClass, 'afterGetContainer', onChartAfterGetContainer);
6120
+ addEvent(ChartClass, 'beforeRender', onChartBeforeRender);
6121
+ addEvent(ChartClass, 'destroy', onChartDestroy);
6122
+ addEvent(ChartClass, 'getMargins', onChartGetMargins);
6123
+ addEvent(ChartClass, 'render', onChartRender);
6124
+ addEvent(ChartClass, 'update', onChartUpdate);
6125
+ var chartProto = ChartClass.prototype;
6126
+ chartProto.callbacks.push(onChartCallback);
6127
+ }
6128
+ if (composedMembers.indexOf(setOptions) === -1) {
6129
+ extend(defaultOptions, { rangeSelector: RangeSelectorDefaults.rangeSelector });
6130
+ extend(defaultOptions.lang, RangeSelectorDefaults.lang);
6131
+ }
6132
+ }
6133
+ /**
6134
+ * Initialize rangeselector for stock charts
6135
+ * @private
6136
+ */
6137
+ function onChartAfterGetContainer() {
6138
+ if (this.options.rangeSelector &&
6139
+ this.options.rangeSelector.enabled) {
6140
+ this.rangeSelector = new RangeSelectorConstructor(this);
6141
+ }
6142
+ }
6143
+ /**
6144
+ * @private
6145
+ */
6146
+ function onChartBeforeRender() {
6147
+ var chart = this,
6148
+ axes = chart.axes,
6149
+ rangeSelector = chart.rangeSelector;
6150
+ if (rangeSelector) {
6151
+ if (isNumber(rangeSelector.deferredYTDClick)) {
6152
+ rangeSelector.clickButton(rangeSelector.deferredYTDClick);
6153
+ delete rangeSelector.deferredYTDClick;
6154
+ }
6155
+ axes.forEach(function (axis) {
6156
+ axis.updateNames();
6157
+ axis.setScale();
6158
+ });
6159
+ chart.getAxisMargins();
6160
+ rangeSelector.render();
6161
+ var verticalAlign = rangeSelector.options.verticalAlign;
6162
+ if (!rangeSelector.options.floating) {
6163
+ if (verticalAlign === 'bottom') {
6164
+ this.extraBottomMargin = true;
6165
+ }
6166
+ else if (verticalAlign !== 'middle') {
6167
+ this.extraTopMargin = true;
6168
+ }
6169
+ }
6170
+ }
6171
+ }
6172
+ /**
6173
+ * @private
6174
+ */
6175
+ function onChartCallback(chart) {
6176
+ var extremes,
6177
+ legend,
6178
+ alignTo,
6179
+ verticalAlign;
6180
+ var rangeSelector = chart.rangeSelector,
6181
+ redraw = function () {
6182
+ if (rangeSelector) {
6183
+ extremes = chart.xAxis[0].getExtremes();
6184
+ legend = chart.legend;
6185
+ verticalAlign = (rangeSelector &&
6186
+ rangeSelector.options.verticalAlign);
6187
+ if (isNumber(extremes.min)) {
6188
+ rangeSelector.render(extremes.min, extremes.max);
6189
+ }
6190
+ // Re-align the legend so that it's below the rangeselector
6191
+ if (legend.display &&
6192
+ verticalAlign === 'top' &&
6193
+ verticalAlign === legend.options.verticalAlign) {
6194
+ // Create a new alignment box for the legend.
6195
+ alignTo = merge(chart.spacingBox);
6196
+ if (legend.options.layout === 'vertical') {
6197
+ alignTo.y = chart.plotTop;
6198
+ }
6199
+ else {
6200
+ alignTo.y += rangeSelector.getHeight();
6201
+ }
6202
+ legend.group.placed = false; // Don't animate the alignment.
6203
+ legend.align(alignTo);
6204
+ }
6205
+ }
6206
+ };
6207
+ if (rangeSelector) {
6208
+ var events = find(chartDestroyEvents,
6209
+ function (e) { return e[0] === chart; });
6210
+ if (!events) {
6211
+ chartDestroyEvents.push([chart, [
6212
+ // redraw the scroller on setExtremes
6213
+ addEvent(chart.xAxis[0], 'afterSetExtremes', function (e) {
6214
+ if (rangeSelector) {
6215
+ rangeSelector.render(e.min, e.max);
6216
+ }
6217
+ }),
6218
+ // redraw the scroller chart resize
6219
+ addEvent(chart, 'redraw', redraw)
6220
+ ]]);
6221
+ }
6222
+ // do it now
6223
+ redraw();
6224
+ }
6225
+ }
6226
+ /**
6227
+ * Remove resize/afterSetExtremes at chart destroy.
6228
+ * @private
6229
+ */
6230
+ function onChartDestroy() {
6231
+ for (var i = 0, iEnd = chartDestroyEvents.length; i < iEnd; ++i) {
6232
+ var events = chartDestroyEvents[i];
6233
+ if (events[0] === this) {
6234
+ events[1].forEach(function (unbind) { return unbind(); });
6235
+ chartDestroyEvents.splice(i, 1);
6236
+ return;
6237
+ }
6238
+ }
6239
+ }
6240
+ function onChartGetMargins() {
6241
+ var rangeSelector = this.rangeSelector;
6242
+ if (rangeSelector) {
6243
+ var rangeSelectorHeight = rangeSelector.getHeight();
6244
+ if (this.extraTopMargin) {
6245
+ this.plotTop += rangeSelectorHeight;
5978
6246
  }
6247
+ if (this.extraBottomMargin) {
6248
+ this.marginBottom += rangeSelectorHeight;
6249
+ }
6250
+ }
6251
+ }
6252
+ /**
6253
+ * @private
6254
+ */
6255
+ function onChartRender() {
6256
+ var chart = this,
6257
+ rangeSelector = chart.rangeSelector;
6258
+ if (rangeSelector && !rangeSelector.options.floating) {
6259
+ rangeSelector.render();
6260
+ var verticalAlign = rangeSelector.options.verticalAlign;
6261
+ if (verticalAlign === 'bottom') {
6262
+ this.extraBottomMargin = true;
6263
+ }
6264
+ else if (verticalAlign !== 'middle') {
6265
+ this.extraTopMargin = true;
6266
+ }
6267
+ }
6268
+ }
6269
+ /**
6270
+ * @private
6271
+ */
6272
+ function onChartUpdate(e) {
6273
+ var chart = this,
6274
+ options = e.options,
6275
+ optionsRangeSelector = options.rangeSelector,
6276
+ extraBottomMarginWas = this.extraBottomMargin,
6277
+ extraTopMarginWas = this.extraTopMargin;
6278
+ var rangeSelector = chart.rangeSelector;
6279
+ if (optionsRangeSelector &&
6280
+ optionsRangeSelector.enabled &&
6281
+ !defined(rangeSelector) &&
6282
+ this.options.rangeSelector) {
6283
+ this.options.rangeSelector.enabled = true;
6284
+ this.rangeSelector = rangeSelector = new RangeSelectorConstructor(this);
6285
+ }
6286
+ this.extraBottomMargin = false;
6287
+ this.extraTopMargin = false;
6288
+ if (rangeSelector) {
6289
+ onChartCallback(this);
6290
+ var verticalAlign = (optionsRangeSelector &&
6291
+ optionsRangeSelector.verticalAlign) || (rangeSelector.options && rangeSelector.options.verticalAlign);
6292
+ if (!rangeSelector.options.floating) {
6293
+ if (verticalAlign === 'bottom') {
6294
+ this.extraBottomMargin = true;
6295
+ }
6296
+ else if (verticalAlign !== 'middle') {
6297
+ this.extraTopMargin = true;
6298
+ }
6299
+ }
6300
+ if (this.extraBottomMargin !== extraBottomMarginWas ||
6301
+ this.extraTopMargin !== extraTopMarginWas) {
6302
+ this.isDirtyBox = true;
6303
+ }
6304
+ }
6305
+ }
6306
+ /* *
6307
+ *
6308
+ * Default Export
6309
+ *
6310
+ * */
6311
+ var RangeSelectorComposition = {
6312
+ compose: compose
6313
+ };
6314
+
6315
+ return RangeSelectorComposition;
6316
+ });
6317
+ _registerModule(_modules, 'Stock/RangeSelector/RangeSelector.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Defaults.js'], _modules['Core/Globals.js'], _modules['Stock/RangeSelector/RangeSelectorComposition.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (Axis, D, H, RangeSelectorComposition, SVGElement, U) {
6318
+ /* *
6319
+ *
6320
+ * (c) 2010-2021 Torstein Honsi
6321
+ *
6322
+ * License: www.highcharts.com/license
6323
+ *
6324
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
6325
+ *
6326
+ * */
6327
+ var defaultOptions = D.defaultOptions;
6328
+ var addEvent = U.addEvent,
6329
+ createElement = U.createElement,
6330
+ css = U.css,
6331
+ defined = U.defined,
6332
+ destroyObjectProperties = U.destroyObjectProperties,
6333
+ discardElement = U.discardElement,
6334
+ extend = U.extend,
6335
+ fireEvent = U.fireEvent,
6336
+ isNumber = U.isNumber,
6337
+ merge = U.merge,
6338
+ objectEach = U.objectEach,
6339
+ pad = U.pad,
6340
+ pick = U.pick,
6341
+ pInt = U.pInt,
6342
+ splat = U.splat;
6343
+ /* *
6344
+ *
6345
+ * Functions
6346
+ *
6347
+ * */
6348
+ /**
6349
+ * Get the preferred input type based on a date format string.
6350
+ *
6351
+ * @private
6352
+ * @function preferredInputType
6353
+ */
6354
+ function preferredInputType(format) {
6355
+ var ms = format.indexOf('%L') !== -1;
6356
+ if (ms) {
6357
+ return 'text';
6358
+ }
6359
+ var date = ['a', 'A', 'd', 'e', 'w', 'b', 'B', 'm', 'o', 'y', 'Y']
6360
+ .some(function (char) { return format.indexOf('%' + char) !== -1; });
6361
+ var time = ['H', 'k', 'I', 'l', 'M', 'S']
6362
+ .some(function (char) { return format.indexOf('%' + char) !== -1; });
6363
+ if (date && time) {
6364
+ return 'datetime-local';
5979
6365
  }
5980
- });
5981
- extend(defaultOptions.lang,
5982
- /**
5983
- * Language object. The language object is global and it can't be set
5984
- * on each chart initialization. Instead, use `Highcharts.setOptions` to
5985
- * set it before any chart is initialized.
6366
+ if (date) {
6367
+ return 'date';
6368
+ }
6369
+ if (time) {
6370
+ return 'time';
6371
+ }
6372
+ return 'text';
6373
+ }
6374
+ /* *
5986
6375
  *
5987
- * ```js
5988
- * Highcharts.setOptions({
5989
- * lang: {
5990
- * months: [
5991
- * 'Janvier', 'Février', 'Mars', 'Avril',
5992
- * 'Mai', 'Juin', 'Juillet', 'Août',
5993
- * 'Septembre', 'Octobre', 'Novembre', 'Décembre'
5994
- * ],
5995
- * weekdays: [
5996
- * 'Dimanche', 'Lundi', 'Mardi', 'Mercredi',
5997
- * 'Jeudi', 'Vendredi', 'Samedi'
5998
- * ]
5999
- * }
6000
- * });
6001
- * ```
6376
+ * Class
6002
6377
  *
6003
- * @optionparent lang
6004
- */
6005
- {
6006
- /**
6007
- * The text for the label for the range selector buttons.
6008
- *
6009
- * @product highstock gantt
6010
- */
6011
- rangeSelectorZoom: 'Zoom',
6012
- /**
6013
- * The text for the label for the "from" input box in the range
6014
- * selector. Since v9.0, this string is empty as the label is not
6015
- * rendered by default.
6016
- *
6017
- * @product highstock gantt
6018
- */
6019
- rangeSelectorFrom: '',
6020
- /**
6021
- * The text for the label for the "to" input box in the range selector.
6022
- *
6023
- * @product highstock gantt
6024
- */
6025
- rangeSelectorTo: '→'
6026
- });
6027
- /* eslint-disable no-invalid-this, valid-jsdoc */
6378
+ * */
6028
6379
  /**
6029
6380
  * The range selector.
6030
6381
  *
@@ -6034,10 +6385,15 @@
6034
6385
  * @param {Highcharts.Chart} chart
6035
6386
  */
6036
6387
  var RangeSelector = /** @class */ (function () {
6388
+ /* *
6389
+ *
6390
+ * Constructor
6391
+ *
6392
+ * */
6037
6393
  function RangeSelector(chart) {
6038
6394
  /* *
6039
6395
  *
6040
- * Properties
6396
+ * Properties
6041
6397
  *
6042
6398
  * */
6043
6399
  this.buttons = void 0;
@@ -6045,9 +6401,24 @@
6045
6401
  this.initialButtonGroupWidth = 0;
6046
6402
  this.options = void 0;
6047
6403
  this.chart = chart;
6048
- // Run RangeSelector
6049
6404
  this.init(chart);
6050
6405
  }
6406
+ /* *
6407
+ *
6408
+ * Static Functions
6409
+ *
6410
+ * */
6411
+ /**
6412
+ * @private
6413
+ */
6414
+ RangeSelector.compose = function (AxisClass, ChartClass) {
6415
+ RangeSelectorComposition.compose(AxisClass, ChartClass, RangeSelector);
6416
+ };
6417
+ /* *
6418
+ *
6419
+ * Functions
6420
+ *
6421
+ * */
6051
6422
  /**
6052
6423
  * The method to run when one of the buttons in the range selectors is
6053
6424
  * clicked
@@ -6064,13 +6435,14 @@
6064
6435
  rangeOptions = rangeSelector.buttonOptions[i],
6065
6436
  baseAxis = chart.xAxis[0],
6066
6437
  unionExtremes = (chart.scroller && chart.scroller.getUnionExtremes()) || baseAxis || {},
6067
- dataMin = unionExtremes.dataMin,
6438
+ type = rangeOptions.type,
6439
+ dataGrouping = rangeOptions.dataGrouping;
6440
+ var dataMin = unionExtremes.dataMin,
6068
6441
  dataMax = unionExtremes.dataMax,
6069
6442
  newMin,
6070
6443
  newMax = baseAxis && Math.round(Math.min(baseAxis.max,
6071
6444
  pick(dataMax,
6072
6445
  baseAxis.max))), // #1568
6073
- type = rangeOptions.type,
6074
6446
  baseXAxisOptions,
6075
6447
  range = rangeOptions._range,
6076
6448
  rangeMin,
@@ -6078,7 +6450,6 @@
6078
6450
  rangeSetting,
6079
6451
  ctx,
6080
6452
  ytdExtremes,
6081
- dataGrouping = rangeOptions.dataGrouping,
6082
6453
  addOffsetMin = true;
6083
6454
  // chart has no data, base series is removed
6084
6455
  if (dataMin === null || dataMax === null) {
@@ -6290,17 +6661,14 @@
6290
6661
  ytdMin = ytdExtremes.min,
6291
6662
  ytdMax = ytdExtremes.max,
6292
6663
  selected = rangeSelector.selected,
6293
- selectedExists = isNumber(selected),
6294
6664
  allButtonsEnabled = rangeSelector.options.allButtonsEnabled,
6295
6665
  buttons = rangeSelector.buttons;
6666
+ var selectedExists = isNumber(selected);
6296
6667
  rangeSelector.buttonOptions.forEach(function (rangeOptions, i) {
6297
6668
  var range = rangeOptions._range,
6298
6669
  type = rangeOptions.type,
6299
6670
  count = rangeOptions.count || 1,
6300
6671
  button = buttons[i],
6301
- state = 0,
6302
- disable,
6303
- select,
6304
6672
  offsetRange = rangeOptions._offsetMax -
6305
6673
  rangeOptions._offsetMin,
6306
6674
  isSelected = i === selected,
@@ -6310,7 +6678,8 @@
6310
6678
  dataMax - dataMin,
6311
6679
  // Disable buttons where the range is smaller than the minimum
6312
6680
  // range
6313
- isTooSmallRange = range < baseAxis.minRange,
6681
+ isTooSmallRange = range < baseAxis.minRange;
6682
+ var state = 0,
6314
6683
  // Do not select the YTD button if not explicitly told so
6315
6684
  isYTDButNotSelected = false,
6316
6685
  // Disable the All button if we're already showing all
@@ -6339,14 +6708,14 @@
6339
6708
  // it selected. This happens when scrolling across an ordinal gap.
6340
6709
  // It can be seen in the intraday demos when selecting 1h and scroll
6341
6710
  // across the night gap.
6342
- disable = (!allButtonsEnabled &&
6343
- (isTooGreatRange ||
6344
- isTooSmallRange ||
6345
- isAllButAlreadyShowingAll ||
6346
- hasNoData));
6347
- select = ((isSelected && isSameRange) ||
6348
- (isSameRange && !selectedExists && !isYTDButNotSelected) ||
6349
- (isSelected && rangeSelector.frozenStates));
6711
+ var disable = (!allButtonsEnabled &&
6712
+ (isTooGreatRange ||
6713
+ isTooSmallRange ||
6714
+ isAllButAlreadyShowingAll ||
6715
+ hasNoData));
6716
+ var select = ((isSelected && isSameRange) ||
6717
+ (isSameRange && !selectedExists && !isYTDButNotSelected) ||
6718
+ (isSelected && rangeSelector.frozenStates));
6350
6719
  if (disable) {
6351
6720
  state = 3;
6352
6721
  }
@@ -6585,15 +6954,15 @@
6585
6954
  * @private
6586
6955
  */
6587
6956
  function updateExtremes() {
6588
- var value = rangeSelector.getInputValue(name),
6957
+ var maxInput = rangeSelector.maxInput,
6958
+ minInput = rangeSelector.minInput,
6589
6959
  chartAxis = chart.xAxis[0],
6590
6960
  dataAxis = chart.scroller && chart.scroller.xAxis ?
6591
6961
  chart.scroller.xAxis :
6592
6962
  chartAxis,
6593
6963
  dataMin = dataAxis.dataMin,
6594
6964
  dataMax = dataAxis.dataMax;
6595
- var maxInput = rangeSelector.maxInput,
6596
- minInput = rangeSelector.minInput;
6965
+ var value = rangeSelector.getInputValue(name);
6597
6966
  if (value !== Number(input.getAttribute('data-hc-time-previous')) &&
6598
6967
  isNumber(value)) {
6599
6968
  input.setAttribute('data-hc-time-previous', value);
@@ -6761,15 +7130,15 @@
6761
7130
  */
6762
7131
  RangeSelector.prototype.getYTDExtremes = function (dataMax, dataMin, useUTC) {
6763
7132
  var time = this.chart.time,
6764
- min,
6765
7133
  now = new time.Date(dataMax),
6766
7134
  year = time.get('FullYear',
6767
7135
  now),
6768
7136
  startOfYear = useUTC ?
6769
7137
  time.Date.UTC(year, 0, 1) : // eslint-disable-line new-cap
6770
- +new time.Date(year, 0, 1);
6771
- min = Math.max(dataMin, startOfYear);
6772
- var ts = now.getTime();
7138
+ +new time.Date(year, 0, 1),
7139
+ min = Math.max(dataMin,
7140
+ startOfYear),
7141
+ ts = now.getTime();
6773
7142
  return {
6774
7143
  max: Math.min(dataMax || ts, ts),
6775
7144
  min: min
@@ -6946,9 +7315,8 @@
6946
7315
  buttons[i] = renderer
6947
7316
  .button(rangeOptions.text, 0, 0, function (e) {
6948
7317
  // extract events from button object and call
6949
- var buttonEvents = (rangeOptions.events &&
6950
- rangeOptions.events.click),
6951
- callDefaultEvent;
7318
+ var buttonEvents = (rangeOptions.events && rangeOptions.events.click);
7319
+ var callDefaultEvent;
6952
7320
  if (buttonEvents) {
6953
7321
  callDefaultEvent =
6954
7322
  buttonEvents.call(rangeOptions, e);
@@ -7177,7 +7545,7 @@
7177
7545
  buttonLeft += buttonPosition.x +
7178
7546
  zoomText.getBBox().width + 5;
7179
7547
  }
7180
- this.buttonOptions.forEach(function (rangeOptions, i) {
7548
+ for (var i = 0, iEnd = this.buttonOptions.length; i < iEnd; ++i) {
7181
7549
  if (buttons[i].visibility !== 'hidden') {
7182
7550
  buttons[i][verb]({ x: buttonLeft });
7183
7551
  // increase button position for the next button
@@ -7186,7 +7554,7 @@
7186
7554
  else {
7187
7555
  buttons[i][verb]({ x: plotLeft });
7188
7556
  }
7189
- });
7557
+ }
7190
7558
  };
7191
7559
  /**
7192
7560
  * Handle collision between the button group and the input group
@@ -7445,9 +7813,8 @@
7445
7813
  buttonPosition = options.buttonPosition,
7446
7814
  yPosition = options.y,
7447
7815
  buttonPositionY = buttonPosition.y,
7448
- inputPositionY = inputPosition.y,
7449
- rangeSelectorHeight = 0,
7450
- minPosition;
7816
+ inputPositionY = inputPosition.y;
7817
+ var rangeSelectorHeight = 0;
7451
7818
  if (options.height) {
7452
7819
  return options.height;
7453
7820
  }
@@ -7459,7 +7826,8 @@
7459
7826
  (rangeSelectorGroup.getBBox(true).height) + 13 +
7460
7827
  yPosition :
7461
7828
  0;
7462
- minPosition = Math.min(inputPositionY, buttonPositionY);
7829
+ var minPosition = Math.min(inputPositionY,
7830
+ buttonPositionY);
7463
7831
  if ((inputPositionY < 0 && buttonPositionY < 0) ||
7464
7832
  (inputPositionY > 0 && buttonPositionY > 0)) {
7465
7833
  rangeSelectorHeight += Math.abs(minPosition);
@@ -7534,309 +7902,93 @@
7534
7902
  };
7535
7903
  return RangeSelector;
7536
7904
  }());
7905
+ extend(RangeSelector.prototype, {
7906
+ /**
7907
+ * The default buttons for pre-selecting time frames.
7908
+ * @private
7909
+ */
7910
+ defaultButtons: [{
7911
+ type: 'month',
7912
+ count: 1,
7913
+ text: '1m',
7914
+ title: 'View 1 month'
7915
+ }, {
7916
+ type: 'month',
7917
+ count: 3,
7918
+ text: '3m',
7919
+ title: 'View 3 months'
7920
+ }, {
7921
+ type: 'month',
7922
+ count: 6,
7923
+ text: '6m',
7924
+ title: 'View 6 months'
7925
+ }, {
7926
+ type: 'ytd',
7927
+ text: 'YTD',
7928
+ title: 'View year to date'
7929
+ }, {
7930
+ type: 'year',
7931
+ count: 1,
7932
+ text: '1y',
7933
+ title: 'View 1 year'
7934
+ }, {
7935
+ type: 'all',
7936
+ text: 'All',
7937
+ title: 'View all'
7938
+ }],
7939
+ /**
7940
+ * The date formats to use when setting min, max and value on date inputs.
7941
+ * @private
7942
+ */
7943
+ inputTypeFormats: {
7944
+ 'datetime-local': '%Y-%m-%dT%H:%M:%S',
7945
+ 'date': '%Y-%m-%d',
7946
+ 'time': '%H:%M:%S'
7947
+ }
7948
+ });
7949
+ /* *
7950
+ *
7951
+ * Default Export
7952
+ *
7953
+ * */
7954
+ /* *
7955
+ *
7956
+ * API Options
7957
+ *
7958
+ * */
7537
7959
  /**
7538
- * The default buttons for pre-selecting time frames
7539
- */
7540
- RangeSelector.prototype.defaultButtons = [{
7541
- type: 'month',
7542
- count: 1,
7543
- text: '1m',
7544
- title: 'View 1 month'
7545
- }, {
7546
- type: 'month',
7547
- count: 3,
7548
- text: '3m',
7549
- title: 'View 3 months'
7550
- }, {
7551
- type: 'month',
7552
- count: 6,
7553
- text: '6m',
7554
- title: 'View 6 months'
7555
- }, {
7556
- type: 'ytd',
7557
- text: 'YTD',
7558
- title: 'View year to date'
7559
- }, {
7560
- type: 'year',
7561
- count: 1,
7562
- text: '1y',
7563
- title: 'View 1 year'
7564
- }, {
7565
- type: 'all',
7566
- text: 'All',
7567
- title: 'View all'
7568
- }];
7569
- /**
7570
- * The date formats to use when setting min, max and value on date inputs
7571
- */
7572
- RangeSelector.prototype.inputTypeFormats = {
7573
- 'datetime-local': '%Y-%m-%dT%H:%M:%S',
7574
- 'date': '%Y-%m-%d',
7575
- 'time': '%H:%M:%S'
7576
- };
7960
+ * Define the time span for the button
7961
+ *
7962
+ * @typedef {"all"|"day"|"hour"|"millisecond"|"minute"|"month"|"second"|"week"|"year"|"ytd"} Highcharts.RangeSelectorButtonTypeValue
7963
+ */
7577
7964
  /**
7578
- * Get the preferred input type based on a date format string.
7965
+ * Callback function to react on button clicks.
7579
7966
  *
7580
- * @private
7581
- * @function preferredInputType
7967
+ * @callback Highcharts.RangeSelectorClickCallbackFunction
7968
+ *
7969
+ * @param {global.Event} e
7970
+ * Event arguments.
7971
+ *
7972
+ * @param {boolean|undefined}
7973
+ * Return false to cancel the default button event.
7582
7974
  */
7583
- function preferredInputType(format) {
7584
- var ms = format.indexOf('%L') !== -1;
7585
- if (ms) {
7586
- return 'text';
7587
- }
7588
- var date = ['a', 'A', 'd', 'e', 'w', 'b', 'B', 'm', 'o', 'y', 'Y']
7589
- .some(function (char) { return format.indexOf('%' + char) !== -1; });
7590
- var time = ['H', 'k', 'I', 'l', 'M', 'S'].some(function (char) {
7591
- return format.indexOf('%' + char) !== -1;
7592
- });
7593
- if (date && time) {
7594
- return 'datetime-local';
7595
- }
7596
- if (date) {
7597
- return 'date';
7598
- }
7599
- if (time) {
7600
- return 'time';
7601
- }
7602
- return 'text';
7603
- }
7604
7975
  /**
7605
- * Get the axis min value based on the range option and the current max. For
7606
- * stock charts this is extended via the {@link RangeSelector} so that if the
7607
- * selected range is a multiple of months or years, it is compensated for
7608
- * various month lengths.
7976
+ * Callback function to parse values entered in the input boxes and return a
7977
+ * valid JavaScript time as milliseconds since 1970.
7609
7978
  *
7610
- * @private
7611
- * @function Highcharts.Axis#minFromRange
7612
- * @return {number|undefined}
7613
- * The new minimum value.
7979
+ * @callback Highcharts.RangeSelectorParseCallbackFunction
7980
+ *
7981
+ * @param {string} value
7982
+ * Input value to parse.
7983
+ *
7984
+ * @return {number}
7985
+ * Parsed JavaScript time value.
7614
7986
  */
7615
- Axis.prototype.minFromRange = function () {
7616
- var rangeOptions = this.range,
7617
- type = rangeOptions.type,
7618
- min,
7619
- max = this.max,
7620
- dataMin,
7621
- range,
7622
- time = this.chart.time,
7623
- // Get the true range from a start date
7624
- getTrueRange = function (base,
7625
- count) {
7626
- var timeName = type === 'year' ?
7627
- 'FullYear' : 'Month';
7628
- var date = new time.Date(base);
7629
- var basePeriod = time.get(timeName,
7630
- date);
7631
- time.set(timeName, date, basePeriod + count);
7632
- if (basePeriod === time.get(timeName, date)) {
7633
- time.set('Date', date, 0); // #6537
7634
- }
7635
- return date.getTime() - base;
7636
- };
7637
- if (isNumber(rangeOptions)) {
7638
- min = max - rangeOptions;
7639
- range = rangeOptions;
7640
- }
7641
- else if (rangeOptions) {
7642
- min = max + getTrueRange(max, -(rangeOptions.count || 1));
7643
- // Let the fixedRange reflect initial settings (#5930)
7644
- if (this.chart) {
7645
- this.chart.fixedRange = max - min;
7646
- }
7647
- }
7648
- dataMin = pick(this.dataMin, Number.MIN_VALUE);
7649
- if (!isNumber(min)) {
7650
- min = dataMin;
7651
- }
7652
- if (min <= dataMin) {
7653
- min = dataMin;
7654
- if (typeof range === 'undefined') { // #4501
7655
- range = getTrueRange(min, rangeOptions.count);
7656
- }
7657
- this.newMax = Math.min(min + range, pick(this.dataMax, Number.MAX_VALUE));
7658
- }
7659
- if (!isNumber(max)) {
7660
- min = void 0;
7661
- }
7662
- else if (!isNumber(rangeOptions) &&
7663
- rangeOptions &&
7664
- rangeOptions._offsetMin) {
7665
- min += rangeOptions._offsetMin;
7666
- }
7667
- return min;
7668
- };
7669
- if (!H.RangeSelector) {
7670
- var chartDestroyEvents_1 = [];
7671
- var initRangeSelector_1 = function (chart) {
7672
- var extremes,
7673
- rangeSelector = chart.rangeSelector,
7674
- legend,
7675
- alignTo,
7676
- verticalAlign;
7677
- /**
7678
- * @private
7679
- */
7680
- function render() {
7681
- if (rangeSelector) {
7682
- extremes = chart.xAxis[0].getExtremes();
7683
- legend = chart.legend;
7684
- verticalAlign = (rangeSelector &&
7685
- rangeSelector.options.verticalAlign);
7686
- if (isNumber(extremes.min)) {
7687
- rangeSelector.render(extremes.min, extremes.max);
7688
- }
7689
- // Re-align the legend so that it's below the rangeselector
7690
- if (legend.display &&
7691
- verticalAlign === 'top' &&
7692
- verticalAlign === legend.options.verticalAlign) {
7693
- // Create a new alignment box for the legend.
7694
- alignTo = merge(chart.spacingBox);
7695
- if (legend.options.layout === 'vertical') {
7696
- alignTo.y = chart.plotTop;
7697
- }
7698
- else {
7699
- alignTo.y += rangeSelector.getHeight();
7700
- }
7701
- legend.group.placed = false; // Don't animate the alignment.
7702
- legend.align(alignTo);
7703
- }
7704
- }
7705
- }
7706
- if (rangeSelector) {
7707
- var events = find(chartDestroyEvents_1,
7708
- function (e) { return e[0] === chart; });
7709
- if (!events) {
7710
- chartDestroyEvents_1.push([chart, [
7711
- // redraw the scroller on setExtremes
7712
- addEvent(chart.xAxis[0], 'afterSetExtremes', function (e) {
7713
- if (rangeSelector) {
7714
- rangeSelector.render(e.min, e.max);
7715
- }
7716
- }),
7717
- // redraw the scroller chart resize
7718
- addEvent(chart, 'redraw', render)
7719
- ]]);
7720
- }
7721
- // do it now
7722
- render();
7723
- }
7724
- };
7725
- // Initialize rangeselector for stock charts
7726
- addEvent(Chart, 'afterGetContainer', function () {
7727
- if (this.options.rangeSelector &&
7728
- this.options.rangeSelector.enabled) {
7729
- this.rangeSelector = new RangeSelector(this);
7730
- }
7731
- });
7732
- addEvent(Chart, 'beforeRender', function () {
7733
- var chart = this,
7734
- axes = chart.axes,
7735
- rangeSelector = chart.rangeSelector,
7736
- verticalAlign;
7737
- if (rangeSelector) {
7738
- if (isNumber(rangeSelector.deferredYTDClick)) {
7739
- rangeSelector.clickButton(rangeSelector.deferredYTDClick);
7740
- delete rangeSelector.deferredYTDClick;
7741
- }
7742
- axes.forEach(function (axis) {
7743
- axis.updateNames();
7744
- axis.setScale();
7745
- });
7746
- chart.getAxisMargins();
7747
- rangeSelector.render();
7748
- verticalAlign = rangeSelector.options.verticalAlign;
7749
- if (!rangeSelector.options.floating) {
7750
- if (verticalAlign === 'bottom') {
7751
- this.extraBottomMargin = true;
7752
- }
7753
- else if (verticalAlign !== 'middle') {
7754
- this.extraTopMargin = true;
7755
- }
7756
- }
7757
- }
7758
- });
7759
- addEvent(Chart, 'update', function (e) {
7760
- var chart = this,
7761
- options = e.options,
7762
- optionsRangeSelector = options.rangeSelector,
7763
- rangeSelector = chart.rangeSelector,
7764
- verticalAlign,
7765
- extraBottomMarginWas = this.extraBottomMargin,
7766
- extraTopMarginWas = this.extraTopMargin;
7767
- if (optionsRangeSelector &&
7768
- optionsRangeSelector.enabled &&
7769
- !defined(rangeSelector) &&
7770
- this.options.rangeSelector) {
7771
- this.options.rangeSelector.enabled = true;
7772
- this.rangeSelector = rangeSelector = new RangeSelector(this);
7773
- }
7774
- this.extraBottomMargin = false;
7775
- this.extraTopMargin = false;
7776
- if (rangeSelector) {
7777
- initRangeSelector_1(this);
7778
- verticalAlign = (optionsRangeSelector &&
7779
- optionsRangeSelector.verticalAlign) || (rangeSelector.options && rangeSelector.options.verticalAlign);
7780
- if (!rangeSelector.options.floating) {
7781
- if (verticalAlign === 'bottom') {
7782
- this.extraBottomMargin = true;
7783
- }
7784
- else if (verticalAlign !== 'middle') {
7785
- this.extraTopMargin = true;
7786
- }
7787
- }
7788
- if (this.extraBottomMargin !== extraBottomMarginWas ||
7789
- this.extraTopMargin !== extraTopMarginWas) {
7790
- this.isDirtyBox = true;
7791
- }
7792
- }
7793
- });
7794
- addEvent(Chart, 'render', function () {
7795
- var chart = this,
7796
- rangeSelector = chart.rangeSelector,
7797
- verticalAlign;
7798
- if (rangeSelector && !rangeSelector.options.floating) {
7799
- rangeSelector.render();
7800
- verticalAlign = rangeSelector.options.verticalAlign;
7801
- if (verticalAlign === 'bottom') {
7802
- this.extraBottomMargin = true;
7803
- }
7804
- else if (verticalAlign !== 'middle') {
7805
- this.extraTopMargin = true;
7806
- }
7807
- }
7808
- });
7809
- addEvent(Chart, 'getMargins', function () {
7810
- var rangeSelector = this.rangeSelector,
7811
- rangeSelectorHeight;
7812
- if (rangeSelector) {
7813
- rangeSelectorHeight = rangeSelector.getHeight();
7814
- if (this.extraTopMargin) {
7815
- this.plotTop += rangeSelectorHeight;
7816
- }
7817
- if (this.extraBottomMargin) {
7818
- this.marginBottom += rangeSelectorHeight;
7819
- }
7820
- }
7821
- });
7822
- Chart.prototype.callbacks.push(initRangeSelector_1);
7823
- // Remove resize/afterSetExtremes at chart destroy
7824
- addEvent(Chart, 'destroy', function destroyEvents() {
7825
- for (var i = 0; i < chartDestroyEvents_1.length; i++) {
7826
- var events = chartDestroyEvents_1[i];
7827
- if (events[0] === this) {
7828
- events[1].forEach(function (unbind) { return unbind(); });
7829
- chartDestroyEvents_1.splice(i, 1);
7830
- return;
7831
- }
7832
- }
7833
- });
7834
- H.RangeSelector = RangeSelector;
7835
- }
7987
+ (''); // keeps doclets above in JS file
7836
7988
 
7837
7989
  return RangeSelector;
7838
7990
  });
7839
- _registerModule(_modules, 'Accessibility/Components/RangeSelectorComponent.js', [_modules['Extensions/RangeSelector.js'], _modules['Accessibility/AccessibilityComponent.js'], _modules['Accessibility/Utils/ChartUtilities.js'], _modules['Accessibility/Utils/Announcer.js'], _modules['Accessibility/KeyboardNavigationHandler.js'], _modules['Core/Utilities.js']], function (RangeSelector, AccessibilityComponent, ChartUtilities, Announcer, KeyboardNavigationHandler, U) {
7991
+ _registerModule(_modules, 'Accessibility/Components/RangeSelectorComponent.js', [_modules['Stock/RangeSelector/RangeSelector.js'], _modules['Accessibility/AccessibilityComponent.js'], _modules['Accessibility/Utils/ChartUtilities.js'], _modules['Accessibility/Utils/Announcer.js'], _modules['Accessibility/KeyboardNavigationHandler.js'], _modules['Core/Utilities.js']], function (RangeSelector, AccessibilityComponent, ChartUtilities, Announcer, KeyboardNavigationHandler, U) {
7840
7992
  /* *
7841
7993
  *
7842
7994
  * (c) 2009-2021 Øystein Moseng
@@ -11086,6 +11238,10 @@
11086
11238
  * @optionparent lang.accessibility
11087
11239
  */
11088
11240
  accessibility: {
11241
+ /**
11242
+ * @deprecated 10.2.1
11243
+ * @apioption lang.accessibility.resetZoomButton
11244
+ */
11089
11245
  defaultChartTitle: 'Chart',
11090
11246
  chartContainerLabel: '{title}. Highcharts interactive chart.',
11091
11247
  svgContainerLabel: 'Interactive chart',
@@ -11675,7 +11831,7 @@
11675
11831
 
11676
11832
  return copyDeprecatedOptions;
11677
11833
  });
11678
- _registerModule(_modules, 'Accessibility/Accessibility.js', [_modules['Core/DefaultOptions.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js'], _modules['Accessibility/Utils/HTMLUtilities.js'], _modules['Accessibility/A11yI18n.js'], _modules['Accessibility/Components/ContainerComponent.js'], _modules['Accessibility/FocusBorder.js'], _modules['Accessibility/Components/InfoRegionsComponent.js'], _modules['Accessibility/KeyboardNavigation.js'], _modules['Accessibility/Components/LegendComponent.js'], _modules['Accessibility/Components/MenuComponent.js'], _modules['Accessibility/Components/SeriesComponent/NewDataAnnouncer.js'], _modules['Accessibility/ProxyProvider.js'], _modules['Accessibility/Components/RangeSelectorComponent.js'], _modules['Accessibility/Components/SeriesComponent/SeriesComponent.js'], _modules['Accessibility/Components/ZoomComponent.js'], _modules['Accessibility/HighContrastMode.js'], _modules['Accessibility/HighContrastTheme.js'], _modules['Accessibility/Options/A11yDefaults.js'], _modules['Accessibility/Options/LangDefaults.js'], _modules['Accessibility/Options/DeprecatedOptions.js']], function (D, H, U, HU, A11yI18n, ContainerComponent, FocusBorder, InfoRegionsComponent, KeyboardNavigation, LegendComponent, MenuComponent, NewDataAnnouncer, ProxyProvider, RangeSelectorComponent, SeriesComponent, ZoomComponent, whcm, highContrastTheme, defaultOptionsA11Y, defaultLangOptions, copyDeprecatedOptions) {
11834
+ _registerModule(_modules, 'Accessibility/Accessibility.js', [_modules['Core/Defaults.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js'], _modules['Accessibility/Utils/HTMLUtilities.js'], _modules['Accessibility/A11yI18n.js'], _modules['Accessibility/Components/ContainerComponent.js'], _modules['Accessibility/FocusBorder.js'], _modules['Accessibility/Components/InfoRegionsComponent.js'], _modules['Accessibility/KeyboardNavigation.js'], _modules['Accessibility/Components/LegendComponent.js'], _modules['Accessibility/Components/MenuComponent.js'], _modules['Accessibility/Components/SeriesComponent/NewDataAnnouncer.js'], _modules['Accessibility/ProxyProvider.js'], _modules['Accessibility/Components/RangeSelectorComponent.js'], _modules['Accessibility/Components/SeriesComponent/SeriesComponent.js'], _modules['Accessibility/Components/ZoomComponent.js'], _modules['Accessibility/HighContrastMode.js'], _modules['Accessibility/HighContrastTheme.js'], _modules['Accessibility/Options/A11yDefaults.js'], _modules['Accessibility/Options/LangDefaults.js'], _modules['Accessibility/Options/DeprecatedOptions.js']], function (D, H, U, HU, A11yI18n, ContainerComponent, FocusBorder, InfoRegionsComponent, KeyboardNavigation, LegendComponent, MenuComponent, NewDataAnnouncer, ProxyProvider, RangeSelectorComponent, SeriesComponent, ZoomComponent, whcm, highContrastTheme, defaultOptionsA11Y, defaultLangOptions, copyDeprecatedOptions) {
11679
11835
  /* *
11680
11836
  *
11681
11837
  * (c) 2009-2021 Øystein Moseng