highcharts 10.0.0 → 10.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (942) hide show
  1. package/bower.json +1 -1
  2. package/css/highcharts.css +10 -20
  3. package/css/themes/dark-unica.css +10 -20
  4. package/css/themes/grid-light.css +10 -20
  5. package/css/themes/sand-signika.css +10 -20
  6. package/es-modules/Accessibility/A11yI18n.js +4 -4
  7. package/es-modules/Accessibility/Accessibility.js +8 -3
  8. package/es-modules/Accessibility/Components/AnnotationsA11y.js +3 -3
  9. package/es-modules/Accessibility/Components/ContainerComponent.js +11 -10
  10. package/es-modules/Accessibility/Components/InfoRegionsComponent.js +18 -11
  11. package/es-modules/Accessibility/Components/LegendComponent.js +11 -11
  12. package/es-modules/Accessibility/Components/MenuComponent.js +3 -1
  13. package/es-modules/Accessibility/Components/RangeSelectorComponent.js +3 -1
  14. package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +3 -1
  15. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +34 -17
  16. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +35 -10
  17. package/es-modules/Accessibility/Components/ZoomComponent.js +30 -70
  18. package/es-modules/Accessibility/FocusBorder.js +6 -5
  19. package/es-modules/Accessibility/HighContrastMode.js +1 -1
  20. package/es-modules/Accessibility/KeyboardNavigation.js +2 -2
  21. package/es-modules/Accessibility/Options/{Options.js → A11yDefaults.js} +73 -5
  22. package/es-modules/Accessibility/Options/DeprecatedOptions.js +12 -2
  23. package/es-modules/Accessibility/Options/{LangOptions.js → LangDefaults.js} +46 -31
  24. package/es-modules/Accessibility/Utils/ChartUtilities.js +10 -5
  25. package/es-modules/Core/Animation/Fx.js +1 -1
  26. package/es-modules/Core/Axis/Axis.js +51 -46
  27. package/es-modules/Core/Axis/Axis3D.js +1 -1
  28. package/es-modules/Core/Axis/AxisDefaults.js +9 -9
  29. package/es-modules/Core/Axis/BrokenAxis.js +1 -1
  30. package/es-modules/Core/Axis/Color/ColorAxis.js +4 -2
  31. package/es-modules/Core/Axis/Color/ColorAxisDefaults.js +7 -3
  32. package/es-modules/Core/Axis/DateTimeAxis.js +5 -3
  33. package/es-modules/Core/Axis/GridAxis.js +821 -822
  34. package/es-modules/Core/Axis/LogarithmicAxis.js +1 -1
  35. package/es-modules/Core/Axis/NavigatorAxis.js +2 -2
  36. package/es-modules/Core/Axis/OrdinalAxis.js +26 -3
  37. package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +3 -3
  38. package/es-modules/Core/Axis/RadialAxis.js +1 -1
  39. package/es-modules/Core/Axis/Stacking/StackItem.js +262 -0
  40. package/es-modules/Core/Axis/Stacking/StackingAxis.js +468 -0
  41. package/es-modules/Core/Axis/Tick.js +22 -18
  42. package/es-modules/Core/Axis/TreeGrid/TreeGridAxis.js +732 -0
  43. package/es-modules/Core/Axis/TreeGrid/TreeGridTick.js +313 -0
  44. package/es-modules/Core/Axis/WaterfallAxis.js +1 -1
  45. package/es-modules/Core/Axis/ZAxis.js +76 -71
  46. package/es-modules/Core/Chart/Chart.js +42 -9
  47. package/es-modules/Core/Chart/Chart3D.js +2 -2
  48. package/es-modules/Core/Chart/ChartDefaults.js +165 -5
  49. package/es-modules/Core/Chart/GanttChart.js +3 -1
  50. package/es-modules/Core/Chart/MapChart.js +3 -1
  51. package/es-modules/Core/Chart/StockChart.js +12 -8
  52. package/es-modules/Core/Color/Color.js +1 -1
  53. package/es-modules/Core/DefaultOptions.js +19 -16
  54. package/es-modules/Core/Geometry/CircleUtilities.js +4 -4
  55. package/es-modules/Core/Globals.js +2 -1
  56. package/es-modules/Core/HttpUtilities.js +39 -37
  57. package/es-modules/Core/Legend/Legend.js +4 -4
  58. package/es-modules/Core/MSPointer.js +3 -1
  59. package/es-modules/{Extensions → Core}/Math3D.js +48 -43
  60. package/es-modules/Core/Navigator.js +31 -14
  61. package/es-modules/Core/Pointer.js +8 -10
  62. package/es-modules/Core/Renderer/HTML/AST.js +13 -7
  63. package/es-modules/Core/Renderer/HTML/HTMLElement.js +3 -1
  64. package/es-modules/Core/Renderer/HTML/HTMLRenderer.js +3 -1
  65. package/es-modules/Core/Renderer/SVG/SVGElement.js +132 -192
  66. package/es-modules/Core/Renderer/SVG/SVGLabel.js +32 -28
  67. package/es-modules/Core/Renderer/SVG/SVGRenderer.js +50 -45
  68. package/es-modules/Core/Renderer/SVG/SVGRenderer3D.js +5 -3
  69. package/es-modules/Core/Renderer/SVG/TextBuilder.js +5 -3
  70. package/es-modules/Core/Scrollbar.js +12 -6
  71. package/es-modules/Core/ScrollbarDefaults.js +8 -8
  72. package/es-modules/Core/Series/DataLabel.js +63 -40
  73. package/es-modules/Core/Series/Point.js +11 -2
  74. package/es-modules/Core/Series/Series.js +60 -43
  75. package/es-modules/Core/Series/Series3D.js +4 -2
  76. package/es-modules/Core/Series/SeriesDefaults.js +11 -6
  77. package/es-modules/Core/Series/SeriesRegistry.js +6 -29
  78. package/es-modules/Core/Time.js +6 -7
  79. package/es-modules/Core/Tooltip.js +17 -6
  80. package/es-modules/Core/Utilities.js +7 -9
  81. package/es-modules/Data/DataConverter.js +6 -1
  82. package/es-modules/Data/DataPromise.js +1 -1
  83. package/es-modules/Data/DataSeriesComposition.js +288 -0
  84. package/es-modules/Data/DataSeriesConverter.js +1 -1
  85. package/es-modules/Data/DataTable.js +14 -12
  86. package/es-modules/Data/Modifiers/ChainModifier.js +4 -2
  87. package/es-modules/Data/Modifiers/DataModifier.js +1 -1
  88. package/es-modules/Data/Modifiers/GroupModifier.js +4 -2
  89. package/es-modules/Data/Modifiers/InvertModifier.js +10 -8
  90. package/es-modules/Data/Modifiers/RangeModifier.js +4 -2
  91. package/es-modules/Data/Modifiers/SeriesPointsModifier.js +4 -2
  92. package/es-modules/Data/Modifiers/SortModifier.js +4 -2
  93. package/es-modules/Data/Parsers/CSVParser.js +3 -1
  94. package/es-modules/Data/Parsers/DataParser.js +2 -2
  95. package/es-modules/Data/Parsers/GoogleSheetsParser.js +3 -2
  96. package/es-modules/Data/Parsers/HTMLTableParser.js +3 -1
  97. package/es-modules/Data/Stores/CSVStore.js +8 -5
  98. package/es-modules/Data/Stores/DataStore.js +1 -1
  99. package/es-modules/Data/Stores/GoogleSheetsStore.js +3 -1
  100. package/es-modules/Data/Stores/HTMLTableStore.js +3 -1
  101. package/es-modules/Extensions/Annotations/Annotation.js +652 -0
  102. package/es-modules/Extensions/Annotations/AnnotationChart.js +291 -0
  103. package/es-modules/Extensions/Annotations/AnnotationDefaults.js +624 -0
  104. package/es-modules/Extensions/Annotations/ControlPoint.js +89 -64
  105. package/es-modules/Extensions/Annotations/{Mixins/ControllableMixin.js → Controllables/Controllable.js} +300 -241
  106. package/es-modules/Extensions/Annotations/Controllables/ControllableCircle.js +63 -50
  107. package/es-modules/Extensions/Annotations/Controllables/ControllableDefaults.js +95 -0
  108. package/es-modules/Extensions/Annotations/Controllables/ControllableEllipse.js +95 -63
  109. package/es-modules/Extensions/Annotations/Controllables/ControllableImage.js +50 -44
  110. package/es-modules/Extensions/Annotations/Controllables/ControllableLabel.js +95 -78
  111. package/es-modules/Extensions/Annotations/Controllables/ControllablePath.js +167 -51
  112. package/es-modules/Extensions/Annotations/Controllables/ControllableRect.js +53 -52
  113. package/es-modules/Extensions/Annotations/{Mixins/EventEmitterMixin.js → EventEmitter.js} +136 -116
  114. package/es-modules/Extensions/Annotations/MockPoint.js +210 -145
  115. package/es-modules/Extensions/Annotations/NavigationBindings.js +272 -663
  116. package/es-modules/Extensions/Annotations/NavigationBindingsDefaults.js +396 -0
  117. package/es-modules/Extensions/Annotations/NavigationBindingsUtilities.js +98 -0
  118. package/es-modules/Extensions/Annotations/Popup/Popup.js +295 -0
  119. package/es-modules/Extensions/Annotations/Popup/PopupAnnotations.js +177 -0
  120. package/es-modules/Extensions/Annotations/Popup/PopupComposition.js +81 -0
  121. package/es-modules/Extensions/Annotations/Popup/PopupIndicators.js +609 -0
  122. package/es-modules/Extensions/Annotations/Popup/PopupTabs.js +134 -0
  123. package/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +23 -23
  124. package/es-modules/Extensions/Annotations/Types/CrookedLine.js +15 -21
  125. package/es-modules/Extensions/Annotations/Types/ElliottWave.js +14 -12
  126. package/es-modules/Extensions/Annotations/Types/Fibonacci.js +33 -23
  127. package/es-modules/Extensions/Annotations/Types/FibonacciTimeZones.js +67 -65
  128. package/es-modules/Extensions/Annotations/Types/InfinityLine.js +14 -21
  129. package/es-modules/Extensions/Annotations/Types/Measure.js +259 -251
  130. package/es-modules/Extensions/Annotations/Types/Pitchfork.js +15 -19
  131. package/es-modules/Extensions/Annotations/Types/TimeCycles.js +24 -19
  132. package/es-modules/Extensions/Annotations/Types/Tunnel.js +17 -15
  133. package/es-modules/Extensions/Annotations/Types/VerticalLine.js +15 -17
  134. package/es-modules/Extensions/Boost/Boost.js +320 -15
  135. package/es-modules/Extensions/Boost/BoostChart.js +245 -0
  136. package/es-modules/Extensions/Boost/BoostSeries.js +927 -0
  137. package/es-modules/Extensions/Boost/BoostableMap.js +21 -5
  138. package/es-modules/Extensions/Boost/Boostables.js +13 -2
  139. package/es-modules/Extensions/Boost/NamedColors.js +15 -6
  140. package/es-modules/Extensions/Boost/WGLDrawMode.js +36 -0
  141. package/es-modules/Extensions/Boost/WGLRenderer.js +288 -295
  142. package/es-modules/Extensions/Boost/WGLShader.js +370 -376
  143. package/es-modules/Extensions/Boost/WGLVertexBuffer.js +192 -0
  144. package/es-modules/Extensions/BoostCanvas.js +70 -48
  145. package/es-modules/Extensions/Breadcrumbs.js +37 -9
  146. package/es-modules/Extensions/CurrentDateIndication.js +1 -1
  147. package/es-modules/Extensions/Data.js +638 -602
  148. package/es-modules/Extensions/DataGrouping.js +68 -28
  149. package/es-modules/Extensions/Debugger/Debugger.js +60 -22
  150. package/es-modules/Extensions/Debugger/ErrorMessages.js +4 -0
  151. package/es-modules/Extensions/DownloadURL.js +3 -3
  152. package/es-modules/Extensions/DragPanes.js +1 -1
  153. package/es-modules/Extensions/DraggablePoints.js +4 -3
  154. package/es-modules/Extensions/Drilldown.js +15 -14
  155. package/es-modules/Extensions/{ExportData.js → ExportData/ExportData.js} +358 -498
  156. package/es-modules/Extensions/ExportData/ExportDataDefaults.js +272 -0
  157. package/es-modules/Extensions/Exporting/Exporting.js +30 -17
  158. package/es-modules/Extensions/Exporting/ExportingDefaults.js +10 -8
  159. package/es-modules/Extensions/Exporting/Fullscreen.js +352 -0
  160. package/es-modules/Extensions/GeoJSON.js +3 -4
  161. package/es-modules/Extensions/MarkerClusters.js +5 -3
  162. package/es-modules/Extensions/NoDataToDisplay.js +1 -1
  163. package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
  164. package/es-modules/Extensions/Oldie/Oldie.js +2 -2
  165. package/es-modules/Extensions/OverlappingDataLabels.js +5 -4
  166. package/es-modules/Extensions/Pane.js +3 -3
  167. package/es-modules/Extensions/ParallelCoordinates.js +12 -8
  168. package/es-modules/Extensions/PatternFill.js +14 -2
  169. package/es-modules/Extensions/RangeSelector.js +29 -18
  170. package/es-modules/Extensions/ScrollablePlotArea.js +4 -4
  171. package/es-modules/Extensions/{SeriesLabel.js → SeriesLabel/SeriesLabel.js} +264 -386
  172. package/es-modules/Extensions/SeriesLabel/SeriesLabelDefaults.js +124 -0
  173. package/es-modules/Extensions/SeriesLabel/SeriesLabelUtilities.js +67 -0
  174. package/es-modules/Extensions/Sonification/ChartSonify.js +1 -1
  175. package/es-modules/Extensions/Sonification/Earcon.js +1 -1
  176. package/es-modules/Extensions/Themes/HighContrastDark.js +10 -10
  177. package/es-modules/Extensions/Themes/HighContrastLight.js +9 -9
  178. package/es-modules/Maps/MapNavigation.js +3 -7
  179. package/es-modules/Maps/MapPointer.js +1 -1
  180. package/es-modules/Maps/MapView.js +31 -19
  181. package/es-modules/Maps/MapViewInsetsOptionsDefault.js +1 -1
  182. package/es-modules/Maps/MapViewOptionsDefault.js +3 -1
  183. package/es-modules/Maps/Projection.js +13 -11
  184. package/es-modules/Series/ArcDiagram/ArcDiagramPoint.js +3 -1
  185. package/es-modules/Series/ArcDiagram/ArcDiagramSeries.js +12 -2
  186. package/es-modules/Series/Area/AreaSeries.js +21 -14
  187. package/es-modules/Series/{Area3DSeries.js → Area3D/Area3DSeries.js} +42 -20
  188. package/es-modules/Series/AreaRange/AreaRangePoint.js +24 -11
  189. package/es-modules/Series/AreaRange/AreaRangeSeries.js +162 -149
  190. package/es-modules/Series/AreaSpline/AreaSplineSeries.js +45 -41
  191. package/es-modules/Series/AreaSplineRange/AreaSplineRangeSeries.js +43 -43
  192. package/es-modules/Series/Bar/BarSeries.js +3 -1
  193. package/es-modules/Series/Bellcurve/BellcurveSeries.js +3 -1
  194. package/es-modules/Series/BoxPlot/BoxPlotSeries.js +4 -2
  195. package/es-modules/Series/Bubble/BubbleLegendComposition.js +223 -231
  196. package/es-modules/Series/Bubble/BubbleLegendDefaults.js +1 -1
  197. package/es-modules/Series/Bubble/BubbleLegendItem.js +46 -45
  198. package/es-modules/Series/Bubble/BubblePoint.js +3 -1
  199. package/es-modules/Series/Bubble/BubbleSeries.js +96 -68
  200. package/es-modules/Series/Bullet/BulletPoint.js +3 -1
  201. package/es-modules/Series/Bullet/BulletSeries.js +4 -3
  202. package/es-modules/Series/Candlestick/CandlestickSeries.js +5 -3
  203. package/es-modules/Series/CenteredUtilities.js +8 -2
  204. package/es-modules/Series/ColorMapComposition.js +111 -0
  205. package/es-modules/Series/Column/ColumnSeries.js +8 -4
  206. package/es-modules/Series/Column3D/Column3DComposition.js +2 -2
  207. package/es-modules/Series/ColumnPyramid/ColumnPyramidSeries.js +4 -2
  208. package/es-modules/Series/ColumnRange/ColumnRangePoint.js +17 -13
  209. package/es-modules/Series/ColumnRange/ColumnRangeSeries.js +60 -57
  210. package/es-modules/Series/Cylinder/CylinderComposition.js +1 -1
  211. package/es-modules/Series/Cylinder/CylinderPoint.js +3 -1
  212. package/es-modules/Series/Cylinder/CylinderSeries.js +3 -1
  213. package/es-modules/Series/DependencyWheel/DependencyWheelPoint.js +27 -12
  214. package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +19 -3
  215. package/es-modules/Series/DotPlot/DotPlotSeries.js +3 -1
  216. package/es-modules/Series/DragNodesComposition.js +166 -0
  217. package/es-modules/Series/DrawPointUtilities.js +87 -0
  218. package/es-modules/Series/Dumbbell/DumbbellPoint.js +3 -1
  219. package/es-modules/Series/Dumbbell/DumbbellSeries.js +4 -2
  220. package/es-modules/Series/ErrorBar/ErrorBarSeries.js +4 -2
  221. package/es-modules/Series/Flags/FlagsPoint.js +4 -1
  222. package/es-modules/Series/Flags/FlagsSeries.js +13 -16
  223. package/es-modules/Series/Funnel/FunnelSeries.js +5 -3
  224. package/es-modules/Series/Funnel3D/Funnel3DPoint.js +3 -1
  225. package/es-modules/Series/Funnel3D/Funnel3DSeries.js +4 -2
  226. package/es-modules/Series/Gantt/GanttPoint.js +3 -1
  227. package/es-modules/Series/Gantt/GanttSeries.js +4 -2
  228. package/es-modules/Series/Gauge/GaugePoint.js +3 -1
  229. package/es-modules/Series/Gauge/GaugeSeries.js +196 -174
  230. package/es-modules/Series/GraphLayoutComposition.js +130 -0
  231. package/es-modules/Series/HLC/HLCPoint.js +3 -1
  232. package/es-modules/Series/HLC/HLCSeries.js +4 -2
  233. package/es-modules/Series/Heatmap/HeatmapPoint.js +7 -5
  234. package/es-modules/Series/Heatmap/HeatmapSeries.js +34 -34
  235. package/es-modules/Series/HeikinAshi/HeikinAshiPoint.js +3 -1
  236. package/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +3 -1
  237. package/es-modules/Series/Histogram/HistogramSeries.js +3 -1
  238. package/es-modules/Series/HollowCandlestick/HollowCandlestickPoint.js +3 -1
  239. package/es-modules/Series/HollowCandlestick/HollowCandlestickSeries.js +11 -9
  240. package/es-modules/Series/Item/ItemPoint.js +3 -1
  241. package/es-modules/Series/Item/ItemSeries.js +3 -1
  242. package/es-modules/Series/Line/LineSeries.js +4 -2
  243. package/es-modules/Series/Lollipop/LollipopPoint.js +24 -12
  244. package/es-modules/Series/Lollipop/LollipopSeries.js +18 -11
  245. package/es-modules/Series/Map/MapPoint.js +8 -6
  246. package/es-modules/Series/Map/MapSeries.js +115 -28
  247. package/es-modules/Series/MapBubble/MapBubblePoint.js +18 -18
  248. package/es-modules/Series/MapBubble/MapBubbleSeries.js +69 -21
  249. package/es-modules/Series/MapLine/MapLineSeries.js +18 -1
  250. package/es-modules/Series/MapPoint/MapPointPoint.js +4 -2
  251. package/es-modules/Series/MapPoint/MapPointSeries.js +14 -2
  252. package/es-modules/Series/Networkgraph/EulerIntegration.js +199 -0
  253. package/es-modules/Series/Networkgraph/NetworkgraphPoint.js +290 -0
  254. package/es-modules/Series/Networkgraph/NetworkgraphSeries.js +401 -0
  255. package/es-modules/Series/Networkgraph/NetworkgraphSeriesDefaults.js +545 -0
  256. package/es-modules/Series/Networkgraph/QuadTree.js +66 -272
  257. package/es-modules/Series/Networkgraph/QuadTreeNode.js +271 -0
  258. package/es-modules/Series/Networkgraph/{Layouts.js → ReingoldFruchtermanLayout.js} +240 -259
  259. package/es-modules/Series/Networkgraph/VerletIntegration.js +193 -0
  260. package/es-modules/Series/NodesComposition.js +45 -40
  261. package/es-modules/Series/OHLC/OHLCPoint.js +3 -1
  262. package/es-modules/Series/OHLC/OHLCSeries.js +3 -1
  263. package/es-modules/Series/Organization/OrganizationPoint.js +3 -1
  264. package/es-modules/Series/Organization/OrganizationSeries.js +14 -4
  265. package/es-modules/Series/PackedBubble/PackedBubbleIntegration.js +81 -0
  266. package/es-modules/Series/PackedBubble/{PackedBubbleComposition.js → PackedBubbleLayout.js} +114 -79
  267. package/es-modules/Series/PackedBubble/PackedBubblePoint.js +5 -3
  268. package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +200 -571
  269. package/es-modules/Series/PackedBubble/PackedBubbleSeriesDefaults.js +394 -0
  270. package/es-modules/Series/ParetoSeries/ParetoSeries.js +3 -1
  271. package/es-modules/Series/Pie/PieDataLabel.js +4 -2
  272. package/es-modules/Series/Pie/PiePoint.js +3 -1
  273. package/es-modules/Series/Pie/PieSeries.js +54 -38
  274. package/es-modules/Series/Pie3D/Pie3DPoint.js +3 -1
  275. package/es-modules/Series/Pie3D/Pie3DSeries.js +3 -1
  276. package/es-modules/Series/PolarComposition.js +819 -0
  277. package/es-modules/Series/Polygon/PolygonSeries.js +3 -1
  278. package/es-modules/Series/Pyramid/PyramidSeries.js +3 -1
  279. package/es-modules/Series/Pyramid3D/Pyramid3DSeries.js +3 -1
  280. package/es-modules/Series/Sankey/SankeyPoint.js +3 -1
  281. package/es-modules/Series/Sankey/SankeySeries.js +38 -10
  282. package/es-modules/Series/Scatter/ScatterSeries.js +14 -6
  283. package/es-modules/Series/Scatter3D/Scatter3DPoint.js +3 -1
  284. package/es-modules/Series/Scatter3D/Scatter3DSeries.js +4 -2
  285. package/es-modules/Series/SeriesOnPointComposition.js +395 -0
  286. package/es-modules/Series/SolidGauge/SolidGaugeSeries.js +6 -4
  287. package/es-modules/Series/Spline/SplineSeries.js +13 -4
  288. package/es-modules/Series/Streamgraph/StreamgraphSeries.js +3 -1
  289. package/es-modules/Series/Sunburst/SunburstPoint.js +8 -9
  290. package/es-modules/Series/Sunburst/SunburstSeries.js +32 -5
  291. package/es-modules/Series/Tilemap/TilemapPoint.js +3 -1
  292. package/es-modules/Series/Tilemap/TilemapSeries.js +3 -1
  293. package/es-modules/Series/Timeline/TimelinePoint.js +3 -1
  294. package/es-modules/Series/Timeline/TimelineSeries.js +8 -4
  295. package/es-modules/Series/Treemap/TreemapPoint.js +8 -4
  296. package/es-modules/Series/Treemap/TreemapSeries.js +12 -10
  297. package/es-modules/Series/VariablePie/VariablePieSeries.js +3 -1
  298. package/es-modules/Series/Variwide/VariwidePoint.js +3 -1
  299. package/es-modules/Series/Variwide/VariwideSeries.js +3 -1
  300. package/es-modules/Series/Vector/VectorSeries.js +5 -5
  301. package/es-modules/Series/Venn/VennPoint.js +5 -5
  302. package/es-modules/Series/Venn/VennSeries.js +9 -6
  303. package/es-modules/Series/Waterfall/WaterfallPoint.js +3 -1
  304. package/es-modules/Series/Waterfall/WaterfallSeries.js +14 -12
  305. package/es-modules/Series/Windbarb/WindbarbPoint.js +3 -1
  306. package/es-modules/Series/Windbarb/WindbarbSeries.js +3 -1
  307. package/es-modules/Series/Wordcloud/WordcloudPoint.js +6 -6
  308. package/es-modules/Series/Wordcloud/WordcloudSeries.js +12 -9
  309. package/es-modules/Series/Wordcloud/WordcloudUtils.js +1 -1
  310. package/es-modules/Series/XRange/XRangePoint.js +57 -46
  311. package/es-modules/Series/XRange/XRangeSeries.js +124 -274
  312. package/es-modules/Series/XRange/XRangeSeriesDefaults.js +211 -0
  313. package/es-modules/Stock/Indicators/ABands/ABandsIndicator.js +13 -3
  314. package/es-modules/Stock/Indicators/AD/ADIndicator.js +8 -1
  315. package/es-modules/Stock/Indicators/AO/AOIndicator.js +27 -14
  316. package/es-modules/Stock/Indicators/APO/APOIndicator.js +9 -2
  317. package/es-modules/Stock/Indicators/ATR/ATRIndicator.js +19 -4
  318. package/es-modules/Stock/Indicators/Aroon/AroonIndicator.js +18 -3
  319. package/es-modules/Stock/Indicators/AroonOscillator/AroonOscillatorIndicator.js +9 -3
  320. package/es-modules/Stock/Indicators/BB/BBIndicator.js +11 -5
  321. package/es-modules/Stock/Indicators/CCI/CCIIndicator.js +19 -4
  322. package/es-modules/Stock/Indicators/CMF/CMFIndicator.js +23 -1
  323. package/es-modules/Stock/Indicators/CMO/CMOIndicator.js +18 -2
  324. package/es-modules/Stock/Indicators/Chaikin/ChaikinIndicator.js +10 -3
  325. package/es-modules/Stock/Indicators/DEMA/DEMAIndicator.js +28 -1
  326. package/es-modules/Stock/Indicators/DMI/DMIIndicator.js +18 -7
  327. package/es-modules/Stock/Indicators/DPO/DPOIndicator.js +22 -9
  328. package/es-modules/Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js +3 -1
  329. package/es-modules/Stock/Indicators/EMA/EMAIndicator.js +13 -1
  330. package/es-modules/Stock/Indicators/IKH/IKHIndicator.js +37 -16
  331. package/es-modules/Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js +28 -1
  332. package/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +15 -2
  333. package/es-modules/Stock/Indicators/LinearRegression/{LinearRegression.js → LinearRegressionIndicator.js} +14 -2
  334. package/es-modules/Stock/Indicators/LinearRegressionAngle/{LinearRegressionAngle.js → LinearRegressionAngleIndicator.js} +15 -8
  335. package/es-modules/Stock/Indicators/LinearRegressionIntercept/{LinearRegressionIntercept.js → LinearRegressionInterceptIndicator.js} +14 -2
  336. package/es-modules/Stock/Indicators/LinearRegressionSlopes/{LinearRegressionSlopes.js → LinearRegressionSlopesIndicator.js} +14 -2
  337. package/es-modules/Stock/Indicators/MACD/MACDIndicator.js +47 -23
  338. package/es-modules/Stock/Indicators/MFI/MFIIndicator.js +26 -11
  339. package/es-modules/Stock/Indicators/Momentum/MomentumIndicator.js +33 -3
  340. package/es-modules/Stock/Indicators/MultipleLinesComposition.js +85 -95
  341. package/es-modules/Stock/Indicators/NATR/NATRIndicator.js +19 -2
  342. package/es-modules/Stock/Indicators/OBV/OBVIndicator.js +13 -1
  343. package/es-modules/Stock/Indicators/PC/PCIndicator.js +16 -9
  344. package/es-modules/Stock/Indicators/PPO/PPOIndicator.js +17 -5
  345. package/es-modules/Stock/Indicators/PSAR/PSARIndicator.js +19 -4
  346. package/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +19 -7
  347. package/es-modules/Stock/Indicators/PivotPoints/PivotPointsPoint.js +19 -13
  348. package/es-modules/Stock/Indicators/PriceEnvelopes/PriceEnvelopesIndicator.js +28 -1
  349. package/es-modules/Stock/Indicators/ROC/ROCIndicator.js +18 -3
  350. package/es-modules/Stock/Indicators/RSI/RSIIndicator.js +23 -3
  351. package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +4 -2
  352. package/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +28 -1
  353. package/es-modules/Stock/Indicators/Stochastic/StochasticIndicator.js +18 -1
  354. package/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +23 -7
  355. package/es-modules/Stock/Indicators/TEMA/TEMAIndicator.js +3 -1
  356. package/es-modules/Stock/Indicators/TRIX/TRIXIndicator.js +28 -1
  357. package/es-modules/Stock/Indicators/TrendLine/TrendLineIndicator.js +17 -5
  358. package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +35 -4
  359. package/es-modules/Stock/Indicators/VBP/VBPPoint.js +9 -7
  360. package/es-modules/Stock/Indicators/VWAP/VWAPIndicator.js +14 -2
  361. package/es-modules/Stock/Indicators/WMA/WMAIndicator.js +33 -3
  362. package/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +13 -1
  363. package/es-modules/Stock/Indicators/Zigzag/ZigzagIndicator.js +14 -2
  364. package/es-modules/Stock/StockToolbar.js +568 -0
  365. package/es-modules/Stock/StockTools.js +256 -0
  366. package/es-modules/Stock/StockToolsBindings.js +140 -647
  367. package/es-modules/Stock/StockToolsDefaults.js +1190 -0
  368. package/es-modules/Stock/StockToolsGui.js +150 -1771
  369. package/es-modules/Stock/StockToolsUtilities.js +423 -0
  370. package/es-modules/masters/highcharts-3d.src.js +5 -4
  371. package/es-modules/masters/highcharts-gantt.src.js +1 -1
  372. package/es-modules/masters/highcharts-more.src.js +7 -6
  373. package/es-modules/masters/highcharts.src.js +5 -2
  374. package/es-modules/masters/highmaps.src.js +1 -1
  375. package/es-modules/masters/highstock.src.js +1 -1
  376. package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
  377. package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
  378. package/es-modules/masters/indicators/ao.src.js +1 -1
  379. package/es-modules/masters/indicators/apo.src.js +1 -1
  380. package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
  381. package/es-modules/masters/indicators/aroon.src.js +1 -1
  382. package/es-modules/masters/indicators/atr.src.js +1 -1
  383. package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
  384. package/es-modules/masters/indicators/cci.src.js +1 -1
  385. package/es-modules/masters/indicators/chaikin.src.js +1 -1
  386. package/es-modules/masters/indicators/cmf.src.js +1 -1
  387. package/es-modules/masters/indicators/cmo.src.js +1 -1
  388. package/es-modules/masters/indicators/dema.src.js +1 -1
  389. package/es-modules/masters/indicators/disparity-index.src.js +1 -1
  390. package/es-modules/masters/indicators/dmi.src.js +1 -1
  391. package/es-modules/masters/indicators/dpo.src.js +1 -1
  392. package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
  393. package/es-modules/masters/indicators/indicators-all.src.js +5 -7
  394. package/es-modules/masters/indicators/indicators.src.js +1 -1
  395. package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
  396. package/es-modules/masters/indicators/klinger.src.js +1 -1
  397. package/es-modules/masters/indicators/macd.src.js +1 -1
  398. package/es-modules/masters/indicators/mfi.src.js +1 -1
  399. package/es-modules/masters/indicators/momentum.src.js +1 -1
  400. package/es-modules/masters/indicators/natr.src.js +1 -1
  401. package/es-modules/masters/indicators/obv.src.js +1 -1
  402. package/es-modules/masters/indicators/pivot-points.src.js +1 -1
  403. package/es-modules/masters/indicators/ppo.src.js +1 -1
  404. package/es-modules/masters/indicators/price-channel.src.js +1 -1
  405. package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
  406. package/es-modules/masters/indicators/psar.src.js +1 -1
  407. package/es-modules/masters/indicators/regressions.src.js +5 -5
  408. package/es-modules/masters/indicators/roc.src.js +1 -1
  409. package/es-modules/masters/indicators/rsi.src.js +1 -1
  410. package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
  411. package/es-modules/masters/indicators/stochastic.src.js +1 -1
  412. package/es-modules/masters/indicators/supertrend.src.js +1 -1
  413. package/es-modules/masters/indicators/tema.src.js +1 -1
  414. package/es-modules/masters/indicators/trendline.src.js +1 -1
  415. package/es-modules/masters/indicators/trix.src.js +1 -1
  416. package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
  417. package/es-modules/masters/indicators/vwap.src.js +1 -1
  418. package/es-modules/masters/indicators/williams-r.src.js +1 -1
  419. package/es-modules/masters/indicators/wma.src.js +1 -1
  420. package/es-modules/masters/indicators/zigzag.src.js +1 -1
  421. package/es-modules/masters/modules/accessibility.src.js +1 -1
  422. package/es-modules/masters/modules/annotations-advanced.src.js +6 -4
  423. package/es-modules/masters/modules/annotations.src.js +6 -4
  424. package/es-modules/masters/modules/arc-diagram.src.js +1 -1
  425. package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
  426. package/es-modules/masters/modules/boost-canvas.src.js +1 -1
  427. package/es-modules/masters/modules/boost.src.js +6 -2
  428. package/es-modules/masters/modules/broken-axis.src.js +1 -1
  429. package/es-modules/masters/modules/bullet.src.js +1 -1
  430. package/es-modules/masters/modules/coloraxis.src.js +1 -1
  431. package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
  432. package/es-modules/masters/modules/cylinder.src.js +1 -1
  433. package/es-modules/masters/modules/data.src.js +2 -1
  434. package/es-modules/masters/modules/datagrouping.src.js +1 -1
  435. package/es-modules/masters/modules/debugger.src.js +5 -3
  436. package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
  437. package/es-modules/masters/modules/dotplot.src.js +1 -1
  438. package/es-modules/masters/modules/drag-panes.src.js +1 -1
  439. package/es-modules/masters/modules/draggable-points.src.js +1 -1
  440. package/es-modules/masters/modules/drilldown.src.js +1 -1
  441. package/es-modules/masters/modules/dumbbell.src.js +1 -1
  442. package/es-modules/masters/modules/export-data.src.js +5 -2
  443. package/es-modules/masters/modules/exporting.src.js +1 -2
  444. package/es-modules/masters/modules/full-screen.src.js +6 -2
  445. package/es-modules/masters/modules/funnel.src.js +1 -1
  446. package/es-modules/masters/modules/funnel3d.src.js +1 -1
  447. package/es-modules/masters/modules/gantt.src.js +3 -2
  448. package/es-modules/masters/modules/grid-axis.src.js +1 -1
  449. package/es-modules/masters/modules/heatmap.src.js +1 -1
  450. package/es-modules/masters/modules/heikinashi.src.js +1 -1
  451. package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
  452. package/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
  453. package/es-modules/masters/modules/item-series.src.js +1 -1
  454. package/es-modules/masters/modules/lollipop.src.js +1 -1
  455. package/es-modules/masters/modules/map.src.js +2 -2
  456. package/es-modules/masters/modules/marker-clusters.src.js +1 -1
  457. package/es-modules/masters/modules/networkgraph.src.js +5 -2
  458. package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
  459. package/es-modules/masters/modules/offline-exporting.src.js +1 -1
  460. package/es-modules/masters/modules/oldie-polyfills.src.js +1 -1
  461. package/es-modules/masters/modules/oldie.src.js +1 -1
  462. package/es-modules/masters/modules/organization.src.js +1 -1
  463. package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
  464. package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
  465. package/es-modules/masters/modules/pareto.src.js +1 -1
  466. package/es-modules/masters/modules/pathfinder.src.js +1 -1
  467. package/es-modules/masters/modules/pattern-fill.src.js +1 -1
  468. package/es-modules/masters/modules/price-indicator.src.js +1 -1
  469. package/es-modules/masters/modules/pyramid3d.src.js +1 -1
  470. package/es-modules/masters/modules/sankey.src.js +1 -1
  471. package/es-modules/masters/modules/series-label.src.js +5 -2
  472. package/es-modules/masters/modules/series-on-point.src.js +16 -0
  473. package/es-modules/masters/modules/solid-gauge.src.js +1 -1
  474. package/es-modules/masters/modules/sonification.src.js +2 -6
  475. package/es-modules/masters/modules/static-scale.src.js +1 -1
  476. package/es-modules/masters/modules/stock-tools.src.js +10 -3
  477. package/es-modules/masters/modules/stock.src.js +1 -1
  478. package/es-modules/masters/modules/streamgraph.src.js +1 -1
  479. package/es-modules/masters/modules/sunburst.src.js +1 -1
  480. package/es-modules/masters/modules/tilemap.src.js +1 -1
  481. package/es-modules/masters/modules/timeline.src.js +1 -1
  482. package/es-modules/masters/modules/treegrid.src.js +2 -2
  483. package/es-modules/masters/modules/treemap.src.js +1 -1
  484. package/es-modules/masters/modules/variable-pie.src.js +1 -1
  485. package/es-modules/masters/modules/variwide.src.js +1 -1
  486. package/es-modules/masters/modules/vector.src.js +1 -1
  487. package/es-modules/masters/modules/venn.src.js +1 -1
  488. package/es-modules/masters/modules/windbarb.src.js +1 -1
  489. package/es-modules/masters/modules/wordcloud.src.js +1 -1
  490. package/es-modules/masters/modules/xrange.src.js +5 -2
  491. package/es-modules/masters/themes/avocado.src.js +1 -1
  492. package/es-modules/masters/themes/brand-dark.src.js +1 -1
  493. package/es-modules/masters/themes/brand-light.src.js +1 -1
  494. package/es-modules/masters/themes/dark-blue.src.js +1 -1
  495. package/es-modules/masters/themes/dark-green.src.js +1 -1
  496. package/es-modules/masters/themes/dark-unica.src.js +1 -1
  497. package/es-modules/masters/themes/gray.src.js +1 -1
  498. package/es-modules/masters/themes/grid-light.src.js +1 -1
  499. package/es-modules/masters/themes/grid.src.js +1 -1
  500. package/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
  501. package/es-modules/masters/themes/high-contrast-light.src.js +1 -1
  502. package/es-modules/masters/themes/sand-signika.src.js +1 -1
  503. package/es-modules/masters/themes/skies.src.js +1 -1
  504. package/es-modules/masters/themes/sunset.src.js +1 -1
  505. package/highcharts-3d.js +98 -99
  506. package/highcharts-3d.js.map +1 -1
  507. package/highcharts-3d.src.js +233 -212
  508. package/highcharts-gantt.js +809 -805
  509. package/highcharts-gantt.js.map +1 -1
  510. package/highcharts-gantt.src.js +3817 -3470
  511. package/highcharts-more.d.ts +15 -8
  512. package/highcharts-more.js +201 -195
  513. package/highcharts-more.js.map +1 -1
  514. package/highcharts-more.src.d.ts +15 -8
  515. package/highcharts-more.src.js +7994 -7461
  516. package/highcharts.d.ts +11364 -1136
  517. package/highcharts.js +593 -591
  518. package/highcharts.js.map +1 -1
  519. package/highcharts.src.d.ts +11364 -1136
  520. package/highcharts.src.js +1408 -1117
  521. package/highmaps.js +762 -758
  522. package/highmaps.js.map +1 -1
  523. package/highmaps.src.js +2237 -1721
  524. package/highstock.js +796 -792
  525. package/highstock.js.map +1 -1
  526. package/highstock.src.js +1617 -1224
  527. package/indicators/acceleration-bands.d.ts +1 -17
  528. package/indicators/acceleration-bands.js +11 -12
  529. package/indicators/acceleration-bands.js.map +1 -1
  530. package/indicators/acceleration-bands.src.d.ts +1 -17
  531. package/indicators/acceleration-bands.src.js +99 -101
  532. package/indicators/accumulation-distribution.js +1 -1
  533. package/indicators/accumulation-distribution.js.map +1 -1
  534. package/indicators/accumulation-distribution.src.js +6 -1
  535. package/indicators/ao.js +6 -6
  536. package/indicators/ao.js.map +1 -1
  537. package/indicators/ao.src.js +25 -16
  538. package/indicators/apo.js +1 -1
  539. package/indicators/apo.js.map +1 -1
  540. package/indicators/apo.src.js +6 -1
  541. package/indicators/aroon-oscillator.d.ts +1 -17
  542. package/indicators/aroon-oscillator.js +10 -10
  543. package/indicators/aroon-oscillator.js.map +1 -1
  544. package/indicators/aroon-oscillator.src.d.ts +1 -17
  545. package/indicators/aroon-oscillator.src.js +95 -101
  546. package/indicators/aroon.d.ts +1 -17
  547. package/indicators/aroon.js +11 -11
  548. package/indicators/aroon.js.map +1 -1
  549. package/indicators/aroon.src.d.ts +1 -17
  550. package/indicators/aroon.src.js +104 -101
  551. package/indicators/atr.js +1 -1
  552. package/indicators/atr.js.map +1 -1
  553. package/indicators/atr.src.js +17 -4
  554. package/indicators/bollinger-bands.d.ts +1 -17
  555. package/indicators/bollinger-bands.js +11 -12
  556. package/indicators/bollinger-bands.js.map +1 -1
  557. package/indicators/bollinger-bands.src.d.ts +1 -17
  558. package/indicators/bollinger-bands.src.js +97 -103
  559. package/indicators/cci.js +1 -1
  560. package/indicators/cci.js.map +1 -1
  561. package/indicators/cci.src.js +17 -4
  562. package/indicators/chaikin.js +8 -8
  563. package/indicators/chaikin.js.map +1 -1
  564. package/indicators/chaikin.src.js +13 -5
  565. package/indicators/cmf.js +1 -1
  566. package/indicators/cmf.js.map +1 -1
  567. package/indicators/cmf.src.js +21 -1
  568. package/indicators/cmo.js +1 -1
  569. package/indicators/cmo.js.map +1 -1
  570. package/indicators/cmo.src.js +16 -2
  571. package/indicators/dema.js +1 -1
  572. package/indicators/dema.js.map +1 -1
  573. package/indicators/dema.src.js +26 -1
  574. package/indicators/disparity-index.js +1 -1
  575. package/indicators/disparity-index.src.js +1 -1
  576. package/indicators/dmi.js +12 -12
  577. package/indicators/dmi.js.map +1 -1
  578. package/indicators/dmi.src.js +104 -105
  579. package/indicators/dpo.js +1 -1
  580. package/indicators/dpo.js.map +1 -1
  581. package/indicators/dpo.src.js +20 -9
  582. package/indicators/ichimoku-kinko-hyo.js +1 -1
  583. package/indicators/ichimoku-kinko-hyo.js.map +1 -1
  584. package/indicators/ichimoku-kinko-hyo.src.js +35 -16
  585. package/indicators/indicators-all.d.ts +1 -17
  586. package/indicators/indicators-all.js +200 -199
  587. package/indicators/indicators-all.js.map +1 -1
  588. package/indicators/indicators-all.src.d.ts +1 -17
  589. package/indicators/indicators-all.src.js +882 -284
  590. package/indicators/indicators.js +1 -1
  591. package/indicators/indicators.js.map +1 -1
  592. package/indicators/indicators.src.js +12 -2
  593. package/indicators/keltner-channels.d.ts +1 -17
  594. package/indicators/keltner-channels.js +11 -12
  595. package/indicators/keltner-channels.js.map +1 -1
  596. package/indicators/keltner-channels.src.d.ts +1 -17
  597. package/indicators/keltner-channels.src.js +114 -99
  598. package/indicators/klinger.js +14 -14
  599. package/indicators/klinger.js.map +1 -1
  600. package/indicators/klinger.src.js +101 -102
  601. package/indicators/macd.js +10 -9
  602. package/indicators/macd.js.map +1 -1
  603. package/indicators/macd.src.js +46 -25
  604. package/indicators/mfi.js +1 -1
  605. package/indicators/mfi.js.map +1 -1
  606. package/indicators/mfi.src.js +24 -11
  607. package/indicators/momentum.js +1 -1
  608. package/indicators/momentum.js.map +1 -1
  609. package/indicators/momentum.src.js +31 -3
  610. package/indicators/natr.js +1 -1
  611. package/indicators/natr.js.map +1 -1
  612. package/indicators/natr.src.js +17 -3
  613. package/indicators/obv.js +1 -1
  614. package/indicators/obv.js.map +1 -1
  615. package/indicators/obv.src.js +11 -1
  616. package/indicators/pivot-points.js +1 -1
  617. package/indicators/pivot-points.js.map +1 -1
  618. package/indicators/pivot-points.src.js +32 -19
  619. package/indicators/ppo.js +1 -1
  620. package/indicators/ppo.js.map +1 -1
  621. package/indicators/ppo.src.js +15 -5
  622. package/indicators/price-channel.d.ts +1 -17
  623. package/indicators/price-channel.js +11 -11
  624. package/indicators/price-channel.js.map +1 -1
  625. package/indicators/price-channel.src.d.ts +1 -17
  626. package/indicators/price-channel.src.js +102 -107
  627. package/indicators/price-envelopes.js +1 -1
  628. package/indicators/price-envelopes.js.map +1 -1
  629. package/indicators/price-envelopes.src.js +26 -1
  630. package/indicators/psar.js +1 -1
  631. package/indicators/psar.js.map +1 -1
  632. package/indicators/psar.src.js +17 -4
  633. package/indicators/regressions.js +12 -11
  634. package/indicators/regressions.js.map +1 -1
  635. package/indicators/regressions.src.js +50 -15
  636. package/indicators/roc.js +1 -1
  637. package/indicators/roc.js.map +1 -1
  638. package/indicators/roc.src.js +16 -3
  639. package/indicators/rsi.js +1 -1
  640. package/indicators/rsi.js.map +1 -1
  641. package/indicators/rsi.src.js +21 -3
  642. package/indicators/slow-stochastic.js +1 -1
  643. package/indicators/slow-stochastic.js.map +1 -1
  644. package/indicators/slow-stochastic.src.js +26 -1
  645. package/indicators/stochastic.d.ts +1 -17
  646. package/indicators/stochastic.js +12 -12
  647. package/indicators/stochastic.js.map +1 -1
  648. package/indicators/stochastic.src.d.ts +1 -17
  649. package/indicators/stochastic.src.js +104 -99
  650. package/indicators/supertrend.js +7 -7
  651. package/indicators/supertrend.js.map +1 -1
  652. package/indicators/supertrend.src.js +21 -9
  653. package/indicators/tema.js +1 -1
  654. package/indicators/tema.src.js +1 -1
  655. package/indicators/trendline.js +1 -1
  656. package/indicators/trendline.js.map +1 -1
  657. package/indicators/trendline.src.js +15 -5
  658. package/indicators/trix.js +1 -1
  659. package/indicators/trix.js.map +1 -1
  660. package/indicators/trix.src.js +26 -1
  661. package/indicators/volume-by-price.js +17 -17
  662. package/indicators/volume-by-price.js.map +1 -1
  663. package/indicators/volume-by-price.src.js +38 -10
  664. package/indicators/vwap.js +1 -1
  665. package/indicators/vwap.js.map +1 -1
  666. package/indicators/vwap.src.js +12 -2
  667. package/indicators/williams-r.js +1 -1
  668. package/indicators/williams-r.js.map +1 -1
  669. package/indicators/williams-r.src.js +11 -1
  670. package/indicators/wma.js +1 -1
  671. package/indicators/wma.js.map +1 -1
  672. package/indicators/wma.src.js +31 -3
  673. package/indicators/zigzag.js +1 -1
  674. package/indicators/zigzag.js.map +1 -1
  675. package/indicators/zigzag.src.js +12 -2
  676. package/modules/accessibility.js +246 -242
  677. package/modules/accessibility.js.map +1 -1
  678. package/modules/accessibility.src.js +797 -664
  679. package/modules/annotations-advanced.d.ts +1 -1
  680. package/modules/annotations-advanced.js +193 -192
  681. package/modules/annotations-advanced.js.map +1 -1
  682. package/modules/annotations-advanced.src.d.ts +1 -1
  683. package/modules/annotations-advanced.src.js +9229 -8589
  684. package/modules/annotations.d.ts +1 -1
  685. package/modules/annotations.js +128 -126
  686. package/modules/annotations.js.map +1 -1
  687. package/modules/annotations.src.d.ts +1 -1
  688. package/modules/annotations.src.js +6190 -5528
  689. package/modules/arc-diagram.js +7 -7
  690. package/modules/arc-diagram.js.map +1 -1
  691. package/modules/arc-diagram.src.js +10 -2
  692. package/modules/arrow-symbols.js +1 -1
  693. package/modules/arrow-symbols.src.js +1 -1
  694. package/modules/boost-canvas.d.ts +19 -0
  695. package/modules/boost-canvas.js +81 -15
  696. package/modules/boost-canvas.js.map +1 -1
  697. package/modules/boost-canvas.src.d.ts +19 -0
  698. package/modules/boost-canvas.src.js +3342 -52
  699. package/modules/boost.d.ts +8 -26
  700. package/modules/boost.js +88 -80
  701. package/modules/boost.js.map +1 -1
  702. package/modules/boost.src.d.ts +8 -26
  703. package/modules/boost.src.js +2435 -1889
  704. package/modules/broken-axis.js +2 -2
  705. package/modules/broken-axis.js.map +1 -1
  706. package/modules/broken-axis.src.js +2 -2
  707. package/modules/bullet.js +1 -1
  708. package/modules/bullet.js.map +1 -1
  709. package/modules/bullet.src.js +2 -5
  710. package/modules/coloraxis.js +2 -2
  711. package/modules/coloraxis.js.map +1 -1
  712. package/modules/coloraxis.src.js +9 -5
  713. package/modules/current-date-indicator.js +1 -1
  714. package/modules/current-date-indicator.src.js +2 -2
  715. package/modules/cylinder.js +9 -9
  716. package/modules/cylinder.js.map +1 -1
  717. package/modules/cylinder.src.js +2 -2
  718. package/modules/data.d.ts +12 -12
  719. package/modules/data.js +33 -34
  720. package/modules/data.js.map +1 -1
  721. package/modules/data.src.d.ts +12 -12
  722. package/modules/data.src.js +862 -829
  723. package/modules/datagrouping.d.ts +22 -0
  724. package/modules/datagrouping.js +9 -9
  725. package/modules/datagrouping.js.map +1 -1
  726. package/modules/datagrouping.src.d.ts +22 -0
  727. package/modules/datagrouping.src.js +69 -29
  728. package/modules/debugger.js +8 -6
  729. package/modules/debugger.js.map +1 -1
  730. package/modules/debugger.src.js +85 -40
  731. package/modules/dependency-wheel.js +12 -12
  732. package/modules/dependency-wheel.js.map +1 -1
  733. package/modules/dependency-wheel.src.js +41 -14
  734. package/modules/dotplot.js +1 -1
  735. package/modules/dotplot.src.js +1 -1
  736. package/modules/drag-panes.js +1 -1
  737. package/modules/drag-panes.src.js +2 -2
  738. package/modules/draggable-points.js +5 -5
  739. package/modules/draggable-points.js.map +1 -1
  740. package/modules/draggable-points.src.js +5 -4
  741. package/modules/drilldown.d.ts +0 -10
  742. package/modules/drilldown.js +37 -37
  743. package/modules/drilldown.js.map +1 -1
  744. package/modules/drilldown.src.d.ts +0 -10
  745. package/modules/drilldown.src.js +59 -25
  746. package/modules/dumbbell.d.ts +4 -0
  747. package/modules/dumbbell.js +17 -17
  748. package/modules/dumbbell.js.map +1 -1
  749. package/modules/dumbbell.src.d.ts +4 -0
  750. package/modules/dumbbell.src.js +24 -12
  751. package/modules/export-data.js +25 -22
  752. package/modules/export-data.js.map +1 -1
  753. package/modules/export-data.src.js +641 -469
  754. package/modules/exporting.d.ts +8 -8
  755. package/modules/exporting.js +39 -39
  756. package/modules/exporting.js.map +1 -1
  757. package/modules/exporting.src.d.ts +8 -8
  758. package/modules/exporting.src.js +442 -319
  759. package/modules/full-screen.js +8 -8
  760. package/modules/full-screen.js.map +1 -1
  761. package/modules/full-screen.src.js +196 -78
  762. package/modules/funnel.js +1 -1
  763. package/modules/funnel.src.js +3 -3
  764. package/modules/funnel3d.js +2 -2
  765. package/modules/funnel3d.js.map +1 -1
  766. package/modules/funnel3d.src.js +2 -2
  767. package/modules/gantt.js +219 -217
  768. package/modules/gantt.js.map +1 -1
  769. package/modules/gantt.src.js +2420 -2364
  770. package/modules/grid-axis.js +23 -23
  771. package/modules/grid-axis.js.map +1 -1
  772. package/modules/grid-axis.src.js +890 -891
  773. package/modules/heatmap.js +40 -40
  774. package/modules/heatmap.js.map +1 -1
  775. package/modules/heatmap.src.js +137 -108
  776. package/modules/heikinashi.js +1 -1
  777. package/modules/heikinashi.src.js +1 -1
  778. package/modules/histogram-bellcurve.js +1 -1
  779. package/modules/histogram-bellcurve.src.js +1 -1
  780. package/modules/hollowcandlestick.js +1 -1
  781. package/modules/hollowcandlestick.src.js +9 -9
  782. package/modules/item-series.js +1 -1
  783. package/modules/item-series.src.js +1 -1
  784. package/modules/lollipop.js +6 -6
  785. package/modules/lollipop.js.map +1 -1
  786. package/modules/lollipop.src.js +37 -22
  787. package/modules/map.d.ts +3 -3
  788. package/modules/map.js +171 -169
  789. package/modules/map.js.map +1 -1
  790. package/modules/map.src.d.ts +3 -3
  791. package/modules/map.src.js +830 -605
  792. package/modules/marker-clusters.js +1 -1
  793. package/modules/marker-clusters.js.map +1 -1
  794. package/modules/marker-clusters.src.js +4 -6
  795. package/modules/networkgraph.d.ts +1 -17
  796. package/modules/networkgraph.js +55 -50
  797. package/modules/networkgraph.js.map +1 -1
  798. package/modules/networkgraph.src.d.ts +1 -17
  799. package/modules/networkgraph.src.js +2339 -2008
  800. package/modules/no-data-to-display.js +1 -1
  801. package/modules/no-data-to-display.src.js +2 -2
  802. package/modules/offline-exporting.js +3 -3
  803. package/modules/offline-exporting.js.map +1 -1
  804. package/modules/offline-exporting.src.js +5 -5
  805. package/modules/oldie-polyfills.js +1 -1
  806. package/modules/oldie-polyfills.src.js +1 -1
  807. package/modules/oldie.js +2 -2
  808. package/modules/oldie.src.js +3 -3
  809. package/modules/organization.js +15 -15
  810. package/modules/organization.js.map +1 -1
  811. package/modules/organization.src.js +12 -4
  812. package/modules/overlapping-datalabels.js +1 -1
  813. package/modules/overlapping-datalabels.src.js +1 -1
  814. package/modules/parallel-coordinates.js +11 -11
  815. package/modules/parallel-coordinates.js.map +1 -1
  816. package/modules/parallel-coordinates.src.js +14 -9
  817. package/modules/pareto.js +1 -1
  818. package/modules/pareto.src.js +1 -1
  819. package/modules/pathfinder.js +1 -1
  820. package/modules/pathfinder.src.js +1 -1
  821. package/modules/pattern-fill.js +15 -14
  822. package/modules/pattern-fill.js.map +1 -1
  823. package/modules/pattern-fill.src.js +15 -2
  824. package/modules/price-indicator.js +1 -1
  825. package/modules/price-indicator.src.js +1 -1
  826. package/modules/pyramid3d.js +1 -1
  827. package/modules/pyramid3d.src.js +1 -1
  828. package/modules/sankey.d.ts +1 -17
  829. package/modules/sankey.js +32 -32
  830. package/modules/sankey.js.map +1 -1
  831. package/modules/sankey.src.d.ts +1 -17
  832. package/modules/sankey.src.js +102 -57
  833. package/modules/series-label.js +18 -18
  834. package/modules/series-label.js.map +1 -1
  835. package/modules/series-label.src.js +474 -387
  836. package/modules/series-on-point.js +18 -0
  837. package/modules/series-on-point.js.map +1 -0
  838. package/modules/series-on-point.src.js +468 -0
  839. package/modules/solid-gauge.js +4 -4
  840. package/modules/solid-gauge.js.map +1 -1
  841. package/modules/solid-gauge.src.js +6 -6
  842. package/modules/sonification.d.ts +2 -2
  843. package/modules/sonification.js +1 -1
  844. package/modules/sonification.js.map +1 -1
  845. package/modules/sonification.src.d.ts +2 -2
  846. package/modules/sonification.src.js +4 -8
  847. package/modules/static-scale.js +1 -1
  848. package/modules/static-scale.src.js +1 -1
  849. package/modules/stock-tools.d.ts +1 -23
  850. package/modules/stock-tools.js +109 -179
  851. package/modules/stock-tools.js.map +1 -1
  852. package/modules/stock-tools.src.d.ts +1 -23
  853. package/modules/stock-tools.src.js +2652 -6347
  854. package/modules/stock.d.ts +8 -0
  855. package/modules/stock.js +205 -204
  856. package/modules/stock.js.map +1 -1
  857. package/modules/stock.src.d.ts +8 -0
  858. package/modules/stock.src.js +208 -106
  859. package/modules/streamgraph.js +1 -1
  860. package/modules/streamgraph.src.js +1 -1
  861. package/modules/sunburst.js +73 -73
  862. package/modules/sunburst.js.map +1 -1
  863. package/modules/sunburst.src.js +251 -193
  864. package/modules/tilemap.js +1 -1
  865. package/modules/tilemap.src.js +1 -1
  866. package/modules/timeline.js +1 -1
  867. package/modules/timeline.js.map +1 -1
  868. package/modules/timeline.src.js +6 -4
  869. package/modules/treegrid.js +57 -57
  870. package/modules/treegrid.js.map +1 -1
  871. package/modules/treegrid.src.js +1908 -1901
  872. package/modules/treemap.js +54 -53
  873. package/modules/treemap.js.map +1 -1
  874. package/modules/treemap.src.js +217 -183
  875. package/modules/variable-pie.js +1 -1
  876. package/modules/variable-pie.src.js +1 -1
  877. package/modules/variwide.js +1 -1
  878. package/modules/variwide.src.js +1 -1
  879. package/modules/vector.js +2 -2
  880. package/modules/vector.js.map +1 -1
  881. package/modules/vector.src.js +3 -5
  882. package/modules/venn.js +31 -31
  883. package/modules/venn.js.map +1 -1
  884. package/modules/venn.src.js +82 -111
  885. package/modules/windbarb.js +1 -1
  886. package/modules/windbarb.src.js +1 -1
  887. package/modules/wordcloud.js +23 -23
  888. package/modules/wordcloud.js.map +1 -1
  889. package/modules/wordcloud.src.js +84 -113
  890. package/modules/xrange.js +17 -17
  891. package/modules/xrange.js.map +1 -1
  892. package/modules/xrange.src.js +411 -397
  893. package/package.json +1 -1
  894. package/themes/avocado.js +1 -1
  895. package/themes/avocado.src.js +1 -1
  896. package/themes/brand-dark.js +1 -1
  897. package/themes/brand-dark.src.js +1 -1
  898. package/themes/brand-light.js +1 -1
  899. package/themes/brand-light.src.js +1 -1
  900. package/themes/dark-blue.js +1 -1
  901. package/themes/dark-blue.src.js +1 -1
  902. package/themes/dark-green.js +1 -1
  903. package/themes/dark-green.src.js +1 -1
  904. package/themes/dark-unica.js +1 -1
  905. package/themes/dark-unica.src.js +1 -1
  906. package/themes/gray.js +1 -1
  907. package/themes/gray.src.js +1 -1
  908. package/themes/grid-light.js +1 -1
  909. package/themes/grid-light.src.js +1 -1
  910. package/themes/grid.js +1 -1
  911. package/themes/grid.src.js +1 -1
  912. package/themes/high-contrast-dark.js +2 -2
  913. package/themes/high-contrast-dark.src.js +11 -11
  914. package/themes/high-contrast-light.js +2 -2
  915. package/themes/high-contrast-light.src.js +10 -10
  916. package/themes/sand-signika.js +1 -1
  917. package/themes/sand-signika.src.js +1 -1
  918. package/themes/skies.js +1 -1
  919. package/themes/skies.src.js +1 -1
  920. package/themes/sunset.js +1 -1
  921. package/themes/sunset.src.js +1 -1
  922. package/es-modules/Core/Axis/StackingAxis.js +0 -216
  923. package/es-modules/Core/Axis/TreeGridAxis.js +0 -720
  924. package/es-modules/Core/Axis/TreeGridTick.js +0 -317
  925. package/es-modules/Extensions/Annotations/Annotations.js +0 -1449
  926. package/es-modules/Extensions/Annotations/Mixins/MarkerMixin.js +0 -179
  927. package/es-modules/Extensions/Annotations/Popup.js +0 -1123
  928. package/es-modules/Extensions/Boost/BoostAttach.js +0 -150
  929. package/es-modules/Extensions/Boost/BoostInit.js +0 -323
  930. package/es-modules/Extensions/Boost/BoostOptions.js +0 -245
  931. package/es-modules/Extensions/Boost/BoostOverrides.js +0 -386
  932. package/es-modules/Extensions/Boost/BoostUtils.js +0 -255
  933. package/es-modules/Extensions/Boost/WGLVBuffer.js +0 -153
  934. package/es-modules/Extensions/FullScreen.js +0 -240
  935. package/es-modules/Extensions/Polar.js +0 -740
  936. package/es-modules/Extensions/Stacking.js +0 -517
  937. package/es-modules/Series/ColorMapMixin.js +0 -84
  938. package/es-modules/Series/DrawPointComposition.js +0 -114
  939. package/es-modules/Series/Networkgraph/DraggableNodes.js +0 -132
  940. package/es-modules/Series/Networkgraph/Integrations.js +0 -348
  941. package/es-modules/Series/Networkgraph/Networkgraph.js +0 -1178
  942. package/es-modules/Series/XRange/XRangeComposition.js +0 -49
package/highcharts.src.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v10.0.0 (2022-03-07)
2
+ * @license Highcharts JS v10.2.1 (2022-08-29)
3
3
  *
4
4
  * (c) 2009-2021 Torstein Honsi
5
5
  *
@@ -55,6 +55,7 @@
55
55
  * */
56
56
  /**
57
57
  * Shared Highcharts properties.
58
+ * @private
58
59
  */
59
60
  var Globals;
60
61
  (function (Globals) {
@@ -63,7 +64,7 @@
63
64
  * Constants
64
65
  *
65
66
  * */
66
- Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '10.0.0', Globals.win = (typeof window !== 'undefined' ?
67
+ Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '10.2.1', Globals.win = (typeof window !== 'undefined' ?
67
68
  window :
68
69
  {}), // eslint-disable-line node/no-unsupported-features/es-builtins
69
70
  Globals.doc = Globals.win.document, Globals.svg = (Globals.doc &&
@@ -208,11 +209,11 @@
208
209
  function error(code, stop, chart, params) {
209
210
  var severity = stop ? 'Highcharts error' : 'Highcharts warning';
210
211
  if (code === 32) {
211
- code = severity + ": Deprecated member";
212
+ code = "" + severity + ": Deprecated member";
212
213
  }
213
214
  var isCode = isNumber(code);
214
215
  var message = isCode ?
215
- severity + " #" + code + ": www.highcharts.com/errors/" + code + "/" :
216
+ "" + severity + " #" + code + ": www.highcharts.com/errors/" + code + "/" :
216
217
  code.toString();
217
218
  var defaultHandler = function () {
218
219
  if (stop) {
@@ -231,7 +232,7 @@
231
232
  message += '?';
232
233
  }
233
234
  objectEach(params, function (value, key) {
234
- additionalMessages_1 += "\n - " + key + ": " + value;
235
+ additionalMessages_1 += "\n - ".concat(key, ": ").concat(value);
235
236
  if (isCode) {
236
237
  message += encodeURI(key) + '=' + encodeURI(value);
237
238
  }
@@ -691,7 +692,7 @@
691
692
  function css(el, styles) {
692
693
  if (H.isMS && !H.svg) { // #2686
693
694
  if (styles && defined(styles.opacity)) {
694
- styles.filter = "alpha(opacity=" + styles.opacity * 100 + ")";
695
+ styles.filter = "alpha(opacity=".concat(styles.opacity * 100, ")");
695
696
  }
696
697
  }
697
698
  extend(el.style, styles);
@@ -884,7 +885,7 @@
884
885
  var i,
885
886
  retInterval = interval;
886
887
  // round to a tenfold of 1, 2, 2.5 or 5
887
- magnitude = pick(magnitude, 1);
888
+ magnitude = pick(magnitude, getMagnitude(interval));
888
889
  var normalized = interval / magnitude;
889
890
  // multiples for a linear scale
890
891
  if (!multiples) {
@@ -1179,7 +1180,7 @@
1179
1180
  }
1180
1181
  // Otherwise, get the computed style
1181
1182
  var css = win.getComputedStyle(el,
1182
- undefined); // eslint-disable-line no-undefined
1183
+ void 0); // eslint-disable-line no-undefined
1183
1184
  if (css) {
1184
1185
  style = css.getPropertyValue(prop);
1185
1186
  if (pick(toInt, prop !== 'opacity')) {
@@ -1304,8 +1305,6 @@
1304
1305
  *
1305
1306
  * @param {T} [ctx]
1306
1307
  * The context.
1307
- *
1308
- * @return {void}
1309
1308
  */
1310
1309
  function objectEach(obj, fn, ctx) {
1311
1310
  /* eslint-enable valid-jsdoc */
@@ -1414,7 +1413,7 @@
1414
1413
  }, function (val, key) {
1415
1414
  H[key] = function (arr) {
1416
1415
  var _a;
1417
- error(32, false, void 0, (_a = {}, _a["Highcharts." + key] = "use Array." + val, _a));
1416
+ error(32, false, void 0, (_a = {}, _a["Highcharts.".concat(key)] = "use Array.".concat(val), _a));
1418
1417
  return Array.prototype[val].apply(arr, [].slice.call(arguments, 1));
1419
1418
  };
1420
1419
  });
@@ -2642,6 +2641,7 @@
2642
2641
  * @default {highstock} x
2643
2642
  * @since 3.0
2644
2643
  * @product highcharts highstock gantt
2644
+ * @deprecated
2645
2645
  * @validvalue ["x", "y", "xy"]
2646
2646
  * @apioption chart.pinchType
2647
2647
  */
@@ -2679,6 +2679,17 @@
2679
2679
  * @since 5.0.0
2680
2680
  */
2681
2681
  colorCount: 10,
2682
+ /**
2683
+ * By default, (because of memory and performance reasons) the chart does
2684
+ * not copy the data but keeps it as a reference. In some cases, this might
2685
+ * result in mutating the original data source. In order to prevent that,
2686
+ * set that property to false. Please note that changing that might decrease
2687
+ * performance, especially with bigger sets of data.
2688
+ *
2689
+ * @type {boolean}
2690
+ * @since 10.1.0
2691
+ */
2692
+ allowMutatingData: true,
2682
2693
  /**
2683
2694
  * Alias of `type`.
2684
2695
  *
@@ -2749,6 +2760,7 @@
2749
2760
  /**
2750
2761
  * The button that appears after a selection zoom, allowing the user
2751
2762
  * to reset zoom.
2763
+ * @deprecated
2752
2764
  */
2753
2765
  resetZoomButton: {
2754
2766
  /**
@@ -2762,6 +2774,7 @@
2762
2774
  *
2763
2775
  * @type {Highcharts.ButtonRelativeToValue}
2764
2776
  * @default plot
2777
+ * @deprecated
2765
2778
  * @since 2.2
2766
2779
  * @apioption chart.resetZoomButton.relativeTo
2767
2780
  */
@@ -2778,10 +2791,14 @@
2778
2791
  * Theming the button
2779
2792
  *
2780
2793
  * @type {Highcharts.SVGAttributes}
2794
+ * @deprecated
2781
2795
  * @since 2.2
2782
2796
  */
2783
2797
  theme: {
2784
- /** @internal */
2798
+ /**
2799
+ * @internal
2800
+ * @deprecated
2801
+ */
2785
2802
  zIndex: 6
2786
2803
  },
2787
2804
  /**
@@ -2795,26 +2812,31 @@
2795
2812
  * Above the plot area
2796
2813
  *
2797
2814
  * @type {Highcharts.AlignObject}
2815
+ * @deprecated
2798
2816
  * @since 2.2
2799
2817
  */
2800
2818
  position: {
2801
2819
  /**
2802
2820
  * The horizontal alignment of the button.
2821
+ * @deprecated
2803
2822
  */
2804
2823
  align: 'right',
2805
2824
  /**
2806
2825
  * The horizontal offset of the button.
2826
+ * @deprecated
2807
2827
  */
2808
2828
  x: -10,
2809
2829
  /**
2810
2830
  * The vertical alignment of the button.
2811
2831
  *
2812
2832
  * @type {Highcharts.VerticalAlignValue}
2833
+ * @deprecated
2813
2834
  * @default top
2814
2835
  * @apioption chart.resetZoomButton.position.verticalAlign
2815
2836
  */
2816
2837
  /**
2817
2838
  * The vertical offset of the button.
2839
+ * @deprecated
2818
2840
  */
2819
2841
  y: 10
2820
2842
  }
@@ -3096,6 +3118,7 @@
3096
3118
  *
3097
3119
  * @type {string}
3098
3120
  * @validvalue ["x", "y", "xy"]
3121
+ * @deprecated
3099
3122
  * @apioption chart.zoomType
3100
3123
  */
3101
3124
  /**
@@ -3105,12 +3128,148 @@
3105
3128
  * However, `zoomBySingleTouch` will interfere with touch-dragging the
3106
3129
  * chart to read the tooltip. And especially when vertical zooming is
3107
3130
  * enabled, it will make it hard to scroll vertically on the page.
3108
- * @since 9.0.0
3131
+ * @since 9.0.0
3109
3132
  * @sample highcharts/chart/zoombysingletouch
3110
3133
  * Zoom by single touch enabled, with buttons to toggle
3111
3134
  * @product highcharts highstock gantt
3135
+ * @deprecated
3112
3136
  */
3113
3137
  zoomBySingleTouch: false,
3138
+ /**
3139
+ * Chart zooming options.
3140
+ * @since 10.2.1
3141
+ */
3142
+ zooming: {
3143
+ /**
3144
+ * Equivalent to [type](#chart.zooming.type), but for multitouch
3145
+ * gestures only. By default, the `pinchType` is the same as the
3146
+ * `type` setting. However, pinching can be enabled separately in
3147
+ * some cases, for example in stock charts where a mouse drag pans the
3148
+ * chart, while pinching is enabled. When [tooltip.followTouchMove](
3149
+ * #tooltip.followTouchMove) is true, pinchType only applies to
3150
+ * two-finger touches.
3151
+ *
3152
+ * @type {string}
3153
+ * @default {highcharts} undefined
3154
+ * @default {highstock} x
3155
+ * @product highcharts highstock gantt
3156
+ * @since 10.2.1
3157
+ * @validvalue ["x", "y", "xy"]
3158
+ * @apioption chart.zooming.pinchType
3159
+ */
3160
+ /**
3161
+ * Decides in what dimensions the user can zoom by dragging the mouse.
3162
+ * Can be one of `x`, `y` or `xy`.
3163
+ *
3164
+ * @type {string}
3165
+ * @default {highcharts} undefined
3166
+ * @product highcharts highstock gantt
3167
+ * @validvalue ["x", "y", "xy"]
3168
+ * @since 10.2.1
3169
+ * @apioption chart.zooming.type
3170
+ */
3171
+ /**
3172
+ * Set a key to hold when dragging to zoom the chart. This is useful to
3173
+ * avoid zooming while moving points. Should be set different than
3174
+ * [chart.panKey](#chart.panKey).
3175
+ *
3176
+ * @type {string}
3177
+ * @default {highcharts} undefined
3178
+ * @since 10.2.1
3179
+ * @validvalue ["alt", "ctrl", "meta", "shift"]
3180
+ * @requires modules/draggable-points
3181
+ * @apioption chart.zooming.key
3182
+ */
3183
+ /**
3184
+ * Enables zooming by a single touch, in combination with
3185
+ * [chart.zooming.type](#chart.zooming.type). When enabled, two-finger
3186
+ * pinch will still work as set up by [chart.zooming.pinchType]
3187
+ * (#chart.zooming.pinchType). However, `singleTouch` will interfere
3188
+ * with touch-dragging the chart to read the tooltip. And especially
3189
+ * when vertical zooming is enabled, it will make it hard to scroll
3190
+ * vertically on the page.
3191
+ * @sample highcharts/chart/zoombysingletouch
3192
+ * Zoom by single touch enabled, with buttons to toggle
3193
+ * @product highcharts highstock gantt
3194
+ * @since 10.2.1
3195
+ */
3196
+ singleTouch: false,
3197
+ /**
3198
+ * The button that appears after a selection zoom, allowing the user
3199
+ * to reset zoom.
3200
+ * @since 10.2.1
3201
+ */
3202
+ resetButton: {
3203
+ /**
3204
+ * What frame the button placement should be related to. Can be
3205
+ * either `plotBox` or `spacingBox`.
3206
+ *
3207
+ * @sample {highcharts} highcharts/chart/resetzoombutton-relativeto/
3208
+ * Relative to the chart
3209
+ * @sample {highstock} highcharts/chart/resetzoombutton-relativeto/
3210
+ * Relative to the chart
3211
+ *
3212
+ * @type {Highcharts.ButtonRelativeToValue}
3213
+ * @default plot
3214
+ * @since 10.2.1
3215
+ * @apioption chart.zooming.resetButton.relativeTo
3216
+ */
3217
+ /**
3218
+ * A collection of attributes for the button. The object takes SVG
3219
+ * attributes like `fill`, `stroke`, `stroke-width` or `r`, the
3220
+ * border radius. The theme also supports `style`, a collection of
3221
+ * CSS properties for the text. Equivalent attributes for the hover
3222
+ * state are given in `theme.states.hover`.
3223
+ *
3224
+ * @sample {highcharts} highcharts/chart/resetzoombutton-theme/
3225
+ * Theming the button
3226
+ * @sample {highstock} highcharts/chart/resetzoombutton-theme/
3227
+ * Theming the button
3228
+ *
3229
+ * @type {Highcharts.SVGAttributes}
3230
+ * @since 10.2.1
3231
+ */
3232
+ theme: {
3233
+ /** @internal */
3234
+ zIndex: 6
3235
+ },
3236
+ /**
3237
+ * The position of the button.
3238
+ *
3239
+ * @sample {highcharts} highcharts/chart/resetzoombutton-position/
3240
+ * Above the plot area
3241
+ * @sample {highstock} highcharts/chart/resetzoombutton-position/
3242
+ * Above the plot area
3243
+ * @sample {highmaps} highcharts/chart/resetzoombutton-position/
3244
+ * Above the plot area
3245
+ *
3246
+ * @type {Highcharts.AlignObject}
3247
+ * @since 10.2.1
3248
+ */
3249
+ position: {
3250
+ /**
3251
+ * The horizontal alignment of the button.
3252
+ */
3253
+ align: 'right',
3254
+ /**
3255
+ * The horizontal offset of the button.
3256
+ */
3257
+ x: -10,
3258
+ /**
3259
+ * The vertical alignment of the button.
3260
+ *
3261
+ * @type {Highcharts.VerticalAlignValue}
3262
+ * @since 10.2.1
3263
+ * @default top
3264
+ * @apioption chart.zooming.resetButton.position.verticalAlign
3265
+ */
3266
+ /**
3267
+ * The vertical offset of the button.
3268
+ */
3269
+ y: 10
3270
+ }
3271
+ }
3272
+ },
3114
3273
  /**
3115
3274
  * An explicit width for the chart. By default (when `null`) the width
3116
3275
  * is calculated from the offset width of the containing element.
@@ -3163,7 +3322,7 @@
3163
3322
  *
3164
3323
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
3165
3324
  */
3166
- borderColor: "#335cad" /* highlightColor80 */,
3325
+ borderColor: "#335cad" /* Palette.highlightColor80 */,
3167
3326
  /**
3168
3327
  * The pixel width of the outer chart border.
3169
3328
  *
@@ -3202,7 +3361,7 @@
3202
3361
  *
3203
3362
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
3204
3363
  */
3205
- backgroundColor: "#ffffff" /* backgroundColor */,
3364
+ backgroundColor: "#ffffff" /* Palette.backgroundColor */,
3206
3365
  /**
3207
3366
  * The background color or gradient for the plot area.
3208
3367
  *
@@ -3259,7 +3418,7 @@
3259
3418
  *
3260
3419
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
3261
3420
  */
3262
- plotBorderColor: "#cccccc" /* neutralColor20 */
3421
+ plotBorderColor: "#cccccc" /* Palette.neutralColor20 */
3263
3422
  };
3264
3423
  /* *
3265
3424
  *
@@ -3438,7 +3597,7 @@
3438
3597
  return 'rgb(' + rgba[0] + ',' + rgba[1] + ',' + rgba[2] + ')';
3439
3598
  }
3440
3599
  if (format === 'a') {
3441
- return "" + rgba[3];
3600
+ return "".concat(rgba[3]);
3442
3601
  }
3443
3602
  return 'rgba(' + rgba.join(',') + ')';
3444
3603
  }
@@ -3934,13 +4093,12 @@
3934
4093
  */
3935
4094
  Time.prototype.update = function (options) {
3936
4095
  var useUTC = pick(options && options.useUTC,
3937
- true),
3938
- time = this;
4096
+ true);
3939
4097
  this.options = options = merge(true, this.options || {}, options);
3940
4098
  // Allow using a different Date class
3941
4099
  this.Date = options.Date || win.Date || Date;
3942
4100
  this.useUTC = useUTC;
3943
- this.timezoneOffset = (useUTC && options.timezoneOffset);
4101
+ this.timezoneOffset = (useUTC && options.timezoneOffset) || void 0;
3944
4102
  this.getTimezoneOffset = this.timezoneOffsetFunction();
3945
4103
  /*
3946
4104
  * The time object has options allowing for variable time zones, meaning
@@ -4377,17 +4535,16 @@
4377
4535
  hour: 6,
4378
4536
  day: 3
4379
4537
  };
4380
- var format,
4381
- n,
4382
- lastN = 'millisecond'; // for sub-millisecond data, #4223
4383
- for (n in timeUnits) { // eslint-disable-line guard-for-in
4384
- // If the range is exactly one week and we're looking at a
4385
- // Sunday/Monday, go for the week format
4386
- if (range === timeUnits.week &&
4387
- +this.dateFormat('%w',
4388
- timestamp) === startOfWeek &&
4389
- dateStr.substr(6) === blank.substr(6)) {
4390
- n = 'week';
4538
+ var n = 'millisecond',
4539
+ // for sub-millisecond data, #4223
4540
+ lastN = n;
4541
+ for (n in timeUnits) { // eslint-disable-line guard-for-in
4542
+ // If the range is exactly one week and we're looking at a
4543
+ // Sunday/Monday, go for the week format
4544
+ if (range === timeUnits.week &&
4545
+ +this.dateFormat('%w', timestamp) === startOfWeek &&
4546
+ dateStr.substr(6) === blank.substr(6)) {
4547
+ n = 'week';
4391
4548
  break;
4392
4549
  }
4393
4550
  // The first format that is too great for the range
@@ -4407,10 +4564,7 @@
4407
4564
  lastN = n;
4408
4565
  }
4409
4566
  }
4410
- if (n) {
4411
- format = this.resolveDTLFormat(dateTimeLabelFormats[n]).main;
4412
- }
4413
- return format;
4567
+ return this.resolveDTLFormat(dateTimeLabelFormats[n]).main;
4414
4568
  };
4415
4569
  return Time;
4416
4570
  }());
@@ -4514,6 +4668,7 @@
4514
4668
  * @type {Highcharts.Options}
4515
4669
  */ /**
4516
4670
  * @optionparent
4671
+ * @private
4517
4672
  */
4518
4673
  var defaultOptions = {
4519
4674
  /**
@@ -4546,7 +4701,7 @@
4546
4701
  * @sample {highcharts} highcharts/chart/colors/
4547
4702
  * Assign a global color theme
4548
4703
  *
4549
- * @type {Array<Highcharts.ColorString>}
4704
+ * @type {Array<(Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject)>}
4550
4705
  * @default ["#7cb5ec", "#434348", "#90ed7d", "#f7a35c", "#8085e9",
4551
4706
  * "#f15c80", "#e4d354", "#2b908f", "#f45b5b", "#91e8e1"]
4552
4707
  */
@@ -5367,7 +5522,7 @@
5367
5522
  /**
5368
5523
  * @ignore-option
5369
5524
  */
5370
- color: "#333333" /* neutralColor80 */
5525
+ color: "#333333" /* Palette.neutralColor80 */
5371
5526
  }
5372
5527
  },
5373
5528
  /**
@@ -5647,7 +5802,7 @@
5647
5802
  *
5648
5803
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5649
5804
  */
5650
- borderColor: "#999999" /* neutralColor40 */,
5805
+ borderColor: "#999999" /* Palette.neutralColor40 */,
5651
5806
  /**
5652
5807
  * The border corner radius of the legend.
5653
5808
  *
@@ -5741,7 +5896,7 @@
5741
5896
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5742
5897
  * @since 2.2.4
5743
5898
  */
5744
- activeColor: "#003399" /* highlightColor100 */,
5899
+ activeColor: "#003399" /* Palette.highlightColor100 */,
5745
5900
  /**
5746
5901
  * The color of the inactive up or down arrow in the legend page
5747
5902
  * navigation. .
@@ -5757,7 +5912,7 @@
5757
5912
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5758
5913
  * @since 2.2.4
5759
5914
  */
5760
- inactiveColor: "#cccccc" /* neutralColor20 */
5915
+ inactiveColor: "#cccccc" /* Palette.neutralColor20 */
5761
5916
  },
5762
5917
  /**
5763
5918
  * The inner padding of the legend box.
@@ -5833,7 +5988,7 @@
5833
5988
  /**
5834
5989
  * @ignore
5835
5990
  */
5836
- color: "#333333" /* neutralColor80 */,
5991
+ color: "#333333" /* Palette.neutralColor80 */,
5837
5992
  /**
5838
5993
  * @ignore
5839
5994
  */
@@ -5871,7 +6026,7 @@
5871
6026
  /**
5872
6027
  * @ignore
5873
6028
  */
5874
- color: "#000000" /* neutralColor100 */
6029
+ color: "#000000" /* Palette.neutralColor100 */
5875
6030
  },
5876
6031
  /**
5877
6032
  * CSS styles for each legend item when the corresponding series or
@@ -5892,7 +6047,7 @@
5892
6047
  /**
5893
6048
  * @ignore
5894
6049
  */
5895
- color: "#cccccc" /* neutralColor20 */
6050
+ color: "#cccccc" /* Palette.neutralColor20 */
5896
6051
  },
5897
6052
  /**
5898
6053
  * Whether to apply a drop shadow to the legend. A `backgroundColor`
@@ -6196,7 +6351,7 @@
6196
6351
  /**
6197
6352
  * @ignore
6198
6353
  */
6199
- backgroundColor: "#ffffff" /* backgroundColor */,
6354
+ backgroundColor: "#ffffff" /* Palette.backgroundColor */,
6200
6355
  /**
6201
6356
  * @ignore
6202
6357
  */
@@ -6402,18 +6557,20 @@
6402
6557
  * @apioption tooltip.pointFormatter
6403
6558
  */
6404
6559
  /**
6405
- * A callback function to place the tooltip in a default position. The
6560
+ * A callback function to place the tooltip in a custom position. The
6406
6561
  * callback receives three parameters: `labelWidth`, `labelHeight` and
6407
6562
  * `point`, where point contains values for `plotX` and `plotY` telling
6408
6563
  * where the reference point is in the plot area. Add `chart.plotLeft`
6409
6564
  * and `chart.plotTop` to get the full coordinates.
6410
6565
  *
6566
+ * To find the actual hovered `Point` instance, use
6567
+ * `this.chart.hoverPoint`. For shared or split tooltips, all the hover
6568
+ * points are available in `this.chart.hoverPoints`.
6569
+ *
6411
6570
  * Since v7, when [tooltip.split](#tooltip.split) option is enabled,
6412
6571
  * positioner is called for each of the boxes separately, including
6413
6572
  * xAxis header. xAxis header is not a point, instead `point` argument
6414
- * contains info:
6415
- * `{ plotX: Number, plotY: Number, isHeader: Boolean }`
6416
- *
6573
+ * contains info: `{ plotX: Number, plotY: Number, isHeader: Boolean }`
6417
6574
  *
6418
6575
  * The return should be an object containing x and y values, for example
6419
6576
  * `{ x: 100, y: 100 }`.
@@ -6789,7 +6946,7 @@
6789
6946
  *
6790
6947
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
6791
6948
  */
6792
- backgroundColor: color("#f7f7f7" /* neutralColor3 */)
6949
+ backgroundColor: color("#f7f7f7" /* Palette.neutralColor3 */)
6793
6950
  // @todo: Disallow undefined as input for colors
6794
6951
  .setOpacity(0.85).get(),
6795
6952
  /**
@@ -6852,7 +7009,7 @@
6852
7009
  */
6853
7010
  style: {
6854
7011
  /** @internal */
6855
- color: "#333333" /* neutralColor80 */,
7012
+ color: "#333333" /* Palette.neutralColor80 */,
6856
7013
  /** @internal */
6857
7014
  cursor: 'default',
6858
7015
  /** @internal */
@@ -6967,7 +7124,7 @@
6967
7124
  /** @internal */
6968
7125
  cursor: 'pointer',
6969
7126
  /** @internal */
6970
- color: "#999999" /* neutralColor40 */,
7127
+ color: "#999999" /* Palette.neutralColor40 */,
6971
7128
  /** @internal */
6972
7129
  fontSize: '9px'
6973
7130
  },
@@ -7441,7 +7598,7 @@
7441
7598
  curAnim = options.curAnim;
7442
7599
  var ret,
7443
7600
  done;
7444
- if (elem.attr && !elem.element) { // #2616, element is destroyed
7601
+ if ((elem.attr) && !elem.element) { // #2616, element is destroyed
7445
7602
  ret = false;
7446
7603
  }
7447
7604
  else if (gotoEnd || t >= duration + this.startTime) {
@@ -7954,7 +8111,9 @@
7954
8111
  valid = isString(val) && AST.allowedReferences.some(function (ref) { return val.indexOf(ref) === 0; });
7955
8112
  }
7956
8113
  if (!valid) {
7957
- error("Highcharts warning: Invalid attribute '" + key + "' in config");
8114
+ error(33, false, void 0, {
8115
+ 'Invalid attribute in config': "".concat(key)
8116
+ });
7958
8117
  delete attributes[key];
7959
8118
  }
7960
8119
  });
@@ -7965,10 +8124,9 @@
7965
8124
  .split(';')
7966
8125
  .reduce(function (styles, line) {
7967
8126
  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];
8127
+ key = pair.shift();
8128
+ if (key && pair.length) {
8129
+ styles[key.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); })] = pair.join(':'); // #17146
7972
8130
  }
7973
8131
  return styles;
7974
8132
  }, {});
@@ -8069,8 +8227,9 @@
8069
8227
  node = element;
8070
8228
  }
8071
8229
  else {
8072
- error('Highcharts warning: Invalid tagName ' +
8073
- tagName + ' in config');
8230
+ error(33, false, void 0, {
8231
+ 'Invalid tagName in config': tagName
8232
+ });
8074
8233
  }
8075
8234
  }
8076
8235
  // Add to the tree
@@ -8102,7 +8261,8 @@
8102
8261
  .trim()
8103
8262
  // The style attribute throws a warning when parsing when CSP is
8104
8263
  // enabled (#6884), so use an alias and pick it up below
8105
- .replace(/ style="/g, ' data-style="');
8264
+ // Make all quotation marks parse correctly to DOM (#17627)
8265
+ .replace(/ style=(["'])/g, ' data-style=$1');
8106
8266
  var doc;
8107
8267
  if (hasValidDOMParser) {
8108
8268
  doc = new DOMParser().parseFromString(trustedTypesPolicy ?
@@ -8227,6 +8387,7 @@
8227
8387
  'target',
8228
8388
  'tabindex',
8229
8389
  'text-align',
8390
+ 'text-anchor',
8230
8391
  'textAnchor',
8231
8392
  'textLength',
8232
8393
  'title',
@@ -8327,6 +8488,7 @@
8327
8488
  'svg',
8328
8489
  'table',
8329
8490
  'text',
8491
+ 'textPath',
8330
8492
  'thead',
8331
8493
  'tbody',
8332
8494
  'tspan',
@@ -8825,7 +8987,7 @@
8825
8987
 
8826
8988
  return RendererUtilities;
8827
8989
  });
8828
- _registerModule(_modules, 'Core/Renderer/SVG/SVGElement.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Renderer/HTML/AST.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (A, AST, Color, H, U) {
8990
+ _registerModule(_modules, 'Core/Renderer/SVG/SVGElement.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (A, Color, H, U) {
8829
8991
  /* *
8830
8992
  *
8831
8993
  * (c) 2010-2021 Torstein Honsi
@@ -8860,6 +9022,7 @@
8860
9022
  objectEach = U.objectEach,
8861
9023
  pick = U.pick,
8862
9024
  pInt = U.pInt,
9025
+ removeEvent = U.removeEvent,
8863
9026
  syncTimeout = U.syncTimeout,
8864
9027
  uniqueKey = U.uniqueKey;
8865
9028
  /* *
@@ -9277,27 +9440,32 @@
9277
9440
  });
9278
9441
  // For each of the tspans and text nodes, create a copy in the
9279
9442
  // outline.
9280
- [].forEach.call(elem.childNodes, function (childNode) {
9443
+ var parentElem = elem.querySelector('textPath') || elem;
9444
+ [].forEach.call(parentElem.childNodes, function (childNode) {
9281
9445
  var clone = childNode.cloneNode(true);
9282
9446
  if (clone.removeAttribute) {
9283
- ['fill', 'stroke', 'stroke-width', 'stroke'].forEach(function (prop) { return clone.removeAttribute(prop); });
9447
+ ['fill', 'stroke', 'stroke-width', 'stroke'].forEach(function (prop) { return clone
9448
+ .removeAttribute(prop); });
9284
9449
  }
9285
9450
  outline_1.appendChild(clone);
9286
9451
  });
9452
+ // Collect the sum of dy from all children, included nested ones
9453
+ var totalHeight_1 = 0;
9454
+ [].forEach.call(parentElem.querySelectorAll('text tspan'), function (element) {
9455
+ totalHeight_1 += Number(element.getAttribute('dy'));
9456
+ });
9287
9457
  // Insert an absolutely positioned break before the original text
9288
9458
  // to keep it in place
9289
- var br_1 = doc.createElementNS(SVG_NS, 'tspan');
9290
- br_1.textContent = '\u200B';
9291
- // Copy x and y if not null
9292
- ['x', 'y'].forEach(function (key) {
9293
- var value = elem.getAttribute(key);
9294
- if (value) {
9295
- br_1.setAttribute(key, value);
9296
- }
9459
+ var br = doc.createElementNS(SVG_NS, 'tspan');
9460
+ br.textContent = '\u200B';
9461
+ // Reset the position for the following text
9462
+ attr(br, {
9463
+ x: Number(elem.getAttribute('x')),
9464
+ dy: -totalHeight_1
9297
9465
  });
9298
9466
  // Insert the outline
9299
- outline_1.appendChild(br_1);
9300
- elem.insertBefore(outline_1, elem.firstChild);
9467
+ outline_1.appendChild(br);
9468
+ parentElem.insertBefore(outline_1, parentElem.firstChild);
9301
9469
  }
9302
9470
  };
9303
9471
  /**
@@ -9787,42 +9955,6 @@
9787
9955
  }, this);
9788
9956
  this.shadows = void 0;
9789
9957
  };
9790
- /**
9791
- * @private
9792
- */
9793
- SVGElement.prototype.destroyTextPath = function (elem, path) {
9794
- var textElement = elem.getElementsByTagName('text')[0];
9795
- var childNodes;
9796
- if (textElement) {
9797
- // Remove textPath attributes
9798
- textElement.removeAttribute('dx');
9799
- textElement.removeAttribute('dy');
9800
- // Remove ID's:
9801
- path.element.setAttribute('id', '');
9802
- // Check if textElement includes textPath,
9803
- if (this.textPathWrapper &&
9804
- textElement.getElementsByTagName('textPath').length) {
9805
- // Move nodes to <text>
9806
- childNodes = this.textPathWrapper.element.childNodes;
9807
- // Now move all <tspan>'s and text nodes to the <textPath> node
9808
- while (childNodes.length) {
9809
- textElement.appendChild(childNodes[0]);
9810
- }
9811
- // Remove <textPath> from the DOM
9812
- textElement.removeChild(this.textPathWrapper.element);
9813
- }
9814
- }
9815
- else if (elem.getAttribute('dx') || elem.getAttribute('dy')) {
9816
- // Remove textPath attributes from elem
9817
- // to get correct text-outline position
9818
- elem.removeAttribute('dx');
9819
- elem.removeAttribute('dy');
9820
- }
9821
- if (this.textPathWrapper) {
9822
- // Set textPathWrapper to undefined and destroy it
9823
- this.textPathWrapper = this.textPathWrapper.destroy();
9824
- }
9825
- };
9826
9958
  /**
9827
9959
  * @private
9828
9960
  * @function Highcharts.SVGElement#dSettter
@@ -9873,7 +10005,7 @@
9873
10005
  duration: pick(duration, 150),
9874
10006
  complete: function () {
9875
10007
  // #3088, assuming we're only using this for tooltips
9876
- elemWrapper.attr({ y: -9999 }).hide();
10008
+ elemWrapper.hide();
9877
10009
  }
9878
10010
  });
9879
10011
  };
@@ -9918,8 +10050,9 @@
9918
10050
  */
9919
10051
  SVGElement.prototype.getBBox = function (reload, rot) {
9920
10052
  var wrapper = this,
9921
- renderer = wrapper.renderer,
10053
+ alignValue = wrapper.alignValue,
9922
10054
  element = wrapper.element,
10055
+ renderer = wrapper.renderer,
9923
10056
  styles = wrapper.styles,
9924
10057
  textStr = wrapper.textStr,
9925
10058
  cache = renderer.cache,
@@ -9929,7 +10062,7 @@
9929
10062
  wrapper.rotation, 0),
9930
10063
  fontSize = renderer.styledMode ? (element &&
9931
10064
  SVGElement.prototype.getStyle.call(element, 'font-size')) : (styles && styles.fontSize);
9932
- var bBox, // = wrapper.bBox,
10065
+ var bBox,
9933
10066
  width,
9934
10067
  height,
9935
10068
  toggleTextShadowShim,
@@ -9950,6 +10083,7 @@
9950
10083
  rotation,
9951
10084
  fontSize,
9952
10085
  wrapper.textWidth,
10086
+ alignValue,
9953
10087
  styles && styles.textOverflow,
9954
10088
  styles && styles.fontWeight // #12163
9955
10089
  ].join(',');
@@ -9979,9 +10113,12 @@
9979
10113
  // SVG: use extend because IE9 is not allowed to change
9980
10114
  // width and height in case of rotation (below)
9981
10115
  extend({}, element.getBBox()) : {
9982
- // Legacy IE in export mode
10116
+ // HTML elements with `exporting.allowHTML` and
10117
+ // legacy IE in export mode
9983
10118
  width: element.offsetWidth,
9984
- height: element.offsetHeight
10119
+ height: element.offsetHeight,
10120
+ x: 0,
10121
+ y: 0
9985
10122
  };
9986
10123
  // #3842
9987
10124
  if (isFunction(toggleTextShadowShim)) {
@@ -9995,7 +10132,7 @@
9995
10132
  // other condition is for Opera that returns a width of
9996
10133
  // -Infinity on hidden elements.
9997
10134
  if (!bBox || bBox.width < 0) {
9998
- bBox = { width: 0, height: 0 };
10135
+ bBox = { x: 0, y: 0, width: 0, height: 0 };
9999
10136
  }
10000
10137
  // VML Renderer or useHTML within SVG
10001
10138
  }
@@ -10019,16 +10156,40 @@
10019
10156
  bBox.height = height = ({
10020
10157
  '11px,17': 14,
10021
10158
  '13px,20': 16
10022
- }[(fontSize || '') + "," + Math.round(height)] ||
10159
+ }["" + (fontSize || '') + ",".concat(Math.round(height))] ||
10023
10160
  height);
10024
10161
  }
10025
10162
  // Adjust for rotated text
10026
10163
  if (rotation) {
10027
- var rad = rotation * deg2rad;
10028
- bBox.width = Math.abs(height * Math.sin(rad)) +
10029
- Math.abs(width * Math.cos(rad));
10030
- bBox.height = Math.abs(height * Math.cos(rad)) +
10031
- Math.abs(width * Math.sin(rad));
10164
+ var baseline = Number(element.getAttribute('y') || 0) - bBox.y,
10165
+ alignFactor = {
10166
+ 'right': 1,
10167
+ 'center': 0.5
10168
+ }[alignValue || 0] || 0,
10169
+ rad = rotation * deg2rad,
10170
+ rad90 = (rotation - 90) * deg2rad,
10171
+ wCosRad = width * Math.cos(rad),
10172
+ wSinRad = width * Math.sin(rad),
10173
+ cosRad90 = Math.cos(rad90),
10174
+ sinRad90 = Math.sin(rad90),
10175
+ // Find the starting point on the left side baseline of
10176
+ // the text
10177
+ pX = bBox.x + alignFactor * (width - wCosRad),
10178
+ pY = bBox.y + baseline - alignFactor * wSinRad,
10179
+ // Find all corners
10180
+ aX = pX + baseline * cosRad90,
10181
+ bX = aX + wCosRad,
10182
+ cX = bX - height * cosRad90,
10183
+ dX = cX - wCosRad,
10184
+ aY = pY + baseline * sinRad90,
10185
+ bY = aY + wSinRad,
10186
+ cY = bY - height * sinRad90,
10187
+ dY = cY - wSinRad;
10188
+ // Deduct the bounding box from the corners
10189
+ bBox.x = Math.min(aX, bX, cX, dX);
10190
+ bBox.y = Math.min(aY, bY, cY, dY);
10191
+ bBox.width = Math.max(aX, bX, cX, dX) - bBox.x;
10192
+ bBox.height = Math.max(aY, bY, cY, dY) - bBox.y;
10032
10193
  }
10033
10194
  }
10034
10195
  // Cache it. When loading a chart in a hidden iframe in Firefox and
@@ -10087,21 +10248,11 @@
10087
10248
  *
10088
10249
  * @function Highcharts.SVGElement#hide
10089
10250
  *
10090
- * @param {boolean} [hideByTranslation=false]
10091
- * The flag to determine if element should be hidden by moving out
10092
- * of the viewport. Used for example for dataLabels.
10093
- *
10094
10251
  * @return {Highcharts.SVGElement}
10095
10252
  * Returns the SVGElement for chaining.
10096
10253
  */
10097
- SVGElement.prototype.hide = function (hideByTranslation) {
10098
- if (hideByTranslation) {
10099
- this.attr({ y: -9999 });
10100
- }
10101
- else {
10102
- this.attr({ visibility: 'hidden' });
10103
- }
10104
- return this;
10254
+ SVGElement.prototype.hide = function () {
10255
+ return this.attr({ visibility: 'hidden' });
10105
10256
  };
10106
10257
  /**
10107
10258
  * @private
@@ -10215,7 +10366,7 @@
10215
10366
  SVGElement.prototype.removeClass = function (className) {
10216
10367
  return this.attr('class', ('' + this.attr('class'))
10217
10368
  .replace(isString(className) ?
10218
- new RegExp("(^| )" + className + "( |$)") : // #12064, #13590
10369
+ new RegExp("(^| )".concat(className, "( |$)")) : // #12064, #13590
10219
10370
  className, ' ')
10220
10371
  .replace(/ +/g, ' ')
10221
10372
  .trim());
@@ -10272,26 +10423,27 @@
10272
10423
  return this;
10273
10424
  };
10274
10425
  /**
10275
- * @private
10426
+ * Set a text path for a `text` or `label` element, allowing the text to
10427
+ * flow along a path.
10428
+ *
10429
+ * In order to unset the path for an existing element, call `setTextPath`
10430
+ * with `{ enabled: false }` as the second argument.
10431
+ *
10432
+ * @sample highcharts/members/renderer-textpath/ Text path demonstrated
10433
+ *
10276
10434
  * @function Highcharts.SVGElement#setTextPath
10277
- * @param {Highcharts.SVGElement} path
10278
- * Path to follow.
10435
+ *
10436
+ * @param {Highcharts.SVGElement|undefined} path
10437
+ * Path to follow. If undefined, it allows changing options for the
10438
+ * existing path.
10439
+ *
10279
10440
  * @param {Highcharts.DataLabelsTextPathOptionsObject} textPathOptions
10280
- * Options.
10281
- * @return {Highcharts.SVGElement}
10282
- * Returns the SVGElement for chaining.
10441
+ * Options.
10442
+ *
10443
+ * @return {Highcharts.SVGElement} Returns the SVGElement for chaining.
10283
10444
  */
10284
10445
  SVGElement.prototype.setTextPath = function (path, textPathOptions) {
10285
- var elem = this.element,
10286
- textNode = this.text ? this.text.element : elem,
10287
- attribsMap = {
10288
- textAnchor: 'text-anchor'
10289
- };
10290
- var adder = false,
10291
- textPathElement,
10292
- textPathId,
10293
- textPathWrapper = this.textPathWrapper,
10294
- firstTime = !textPathWrapper;
10446
+ var _this = this;
10295
10447
  // Defaults
10296
10448
  textPathOptions = merge(true, {
10297
10449
  enabled: true,
@@ -10301,109 +10453,70 @@
10301
10453
  textAnchor: 'middle'
10302
10454
  }
10303
10455
  }, textPathOptions);
10304
- var attrs = AST.filterUserAttributes(textPathOptions.attributes);
10305
- if (path && textPathOptions && textPathOptions.enabled) {
10306
- // In case of fixed width for a text, string is rebuilt
10307
- // (e.g. ellipsis is applied), so we need to rebuild textPath too
10308
- if (textPathWrapper &&
10309
- textPathWrapper.element.parentNode === null) {
10310
- // When buildText functionality was triggered again
10311
- // and deletes textPathWrapper parentNode
10312
- firstTime = true;
10313
- textPathWrapper = textPathWrapper.destroy();
10314
- }
10315
- else if (textPathWrapper) {
10316
- // Case after drillup when spans were added into
10317
- // the DOM outside the textPathWrapper parentGroup
10318
- this.removeTextOutline.call(textPathWrapper.parentGroup);
10319
- }
10320
- // label() has padding, text() doesn't
10321
- if (this.options && this.options.padding) {
10322
- attrs.dx = -this.options.padding;
10323
- }
10324
- if (!textPathWrapper) {
10325
- // Create <textPath>, defer the DOM adder
10326
- this.textPathWrapper = textPathWrapper =
10327
- this.renderer.createElement('textPath');
10328
- adder = true;
10329
- }
10330
- textPathElement = textPathWrapper.element;
10331
- // Set ID for the path
10332
- textPathId = path.element.getAttribute('id');
10333
- if (!textPathId) {
10334
- path.element.setAttribute('id', textPathId = uniqueKey());
10335
- }
10336
- // Change DOM structure, by placing <textPath> tag in <text>
10337
- if (firstTime) {
10338
- // Adjust the position
10339
- textNode.setAttribute('y', 0); // Firefox
10340
- if (isNumber(attrs.dx)) {
10341
- textNode.setAttribute('x', -attrs.dx);
10342
- }
10343
- // Move all <tspan>'s and text nodes to the <textPath> node. Do
10344
- // not move other elements like <title> or <path>
10345
- var childNodes = [].slice.call(textNode.childNodes);
10346
- for (var i = 0; i < childNodes.length; i++) {
10347
- var childNode = childNodes[i];
10348
- if (childNode.nodeType === win.Node.TEXT_NODE ||
10349
- childNode.nodeName === 'tspan') {
10350
- textPathElement.appendChild(childNode);
10456
+ var url = this.renderer.url,
10457
+ textWrapper = this.text || this,
10458
+ textPath = textWrapper.textPath,
10459
+ attributes = textPathOptions.attributes,
10460
+ enabled = textPathOptions.enabled;
10461
+ path = path || (textPath && textPath.path);
10462
+ // Remove previously added event
10463
+ if (textPath) {
10464
+ textPath.undo();
10465
+ }
10466
+ if (path && enabled) {
10467
+ var undo = addEvent(textWrapper, 'afterModifyTree',
10468
+ function (e) {
10469
+ if (path && enabled) {
10470
+ // Set ID for the path
10471
+ var textPathId = path.attr('id');
10472
+ if (!textPathId) {
10473
+ path.attr('id', textPathId = uniqueKey());
10474
+ }
10475
+ // Set attributes for the <text>
10476
+ var textAttribs = {
10477
+ // dx/dy options must by set on <text> (parent), the
10478
+ // rest should be set on <textPath>
10479
+ x: 0,
10480
+ y: 0
10481
+ };
10482
+ if (defined(attributes.dx)) {
10483
+ textAttribs.dx = attributes.dx;
10484
+ delete attributes.dx;
10485
+ }
10486
+ if (defined(attributes.dy)) {
10487
+ textAttribs.dy = attributes.dy;
10488
+ delete attributes.dy;
10351
10489
  }
10490
+ textWrapper.attr(textAttribs);
10491
+ // Handle label properties
10492
+ _this.attr({ transform: '' });
10493
+ if (_this.box) {
10494
+ _this.box = _this.box.destroy();
10495
+ }
10496
+ // Wrap the nodes in a textPath
10497
+ var children = e.nodes.slice(0);
10498
+ e.nodes.length = 0;
10499
+ e.nodes[0] = {
10500
+ tagName: 'textPath',
10501
+ attributes: extend(attributes, {
10502
+ 'text-anchor': attributes.textAnchor,
10503
+ href: "" + url + "#".concat(textPathId)
10504
+ }),
10505
+ children: children
10506
+ };
10352
10507
  }
10353
- }
10354
- // Add <textPath> to the DOM
10355
- if (adder && textPathWrapper) {
10356
- textPathWrapper.add({ element: textNode });
10357
- }
10358
- // Set basic options:
10359
- // Use `setAttributeNS` because Safari needs this..
10360
- textPathElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', this.renderer.url + '#' + textPathId);
10361
- // Presentation attributes:
10362
- // dx/dy options must by set on <text> (parent),
10363
- // the rest should be set on <textPath>
10364
- if (defined(attrs.dy)) {
10365
- textPathElement.parentNode
10366
- .setAttribute('dy', attrs.dy);
10367
- delete attrs.dy;
10368
- }
10369
- if (defined(attrs.dx)) {
10370
- textPathElement.parentNode
10371
- .setAttribute('dx', attrs.dx);
10372
- delete attrs.dx;
10373
- }
10374
- // Additional attributes
10375
- objectEach(attrs, function (val, key) {
10376
- textPathElement.setAttribute(attribsMap[key] || key, val);
10377
10508
  });
10378
- // Remove translation, text that follows path does not need that
10379
- elem.removeAttribute('transform');
10380
- // Remove shadows and text outlines
10381
- this.removeTextOutline.call(textPathWrapper);
10382
- // Remove background and border for label(), see #10545
10383
- // Alternatively, we can disable setting background rects in
10384
- // series.drawDataLabels()
10385
- if (this.text && !this.renderer.styledMode) {
10386
- this.attr({
10387
- fill: 'none',
10388
- 'stroke-width': 0
10389
- });
10390
- }
10391
- // Disable some functions
10392
- this.updateTransform = noop;
10393
- this.applyTextOutline = noop;
10394
- }
10395
- else if (textPathWrapper) {
10396
- // Reset to prototype
10397
- delete this.updateTransform;
10398
- delete this.applyTextOutline;
10399
- // Restore DOM structure:
10400
- this.destroyTextPath(elem, path);
10401
- // Bring attributes back
10402
- this.updateTransform();
10403
- // Set textOutline back for text()
10404
- if (this.options && this.options.rotation) {
10405
- this.applyTextOutline(this.options.style.textOutline);
10406
- }
10509
+ // Set the reference
10510
+ textWrapper.textPath = { path: path, undo: undo };
10511
+ }
10512
+ else {
10513
+ textWrapper.attr({ dx: 0, dy: 0 });
10514
+ delete textWrapper.textPath;
10515
+ }
10516
+ if (this.added) {
10517
+ // Rebuild text after added
10518
+ textWrapper.textCache = '';
10519
+ this.renderer.buildText(textWrapper);
10407
10520
  }
10408
10521
  return this;
10409
10522
  };
@@ -10440,7 +10553,7 @@
10440
10553
  element = this.element,
10441
10554
  oldShadowOptions = this.oldShadowOptions,
10442
10555
  defaultShadowOptions = {
10443
- color: "#000000" /* neutralColor100 */,
10556
+ color: "#000000" /* Palette.neutralColor100 */,
10444
10557
  offsetX: this.parentInverted ? -1 : 1,
10445
10558
  offsetY: this.parentInverted ? -1 : 1,
10446
10559
  opacity: 0.15,
@@ -10481,14 +10594,14 @@
10481
10594
  else if (!this.shadows) {
10482
10595
  shadowElementOpacity = options.opacity / options.width;
10483
10596
  transform = this.parentInverted ?
10484
- "translate(" + options.offsetY + ", " + options.offsetX + ")" :
10485
- "translate(" + options.offsetX + ", " + options.offsetY + ")";
10597
+ "translate(".concat(options.offsetY, ", ").concat(options.offsetX, ")") :
10598
+ "translate(".concat(options.offsetX, ", ").concat(options.offsetY, ")");
10486
10599
  for (i = 1; i <= options.width; i++) {
10487
10600
  shadow = element.cloneNode(false);
10488
10601
  strokeWidth = (options.width * 2) + 1 - (2 * i);
10489
10602
  attr(shadow, {
10490
10603
  stroke: (shadowOptions.color ||
10491
- "#000000" /* neutralColor100 */),
10604
+ "#000000" /* Palette.neutralColor100 */),
10492
10605
  'stroke-opacity': shadowElementOpacity * i,
10493
10606
  'stroke-width': strokeWidth,
10494
10607
  transform: transform,
@@ -10516,7 +10629,7 @@
10516
10629
  *
10517
10630
  * @function Highcharts.SVGElement#show
10518
10631
  *
10519
- * @param {boolean} [inherit=false]
10632
+ * @param {boolean} [inherit=true]
10520
10633
  * Set the visibility attribute to `inherit` rather than `visible`.
10521
10634
  * The difference is that an element with `visibility="visible"`
10522
10635
  * will be visible even if the parent is hidden.
@@ -10525,6 +10638,7 @@
10525
10638
  * Returns the SVGElement for chaining.
10526
10639
  */
10527
10640
  SVGElement.prototype.show = function (inherit) {
10641
+ if (inherit === void 0) { inherit = true; }
10528
10642
  return this.attr({ visibility: inherit ? 'inherit' : 'visible' });
10529
10643
  };
10530
10644
  /**
@@ -10784,7 +10898,7 @@
10784
10898
  if (defined(scaleX) || defined(scaleY)) {
10785
10899
  transform.push('scale(' + pick(scaleX, 1) + ' ' + pick(scaleY, 1) + ')');
10786
10900
  }
10787
- if (transform.length) {
10901
+ if (transform.length && !(wrapper.text || wrapper).textPath) {
10788
10902
  element.setAttribute('transform', transform.join(' '));
10789
10903
  }
10790
10904
  };
@@ -11035,6 +11149,12 @@
11035
11149
  * @name Highcharts.SVGAttributes#d
11036
11150
  * @type {string|Highcharts.SVGPathArray|undefined}
11037
11151
  */ /**
11152
+ * @name Highcharts.SVGAttributes#dx
11153
+ * @type {number|undefined}
11154
+ */ /**
11155
+ * @name Highcharts.SVGAttributes#dy
11156
+ * @type {number|undefined}
11157
+ */ /**
11038
11158
  * @name Highcharts.SVGAttributes#fill
11039
11159
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject|undefined}
11040
11160
  */ /**
@@ -11447,7 +11567,8 @@
11447
11567
  * the new bounding box and reflect it in the border box.
11448
11568
  */
11449
11569
  SVGLabel.prototype.updateBoxSize = function () {
11450
- var style = this.text.element.style,
11570
+ var text = this.text,
11571
+ style = text.element.style,
11451
11572
  attribs = {},
11452
11573
  padding = this.padding,
11453
11574
  // #12165 error when width is null (auto)
@@ -11455,14 +11576,14 @@
11455
11576
  // #3295 && 3514 box failure when string equals 0
11456
11577
  bBox = this.bBox = (((!isNumber(this.widthSetting) ||
11457
11578
  !isNumber(this.heightSetting) ||
11458
- this.textAlign) && defined(this.text.textStr)) ?
11459
- this.text.getBBox() :
11579
+ this.textAlign) && defined(text.textStr)) ?
11580
+ text.getBBox() :
11460
11581
  SVGLabel.emptyBBox);
11461
11582
  var crispAdjust;
11462
11583
  this.width = this.getPaddedWidth();
11463
11584
  this.height = (this.heightSetting || bBox.height || 0) + 2 * padding;
11464
11585
  var metrics = this.renderer.fontMetrics(style && style.fontSize,
11465
- this.text);
11586
+ text);
11466
11587
  // Update the label-scoped y offset. Math.min because of inline
11467
11588
  // style (#9400)
11468
11589
  this.baselineOffset = padding + Math.min(
@@ -11475,7 +11596,7 @@
11475
11596
  if (this.heightSetting) {
11476
11597
  this.baselineOffset += (this.heightSetting - metrics.h) / 2;
11477
11598
  }
11478
- if (this.needsBox) {
11599
+ if (this.needsBox && !text.textPath) {
11479
11600
  // Create the border box if it is not already present
11480
11601
  if (!this.box) {
11481
11602
  // Symbol definition exists (#5324)
@@ -11505,32 +11626,34 @@
11505
11626
  */
11506
11627
  SVGLabel.prototype.updateTextPadding = function () {
11507
11628
  var text = this.text;
11508
- this.updateBoxSize();
11509
- // Determine y based on the baseline
11510
- var textY = this.baseline ? 0 : this.baselineOffset;
11511
- var textX = pick(this.paddingLeft,
11512
- this.padding);
11513
- // compensate for alignment
11514
- if (defined(this.widthSetting) &&
11515
- this.bBox &&
11516
- (this.textAlign === 'center' || this.textAlign === 'right')) {
11517
- textX += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width);
11518
- }
11519
- // update if anything changed
11520
- if (textX !== text.x || textY !== text.y) {
11521
- text.attr('x', textX);
11522
- // #8159 - prevent misplaced data labels in treemap
11523
- // (useHTML: true)
11524
- if (text.hasBoxWidthChanged) {
11525
- this.bBox = text.getBBox(true);
11526
- }
11527
- if (typeof textY !== 'undefined') {
11528
- text.attr('y', textY);
11529
- }
11530
- }
11531
- // record current values
11532
- text.x = textX;
11533
- text.y = textY;
11629
+ if (!text.textPath) {
11630
+ this.updateBoxSize();
11631
+ // Determine y based on the baseline
11632
+ var textY = this.baseline ? 0 : this.baselineOffset;
11633
+ var textX = pick(this.paddingLeft,
11634
+ this.padding);
11635
+ // compensate for alignment
11636
+ if (defined(this.widthSetting) &&
11637
+ this.bBox &&
11638
+ (this.textAlign === 'center' || this.textAlign === 'right')) {
11639
+ textX += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width);
11640
+ }
11641
+ // update if anything changed
11642
+ if (textX !== text.x || textY !== text.y) {
11643
+ text.attr('x', textX);
11644
+ // #8159 - prevent misplaced data labels in treemap
11645
+ // (useHTML: true)
11646
+ if (text.hasBoxWidthChanged) {
11647
+ this.bBox = text.getBBox(true);
11648
+ }
11649
+ if (typeof textY !== 'undefined') {
11650
+ text.attr('y', textY);
11651
+ }
11652
+ }
11653
+ // record current values
11654
+ text.x = textX;
11655
+ text.y = textY;
11656
+ }
11534
11657
  };
11535
11658
  SVGLabel.prototype.widthSetter = function (value) {
11536
11659
  // width:auto => null
@@ -11832,6 +11955,7 @@
11832
11955
  win = H.win;
11833
11956
  var attr = U.attr,
11834
11957
  extend = U.extend,
11958
+ fireEvent = U.fireEvent,
11835
11959
  isString = U.isString,
11836
11960
  objectEach = U.objectEach,
11837
11961
  pick = U.pick;
@@ -11892,6 +12016,7 @@
11892
12016
  if (!hasMarkup &&
11893
12017
  !this.ellipsis &&
11894
12018
  !this.width &&
12019
+ !wrapper.textPath &&
11895
12020
  (textStr.indexOf(' ') === -1 ||
11896
12021
  (this.noWrap && !regexMatchBreaks.test(textStr)))) {
11897
12022
  textNode.appendChild(doc.createTextNode(this.unescapeEntities(textStr)));
@@ -11908,7 +12033,7 @@
11908
12033
  // Step 2. Do as many as we can of the modifications to the tree
11909
12034
  // structure before it is added to the DOM
11910
12035
  this.modifyTree(ast.nodes);
11911
- ast.addToDOM(wrapper.element);
12036
+ ast.addToDOM(textNode);
11912
12037
  // Step 3. Some modifications can't be done until the structure is
11913
12038
  // in the DOM, because we need to read computed metrics.
11914
12039
  this.modifyDOM();
@@ -12166,6 +12291,7 @@
12166
12291
  }
12167
12292
  };
12168
12293
  nodes.forEach(modifyChild);
12294
+ fireEvent(this.svgElement, 'afterModifyTree', { nodes: nodes });
12169
12295
  };
12170
12296
  /*
12171
12297
  * Truncate the text node contents to a given length. Used when the css
@@ -12179,7 +12305,7 @@
12179
12305
  rotation = svgElement.rotation;
12180
12306
  // Cache the lengths to avoid checking the same twice
12181
12307
  var lengths = [];
12182
- // Word wrap can not be truncated to shorter than one word, ellipsis
12308
+ // Word wrap cannot be truncated to shorter than one word, ellipsis
12183
12309
  // text can be completely blank.
12184
12310
  var minIndex = words ? 1 : 0;
12185
12311
  var maxIndex = (text || words || '').length;
@@ -12497,7 +12623,7 @@
12497
12623
  this.url = this.getReferenceURL();
12498
12624
  // Add description
12499
12625
  var desc = this.createElement('desc').add();
12500
- desc.element.appendChild(doc.createTextNode('Created with Highcharts 10.0.0'));
12626
+ desc.element.appendChild(doc.createTextNode('Created with Highcharts 10.2.1'));
12501
12627
  renderer.defs = this.createElement('defs').add();
12502
12628
  renderer.allowHTML = allowHTML;
12503
12629
  renderer.forExport = forExport;
@@ -12610,7 +12736,7 @@
12610
12736
  id: 'hitme',
12611
12737
  width: 8,
12612
12738
  height: 8,
12613
- 'clip-path': "url(#" + id + ")",
12739
+ 'clip-path': "url(#".concat(id, ")"),
12614
12740
  fill: 'rgba(0,0,0,0.001)'
12615
12741
  }
12616
12742
  }]
@@ -12763,27 +12889,31 @@
12763
12889
  new TextBuilder(wrapper).buildSVG();
12764
12890
  };
12765
12891
  /**
12766
- * Returns white for dark colors and black for bright colors.
12892
+ * Returns white for dark colors and black for bright colors, based on W3C's
12893
+ * definition of [Relative luminance](
12894
+ * https://www.w3.org/WAI/GL/wiki/Relative_luminance).
12767
12895
  *
12768
12896
  * @function Highcharts.SVGRenderer#getContrast
12769
12897
  *
12770
- * @param {Highcharts.ColorString} rgba
12898
+ * @param {Highcharts.ColorString} color
12771
12899
  * The color to get the contrast for.
12772
12900
  *
12773
12901
  * @return {Highcharts.ColorString}
12774
12902
  * The contrast color, either `#000000` or `#FFFFFF`.
12775
12903
  */
12776
- SVGRenderer.prototype.getContrast = function (rgba) {
12777
- rgba = Color.parse(rgba).rgba;
12778
- // The threshold may be discussed. Here's a proposal for adding
12779
- // different weight to the color channels (#6216)
12780
- rgba[0] *= 1; // red
12781
- rgba[1] *= 1.2; // green
12782
- rgba[2] *= 0.5; // blue
12783
- return rgba[0] + rgba[1] + rgba[2] >
12784
- 1.8 * 255 ?
12785
- '#000000' :
12786
- '#FFFFFF';
12904
+ SVGRenderer.prototype.getContrast = function (color) {
12905
+ // #6216, #17273
12906
+ var rgba = Color.parse(color).rgba
12907
+ .map(function (b8) {
12908
+ var c = b8 / 255;
12909
+ return c <= 0.03928 ?
12910
+ c / 12.92 :
12911
+ Math.pow((c + 0.055) / 1.055, 2.4);
12912
+ });
12913
+ // Relative luminance
12914
+ var l = 0.2126 * rgba[0] + 0.7152 * rgba[1] + 0.0722 * rgba[2];
12915
+ // Use white or black based on which provides more contrast
12916
+ return 1.05 / (l + 0.05) > (l + 0.05) / 0.05 ? '#FFFFFF' : '#000000';
12787
12917
  };
12788
12918
  /**
12789
12919
  * Create a button with preset states.
@@ -12808,7 +12938,7 @@
12808
12938
  * @param {Highcharts.SVGAttributes} [hoverState]
12809
12939
  * SVG attributes for the hover state.
12810
12940
  *
12811
- * @param {Highcharts.SVGAttributes} [pressedState]
12941
+ * @param {Highcharts.SVGAttributes} [selectState]
12812
12942
  * SVG attributes for the pressed state.
12813
12943
  *
12814
12944
  * @param {Highcharts.SVGAttributes} [disabledState]
@@ -12818,12 +12948,13 @@
12818
12948
  * The shape type.
12819
12949
  *
12820
12950
  * @param {boolean} [useHTML=false]
12821
- * Wether to use HTML to render the label.
12951
+ * Whether to use HTML to render the label.
12822
12952
  *
12823
12953
  * @return {Highcharts.SVGElement}
12824
12954
  * The button element.
12825
12955
  */
12826
- SVGRenderer.prototype.button = function (text, x, y, callback, theme, hoverState, pressedState, disabledState, shape, useHTML) {
12956
+ SVGRenderer.prototype.button = function (text, x, y, callback, theme, hoverState, selectState, disabledState, shape, useHTML) {
12957
+ if (theme === void 0) { theme = {}; }
12827
12958
  var label = this.label(text,
12828
12959
  x,
12829
12960
  y,
@@ -12832,56 +12963,57 @@
12832
12963
  void 0,
12833
12964
  useHTML,
12834
12965
  void 0, 'button'),
12835
- styledMode = this.styledMode;
12836
- var curState = 0,
12837
- // Make a copy of normalState (#13798)
12838
- // (reference to options.rangeSelector.buttonTheme)
12839
- normalState = theme ? merge(theme) : {};
12966
+ styledMode = this.styledMode,
12967
+ states = theme.states || {};
12968
+ var curState = 0;
12969
+ theme = merge(theme);
12970
+ delete theme.states;
12840
12971
  var normalStyle = merge({
12841
- color: "#333333" /* neutralColor80 */,
12972
+ color: "#333333" /* Palette.neutralColor80 */,
12842
12973
  cursor: 'pointer',
12843
12974
  fontWeight: 'normal'
12844
12975
  },
12845
- normalState.style);
12846
- delete normalState.style;
12847
- // Remove stylable attributes
12848
- normalState = AST.filterUserAttributes(normalState);
12976
+ theme.style);
12977
+ delete theme.style;
12978
+ // Remove stylable attributes. Pass in the ButtonThemeObject and get the
12979
+ // SVGAttributes subset back.
12980
+ var normalState = AST.filterUserAttributes(theme);
12849
12981
  // Default, non-stylable attributes
12850
12982
  label.attr(merge({ padding: 8, r: 2 }, normalState));
12851
12983
  // Presentational. The string type is a mistake, it is just for
12852
12984
  // compliance with SVGAttribute and is not used in button theme.
12853
12985
  var hoverStyle,
12854
- pressedStyle,
12986
+ selectStyle,
12855
12987
  disabledStyle;
12856
12988
  if (!styledMode) {
12857
12989
  // Normal state - prepare the attributes
12858
12990
  normalState = merge({
12859
- fill: "#f7f7f7" /* neutralColor3 */,
12860
- stroke: "#cccccc" /* neutralColor20 */,
12991
+ fill: "#f7f7f7" /* Palette.neutralColor3 */,
12992
+ stroke: "#cccccc" /* Palette.neutralColor20 */,
12861
12993
  'stroke-width': 1
12862
12994
  }, normalState);
12863
12995
  // Hover state
12864
12996
  hoverState = merge(normalState, {
12865
- fill: "#e6e6e6" /* neutralColor10 */
12866
- }, AST.filterUserAttributes(hoverState || {}));
12997
+ fill: "#e6e6e6" /* Palette.neutralColor10 */
12998
+ }, AST.filterUserAttributes(hoverState || states.hover || {}));
12867
12999
  hoverStyle = hoverState.style;
12868
13000
  delete hoverState.style;
12869
13001
  // Pressed state
12870
- pressedState = merge(normalState, {
12871
- fill: "#e6ebf5" /* highlightColor10 */,
13002
+ selectState = merge(normalState, {
13003
+ fill: "#e6ebf5" /* Palette.highlightColor10 */,
12872
13004
  style: {
12873
- color: "#000000" /* neutralColor100 */,
13005
+ color: "#000000" /* Palette.neutralColor100 */,
12874
13006
  fontWeight: 'bold'
12875
13007
  }
12876
- }, AST.filterUserAttributes(pressedState || {}));
12877
- pressedStyle = pressedState.style;
12878
- delete pressedState.style;
13008
+ }, AST.filterUserAttributes(selectState || states.select || {}));
13009
+ selectStyle = selectState.style;
13010
+ delete selectState.style;
12879
13011
  // Disabled state
12880
13012
  disabledState = merge(normalState, {
12881
13013
  style: {
12882
- color: "#cccccc" /* neutralColor20 */
13014
+ color: "#cccccc" /* Palette.neutralColor20 */
12883
13015
  }
12884
- }, AST.filterUserAttributes(disabledState || {}));
13016
+ }, AST.filterUserAttributes(disabledState || states.disabled || {}));
12885
13017
  disabledStyle = disabledState.style;
12886
13018
  delete disabledState.style;
12887
13019
  }
@@ -12912,13 +13044,13 @@
12912
13044
  .attr([
12913
13045
  normalState,
12914
13046
  hoverState,
12915
- pressedState,
13047
+ selectState,
12916
13048
  disabledState
12917
13049
  ][state || 0]);
12918
13050
  var css_1 = [
12919
13051
  normalStyle,
12920
13052
  hoverStyle,
12921
- pressedStyle,
13053
+ selectStyle,
12922
13054
  disabledStyle
12923
13055
  ][state || 0];
12924
13056
  if (isObject(css_1)) {
@@ -13625,7 +13757,7 @@
13625
13757
  */
13626
13758
  SVGRenderer.prototype.fontMetrics = function (fontSize, elem) {
13627
13759
  if ((this.styledMode || !/px/.test(fontSize)) &&
13628
- win.getComputedStyle // old IE doesn't support it
13760
+ (win.getComputedStyle) // old IE doesn't support it
13629
13761
  ) {
13630
13762
  fontSize = elem && SVGElement.prototype.getStyle.call(elem, 'font-size');
13631
13763
  }
@@ -13943,7 +14075,7 @@
13943
14075
  * coordinates it should be pinned to.
13944
14076
  *
13945
14077
  * @param {boolean} [useHTML=false]
13946
- * Wether to use HTML to render the label.
14078
+ * Whether to use HTML to render the label.
13947
14079
  *
13948
14080
  * @param {boolean} [baseline=false]
13949
14081
  * Whether to position the label relative to the text baseline,
@@ -15769,7 +15901,7 @@
15769
15901
  */
15770
15902
  style: {
15771
15903
  /** @internal */
15772
- color: "#666666" /* neutralColor60 */,
15904
+ color: "#666666" /* Palette.neutralColor60 */,
15773
15905
  /** @internal */
15774
15906
  cursor: 'default',
15775
15907
  /** @internal */
@@ -16604,7 +16736,7 @@
16604
16736
  */
16605
16737
  style: {
16606
16738
  /** @internal */
16607
- color: "#666666" /* neutralColor60 */
16739
+ color: "#666666" /* Palette.neutralColor60 */
16608
16740
  }
16609
16741
  },
16610
16742
  /**
@@ -16721,7 +16853,7 @@
16721
16853
  * @type {Highcharts.ColorType}
16722
16854
  * @default #f2f2f2
16723
16855
  */
16724
- minorGridLineColor: "#f2f2f2" /* neutralColor5 */,
16856
+ minorGridLineColor: "#f2f2f2" /* Palette.neutralColor5 */,
16725
16857
  /**
16726
16858
  * Width of the minor, secondary grid lines.
16727
16859
  *
@@ -16747,7 +16879,7 @@
16747
16879
  * @type {Highcharts.ColorType}
16748
16880
  * @default #999999
16749
16881
  */
16750
- minorTickColor: "#999999" /* neutralColor40 */,
16882
+ minorTickColor: "#999999" /* Palette.neutralColor40 */,
16751
16883
  /**
16752
16884
  * The color of the line marking the axis itself.
16753
16885
  *
@@ -16768,7 +16900,7 @@
16768
16900
  * @type {Highcharts.ColorType}
16769
16901
  * @default #ccd6eb
16770
16902
  */
16771
- lineColor: "#ccd6eb" /* highlightColor20 */,
16903
+ lineColor: "#ccd6eb" /* Palette.highlightColor20 */,
16772
16904
  /**
16773
16905
  * The width of the line marking the axis itself.
16774
16906
  *
@@ -16805,7 +16937,7 @@
16805
16937
  * @type {Highcharts.ColorType}
16806
16938
  * @default #e6e6e6
16807
16939
  */
16808
- gridLineColor: "#e6e6e6" /* neutralColor10 */,
16940
+ gridLineColor: "#e6e6e6" /* Palette.neutralColor10 */,
16809
16941
  /**
16810
16942
  * The width of the grid lines extending the ticks across the plot area.
16811
16943
  * Defaults to 1 on the Y axis and 0 on the X axis, except for 3d
@@ -16863,7 +16995,7 @@
16863
16995
  * @type {Highcharts.ColorType}
16864
16996
  * @default #ccd6eb
16865
16997
  */
16866
- tickColor: "#ccd6eb" /* highlightColor20 */
16998
+ tickColor: "#ccd6eb" /* Palette.highlightColor20 */
16867
16999
  // tickWidth: 1
16868
17000
  };
16869
17001
  /**
@@ -17636,7 +17768,7 @@
17636
17768
  formatter: function () {
17637
17769
  var numberFormatter = this.axis.chart.numberFormatter;
17638
17770
  /* eslint-enable valid-jsdoc */
17639
- return numberFormatter(this.total, -1);
17771
+ return numberFormatter(this.total || 0, -1);
17640
17772
  },
17641
17773
  /**
17642
17774
  * CSS styles for the label.
@@ -17653,7 +17785,7 @@
17653
17785
  */
17654
17786
  style: {
17655
17787
  /** @internal */
17656
- color: "#000000" /* neutralColor100 */,
17788
+ color: "#000000" /* Palette.neutralColor100 */,
17657
17789
  /** @internal */
17658
17790
  fontSize: '11px',
17659
17791
  /** @internal */
@@ -17943,7 +18075,8 @@
17943
18075
  dateTimeLabelFormat = dateTimeLabelFormats.main;
17944
18076
  }
17945
18077
  else if (isNumber(value)) { // #1441
17946
- dateTimeLabelFormat = axis.dateTime.getXDateFormat(value, (options.dateTimeLabelFormats || {}));
18078
+ dateTimeLabelFormat = axis.dateTime.getXDateFormat(value, options.dateTimeLabelFormats ||
18079
+ {});
17947
18080
  }
17948
18081
  }
17949
18082
  // set properties for access in render method
@@ -18111,8 +18244,8 @@
18111
18244
  pos = {
18112
18245
  x: horiz ?
18113
18246
  correctFloat(axis.translate(tickPos + tickmarkOffset,
18114
- null,
18115
- null,
18247
+ void 0,
18248
+ void 0,
18116
18249
  old) +
18117
18250
  axis.transB) :
18118
18251
  (axis.left +
@@ -18130,8 +18263,8 @@
18130
18263
  (axis.opposite ? axis.height : 0)) :
18131
18264
  correctFloat(cHeight -
18132
18265
  axis.translate(tickPos + tickmarkOffset,
18133
- null,
18134
- null,
18266
+ void 0,
18267
+ void 0,
18135
18268
  old) -
18136
18269
  axis.transB)
18137
18270
  };
@@ -18159,20 +18292,23 @@
18159
18292
  -axis.labelOffset * (axis.labelAlign === 'center' ? 0.5 : 1) :
18160
18293
  0),
18161
18294
  pos = {};
18162
- var yOffset = labelOptions.y,
18295
+ var yOffset,
18163
18296
  line;
18164
- if (!defined(yOffset)) {
18165
- if (axis.side === 0) {
18166
- yOffset = label.rotation ? -8 : -label.getBBox().height;
18167
- }
18168
- else if (axis.side === 2) {
18169
- yOffset = rotCorr.y + 8;
18170
- }
18171
- else {
18172
- // #3140, #3140
18173
- yOffset = Math.cos(label.rotation * deg2rad) *
18174
- (rotCorr.y - label.getBBox(false, 0).height / 2);
18175
- }
18297
+ if (axis.side === 0) {
18298
+ yOffset = label.rotation ? -8 : -label.getBBox().height;
18299
+ }
18300
+ else if (axis.side === 2) {
18301
+ yOffset = rotCorr.y + 8;
18302
+ }
18303
+ else {
18304
+ // #3140, #3140
18305
+ yOffset = Math.cos(label.rotation * deg2rad) *
18306
+ (rotCorr.y - label.getBBox(false, 0).height / 2);
18307
+ }
18308
+ if (defined(labelOptions.y)) {
18309
+ yOffset = axis.side === 0 && axis.horiz ?
18310
+ labelOptions.y + yOffset :
18311
+ labelOptions.y;
18176
18312
  }
18177
18313
  x = x +
18178
18314
  labelOptions.x +
@@ -18563,11 +18699,11 @@
18563
18699
  // Set the new position, and show or hide
18564
18700
  if (show && isNumber(xy.y)) {
18565
18701
  xy.opacity = opacity;
18566
- label[tick.isNewLabel ? 'attr' : 'animate'](xy);
18702
+ label[tick.isNewLabel ? 'attr' : 'animate'](xy).show(true);
18567
18703
  tick.isNewLabel = false;
18568
18704
  }
18569
18705
  else {
18570
- label.attr('y', -9999); // #1338
18706
+ label.hide(); // #1338, #15863
18571
18707
  tick.isNewLabel = true;
18572
18708
  }
18573
18709
  }
@@ -18667,7 +18803,6 @@
18667
18803
  error = U.error,
18668
18804
  extend = U.extend,
18669
18805
  fireEvent = U.fireEvent,
18670
- getMagnitude = U.getMagnitude,
18671
18806
  isArray = U.isArray,
18672
18807
  isNumber = U.isNumber,
18673
18808
  isString = U.isString,
@@ -18679,6 +18814,16 @@
18679
18814
  removeEvent = U.removeEvent,
18680
18815
  splat = U.splat,
18681
18816
  syncTimeout = U.syncTimeout;
18817
+ var getNormalizedTickInterval = function (axis,
18818
+ tickInterval) { return normalizeTickInterval(tickInterval,
18819
+ void 0,
18820
+ void 0,
18821
+ pick(axis.options.allowDecimals,
18822
+ // If the tick interval is greather than 0.5, avoid decimals, as
18823
+ // linear axes are often used to render discrete values (#3363). If
18824
+ // a tick amount is set, allow decimals by default, as it increases
18825
+ // the chances for a good fit.
18826
+ tickInterval < 0.5 || axis.tickAmount !== void 0), !!axis.tickAmount); };
18682
18827
  /* *
18683
18828
  *
18684
18829
  * Class
@@ -19044,7 +19189,7 @@
19044
19189
  multi,
19045
19190
  ret;
19046
19191
  if (categories) {
19047
- ret = "" + this.value;
19192
+ ret = "".concat(this.value);
19048
19193
  }
19049
19194
  else if (dateTimeLabelFormat) { // datetime axis
19050
19195
  ret = time.dateFormat(dateTimeLabelFormat, value);
@@ -19120,7 +19265,6 @@
19120
19265
  if (axis.isXAxis) {
19121
19266
  xData = series.xData;
19122
19267
  if (xData.length) {
19123
- var isPositive = function (number) { return number > 0; };
19124
19268
  xData = axis.logarithmic ?
19125
19269
  xData.filter(axis.validatePositiveValue) :
19126
19270
  xData;
@@ -19189,8 +19333,11 @@
19189
19333
  */
19190
19334
  Axis.prototype.translate = function (val, backwards, cvsCoord, old, handleLog, pointPlacement) {
19191
19335
  var axis = (this.linkedParent || this), // #1417
19192
- localMin = old && axis.old ? axis.old.min : axis.min,
19193
- minPixelPadding = axis.minPixelPadding,
19336
+ localMin = (old && axis.old ? axis.old.min : axis.min);
19337
+ if (!isNumber(localMin)) {
19338
+ return NaN;
19339
+ }
19340
+ var minPixelPadding = axis.minPixelPadding,
19194
19341
  doPostTranslate = (axis.isOrdinal ||
19195
19342
  axis.brokenAxis && axis.brokenAxis.hasBreaks ||
19196
19343
  (axis.logarithmic && handleLog)) && axis.lin2val;
@@ -19228,14 +19375,10 @@
19228
19375
  val = axis.val2lin(val);
19229
19376
  }
19230
19377
  var value = sign * (val - localMin) * localA;
19231
- returnValue = isNumber(localMin) ?
19232
- ((!axis.isRadial ? correctFloat(value) : value) +
19233
- cvsOffset +
19234
- (sign * minPixelPadding) +
19235
- (isNumber(pointPlacement) ?
19236
- localA * pointPlacement :
19237
- 0)) :
19238
- void 0;
19378
+ returnValue = (!axis.isRadial ? correctFloat(value) : value) +
19379
+ cvsOffset +
19380
+ (sign * minPixelPadding) +
19381
+ (isNumber(pointPlacement) ? localA * pointPlacement : 0);
19239
19382
  }
19240
19383
  return returnValue;
19241
19384
  };
@@ -19255,7 +19398,7 @@
19255
19398
  * Pixel position of the value on the chart or axis.
19256
19399
  */
19257
19400
  Axis.prototype.toPixels = function (value, paneCoordinates) {
19258
- return this.translate(value, false, !this.horiz, null, true) +
19401
+ return this.translate(value, false, !this.horiz, void 0, true) +
19259
19402
  (paneCoordinates ? 0 : this.pos);
19260
19403
  };
19261
19404
  /**
@@ -19275,7 +19418,7 @@
19275
19418
  * The axis value.
19276
19419
  */
19277
19420
  Axis.prototype.toValue = function (pixel, paneCoordinates) {
19278
- return this.translate(pixel - (paneCoordinates ? 0 : this.pos), true, !this.horiz, null, true);
19421
+ return this.translate(pixel - (paneCoordinates ? 0 : this.pos), true, !this.horiz, void 0, true);
19279
19422
  };
19280
19423
  /**
19281
19424
  * Create the path for a plot line that goes from the given value on
@@ -19334,7 +19477,7 @@
19334
19477
  translatedValue: translatedValue
19335
19478
  };
19336
19479
  fireEvent(this, 'getPlotLinePath', evt, function (e) {
19337
- translatedValue = pick(translatedValue, axis.translate(value, null, null, old));
19480
+ translatedValue = pick(translatedValue, axis.translate(value, void 0, void 0, old));
19338
19481
  // Keep the translated value within sane bounds, and avoid Infinity
19339
19482
  // to fail the isNumber test (#7709).
19340
19483
  translatedValue = clamp(translatedValue, -1e5, 1e5);
@@ -19649,6 +19792,9 @@
19649
19792
  // Backwards mapping is much faster than array searching (#7725)
19650
19793
  this.names.keys[point.name] = x;
19651
19794
  }
19795
+ else if (point.x) {
19796
+ x = point.x; // #17438
19797
+ }
19652
19798
  return x;
19653
19799
  };
19654
19800
  /**
@@ -20031,15 +20177,9 @@
20031
20177
  if (!tickIntervalOption && axis.tickInterval < minTickInterval) {
20032
20178
  axis.tickInterval = minTickInterval;
20033
20179
  }
20034
- // for linear axes, get magnitude and normalize the interval
20180
+ // For linear axes, normalize the interval
20035
20181
  if (!axis.dateTime && !axis.logarithmic && !tickIntervalOption) {
20036
- axis.tickInterval = normalizeTickInterval(axis.tickInterval, void 0, getMagnitude(axis.tickInterval), pick(options.allowDecimals,
20037
- // If the tick interval is greather than 0.5, avoid
20038
- // decimals, as linear axes are often used to render
20039
- // discrete values. #3363. If a tick amount is set, allow
20040
- // decimals by default, as it increases the chances for a
20041
- // good fit.
20042
- axis.tickInterval < 0.5 || this.tickAmount !== void 0), !!this.tickAmount);
20182
+ axis.tickInterval = getNormalizedTickInterval(axis, axis.tickInterval);
20043
20183
  }
20044
20184
  // Prevent ticks from getting so close that we can't draw the labels
20045
20185
  if (!this.tickAmount) {
@@ -20124,7 +20264,21 @@
20124
20264
  tickPositions = axis.logarithmic.getLogTickPositions(this.tickInterval, this.min, this.max);
20125
20265
  }
20126
20266
  else {
20127
- tickPositions = this.getLinearTickPositions(this.tickInterval, this.min, this.max);
20267
+ var startingTickInterval = this.tickInterval;
20268
+ var adjustedTickInterval = startingTickInterval;
20269
+ while (adjustedTickInterval <= startingTickInterval * 2) {
20270
+ tickPositions = this.getLinearTickPositions(this.tickInterval, this.min, this.max);
20271
+ // If there are more tick positions than the set tickAmount,
20272
+ // increase the tickInterval and continue until it fits.
20273
+ // (#17100)
20274
+ if (this.tickAmount &&
20275
+ tickPositions.length > this.tickAmount) {
20276
+ this.tickInterval = getNormalizedTickInterval(this, adjustedTickInterval *= 1.1);
20277
+ }
20278
+ else {
20279
+ break;
20280
+ }
20281
+ }
20128
20282
  }
20129
20283
  // Too dense ticks, keep only the first and last (#4477)
20130
20284
  if (tickPositions.length > this.len) {
@@ -20448,11 +20602,6 @@
20448
20602
  }
20449
20603
  }
20450
20604
  adjustExtremes();
20451
- // We have too many ticks, run second pass to try to reduce ticks
20452
- }
20453
- else if (currentTickAmount > tickAmount) {
20454
- axis.tickInterval *= 2;
20455
- axis.setTickPositions();
20456
20605
  }
20457
20606
  // The finalTickAmt property is set in getTickAmount
20458
20607
  if (defined(finalTickAmt)) {
@@ -20719,7 +20868,7 @@
20719
20868
  * @param {number} threshold
20720
20869
  * The threshold in axis values.
20721
20870
  *
20722
- * @return {number|undefined}
20871
+ * @return {number}
20723
20872
  * The translated threshold position in terms of pixels, and corrected to
20724
20873
  * stay within the axis bounds.
20725
20874
  */
@@ -21215,12 +21364,10 @@
21215
21364
  axis.staggerLines = (axis.horiz && labelOptions.staggerLines) || void 0;
21216
21365
  // Create the axisGroup and gridGroup elements on first iteration
21217
21366
  if (!axis.axisGroup) {
21218
- var createGroup = function (name,
21219
- suffix,
21220
- zIndex) { return renderer.g(name)
21367
+ var createGroup = function (name, suffix, zIndex) { return renderer.g(name)
21221
21368
  .attr({ zIndex: zIndex })
21222
- .addClass("highcharts-" + coll.toLowerCase() + suffix + " " +
21223
- (_this.isRadial ? "highcharts-radial-axis" + suffix + " " : '') +
21369
+ .addClass("highcharts-".concat(coll.toLowerCase()).concat(suffix, " ") +
21370
+ (_this.isRadial ? "highcharts-radial-axis".concat(suffix, " ") : '') +
21224
21371
  (className || ''))
21225
21372
  .add(axisParent); };
21226
21373
  axis.gridGroup = createGroup('grid', '-grid', options.gridZIndex);
@@ -21408,18 +21555,18 @@
21408
21555
  // The part of a multiline text that is below the baseline of the
21409
21556
  // first line. Subtract 1 to preserve pixel-perfectness from the
21410
21557
  // old behaviour (v5.0.12), where only one line was allowed.
21411
- textHeightOvershoot = Math.max(axisTitle.getBBox(null, 0).height - fontMetrics.h - 1, 0),
21558
+ textHeightOvershoot = axisTitle ? Math.max(axisTitle.getBBox(false, 0).height - fontMetrics.h - 1, 0) : 0,
21412
21559
  // the position in the length direction of the axis
21413
- alongAxis = {
21560
+ alongAxis = ({
21414
21561
  low: margin + (horiz ? 0 : axisLength),
21415
21562
  middle: margin + axisLength / 2,
21416
21563
  high: margin + (horiz ? axisLength : 0)
21417
- }[axisTitleOptions.align],
21564
+ })[axisTitleOptions.align],
21418
21565
  // the position in the perpendicular direction of the axis
21419
21566
  offAxis = (horiz ? axisTop + this.height : axisLeft) +
21420
21567
  (horiz ? 1 : -1) * // horizontal axis reverses the margin
21421
21568
  (opposite ? -1 : 1) * // so does opposite axes
21422
- this.axisTitleMargin +
21569
+ (this.axisTitleMargin || 0) +
21423
21570
  [
21424
21571
  -textHeightOvershoot,
21425
21572
  textHeightOvershoot,
@@ -21643,14 +21790,8 @@
21643
21790
  }
21644
21791
  if (axisTitle && showAxis) {
21645
21792
  var titleXy = axis.getTitlePosition();
21646
- if (isNumber(titleXy.y)) {
21647
- axisTitle[axisTitle.isNew ? 'attr' : 'animate'](titleXy);
21648
- axisTitle.isNew = false;
21649
- }
21650
- else {
21651
- axisTitle.attr('y', -9999);
21652
- axisTitle.isNew = true;
21653
- }
21793
+ axisTitle[axisTitle.isNew ? 'attr' : 'animate'](titleXy);
21794
+ axisTitle.isNew = false;
21654
21795
  }
21655
21796
  // Stacked totals:
21656
21797
  if (stackLabelOptions && stackLabelOptions.enabled && axis.stacking) {
@@ -21846,10 +21987,10 @@
21846
21987
  stroke: options.color ||
21847
21988
  (categorized ?
21848
21989
  Color
21849
- .parse("#ccd6eb" /* highlightColor20 */)
21990
+ .parse("#ccd6eb" /* Palette.highlightColor20 */)
21850
21991
  .setOpacity(0.25)
21851
21992
  .get() :
21852
- "#cccccc" /* neutralColor20 */),
21993
+ "#cccccc" /* Palette.neutralColor20 */),
21853
21994
  'stroke-width': pick(options.width, 1)
21854
21995
  }).css({
21855
21996
  'pointer-events': 'none'
@@ -22454,10 +22595,13 @@
22454
22595
  * @private
22455
22596
  */
22456
22597
  Additions.prototype.getXDateFormat = function (x, dateTimeLabelFormats) {
22457
- var axis = this.axis;
22598
+ var axis = this.axis,
22599
+ time = axis.chart.time;
22458
22600
  return axis.closestPointRange ?
22459
- axis.chart.time.getDateFormat(axis.closestPointRange, x, axis.options.startOfWeek, dateTimeLabelFormats) || dateTimeLabelFormats.year : // #2546, 2581
22460
- dateTimeLabelFormats.day;
22601
+ time.getDateFormat(axis.closestPointRange, x, axis.options.startOfWeek, dateTimeLabelFormats) ||
22602
+ // #2546, 2581
22603
+ time.resolveDTLFormat(dateTimeLabelFormats.year).main :
22604
+ time.resolveDTLFormat(dateTimeLabelFormats.day).main;
22461
22605
  };
22462
22606
  return Additions;
22463
22607
  }());
@@ -22658,7 +22802,7 @@
22658
22802
  axisLength;
22659
22803
  interval = pick(filteredTickIntervalOption, log.minorAutoInterval, (realMax - realMin) *
22660
22804
  tickPixelIntervalOption / (totalPixelLength || 1));
22661
- interval = normalizeTickInterval(interval, void 0, getMagnitude(interval));
22805
+ interval = normalizeTickInterval(interval);
22662
22806
  positions = axis.getLinearTickPositions(interval, realMin, realMax).map(log.log2lin);
22663
22807
  if (!minor) {
22664
22808
  log.minorAutoInterval = interval / 5;
@@ -23092,7 +23236,7 @@
23092
23236
  // Set the presentational attributes
23093
23237
  if (!axis.chart.styledMode) {
23094
23238
  if (isLine) {
23095
- attribs.stroke = color || "#999999" /* neutralColor40 */;
23239
+ attribs.stroke = color || "#999999" /* Palette.neutralColor40 */;
23096
23240
  attribs['stroke-width'] = pick(options.width, 1);
23097
23241
  if (options.dashStyle) {
23098
23242
  attribs.dashstyle =
@@ -23100,7 +23244,7 @@
23100
23244
  }
23101
23245
  }
23102
23246
  else if (isBand) { // plot band
23103
- attribs.fill = color || "#e6ebf5" /* highlightColor10 */;
23247
+ attribs.fill = color || "#e6ebf5" /* Palette.highlightColor10 */;
23104
23248
  if (options.borderWidth) {
23105
23249
  attribs.stroke = options.borderColor;
23106
23250
  attribs['stroke-width'] = options.borderWidth;
@@ -23158,7 +23302,7 @@
23158
23302
  }
23159
23303
  else if (svgElem) {
23160
23304
  if (path) {
23161
- svgElem.show(true);
23305
+ svgElem.show();
23162
23306
  svgElem.animate({ d: path });
23163
23307
  }
23164
23308
  else if (svgElem.d) {
@@ -24300,11 +24444,22 @@
24300
24444
  return this.label;
24301
24445
  };
24302
24446
  /**
24303
- * Place the tooltip in a chart without spilling over
24304
- * and not covering the point it self.
24447
+ * Place the tooltip in a chart without spilling over and not covering the
24448
+ * point itself.
24305
24449
  *
24306
- * @private
24307
24450
  * @function Highcharts.Tooltip#getPosition
24451
+ *
24452
+ * @param {number} boxWidth
24453
+ * Width of the tooltip box.
24454
+ *
24455
+ * @param {number} boxHeight
24456
+ * Height of the tooltip box.
24457
+ *
24458
+ * @param {Highcharts.Point} point
24459
+ * Tooltip related point.
24460
+ *
24461
+ * @return {Highcharts.PositionObject}
24462
+ * Recommended position of the tooltip.
24308
24463
  */
24309
24464
  Tooltip.prototype.getPosition = function (boxWidth, boxHeight, point) {
24310
24465
  var chart = this.chart,
@@ -24749,7 +24904,7 @@
24749
24904
  stroke: (options.borderColor ||
24750
24905
  point.color ||
24751
24906
  currentSeries.color ||
24752
- "#666666" /* neutralColor60 */)
24907
+ "#666666" /* Palette.neutralColor60 */)
24753
24908
  });
24754
24909
  }
24755
24910
  tooltip.updatePosition({
@@ -24949,7 +25104,7 @@
24949
25104
  stroke: (options.borderColor ||
24950
25105
  point.color ||
24951
25106
  series.color ||
24952
- "#333333" /* neutralColor80 */)
25107
+ "#333333" /* Palette.neutralColor80 */)
24953
25108
  });
24954
25109
  }
24955
25110
  return tt;
@@ -25287,7 +25442,7 @@
25287
25442
  // scale transform/css zoom. #11329.
25288
25443
  if (chartPosition.scaleX !== 1 || chartPosition.scaleY !== 1) {
25289
25444
  css(this.container, {
25290
- transform: "scale(" + chartPosition.scaleX + ", " + chartPosition.scaleY + ")"
25445
+ transform: "scale(".concat(chartPosition.scaleX, ", ").concat(chartPosition.scaleY, ")")
25291
25446
  });
25292
25447
  anchorX *= chartPosition.scaleX;
25293
25448
  anchorY *= chartPosition.scaleY;
@@ -25445,7 +25600,7 @@
25445
25600
  * point. For other axes it holds the X value.
25446
25601
  *
25447
25602
  * @name Highcharts.Point#category
25448
- * @type {string}
25603
+ * @type {number|string}
25449
25604
  */
25450
25605
  this.category = void 0;
25451
25606
  /**
@@ -25515,6 +25670,15 @@
25515
25670
  * @type {Highcharts.Series}
25516
25671
  */
25517
25672
  this.series = void 0;
25673
+ /**
25674
+ * The attributes of the rendered SVG shape like in `column` or `pie`
25675
+ * series.
25676
+ *
25677
+ * @readonly
25678
+ * @name Highcharts.Point#shapeArgs
25679
+ * @type {Readonly<Highcharts.SVGAttributes>|undefined}
25680
+ */
25681
+ this.shapeArgs = void 0;
25518
25682
  /**
25519
25683
  * The total of values in either a stack for stacked series, or a pie in a
25520
25684
  * pie series.
@@ -25800,7 +25964,7 @@
25800
25964
  props.push('graphic', 'upperGraphic', 'shadowGroup');
25801
25965
  }
25802
25966
  if (kinds.dataLabel) {
25803
- props.push('dataLabel', 'dataLabelUpper', 'connector');
25967
+ props.push('dataLabel', 'dataLabelPath', 'dataLabelUpper', 'connector');
25804
25968
  }
25805
25969
  i = props.length;
25806
25970
  while (i--) {
@@ -26973,7 +27137,7 @@
26973
27137
  if (!chart.styledMode) {
26974
27138
  selectionMarker.attr({
26975
27139
  fill: (chartOptions.selectionMarkerFill ||
26976
- color("#335cad" /* highlightColor80 */)
27140
+ color("#335cad" /* Palette.highlightColor80 */)
26977
27141
  .setOpacity(0.25).get())
26978
27142
  });
26979
27143
  }
@@ -27316,10 +27480,8 @@
27316
27480
  // Only search on hovered series if it has stickyTracking false
27317
27481
  [hoverSeries] :
27318
27482
  // Filter what series to look in.
27319
- series.filter(function (s) {
27320
- return eventArgs.filter ? eventArgs.filter(s) : filter(s) &&
27321
- s.stickyTracking;
27322
- });
27483
+ series.filter(function (s) { return s.stickyTracking &&
27484
+ (eventArgs.filter || filter)(s); });
27323
27485
  // Use existing hovered point or find the one closest to coordinates.
27324
27486
  var hoverPoint = useExisting || !e ?
27325
27487
  existingHoverPoint :
@@ -27347,8 +27509,8 @@
27347
27509
  * Boost returns a minimal point. Convert it to a usable
27348
27510
  * point for tooltip and states.
27349
27511
  */
27350
- if (s.chart.isBoosting) {
27351
- point = s.getPoint(point);
27512
+ if (s.boosted && s.boost) {
27513
+ point = s.boost.getPoint(point);
27352
27514
  }
27353
27515
  hoverPoints.push(point);
27354
27516
  }
@@ -28252,7 +28414,7 @@
28252
28414
  * @function Highcharts.Pointer#touchSelect
28253
28415
  */
28254
28416
  Pointer.prototype.touchSelect = function (e) {
28255
- return Boolean(this.chart.options.chart.zoomBySingleTouch &&
28417
+ return Boolean(this.chart.options.chart.zooming.singleTouch &&
28256
28418
  e.touches &&
28257
28419
  e.touches.length === 1);
28258
28420
  };
@@ -28266,12 +28428,12 @@
28266
28428
  var chart = this.chart,
28267
28429
  options = chart.options.chart,
28268
28430
  inverted = chart.inverted;
28269
- var zoomType = options.zoomType || '',
28431
+ var zoomType = options.zooming.type || '',
28270
28432
  zoomX,
28271
28433
  zoomY;
28272
28434
  // Look for the pinchType option
28273
28435
  if (/touch/.test(e.type)) {
28274
- zoomType = pick(options.pinchType, zoomType);
28436
+ zoomType = pick(options.zooming.pinchType, zoomType);
28275
28437
  }
28276
28438
  this.zoomX = zoomX = /x/.test(zoomType);
28277
28439
  this.zoomY = zoomY = /y/.test(zoomType);
@@ -29046,7 +29208,7 @@
29046
29208
  item.series :
29047
29209
  item,
29048
29210
  seriesOptions = series.options,
29049
- showCheckbox = legend.createCheckboxForItem &&
29211
+ showCheckbox = (legend.createCheckboxForItem) &&
29050
29212
  seriesOptions &&
29051
29213
  seriesOptions.showCheckbox,
29052
29214
  useHTML = options.useHTML,
@@ -29317,7 +29479,7 @@
29317
29479
  }
29318
29480
  }, this);
29319
29481
  distribute(boxes, chart.plotHeight).forEach(function (box) {
29320
- if (box.item._legendItemPos) {
29482
+ if (box.item._legendItemPos && box.pos) {
29321
29483
  box.item._legendItemPos[1] =
29322
29484
  chart.plotTop - chart.spacing[0] + box.pos;
29323
29485
  }
@@ -29445,7 +29607,7 @@
29445
29607
  }, box.strokeWidth()));
29446
29608
  }
29447
29609
  // hide the border if no items
29448
- box[display ? 'show' : 'hide']();
29610
+ legendGroup[display ? 'show' : 'hide']();
29449
29611
  // Open for responsiveness
29450
29612
  if (chart.styledMode && legendGroup.getStyle('display') === 'none') {
29451
29613
  legendWidth = legendHeight = 0;
@@ -29684,7 +29846,7 @@
29684
29846
  this.nav.attr({
29685
29847
  translateX: padding,
29686
29848
  translateY: clipHeight + this.padding + 7 + this.titleHeight,
29687
- visibility: 'visible'
29849
+ visibility: 'inherit'
29688
29850
  });
29689
29851
  [this.up, this.upTracker].forEach(function (elem) {
29690
29852
  elem.attr({
@@ -30005,46 +30167,23 @@
30005
30167
  * Functions
30006
30168
  *
30007
30169
  * */
30008
- /* eslint-disable valid-jsdoc */
30009
- /**
30010
- * Internal function to initialize an individual series.
30011
- * @private
30012
- */
30013
- function getSeries(chart, options) {
30014
- if (options === void 0) { options = {}; }
30015
- var optionsChart = chart.options.chart,
30016
- type = (options.type ||
30017
- optionsChart.type ||
30018
- optionsChart.defaultSeriesType ||
30019
- ''),
30020
- SeriesClass = SeriesRegistry.seriesTypes[type];
30021
- // No such series type
30022
- if (!SeriesRegistry) {
30023
- error(17, true, chart, { missingModuleFor: type });
30024
- }
30025
- var series = new SeriesClass();
30026
- if (typeof series.init === 'function') {
30027
- series.init(chart, options);
30028
- }
30029
- return series;
30030
- }
30031
- SeriesRegistry.getSeries = getSeries;
30032
30170
  /**
30033
30171
  * Registers class pattern of a series.
30034
30172
  *
30035
30173
  * @private
30036
30174
  */
30037
- function registerSeriesType(seriesType, seriesClass) {
30175
+ function registerSeriesType(seriesType, SeriesClass) {
30038
30176
  var defaultPlotOptions = defaultOptions.plotOptions || {},
30039
- seriesOptions = seriesClass.defaultOptions;
30040
- if (!seriesClass.prototype.pointClass) {
30041
- seriesClass.prototype.pointClass = Point;
30177
+ seriesOptions = SeriesClass.defaultOptions,
30178
+ seriesProto = SeriesClass.prototype;
30179
+ seriesProto.type = seriesType;
30180
+ if (!seriesProto.pointClass) {
30181
+ seriesProto.pointClass = Point;
30042
30182
  }
30043
- seriesClass.prototype.type = seriesType;
30044
30183
  if (seriesOptions) {
30045
30184
  defaultPlotOptions[seriesType] = seriesOptions;
30046
30185
  }
30047
- SeriesRegistry.seriesTypes[seriesType] = seriesClass;
30186
+ SeriesRegistry.seriesTypes[seriesType] = SeriesClass;
30048
30187
  }
30049
30188
  SeriesRegistry.registerSeriesType = registerSeriesType;
30050
30189
  /**
@@ -30089,7 +30228,6 @@
30089
30228
  return SeriesRegistry.seriesTypes[type];
30090
30229
  }
30091
30230
  SeriesRegistry.seriesType = seriesType;
30092
- /* eslint-enable valid-jsdoc */
30093
30231
  })(SeriesRegistry || (SeriesRegistry = {}));
30094
30232
  /* *
30095
30233
  *
@@ -30136,7 +30274,6 @@
30136
30274
  fireEvent = U.fireEvent,
30137
30275
  getStyle = U.getStyle,
30138
30276
  isArray = U.isArray,
30139
- isFunction = U.isFunction,
30140
30277
  isNumber = U.isNumber,
30141
30278
  isObject = U.isObject,
30142
30279
  isString = U.isString,
@@ -30339,6 +30476,15 @@
30339
30476
  this.labelCollectors = [];
30340
30477
  this.callback = callback;
30341
30478
  this.isResizing = 0;
30479
+ var zooming = optionsChart.zooming = optionsChart.zooming || {};
30480
+ // Other options have no default so just pick
30481
+ if (userOptions.chart && !userOptions.chart.zooming) {
30482
+ zooming.resetButton = optionsChart.resetZoomButton;
30483
+ }
30484
+ zooming.key = pick(zooming.key, optionsChart.zoomKey);
30485
+ zooming.pinchType = pick(zooming.pinchType, optionsChart.pinchType);
30486
+ zooming.singleTouch = pick(zooming.singleTouch, optionsChart.zoomBySingleTouch);
30487
+ zooming.type = pick(zooming.type, optionsChart.zoomType);
30342
30488
  /**
30343
30489
  * The options structure for the chart after merging
30344
30490
  * {@link #defaultOptions} and {@link #userOptions}. It contains
@@ -30898,10 +31044,10 @@
30898
31044
  var chart = this;
30899
31045
  // Default style
30900
31046
  var style = name === 'title' ? {
30901
- color: "#333333" /* neutralColor80 */,
31047
+ color: "#333333" /* Palette.neutralColor80 */,
30902
31048
  fontSize: this.options.isStock ? '16px' : '18px' // #2944
30903
31049
  } : {
30904
- color: "#666666" /* neutralColor60 */
31050
+ color: "#666666" /* Palette.neutralColor60 */
30905
31051
  };
30906
31052
  // Merge default options with explicit options
30907
31053
  var options = this.options[name] = merge(
@@ -32182,9 +32328,32 @@
32182
32328
  if (defined(this.index)) {
32183
32329
  this.setReflow(this.options.chart.reflow);
32184
32330
  }
32331
+ this.warnIfA11yModuleNotLoaded();
32185
32332
  // Don't run again
32186
32333
  this.hasLoaded = true;
32187
32334
  };
32335
+ /**
32336
+ * Emit console warning if the a11y module is not loaded.
32337
+ */
32338
+ Chart.prototype.warnIfA11yModuleNotLoaded = function () {
32339
+ var _a = this,
32340
+ options = _a.options,
32341
+ title = _a.title;
32342
+ if (options && !this.accessibility) {
32343
+ // Make chart behave as an image with the title as alt text
32344
+ this.renderer.boxWrapper.attr({
32345
+ role: 'img',
32346
+ 'aria-label': (title && title.element.textContent) || ''
32347
+ });
32348
+ if (!(options.accessibility && options.accessibility.enabled === false)) {
32349
+ error('Highcharts warning: Consider including the ' +
32350
+ '"accessibility.js" module to make your chart more ' +
32351
+ 'usable for people with disabilities. Set the ' +
32352
+ '"accessibility.enabled" option to false to remove this ' +
32353
+ 'warning. See https://www.highcharts.com/docs/accessibility/accessibility-module.', false, this);
32354
+ }
32355
+ }
32356
+ };
32188
32357
  /**
32189
32358
  * Add a series to the chart after render time. Note that this method should
32190
32359
  * never be used when adding data synchronously at chart render time, as it
@@ -32747,9 +32916,8 @@
32747
32916
  Chart.prototype.showResetZoom = function () {
32748
32917
  var chart = this,
32749
32918
  lang = defaultOptions.lang,
32750
- btnOptions = chart.options.chart.resetZoomButton,
32919
+ btnOptions = chart.options.chart.zooming.resetButton,
32751
32920
  theme = btnOptions.theme,
32752
- states = theme.states,
32753
32921
  alignTo = (btnOptions.relativeTo === 'chart' ||
32754
32922
  btnOptions.relativeTo === 'spacingBox' ?
32755
32923
  null :
@@ -32762,7 +32930,7 @@
32762
32930
  }
32763
32931
  fireEvent(this, 'beforeShowResetZoom', null, function () {
32764
32932
  chart.resetZoomButton = chart.renderer
32765
- .button(lang.resetZoom, null, null, zoomOut, theme, states && states.hover)
32933
+ .button(lang.resetZoom, null, null, zoomOut, theme)
32766
32934
  .attr({
32767
32935
  align: btnOptions.position.align,
32768
32936
  title: lang.resetZoomTitle
@@ -32863,9 +33031,7 @@
32863
33031
  enabled: panning,
32864
33032
  type: 'x'
32865
33033
  }),
32866
- chartOptions = chart.options.chart,
32867
- hasMapNavigation = chart.options.mapNavigation &&
32868
- chart.options.mapNavigation.enabled;
33034
+ chartOptions = chart.options.chart;
32869
33035
  if (chartOptions && chartOptions.panning) {
32870
33036
  chartOptions.panning = panningOptions;
32871
33037
  }
@@ -32960,7 +33126,6 @@
32960
33126
  newMax <= paddedMax) {
32961
33127
  axis.setExtremes(newMin, newMax, false, false, { trigger: 'pan' });
32962
33128
  if (!chart.resetZoomButton &&
32963
- !hasMapNavigation &&
32964
33129
  // Show reset zoom button only when both newMin and
32965
33130
  // newMax values are between padded axis range.
32966
33131
  newMin !== paddedMin &&
@@ -32996,6 +33161,8 @@
32996
33161
  *
32997
33162
  * Note: We need to define these references after initializers are bound to
32998
33163
  * chart's prototype.
33164
+ *
33165
+ * @private
32999
33166
  */
33000
33167
  collectionsWithInit: {
33001
33168
  // collectionName: [ initializingMethod, [extraArguments] ]
@@ -33006,6 +33173,7 @@
33006
33173
  /**
33007
33174
  * These collections (arrays) implement update() methods with support for
33008
33175
  * one-to-one option.
33176
+ * @private
33009
33177
  */
33010
33178
  collectionsWithUpdate: [
33011
33179
  'xAxis',
@@ -33015,6 +33183,7 @@
33015
33183
  /**
33016
33184
  * These properties cause isDirtyBox to be set to true when updating. Can be
33017
33185
  * extended from plugins.
33186
+ * @private
33018
33187
  */
33019
33188
  propsRequireDirtyBox: [
33020
33189
  'backgroundColor',
@@ -33031,7 +33200,7 @@
33031
33200
  /**
33032
33201
  * These properties require a full reflow of chart elements, best
33033
33202
  * implemented through running `Chart.setSize` internally (#8190).
33034
- * @type {Array}
33203
+ * @private
33035
33204
  */
33036
33205
  propsRequireReflow: [
33037
33206
  'margin',
@@ -33048,6 +33217,7 @@
33048
33217
  /**
33049
33218
  * These properties cause all series to be updated when updating. Can be
33050
33219
  * extended from plugins.
33220
+ * @private
33051
33221
  */
33052
33222
  propsRequireUpdateSeries: [
33053
33223
  'chart.inverted',
@@ -33720,6 +33890,9 @@
33720
33890
  /**
33721
33891
  * The line cap used for line ends and line joins on the graph.
33722
33892
  *
33893
+ * @sample highcharts/series-line/linecap/
33894
+ * Line cap comparison
33895
+ *
33723
33896
  * @type {Highcharts.SeriesLinecapValue}
33724
33897
  * @default round
33725
33898
  * @product highcharts highstock
@@ -34291,7 +34464,7 @@
34291
34464
  *
34292
34465
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
34293
34466
  */
34294
- lineColor: "#ffffff" /* backgroundColor */,
34467
+ lineColor: "#ffffff" /* Palette.backgroundColor */,
34295
34468
  /**
34296
34469
  * The width of the point marker's outline.
34297
34470
  *
@@ -34491,7 +34664,7 @@
34491
34664
  *
34492
34665
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
34493
34666
  */
34494
- fillColor: "#cccccc" /* neutralColor20 */,
34667
+ fillColor: "#cccccc" /* Palette.neutralColor20 */,
34495
34668
  /**
34496
34669
  * The color of the point marker's outline. When
34497
34670
  * `undefined`, the series' or point's color is used.
@@ -34501,7 +34674,7 @@
34501
34674
  *
34502
34675
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
34503
34676
  */
34504
- lineColor: "#000000" /* neutralColor100 */,
34677
+ lineColor: "#000000" /* Palette.neutralColor100 */,
34505
34678
  /**
34506
34679
  * The width of the point marker's outline.
34507
34680
  *
@@ -35121,13 +35294,13 @@
35121
35294
  */
35122
35295
  x: 0,
35123
35296
  /**
35124
- * The Z index of the data labels. The default Z index puts it above
35125
- * the series. Use a Z index of 2 to display it behind the series.
35297
+ * The z index of the data labels. Use a `zIndex` of 6 to display it above
35298
+ * the series, or use a `zIndex` of 2 to display it behind the series.
35126
35299
  *
35127
35300
  * @type {number}
35128
35301
  * @default 6
35129
35302
  * @since 2.3.5
35130
- * @apioption plotOptions.series.dataLabels.z
35303
+ * @apioption plotOptions.series.dataLabels.zIndex
35131
35304
  */
35132
35305
  /**
35133
35306
  * The y position offset of the label relative to the point in
@@ -35565,6 +35738,8 @@
35565
35738
  *
35566
35739
  * @sample highcharts/coloraxis/custom-color-key/
35567
35740
  * Custom color key
35741
+ * @sample highcharts/coloraxis/color-key-with-stops/
35742
+ * Custom colorKey with color axis stops
35568
35743
  * @sample highcharts/coloraxis/changed-default-color-key/
35569
35744
  * Changed default color key
35570
35745
  *
@@ -35606,7 +35781,7 @@
35606
35781
 
35607
35782
  return seriesDefaults;
35608
35783
  });
35609
- _registerModule(_modules, 'Core/Series/Series.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Foundation.js'], _modules['Core/Globals.js'], _modules['Core/Legend/LegendSymbol.js'], _modules['Core/Series/Point.js'], _modules['Core/Series/SeriesDefaults.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (A, D, F, H, LegendSymbol, Point, SeriesDefaults, SeriesRegistry, SVGElement, U) {
35784
+ _registerModule(_modules, 'Core/Series/Series.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Foundation.js'], _modules['Core/Globals.js'], _modules['Core/Legend/LegendSymbol.js'], _modules['Core/Series/Point.js'], _modules['Core/Series/SeriesDefaults.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (A, DO, F, H, LegendSymbol, Point, SeriesDefaults, SeriesRegistry, SVGElement, U) {
35610
35785
  /* *
35611
35786
  *
35612
35787
  * (c) 2010-2021 Torstein Honsi
@@ -35618,7 +35793,7 @@
35618
35793
  * */
35619
35794
  var animObject = A.animObject,
35620
35795
  setAnimation = A.setAnimation;
35621
- var defaultOptions = D.defaultOptions;
35796
+ var defaultOptions = DO.defaultOptions;
35622
35797
  var registerEventOptions = F.registerEventOptions;
35623
35798
  var hasTouch = H.hasTouch,
35624
35799
  svg = H.svg,
@@ -36217,7 +36392,7 @@
36217
36392
  this.getCyclic('color');
36218
36393
  }
36219
36394
  else if (this.options.colorByPoint) {
36220
- this.color = "#cccccc" /* neutralColor20 */;
36395
+ this.color = "#cccccc" /* Palette.neutralColor20 */;
36221
36396
  }
36222
36397
  else {
36223
36398
  this.getCyclic('color', this.options.color ||
@@ -36317,7 +36492,7 @@
36317
36492
  };
36318
36493
  /**
36319
36494
  * Internal function called from setData. If the point count is the same
36320
- * as is was, or if there are overlapping X values, just run
36495
+ * as it was, or if there are overlapping X values, just run
36321
36496
  * Point.update which is cheaper, allows animation, and keeps references
36322
36497
  * to points. This also allows adding or removing points if the X-es
36323
36498
  * don't match.
@@ -36404,7 +36579,7 @@
36404
36579
  data.forEach(function (point, i) {
36405
36580
  // .update doesn't exist on a linked, hidden series (#3709)
36406
36581
  // (#10187)
36407
- if (point !== oldData[i].y && oldData[i].update) {
36582
+ if (point !== oldData[i].y && (oldData[i].update)) {
36408
36583
  oldData[i].update(point, false, null, false);
36409
36584
  }
36410
36585
  });
@@ -36483,6 +36658,7 @@
36483
36658
  * `false` to prevent.
36484
36659
  */
36485
36660
  Series.prototype.setData = function (data, redraw, animation, updatePoints) {
36661
+ if (redraw === void 0) { redraw = true; }
36486
36662
  var series = this,
36487
36663
  oldData = series.points,
36488
36664
  oldDataLength = (oldData && oldData.length) || 0,
@@ -36501,16 +36677,27 @@
36501
36677
  updatedData,
36502
36678
  indexOfX = 0,
36503
36679
  indexOfY = 1,
36504
- firstPoint = null;
36505
- data = data || [];
36680
+ firstPoint = null,
36681
+ copiedData;
36682
+ if (!chart.options.chart.allowMutatingData) { // #4259
36683
+ // Remove old reference
36684
+ if (options.data) {
36685
+ delete series.options.data;
36686
+ }
36687
+ if (series.userOptions.data) {
36688
+ delete series.userOptions.data;
36689
+ }
36690
+ copiedData = merge(true, data);
36691
+ }
36692
+ data = copiedData || data || [];
36506
36693
  var dataLength = data.length;
36507
- redraw = pick(redraw, true);
36508
36694
  if (dataSorting && dataSorting.enabled) {
36509
36695
  data = this.sortData(data);
36510
36696
  }
36511
36697
  // First try to run Point.update which is cheaper, allows animation,
36512
36698
  // and keeps references to points.
36513
- if (updatePoints !== false &&
36699
+ if (chart.options.chart.allowMutatingData &&
36700
+ updatePoints !== false &&
36514
36701
  dataLength &&
36515
36702
  oldDataLength &&
36516
36703
  !series.cropped &&
@@ -36518,7 +36705,7 @@
36518
36705
  series.visible &&
36519
36706
  // Soft updating has no benefit in boost, and causes JS error
36520
36707
  // (#8355)
36521
- !series.isSeriesBoosting) {
36708
+ !series.boosted) {
36522
36709
  updatedData = this.updateData(data, animation);
36523
36710
  }
36524
36711
  if (!updatedData) {
@@ -36611,7 +36798,7 @@
36611
36798
  // destroy old points
36612
36799
  i = oldDataLength;
36613
36800
  while (i--) {
36614
- if (oldData[i] && oldData[i].destroy) {
36801
+ if (oldData[i] && (oldData[i].destroy)) {
36615
36802
  oldData[i].destroy();
36616
36803
  }
36617
36804
  }
@@ -36909,26 +37096,6 @@
36909
37096
  else {
36910
37097
  // splat the y data in case of ohlc data array
36911
37098
  point = (new PointClass()).init(series, [processedXData[i]].concat(splat(processedYData[i])));
36912
- /**
36913
- * Highcharts Stock only. If a point object is created by data
36914
- * grouping, it doesn't reflect actual points in the raw
36915
- * data. In this case, the `dataGroup` property holds
36916
- * information that points back to the raw data.
36917
- *
36918
- * - `dataGroup.start` is the index of the first raw data
36919
- * point in the group.
36920
- *
36921
- * - `dataGroup.length` is the amount of points in the
36922
- * group.
36923
- *
36924
- * @product highstock
36925
- *
36926
- * @name Highcharts.Point#dataGroup
36927
- * @type {Highcharts.DataGroupingInfoObject|undefined}
36928
- *
36929
- * @sample stock/members/point-datagroup
36930
- * Click to inspect raw data points
36931
- */
36932
37099
  point.dataGroup = series.groupMap[groupCropStartIndex + i];
36933
37100
  if (point.dataGroup.options) {
36934
37101
  point.options = point.dataGroup.options;
@@ -37503,7 +37670,7 @@
37503
37670
  this.setClip();
37504
37671
  // Destroy temporary clip rectangles that are no longer in use
37505
37672
  objectEach(this.chart.sharedClips, function (clip, key, sharedClips) {
37506
- if (clip && !_this.chart.container.querySelector("[clip-path=\"url(#" + clip.id + ")\"]")) {
37673
+ if (clip && !_this.chart.container.querySelector("[clip-path=\"url(#".concat(clip.id, ")\"]"))) {
37507
37674
  clip.destroy();
37508
37675
  delete sharedClips[key];
37509
37676
  }
@@ -37821,8 +37988,8 @@
37821
37988
  clips = (this.clips || []),
37822
37989
  graph = this.graph,
37823
37990
  area = this.area,
37824
- chartSizeMax = Math.max(chart.chartWidth,
37825
- chart.chartHeight),
37991
+ plotSizeMax = Math.max(chart.plotWidth,
37992
+ chart.plotHeight),
37826
37993
  axis = this[(this.zoneAxis || 'y') + 'Axis'],
37827
37994
  inverted = chart.inverted;
37828
37995
  var translatedFrom,
@@ -37859,8 +38026,8 @@
37859
38026
  translatedFrom = reversed ?
37860
38027
  (horiz ? chart.plotWidth : 0) :
37861
38028
  (horiz ? 0 : (axis.toPixels(extremes.min) || 0));
37862
- translatedFrom = clamp(pick(translatedTo, translatedFrom), 0, chartSizeMax);
37863
- translatedTo = clamp(Math.round(axis.toPixels(pick(threshold.value, extremes.max), true) || 0), 0, chartSizeMax);
38029
+ translatedFrom = clamp(pick(translatedTo, translatedFrom), 0, plotSizeMax);
38030
+ translatedTo = clamp(Math.round(axis.toPixels(pick(threshold.value, extremes.max), true) || 0), 0, plotSizeMax);
37864
38031
  if (ignoreZones) {
37865
38032
  translatedFrom = translatedTo =
37866
38033
  axis.toPixels(extremes.max);
@@ -37873,7 +38040,7 @@
37873
38040
  x: inverted ? pxPosMax : pxPosMin,
37874
38041
  y: 0,
37875
38042
  width: pxRange,
37876
- height: chartSizeMax
38043
+ height: plotSizeMax
37877
38044
  };
37878
38045
  if (!horiz) {
37879
38046
  clipAttr.x = chart.plotHeight - clipAttr.x;
@@ -37883,7 +38050,7 @@
37883
38050
  clipAttr = {
37884
38051
  x: 0,
37885
38052
  y: inverted ? pxPosMax : pxPosMin,
37886
- width: chartSizeMax,
38053
+ width: plotSizeMax,
37887
38054
  height: pxRange
37888
38055
  };
37889
38056
  if (horiz) {
@@ -37941,10 +38108,10 @@
37941
38108
  else if (series.visible) {
37942
38109
  // If zones were removed, restore graph and area
37943
38110
  if (graph) {
37944
- graph.show(true);
38111
+ graph.show();
37945
38112
  }
37946
38113
  if (area) {
37947
- area.show(true);
38114
+ area.show();
37948
38115
  }
37949
38116
  }
37950
38117
  };
@@ -38337,7 +38504,7 @@
38337
38504
  }
38338
38505
  if (tree[sideB]) {
38339
38506
  // compare distance to current best to splitting point to
38340
- // decide wether to check side B or not
38507
+ // decide whether to check side B or not
38341
38508
  if (Math.sqrt(tdist * tdist) < ret[kdComparer]) {
38342
38509
  nPoint2 = _search(search, tree[sideB], depth + 1, dimensions);
38343
38510
  ret = (nPoint2[kdComparer] <
@@ -38438,7 +38605,7 @@
38438
38605
  else if (series.graph) { // create
38439
38606
  series.tracker = renderer.path(trackerPath)
38440
38607
  .attr({
38441
- visibility: series.visible ? 'visible' : 'hidden',
38608
+ visibility: series.visible ? 'inherit' : 'hidden',
38442
38609
  zIndex: 2
38443
38610
  })
38444
38611
  .addClass(trackByArea ?
@@ -38577,7 +38744,7 @@
38577
38744
  }
38578
38745
  // Shift the first point off the parallel arrays
38579
38746
  if (shift) {
38580
- if (data[0] && data[0].remove) {
38747
+ if (data[0] && (data[0].remove)) {
38581
38748
  data[0].remove(false);
38582
38749
  }
38583
38750
  else {
@@ -38782,7 +38949,8 @@
38782
38949
  series.hasOptionChanged('keys'));
38783
38950
  newType = newType || initialType;
38784
38951
  if (keepPoints) {
38785
- preserve.push('data', 'isDirtyData', 'points', 'processedXData', 'processedYData', 'xIncrement', 'cropped', '_hasPointMarkers', '_hasPointLabels', 'clips', // #15420
38952
+ preserve.push('data', 'isDirtyData', 'points', 'processedData', // #17057
38953
+ 'processedXData', 'processedYData', 'xIncrement', 'cropped', '_hasPointMarkers', '_hasPointLabels', 'clips', // #15420
38786
38954
  // Networkgraph (#14397)
38787
38955
  'nodes', 'layout',
38788
38956
  // Treemap
@@ -39265,6 +39433,31 @@
39265
39433
  return this.chart.isInsidePlot(plotX, plotY, options);
39266
39434
  };
39267
39435
  Series.defaultOptions = SeriesDefaults;
39436
+ /**
39437
+ * Registry of all available series types.
39438
+ *
39439
+ * @name Highcharts.Series.types
39440
+ * @type {Highcharts.Dictionary<typeof_Highcharts.Series>}
39441
+ */
39442
+ Series.types = SeriesRegistry.seriesTypes;
39443
+ /* *
39444
+ *
39445
+ * Static Functions
39446
+ *
39447
+ * */
39448
+ /**
39449
+ * Registers a series class to be accessible via `Series.types`.
39450
+ *
39451
+ * @function Highcharts.Series.registerType
39452
+ *
39453
+ * @param {string} seriesType
39454
+ * The series type as an identifier string in lower case.
39455
+ *
39456
+ * @param {Function} SeriesClass
39457
+ * The series class as a class pattern or a constructor function with
39458
+ * prototype.
39459
+ */
39460
+ Series.registerType = SeriesRegistry.registerSeriesType;
39268
39461
  return Series;
39269
39462
  }());
39270
39463
  extend(Series.prototype, {
@@ -39677,6 +39870,7 @@
39677
39870
  var stop = A.stop;
39678
39871
  var addEvent = U.addEvent,
39679
39872
  createElement = U.createElement,
39873
+ defined = U.defined,
39680
39874
  merge = U.merge,
39681
39875
  pick = U.pick;
39682
39876
  /* eslint-disable no-invalid-this, valid-jsdoc */
@@ -39710,7 +39904,7 @@
39710
39904
  }
39711
39905
  else if (scrollableMinHeight) {
39712
39906
  this.scrollablePixelsY = scrollablePixelsY = Math.max(0, scrollableMinHeight - this.chartHeight);
39713
- if (scrollablePixelsY) {
39907
+ if (defined(scrollablePixelsY)) {
39714
39908
  this.scrollablePlotBox = (this.renderer.scrollablePlotBox = merge(this.plotBox));
39715
39909
  this.plotBox.height = this.plotHeight += scrollablePixelsY;
39716
39910
  if (this.inverted) {
@@ -39845,7 +40039,7 @@
39845
40039
  axisClass = '.highcharts-yaxis';
39846
40040
  }
39847
40041
  if (axisClass) {
39848
- fixedSelectors.push(axisClass + ":not(.highcharts-radial-axis)", axisClass + "-labels:not(.highcharts-radial-axis-labels)");
40042
+ fixedSelectors.push("" + axisClass + ":not(.highcharts-radial-axis)", "" + axisClass + "-labels:not(.highcharts-radial-axis-labels)");
39849
40043
  }
39850
40044
  fixedSelectors.forEach(function (className) {
39851
40045
  [].forEach.call(container.querySelectorAll(className), function (elem) {
@@ -40012,7 +40206,7 @@
40012
40206
  * Scrollable plot area
40013
40207
  * @sample highcharts/chart/scrollable-plotarea-vertical
40014
40208
  * Vertically scrollable plot area
40015
- * @sample {gantt} highcharts/chart/scrollable-plotarea-vertical
40209
+ * @sample {gantt} gantt/chart/scrollable-plotarea-vertical
40016
40210
  * Gantt chart with vertically scrollable plot area
40017
40211
  *
40018
40212
  * @since 6.1.0
@@ -40067,238 +40261,7 @@
40067
40261
  (''); // keep doclets above in transpiled file
40068
40262
 
40069
40263
  });
40070
- _registerModule(_modules, 'Core/Axis/StackingAxis.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Axis/Axis.js'], _modules['Core/Utilities.js']], function (A, Axis, U) {
40071
- /* *
40072
- *
40073
- * (c) 2010-2021 Torstein Honsi
40074
- *
40075
- * License: www.highcharts.com/license
40076
- *
40077
- * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
40078
- *
40079
- * */
40080
- var getDeferredAnimation = A.getDeferredAnimation;
40081
- var addEvent = U.addEvent,
40082
- destroyObjectProperties = U.destroyObjectProperties,
40083
- fireEvent = U.fireEvent,
40084
- isNumber = U.isNumber,
40085
- objectEach = U.objectEach;
40086
- /* *
40087
- *
40088
- * Composition
40089
- *
40090
- * */
40091
- /**
40092
- * @private
40093
- */
40094
- var StackingAxis;
40095
- (function (StackingAxis) {
40096
- /* *
40097
- *
40098
- * Declarations
40099
- *
40100
- * */
40101
- /* *
40102
- *
40103
- * Constants
40104
- *
40105
- * */
40106
- var composedClasses = [];
40107
- /* *
40108
- *
40109
- * Functions
40110
- *
40111
- * */
40112
- /* eslint-disable valid-jsdoc */
40113
- /**
40114
- * Extends axis with stacking support.
40115
- * @private
40116
- */
40117
- function compose(AxisClass) {
40118
- if (composedClasses.indexOf(AxisClass) === -1) {
40119
- composedClasses.push(AxisClass);
40120
- addEvent(AxisClass, 'init', onInit);
40121
- addEvent(AxisClass, 'destroy', onDestroy);
40122
- }
40123
- return AxisClass;
40124
- }
40125
- StackingAxis.compose = compose;
40126
- /**
40127
- * @private
40128
- */
40129
- function onDestroy() {
40130
- var stacking = this.stacking;
40131
- if (!stacking) {
40132
- return;
40133
- }
40134
- var stacks = stacking.stacks;
40135
- // Destroy each stack total
40136
- objectEach(stacks, function (stack, stackKey) {
40137
- destroyObjectProperties(stack);
40138
- stacks[stackKey] = null;
40139
- });
40140
- if (stacking &&
40141
- stacking.stackTotalGroup) {
40142
- stacking.stackTotalGroup.destroy();
40143
- }
40144
- }
40145
- /**
40146
- * @private
40147
- */
40148
- function onInit() {
40149
- var axis = this;
40150
- if (!axis.stacking) {
40151
- axis.stacking = new Additions(axis);
40152
- }
40153
- }
40154
- /* *
40155
- *
40156
- * Class
40157
- *
40158
- * */
40159
- /**
40160
- * Adds stacking support to axes.
40161
- * @private
40162
- * @class
40163
- */
40164
- var Additions = /** @class */ (function () {
40165
- /* *
40166
- *
40167
- * Constructors
40168
- *
40169
- * */
40170
- function Additions(axis) {
40171
- this.oldStacks = {};
40172
- this.stacks = {};
40173
- this.stacksTouched = 0;
40174
- this.axis = axis;
40175
- }
40176
- /* *
40177
- *
40178
- * Functions
40179
- *
40180
- * */
40181
- /**
40182
- * Build the stacks from top down
40183
- * @private
40184
- */
40185
- Additions.prototype.buildStacks = function () {
40186
- var stacking = this;
40187
- var axis = stacking.axis;
40188
- var axisSeries = axis.series;
40189
- var reversedStacks = axis.options.reversedStacks;
40190
- var len = axisSeries.length;
40191
- var actualSeries,
40192
- i;
40193
- if (!axis.isXAxis) {
40194
- stacking.usePercentage = false;
40195
- i = len;
40196
- while (i--) {
40197
- actualSeries = axisSeries[reversedStacks ? i : len - i - 1];
40198
- actualSeries.setStackedPoints();
40199
- actualSeries.setGroupedPoints();
40200
- }
40201
- // Loop up again to compute percent and stream stack
40202
- for (i = 0; i < len; i++) {
40203
- axisSeries[i].modifyStacks();
40204
- }
40205
- fireEvent(axis, 'afterBuildStacks');
40206
- }
40207
- };
40208
- /**
40209
- * @private
40210
- */
40211
- Additions.prototype.cleanStacks = function () {
40212
- var stacking = this,
40213
- axis = stacking.axis;
40214
- var stacks;
40215
- if (!axis.isXAxis) {
40216
- if (stacking.oldStacks) {
40217
- stacks = stacking.stacks = stacking.oldStacks;
40218
- }
40219
- // reset stacks
40220
- objectEach(stacks, function (type) {
40221
- objectEach(type, function (stack) {
40222
- stack.cumulative = stack.total;
40223
- });
40224
- });
40225
- }
40226
- };
40227
- /**
40228
- * Set all the stacks to initial states and destroy unused ones.
40229
- * @private
40230
- */
40231
- Additions.prototype.resetStacks = function () {
40232
- var stacking = this,
40233
- axis = stacking.axis,
40234
- stacks = stacking.stacks;
40235
- if (!axis.isXAxis) {
40236
- objectEach(stacks, function (type) {
40237
- objectEach(type, function (stack, x) {
40238
- // Clean up memory after point deletion (#1044, #4320)
40239
- if (isNumber(stack.touched) &&
40240
- stack.touched < stacking.stacksTouched) {
40241
- stack.destroy();
40242
- delete type[x];
40243
- // Reset stacks
40244
- }
40245
- else {
40246
- stack.total = null;
40247
- stack.cumulative = null;
40248
- }
40249
- });
40250
- });
40251
- }
40252
- };
40253
- /**
40254
- * @private
40255
- */
40256
- Additions.prototype.renderStackTotals = function () {
40257
- var stacking = this,
40258
- axis = stacking.axis,
40259
- chart = axis.chart,
40260
- renderer = chart.renderer,
40261
- stacks = stacking.stacks,
40262
- stackLabelsAnim = axis.options.stackLabels &&
40263
- axis.options.stackLabels.animation,
40264
- animationConfig = getDeferredAnimation(chart,
40265
- stackLabelsAnim || false),
40266
- stackTotalGroup = stacking.stackTotalGroup = (stacking.stackTotalGroup ||
40267
- renderer
40268
- .g('stack-labels')
40269
- .attr({
40270
- visibility: 'visible',
40271
- zIndex: 6,
40272
- opacity: 0
40273
- })
40274
- .add());
40275
- // plotLeft/Top will change when y axis gets wider so we need to
40276
- // translate the stackTotalGroup at every render call. See bug #506
40277
- // and #516
40278
- stackTotalGroup.translate(chart.plotLeft, chart.plotTop);
40279
- // Render each stack total
40280
- objectEach(stacks, function (type) {
40281
- objectEach(type, function (stack) {
40282
- stack.render(stackTotalGroup);
40283
- });
40284
- });
40285
- stackTotalGroup.animate({
40286
- opacity: 1
40287
- }, animationConfig);
40288
- };
40289
- return Additions;
40290
- }());
40291
- StackingAxis.Additions = Additions;
40292
- })(StackingAxis || (StackingAxis = {}));
40293
- /* *
40294
- *
40295
- * Default Export
40296
- *
40297
- * */
40298
-
40299
- return StackingAxis;
40300
- });
40301
- _registerModule(_modules, 'Extensions/Stacking.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/FormatUtilities.js'], _modules['Core/Globals.js'], _modules['Core/Series/Series.js'], _modules['Core/Axis/StackingAxis.js'], _modules['Core/Utilities.js']], function (Axis, Chart, F, H, Series, StackingAxis, U) {
40264
+ _registerModule(_modules, 'Core/Axis/Stacking/StackItem.js', [_modules['Core/FormatUtilities.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (FU, SeriesRegistry, U) {
40302
40265
  /* *
40303
40266
  *
40304
40267
  * (c) 2010-2021 Torstein Honsi
@@ -40308,34 +40271,28 @@
40308
40271
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
40309
40272
  *
40310
40273
  * */
40311
- var format = F.format;
40312
- var correctFloat = U.correctFloat,
40313
- defined = U.defined,
40274
+ var format = FU.format;
40275
+ var Series = SeriesRegistry.series;
40276
+ var defined = U.defined,
40314
40277
  destroyObjectProperties = U.destroyObjectProperties,
40315
- isArray = U.isArray,
40316
40278
  isNumber = U.isNumber,
40317
- objectEach = U.objectEach,
40318
40279
  pick = U.pick;
40319
40280
  /* *
40320
40281
  *
40321
40282
  * Class
40322
40283
  *
40323
40284
  * */
40324
- /* eslint-disable no-invalid-this, valid-jsdoc */
40325
40285
  /**
40326
40286
  * The class for stacks. Each stack, on a specific X value and either negative
40327
40287
  * or positive, has its own stack item.
40328
- *
40329
40288
  * @private
40330
- * @class
40331
- * @name Highcharts.StackItem
40332
- * @param {Highcharts.Axis} axis
40333
- * @param {Highcharts.YAxisStackLabelsOptions} options
40334
- * @param {boolean} isNegative
40335
- * @param {number} x
40336
- * @param {Highcharts.OptionsStackingValue} [stackOption]
40337
40289
  */
40338
40290
  var StackItem = /** @class */ (function () {
40291
+ /* *
40292
+ *
40293
+ * Constructor
40294
+ *
40295
+ * */
40339
40296
  function StackItem(axis, options, isNegative, x, stackOption) {
40340
40297
  var inverted = axis.chart.inverted;
40341
40298
  this.axis = axis;
@@ -40347,6 +40304,7 @@
40347
40304
  this.x = x;
40348
40305
  // Initialize total value
40349
40306
  this.total = null;
40307
+ this.cumulative = null;
40350
40308
  // This will keep each points' extremes stored by series.index and point
40351
40309
  // index
40352
40310
  this.points = {};
@@ -40372,23 +40330,18 @@
40372
40330
  }
40373
40331
  /**
40374
40332
  * @private
40375
- * @function Highcharts.StackItem#destroy
40376
40333
  */
40377
40334
  StackItem.prototype.destroy = function () {
40378
40335
  destroyObjectProperties(this, this.axis);
40379
40336
  };
40380
40337
  /**
40381
40338
  * Renders the stack total label and adds it to the stack label group.
40382
- *
40383
40339
  * @private
40384
- * @function Highcharts.StackItem#render
40385
- * @param {Highcharts.SVGElement} group
40386
40340
  */
40387
40341
  StackItem.prototype.render = function (group) {
40388
40342
  var chart = this.axis.chart,
40389
40343
  options = this.options,
40390
40344
  formatOption = options.format,
40391
- attr = {},
40392
40345
  str = formatOption ? // format the text in the label
40393
40346
  format(formatOption,
40394
40347
  this,
@@ -40403,14 +40356,14 @@
40403
40356
  // Create new label
40404
40357
  this.label = chart.renderer
40405
40358
  .label(str, null, null, options.shape, null, null, options.useHTML, false, 'stack-labels');
40406
- attr = {
40407
- r: options.borderRadius || 0,
40408
- text: str,
40409
- rotation: options.rotation,
40410
- // set default padding to 5 as it is in datalabels #12308
40411
- padding: pick(options.padding, 5),
40412
- visibility: 'hidden' // hidden until setOffset is called
40413
- };
40359
+ var attr = {
40360
+ r: options.borderRadius || 0,
40361
+ text: str,
40362
+ rotation: options.rotation,
40363
+ // set default padding to 5 as it is in datalabels #12308
40364
+ padding: pick(options.padding, 5),
40365
+ visibility: 'hidden' // hidden until setOffset is called
40366
+ };
40414
40367
  if (!chart.styledMode) {
40415
40368
  attr.fill = options.backgroundColor;
40416
40369
  attr.stroke = options.borderColor;
@@ -40428,49 +40381,39 @@
40428
40381
  /**
40429
40382
  * Sets the offset that the stack has from the x value and repositions the
40430
40383
  * label.
40431
- *
40432
40384
  * @private
40433
- * @function Highcarts.StackItem#setOffset
40434
- * @param {number} xOffset
40435
- * @param {number} xWidth
40436
- * @param {number} [boxBottom]
40437
- * @param {number} [boxTop]
40438
- * @param {number} [defaultX]
40439
40385
  */
40440
40386
  StackItem.prototype.setOffset = function (xOffset, xWidth, boxBottom, boxTop, defaultX) {
40441
- var stackItem = this,
40442
- axis = stackItem.axis,
40387
+ var axis = this.axis,
40443
40388
  chart = axis.chart,
40444
40389
  // stack value translated mapped to chart coordinates
40445
40390
  y = axis.translate(axis.stacking.usePercentage ?
40446
40391
  100 :
40447
40392
  (boxTop ?
40448
40393
  boxTop :
40449
- stackItem.total), 0, 0, 0, 1),
40394
+ this.total), 0, 0, 0, 1),
40450
40395
  yZero = axis.translate(boxBottom ? boxBottom : 0), // stack origin
40451
- // stack height:
40452
- h = defined(y) && Math.abs(y - yZero),
40453
40396
  // x position:
40454
40397
  x = pick(defaultX,
40455
- chart.xAxis[0].translate(stackItem.x)) +
40398
+ chart.xAxis[0].translate(this.x)) +
40456
40399
  xOffset,
40457
- stackBox = defined(y) && stackItem.getStackBox(chart,
40458
- stackItem,
40400
+ stackBox = defined(y) && this.getStackBox(chart,
40401
+ this,
40459
40402
  x,
40460
40403
  y,
40461
- xWidth,
40462
- h,
40404
+ xWidth,
40405
+ // stack height:
40406
+ Math.abs(y - yZero),
40463
40407
  axis),
40464
- label = stackItem.label,
40465
- isNegative = stackItem.isNegative,
40466
- isJustify = pick(stackItem.options.overflow, 'justify') === 'justify',
40467
- textAlign = stackItem.textAlign,
40468
- visible;
40408
+ label = this.label,
40409
+ isNegative = this.isNegative,
40410
+ textAlign = this.textAlign;
40469
40411
  if (label && stackBox) {
40470
40412
  var bBox = label.getBBox(),
40471
- padding = label.padding,
40472
- boxOffsetX = void 0,
40473
- boxOffsetY = void 0;
40413
+ padding = label.padding;
40414
+ var boxOffsetX = void 0,
40415
+ isJustify = pick(this.options.overflow, 'justify') === 'justify',
40416
+ visible = void 0;
40474
40417
  if (textAlign === 'left') {
40475
40418
  boxOffsetX = chart.inverted ? -padding : padding;
40476
40419
  }
@@ -40487,34 +40430,34 @@
40487
40430
  bBox.width / 2;
40488
40431
  }
40489
40432
  }
40490
- boxOffsetY = chart.inverted ?
40491
- bBox.height / 2 : (isNegative ? -padding : bBox.height);
40433
+ var boxOffsetY = chart.inverted ?
40434
+ bBox.height / 2 : (isNegative ? -padding : bBox.height);
40492
40435
  // Reset alignOptions property after justify #12337
40493
- stackItem.alignOptions.x = pick(stackItem.options.x, 0);
40494
- stackItem.alignOptions.y = pick(stackItem.options.y, 0);
40436
+ this.alignOptions.x = pick(this.options.x, 0);
40437
+ this.alignOptions.y = pick(this.options.y, 0);
40495
40438
  // Set the stackBox position
40496
40439
  stackBox.x -= boxOffsetX;
40497
40440
  stackBox.y -= boxOffsetY;
40498
40441
  // Align the label to the box
40499
- label.align(stackItem.alignOptions, null, stackBox);
40442
+ label.align(this.alignOptions, null, stackBox);
40500
40443
  // Check if label is inside the plotArea #12294
40501
- if (chart.isInsidePlot(label.alignAttr.x + boxOffsetX - stackItem.alignOptions.x, label.alignAttr.y + boxOffsetY - stackItem.alignOptions.y)) {
40444
+ if (chart.isInsidePlot(label.alignAttr.x + boxOffsetX - this.alignOptions.x, label.alignAttr.y + boxOffsetY - this.alignOptions.y)) {
40502
40445
  label.show();
40503
40446
  }
40504
40447
  else {
40505
40448
  // Move label away to avoid the overlapping issues
40506
- label.alignAttr.y = -9999;
40449
+ label.hide();
40507
40450
  isJustify = false;
40508
40451
  }
40509
40452
  if (isJustify) {
40510
40453
  // Justify stackLabel into the stackBox
40511
- Series.prototype.justifyDataLabel.call(this.axis, label, stackItem.alignOptions, label.alignAttr, bBox, stackBox);
40454
+ Series.prototype.justifyDataLabel.call(this.axis, label, this.alignOptions, label.alignAttr, bBox, stackBox);
40512
40455
  }
40513
40456
  label.attr({
40514
40457
  x: label.alignAttr.x,
40515
40458
  y: label.alignAttr.y
40516
40459
  });
40517
- if (pick(!isJustify && stackItem.options.crop, true)) {
40460
+ if (pick(!isJustify && this.options.crop, true)) {
40518
40461
  visible =
40519
40462
  isNumber(label.x) &&
40520
40463
  isNumber(label.y) &&
@@ -40552,13 +40495,92 @@
40552
40495
  };
40553
40496
  return StackItem;
40554
40497
  }());
40498
+ /* *
40499
+ *
40500
+ * Default Export
40501
+ *
40502
+ * */
40503
+ /* *
40504
+ *
40505
+ * API Declarations
40506
+ *
40507
+ * */
40508
+ /**
40509
+ * Stack of data points
40510
+ *
40511
+ * @product highcharts
40512
+ *
40513
+ * @interface Highcharts.StackItemObject
40514
+ */ /**
40515
+ * Alignment settings
40516
+ * @name Highcharts.StackItemObject#alignOptions
40517
+ * @type {Highcharts.AlignObject}
40518
+ */ /**
40519
+ * Related axis
40520
+ * @name Highcharts.StackItemObject#axis
40521
+ * @type {Highcharts.Axis}
40522
+ */ /**
40523
+ * Cumulative value of the stacked data points
40524
+ * @name Highcharts.StackItemObject#cumulative
40525
+ * @type {number}
40526
+ */ /**
40527
+ * True if on the negative side
40528
+ * @name Highcharts.StackItemObject#isNegative
40529
+ * @type {boolean}
40530
+ */ /**
40531
+ * Related SVG element
40532
+ * @name Highcharts.StackItemObject#label
40533
+ * @type {Highcharts.SVGElement}
40534
+ */ /**
40535
+ * Related stack options
40536
+ * @name Highcharts.StackItemObject#options
40537
+ * @type {Highcharts.YAxisStackLabelsOptions}
40538
+ */ /**
40539
+ * Total value of the stacked data points
40540
+ * @name Highcharts.StackItemObject#total
40541
+ * @type {number}
40542
+ */ /**
40543
+ * Shared x value of the stack
40544
+ * @name Highcharts.StackItemObject#x
40545
+ * @type {number}
40546
+ */
40547
+ ''; // keeps doclets above in JS file
40548
+
40549
+ return StackItem;
40550
+ });
40551
+ _registerModule(_modules, 'Core/Axis/Stacking/StackingAxis.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Axis/Axis.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Axis/Stacking/StackItem.js'], _modules['Core/Utilities.js']], function (A, Axis, SeriesRegistry, StackItem, U) {
40552
+ /* *
40553
+ *
40554
+ * (c) 2010-2021 Torstein Honsi
40555
+ *
40556
+ * License: www.highcharts.com/license
40557
+ *
40558
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
40559
+ *
40560
+ * */
40561
+ var getDeferredAnimation = A.getDeferredAnimation;
40562
+ var seriesProto = SeriesRegistry.series.prototype;
40563
+ var addEvent = U.addEvent,
40564
+ correctFloat = U.correctFloat,
40565
+ defined = U.defined,
40566
+ destroyObjectProperties = U.destroyObjectProperties,
40567
+ fireEvent = U.fireEvent,
40568
+ isArray = U.isArray,
40569
+ isNumber = U.isNumber,
40570
+ objectEach = U.objectEach,
40571
+ pick = U.pick;
40572
+ /* *
40573
+ *
40574
+ * Functions
40575
+ *
40576
+ * */
40555
40577
  /**
40556
40578
  * Generate stacks for each series and calculate stacks total values
40557
40579
  *
40558
40580
  * @private
40559
40581
  * @function Highcharts.Chart#getStacks
40560
40582
  */
40561
- Chart.prototype.getStacks = function () {
40583
+ function chartGetStacks() {
40562
40584
  var chart = this,
40563
40585
  inverted = chart.inverted;
40564
40586
  // reset stacks for each yAxis
@@ -40580,10 +40602,111 @@
40580
40602
  ].join(',');
40581
40603
  }
40582
40604
  });
40583
- };
40584
- // Stacking methods defined on the Axis prototype
40585
- StackingAxis.compose(Axis);
40586
- // Stacking methods defined for Series prototype
40605
+ }
40606
+ /**
40607
+ * @private
40608
+ */
40609
+ function onAxisDestroy() {
40610
+ var stacking = this.stacking;
40611
+ if (!stacking) {
40612
+ return;
40613
+ }
40614
+ var stacks = stacking.stacks;
40615
+ // Destroy each stack total
40616
+ objectEach(stacks, function (stack, stackKey) {
40617
+ destroyObjectProperties(stack);
40618
+ stacks[stackKey] = null;
40619
+ });
40620
+ if (stacking &&
40621
+ stacking.stackTotalGroup) {
40622
+ stacking.stackTotalGroup.destroy();
40623
+ }
40624
+ }
40625
+ /**
40626
+ * @private
40627
+ */
40628
+ function onAxisInit() {
40629
+ var axis = this;
40630
+ if (!axis.stacking) {
40631
+ axis.stacking = new AxisAdditions(axis);
40632
+ }
40633
+ }
40634
+ /**
40635
+ * Get stack indicator, according to it's x-value, to determine points with the
40636
+ * same x-value
40637
+ *
40638
+ * @private
40639
+ * @function Highcharts.Series#getStackIndicator
40640
+ */
40641
+ function seriesGetStackIndicator(stackIndicator, x, index, key) {
40642
+ // Update stack indicator, when:
40643
+ // first point in a stack || x changed || stack type (negative vs positive)
40644
+ // changed:
40645
+ if (!defined(stackIndicator) ||
40646
+ stackIndicator.x !== x ||
40647
+ (key && stackIndicator.stackKey !== key)) {
40648
+ stackIndicator = {
40649
+ x: x,
40650
+ index: 0,
40651
+ key: key,
40652
+ stackKey: key
40653
+ };
40654
+ }
40655
+ else {
40656
+ (stackIndicator).index++;
40657
+ }
40658
+ stackIndicator.key =
40659
+ [index, x, stackIndicator.index].join(',');
40660
+ return stackIndicator;
40661
+ }
40662
+ /**
40663
+ * Iterate over all stacks and compute the absolute values to percent
40664
+ *
40665
+ * @private
40666
+ * @function Highcharts.Series#modifyStacks
40667
+ */
40668
+ function seriesModifyStacks() {
40669
+ var series = this,
40670
+ yAxis = series.yAxis,
40671
+ stackKey = series.stackKey,
40672
+ stacks = yAxis.stacking.stacks,
40673
+ processedXData = series.processedXData,
40674
+ stacking = series.options.stacking,
40675
+ stacker = series[stacking + 'Stacker'];
40676
+ var stackIndicator;
40677
+ if (stacker) { // Modifier function exists (Series.percentStacker etc.)
40678
+ [stackKey, '-' + stackKey].forEach(function (key) {
40679
+ var i = processedXData.length,
40680
+ x,
40681
+ stack,
40682
+ pointExtremes;
40683
+ while (i--) {
40684
+ x = processedXData[i];
40685
+ stackIndicator = series.getStackIndicator(stackIndicator, x, series.index, key);
40686
+ stack = stacks[key] && stacks[key][x];
40687
+ pointExtremes =
40688
+ stack && stack.points[stackIndicator.key];
40689
+ if (pointExtremes) {
40690
+ stacker.call(series, pointExtremes, stack, i);
40691
+ }
40692
+ }
40693
+ });
40694
+ }
40695
+ }
40696
+ /**
40697
+ * Modifier function for percent stacks. Blows up the stack to 100%.
40698
+ *
40699
+ * @private
40700
+ * @function Highcharts.Series#percentStacker
40701
+ */
40702
+ function seriesPercentStacker(pointExtremes, stack, i) {
40703
+ var totalFactor = stack.total ? 100 / stack.total : 0;
40704
+ // Y bottom value
40705
+ pointExtremes[0] = correctFloat(pointExtremes[0] * totalFactor);
40706
+ // Y value
40707
+ pointExtremes[1] = correctFloat(pointExtremes[1] * totalFactor);
40708
+ this.stackedYData[i] = pointExtremes[1];
40709
+ }
40587
40710
  /**
40588
40711
  * Set grouped points in a stack-like object. When `centerInCategory` is true,
40589
40712
  * and `stacking` is not enabled, we need a pseudo (horizontal) stack in order
@@ -40593,7 +40716,7 @@
40593
40716
  * @function Highcharts.Series#setStackedPoints
40594
40717
  * @return {void}
40595
40718
  */
40596
- Series.prototype.setGroupedPoints = function () {
40719
+ function seriesSetGroupedPoints() {
40597
40720
  var stacking = this.yAxis.stacking;
40598
40721
  if (this.options.centerInCategory &&
40599
40722
  (this.is('column') || this.is('columnrange')) &&
@@ -40602,7 +40725,7 @@
40602
40725
  !this.options.stacking &&
40603
40726
  // With only one series, we don't need to consider centerInCategory
40604
40727
  this.chart.series.length > 1) {
40605
- Series.prototype.setStackedPoints.call(this, 'group');
40728
+ seriesProto.setStackedPoints.call(this, 'group');
40606
40729
  // After updating, if we now have proper stacks, we must delete the group
40607
40730
  // pseudo stacks (#14986)
40608
40731
  }
@@ -40614,20 +40737,29 @@
40614
40737
  }
40615
40738
  });
40616
40739
  }
40617
- };
40740
+ }
40618
40741
  /**
40619
40742
  * Adds series' points value to corresponding stack
40620
40743
  *
40621
40744
  * @private
40622
40745
  * @function Highcharts.Series#setStackedPoints
40623
40746
  */
40624
- Series.prototype.setStackedPoints = function (stackingParam) {
40747
+ function seriesSetStackedPoints(stackingParam) {
40625
40748
  var stacking = stackingParam || this.options.stacking;
40626
40749
  if (!stacking || (this.visible !== true &&
40627
40750
  this.chart.options.chart.ignoreHiddenSeries !== false)) {
40628
40751
  return;
40629
40752
  }
40630
- var series = this, xData = series.processedXData, yData = series.processedYData, stackedYData = [], yDataLength = yData.length, seriesOptions = series.options, threshold = seriesOptions.threshold, stackThreshold = pick(seriesOptions.startFromThreshold && threshold, 0), stackOption = seriesOptions.stack, stackKey = stackingParam ? series.type + "," + stacking : series.stackKey, negKey = '-' + stackKey, negStacks = series.negStacks, yAxis = series.yAxis, stacks = yAxis.stacking.stacks, oldStacks = yAxis.stacking.oldStacks, stackIndicator, isNegative, stack, other, key, pointKey, i, x, y;
40753
+ var series = this, xData = series.processedXData, yData = series.processedYData, stackedYData = [], yDataLength = yData.length, seriesOptions = series.options, threshold = seriesOptions.threshold, stackThreshold = pick(seriesOptions.startFromThreshold && threshold, 0), stackOption = seriesOptions.stack, stackKey = stackingParam ? "" + series.type + ",".concat(stacking) : series.stackKey, negKey = '-' + stackKey, negStacks = series.negStacks, yAxis = series.yAxis, stacks = yAxis.stacking.stacks, oldStacks = yAxis.stacking.oldStacks;
40754
+ var stackIndicator,
40755
+ isNegative,
40756
+ stack,
40757
+ other,
40758
+ key,
40759
+ pointKey,
40760
+ i,
40761
+ x,
40762
+ y;
40631
40763
  yAxis.stacking.stacksTouched += 1;
40632
40764
  // loop over the non-null y values and read them into a local array
40633
40765
  for (i = 0; i < yDataLength; i++) {
@@ -40652,7 +40784,7 @@
40652
40784
  stacks[key][x].total = null;
40653
40785
  }
40654
40786
  else {
40655
- stacks[key][x] = new StackItem(yAxis, yAxis.options.stackLabels, isNegative, x, stackOption);
40787
+ stacks[key][x] = new StackItem(yAxis, yAxis.options.stackLabels, !!isNegative, x, stackOption);
40656
40788
  }
40657
40789
  }
40658
40790
  // If the StackItem doesn't exist, create it first
@@ -40729,130 +40861,195 @@
40729
40861
  }
40730
40862
  // Reset old stacks
40731
40863
  yAxis.stacking.oldStacks = {};
40732
- };
40733
- /**
40734
- * Iterate over all stacks and compute the absolute values to percent
40864
+ }
40865
+ /* *
40866
+ *
40867
+ * Classes
40735
40868
  *
40869
+ * */
40870
+ /**
40871
+ * Adds stacking support to axes.
40736
40872
  * @private
40737
- * @function Highcharts.Series#modifyStacks
40873
+ * @class
40738
40874
  */
40739
- Series.prototype.modifyStacks = function () {
40740
- var series = this,
40741
- yAxis = series.yAxis,
40742
- stackKey = series.stackKey,
40743
- stacks = yAxis.stacking.stacks,
40744
- processedXData = series.processedXData,
40745
- stackIndicator,
40746
- stacking = series.options.stacking;
40747
- if (series[stacking + 'Stacker']) { // Modifier function exists
40748
- [stackKey, '-' + stackKey].forEach(function (key) {
40749
- var i = processedXData.length,
40750
- x,
40751
- stack,
40752
- pointExtremes;
40875
+ var AxisAdditions = /** @class */ (function () {
40876
+ /* *
40877
+ *
40878
+ * Constructors
40879
+ *
40880
+ * */
40881
+ function AxisAdditions(axis) {
40882
+ this.oldStacks = {};
40883
+ this.stacks = {};
40884
+ this.stacksTouched = 0;
40885
+ this.axis = axis;
40886
+ }
40887
+ /* *
40888
+ *
40889
+ * Functions
40890
+ *
40891
+ * */
40892
+ /**
40893
+ * Build the stacks from top down
40894
+ * @private
40895
+ */
40896
+ AxisAdditions.prototype.buildStacks = function () {
40897
+ var stacking = this;
40898
+ var axis = stacking.axis;
40899
+ var axisSeries = axis.series;
40900
+ var reversedStacks = axis.options.reversedStacks;
40901
+ var len = axisSeries.length;
40902
+ var actualSeries,
40903
+ i;
40904
+ if (!axis.isXAxis) {
40905
+ stacking.usePercentage = false;
40906
+ i = len;
40753
40907
  while (i--) {
40754
- x = processedXData[i];
40755
- stackIndicator = series.getStackIndicator(stackIndicator, x, series.index, key);
40756
- stack = stacks[key] && stacks[key][x];
40757
- pointExtremes =
40758
- stack && stack.points[stackIndicator.key];
40759
- if (pointExtremes) {
40760
- series[stacking + 'Stacker'](pointExtremes, stack, i);
40761
- }
40908
+ actualSeries = axisSeries[reversedStacks ? i : len - i - 1];
40909
+ actualSeries.setStackedPoints();
40910
+ actualSeries.setGroupedPoints();
40911
+ }
40912
+ // Loop up again to compute percent and stream stack
40913
+ for (i = 0; i < len; i++) {
40914
+ axisSeries[i].modifyStacks();
40762
40915
  }
40916
+ fireEvent(axis, 'afterBuildStacks');
40917
+ }
40918
+ };
40919
+ /**
40920
+ * @private
40921
+ */
40922
+ AxisAdditions.prototype.cleanStacks = function () {
40923
+ var stacking = this,
40924
+ axis = stacking.axis;
40925
+ var stacks;
40926
+ if (!axis.isXAxis) {
40927
+ if (stacking.oldStacks) {
40928
+ stacks = stacking.stacks = stacking.oldStacks;
40929
+ }
40930
+ // reset stacks
40931
+ objectEach(stacks, function (type) {
40932
+ objectEach(type, function (stack) {
40933
+ stack.cumulative = stack.total;
40934
+ });
40935
+ });
40936
+ }
40937
+ };
40938
+ /**
40939
+ * Set all the stacks to initial states and destroy unused ones.
40940
+ * @private
40941
+ */
40942
+ AxisAdditions.prototype.resetStacks = function () {
40943
+ var stacking = this,
40944
+ axis = stacking.axis,
40945
+ stacks = stacking.stacks;
40946
+ if (!axis.isXAxis) {
40947
+ objectEach(stacks, function (type) {
40948
+ objectEach(type, function (stack, x) {
40949
+ // Clean up memory after point deletion (#1044, #4320)
40950
+ if (isNumber(stack.touched) &&
40951
+ stack.touched < stacking.stacksTouched) {
40952
+ stack.destroy();
40953
+ delete type[x];
40954
+ // Reset stacks
40955
+ }
40956
+ else {
40957
+ stack.total = null;
40958
+ stack.cumulative = null;
40959
+ }
40960
+ });
40961
+ });
40962
+ }
40963
+ };
40964
+ /**
40965
+ * @private
40966
+ */
40967
+ AxisAdditions.prototype.renderStackTotals = function () {
40968
+ var stacking = this,
40969
+ axis = stacking.axis,
40970
+ chart = axis.chart,
40971
+ renderer = chart.renderer,
40972
+ stacks = stacking.stacks,
40973
+ stackLabelsAnim = axis.options.stackLabels &&
40974
+ axis.options.stackLabels.animation,
40975
+ animationConfig = getDeferredAnimation(chart,
40976
+ stackLabelsAnim || false),
40977
+ stackTotalGroup = stacking.stackTotalGroup = (stacking.stackTotalGroup ||
40978
+ renderer
40979
+ .g('stack-labels')
40980
+ .attr({
40981
+ zIndex: 6,
40982
+ opacity: 0
40983
+ })
40984
+ .add());
40985
+ // plotLeft/Top will change when y axis gets wider so we need to
40986
+ // translate the stackTotalGroup at every render call. See bug #506
40987
+ // and #516
40988
+ stackTotalGroup.translate(chart.plotLeft, chart.plotTop);
40989
+ // Render each stack total
40990
+ objectEach(stacks, function (type) {
40991
+ objectEach(type, function (stack) {
40992
+ stack.render(stackTotalGroup);
40993
+ });
40763
40994
  });
40764
- }
40765
- };
40766
- /**
40767
- * Modifier function for percent stacks. Blows up the stack to 100%.
40995
+ stackTotalGroup.animate({
40996
+ opacity: 1
40997
+ }, animationConfig);
40998
+ };
40999
+ return AxisAdditions;
41000
+ }());
41001
+ /* *
40768
41002
  *
40769
- * @private
40770
- * @function Highcharts.Series#percentStacker
40771
- */
40772
- Series.prototype.percentStacker = function (pointExtremes, stack, i) {
40773
- var totalFactor = stack.total ? 100 / stack.total : 0;
40774
- // Y bottom value
40775
- pointExtremes[0] = correctFloat(pointExtremes[0] * totalFactor);
40776
- // Y value
40777
- pointExtremes[1] = correctFloat(pointExtremes[1] * totalFactor);
40778
- this.stackedYData[i] = pointExtremes[1];
40779
- };
40780
- /**
40781
- * Get stack indicator, according to it's x-value, to determine points with the
40782
- * same x-value
41003
+ * Composition
40783
41004
  *
40784
- * @private
40785
- * @function Highcharts.Series#getStackIndicator
40786
- */
40787
- Series.prototype.getStackIndicator = function (stackIndicator, x, index, key) {
40788
- // Update stack indicator, when:
40789
- // first point in a stack || x changed || stack type (negative vs positive)
40790
- // changed:
40791
- if (!defined(stackIndicator) ||
40792
- stackIndicator.x !== x ||
40793
- (key && stackIndicator.stackKey !== key)) {
40794
- stackIndicator = {
40795
- x: x,
40796
- index: 0,
40797
- key: key,
40798
- stackKey: key
40799
- };
40800
- }
40801
- else {
40802
- (stackIndicator).index++;
41005
+ * */
41006
+ var StackingAxis;
41007
+ (function (StackingAxis) {
41008
+ /* *
41009
+ *
41010
+ * Constants
41011
+ *
41012
+ * */
41013
+ var composedClasses = [];
41014
+ /* *
41015
+ *
41016
+ * Functions
41017
+ *
41018
+ * */
41019
+ /**
41020
+ * Extends axis with stacking support.
41021
+ * @private
41022
+ */
41023
+ function compose(AxisClass, ChartClass, SeriesClass) {
41024
+ if (composedClasses.indexOf(AxisClass) === -1) {
41025
+ composedClasses.push(AxisClass);
41026
+ addEvent(AxisClass, 'init', onAxisInit);
41027
+ addEvent(AxisClass, 'destroy', onAxisDestroy);
41028
+ }
41029
+ if (composedClasses.indexOf(ChartClass) === -1) {
41030
+ composedClasses.push(ChartClass);
41031
+ var chartProto = ChartClass.prototype;
41032
+ chartProto.getStacks = chartGetStacks;
41033
+ }
41034
+ if (composedClasses.indexOf(SeriesClass) === -1) {
41035
+ composedClasses.push(SeriesClass);
41036
+ var seriesProto_1 = SeriesClass.prototype;
41037
+ seriesProto_1.getStackIndicator = seriesGetStackIndicator;
41038
+ seriesProto_1.modifyStacks = seriesModifyStacks;
41039
+ seriesProto_1.percentStacker = seriesPercentStacker;
41040
+ seriesProto_1.setGroupedPoints = seriesSetGroupedPoints;
41041
+ seriesProto_1.setStackedPoints = seriesSetStackedPoints;
41042
+ }
40803
41043
  }
40804
- stackIndicator.key =
40805
- [index, x, stackIndicator.index].join(',');
40806
- return stackIndicator;
40807
- };
40808
- H.StackItem = StackItem; // @todo -> master
41044
+ StackingAxis.compose = compose;
41045
+ })(StackingAxis || (StackingAxis = {}));
40809
41046
  /* *
40810
41047
  *
40811
41048
  * Default Export
40812
41049
  *
40813
41050
  * */
40814
- /**
40815
- * Stack of data points
40816
- *
40817
- * @product highcharts
40818
- *
40819
- * @interface Highcharts.StackItemObject
40820
- */ /**
40821
- * Alignment settings
40822
- * @name Highcharts.StackItemObject#alignOptions
40823
- * @type {Highcharts.AlignObject}
40824
- */ /**
40825
- * Related axis
40826
- * @name Highcharts.StackItemObject#axis
40827
- * @type {Highcharts.Axis}
40828
- */ /**
40829
- * Cumulative value of the stacked data points
40830
- * @name Highcharts.StackItemObject#cumulative
40831
- * @type {number}
40832
- */ /**
40833
- * True if on the negative side
40834
- * @name Highcharts.StackItemObject#isNegative
40835
- * @type {boolean}
40836
- */ /**
40837
- * Related SVG element
40838
- * @name Highcharts.StackItemObject#label
40839
- * @type {Highcharts.SVGElement}
40840
- */ /**
40841
- * Related stack options
40842
- * @name Highcharts.StackItemObject#options
40843
- * @type {Highcharts.YAxisStackLabelsOptions}
40844
- */ /**
40845
- * Total value of the stacked data points
40846
- * @name Highcharts.StackItemObject#total
40847
- * @type {number}
40848
- */ /**
40849
- * Shared x value of the stack
40850
- * @name Highcharts.StackItemObject#x
40851
- * @type {number}
40852
- */
40853
- ''; // keeps doclets above in JS file
40854
41051
 
40855
- return H.StackItem;
41052
+ return StackingAxis;
40856
41053
  });
40857
41054
  _registerModule(_modules, 'Series/Line/LineSeries.js', [_modules['Core/Series/Series.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (Series, SeriesRegistry, U) {
40858
41055
  /* *
@@ -40939,7 +41136,7 @@
40939
41136
  if (!styledMode) {
40940
41137
  props[0].push((options.lineColor ||
40941
41138
  this.color ||
40942
- "#cccccc" /* neutralColor20 */ // when colorByPoint = true
41139
+ "#cccccc" /* Palette.neutralColor20 */ // when colorByPoint = true
40943
41140
  ), options.dashStyle);
40944
41141
  }
40945
41142
  props = series.getZonesGraphs(props);
@@ -41511,9 +41708,9 @@
41511
41708
  });
41512
41709
  props.forEach(function (prop) {
41513
41710
  var areaKey = prop[0],
41514
- area = series[areaKey],
41515
- verb = area ? 'animate' : 'attr',
41516
41711
  attribs = {};
41712
+ var area = series[areaKey];
41713
+ var verb = area ? 'animate' : 'attr';
41517
41714
  // Create or update the area
41518
41715
  if (area) { // update
41519
41716
  area.endX = series.preventGraphAnimation ?
@@ -41543,15 +41740,18 @@
41543
41740
  * @private
41544
41741
  */
41545
41742
  AreaSeries.prototype.getGraphPath = function (points) {
41546
- var getGraphPath = LineSeries.prototype.getGraphPath, graphPath, options = this.options, stacking = options.stacking, yAxis = this.yAxis, topPath, bottomPath, bottomPoints = [], graphPoints = [], seriesIndex = this.index, i, areaPath, plotX, stacks = yAxis.stacking.stacks[this.stackKey], threshold = options.threshold, translatedThreshold = Math.round(// #10909
41547
- yAxis.getThreshold(options.threshold)), isNull, yBottom, connectNulls = pick(// #10574
41743
+ var getGraphPath = LineSeries.prototype.getGraphPath, options = this.options, stacking = options.stacking, yAxis = this.yAxis, bottomPoints = [], graphPoints = [], seriesIndex = this.index, stacks = yAxis.stacking.stacks[this.stackKey], threshold = options.threshold, translatedThreshold = Math.round(// #10909
41744
+ yAxis.getThreshold(options.threshold)), connectNulls = pick(// #10574
41548
41745
  options.connectNulls, stacking === 'percent'),
41549
41746
  // To display null points in underlying stacked series, this
41550
41747
  // series graph must be broken, and the area also fall down to
41551
41748
  // fill the gap left by the null point. #2069
41552
41749
  addDummyPoints = function (i, otherI, side) {
41553
41750
  var point = points[i], stackedValues = stacking &&
41554
- stacks[point.x].points[seriesIndex], nullVal = point[side + 'Null'] || 0, cliffVal = point[side + 'Cliff'] || 0, top, bottom, isNull = true;
41751
+ stacks[point.x].points[seriesIndex], nullVal = point[side + 'Null'] || 0, cliffVal = point[side + 'Cliff'] || 0;
41752
+ var top,
41753
+ bottom,
41754
+ isNull = true;
41555
41755
  if (cliffVal || nullVal) {
41556
41756
  top = (nullVal ?
41557
41757
  stackedValues[0] :
@@ -41583,13 +41783,16 @@
41583
41783
  });
41584
41784
  }
41585
41785
  };
41786
+ var plotX,
41787
+ isNull,
41788
+ yBottom;
41586
41789
  // Find what points to use
41587
41790
  points = points || this.points;
41588
41791
  // Fill in missing points
41589
41792
  if (stacking) {
41590
41793
  points = this.getStackPoints(points);
41591
41794
  }
41592
- for (i = 0; i < points.length; i++) {
41795
+ for (var i = 0, iEnd = points.length; i < iEnd; ++i) {
41593
41796
  // Reset after series.update of stacking property (#12033)
41594
41797
  if (!stacking) {
41595
41798
  points[i].leftCliff = points[i].rightCliff =
@@ -41619,20 +41822,29 @@
41619
41822
  }
41620
41823
  }
41621
41824
  }
41622
- topPath = getGraphPath.call(this, graphPoints, true, true);
41825
+ var topPath = getGraphPath.call(this,
41826
+ graphPoints,
41827
+ true,
41828
+ true);
41623
41829
  bottomPoints.reversed = true;
41624
- bottomPath = getGraphPath.call(this, bottomPoints, true, true);
41830
+ var bottomPath = getGraphPath.call(this,
41831
+ bottomPoints,
41832
+ true,
41833
+ true);
41625
41834
  var firstBottomPoint = bottomPath[0];
41626
41835
  if (firstBottomPoint && firstBottomPoint[0] === 'M') {
41627
41836
  bottomPath[0] = ['L', firstBottomPoint[1], firstBottomPoint[2]];
41628
41837
  }
41629
- areaPath = topPath.concat(bottomPath);
41838
+ var areaPath = topPath.concat(bottomPath);
41630
41839
  if (areaPath.length) {
41631
41840
  areaPath.push(['Z']);
41632
41841
  }
41633
41842
  // TODO: don't set leftCliff and rightCliff when connectNulls?
41634
- graphPath = getGraphPath
41635
- .call(this, graphPoints, false, connectNulls);
41843
+ var graphPath = getGraphPath
41844
+ .call(this,
41845
+ graphPoints,
41846
+ false,
41847
+ connectNulls);
41636
41848
  areaPath.xMap = topPath.xMap;
41637
41849
  this.areaPath = areaPath;
41638
41850
  return graphPath;
@@ -41691,8 +41903,8 @@
41691
41903
  cliffName = direction === 1 ?
41692
41904
  'rightCliff' :
41693
41905
  'leftCliff',
41694
- cliff = 0,
41695
41906
  otherStack = stack[keys[idx + direction]];
41907
+ var cliff = 0;
41696
41908
  // If there is a stack next to this one,
41697
41909
  // to the left or to the right...
41698
41910
  if (otherStack) {
@@ -41799,7 +42011,7 @@
41799
42011
  * @sample {highcharts} highcharts/plotoptions/area-fillcolor-gradient/
41800
42012
  * Gradient
41801
42013
  *
41802
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
42014
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
41803
42015
  * @product highcharts highstock
41804
42016
  * @apioption plotOptions.area.fillColor
41805
42017
  */
@@ -41836,7 +42048,7 @@
41836
42048
  * @sample {highcharts} highcharts/plotoptions/area-linecolor/
41837
42049
  * Dark gray line
41838
42050
  *
41839
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
42051
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
41840
42052
  * @product highcharts highstock
41841
42053
  * @apioption plotOptions.area.lineColor
41842
42054
  */
@@ -41851,7 +42063,7 @@
41851
42063
  * @sample {highcharts} highcharts/css/series-negative-color/
41852
42064
  * Negative color in styled mode
41853
42065
  *
41854
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
42066
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
41855
42067
  * @since 3.0
41856
42068
  * @product highcharts
41857
42069
  * @apioption plotOptions.area.negativeFillColor
@@ -42029,6 +42241,11 @@
42029
42241
  var LineSeries = SeriesRegistry.seriesTypes.line;
42030
42242
  var merge = U.merge,
42031
42243
  pick = U.pick;
42244
+ /* *
42245
+ *
42246
+ * Class
42247
+ *
42248
+ * */
42032
42249
  /**
42033
42250
  * Spline series type.
42034
42251
  *
@@ -42077,12 +42294,11 @@
42077
42294
  plotX = point.plotX || 0,
42078
42295
  plotY = point.plotY || 0,
42079
42296
  lastPoint = points[i - 1],
42080
- nextPoint = points[i + 1],
42081
- leftContX,
42297
+ nextPoint = points[i + 1];
42298
+ var leftContX,
42082
42299
  leftContY,
42083
42300
  rightContX,
42084
- rightContY,
42085
- ret;
42301
+ rightContY;
42086
42302
  /**
42087
42303
  * @private
42088
42304
  */
@@ -42098,8 +42314,8 @@
42098
42314
  var lastX = lastPoint.plotX || 0,
42099
42315
  lastY = lastPoint.plotY || 0,
42100
42316
  nextX = nextPoint.plotX || 0,
42101
- nextY = nextPoint.plotY || 0,
42102
- correction = 0;
42317
+ nextY = nextPoint.plotY || 0;
42318
+ var correction = 0;
42103
42319
  leftContX = (smoothing * plotX + lastX) / denom;
42104
42320
  leftContY = (smoothing * plotY + lastY) / denom;
42105
42321
  rightContX = (smoothing * plotX + nextX) / denom;
@@ -42185,15 +42401,19 @@
42185
42401
  .add();
42186
42402
  }
42187
42403
  // */
42188
- ret = [
42189
- 'C',
42190
- pick(lastPoint.rightContX, lastPoint.plotX, 0),
42191
- pick(lastPoint.rightContY, lastPoint.plotY, 0),
42192
- pick(leftContX, plotX, 0),
42193
- pick(leftContY, plotY, 0),
42194
- plotX,
42195
- plotY
42196
- ];
42404
+ var ret = [
42405
+ 'C',
42406
+ pick(lastPoint.rightContX,
42407
+ lastPoint.plotX, 0),
42408
+ pick(lastPoint.rightContY,
42409
+ lastPoint.plotY, 0),
42410
+ pick(leftContX,
42411
+ plotX, 0),
42412
+ pick(leftContY,
42413
+ plotY, 0),
42414
+ plotX,
42415
+ plotY
42416
+ ];
42197
42417
  // reset for updating series later
42198
42418
  lastPoint.rightContX = lastPoint.rightContY = void 0;
42199
42419
  return ret;
@@ -42298,7 +42518,7 @@
42298
42518
 
42299
42519
  return SplineSeries;
42300
42520
  });
42301
- _registerModule(_modules, 'Series/AreaSpline/AreaSplineSeries.js', [_modules['Series/Area/AreaSeries.js'], _modules['Series/Spline/SplineSeries.js'], _modules['Core/Legend/LegendSymbol.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (AreaSeries, SplineSeries, LegendSymbol, SeriesRegistry, U) {
42521
+ _registerModule(_modules, 'Series/AreaSpline/AreaSplineSeries.js', [_modules['Series/Spline/SplineSeries.js'], _modules['Core/Legend/LegendSymbol.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SplineSeries, LegendSymbol, SeriesRegistry, U) {
42302
42522
  /* *
42303
42523
  *
42304
42524
  * (c) 2010-2021 Torstein Honsi
@@ -42324,7 +42544,9 @@
42324
42544
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42325
42545
  };
42326
42546
  })();
42327
- var areaProto = AreaSeries.prototype;
42547
+ var _a = SeriesRegistry.seriesTypes,
42548
+ AreaSeries = _a.area,
42549
+ areaProto = _a.area.prototype;
42328
42550
  var extend = U.extend,
42329
42551
  merge = U.merge;
42330
42552
  /* *
@@ -42346,7 +42568,7 @@
42346
42568
  function AreaSplineSeries() {
42347
42569
  /* *
42348
42570
  *
42349
- * Static properties
42571
+ * Static Properties
42350
42572
  *
42351
42573
  * */
42352
42574
  var _this = _super !== null && _super.apply(this,
@@ -42361,40 +42583,6 @@
42361
42583
  _this.options = void 0;
42362
42584
  return _this;
42363
42585
  }
42364
- /**
42365
- * The area spline series is an area series where the graph between the
42366
- * points is smoothed into a spline.
42367
- *
42368
- * @sample {highcharts} highcharts/demo/areaspline/
42369
- * Area spline chart
42370
- * @sample {highstock} stock/demo/areaspline/
42371
- * Area spline chart
42372
- *
42373
- * @extends plotOptions.area
42374
- * @excluding step, boostThreshold, boostBlending
42375
- * @product highcharts highstock
42376
- * @apioption plotOptions.areaspline
42377
- */
42378
- /**
42379
- * @see [fillColor](#plotOptions.areaspline.fillColor)
42380
- * @see [fillOpacity](#plotOptions.areaspline.fillOpacity)
42381
- *
42382
- * @apioption plotOptions.areaspline.color
42383
- */
42384
- /**
42385
- * @see [color](#plotOptions.areaspline.color)
42386
- * @see [fillOpacity](#plotOptions.areaspline.fillOpacity)
42387
- *
42388
- * @apioption plotOptions.areaspline.fillColor
42389
- */
42390
- /**
42391
- * @see [color](#plotOptions.areaspline.color)
42392
- * @see [fillColor](#plotOptions.areaspline.fillColor)
42393
- *
42394
- * @default {highcharts} 0.75
42395
- * @default {highstock} 0.75
42396
- * @apioption plotOptions.areaspline.fillOpacity
42397
- */
42398
42586
  AreaSplineSeries.defaultOptions = merge(SplineSeries.defaultOptions, AreaSeries.defaultOptions);
42399
42587
  return AreaSplineSeries;
42400
42588
  }(SplineSeries));
@@ -42407,9 +42595,47 @@
42407
42595
  SeriesRegistry.registerSeriesType('areaspline', AreaSplineSeries);
42408
42596
  /* *
42409
42597
  *
42410
- * Default export
42598
+ * Default Export
42411
42599
  *
42412
42600
  * */
42601
+ /* *
42602
+ *
42603
+ * API Options
42604
+ *
42605
+ * */
42606
+ /**
42607
+ * The area spline series is an area series where the graph between the
42608
+ * points is smoothed into a spline.
42609
+ *
42610
+ * @sample {highcharts} highcharts/demo/areaspline/
42611
+ * Area spline chart
42612
+ * @sample {highstock} stock/demo/areaspline/
42613
+ * Area spline chart
42614
+ *
42615
+ * @extends plotOptions.area
42616
+ * @excluding step, boostThreshold, boostBlending
42617
+ * @product highcharts highstock
42618
+ * @apioption plotOptions.areaspline
42619
+ */
42620
+ /**
42621
+ * @see [fillColor](#plotOptions.areaspline.fillColor)
42622
+ * @see [fillOpacity](#plotOptions.areaspline.fillOpacity)
42623
+ *
42624
+ * @apioption plotOptions.areaspline.color
42625
+ */
42626
+ /**
42627
+ * @see [color](#plotOptions.areaspline.color)
42628
+ * @see [fillOpacity](#plotOptions.areaspline.fillOpacity)
42629
+ *
42630
+ * @apioption plotOptions.areaspline.fillColor
42631
+ */
42632
+ /**
42633
+ * @see [color](#plotOptions.areaspline.color)
42634
+ * @see [fillColor](#plotOptions.areaspline.fillColor)
42635
+ *
42636
+ * @default 0.75
42637
+ * @apioption plotOptions.areaspline.fillOpacity
42638
+ */
42413
42639
  /**
42414
42640
  * A `areaspline` series. If the [type](#series.areaspline.type) option
42415
42641
  * is not specified, it is inherited from [chart.type](#chart.type).
@@ -42495,8 +42721,7 @@
42495
42721
  * @see [color](#series.areaspline.color)
42496
42722
  * @see [fillColor](#series.areaspline.fillColor)
42497
42723
  *
42498
- * @default {highcharts} 0.75
42499
- * @default {highstock} 0.75
42724
+ * @default 0.75
42500
42725
  * @apioption series.areaspline.fillOpacity
42501
42726
  */
42502
42727
  ''; // adds doclets above into transpilat
@@ -43217,6 +43442,8 @@
43217
43442
  * lineWidth, marker, step, useOhlcData
43218
43443
  * @product highcharts highstock
43219
43444
  * @optionparent plotOptions.column
43445
+ *
43446
+ * @private
43220
43447
  */
43221
43448
  ColumnSeries.defaultOptions = merge(Series.defaultOptions, {
43222
43449
  /**
@@ -43488,7 +43715,7 @@
43488
43715
  * @default #cccccc
43489
43716
  * @product highcharts highstock gantt
43490
43717
  */
43491
- color: "#cccccc" /* neutralColor20 */,
43718
+ color: "#cccccc" /* Palette.neutralColor20 */,
43492
43719
  /**
43493
43720
  * A specific border color for the selected point.
43494
43721
  *
@@ -43496,7 +43723,7 @@
43496
43723
  * @default #000000
43497
43724
  * @product highcharts highstock gantt
43498
43725
  */
43499
- borderColor: "#000000" /* neutralColor100 */
43726
+ borderColor: "#000000" /* Palette.neutralColor100 */
43500
43727
  }
43501
43728
  },
43502
43729
  dataLabels: {
@@ -43563,7 +43790,7 @@
43563
43790
  *
43564
43791
  * @private
43565
43792
  */
43566
- borderColor: "#ffffff" /* backgroundColor */
43793
+ borderColor: "#ffffff" /* Palette.backgroundColor */
43567
43794
  });
43568
43795
  return ColumnSeries;
43569
43796
  }(Series));
@@ -43770,6 +43997,7 @@
43770
43997
  extend = U.extend,
43771
43998
  fireEvent = U.fireEvent,
43772
43999
  isArray = U.isArray,
44000
+ isString = U.isString,
43773
44001
  merge = U.merge,
43774
44002
  objectEach = U.objectEach,
43775
44003
  pick = U.pick,
@@ -43809,17 +44037,18 @@
43809
44037
  inverted = this.isCartesian && chart.inverted,
43810
44038
  enabledDataSorting = this.enabledDataSorting,
43811
44039
  plotX = pick(point.dlBox && point.dlBox.centerX,
43812
- point.plotX, -9999),
43813
- plotY = pick(point.plotY, -9999),
43814
- bBox = dataLabel.getBBox(),
44040
+ point.plotX),
44041
+ plotY = point.plotY,
43815
44042
  rotation = options.rotation,
43816
44043
  align = options.align,
43817
- isInsidePlot = chart.isInsidePlot(plotX,
44044
+ isInsidePlot = defined(plotX) &&
44045
+ defined(plotY) &&
44046
+ chart.isInsidePlot(plotX,
43818
44047
  Math.round(plotY), {
43819
- inverted: inverted,
43820
- paneCoordinates: true,
43821
- series: series
43822
- }),
44048
+ inverted: inverted,
44049
+ paneCoordinates: true,
44050
+ series: series
44051
+ }),
43823
44052
  setStartPos = function (alignOptions) {
43824
44053
  if (enabledDataSorting && series.xAxis && !justify) {
43825
44054
  series.setDataLabelStartPos(point,
@@ -43830,8 +44059,6 @@
43830
44059
  }
43831
44060
  };
43832
44061
  var baseline,
43833
- normRotation,
43834
- negRotation,
43835
44062
  rotCorr, // rotation correction
43836
44063
  // Math.round for rounding errors (#2683), alignTo to allow column
43837
44064
  // labels (#2700)
@@ -43855,7 +44082,12 @@
43855
44082
  paneCoordinates: true,
43856
44083
  series: series
43857
44084
  })));
43858
- if (visible) {
44085
+ if (visible && defined(plotX) && defined(plotY)) {
44086
+ if (rotation) {
44087
+ dataLabel.attr({ align: align });
44088
+ }
44089
+ var bBox = dataLabel.getBBox(true),
44090
+ bBoxCorrection = [0, 0];
43859
44091
  baseline = chart.renderer.fontMetrics(chart.styledMode ? void 0 : options.style.fontSize, dataLabel).b;
43860
44092
  // The alignment box is a singular point
43861
44093
  alignTo = extend({
@@ -43884,27 +44116,12 @@
43884
44116
  { top: 0, middle: 0.5, bottom: 1 }[options.verticalAlign] *
43885
44117
  alignTo.height)
43886
44118
  };
44119
+ bBoxCorrection = [
44120
+ bBox.x - Number(dataLabel.attr('x')),
44121
+ bBox.y - Number(dataLabel.attr('y'))
44122
+ ];
43887
44123
  setStartPos(alignAttr); // data sorting
43888
- dataLabel[isNew ? 'attr' : 'animate'](alignAttr)
43889
- .attr({
43890
- align: align
43891
- });
43892
- // Compensate for the rotated label sticking out on the sides
43893
- normRotation = (rotation + 720) % 360;
43894
- negRotation = normRotation > 180 && normRotation < 360;
43895
- if (align === 'left') {
43896
- alignAttr.y -= negRotation ? bBox.height : 0;
43897
- }
43898
- else if (align === 'center') {
43899
- alignAttr.x -= bBox.width / 2;
43900
- alignAttr.y -= bBox.height / 2;
43901
- }
43902
- else if (align === 'right') {
43903
- alignAttr.x -= bBox.width;
43904
- alignAttr.y -= negRotation ? 0 : bBox.height;
43905
- }
43906
- dataLabel.placed = true;
43907
- dataLabel.alignAttr = alignAttr;
44124
+ dataLabel[isNew ? 'attr' : 'animate'](alignAttr);
43908
44125
  }
43909
44126
  else {
43910
44127
  setStartPos(alignTo); // data sorting
@@ -43917,12 +44134,37 @@
43917
44134
  // Now check that the data label is within the plot area
43918
44135
  }
43919
44136
  else if (pick(options.crop, true)) {
44137
+ var x = alignAttr.x,
44138
+ y = alignAttr.y;
44139
+ x += bBoxCorrection[0];
44140
+ y += bBoxCorrection[1];
44141
+ // Uncomment this block to visualize the bounding boxes used for
44142
+ // determining visibility
44143
+ /*
44144
+ chart.renderer.rect(
44145
+ chart.plotLeft + alignAttr.x + bBox.x,
44146
+ chart.plotTop + alignAttr.y + bBox.y + 9999,
44147
+ bBox.width,
44148
+ bBox.height
44149
+ ).attr({
44150
+ stroke: 'rgba(0, 0, 0, 0.3)',
44151
+ 'stroke-width': 0.5
44152
+ }).add();
44153
+ chart.renderer.circle(
44154
+ chart.plotLeft + alignAttr.x,
44155
+ chart.plotTop + alignAttr.y,
44156
+ 2
44157
+ ).attr({
44158
+ fill: 'red',
44159
+ zIndex: 20
44160
+ }).add();
44161
+ // */
43920
44162
  visible =
43921
- chart.isInsidePlot(alignAttr.x, alignAttr.y, {
44163
+ chart.isInsidePlot(x, y, {
43922
44164
  paneCoordinates: true,
43923
44165
  series: series
43924
44166
  }) &&
43925
- chart.isInsidePlot(alignAttr.x + bBox.width, alignAttr.y + bBox.height, {
44167
+ chart.isInsidePlot(x + bBox.width, y + bBox.height, {
43926
44168
  paneCoordinates: true,
43927
44169
  series: series
43928
44170
  });
@@ -43946,9 +44188,12 @@
43946
44188
  }
43947
44189
  // Show or hide based on the final aligned position
43948
44190
  if (!visible && (!enabledDataSorting || justify)) {
43949
- dataLabel.hide(true);
44191
+ dataLabel.hide();
43950
44192
  dataLabel.placed = false; // don't animate back in
43951
44193
  }
44194
+ else {
44195
+ dataLabel.show();
44196
+ }
43952
44197
  }
43953
44198
  /**
43954
44199
  * Handle the dataLabels.filter option.
@@ -43996,7 +44241,13 @@
43996
44241
  seriesOptions = series.options,
43997
44242
  points = series.points,
43998
44243
  hasRendered = series.hasRendered || 0,
43999
- renderer = chart.renderer;
44244
+ renderer = chart.renderer,
44245
+ _a = chart.options.chart,
44246
+ backgroundColor = _a.backgroundColor,
44247
+ plotBackgroundColor = _a.plotBackgroundColor,
44248
+ contrastColor = renderer.getContrast((isString(plotBackgroundColor) && plotBackgroundColor) ||
44249
+ (isString(backgroundColor) && backgroundColor) ||
44250
+ "#000000" /* Palette.neutralColor100 */);
44000
44251
  var seriesDlOptions = seriesOptions.dataLabels,
44001
44252
  pointOptions,
44002
44253
  dataLabelsGroup;
@@ -44025,7 +44276,7 @@
44025
44276
  var group = series.dataLabelsGroup;
44026
44277
  if (group) {
44027
44278
  if (series.visible) { // #2597, #3023, #3024
44028
- dataLabelsGroup.show(true);
44279
+ dataLabelsGroup.show();
44029
44280
  }
44030
44281
  group[seriesOptions.animation ? 'animate' : 'attr']({ opacity: 1 }, animationConfig);
44031
44282
  }
@@ -44074,7 +44325,7 @@
44074
44325
  rotation = labelOptions.rotation;
44075
44326
  if (!chart.styledMode) {
44076
44327
  // Determine the color
44077
- style.color = pick(labelOptions.color, style.color, series.color, "#000000" /* neutralColor100 */);
44328
+ style.color = pick(labelOptions.color, style.color, series.color, "#000000" /* Palette.neutralColor100 */);
44078
44329
  // Get automated contrast color
44079
44330
  if (style.color === 'contrast') {
44080
44331
  point.contrastColor = renderer.getContrast((point.color || series.color));
@@ -44083,7 +44334,7 @@
44083
44334
  labelDistance < 0 ||
44084
44335
  !!seriesOptions.stacking ?
44085
44336
  point.contrastColor :
44086
- "#000000" /* neutralColor100 */;
44337
+ contrastColor;
44087
44338
  }
44088
44339
  else {
44089
44340
  delete point.contrastColor;
@@ -44160,10 +44411,10 @@
44160
44411
  point.dataLabels = point.dataLabels || [];
44161
44412
  dataLabel = point.dataLabels[i] = rotation ?
44162
44413
  // Labels don't rotate, use text element
44163
- renderer.text(labelText, 0, -9999, labelOptions.useHTML)
44414
+ renderer.text(labelText, 0, 0, labelOptions.useHTML)
44164
44415
  .addClass('highcharts-data-label') :
44165
44416
  // We can use label
44166
- renderer.label(labelText, 0, -9999, labelOptions.shape, null, null, labelOptions.useHTML, null, 'data-label');
44417
+ renderer.label(labelText, 0, 0, labelOptions.shape, null, null, labelOptions.useHTML, null, 'data-label');
44167
44418
  // Store for backwards compatibility
44168
44419
  if (!i) {
44169
44420
  point.dataLabel = dataLabel;
@@ -44188,9 +44439,6 @@
44188
44439
  // read text bounding box
44189
44440
  dataLabel.css(style).shadow(labelOptions.shadow);
44190
44441
  }
44191
- if (!dataLabel.added) {
44192
- dataLabel.add(dataLabelsGroup);
44193
- }
44194
44442
  if (labelOptions.textPath && !labelOptions.useHTML) {
44195
44443
  dataLabel.setTextPath((point.getDataLabelPath &&
44196
44444
  point.getDataLabelPath(dataLabel)) || point.graphic, labelOptions.textPath);
@@ -44200,10 +44448,16 @@
44200
44448
  point.dataLabelPath = (point.dataLabelPath.destroy());
44201
44449
  }
44202
44450
  }
44451
+ if (!dataLabel.added) {
44452
+ dataLabel.add(dataLabelsGroup);
44453
+ }
44203
44454
  // Now the data label is created and placed at 0,0, so
44204
44455
  // we need to align it
44205
44456
  series.alignDataLabel(point, dataLabel, labelOptions, null, isNew);
44206
44457
  }
44458
+ else if (dataLabel) {
44459
+ dataLabel.hide();
44460
+ }
44207
44461
  });
44208
44462
  });
44209
44463
  }
@@ -44681,7 +44935,7 @@
44681
44935
 
44682
44936
  return BarSeries;
44683
44937
  });
44684
- _registerModule(_modules, 'Series/Scatter/ScatterSeries.js', [_modules['Series/Column/ColumnSeries.js'], _modules['Series/Line/LineSeries.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (ColumnSeries, LineSeries, SeriesRegistry, U) {
44938
+ _registerModule(_modules, 'Series/Scatter/ScatterSeries.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
44685
44939
  /* *
44686
44940
  *
44687
44941
  * (c) 2010-2021 Torstein Honsi
@@ -44707,6 +44961,9 @@
44707
44961
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
44708
44962
  };
44709
44963
  })();
44964
+ var _a = SeriesRegistry.seriesTypes,
44965
+ ColumnSeries = _a.column,
44966
+ LineSeries = _a.line;
44710
44967
  var addEvent = U.addEvent,
44711
44968
  extend = U.extend,
44712
44969
  merge = U.merge;
@@ -44723,6 +44980,11 @@
44723
44980
  var ScatterSeries = /** @class */ (function (_super) {
44724
44981
  __extends(ScatterSeries, _super);
44725
44982
  function ScatterSeries() {
44983
+ /* *
44984
+ *
44985
+ * Static Properties
44986
+ *
44987
+ * */
44726
44988
  var _this = _super !== null && _super.apply(this,
44727
44989
  arguments) || this;
44728
44990
  /* *
@@ -44790,7 +45052,6 @@
44790
45052
  };
44791
45053
  /**
44792
45054
  * @private
44793
- * @function Highcharts.seriesTypes.scatter#drawGraph
44794
45055
  */
44795
45056
  ScatterSeries.prototype.drawGraph = function () {
44796
45057
  if (this.options.lineWidth) {
@@ -44887,9 +45148,12 @@
44887
45148
  * series, in a scatter plot the series.name by default shows in the
44888
45149
  * headerFormat and point.x and point.y in the pointFormat.
44889
45150
  *
44890
- * @product highcharts highstock
45151
+ * @product highcharts highstock highmaps
44891
45152
  */
44892
45153
  tooltip: {
45154
+ /**
45155
+ * @product highcharts highstock
45156
+ */
44893
45157
  headerFormat: '<span style="color:{point.color}">\u25CF</span> ' +
44894
45158
  '<span style="font-size: 10px"> {series.name}</span><br/>',
44895
45159
  pointFormat: 'x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>'
@@ -44993,7 +45257,7 @@
44993
45257
  * @product highcharts highstock
44994
45258
  * @apioption series.scatter.data
44995
45259
  */
44996
- ''; // adds doclets above to transpilat
45260
+ ''; // keeps doclets above in JS file
44997
45261
 
44998
45262
  return ScatterSeries;
44999
45263
  });
@@ -45008,7 +45272,8 @@
45008
45272
  *
45009
45273
  * */
45010
45274
  var deg2rad = H.deg2rad;
45011
- var isNumber = U.isNumber,
45275
+ var fireEvent = U.fireEvent,
45276
+ isNumber = U.isNumber,
45012
45277
  pick = U.pick,
45013
45278
  relativeLength = U.relativeLength;
45014
45279
  /**
@@ -45042,7 +45307,8 @@
45042
45307
  plotHeight = chart.plotHeight - 2 * slicingRoom,
45043
45308
  centerOption = options.center,
45044
45309
  smallestSize = Math.min(plotWidth,
45045
- plotHeight);
45310
+ plotHeight),
45311
+ thickness = options.thickness;
45046
45312
  var handleSlicingRoom,
45047
45313
  size = options.size,
45048
45314
  innerSize = options.innerSize || 0,
@@ -45079,6 +45345,12 @@
45079
45345
  if (positions[3] > positions[2]) {
45080
45346
  positions[3] = positions[2];
45081
45347
  }
45348
+ // thickness overrides innerSize, need to be less than pie size (#6647)
45349
+ if (isNumber(thickness) &&
45350
+ thickness * 2 < positions[2] && thickness > 0) {
45351
+ positions[3] = positions[2] - thickness * 2;
45352
+ }
45353
+ fireEvent(this, 'afterGetCenter', { positions: positions });
45082
45354
  return positions;
45083
45355
  }
45084
45356
  CenteredUtilities.getCenter = getCenter;
@@ -45582,7 +45854,7 @@
45582
45854
  this.graph.attr({
45583
45855
  'stroke-width': options.borderWidth,
45584
45856
  fill: options.fillColor || 'none',
45585
- stroke: options.color || "#cccccc" /* neutralColor20 */
45857
+ stroke: options.color || "#cccccc" /* Palette.neutralColor20 */
45586
45858
  });
45587
45859
  }
45588
45860
  }
@@ -45739,6 +46011,7 @@
45739
46011
  * @private
45740
46012
  */
45741
46013
  PieSeries.prototype.translate = function (positions) {
46014
+ fireEvent(this, 'translate');
45742
46015
  this.generatePoints();
45743
46016
  var series = this,
45744
46017
  precision = 1000, // issue #172
@@ -45908,8 +46181,10 @@
45908
46181
  * pointPlacement, pointStart, softThreshold, stacking, step,
45909
46182
  * threshold, turboThreshold, zoneAxis, zones, dataSorting,
45910
46183
  * boostBlending
45911
- * @product highcharts
46184
+ * @product highcharts highmaps
45912
46185
  * @optionparent plotOptions.pie
46186
+ *
46187
+ * @private
45913
46188
  */
45914
46189
  PieSeries.defaultOptions = merge(Series.defaultOptions, {
45915
46190
  /**
@@ -45928,7 +46203,7 @@
45928
46203
  *
45929
46204
  * @type {Function}
45930
46205
  * @since 1.2.0
45931
- * @product highcharts
46206
+ * @product highcharts highmaps
45932
46207
  * @context Highcharts.Point
45933
46208
  * @apioption plotOptions.pie.events.checkboxClick
45934
46209
  */
@@ -45944,7 +46219,7 @@
45944
46219
  *
45945
46220
  * @type {Highcharts.PointLegendItemClickCallbackFunction}
45946
46221
  * @since 1.2.0
45947
- * @product highcharts
46222
+ * @product highcharts highmaps
45948
46223
  * @apioption plotOptions.pie.point.events.legendItemClick
45949
46224
  */
45950
46225
  /**
@@ -45960,7 +46235,7 @@
45960
46235
  *
45961
46236
  * @type {Array<(number|string|null),(number|string|null)>}
45962
46237
  * @default [null, null]
45963
- * @product highcharts
46238
+ * @product highcharts highmaps
45964
46239
  *
45965
46240
  * @private
45966
46241
  */
@@ -46005,7 +46280,7 @@
46005
46280
  *
46006
46281
  * @type {Array<Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject>}
46007
46282
  * @since 3.0
46008
- * @product highcharts
46283
+ * @product highcharts highmaps
46009
46284
  * @apioption plotOptions.pie.colors
46010
46285
  */
46011
46286
  /**
@@ -46018,7 +46293,7 @@
46018
46293
  /**
46019
46294
  * Alignment method for data labels. Possible values are:
46020
46295
  *
46021
- * - `toPlotEdges`: Each label touches the nearest vertical edge of
46296
+ * - `plotEdges`: Each label touches the nearest vertical edge of
46022
46297
  * the plot area.
46023
46298
  *
46024
46299
  * - `connectors`: Connectors have the same x position and the
@@ -46032,7 +46307,7 @@
46032
46307
  *
46033
46308
  * @type {string}
46034
46309
  * @since 7.0.0
46035
- * @product highcharts
46310
+ * @product highcharts highmaps
46036
46311
  * @apioption plotOptions.pie.dataLabels.alignTo
46037
46312
  */
46038
46313
  allowOverlap: true,
@@ -46050,7 +46325,7 @@
46050
46325
  *
46051
46326
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
46052
46327
  * @since 2.1
46053
- * @product highcharts
46328
+ * @product highcharts highmaps
46054
46329
  * @apioption plotOptions.pie.dataLabels.connectorColor
46055
46330
  */
46056
46331
  /**
@@ -46062,7 +46337,7 @@
46062
46337
  * No padding
46063
46338
  *
46064
46339
  * @since 2.1
46065
- * @product highcharts
46340
+ * @product highcharts highmaps
46066
46341
  */
46067
46342
  connectorPadding: 5,
46068
46343
  /**
@@ -46099,7 +46374,7 @@
46099
46374
  *
46100
46375
  * @type {string|Function}
46101
46376
  * @since 7.0.0
46102
- * @product highcharts
46377
+ * @product highcharts highmaps
46103
46378
  */
46104
46379
  connectorShape: 'fixedOffset',
46105
46380
  /**
@@ -46116,7 +46391,7 @@
46116
46391
  * @type {number}
46117
46392
  * @default 1
46118
46393
  * @since 2.1
46119
- * @product highcharts
46394
+ * @product highcharts highmaps
46120
46395
  * @apioption plotOptions.pie.dataLabels.connectorWidth
46121
46396
  */
46122
46397
  /**
@@ -46128,7 +46403,7 @@
46128
46403
  * crookDistance set to 90%
46129
46404
  *
46130
46405
  * @since 7.0.0
46131
- * @product highcharts
46406
+ * @product highcharts highmaps
46132
46407
  */
46133
46408
  crookDistance: '70%',
46134
46409
  /**
@@ -46142,7 +46417,7 @@
46142
46417
  *
46143
46418
  * @type {number|string}
46144
46419
  * @since 2.1
46145
- * @product highcharts
46420
+ * @product highcharts highmaps
46146
46421
  */
46147
46422
  distance: 30,
46148
46423
  enabled: true,
@@ -46183,7 +46458,7 @@
46183
46458
  * Non soft
46184
46459
  *
46185
46460
  * @since 2.1.7
46186
- * @product highcharts
46461
+ * @product highcharts highmaps
46187
46462
  */
46188
46463
  softConnector: true,
46189
46464
  /**
@@ -46219,9 +46494,20 @@
46219
46494
  *
46220
46495
  * @type {number}
46221
46496
  * @since 1.3.6
46222
- * @product highcharts
46497
+ * @product highcharts highmaps
46223
46498
  * @apioption plotOptions.pie.endAngle
46224
46499
  */
46500
+ /**
46501
+ * Thickness describing the ring size for a donut type chart,
46502
+ * overriding [innerSize](#plotOptions.pie.innerSize).
46503
+ *
46504
+ * @type {number}
46505
+ * @default undefined
46506
+ * @product highcharts
46507
+ * @since 10.1.0
46508
+ * @apioption plotOptions.pie.thickness
46509
+ * @private
46510
+ */
46225
46511
  /**
46226
46512
  * Equivalent to [chart.ignoreHiddenSeries](#chart.ignoreHiddenSeries),
46227
46513
  * this option tells whether the series shall be redrawn as if the
@@ -46234,7 +46520,7 @@
46234
46520
  * True, the hiddden point is ignored
46235
46521
  *
46236
46522
  * @since 2.3.0
46237
- * @product highcharts
46523
+ * @product highcharts highmaps
46238
46524
  *
46239
46525
  * @private
46240
46526
  */
@@ -46249,7 +46535,7 @@
46249
46535
  * The size of the inner diameter for the pie. A size greater than 0
46250
46536
  * renders a donut chart. Can be a percentage or pixel value.
46251
46537
  * Percentages are relative to the pie size. Pixel values are given as
46252
- * integers.
46538
+ * integers. Setting overridden by thickness.
46253
46539
  *
46254
46540
  *
46255
46541
  * Note: in Highcharts < 4.1.2, the percentage was relative to the plot
@@ -46265,7 +46551,7 @@
46265
46551
  * @type {number|string}
46266
46552
  * @default 0
46267
46553
  * @since 2.0
46268
- * @product highcharts
46554
+ * @product highcharts highmaps
46269
46555
  * @apioption plotOptions.pie.innerSize
46270
46556
  */
46271
46557
  /**
@@ -46288,7 +46574,7 @@
46288
46574
  * @type {number|string}
46289
46575
  * @default 80
46290
46576
  * @since 3.0
46291
- * @product highcharts
46577
+ * @product highcharts highmaps
46292
46578
  * @apioption plotOptions.pie.minSize
46293
46579
  */
46294
46580
  /**
@@ -46305,7 +46591,7 @@
46305
46591
  * Smaller pie
46306
46592
  *
46307
46593
  * @type {number|string|null}
46308
- * @product highcharts
46594
+ * @product highcharts highmaps
46309
46595
  *
46310
46596
  * @private
46311
46597
  */
@@ -46317,7 +46603,7 @@
46317
46603
  * @sample {highcharts} highcharts/plotoptions/series-showinlegend/
46318
46604
  * One series in the legend, one hidden
46319
46605
  *
46320
- * @product highcharts
46606
+ * @product highcharts highmaps
46321
46607
  *
46322
46608
  * @private
46323
46609
  */
@@ -46329,7 +46615,7 @@
46329
46615
  * @sample {highcharts} highcharts/plotoptions/pie-slicedoffset-20/
46330
46616
  * 20px offset
46331
46617
  *
46332
- * @product highcharts
46618
+ * @product highcharts highmaps
46333
46619
  *
46334
46620
  * @private
46335
46621
  */
@@ -46344,7 +46630,7 @@
46344
46630
  * @type {number}
46345
46631
  * @default 0
46346
46632
  * @since 2.3.4
46347
- * @product highcharts
46633
+ * @product highcharts highmaps
46348
46634
  * @apioption plotOptions.pie.startAngle
46349
46635
  */
46350
46636
  /**
@@ -46356,7 +46642,7 @@
46356
46642
  * `stickyTracking` is false and `tooltip.shared` is false, the tooltip
46357
46643
  * will be hidden when moving the mouse between series.
46358
46644
  *
46359
- * @product highcharts
46645
+ * @product highcharts highmaps
46360
46646
  *
46361
46647
  * @private
46362
46648
  */
@@ -46378,11 +46664,11 @@
46378
46664
  *
46379
46665
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
46380
46666
  * @default #ffffff
46381
- * @product highcharts
46667
+ * @product highcharts highmaps
46382
46668
  *
46383
46669
  * @private
46384
46670
  */
46385
- borderColor: "#ffffff" /* backgroundColor */,
46671
+ borderColor: "#ffffff" /* Palette.backgroundColor */,
46386
46672
  /**
46387
46673
  * The width of the border surrounding each slice.
46388
46674
  *
@@ -46397,7 +46683,7 @@
46397
46683
  * @sample {highcharts} highcharts/plotoptions/pie-borderwidth/
46398
46684
  * 3px border
46399
46685
  *
46400
- * @product highcharts
46686
+ * @product highcharts highmaps
46401
46687
  *
46402
46688
  * @private
46403
46689
  */
@@ -46411,7 +46697,7 @@
46411
46697
  /**
46412
46698
  * @extends plotOptions.series.states.hover
46413
46699
  * @excluding marker, lineWidth, lineWidthPlus
46414
- * @product highcharts
46700
+ * @product highcharts highmaps
46415
46701
  */
46416
46702
  hover: {
46417
46703
  /**
@@ -46425,7 +46711,7 @@
46425
46711
  * @sample {highcharts} highcharts/plotoptions/pie-states-hover-brightness/
46426
46712
  * Brightened by 0.5
46427
46713
  *
46428
- * @product highcharts
46714
+ * @product highcharts highmaps
46429
46715
  */
46430
46716
  brightness: 0.1
46431
46717
  }
@@ -46467,7 +46753,7 @@
46467
46753
  * @extends series,plotOptions.pie
46468
46754
  * @excluding cropThreshold, dataParser, dataURL, stack, xAxis, yAxis,
46469
46755
  * dataSorting, step, boostThreshold, boostBlending
46470
- * @product highcharts
46756
+ * @product highcharts highmaps
46471
46757
  * @apioption series.pie
46472
46758
  */
46473
46759
  /**
@@ -46511,19 +46797,19 @@
46511
46797
  * @type {Array<number|Array<string,(number|null)>|null|*>}
46512
46798
  * @extends series.line.data
46513
46799
  * @excluding marker, x
46514
- * @product highcharts
46800
+ * @product highcharts highmaps
46515
46801
  * @apioption series.pie.data
46516
46802
  */
46517
46803
  /**
46518
46804
  * @type {Highcharts.SeriesPieDataLabelsOptionsObject}
46519
- * @product highcharts
46805
+ * @product highcharts highmaps
46520
46806
  * @apioption series.pie.data.dataLabels
46521
46807
  */
46522
46808
  /**
46523
46809
  * The sequential index of the data point in the legend.
46524
46810
  *
46525
46811
  * @type {number}
46526
- * @product highcharts
46812
+ * @product highcharts highmaps
46527
46813
  * @apioption series.pie.data.legendIndex
46528
46814
  */
46529
46815
  /**
@@ -46533,18 +46819,18 @@
46533
46819
  * One sliced point
46534
46820
  *
46535
46821
  * @type {boolean}
46536
- * @product highcharts
46822
+ * @product highcharts highmaps
46537
46823
  * @apioption series.pie.data.sliced
46538
46824
  */
46539
46825
  /**
46540
46826
  * @extends plotOptions.pie.dataLabels
46541
46827
  * @excluding align, allowOverlap, inside, staggerLines, step
46542
- * @product highcharts
46828
+ * @product highcharts highmaps
46543
46829
  * @apioption series.pie.dataLabels
46544
46830
  */
46545
46831
  /**
46546
46832
  * @excluding legendItemClick
46547
- * @product highcharts
46833
+ * @product highcharts highmaps
46548
46834
  * @apioption series.pie.events
46549
46835
  */
46550
46836
  ''; // placeholder for transpiled doclets above
@@ -46913,7 +47199,7 @@
46913
47199
  'stroke-width': connectorWidth,
46914
47200
  'stroke': (pointDataLabelsOptions.connectorColor ||
46915
47201
  point.color ||
46916
- "#666666" /* neutralColor60 */)
47202
+ "#666666" /* Palette.neutralColor60 */)
46917
47203
  });
46918
47204
  }
46919
47205
  }
@@ -47011,7 +47297,9 @@
47011
47297
  if (newSize < center[2]) {
47012
47298
  center[2] = newSize;
47013
47299
  center[3] = Math.min(// #3632
47014
- relativeLength(options.innerSize || 0, newSize), newSize);
47300
+ options.thickness ?
47301
+ Math.max(0, newSize - options.thickness * 2) :
47302
+ Math.max(0, relativeLength(options.innerSize || 0, newSize)), newSize); // #6647
47015
47303
  this.translate(center);
47016
47304
  if (this.drawDataLabels) {
47017
47305
  this.drawDataLabels();
@@ -47074,9 +47362,7 @@
47074
47362
  !yAxis.options.stackLabels.allowOverlap) {
47075
47363
  objectEach(yAxis.stacking.stacks, function (stack) {
47076
47364
  objectEach(stack, function (stackItem) {
47077
- if (stackItem.label &&
47078
- stackItem.label.visibility !== 'hidden' // #15607
47079
- ) {
47365
+ if (stackItem.label) {
47080
47366
  labels.push(stackItem.label);
47081
47367
  }
47082
47368
  });
@@ -47220,7 +47506,10 @@
47220
47506
  box2 &&
47221
47507
  label1 !== label2 && // #6465, polar chart with connectEnds
47222
47508
  label1.newOpacity !== 0 &&
47223
- label2.newOpacity !== 0) {
47509
+ label2.newOpacity !== 0 &&
47510
+ // #15863 dataLabels are no longer hidden by translation
47511
+ label1.visibility !== 'hidden' &&
47512
+ label2.visibility !== 'hidden') {
47224
47513
  if (isIntersectRect(box1, box2)) {
47225
47514
  (label1.labelrank < label2.labelrank ? label1 : label2)
47226
47515
  .newOpacity = 0;
@@ -47636,7 +47925,7 @@
47636
47925
 
47637
47926
  return Responsive;
47638
47927
  });
47639
- _registerModule(_modules, 'masters/highcharts.src.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Animation/Fx.js'], _modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Renderer/HTML/AST.js'], _modules['Core/FormatUtilities.js'], _modules['Core/Renderer/RendererUtilities.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Renderer/HTML/HTMLElement.js'], _modules['Core/Renderer/HTML/HTMLRenderer.js'], _modules['Core/Axis/Axis.js'], _modules['Core/Axis/DateTimeAxis.js'], _modules['Core/Axis/LogarithmicAxis.js'], _modules['Core/Axis/PlotLineOrBand/PlotLineOrBand.js'], _modules['Core/Axis/Tick.js'], _modules['Core/Tooltip.js'], _modules['Core/Series/Point.js'], _modules['Core/Pointer.js'], _modules['Core/MSPointer.js'], _modules['Core/Legend/Legend.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Series/Series.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Series/Column/ColumnSeries.js'], _modules['Series/Column/ColumnDataLabel.js'], _modules['Series/Pie/PieSeries.js'], _modules['Series/Pie/PieDataLabel.js'], _modules['Core/Series/DataLabel.js'], _modules['Core/Responsive.js'], _modules['Core/Color/Color.js'], _modules['Core/Time.js']], function (Highcharts, Utilities, DefaultOptions, Fx, Animation, AST, FormatUtilities, RendererUtilities, SVGElement, SVGRenderer, HTMLElement, HTMLRenderer, Axis, DateTimeAxis, LogarithmicAxis, PlotLineOrBand, Tick, Tooltip, Point, Pointer, MSPointer, Legend, Chart, Series, SeriesRegistry, ColumnSeries, ColumnDataLabel, PieSeries, PieDataLabel, DataLabel, Responsive, Color, Time) {
47928
+ _registerModule(_modules, 'masters/highcharts.src.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Animation/Fx.js'], _modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Renderer/HTML/AST.js'], _modules['Core/FormatUtilities.js'], _modules['Core/Renderer/RendererUtilities.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Renderer/HTML/HTMLElement.js'], _modules['Core/Renderer/HTML/HTMLRenderer.js'], _modules['Core/Axis/Axis.js'], _modules['Core/Axis/DateTimeAxis.js'], _modules['Core/Axis/LogarithmicAxis.js'], _modules['Core/Axis/PlotLineOrBand/PlotLineOrBand.js'], _modules['Core/Axis/Tick.js'], _modules['Core/Tooltip.js'], _modules['Core/Series/Point.js'], _modules['Core/Pointer.js'], _modules['Core/MSPointer.js'], _modules['Core/Legend/Legend.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Axis/Stacking/StackingAxis.js'], _modules['Core/Axis/Stacking/StackItem.js'], _modules['Core/Series/Series.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Series/Column/ColumnSeries.js'], _modules['Series/Column/ColumnDataLabel.js'], _modules['Series/Pie/PieSeries.js'], _modules['Series/Pie/PieDataLabel.js'], _modules['Core/Series/DataLabel.js'], _modules['Core/Responsive.js'], _modules['Core/Color/Color.js'], _modules['Core/Time.js']], function (Highcharts, Utilities, DefaultOptions, Fx, Animation, AST, FormatUtilities, RendererUtilities, SVGElement, SVGRenderer, HTMLElement, HTMLRenderer, Axis, DateTimeAxis, LogarithmicAxis, PlotLineOrBand, Tick, Tooltip, Point, Pointer, MSPointer, Legend, Chart, StackingAxis, StackItem, Series, SeriesRegistry, ColumnSeries, ColumnDataLabel, PieSeries, PieDataLabel, DataLabel, Responsive, Color, Time) {
47640
47929
 
47641
47930
  var G = Highcharts;
47642
47931
  // Animation
@@ -47657,6 +47946,7 @@
47657
47946
  G.Point = Point;
47658
47947
  G.Pointer = (MSPointer.isRequired() ? MSPointer : Pointer);
47659
47948
  G.Series = Series;
47949
+ G.StackItem = StackItem;
47660
47950
  G.SVGElement = SVGElement;
47661
47951
  G.SVGRenderer = SVGRenderer;
47662
47952
  G.Tick = Tick;
@@ -47732,6 +48022,7 @@
47732
48022
  PieDataLabel.compose(PieSeries);
47733
48023
  PlotLineOrBand.compose(Axis);
47734
48024
  Responsive.compose(Chart);
48025
+ StackingAxis.compose(Axis, Chart, Series);
47735
48026
  // Default Export
47736
48027
 
47737
48028
  return G;