highcharts 9.3.1 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (862) hide show
  1. package/bower.json +1 -1
  2. package/css/annotations/popup.css +1 -1
  3. package/css/highcharts.css +21 -4
  4. package/css/highcharts.scss +18 -3
  5. package/css/stocktools/gui.css +1 -1
  6. package/css/themes/dark-unica.css +21 -4
  7. package/css/themes/grid-light.css +21 -4
  8. package/css/themes/sand-signika.css +21 -4
  9. package/es-modules/Accessibility/A11yI18n.js +1 -5
  10. package/es-modules/Accessibility/Accessibility.js +12 -6
  11. package/es-modules/Accessibility/AccessibilityComponent.js +1 -1
  12. package/es-modules/Accessibility/Components/AnnotationsA11y.js +9 -5
  13. package/es-modules/Accessibility/Components/ContainerComponent.js +1 -1
  14. package/es-modules/Accessibility/Components/InfoRegionsComponent.js +8 -19
  15. package/es-modules/Accessibility/Components/LegendComponent.js +196 -98
  16. package/es-modules/Accessibility/Components/MenuComponent.js +16 -15
  17. package/es-modules/Accessibility/Components/RangeSelectorComponent.js +11 -14
  18. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +22 -12
  19. package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +9 -5
  20. package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +3 -2
  21. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +19 -44
  22. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +77 -56
  23. package/es-modules/Accessibility/Components/ZoomComponent.js +148 -67
  24. package/es-modules/Accessibility/FocusBorder.js +0 -5
  25. package/es-modules/Accessibility/HighContrastMode.js +4 -3
  26. package/es-modules/Accessibility/KeyboardNavigation.js +117 -101
  27. package/es-modules/Accessibility/Options/DeprecatedOptions.js +12 -5
  28. package/es-modules/Accessibility/Options/LangOptions.js +3 -3
  29. package/es-modules/Accessibility/ProxyElement.js +26 -12
  30. package/es-modules/Accessibility/ProxyProvider.js +10 -5
  31. package/es-modules/Accessibility/Utils/Announcer.js +2 -2
  32. package/es-modules/Accessibility/Utils/ChartUtilities.js +17 -32
  33. package/es-modules/Accessibility/Utils/HTMLUtilities.js +0 -12
  34. package/es-modules/Core/Animation/Fx.js +5 -14
  35. package/es-modules/Core/Axis/Axis.js +189 -111
  36. package/es-modules/Core/Axis/Axis3D.js +10 -4
  37. package/es-modules/Core/Axis/BrokenAxis.js +17 -11
  38. package/es-modules/Core/Axis/Color/ColorAxis.js +28 -8
  39. package/es-modules/Core/Axis/Color/ColorAxisComposition.js +3 -3
  40. package/es-modules/Core/Axis/DateTimeAxis.js +3 -14
  41. package/es-modules/Core/Axis/GridAxis.js +34 -23
  42. package/es-modules/Core/Axis/NavigatorAxis.js +0 -5
  43. package/es-modules/Core/Axis/OrdinalAxis.js +83 -79
  44. package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js +0 -5
  45. package/es-modules/Core/Axis/RadialAxis.js +7 -28
  46. package/es-modules/Core/Axis/ScrollbarAxis.js +18 -10
  47. package/es-modules/Core/Axis/StackingAxis.js +2 -1
  48. package/es-modules/Core/Axis/Tick.js +2 -4
  49. package/es-modules/Core/Axis/TreeGridAxis.js +26 -17
  50. package/es-modules/Core/Axis/TreeGridTick.js +15 -1
  51. package/es-modules/Core/Axis/WaterfallAxis.js +1 -1
  52. package/es-modules/Core/Axis/ZAxis.js +1 -1
  53. package/es-modules/Core/Chart/Chart.js +42 -44
  54. package/es-modules/Core/Chart/Chart3D.js +24 -21
  55. package/es-modules/Core/Chart/ChartDefaults.js +32 -11
  56. package/es-modules/Core/Chart/GanttChart.js +4 -4
  57. package/es-modules/Core/Chart/MapChart.js +4 -9
  58. package/es-modules/Core/Chart/StockChart.js +10 -23
  59. package/es-modules/Core/DefaultOptions.js +5 -2
  60. package/es-modules/Core/Geometry/CircleUtilities.js +2 -1
  61. package/es-modules/Core/Geometry/PolygonClip.js +84 -0
  62. package/es-modules/Core/Globals.js +4 -18
  63. package/es-modules/Core/HttpUtilities.js +18 -12
  64. package/es-modules/Core/Legend/Legend.js +22 -21
  65. package/es-modules/Core/Navigator.js +43 -28
  66. package/es-modules/Core/Pointer.js +28 -20
  67. package/es-modules/Core/Renderer/HTML/AST.js +88 -18
  68. package/es-modules/Core/Renderer/HTML/HTMLElement.js +4 -2
  69. package/es-modules/Core/Renderer/HTML/HTMLRenderer.js +8 -6
  70. package/es-modules/Core/Renderer/RendererUtilities.js +2 -2
  71. package/es-modules/Core/Renderer/SVG/SVGElement.js +33 -57
  72. package/es-modules/Core/Renderer/SVG/SVGElement3D.js +17 -5
  73. package/es-modules/Core/Renderer/SVG/SVGLabel.js +17 -8
  74. package/es-modules/Core/Renderer/SVG/SVGRenderer.js +21 -28
  75. package/es-modules/Core/Renderer/SVG/SVGRenderer3D.js +12 -5
  76. package/es-modules/Core/Renderer/SVG/TextBuilder.js +25 -17
  77. package/es-modules/Core/Responsive.js +2 -3
  78. package/es-modules/Core/Scrollbar.js +14 -12
  79. package/es-modules/Core/Series/DataLabel.js +26 -13
  80. package/es-modules/Core/Series/Point.js +19 -18
  81. package/es-modules/Core/Series/Series.js +77 -88
  82. package/es-modules/Core/Series/SeriesDefaults.js +9 -5
  83. package/es-modules/Core/Time.js +14 -11
  84. package/es-modules/Core/Tooltip.js +30 -64
  85. package/es-modules/Core/Utilities.js +33 -45
  86. package/es-modules/Data/DataConverter.js +0 -6
  87. package/es-modules/Data/DataSeriesConverter.js +9 -5
  88. package/es-modules/Data/DataTable.js +2 -1
  89. package/es-modules/Data/Modifiers/DataModifier.js +1 -1
  90. package/es-modules/Data/Parsers/CSVParser.js +3 -2
  91. package/es-modules/Data/Parsers/GoogleSheetsParser.js +5 -2
  92. package/es-modules/Data/Stores/CSVStore.js +2 -2
  93. package/es-modules/Data/Stores/DataStore.js +1 -1
  94. package/es-modules/Data/Stores/GoogleSheetsStore.js +3 -1
  95. package/es-modules/Data/Stores/HTMLTableStore.js +3 -1
  96. package/es-modules/Extensions/Annotations/Annotations.js +18 -10
  97. package/es-modules/Extensions/Annotations/ControlPoint.js +0 -2
  98. package/es-modules/Extensions/Annotations/Controllables/ControllableCircle.js +1 -1
  99. package/es-modules/Extensions/Annotations/Controllables/ControllableEllipse.js +1 -1
  100. package/es-modules/Extensions/Annotations/Controllables/ControllableImage.js +1 -1
  101. package/es-modules/Extensions/Annotations/Controllables/ControllableLabel.js +3 -6
  102. package/es-modules/Extensions/Annotations/Controllables/ControllablePath.js +3 -2
  103. package/es-modules/Extensions/Annotations/Controllables/ControllableRect.js +1 -1
  104. package/es-modules/Extensions/Annotations/Mixins/ControllableMixin.js +6 -3
  105. package/es-modules/Extensions/Annotations/Mixins/EventEmitterMixin.js +0 -1
  106. package/es-modules/Extensions/Annotations/Mixins/MarkerMixin.js +5 -4
  107. package/es-modules/Extensions/Annotations/MockPoint.js +1 -1
  108. package/es-modules/Extensions/Annotations/NavigationBindings.js +34 -29
  109. package/es-modules/Extensions/Annotations/Popup.js +40 -32
  110. package/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +5 -3
  111. package/es-modules/Extensions/Annotations/Types/CrookedLine.js +4 -2
  112. package/es-modules/Extensions/Annotations/Types/ElliottWave.js +1 -1
  113. package/es-modules/Extensions/Annotations/Types/Measure.js +15 -11
  114. package/es-modules/Extensions/Annotations/Types/Pitchfork.js +2 -1
  115. package/es-modules/Extensions/Annotations/Types/TimeCycles.js +8 -4
  116. package/es-modules/Extensions/Annotations/Types/Tunnel.js +10 -5
  117. package/es-modules/Extensions/Boost/BoostInit.js +6 -1
  118. package/es-modules/Extensions/Boost/BoostOptions.js +26 -0
  119. package/es-modules/Extensions/Boost/BoostOverrides.js +3 -9
  120. package/es-modules/Extensions/Boost/BoostUtils.js +0 -6
  121. package/es-modules/Extensions/Boost/Boostables.js +1 -0
  122. package/es-modules/Extensions/Boost/WGLRenderer.js +64 -49
  123. package/es-modules/Extensions/Boost/WGLShader.js +13 -11
  124. package/es-modules/Extensions/Boost/WGLVBuffer.js +4 -7
  125. package/es-modules/Extensions/Breadcrumbs.js +874 -0
  126. package/es-modules/Extensions/Data.js +30 -62
  127. package/es-modules/Extensions/DataGrouping.js +27 -17
  128. package/es-modules/Extensions/DraggablePoints.js +16 -15
  129. package/es-modules/Extensions/Drilldown.js +148 -90
  130. package/es-modules/Extensions/ExportData.js +6 -5
  131. package/es-modules/Extensions/Exporting/Exporting.js +32 -44
  132. package/es-modules/Extensions/Exporting/ExportingDefaults.js +49 -1
  133. package/es-modules/Extensions/FullScreen.js +4 -3
  134. package/es-modules/Extensions/GeoJSON.js +152 -127
  135. package/es-modules/Extensions/MarkerClusters.js +37 -21
  136. package/es-modules/Extensions/Math3D.js +4 -4
  137. package/es-modules/Extensions/OfflineExporting/OfflineExporting.js +133 -46
  138. package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
  139. package/es-modules/Extensions/Oldie/Oldie.js +13 -77
  140. package/es-modules/Extensions/Oldie/VMLAxis3D.js +5 -1
  141. package/es-modules/Extensions/OverlappingDataLabels.js +10 -6
  142. package/es-modules/Extensions/Pane.js +6 -6
  143. package/es-modules/Extensions/ParallelCoordinates.js +5 -3
  144. package/es-modules/Extensions/PatternFill.js +17 -11
  145. package/es-modules/Extensions/Polar.js +6 -3
  146. package/es-modules/Extensions/PriceIndication.js +2 -1
  147. package/es-modules/Extensions/RangeSelector.js +19 -55
  148. package/es-modules/Extensions/ScrollablePlotArea.js +7 -3
  149. package/es-modules/Extensions/SeriesLabel.js +1 -1
  150. package/es-modules/Extensions/Sonification/ChartSonify.js +32 -26
  151. package/es-modules/Extensions/Sonification/Instrument.js +12 -15
  152. package/es-modules/Extensions/Sonification/PointSonify.js +12 -8
  153. package/es-modules/Extensions/Sonification/SeriesSonify.js +33 -18
  154. package/es-modules/Extensions/Sonification/SignalHandler.js +4 -6
  155. package/es-modules/Extensions/Sonification/Sonification.js +1 -1
  156. package/es-modules/Extensions/Sonification/SonificationUtilities.js +11 -7
  157. package/es-modules/Extensions/Sonification/Timeline.js +2 -7
  158. package/es-modules/Extensions/Sonification/TimelineEvent.js +0 -1
  159. package/es-modules/Extensions/Sonification/TimelinePath.js +8 -8
  160. package/es-modules/Extensions/Stacking.js +8 -25
  161. package/es-modules/Extensions/Themes/BrandDark.js +293 -0
  162. package/es-modules/Extensions/Themes/BrandLight.js +259 -0
  163. package/es-modules/Extensions/Themes/DarkUnica.js +4 -2
  164. package/es-modules/Extensions/Themes/Grid.js +4 -2
  165. package/es-modules/Extensions/Themes/GridLight.js +4 -2
  166. package/es-modules/Extensions/Themes/HighContrastDark.js +10 -10
  167. package/es-modules/Extensions/Themes/HighContrastLight.js +10 -10
  168. package/es-modules/Gantt/Connection.js +2 -2
  169. package/es-modules/Gantt/Pathfinder.js +6 -5
  170. package/es-modules/Gantt/PathfinderAlgorithms.js +12 -12
  171. package/es-modules/Maps/MapNavigation.js +54 -14
  172. package/es-modules/Maps/MapPointer.js +18 -1
  173. package/es-modules/Maps/MapSymbols.js +23 -3
  174. package/es-modules/Maps/MapUtilities.js +56 -0
  175. package/es-modules/Maps/MapView.js +606 -135
  176. package/es-modules/Maps/MapViewInsetsOptionsDefault.js +148 -0
  177. package/es-modules/Maps/MapViewOptionsDefault.js +58 -20
  178. package/es-modules/Maps/Projection.js +169 -77
  179. package/es-modules/Maps/Projections/EqualEarth.js +15 -6
  180. package/es-modules/Maps/Projections/LambertConformalConic.js +27 -19
  181. package/es-modules/Maps/Projections/Miller.js +23 -10
  182. package/es-modules/Maps/Projections/Orthographic.js +21 -10
  183. package/es-modules/Maps/Projections/WebMercator.js +25 -13
  184. package/es-modules/Series/ArcDiagram/ArcDiagramPoint.js +77 -0
  185. package/es-modules/Series/ArcDiagram/ArcDiagramSeries.js +581 -0
  186. package/es-modules/Series/Area/AreaSeries.js +13 -13
  187. package/es-modules/Series/Area3DSeries.js +4 -2
  188. package/es-modules/Series/AreaRange/AreaRangeSeries.js +24 -12
  189. package/es-modules/Series/Bellcurve/BellcurveSeries.js +2 -1
  190. package/es-modules/Series/Bubble/BubbleLegendItem.js +2 -12
  191. package/es-modules/Series/Candlestick/CandlestickSeries.js +0 -1
  192. package/es-modules/Series/ColorMapMixin.js +84 -0
  193. package/es-modules/Series/Column/ColumnSeries.js +20 -17
  194. package/es-modules/Series/Column3D/Column3DComposition.js +1 -2
  195. package/es-modules/Series/ColumnPyramid/ColumnPyramidSeries.js +5 -2
  196. package/es-modules/Series/ColumnRange/ColumnRangeSeries.js +2 -1
  197. package/es-modules/Series/Cylinder/CylinderComposition.js +36 -4
  198. package/es-modules/Series/DataModifyComposition.js +1 -0
  199. package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +3 -3
  200. package/es-modules/Series/DrawPointComposition.js +7 -4
  201. package/es-modules/Series/Dumbbell/DumbbellPoint.js +0 -1
  202. package/es-modules/Series/Dumbbell/DumbbellSeries.js +0 -3
  203. package/es-modules/Series/Flags/FlagsSymbols.js +2 -2
  204. package/es-modules/Series/Funnel3D/Funnel3DComposition.js +14 -8
  205. package/es-modules/Series/Funnel3D/Funnel3DSeries.js +2 -1
  206. package/es-modules/Series/Gantt/GanttPoint.js +1 -1
  207. package/es-modules/Series/Gantt/GanttSeries.js +3 -1
  208. package/es-modules/Series/HLC/HLCSeries.js +1 -6
  209. package/es-modules/Series/Heatmap/HeatmapPoint.js +10 -10
  210. package/es-modules/Series/Heatmap/HeatmapSeries.js +9 -10
  211. package/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +8 -6
  212. package/es-modules/Series/Histogram/HistogramSeries.js +4 -4
  213. package/es-modules/Series/HollowCandlestick/HollowCandlestickPoint.js +1 -4
  214. package/es-modules/Series/HollowCandlestick/HollowCandlestickSeries.js +19 -20
  215. package/es-modules/Series/Item/ItemSeries.js +4 -5
  216. package/es-modules/Series/Lollipop/LollipopSeries.js +1 -1
  217. package/es-modules/Series/Map/MapPoint.js +30 -1
  218. package/es-modules/Series/Map/MapSeries.js +216 -190
  219. package/es-modules/Series/MapBubble/MapBubblePoint.js +16 -24
  220. package/es-modules/Series/MapBubble/MapBubbleSeries.js +11 -0
  221. package/es-modules/Series/MapLine/MapLineSeries.js +0 -4
  222. package/es-modules/Series/MapPoint/MapPointPoint.js +2 -8
  223. package/es-modules/Series/MapPoint/MapPointSeries.js +36 -14
  224. package/es-modules/Series/Networkgraph/DraggableNodes.js +0 -4
  225. package/es-modules/Series/Networkgraph/Integrations.js +8 -22
  226. package/es-modules/Series/Networkgraph/Networkgraph.js +1 -5
  227. package/es-modules/Series/Networkgraph/QuadTree.js +1 -3
  228. package/es-modules/Series/NodesComposition.js +60 -12
  229. package/es-modules/Series/OHLC/OHLCPoint.js +0 -1
  230. package/es-modules/Series/OHLC/OHLCSeries.js +8 -1
  231. package/es-modules/Series/Organization/OrganizationPoint.js +68 -2
  232. package/es-modules/Series/Organization/OrganizationSeries.js +81 -25
  233. package/es-modules/Series/PackedBubble/PackedBubbleComposition.js +1 -0
  234. package/es-modules/Series/PackedBubble/PackedBubblePoint.js +1 -1
  235. package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +2 -4
  236. package/es-modules/Series/Pie/PiePoint.js +14 -7
  237. package/es-modules/Series/Pie/PieSeries.js +1 -1
  238. package/es-modules/Series/Pie3D/Pie3DComposition.js +2 -1
  239. package/es-modules/Series/Pie3D/Pie3DPoint.js +2 -1
  240. package/es-modules/Series/Pie3D/Pie3DSeries.js +20 -1
  241. package/es-modules/Series/Pyramid3D/Pyramid3DSeries.js +2 -1
  242. package/es-modules/Series/Sankey/SankeyColumnComposition.js +193 -0
  243. package/es-modules/Series/Sankey/SankeyPoint.js +37 -1
  244. package/es-modules/Series/Sankey/SankeySeries.js +10 -126
  245. package/es-modules/Series/Scatter/ScatterSeries.js +1 -1
  246. package/es-modules/Series/SolidGauge/SolidGaugeComposition.js +3 -1
  247. package/es-modules/Series/Spline/SplineSeries.js +0 -8
  248. package/es-modules/Series/Sunburst/SunburstSeries.js +15 -4
  249. package/es-modules/Series/Sunburst/SunburstUtilities.js +3 -2
  250. package/es-modules/Series/Tilemap/TilemapPoint.js +0 -2
  251. package/es-modules/Series/Tilemap/TilemapShapes.js +0 -7
  252. package/es-modules/Series/TreeUtilities.js +2 -2
  253. package/es-modules/Series/Treemap/TreemapSeries.js +104 -99
  254. package/es-modules/Series/Variwide/VariwideSeries.js +5 -1
  255. package/es-modules/Series/Venn/VennSeries.js +6 -9
  256. package/es-modules/Series/Venn/VennUtils.js +8 -7
  257. package/es-modules/Series/Waterfall/WaterfallSeries.js +8 -3
  258. package/es-modules/Series/Wordcloud/WordcloudSeries.js +2 -2
  259. package/es-modules/Series/Wordcloud/WordcloudUtils.js +6 -10
  260. package/es-modules/Series/XRange/XRangePoint.js +6 -12
  261. package/es-modules/Series/XRange/XRangeSeries.js +4 -20
  262. package/es-modules/Stock/Indicators/ABands/ABandsIndicator.js +12 -0
  263. package/es-modules/Stock/Indicators/Aroon/AroonIndicator.js +1 -0
  264. package/es-modules/Stock/Indicators/BB/BBIndicator.js +12 -0
  265. package/es-modules/Stock/Indicators/CMF/CMFIndicator.js +35 -15
  266. package/es-modules/Stock/Indicators/DMI/DMIIndicator.js +9 -5
  267. package/es-modules/Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js +2 -1
  268. package/es-modules/Stock/Indicators/IKH/IKHIndicator.js +6 -6
  269. package/es-modules/Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js +12 -0
  270. package/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +8 -3
  271. package/es-modules/Stock/Indicators/LinearRegression/LinearRegression.js +30 -12
  272. package/es-modules/Stock/Indicators/MACD/MACDIndicator.js +1 -1
  273. package/es-modules/Stock/Indicators/MultipleLinesComposition.js +70 -6
  274. package/es-modules/Stock/Indicators/PC/PCIndicator.js +11 -0
  275. package/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +2 -1
  276. package/es-modules/Stock/Indicators/RSI/RSIIndicator.js +2 -1
  277. package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +11 -5
  278. package/es-modules/Stock/Indicators/Stochastic/StochasticIndicator.js +3 -1
  279. package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +3 -3
  280. package/es-modules/Stock/Indicators/VWAP/VWAPIndicator.js +19 -7
  281. package/es-modules/Stock/StockToolsBindings.js +13 -6
  282. package/es-modules/Stock/StockToolsGui.js +34 -23
  283. package/es-modules/masters/highcharts-3d.src.js +1 -1
  284. package/es-modules/masters/highcharts-gantt.src.js +1 -1
  285. package/es-modules/masters/highcharts-more.src.js +1 -1
  286. package/es-modules/masters/highcharts.src.js +1 -1
  287. package/es-modules/masters/highmaps.src.js +1 -1
  288. package/es-modules/masters/highstock.src.js +1 -1
  289. package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
  290. package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
  291. package/es-modules/masters/indicators/ao.src.js +1 -1
  292. package/es-modules/masters/indicators/apo.src.js +1 -1
  293. package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
  294. package/es-modules/masters/indicators/aroon.src.js +1 -1
  295. package/es-modules/masters/indicators/atr.src.js +1 -1
  296. package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
  297. package/es-modules/masters/indicators/cci.src.js +1 -1
  298. package/es-modules/masters/indicators/chaikin.src.js +1 -1
  299. package/es-modules/masters/indicators/cmf.src.js +1 -1
  300. package/es-modules/masters/indicators/cmo.src.js +1 -1
  301. package/es-modules/masters/indicators/dema.src.js +1 -1
  302. package/es-modules/masters/indicators/disparity-index.src.js +1 -1
  303. package/es-modules/masters/indicators/dmi.src.js +1 -1
  304. package/es-modules/masters/indicators/dpo.src.js +1 -1
  305. package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
  306. package/es-modules/masters/indicators/indicators-all.src.js +1 -1
  307. package/es-modules/masters/indicators/indicators.src.js +1 -1
  308. package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
  309. package/es-modules/masters/indicators/klinger.src.js +1 -1
  310. package/es-modules/masters/indicators/macd.src.js +1 -1
  311. package/es-modules/masters/indicators/mfi.src.js +1 -1
  312. package/es-modules/masters/indicators/momentum.src.js +1 -1
  313. package/es-modules/masters/indicators/natr.src.js +1 -1
  314. package/es-modules/masters/indicators/obv.src.js +1 -1
  315. package/es-modules/masters/indicators/pivot-points.src.js +1 -1
  316. package/es-modules/masters/indicators/ppo.src.js +1 -1
  317. package/es-modules/masters/indicators/price-channel.src.js +1 -1
  318. package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
  319. package/es-modules/masters/indicators/psar.src.js +1 -1
  320. package/es-modules/masters/indicators/regressions.src.js +1 -1
  321. package/es-modules/masters/indicators/roc.src.js +1 -1
  322. package/es-modules/masters/indicators/rsi.src.js +1 -1
  323. package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
  324. package/es-modules/masters/indicators/stochastic.src.js +1 -1
  325. package/es-modules/masters/indicators/supertrend.src.js +1 -1
  326. package/es-modules/masters/indicators/tema.src.js +1 -1
  327. package/es-modules/masters/indicators/trendline.src.js +1 -1
  328. package/es-modules/masters/indicators/trix.src.js +1 -1
  329. package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
  330. package/es-modules/masters/indicators/vwap.src.js +1 -1
  331. package/es-modules/masters/indicators/williams-r.src.js +1 -1
  332. package/es-modules/masters/indicators/wma.src.js +1 -1
  333. package/es-modules/masters/indicators/zigzag.src.js +1 -1
  334. package/es-modules/masters/modules/accessibility.src.js +2 -2
  335. package/es-modules/masters/modules/annotations-advanced.src.js +1 -1
  336. package/es-modules/masters/modules/annotations.src.js +1 -1
  337. package/es-modules/masters/modules/arc-diagram.src.js +14 -0
  338. package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
  339. package/es-modules/masters/modules/boost-canvas.src.js +1 -1
  340. package/es-modules/masters/modules/boost.src.js +1 -1
  341. package/es-modules/masters/modules/broken-axis.src.js +1 -1
  342. package/es-modules/masters/modules/bullet.src.js +1 -1
  343. package/es-modules/masters/modules/coloraxis.src.js +1 -1
  344. package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
  345. package/es-modules/masters/modules/cylinder.src.js +1 -1
  346. package/es-modules/masters/modules/data.src.js +1 -1
  347. package/es-modules/masters/modules/datagrouping.src.js +1 -1
  348. package/es-modules/masters/modules/debugger.src.js +1 -1
  349. package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
  350. package/es-modules/masters/modules/dotplot.src.js +1 -1
  351. package/es-modules/masters/modules/drag-panes.src.js +1 -1
  352. package/es-modules/masters/modules/draggable-points.src.js +1 -1
  353. package/es-modules/masters/modules/drilldown.src.js +2 -1
  354. package/es-modules/masters/modules/dumbbell.src.js +1 -1
  355. package/es-modules/masters/modules/export-data.src.js +1 -1
  356. package/es-modules/masters/modules/exporting.src.js +1 -1
  357. package/es-modules/masters/modules/full-screen.src.js +1 -1
  358. package/es-modules/masters/modules/funnel.src.js +1 -1
  359. package/es-modules/masters/modules/funnel3d.src.js +1 -1
  360. package/es-modules/masters/modules/gantt.src.js +1 -1
  361. package/es-modules/masters/modules/grid-axis.src.js +1 -1
  362. package/es-modules/masters/modules/heatmap.src.js +1 -1
  363. package/es-modules/masters/modules/heikinashi.src.js +1 -1
  364. package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
  365. package/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
  366. package/es-modules/masters/modules/item-series.src.js +1 -1
  367. package/es-modules/masters/modules/lollipop.src.js +1 -1
  368. package/es-modules/masters/modules/map.src.js +5 -1
  369. package/es-modules/masters/modules/marker-clusters.src.js +1 -1
  370. package/es-modules/masters/modules/networkgraph.src.js +1 -1
  371. package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
  372. package/es-modules/masters/modules/offline-exporting.src.js +1 -1
  373. package/es-modules/masters/modules/oldie-polyfills.src.js +1 -1
  374. package/es-modules/masters/modules/oldie.src.js +1 -1
  375. package/es-modules/masters/modules/organization.src.js +1 -1
  376. package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
  377. package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
  378. package/es-modules/masters/modules/pareto.src.js +1 -1
  379. package/es-modules/masters/modules/pathfinder.src.js +1 -1
  380. package/es-modules/masters/modules/pattern-fill.src.js +1 -1
  381. package/es-modules/masters/modules/price-indicator.src.js +1 -1
  382. package/es-modules/masters/modules/pyramid3d.src.js +1 -1
  383. package/es-modules/masters/modules/sankey.src.js +1 -1
  384. package/es-modules/masters/modules/series-label.src.js +1 -1
  385. package/es-modules/masters/modules/solid-gauge.src.js +1 -1
  386. package/es-modules/masters/modules/sonification.src.js +1 -1
  387. package/es-modules/masters/modules/static-scale.src.js +1 -1
  388. package/es-modules/masters/modules/stock-tools.src.js +1 -1
  389. package/es-modules/masters/modules/stock.src.js +1 -1
  390. package/es-modules/masters/modules/streamgraph.src.js +1 -1
  391. package/es-modules/masters/modules/sunburst.src.js +1 -1
  392. package/es-modules/masters/modules/tilemap.src.js +1 -1
  393. package/es-modules/masters/modules/timeline.src.js +1 -1
  394. package/es-modules/masters/modules/treegrid.src.js +1 -1
  395. package/es-modules/masters/modules/treemap.src.js +5 -1
  396. package/es-modules/masters/modules/variable-pie.src.js +1 -1
  397. package/es-modules/masters/modules/variwide.src.js +1 -1
  398. package/es-modules/masters/modules/vector.src.js +1 -1
  399. package/es-modules/masters/modules/venn.src.js +1 -1
  400. package/es-modules/masters/modules/windbarb.src.js +1 -1
  401. package/es-modules/masters/modules/wordcloud.src.js +1 -1
  402. package/es-modules/masters/modules/xrange.src.js +1 -1
  403. package/es-modules/masters/themes/avocado.src.js +1 -1
  404. package/es-modules/masters/themes/brand-dark.src.js +14 -0
  405. package/es-modules/masters/themes/brand-light.src.js +14 -0
  406. package/es-modules/masters/themes/dark-blue.src.js +1 -1
  407. package/es-modules/masters/themes/dark-green.src.js +1 -1
  408. package/es-modules/masters/themes/dark-unica.src.js +1 -1
  409. package/es-modules/masters/themes/gray.src.js +1 -1
  410. package/es-modules/masters/themes/grid-light.src.js +1 -1
  411. package/es-modules/masters/themes/grid.src.js +1 -1
  412. package/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
  413. package/es-modules/masters/themes/high-contrast-light.src.js +1 -1
  414. package/es-modules/masters/themes/sand-signika.src.js +1 -1
  415. package/es-modules/masters/themes/skies.src.js +1 -1
  416. package/es-modules/masters/themes/sunset.src.js +1 -1
  417. package/highcharts-3d.js +99 -98
  418. package/highcharts-3d.js.map +1 -1
  419. package/highcharts-3d.src.js +114 -54
  420. package/highcharts-gantt.js +805 -800
  421. package/highcharts-gantt.js.map +1 -1
  422. package/highcharts-gantt.src.js +1102 -973
  423. package/highcharts-more.js +195 -194
  424. package/highcharts-more.js.map +1 -1
  425. package/highcharts-more.src.js +85 -104
  426. package/highcharts.d.ts +8196 -2661
  427. package/highcharts.js +590 -585
  428. package/highcharts.js.map +1 -1
  429. package/highcharts.src.d.ts +8196 -2661
  430. package/highcharts.src.js +872 -745
  431. package/highmaps.js +757 -727
  432. package/highmaps.js.map +1 -1
  433. package/highmaps.src.js +3983 -2601
  434. package/highstock.js +792 -788
  435. package/highstock.js.map +1 -1
  436. package/highstock.src.js +1118 -1001
  437. package/indicators/acceleration-bands.d.ts +17 -1
  438. package/indicators/acceleration-bands.js +12 -10
  439. package/indicators/acceleration-bands.js.map +1 -1
  440. package/indicators/acceleration-bands.src.d.ts +17 -1
  441. package/indicators/acceleration-bands.src.js +98 -7
  442. package/indicators/accumulation-distribution.js +5 -5
  443. package/indicators/accumulation-distribution.js.map +1 -1
  444. package/indicators/accumulation-distribution.src.js +11 -2
  445. package/indicators/ao.js +6 -6
  446. package/indicators/ao.js.map +1 -1
  447. package/indicators/ao.src.js +11 -2
  448. package/indicators/apo.js +5 -5
  449. package/indicators/apo.js.map +1 -1
  450. package/indicators/apo.src.js +11 -2
  451. package/indicators/aroon-oscillator.d.ts +17 -1
  452. package/indicators/aroon-oscillator.js +10 -9
  453. package/indicators/aroon-oscillator.js.map +1 -1
  454. package/indicators/aroon-oscillator.src.d.ts +17 -1
  455. package/indicators/aroon-oscillator.src.js +86 -7
  456. package/indicators/aroon.d.ts +17 -1
  457. package/indicators/aroon.js +11 -9
  458. package/indicators/aroon.js.map +1 -1
  459. package/indicators/aroon.src.d.ts +17 -1
  460. package/indicators/aroon.src.js +87 -7
  461. package/indicators/atr.js +5 -5
  462. package/indicators/atr.js.map +1 -1
  463. package/indicators/atr.src.js +11 -2
  464. package/indicators/bollinger-bands.d.ts +17 -1
  465. package/indicators/bollinger-bands.js +12 -10
  466. package/indicators/bollinger-bands.js.map +1 -1
  467. package/indicators/bollinger-bands.src.d.ts +17 -1
  468. package/indicators/bollinger-bands.src.js +98 -7
  469. package/indicators/cci.js +5 -5
  470. package/indicators/cci.js.map +1 -1
  471. package/indicators/cci.src.js +11 -2
  472. package/indicators/chaikin.js +8 -8
  473. package/indicators/chaikin.js.map +1 -1
  474. package/indicators/chaikin.src.js +11 -2
  475. package/indicators/cmf.js +6 -6
  476. package/indicators/cmf.js.map +1 -1
  477. package/indicators/cmf.src.js +46 -17
  478. package/indicators/cmo.js +5 -5
  479. package/indicators/cmo.js.map +1 -1
  480. package/indicators/cmo.src.js +11 -2
  481. package/indicators/dema.js +5 -5
  482. package/indicators/dema.js.map +1 -1
  483. package/indicators/dema.src.js +11 -2
  484. package/indicators/disparity-index.js +6 -6
  485. package/indicators/disparity-index.js.map +1 -1
  486. package/indicators/disparity-index.src.js +13 -3
  487. package/indicators/dmi.js +12 -11
  488. package/indicators/dmi.js.map +1 -1
  489. package/indicators/dmi.src.js +95 -12
  490. package/indicators/dpo.js +5 -5
  491. package/indicators/dpo.js.map +1 -1
  492. package/indicators/dpo.src.js +11 -2
  493. package/indicators/ema.js +2 -1
  494. package/indicators/ema.js.map +1 -1
  495. package/indicators/ema.src.js +10 -1
  496. package/indicators/ichimoku-kinko-hyo.js +16 -16
  497. package/indicators/ichimoku-kinko-hyo.js.map +1 -1
  498. package/indicators/ichimoku-kinko-hyo.src.js +17 -8
  499. package/indicators/indicators-all.d.ts +17 -1
  500. package/indicators/indicators-all.js +199 -197
  501. package/indicators/indicators-all.js.map +1 -1
  502. package/indicators/indicators-all.src.d.ts +17 -1
  503. package/indicators/indicators-all.src.js +266 -69
  504. package/indicators/indicators.js +13 -12
  505. package/indicators/indicators.js.map +1 -1
  506. package/indicators/indicators.src.js +23 -8
  507. package/indicators/keltner-channels.d.ts +17 -1
  508. package/indicators/keltner-channels.js +12 -10
  509. package/indicators/keltner-channels.js.map +1 -1
  510. package/indicators/keltner-channels.src.d.ts +17 -1
  511. package/indicators/keltner-channels.src.js +98 -7
  512. package/indicators/klinger.js +14 -12
  513. package/indicators/klinger.js.map +1 -1
  514. package/indicators/klinger.src.js +94 -10
  515. package/indicators/macd.js +12 -11
  516. package/indicators/macd.js.map +1 -1
  517. package/indicators/macd.src.js +12 -3
  518. package/indicators/mfi.js +6 -6
  519. package/indicators/mfi.js.map +1 -1
  520. package/indicators/mfi.src.js +11 -2
  521. package/indicators/momentum.js +5 -5
  522. package/indicators/momentum.js.map +1 -1
  523. package/indicators/momentum.src.js +11 -2
  524. package/indicators/natr.js +5 -4
  525. package/indicators/natr.js.map +1 -1
  526. package/indicators/natr.src.js +11 -2
  527. package/indicators/obv.js +5 -5
  528. package/indicators/obv.js.map +1 -1
  529. package/indicators/obv.src.js +11 -2
  530. package/indicators/pivot-points.js +11 -11
  531. package/indicators/pivot-points.js.map +1 -1
  532. package/indicators/pivot-points.src.js +13 -3
  533. package/indicators/ppo.js +5 -5
  534. package/indicators/ppo.js.map +1 -1
  535. package/indicators/ppo.src.js +11 -2
  536. package/indicators/price-channel.d.ts +17 -1
  537. package/indicators/price-channel.js +11 -9
  538. package/indicators/price-channel.js.map +1 -1
  539. package/indicators/price-channel.src.d.ts +17 -1
  540. package/indicators/price-channel.src.js +97 -7
  541. package/indicators/price-envelopes.js +8 -8
  542. package/indicators/price-envelopes.js.map +1 -1
  543. package/indicators/price-envelopes.src.js +11 -2
  544. package/indicators/psar.js +7 -6
  545. package/indicators/psar.js.map +1 -1
  546. package/indicators/psar.src.js +11 -2
  547. package/indicators/regressions.js +12 -12
  548. package/indicators/regressions.js.map +1 -1
  549. package/indicators/regressions.src.js +41 -14
  550. package/indicators/roc.js +5 -5
  551. package/indicators/roc.js.map +1 -1
  552. package/indicators/roc.src.js +11 -2
  553. package/indicators/rsi.js +6 -5
  554. package/indicators/rsi.js.map +1 -1
  555. package/indicators/rsi.src.js +13 -3
  556. package/indicators/slow-stochastic.js +5 -5
  557. package/indicators/slow-stochastic.js.map +1 -1
  558. package/indicators/slow-stochastic.src.js +11 -2
  559. package/indicators/stochastic.d.ts +17 -1
  560. package/indicators/stochastic.js +12 -10
  561. package/indicators/stochastic.js.map +1 -1
  562. package/indicators/stochastic.src.d.ts +17 -1
  563. package/indicators/stochastic.src.js +89 -8
  564. package/indicators/supertrend.js +10 -10
  565. package/indicators/supertrend.js.map +1 -1
  566. package/indicators/supertrend.src.js +11 -2
  567. package/indicators/tema.js +6 -6
  568. package/indicators/tema.js.map +1 -1
  569. package/indicators/tema.src.js +11 -2
  570. package/indicators/trendline.js +5 -5
  571. package/indicators/trendline.js.map +1 -1
  572. package/indicators/trendline.src.js +11 -2
  573. package/indicators/trix.js +4 -4
  574. package/indicators/trix.js.map +1 -1
  575. package/indicators/trix.src.js +11 -2
  576. package/indicators/volume-by-price.js +17 -17
  577. package/indicators/volume-by-price.js.map +1 -1
  578. package/indicators/volume-by-price.src.js +14 -5
  579. package/indicators/vwap.js +5 -5
  580. package/indicators/vwap.js.map +1 -1
  581. package/indicators/vwap.src.js +30 -9
  582. package/indicators/williams-r.js +6 -5
  583. package/indicators/williams-r.js.map +1 -1
  584. package/indicators/williams-r.src.js +11 -2
  585. package/indicators/wma.js +5 -5
  586. package/indicators/wma.js.map +1 -1
  587. package/indicators/wma.src.js +11 -2
  588. package/indicators/zigzag.js +6 -6
  589. package/indicators/zigzag.js.map +1 -1
  590. package/indicators/zigzag.src.js +11 -2
  591. package/lib/jspdf.js +299 -184
  592. package/lib/jspdf.src.js +25266 -18067
  593. package/lib/svg2pdf.js +35 -31
  594. package/lib/svg2pdf.src.js +5721 -4179
  595. package/modules/accessibility.d.ts +0 -35
  596. package/modules/accessibility.js +232 -226
  597. package/modules/accessibility.js.map +1 -1
  598. package/modules/accessibility.src.d.ts +0 -35
  599. package/modules/accessibility.src.js +792 -613
  600. package/modules/annotations-advanced.js +175 -175
  601. package/modules/annotations-advanced.js.map +1 -1
  602. package/modules/annotations-advanced.src.js +175 -129
  603. package/modules/annotations.js +124 -124
  604. package/modules/annotations.js.map +1 -1
  605. package/modules/annotations.src.js +130 -102
  606. package/modules/arc-diagram.js +25 -0
  607. package/modules/arc-diagram.js.map +1 -0
  608. package/modules/arc-diagram.src.js +770 -0
  609. package/modules/arrow-symbols.js +4 -3
  610. package/modules/arrow-symbols.js.map +1 -1
  611. package/modules/arrow-symbols.src.js +11 -2
  612. package/modules/boost-canvas.js +15 -15
  613. package/modules/boost-canvas.js.map +1 -1
  614. package/modules/boost-canvas.src.js +11 -2
  615. package/modules/boost.js +80 -79
  616. package/modules/boost.js.map +1 -1
  617. package/modules/boost.src.js +103 -85
  618. package/modules/broken-axis.js +13 -13
  619. package/modules/broken-axis.js.map +1 -1
  620. package/modules/broken-axis.src.js +28 -13
  621. package/modules/bullet.js +9 -9
  622. package/modules/bullet.js.map +1 -1
  623. package/modules/bullet.src.js +11 -2
  624. package/modules/coloraxis.js +24 -24
  625. package/modules/coloraxis.js.map +1 -1
  626. package/modules/coloraxis.src.js +42 -13
  627. package/modules/current-date-indicator.js +5 -4
  628. package/modules/current-date-indicator.js.map +1 -1
  629. package/modules/current-date-indicator.src.js +11 -2
  630. package/modules/cylinder.js +11 -11
  631. package/modules/cylinder.js.map +1 -1
  632. package/modules/cylinder.src.js +47 -6
  633. package/modules/data.d.ts +6 -6
  634. package/modules/data.js +34 -33
  635. package/modules/data.js.map +1 -1
  636. package/modules/data.src.d.ts +6 -6
  637. package/modules/data.src.js +68 -84
  638. package/modules/datagrouping.js +21 -20
  639. package/modules/datagrouping.js.map +1 -1
  640. package/modules/datagrouping.src.js +38 -19
  641. package/modules/debugger.js +6 -6
  642. package/modules/debugger.js.map +1 -1
  643. package/modules/debugger.src.js +11 -2
  644. package/modules/dependency-wheel.js +12 -11
  645. package/modules/dependency-wheel.js.map +1 -1
  646. package/modules/dependency-wheel.src.js +15 -6
  647. package/modules/dotplot.js +6 -6
  648. package/modules/dotplot.js.map +1 -1
  649. package/modules/dotplot.src.js +11 -2
  650. package/modules/drag-panes.js +10 -10
  651. package/modules/drag-panes.js.map +1 -1
  652. package/modules/drag-panes.src.js +11 -2
  653. package/modules/draggable-points.js +35 -34
  654. package/modules/draggable-points.js.map +1 -1
  655. package/modules/draggable-points.src.js +27 -17
  656. package/modules/drilldown.d.ts +19 -0
  657. package/modules/drilldown.js +37 -25
  658. package/modules/drilldown.js.map +1 -1
  659. package/modules/drilldown.src.d.ts +19 -0
  660. package/modules/drilldown.src.js +1091 -101
  661. package/modules/dumbbell.js +17 -17
  662. package/modules/dumbbell.js.map +1 -1
  663. package/modules/dumbbell.src.js +11 -6
  664. package/modules/export-data.js +22 -21
  665. package/modules/export-data.js.map +1 -1
  666. package/modules/export-data.src.js +17 -7
  667. package/modules/exporting.js +39 -39
  668. package/modules/exporting.js.map +1 -1
  669. package/modules/exporting.src.js +114 -62
  670. package/modules/full-screen.js +8 -7
  671. package/modules/full-screen.js.map +1 -1
  672. package/modules/full-screen.src.js +15 -5
  673. package/modules/funnel.js +12 -12
  674. package/modules/funnel.js.map +1 -1
  675. package/modules/funnel.src.js +11 -2
  676. package/modules/funnel3d.js +21 -21
  677. package/modules/funnel3d.js.map +1 -1
  678. package/modules/funnel3d.src.js +27 -11
  679. package/modules/gantt.js +217 -217
  680. package/modules/gantt.js.map +1 -1
  681. package/modules/gantt.src.js +241 -230
  682. package/modules/grid-axis.js +23 -23
  683. package/modules/grid-axis.js.map +1 -1
  684. package/modules/grid-axis.src.js +46 -27
  685. package/modules/heatmap.js +40 -39
  686. package/modules/heatmap.js.map +1 -1
  687. package/modules/heatmap.src.js +119 -117
  688. package/modules/heikinashi.js +8 -8
  689. package/modules/heikinashi.js.map +1 -1
  690. package/modules/heikinashi.src.js +19 -8
  691. package/modules/histogram-bellcurve.js +13 -13
  692. package/modules/histogram-bellcurve.js.map +1 -1
  693. package/modules/histogram-bellcurve.src.js +17 -7
  694. package/modules/hollowcandlestick.js +9 -9
  695. package/modules/hollowcandlestick.js.map +1 -1
  696. package/modules/hollowcandlestick.src.js +31 -26
  697. package/modules/item-series.js +12 -12
  698. package/modules/item-series.js.map +1 -1
  699. package/modules/item-series.src.js +16 -7
  700. package/modules/lollipop.js +7 -7
  701. package/modules/lollipop.js.map +1 -1
  702. package/modules/lollipop.src.js +12 -3
  703. package/modules/map.d.ts +82 -43
  704. package/modules/map.js +169 -144
  705. package/modules/map.js.map +1 -1
  706. package/modules/map.src.d.ts +82 -43
  707. package/modules/map.src.js +8003 -6739
  708. package/modules/marker-clusters.js +36 -36
  709. package/modules/marker-clusters.js.map +1 -1
  710. package/modules/marker-clusters.src.js +50 -24
  711. package/modules/networkgraph.d.ts +5 -0
  712. package/modules/networkgraph.js +49 -48
  713. package/modules/networkgraph.js.map +1 -1
  714. package/modules/networkgraph.src.d.ts +5 -0
  715. package/modules/networkgraph.src.js +87 -48
  716. package/modules/no-data-to-display.js +5 -5
  717. package/modules/no-data-to-display.js.map +1 -1
  718. package/modules/no-data-to-display.src.js +11 -2
  719. package/modules/offline-exporting.js +20 -18
  720. package/modules/offline-exporting.js.map +1 -1
  721. package/modules/offline-exporting.src.js +149 -53
  722. package/modules/oldie-polyfills.js +7 -7
  723. package/modules/oldie-polyfills.js.map +1 -1
  724. package/modules/oldie-polyfills.src.js +11 -2
  725. package/modules/oldie.js +30 -30
  726. package/modules/oldie.js.map +1 -1
  727. package/modules/oldie.src.js +29 -80
  728. package/modules/organization.js +16 -14
  729. package/modules/organization.js.map +1 -1
  730. package/modules/organization.src.js +168 -32
  731. package/modules/overlapping-datalabels.js +3 -2
  732. package/modules/overlapping-datalabels.js.map +1 -1
  733. package/modules/overlapping-datalabels.src.js +11 -2
  734. package/modules/parallel-coordinates.js +11 -11
  735. package/modules/parallel-coordinates.js.map +1 -1
  736. package/modules/parallel-coordinates.src.js +16 -5
  737. package/modules/pareto.js +7 -7
  738. package/modules/pareto.js.map +1 -1
  739. package/modules/pareto.src.js +11 -2
  740. package/modules/pathfinder.js +31 -31
  741. package/modules/pathfinder.js.map +1 -1
  742. package/modules/pathfinder.src.js +31 -21
  743. package/modules/pattern-fill.js +14 -14
  744. package/modules/pattern-fill.js.map +1 -1
  745. package/modules/pattern-fill.src.js +28 -13
  746. package/modules/price-indicator.js +5 -5
  747. package/modules/price-indicator.js.map +1 -1
  748. package/modules/price-indicator.src.js +13 -3
  749. package/modules/pyramid3d.js +4 -4
  750. package/modules/pyramid3d.js.map +1 -1
  751. package/modules/pyramid3d.src.js +13 -3
  752. package/modules/sankey.d.ts +5 -0
  753. package/modules/sankey.js +32 -29
  754. package/modules/sankey.js.map +1 -1
  755. package/modules/sankey.src.d.ts +5 -0
  756. package/modules/sankey.src.js +340 -156
  757. package/modules/series-label.js +18 -17
  758. package/modules/series-label.js.map +1 -1
  759. package/modules/series-label.src.js +12 -3
  760. package/modules/solid-gauge.js +10 -10
  761. package/modules/solid-gauge.js.map +1 -1
  762. package/modules/solid-gauge.src.js +27 -3
  763. package/modules/sonification.js +59 -59
  764. package/modules/sonification.js.map +1 -1
  765. package/modules/sonification.src.js +131 -104
  766. package/modules/static-scale.js +5 -4
  767. package/modules/static-scale.js.map +1 -1
  768. package/modules/static-scale.src.js +11 -2
  769. package/modules/stock-tools.js +107 -107
  770. package/modules/stock-tools.js.map +1 -1
  771. package/modules/stock-tools.src.js +137 -98
  772. package/modules/stock.js +162 -162
  773. package/modules/stock.js.map +1 -1
  774. package/modules/stock.src.js +257 -258
  775. package/modules/streamgraph.js +5 -4
  776. package/modules/streamgraph.js.map +1 -1
  777. package/modules/streamgraph.src.js +11 -2
  778. package/modules/sunburst.d.ts +3 -0
  779. package/modules/sunburst.js +73 -61
  780. package/modules/sunburst.js.map +1 -1
  781. package/modules/sunburst.src.d.ts +3 -0
  782. package/modules/sunburst.src.js +1128 -205
  783. package/modules/tilemap.js +17 -17
  784. package/modules/tilemap.js.map +1 -1
  785. package/modules/tilemap.src.js +11 -11
  786. package/modules/timeline.js +18 -18
  787. package/modules/timeline.js.map +1 -1
  788. package/modules/timeline.src.js +11 -2
  789. package/modules/treegrid.js +57 -56
  790. package/modules/treegrid.js.map +1 -1
  791. package/modules/treegrid.src.js +106 -58
  792. package/modules/treemap.d.ts +3 -0
  793. package/modules/treemap.js +53 -41
  794. package/modules/treemap.js.map +1 -1
  795. package/modules/treemap.src.d.ts +3 -0
  796. package/modules/treemap.src.js +1113 -200
  797. package/modules/variable-pie.js +9 -9
  798. package/modules/variable-pie.js.map +1 -1
  799. package/modules/variable-pie.src.js +11 -2
  800. package/modules/variwide.js +12 -12
  801. package/modules/variwide.js.map +1 -1
  802. package/modules/variwide.src.js +17 -4
  803. package/modules/vector.js +8 -7
  804. package/modules/vector.js.map +1 -1
  805. package/modules/vector.src.js +11 -2
  806. package/modules/venn.js +31 -31
  807. package/modules/venn.js.map +1 -1
  808. package/modules/venn.src.js +34 -23
  809. package/modules/windbarb.js +15 -15
  810. package/modules/windbarb.js.map +1 -1
  811. package/modules/windbarb.src.js +11 -2
  812. package/modules/wordcloud.js +23 -23
  813. package/modules/wordcloud.js.map +1 -1
  814. package/modules/wordcloud.src.js +26 -18
  815. package/modules/xrange.js +16 -16
  816. package/modules/xrange.js.map +1 -1
  817. package/modules/xrange.src.js +21 -34
  818. package/package.json +1 -1
  819. package/themes/avocado.js +4 -3
  820. package/themes/avocado.js.map +1 -1
  821. package/themes/avocado.src.js +11 -2
  822. package/themes/brand-dark.js +16 -0
  823. package/themes/brand-dark.js.map +1 -0
  824. package/themes/brand-dark.src.js +337 -0
  825. package/themes/brand-light.js +15 -0
  826. package/themes/brand-light.js.map +1 -0
  827. package/themes/brand-light.src.js +303 -0
  828. package/themes/dark-blue.js +9 -8
  829. package/themes/dark-blue.js.map +1 -1
  830. package/themes/dark-blue.src.js +11 -2
  831. package/themes/dark-green.js +9 -8
  832. package/themes/dark-green.js.map +1 -1
  833. package/themes/dark-green.src.js +11 -2
  834. package/themes/dark-unica.js +8 -7
  835. package/themes/dark-unica.js.map +1 -1
  836. package/themes/dark-unica.src.js +15 -4
  837. package/themes/gray.js +9 -8
  838. package/themes/gray.js.map +1 -1
  839. package/themes/gray.src.js +11 -2
  840. package/themes/grid-light.js +5 -4
  841. package/themes/grid-light.js.map +1 -1
  842. package/themes/grid-light.src.js +15 -4
  843. package/themes/grid.js +5 -5
  844. package/themes/grid.js.map +1 -1
  845. package/themes/grid.src.js +15 -4
  846. package/themes/high-contrast-dark.js +7 -7
  847. package/themes/high-contrast-dark.js.map +1 -1
  848. package/themes/high-contrast-dark.src.js +21 -12
  849. package/themes/high-contrast-light.js +3 -3
  850. package/themes/high-contrast-light.js.map +1 -1
  851. package/themes/high-contrast-light.src.js +21 -12
  852. package/themes/sand-signika.js +5 -5
  853. package/themes/sand-signika.js.map +1 -1
  854. package/themes/sand-signika.src.js +11 -2
  855. package/themes/skies.js +5 -5
  856. package/themes/skies.js.map +1 -1
  857. package/themes/skies.src.js +11 -2
  858. package/themes/sunset.js +3 -3
  859. package/themes/sunset.js.map +1 -1
  860. package/themes/sunset.src.js +11 -2
  861. package/es-modules/Maps/ProjectionDefinition.js +0 -9
  862. package/es-modules/Series/ColorMapComposition.js +0 -109
package/highcharts.src.js CHANGED
@@ -1,11 +1,10 @@
1
1
  /**
2
- * @license Highcharts JS v9.3.1 (2021-11-05)
2
+ * @license Highcharts JS v10.0.0 (2022-03-07)
3
3
  *
4
4
  * (c) 2009-2021 Torstein Honsi
5
5
  *
6
6
  * License: www.highcharts.com/license
7
7
  */
8
- 'use strict';
9
8
  (function (root, factory) {
10
9
  if (typeof module === 'object' && module.exports) {
11
10
  factory['default'] = factory;
@@ -22,11 +21,21 @@
22
21
  }
23
22
  root.Highcharts = factory(root);
24
23
  }
25
- }(typeof window !== 'undefined' ? window : this, function (win) {
24
+ }(typeof window !== 'undefined' ? window : this, function (window) {
25
+ 'use strict';
26
26
  var _modules = {};
27
27
  function _registerModule(obj, path, args, fn) {
28
28
  if (!obj.hasOwnProperty(path)) {
29
29
  obj[path] = fn.apply(null, args);
30
+
31
+ if (typeof CustomEvent === 'function') {
32
+ window.dispatchEvent(
33
+ new CustomEvent(
34
+ 'HighchartsModuleLoaded',
35
+ { detail: { path: path, module: obj[path] }
36
+ })
37
+ );
38
+ }
30
39
  }
31
40
  }
32
41
  _registerModule(_modules, 'Core/Globals.js', [], function () {
@@ -39,23 +48,6 @@
39
48
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
40
49
  *
41
50
  * */
42
- /* *
43
- *
44
- * Constants
45
- *
46
- * */
47
- /**
48
- * @private
49
- * @deprecated
50
- * @todo Rename UMD argument `win` to `window`; move code to `Globals.win`
51
- */
52
- var w = (typeof win !== 'undefined' ?
53
- win :
54
- typeof window !== 'undefined' ?
55
- window :
56
- {}
57
- // eslint-disable-next-line node/no-unsupported-features/es-builtins
58
- );
59
51
  /* *
60
52
  *
61
53
  * Namespace
@@ -71,7 +63,10 @@
71
63
  * Constants
72
64
  *
73
65
  * */
74
- Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '9.3.1', Globals.win = w, Globals.doc = Globals.win.document, Globals.svg = (Globals.doc &&
66
+ Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '10.0.0', Globals.win = (typeof window !== 'undefined' ?
67
+ window :
68
+ {}), // eslint-disable-line node/no-unsupported-features/es-builtins
69
+ Globals.doc = Globals.win.document, Globals.svg = (Globals.doc &&
75
70
  Globals.doc.createElementNS &&
76
71
  !!Globals.doc.createElementNS(Globals.SVG_NS, 'svg').createSVGRect), Globals.userAgent = (Globals.win.navigator && Globals.win.navigator.userAgent) || '', Globals.isChrome = Globals.userAgent.indexOf('Chrome') !== -1, Globals.isFirefox = Globals.userAgent.indexOf('Firefox') !== -1, Globals.isMS = /(edge|msie|trident)/i.test(Globals.userAgent) && !Globals.win.opera, Globals.isSafari = !Globals.isChrome && Globals.userAgent.indexOf('Safari') !== -1, Globals.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(Globals.userAgent), Globals.isWebKit = Globals.userAgent.indexOf('AppleWebKit') !== -1, Globals.deg2rad = Math.PI * 2 / 360, Globals.hasBidiBug = (Globals.isFirefox &&
77
72
  parseInt(Globals.userAgent.split('Firefox/')[1], 10) < 4 // issue #38
@@ -365,7 +360,9 @@
365
360
  // Arrays, primitives and DOM nodes are copied directly
366
361
  }
367
362
  else if (isObject(newer[key]) ||
368
- newer[key] !== older[key]) {
363
+ newer[key] !== older[key] ||
364
+ // If the newer key is explicitly undefined, keep it (#10525)
365
+ (key in newer && !(key in older))) {
369
366
  result[key] = newer[key];
370
367
  }
371
368
  });
@@ -533,7 +530,7 @@
533
530
  * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} elem
534
531
  * The DOM element to receive the attribute(s).
535
532
  *
536
- * @param {string|Highcharts.HTMLAttributes|Highcharts.SVGAttributes} [prop]
533
+ * @param {string|Highcharts.HTMLAttributes|Highcharts.SVGAttributes} [keyOrAttribs]
537
534
  * The property or an object of key-value pairs.
538
535
  *
539
536
  * @param {number|string} [value]
@@ -542,33 +539,36 @@
542
539
  * @return {string|null|undefined}
543
540
  * When used as a getter, return the value.
544
541
  */
545
- function attr(elem, prop, value) {
542
+ function attr(elem, keyOrAttribs, value) {
543
+ var isGetter = isString(keyOrAttribs) && !defined(value);
546
544
  var ret;
547
- // if the prop is a string
548
- if (isString(prop)) {
549
- // set the value
550
- if (defined(value)) {
551
- elem.setAttribute(prop, value);
552
- // get the value
553
- }
554
- else if (elem && elem.getAttribute) {
555
- ret = elem.getAttribute(prop);
545
+ var attrSingle = function (value,
546
+ key) {
547
+ // Set the value
548
+ if (defined(value)) {
549
+ elem.setAttribute(key,
550
+ value);
551
+ // Get the value
552
+ }
553
+ else if (isGetter) {
554
+ ret = elem.getAttribute(key);
556
555
  // IE7 and below cannot get class through getAttribute (#7850)
557
- if (!ret && prop === 'class') {
558
- ret = elem.getAttribute(prop + 'Name');
556
+ if (!ret && key === 'class') {
557
+ ret = elem.getAttribute(key + 'Name');
559
558
  }
559
+ // Remove the value
560
560
  }
561
- // else if prop is defined, it is a hash of key/value pairs
561
+ else {
562
+ elem.removeAttribute(key);
563
+ }
564
+ };
565
+ // If keyOrAttribs is a string
566
+ if (isString(keyOrAttribs)) {
567
+ attrSingle(value, keyOrAttribs);
568
+ // Else if keyOrAttribs is defined, it is a hash of key/value pairs
562
569
  }
563
570
  else {
564
- objectEach(prop, function (val, key) {
565
- if (defined(val)) {
566
- elem.setAttribute(key, val);
567
- }
568
- else {
569
- elem.removeAttribute(key);
570
- }
571
- });
571
+ objectEach(keyOrAttribs, attrSingle);
572
572
  }
573
573
  return ret;
574
574
  }
@@ -619,10 +619,8 @@
619
619
  *
620
620
  * @function Highcharts.clearTimeout
621
621
  *
622
- * @param {number} id
623
- * Id of a timeout.
624
- *
625
- * @return {void}
622
+ * @param {number|undefined} id
623
+ * Id of a timeout.
626
624
  */
627
625
  function internalClearTimeout(id) {
628
626
  if (defined(id)) {
@@ -692,9 +690,8 @@
692
690
  */
693
691
  function css(el, styles) {
694
692
  if (H.isMS && !H.svg) { // #2686
695
- if (styles && typeof styles.opacity !== 'undefined') {
696
- styles.filter =
697
- 'alpha(opacity=' + (styles.opacity * 100) + ')';
693
+ if (styles && defined(styles.opacity)) {
694
+ styles.filter = "alpha(opacity=" + styles.opacity * 100 + ")";
698
695
  }
699
696
  }
700
697
  extend(el.style, styles);
@@ -761,7 +758,7 @@
761
758
  return obj;
762
759
  }
763
760
  /**
764
- * Left-pad a string to a given length by adding a character repetetively.
761
+ * Left-pad a string to a given length by adding a character repetitively.
765
762
  *
766
763
  * @function Highcharts.pad
767
764
  *
@@ -1030,7 +1027,7 @@
1030
1027
  });
1031
1028
  }
1032
1029
  /**
1033
- * Discard a HTML element by moving it to the bin and delete.
1030
+ * Discard a HTML element
1034
1031
  *
1035
1032
  * @function Highcharts.discardElement
1036
1033
  *
@@ -1038,17 +1035,10 @@
1038
1035
  * The HTML node to discard.
1039
1036
  */
1040
1037
  function discardElement(element) {
1041
- // create a garbage bin element, not part of the DOM
1042
- if (!garbageBin) {
1043
- garbageBin = createElement('div');
1044
- }
1045
- // move the node and empty bin
1046
- if (element) {
1047
- garbageBin.appendChild(element);
1038
+ if (element && element.parentElement) {
1039
+ element.parentElement.removeChild(element);
1048
1040
  }
1049
- garbageBin.innerHTML = '';
1050
1041
  }
1051
- var garbageBin;
1052
1042
  /**
1053
1043
  * Fix JS round off float errors.
1054
1044
  *
@@ -1247,7 +1237,7 @@
1247
1237
  var i;
1248
1238
  var length = arr.length;
1249
1239
  for (i = 0; i < length; i++) {
1250
- if (callback(arr[i], i)) { // eslint-disable-line callback-return
1240
+ if (callback(arr[i], i)) { // eslint-disable-line node/callback-return
1251
1241
  return arr[i];
1252
1242
  }
1253
1243
  }
@@ -1519,9 +1509,6 @@
1519
1509
  /* eslint-enable valid-jsdoc */
1520
1510
  /**
1521
1511
  * @private
1522
- * @param {string} type - event type
1523
- * @param {Highcharts.EventCallbackFunction<T>} fn - callback
1524
- * @return {void}
1525
1512
  */
1526
1513
  function removeOneEvent(type, fn) {
1527
1514
  var removeEventListener = (el.removeEventListener || H.removeEventListenerPolyfill);
@@ -1531,8 +1518,6 @@
1531
1518
  }
1532
1519
  /**
1533
1520
  * @private
1534
- * @param {any} eventCollection - collection
1535
- * @return {void}
1536
1521
  */
1537
1522
  function removeAllEvents(eventCollection) {
1538
1523
  var types,
@@ -2185,19 +2170,22 @@
2185
2170
  */
2186
2171
  var ChartDefaults = {
2187
2172
  /**
2188
- * Default `mapData` for all series. If set to a string,
2189
- it functions
2190
- * as an index into the `Highcharts.maps` array. Otherwise it is
2191
- * interpreted as map data.
2173
+ * Default `mapData` for all series,
2174
+ in terms of a GeoJSON or TopoJSON
2175
+ * object. If set to a string,
2176
+ it functions as an index into the
2177
+ * `Highcharts.maps` array.
2192
2178
  *
2193
- * @see [mapData](#series.map.mapData)
2179
+ * For picking out individual shapes and geometries to use for each series
2180
+ * of the map,
2181
+ see [series.mapData](#series.map.mapData).
2194
2182
  *
2195
2183
  * @sample maps/demo/geojson
2196
- * Loading geoJSON data
2184
+ * Loading GeoJSON data
2197
2185
  * @sample maps/chart/topojson
2198
- * Loading topoJSON converted to geoJSON
2186
+ * Loading TopoJSON data
2199
2187
  *
2200
- * @type {string|Array<*>|Highcharts.GeoJSON}
2188
+ * @type {string|Array<*>|Highcharts.GeoJSON|Highcharts.TopoJSON}
2201
2189
  * @since 5.0.0
2202
2190
  * @product highmaps
2203
2191
  * @apioption chart.map
@@ -2212,7 +2200,7 @@
2212
2200
  * @apioption chart.mapTransforms
2213
2201
  */
2214
2202
  /**
2215
- * When using multiple axis,
2203
+ * When using multiple axes,
2216
2204
  the ticks of two or more opposite axes
2217
2205
  * will automatically be aligned by adding ticks to the axis or axes
2218
2206
  * with the least ticks,
@@ -2223,8 +2211,8 @@
2223
2211
  it's a good idea to hide them for the secondary
2224
2212
  * axis by setting `gridLineWidth` to 0.
2225
2213
  *
2226
- * If `startOnTick` or `endOnTick` in an Axis options are set to false,
2227
- * then the `alignTicks ` will be disabled for the Axis.
2214
+ * If `startOnTick` or `endOnTick` in the axis options are set to false,
2215
+ * then the `alignTicks ` will be disabled for the axis.
2228
2216
  *
2229
2217
  * Disabled for logarithmic axes.
2230
2218
  *
@@ -2242,6 +2230,31 @@
2242
2230
  * @product highcharts highstock gantt
2243
2231
  * @apioption chart.alignTicks
2244
2232
  */
2233
+ /**
2234
+ * When using multiple axes,
2235
+ align the thresholds. When this is true,
2236
+ other
2237
+ * ticks will also be aligned.
2238
+ *
2239
+ * Note that for line series and some other series types,
2240
+ the `threshold`
2241
+ * option is set to `null` by default. This will in turn cause their y-axis
2242
+ * to not have a threshold. In order to avoid that,
2243
+ set the series
2244
+ * `threshold` to 0 or another number.
2245
+ *
2246
+ * If `startOnTick` or `endOnTick` in the axis options are set to false,
2247
+ or
2248
+ * if the axis is logarithmic,
2249
+ the threshold will not be aligned.
2250
+ *
2251
+ * @sample {highcharts} highcharts/chart/alignthresholds/ Set to true
2252
+ *
2253
+ * @since 10.0.0
2254
+ * @product highcharts highstock gantt
2255
+ * @apioption chart.alignThresholds
2256
+ */
2257
+ alignThresholds: false,
2245
2258
  /**
2246
2259
  * Set the overall animation for all chart updating. Animation can be
2247
2260
  * disabled throughout the chart by setting it to false here. It can
@@ -3078,9 +3091,10 @@
3078
3091
  * Y
3079
3092
  * @sample {highstock} stock/chart/zoomtype-xy/
3080
3093
  * Xy
3094
+ * @sample {highmaps} maps/chart/zoomtype-xy/
3095
+ * Map with selection zoom
3081
3096
  *
3082
3097
  * @type {string}
3083
- * @product highcharts highstock gantt
3084
3098
  * @validvalue ["x", "y", "xy"]
3085
3099
  * @apioption chart.zoomType
3086
3100
  */
@@ -3882,7 +3896,8 @@
3882
3896
  // time
3883
3897
  if (unit === 'Milliseconds' ||
3884
3898
  unit === 'Seconds' ||
3885
- (unit === 'Minutes' && this.getTimezoneOffset(date) % 3600000 === 0) // #13961
3899
+ (unit === 'Minutes' &&
3900
+ this.getTimezoneOffset(date) % 3600000 === 0) // #13961
3886
3901
  ) {
3887
3902
  return date['setUTC' + unit](value);
3888
3903
  }
@@ -3899,8 +3914,8 @@
3899
3914
  }
3900
3915
  // UTC time with no timezone handling
3901
3916
  if (this.useUTC ||
3902
- (hasNewSafariBug && unit === 'FullYear') // leap calculation in UTC only
3903
- ) {
3917
+ // leap calculation in UTC only
3918
+ (hasNewSafariBug && unit === 'FullYear')) {
3904
3919
  return date['setUTC' + unit](value);
3905
3920
  }
3906
3921
  // Else, local time
@@ -3916,7 +3931,6 @@
3916
3931
  *
3917
3932
  * @param {Highcharts.TimeOptions} options
3918
3933
  *
3919
- * @return {void}
3920
3934
  */
3921
3935
  Time.prototype.update = function (options) {
3922
3936
  var useUTC = pick(options && options.useUTC,
@@ -4005,6 +4019,7 @@
4005
4019
  Time.prototype.timezoneOffsetFunction = function () {
4006
4020
  var time = this,
4007
4021
  options = this.options,
4022
+ getTimezoneOffset = options.getTimezoneOffset,
4008
4023
  moment = options.moment || win.moment;
4009
4024
  if (!this.useUTC) {
4010
4025
  return function (timestamp) {
@@ -4024,9 +4039,9 @@
4024
4039
  }
4025
4040
  }
4026
4041
  // If not timezone is set, look for the getTimezoneOffset callback
4027
- if (this.useUTC && options.getTimezoneOffset) {
4042
+ if (this.useUTC && getTimezoneOffset) {
4028
4043
  return function (timestamp) {
4029
- return options.getTimezoneOffset(timestamp.valueOf()) * 60000;
4044
+ return getTimezoneOffset(timestamp.valueOf()) * 60000;
4030
4045
  };
4031
4046
  }
4032
4047
  // Last, use the `timezoneOffset` option if set
@@ -4160,8 +4175,10 @@
4160
4175
  * Resolve legacy formats of dateTimeLabelFormats (strings and arrays) into
4161
4176
  * an object.
4162
4177
  * @private
4163
- * @param {string|Array<T>|Highcharts.Dictionary<T>} f - General format description
4164
- * @return {Highcharts.Dictionary<T>} - The object definition
4178
+ * @param {string|Array<T>|Highcharts.Dictionary<T>} f
4179
+ * General format description
4180
+ * @return {Highcharts.Dictionary<T>}
4181
+ * The object definition
4165
4182
  */
4166
4183
  Time.prototype.resolveDTLFormat = function (f) {
4167
4184
  if (!isObject(f, true)) { // check for string or array
@@ -4193,6 +4210,7 @@
4193
4210
  * @param {number} [startOfWeek=1]
4194
4211
  *
4195
4212
  * @return {Highcharts.AxisTickPositionsArray}
4213
+ * Time positions
4196
4214
  */
4197
4215
  Time.prototype.getTimeTicks = function (normalizedInterval, min, max, startOfWeek) {
4198
4216
  var time = this,
@@ -4462,8 +4480,8 @@
4462
4480
  * In case of loading the library from a `script` tag,
4463
4481
  * this option is not needed, it will be loaded from there by default.
4464
4482
  *
4465
- * @type {function}
4466
- * @since 8.2.0
4483
+ * @type {Function}
4484
+ * @since 8.2.0
4467
4485
  * @apioption time.moment
4468
4486
  */
4469
4487
  ''; // keeps doclets above in JS file
@@ -6738,6 +6756,8 @@
6738
6756
  *
6739
6757
  * @sample {highcharts} highcharts/tooltip/pointformat/
6740
6758
  * A different point format with value suffix
6759
+ * @sample {highcharts|highstock} highcharts/tooltip/pointformat-extra-information/
6760
+ * Show extra information about points in the tooltip
6741
6761
  * @sample {highmaps} maps/tooltip/format/
6742
6762
  * Format demo
6743
6763
  *
@@ -6982,6 +7002,7 @@
6982
7002
  * @function Highcharts.getOptions
6983
7003
  *
6984
7004
  * @return {Highcharts.Options}
7005
+ * Default options.
6985
7006
  */
6986
7007
  function getOptions() {
6987
7008
  return defaultOptions;
@@ -6996,10 +7017,10 @@
6996
7017
  * @function Highcharts.setOptions
6997
7018
  *
6998
7019
  * @param {Highcharts.Options} options
6999
- * The new custom chart options.
7020
+ * The new custom chart options.
7000
7021
  *
7001
7022
  * @return {Highcharts.Options}
7002
- * Updated options.
7023
+ * Updated options.
7003
7024
  */
7004
7025
  function setOptions(options) {
7005
7026
  // Copy in the default options
@@ -7274,7 +7295,6 @@
7274
7295
  *
7275
7296
  * @function Highcharts.Fx#dSetter
7276
7297
  *
7277
- * @return {void}
7278
7298
  */
7279
7299
  Fx.prototype.dSetter = function () {
7280
7300
  var paths = this.paths,
@@ -7323,7 +7343,6 @@
7323
7343
  *
7324
7344
  * @function Highcharts.Fx#update
7325
7345
  *
7326
- * @return {void}
7327
7346
  */
7328
7347
  Fx.prototype.update = function () {
7329
7348
  var elem = this.elem,
@@ -7362,7 +7381,6 @@
7362
7381
  * @param {string} unit
7363
7382
  * The property unit, for example `px`.
7364
7383
  *
7365
- * @return {void}
7366
7384
  */
7367
7385
  Fx.prototype.run = function (from, to, unit) {
7368
7386
  var self = this,
@@ -7384,7 +7402,8 @@
7384
7402
  };
7385
7403
  if (from === to && !this.elem['forceAnimate:' + this.prop]) {
7386
7404
  delete options.curAnim[this.prop];
7387
- if (options.complete && Object.keys(options.curAnim).length === 0) {
7405
+ if (options.complete &&
7406
+ Object.keys(options.curAnim).length === 0) {
7388
7407
  options.complete.call(this.elem);
7389
7408
  }
7390
7409
  }
@@ -7443,7 +7462,8 @@
7443
7462
  }
7444
7463
  else {
7445
7464
  this.pos = options.easing((t - this.startTime) / duration);
7446
- this.now = this.start + ((this.end - this.start) * this.pos);
7465
+ this.now = this.start + ((this.end -
7466
+ this.start) * this.pos);
7447
7467
  this.update();
7448
7468
  ret = true;
7449
7469
  }
@@ -7485,9 +7505,6 @@
7485
7505
  /**
7486
7506
  * If shifting points, prepend a dummy point to the end path.
7487
7507
  * @private
7488
- * @param {Highcharts.SVGPathArray} arr - array
7489
- * @param {Highcharts.SVGPathArray} other - array
7490
- * @return {void}
7491
7508
  */
7492
7509
  function prepend(arr, other) {
7493
7510
  while (arr.length < fullLength) {
@@ -7523,9 +7540,6 @@
7523
7540
  /**
7524
7541
  * Copy and append last point until the length matches the end length.
7525
7542
  * @private
7526
- * @param {Highcharts.SVGPathArray} arr - array
7527
- * @param {Highcharts.SVGPathArray} other - array
7528
- * @return {void}
7529
7543
  */
7530
7544
  function append(arr, other) {
7531
7545
  while (arr.length < fullLength) {
@@ -7597,7 +7611,6 @@
7597
7611
  *
7598
7612
  * @function Highcharts.Fx#fillSetter
7599
7613
  *
7600
- * @return {void}
7601
7614
  */
7602
7615
  Fx.prototype.fillSetter = function () {
7603
7616
  Fx.prototype.strokeSetter.apply(this, arguments);
@@ -7607,10 +7620,9 @@
7607
7620
  *
7608
7621
  * @function Highcharts.Fx#strokeSetter
7609
7622
  *
7610
- * @return {void}
7611
7623
  */
7612
7624
  Fx.prototype.strokeSetter = function () {
7613
- this.elem.attr(this.prop, color(this.start).tweenTo(color(this.end), this.pos), null, true);
7625
+ this.elem.attr(this.prop, color(this.start).tweenTo(color(this.end), this.pos), void 0, true);
7614
7626
  };
7615
7627
  /* *
7616
7628
  *
@@ -7853,23 +7865,35 @@
7853
7865
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
7854
7866
  *
7855
7867
  * */
7856
- var SVG_NS = H.SVG_NS;
7868
+ var SVG_NS = H.SVG_NS,
7869
+ win = H.win;
7857
7870
  var attr = U.attr,
7858
7871
  createElement = U.createElement,
7859
- discardElement = U.discardElement,
7872
+ css = U.css,
7860
7873
  error = U.error,
7874
+ isFunction = U.isFunction,
7861
7875
  isString = U.isString,
7862
7876
  objectEach = U.objectEach,
7863
7877
  splat = U.splat;
7878
+ var trustedTypes = win.trustedTypes;
7864
7879
  /* *
7865
7880
  *
7866
7881
  * Constants
7867
7882
  *
7868
7883
  * */
7884
+ // Create the trusted type policy. This should not be exposed.
7885
+ var trustedTypesPolicy = (trustedTypes &&
7886
+ isFunction(trustedTypes.createPolicy) &&
7887
+ trustedTypes.createPolicy('highcharts', {
7888
+ createHTML: function (s) { return s; }
7889
+ }));
7890
+ var emptyHTML = trustedTypesPolicy ?
7891
+ trustedTypesPolicy.createHTML('') :
7892
+ '';
7869
7893
  // In IE8, DOMParser is undefined. IE9 and PhantomJS are only able to parse XML.
7870
7894
  var hasValidDOMParser = (function () {
7871
7895
  try {
7872
- return Boolean(new DOMParser().parseFromString('', 'text/html'));
7896
+ return Boolean(new DOMParser().parseFromString(emptyHTML, 'text/html'));
7873
7897
  }
7874
7898
  catch (e) {
7875
7899
  return false;
@@ -7936,6 +7960,19 @@
7936
7960
  });
7937
7961
  return attributes;
7938
7962
  };
7963
+ AST.parseStyle = function (style) {
7964
+ return style
7965
+ .split(';')
7966
+ .reduce(function (styles, line) {
7967
+ var pair = line.split(':').map(function (s) { return s.trim(); }),
7968
+ key = pair[0].replace(/-([a-z])/g,
7969
+ function (g) { return g[1].toUpperCase(); });
7970
+ if (pair[1]) {
7971
+ styles[key] = pair[1];
7972
+ }
7973
+ return styles;
7974
+ }, {});
7975
+ };
7939
7976
  /**
7940
7977
  * Utility function to set html content for an element by passing in a
7941
7978
  * markup string. The markup is safely parsed by the AST class to avoid
@@ -7952,7 +7989,7 @@
7952
7989
  * Markup string
7953
7990
  */
7954
7991
  AST.setElementHTML = function (el, html) {
7955
- el.innerHTML = ''; // Clear previous
7992
+ el.innerHTML = AST.emptyHTML; // Clear previous
7956
7993
  if (html) {
7957
7994
  var ast = new AST(html);
7958
7995
  ast.addToDOM(el);
@@ -7977,9 +8014,12 @@
7977
8014
  AST.prototype.addToDOM = function (parent) {
7978
8015
  /**
7979
8016
  * @private
7980
- * @param {Highcharts.ASTNode} subtree - HTML/SVG definition
7981
- * @param {Element} [subParent] - parent node
7982
- * @return {Highcharts.SVGDOMElement|Highcharts.HTMLDOMElement} The inserted node.
8017
+ * @param {Highcharts.ASTNode} subtree
8018
+ * HTML/SVG definition
8019
+ * @param {Element} [subParent]
8020
+ * parent node
8021
+ * @return {Highcharts.SVGDOMElement|Highcharts.HTMLDOMElement}
8022
+ * The inserted node.
7983
8023
  */
7984
8024
  function recurse(subtree, subParent) {
7985
8025
  var ret;
@@ -7988,12 +8028,15 @@
7988
8028
  var textNode = item.textContent ?
7989
8029
  H.doc.createTextNode(item.textContent) :
7990
8030
  void 0;
8031
+ // Whether to ignore the AST filtering totally, #15345
8032
+ var bypassHTMLFiltering = AST.bypassHTMLFiltering;
7991
8033
  var node;
7992
8034
  if (tagName) {
7993
8035
  if (tagName === '#text') {
7994
8036
  node = textNode;
7995
8037
  }
7996
- else if (AST.allowedTags.indexOf(tagName) !== -1) {
8038
+ else if (AST.allowedTags.indexOf(tagName) !== -1 ||
8039
+ bypassHTMLFiltering) {
7997
8040
  var NS = tagName === 'svg' ?
7998
8041
  SVG_NS :
7999
8042
  (subParent.namespaceURI || SVG_NS);
@@ -8006,11 +8049,17 @@
8006
8049
  if (key !== 'tagName' &&
8007
8050
  key !== 'attributes' &&
8008
8051
  key !== 'children' &&
8052
+ key !== 'style' &&
8009
8053
  key !== 'textContent') {
8010
8054
  attributes_1[key] = val;
8011
8055
  }
8012
8056
  });
8013
- attr(element, AST.filterUserAttributes(attributes_1));
8057
+ attr(element, bypassHTMLFiltering ?
8058
+ attributes_1 :
8059
+ AST.filterUserAttributes(attributes_1));
8060
+ if (item.style) {
8061
+ css(element, item.style);
8062
+ }
8014
8063
  // Add text content
8015
8064
  if (textNode) {
8016
8065
  element.appendChild(textNode);
@@ -8020,7 +8069,8 @@
8020
8069
  node = element;
8021
8070
  }
8022
8071
  else {
8023
- error("Highcharts warning: Invalid tagName '" + tagName + "' in config");
8072
+ error('Highcharts warning: Invalid tagName ' +
8073
+ tagName + ' in config');
8024
8074
  }
8025
8075
  }
8026
8076
  // Add to the tree
@@ -8048,14 +8098,19 @@
8048
8098
  */
8049
8099
  AST.prototype.parseMarkup = function (markup) {
8050
8100
  var nodes = [];
8051
- markup = markup.trim();
8101
+ markup = markup
8102
+ .trim()
8103
+ // The style attribute throws a warning when parsing when CSP is
8104
+ // enabled (#6884), so use an alias and pick it up below
8105
+ .replace(/ style="/g, ' data-style="');
8052
8106
  var doc;
8053
- var body;
8054
8107
  if (hasValidDOMParser) {
8055
- doc = new DOMParser().parseFromString(markup, 'text/html');
8108
+ doc = new DOMParser().parseFromString(trustedTypesPolicy ?
8109
+ trustedTypesPolicy.createHTML(markup) :
8110
+ markup, 'text/html');
8056
8111
  }
8057
8112
  else {
8058
- body = createElement('div');
8113
+ var body = createElement('div');
8059
8114
  body.innerHTML = markup;
8060
8115
  doc = { body: body };
8061
8116
  }
@@ -8074,7 +8129,12 @@
8074
8129
  if (parsedAttributes) {
8075
8130
  var attributes_2 = {};
8076
8131
  [].forEach.call(parsedAttributes, function (attrib) {
8077
- attributes_2[attrib.name] = attrib.value;
8132
+ if (attrib.name === 'data-style') {
8133
+ astNode.style = AST.parseStyle(attrib.value);
8134
+ }
8135
+ else {
8136
+ attributes_2[attrib.name] = attrib.value;
8137
+ }
8078
8138
  });
8079
8139
  astNode.attributes = attributes_2;
8080
8140
  }
@@ -8091,9 +8151,6 @@
8091
8151
  addTo.push(astNode);
8092
8152
  };
8093
8153
  [].forEach.call(doc.body.childNodes, function (childNode) { return appendChildNodes(childNode, nodes); });
8094
- if (body) {
8095
- discardElement(body);
8096
- }
8097
8154
  return nodes;
8098
8155
  };
8099
8156
  /* *
@@ -8280,6 +8337,35 @@
8280
8337
  'ul',
8281
8338
  '#text'
8282
8339
  ];
8340
+ AST.emptyHTML = emptyHTML;
8341
+ /**
8342
+ * Allow all custom SVG and HTML attributes, references and tags (together
8343
+ * with potentially harmful ones) to be added to the DOM from the chart
8344
+ * configuration. In other words, disable the the allow-listing which is the
8345
+ * primary functionality of the AST.
8346
+ *
8347
+ * WARNING: Setting this property to `true` while allowing untrusted user
8348
+ * data in the chart configuration will expose your application to XSS
8349
+ * security risks!
8350
+ *
8351
+ * Note that in case you want to allow a known set of tags or attributes,
8352
+ * you should allow-list them instead of disabling the filtering totally.
8353
+ * See [allowedAttributes](Highcharts.AST#.allowedAttributes),
8354
+ * [allowedReferences](Highcharts.AST#.allowedReferences) and
8355
+ * [allowedTags](Highcharts.AST#.allowedTags). The `bypassHTMLFiltering`
8356
+ * setting is intended only for those cases where allow-listing is not
8357
+ * practical, and the chart configuration already comes from a secure
8358
+ * source.
8359
+ *
8360
+ * @example
8361
+ * // Allow all custom attributes, references and tags (disable DOM XSS
8362
+ * // filtering)
8363
+ * Highcharts.AST.bypassHTMLFiltering = true;
8364
+ *
8365
+ * @name Highcharts.AST.bypassHTMLFiltering
8366
+ * @static
8367
+ */
8368
+ AST.bypassHTMLFiltering = false;
8283
8369
  return AST;
8284
8370
  }());
8285
8371
  /* *
@@ -8615,7 +8701,8 @@
8615
8701
  * @private
8616
8702
  */
8617
8703
  function distribute(boxes, len, maxDistance) {
8618
- var origBoxes = boxes, // Original array will be altered with added .pos
8704
+ // Original array will be altered with added .pos
8705
+ var origBoxes = boxes,
8619
8706
  reducedLen = origBoxes.reducedLen || len,
8620
8707
  sortByRank = function (a,
8621
8708
  b) {
@@ -8870,7 +8957,6 @@
8870
8957
  *
8871
8958
  * @param {Highcharts.SVGDOMElement} element
8872
8959
  *
8873
- * @return {void}
8874
8960
  */
8875
8961
  SVGElement.prototype._defaultSetter = function (value, key, element) {
8876
8962
  element.setAttribute(key, value);
@@ -9023,7 +9109,8 @@
9023
9109
  alignByTranslate = this.alignByTranslate;
9024
9110
  alignTo = this.alignTo;
9025
9111
  }
9026
- box = pick(box, renderer[alignTo], alignTo === 'scrollablePlotBox' ? renderer.plotBox : void 0, renderer);
9112
+ box = pick(box, renderer[alignTo], alignTo === 'scrollablePlotBox' ?
9113
+ renderer.plotBox : void 0, renderer);
9027
9114
  // Assign variables
9028
9115
  var align = alignOptions.align,
9029
9116
  vAlign = alignOptions.verticalAlign;
@@ -9122,7 +9209,7 @@
9122
9209
  }, deferTime);
9123
9210
  }
9124
9211
  else {
9125
- this.attr(params, void 0, complete);
9212
+ this.attr(params, void 0, complete || animOptions.complete);
9126
9213
  // Call the end step synchronously
9127
9214
  objectEach(params, function (val, prop) {
9128
9215
  if (animOptions.step) {
@@ -9319,7 +9406,8 @@
9319
9406
  // Let the shadow follow the main element
9320
9407
  if (!this.styledMode &&
9321
9408
  this.shadows &&
9322
- /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(key)) {
9409
+ /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/
9410
+ .test(key)) {
9323
9411
  this.updateShadows(key, val, setter);
9324
9412
  }
9325
9413
  }
@@ -9519,25 +9607,20 @@
9519
9607
  * Return the SVG element for chaining.
9520
9608
  */
9521
9609
  SVGElement.prototype.css = function (styles) {
9522
- var oldStyles = this.styles, newStyles = {}, elem = this.element,
9523
- // These CSS properties are interpreted internally by the SVG
9524
- // renderer, but are not supported by SVG and should not be added to
9525
- // the DOM. In styled mode, no CSS should find its way to the DOM
9526
- // whatsoever (#6173, #6474).
9527
- svgPseudoProps = ['textOutline', 'textOverflow', 'width'];
9610
+ var oldStyles = this.styles,
9611
+ newStyles = {},
9612
+ elem = this.element;
9528
9613
  var textWidth,
9529
- serializedCss = '',
9530
- hyphenate,
9531
9614
  hasNew = !oldStyles;
9532
9615
  // convert legacy
9533
- if (styles && styles.color) {
9616
+ if (styles.color) {
9534
9617
  styles.fill = styles.color;
9535
9618
  }
9536
9619
  // Filter out existing styles to increase performance (#2640)
9537
9620
  if (oldStyles) {
9538
- objectEach(styles, function (style, n) {
9539
- if (oldStyles && oldStyles[n] !== style) {
9540
- newStyles[n] = style;
9621
+ objectEach(styles, function (value, n) {
9622
+ if (oldStyles && oldStyles[n] !== value) {
9623
+ newStyles[n] = value;
9541
9624
  hasNew = true;
9542
9625
  }
9543
9626
  });
@@ -9548,41 +9631,30 @@
9548
9631
  styles = extend(oldStyles, newStyles);
9549
9632
  }
9550
9633
  // Get the text width from style
9551
- if (styles) {
9552
- // Previously set, unset it (#8234)
9553
- if (styles.width === null || styles.width === 'auto') {
9554
- delete this.textWidth;
9555
- // Apply new
9556
- }
9557
- else if (elem.nodeName.toLowerCase() === 'text' &&
9558
- styles.width) {
9559
- textWidth = this.textWidth = pInt(styles.width);
9560
- }
9634
+ // Previously set, unset it (#8234)
9635
+ if (styles.width === null || styles.width === 'auto') {
9636
+ delete this.textWidth;
9637
+ // Apply new
9638
+ }
9639
+ else if (elem.nodeName.toLowerCase() === 'text' &&
9640
+ styles.width) {
9641
+ textWidth = this.textWidth = pInt(styles.width);
9561
9642
  }
9562
9643
  // store object
9563
9644
  this.styles = styles;
9564
9645
  if (textWidth && (!svg && this.renderer.forExport)) {
9565
9646
  delete styles.width;
9566
9647
  }
9567
- // Serialize and set style attribute
9568
- if (elem.namespaceURI === this.SVG_NS) { // #7633
9569
- hyphenate = function (a, b) {
9570
- return '-' + b.toLowerCase();
9571
- };
9572
- objectEach(styles, function (style, n) {
9573
- if (svgPseudoProps.indexOf(n) === -1) {
9574
- serializedCss +=
9575
- n.replace(/([A-Z])/g, hyphenate) + ':' +
9576
- style + ';';
9577
- }
9578
- });
9579
- if (serializedCss) {
9580
- attr(elem, 'style', serializedCss); // #1881
9581
- }
9582
- }
9583
- else {
9584
- css(elem, styles);
9648
+ var stylesToApply_1 = merge(styles);
9649
+ if (elem.namespaceURI === this.SVG_NS) {
9650
+ // These CSS properties are interpreted internally by the SVG
9651
+ // renderer, but are not supported by SVG and should not be
9652
+ // added to the DOM. In styled mode, no CSS should find its way
9653
+ // to the DOM whatsoever (#6173, #6474).
9654
+ ['textOutline', 'textOverflow', 'width'].forEach(function (key) { return (stylesToApply_1 &&
9655
+ delete stylesToApply_1[key]); });
9585
9656
  }
9657
+ css(elem, stylesToApply_1);
9586
9658
  if (this.added) {
9587
9659
  // Rebuild text after added. Cache mechanisms in the buildText
9588
9660
  // will prevent building if there are no significant changes.
@@ -9590,7 +9662,7 @@
9590
9662
  this.renderer.buildText(this);
9591
9663
  }
9592
9664
  // Apply text outline after added
9593
- if (styles && styles.textOutline) {
9665
+ if (styles.textOutline) {
9594
9666
  this.applyTextOutline(styles.textOutline);
9595
9667
  }
9596
9668
  }
@@ -9708,7 +9780,6 @@
9708
9780
  * @private
9709
9781
  * @function Highcharts.SVGElement#destroyShadows
9710
9782
  *
9711
- * @return {void}
9712
9783
  */
9713
9784
  SVGElement.prototype.destroyShadows = function () {
9714
9785
  (this.shadows || []).forEach(function (shadow) {
@@ -9948,8 +10019,7 @@
9948
10019
  bBox.height = height = ({
9949
10020
  '11px,17': 14,
9950
10021
  '13px,20': 16
9951
- }[styles &&
9952
- styles.fontSize + ',' + Math.round(height)] ||
10022
+ }[(fontSize || '') + "," + Math.round(height)] ||
9953
10023
  height);
9954
10024
  }
9955
10025
  // Adjust for rotated text
@@ -10628,12 +10698,13 @@
10628
10698
  * @function Highcharts.SVGElement#translate
10629
10699
  *
10630
10700
  * @param {number} x
10631
- * The x value.
10701
+ * The x value.
10632
10702
  *
10633
10703
  * @param {number} y
10634
- * The y value.
10704
+ * The y value.
10635
10705
  *
10636
10706
  * @return {Highcharts.SVGElement}
10707
+ * Translated element.
10637
10708
  */
10638
10709
  SVGElement.prototype.translate = function (x, y) {
10639
10710
  return this.attr({
@@ -10727,7 +10798,6 @@
10727
10798
  *
10728
10799
  * @param {Highcharts.SVGDOMElement} element
10729
10800
  *
10730
- * @return {void}
10731
10801
  */
10732
10802
  SVGElement.prototype.visibilitySetter = function (value, key, element) {
10733
10803
  // IE9-11 doesn't handle visibilty:inherit well, so we remove the
@@ -10743,10 +10813,6 @@
10743
10813
  /**
10744
10814
  * @private
10745
10815
  * @function Highcharts.SVGElement#xGetter
10746
- *
10747
- * @param {string} key
10748
- *
10749
- * @return {number|string|null}
10750
10816
  */
10751
10817
  SVGElement.prototype.xGetter = function (key) {
10752
10818
  if (this.element.nodeName === 'circle') {
@@ -10762,9 +10828,6 @@
10762
10828
  /**
10763
10829
  * @private
10764
10830
  * @function Highcharts.SVGElement#zIndexSetter
10765
- * @param {number} [value]
10766
- * @param {string} [key]
10767
- * @return {boolean}
10768
10831
  */
10769
10832
  SVGElement.prototype.zIndexSetter = function (value, key) {
10770
10833
  var renderer = this.renderer,
@@ -11249,7 +11312,8 @@
11249
11312
  }
11250
11313
  });
11251
11314
  this.text.css(textStyles_1);
11252
- var isWidth = 'width' in textStyles_1, isFontStyle = ('fontSize' in textStyles_1 || 'fontWeight' in textStyles_1);
11315
+ var isWidth = 'width' in textStyles_1, isFontStyle = ('fontSize' in textStyles_1 ||
11316
+ 'fontWeight' in textStyles_1);
11253
11317
  // Update existing text, box (#9400, #12163)
11254
11318
  if (isFontStyle) {
11255
11319
  this.updateTextPadding();
@@ -11419,13 +11483,15 @@
11419
11483
  this.renderer.symbol(this.symbolKey) :
11420
11484
  this.renderer.rect();
11421
11485
  box.addClass(// Don't use label className for buttons
11422
- (this.className === 'button' ? '' : 'highcharts-label-box') +
11423
- (this.className ? ' highcharts-' + this.className + '-box' : ''));
11486
+ (this.className === 'button' ?
11487
+ '' : 'highcharts-label-box') +
11488
+ (this.className ?
11489
+ ' highcharts-' + this.className + '-box' : ''));
11424
11490
  box.add(this);
11425
11491
  }
11426
11492
  crispAdjust = this.getCrispAdjust();
11427
11493
  attribs.x = crispAdjust;
11428
- attribs.y = (this.baseline ? -this.baselineOffset : 0) + crispAdjust;
11494
+ attribs.y = ((this.baseline ? -this.baselineOffset : 0) + crispAdjust);
11429
11495
  // Apply the box attributes
11430
11496
  attribs.width = Math.round(this.width);
11431
11497
  attribs.height = Math.round(this.height);
@@ -11448,8 +11514,7 @@
11448
11514
  if (defined(this.widthSetting) &&
11449
11515
  this.bBox &&
11450
11516
  (this.textAlign === 'center' || this.textAlign === 'right')) {
11451
- textX += { center: 0.5, right: 1 }[this.textAlign] *
11452
- (this.widthSetting - this.bBox.width);
11517
+ textX += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width);
11453
11518
  }
11454
11519
  // update if anything changed
11455
11520
  if (textX !== text.x || textY !== text.y) {
@@ -11477,7 +11542,9 @@
11477
11542
  padding);
11478
11543
  var paddingRight = pick(this.paddingRight,
11479
11544
  padding);
11480
- return (this.widthSetting || this.bBox.width || 0) + paddingLeft + paddingRight;
11545
+ return ((this.widthSetting || this.bBox.width || 0) +
11546
+ paddingLeft +
11547
+ paddingRight);
11481
11548
  };
11482
11549
  SVGLabel.prototype.xSetter = function (value) {
11483
11550
  this.x = value; // for animation getter
@@ -11498,7 +11565,12 @@
11498
11565
  * Static Properties
11499
11566
  *
11500
11567
  * */
11501
- SVGLabel.emptyBBox = { width: 0, height: 0, x: 0, y: 0 };
11568
+ SVGLabel.emptyBBox = {
11569
+ width: 0,
11570
+ height: 0,
11571
+ x: 0,
11572
+ y: 0
11573
+ };
11502
11574
  /**
11503
11575
  * For labels, these CSS properties are applied to the `text` node directly.
11504
11576
  *
@@ -11759,6 +11831,7 @@
11759
11831
  SVG_NS = H.SVG_NS,
11760
11832
  win = H.win;
11761
11833
  var attr = U.attr,
11834
+ extend = U.extend,
11762
11835
  isString = U.isString,
11763
11836
  objectEach = U.objectEach,
11764
11837
  pick = U.pick;
@@ -11861,7 +11934,6 @@
11861
11934
  *
11862
11935
  * @private
11863
11936
  *
11864
- * @return {void}
11865
11937
  */
11866
11938
  TextBuilder.prototype.modifyDOM = function () {
11867
11939
  var _this = this;
@@ -12005,7 +12077,7 @@
12005
12077
  TextBuilder.prototype.getLineHeight = function (node) {
12006
12078
  var fontSizeStyle;
12007
12079
  // If the node is a text node, use its parent
12008
- var element = node.nodeType === win.Node.TEXT_NODE ?
12080
+ var element = (node.nodeType === win.Node.TEXT_NODE) ?
12009
12081
  node.parentElement :
12010
12082
  node;
12011
12083
  if (!this.renderer.styledMode) {
@@ -12027,36 +12099,42 @@
12027
12099
  *
12028
12100
  * @param {ASTNode[]} nodes The AST nodes
12029
12101
  *
12030
- * @return {void}
12031
12102
  */
12032
12103
  TextBuilder.prototype.modifyTree = function (nodes) {
12033
12104
  var _this = this;
12034
12105
  var modifyChild = function (node,
12035
12106
  i) {
12036
- var tagName = node.tagName;
12037
- var styledMode = _this.renderer.styledMode;
12038
- var attributes = node.attributes || {};
12107
+ var _a = node.attributes,
12108
+ attributes = _a === void 0 ? {} : _a,
12109
+ children = node.children,
12110
+ _b = node.style,
12111
+ style = _b === void 0 ? {} : _b,
12112
+ tagName = node.tagName,
12113
+ styledMode = _this.renderer.styledMode;
12039
12114
  // Apply styling to text tags
12040
12115
  if (tagName === 'b' || tagName === 'strong') {
12041
12116
  if (styledMode) {
12042
- attributes['class'] = 'highcharts-strong'; // eslint-disable-line dot-notation
12117
+ // eslint-disable-next-line dot-notation
12118
+ attributes['class'] = 'highcharts-strong';
12043
12119
  }
12044
12120
  else {
12045
- attributes.style = 'font-weight:bold;' + (attributes.style || '');
12121
+ style.fontWeight = 'bold';
12046
12122
  }
12047
12123
  }
12048
12124
  else if (tagName === 'i' || tagName === 'em') {
12049
12125
  if (styledMode) {
12050
- attributes['class'] = 'highcharts-emphasized'; // eslint-disable-line dot-notation
12126
+ // eslint-disable-next-line dot-notation
12127
+ attributes['class'] = 'highcharts-emphasized';
12051
12128
  }
12052
12129
  else {
12053
- attributes.style = 'font-style:italic;' + (attributes.style || '');
12130
+ style.fontStyle = 'italic';
12054
12131
  }
12055
12132
  }
12056
- // Modify attributes
12057
- if (isString(attributes.style)) {
12058
- attributes.style = attributes.style.replace(/(;| |^)color([ :])/, '$1fill$2');
12133
+ // Modify styling
12134
+ if (style && style.color) {
12135
+ style.fill = style.color;
12059
12136
  }
12137
+ // Handle breaks
12060
12138
  if (tagName === 'br') {
12061
12139
  attributes['class'] = 'highcharts-br'; // eslint-disable-line dot-notation
12062
12140
  node.textContent = '\u200B'; // zero-width space
@@ -12066,14 +12144,23 @@
12066
12144
  nextNode.textContent =
12067
12145
  nextNode.textContent.replace(/^ +/gm, '');
12068
12146
  }
12147
+ // If an anchor has direct text node children, the text is unable to
12148
+ // wrap because there is no `getSubStringLength` function on the
12149
+ // element. Therefore we need to wrap the child text node or nodes
12150
+ // in a tspan. #16173.
12151
+ }
12152
+ else if (tagName === 'a' &&
12153
+ children &&
12154
+ children.some(function (child) { return child.tagName === '#text'; })) {
12155
+ node.children = [{ children: children, tagName: 'tspan' }];
12069
12156
  }
12070
12157
  if (tagName !== '#text' && tagName !== 'a') {
12071
12158
  node.tagName = 'tspan';
12072
12159
  }
12073
- node.attributes = attributes;
12160
+ extend(node, { attributes: attributes, style: style });
12074
12161
  // Recurse
12075
- if (node.children) {
12076
- node.children
12162
+ if (children) {
12163
+ children
12077
12164
  .filter(function (c) { return c.tagName !== '#text'; })
12078
12165
  .forEach(modifyChild);
12079
12166
  }
@@ -12410,7 +12497,7 @@
12410
12497
  this.url = this.getReferenceURL();
12411
12498
  // Add description
12412
12499
  var desc = this.createElement('desc').add();
12413
- desc.element.appendChild(doc.createTextNode('Created with Highcharts 9.3.1'));
12500
+ desc.element.appendChild(doc.createTextNode('Created with Highcharts 10.0.0'));
12414
12501
  renderer.defs = this.createElement('defs').add();
12415
12502
  renderer.allowHTML = allowHTML;
12416
12503
  renderer.forExport = forExport;
@@ -12602,6 +12689,7 @@
12602
12689
  * @function Highcharts.SVGRenderer#destroy
12603
12690
  *
12604
12691
  * @return {null}
12692
+ * Pass through value.
12605
12693
  */
12606
12694
  SVGRenderer.prototype.destroy = function () {
12607
12695
  var renderer = this,
@@ -12749,14 +12837,20 @@
12749
12837
  // Make a copy of normalState (#13798)
12750
12838
  // (reference to options.rangeSelector.buttonTheme)
12751
12839
  normalState = theme ? merge(theme) : {};
12752
- var userNormalStyle = normalState && normalState.style || {};
12840
+ var normalStyle = merge({
12841
+ color: "#333333" /* neutralColor80 */,
12842
+ cursor: 'pointer',
12843
+ fontWeight: 'normal'
12844
+ },
12845
+ normalState.style);
12846
+ delete normalState.style;
12753
12847
  // Remove stylable attributes
12754
12848
  normalState = AST.filterUserAttributes(normalState);
12755
12849
  // Default, non-stylable attributes
12756
12850
  label.attr(merge({ padding: 8, r: 2 }, normalState));
12757
- // Presentational
12758
- var normalStyle,
12759
- hoverStyle,
12851
+ // Presentational. The string type is a mistake, it is just for
12852
+ // compliance with SVGAttribute and is not used in button theme.
12853
+ var hoverStyle,
12760
12854
  pressedStyle,
12761
12855
  disabledStyle;
12762
12856
  if (!styledMode) {
@@ -12764,17 +12858,8 @@
12764
12858
  normalState = merge({
12765
12859
  fill: "#f7f7f7" /* neutralColor3 */,
12766
12860
  stroke: "#cccccc" /* neutralColor20 */,
12767
- 'stroke-width': 1,
12768
- style: {
12769
- color: "#333333" /* neutralColor80 */,
12770
- cursor: 'pointer',
12771
- fontWeight: 'normal'
12772
- }
12773
- }, {
12774
- style: userNormalStyle
12861
+ 'stroke-width': 1
12775
12862
  }, normalState);
12776
- normalStyle = normalState.style;
12777
- delete normalState.style;
12778
12863
  // Hover state
12779
12864
  hoverState = merge(normalState, {
12780
12865
  fill: "#e6e6e6" /* neutralColor10 */
@@ -12829,13 +12914,16 @@
12829
12914
  hoverState,
12830
12915
  pressedState,
12831
12916
  disabledState
12832
- ][state || 0])
12833
- .css([
12834
- normalStyle,
12835
- hoverStyle,
12836
- pressedStyle,
12837
- disabledStyle
12838
12917
  ][state || 0]);
12918
+ var css_1 = [
12919
+ normalStyle,
12920
+ hoverStyle,
12921
+ pressedStyle,
12922
+ disabledStyle
12923
+ ][state || 0];
12924
+ if (isObject(css_1)) {
12925
+ label.css(css_1);
12926
+ }
12839
12927
  }
12840
12928
  };
12841
12929
  // Presentational attributes
@@ -13278,6 +13366,7 @@
13278
13366
  * Additional options, depending on the actual symbol drawn.
13279
13367
  *
13280
13368
  * @return {Highcharts.SVGElement}
13369
+ * SVG symbol.
13281
13370
  */
13282
13371
  SVGRenderer.prototype.symbol = function (symbol, x, y, width, height, options) {
13283
13372
  var ren = this,
@@ -13507,8 +13596,8 @@
13507
13596
  parentVal = element.getAttribute(key);
13508
13597
  for (var i = 0, tspan = void 0; i < tspans.length; i++) {
13509
13598
  tspan = tspans[i];
13510
- // If the x values are equal, the tspan represents a
13511
- // linebreak
13599
+ // If the x values are equal, the tspan represents a line
13600
+ // break
13512
13601
  if (tspan.getAttribute(key) === parentVal) {
13513
13602
  tspan.setAttribute(key, value);
13514
13603
  }
@@ -13572,14 +13661,6 @@
13572
13661
  *
13573
13662
  * @private
13574
13663
  * @function Highcharts.SVGRenderer#rotCorr
13575
- *
13576
- * @param {number} baseline
13577
- *
13578
- * @param {number} rotation
13579
- *
13580
- * @param {boolean} [alterY]
13581
- *
13582
- * @param {Highcharts.PositionObject}
13583
13664
  */
13584
13665
  SVGRenderer.prototype.rotCorr = function (baseline, rotation, alterY) {
13585
13666
  var y = baseline;
@@ -13883,7 +13964,6 @@
13883
13964
  *
13884
13965
  * @private
13885
13966
  * @function Highcharts.SVGRenderer#alignElements
13886
- * @return {void}
13887
13967
  */
13888
13968
  SVGRenderer.prototype.alignElements = function () {
13889
13969
  this.alignedObjects.forEach(function (el) { return el.align(); });
@@ -14213,10 +14293,12 @@
14213
14293
  HTMLElement.composedClasses.push(SVGElementClass);
14214
14294
  var htmlElementProto = HTMLElement.prototype,
14215
14295
  svgElementProto = SVGElementClass.prototype;
14216
- svgElementProto.getSpanCorrection = htmlElementProto.getSpanCorrection;
14296
+ svgElementProto.getSpanCorrection = htmlElementProto
14297
+ .getSpanCorrection;
14217
14298
  svgElementProto.htmlCss = htmlElementProto.htmlCss;
14218
14299
  svgElementProto.htmlGetBBox = htmlElementProto.htmlGetBBox;
14219
- svgElementProto.htmlUpdateTransform = htmlElementProto.htmlUpdateTransform;
14300
+ svgElementProto.htmlUpdateTransform = htmlElementProto
14301
+ .htmlUpdateTransform;
14220
14302
  svgElementProto.setSpanRotation = htmlElementProto.setSpanRotation;
14221
14303
  }
14222
14304
  return SVGElementClass;
@@ -14510,15 +14592,16 @@
14510
14592
  * @function Highcharts.SVGRenderer#html
14511
14593
  *
14512
14594
  * @param {string} str
14513
- * The text of (subset) HTML to draw.
14595
+ * The text of (subset) HTML to draw.
14514
14596
  *
14515
14597
  * @param {number} x
14516
- * The x position of the text's lower left corner.
14598
+ * The x position of the text's lower left corner.
14517
14599
  *
14518
14600
  * @param {number} y
14519
- * The y position of the text's lower left corner.
14601
+ * The y position of the text's lower left corner.
14520
14602
  *
14521
14603
  * @return {Highcharts.HTMLDOMElement}
14604
+ * HTML element.
14522
14605
  */
14523
14606
  HTMLRenderer.prototype.html = function (str, x, y) {
14524
14607
  var wrapper = this.createElement('span'), element = wrapper.element, renderer = wrapper.renderer, isSVG = renderer.isSVG, addSetters = function (gWrapper, style) {
@@ -14628,8 +14711,7 @@
14628
14711
  * @private
14629
14712
  * @param {*} value
14630
14713
  * @param {string} key
14631
- * @return {void}
14632
- */
14714
+ */
14633
14715
  function translateSetter(value, key) {
14634
14716
  parentGroup[key] = value;
14635
14717
  if (key === 'translateX') {
@@ -14652,7 +14734,9 @@
14652
14734
  display: parentGroup.display,
14653
14735
  opacity: parentGroup.opacity,
14654
14736
  cursor: parentGroupStyles.cursor,
14655
- pointerEvents: parentGroupStyles.pointerEvents,
14737
+ pointerEvents: (
14738
+ // #5595
14739
+ parentGroupStyles.pointerEvents),
14656
14740
  visibility: parentGroup.visibility
14657
14741
  // the top group is appended to container
14658
14742
  }, htmlGroup || container);
@@ -17764,7 +17848,7 @@
17764
17848
  * @param {boolean} [noLabel=false]
17765
17849
  * Whether to disable the label or not. Defaults to false.
17766
17850
  *
17767
- * @param {object} [parameters]
17851
+ * @param {Object} [parameters]
17768
17852
  * Optional parameters for the tick.
17769
17853
  */
17770
17854
  var Tick = /** @class */ (function () {
@@ -18018,7 +18102,7 @@
18018
18102
  * @return {Highcharts.PositionObject}
18019
18103
  * The tick position.
18020
18104
  *
18021
- * @fires Highcharts.Tick#event:afterGetPosition
18105
+ * @emits Highcharts.Tick#event:afterGetPosition
18022
18106
  */
18023
18107
  Tick.prototype.getPosition = function (horiz, tickPos, tickmarkOffset, old) {
18024
18108
  var axis = this.axis,
@@ -18058,9 +18142,7 @@
18058
18142
  };
18059
18143
  /**
18060
18144
  * Get the x, y position of the tick label
18061
- *
18062
18145
  * @private
18063
- * @return {Highcharts.PositionObject}
18064
18146
  */
18065
18147
  Tick.prototype.getLabelPosition = function (x, y, label, horiz, labelOptions, tickmarkOffset, index, step) {
18066
18148
  var axis = this.axis,
@@ -18643,7 +18725,6 @@
18643
18725
  function Axis(chart, userOptions) {
18644
18726
  this.alternateBands = void 0;
18645
18727
  this.bottom = void 0;
18646
- this.categories = void 0;
18647
18728
  this.chart = void 0;
18648
18729
  this.closestPointRange = void 0;
18649
18730
  this.coll = void 0;
@@ -18710,8 +18791,8 @@
18710
18791
  * @param {AxisOptions} userOptions
18711
18792
  * Axis options.
18712
18793
  *
18713
- * @fires Highcharts.Axis#event:afterInit
18714
- * @fires Highcharts.Axis#event:init
18794
+ * @emits Highcharts.Axis#event:afterInit
18795
+ * @emits Highcharts.Axis#event:init
18715
18796
  */
18716
18797
  Axis.prototype.init = function (chart, userOptions) {
18717
18798
  var isXAxis = userOptions.isX,
@@ -18747,7 +18828,8 @@
18747
18828
  */
18748
18829
  axis.coll = axis.coll || (isXAxis ? 'xAxis' : 'yAxis');
18749
18830
  fireEvent(this, 'init', { userOptions: userOptions });
18750
- axis.opposite = pick(userOptions.opposite, axis.opposite); // needed in setOptions
18831
+ // Needed in setOptions
18832
+ axis.opposite = pick(userOptions.opposite, axis.opposite);
18751
18833
  /**
18752
18834
  * The side on which the axis is rendered. 0 is top, 1 is right, 2
18753
18835
  * is bottom and 3 is left.
@@ -18806,7 +18888,7 @@
18806
18888
  * @type {Array<string>}
18807
18889
  * @readonly
18808
18890
  */
18809
- axis.categories = options.categories || axis.hasNames;
18891
+ axis.categories = options.categories || (axis.hasNames ? [] : void 0);
18810
18892
  if (!axis.names) { // Preserve on update (#3830)
18811
18893
  axis.names = [];
18812
18894
  axis.names.keys = {};
@@ -18912,7 +18994,7 @@
18912
18994
  * @param {Highcharts.AxisOptions} userOptions
18913
18995
  * Axis options.
18914
18996
  *
18915
- * @fires Highcharts.Axis#event:afterSetOptions
18997
+ * @emits Highcharts.Axis#event:afterSetOptions
18916
18998
  */
18917
18999
  Axis.prototype.setOptions = function (userOptions) {
18918
19000
  this.options = merge(AxisDefaults.defaultXAxisOptions, (this.coll === 'yAxis') && AxisDefaults.defaultYAxisOptions, [
@@ -19005,8 +19087,8 @@
19005
19087
  * @private
19006
19088
  * @function Highcharts.Axis#getSeriesExtremes
19007
19089
  *
19008
- * @fires Highcharts.Axis#event:afterGetSeriesExtremes
19009
- * @fires Highcharts.Axis#event:getSeriesExtremes
19090
+ * @emits Highcharts.Axis#event:afterGetSeriesExtremes
19091
+ * @emits Highcharts.Axis#event:getSeriesExtremes
19010
19092
  */
19011
19093
  Axis.prototype.getSeriesExtremes = function () {
19012
19094
  var axis = this,
@@ -19104,26 +19186,6 @@
19104
19186
  *
19105
19187
  * @private
19106
19188
  * @function Highcharts.Axis#translate
19107
- *
19108
- * @param {number} val
19109
- * TO-DO: parameter description
19110
- *
19111
- * @param {boolean|null} [backwards]
19112
- * TO-DO: parameter description
19113
- *
19114
- * @param {boolean|null} [cvsCoord]
19115
- * TO-DO: parameter description
19116
- *
19117
- * @param {boolean|null} [old]
19118
- * TO-DO: parameter description
19119
- *
19120
- * @param {boolean} [handleLog]
19121
- * TO-DO: parameter description
19122
- *
19123
- * @param {number} [pointPlacement]
19124
- * TO-DO: parameter description
19125
- *
19126
- * @return {number|undefined}
19127
19189
  */
19128
19190
  Axis.prototype.translate = function (val, backwards, cvsCoord, old, handleLog, pointPlacement) {
19129
19191
  var axis = (this.linkedParent || this), // #1417
@@ -19165,8 +19227,9 @@
19165
19227
  if (doPostTranslate) { // log, ordinal and broken axis
19166
19228
  val = axis.val2lin(val);
19167
19229
  }
19230
+ var value = sign * (val - localMin) * localA;
19168
19231
  returnValue = isNumber(localMin) ?
19169
- (sign * (val - localMin) * localA +
19232
+ ((!axis.isRadial ? correctFloat(value) : value) +
19170
19233
  cvsOffset +
19171
19234
  (sign * minPixelPadding) +
19172
19235
  (isNumber(pointPlacement) ?
@@ -19357,6 +19420,7 @@
19357
19420
  * @function Highcharts.Axis#getMinorTickInterval
19358
19421
  *
19359
19422
  * @return {number|"auto"|null}
19423
+ * Legacy option
19360
19424
  */
19361
19425
  Axis.prototype.getMinorTickInterval = function () {
19362
19426
  var options = this.options;
@@ -19466,7 +19530,8 @@
19466
19530
  if (xData.length > 1) {
19467
19531
  for (i = loopLength; i > 0; i--) {
19468
19532
  distance = xData[i] - xData[i - 1];
19469
- if (!closestDataRange || distance < closestDataRange) {
19533
+ if (!closestDataRange ||
19534
+ distance < closestDataRange) {
19470
19535
  closestDataRange = distance;
19471
19536
  }
19472
19537
  }
@@ -19521,8 +19586,6 @@
19521
19586
  *
19522
19587
  * @private
19523
19588
  * @function Highcharts.Axis#getClosest
19524
- *
19525
- * @return {number}
19526
19589
  */
19527
19590
  Axis.prototype.getClosest = function () {
19528
19591
  var ret;
@@ -19560,20 +19623,20 @@
19560
19623
  * The X value that the point is given.
19561
19624
  */
19562
19625
  Axis.prototype.nameToX = function (point) {
19563
- var explicitCategories = isArray(this.categories),
19626
+ var explicitCategories = isArray(this.options.categories),
19564
19627
  names = explicitCategories ? this.categories : this.names;
19565
19628
  var nameX = point.options.x,
19566
19629
  x;
19567
19630
  point.series.requireSorting = false;
19568
19631
  if (!defined(nameX)) {
19569
- nameX = this.options.uniqueNames ?
19632
+ nameX = this.options.uniqueNames && names ?
19570
19633
  (explicitCategories ?
19571
19634
  names.indexOf(point.name) :
19572
19635
  pick(names.keys[point.name], -1)) :
19573
19636
  point.series.autoIncrement();
19574
19637
  }
19575
19638
  if (nameX === -1) { // Not found in currenct categories
19576
- if (!explicitCategories) {
19639
+ if (!explicitCategories && names) {
19577
19640
  x = names.length;
19578
19641
  }
19579
19642
  }
@@ -19641,7 +19704,7 @@
19641
19704
  * @private
19642
19705
  * @function Highcharts.Axis#setAxisTranslation
19643
19706
  *
19644
- * @fires Highcharts.Axis#event:afterSetAxisTranslation
19707
+ * @emits Highcharts.Axis#event:afterSetAxisTranslation
19645
19708
  */
19646
19709
  Axis.prototype.setAxisTranslation = function () {
19647
19710
  var axis = this,
@@ -19677,7 +19740,9 @@
19677
19740
  if (!axis.single || hasCategories) {
19678
19741
  // TODO: series should internally set x- and y-
19679
19742
  // pointPlacement to simplify this logic.
19680
- var isPointPlacementAxis = series.is('xrange') ? !isXAxis : isXAxis;
19743
+ var isPointPlacementAxis = series.is('xrange') ?
19744
+ !isXAxis :
19745
+ isXAxis;
19681
19746
  // minPointOffset is the value padding to the left of
19682
19747
  // the axis in order to make room for points with a
19683
19748
  // pointRange, typically columns. When the
@@ -19696,7 +19761,7 @@
19696
19761
  });
19697
19762
  }
19698
19763
  // Record minPointOffset and pointRangePadding
19699
- ordinalCorrection = axis.ordinal && axis.ordinal.slope && closestPointRange ?
19764
+ ordinalCorrection = (axis.ordinal && axis.ordinal.slope && closestPointRange) ?
19700
19765
  axis.ordinal.slope / closestPointRange :
19701
19766
  1; // #988, #1853
19702
19767
  axis.minPointOffset = minPointOffset =
@@ -19725,8 +19790,6 @@
19725
19790
  /**
19726
19791
  * @private
19727
19792
  * @function Highcharts.Axis#minFromRange
19728
- *
19729
- * @return {number|undefined}
19730
19793
  */
19731
19794
  Axis.prototype.minFromRange = function () {
19732
19795
  var axis = this;
@@ -19742,7 +19805,7 @@
19742
19805
  * @param {boolean} secondPass
19743
19806
  * TO-DO: parameter description
19744
19807
  *
19745
- * @fires Highcharts.Axis#event:foundExtremes
19808
+ * @emits Highcharts.Axis#event:foundExtremes
19746
19809
  */
19747
19810
  Axis.prototype.setTickInterval = function (secondPass) {
19748
19811
  var axis = this,
@@ -19939,12 +20002,13 @@
19939
20002
  // First process all series assigned to that axis.
19940
20003
  axis.series.forEach(function (series) {
19941
20004
  // Allows filtering out points outside the plot area.
19942
- series.forceCrop = series.forceCropping && series.forceCropping();
20005
+ series.forceCrop = (series.forceCropping &&
20006
+ series.forceCropping());
19943
20007
  series.processData(hasExtemesChanged_1);
19944
20008
  });
19945
- // Then apply grouping if needed.
19946
- // The hasExtemesChanged helps to decide if the data grouping should
19947
- // be skipped in the further calculations #16319.
20009
+ // Then apply grouping if needed. The hasExtemesChanged helps to
20010
+ // decide if the data grouping should be skipped in the further
20011
+ // calculations #16319.
19948
20012
  fireEvent(this, 'postProcessData', { hasExtemesChanged: hasExtemesChanged_1 });
19949
20013
  }
19950
20014
  // set the translation factor used in translate function
@@ -19989,7 +20053,7 @@
19989
20053
  * @private
19990
20054
  * @function Highcharts.Axis#setTickPositions
19991
20055
  *
19992
- * @fires Highcharts.Axis#event:afterSetTickPositions
20056
+ * @emits Highcharts.Axis#event:afterSetTickPositions
19993
20057
  */
19994
20058
  Axis.prototype.setTickPositions = function () {
19995
20059
  var axis = this,
@@ -19998,8 +20062,8 @@
19998
20062
  minorTickIntervalOption = this.getMinorTickInterval(),
19999
20063
  hasVerticalPanning = this.hasVerticalPanning(),
20000
20064
  isColorAxis = this.coll === 'colorAxis',
20001
- startOnTick = (isColorAxis || !hasVerticalPanning) && options.startOnTick,
20002
- endOnTick = (isColorAxis || !hasVerticalPanning) && options.endOnTick;
20065
+ startOnTick = ((isColorAxis || !hasVerticalPanning) && options.startOnTick),
20066
+ endOnTick = ((isColorAxis || !hasVerticalPanning) && options.endOnTick);
20003
20067
  var tickPositions,
20004
20068
  tickPositioner = options.tickPositioner;
20005
20069
  // Set the tickmarkOffset
@@ -20159,39 +20223,92 @@
20159
20223
  */
20160
20224
  Axis.prototype.alignToOthers = function () {
20161
20225
  var axis = this,
20162
- others = // Whether there is another axis to pair with this one
20163
- {},
20164
- options = axis.options;
20226
+ alignedAxes = [this],
20227
+ options = axis.options,
20228
+ alignThresholds = (this.coll === 'yAxis' &&
20229
+ this.chart.options.chart.alignThresholds),
20230
+ thresholdAlignments = [];
20165
20231
  var hasOther;
20166
- if (
20167
- // Only if alignTicks is true
20168
- this.chart.options.chart.alignTicks !== false &&
20169
- options.alignTicks &&
20232
+ axis.thresholdAlignment = void 0;
20233
+ if ((
20234
+ // Only if alignTicks or alignThresholds is true
20235
+ (this.chart.options.chart.alignTicks !== false &&
20236
+ options.alignTicks) || (alignThresholds)) &&
20170
20237
  // Disabled when startOnTick or endOnTick are false (#7604)
20171
20238
  options.startOnTick !== false &&
20172
20239
  options.endOnTick !== false &&
20173
20240
  // Don't try to align ticks on a log axis, they are not evenly
20174
20241
  // spaced (#6021)
20175
20242
  !axis.logarithmic) {
20176
- this.chart[this.coll].forEach(function (axis) {
20177
- var otherOptions = axis.options, horiz = axis.horiz, key = [
20178
- horiz ? otherOptions.left : otherOptions.top,
20179
- otherOptions.width,
20180
- otherOptions.height,
20181
- otherOptions.pane
20182
- ].join(',');
20183
- if (axis.series.length) { // #4442
20184
- if (others[key]) {
20185
- hasOther = true; // #4201
20186
- }
20187
- else {
20188
- others[key] = 1;
20189
- }
20243
+ // Get a key identifying which pane the axis belongs to
20244
+ var getKey_1 = function (axis) {
20245
+ var horiz = axis.horiz,
20246
+ options = axis.options;
20247
+ return [
20248
+ horiz ? options.left : options.top,
20249
+ options.width,
20250
+ options.height,
20251
+ options.pane
20252
+ ].join(',');
20253
+ };
20254
+ var thisKey_1 = getKey_1(this);
20255
+ this.chart[this.coll].forEach(function (otherAxis) {
20256
+ var series = otherAxis.series;
20257
+ if (
20258
+ // #4442
20259
+ series.length &&
20260
+ series.some(function (s) { return s.visible; }) &&
20261
+ otherAxis !== axis &&
20262
+ getKey_1(otherAxis) === thisKey_1) {
20263
+ hasOther = true; // #4201
20264
+ alignedAxes.push(otherAxis);
20265
+ }
20266
+ });
20267
+ }
20268
+ if (hasOther && alignThresholds) {
20269
+ // Handle alignThresholds. The `thresholdAlignments` array keeps
20270
+ // records of where each axis in the group wants its threshold, from
20271
+ // 0 which is on `axis.min`, to 1 which is on `axis.max`.
20272
+ alignedAxes.forEach(function (otherAxis) {
20273
+ var threshAlign = otherAxis.getThresholdAlignment(axis);
20274
+ if (isNumber(threshAlign)) {
20275
+ thresholdAlignments.push(threshAlign);
20190
20276
  }
20191
20277
  });
20278
+ // For each of the axes in the group, record the average
20279
+ // `thresholdAlignment`.
20280
+ var thresholdAlignment_1 = thresholdAlignments.length > 1 ?
20281
+ thresholdAlignments.reduce(function (sum,
20282
+ n) { return (sum += n); }, 0) / thresholdAlignments.length :
20283
+ void 0;
20284
+ alignedAxes.forEach(function (axis) {
20285
+ axis.thresholdAlignment = thresholdAlignment_1;
20286
+ });
20192
20287
  }
20193
20288
  return hasOther;
20194
20289
  };
20290
+ /**
20291
+ * Where the axis wants its threshold, from 0 which is on `axis.min`, to 1 which
20292
+ * is on `axis.max`.
20293
+ *
20294
+ * @private
20295
+ * @function Highcharts.Axis#getThresholdAlignment
20296
+ */
20297
+ Axis.prototype.getThresholdAlignment = function (callerAxis) {
20298
+ if (!isNumber(this.dataMin) ||
20299
+ (this !== callerAxis &&
20300
+ this.series.some(function (s) { return (s.isDirty || s.isDirtyData); }))) {
20301
+ this.getSeriesExtremes();
20302
+ }
20303
+ if (isNumber(this.threshold)) {
20304
+ var thresholdAlignment = clamp(((this.threshold - (this.dataMin || 0)) /
20305
+ ((this.dataMax || 0) - (this.dataMin || 0))), 0, 1);
20306
+ if (this.options.reversed) {
20307
+ thresholdAlignment = 1 - thresholdAlignment;
20308
+ }
20309
+ return thresholdAlignment;
20310
+ }
20311
+ };
20195
20312
  /**
20196
20313
  * Find the max ticks of either the x and y axis collection, and record it
20197
20314
  * in `this.tickAmount`.
@@ -20236,40 +20353,101 @@
20236
20353
  */
20237
20354
  Axis.prototype.adjustTickAmount = function () {
20238
20355
  var axis = this,
20239
- axisOptions = axis.options,
20240
- tickInterval = axis.tickInterval,
20356
+ finalTickAmt = axis.finalTickAmt,
20357
+ max = axis.max,
20358
+ min = axis.min,
20359
+ options = axis.options,
20241
20360
  tickPositions = axis.tickPositions,
20242
20361
  tickAmount = axis.tickAmount,
20243
- finalTickAmt = axis.finalTickAmt,
20362
+ thresholdAlignment = axis.thresholdAlignment,
20244
20363
  currentTickAmount = tickPositions && tickPositions.length,
20245
20364
  threshold = pick(axis.threshold,
20246
20365
  axis.softThreshold ? 0 : null);
20247
20366
  var len,
20248
- i;
20249
- if (axis.hasData() && isNumber(axis.min) && isNumber(axis.max)) { // #14769
20250
- if (currentTickAmount < tickAmount) {
20367
+ i,
20368
+ tickInterval = axis.tickInterval,
20369
+ thresholdTickIndex;
20370
+ var
20371
+ // Extend the tickPositions by appending a position
20372
+ append = function () { return tickPositions.push(correctFloat(tickPositions[tickPositions.length - 1] +
20373
+ tickInterval)); },
20374
+ // Extend the tickPositions by prepending a position
20375
+ prepend = function () { return tickPositions.unshift(correctFloat(tickPositions[0] - tickInterval)); };
20376
+ // If `thresholdAlignment` is a number, it means the `alignThresholds`
20377
+ // option is true. The `thresholdAlignment` is a scalar value between 0
20378
+ // and 1 for where the threshold should be relative to `axis.min` and
20379
+ // `axis.max`. Now that we know the tick amount, convert this to the
20380
+ // tick index. Unless `thresholdAlignment` is exactly 0 or 1, avoid the
20381
+ // first or last tick because that would lead to series being clipped.
20382
+ if (isNumber(thresholdAlignment)) {
20383
+ thresholdTickIndex = thresholdAlignment < 0.5 ?
20384
+ Math.ceil(thresholdAlignment * (tickAmount - 1)) :
20385
+ Math.floor(thresholdAlignment * (tickAmount - 1));
20386
+ if (options.reversed) {
20387
+ thresholdTickIndex = tickAmount - 1 - thresholdTickIndex;
20388
+ }
20389
+ }
20390
+ if (axis.hasData() && isNumber(min) && isNumber(max)) { // #14769
20391
+ // Adjust extremes and translation to the modified tick positions
20392
+ var adjustExtremes = function () {
20393
+ axis.transA *= (currentTickAmount - 1) / (tickAmount - 1);
20394
+ // Do not crop when ticks are not extremes (#9841)
20395
+ axis.min = options.startOnTick ?
20396
+ tickPositions[0] :
20397
+ Math.min(min, tickPositions[0]);
20398
+ axis.max = options.endOnTick ?
20399
+ tickPositions[tickPositions.length - 1] :
20400
+ Math.max(max, tickPositions[tickPositions.length - 1]);
20401
+ };
20402
+ // When the axis is subject to the alignThresholds option. Use
20403
+ // axis.threshold because the local threshold includes the
20404
+ // `softThreshold`.
20405
+ if (isNumber(thresholdTickIndex) && isNumber(axis.threshold)) {
20406
+ // Throw away the previously computed tickPositions and start
20407
+ // from scratch with only the threshold itself, then add ticks
20408
+ // below the threshold first, then fill up above the threshold.
20409
+ // If we are not able to fill up to axis.max, double the
20410
+ // tickInterval and run again.
20411
+ while (tickPositions[thresholdTickIndex] !== threshold ||
20412
+ tickPositions.length !== tickAmount ||
20413
+ tickPositions[0] > min ||
20414
+ tickPositions[tickPositions.length - 1] < max) {
20415
+ tickPositions.length = 0;
20416
+ tickPositions.push(axis.threshold);
20417
+ while (tickPositions.length < tickAmount) {
20418
+ if (
20419
+ // Start by prepending positions until the threshold
20420
+ // is at the required index...
20421
+ tickPositions[thresholdTickIndex] === void 0 ||
20422
+ tickPositions[thresholdTickIndex] > axis.threshold) {
20423
+ prepend();
20424
+ }
20425
+ else {
20426
+ // ... then append positions until we have the
20427
+ // required length
20428
+ append();
20429
+ }
20430
+ }
20431
+ // Safety vent
20432
+ if (tickInterval > axis.tickInterval * 8) {
20433
+ break;
20434
+ }
20435
+ tickInterval *= 2;
20436
+ }
20437
+ adjustExtremes();
20438
+ }
20439
+ else if (currentTickAmount < tickAmount) {
20251
20440
  while (tickPositions.length < tickAmount) {
20252
20441
  // Extend evenly for both sides unless we're on the
20253
20442
  // threshold (#3965)
20254
- if (tickPositions.length % 2 ||
20255
- axis.min === threshold) {
20256
- // to the end
20257
- tickPositions.push(correctFloat(tickPositions[tickPositions.length - 1] +
20258
- tickInterval));
20443
+ if (tickPositions.length % 2 || min === threshold) {
20444
+ append();
20259
20445
  }
20260
20446
  else {
20261
- // to the start
20262
- tickPositions.unshift(correctFloat(tickPositions[0] - tickInterval));
20447
+ prepend();
20263
20448
  }
20264
20449
  }
20265
- axis.transA *= (currentTickAmount - 1) / (tickAmount - 1);
20266
- // Do not crop when ticks are not extremes (#9841)
20267
- axis.min = axisOptions.startOnTick ?
20268
- tickPositions[0] :
20269
- Math.min(axis.min, tickPositions[0]);
20270
- axis.max = axisOptions.endOnTick ?
20271
- tickPositions[tickPositions.length - 1] :
20272
- Math.max(axis.max, tickPositions[tickPositions.length - 1]);
20450
+ adjustExtremes();
20273
20451
  // We have too many ticks, run second pass to try to reduce ticks
20274
20452
  }
20275
20453
  else if (currentTickAmount > tickAmount) {
@@ -20298,7 +20476,7 @@
20298
20476
  * @private
20299
20477
  * @function Highcharts.Axis#setScale
20300
20478
  *
20301
- * @fires Highcharts.Axis#event:afterSetScale
20479
+ * @emits Highcharts.Axis#event:afterSetScale
20302
20480
  */
20303
20481
  Axis.prototype.setScale = function () {
20304
20482
  var axis = this;
@@ -20386,7 +20564,7 @@
20386
20564
  * @param {*} [eventArguments]
20387
20565
  * Arguments to be accessed in event handler.
20388
20566
  *
20389
- * @fires Highcharts.Axis#event:setExtremes
20567
+ * @emits Highcharts.Axis#event:setExtremes
20390
20568
  */
20391
20569
  Axis.prototype.setExtremes = function (newMin, newMax, redraw, animation, eventArguments) {
20392
20570
  var axis = this,
@@ -20416,14 +20594,6 @@
20416
20594
  *
20417
20595
  * @private
20418
20596
  * @function Highcharts.Axis#zoom
20419
- *
20420
- * @param {number} newMin
20421
- * TO-DO: parameter description
20422
- *
20423
- * @param {number} newMax
20424
- * TO-DO: parameter description
20425
- *
20426
- * @return {boolean}
20427
20597
  */
20428
20598
  Axis.prototype.zoom = function (newMin, newMax) {
20429
20599
  var axis = this,
@@ -20634,8 +20804,6 @@
20634
20804
  *
20635
20805
  * @private
20636
20806
  * @function Highcharts.Axis#labelMetrics
20637
- *
20638
- * @return {Highcharts.FontMetricsObject}
20639
20807
  */
20640
20808
  Axis.prototype.labelMetrics = function () {
20641
20809
  var index = this.tickPositions && this.tickPositions[0] || 0;
@@ -20648,8 +20816,6 @@
20648
20816
  *
20649
20817
  * @private
20650
20818
  * @function Highcharts.Axis#unsquish
20651
- *
20652
- * @return {number}
20653
20819
  */
20654
20820
  Axis.prototype.unsquish = function () {
20655
20821
  var labelOptions = this.options.labels,
@@ -21011,7 +21177,7 @@
21011
21177
  * @private
21012
21178
  * @function Highcharts.Axis#getOffset
21013
21179
  *
21014
- * @fires Highcharts.Axis#event:afterGetOffset
21180
+ * @emits Highcharts.Axis#event:afterGetOffset
21015
21181
  */
21016
21182
  Axis.prototype.getOffset = function () {
21017
21183
  var _this = this;
@@ -21338,7 +21504,7 @@
21338
21504
  * @private
21339
21505
  * @function Highcharts.Axis#render
21340
21506
  *
21341
- * @fires Highcharts.Axis#event:afterRender
21507
+ * @emits Highcharts.Axis#event:afterRender
21342
21508
  */
21343
21509
  Axis.prototype.render = function () {
21344
21510
  var axis = this,
@@ -21429,7 +21595,8 @@
21429
21595
  (options.plotLines || [])
21430
21596
  .concat(options.plotBands || [])
21431
21597
  .forEach(function (plotLineOptions) {
21432
- axis.addPlotBandOrLine(plotLineOptions);
21598
+ axis
21599
+ .addPlotBandOrLine(plotLineOptions);
21433
21600
  });
21434
21601
  }
21435
21602
  } // end if hasData
@@ -21529,8 +21696,6 @@
21529
21696
  *
21530
21697
  * @private
21531
21698
  * @function Highcharts.Axis#getKeepProps
21532
- *
21533
- * @return {Array<string>}
21534
21699
  */
21535
21700
  Axis.prototype.getKeepProps = function () {
21536
21701
  return (this.keepProps || Axis.keepProps);
@@ -21596,8 +21761,8 @@
21596
21761
  * @param {Highcharts.Point} [point]
21597
21762
  * The Point object if the crosshair snaps to points.
21598
21763
  *
21599
- * @fires Highcharts.Axis#event:afterDrawCrosshair
21600
- * @fires Highcharts.Axis#event:drawCrosshair
21764
+ * @emits Highcharts.Axis#event:afterDrawCrosshair
21765
+ * @emits Highcharts.Axis#event:drawCrosshair
21601
21766
  */
21602
21767
  Axis.prototype.drawCrosshair = function (e, point) {
21603
21768
  var options = this.crosshair,
@@ -21724,8 +21889,6 @@
21724
21889
  *
21725
21890
  * @private
21726
21891
  * @function Highcharts.Axis#hasVerticalPanning
21727
- *
21728
- * @return {boolean}
21729
21892
  */
21730
21893
  Axis.prototype.hasVerticalPanning = function () {
21731
21894
  var panningOptions = this.chart.options.chart.panning;
@@ -21741,8 +21904,6 @@
21741
21904
  *
21742
21905
  * @param {unknown} value
21743
21906
  * The axis value
21744
- *
21745
- * @return {boolean}
21746
21907
  */
21747
21908
  Axis.prototype.validatePositiveValue = function (value) {
21748
21909
  return isNumber(value) && value > 0;
@@ -21852,7 +22013,14 @@
21852
22013
  Axis.defaultOptions = AxisDefaults.defaultXAxisOptions;
21853
22014
  // Properties to survive after destroy, needed for Axis.update (#4317,
21854
22015
  // #5773, #5881).
21855
- Axis.keepProps = ['extKey', 'hcEvents', 'names', 'series', 'userMax', 'userMin'];
22016
+ Axis.keepProps = [
22017
+ 'extKey',
22018
+ 'hcEvents',
22019
+ 'names',
22020
+ 'series',
22021
+ 'userMax',
22022
+ 'userMin'
22023
+ ];
21856
22024
  return Axis;
21857
22025
  }());
21858
22026
  /* *
@@ -22153,19 +22321,12 @@
22153
22321
  *
22154
22322
  * @private
22155
22323
  * @function Highcharts.Axis#getTimeTicks
22156
- *
22157
22324
  * @param {Highcharts.TimeNormalizeObject} normalizedInterval
22158
22325
  * The interval in axis values (ms) and thecount.
22159
- *
22160
22326
  * @param {number} min
22161
22327
  * The minimum in axis values.
22162
- *
22163
22328
  * @param {number} max
22164
22329
  * The maximum in axis values.
22165
- *
22166
- * @param {number} startOfWeek
22167
- *
22168
- * @return {Highcharts.AxisTickPositionsArray}
22169
22330
  */
22170
22331
  function getTimeTicks() {
22171
22332
  return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
@@ -22215,8 +22376,10 @@
22215
22376
  */
22216
22377
  Additions.prototype.normalizeTimeTickInterval = function (tickInterval, unitsOption) {
22217
22378
  var units = (unitsOption || [[
22379
+ // unit name
22218
22380
  'millisecond',
22219
- [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
22381
+ // allowed multiples
22382
+ [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]
22220
22383
  ],
22221
22384
  [
22222
22385
  'second',
@@ -22289,12 +22452,6 @@
22289
22452
  * point range on the axis.
22290
22453
  *
22291
22454
  * @private
22292
- *
22293
- * @param {number} x
22294
- *
22295
- * @param {Highcharts.Dictionary<string>} dateTimeLabelFormats
22296
- *
22297
- * @return {string}
22298
22455
  */
22299
22456
  Additions.prototype.getXDateFormat = function (x, dateTimeLabelFormats) {
22300
22457
  var axis = this.axis;
@@ -22721,13 +22878,8 @@
22721
22878
  *
22722
22879
  * @private
22723
22880
  * @function Highcharts.Axis#addPlotBandOrLine
22724
- *
22725
22881
  * @param {Highcharts.AxisPlotBandsOptions|Highcharts.AxisPlotLinesOptions} options
22726
22882
  * The plotBand or plotLine configuration object.
22727
- *
22728
- * @param {"plotBands"|"plotLines"} [coll]
22729
- *
22730
- * @return {Highcharts.PlotLineOrBand|undefined}
22731
22883
  */
22732
22884
  Additions.prototype.addPlotBandOrLine = function (options, coll) {
22733
22885
  var _this = this;
@@ -23870,8 +24022,6 @@
23870
24022
  *
23871
24023
  * @private
23872
24024
  * @function Highcharts.Tooltip#bodyFormatter
23873
- * @param {Array<(Highcharts.Point|Highcharts.Series)>} items
23874
- * @return {Array<string>}
23875
24025
  */
23876
24026
  Tooltip.prototype.bodyFormatter = function (items) {
23877
24027
  return items.map(function (item) {
@@ -23888,7 +24038,7 @@
23888
24038
  * @function Highcharts.Tooltip#cleanSplit
23889
24039
  *
23890
24040
  * @param {boolean} [force]
23891
- * Force destroy all tooltips.
24041
+ * Force destroy all tooltips.
23892
24042
  */
23893
24043
  Tooltip.prototype.cleanSplit = function (force) {
23894
24044
  this.chart.series.forEach(function (series) {
@@ -23911,7 +24061,9 @@
23911
24061
  *
23912
24062
  * @param {Highcharts.Tooltip} tooltip
23913
24063
  *
23914
- * @return {Array<string>}
24064
+ * @return {string|Array<string>}
24065
+ * Returns a string (single tooltip and shared)
24066
+ * or an array of strings (split tooltip)
23915
24067
  */
23916
24068
  Tooltip.prototype.defaultFormatter = function (tooltip) {
23917
24069
  var items = this.points || splat(this);
@@ -23951,12 +24103,6 @@
23951
24103
  *
23952
24104
  * @private
23953
24105
  * @function Highcharts.Tooltip#getAnchor
23954
- *
23955
- * @param {Highcharts.Point|Array<Highcharts.Point>} points
23956
- *
23957
- * @param {Highcharts.PointerEventObject} [mouseEvent]
23958
- *
23959
- * @return {Array<number>}
23960
24106
  */
23961
24107
  Tooltip.prototype.getAnchor = function (points, mouseEvent) {
23962
24108
  var chart = this.chart,
@@ -24001,8 +24147,8 @@
24001
24147
  plotY += yAxis.pos - plotTop;
24002
24148
  }
24003
24149
  else { // #14771
24004
- plotX += plotTop + chart.plotHeight - xAxis.len - xAxis.pos;
24005
- plotY += plotLeft + chart.plotWidth - yAxis.len - yAxis.pos;
24150
+ plotX += (plotTop + chart.plotHeight - xAxis.len - xAxis.pos);
24151
+ plotY += (plotLeft + chart.plotWidth - yAxis.len - yAxis.pos);
24006
24152
  }
24007
24153
  }
24008
24154
  });
@@ -24031,6 +24177,7 @@
24031
24177
  * @function Highcharts.Tooltip#getLabel
24032
24178
  *
24033
24179
  * @return {Highcharts.SVGElement}
24180
+ * Tooltip label
24034
24181
  */
24035
24182
  Tooltip.prototype.getLabel = function () {
24036
24183
  var tooltip = this,
@@ -24041,7 +24188,8 @@
24041
24188
  ' ' + options.className :
24042
24189
  '')),
24043
24190
  pointerEvents = (options.style.pointerEvents ||
24044
- (!this.followPointer && options.stickOnContact ? 'auto' : 'none')),
24191
+ (!this.followPointer &&
24192
+ options.stickOnContact ? 'auto' : 'none')),
24045
24193
  onMouseEnter = function () {
24046
24194
  tooltip.inContact = true;
24047
24195
  }, onMouseLeave = function (e) {
@@ -24157,14 +24305,6 @@
24157
24305
  *
24158
24306
  * @private
24159
24307
  * @function Highcharts.Tooltip#getPosition
24160
- *
24161
- * @param {number} boxWidth
24162
- *
24163
- * @param {number} boxHeight
24164
- *
24165
- * @param {Highcharts.Point} point
24166
- *
24167
- * @return {Highcharts.PositionObject}
24168
24308
  */
24169
24309
  Tooltip.prototype.getPosition = function (boxWidth, boxHeight, point) {
24170
24310
  var chart = this.chart,
@@ -24526,7 +24666,7 @@
24526
24666
  shared = tooltip.shared,
24527
24667
  styledMode = chart.styledMode;
24528
24668
  var textConfig = {};
24529
- if (!options.enabled) {
24669
+ if (!options.enabled || !point.series) { // #16820
24530
24670
  return;
24531
24671
  }
24532
24672
  U.clearTimeout(this.hideTimer);
@@ -24536,7 +24676,7 @@
24536
24676
  pointOrPoints.series &&
24537
24677
  pointOrPoints.series.noSharedTooltip);
24538
24678
  // get the reference point coordinates (pie charts use tooltipPos)
24539
- tooltip.followPointer = !tooltip.split && point.series.tooltipOptions.followPointer;
24679
+ tooltip.followPointer = (!tooltip.split && point.series.tooltipOptions.followPointer);
24540
24680
  var anchor = tooltip.getAnchor(pointOrPoints,
24541
24681
  mouseEvent),
24542
24682
  x = anchor[0],
@@ -24670,9 +24810,10 @@
24670
24810
  options = tooltip.options,
24671
24811
  positioner = tooltip.options.positioner;
24672
24812
  // The area which the tooltip should be limited to. Limit to scrollable
24673
- // plot area if enabled, otherwise limit to the chart container.
24674
- // If outside is true it should be the whole viewport
24675
- var bounds = tooltip.outside && typeof scrollablePixelsX !== 'number' ?
24813
+ // plot area if enabled, otherwise limit to the chart container. If
24814
+ // outside is true it should be the whole viewport
24815
+ var bounds = (tooltip.outside &&
24816
+ typeof scrollablePixelsX !== 'number') ?
24676
24817
  doc.documentElement.getBoundingClientRect() : {
24677
24818
  left: scrollLeft,
24678
24819
  right: scrollLeft + chartWidth,
@@ -24693,7 +24834,7 @@
24693
24834
  *
24694
24835
  * @private
24695
24836
  * @param {Highcharts.Point} point The point related to the tooltip
24696
- * @return {object} Returns an object with anchorX and anchorY
24837
+ * @return {Object} Returns an object with anchorX and anchorY
24697
24838
  */
24698
24839
  function getAnchor(point) {
24699
24840
  var isHeader = point.isHeader,
@@ -24885,13 +25026,14 @@
24885
25026
  }
24886
25027
  return boxes;
24887
25028
  }, []);
24888
- // Realign the tooltips towards the right if there is not enough
24889
- // space to the left and there is space to to the right
25029
+ // Realign the tooltips towards the right if there is not enough space
25030
+ // to the left and there is space to to the right
24890
25031
  if (!positioner && boxes.some(function (box) {
24891
25032
  // Always realign if the beginning of a label is outside bounds
24892
25033
  var outside = tooltip.outside;
24893
25034
  var boxStart = (outside ? chartLeft : 0) + box.anchorX;
24894
- if (boxStart < bounds.left && boxStart + box.boxWidth < bounds.right) {
25035
+ if (boxStart < bounds.left &&
25036
+ boxStart + box.boxWidth < bounds.right) {
24895
25037
  return true;
24896
25038
  }
24897
25039
  // Otherwise, check if there is more space available to the right
@@ -24929,7 +25071,9 @@
24929
25071
  if (tooltip.outside && chartLeft + x < boxExtremes.left) {
24930
25072
  boxExtremes.left = chartLeft + x;
24931
25073
  }
24932
- if (!isHeader && tooltip.outside && boxExtremes.left + boxWidth > boxExtremes.right) {
25074
+ if (!isHeader &&
25075
+ tooltip.outside &&
25076
+ boxExtremes.left + boxWidth > boxExtremes.right) {
24933
25077
  boxExtremes.right = chartLeft + x;
24934
25078
  }
24935
25079
  }
@@ -25063,9 +25207,6 @@
25063
25207
  *
25064
25208
  * @private
25065
25209
  * @function Highcharts.Tooltip#tooltipFooterHeaderFormatter
25066
- * @param {Highcharts.PointLabelObject} labelConfig
25067
- * @param {boolean} [isFooter]
25068
- * @return {string}
25069
25210
  */
25070
25211
  Tooltip.prototype.tooltipFooterHeaderFormatter = function (labelConfig, isFooter) {
25071
25212
  var series = labelConfig.series,
@@ -25181,46 +25322,23 @@
25181
25322
  * @callback Highcharts.TooltipFormatterCallbackFunction
25182
25323
  *
25183
25324
  * @param {Highcharts.TooltipFormatterContextObject} this
25184
- * Context to format
25325
+ * Context to format
25185
25326
  *
25186
25327
  * @param {Highcharts.Tooltip} tooltip
25187
- * The tooltip instance
25328
+ * The tooltip instance
25188
25329
  *
25189
25330
  * @return {false|string|Array<(string|null|undefined)>|null|undefined}
25190
- * Formatted text or false
25331
+ * Formatted text or false
25191
25332
  */
25192
25333
  /**
25334
+ * Configuration for the tooltip formatters.
25335
+ *
25193
25336
  * @interface Highcharts.TooltipFormatterContextObject
25337
+ * @extends Highcharts.PointLabelObject
25194
25338
  */ /**
25195
- * @name Highcharts.TooltipFormatterContextObject#color
25196
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
25197
- */ /**
25198
- * @name Highcharts.TooltipFormatterContextObject#colorIndex
25199
- * @type {number|undefined}
25200
- */ /**
25201
- * @name Highcharts.TooltipFormatterContextObject#key
25202
- * @type {number}
25203
- */ /**
25204
- * @name Highcharts.TooltipFormatterContextObject#percentage
25205
- * @type {number|undefined}
25206
- */ /**
25207
- * @name Highcharts.TooltipFormatterContextObject#point
25208
- * @type {Highcharts.Point}
25209
- */ /**
25339
+ * Array of points in shared tooltips.
25210
25340
  * @name Highcharts.TooltipFormatterContextObject#points
25211
25341
  * @type {Array<Highcharts.TooltipFormatterContextObject>|undefined}
25212
- */ /**
25213
- * @name Highcharts.TooltipFormatterContextObject#series
25214
- * @type {Highcharts.Series}
25215
- */ /**
25216
- * @name Highcharts.TooltipFormatterContextObject#total
25217
- * @type {number|undefined}
25218
- */ /**
25219
- * @name Highcharts.TooltipFormatterContextObject#x
25220
- * @type {number}
25221
- */ /**
25222
- * @name Highcharts.TooltipFormatterContextObject#y
25223
- * @type {number}
25224
25342
  */
25225
25343
  /**
25226
25344
  * A callback function to place the tooltip in a specific position.
@@ -25474,7 +25592,9 @@
25474
25592
  options = Point.prototype.optionsToObject.call(this, options);
25475
25593
  // copy options directly to point
25476
25594
  extend(point, options);
25477
- point.options = point.options ? extend(point.options, options) : options;
25595
+ point.options = point.options ?
25596
+ extend(point.options, options) :
25597
+ options;
25478
25598
  // Since options are copied into the Point instance, some accidental
25479
25599
  // options must be shielded (#5681)
25480
25600
  if (options.group) {
@@ -25616,7 +25736,7 @@
25616
25736
  * @param {Highcharts.EventCallbackFunction<Highcharts.Point>|Function} [defaultFunction]
25617
25737
  * Default event handler.
25618
25738
  *
25619
- * @fires Highcharts.Point#event:*
25739
+ * @emits Highcharts.Point#event:*
25620
25740
  */
25621
25741
  Point.prototype.firePointEvent = function (eventType, eventArgs, defaultFunction) {
25622
25742
  var point = this,
@@ -25667,8 +25787,6 @@
25667
25787
  *
25668
25788
  * @private
25669
25789
  * @function Highcharts.Point#getGraphicalProps
25670
- * @param {Highcharts.Dictionary<number>} [kinds]
25671
- * @return {Highcharts.PointGraphicalProps}
25672
25790
  */
25673
25791
  Point.prototype.getGraphicalProps = function (kinds) {
25674
25792
  var point = this,
@@ -25767,8 +25885,7 @@
25767
25885
  /**
25768
25886
  * Utility to check if point has new shape type. Used in column series and
25769
25887
  * all others that are based on column series.
25770
- *
25771
- * @return boolean|undefined
25888
+ * @private
25772
25889
  */
25773
25890
  Point.prototype.hasNewShapeType = function () {
25774
25891
  var point = this;
@@ -25794,7 +25911,7 @@
25794
25911
  * @return {Highcharts.Point}
25795
25912
  * The Point instance.
25796
25913
  *
25797
- * @fires Highcharts.Point#event:afterInit
25914
+ * @emits Highcharts.Point#event:afterInit
25798
25915
  */
25799
25916
  Point.prototype.init = function (series, options, x) {
25800
25917
  this.series = series;
@@ -25880,7 +25997,6 @@
25880
25997
  /**
25881
25998
  * @private
25882
25999
  * @function Highcharts.Point#resolveColor
25883
- * @return {void}
25884
26000
  */
25885
26001
  Point.prototype.resolveColor = function () {
25886
26002
  var series = this.series,
@@ -26015,7 +26131,7 @@
26015
26131
  * Whether to apply animation, and optionally animation
26016
26132
  * configuration.
26017
26133
  *
26018
- * @fires Highcharts.Point#event:update
26134
+ * @emits Highcharts.Point#event:update
26019
26135
  */
26020
26136
  Point.prototype.update = function (options, redraw, animation, runEvent) {
26021
26137
  var point = this,
@@ -26033,7 +26149,9 @@
26033
26149
  // Update visuals, #4146
26034
26150
  // Handle dummy graphic elements for a11y, #12718
26035
26151
  var hasDummyGraphic = graphic && point.hasDummyGraphic;
26036
- var shouldDestroyGraphic = point.y === null ? !hasDummyGraphic : hasDummyGraphic;
26152
+ var shouldDestroyGraphic = point.y === null ?
26153
+ !hasDummyGraphic :
26154
+ hasDummyGraphic;
26037
26155
  if (graphic && shouldDestroyGraphic) {
26038
26156
  point.graphic = graphic.destroy();
26039
26157
  delete point.hasDummyGraphic;
@@ -26136,8 +26254,8 @@
26136
26254
  * is `true`, selected points are accumulated on Control, Shift or Cmd
26137
26255
  * clicking the point.
26138
26256
  *
26139
- * @fires Highcharts.Point#event:select
26140
- * @fires Highcharts.Point#event:unselect
26257
+ * @emits Highcharts.Point#event:select
26258
+ * @emits Highcharts.Point#event:unselect
26141
26259
  */
26142
26260
  Point.prototype.select = function (selected, accumulate) {
26143
26261
  var point = this,
@@ -26206,7 +26324,7 @@
26206
26324
  * events.
26207
26325
  *
26208
26326
  * @function Highcharts.Point#onMouseOut
26209
- * @fires Highcharts.Point#event:mouseOut
26327
+ * @emits Highcharts.Point#event:mouseOut
26210
26328
  */
26211
26329
  Point.prototype.onMouseOut = function () {
26212
26330
  var point = this,
@@ -26253,7 +26371,7 @@
26253
26371
  * @param {boolean} [move]
26254
26372
  * State for animation.
26255
26373
  *
26256
- * @fires Highcharts.Point#event:afterSetState
26374
+ * @emits Highcharts.Point#event:afterSetState
26257
26375
  */
26258
26376
  Point.prototype.setState = function (state, move) {
26259
26377
  var point = this,
@@ -26314,8 +26432,9 @@
26314
26432
  pointAttribs = series.pointAttribs(point, state);
26315
26433
  pointAttribsAnimation = pick(chart.options.chart.animation, stateOptions.animation);
26316
26434
  // Some inactive points (e.g. slices in pie) should apply
26317
- // oppacity also for it's labels
26318
- if (series.options.inactiveOtherPoints && isNumber(pointAttribs.opacity)) {
26435
+ // opacity also for their labels
26436
+ if (series.options.inactiveOtherPoints &&
26437
+ isNumber(pointAttribs.opacity)) {
26319
26438
  (point.dataLabels || []).forEach(function (label) {
26320
26439
  if (label) {
26321
26440
  label.animate({
@@ -26475,7 +26594,7 @@
26475
26594
  * @type {Highcharts.Point}
26476
26595
  */
26477
26596
  /**
26478
- * Configuration hash for the data label and tooltip formatters.
26597
+ * Configuration for the data label and tooltip formatters.
26479
26598
  *
26480
26599
  * @interface Highcharts.PointLabelObject
26481
26600
  */ /**
@@ -26517,7 +26636,7 @@
26517
26636
  */ /**
26518
26637
  * The y value of the point.
26519
26638
  * @name Highcharts.PointLabelObject#y
26520
- * @type {number|undefined}
26639
+ * @type {number|null|undefined}
26521
26640
  */
26522
26641
  /**
26523
26642
  * Gets fired when the mouse leaves the area close to the point.
@@ -26776,7 +26895,7 @@
26776
26895
  Pointer.unbindDocumentMouseUp = Pointer.unbindDocumentMouseUp();
26777
26896
  }
26778
26897
  if (Pointer.unbindDocumentTouchEnd) {
26779
- Pointer.unbindDocumentTouchEnd = Pointer.unbindDocumentTouchEnd();
26898
+ Pointer.unbindDocumentTouchEnd = (Pointer.unbindDocumentTouchEnd());
26780
26899
  }
26781
26900
  }
26782
26901
  // memory and CPU leak
@@ -27129,6 +27248,7 @@
27129
27248
  * Pointer event, extended with `chartX` and `chartY` properties.
27130
27249
  *
27131
27250
  * @return {Highcharts.PointerAxisCoordinatesObject}
27251
+ * Axis coordinates.
27132
27252
  */
27133
27253
  Pointer.prototype.getCoordinates = function (e) {
27134
27254
  var coordinates = {
@@ -27167,7 +27287,7 @@
27167
27287
  * @param {Highcharts.PointerEventObject} [e]
27168
27288
  * The triggering event, containing chart coordinates of the pointer.
27169
27289
  *
27170
- * @return {object}
27290
+ * @return {Object}
27171
27291
  * Object containing resulting hover data: hoverPoint, hoverSeries, and
27172
27292
  * hoverPoints.
27173
27293
  */
@@ -27296,9 +27416,10 @@
27296
27416
  * name.
27297
27417
  */
27298
27418
  Pointer.prototype.inClass = function (element, className) {
27299
- var elemClassName;
27300
- while (element) {
27301
- elemClassName = attr(element, 'class');
27419
+ var elem = element,
27420
+ elemClassName;
27421
+ while (elem) {
27422
+ elemClassName = attr(elem, 'class');
27302
27423
  if (elemClassName) {
27303
27424
  if (elemClassName.indexOf(className) !== -1) {
27304
27425
  return true;
@@ -27307,7 +27428,7 @@
27307
27428
  return false;
27308
27429
  }
27309
27430
  }
27310
- element = element.parentNode;
27431
+ elem = elem.parentElement;
27311
27432
  }
27312
27433
  };
27313
27434
  /**
@@ -27348,6 +27469,9 @@
27348
27469
  * properties `chartX` and `chartY` in order to work on the internal
27349
27470
  * coordinate system.
27350
27471
  *
27472
+ * On map charts, the properties `lon` and `lat` are added to the event
27473
+ * object given that the chart has projection information.
27474
+ *
27351
27475
  * @function Highcharts.Pointer#normalize
27352
27476
  *
27353
27477
  * @param {global.MouseEvent|global.PointerEvent|global.TouchEvent} e
@@ -27464,9 +27588,8 @@
27464
27588
  // Also reset the chart position, used in #149 fix
27465
27589
  chart.pointer.chartPosition = void 0;
27466
27590
  }
27467
- if ( // #11635, Firefox wheel scroll does not fire out events consistently
27468
- tooltip &&
27469
- !tooltip.isHidden) {
27591
+ // #11635, Firefox wheel scroll does not fire out events consistently
27592
+ if (tooltip && !tooltip.isHidden) {
27470
27593
  this.reset();
27471
27594
  }
27472
27595
  };
@@ -27613,7 +27736,10 @@
27613
27736
  }
27614
27737
  // On touch devices, only proceed to trigger click if a handler is
27615
27738
  // defined
27616
- if (hasZoom && self.initiated && !fireClickEvent && e.cancelable !== false) {
27739
+ if (hasZoom &&
27740
+ self.initiated &&
27741
+ !fireClickEvent &&
27742
+ e.cancelable !== false) {
27617
27743
  e.preventDefault();
27618
27744
  }
27619
27745
  // Normalize each touch
@@ -27754,7 +27880,8 @@
27754
27880
  clip[xy] = clipXY - plotLeftTop;
27755
27881
  clip[wh] = selectionWH;
27756
27882
  }
27757
- var scaleKey = inverted ? (horiz ? 'scaleY' : 'scaleX') : 'scale' + XY;
27883
+ var scaleKey = inverted ?
27884
+ (horiz ? 'scaleY' : 'scaleX') : 'scale' + XY;
27758
27885
  var transformScale = inverted ? 1 / scale : scale;
27759
27886
  selectionMarker[wh] = selectionWH;
27760
27887
  selectionMarker[xy] = selectionXY;
@@ -27857,8 +27984,8 @@
27857
27984
  * @private
27858
27985
  * @function Highcharts.Pointer#runPointActions
27859
27986
  *
27860
- * @fires Highcharts.Point#event:mouseOut
27861
- * @fires Highcharts.Point#event:mouseOver
27987
+ * @emits Highcharts.Point#event:mouseOut
27988
+ * @emits Highcharts.Point#event:mouseOver
27862
27989
  */
27863
27990
  Pointer.prototype.runPointActions = function (e, p) {
27864
27991
  var pointer = this,
@@ -27940,11 +28067,12 @@
27940
28067
  * The mouseOver event should be triggered when hoverPoint
27941
28068
  * is correct.
27942
28069
  */
27943
- hoverPoint.firePointEvent('mouseOver');
27944
- // Draw tooltip if necessary
27945
- if (tooltip) {
27946
- tooltip.refresh(useSharedTooltip ? points : hoverPoint, e);
27947
- }
28070
+ hoverPoint.firePointEvent('mouseOver', void 0, function () {
28071
+ // Draw tooltip if necessary
28072
+ if (tooltip && hoverPoint) {
28073
+ tooltip.refresh(useSharedTooltip ? points : hoverPoint, e);
28074
+ }
28075
+ });
27948
28076
  // Update positions (regardless of kdpoint or hoverPoint)
27949
28077
  }
27950
28078
  else if (followPointer && tooltip && !tooltip.isHidden) {
@@ -27975,7 +28103,7 @@
27975
28103
  point = chart.hoverPoint; // #13002
27976
28104
  if (!point || point.series[axis.coll] !== axis) {
27977
28105
  point = find(points, function (p) {
27978
- return p.series[axis.coll] === axis;
28106
+ return p.series && p.series[axis.coll] === axis;
27979
28107
  });
27980
28108
  }
27981
28109
  }
@@ -28064,7 +28192,7 @@
28064
28192
  var hoverChart = H.charts[pick(Pointer.hoverChartIndex, -1)];
28065
28193
  if (hoverChart &&
28066
28194
  hoverChart !== chart) {
28067
- hoverChart.pointer.onContainerMouseLeave({ relatedTarget: true });
28195
+ hoverChart.pointer.onContainerMouseLeave({ relatedTarget: chart.container });
28068
28196
  }
28069
28197
  if (!hoverChart ||
28070
28198
  !hoverChart.mouseIsDown) {
@@ -28526,7 +28654,7 @@
28526
28654
  this.maxItemWidth = 0;
28527
28655
  this.maxLegendWidth = 0;
28528
28656
  this.offsetWidth = 0;
28529
- this.options = {};
28657
+ this.options = void 0;
28530
28658
  this.padding = 0;
28531
28659
  this.pages = [];
28532
28660
  this.proximate = false;
@@ -28611,7 +28739,8 @@
28611
28739
  this.symbolWidth = pick(options.symbolWidth, 16);
28612
28740
  this.pages = [];
28613
28741
  this.proximate = options.layout === 'proximate' && !this.chart.inverted;
28614
- this.baseline = void 0; // #12705: baseline has to be reset on every update
28742
+ // #12705: baseline has to be reset on every update
28743
+ this.baseline = void 0;
28615
28744
  };
28616
28745
  /**
28617
28746
  * Update the legend with new options. Equivalent to running `chart.update`
@@ -28630,7 +28759,7 @@
28630
28759
  * operations on the chart, it is a good idea to set redraw to false and
28631
28760
  * call {@link Chart#redraw} after. Whether to redraw the chart.
28632
28761
  *
28633
- * @fires Highcharts.Legends#event:afterUpdate
28762
+ * @emits Highcharts.Legends#event:afterUpdate
28634
28763
  */
28635
28764
  Legend.prototype.update = function (options, redraw) {
28636
28765
  var chart = this.chart;
@@ -28780,8 +28909,7 @@
28780
28909
  /**
28781
28910
  * @private
28782
28911
  * @param {string} key
28783
- * @return {void}
28784
- */
28912
+ */
28785
28913
  function destroyItems(key) {
28786
28914
  if (this[key]) {
28787
28915
  this[key] = this[key].destroy();
@@ -28857,7 +28985,7 @@
28857
28985
  * @name Highcharts.Legend#title
28858
28986
  * @type {Highcharts.SVGElement}
28859
28987
  */
28860
- this.title = this.chart.renderer.label(titleOptions.text, padding - 3, padding - 4, null, null, null, options.useHTML, null, 'legend-title')
28988
+ this.title = this.chart.renderer.label(titleOptions.text, padding - 3, padding - 4, void 0, void 0, void 0, options.useHTML, void 0, 'legend-title')
28861
28989
  .attr({ zIndex: 1 });
28862
28990
  if (!this.chart.styledMode) {
28863
28991
  this.title.css(titleOptions.style);
@@ -28998,13 +29126,16 @@
28998
29126
  legend.setText(item);
28999
29127
  // calculate the positions for the next line
29000
29128
  var bBox = li.getBBox();
29129
+ var fontMetricsH = (legend.fontMetrics && legend.fontMetrics.h) || 0;
29001
29130
  item.itemWidth = item.checkboxOffset =
29002
29131
  options.itemWidth ||
29003
29132
  item.legendItemWidth ||
29004
29133
  bBox.width + itemExtraWidth;
29005
29134
  legend.maxItemWidth = Math.max(legend.maxItemWidth, item.itemWidth);
29006
29135
  legend.totalItemWidth += item.itemWidth;
29007
- legend.itemHeight = item.itemHeight = Math.round(item.legendItemHeight || bBox.height || legend.symbolHeight);
29136
+ legend.itemHeight = item.itemHeight = Math.round(item.legendItemHeight ||
29137
+ // use bBox for multiline (#16398)
29138
+ (bBox.height > fontMetricsH * 1.5 ? bBox.height : fontMetricsH));
29008
29139
  };
29009
29140
  /**
29010
29141
  * Get the position of the item in the layout. We now know the
@@ -29068,7 +29199,7 @@
29068
29199
  * @function Highcharts.Legend#getAllItems
29069
29200
  * @return {Array<(Highcharts.BubbleLegendItem|Highcharts.Point|Highcharts.Series)>}
29070
29201
  * The current items in the legend.
29071
- * @fires Highcharts.Legend#event:afterGetAllItems
29202
+ * @emits Highcharts.Legend#event:afterGetAllItems
29072
29203
  */
29073
29204
  Legend.prototype.getAllItems = function () {
29074
29205
  var allItems = [];
@@ -29221,8 +29352,7 @@
29221
29352
  legend.lastItemY = 0;
29222
29353
  legend.widthOption = relativeLength(options.width, chart.spacingBox.width - padding);
29223
29354
  // Compute how wide the legend is allowed to be
29224
- allowedWidth =
29225
- chart.spacingBox.width - 2 * padding - options.x;
29355
+ allowedWidth = chart.spacingBox.width - 2 * padding - options.x;
29226
29356
  if (['rm', 'lm'].indexOf(legend.getAlignment().substring(0, 2)) > -1) {
29227
29357
  allowedWidth /= 2;
29228
29358
  }
@@ -29295,7 +29425,6 @@
29295
29425
  r: options.borderRadius
29296
29426
  })
29297
29427
  .add(legendGroup);
29298
- box.isNew = true;
29299
29428
  }
29300
29429
  // Presentational
29301
29430
  if (!chart.styledMode) {
@@ -29308,13 +29437,12 @@
29308
29437
  .shadow(options.shadow);
29309
29438
  }
29310
29439
  if (legendWidth > 0 && legendHeight > 0) {
29311
- box[box.isNew ? 'attr' : 'animate'](box.crisp.call({}, {
29440
+ box[box.placed ? 'animate' : 'attr'](box.crisp.call({}, {
29312
29441
  x: 0,
29313
29442
  y: 0,
29314
29443
  width: legendWidth,
29315
29444
  height: legendHeight
29316
29445
  }, box.strokeWidth()));
29317
- box.isNew = false;
29318
29446
  }
29319
29447
  // hide the border if no items
29320
29448
  box[display ? 'show' : 'hide']();
@@ -29338,7 +29466,6 @@
29338
29466
  * @private
29339
29467
  * @function Highcharts.align
29340
29468
  * @param {Highcharts.BBoxObject} alignTo
29341
- * @return {void}
29342
29469
  */
29343
29470
  Legend.prototype.align = function (alignTo) {
29344
29471
  if (alignTo === void 0) { alignTo = this.chart.spacingBox; }
@@ -29358,6 +29485,11 @@
29358
29485
  if (y !== alignTo.y) {
29359
29486
  alignTo = merge(alignTo, { y: y });
29360
29487
  }
29488
+ if (!chart.hasRendered) {
29489
+ // Avoid animation when adjusting alignment for responsiveness and
29490
+ // colorAxis label layout
29491
+ this.group.placed = false;
29492
+ }
29361
29493
  this.group.align(merge(options, {
29362
29494
  width: this.legendWidth,
29363
29495
  height: this.legendHeight,
@@ -29370,8 +29502,6 @@
29370
29502
  *
29371
29503
  * @private
29372
29504
  * @function Highcharts.Legend#handleOverflow
29373
- * @param {number} legendHeight
29374
- * @return {number}
29375
29505
  */
29376
29506
  Legend.prototype.handleOverflow = function (legendHeight) {
29377
29507
  var legend = this,
@@ -29493,7 +29623,7 @@
29493
29623
  });
29494
29624
  this.pager = renderer.text('', 15, 10)
29495
29625
  .addClass('highcharts-legend-navigation');
29496
- if (!chart.styledMode) {
29626
+ if (!chart.styledMode && navOptions.style) {
29497
29627
  this.pager.css(navOptions.style);
29498
29628
  }
29499
29629
  this.pager.add(nav);
@@ -29532,7 +29662,6 @@
29532
29662
  * @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animation]
29533
29663
  * Whether and how to apply animation.
29534
29664
  *
29535
- * @return {void}
29536
29665
  */
29537
29666
  Legend.prototype.scroll = function (scrollBy, animation) {
29538
29667
  var _this = this;
@@ -29621,8 +29750,8 @@
29621
29750
  * @param {Highcharts.BubbleLegendItem|Point|Highcharts.Series} item
29622
29751
  * @param {Highcharts.SVGElement} legendItem
29623
29752
  * @param {boolean} [useHTML=false]
29624
- * @fires Highcharts.Point#event:legendItemClick
29625
- * @fires Highcharts.Series#event:legendItemClick
29753
+ * @emits Highcharts.Point#event:legendItemClick
29754
+ * @emits Highcharts.Series#event:legendItemClick
29626
29755
  */
29627
29756
  Legend.prototype.setItemEvents = function (item, legendItem, useHTML) {
29628
29757
  var legend = this,
@@ -29712,7 +29841,7 @@
29712
29841
  * @private
29713
29842
  * @function Highcharts.Legend#createCheckboxForItem
29714
29843
  * @param {Highcharts.BubbleLegendItem|Point|Highcharts.Series} item
29715
- * @fires Highcharts.Series#event:checkboxClick
29844
+ * @emits Highcharts.Series#event:checkboxClick
29716
29845
  */
29717
29846
  Legend.prototype.createCheckboxForItem = function (item) {
29718
29847
  var legend = this;
@@ -30141,8 +30270,8 @@
30141
30270
  * @param {...Array<*>} arguments
30142
30271
  * All arguments for the constructor.
30143
30272
  *
30144
- * @fires Highcharts.Chart#event:init
30145
- * @fires Highcharts.Chart#event:afterInit
30273
+ * @emits Highcharts.Chart#event:init
30274
+ * @emits Highcharts.Chart#event:afterInit
30146
30275
  */
30147
30276
  Chart.prototype.getArgs = function (a, b, c) {
30148
30277
  // Remove the optional first argument, renderTo, and
@@ -30168,10 +30297,9 @@
30168
30297
  * Function to run when the chart has loaded and and all external
30169
30298
  * images are loaded.
30170
30299
  *
30171
- * @return {void}
30172
30300
  *
30173
- * @fires Highcharts.Chart#event:init
30174
- * @fires Highcharts.Chart#event:afterInit
30301
+ * @emits Highcharts.Chart#event:init
30302
+ * @emits Highcharts.Chart#event:afterInit
30175
30303
  */
30176
30304
  Chart.prototype.init = function (userOptions, callback) {
30177
30305
  // Handle regular options
@@ -30349,7 +30477,6 @@
30349
30477
  *
30350
30478
  * @private
30351
30479
  * @function Highcharts.Series#getSeriesOrderByLinks
30352
- * @return {Array<Highcharts.Series>}
30353
30480
  */
30354
30481
  Chart.prototype.getSeriesOrderByLinks = function () {
30355
30482
  return this.series.concat().sort(function (a, b) {
@@ -30430,7 +30557,8 @@
30430
30557
  pos: plotLeft,
30431
30558
  len: Infinity
30432
30559
  };
30433
- var chartX = options.paneCoordinates ? xAxis.pos + x : plotLeft + x;
30560
+ var chartX = options.paneCoordinates ?
30561
+ xAxis.pos + x : plotLeft + x;
30434
30562
  if (!(chartX >= Math.max(scrollLeft + plotLeft, xAxis.pos) &&
30435
30563
  chartX <= Math.min(scrollLeft + plotLeft + box.width, xAxis.pos + xAxis.len))) {
30436
30564
  e.isInsidePlot = false;
@@ -30441,7 +30569,8 @@
30441
30569
  pos: plotTop,
30442
30570
  len: Infinity
30443
30571
  };
30444
- var chartY = options.paneCoordinates ? yAxis.pos + y : plotTop + y;
30572
+ var chartY = options.paneCoordinates ?
30573
+ yAxis.pos + y : plotTop + y;
30445
30574
  if (!(chartY >= Math.max(scrollTop + plotTop, yAxis.pos) &&
30446
30575
  chartY <= Math.min(scrollTop + plotTop + box.height, yAxis.pos + yAxis.len))) {
30447
30576
  e.isInsidePlot = false;
@@ -30464,12 +30593,12 @@
30464
30593
  * @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animation]
30465
30594
  * If or how to apply animation to the redraw.
30466
30595
  *
30467
- * @fires Highcharts.Chart#event:afterSetExtremes
30468
- * @fires Highcharts.Chart#event:beforeRedraw
30469
- * @fires Highcharts.Chart#event:predraw
30470
- * @fires Highcharts.Chart#event:redraw
30471
- * @fires Highcharts.Chart#event:render
30472
- * @fires Highcharts.Chart#event:updatedData
30596
+ * @emits Highcharts.Chart#event:afterSetExtremes
30597
+ * @emits Highcharts.Chart#event:beforeRedraw
30598
+ * @emits Highcharts.Chart#event:predraw
30599
+ * @emits Highcharts.Chart#event:redraw
30600
+ * @emits Highcharts.Chart#event:render
30601
+ * @emits Highcharts.Chart#event:updatedData
30473
30602
  */
30474
30603
  Chart.prototype.redraw = function (animation) {
30475
30604
  fireEvent(this, 'beforeRedraw');
@@ -30631,8 +30760,6 @@
30631
30760
  var series = this.series;
30632
30761
  /**
30633
30762
  * @private
30634
- * @param {Highcharts.Axis|Highcharts.Series} item
30635
- * @return {boolean}
30636
30763
  */
30637
30764
  function itemById(item) {
30638
30765
  return (item.id === id ||
@@ -30656,8 +30783,8 @@
30656
30783
  *
30657
30784
  * @private
30658
30785
  * @function Highcharts.Chart#getAxes
30659
- * @fires Highcharts.Chart#event:afterGetAxes
30660
- * @fires Highcharts.Chart#event:getAxes
30786
+ * @emits Highcharts.Chart#event:afterGetAxes
30787
+ * @emits Highcharts.Chart#event:getAxes
30661
30788
  */
30662
30789
  Chart.prototype.getAxes = function () {
30663
30790
  var chart = this,
@@ -30839,7 +30966,7 @@
30839
30966
  * @function Highcharts.Chart#layOutTitles
30840
30967
  *
30841
30968
  * @param {boolean} [redraw=true]
30842
- * @fires Highcharts.Chart#event:afterLayOutTitles
30969
+ * @emits Highcharts.Chart#event:afterLayOutTitles
30843
30970
  */
30844
30971
  Chart.prototype.layOutTitles = function (redraw) {
30845
30972
  var titleOffset = [0, 0, 0],
@@ -30847,7 +30974,7 @@
30847
30974
  spacingBox = this.spacingBox;
30848
30975
  // Lay out the title and the subtitle respectively
30849
30976
  ['title', 'subtitle', 'caption'].forEach(function (key) {
30850
- var title = this[key], titleOptions = this.options[key], verticalAlign = titleOptions.verticalAlign || 'top', offset = key === 'title' ?
30977
+ var title = this[key], titleOptions = (this.options[key]), verticalAlign = titleOptions.verticalAlign || 'top', offset = key === 'title' ?
30851
30978
  verticalAlign === 'top' ? -3 : 0 :
30852
30979
  // Floating subtitle (#6574)
30853
30980
  verticalAlign === 'top' ? titleOffset[0] + 2 : 0;
@@ -30855,7 +30982,8 @@
30855
30982
  height;
30856
30983
  if (title) {
30857
30984
  if (!this.styledMode) {
30858
- titleSize = titleOptions.style && titleOptions.style.fontSize;
30985
+ titleSize = (titleOptions.style &&
30986
+ titleOptions.style.fontSize);
30859
30987
  }
30860
30988
  titleSize = renderer.fontMetrics(titleSize, title).b;
30861
30989
  title
@@ -31030,7 +31158,7 @@
31030
31158
  *
31031
31159
  * @private
31032
31160
  * @function Highcharts.Chart#afterGetContainer
31033
- * @fires Highcharts.Chart#event:afterGetContainer
31161
+ * @emits Highcharts.Chart#event:afterGetContainer
31034
31162
  */
31035
31163
  Chart.prototype.getContainer = function () {
31036
31164
  var chart = this,
@@ -31067,7 +31195,7 @@
31067
31195
  // Make a reference to the chart from the div
31068
31196
  attr(renderTo, indexAttrName, chart.index);
31069
31197
  // remove previous chart
31070
- renderTo.innerHTML = '';
31198
+ renderTo.innerHTML = AST.emptyHTML;
31071
31199
  // If the container doesn't have an offsetWidth, it has or is a child of
31072
31200
  // a node that has display:none. We need to temporarily move it out to a
31073
31201
  // visible state to determine the size, else the legend and tooltips
@@ -31152,7 +31280,7 @@
31152
31280
  *
31153
31281
  * @private
31154
31282
  * @function Highcharts.Chart#getMargins
31155
- * @fires Highcharts.Chart#event:getMargins
31283
+ * @emits Highcharts.Chart#event:getMargins
31156
31284
  */
31157
31285
  Chart.prototype.getMargins = function (skipAxes) {
31158
31286
  var _a = this,
@@ -31318,10 +31446,9 @@
31318
31446
  * @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animation=true]
31319
31447
  * Whether and how to apply animation.
31320
31448
  *
31321
- * @return {void}
31322
31449
  *
31323
- * @fires Highcharts.Chart#event:endResize
31324
- * @fires Highcharts.Chart#event:resize
31450
+ * @emits Highcharts.Chart#event:endResize
31451
+ * @emits Highcharts.Chart#event:resize
31325
31452
  */
31326
31453
  Chart.prototype.setSize = function (width, height, animation) {
31327
31454
  var chart = this,
@@ -31378,7 +31505,7 @@
31378
31505
  *
31379
31506
  * @private
31380
31507
  * @function Highcharts.Chart#setChartSize
31381
- * @fires Highcharts.Chart#event:afterSetChartSize
31508
+ * @emits Highcharts.Chart#event:afterSetChartSize
31382
31509
  */
31383
31510
  Chart.prototype.setChartSize = function (skipAxes) {
31384
31511
  var chart = this,
@@ -31501,7 +31628,7 @@
31501
31628
  *
31502
31629
  * @private
31503
31630
  * @function Highcharts.Chart#drawChartBox
31504
- * @fires Highcharts.Chart#event:afterDrawChartBox
31631
+ * @emits Highcharts.Chart#event:afterDrawChartBox
31505
31632
  */
31506
31633
  Chart.prototype.drawChartBox = function () {
31507
31634
  var chart = this,
@@ -31635,7 +31762,6 @@
31635
31762
  *
31636
31763
  * @private
31637
31764
  * @function Highcharts.Chart#propFromSeries
31638
- * @return {void}
31639
31765
  */
31640
31766
  Chart.prototype.propFromSeries = function () {
31641
31767
  var chart = this,
@@ -31679,7 +31805,7 @@
31679
31805
  *
31680
31806
  * @private
31681
31807
  * @function Highcharts.Chart#linkSeries
31682
- * @fires Highcharts.Chart#event:afterLinkSeries
31808
+ * @emits Highcharts.Chart#event:afterLinkSeries
31683
31809
  */
31684
31810
  Chart.prototype.linkSeries = function () {
31685
31811
  var chart = this,
@@ -31907,7 +32033,7 @@
31907
32033
  *
31908
32034
  * @function Highcharts.Chart#destroy
31909
32035
  *
31910
- * @fires Highcharts.Chart#event:destroy
32036
+ * @emits Highcharts.Chart#event:destroy
31911
32037
  */
31912
32038
  Chart.prototype.destroy = function () {
31913
32039
  var chart = this,
@@ -31959,7 +32085,7 @@
31959
32085
  // Remove container and all SVG, check container as it can break in IE
31960
32086
  // when destroyed before finished loading
31961
32087
  if (container) {
31962
- container.innerHTML = '';
32088
+ container.innerHTML = AST.emptyHTML;
31963
32089
  removeEvent(container);
31964
32090
  if (parentNode) {
31965
32091
  discardElement(container);
@@ -31975,7 +32101,7 @@
31975
32101
  *
31976
32102
  * @private
31977
32103
  * @function Highcharts.Chart#firstRender
31978
- * @fires Highcharts.Chart#event:beforeRender
32104
+ * @emits Highcharts.Chart#event:beforeRender
31979
32105
  */
31980
32106
  Chart.prototype.firstRender = function () {
31981
32107
  var chart = this,
@@ -32039,8 +32165,8 @@
32039
32165
  *
32040
32166
  * @private
32041
32167
  * @function Highcharts.Chart#onload
32042
- * @fires Highcharts.Chart#event:load
32043
- * @fires Highcharts.Chart#event:render
32168
+ * @emits Highcharts.Chart#event:load
32169
+ * @emits Highcharts.Chart#event:render
32044
32170
  */
32045
32171
  Chart.prototype.onload = function () {
32046
32172
  // Run callbacks, first the ones registered by modules, then user's one
@@ -32086,8 +32212,8 @@
32086
32212
  * @return {Highcharts.Series}
32087
32213
  * The newly created series object.
32088
32214
  *
32089
- * @fires Highcharts.Chart#event:addSeries
32090
- * @fires Highcharts.Chart#event:afterAddSeries
32215
+ * @emits Highcharts.Chart#event:addSeries
32216
+ * @emits Highcharts.Chart#event:afterAddSeries
32091
32217
  */
32092
32218
  Chart.prototype.addSeries = function (options, redraw, animation) {
32093
32219
  var chart = this;
@@ -32346,8 +32472,8 @@
32346
32472
  * Whether to apply animation, and optionally animation
32347
32473
  * configuration.
32348
32474
  *
32349
- * @fires Highcharts.Chart#event:update
32350
- * @fires Highcharts.Chart#event:afterUpdate
32475
+ * @emits Highcharts.Chart#event:update
32476
+ * @emits Highcharts.Chart#event:afterUpdate
32351
32477
  */
32352
32478
  Chart.prototype.update = function (options, redraw, oneToOne, animation) {
32353
32479
  var chart = this,
@@ -32615,8 +32741,8 @@
32615
32741
  *
32616
32742
  * @function Highcharts.Chart#showResetZoom
32617
32743
  *
32618
- * @fires Highcharts.Chart#event:afterShowResetZoom
32619
- * @fires Highcharts.Chart#event:beforeShowResetZoom
32744
+ * @emits Highcharts.Chart#event:afterShowResetZoom
32745
+ * @emits Highcharts.Chart#event:beforeShowResetZoom
32620
32746
  */
32621
32747
  Chart.prototype.showResetZoom = function () {
32622
32748
  var chart = this,
@@ -32653,7 +32779,7 @@
32653
32779
  *
32654
32780
  * @function Highcharts.Chart#zoomOut
32655
32781
  *
32656
- * @fires Highcharts.Chart#event:selection
32782
+ * @emits Highcharts.Chart#event:selection
32657
32783
  */
32658
32784
  Chart.prototype.zoomOut = function () {
32659
32785
  fireEvent(this, 'selection', { resetSelection: true }, this.zoom);
@@ -32668,7 +32794,8 @@
32668
32794
  Chart.prototype.zoom = function (event) {
32669
32795
  var chart = this,
32670
32796
  pointer = chart.pointer,
32671
- mouseDownPos = (chart.inverted ? pointer.mouseDownX : pointer.mouseDownY);
32797
+ mouseDownPos = chart.inverted ?
32798
+ pointer.mouseDownX : pointer.mouseDownY;
32672
32799
  var displayButton = false,
32673
32800
  hasZoomed;
32674
32801
  // If zoom is called with no arguments, reset the axes
@@ -34433,6 +34560,9 @@
34433
34560
  * parameter, `event`, is passed to the function, containing common
34434
34561
  * event information.
34435
34562
  *
34563
+ * Returning `false` cancels the default behavior, which is to show a
34564
+ * tooltip for the point.
34565
+ *
34436
34566
  * @sample {highcharts} highcharts/plotoptions/series-point-events-mouseover/
34437
34567
  * Show values in the chart's corner on mouse over
34438
34568
  *
@@ -34769,9 +34899,9 @@
34769
34899
  */
34770
34900
  // eslint-disable-next-line valid-jsdoc
34771
34901
  /**
34772
- * Callback JavaScript function to format the data label. Note that
34773
- * if a `format` is defined, the format takes precedence and the
34774
- * formatter is ignored.
34902
+ * Callback JavaScript function to format the data label. Note that if a
34903
+ * `format` is defined, the format takes precedence and the formatter is
34904
+ * ignored.
34775
34905
  *
34776
34906
  * @sample {highmaps} maps/plotoptions/series-datalabels-format/
34777
34907
  * Formatted value
@@ -34780,7 +34910,8 @@
34780
34910
  */
34781
34911
  formatter: function () {
34782
34912
  var numberFormatter = this.series.chart.numberFormatter;
34783
- return typeof this.y !== 'number' ? '' : numberFormatter(this.y, -1);
34913
+ return typeof this.y !== 'number' ?
34914
+ '' : numberFormatter(this.y, -1);
34784
34915
  },
34785
34916
  /**
34786
34917
  * For points with an extent, like columns or map areas, whether to
@@ -35154,7 +35285,7 @@
35154
35285
  * @deprecated
35155
35286
  *
35156
35287
  * @extends plotOptions.series.marker
35157
- * @excluding states
35288
+ * @excluding states, symbol
35158
35289
  * @product highcharts highstock
35159
35290
  */
35160
35291
  marker: {
@@ -35861,7 +35992,6 @@
35861
35992
  *
35862
35993
  * @private
35863
35994
  * @function Highcharts.Series#hasData
35864
- * @return {boolean}
35865
35995
  */
35866
35996
  Series.prototype.hasData = function () {
35867
35997
  return ((this.visible &&
@@ -35879,7 +36009,6 @@
35879
36009
  *
35880
36010
  * @private
35881
36011
  * @function Highcharts.Series#autoIncrement
35882
- * @return {number}
35883
36012
  */
35884
36013
  Series.prototype.autoIncrement = function (x) {
35885
36014
  var options = this.options,
@@ -35940,13 +36069,9 @@
35940
36069
  * not redraw the series. For API usage, use {@link Series#update}.
35941
36070
  * @private
35942
36071
  * @function Highcharts.Series#setOptions
35943
- *
35944
36072
  * @param {Highcharts.SeriesOptionsType} itemOptions
35945
36073
  * The series options.
35946
- *
35947
- * @return {Highcharts.SeriesOptionsType}
35948
- *
35949
- * @fires Highcharts.Series#event:afterSetOptions
36074
+ * @emits Highcharts.Series#event:afterSetOptions
35950
36075
  */
35951
36076
  Series.prototype.setOptions = function (itemOptions) {
35952
36077
  var chart = this.chart,
@@ -36104,7 +36229,6 @@
36104
36229
  *
36105
36230
  * @private
36106
36231
  * @function Highcharts.Series#getPointsCollection
36107
- * @return {Array<Highcharts.Point>}
36108
36232
  */
36109
36233
  Series.prototype.getPointsCollection = function () {
36110
36234
  return (this.hasGroupedData ? this.points : this.data) || [];
@@ -36115,7 +36239,6 @@
36115
36239
  *
36116
36240
  * @private
36117
36241
  * @function Highcharts.Series#getSymbol
36118
- * @return {void}
36119
36242
  */
36120
36243
  Series.prototype.getSymbol = function () {
36121
36244
  var seriesMarkerOption = this.options.marker;
@@ -36127,14 +36250,13 @@
36127
36250
  *
36128
36251
  * @private
36129
36252
  * @function Highcharts.Series#findPointIndex
36130
- * @param {Highcharts.PointOptionsObject} optionsObject
36131
- * The options of the point.
36132
- * @param {number} fromIndex
36133
- * The index to start searching from, used for optimizing
36134
- * series with required sorting.
36135
- * @returns {number|undefined}
36136
- * Returns the index of a matching point, or undefined if no
36137
- * match is found.
36253
+ * @param {Highcharts.PointOptionsObject} optionsObject
36254
+ * The options of the point.
36255
+ * @param {number} fromIndex
36256
+ * The index to start searching from, used for optimizing series with
36257
+ * required sorting.
36258
+ * @return {number|undefined}
36259
+ * Returns the index of a matching point, or undefined if no match is found.
36138
36260
  */
36139
36261
  Series.prototype.findPointIndex = function (optionsObject, fromIndex) {
36140
36262
  var id = optionsObject.id,
@@ -36517,11 +36639,8 @@
36517
36639
  *
36518
36640
  * @private
36519
36641
  * @function Highcharts.Series#sortData
36520
- *
36521
36642
  * @param {Array<Highcharts.PointOptionsType>} data
36522
36643
  * Force data grouping.
36523
- *
36524
- * @return {Array<Highcharts.PointOptionsObject>}
36525
36644
  */
36526
36645
  Series.prototype.sortData = function (data) {
36527
36646
  var series = this,
@@ -36583,8 +36702,7 @@
36583
36702
  * @private
36584
36703
  * @function Highcharts.Series#getProcessedData
36585
36704
  * @param {boolean} [forceExtremesFromAll]
36586
- * Force getting extremes of a total series data range.
36587
- * @return {Highcharts.SeriesProcessedDataObject}
36705
+ * Force getting extremes of a total series data range.
36588
36706
  */
36589
36707
  Series.prototype.getProcessedData = function (forceExtremesFromAll) {
36590
36708
  var series = this,
@@ -36617,7 +36735,7 @@
36617
36735
  xExtremes = xAxis.getExtremes();
36618
36736
  min = xExtremes.min;
36619
36737
  max = xExtremes.max;
36620
- updatingNames = xAxis.categories && !xAxis.names.length;
36738
+ updatingNames = !!(xAxis.categories && !xAxis.names.length);
36621
36739
  }
36622
36740
  // optionally filter out points outside the plot area
36623
36741
  if (isCartesian &&
@@ -36680,8 +36798,7 @@
36680
36798
  * @private
36681
36799
  * @function Highcharts.Series#processData
36682
36800
  * @param {boolean} [force]
36683
- * Force data grouping.
36684
- * @return {boolean|undefined}
36801
+ * Force data grouping.
36685
36802
  */
36686
36803
  Series.prototype.processData = function (force) {
36687
36804
  var series = this,
@@ -36702,7 +36819,7 @@
36702
36819
  series.cropStart = processedData.cropStart;
36703
36820
  series.processedXData = processedData.xData;
36704
36821
  series.processedYData = processedData.yData;
36705
- series.closestPointRange = series.basePointRange = processedData.closestPointRange;
36822
+ series.closestPointRange = (series.basePointRange = processedData.closestPointRange);
36706
36823
  fireEvent(series, 'afterProcessData');
36707
36824
  };
36708
36825
  /**
@@ -36712,12 +36829,6 @@
36712
36829
  *
36713
36830
  * @private
36714
36831
  * @function Highcharts.Series#cropData
36715
- * @param {Array<number>} xData
36716
- * @param {Array<number>} yData
36717
- * @param {number} min
36718
- * @param {number} max
36719
- * @param {number} [cropShoulder]
36720
- * @return {Highcharts.SeriesCropDataObject}
36721
36832
  */
36722
36833
  Series.prototype.cropData = function (xData, yData, min, max, cropShoulder) {
36723
36834
  var dataLength = xData.length;
@@ -36758,7 +36869,7 @@
36758
36869
  Series.prototype.generatePoints = function () {
36759
36870
  var series = this,
36760
36871
  options = series.options,
36761
- dataOptions = options.data,
36872
+ dataOptions = (series.processedData || options.data),
36762
36873
  processedXData = series.processedXData,
36763
36874
  processedYData = series.processedYData,
36764
36875
  PointClass = series.pointClass,
@@ -36835,7 +36946,8 @@
36835
36946
  * @readonly
36836
36947
  */
36837
36948
  // For faster access in Point.update
36838
- point.index = hasGroupedData ? (groupCropStartIndex + i) : cursor;
36949
+ point.index = hasGroupedData ?
36950
+ (groupCropStartIndex + i) : cursor;
36839
36951
  points[i] = point;
36840
36952
  }
36841
36953
  }
@@ -36895,12 +37007,9 @@
36895
37007
  *
36896
37008
  * @private
36897
37009
  * @function Highcharts.Series#getXExtremes
36898
- *
36899
37010
  * @param {Array<number>} xData
36900
37011
  * The data to inspect. Defaults to the current data within the visible
36901
37012
  * range.
36902
- *
36903
- * @return {Highcharts.RangeObject}
36904
37013
  */
36905
37014
  Series.prototype.getXExtremes = function (xData) {
36906
37015
  return {
@@ -36914,14 +37023,11 @@
36914
37023
  *
36915
37024
  * @private
36916
37025
  * @function Highcharts.Series#getExtremes
36917
- *
36918
37026
  * @param {Array<number>} [yData]
36919
37027
  * The data to inspect. Defaults to the current data within the visible
36920
37028
  * range.
36921
37029
  * @param {boolean} [forceExtremesFromAll]
36922
37030
  * Force getting extremes of a total series data range.
36923
- *
36924
- * @return {Highcharts.DataExtremesObject}
36925
37031
  */
36926
37032
  Series.prototype.getExtremes = function (yData, forceExtremesFromAll) {
36927
37033
  var xAxis = this.xAxis,
@@ -37021,11 +37127,8 @@
37021
37127
  *
37022
37128
  * @private
37023
37129
  * @function Highcharts.Series.getFirstValidPoint
37024
- *
37025
37130
  * @param {Array<Highcharts.PointOptionsType>} data
37026
37131
  * Array of options for points
37027
- *
37028
- * @return {Highcharts.PointOptionsType}
37029
37132
  */
37030
37133
  Series.prototype.getFirstValidPoint = function (data) {
37031
37134
  var dataLength = data.length;
@@ -37045,7 +37148,7 @@
37045
37148
  *
37046
37149
  * @function Highcharts.Series#translate
37047
37150
  *
37048
- * @fires Highcharts.Series#events:translate
37151
+ * @emits Highcharts.Series#events:translate
37049
37152
  */
37050
37153
  Series.prototype.translate = function () {
37051
37154
  if (!this.processedXData) { // hidden series
@@ -37093,12 +37196,22 @@
37093
37196
  (stackThreshold ? 0 : threshold) ?
37094
37197
  '-' :
37095
37198
  '') + series.stackKey];
37096
- if (yAxis.positiveValuesOnly && !yAxis.validatePositiveValue(yValue) ||
37097
- xAxis.positiveValuesOnly && !xAxis.validatePositiveValue(xValue)) {
37199
+ if (yAxis.positiveValuesOnly &&
37200
+ !yAxis.validatePositiveValue(yValue) ||
37201
+ xAxis.positiveValuesOnly &&
37202
+ !xAxis.validatePositiveValue(xValue)) {
37098
37203
  point.isNull = true;
37099
37204
  }
37100
- // Get the plotX translation
37205
+ /**
37206
+ * The translated X value for the point in terms of pixels. Relative
37207
+ * to the X axis position if the series has one, otherwise relative
37208
+ * to the plot area. Depending on the series type this value might
37209
+ * not be defined.
37210
+ * @name Highcharts.Point#plotX
37211
+ * @type {number|undefined}
37212
+ */
37101
37213
  point.plotX = plotX = correctFloat(// #5236
37214
+ // Get the plotX translation
37102
37215
  limitedRange(xAxis.translate(// #3923
37103
37216
  xValue, 0, 0, 0, 1, pointPlacement, this.type === 'flags')) // #3923
37104
37217
  );
@@ -37159,6 +37272,14 @@
37159
37272
  false,
37160
37273
  true);
37161
37274
  if (typeof translated !== 'undefined') {
37275
+ /**
37276
+ * The translated Y value for the point in terms of pixels.
37277
+ * Relative to the Y axis position if the series has one,
37278
+ * otherwise relative to the plot area. Depending on the
37279
+ * series type this value might not be defined.
37280
+ * @name Highcharts.Point#plotY
37281
+ * @type {number|undefined}
37282
+ */
37162
37283
  point.plotY = limitedRange(translated);
37163
37284
  }
37164
37285
  }
@@ -37173,10 +37294,7 @@
37173
37294
  threshold ||
37174
37295
  0);
37175
37296
  // some API data
37176
- point.category = (categories &&
37177
- typeof categories[point.x] !== 'undefined' ?
37178
- categories[point.x] :
37179
- point.x);
37297
+ point.category = pick(categories && categories[point.x], point.x);
37180
37298
  // Determine auto enabling of markers (#3635, #5099)
37181
37299
  if (!point.isNull && point.visible !== false) {
37182
37300
  if (typeof lastPlotX !== 'undefined') {
@@ -37229,8 +37347,6 @@
37229
37347
  *
37230
37348
  * @private
37231
37349
  * @function Highcharts.Series#getClip
37232
- *
37233
- * @return {Highcharts.Dictionary<number>}
37234
37350
  */
37235
37351
  Series.prototype.getClipBox = function () {
37236
37352
  var _a = this,
@@ -37380,7 +37496,7 @@
37380
37496
  * @private
37381
37497
  * @function Highcharts.Series#afterAnimate
37382
37498
  *
37383
- * @fires Highcharts.Series#event:afterAnimate
37499
+ * @emits Highcharts.Series#event:afterAnimate
37384
37500
  */
37385
37501
  Series.prototype.afterAnimate = function () {
37386
37502
  var _this = this;
@@ -37529,26 +37645,26 @@
37529
37645
  var seriesStateOptions,
37530
37646
  pointStateOptions,
37531
37647
  radius = pick(pointMarkerOptions.radius,
37532
- seriesMarkerOptions.radius);
37648
+ seriesMarkerOptions && seriesMarkerOptions.radius);
37533
37649
  // Handle hover and select states
37534
37650
  if (state) {
37535
37651
  seriesStateOptions = seriesMarkerOptions.states[state];
37536
37652
  pointStateOptions = pointMarkerOptions.states &&
37537
37653
  pointMarkerOptions.states[state];
37538
- radius = pick(pointStateOptions && pointStateOptions.radius, seriesStateOptions && seriesStateOptions.radius, radius + (seriesStateOptions && seriesStateOptions.radiusPlus ||
37654
+ radius = pick(pointStateOptions && pointStateOptions.radius, seriesStateOptions && seriesStateOptions.radius, radius && radius + (seriesStateOptions && seriesStateOptions.radiusPlus ||
37539
37655
  0));
37540
37656
  }
37541
37657
  point.hasImage = symbol && symbol.indexOf('url') === 0;
37542
37658
  if (point.hasImage) {
37543
37659
  radius = 0; // and subsequently width and height is not set
37544
37660
  }
37545
- var attribs = {
37661
+ var attribs = isNumber(radius) ? {
37546
37662
  // Math.floor for #1843:
37547
37663
  x: seriesOptions.crisp ?
37548
37664
  Math.floor(point.plotX - radius) :
37549
37665
  point.plotX - radius,
37550
37666
  y: point.plotY - radius
37551
- };
37667
+ } : {};
37552
37668
  if (radius) {
37553
37669
  attribs.width = attribs.height = 2 * radius;
37554
37670
  }
@@ -37601,7 +37717,7 @@
37601
37717
  // Handle hover and select states
37602
37718
  state = state || 'normal';
37603
37719
  if (state) {
37604
- seriesStateOptions = seriesMarkerOptions.states[state] || {};
37720
+ seriesStateOptions = (seriesMarkerOptions.states[state] || {});
37605
37721
  pointStateOptions = (pointMarkerOptions.states &&
37606
37722
  pointMarkerOptions.states[state]) || {};
37607
37723
  strokeWidth = pick(pointStateOptions.lineWidth, seriesStateOptions.lineWidth, strokeWidth + pick(pointStateOptions.lineWidthPlus, seriesStateOptions.lineWidthPlus, 0));
@@ -37626,7 +37742,7 @@
37626
37742
  * @private
37627
37743
  * @function Highcharts.Series#destroy
37628
37744
  *
37629
- * @fires Highcharts.Series#event:destroy
37745
+ * @emits Highcharts.Series#event:destroy
37630
37746
  */
37631
37747
  Series.prototype.destroy = function (keepEventsForUpdate) {
37632
37748
  var series = this,
@@ -37638,7 +37754,7 @@
37638
37754
  point,
37639
37755
  axis;
37640
37756
  // add event hook
37641
- fireEvent(series, 'destroy');
37757
+ fireEvent(series, 'destroy', { keepEventsForUpdate: keepEventsForUpdate });
37642
37758
  // remove events
37643
37759
  this.removeEvents(keepEventsForUpdate);
37644
37760
  // erase from axes
@@ -37921,8 +38037,6 @@
37921
38037
  * Get the translation and scale for the plot area of this series.
37922
38038
  *
37923
38039
  * @function Highcharts.Series#getPlotBox
37924
- *
37925
- * @return {Highcharts.SeriesPlotBoxObject}
37926
38040
  */
37927
38041
  Series.prototype.getPlotBox = function () {
37928
38042
  var chart = this.chart;
@@ -37967,7 +38081,7 @@
37967
38081
  *
37968
38082
  * @function Highcharts.Series#render
37969
38083
  *
37970
- * @fires Highcharts.Series#event:afterRender
38084
+ * @emits Highcharts.Series#event:afterRender
37971
38085
  */
37972
38086
  Series.prototype.render = function () {
37973
38087
  var series = this,
@@ -38413,7 +38527,7 @@
38413
38527
  * @param {boolean} [withEvent=true]
38414
38528
  * Used internally, whether to fire the series `addPoint` event.
38415
38529
  *
38416
- * @fires Highcharts.Series#event:addPoint
38530
+ * @emits Highcharts.Series#event:addPoint
38417
38531
  */
38418
38532
  Series.prototype.addPoint = function (options, redraw, shift, animation, withEvent) {
38419
38533
  var series = this,
@@ -38450,7 +38564,10 @@
38450
38564
  names[x] = point.name;
38451
38565
  }
38452
38566
  dataOptions.splice(i, 0, options);
38453
- if (isInTheMiddle) {
38567
+ if (isInTheMiddle ||
38568
+ // When processedData is present we need to splice an empty slot
38569
+ // into series.data, otherwise generatePoints won't pick it up.
38570
+ series.processedData) {
38454
38571
  series.data.splice(i, 0, null);
38455
38572
  series.processData();
38456
38573
  }
@@ -38505,7 +38622,7 @@
38505
38622
  * @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animation]
38506
38623
  * Whether and optionally how the series should be animated.
38507
38624
  *
38508
- * @fires Highcharts.Point#event:remove
38625
+ * @emits Highcharts.Point#event:remove
38509
38626
  */
38510
38627
  Series.prototype.removePoint = function (i, redraw, animation) {
38511
38628
  var series = this,
@@ -38559,7 +38676,7 @@
38559
38676
  * @param {boolean} [withEvent=true]
38560
38677
  * Used internally, whether to fire the series `remove` event.
38561
38678
  *
38562
- * @fires Highcharts.Series#event:remove
38679
+ * @emits Highcharts.Series#event:remove
38563
38680
  */
38564
38681
  Series.prototype.remove = function (redraw, animation, withEvent, keepEvents) {
38565
38682
  var series = this,
@@ -38609,8 +38726,8 @@
38609
38726
  * more operations on the chart, it is a good idea to set redraw to
38610
38727
  * false and call {@link Chart#redraw} after.
38611
38728
  *
38612
- * @fires Highcharts.Series#event:update
38613
- * @fires Highcharts.Series#event:afterUpdate
38729
+ * @emits Highcharts.Series#event:update
38730
+ * @emits Highcharts.Series#event:afterUpdate
38614
38731
  */
38615
38732
  Series.prototype.update = function (options, redraw) {
38616
38733
  options = cleanRecursively(options, this.userOptions);
@@ -38655,6 +38772,8 @@
38655
38772
  typeof options.pointStart !== 'undefined' ||
38656
38773
  typeof options.pointInterval !== 'undefined' ||
38657
38774
  typeof options.relativeXValue !== 'undefined' ||
38775
+ options.joinBy ||
38776
+ options.mapData || // #11636
38658
38777
  // Changes to data grouping requires new points in new group
38659
38778
  series.hasOptionChanged('dataGrouping') ||
38660
38779
  series.hasOptionChanged('pointStart') ||
@@ -38666,6 +38785,8 @@
38666
38785
  preserve.push('data', 'isDirtyData', 'points', 'processedXData', 'processedYData', 'xIncrement', 'cropped', '_hasPointMarkers', '_hasPointLabels', 'clips', // #15420
38667
38786
  // Networkgraph (#14397)
38668
38787
  'nodes', 'layout',
38788
+ // Treemap
38789
+ 'level',
38669
38790
  // Map specific, consider moving it to series-specific preserve-
38670
38791
  // properties (#10617)
38671
38792
  'mapMap', 'mapData', 'minY', 'maxY', 'minX', 'maxX');
@@ -38692,7 +38813,9 @@
38692
38813
  series.index : oldOptions.index,
38693
38814
  pointStart: pick(
38694
38815
  // when updating from blank (#7933)
38695
- plotOptions && plotOptions.series && plotOptions.series.pointStart, oldOptions.pointStart,
38816
+ (plotOptions &&
38817
+ plotOptions.series &&
38818
+ plotOptions.series.pointStart), oldOptions.pointStart,
38696
38819
  // when updating after addPoint
38697
38820
  series.xData[0])
38698
38821
  }, (!keepPoints && { data: series.options.data }), options);
@@ -38715,15 +38838,12 @@
38715
38838
  series.remove(false, false, false, true);
38716
38839
  if (casting) {
38717
38840
  // Modern browsers including IE11
38718
- // @todo slow, consider alternatives mentioned:
38719
- // https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf
38720
38841
  if (Object.setPrototypeOf) {
38721
38842
  Object.setPrototypeOf(series, seriesTypes[newType].prototype);
38722
38843
  // Legacy (IE < 11)
38723
38844
  }
38724
38845
  else {
38725
- var ownEvents = Object.hasOwnProperty.call(series, 'hcEvents') &&
38726
- series.hcEvents;
38846
+ var ownEvents = Object.hasOwnProperty.call(series, 'hcEvents') && series.hcEvents;
38727
38847
  for (n in initialSeriesProto) { // eslint-disable-line guard-for-in
38728
38848
  series[n] = void 0;
38729
38849
  }
@@ -38821,13 +38941,17 @@
38821
38941
  return option !== oldOption;
38822
38942
  }
38823
38943
  return option !==
38824
- pick(plotOptions && plotOptions[this.type] && plotOptions[this.type][optionName], plotOptions && plotOptions.series && plotOptions.series[optionName], option);
38944
+ pick(plotOptions &&
38945
+ plotOptions[this.type] &&
38946
+ plotOptions[this.type][optionName], plotOptions &&
38947
+ plotOptions.series &&
38948
+ plotOptions.series[optionName], option);
38825
38949
  };
38826
38950
  /**
38827
38951
  * Runs on mouse over the series graphical items.
38828
38952
  *
38829
38953
  * @function Highcharts.Series#onMouseOver
38830
- * @fires Highcharts.Series#event:mouseOver
38954
+ * @emits Highcharts.Series#event:mouseOver
38831
38955
  */
38832
38956
  Series.prototype.onMouseOver = function () {
38833
38957
  var series = this,
@@ -38859,7 +38983,7 @@
38859
38983
  *
38860
38984
  * @function Highcharts.Series#onMouseOut
38861
38985
  *
38862
- * @fires Highcharts.Series#event:mouseOut
38986
+ * @emits Highcharts.Series#event:mouseOut
38863
38987
  */
38864
38988
  Series.prototype.onMouseOut = function () {
38865
38989
  // trigger the event only if listeners exist
@@ -39014,8 +39138,8 @@
39014
39138
  * operations on the chart, it is a good idea to set redraw to false and
39015
39139
  * call {@link Chart#redraw|chart.redraw()} after.
39016
39140
  *
39017
- * @fires Highcharts.Series#event:hide
39018
- * @fires Highcharts.Series#event:show
39141
+ * @emits Highcharts.Series#event:hide
39142
+ * @emits Highcharts.Series#event:show
39019
39143
  */
39020
39144
  Series.prototype.setVisible = function (vis, redraw) {
39021
39145
  var series = this,
@@ -39079,7 +39203,7 @@
39079
39203
  * Toggle visibility from a button
39080
39204
  *
39081
39205
  * @function Highcharts.Series#show
39082
- * @fires Highcharts.Series#event:show
39206
+ * @emits Highcharts.Series#event:show
39083
39207
  */
39084
39208
  Series.prototype.show = function () {
39085
39209
  this.setVisible(true);
@@ -39093,7 +39217,7 @@
39093
39217
  * Toggle visibility from a button
39094
39218
  *
39095
39219
  * @function Highcharts.Series#hide
39096
- * @fires Highcharts.Series#event:hide
39220
+ * @emits Highcharts.Series#event:hide
39097
39221
  */
39098
39222
  Series.prototype.hide = function () {
39099
39223
  this.setVisible(false);
@@ -39114,8 +39238,8 @@
39114
39238
  * True to select the series, false to unselect. If undefined, the selection
39115
39239
  * state is toggled.
39116
39240
  *
39117
- * @fires Highcharts.Series#event:select
39118
- * @fires Highcharts.Series#event:unselect
39241
+ * @emits Highcharts.Series#event:select
39242
+ * @emits Highcharts.Series#event:unselect
39119
39243
  */
39120
39244
  Series.prototype.select = function (selected) {
39121
39245
  var series = this;
@@ -39133,10 +39257,6 @@
39133
39257
  * Checks if a tooltip should be shown for a given point.
39134
39258
  *
39135
39259
  * @private
39136
- * @param {number} plotX
39137
- * @param {number} plotY
39138
- * @param {Highcharts.ChartIsInsideOptionsObject} [options]
39139
- * @return {boolean}
39140
39260
  */
39141
39261
  Series.prototype.shouldShowTooltip = function (plotX, plotY, options) {
39142
39262
  if (options === void 0) { options = {}; }
@@ -39573,7 +39693,7 @@
39573
39693
  if (scrollableMinWidth) {
39574
39694
  this.scrollablePixelsX = scrollablePixelsX = Math.max(0, scrollableMinWidth - this.chartWidth);
39575
39695
  if (scrollablePixelsX) {
39576
- this.scrollablePlotBox = this.renderer.scrollablePlotBox = merge(this.plotBox);
39696
+ this.scrollablePlotBox = (this.renderer.scrollablePlotBox = merge(this.plotBox));
39577
39697
  this.plotBox.width = this.plotWidth += scrollablePixelsX;
39578
39698
  if (this.inverted) {
39579
39699
  this.clipBox.height += scrollablePixelsX;
@@ -39591,7 +39711,7 @@
39591
39711
  else if (scrollableMinHeight) {
39592
39712
  this.scrollablePixelsY = scrollablePixelsY = Math.max(0, scrollableMinHeight - this.chartHeight);
39593
39713
  if (scrollablePixelsY) {
39594
- this.scrollablePlotBox = this.renderer.scrollablePlotBox = merge(this.plotBox);
39714
+ this.scrollablePlotBox = (this.renderer.scrollablePlotBox = merge(this.plotBox));
39595
39715
  this.plotBox.height = this.plotHeight += scrollablePixelsY;
39596
39716
  if (this.inverted) {
39597
39717
  this.clipBox.width += scrollablePixelsY;
@@ -39776,7 +39896,7 @@
39776
39896
  .addClass('highcharts-scrollable-mask')
39777
39897
  .add();
39778
39898
  addEvent(this, 'afterShowResetZoom', this.moveFixedElements);
39779
- addEvent(this, 'afterDrilldown', this.moveFixedElements);
39899
+ addEvent(this, 'afterApplyDrilldown', this.moveFixedElements);
39780
39900
  addEvent(this, 'afterLayOutTitles', this.moveFixedElements);
39781
39901
  }
39782
39902
  else {
@@ -39904,6 +40024,7 @@
39904
40024
  * area will become scrollable.
39905
40025
  *
39906
40026
  * @type {number}
40027
+ * @since 7.1.2
39907
40028
  * @apioption chart.scrollablePlotArea.minHeight
39908
40029
  */
39909
40030
  /**
@@ -39911,6 +40032,7 @@
39911
40032
  * area will become scrollable.
39912
40033
  *
39913
40034
  * @type {number}
40035
+ * @since 6.1.0
39914
40036
  * @apioption chart.scrollablePlotArea.minWidth
39915
40037
  */
39916
40038
  /**
@@ -39919,6 +40041,7 @@
39919
40041
  * Typically we would use 1 if the chart has right aligned Y axes.
39920
40042
  *
39921
40043
  * @type {number}
40044
+ * @since 6.1.0
39922
40045
  * @apioption chart.scrollablePlotArea.scrollPositionX
39923
40046
  */
39924
40047
  /**
@@ -39926,6 +40049,7 @@
39926
40049
  * 1, where 0 aligns the plot area to the top and 1 aligns it to the bottom.
39927
40050
  *
39928
40051
  * @type {number}
40052
+ * @since 7.1.2
39929
40053
  * @apioption chart.scrollablePlotArea.scrollPositionY
39930
40054
  */
39931
40055
  /**
@@ -40135,7 +40259,8 @@
40135
40259
  chart = axis.chart,
40136
40260
  renderer = chart.renderer,
40137
40261
  stacks = stacking.stacks,
40138
- stackLabelsAnim = axis.options.stackLabels && axis.options.stackLabels.animation,
40262
+ stackLabelsAnim = axis.options.stackLabels &&
40263
+ axis.options.stackLabels.animation,
40139
40264
  animationConfig = getDeferredAnimation(chart,
40140
40265
  stackLabelsAnim || false),
40141
40266
  stackTotalGroup = stacking.stackTotalGroup = (stacking.stackTotalGroup ||
@@ -40282,6 +40407,7 @@
40282
40407
  r: options.borderRadius || 0,
40283
40408
  text: str,
40284
40409
  rotation: options.rotation,
40410
+ // set default padding to 5 as it is in datalabels #12308
40285
40411
  padding: pick(options.padding, 5),
40286
40412
  visibility: 'hidden' // hidden until setOffset is called
40287
40413
  };
@@ -40357,7 +40483,8 @@
40357
40483
  }
40358
40484
  else {
40359
40485
  boxOffsetX = chart.inverted ?
40360
- (isNegative ? bBox.width + padding : -padding) : bBox.width / 2;
40486
+ (isNegative ? bBox.width + padding : -padding) :
40487
+ bBox.width / 2;
40361
40488
  }
40362
40489
  }
40363
40490
  boxOffsetY = chart.inverted ?
@@ -40402,22 +40529,6 @@
40402
40529
  /**
40403
40530
  * @private
40404
40531
  * @function Highcharts.StackItem#getStackBox
40405
- *
40406
- * @param {Highcharts.Chart} chart
40407
- *
40408
- * @param {Highcharts.StackItem} stackItem
40409
- *
40410
- * @param {number} x
40411
- *
40412
- * @param {number} y
40413
- *
40414
- * @param {number} xWidth
40415
- *
40416
- * @param {number} h
40417
- *
40418
- * @param {Highcharts.Axis} axis
40419
- *
40420
- * @return {Highcharts.BBoxObject}
40421
40532
  */
40422
40533
  StackItem.prototype.getStackBox = function (chart, stackItem, x, y, xWidth, h, axis) {
40423
40534
  var reversed = stackItem.axis.reversed,
@@ -40427,7 +40538,8 @@
40427
40538
  neg = (stackItem.isNegative && !reversed) ||
40428
40539
  (!stackItem.isNegative && reversed); // #4056
40429
40540
  return {
40430
- x: inverted ? (neg ? y - axis.right : y - h + axis.pos - chart.plotLeft) :
40541
+ x: inverted ?
40542
+ (neg ? y - axis.right : y - h + axis.pos - chart.plotLeft) :
40431
40543
  x + chart.xAxis[0].transB - chart.plotLeft,
40432
40544
  y: inverted ?
40433
40545
  axis.height - x - xWidth :
@@ -40671,11 +40783,6 @@
40671
40783
  *
40672
40784
  * @private
40673
40785
  * @function Highcharts.Series#getStackIndicator
40674
- * @param {Highcharts.StackItemIndicatorObject|undefined} stackIndicator
40675
- * @param {number} x
40676
- * @param {number} index
40677
- * @param {string} [key]
40678
- * @return {Highcharts.StackItemIndicatorObject}
40679
40786
  */
40680
40787
  Series.prototype.getStackIndicator = function (stackIndicator, x, index, key) {
40681
40788
  // Update stack indicator, when:
@@ -40683,11 +40790,12 @@
40683
40790
  // changed:
40684
40791
  if (!defined(stackIndicator) ||
40685
40792
  stackIndicator.x !== x ||
40686
- (key && stackIndicator.key !== key)) {
40793
+ (key && stackIndicator.stackKey !== key)) {
40687
40794
  stackIndicator = {
40688
40795
  x: x,
40689
40796
  index: 0,
40690
- key: key
40797
+ key: key,
40798
+ stackKey: key
40691
40799
  };
40692
40800
  }
40693
40801
  else {
@@ -41489,7 +41597,9 @@
41489
41597
  }
41490
41598
  isNull = points[i].isNull;
41491
41599
  plotX = pick(points[i].rectPlotX, points[i].plotX);
41492
- yBottom = stacking ? pick(points[i].yBottom, translatedThreshold) : translatedThreshold;
41600
+ yBottom = stacking ?
41601
+ pick(points[i].yBottom, translatedThreshold) :
41602
+ translatedThreshold;
41493
41603
  if (!isNull || connectNulls) {
41494
41604
  if (!connectNulls) {
41495
41605
  addDummyPoints(i, i - 1, 'left');
@@ -41593,24 +41703,22 @@
41593
41703
  var si = yAxisSeries[i].index;
41594
41704
  stackPoint = otherStack.points[si];
41595
41705
  if (!stackPoint) {
41596
- // If the next point in this series
41597
- // is missing, mark the point
41598
- // with point.leftNull or
41599
- // point.rightNull = true.
41706
+ // If the next point in this series is
41707
+ // missing, mark the point with
41708
+ // point.leftNull or point.rightNull = true.
41600
41709
  if (si === series.index) {
41601
41710
  pointMap[x][nullName] = true;
41602
- // If there are missing points in
41603
- // the next stack in any of the
41604
- // series below this one, we need
41605
- // to substract the missing values
41606
- // and add a hiatus to the left or
41711
+ // If there are missing points in the next
41712
+ // stack in any of the series below this
41713
+ // one, we need to substract the missing
41714
+ // values and add a hiatus to the left or
41607
41715
  // right.
41608
41716
  }
41609
41717
  else if (visibleSeries_1[i]) {
41610
- stackedValues =
41611
- stack[x].points[si];
41718
+ stackedValues = stack[x].points[si];
41612
41719
  if (stackedValues) {
41613
- cliff -= stackedValues[1] - stackedValues[0];
41720
+ cliff -= (stackedValues[1] -
41721
+ stackedValues[0]);
41614
41722
  }
41615
41723
  }
41616
41724
  }
@@ -41959,14 +42067,6 @@
41959
42067
  *
41960
42068
  * @private
41961
42069
  * @function Highcharts.seriesTypes.spline#getPointSpline
41962
- *
41963
- * @param {Array<Highcharts.Point>}
41964
- *
41965
- * @param {Highcharts.Point} point
41966
- *
41967
- * @param {number} i
41968
- *
41969
- * @return {Highcharts.SVGPathArray}
41970
42070
  */
41971
42071
  SplineSeries.prototype.getPointSpline = function (points, point, i) {
41972
42072
  var
@@ -42501,7 +42601,9 @@
42501
42601
  options = series.options,
42502
42602
  inverted = this.chart.inverted,
42503
42603
  attr = {},
42504
- translateProp = inverted ? 'translateX' : 'translateY';
42604
+ translateProp = inverted ?
42605
+ 'translateX' :
42606
+ 'translateY';
42505
42607
  var translateStart,
42506
42608
  translatedThreshold;
42507
42609
  if (init) {
@@ -42562,7 +42664,6 @@
42562
42664
  *
42563
42665
  * @private
42564
42666
  * @function Highcharts.seriesTypes.column#getColumnMetrics
42565
- * @return {Highcharts.ColumnMetricsObject}
42566
42667
  */
42567
42668
  ColumnSeries.prototype.getColumnMetrics = function () {
42568
42669
  var series = this,
@@ -42593,7 +42694,8 @@
42593
42694
  !series.chart.options.chart.ignoreHiddenSeries) &&
42594
42695
  yAxis.len === otherYAxis.len &&
42595
42696
  yAxis.pos === otherYAxis.pos) { // #642, #2086
42596
- if (otherOptions.stacking && otherOptions.stacking !== 'group') {
42697
+ if (otherOptions.stacking &&
42698
+ otherOptions.stacking !== 'group') {
42597
42699
  stackKey = otherSeries.stackKey;
42598
42700
  if (typeof stackGroups[stackKey] ===
42599
42701
  'undefined') {
@@ -42703,32 +42805,34 @@
42703
42805
  var _this = this;
42704
42806
  var stacking = this.options.stacking;
42705
42807
  if (!point.isNull && metrics.columnCount > 1) {
42706
- var indexInCategory_1 = 0;
42707
- var totalInCategory_1 = 0;
42708
- // Loop over all the stacks on the Y axis. When stacking is
42709
- // enabled, these are real point stacks. When stacking is not
42710
- // enabled, but `centerInCategory` is true, there is one stack
42711
- // handling the grouping of points in each category. This is
42712
- // done in the `setGroupedPoints` function.
42808
+ var reversedStacks_1 = this.yAxis.options.reversedStacks;
42809
+ var indexInCategory_1 = 0,
42810
+ totalInCategory_1 = reversedStacks_1 ? 0 : -metrics.columnCount;
42811
+ // Loop over all the stacks on the Y axis. When stacking is enabled,
42812
+ // these are real point stacks. When stacking is not enabled, but
42813
+ // `centerInCategory` is true, there is one stack handling the
42814
+ // grouping of points in each category. This is done in the
42815
+ // `setGroupedPoints` function.
42713
42816
  objectEach(this.yAxis.stacking && this.yAxis.stacking.stacks, function (stack) {
42714
42817
  if (typeof point.x === 'number') {
42715
42818
  var stackItem = stack[point.x.toString()];
42716
42819
  if (stackItem) {
42717
42820
  var pointValues = stackItem.points[_this.index],
42718
42821
  total = stackItem.total;
42719
- // If true `stacking` is enabled, count the
42720
- // total number of non-null stacks in the
42721
- // category, and note which index this point is
42722
- // within those stacks.
42822
+ // If true `stacking` is enabled, count the total
42823
+ // number of non-null stacks in the category, and
42824
+ // note which index this point is within those
42825
+ // stacks.
42723
42826
  if (stacking) {
42724
42827
  if (pointValues) {
42725
42828
  indexInCategory_1 = totalInCategory_1;
42726
42829
  }
42727
42830
  if (stackItem.hasValidPoints) {
42728
- totalInCategory_1++;
42831
+ reversedStacks_1 ? // #16169
42832
+ totalInCategory_1++ : totalInCategory_1--;
42729
42833
  }
42730
- // If `stacking` is not enabled, look for the
42731
- // index and total of the `group` stack.
42834
+ // If `stacking` is not enabled, look for the index
42835
+ // and total of the `group` stack.
42732
42836
  }
42733
42837
  else if (isArray(pointValues)) {
42734
42838
  indexInCategory_1 = pointValues[1];
@@ -43931,8 +44035,10 @@
43931
44035
  // Merge in series options for the point.
43932
44036
  // @note dataLabelAttribs (like pointAttribs) would eradicate
43933
44037
  // the need for dlOptions, and simplify the section below.
43934
- pointOptions = splat(mergeArrays(seriesDlOptions, point.dlOptions || // dlOptions is used in treemaps
43935
- (point.options && point.options.dataLabels)));
44038
+ pointOptions = splat(mergeArrays(seriesDlOptions,
44039
+ // dlOptions is used in treemaps
44040
+ (point.dlOptions ||
44041
+ (point.options && point.options.dataLabels))));
43936
44042
  // Handle each individual data label for this point
43937
44043
  pointOptions.forEach(function (labelOptions, i) {
43938
44044
  // Options for one datalabel
@@ -43950,11 +44056,11 @@
43950
44056
  style,
43951
44057
  rotation,
43952
44058
  attr,
43953
- dataLabel = point.dataLabels ? point.dataLabels[i] :
43954
- point.dataLabel;
43955
- var labelDistance = pick(labelOptions.distance,
43956
- point.labelDistance),
44059
+ dataLabel = point.dataLabels ?
44060
+ point.dataLabels[i] : point.dataLabel,
43957
44061
  isNew = !dataLabel;
44062
+ var labelDistance = pick(labelOptions.distance,
44063
+ point.labelDistance);
43958
44064
  if (labelEnabled) {
43959
44065
  // Create individual options structure that can be
43960
44066
  // extended without affecting others
@@ -44006,8 +44112,18 @@
44006
44112
  }
44007
44113
  // If the point is outside the plot area, destroy it. #678,
44008
44114
  // #820
44009
- if (dataLabel && (!labelEnabled || !defined(labelText))) {
44010
- point.dataLabel =
44115
+ if (dataLabel && (!labelEnabled ||
44116
+ !defined(labelText) ||
44117
+ !!dataLabel.div !== !!labelOptions.useHTML ||
44118
+ (
44119
+ // Change from no rotation to rotation and
44120
+ // vice versa. Don't use defined() because
44121
+ // rotation = 0 means also rotation = undefined
44122
+ (!dataLabel.rotation ||
44123
+ !labelOptions.rotation) &&
44124
+ dataLabel.rotation !== labelOptions.rotation))) {
44125
+ isNew = true;
44126
+ point.dataLabel = dataLabel =
44011
44127
  point.dataLabel && point.dataLabel.destroy();
44012
44128
  if (point.dataLabels) {
44013
44129
  // Remove point.dataLabels if this was the last one
@@ -44034,11 +44150,11 @@
44034
44150
  }
44035
44151
  }
44036
44152
  }
44037
- // Individual labels are disabled if the are explicitly
44038
- // disabled in the point options, or if they fall outside
44039
- // the plot area.
44040
44153
  }
44041
- else if (labelEnabled && defined(labelText)) {
44154
+ // Individual labels are disabled if the are explicitly
44155
+ // disabled in the point options, or if they fall outside
44156
+ // the plot area.
44157
+ if (labelEnabled && defined(labelText)) {
44042
44158
  if (!dataLabel) {
44043
44159
  // Create new label element
44044
44160
  point.dataLabels = point.dataLabels || [];
@@ -44052,7 +44168,8 @@
44052
44168
  if (!i) {
44053
44169
  point.dataLabel = dataLabel;
44054
44170
  }
44055
- dataLabel.addClass(' highcharts-data-label-color-' + point.colorIndex +
44171
+ dataLabel.addClass(' highcharts-data-label-color-' +
44172
+ point.colorIndex +
44056
44173
  ' ' + (labelOptions.className || '') +
44057
44174
  ( // #3398
44058
44175
  labelOptions.useHTML ?
@@ -44080,7 +44197,7 @@
44080
44197
  if (point.dataLabelPath &&
44081
44198
  !labelOptions.textPath.enabled) {
44082
44199
  // clean the DOM
44083
- point.dataLabelPath = point.dataLabelPath.destroy();
44200
+ point.dataLabelPath = (point.dataLabelPath.destroy());
44084
44201
  }
44085
44202
  }
44086
44203
  // Now the data label is created and placed at 0,0, so
@@ -44759,7 +44876,7 @@
44759
44876
  *
44760
44877
  * @type {boolean}
44761
44878
  * @default false
44762
- * @product highcharts highstock
44879
+ * @product highcharts highstock highmaps
44763
44880
  * @apioption plotOptions.scatter.stickyTracking
44764
44881
  */
44765
44882
  /**
@@ -45149,12 +45266,19 @@
45149
45266
  return isNumber(this.y) && this.y >= 0;
45150
45267
  };
45151
45268
  /**
45152
- * Toggle the visibility of the pie slice.
45153
- * @private
45269
+ * Toggle the visibility of a pie slice or other data point. Note that this
45270
+ * method is available only for some series, like pie, treemap and sunburst.
45271
+ *
45272
+ * @function Highcharts.Point#setVisible
45273
+ *
45274
+ * @param {boolean} [vis]
45275
+ * True to show the pie slice or other data point, false to hide. If
45276
+ * undefined, the visibility is toggled.
45277
+ *
45278
+ * @param {boolean} [redraw] Whether to redraw the chart after the point is
45279
+ * altered. If doing more operations on the chart, it is a good idea to set
45280
+ * redraw to false and call {@link Chart#redraw|chart.redraw()} after.
45154
45281
  *
45155
- * @param {boolean} vis
45156
- * Whether to show the slice or not. If undefined, the visibility is
45157
- * toggled.
45158
45282
  */
45159
45283
  PiePoint.prototype.setVisible = function (vis, redraw) {
45160
45284
  var _this = this;
@@ -45200,10 +45324,10 @@
45200
45324
  * @param {boolean} sliced
45201
45325
  * When undefined, the slice state is toggled.
45202
45326
  *
45203
- * @param {boolean} redraw
45327
+ * @param {boolean} [redraw]
45204
45328
  * Whether to redraw the chart. True by default.
45205
45329
  *
45206
- * @param {boolean|Partial<Highcharts.AnimationOptionsObject>}
45330
+ * @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animation]
45207
45331
  * Animation options.
45208
45332
  */
45209
45333
  PiePoint.prototype.slice = function (sliced, redraw, animation) {
@@ -46279,7 +46403,7 @@
46279
46403
  */
46280
46404
  borderWidth: 1,
46281
46405
  /**
46282
- * @ignore-options
46406
+ * @ignore-option
46283
46407
  * @private
46284
46408
  */
46285
46409
  lineWidth: void 0,
@@ -47057,7 +47181,8 @@
47057
47181
  if (alignValue) {
47058
47182
  xOffset = +alignValue * boxWidth;
47059
47183
  }
47060
- else if (isNumber(label.x) && Math.round(label.x) !== label.translateX) {
47184
+ else if (isNumber(label.x) &&
47185
+ Math.round(label.x) !== label.translateX) {
47061
47186
  xOffset = label.x - label.translateX;
47062
47187
  }
47063
47188
  return {
@@ -47119,10 +47244,11 @@
47119
47244
  * @private
47120
47245
  * @function hideOrShow
47121
47246
  * @param {Highcharts.SVGElement} label
47122
- * The label.
47247
+ * The label.
47123
47248
  * @param {Highcharts.Chart} chart
47124
- * The chart that contains the label.
47249
+ * The chart that contains the label.
47125
47250
  * @return {boolean}
47251
+ * Whether label is affected
47126
47252
  */
47127
47253
  function hideOrShow(label, chart) {
47128
47254
  var complete,
@@ -47131,13 +47257,15 @@
47131
47257
  if (label) {
47132
47258
  newOpacity = label.newOpacity;
47133
47259
  if (label.oldOpacity !== newOpacity) {
47134
- // Make sure the label is completely hidden to avoid catching
47135
- // clicks (#4362)
47260
+ // Make sure the label is completely hidden to avoid catching clicks
47261
+ // (#4362)
47136
47262
  if (label.alignAttr && label.placed) { // data labels
47137
47263
  label[newOpacity ? 'removeClass' : 'addClass']('highcharts-data-label-hidden');
47138
47264
  complete = function () {
47139
47265
  if (!chart.styledMode) {
47140
- label.css({ pointerEvents: newOpacity ? 'auto' : 'none' });
47266
+ label.css({
47267
+ pointerEvents: newOpacity ? 'auto' : 'none'
47268
+ });
47141
47269
  }
47142
47270
  };
47143
47271
  isLabelAffected = true;
@@ -47299,8 +47427,7 @@
47299
47427
  fn = condition.callback || function () {
47300
47428
  return (this.chartWidth <= pick(condition.maxWidth,
47301
47429
  Number.MAX_VALUE) &&
47302
- this.chartHeight <=
47303
- pick(condition.maxHeight,
47430
+ this.chartHeight <= pick(condition.maxHeight,
47304
47431
  Number.MAX_VALUE) &&
47305
47432
  this.chartWidth >= pick(condition.minWidth, 0) &&
47306
47433
  this.chartHeight >= pick(condition.minHeight, 0));
@@ -47343,7 +47470,7 @@
47343
47470
  mergedOptions.isResponsiveOptions = true;
47344
47471
  // Stringified key for the rules that currently apply.
47345
47472
  ruleIds = (ruleIds.toString() || void 0);
47346
- var currentRuleIds = currentResponsive && currentResponsive.ruleIds;
47473
+ var currentRuleIds = (currentResponsive && currentResponsive.ruleIds);
47347
47474
  // Changes in what rules apply
47348
47475
  if (ruleIds !== currentRuleIds) {
47349
47476
  // Undo previous rules. Before we apply a new set of rules, we