highcharts 9.3.3 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (670) hide show
  1. package/bower.json +1 -1
  2. package/css/highcharts.css +19 -2
  3. package/css/highcharts.scss +17 -2
  4. package/css/themes/dark-unica.css +19 -2
  5. package/css/themes/grid-light.css +19 -2
  6. package/css/themes/sand-signika.css +19 -2
  7. package/es-modules/Accessibility/Accessibility.js +1 -1
  8. package/es-modules/Accessibility/Components/LegendComponent.js +31 -23
  9. package/es-modules/Accessibility/Components/MenuComponent.js +4 -5
  10. package/es-modules/Accessibility/Components/RangeSelectorComponent.js +2 -2
  11. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +7 -6
  12. package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +1 -1
  13. package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +0 -1
  14. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +3 -3
  15. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +61 -29
  16. package/es-modules/Accessibility/Components/ZoomComponent.js +13 -10
  17. package/es-modules/Accessibility/HighContrastMode.js +2 -2
  18. package/es-modules/Accessibility/KeyboardNavigation.js +113 -98
  19. package/es-modules/Accessibility/ProxyElement.js +14 -6
  20. package/es-modules/Accessibility/ProxyProvider.js +10 -2
  21. package/es-modules/Core/Axis/Axis.js +150 -46
  22. package/es-modules/Core/Axis/Color/ColorAxis.js +22 -5
  23. package/es-modules/Core/Axis/GridAxis.js +10 -9
  24. package/es-modules/Core/Axis/TreeGridTick.js +11 -0
  25. package/es-modules/Core/Chart/Chart3D.js +1 -11
  26. package/es-modules/Core/Chart/ChartDefaults.js +32 -11
  27. package/es-modules/Core/Chart/MapChart.js +1 -6
  28. package/es-modules/Core/DefaultOptions.js +2 -0
  29. package/es-modules/Core/Geometry/PolygonClip.js +84 -0
  30. package/es-modules/Core/Globals.js +4 -18
  31. package/es-modules/Core/HttpUtilities.js +13 -8
  32. package/es-modules/Core/Legend/Legend.js +10 -8
  33. package/es-modules/Core/Navigator.js +9 -6
  34. package/es-modules/Core/Pointer.js +15 -11
  35. package/es-modules/Core/Renderer/HTML/AST.js +62 -5
  36. package/es-modules/Core/Renderer/SVG/SVGElement.js +25 -41
  37. package/es-modules/Core/Renderer/SVG/SVGElement3D.js +17 -5
  38. package/es-modules/Core/Renderer/SVG/SVGRenderer.js +17 -17
  39. package/es-modules/Core/Renderer/SVG/TextBuilder.js +12 -10
  40. package/es-modules/Core/Series/DataLabel.js +11 -3
  41. package/es-modules/Core/Series/Point.js +2 -2
  42. package/es-modules/Core/Series/Series.js +33 -15
  43. package/es-modules/Core/Series/SeriesDefaults.js +4 -1
  44. package/es-modules/Core/Tooltip.js +14 -31
  45. package/es-modules/Core/Utilities.js +28 -28
  46. package/es-modules/Extensions/Annotations/Annotations.js +7 -0
  47. package/es-modules/Extensions/Annotations/MockPoint.js +1 -1
  48. package/es-modules/Extensions/Annotations/NavigationBindings.js +1 -1
  49. package/es-modules/Extensions/Annotations/Popup.js +1 -1
  50. package/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +5 -3
  51. package/es-modules/Extensions/Boost/BoostInit.js +6 -1
  52. package/es-modules/Extensions/Boost/BoostOptions.js +26 -0
  53. package/es-modules/Extensions/Boost/Boostables.js +1 -0
  54. package/es-modules/Extensions/Boost/WGLRenderer.js +48 -37
  55. package/es-modules/Extensions/Boost/WGLShader.js +4 -3
  56. package/es-modules/Extensions/Breadcrumbs.js +874 -0
  57. package/es-modules/Extensions/Data.js +26 -14
  58. package/es-modules/Extensions/DataGrouping.js +5 -2
  59. package/es-modules/Extensions/DraggablePoints.js +9 -7
  60. package/es-modules/Extensions/Drilldown.js +147 -94
  61. package/es-modules/Extensions/Exporting/Exporting.js +9 -7
  62. package/es-modules/Extensions/Exporting/ExportingDefaults.js +49 -1
  63. package/es-modules/Extensions/GeoJSON.js +149 -124
  64. package/es-modules/Extensions/MarkerClusters.js +34 -20
  65. package/es-modules/Extensions/OfflineExporting/OfflineExporting.js +110 -22
  66. package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
  67. package/es-modules/Extensions/Oldie/Oldie.js +1 -1
  68. package/es-modules/Extensions/ScrollablePlotArea.js +5 -1
  69. package/es-modules/Extensions/Stacking.js +3 -2
  70. package/es-modules/Extensions/Themes/HighContrastDark.js +10 -10
  71. package/es-modules/Extensions/Themes/HighContrastLight.js +10 -10
  72. package/es-modules/Maps/MapNavigation.js +49 -8
  73. package/es-modules/Maps/MapPointer.js +16 -0
  74. package/es-modules/Maps/MapUtilities.js +56 -0
  75. package/es-modules/Maps/MapView.js +606 -135
  76. package/es-modules/Maps/MapViewInsetsOptionsDefault.js +148 -0
  77. package/es-modules/Maps/MapViewOptionsDefault.js +58 -20
  78. package/es-modules/Maps/Projection.js +169 -77
  79. package/es-modules/Maps/Projections/EqualEarth.js +15 -6
  80. package/es-modules/Maps/Projections/LambertConformalConic.js +27 -19
  81. package/es-modules/Maps/Projections/Miller.js +23 -10
  82. package/es-modules/Maps/Projections/Orthographic.js +21 -10
  83. package/es-modules/Maps/Projections/WebMercator.js +25 -13
  84. package/es-modules/Series/ArcDiagram/ArcDiagramPoint.js +77 -0
  85. package/es-modules/Series/ArcDiagram/ArcDiagramSeries.js +581 -0
  86. package/es-modules/Series/Column/ColumnSeries.js +4 -3
  87. package/es-modules/Series/DataModifyComposition.js +1 -0
  88. package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +2 -2
  89. package/es-modules/Series/DrawPointComposition.js +7 -4
  90. package/es-modules/Series/Lollipop/LollipopSeries.js +1 -1
  91. package/es-modules/Series/Map/MapPoint.js +24 -1
  92. package/es-modules/Series/Map/MapSeries.js +196 -169
  93. package/es-modules/Series/MapBubble/MapBubblePoint.js +16 -24
  94. package/es-modules/Series/MapBubble/MapBubbleSeries.js +11 -0
  95. package/es-modules/Series/MapPoint/MapPointPoint.js +2 -8
  96. package/es-modules/Series/MapPoint/MapPointSeries.js +36 -14
  97. package/es-modules/Series/NodesComposition.js +60 -13
  98. package/es-modules/Series/OHLC/OHLCSeries.js +7 -0
  99. package/es-modules/Series/Organization/OrganizationPoint.js +68 -2
  100. package/es-modules/Series/Organization/OrganizationSeries.js +79 -25
  101. package/es-modules/Series/Pie/PiePoint.js +12 -5
  102. package/es-modules/Series/Pie3D/Pie3DSeries.js +19 -0
  103. package/es-modules/Series/Sankey/SankeyColumnComposition.js +193 -0
  104. package/es-modules/Series/Sankey/SankeyPoint.js +37 -1
  105. package/es-modules/Series/Sankey/SankeySeries.js +10 -127
  106. package/es-modules/Series/Scatter/ScatterSeries.js +1 -1
  107. package/es-modules/Series/Sunburst/SunburstSeries.js +13 -2
  108. package/es-modules/Series/Treemap/TreemapSeries.js +88 -80
  109. package/es-modules/Series/Waterfall/WaterfallSeries.js +2 -0
  110. package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +9 -2
  111. package/es-modules/Stock/StockToolsGui.js +1 -1
  112. package/es-modules/masters/highcharts-3d.src.js +1 -1
  113. package/es-modules/masters/highcharts-gantt.src.js +1 -1
  114. package/es-modules/masters/highcharts-more.src.js +1 -1
  115. package/es-modules/masters/highcharts.src.js +1 -1
  116. package/es-modules/masters/highmaps.src.js +1 -1
  117. package/es-modules/masters/highstock.src.js +1 -1
  118. package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
  119. package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
  120. package/es-modules/masters/indicators/ao.src.js +1 -1
  121. package/es-modules/masters/indicators/apo.src.js +1 -1
  122. package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
  123. package/es-modules/masters/indicators/aroon.src.js +1 -1
  124. package/es-modules/masters/indicators/atr.src.js +1 -1
  125. package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
  126. package/es-modules/masters/indicators/cci.src.js +1 -1
  127. package/es-modules/masters/indicators/chaikin.src.js +1 -1
  128. package/es-modules/masters/indicators/cmf.src.js +1 -1
  129. package/es-modules/masters/indicators/cmo.src.js +1 -1
  130. package/es-modules/masters/indicators/dema.src.js +1 -1
  131. package/es-modules/masters/indicators/disparity-index.src.js +1 -1
  132. package/es-modules/masters/indicators/dmi.src.js +1 -1
  133. package/es-modules/masters/indicators/dpo.src.js +1 -1
  134. package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
  135. package/es-modules/masters/indicators/indicators-all.src.js +1 -1
  136. package/es-modules/masters/indicators/indicators.src.js +1 -1
  137. package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
  138. package/es-modules/masters/indicators/klinger.src.js +1 -1
  139. package/es-modules/masters/indicators/macd.src.js +1 -1
  140. package/es-modules/masters/indicators/mfi.src.js +1 -1
  141. package/es-modules/masters/indicators/momentum.src.js +1 -1
  142. package/es-modules/masters/indicators/natr.src.js +1 -1
  143. package/es-modules/masters/indicators/obv.src.js +1 -1
  144. package/es-modules/masters/indicators/pivot-points.src.js +1 -1
  145. package/es-modules/masters/indicators/ppo.src.js +1 -1
  146. package/es-modules/masters/indicators/price-channel.src.js +1 -1
  147. package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
  148. package/es-modules/masters/indicators/psar.src.js +1 -1
  149. package/es-modules/masters/indicators/regressions.src.js +1 -1
  150. package/es-modules/masters/indicators/roc.src.js +1 -1
  151. package/es-modules/masters/indicators/rsi.src.js +1 -1
  152. package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
  153. package/es-modules/masters/indicators/stochastic.src.js +1 -1
  154. package/es-modules/masters/indicators/supertrend.src.js +1 -1
  155. package/es-modules/masters/indicators/tema.src.js +1 -1
  156. package/es-modules/masters/indicators/trendline.src.js +1 -1
  157. package/es-modules/masters/indicators/trix.src.js +1 -1
  158. package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
  159. package/es-modules/masters/indicators/vwap.src.js +1 -1
  160. package/es-modules/masters/indicators/williams-r.src.js +1 -1
  161. package/es-modules/masters/indicators/wma.src.js +1 -1
  162. package/es-modules/masters/indicators/zigzag.src.js +1 -1
  163. package/es-modules/masters/modules/accessibility.src.js +1 -1
  164. package/es-modules/masters/modules/annotations-advanced.src.js +1 -1
  165. package/es-modules/masters/modules/annotations.src.js +1 -1
  166. package/es-modules/masters/modules/arc-diagram.src.js +14 -0
  167. package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
  168. package/es-modules/masters/modules/boost-canvas.src.js +1 -1
  169. package/es-modules/masters/modules/boost.src.js +1 -1
  170. package/es-modules/masters/modules/broken-axis.src.js +1 -1
  171. package/es-modules/masters/modules/bullet.src.js +1 -1
  172. package/es-modules/masters/modules/coloraxis.src.js +1 -1
  173. package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
  174. package/es-modules/masters/modules/cylinder.src.js +1 -1
  175. package/es-modules/masters/modules/data.src.js +1 -1
  176. package/es-modules/masters/modules/datagrouping.src.js +1 -1
  177. package/es-modules/masters/modules/debugger.src.js +1 -1
  178. package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
  179. package/es-modules/masters/modules/dotplot.src.js +1 -1
  180. package/es-modules/masters/modules/drag-panes.src.js +1 -1
  181. package/es-modules/masters/modules/draggable-points.src.js +1 -1
  182. package/es-modules/masters/modules/drilldown.src.js +2 -1
  183. package/es-modules/masters/modules/dumbbell.src.js +1 -1
  184. package/es-modules/masters/modules/export-data.src.js +1 -1
  185. package/es-modules/masters/modules/exporting.src.js +1 -1
  186. package/es-modules/masters/modules/full-screen.src.js +1 -1
  187. package/es-modules/masters/modules/funnel.src.js +1 -1
  188. package/es-modules/masters/modules/funnel3d.src.js +1 -1
  189. package/es-modules/masters/modules/gantt.src.js +1 -1
  190. package/es-modules/masters/modules/grid-axis.src.js +1 -1
  191. package/es-modules/masters/modules/heatmap.src.js +1 -1
  192. package/es-modules/masters/modules/heikinashi.src.js +1 -1
  193. package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
  194. package/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
  195. package/es-modules/masters/modules/item-series.src.js +1 -1
  196. package/es-modules/masters/modules/lollipop.src.js +1 -1
  197. package/es-modules/masters/modules/map.src.js +5 -1
  198. package/es-modules/masters/modules/marker-clusters.src.js +1 -1
  199. package/es-modules/masters/modules/networkgraph.src.js +1 -1
  200. package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
  201. package/es-modules/masters/modules/offline-exporting.src.js +1 -1
  202. package/es-modules/masters/modules/oldie-polyfills.src.js +1 -1
  203. package/es-modules/masters/modules/oldie.src.js +1 -1
  204. package/es-modules/masters/modules/organization.src.js +1 -1
  205. package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
  206. package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
  207. package/es-modules/masters/modules/pareto.src.js +1 -1
  208. package/es-modules/masters/modules/pathfinder.src.js +1 -1
  209. package/es-modules/masters/modules/pattern-fill.src.js +1 -1
  210. package/es-modules/masters/modules/price-indicator.src.js +1 -1
  211. package/es-modules/masters/modules/pyramid3d.src.js +1 -1
  212. package/es-modules/masters/modules/sankey.src.js +1 -1
  213. package/es-modules/masters/modules/series-label.src.js +1 -1
  214. package/es-modules/masters/modules/solid-gauge.src.js +1 -1
  215. package/es-modules/masters/modules/sonification.src.js +1 -1
  216. package/es-modules/masters/modules/static-scale.src.js +1 -1
  217. package/es-modules/masters/modules/stock-tools.src.js +1 -1
  218. package/es-modules/masters/modules/stock.src.js +1 -1
  219. package/es-modules/masters/modules/streamgraph.src.js +1 -1
  220. package/es-modules/masters/modules/sunburst.src.js +1 -1
  221. package/es-modules/masters/modules/tilemap.src.js +1 -1
  222. package/es-modules/masters/modules/timeline.src.js +1 -1
  223. package/es-modules/masters/modules/treegrid.src.js +1 -1
  224. package/es-modules/masters/modules/treemap.src.js +5 -1
  225. package/es-modules/masters/modules/variable-pie.src.js +1 -1
  226. package/es-modules/masters/modules/variwide.src.js +1 -1
  227. package/es-modules/masters/modules/vector.src.js +1 -1
  228. package/es-modules/masters/modules/venn.src.js +1 -1
  229. package/es-modules/masters/modules/windbarb.src.js +1 -1
  230. package/es-modules/masters/modules/wordcloud.src.js +1 -1
  231. package/es-modules/masters/modules/xrange.src.js +1 -1
  232. package/es-modules/masters/themes/avocado.src.js +1 -1
  233. package/es-modules/masters/themes/brand-dark.src.js +1 -1
  234. package/es-modules/masters/themes/brand-light.src.js +1 -1
  235. package/es-modules/masters/themes/dark-blue.src.js +1 -1
  236. package/es-modules/masters/themes/dark-green.src.js +1 -1
  237. package/es-modules/masters/themes/dark-unica.src.js +1 -1
  238. package/es-modules/masters/themes/gray.src.js +1 -1
  239. package/es-modules/masters/themes/grid-light.src.js +1 -1
  240. package/es-modules/masters/themes/grid.src.js +1 -1
  241. package/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
  242. package/es-modules/masters/themes/high-contrast-light.src.js +1 -1
  243. package/es-modules/masters/themes/sand-signika.src.js +1 -1
  244. package/es-modules/masters/themes/skies.src.js +1 -1
  245. package/es-modules/masters/themes/sunset.src.js +1 -1
  246. package/highcharts-3d.js +99 -98
  247. package/highcharts-3d.js.map +1 -1
  248. package/highcharts-3d.src.js +50 -20
  249. package/highcharts-gantt.js +800 -795
  250. package/highcharts-gantt.js.map +1 -1
  251. package/highcharts-gantt.src.js +528 -290
  252. package/highcharts-more.js +195 -194
  253. package/highcharts-more.js.map +1 -1
  254. package/highcharts-more.src.js +13 -2
  255. package/highcharts.d.ts +2162 -504
  256. package/highcharts.js +586 -581
  257. package/highcharts.js.map +1 -1
  258. package/highcharts.src.d.ts +2162 -504
  259. package/highcharts.src.js +494 -272
  260. package/highmaps.js +753 -723
  261. package/highmaps.js.map +1 -1
  262. package/highmaps.src.js +3603 -2117
  263. package/highstock.js +790 -786
  264. package/highstock.js.map +1 -1
  265. package/highstock.src.js +519 -283
  266. package/indicators/acceleration-bands.js +12 -11
  267. package/indicators/acceleration-bands.js.map +1 -1
  268. package/indicators/acceleration-bands.src.js +11 -2
  269. package/indicators/accumulation-distribution.js +5 -5
  270. package/indicators/accumulation-distribution.js.map +1 -1
  271. package/indicators/accumulation-distribution.src.js +11 -2
  272. package/indicators/ao.js +6 -6
  273. package/indicators/ao.js.map +1 -1
  274. package/indicators/ao.src.js +11 -2
  275. package/indicators/apo.js +5 -5
  276. package/indicators/apo.js.map +1 -1
  277. package/indicators/apo.src.js +11 -2
  278. package/indicators/aroon-oscillator.js +10 -10
  279. package/indicators/aroon-oscillator.js.map +1 -1
  280. package/indicators/aroon-oscillator.src.js +11 -2
  281. package/indicators/aroon.js +11 -11
  282. package/indicators/aroon.js.map +1 -1
  283. package/indicators/aroon.src.js +11 -2
  284. package/indicators/atr.js +5 -5
  285. package/indicators/atr.js.map +1 -1
  286. package/indicators/atr.src.js +11 -2
  287. package/indicators/bollinger-bands.js +12 -12
  288. package/indicators/bollinger-bands.js.map +1 -1
  289. package/indicators/bollinger-bands.src.js +11 -2
  290. package/indicators/cci.js +5 -5
  291. package/indicators/cci.js.map +1 -1
  292. package/indicators/cci.src.js +11 -2
  293. package/indicators/chaikin.js +8 -8
  294. package/indicators/chaikin.js.map +1 -1
  295. package/indicators/chaikin.src.js +11 -2
  296. package/indicators/cmf.js +6 -6
  297. package/indicators/cmf.js.map +1 -1
  298. package/indicators/cmf.src.js +11 -2
  299. package/indicators/cmo.js +5 -5
  300. package/indicators/cmo.js.map +1 -1
  301. package/indicators/cmo.src.js +11 -2
  302. package/indicators/dema.js +5 -5
  303. package/indicators/dema.js.map +1 -1
  304. package/indicators/dema.src.js +11 -2
  305. package/indicators/disparity-index.js +6 -6
  306. package/indicators/disparity-index.js.map +1 -1
  307. package/indicators/disparity-index.src.js +11 -2
  308. package/indicators/dmi.js +12 -12
  309. package/indicators/dmi.js.map +1 -1
  310. package/indicators/dmi.src.js +11 -2
  311. package/indicators/dpo.js +5 -5
  312. package/indicators/dpo.js.map +1 -1
  313. package/indicators/dpo.src.js +11 -2
  314. package/indicators/ema.js +2 -1
  315. package/indicators/ema.js.map +1 -1
  316. package/indicators/ema.src.js +10 -1
  317. package/indicators/ichimoku-kinko-hyo.js +16 -16
  318. package/indicators/ichimoku-kinko-hyo.js.map +1 -1
  319. package/indicators/ichimoku-kinko-hyo.src.js +11 -2
  320. package/indicators/indicators-all.js +195 -194
  321. package/indicators/indicators-all.js.map +1 -1
  322. package/indicators/indicators-all.src.js +21 -5
  323. package/indicators/indicators.js +13 -12
  324. package/indicators/indicators.js.map +1 -1
  325. package/indicators/indicators.src.js +21 -5
  326. package/indicators/keltner-channels.js +12 -11
  327. package/indicators/keltner-channels.js.map +1 -1
  328. package/indicators/keltner-channels.src.js +11 -2
  329. package/indicators/klinger.js +13 -13
  330. package/indicators/klinger.js.map +1 -1
  331. package/indicators/klinger.src.js +11 -2
  332. package/indicators/macd.js +12 -11
  333. package/indicators/macd.js.map +1 -1
  334. package/indicators/macd.src.js +11 -2
  335. package/indicators/mfi.js +6 -6
  336. package/indicators/mfi.js.map +1 -1
  337. package/indicators/mfi.src.js +11 -2
  338. package/indicators/momentum.js +5 -5
  339. package/indicators/momentum.js.map +1 -1
  340. package/indicators/momentum.src.js +11 -2
  341. package/indicators/natr.js +5 -4
  342. package/indicators/natr.js.map +1 -1
  343. package/indicators/natr.src.js +11 -2
  344. package/indicators/obv.js +5 -5
  345. package/indicators/obv.js.map +1 -1
  346. package/indicators/obv.src.js +11 -2
  347. package/indicators/pivot-points.js +11 -11
  348. package/indicators/pivot-points.js.map +1 -1
  349. package/indicators/pivot-points.src.js +11 -2
  350. package/indicators/ppo.js +5 -5
  351. package/indicators/ppo.js.map +1 -1
  352. package/indicators/ppo.src.js +11 -2
  353. package/indicators/price-channel.js +11 -11
  354. package/indicators/price-channel.js.map +1 -1
  355. package/indicators/price-channel.src.js +11 -2
  356. package/indicators/price-envelopes.js +8 -8
  357. package/indicators/price-envelopes.js.map +1 -1
  358. package/indicators/price-envelopes.src.js +11 -2
  359. package/indicators/psar.js +7 -6
  360. package/indicators/psar.js.map +1 -1
  361. package/indicators/psar.src.js +11 -2
  362. package/indicators/regressions.js +12 -12
  363. package/indicators/regressions.js.map +1 -1
  364. package/indicators/regressions.src.js +11 -2
  365. package/indicators/roc.js +5 -5
  366. package/indicators/roc.js.map +1 -1
  367. package/indicators/roc.src.js +11 -2
  368. package/indicators/rsi.js +6 -5
  369. package/indicators/rsi.js.map +1 -1
  370. package/indicators/rsi.src.js +11 -2
  371. package/indicators/slow-stochastic.js +5 -5
  372. package/indicators/slow-stochastic.js.map +1 -1
  373. package/indicators/slow-stochastic.src.js +11 -2
  374. package/indicators/stochastic.js +12 -12
  375. package/indicators/stochastic.js.map +1 -1
  376. package/indicators/stochastic.src.js +11 -2
  377. package/indicators/supertrend.js +10 -10
  378. package/indicators/supertrend.js.map +1 -1
  379. package/indicators/supertrend.src.js +11 -2
  380. package/indicators/tema.js +6 -6
  381. package/indicators/tema.js.map +1 -1
  382. package/indicators/tema.src.js +11 -2
  383. package/indicators/trendline.js +5 -5
  384. package/indicators/trendline.js.map +1 -1
  385. package/indicators/trendline.src.js +11 -2
  386. package/indicators/trix.js +4 -4
  387. package/indicators/trix.js.map +1 -1
  388. package/indicators/trix.src.js +11 -2
  389. package/indicators/volume-by-price.js +17 -17
  390. package/indicators/volume-by-price.js.map +1 -1
  391. package/indicators/volume-by-price.src.js +11 -2
  392. package/indicators/vwap.js +5 -5
  393. package/indicators/vwap.js.map +1 -1
  394. package/indicators/vwap.src.js +11 -2
  395. package/indicators/williams-r.js +6 -5
  396. package/indicators/williams-r.js.map +1 -1
  397. package/indicators/williams-r.src.js +11 -2
  398. package/indicators/wma.js +5 -5
  399. package/indicators/wma.js.map +1 -1
  400. package/indicators/wma.src.js +11 -2
  401. package/indicators/zigzag.js +6 -6
  402. package/indicators/zigzag.js.map +1 -1
  403. package/indicators/zigzag.src.js +11 -2
  404. package/lib/jspdf.js +299 -184
  405. package/lib/jspdf.src.js +25266 -18067
  406. package/lib/svg2pdf.js +35 -31
  407. package/lib/svg2pdf.src.js +5721 -4179
  408. package/modules/accessibility.js +231 -229
  409. package/modules/accessibility.js.map +1 -1
  410. package/modules/accessibility.src.js +278 -197
  411. package/modules/annotations-advanced.js +144 -144
  412. package/modules/annotations-advanced.js.map +1 -1
  413. package/modules/annotations-advanced.src.js +26 -8
  414. package/modules/annotations.js +79 -79
  415. package/modules/annotations.js.map +1 -1
  416. package/modules/annotations.src.js +21 -5
  417. package/modules/arc-diagram.js +25 -0
  418. package/modules/arc-diagram.js.map +1 -0
  419. package/modules/arc-diagram.src.js +770 -0
  420. package/modules/arrow-symbols.js +4 -3
  421. package/modules/arrow-symbols.js.map +1 -1
  422. package/modules/arrow-symbols.src.js +11 -2
  423. package/modules/boost-canvas.js +15 -15
  424. package/modules/boost-canvas.js.map +1 -1
  425. package/modules/boost-canvas.src.js +11 -2
  426. package/modules/boost.js +80 -79
  427. package/modules/boost.js.map +1 -1
  428. package/modules/boost.src.js +71 -43
  429. package/modules/broken-axis.js +13 -13
  430. package/modules/broken-axis.js.map +1 -1
  431. package/modules/broken-axis.src.js +11 -2
  432. package/modules/bullet.js +9 -9
  433. package/modules/bullet.js.map +1 -1
  434. package/modules/bullet.src.js +11 -2
  435. package/modules/coloraxis.js +24 -24
  436. package/modules/coloraxis.js.map +1 -1
  437. package/modules/coloraxis.src.js +33 -7
  438. package/modules/current-date-indicator.js +5 -4
  439. package/modules/current-date-indicator.js.map +1 -1
  440. package/modules/current-date-indicator.src.js +11 -2
  441. package/modules/cylinder.js +11 -11
  442. package/modules/cylinder.js.map +1 -1
  443. package/modules/cylinder.src.js +11 -2
  444. package/modules/data.js +34 -33
  445. package/modules/data.js.map +1 -1
  446. package/modules/data.src.js +59 -32
  447. package/modules/datagrouping.js +21 -20
  448. package/modules/datagrouping.js.map +1 -1
  449. package/modules/datagrouping.src.js +16 -4
  450. package/modules/debugger.js +6 -6
  451. package/modules/debugger.js.map +1 -1
  452. package/modules/debugger.src.js +11 -2
  453. package/modules/dependency-wheel.js +12 -11
  454. package/modules/dependency-wheel.js.map +1 -1
  455. package/modules/dependency-wheel.src.js +14 -5
  456. package/modules/dotplot.js +6 -6
  457. package/modules/dotplot.js.map +1 -1
  458. package/modules/dotplot.src.js +11 -2
  459. package/modules/drag-panes.js +10 -10
  460. package/modules/drag-panes.js.map +1 -1
  461. package/modules/drag-panes.src.js +11 -2
  462. package/modules/draggable-points.js +35 -34
  463. package/modules/draggable-points.js.map +1 -1
  464. package/modules/draggable-points.src.js +20 -9
  465. package/modules/drilldown.d.ts +19 -0
  466. package/modules/drilldown.js +37 -25
  467. package/modules/drilldown.js.map +1 -1
  468. package/modules/drilldown.src.d.ts +19 -0
  469. package/modules/drilldown.src.js +1090 -105
  470. package/modules/dumbbell.js +17 -17
  471. package/modules/dumbbell.js.map +1 -1
  472. package/modules/dumbbell.src.js +11 -2
  473. package/modules/export-data.js +21 -20
  474. package/modules/export-data.js.map +1 -1
  475. package/modules/export-data.src.js +11 -2
  476. package/modules/exporting.js +39 -39
  477. package/modules/exporting.js.map +1 -1
  478. package/modules/exporting.src.js +82 -18
  479. package/modules/full-screen.js +8 -7
  480. package/modules/full-screen.js.map +1 -1
  481. package/modules/full-screen.src.js +11 -2
  482. package/modules/funnel.js +12 -12
  483. package/modules/funnel.js.map +1 -1
  484. package/modules/funnel.src.js +11 -2
  485. package/modules/funnel3d.js +21 -21
  486. package/modules/funnel3d.js.map +1 -1
  487. package/modules/funnel3d.src.js +11 -2
  488. package/modules/gantt.js +217 -217
  489. package/modules/gantt.js.map +1 -1
  490. package/modules/gantt.src.js +45 -20
  491. package/modules/grid-axis.js +23 -23
  492. package/modules/grid-axis.js.map +1 -1
  493. package/modules/grid-axis.src.js +22 -11
  494. package/modules/heatmap.js +40 -39
  495. package/modules/heatmap.js.map +1 -1
  496. package/modules/heatmap.src.js +33 -7
  497. package/modules/heikinashi.js +8 -8
  498. package/modules/heikinashi.js.map +1 -1
  499. package/modules/heikinashi.src.js +11 -2
  500. package/modules/histogram-bellcurve.js +13 -13
  501. package/modules/histogram-bellcurve.js.map +1 -1
  502. package/modules/histogram-bellcurve.src.js +11 -2
  503. package/modules/hollowcandlestick.js +9 -9
  504. package/modules/hollowcandlestick.js.map +1 -1
  505. package/modules/hollowcandlestick.src.js +11 -2
  506. package/modules/item-series.js +12 -12
  507. package/modules/item-series.js.map +1 -1
  508. package/modules/item-series.src.js +11 -2
  509. package/modules/lollipop.js +7 -7
  510. package/modules/lollipop.js.map +1 -1
  511. package/modules/lollipop.src.js +12 -3
  512. package/modules/map.d.ts +80 -43
  513. package/modules/map.js +169 -144
  514. package/modules/map.js.map +1 -1
  515. package/modules/map.src.d.ts +80 -43
  516. package/modules/map.src.js +7960 -6687
  517. package/modules/marker-clusters.js +36 -36
  518. package/modules/marker-clusters.js.map +1 -1
  519. package/modules/marker-clusters.src.js +47 -23
  520. package/modules/networkgraph.d.ts +5 -0
  521. package/modules/networkgraph.js +49 -48
  522. package/modules/networkgraph.js.map +1 -1
  523. package/modules/networkgraph.src.d.ts +5 -0
  524. package/modules/networkgraph.src.js +77 -15
  525. package/modules/no-data-to-display.js +5 -5
  526. package/modules/no-data-to-display.js.map +1 -1
  527. package/modules/no-data-to-display.src.js +11 -2
  528. package/modules/offline-exporting.js +20 -18
  529. package/modules/offline-exporting.js.map +1 -1
  530. package/modules/offline-exporting.src.js +126 -25
  531. package/modules/oldie-polyfills.js +7 -7
  532. package/modules/oldie-polyfills.js.map +1 -1
  533. package/modules/oldie-polyfills.src.js +11 -2
  534. package/modules/oldie.js +30 -30
  535. package/modules/oldie.js.map +1 -1
  536. package/modules/oldie.src.js +12 -3
  537. package/modules/organization.js +16 -14
  538. package/modules/organization.js.map +1 -1
  539. package/modules/organization.src.js +166 -32
  540. package/modules/overlapping-datalabels.js +3 -2
  541. package/modules/overlapping-datalabels.js.map +1 -1
  542. package/modules/overlapping-datalabels.src.js +11 -2
  543. package/modules/parallel-coordinates.js +11 -11
  544. package/modules/parallel-coordinates.js.map +1 -1
  545. package/modules/parallel-coordinates.src.js +11 -2
  546. package/modules/pareto.js +7 -7
  547. package/modules/pareto.js.map +1 -1
  548. package/modules/pareto.src.js +11 -2
  549. package/modules/pathfinder.js +31 -31
  550. package/modules/pathfinder.js.map +1 -1
  551. package/modules/pathfinder.src.js +11 -2
  552. package/modules/pattern-fill.js +14 -14
  553. package/modules/pattern-fill.js.map +1 -1
  554. package/modules/pattern-fill.src.js +11 -2
  555. package/modules/price-indicator.js +5 -5
  556. package/modules/price-indicator.js.map +1 -1
  557. package/modules/price-indicator.src.js +11 -2
  558. package/modules/pyramid3d.js +4 -4
  559. package/modules/pyramid3d.js.map +1 -1
  560. package/modules/pyramid3d.src.js +11 -2
  561. package/modules/sankey.d.ts +5 -0
  562. package/modules/sankey.js +32 -29
  563. package/modules/sankey.js.map +1 -1
  564. package/modules/sankey.src.d.ts +5 -0
  565. package/modules/sankey.src.js +338 -156
  566. package/modules/series-label.js +18 -17
  567. package/modules/series-label.js.map +1 -1
  568. package/modules/series-label.src.js +11 -2
  569. package/modules/solid-gauge.js +10 -10
  570. package/modules/solid-gauge.js.map +1 -1
  571. package/modules/solid-gauge.src.js +11 -2
  572. package/modules/sonification.js +59 -59
  573. package/modules/sonification.js.map +1 -1
  574. package/modules/sonification.src.js +11 -2
  575. package/modules/static-scale.js +5 -4
  576. package/modules/static-scale.js.map +1 -1
  577. package/modules/static-scale.src.js +11 -2
  578. package/modules/stock-tools.js +78 -78
  579. package/modules/stock-tools.js.map +1 -1
  580. package/modules/stock-tools.src.js +21 -5
  581. package/modules/stock.js +162 -162
  582. package/modules/stock.js.map +1 -1
  583. package/modules/stock.src.js +36 -13
  584. package/modules/streamgraph.js +5 -4
  585. package/modules/streamgraph.js.map +1 -1
  586. package/modules/streamgraph.src.js +11 -2
  587. package/modules/sunburst.d.ts +3 -0
  588. package/modules/sunburst.js +73 -60
  589. package/modules/sunburst.js.map +1 -1
  590. package/modules/sunburst.src.d.ts +3 -0
  591. package/modules/sunburst.src.js +1049 -96
  592. package/modules/tilemap.js +17 -17
  593. package/modules/tilemap.js.map +1 -1
  594. package/modules/tilemap.src.js +11 -2
  595. package/modules/timeline.js +18 -18
  596. package/modules/timeline.js.map +1 -1
  597. package/modules/timeline.src.js +11 -2
  598. package/modules/treegrid.js +57 -56
  599. package/modules/treegrid.js.map +1 -1
  600. package/modules/treegrid.src.js +33 -11
  601. package/modules/treemap.d.ts +3 -0
  602. package/modules/treemap.js +53 -41
  603. package/modules/treemap.js.map +1 -1
  604. package/modules/treemap.src.d.ts +3 -0
  605. package/modules/treemap.src.js +1039 -95
  606. package/modules/variable-pie.js +9 -9
  607. package/modules/variable-pie.js.map +1 -1
  608. package/modules/variable-pie.src.js +11 -2
  609. package/modules/variwide.js +12 -12
  610. package/modules/variwide.js.map +1 -1
  611. package/modules/variwide.src.js +11 -2
  612. package/modules/vector.js +8 -7
  613. package/modules/vector.js.map +1 -1
  614. package/modules/vector.src.js +11 -2
  615. package/modules/venn.js +31 -31
  616. package/modules/venn.js.map +1 -1
  617. package/modules/venn.src.js +18 -6
  618. package/modules/windbarb.js +15 -15
  619. package/modules/windbarb.js.map +1 -1
  620. package/modules/windbarb.src.js +11 -2
  621. package/modules/wordcloud.js +23 -23
  622. package/modules/wordcloud.js.map +1 -1
  623. package/modules/wordcloud.src.js +18 -6
  624. package/modules/xrange.js +16 -16
  625. package/modules/xrange.js.map +1 -1
  626. package/modules/xrange.src.js +11 -2
  627. package/package.json +1 -1
  628. package/themes/avocado.js +4 -3
  629. package/themes/avocado.js.map +1 -1
  630. package/themes/avocado.src.js +11 -2
  631. package/themes/brand-dark.js +9 -8
  632. package/themes/brand-dark.js.map +1 -1
  633. package/themes/brand-dark.src.js +11 -2
  634. package/themes/brand-light.js +8 -8
  635. package/themes/brand-light.js.map +1 -1
  636. package/themes/brand-light.src.js +11 -2
  637. package/themes/dark-blue.js +9 -8
  638. package/themes/dark-blue.js.map +1 -1
  639. package/themes/dark-blue.src.js +11 -2
  640. package/themes/dark-green.js +9 -8
  641. package/themes/dark-green.js.map +1 -1
  642. package/themes/dark-green.src.js +11 -2
  643. package/themes/dark-unica.js +8 -7
  644. package/themes/dark-unica.js.map +1 -1
  645. package/themes/dark-unica.src.js +11 -2
  646. package/themes/gray.js +9 -8
  647. package/themes/gray.js.map +1 -1
  648. package/themes/gray.src.js +11 -2
  649. package/themes/grid-light.js +5 -4
  650. package/themes/grid-light.js.map +1 -1
  651. package/themes/grid-light.src.js +11 -2
  652. package/themes/grid.js +5 -5
  653. package/themes/grid.js.map +1 -1
  654. package/themes/grid.src.js +11 -2
  655. package/themes/high-contrast-dark.js +7 -7
  656. package/themes/high-contrast-dark.js.map +1 -1
  657. package/themes/high-contrast-dark.src.js +21 -12
  658. package/themes/high-contrast-light.js +3 -3
  659. package/themes/high-contrast-light.js.map +1 -1
  660. package/themes/high-contrast-light.src.js +21 -12
  661. package/themes/sand-signika.js +5 -5
  662. package/themes/sand-signika.js.map +1 -1
  663. package/themes/sand-signika.src.js +11 -2
  664. package/themes/skies.js +5 -5
  665. package/themes/skies.js.map +1 -1
  666. package/themes/skies.src.js +11 -2
  667. package/themes/sunset.js +3 -3
  668. package/themes/sunset.js.map +1 -1
  669. package/themes/sunset.src.js +11 -2
  670. package/es-modules/Maps/ProjectionDefinition.js +0 -9
package/highstock.src.js CHANGED
@@ -1,11 +1,10 @@
1
1
  /**
2
- * @license Highstock JS v9.3.3 (2022-02-01)
2
+ * @license Highstock JS v10.0.0 (2022-03-07)
3
3
  *
4
4
  * (c) 2009-2021 Torstein Honsi
5
5
  *
6
6
  * License: www.highcharts.com/license
7
7
  */
8
- 'use strict';
9
8
  (function (root, factory) {
10
9
  if (typeof module === 'object' && module.exports) {
11
10
  factory['default'] = factory;
@@ -22,11 +21,21 @@
22
21
  }
23
22
  root.Highcharts = factory(root);
24
23
  }
25
- }(typeof window !== 'undefined' ? window : this, function (win) {
24
+ }(typeof window !== 'undefined' ? window : this, function (window) {
25
+ 'use strict';
26
26
  var _modules = {};
27
27
  function _registerModule(obj, path, args, fn) {
28
28
  if (!obj.hasOwnProperty(path)) {
29
29
  obj[path] = fn.apply(null, args);
30
+
31
+ if (typeof CustomEvent === 'function') {
32
+ window.dispatchEvent(
33
+ new CustomEvent(
34
+ 'HighchartsModuleLoaded',
35
+ { detail: { path: path, module: obj[path] }
36
+ })
37
+ );
38
+ }
30
39
  }
31
40
  }
32
41
  _registerModule(_modules, 'Core/Globals.js', [], function () {
@@ -39,23 +48,6 @@
39
48
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
40
49
  *
41
50
  * */
42
- /* *
43
- *
44
- * Constants
45
- *
46
- * */
47
- /**
48
- * @private
49
- * @deprecated
50
- * @todo Rename UMD argument `win` to `window`; move code to `Globals.win`
51
- */
52
- var w = (typeof win !== 'undefined' ?
53
- win :
54
- typeof window !== 'undefined' ?
55
- window :
56
- {}
57
- // eslint-disable-next-line node/no-unsupported-features/es-builtins
58
- );
59
51
  /* *
60
52
  *
61
53
  * Namespace
@@ -71,7 +63,10 @@
71
63
  * Constants
72
64
  *
73
65
  * */
74
- Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '9.3.3', Globals.win = w, Globals.doc = Globals.win.document, Globals.svg = (Globals.doc &&
66
+ Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '10.0.0', Globals.win = (typeof window !== 'undefined' ?
67
+ window :
68
+ {}), // eslint-disable-line node/no-unsupported-features/es-builtins
69
+ Globals.doc = Globals.win.document, Globals.svg = (Globals.doc &&
75
70
  Globals.doc.createElementNS &&
76
71
  !!Globals.doc.createElementNS(Globals.SVG_NS, 'svg').createSVGRect), Globals.userAgent = (Globals.win.navigator && Globals.win.navigator.userAgent) || '', Globals.isChrome = Globals.userAgent.indexOf('Chrome') !== -1, Globals.isFirefox = Globals.userAgent.indexOf('Firefox') !== -1, Globals.isMS = /(edge|msie|trident)/i.test(Globals.userAgent) && !Globals.win.opera, Globals.isSafari = !Globals.isChrome && Globals.userAgent.indexOf('Safari') !== -1, Globals.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(Globals.userAgent), Globals.isWebKit = Globals.userAgent.indexOf('AppleWebKit') !== -1, Globals.deg2rad = Math.PI * 2 / 360, Globals.hasBidiBug = (Globals.isFirefox &&
77
72
  parseInt(Globals.userAgent.split('Firefox/')[1], 10) < 4 // issue #38
@@ -365,7 +360,9 @@
365
360
  // Arrays, primitives and DOM nodes are copied directly
366
361
  }
367
362
  else if (isObject(newer[key]) ||
368
- newer[key] !== older[key]) {
363
+ newer[key] !== older[key] ||
364
+ // If the newer key is explicitly undefined, keep it (#10525)
365
+ (key in newer && !(key in older))) {
369
366
  result[key] = newer[key];
370
367
  }
371
368
  });
@@ -533,7 +530,7 @@
533
530
  * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} elem
534
531
  * The DOM element to receive the attribute(s).
535
532
  *
536
- * @param {string|Highcharts.HTMLAttributes|Highcharts.SVGAttributes} [prop]
533
+ * @param {string|Highcharts.HTMLAttributes|Highcharts.SVGAttributes} [keyOrAttribs]
537
534
  * The property or an object of key-value pairs.
538
535
  *
539
536
  * @param {number|string} [value]
@@ -542,33 +539,36 @@
542
539
  * @return {string|null|undefined}
543
540
  * When used as a getter, return the value.
544
541
  */
545
- function attr(elem, prop, value) {
542
+ function attr(elem, keyOrAttribs, value) {
543
+ var isGetter = isString(keyOrAttribs) && !defined(value);
546
544
  var ret;
547
- // if the prop is a string
548
- if (isString(prop)) {
549
- // set the value
550
- if (defined(value)) {
551
- elem.setAttribute(prop, value);
552
- // get the value
553
- }
554
- else if (elem && elem.getAttribute) {
555
- ret = elem.getAttribute(prop);
545
+ var attrSingle = function (value,
546
+ key) {
547
+ // Set the value
548
+ if (defined(value)) {
549
+ elem.setAttribute(key,
550
+ value);
551
+ // Get the value
552
+ }
553
+ else if (isGetter) {
554
+ ret = elem.getAttribute(key);
556
555
  // IE7 and below cannot get class through getAttribute (#7850)
557
- if (!ret && prop === 'class') {
558
- ret = elem.getAttribute(prop + 'Name');
556
+ if (!ret && key === 'class') {
557
+ ret = elem.getAttribute(key + 'Name');
559
558
  }
559
+ // Remove the value
560
+ }
561
+ else {
562
+ elem.removeAttribute(key);
560
563
  }
561
- // else if prop is defined, it is a hash of key/value pairs
564
+ };
565
+ // If keyOrAttribs is a string
566
+ if (isString(keyOrAttribs)) {
567
+ attrSingle(value, keyOrAttribs);
568
+ // Else if keyOrAttribs is defined, it is a hash of key/value pairs
562
569
  }
563
570
  else {
564
- objectEach(prop, function (val, key) {
565
- if (defined(val)) {
566
- elem.setAttribute(key, val);
567
- }
568
- else {
569
- elem.removeAttribute(key);
570
- }
571
- });
571
+ objectEach(keyOrAttribs, attrSingle);
572
572
  }
573
573
  return ret;
574
574
  }
@@ -619,10 +619,8 @@
619
619
  *
620
620
  * @function Highcharts.clearTimeout
621
621
  *
622
- * @param {number} id
623
- * Id of a timeout.
624
- *
625
- * @return {void}
622
+ * @param {number|undefined} id
623
+ * Id of a timeout.
626
624
  */
627
625
  function internalClearTimeout(id) {
628
626
  if (defined(id)) {
@@ -692,9 +690,8 @@
692
690
  */
693
691
  function css(el, styles) {
694
692
  if (H.isMS && !H.svg) { // #2686
695
- if (styles && typeof styles.opacity !== 'undefined') {
696
- styles.filter =
697
- 'alpha(opacity=' + (styles.opacity * 100) + ')';
693
+ if (styles && defined(styles.opacity)) {
694
+ styles.filter = "alpha(opacity=" + styles.opacity * 100 + ")";
698
695
  }
699
696
  }
700
697
  extend(el.style, styles);
@@ -2173,19 +2170,22 @@
2173
2170
  */
2174
2171
  var ChartDefaults = {
2175
2172
  /**
2176
- * Default `mapData` for all series. If set to a string,
2177
- it functions
2178
- * as an index into the `Highcharts.maps` array. Otherwise it is
2179
- * interpreted as map data.
2173
+ * Default `mapData` for all series,
2174
+ in terms of a GeoJSON or TopoJSON
2175
+ * object. If set to a string,
2176
+ it functions as an index into the
2177
+ * `Highcharts.maps` array.
2180
2178
  *
2181
- * @see [mapData](#series.map.mapData)
2179
+ * For picking out individual shapes and geometries to use for each series
2180
+ * of the map,
2181
+ see [series.mapData](#series.map.mapData).
2182
2182
  *
2183
2183
  * @sample maps/demo/geojson
2184
- * Loading geoJSON data
2184
+ * Loading GeoJSON data
2185
2185
  * @sample maps/chart/topojson
2186
- * Loading topoJSON converted to geoJSON
2186
+ * Loading TopoJSON data
2187
2187
  *
2188
- * @type {string|Array<*>|Highcharts.GeoJSON}
2188
+ * @type {string|Array<*>|Highcharts.GeoJSON|Highcharts.TopoJSON}
2189
2189
  * @since 5.0.0
2190
2190
  * @product highmaps
2191
2191
  * @apioption chart.map
@@ -2200,7 +2200,7 @@
2200
2200
  * @apioption chart.mapTransforms
2201
2201
  */
2202
2202
  /**
2203
- * When using multiple axis,
2203
+ * When using multiple axes,
2204
2204
  the ticks of two or more opposite axes
2205
2205
  * will automatically be aligned by adding ticks to the axis or axes
2206
2206
  * with the least ticks,
@@ -2211,8 +2211,8 @@
2211
2211
  it's a good idea to hide them for the secondary
2212
2212
  * axis by setting `gridLineWidth` to 0.
2213
2213
  *
2214
- * If `startOnTick` or `endOnTick` in an Axis options are set to false,
2215
- * then the `alignTicks ` will be disabled for the Axis.
2214
+ * If `startOnTick` or `endOnTick` in the axis options are set to false,
2215
+ * then the `alignTicks ` will be disabled for the axis.
2216
2216
  *
2217
2217
  * Disabled for logarithmic axes.
2218
2218
  *
@@ -2230,6 +2230,31 @@
2230
2230
  * @product highcharts highstock gantt
2231
2231
  * @apioption chart.alignTicks
2232
2232
  */
2233
+ /**
2234
+ * When using multiple axes,
2235
+ align the thresholds. When this is true,
2236
+ other
2237
+ * ticks will also be aligned.
2238
+ *
2239
+ * Note that for line series and some other series types,
2240
+ the `threshold`
2241
+ * option is set to `null` by default. This will in turn cause their y-axis
2242
+ * to not have a threshold. In order to avoid that,
2243
+ set the series
2244
+ * `threshold` to 0 or another number.
2245
+ *
2246
+ * If `startOnTick` or `endOnTick` in the axis options are set to false,
2247
+ or
2248
+ * if the axis is logarithmic,
2249
+ the threshold will not be aligned.
2250
+ *
2251
+ * @sample {highcharts} highcharts/chart/alignthresholds/ Set to true
2252
+ *
2253
+ * @since 10.0.0
2254
+ * @product highcharts highstock gantt
2255
+ * @apioption chart.alignThresholds
2256
+ */
2257
+ alignThresholds: false,
2233
2258
  /**
2234
2259
  * Set the overall animation for all chart updating. Animation can be
2235
2260
  * disabled throughout the chart by setting it to false here. It can
@@ -3066,9 +3091,10 @@
3066
3091
  * Y
3067
3092
  * @sample {highstock} stock/chart/zoomtype-xy/
3068
3093
  * Xy
3094
+ * @sample {highmaps} maps/chart/zoomtype-xy/
3095
+ * Map with selection zoom
3069
3096
  *
3070
3097
  * @type {string}
3071
- * @product highcharts highstock gantt
3072
3098
  * @validvalue ["x", "y", "xy"]
3073
3099
  * @apioption chart.zoomType
3074
3100
  */
@@ -6730,6 +6756,8 @@
6730
6756
  *
6731
6757
  * @sample {highcharts} highcharts/tooltip/pointformat/
6732
6758
  * A different point format with value suffix
6759
+ * @sample {highcharts|highstock} highcharts/tooltip/pointformat-extra-information/
6760
+ * Show extra information about points in the tooltip
6733
6761
  * @sample {highmaps} maps/tooltip/format/
6734
6762
  * Format demo
6735
6763
  *
@@ -7841,6 +7869,7 @@
7841
7869
  win = H.win;
7842
7870
  var attr = U.attr,
7843
7871
  createElement = U.createElement,
7872
+ css = U.css,
7844
7873
  error = U.error,
7845
7874
  isFunction = U.isFunction,
7846
7875
  isString = U.isString,
@@ -7931,6 +7960,19 @@
7931
7960
  });
7932
7961
  return attributes;
7933
7962
  };
7963
+ AST.parseStyle = function (style) {
7964
+ return style
7965
+ .split(';')
7966
+ .reduce(function (styles, line) {
7967
+ var pair = line.split(':').map(function (s) { return s.trim(); }),
7968
+ key = pair[0].replace(/-([a-z])/g,
7969
+ function (g) { return g[1].toUpperCase(); });
7970
+ if (pair[1]) {
7971
+ styles[key] = pair[1];
7972
+ }
7973
+ return styles;
7974
+ }, {});
7975
+ };
7934
7976
  /**
7935
7977
  * Utility function to set html content for an element by passing in a
7936
7978
  * markup string. The markup is safely parsed by the AST class to avoid
@@ -7986,12 +8028,15 @@
7986
8028
  var textNode = item.textContent ?
7987
8029
  H.doc.createTextNode(item.textContent) :
7988
8030
  void 0;
8031
+ // Whether to ignore the AST filtering totally, #15345
8032
+ var bypassHTMLFiltering = AST.bypassHTMLFiltering;
7989
8033
  var node;
7990
8034
  if (tagName) {
7991
8035
  if (tagName === '#text') {
7992
8036
  node = textNode;
7993
8037
  }
7994
- else if (AST.allowedTags.indexOf(tagName) !== -1) {
8038
+ else if (AST.allowedTags.indexOf(tagName) !== -1 ||
8039
+ bypassHTMLFiltering) {
7995
8040
  var NS = tagName === 'svg' ?
7996
8041
  SVG_NS :
7997
8042
  (subParent.namespaceURI || SVG_NS);
@@ -8004,11 +8049,17 @@
8004
8049
  if (key !== 'tagName' &&
8005
8050
  key !== 'attributes' &&
8006
8051
  key !== 'children' &&
8052
+ key !== 'style' &&
8007
8053
  key !== 'textContent') {
8008
8054
  attributes_1[key] = val;
8009
8055
  }
8010
8056
  });
8011
- attr(element, AST.filterUserAttributes(attributes_1));
8057
+ attr(element, bypassHTMLFiltering ?
8058
+ attributes_1 :
8059
+ AST.filterUserAttributes(attributes_1));
8060
+ if (item.style) {
8061
+ css(element, item.style);
8062
+ }
8012
8063
  // Add text content
8013
8064
  if (textNode) {
8014
8065
  element.appendChild(textNode);
@@ -8047,7 +8098,11 @@
8047
8098
  */
8048
8099
  AST.prototype.parseMarkup = function (markup) {
8049
8100
  var nodes = [];
8050
- markup = markup.trim();
8101
+ markup = markup
8102
+ .trim()
8103
+ // The style attribute throws a warning when parsing when CSP is
8104
+ // enabled (#6884), so use an alias and pick it up below
8105
+ .replace(/ style="/g, ' data-style="');
8051
8106
  var doc;
8052
8107
  if (hasValidDOMParser) {
8053
8108
  doc = new DOMParser().parseFromString(trustedTypesPolicy ?
@@ -8074,7 +8129,12 @@
8074
8129
  if (parsedAttributes) {
8075
8130
  var attributes_2 = {};
8076
8131
  [].forEach.call(parsedAttributes, function (attrib) {
8077
- attributes_2[attrib.name] = attrib.value;
8132
+ if (attrib.name === 'data-style') {
8133
+ astNode.style = AST.parseStyle(attrib.value);
8134
+ }
8135
+ else {
8136
+ attributes_2[attrib.name] = attrib.value;
8137
+ }
8078
8138
  });
8079
8139
  astNode.attributes = attributes_2;
8080
8140
  }
@@ -8278,6 +8338,34 @@
8278
8338
  '#text'
8279
8339
  ];
8280
8340
  AST.emptyHTML = emptyHTML;
8341
+ /**
8342
+ * Allow all custom SVG and HTML attributes, references and tags (together
8343
+ * with potentially harmful ones) to be added to the DOM from the chart
8344
+ * configuration. In other words, disable the the allow-listing which is the
8345
+ * primary functionality of the AST.
8346
+ *
8347
+ * WARNING: Setting this property to `true` while allowing untrusted user
8348
+ * data in the chart configuration will expose your application to XSS
8349
+ * security risks!
8350
+ *
8351
+ * Note that in case you want to allow a known set of tags or attributes,
8352
+ * you should allow-list them instead of disabling the filtering totally.
8353
+ * See [allowedAttributes](Highcharts.AST#.allowedAttributes),
8354
+ * [allowedReferences](Highcharts.AST#.allowedReferences) and
8355
+ * [allowedTags](Highcharts.AST#.allowedTags). The `bypassHTMLFiltering`
8356
+ * setting is intended only for those cases where allow-listing is not
8357
+ * practical, and the chart configuration already comes from a secure
8358
+ * source.
8359
+ *
8360
+ * @example
8361
+ * // Allow all custom attributes, references and tags (disable DOM XSS
8362
+ * // filtering)
8363
+ * Highcharts.AST.bypassHTMLFiltering = true;
8364
+ *
8365
+ * @name Highcharts.AST.bypassHTMLFiltering
8366
+ * @static
8367
+ */
8368
+ AST.bypassHTMLFiltering = false;
8281
8369
  return AST;
8282
8370
  }());
8283
8371
  /* *
@@ -9121,7 +9209,7 @@
9121
9209
  }, deferTime);
9122
9210
  }
9123
9211
  else {
9124
- this.attr(params, void 0, complete);
9212
+ this.attr(params, void 0, complete || animOptions.complete);
9125
9213
  // Call the end step synchronously
9126
9214
  objectEach(params, function (val, prop) {
9127
9215
  if (animOptions.step) {
@@ -9519,25 +9607,20 @@
9519
9607
  * Return the SVG element for chaining.
9520
9608
  */
9521
9609
  SVGElement.prototype.css = function (styles) {
9522
- var oldStyles = this.styles, newStyles = {}, elem = this.element,
9523
- // These CSS properties are interpreted internally by the SVG
9524
- // renderer, but are not supported by SVG and should not be added to
9525
- // the DOM. In styled mode, no CSS should find its way to the DOM
9526
- // whatsoever (#6173, #6474).
9527
- svgPseudoProps = ['textOutline', 'textOverflow', 'width'];
9610
+ var oldStyles = this.styles,
9611
+ newStyles = {},
9612
+ elem = this.element;
9528
9613
  var textWidth,
9529
- serializedCss = '',
9530
- hyphenate,
9531
9614
  hasNew = !oldStyles;
9532
9615
  // convert legacy
9533
- if (styles && styles.color) {
9616
+ if (styles.color) {
9534
9617
  styles.fill = styles.color;
9535
9618
  }
9536
9619
  // Filter out existing styles to increase performance (#2640)
9537
9620
  if (oldStyles) {
9538
- objectEach(styles, function (style, n) {
9539
- if (oldStyles && oldStyles[n] !== style) {
9540
- newStyles[n] = style;
9621
+ objectEach(styles, function (value, n) {
9622
+ if (oldStyles && oldStyles[n] !== value) {
9623
+ newStyles[n] = value;
9541
9624
  hasNew = true;
9542
9625
  }
9543
9626
  });
@@ -9548,41 +9631,30 @@
9548
9631
  styles = extend(oldStyles, newStyles);
9549
9632
  }
9550
9633
  // Get the text width from style
9551
- if (styles) {
9552
- // Previously set, unset it (#8234)
9553
- if (styles.width === null || styles.width === 'auto') {
9554
- delete this.textWidth;
9555
- // Apply new
9556
- }
9557
- else if (elem.nodeName.toLowerCase() === 'text' &&
9558
- styles.width) {
9559
- textWidth = this.textWidth = pInt(styles.width);
9560
- }
9634
+ // Previously set, unset it (#8234)
9635
+ if (styles.width === null || styles.width === 'auto') {
9636
+ delete this.textWidth;
9637
+ // Apply new
9638
+ }
9639
+ else if (elem.nodeName.toLowerCase() === 'text' &&
9640
+ styles.width) {
9641
+ textWidth = this.textWidth = pInt(styles.width);
9561
9642
  }
9562
9643
  // store object
9563
9644
  this.styles = styles;
9564
9645
  if (textWidth && (!svg && this.renderer.forExport)) {
9565
9646
  delete styles.width;
9566
9647
  }
9567
- // Serialize and set style attribute
9568
- if (elem.namespaceURI === this.SVG_NS) { // #7633
9569
- hyphenate = function (a, b) {
9570
- return '-' + b.toLowerCase();
9571
- };
9572
- objectEach(styles, function (style, n) {
9573
- if (svgPseudoProps.indexOf(n) === -1) {
9574
- serializedCss +=
9575
- n.replace(/([A-Z])/g, hyphenate) + ':' +
9576
- style + ';';
9577
- }
9578
- });
9579
- if (serializedCss) {
9580
- attr(elem, 'style', serializedCss); // #1881
9581
- }
9582
- }
9583
- else {
9584
- css(elem, styles);
9648
+ var stylesToApply_1 = merge(styles);
9649
+ if (elem.namespaceURI === this.SVG_NS) {
9650
+ // These CSS properties are interpreted internally by the SVG
9651
+ // renderer, but are not supported by SVG and should not be
9652
+ // added to the DOM. In styled mode, no CSS should find its way
9653
+ // to the DOM whatsoever (#6173, #6474).
9654
+ ['textOutline', 'textOverflow', 'width'].forEach(function (key) { return (stylesToApply_1 &&
9655
+ delete stylesToApply_1[key]); });
9585
9656
  }
9657
+ css(elem, stylesToApply_1);
9586
9658
  if (this.added) {
9587
9659
  // Rebuild text after added. Cache mechanisms in the buildText
9588
9660
  // will prevent building if there are no significant changes.
@@ -9590,7 +9662,7 @@
9590
9662
  this.renderer.buildText(this);
9591
9663
  }
9592
9664
  // Apply text outline after added
9593
- if (styles && styles.textOutline) {
9665
+ if (styles.textOutline) {
9594
9666
  this.applyTextOutline(styles.textOutline);
9595
9667
  }
9596
9668
  }
@@ -11759,6 +11831,7 @@
11759
11831
  SVG_NS = H.SVG_NS,
11760
11832
  win = H.win;
11761
11833
  var attr = U.attr,
11834
+ extend = U.extend,
11762
11835
  isString = U.isString,
11763
11836
  objectEach = U.objectEach,
11764
11837
  pick = U.pick;
@@ -12034,28 +12107,32 @@
12034
12107
  var _a = node.attributes,
12035
12108
  attributes = _a === void 0 ? {} : _a,
12036
12109
  children = node.children,
12110
+ _b = node.style,
12111
+ style = _b === void 0 ? {} : _b,
12037
12112
  tagName = node.tagName,
12038
12113
  styledMode = _this.renderer.styledMode;
12039
12114
  // Apply styling to text tags
12040
12115
  if (tagName === 'b' || tagName === 'strong') {
12041
12116
  if (styledMode) {
12042
- attributes['class'] = 'highcharts-strong'; // eslint-disable-line dot-notation
12117
+ // eslint-disable-next-line dot-notation
12118
+ attributes['class'] = 'highcharts-strong';
12043
12119
  }
12044
12120
  else {
12045
- attributes.style = ('font-weight:bold;' + (attributes.style || ''));
12121
+ style.fontWeight = 'bold';
12046
12122
  }
12047
12123
  }
12048
12124
  else if (tagName === 'i' || tagName === 'em') {
12049
12125
  if (styledMode) {
12050
- attributes['class'] = 'highcharts-emphasized'; // eslint-disable-line dot-notation
12126
+ // eslint-disable-next-line dot-notation
12127
+ attributes['class'] = 'highcharts-emphasized';
12051
12128
  }
12052
12129
  else {
12053
- attributes.style = ('font-style:italic;' + (attributes.style || ''));
12130
+ style.fontStyle = 'italic';
12054
12131
  }
12055
12132
  }
12056
- // Modify attributes
12057
- if (isString(attributes.style)) {
12058
- attributes.style = attributes.style.replace(/(;| |^)color([ :])/, '$1fill$2');
12133
+ // Modify styling
12134
+ if (style && style.color) {
12135
+ style.fill = style.color;
12059
12136
  }
12060
12137
  // Handle breaks
12061
12138
  if (tagName === 'br') {
@@ -12080,7 +12157,7 @@
12080
12157
  if (tagName !== '#text' && tagName !== 'a') {
12081
12158
  node.tagName = 'tspan';
12082
12159
  }
12083
- node.attributes = attributes;
12160
+ extend(node, { attributes: attributes, style: style });
12084
12161
  // Recurse
12085
12162
  if (children) {
12086
12163
  children
@@ -12420,7 +12497,7 @@
12420
12497
  this.url = this.getReferenceURL();
12421
12498
  // Add description
12422
12499
  var desc = this.createElement('desc').add();
12423
- desc.element.appendChild(doc.createTextNode('Created with Highcharts 9.3.3'));
12500
+ desc.element.appendChild(doc.createTextNode('Created with Highcharts 10.0.0'));
12424
12501
  renderer.defs = this.createElement('defs').add();
12425
12502
  renderer.allowHTML = allowHTML;
12426
12503
  renderer.forExport = forExport;
@@ -12760,14 +12837,20 @@
12760
12837
  // Make a copy of normalState (#13798)
12761
12838
  // (reference to options.rangeSelector.buttonTheme)
12762
12839
  normalState = theme ? merge(theme) : {};
12763
- var userNormalStyle = normalState && normalState.style || {};
12840
+ var normalStyle = merge({
12841
+ color: "#333333" /* neutralColor80 */,
12842
+ cursor: 'pointer',
12843
+ fontWeight: 'normal'
12844
+ },
12845
+ normalState.style);
12846
+ delete normalState.style;
12764
12847
  // Remove stylable attributes
12765
12848
  normalState = AST.filterUserAttributes(normalState);
12766
12849
  // Default, non-stylable attributes
12767
12850
  label.attr(merge({ padding: 8, r: 2 }, normalState));
12768
- // Presentational
12769
- var normalStyle,
12770
- hoverStyle,
12851
+ // Presentational. The string type is a mistake, it is just for
12852
+ // compliance with SVGAttribute and is not used in button theme.
12853
+ var hoverStyle,
12771
12854
  pressedStyle,
12772
12855
  disabledStyle;
12773
12856
  if (!styledMode) {
@@ -12775,17 +12858,8 @@
12775
12858
  normalState = merge({
12776
12859
  fill: "#f7f7f7" /* neutralColor3 */,
12777
12860
  stroke: "#cccccc" /* neutralColor20 */,
12778
- 'stroke-width': 1,
12779
- style: {
12780
- color: "#333333" /* neutralColor80 */,
12781
- cursor: 'pointer',
12782
- fontWeight: 'normal'
12783
- }
12784
- }, {
12785
- style: userNormalStyle
12861
+ 'stroke-width': 1
12786
12862
  }, normalState);
12787
- normalStyle = normalState.style;
12788
- delete normalState.style;
12789
12863
  // Hover state
12790
12864
  hoverState = merge(normalState, {
12791
12865
  fill: "#e6e6e6" /* neutralColor10 */
@@ -12840,13 +12914,16 @@
12840
12914
  hoverState,
12841
12915
  pressedState,
12842
12916
  disabledState
12843
- ][state || 0])
12844
- .css([
12845
- normalStyle,
12846
- hoverStyle,
12847
- pressedStyle,
12848
- disabledStyle
12849
12917
  ][state || 0]);
12918
+ var css_1 = [
12919
+ normalStyle,
12920
+ hoverStyle,
12921
+ pressedStyle,
12922
+ disabledStyle
12923
+ ][state || 0];
12924
+ if (isObject(css_1)) {
12925
+ label.css(css_1);
12926
+ }
12850
12927
  }
12851
12928
  };
12852
12929
  // Presentational attributes
@@ -18648,7 +18725,6 @@
18648
18725
  function Axis(chart, userOptions) {
18649
18726
  this.alternateBands = void 0;
18650
18727
  this.bottom = void 0;
18651
- this.categories = void 0;
18652
18728
  this.chart = void 0;
18653
18729
  this.closestPointRange = void 0;
18654
18730
  this.coll = void 0;
@@ -18812,7 +18888,7 @@
18812
18888
  * @type {Array<string>}
18813
18889
  * @readonly
18814
18890
  */
18815
- axis.categories = options.categories || axis.hasNames;
18891
+ axis.categories = options.categories || (axis.hasNames ? [] : void 0);
18816
18892
  if (!axis.names) { // Preserve on update (#3830)
18817
18893
  axis.names = [];
18818
18894
  axis.names.keys = {};
@@ -19151,8 +19227,9 @@
19151
19227
  if (doPostTranslate) { // log, ordinal and broken axis
19152
19228
  val = axis.val2lin(val);
19153
19229
  }
19230
+ var value = sign * (val - localMin) * localA;
19154
19231
  returnValue = isNumber(localMin) ?
19155
- (sign * (val - localMin) * localA +
19232
+ ((!axis.isRadial ? correctFloat(value) : value) +
19156
19233
  cvsOffset +
19157
19234
  (sign * minPixelPadding) +
19158
19235
  (isNumber(pointPlacement) ?
@@ -19546,20 +19623,20 @@
19546
19623
  * The X value that the point is given.
19547
19624
  */
19548
19625
  Axis.prototype.nameToX = function (point) {
19549
- var explicitCategories = isArray(this.categories),
19626
+ var explicitCategories = isArray(this.options.categories),
19550
19627
  names = explicitCategories ? this.categories : this.names;
19551
19628
  var nameX = point.options.x,
19552
19629
  x;
19553
19630
  point.series.requireSorting = false;
19554
19631
  if (!defined(nameX)) {
19555
- nameX = this.options.uniqueNames ?
19632
+ nameX = this.options.uniqueNames && names ?
19556
19633
  (explicitCategories ?
19557
19634
  names.indexOf(point.name) :
19558
19635
  pick(names.keys[point.name], -1)) :
19559
19636
  point.series.autoIncrement();
19560
19637
  }
19561
19638
  if (nameX === -1) { // Not found in currenct categories
19562
- if (!explicitCategories) {
19639
+ if (!explicitCategories && names) {
19563
19640
  x = names.length;
19564
19641
  }
19565
19642
  }
@@ -20146,39 +20223,92 @@
20146
20223
  */
20147
20224
  Axis.prototype.alignToOthers = function () {
20148
20225
  var axis = this,
20149
- others = // Whether there is another axis to pair with this one
20150
- {},
20151
- options = axis.options;
20226
+ alignedAxes = [this],
20227
+ options = axis.options,
20228
+ alignThresholds = (this.coll === 'yAxis' &&
20229
+ this.chart.options.chart.alignThresholds),
20230
+ thresholdAlignments = [];
20152
20231
  var hasOther;
20153
- if (
20154
- // Only if alignTicks is true
20155
- this.chart.options.chart.alignTicks !== false &&
20156
- options.alignTicks &&
20232
+ axis.thresholdAlignment = void 0;
20233
+ if ((
20234
+ // Only if alignTicks or alignThresholds is true
20235
+ (this.chart.options.chart.alignTicks !== false &&
20236
+ options.alignTicks) || (alignThresholds)) &&
20157
20237
  // Disabled when startOnTick or endOnTick are false (#7604)
20158
20238
  options.startOnTick !== false &&
20159
20239
  options.endOnTick !== false &&
20160
20240
  // Don't try to align ticks on a log axis, they are not evenly
20161
20241
  // spaced (#6021)
20162
20242
  !axis.logarithmic) {
20163
- this.chart[this.coll].forEach(function (axis) {
20164
- var otherOptions = axis.options, horiz = axis.horiz, key = [
20165
- horiz ? otherOptions.left : otherOptions.top,
20166
- otherOptions.width,
20167
- otherOptions.height,
20168
- otherOptions.pane
20169
- ].join(',');
20170
- if (axis.series.length) { // #4442
20171
- if (others[key]) {
20172
- hasOther = true; // #4201
20173
- }
20174
- else {
20175
- others[key] = 1;
20176
- }
20243
+ // Get a key identifying which pane the axis belongs to
20244
+ var getKey_1 = function (axis) {
20245
+ var horiz = axis.horiz,
20246
+ options = axis.options;
20247
+ return [
20248
+ horiz ? options.left : options.top,
20249
+ options.width,
20250
+ options.height,
20251
+ options.pane
20252
+ ].join(',');
20253
+ };
20254
+ var thisKey_1 = getKey_1(this);
20255
+ this.chart[this.coll].forEach(function (otherAxis) {
20256
+ var series = otherAxis.series;
20257
+ if (
20258
+ // #4442
20259
+ series.length &&
20260
+ series.some(function (s) { return s.visible; }) &&
20261
+ otherAxis !== axis &&
20262
+ getKey_1(otherAxis) === thisKey_1) {
20263
+ hasOther = true; // #4201
20264
+ alignedAxes.push(otherAxis);
20265
+ }
20266
+ });
20267
+ }
20268
+ if (hasOther && alignThresholds) {
20269
+ // Handle alignThresholds. The `thresholdAlignments` array keeps
20270
+ // records of where each axis in the group wants its threshold, from
20271
+ // 0 which is on `axis.min`, to 1 which is on `axis.max`.
20272
+ alignedAxes.forEach(function (otherAxis) {
20273
+ var threshAlign = otherAxis.getThresholdAlignment(axis);
20274
+ if (isNumber(threshAlign)) {
20275
+ thresholdAlignments.push(threshAlign);
20177
20276
  }
20178
20277
  });
20278
+ // For each of the axes in the group, record the average
20279
+ // `thresholdAlignment`.
20280
+ var thresholdAlignment_1 = thresholdAlignments.length > 1 ?
20281
+ thresholdAlignments.reduce(function (sum,
20282
+ n) { return (sum += n); }, 0) / thresholdAlignments.length :
20283
+ void 0;
20284
+ alignedAxes.forEach(function (axis) {
20285
+ axis.thresholdAlignment = thresholdAlignment_1;
20286
+ });
20179
20287
  }
20180
20288
  return hasOther;
20181
20289
  };
20290
+ /**
20291
+ * Where the axis wants its threshold, from 0 which is on `axis.min`, to 1 which
20292
+ * is on `axis.max`.
20293
+ *
20294
+ * @private
20295
+ * @function Highcharts.Axis#getThresholdAlignment
20296
+ */
20297
+ Axis.prototype.getThresholdAlignment = function (callerAxis) {
20298
+ if (!isNumber(this.dataMin) ||
20299
+ (this !== callerAxis &&
20300
+ this.series.some(function (s) { return (s.isDirty || s.isDirtyData); }))) {
20301
+ this.getSeriesExtremes();
20302
+ }
20303
+ if (isNumber(this.threshold)) {
20304
+ var thresholdAlignment = clamp(((this.threshold - (this.dataMin || 0)) /
20305
+ ((this.dataMax || 0) - (this.dataMin || 0))), 0, 1);
20306
+ if (this.options.reversed) {
20307
+ thresholdAlignment = 1 - thresholdAlignment;
20308
+ }
20309
+ return thresholdAlignment;
20310
+ }
20311
+ };
20182
20312
  /**
20183
20313
  * Find the max ticks of either the x and y axis collection, and record it
20184
20314
  * in `this.tickAmount`.
@@ -20223,42 +20353,101 @@
20223
20353
  */
20224
20354
  Axis.prototype.adjustTickAmount = function () {
20225
20355
  var axis = this,
20226
- axisOptions = axis.options,
20227
- tickInterval = axis.tickInterval,
20356
+ finalTickAmt = axis.finalTickAmt,
20357
+ max = axis.max,
20358
+ min = axis.min,
20359
+ options = axis.options,
20228
20360
  tickPositions = axis.tickPositions,
20229
20361
  tickAmount = axis.tickAmount,
20230
- finalTickAmt = axis.finalTickAmt,
20362
+ thresholdAlignment = axis.thresholdAlignment,
20231
20363
  currentTickAmount = tickPositions && tickPositions.length,
20232
20364
  threshold = pick(axis.threshold,
20233
20365
  axis.softThreshold ? 0 : null);
20234
20366
  var len,
20235
- i;
20236
- if (axis.hasData() &&
20237
- isNumber(axis.min) &&
20238
- isNumber(axis.max)) { // #14769
20239
- if (currentTickAmount < tickAmount) {
20367
+ i,
20368
+ tickInterval = axis.tickInterval,
20369
+ thresholdTickIndex;
20370
+ var
20371
+ // Extend the tickPositions by appending a position
20372
+ append = function () { return tickPositions.push(correctFloat(tickPositions[tickPositions.length - 1] +
20373
+ tickInterval)); },
20374
+ // Extend the tickPositions by prepending a position
20375
+ prepend = function () { return tickPositions.unshift(correctFloat(tickPositions[0] - tickInterval)); };
20376
+ // If `thresholdAlignment` is a number, it means the `alignThresholds`
20377
+ // option is true. The `thresholdAlignment` is a scalar value between 0
20378
+ // and 1 for where the threshold should be relative to `axis.min` and
20379
+ // `axis.max`. Now that we know the tick amount, convert this to the
20380
+ // tick index. Unless `thresholdAlignment` is exactly 0 or 1, avoid the
20381
+ // first or last tick because that would lead to series being clipped.
20382
+ if (isNumber(thresholdAlignment)) {
20383
+ thresholdTickIndex = thresholdAlignment < 0.5 ?
20384
+ Math.ceil(thresholdAlignment * (tickAmount - 1)) :
20385
+ Math.floor(thresholdAlignment * (tickAmount - 1));
20386
+ if (options.reversed) {
20387
+ thresholdTickIndex = tickAmount - 1 - thresholdTickIndex;
20388
+ }
20389
+ }
20390
+ if (axis.hasData() && isNumber(min) && isNumber(max)) { // #14769
20391
+ // Adjust extremes and translation to the modified tick positions
20392
+ var adjustExtremes = function () {
20393
+ axis.transA *= (currentTickAmount - 1) / (tickAmount - 1);
20394
+ // Do not crop when ticks are not extremes (#9841)
20395
+ axis.min = options.startOnTick ?
20396
+ tickPositions[0] :
20397
+ Math.min(min, tickPositions[0]);
20398
+ axis.max = options.endOnTick ?
20399
+ tickPositions[tickPositions.length - 1] :
20400
+ Math.max(max, tickPositions[tickPositions.length - 1]);
20401
+ };
20402
+ // When the axis is subject to the alignThresholds option. Use
20403
+ // axis.threshold because the local threshold includes the
20404
+ // `softThreshold`.
20405
+ if (isNumber(thresholdTickIndex) && isNumber(axis.threshold)) {
20406
+ // Throw away the previously computed tickPositions and start
20407
+ // from scratch with only the threshold itself, then add ticks
20408
+ // below the threshold first, then fill up above the threshold.
20409
+ // If we are not able to fill up to axis.max, double the
20410
+ // tickInterval and run again.
20411
+ while (tickPositions[thresholdTickIndex] !== threshold ||
20412
+ tickPositions.length !== tickAmount ||
20413
+ tickPositions[0] > min ||
20414
+ tickPositions[tickPositions.length - 1] < max) {
20415
+ tickPositions.length = 0;
20416
+ tickPositions.push(axis.threshold);
20417
+ while (tickPositions.length < tickAmount) {
20418
+ if (
20419
+ // Start by prepending positions until the threshold
20420
+ // is at the required index...
20421
+ tickPositions[thresholdTickIndex] === void 0 ||
20422
+ tickPositions[thresholdTickIndex] > axis.threshold) {
20423
+ prepend();
20424
+ }
20425
+ else {
20426
+ // ... then append positions until we have the
20427
+ // required length
20428
+ append();
20429
+ }
20430
+ }
20431
+ // Safety vent
20432
+ if (tickInterval > axis.tickInterval * 8) {
20433
+ break;
20434
+ }
20435
+ tickInterval *= 2;
20436
+ }
20437
+ adjustExtremes();
20438
+ }
20439
+ else if (currentTickAmount < tickAmount) {
20240
20440
  while (tickPositions.length < tickAmount) {
20241
20441
  // Extend evenly for both sides unless we're on the
20242
20442
  // threshold (#3965)
20243
- if (tickPositions.length % 2 ||
20244
- axis.min === threshold) {
20245
- // to the end
20246
- tickPositions.push(correctFloat(tickPositions[tickPositions.length - 1] +
20247
- tickInterval));
20443
+ if (tickPositions.length % 2 || min === threshold) {
20444
+ append();
20248
20445
  }
20249
20446
  else {
20250
- // to the start
20251
- tickPositions.unshift(correctFloat(tickPositions[0] - tickInterval));
20447
+ prepend();
20252
20448
  }
20253
20449
  }
20254
- axis.transA *= (currentTickAmount - 1) / (tickAmount - 1);
20255
- // Do not crop when ticks are not extremes (#9841)
20256
- axis.min = axisOptions.startOnTick ?
20257
- tickPositions[0] :
20258
- Math.min(axis.min, tickPositions[0]);
20259
- axis.max = axisOptions.endOnTick ?
20260
- tickPositions[tickPositions.length - 1] :
20261
- Math.max(axis.max, tickPositions[tickPositions.length - 1]);
20450
+ adjustExtremes();
20262
20451
  // We have too many ticks, run second pass to try to reduce ticks
20263
20452
  }
20264
20453
  else if (currentTickAmount > tickAmount) {
@@ -23869,6 +24058,12 @@
23869
24058
  * the context here is an object holding point, series, x, y etc.
23870
24059
  *
23871
24060
  * @function Highcharts.Tooltip#defaultFormatter
24061
+ *
24062
+ * @param {Highcharts.Tooltip} tooltip
24063
+ *
24064
+ * @return {string|Array<string>}
24065
+ * Returns a string (single tooltip and shared)
24066
+ * or an array of strings (split tooltip)
23872
24067
  */
23873
24068
  Tooltip.prototype.defaultFormatter = function (tooltip) {
23874
24069
  var items = this.points || splat(this);
@@ -24471,7 +24666,7 @@
24471
24666
  shared = tooltip.shared,
24472
24667
  styledMode = chart.styledMode;
24473
24668
  var textConfig = {};
24474
- if (!options.enabled) {
24669
+ if (!options.enabled || !point.series) { // #16820
24475
24670
  return;
24476
24671
  }
24477
24672
  U.clearTimeout(this.hideTimer);
@@ -25127,46 +25322,23 @@
25127
25322
  * @callback Highcharts.TooltipFormatterCallbackFunction
25128
25323
  *
25129
25324
  * @param {Highcharts.TooltipFormatterContextObject} this
25130
- * Context to format
25325
+ * Context to format
25131
25326
  *
25132
25327
  * @param {Highcharts.Tooltip} tooltip
25133
- * The tooltip instance
25328
+ * The tooltip instance
25134
25329
  *
25135
25330
  * @return {false|string|Array<(string|null|undefined)>|null|undefined}
25136
- * Formatted text or false
25331
+ * Formatted text or false
25137
25332
  */
25138
25333
  /**
25334
+ * Configuration for the tooltip formatters.
25335
+ *
25139
25336
  * @interface Highcharts.TooltipFormatterContextObject
25337
+ * @extends Highcharts.PointLabelObject
25140
25338
  */ /**
25141
- * @name Highcharts.TooltipFormatterContextObject#color
25142
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
25143
- */ /**
25144
- * @name Highcharts.TooltipFormatterContextObject#colorIndex
25145
- * @type {number|undefined}
25146
- */ /**
25147
- * @name Highcharts.TooltipFormatterContextObject#key
25148
- * @type {number}
25149
- */ /**
25150
- * @name Highcharts.TooltipFormatterContextObject#percentage
25151
- * @type {number|undefined}
25152
- */ /**
25153
- * @name Highcharts.TooltipFormatterContextObject#point
25154
- * @type {Highcharts.Point}
25155
- */ /**
25339
+ * Array of points in shared tooltips.
25156
25340
  * @name Highcharts.TooltipFormatterContextObject#points
25157
25341
  * @type {Array<Highcharts.TooltipFormatterContextObject>|undefined}
25158
- */ /**
25159
- * @name Highcharts.TooltipFormatterContextObject#series
25160
- * @type {Highcharts.Series}
25161
- */ /**
25162
- * @name Highcharts.TooltipFormatterContextObject#total
25163
- * @type {number|undefined}
25164
- */ /**
25165
- * @name Highcharts.TooltipFormatterContextObject#x
25166
- * @type {number}
25167
- */ /**
25168
- * @name Highcharts.TooltipFormatterContextObject#y
25169
- * @type {number}
25170
25342
  */
25171
25343
  /**
25172
25344
  * A callback function to place the tooltip in a specific position.
@@ -26422,7 +26594,7 @@
26422
26594
  * @type {Highcharts.Point}
26423
26595
  */
26424
26596
  /**
26425
- * Configuration hash for the data label and tooltip formatters.
26597
+ * Configuration for the data label and tooltip formatters.
26426
26598
  *
26427
26599
  * @interface Highcharts.PointLabelObject
26428
26600
  */ /**
@@ -26464,7 +26636,7 @@
26464
26636
  */ /**
26465
26637
  * The y value of the point.
26466
26638
  * @name Highcharts.PointLabelObject#y
26467
- * @type {number|undefined}
26639
+ * @type {number|null|undefined}
26468
26640
  */
26469
26641
  /**
26470
26642
  * Gets fired when the mouse leaves the area close to the point.
@@ -27244,9 +27416,10 @@
27244
27416
  * name.
27245
27417
  */
27246
27418
  Pointer.prototype.inClass = function (element, className) {
27247
- var elemClassName;
27248
- while (element) {
27249
- elemClassName = attr(element, 'class');
27419
+ var elem = element,
27420
+ elemClassName;
27421
+ while (elem) {
27422
+ elemClassName = attr(elem, 'class');
27250
27423
  if (elemClassName) {
27251
27424
  if (elemClassName.indexOf(className) !== -1) {
27252
27425
  return true;
@@ -27255,7 +27428,7 @@
27255
27428
  return false;
27256
27429
  }
27257
27430
  }
27258
- element = element.parentNode;
27431
+ elem = elem.parentElement;
27259
27432
  }
27260
27433
  };
27261
27434
  /**
@@ -27296,6 +27469,9 @@
27296
27469
  * properties `chartX` and `chartY` in order to work on the internal
27297
27470
  * coordinate system.
27298
27471
  *
27472
+ * On map charts, the properties `lon` and `lat` are added to the event
27473
+ * object given that the chart has projection information.
27474
+ *
27299
27475
  * @function Highcharts.Pointer#normalize
27300
27476
  *
27301
27477
  * @param {global.MouseEvent|global.PointerEvent|global.TouchEvent} e
@@ -27891,11 +28067,12 @@
27891
28067
  * The mouseOver event should be triggered when hoverPoint
27892
28068
  * is correct.
27893
28069
  */
27894
- hoverPoint.firePointEvent('mouseOver');
27895
- // Draw tooltip if necessary
27896
- if (tooltip) {
27897
- tooltip.refresh(useSharedTooltip ? points : hoverPoint, e);
27898
- }
28070
+ hoverPoint.firePointEvent('mouseOver', void 0, function () {
28071
+ // Draw tooltip if necessary
28072
+ if (tooltip && hoverPoint) {
28073
+ tooltip.refresh(useSharedTooltip ? points : hoverPoint, e);
28074
+ }
28075
+ });
27899
28076
  // Update positions (regardless of kdpoint or hoverPoint)
27900
28077
  }
27901
28078
  else if (followPointer && tooltip && !tooltip.isHidden) {
@@ -27926,7 +28103,7 @@
27926
28103
  point = chart.hoverPoint; // #13002
27927
28104
  if (!point || point.series[axis.coll] !== axis) {
27928
28105
  point = find(points, function (p) {
27929
- return p.series[axis.coll] === axis;
28106
+ return p.series && p.series[axis.coll] === axis;
27930
28107
  });
27931
28108
  }
27932
28109
  }
@@ -28015,7 +28192,7 @@
28015
28192
  var hoverChart = H.charts[pick(Pointer.hoverChartIndex, -1)];
28016
28193
  if (hoverChart &&
28017
28194
  hoverChart !== chart) {
28018
- hoverChart.pointer.onContainerMouseLeave({ relatedTarget: true });
28195
+ hoverChart.pointer.onContainerMouseLeave({ relatedTarget: chart.container });
28019
28196
  }
28020
28197
  if (!hoverChart ||
28021
28198
  !hoverChart.mouseIsDown) {
@@ -28477,7 +28654,7 @@
28477
28654
  this.maxItemWidth = 0;
28478
28655
  this.maxLegendWidth = 0;
28479
28656
  this.offsetWidth = 0;
28480
- this.options = {};
28657
+ this.options = void 0;
28481
28658
  this.padding = 0;
28482
28659
  this.pages = [];
28483
28660
  this.proximate = false;
@@ -28808,7 +28985,7 @@
28808
28985
  * @name Highcharts.Legend#title
28809
28986
  * @type {Highcharts.SVGElement}
28810
28987
  */
28811
- this.title = this.chart.renderer.label(titleOptions.text, padding - 3, padding - 4, null, null, null, options.useHTML, null, 'legend-title')
28988
+ this.title = this.chart.renderer.label(titleOptions.text, padding - 3, padding - 4, void 0, void 0, void 0, options.useHTML, void 0, 'legend-title')
28812
28989
  .attr({ zIndex: 1 });
28813
28990
  if (!this.chart.styledMode) {
28814
28991
  this.title.css(titleOptions.style);
@@ -29175,8 +29352,7 @@
29175
29352
  legend.lastItemY = 0;
29176
29353
  legend.widthOption = relativeLength(options.width, chart.spacingBox.width - padding);
29177
29354
  // Compute how wide the legend is allowed to be
29178
- allowedWidth =
29179
- chart.spacingBox.width - 2 * padding - options.x;
29355
+ allowedWidth = chart.spacingBox.width - 2 * padding - options.x;
29180
29356
  if (['rm', 'lm'].indexOf(legend.getAlignment().substring(0, 2)) > -1) {
29181
29357
  allowedWidth /= 2;
29182
29358
  }
@@ -29249,7 +29425,6 @@
29249
29425
  r: options.borderRadius
29250
29426
  })
29251
29427
  .add(legendGroup);
29252
- box.isNew = true;
29253
29428
  }
29254
29429
  // Presentational
29255
29430
  if (!chart.styledMode) {
@@ -29262,13 +29437,12 @@
29262
29437
  .shadow(options.shadow);
29263
29438
  }
29264
29439
  if (legendWidth > 0 && legendHeight > 0) {
29265
- box[box.isNew ? 'attr' : 'animate'](box.crisp.call({}, {
29440
+ box[box.placed ? 'animate' : 'attr'](box.crisp.call({}, {
29266
29441
  x: 0,
29267
29442
  y: 0,
29268
29443
  width: legendWidth,
29269
29444
  height: legendHeight
29270
29445
  }, box.strokeWidth()));
29271
- box.isNew = false;
29272
29446
  }
29273
29447
  // hide the border if no items
29274
29448
  box[display ? 'show' : 'hide']();
@@ -29311,6 +29485,11 @@
29311
29485
  if (y !== alignTo.y) {
29312
29486
  alignTo = merge(alignTo, { y: y });
29313
29487
  }
29488
+ if (!chart.hasRendered) {
29489
+ // Avoid animation when adjusting alignment for responsiveness and
29490
+ // colorAxis label layout
29491
+ this.group.placed = false;
29492
+ }
29314
29493
  this.group.align(merge(options, {
29315
29494
  width: this.legendWidth,
29316
29495
  height: this.legendHeight,
@@ -29444,7 +29623,7 @@
29444
29623
  });
29445
29624
  this.pager = renderer.text('', 15, 10)
29446
29625
  .addClass('highcharts-legend-navigation');
29447
- if (!chart.styledMode) {
29626
+ if (!chart.styledMode && navOptions.style) {
29448
29627
  this.pager.css(navOptions.style);
29449
29628
  }
29450
29629
  this.pager.add(nav);
@@ -34381,6 +34560,9 @@
34381
34560
  * parameter, `event`, is passed to the function, containing common
34382
34561
  * event information.
34383
34562
  *
34563
+ * Returning `false` cancels the default behavior, which is to show a
34564
+ * tooltip for the point.
34565
+ *
34384
34566
  * @sample {highcharts} highcharts/plotoptions/series-point-events-mouseover/
34385
34567
  * Show values in the chart's corner on mouse over
34386
34568
  *
@@ -35103,7 +35285,7 @@
35103
35285
  * @deprecated
35104
35286
  *
35105
35287
  * @extends plotOptions.series.marker
35106
- * @excluding states
35288
+ * @excluding states, symbol
35107
35289
  * @product highcharts highstock
35108
35290
  */
35109
35291
  marker: {
@@ -36553,7 +36735,7 @@
36553
36735
  xExtremes = xAxis.getExtremes();
36554
36736
  min = xExtremes.min;
36555
36737
  max = xExtremes.max;
36556
- updatingNames = xAxis.categories && !xAxis.names.length;
36738
+ updatingNames = !!(xAxis.categories && !xAxis.names.length);
36557
36739
  }
36558
36740
  // optionally filter out points outside the plot area
36559
36741
  if (isCartesian &&
@@ -36687,7 +36869,7 @@
36687
36869
  Series.prototype.generatePoints = function () {
36688
36870
  var series = this,
36689
36871
  options = series.options,
36690
- dataOptions = options.data,
36872
+ dataOptions = (series.processedData || options.data),
36691
36873
  processedXData = series.processedXData,
36692
36874
  processedYData = series.processedYData,
36693
36875
  PointClass = series.pointClass,
@@ -37020,8 +37202,16 @@
37020
37202
  !xAxis.validatePositiveValue(xValue)) {
37021
37203
  point.isNull = true;
37022
37204
  }
37023
- // Get the plotX translation
37205
+ /**
37206
+ * The translated X value for the point in terms of pixels. Relative
37207
+ * to the X axis position if the series has one, otherwise relative
37208
+ * to the plot area. Depending on the series type this value might
37209
+ * not be defined.
37210
+ * @name Highcharts.Point#plotX
37211
+ * @type {number|undefined}
37212
+ */
37024
37213
  point.plotX = plotX = correctFloat(// #5236
37214
+ // Get the plotX translation
37025
37215
  limitedRange(xAxis.translate(// #3923
37026
37216
  xValue, 0, 0, 0, 1, pointPlacement, this.type === 'flags')) // #3923
37027
37217
  );
@@ -37082,6 +37272,14 @@
37082
37272
  false,
37083
37273
  true);
37084
37274
  if (typeof translated !== 'undefined') {
37275
+ /**
37276
+ * The translated Y value for the point in terms of pixels.
37277
+ * Relative to the Y axis position if the series has one,
37278
+ * otherwise relative to the plot area. Depending on the
37279
+ * series type this value might not be defined.
37280
+ * @name Highcharts.Point#plotY
37281
+ * @type {number|undefined}
37282
+ */
37085
37283
  point.plotY = limitedRange(translated);
37086
37284
  }
37087
37285
  }
@@ -37096,10 +37294,7 @@
37096
37294
  threshold ||
37097
37295
  0);
37098
37296
  // some API data
37099
- point.category = (categories &&
37100
- typeof categories[point.x] !== 'undefined' ?
37101
- categories[point.x] :
37102
- point.x);
37297
+ point.category = pick(categories && categories[point.x], point.x);
37103
37298
  // Determine auto enabling of markers (#3635, #5099)
37104
37299
  if (!point.isNull && point.visible !== false) {
37105
37300
  if (typeof lastPlotX !== 'undefined') {
@@ -37450,26 +37645,26 @@
37450
37645
  var seriesStateOptions,
37451
37646
  pointStateOptions,
37452
37647
  radius = pick(pointMarkerOptions.radius,
37453
- seriesMarkerOptions.radius);
37648
+ seriesMarkerOptions && seriesMarkerOptions.radius);
37454
37649
  // Handle hover and select states
37455
37650
  if (state) {
37456
37651
  seriesStateOptions = seriesMarkerOptions.states[state];
37457
37652
  pointStateOptions = pointMarkerOptions.states &&
37458
37653
  pointMarkerOptions.states[state];
37459
- radius = pick(pointStateOptions && pointStateOptions.radius, seriesStateOptions && seriesStateOptions.radius, radius + (seriesStateOptions && seriesStateOptions.radiusPlus ||
37654
+ radius = pick(pointStateOptions && pointStateOptions.radius, seriesStateOptions && seriesStateOptions.radius, radius && radius + (seriesStateOptions && seriesStateOptions.radiusPlus ||
37460
37655
  0));
37461
37656
  }
37462
37657
  point.hasImage = symbol && symbol.indexOf('url') === 0;
37463
37658
  if (point.hasImage) {
37464
37659
  radius = 0; // and subsequently width and height is not set
37465
37660
  }
37466
- var attribs = {
37661
+ var attribs = isNumber(radius) ? {
37467
37662
  // Math.floor for #1843:
37468
37663
  x: seriesOptions.crisp ?
37469
37664
  Math.floor(point.plotX - radius) :
37470
37665
  point.plotX - radius,
37471
37666
  y: point.plotY - radius
37472
- };
37667
+ } : {};
37473
37668
  if (radius) {
37474
37669
  attribs.width = attribs.height = 2 * radius;
37475
37670
  }
@@ -37559,7 +37754,7 @@
37559
37754
  point,
37560
37755
  axis;
37561
37756
  // add event hook
37562
- fireEvent(series, 'destroy');
37757
+ fireEvent(series, 'destroy', { keepEventsForUpdate: keepEventsForUpdate });
37563
37758
  // remove events
37564
37759
  this.removeEvents(keepEventsForUpdate);
37565
37760
  // erase from axes
@@ -38369,7 +38564,10 @@
38369
38564
  names[x] = point.name;
38370
38565
  }
38371
38566
  dataOptions.splice(i, 0, options);
38372
- if (isInTheMiddle) {
38567
+ if (isInTheMiddle ||
38568
+ // When processedData is present we need to splice an empty slot
38569
+ // into series.data, otherwise generatePoints won't pick it up.
38570
+ series.processedData) {
38373
38571
  series.data.splice(i, 0, null);
38374
38572
  series.processData();
38375
38573
  }
@@ -38574,6 +38772,8 @@
38574
38772
  typeof options.pointStart !== 'undefined' ||
38575
38773
  typeof options.pointInterval !== 'undefined' ||
38576
38774
  typeof options.relativeXValue !== 'undefined' ||
38775
+ options.joinBy ||
38776
+ options.mapData || // #11636
38577
38777
  // Changes to data grouping requires new points in new group
38578
38778
  series.hasOptionChanged('dataGrouping') ||
38579
38779
  series.hasOptionChanged('pointStart') ||
@@ -38585,6 +38785,8 @@
38585
38785
  preserve.push('data', 'isDirtyData', 'points', 'processedXData', 'processedYData', 'xIncrement', 'cropped', '_hasPointMarkers', '_hasPointLabels', 'clips', // #15420
38586
38786
  // Networkgraph (#14397)
38587
38787
  'nodes', 'layout',
38788
+ // Treemap
38789
+ 'level',
38588
38790
  // Map specific, consider moving it to series-specific preserve-
38589
38791
  // properties (#10617)
38590
38792
  'mapMap', 'mapData', 'minY', 'maxY', 'minX', 'maxX');
@@ -38636,8 +38838,6 @@
38636
38838
  series.remove(false, false, false, true);
38637
38839
  if (casting) {
38638
38840
  // Modern browsers including IE11
38639
- // @todo slow, consider alternatives mentioned:
38640
- // https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf
38641
38841
  if (Object.setPrototypeOf) {
38642
38842
  Object.setPrototypeOf(series, seriesTypes[newType].prototype);
38643
38843
  // Legacy (IE < 11)
@@ -39696,7 +39896,7 @@
39696
39896
  .addClass('highcharts-scrollable-mask')
39697
39897
  .add();
39698
39898
  addEvent(this, 'afterShowResetZoom', this.moveFixedElements);
39699
- addEvent(this, 'afterDrilldown', this.moveFixedElements);
39899
+ addEvent(this, 'afterApplyDrilldown', this.moveFixedElements);
39700
39900
  addEvent(this, 'afterLayOutTitles', this.moveFixedElements);
39701
39901
  }
39702
39902
  else {
@@ -39824,6 +40024,7 @@
39824
40024
  * area will become scrollable.
39825
40025
  *
39826
40026
  * @type {number}
40027
+ * @since 7.1.2
39827
40028
  * @apioption chart.scrollablePlotArea.minHeight
39828
40029
  */
39829
40030
  /**
@@ -39831,6 +40032,7 @@
39831
40032
  * area will become scrollable.
39832
40033
  *
39833
40034
  * @type {number}
40035
+ * @since 6.1.0
39834
40036
  * @apioption chart.scrollablePlotArea.minWidth
39835
40037
  */
39836
40038
  /**
@@ -39839,6 +40041,7 @@
39839
40041
  * Typically we would use 1 if the chart has right aligned Y axes.
39840
40042
  *
39841
40043
  * @type {number}
40044
+ * @since 6.1.0
39842
40045
  * @apioption chart.scrollablePlotArea.scrollPositionX
39843
40046
  */
39844
40047
  /**
@@ -39846,6 +40049,7 @@
39846
40049
  * 1, where 0 aligns the plot area to the top and 1 aligns it to the bottom.
39847
40050
  *
39848
40051
  * @type {number}
40052
+ * @since 7.1.2
39849
40053
  * @apioption chart.scrollablePlotArea.scrollPositionY
39850
40054
  */
39851
40055
  /**
@@ -40586,11 +40790,12 @@
40586
40790
  // changed:
40587
40791
  if (!defined(stackIndicator) ||
40588
40792
  stackIndicator.x !== x ||
40589
- (key && stackIndicator.key !== key)) {
40793
+ (key && stackIndicator.stackKey !== key)) {
40590
40794
  stackIndicator = {
40591
40795
  x: x,
40592
40796
  index: 0,
40593
- key: key
40797
+ key: key,
40798
+ stackKey: key
40594
40799
  };
40595
40800
  }
40596
40801
  else {
@@ -42600,8 +42805,9 @@
42600
42805
  var _this = this;
42601
42806
  var stacking = this.options.stacking;
42602
42807
  if (!point.isNull && metrics.columnCount > 1) {
42603
- var indexInCategory_1 = 0;
42604
- var totalInCategory_1 = 0;
42808
+ var reversedStacks_1 = this.yAxis.options.reversedStacks;
42809
+ var indexInCategory_1 = 0,
42810
+ totalInCategory_1 = reversedStacks_1 ? 0 : -metrics.columnCount;
42605
42811
  // Loop over all the stacks on the Y axis. When stacking is enabled,
42606
42812
  // these are real point stacks. When stacking is not enabled, but
42607
42813
  // `centerInCategory` is true, there is one stack handling the
@@ -42622,7 +42828,8 @@
42622
42828
  indexInCategory_1 = totalInCategory_1;
42623
42829
  }
42624
42830
  if (stackItem.hasValidPoints) {
42625
- totalInCategory_1++;
42831
+ reversedStacks_1 ? // #16169
42832
+ totalInCategory_1++ : totalInCategory_1--;
42626
42833
  }
42627
42834
  // If `stacking` is not enabled, look for the index
42628
42835
  // and total of the `group` stack.
@@ -43850,10 +44057,10 @@
43850
44057
  rotation,
43851
44058
  attr,
43852
44059
  dataLabel = point.dataLabels ?
43853
- point.dataLabels[i] : point.dataLabel;
43854
- var labelDistance = pick(labelOptions.distance,
43855
- point.labelDistance),
44060
+ point.dataLabels[i] : point.dataLabel,
43856
44061
  isNew = !dataLabel;
44062
+ var labelDistance = pick(labelOptions.distance,
44063
+ point.labelDistance);
43857
44064
  if (labelEnabled) {
43858
44065
  // Create individual options structure that can be
43859
44066
  // extended without affecting others
@@ -43907,7 +44114,15 @@
43907
44114
  // #820
43908
44115
  if (dataLabel && (!labelEnabled ||
43909
44116
  !defined(labelText) ||
43910
- !!dataLabel.div !== !!labelOptions.useHTML)) {
44117
+ !!dataLabel.div !== !!labelOptions.useHTML ||
44118
+ (
44119
+ // Change from no rotation to rotation and
44120
+ // vice versa. Don't use defined() because
44121
+ // rotation = 0 means also rotation = undefined
44122
+ (!dataLabel.rotation ||
44123
+ !labelOptions.rotation) &&
44124
+ dataLabel.rotation !== labelOptions.rotation))) {
44125
+ isNew = true;
43911
44126
  point.dataLabel = dataLabel =
43912
44127
  point.dataLabel && point.dataLabel.destroy();
43913
44128
  if (point.dataLabels) {
@@ -44661,7 +44876,7 @@
44661
44876
  *
44662
44877
  * @type {boolean}
44663
44878
  * @default false
44664
- * @product highcharts highstock
44879
+ * @product highcharts highstock highmaps
44665
44880
  * @apioption plotOptions.scatter.stickyTracking
44666
44881
  */
44667
44882
  /**
@@ -45051,12 +45266,19 @@
45051
45266
  return isNumber(this.y) && this.y >= 0;
45052
45267
  };
45053
45268
  /**
45054
- * Toggle the visibility of the pie slice.
45055
- * @private
45269
+ * Toggle the visibility of a pie slice or other data point. Note that this
45270
+ * method is available only for some series, like pie, treemap and sunburst.
45271
+ *
45272
+ * @function Highcharts.Point#setVisible
45273
+ *
45274
+ * @param {boolean} [vis]
45275
+ * True to show the pie slice or other data point, false to hide. If
45276
+ * undefined, the visibility is toggled.
45277
+ *
45278
+ * @param {boolean} [redraw] Whether to redraw the chart after the point is
45279
+ * altered. If doing more operations on the chart, it is a good idea to set
45280
+ * redraw to false and call {@link Chart#redraw|chart.redraw()} after.
45056
45281
  *
45057
- * @param {boolean} vis
45058
- * Whether to show the slice or not. If undefined, the visibility is
45059
- * toggled.
45060
45282
  */
45061
45283
  PiePoint.prototype.setVisible = function (vis, redraw) {
45062
45284
  var _this = this;
@@ -49100,6 +49322,7 @@
49100
49322
  * @type {string}
49101
49323
  * @since 1.0.1
49102
49324
  * @product highstock
49325
+ * @validvalue ["percent", "value"]
49103
49326
  * @apioption plotOptions.series.compare
49104
49327
  */
49105
49328
  /**
@@ -50631,8 +50854,11 @@
50631
50854
  }
50632
50855
  else {
50633
50856
  this.chart.options.series.forEach(function (seriesOptions) {
50634
- seriesOptions.dataGrouping = dataGrouping;
50635
- }, false);
50857
+ // Merging dataGrouping options with already defined options #16759
50858
+ seriesOptions.dataGrouping = typeof dataGrouping === 'boolean' ?
50859
+ dataGrouping :
50860
+ merge(dataGrouping, seriesOptions.dataGrouping);
50861
+ });
50636
50862
  }
50637
50863
  // Clear ordinal slope, so we won't accidentaly use the old one (#7827)
50638
50864
  if (axis.ordinal) {
@@ -51883,6 +52109,13 @@
51883
52109
  * @product highstock
51884
52110
  * @apioption series.ohlc.data
51885
52111
  */
52112
+ /**
52113
+ * The closing value of each data point.
52114
+ *
52115
+ * @type {number}
52116
+ * @product highstock
52117
+ * @apioption series.ohlc.data.close
52118
+ */
51886
52119
  /**
51887
52120
  * The opening value of each data point.
51888
52121
  *
@@ -55339,19 +55572,21 @@
55339
55572
  maskInside,
55340
55573
  !maskInside
55341
55574
  ].forEach(function (hasMask, index) {
55342
- navigator.shades[index] = renderer.rect()
55343
- .addClass('highcharts-navigator-mask' +
55344
- (index === 1 ? '-inside' : '-outside'))
55345
- .add(navigatorGroup);
55575
+ var shade = renderer.rect()
55576
+ .addClass('highcharts-navigator-mask' +
55577
+ (index === 1 ? '-inside' : '-outside'))
55578
+ .add(navigatorGroup);
55346
55579
  if (!chart.styledMode) {
55347
- navigator.shades[index]
55348
- .attr({
55580
+ shade.attr({
55349
55581
  fill: hasMask ?
55350
55582
  navigatorOptions.maskFill :
55351
55583
  'rgba(0,0,0,0)'
55352
- })
55353
- .css((index === 1) && mouseCursor);
55584
+ });
55585
+ if (index === 1) {
55586
+ shade.css(mouseCursor);
55587
+ }
55354
55588
  }
55589
+ navigator.shades[index] = shade;
55355
55590
  });
55356
55591
  // Create the outline:
55357
55592
  navigator.outline = renderer.path()
@@ -56319,7 +56554,8 @@
56319
56554
  Navigator.prototype.getBaseSeriesMin = function (currentSeriesMin) {
56320
56555
  return this.baseSeries.reduce(function (min, series) {
56321
56556
  // (#10193)
56322
- return Math.min(min, series.xData ? series.xData[0] : min);
56557
+ return Math.min(min, series.xData && series.xData.length ?
56558
+ series.xData[0] : min);
56323
56559
  }, currentSeriesMin);
56324
56560
  };
56325
56561
  /**