@ntlab/ntjs-assets 2.0.21 → 2.0.22

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 (402) hide show
  1. package/assets/js/cdn.json +1 -1
  2. package/assets/js/highcharts/css/highcharts.css +74 -0
  3. package/assets/js/highcharts/es-modules/Accessibility/Components/LegendComponent.js +1 -1
  4. package/assets/js/highcharts/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +1 -1
  5. package/assets/js/highcharts/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +9 -2
  6. package/assets/js/highcharts/es-modules/Core/Axis/Axis.js +25 -15
  7. package/assets/js/highcharts/es-modules/Core/Axis/AxisDefaults.js +3 -2
  8. package/assets/js/highcharts/es-modules/Core/Axis/Color/ColorAxis.js +1 -1
  9. package/assets/js/highcharts/es-modules/Core/Axis/Color/ColorAxisDefaults.js +2 -2
  10. package/assets/js/highcharts/es-modules/Core/Axis/GridAxis.js +1 -1
  11. package/assets/js/highcharts/es-modules/Core/Axis/OrdinalAxis.js +1 -1
  12. package/assets/js/highcharts/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +10 -0
  13. package/assets/js/highcharts/es-modules/Core/Axis/RadialAxis.js +19 -113
  14. package/assets/js/highcharts/es-modules/Core/Axis/RadialAxisDefaults.js +128 -0
  15. package/assets/js/highcharts/es-modules/Core/Axis/Tick.js +9 -13
  16. package/assets/js/highcharts/es-modules/Core/Chart/Chart.js +21 -17
  17. package/assets/js/highcharts/es-modules/Core/Chart/ChartDefaults.js +4 -2
  18. package/assets/js/highcharts/es-modules/Core/Chart/StockChart.js +5 -9
  19. package/assets/js/highcharts/es-modules/Core/Defaults.js +180 -91
  20. package/assets/js/highcharts/es-modules/Core/Renderer/SVG/SVGElement.js +50 -28
  21. package/assets/js/highcharts/es-modules/Core/Renderer/SVG/SVGLabel.js +6 -3
  22. package/assets/js/highcharts/es-modules/Core/Renderer/SVG/SVGRenderer.js +38 -80
  23. package/assets/js/highcharts/es-modules/Core/Renderer/SVG/Symbols.js +9 -5
  24. package/assets/js/highcharts/es-modules/Core/Series/DataLabel.js +17 -10
  25. package/assets/js/highcharts/es-modules/Core/Series/Point.js +4 -3
  26. package/assets/js/highcharts/es-modules/Core/Series/Series.js +24 -15
  27. package/assets/js/highcharts/es-modules/Core/Series/SeriesDefaults.js +15 -0
  28. package/assets/js/highcharts/es-modules/Core/Templating.js +4 -1
  29. package/assets/js/highcharts/es-modules/Core/Tooltip.js +17 -55
  30. package/assets/js/highcharts/es-modules/Core/Utilities.js +16 -0
  31. package/assets/js/highcharts/es-modules/Data/Converters/CSVConverter.js +1 -1
  32. package/assets/js/highcharts/es-modules/Data/DataCursor.js +34 -16
  33. package/assets/js/highcharts/es-modules/Data/DataPool.js +1 -1
  34. package/assets/js/highcharts/es-modules/Extensions/Annotations/Controllables/Controllable.js +3 -0
  35. package/assets/js/highcharts/es-modules/Extensions/Annotations/Controllables/ControllableLabel.js +0 -3
  36. package/assets/js/highcharts/es-modules/Extensions/Annotations/Controllables/ControllablePath.js +0 -3
  37. package/assets/js/highcharts/es-modules/Extensions/Annotations/EventEmitter.js +6 -6
  38. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +2 -0
  39. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/CrookedLine.js +1 -0
  40. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/Fibonacci.js +4 -2
  41. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/FibonacciTimeZones.js +2 -1
  42. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/InfinityLine.js +2 -1
  43. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/Measure.js +4 -3
  44. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/Pitchfork.js +11 -5
  45. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/TimeCycles.js +2 -1
  46. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/Tunnel.js +4 -2
  47. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/VerticalLine.js +2 -1
  48. package/assets/js/highcharts/es-modules/Extensions/Boost/BoostChart.js +11 -3
  49. package/assets/js/highcharts/es-modules/Extensions/Boost/BoostSeries.js +7 -4
  50. package/assets/js/highcharts/es-modules/Extensions/Boost/WGLRenderer.js +11 -2
  51. package/assets/js/highcharts/es-modules/Extensions/Data.js +3 -3
  52. package/assets/js/highcharts/es-modules/Extensions/DataGrouping/DataGroupingSeriesComposition.js +1 -0
  53. package/assets/js/highcharts/es-modules/Extensions/DownloadURL.js +3 -0
  54. package/assets/js/highcharts/es-modules/Extensions/DragPanes/AxisResizer.js +1 -2
  55. package/assets/js/highcharts/es-modules/Extensions/DraggablePoints/DragDropProps.js +17 -0
  56. package/assets/js/highcharts/es-modules/Extensions/DraggablePoints/DraggablePoints.js +1 -0
  57. package/assets/js/highcharts/es-modules/Extensions/Drilldown/Drilldown.js +14 -14
  58. package/assets/js/highcharts/es-modules/Extensions/Exporting/Exporting.js +13 -18
  59. package/assets/js/highcharts/es-modules/Extensions/Exporting/ExportingDefaults.js +8 -6
  60. package/assets/js/highcharts/es-modules/Extensions/OfflineExporting/OfflineExporting.js +38 -30
  61. package/assets/js/highcharts/es-modules/Extensions/Pane/PaneDefaults.js +11 -0
  62. package/assets/js/highcharts/es-modules/Extensions/RegexLimits.js +1 -0
  63. package/assets/js/highcharts/es-modules/Extensions/ScrollablePlotArea.js +19 -17
  64. package/assets/js/highcharts/es-modules/Extensions/Themes/BrandDark.js +13 -1
  65. package/assets/js/highcharts/es-modules/Maps/MapNavigation.js +5 -3
  66. package/assets/js/highcharts/es-modules/Maps/MapView.js +5 -5
  67. package/assets/js/highcharts/es-modules/Maps/Projection.js +39 -20
  68. package/assets/js/highcharts/es-modules/Series/ArcDiagram/ArcDiagramSeries.js +10 -231
  69. package/assets/js/highcharts/es-modules/Series/ArcDiagram/ArcDiagramSeriesDefaults.js +245 -0
  70. package/assets/js/highcharts/es-modules/Series/Area/AreaSeries.js +2 -222
  71. package/assets/js/highcharts/es-modules/Series/Area/AreaSeriesDefaults.js +239 -0
  72. package/assets/js/highcharts/es-modules/Series/AreaRange/AreaRangeSeries.js +0 -133
  73. package/assets/js/highcharts/es-modules/Series/AreaRange/AreaRangeSeriesDefaults.js +273 -0
  74. package/assets/js/highcharts/es-modules/Series/BoxPlot/BoxPlotSeries.js +36 -38
  75. package/assets/js/highcharts/es-modules/Series/Bubble/BubbleSeries.js +17 -6
  76. package/assets/js/highcharts/es-modules/Series/Candlestick/CandlestickSeries.js +9 -11
  77. package/assets/js/highcharts/es-modules/Series/ColorMapComposition.js +28 -4
  78. package/assets/js/highcharts/es-modules/Series/Column/ColumnDataLabel.js +1 -1
  79. package/assets/js/highcharts/es-modules/Series/Column/ColumnSeries.js +25 -30
  80. package/assets/js/highcharts/es-modules/Series/DataModifyComposition.js +26 -2
  81. package/assets/js/highcharts/es-modules/Series/DotPlot/DotPlotSeries.js +37 -27
  82. package/assets/js/highcharts/es-modules/Series/DotPlot/DotPlotSeriesDefaults.js +3 -2
  83. package/assets/js/highcharts/es-modules/Series/Dumbbell/DumbbellSeries.js +1 -39
  84. package/assets/js/highcharts/es-modules/Series/Dumbbell/DumbbellSeriesDefaults.js +29 -0
  85. package/assets/js/highcharts/es-modules/Series/Flags/FlagsSeries.js +2 -1
  86. package/assets/js/highcharts/es-modules/Series/GeoHeatmap/GeoHeatmapSeries.js +3 -10
  87. package/assets/js/highcharts/es-modules/Series/HLC/HLCSeries.js +4 -5
  88. package/assets/js/highcharts/es-modules/Series/MapLine/MapLineSeriesDefaults.js +7 -6
  89. package/assets/js/highcharts/es-modules/Series/MapPoint/MapPointSeriesDefaults.js +17 -11
  90. package/assets/js/highcharts/es-modules/Series/Networkgraph/NetworkgraphSeriesDefaults.js +1 -1
  91. package/assets/js/highcharts/es-modules/Series/Networkgraph/ReingoldFruchtermanLayout.js +1 -1
  92. package/assets/js/highcharts/es-modules/Series/OHLC/OHLCSeries.js +3 -5
  93. package/assets/js/highcharts/es-modules/Series/Organization/OrganizationSeries.js +17 -19
  94. package/assets/js/highcharts/es-modules/Series/Organization/OrganizationSeriesDefaults.js +1 -1
  95. package/assets/js/highcharts/es-modules/Series/PackedBubble/PackedBubbleLayout.js +3 -3
  96. package/assets/js/highcharts/es-modules/Series/PackedBubble/PackedBubbleSeries.js +3 -3
  97. package/assets/js/highcharts/es-modules/Series/PackedBubble/PackedBubbleSeriesDefaults.js +0 -1
  98. package/assets/js/highcharts/es-modules/Series/Pyramid/PyramidSeriesDefaults.js +3 -3
  99. package/assets/js/highcharts/es-modules/Series/Sankey/SankeySeries.js +5 -6
  100. package/assets/js/highcharts/es-modules/Series/Sankey/SankeySeriesDefaults.js +1 -1
  101. package/assets/js/highcharts/es-modules/Series/SeriesOnPointComposition.js +2 -2
  102. package/assets/js/highcharts/es-modules/Series/Sunburst/SunburstSeriesDefaults.js +1 -1
  103. package/assets/js/highcharts/es-modules/Series/Treegraph/TreegraphLink.js +12 -7
  104. package/assets/js/highcharts/es-modules/Series/Treegraph/TreegraphSeries.js +8 -9
  105. package/assets/js/highcharts/es-modules/Series/Treemap/TreemapSeries.js +8 -8
  106. package/assets/js/highcharts/es-modules/Series/Treemap/TreemapSeriesDefaults.js +1 -1
  107. package/assets/js/highcharts/es-modules/Series/Variwide/VariwideSeries.js +4 -4
  108. package/assets/js/highcharts/es-modules/Series/Venn/VennSeriesDefaults.js +2 -2
  109. package/assets/js/highcharts/es-modules/Series/Waterfall/WaterfallSeries.js +11 -12
  110. package/assets/js/highcharts/es-modules/Series/XRange/XRangeSeries.js +4 -4
  111. package/assets/js/highcharts/es-modules/Stock/Navigator/Navigator.js +2 -5
  112. package/assets/js/highcharts/es-modules/Stock/Navigator/NavigatorDefaults.js +11 -0
  113. package/assets/js/highcharts/es-modules/Stock/Navigator/NavigatorSymbols.js +9 -10
  114. package/assets/js/highcharts/es-modules/Stock/RangeSelector/RangeSelector.js +162 -187
  115. package/assets/js/highcharts/es-modules/Stock/RangeSelector/RangeSelectorComposition.js +32 -74
  116. package/assets/js/highcharts/es-modules/Stock/Scrollbar/Scrollbar.js +6 -7
  117. package/assets/js/highcharts/es-modules/masters/highcharts-more.src.js +2 -0
  118. package/assets/js/highcharts/highcharts-3d.js +1 -1
  119. package/assets/js/highcharts/highcharts-3d.src.js +1 -1
  120. package/assets/js/highcharts/highcharts-gantt.js +3 -3
  121. package/assets/js/highcharts/highcharts-gantt.src.js +2008 -906
  122. package/assets/js/highcharts/highcharts-more.js +2 -2
  123. package/assets/js/highcharts/highcharts-more.src.js +234 -313
  124. package/assets/js/highcharts/highcharts.js +3 -3
  125. package/assets/js/highcharts/highcharts.src.js +743 -616
  126. package/assets/js/highcharts/highmaps.js +3 -3
  127. package/assets/js/highcharts/highmaps.src.js +862 -673
  128. package/assets/js/highcharts/highstock.js +3 -3
  129. package/assets/js/highcharts/highstock.src.js +1016 -935
  130. package/assets/js/highcharts/indicators/acceleration-bands.js +1 -1
  131. package/assets/js/highcharts/indicators/acceleration-bands.src.js +1 -1
  132. package/assets/js/highcharts/indicators/accumulation-distribution.js +1 -1
  133. package/assets/js/highcharts/indicators/accumulation-distribution.src.js +1 -1
  134. package/assets/js/highcharts/indicators/ao.js +1 -1
  135. package/assets/js/highcharts/indicators/ao.src.js +1 -1
  136. package/assets/js/highcharts/indicators/apo.js +1 -1
  137. package/assets/js/highcharts/indicators/apo.src.js +1 -1
  138. package/assets/js/highcharts/indicators/aroon-oscillator.js +1 -1
  139. package/assets/js/highcharts/indicators/aroon-oscillator.src.js +1 -1
  140. package/assets/js/highcharts/indicators/aroon.js +1 -1
  141. package/assets/js/highcharts/indicators/aroon.src.js +1 -1
  142. package/assets/js/highcharts/indicators/atr.js +1 -1
  143. package/assets/js/highcharts/indicators/atr.src.js +1 -1
  144. package/assets/js/highcharts/indicators/bollinger-bands.js +1 -1
  145. package/assets/js/highcharts/indicators/bollinger-bands.src.js +1 -1
  146. package/assets/js/highcharts/indicators/cci.js +1 -1
  147. package/assets/js/highcharts/indicators/cci.src.js +1 -1
  148. package/assets/js/highcharts/indicators/chaikin.js +1 -1
  149. package/assets/js/highcharts/indicators/chaikin.src.js +1 -1
  150. package/assets/js/highcharts/indicators/cmf.js +1 -1
  151. package/assets/js/highcharts/indicators/cmf.src.js +1 -1
  152. package/assets/js/highcharts/indicators/cmo.js +1 -1
  153. package/assets/js/highcharts/indicators/cmo.src.js +1 -1
  154. package/assets/js/highcharts/indicators/dema.js +1 -1
  155. package/assets/js/highcharts/indicators/dema.src.js +1 -1
  156. package/assets/js/highcharts/indicators/disparity-index.js +1 -1
  157. package/assets/js/highcharts/indicators/disparity-index.src.js +1 -1
  158. package/assets/js/highcharts/indicators/dmi.js +1 -1
  159. package/assets/js/highcharts/indicators/dmi.src.js +1 -1
  160. package/assets/js/highcharts/indicators/dpo.js +1 -1
  161. package/assets/js/highcharts/indicators/dpo.src.js +1 -1
  162. package/assets/js/highcharts/indicators/ichimoku-kinko-hyo.js +1 -1
  163. package/assets/js/highcharts/indicators/ichimoku-kinko-hyo.src.js +1 -1
  164. package/assets/js/highcharts/indicators/indicators-all.js +1 -1
  165. package/assets/js/highcharts/indicators/indicators-all.src.js +1 -1
  166. package/assets/js/highcharts/indicators/indicators.js +1 -1
  167. package/assets/js/highcharts/indicators/indicators.src.js +1 -1
  168. package/assets/js/highcharts/indicators/keltner-channels.js +1 -1
  169. package/assets/js/highcharts/indicators/keltner-channels.src.js +1 -1
  170. package/assets/js/highcharts/indicators/klinger.js +1 -1
  171. package/assets/js/highcharts/indicators/klinger.src.js +1 -1
  172. package/assets/js/highcharts/indicators/macd.js +1 -1
  173. package/assets/js/highcharts/indicators/macd.src.js +1 -1
  174. package/assets/js/highcharts/indicators/mfi.js +1 -1
  175. package/assets/js/highcharts/indicators/mfi.src.js +1 -1
  176. package/assets/js/highcharts/indicators/momentum.js +1 -1
  177. package/assets/js/highcharts/indicators/momentum.src.js +1 -1
  178. package/assets/js/highcharts/indicators/natr.js +1 -1
  179. package/assets/js/highcharts/indicators/natr.src.js +1 -1
  180. package/assets/js/highcharts/indicators/obv.js +1 -1
  181. package/assets/js/highcharts/indicators/obv.src.js +1 -1
  182. package/assets/js/highcharts/indicators/pivot-points.js +1 -1
  183. package/assets/js/highcharts/indicators/pivot-points.src.js +1 -1
  184. package/assets/js/highcharts/indicators/ppo.js +1 -1
  185. package/assets/js/highcharts/indicators/ppo.src.js +1 -1
  186. package/assets/js/highcharts/indicators/price-channel.js +1 -1
  187. package/assets/js/highcharts/indicators/price-channel.src.js +1 -1
  188. package/assets/js/highcharts/indicators/price-envelopes.js +1 -1
  189. package/assets/js/highcharts/indicators/price-envelopes.src.js +1 -1
  190. package/assets/js/highcharts/indicators/psar.js +1 -1
  191. package/assets/js/highcharts/indicators/psar.src.js +1 -1
  192. package/assets/js/highcharts/indicators/regressions.js +1 -1
  193. package/assets/js/highcharts/indicators/regressions.src.js +1 -1
  194. package/assets/js/highcharts/indicators/roc.js +1 -1
  195. package/assets/js/highcharts/indicators/roc.src.js +1 -1
  196. package/assets/js/highcharts/indicators/rsi.js +1 -1
  197. package/assets/js/highcharts/indicators/rsi.src.js +1 -1
  198. package/assets/js/highcharts/indicators/slow-stochastic.js +1 -1
  199. package/assets/js/highcharts/indicators/slow-stochastic.src.js +1 -1
  200. package/assets/js/highcharts/indicators/stochastic.js +1 -1
  201. package/assets/js/highcharts/indicators/stochastic.src.js +1 -1
  202. package/assets/js/highcharts/indicators/supertrend.js +1 -1
  203. package/assets/js/highcharts/indicators/supertrend.src.js +1 -1
  204. package/assets/js/highcharts/indicators/tema.js +1 -1
  205. package/assets/js/highcharts/indicators/tema.src.js +1 -1
  206. package/assets/js/highcharts/indicators/trendline.js +1 -1
  207. package/assets/js/highcharts/indicators/trendline.src.js +1 -1
  208. package/assets/js/highcharts/indicators/trix.js +1 -1
  209. package/assets/js/highcharts/indicators/trix.src.js +1 -1
  210. package/assets/js/highcharts/indicators/volume-by-price.js +1 -1
  211. package/assets/js/highcharts/indicators/volume-by-price.src.js +1 -1
  212. package/assets/js/highcharts/indicators/vwap.js +1 -1
  213. package/assets/js/highcharts/indicators/vwap.src.js +1 -1
  214. package/assets/js/highcharts/indicators/williams-r.js +1 -1
  215. package/assets/js/highcharts/indicators/williams-r.src.js +1 -1
  216. package/assets/js/highcharts/indicators/wma.js +1 -1
  217. package/assets/js/highcharts/indicators/wma.src.js +1 -1
  218. package/assets/js/highcharts/indicators/zigzag.js +1 -1
  219. package/assets/js/highcharts/indicators/zigzag.src.js +1 -1
  220. package/assets/js/highcharts/modules/accessibility.js +2 -2
  221. package/assets/js/highcharts/modules/accessibility.src.js +39 -28
  222. package/assets/js/highcharts/modules/annotations-advanced.js +2 -2
  223. package/assets/js/highcharts/modules/annotations-advanced.src.js +46 -31
  224. package/assets/js/highcharts/modules/annotations.js +2 -2
  225. package/assets/js/highcharts/modules/annotations.src.js +12 -15
  226. package/assets/js/highcharts/modules/arc-diagram.js +2 -2
  227. package/assets/js/highcharts/modules/arc-diagram.src.js +258 -233
  228. package/assets/js/highcharts/modules/arrow-symbols.js +1 -1
  229. package/assets/js/highcharts/modules/arrow-symbols.src.js +1 -1
  230. package/assets/js/highcharts/modules/boost-canvas.js +2 -2
  231. package/assets/js/highcharts/modules/boost-canvas.src.js +30 -10
  232. package/assets/js/highcharts/modules/boost.js +2 -2
  233. package/assets/js/highcharts/modules/boost.src.js +30 -10
  234. package/assets/js/highcharts/modules/broken-axis.js +1 -1
  235. package/assets/js/highcharts/modules/broken-axis.src.js +1 -1
  236. package/assets/js/highcharts/modules/bullet.js +1 -1
  237. package/assets/js/highcharts/modules/bullet.src.js +1 -1
  238. package/assets/js/highcharts/modules/coloraxis.js +2 -2
  239. package/assets/js/highcharts/modules/coloraxis.src.js +4 -4
  240. package/assets/js/highcharts/modules/current-date-indicator.js +1 -1
  241. package/assets/js/highcharts/modules/current-date-indicator.src.js +1 -1
  242. package/assets/js/highcharts/modules/cylinder.js +1 -1
  243. package/assets/js/highcharts/modules/cylinder.src.js +1 -1
  244. package/assets/js/highcharts/modules/data-tools.js +2 -2
  245. package/assets/js/highcharts/modules/data-tools.src.js +37 -19
  246. package/assets/js/highcharts/modules/data.js +1 -1
  247. package/assets/js/highcharts/modules/data.src.js +4 -4
  248. package/assets/js/highcharts/modules/datagrouping.js +2 -2
  249. package/assets/js/highcharts/modules/datagrouping.src.js +2 -1
  250. package/assets/js/highcharts/modules/debugger.js +1 -1
  251. package/assets/js/highcharts/modules/debugger.src.js +1 -1
  252. package/assets/js/highcharts/modules/dependency-wheel.js +1 -1
  253. package/assets/js/highcharts/modules/dependency-wheel.src.js +1 -1
  254. package/assets/js/highcharts/modules/dotplot.js +2 -2
  255. package/assets/js/highcharts/modules/dotplot.src.js +41 -30
  256. package/assets/js/highcharts/modules/drag-panes.js +2 -2
  257. package/assets/js/highcharts/modules/drag-panes.src.js +2 -3
  258. package/assets/js/highcharts/modules/draggable-points.js +2 -2
  259. package/assets/js/highcharts/modules/draggable-points.src.js +19 -1
  260. package/assets/js/highcharts/modules/drilldown.js +2 -2
  261. package/assets/js/highcharts/modules/drilldown.src.js +15 -15
  262. package/assets/js/highcharts/modules/dumbbell.js +2 -2
  263. package/assets/js/highcharts/modules/dumbbell.src.js +31 -40
  264. package/assets/js/highcharts/modules/export-data.js +2 -2
  265. package/assets/js/highcharts/modules/export-data.src.js +4 -1
  266. package/assets/js/highcharts/modules/exporting.js +2 -2
  267. package/assets/js/highcharts/modules/exporting.src.js +22 -25
  268. package/assets/js/highcharts/modules/flowmap.js +1 -1
  269. package/assets/js/highcharts/modules/flowmap.src.js +1 -1
  270. package/assets/js/highcharts/modules/full-screen.js +1 -1
  271. package/assets/js/highcharts/modules/full-screen.src.js +1 -1
  272. package/assets/js/highcharts/modules/funnel.js +2 -2
  273. package/assets/js/highcharts/modules/funnel.src.js +4 -4
  274. package/assets/js/highcharts/modules/funnel3d.js +1 -1
  275. package/assets/js/highcharts/modules/funnel3d.src.js +1 -1
  276. package/assets/js/highcharts/modules/gantt.js +2 -2
  277. package/assets/js/highcharts/modules/gantt.src.js +1266 -291
  278. package/assets/js/highcharts/modules/geoheatmap.js +1 -1
  279. package/assets/js/highcharts/modules/geoheatmap.src.js +4 -11
  280. package/assets/js/highcharts/modules/grid-axis.js +2 -2
  281. package/assets/js/highcharts/modules/grid-axis.src.js +2 -2
  282. package/assets/js/highcharts/modules/heatmap.js +2 -2
  283. package/assets/js/highcharts/modules/heatmap.src.js +32 -9
  284. package/assets/js/highcharts/modules/heikinashi.js +1 -1
  285. package/assets/js/highcharts/modules/heikinashi.src.js +1 -1
  286. package/assets/js/highcharts/modules/histogram-bellcurve.js +1 -1
  287. package/assets/js/highcharts/modules/histogram-bellcurve.src.js +1 -1
  288. package/assets/js/highcharts/modules/hollowcandlestick.js +1 -1
  289. package/assets/js/highcharts/modules/hollowcandlestick.src.js +1 -1
  290. package/assets/js/highcharts/modules/item-series.js +1 -1
  291. package/assets/js/highcharts/modules/item-series.src.js +1 -1
  292. package/assets/js/highcharts/modules/lollipop.js +1 -1
  293. package/assets/js/highcharts/modules/lollipop.src.js +1 -1
  294. package/assets/js/highcharts/modules/map.js +2 -2
  295. package/assets/js/highcharts/modules/map.src.js +120 -58
  296. package/assets/js/highcharts/modules/marker-clusters.js +1 -1
  297. package/assets/js/highcharts/modules/marker-clusters.src.js +1 -1
  298. package/assets/js/highcharts/modules/mouse-wheel-zoom.js +1 -1
  299. package/assets/js/highcharts/modules/mouse-wheel-zoom.src.js +1 -1
  300. package/assets/js/highcharts/modules/navigator.js +2 -2
  301. package/assets/js/highcharts/modules/navigator.src.js +28 -24
  302. package/assets/js/highcharts/modules/networkgraph.js +2 -2
  303. package/assets/js/highcharts/modules/networkgraph.src.js +3 -3
  304. package/assets/js/highcharts/modules/no-data-to-display.js +1 -1
  305. package/assets/js/highcharts/modules/no-data-to-display.src.js +1 -1
  306. package/assets/js/highcharts/modules/offline-exporting.js +2 -2
  307. package/assets/js/highcharts/modules/offline-exporting.src.js +43 -32
  308. package/assets/js/highcharts/modules/organization.js +2 -2
  309. package/assets/js/highcharts/modules/organization.src.js +19 -21
  310. package/assets/js/highcharts/modules/overlapping-datalabels.js +1 -1
  311. package/assets/js/highcharts/modules/overlapping-datalabels.src.js +1 -1
  312. package/assets/js/highcharts/modules/parallel-coordinates.js +1 -1
  313. package/assets/js/highcharts/modules/parallel-coordinates.src.js +1 -1
  314. package/assets/js/highcharts/modules/pareto.js +1 -1
  315. package/assets/js/highcharts/modules/pareto.src.js +1 -1
  316. package/assets/js/highcharts/modules/pathfinder.js +1 -1
  317. package/assets/js/highcharts/modules/pathfinder.src.js +1 -1
  318. package/assets/js/highcharts/modules/pattern-fill.js +1 -1
  319. package/assets/js/highcharts/modules/pattern-fill.src.js +1 -1
  320. package/assets/js/highcharts/modules/pictorial.js +1 -1
  321. package/assets/js/highcharts/modules/pictorial.src.js +1 -1
  322. package/assets/js/highcharts/modules/price-indicator.js +1 -1
  323. package/assets/js/highcharts/modules/price-indicator.src.js +1 -1
  324. package/assets/js/highcharts/modules/pyramid3d.js +1 -1
  325. package/assets/js/highcharts/modules/pyramid3d.src.js +1 -1
  326. package/assets/js/highcharts/modules/sankey.js +2 -2
  327. package/assets/js/highcharts/modules/sankey.src.js +7 -8
  328. package/assets/js/highcharts/modules/series-label.js +1 -1
  329. package/assets/js/highcharts/modules/series-label.src.js +1 -1
  330. package/assets/js/highcharts/modules/series-on-point.js +2 -2
  331. package/assets/js/highcharts/modules/series-on-point.src.js +3 -3
  332. package/assets/js/highcharts/modules/solid-gauge.js +1 -1
  333. package/assets/js/highcharts/modules/solid-gauge.src.js +1 -1
  334. package/assets/js/highcharts/modules/sonification.js +2 -2
  335. package/assets/js/highcharts/modules/sonification.src.js +4 -1
  336. package/assets/js/highcharts/modules/static-scale.js +1 -1
  337. package/assets/js/highcharts/modules/static-scale.src.js +1 -1
  338. package/assets/js/highcharts/modules/stock-tools.js +2 -2
  339. package/assets/js/highcharts/modules/stock-tools.src.js +3 -3
  340. package/assets/js/highcharts/modules/stock.js +2 -2
  341. package/assets/js/highcharts/modules/stock.src.js +274 -320
  342. package/assets/js/highcharts/modules/streamgraph.js +1 -1
  343. package/assets/js/highcharts/modules/streamgraph.src.js +1 -1
  344. package/assets/js/highcharts/modules/sunburst.js +2 -2
  345. package/assets/js/highcharts/modules/sunburst.src.js +39 -16
  346. package/assets/js/highcharts/modules/tiledwebmap.js +1 -1
  347. package/assets/js/highcharts/modules/tiledwebmap.src.js +1 -1
  348. package/assets/js/highcharts/modules/tilemap.js +1 -1
  349. package/assets/js/highcharts/modules/tilemap.src.js +1 -1
  350. package/assets/js/highcharts/modules/timeline.js +1 -1
  351. package/assets/js/highcharts/modules/timeline.src.js +1 -1
  352. package/assets/js/highcharts/modules/treegraph.js +2 -2
  353. package/assets/js/highcharts/modules/treegraph.src.js +21 -17
  354. package/assets/js/highcharts/modules/treegrid.js +2 -2
  355. package/assets/js/highcharts/modules/treegrid.src.js +2 -2
  356. package/assets/js/highcharts/modules/treemap.js +2 -2
  357. package/assets/js/highcharts/modules/treemap.src.js +38 -15
  358. package/assets/js/highcharts/modules/variable-pie.js +1 -1
  359. package/assets/js/highcharts/modules/variable-pie.src.js +1 -1
  360. package/assets/js/highcharts/modules/variwide.js +2 -2
  361. package/assets/js/highcharts/modules/variwide.src.js +5 -5
  362. package/assets/js/highcharts/modules/vector.js +1 -1
  363. package/assets/js/highcharts/modules/vector.src.js +1 -1
  364. package/assets/js/highcharts/modules/venn.js +1 -1
  365. package/assets/js/highcharts/modules/venn.src.js +3 -3
  366. package/assets/js/highcharts/modules/windbarb.js +1 -1
  367. package/assets/js/highcharts/modules/windbarb.src.js +1 -1
  368. package/assets/js/highcharts/modules/wordcloud.js +1 -1
  369. package/assets/js/highcharts/modules/wordcloud.src.js +1 -1
  370. package/assets/js/highcharts/modules/xrange.js +2 -2
  371. package/assets/js/highcharts/modules/xrange.src.js +5 -5
  372. package/assets/js/highcharts/standalone-navigator.js +2 -2
  373. package/assets/js/highcharts/standalone-navigator.src.js +769 -638
  374. package/assets/js/highcharts/themes/avocado.js +1 -1
  375. package/assets/js/highcharts/themes/avocado.src.js +1 -1
  376. package/assets/js/highcharts/themes/brand-dark.js +2 -2
  377. package/assets/js/highcharts/themes/brand-dark.src.js +14 -2
  378. package/assets/js/highcharts/themes/brand-light.js +1 -1
  379. package/assets/js/highcharts/themes/brand-light.src.js +1 -1
  380. package/assets/js/highcharts/themes/dark-blue.js +1 -1
  381. package/assets/js/highcharts/themes/dark-blue.src.js +1 -1
  382. package/assets/js/highcharts/themes/dark-green.js +1 -1
  383. package/assets/js/highcharts/themes/dark-green.src.js +1 -1
  384. package/assets/js/highcharts/themes/dark-unica.js +1 -1
  385. package/assets/js/highcharts/themes/dark-unica.src.js +1 -1
  386. package/assets/js/highcharts/themes/gray.js +1 -1
  387. package/assets/js/highcharts/themes/gray.src.js +1 -1
  388. package/assets/js/highcharts/themes/grid-light.js +1 -1
  389. package/assets/js/highcharts/themes/grid-light.src.js +1 -1
  390. package/assets/js/highcharts/themes/grid.js +1 -1
  391. package/assets/js/highcharts/themes/grid.src.js +1 -1
  392. package/assets/js/highcharts/themes/high-contrast-dark.js +1 -1
  393. package/assets/js/highcharts/themes/high-contrast-dark.src.js +1 -1
  394. package/assets/js/highcharts/themes/high-contrast-light.js +1 -1
  395. package/assets/js/highcharts/themes/high-contrast-light.src.js +1 -1
  396. package/assets/js/highcharts/themes/sand-signika.js +1 -1
  397. package/assets/js/highcharts/themes/sand-signika.src.js +1 -1
  398. package/assets/js/highcharts/themes/skies.js +1 -1
  399. package/assets/js/highcharts/themes/skies.src.js +1 -1
  400. package/assets/js/highcharts/themes/sunset.js +1 -1
  401. package/assets/js/highcharts/themes/sunset.src.js +1 -1
  402. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highstock JS v11.4.1 (2024-04-04)
2
+ * @license Highstock JS v11.4.3 (2024-05-22)
3
3
  *
4
4
  * (c) 2009-2024 Torstein Honsi
5
5
  *
@@ -62,7 +62,7 @@
62
62
  * Constants
63
63
  *
64
64
  * */
65
- Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '11.4.1', Globals.win = (typeof window !== 'undefined' ?
65
+ Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '11.4.3', Globals.win = (typeof window !== 'undefined' ?
66
66
  window :
67
67
  {}), // eslint-disable-line node/no-unsupported-features/es-builtins
68
68
  Globals.doc = Globals.win.document, Globals.svg = (Globals.doc &&
@@ -339,6 +339,21 @@
339
339
  function clamp(value, min, max) {
340
340
  return value > min ? value < max ? value : max : min;
341
341
  }
342
+ /**
343
+ * Utility for crisping a line position to the nearest full pixel depening on
344
+ * the line width
345
+ * @param {number} value The raw pixel position
346
+ * @param {number} lineWidth The line width
347
+ * @param {boolean} [inverted] Whether the containing group is inverted.
348
+ * Crisping round numbers on the y-scale need to go
349
+ * to the other side because the coordinate system
350
+ * is flipped (scaleY is -1)
351
+ * @return {number} The pixel position to use for a crisp display
352
+ */
353
+ const crisp = (value, lineWidth = 0, inverted) => {
354
+ const mod = lineWidth % 2 / 2, inverter = inverted ? -1 : 1;
355
+ return (Math.round(value * inverter - mod) + mod) * inverter;
356
+ };
342
357
  // eslint-disable-next-line valid-jsdoc
343
358
  /**
344
359
  * Return the deep difference between two objects. It can either return the new
@@ -1904,6 +1919,7 @@
1904
1919
  clearTimeout: internalClearTimeout,
1905
1920
  correctFloat,
1906
1921
  createElement,
1922
+ crisp,
1907
1923
  css,
1908
1924
  defined,
1909
1925
  destroyObjectProperties,
@@ -2692,7 +2708,7 @@
2692
2708
  *
2693
2709
  * @type {number}
2694
2710
  * @default 2
2695
- * @since @next
2711
+ * @since 11.3.0
2696
2712
  * @apioption chart.axisLayoutRuns
2697
2713
  */
2698
2714
  /**
@@ -3434,13 +3450,15 @@
3434
3450
  * element's height is 0.
3435
3451
  *
3436
3452
  * @sample {highcharts} highcharts/chart/height/
3437
- * 500px height
3453
+ * Forced 200px height
3438
3454
  * @sample {highstock} stock/chart/height/
3439
3455
  * 300px height
3440
3456
  * @sample {highmaps} maps/chart/size/
3441
3457
  * Chart with explicit size
3442
3458
  * @sample highcharts/chart/height-percent/
3443
3459
  * Highcharts with percentage height
3460
+ * @sample highcharts/chart/height-inherited/
3461
+ * Chart with inherited height
3444
3462
  *
3445
3463
  * @type {null|number|string}
3446
3464
  */
@@ -4339,8 +4357,8 @@
4339
4357
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
4340
4358
  *
4341
4359
  * */
4342
- const { isTouchDevice, svg } = H;
4343
- const { merge } = U;
4360
+ const { isTouchDevice } = H;
4361
+ const { fireEvent, merge } = U;
4344
4362
  /* *
4345
4363
  *
4346
4364
  * API Options
@@ -4571,84 +4589,163 @@
4571
4589
  * ```js
4572
4590
  * Highcharts.setOptions({
4573
4591
  * global: {
4574
- * useUTC: false
4592
+ * buttonTheme: {
4593
+ * fill: '#d0d0d0'
4594
+ * }
4575
4595
  * }
4576
4596
  * });
4577
4597
  * ```
4578
4598
  */
4579
- /**
4580
- * _Canvg rendering for Android 2.x is removed as of Highcharts 5.0\.
4581
- * Use the [libURL](#exporting.libURL) option to configure exporting._
4582
- *
4583
- * The URL to the additional file to lazy load for Android 2.x devices.
4584
- * These devices don't support SVG, so we download a helper file that
4585
- * contains [canvg](https://github.com/canvg/canvg), its dependency
4586
- * rbcolor, and our own CanVG Renderer class. To avoid hotlinking to
4587
- * our site, you can install canvas-tools.js on your own server and
4588
- * change this option accordingly.
4589
- *
4590
- * @deprecated
4591
- *
4592
- * @type {string}
4593
- * @default https://code.highcharts.com/{version}/modules/canvas-tools.js
4594
- * @product highcharts highmaps
4595
- * @apioption global.canvasToolsURL
4596
- */
4597
- /**
4598
- * This option is deprecated since v6.0.5. Instead, use
4599
- * [time.useUTC](#time.useUTC) that supports individual time settings
4600
- * per chart.
4601
- *
4602
- * @deprecated
4603
- *
4604
- * @type {boolean}
4605
- * @apioption global.useUTC
4606
- */
4607
- /**
4608
- * This option is deprecated since v6.0.5. Instead, use
4609
- * [time.Date](#time.Date) that supports individual time settings
4610
- * per chart.
4611
- *
4612
- * @deprecated
4613
- *
4614
- * @type {Function}
4615
- * @product highcharts highstock
4616
- * @apioption global.Date
4617
- */
4618
- /**
4619
- * This option is deprecated since v6.0.5. Instead, use
4620
- * [time.getTimezoneOffset](#time.getTimezoneOffset) that supports
4621
- * individual time settings per chart.
4622
- *
4623
- * @deprecated
4624
- *
4625
- * @type {Function}
4626
- * @product highcharts highstock
4627
- * @apioption global.getTimezoneOffset
4628
- */
4629
- /**
4630
- * This option is deprecated since v6.0.5. Instead, use
4631
- * [time.timezone](#time.timezone) that supports individual time
4632
- * settings per chart.
4633
- *
4634
- * @deprecated
4635
- *
4636
- * @type {string}
4637
- * @product highcharts highstock
4638
- * @apioption global.timezone
4639
- */
4640
- /**
4641
- * This option is deprecated since v6.0.5. Instead, use
4642
- * [time.timezoneOffset](#time.timezoneOffset) that supports individual
4643
- * time settings per chart.
4644
- *
4645
- * @deprecated
4646
- *
4647
- * @type {number}
4648
- * @product highcharts highstock
4649
- * @apioption global.timezoneOffset
4650
- */
4651
- global: {},
4599
+ global: {
4600
+ /**
4601
+ * _Canvg rendering for Android 2.x is removed as of Highcharts 5.0\.
4602
+ * Use the [libURL](#exporting.libURL) option to configure exporting._
4603
+ *
4604
+ * The URL to the additional file to lazy load for Android 2.x devices.
4605
+ * These devices don't support SVG, so we download a helper file that
4606
+ * contains [canvg](https://github.com/canvg/canvg), its dependency
4607
+ * rbcolor, and our own CanVG Renderer class. To avoid hotlinking to
4608
+ * our site, you can install canvas-tools.js on your own server and
4609
+ * change this option accordingly.
4610
+ *
4611
+ * @deprecated
4612
+ *
4613
+ * @type {string}
4614
+ * @default https://code.highcharts.com/{version}/modules/canvas-tools.js
4615
+ * @product highcharts highmaps
4616
+ * @apioption global.canvasToolsURL
4617
+ */
4618
+ /**
4619
+ * This option is deprecated since v6.0.5. Instead, use
4620
+ * [time.useUTC](#time.useUTC) that supports individual time settings
4621
+ * per chart.
4622
+ *
4623
+ * @deprecated
4624
+ *
4625
+ * @type {boolean}
4626
+ * @apioption global.useUTC
4627
+ */
4628
+ /**
4629
+ * This option is deprecated since v6.0.5. Instead, use
4630
+ * [time.Date](#time.Date) that supports individual time settings
4631
+ * per chart.
4632
+ *
4633
+ * @deprecated
4634
+ *
4635
+ * @type {Function}
4636
+ * @product highcharts highstock
4637
+ * @apioption global.Date
4638
+ */
4639
+ /**
4640
+ * This option is deprecated since v6.0.5. Instead, use
4641
+ * [time.getTimezoneOffset](#time.getTimezoneOffset) that supports
4642
+ * individual time settings per chart.
4643
+ *
4644
+ * @deprecated
4645
+ *
4646
+ * @type {Function}
4647
+ * @product highcharts highstock
4648
+ * @apioption global.getTimezoneOffset
4649
+ */
4650
+ /**
4651
+ * This option is deprecated since v6.0.5. Instead, use
4652
+ * [time.timezone](#time.timezone) that supports individual time
4653
+ * settings per chart.
4654
+ *
4655
+ * @deprecated
4656
+ *
4657
+ * @type {string}
4658
+ * @product highcharts highstock
4659
+ * @apioption global.timezone
4660
+ */
4661
+ /**
4662
+ * This option is deprecated since v6.0.5. Instead, use
4663
+ * [time.timezoneOffset](#time.timezoneOffset) that supports individual
4664
+ * time settings per chart.
4665
+ *
4666
+ * @deprecated
4667
+ *
4668
+ * @type {number}
4669
+ * @product highcharts highstock
4670
+ * @apioption global.timezoneOffset
4671
+ */
4672
+ /**
4673
+ * General theme for buttons. This applies to the zoom button, exporting
4674
+ * context menu, map navigation, range selector buttons and custom
4675
+ * buttons generated using the `SVGRenderer.button` function. However,
4676
+ * each of these may be overridden with more specific options.
4677
+ *
4678
+ * @sample highcharts/global/buttontheme
4679
+ * General button theme
4680
+ * @since 11.4.2
4681
+ */
4682
+ buttonTheme: {
4683
+ /**
4684
+ * The fill color for buttons
4685
+ */
4686
+ fill: "#f7f7f7" /* Palette.neutralColor3 */,
4687
+ /**
4688
+ * The padding of buttons
4689
+ */
4690
+ padding: 8,
4691
+ /**
4692
+ * The border radius for buttons
4693
+ */
4694
+ r: 2,
4695
+ /**
4696
+ * The stroke color for buttons
4697
+ */
4698
+ stroke: "#cccccc" /* Palette.neutralColor20 */,
4699
+ /**
4700
+ * The stroke width for buttons
4701
+ */
4702
+ 'stroke-width': 1,
4703
+ /**
4704
+ * CSS styling for the buttons' text
4705
+ */
4706
+ style: {
4707
+ color: "#333333" /* Palette.neutralColor80 */,
4708
+ cursor: 'pointer',
4709
+ fontSize: '0.8em',
4710
+ fontWeight: 'normal'
4711
+ },
4712
+ /**
4713
+ * State overrides for the buttons
4714
+ */
4715
+ states: {
4716
+ /**
4717
+ * Hover state overrides for the buttons are applied in addition
4718
+ * to the normal state options
4719
+ */
4720
+ hover: {
4721
+ fill: "#e6e6e6" /* Palette.neutralColor10 */
4722
+ },
4723
+ /**
4724
+ * Select state overrides for the buttons are applied in
4725
+ * addition to the normal state options
4726
+ */
4727
+ select: {
4728
+ fill: "#e6e9ff" /* Palette.highlightColor10 */,
4729
+ style: {
4730
+ color: "#000000" /* Palette.neutralColor100 */,
4731
+ fontWeight: 'bold'
4732
+ }
4733
+ },
4734
+ /**
4735
+ * Disabled state overrides for the buttons are applied in
4736
+ * addition to the normal state options
4737
+ */
4738
+ disabled: {
4739
+ /**
4740
+ * Disabled state CSS style overrides for the buttons' text
4741
+ */
4742
+ style: {
4743
+ color: "#cccccc" /* Palette.neutralColor20 */
4744
+ }
4745
+ }
4746
+ }
4747
+ }
4748
+ },
4652
4749
  /**
4653
4750
  * Time options that can apply globally or to individual charts. These
4654
4751
  * settings affect how `datetime` axes are laid out, how tooltips are
@@ -4718,13 +4815,16 @@
4718
4815
  * for drawing time based charts in specific time zones using their
4719
4816
  * local DST crossover dates, with the help of external libraries.
4720
4817
  *
4721
- * @see [global.timezoneOffset](#global.timezoneOffset)
4818
+ * This option is deprecated as of v11.4.1 and will be removed in a
4819
+ * future release. Use the [time.timezone](#time.timezone) option
4820
+ * instead.
4722
4821
  *
4723
4822
  * @sample {highcharts|highstock} highcharts/time/gettimezoneoffset/
4724
4823
  * Use moment.js to draw Oslo time regardless of browser locale
4725
4824
  *
4726
4825
  * @type {Highcharts.TimezoneOffsetCallbackFunction}
4727
4826
  * @since 4.1.0
4827
+ * @deprecated 11.4.2
4728
4828
  * @product highcharts highstock gantt
4729
4829
  */
4730
4830
  getTimezoneOffset: void 0,
@@ -4734,12 +4834,10 @@
4734
4834
  * docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezone).
4735
4835
  * If the given time zone is not recognized by the browser, Highcharts
4736
4836
  * provides a warning and falls back to returning a 0 offset,
4737
- * corresponding to the UCT time zone.
4837
+ * corresponding to the UTC time zone.
4738
4838
  *
4739
4839
  * Until v11.2.0, this option depended on moment.js.
4740
4840
  *
4741
- * @see [getTimezoneOffset](#time.getTimezoneOffset)
4742
- *
4743
4841
  * @sample {highcharts|highstock} highcharts/time/timezone/ Europe/Oslo
4744
4842
  *
4745
4843
  * @type {string}
@@ -4753,12 +4851,17 @@
4753
4851
  * [getTimezoneOffset](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset)
4754
4852
  * method. Use this to display UTC based data in a predefined time zone.
4755
4853
  *
4854
+ * This option is deprecated as of v11.4.1 and will be removed in a
4855
+ * future release. Use the [time.timezone](#time.timezone) option
4856
+ * instead.
4857
+ *
4756
4858
  * @see [time.getTimezoneOffset](#time.getTimezoneOffset)
4757
4859
  *
4758
4860
  * @sample {highcharts|highstock} highcharts/time/timezoneoffset/
4759
4861
  * Timezone offset
4760
4862
  *
4761
4863
  * @since 3.0.8
4864
+ * @deprecated 11.4.2
4762
4865
  * @product highcharts highstock gantt
4763
4866
  */
4764
4867
  timezoneOffset: 0,
@@ -5644,7 +5747,7 @@
5644
5747
  * Item text styles
5645
5748
  *
5646
5749
  * @type {Highcharts.CSSObject}
5647
- * @default {"color": "#333333", "cursor": "pointer", "fontSize": "0.75em", "fontWeight": "bold", "textOverflow": "ellipsis"}
5750
+ * @default {"color": "#333333", "cursor": "pointer", "fontSize": "0.8em", "fontWeight": "bold", "textOverflow": "ellipsis"}
5648
5751
  */
5649
5752
  itemStyle: {
5650
5753
  /**
@@ -5956,7 +6059,7 @@
5956
6059
  * `.highcharts-legend-title` class.
5957
6060
  *
5958
6061
  * @type {Highcharts.CSSObject}
5959
- * @default {"fontSize": "0.75em", "fontWeight": "bold"}
6062
+ * @default {"fontSize": "0.8em", "fontWeight": "bold"}
5960
6063
  * @since 3.0
5961
6064
  */
5962
6065
  style: {
@@ -6163,20 +6266,20 @@
6163
6266
  */
6164
6267
  /**
6165
6268
  * A [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)
6166
- * for the whole tooltip. When format strings are a requirement, it is
6167
- * usually more convenient to use `headerFormat`, `pointFormat` and
6168
- * `footerFormat`, but the `format` option allows combining them into
6169
- * one setting.
6269
+ * for the whole shared tooltip. When format strings are a requirement,
6270
+ * it is usually more convenient to use `headerFormat`, `pointFormat`
6271
+ * and `footerFormat`, but the `format` option allows combining them
6272
+ * into one setting.
6170
6273
  *
6171
6274
  * The context of the format string is the same as that of the
6172
- * `formatter` callback.
6275
+ * `tooltip.formatter` callback.
6173
6276
  *
6174
6277
  * @sample {highcharts} highcharts/tooltip/format-shared/
6175
6278
  * Format for shared tooltip
6176
6279
  *
6177
6280
  * @type {string}
6178
6281
  * @default undefined
6179
- * @since 11.1.0
6282
+ * @since 11.1.0
6180
6283
  * @apioption tooltip.format
6181
6284
  */
6182
6285
  /**
@@ -6449,11 +6552,14 @@
6449
6552
  /**
6450
6553
  * Enable or disable animation of the tooltip.
6451
6554
  *
6452
- * @type {boolean}
6453
- * @default true
6555
+ * @type {boolean|Partial<Highcharts.AnimationOptionsObject>}
6454
6556
  * @since 2.3.0
6455
6557
  */
6456
- animation: svg,
6558
+ animation: {
6559
+ duration: 300,
6560
+ // EaseOutCirc
6561
+ easing: (x) => Math.sqrt(1 - Math.pow(x - 1, 2))
6562
+ },
6457
6563
  /**
6458
6564
  * The radius of the rounded border corners.
6459
6565
  *
@@ -6908,6 +7014,7 @@
6908
7014
  * Updated options.
6909
7015
  */
6910
7016
  function setOptions(options) {
7017
+ fireEvent(H, 'setOptions', { options });
6911
7018
  // Copy in the default options
6912
7019
  merge(true, defaultOptions, options);
6913
7020
  // Update the time object
@@ -8857,7 +8964,7 @@
8857
8964
  // Block helpers may return true or false. They may also return a
8858
8965
  // string, like the `each` helper.
8859
8966
  if (match.isBlock && typeof replacement === 'boolean') {
8860
- replacement = format(replacement ? body : elseBody, ctx);
8967
+ replacement = format(replacement ? body : elseBody, ctx, chart);
8861
8968
  }
8862
8969
  // Simple variable replacement
8863
8970
  }
@@ -8974,6 +9081,9 @@
8974
9081
  // Get the decimal component
8975
9082
  ret += decimalPoint + roundedNumber.slice(-decimals);
8976
9083
  }
9084
+ else if (+ret === 0) { // Remove signed minus #20564
9085
+ ret = '0';
9086
+ }
8977
9087
  if (exponent[1] && +ret !== 0) {
8978
9088
  ret += 'e' + exponent[1];
8979
9089
  }
@@ -9255,7 +9365,7 @@
9255
9365
  * */
9256
9366
  const { animate, animObject, stop } = A;
9257
9367
  const { deg2rad, doc, svg, SVG_NS, win } = H;
9258
- const { addEvent, attr, createElement, css, defined, erase, extend, fireEvent, isArray, isFunction, isObject, isString, merge, objectEach, pick, pInt, replaceNested, syncTimeout, uniqueKey } = U;
9368
+ const { addEvent, attr, createElement, crisp, css, defined, erase, extend, fireEvent, isArray, isFunction, isObject, isString, merge, objectEach, pick, pInt, pushUnique, replaceNested, syncTimeout, uniqueKey } = U;
9259
9369
  /* *
9260
9370
  *
9261
9371
  * Class
@@ -9441,7 +9551,7 @@
9441
9551
  * @param {boolean} [alignByTranslate]
9442
9552
  * Align element by translation.
9443
9553
  *
9444
- * @param {string|Highcharts.BBoxObject} [box]
9554
+ * @param {string|Highcharts.BBoxObject} [alignTo]
9445
9555
  * The box to align to, needs a width and height. When the box is a
9446
9556
  * string, it refers to an object in the Renderer. For example, when
9447
9557
  * box is `spacingBox`, it refers to `Renderer.spacingBox` which
@@ -9453,34 +9563,39 @@
9453
9563
  *
9454
9564
  * @return {Highcharts.SVGElement} Returns the SVGElement for chaining.
9455
9565
  */
9456
- align(alignOptions, alignByTranslate, box, redraw = true) {
9457
- const attribs = {}, renderer = this.renderer, alignedObjects = renderer.alignedObjects;
9458
- let x, y, alignTo, alignFactor, vAlignFactor;
9566
+ align(alignOptions, alignByTranslate, alignTo, redraw = true) {
9567
+ const attribs = {}, renderer = this.renderer, alignedObjects = renderer.alignedObjects, initialAlignment = Boolean(alignOptions);
9568
+ let x, y, alignFactor, vAlignFactor;
9459
9569
  // First call on instanciate
9460
9570
  if (alignOptions) {
9461
9571
  this.alignOptions = alignOptions;
9462
9572
  this.alignByTranslate = alignByTranslate;
9463
- if (!box || isString(box)) {
9464
- this.alignTo = alignTo = box || 'renderer';
9465
- // Prevent duplicates, like legendGroup after resize
9466
- erase(alignedObjects, this);
9467
- alignedObjects.push(this);
9468
- box = void 0; // Reassign it below
9469
- }
9573
+ this.alignTo = alignTo;
9470
9574
  // When called on resize, no arguments are supplied
9471
9575
  }
9472
9576
  else {
9473
- alignOptions = this.alignOptions;
9577
+ alignOptions = this.alignOptions || {};
9474
9578
  alignByTranslate = this.alignByTranslate;
9475
9579
  alignTo = this.alignTo;
9476
9580
  }
9477
- box = pick(box, renderer[alignTo], renderer);
9581
+ const alignToKey = !alignTo || isString(alignTo) ?
9582
+ alignTo || 'renderer' :
9583
+ void 0;
9584
+ // When aligned to a key, automatically re-align on redraws
9585
+ if (alignToKey) {
9586
+ // Prevent duplicates, like legendGroup after resize
9587
+ if (initialAlignment) {
9588
+ pushUnique(alignedObjects, this);
9589
+ }
9590
+ alignTo = void 0; // Do not use the box
9591
+ }
9592
+ const alignToBox = pick(alignTo, renderer[alignToKey], renderer);
9478
9593
  // Assign variables
9479
9594
  const align = alignOptions.align, vAlign = alignOptions.verticalAlign;
9480
9595
  // Default: left align
9481
- x = (box.x || 0) + (alignOptions.x || 0);
9596
+ x = (alignToBox.x || 0) + (alignOptions.x || 0);
9482
9597
  // Default: top align
9483
- y = (box.y || 0) + (alignOptions.y || 0);
9598
+ y = (alignToBox.y || 0) + (alignOptions.y || 0);
9484
9599
  // Align
9485
9600
  if (align === 'right') {
9486
9601
  alignFactor = 1;
@@ -9489,7 +9604,7 @@
9489
9604
  alignFactor = 2;
9490
9605
  }
9491
9606
  if (alignFactor) {
9492
- x += (box.width - (alignOptions.width || 0)) /
9607
+ x += ((alignToBox.width || 0) - (alignOptions.width || 0)) /
9493
9608
  alignFactor;
9494
9609
  }
9495
9610
  attribs[alignByTranslate ? 'translateX' : 'x'] = Math.round(x);
@@ -9501,7 +9616,7 @@
9501
9616
  vAlignFactor = 2;
9502
9617
  }
9503
9618
  if (vAlignFactor) {
9504
- y += (box.height - (alignOptions.height || 0)) /
9619
+ y += ((alignToBox.height || 0) - (alignOptions.height || 0)) /
9505
9620
  vAlignFactor;
9506
9621
  }
9507
9622
  attribs[alignByTranslate ? 'translateY' : 'y'] = Math.round(y);
@@ -9721,7 +9836,7 @@
9721
9836
  * used as a getter, the current value of the attribute is returned.
9722
9837
  */
9723
9838
  attr(hash, val, complete, continueAnimation) {
9724
- const element = this.element, symbolCustomAttribs = SVGElement.symbolCustomAttribs;
9839
+ const { element } = this, symbolCustomAttribs = SVGElement.symbolCustomAttribs;
9725
9840
  let key, hasSetSymbolSize, ret = this, skipAttr, setter;
9726
9841
  // Single key-value pair
9727
9842
  if (typeof hash === 'string' && typeof val !== 'undefined') {
@@ -9811,15 +9926,17 @@
9811
9926
  * The modified rectangle arguments.
9812
9927
  */
9813
9928
  crisp(rect, strokeWidth) {
9814
- const wrapper = this;
9815
- strokeWidth = strokeWidth || rect.strokeWidth || 0;
9816
9929
  // Math.round because strokeWidth can sometimes have roundoff errors
9817
- const normalizer = Math.round(strokeWidth) % 2 / 2;
9818
- // Normalize for crisp edges
9819
- rect.x = Math.floor(rect.x || wrapper.x || 0) + normalizer;
9820
- rect.y = Math.floor(rect.y || wrapper.y || 0) + normalizer;
9821
- rect.width = Math.floor((rect.width || wrapper.width || 0) - 2 * normalizer);
9822
- rect.height = Math.floor((rect.height || wrapper.height || 0) - 2 * normalizer);
9930
+ strokeWidth = Math.round(strokeWidth || rect.strokeWidth || 0);
9931
+ const x1 = rect.x || this.x || 0, y1 = rect.y || this.y || 0, x2 = (rect.width || this.width || 0) + x1, y2 = (rect.height || this.height || 0) + y1,
9932
+ // Find all the rounded coordinates for corners
9933
+ x = crisp(x1, strokeWidth), y = crisp(y1, strokeWidth), x2Crisp = crisp(x2, strokeWidth), y2Crisp = crisp(y2, strokeWidth);
9934
+ extend(rect, {
9935
+ x,
9936
+ y,
9937
+ width: x2Crisp - x,
9938
+ height: y2Crisp - y
9939
+ });
9823
9940
  if (defined(rect.strokeWidth)) {
9824
9941
  rect.strokeWidth = strokeWidth;
9825
9942
  }
@@ -10094,7 +10211,7 @@
10094
10211
  parentToClean = grandParent;
10095
10212
  }
10096
10213
  // Remove from alignObjects
10097
- if (wrapper.alignTo) {
10214
+ if (wrapper.alignOptions) {
10098
10215
  erase(renderer.alignedObjects, wrapper);
10099
10216
  }
10100
10217
  objectEach(wrapper, function (val, key) {
@@ -10469,6 +10586,20 @@
10469
10586
  this.opacity = opacity;
10470
10587
  element.setAttribute(key, opacity);
10471
10588
  }
10589
+ /**
10590
+ * Re-align an aligned text or label after setting the text.
10591
+ *
10592
+ * @private
10593
+ * @function Highcharts.SVGElement#reAlign
10594
+ *
10595
+ */
10596
+ reAlign() {
10597
+ if (this.alignOptions?.width && this.alignOptions.align !== 'left') {
10598
+ this.alignOptions.width = this.getBBox().width;
10599
+ this.placed = false; // Block animation
10600
+ this.align();
10601
+ }
10602
+ }
10472
10603
  /**
10473
10604
  * Remove a class name from the element.
10474
10605
  *
@@ -10768,6 +10899,7 @@
10768
10899
  if (this.added) {
10769
10900
  this.renderer.buildText(this);
10770
10901
  }
10902
+ this.reAlign();
10771
10903
  }
10772
10904
  }
10773
10905
  /**
@@ -11360,9 +11492,11 @@
11360
11492
  return bBox;
11361
11493
  }
11362
11494
  getCrispAdjust() {
11363
- return this.renderer.styledMode && this.box ?
11364
- this.box.strokeWidth() % 2 / 2 :
11365
- (this['stroke-width'] ? parseInt(this['stroke-width'], 10) : 0) % 2 / 2;
11495
+ return (this.renderer.styledMode && this.box ?
11496
+ this.box.strokeWidth() :
11497
+ (this['stroke-width'] ?
11498
+ parseInt(this['stroke-width'], 10) :
11499
+ 0)) % 2 / 2;
11366
11500
  }
11367
11501
  heightSetter(value) {
11368
11502
  this.heightSetting = value;
@@ -11420,6 +11554,7 @@
11420
11554
  this.text.attr({ text });
11421
11555
  }
11422
11556
  this.updateTextPadding();
11557
+ this.reAlign();
11423
11558
  }
11424
11559
  /*
11425
11560
  * This function runs after the label is added to the DOM (when the bounding
@@ -11591,11 +11726,15 @@
11591
11726
  function arc(cx, cy, w, h, options) {
11592
11727
  const arc = [];
11593
11728
  if (options) {
11594
- const start = options.start || 0, rx = pick(options.r, w), ry = pick(options.r, h || w), proximity = 0.001, fullCircle = (Math.abs((options.end || 0) - start - 2 * Math.PI) <
11595
- proximity),
11596
- // Subtract a small number to prevent cos and sin of start
11597
- // and end from becoming equal on 360 arcs (related: #1561)
11598
- end = (options.end || 0) - proximity, innerRadius = options.innerR, open = pick(options.open, fullCircle), cosStart = Math.cos(start), sinStart = Math.sin(start), cosEnd = Math.cos(end), sinEnd = Math.sin(end),
11729
+ const start = options.start || 0, rx = pick(options.r, w), ry = pick(options.r, h || w),
11730
+ // Subtract a small number to prevent cos and sin of start and end
11731
+ // from becoming equal on 360 arcs (#1561). The size of the circle
11732
+ // affects the constant, therefore the division by `rx`. If the
11733
+ // proximity is too small, the arc disappears. If it is too great, a
11734
+ // gap appears. This can be seen in the animation of the official
11735
+ // bubble demo (#20586).
11736
+ proximity = 0.0002 / Math.max(rx, 1), fullCircle = (Math.abs((options.end || 0) - start - 2 * Math.PI) <
11737
+ proximity), end = (options.end || 0) - proximity, innerRadius = options.innerR, open = pick(options.open, fullCircle), cosStart = Math.cos(start), sinStart = Math.sin(start), cosEnd = Math.cos(end), sinEnd = Math.sin(end),
11599
11738
  // Proximity takes care of rounding errors around PI (#6971)
11600
11739
  longArc = pick(options.longArc, end - start - Math.PI < proximity ? 0 : 1);
11601
11740
  let arcSegment = [
@@ -12243,7 +12382,7 @@
12243
12382
 
12244
12383
  return TextBuilder;
12245
12384
  });
12246
- _registerModule(_modules, 'Core/Renderer/SVG/SVGRenderer.js', [_modules['Core/Renderer/HTML/AST.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Renderer/SVG/SVGLabel.js'], _modules['Core/Renderer/SVG/Symbols.js'], _modules['Core/Renderer/SVG/TextBuilder.js'], _modules['Core/Utilities.js']], function (AST, Color, H, RendererRegistry, SVGElement, SVGLabel, Symbols, TextBuilder, U) {
12385
+ _registerModule(_modules, 'Core/Renderer/SVG/SVGRenderer.js', [_modules['Core/Renderer/HTML/AST.js'], _modules['Core/Defaults.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Renderer/SVG/SVGLabel.js'], _modules['Core/Renderer/SVG/Symbols.js'], _modules['Core/Renderer/SVG/TextBuilder.js'], _modules['Core/Utilities.js']], function (AST, D, Color, H, RendererRegistry, SVGElement, SVGLabel, Symbols, TextBuilder, U) {
12247
12386
  /* *
12248
12387
  *
12249
12388
  * (c) 2010-2024 Torstein Honsi
@@ -12253,8 +12392,9 @@
12253
12392
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
12254
12393
  *
12255
12394
  * */
12395
+ const { defaultOptions } = D;
12256
12396
  const { charts, deg2rad, doc, isFirefox, isMS, isWebKit, noop, SVG_NS, symbolSizes, win } = H;
12257
- const { addEvent, attr, createElement, css, defined, destroyObjectProperties, extend, isArray, isNumber, isObject, isString, merge, pick, pInt, replaceNested, uniqueKey } = U;
12397
+ const { addEvent, attr, createElement, crisp, css, defined, destroyObjectProperties, extend, isArray, isNumber, isObject, isString, merge, pick, pInt, replaceNested, uniqueKey } = U;
12258
12398
  /* *
12259
12399
  *
12260
12400
  * Variables
@@ -12403,7 +12543,7 @@
12403
12543
  this.url = this.getReferenceURL();
12404
12544
  // Add description
12405
12545
  const desc = this.createElement('desc').add();
12406
- desc.element.appendChild(doc.createTextNode('Created with Highcharts 11.4.1'));
12546
+ desc.element.appendChild(doc.createTextNode('Created with Highcharts 11.4.3'));
12407
12547
  this.defs = this.createElement('defs').add();
12408
12548
  this.allowHTML = allowHTML;
12409
12549
  this.forExport = forExport;
@@ -12736,7 +12876,9 @@
12736
12876
  return 1.05 / (l + 0.05) > (l + 0.05) / 0.05 ? '#FFFFFF' : '#000000';
12737
12877
  }
12738
12878
  /**
12739
- * Create a button with preset states.
12879
+ * Create a button with preset states. Styles for the button can either be
12880
+ * set as arguments, or a general theme for all buttons can be set by the
12881
+ * `global.buttonTheme` option.
12740
12882
  *
12741
12883
  * @function Highcharts.SVGRenderer#button
12742
12884
  *
@@ -12774,56 +12916,31 @@
12774
12916
  * The button element.
12775
12917
  */
12776
12918
  button(text, x, y, callback, theme = {}, hoverState, selectState, disabledState, shape, useHTML) {
12777
- const label = this.label(text, x, y, shape, void 0, void 0, useHTML, void 0, 'button'), styledMode = this.styledMode, states = theme.states || {};
12919
+ const label = this.label(text, x, y, shape, void 0, void 0, useHTML, void 0, 'button'), styledMode = this.styledMode, args = arguments;
12778
12920
  let curState = 0;
12779
- theme = merge(theme);
12921
+ theme = merge(defaultOptions.global.buttonTheme, theme);
12922
+ // @todo Consider moving this to a lower level, like .attr
12923
+ if (styledMode) {
12924
+ delete theme.fill;
12925
+ delete theme.stroke;
12926
+ delete theme['stroke-width'];
12927
+ }
12928
+ const states = theme.states || {}, normalStyle = theme.style || {};
12780
12929
  delete theme.states;
12781
- const normalStyle = merge({
12782
- color: "#333333" /* Palette.neutralColor80 */,
12783
- cursor: 'pointer',
12784
- fontSize: '0.8em',
12785
- fontWeight: 'normal'
12786
- }, theme.style);
12787
12930
  delete theme.style;
12788
- // Remove stylable attributes. Pass in the ButtonThemeObject and get the
12789
- // SVGAttributes subset back.
12790
- let normalState = AST.filterUserAttributes(theme);
12791
- // Default, non-stylable attributes
12792
- label.attr(merge({ padding: 8, r: 2 }, normalState));
12793
- // Presentational. The string type is a mistake, it is just for
12794
- // compliance with SVGAttribute and is not used in button theme.
12795
- let hoverStyle, selectStyle, disabledStyle;
12931
+ // Presentational
12932
+ const stateAttribs = [
12933
+ AST.filterUserAttributes(theme)
12934
+ ],
12935
+ // The string type is a mistake, it is just for compliance with
12936
+ // SVGAttribute and is not used in button theme.
12937
+ stateStyles = [normalStyle];
12796
12938
  if (!styledMode) {
12797
- // Normal state - prepare the attributes
12798
- normalState = merge({
12799
- fill: "#f7f7f7" /* Palette.neutralColor3 */,
12800
- stroke: "#cccccc" /* Palette.neutralColor20 */,
12801
- 'stroke-width': 1
12802
- }, normalState);
12803
- // Hover state
12804
- hoverState = merge(normalState, {
12805
- fill: "#e6e6e6" /* Palette.neutralColor10 */
12806
- }, AST.filterUserAttributes(hoverState || states.hover || {}));
12807
- hoverStyle = hoverState.style;
12808
- delete hoverState.style;
12809
- // Pressed state
12810
- selectState = merge(normalState, {
12811
- fill: "#e6e9ff" /* Palette.highlightColor10 */,
12812
- style: {
12813
- color: "#000000" /* Palette.neutralColor100 */,
12814
- fontWeight: 'bold'
12815
- }
12816
- }, AST.filterUserAttributes(selectState || states.select || {}));
12817
- selectStyle = selectState.style;
12818
- delete selectState.style;
12819
- // Disabled state
12820
- disabledState = merge(normalState, {
12821
- style: {
12822
- color: "#cccccc" /* Palette.neutralColor20 */
12823
- }
12824
- }, AST.filterUserAttributes(disabledState || states.disabled || {}));
12825
- disabledStyle = disabledState.style;
12826
- delete disabledState.style;
12939
+ ['hover', 'select', 'disabled'].forEach((stateName, i) => {
12940
+ stateAttribs.push(merge(stateAttribs[0], AST.filterUserAttributes(args[i + 5] || states[stateName] || {})));
12941
+ stateStyles.push(stateAttribs[i + 1].style);
12942
+ delete stateAttribs[i + 1].style;
12943
+ });
12827
12944
  }
12828
12945
  // Add the events. IE9 and IE10 need mouseover and mouseout to function
12829
12946
  // (#667).
@@ -12837,7 +12954,7 @@
12837
12954
  label.setState(curState);
12838
12955
  }
12839
12956
  });
12840
- label.setState = function (state) {
12957
+ label.setState = (state = 0) => {
12841
12958
  // Hover state is temporary, don't record it
12842
12959
  if (state !== 1) {
12843
12960
  label.state = curState = state;
@@ -12846,31 +12963,19 @@
12846
12963
  label
12847
12964
  .removeClass(/highcharts-button-(normal|hover|pressed|disabled)/)
12848
12965
  .addClass('highcharts-button-' +
12849
- ['normal', 'hover', 'pressed', 'disabled'][state || 0]);
12966
+ ['normal', 'hover', 'pressed', 'disabled'][state]);
12850
12967
  if (!styledMode) {
12851
- label
12852
- .attr([
12853
- normalState,
12854
- hoverState,
12855
- selectState,
12856
- disabledState
12857
- ][state || 0]);
12858
- const css = [
12859
- normalStyle,
12860
- hoverStyle,
12861
- selectStyle,
12862
- disabledStyle
12863
- ][state || 0];
12968
+ label.attr(stateAttribs[state]);
12969
+ const css = stateStyles[state];
12864
12970
  if (isObject(css)) {
12865
12971
  label.css(css);
12866
12972
  }
12867
12973
  }
12868
12974
  };
12975
+ label.attr(stateAttribs[0]);
12869
12976
  // Presentational attributes
12870
12977
  if (!styledMode) {
12871
- label
12872
- .attr(normalState)
12873
- .css(extend({ cursor: 'default' }, normalStyle));
12978
+ label.css(extend({ cursor: 'default' }, normalStyle));
12874
12979
  // HTML labels don't need to handle pointer events because click and
12875
12980
  // mouseenter/mouseleave is bound to the underlying <g> element.
12876
12981
  // Should this be reconsidered, we need more complex logic to share
@@ -12900,26 +13005,17 @@
12900
13005
  * @param {number} width
12901
13006
  * The width of the line.
12902
13007
  *
12903
- * @param {string} [roundingFunction=round]
12904
- * The rounding function name on the `Math` object, can be one of
12905
- * `round`, `floor` or `ceil`.
12906
- *
12907
13008
  * @return {Highcharts.SVGPathArray}
12908
13009
  * The original points array, but modified to render crisply.
12909
13010
  */
12910
- crispLine(points, width, roundingFunction = 'round') {
12911
- const start = points[0];
12912
- const end = points[1];
13011
+ crispLine(points, width) {
13012
+ const [start, end] = points;
12913
13013
  // Normalize to a crisp line
12914
13014
  if (defined(start[1]) && start[1] === end[1]) {
12915
- // Subtract due to #1129. Now bottom and left axis gridlines behave
12916
- // the same.
12917
- start[1] = end[1] =
12918
- Math[roundingFunction](start[1]) - (width % 2 / 2);
13015
+ start[1] = end[1] = crisp(start[1], width);
12919
13016
  }
12920
13017
  if (defined(start[2]) && start[2] === end[2]) {
12921
- start[2] = end[2] =
12922
- Math[roundingFunction](start[2]) + (width % 2 / 2);
13018
+ start[2] = end[2] = crisp(start[2], width);
12923
13019
  }
12924
13020
  return points;
12925
13021
  }
@@ -13318,7 +13414,7 @@
13318
13414
  if (symbolFn) {
13319
13415
  // Check if there's a path defined for this symbol
13320
13416
  if (typeof x === 'number') {
13321
- path = symbolFn.call(this.symbols, Math.round(x || 0), Math.round(y || 0), width || 0, height || 0, options);
13417
+ path = symbolFn.call(this.symbols, x || 0, y || 0, width || 0, height || 0, options);
13322
13418
  }
13323
13419
  obj = this.path(path);
13324
13420
  if (!ren.styledMode) {
@@ -15477,11 +15573,12 @@
15477
15573
  overflow: 'justify',
15478
15574
  /**
15479
15575
  * The pixel padding for axis labels, to ensure white space between
15480
- * them.
15576
+ * them. Defaults to 4 for horizontal axes, 1 for vertical.
15481
15577
  *
15578
+ * @default undefined
15482
15579
  * @product highcharts gantt
15580
+ * @apioption xAxis.labels.padding
15483
15581
  */
15484
- padding: 5,
15485
15582
  /**
15486
15583
  * Whether to reserve space for the labels. By default, space is
15487
15584
  * reserved for the labels in these cases:
@@ -17792,7 +17889,7 @@
17792
17889
  });
17793
17890
  if (label.getBBox().width <
17794
17891
  axis.getSlotWidth(tick) - 2 *
17795
- labelOptions.padding) {
17892
+ (labelOptions.padding || 0)) {
17796
17893
  return;
17797
17894
  }
17798
17895
  }
@@ -17981,7 +18078,7 @@
17981
18078
  * Extendible method to return the path of the marker
17982
18079
  * @private
17983
18080
  */
17984
- getMarkPath(x, y, tickLength, tickWidth, horiz, renderer) {
18081
+ getMarkPath(x, y, tickLength, tickWidth, horiz = false, renderer) {
17985
18082
  return renderer.crispLine([[
17986
18083
  'M',
17987
18084
  x,
@@ -18109,9 +18206,7 @@
18109
18206
  * @param {number} [opacity]
18110
18207
  */
18111
18208
  render(index, old, opacity) {
18112
- const tick = this, axis = tick.axis, horiz = axis.horiz, pos = tick.pos, tickmarkOffset = pick(tick.tickmarkOffset, axis.tickmarkOffset), xy = tick.getPosition(horiz, pos, tickmarkOffset, old), x = xy.x, y = xy.y, axisStart = axis.pos, axisEnd = axisStart + axis.len, reverseCrisp = ((horiz && x === axisEnd) ||
18113
- (!horiz && y === axisStart)) ? -1 : 1, // #1480, #1687
18114
- pxPos = horiz ? x : y;
18209
+ const tick = this, axis = tick.axis, horiz = axis.horiz, pos = tick.pos, tickmarkOffset = pick(tick.tickmarkOffset, axis.tickmarkOffset), xy = tick.getPosition(horiz, pos, tickmarkOffset, old), x = xy.x, y = xy.y, axisStart = axis.pos, axisEnd = axisStart + axis.len, pxPos = horiz ? x : y;
18115
18210
  // Anything that is not between `axis.pos` and `axis.pos + axis.length`
18116
18211
  // should not be visible (#20166). The `correctFloat` is for reversed
18117
18212
  // axes in Safari.
@@ -18125,9 +18220,9 @@
18125
18220
  opacity = pick(opacity, 1);
18126
18221
  this.isActive = true;
18127
18222
  // Create the grid line
18128
- this.renderGridLine(old, opacity, reverseCrisp);
18223
+ this.renderGridLine(old, opacity);
18129
18224
  // Create the tick mark
18130
- this.renderMark(xy, opacity, reverseCrisp);
18225
+ this.renderMark(xy, opacity);
18131
18226
  // The label is created on init - now move it into place
18132
18227
  this.renderLabel(xy, old, labelOpacity, index);
18133
18228
  tick.isNew = false;
@@ -18140,9 +18235,8 @@
18140
18235
  * @function Highcharts.Tick#renderGridLine
18141
18236
  * @param {boolean} old Whether or not the tick is old
18142
18237
  * @param {number} opacity The opacity of the grid line
18143
- * @param {number} reverseCrisp Modifier for avoiding overlapping 1 or -1
18144
18238
  */
18145
- renderGridLine(old, opacity, reverseCrisp) {
18239
+ renderGridLine(old, opacity) {
18146
18240
  const tick = this, axis = tick.axis, options = axis.options, attribs = {}, pos = tick.pos, type = tick.type, tickmarkOffset = pick(tick.tickmarkOffset, axis.tickmarkOffset), renderer = axis.chart.renderer;
18147
18241
  let gridLine = tick.gridLine, gridLinePath, gridLineWidth = options.gridLineWidth, gridLineColor = options.gridLineColor, dashStyle = options.gridLineDashStyle;
18148
18242
  if (tick.type === 'minor') {
@@ -18175,7 +18269,7 @@
18175
18269
  if (gridLine) {
18176
18270
  gridLinePath = axis.getPlotLinePath({
18177
18271
  value: pos + tickmarkOffset,
18178
- lineWidth: gridLine.strokeWidth() * reverseCrisp,
18272
+ lineWidth: gridLine.strokeWidth(),
18179
18273
  force: 'pass',
18180
18274
  old: old,
18181
18275
  acrossPanes: false // #18025
@@ -18197,9 +18291,8 @@
18197
18291
  * @function Highcharts.Tick#renderMark
18198
18292
  * @param {Highcharts.PositionObject} xy The position vector of the mark
18199
18293
  * @param {number} opacity The opacity of the mark
18200
- * @param {number} reverseCrisp Modifier for avoiding overlapping 1 or -1
18201
18294
  */
18202
- renderMark(xy, opacity, reverseCrisp) {
18295
+ renderMark(xy, opacity) {
18203
18296
  const tick = this, axis = tick.axis, options = axis.options, renderer = axis.chart.renderer, type = tick.type, tickSize = axis.tickSize(type ? type + 'Tick' : 'tick'), x = xy.x, y = xy.y, tickWidth = pick(options[type !== 'minor' ? 'tickWidth' : 'minorTickWidth'], !type && axis.isXAxis ? 1 : 0), // X axis defaults to 1
18204
18297
  tickColor = options[type !== 'minor' ? 'tickColor' : 'minorTickColor'];
18205
18298
  let mark = tick.mark;
@@ -18227,7 +18320,7 @@
18227
18320
  }
18228
18321
  }
18229
18322
  mark[isNewMark ? 'attr' : 'animate']({
18230
- d: tick.getMarkPath(x, y, tickSize[0], mark.strokeWidth() * reverseCrisp, axis.horiz, renderer),
18323
+ d: tick.getMarkPath(x, y, tickSize[0], mark.strokeWidth(), axis.horiz, renderer),
18231
18324
  opacity: opacity
18232
18325
  });
18233
18326
  }
@@ -18567,7 +18660,7 @@
18567
18660
  * @name Highcharts.Axis#len
18568
18661
  * @type {number}
18569
18662
  */
18570
- axis.len = 0;
18663
+ axis.len ?? (axis.len = 0);
18571
18664
  axis.minRange = axis.userMinRange = options.minRange || options.maxZoom;
18572
18665
  axis.range = options.range;
18573
18666
  axis.offset = options.offset || 0;
@@ -18645,13 +18738,17 @@
18645
18738
  // Top and bottom axis defaults
18646
18739
  {
18647
18740
  labels: {
18648
- autoRotation: [-45]
18741
+ autoRotation: [-45],
18742
+ padding: 4
18649
18743
  },
18650
18744
  margin: 15
18651
18745
  } :
18652
18746
  // Left and right axis, title rotated 90 or 270 degrees
18653
18747
  // respectively
18654
18748
  {
18749
+ labels: {
18750
+ padding: 1
18751
+ },
18655
18752
  title: {
18656
18753
  rotation: 90 * this.side
18657
18754
  }
@@ -18861,10 +18958,13 @@
18861
18958
  val = axis.val2lin(val);
18862
18959
  }
18863
18960
  const value = sign * (val - localMin) * localA;
18864
- returnValue = (!axis.isRadial ? correctFloat(value) : value) +
18961
+ returnValue = value +
18865
18962
  cvsOffset +
18866
18963
  (sign * minPixelPadding) +
18867
18964
  (isNumber(pointPlacement) ? localA * pointPlacement : 0);
18965
+ if (!axis.isRadial) {
18966
+ returnValue = correctFloat(returnValue);
18967
+ }
18868
18968
  }
18869
18969
  return returnValue;
18870
18970
  }
@@ -18952,8 +19052,8 @@
18952
19052
  // Keep the translated value within sane bounds, and avoid Infinity
18953
19053
  // to fail the isNumber test (#7709).
18954
19054
  translatedValue = clamp(translatedValue, -1e5, 1e5);
18955
- x1 = x2 = Math.round(translatedValue + transB);
18956
- y1 = y2 = Math.round(cHeight - translatedValue - transB);
19055
+ x1 = x2 = translatedValue + transB;
19056
+ y1 = y2 = cHeight - translatedValue - transB;
18957
19057
  if (!isNumber(translatedValue)) { // No min or max
18958
19058
  skip = true;
18959
19059
  force = false; // #7175, don't force it when path is invalid
@@ -20284,17 +20384,17 @@
20284
20384
  * @function Highcharts.Axis#unsquish
20285
20385
  */
20286
20386
  unsquish() {
20287
- const labelOptions = this.options.labels, horiz = this.horiz, tickInterval = this.tickInterval, slotSize = this.len / (((this.categories ? 1 : 0) +
20387
+ const labelOptions = this.options.labels, padding = labelOptions.padding || 0, horiz = this.horiz, tickInterval = this.tickInterval, slotSize = this.len / (((this.categories ? 1 : 0) +
20288
20388
  this.max -
20289
20389
  this.min) /
20290
20390
  tickInterval), rotationOption = labelOptions.rotation,
20291
20391
  // We don't know the actual rendered line height at this point, but
20292
- // it defaults to 0.75em
20293
- lineHeight = this.labelMetrics().h, range = Math.max(this.max - this.min, 0),
20392
+ // it defaults to 0.8em
20393
+ lineHeight = correctFloat(this.labelMetrics().h * 0.8), range = Math.max(this.max - this.min, 0),
20294
20394
  // Return the multiple of tickInterval that is needed to avoid
20295
20395
  // collision
20296
20396
  getStep = function (spaceNeeded) {
20297
- let step = spaceNeeded / (slotSize || 1);
20397
+ let step = (spaceNeeded + 2 * padding) / (slotSize || 1);
20298
20398
  step = step > 1 ? Math.ceil(step) : 1;
20299
20399
  // Guard for very small or negative angles (#9835)
20300
20400
  if (step * tickInterval > range &&
@@ -20390,7 +20490,10 @@
20390
20490
  * @function Highcharts.Axis#renderUnsquish
20391
20491
  */
20392
20492
  renderUnsquish() {
20393
- const chart = this.chart, renderer = chart.renderer, tickPositions = this.tickPositions, ticks = this.ticks, labelOptions = this.options.labels, labelStyleOptions = labelOptions.style, horiz = this.horiz, slotWidth = this.getSlotWidth(), innerWidth = Math.max(1, Math.round(slotWidth - 2 * labelOptions.padding)), attr = {}, labelMetrics = this.labelMetrics(), textOverflowOption = labelStyleOptions.textOverflow;
20493
+ const chart = this.chart, renderer = chart.renderer, tickPositions = this.tickPositions, ticks = this.ticks, labelOptions = this.options.labels, labelStyleOptions = labelOptions.style, horiz = this.horiz, slotWidth = this.getSlotWidth(), innerWidth = Math.max(1, Math.round(slotWidth - (horiz ?
20494
+ 2 * (labelOptions.padding || 0) :
20495
+ labelOptions.distance || 0 // #21172
20496
+ ))), attr = {}, labelMetrics = this.labelMetrics(), textOverflowOption = labelStyleOptions.textOverflow;
20394
20497
  let commonWidth, commonTextOverflow, maxLabelLength = 0, label, i, pos;
20395
20498
  // Set rotation option unless it is "auto", like in gauges
20396
20499
  if (!isString(labelOptions.rotation)) {
@@ -20707,7 +20810,7 @@
20707
20810
  }
20708
20811
  // Due to GridAxis.tickSize, tickSize should be calculated after ticks
20709
20812
  // has rendered.
20710
- if (coll !== 'colorAxis') {
20813
+ if (coll !== 'colorAxis' && clipOffset) {
20711
20814
  const tickSize = this.tickSize('tick');
20712
20815
  axisOffset[side] = Math.max(axisOffset[side], (axis.axisTitleMargin || 0) + titleOffset +
20713
20816
  directionFactor * axis.offset, labelOffsetPadded, // #3027
@@ -20719,10 +20822,9 @@
20719
20822
  // the plot area and axis lines
20720
20823
  const clip = !axis.axisLine || options.offset ?
20721
20824
  0 :
20722
- // #4308, #4371:
20723
- Math.floor(axis.axisLine.strokeWidth() / 2) * 2;
20724
- clipOffset[invertedSide] =
20725
- Math.max(clipOffset[invertedSide], clip);
20825
+ // #4308, #4371
20826
+ axis.axisLine.strokeWidth() / 2;
20827
+ clipOffset[invertedSide] = Math.max(clipOffset[invertedSide], clip);
20726
20828
  }
20727
20829
  fireEvent(this, 'afterGetOffset');
20728
20830
  }
@@ -21357,6 +21459,7 @@
21357
21459
  'coll',
21358
21460
  'extKey',
21359
21461
  'hcEvents',
21462
+ 'len',
21360
21463
  'names',
21361
21464
  'series',
21362
21465
  'userMax',
@@ -22577,6 +22680,16 @@
22577
22680
  * @type {Highcharts.ColorString}
22578
22681
  * @apioption xAxis.plotBands.borderColor
22579
22682
  */
22683
+ /**
22684
+ * Border radius for the plot band. Applies only to gauges. Can be a pixel
22685
+ * value or a percentage, for example `50%`.
22686
+ *
22687
+ * @type {number|string}
22688
+ * @since 11.4.2
22689
+ * @sample {highcharts} highcharts/xaxis/plotbands-gauge-borderradius
22690
+ * Angular gauge with rounded plot bands
22691
+ * @apioption xAxis.plotBands.borderRadius
22692
+ */
22580
22693
  /**
22581
22694
  * Border width for the plot band. Also requires `borderColor` to be set.
22582
22695
  *
@@ -23134,7 +23247,7 @@
23134
23247
 
23135
23248
  return PlotLineOrBand;
23136
23249
  });
23137
- _registerModule(_modules, 'Core/Tooltip.js', [_modules['Core/Templating.js'], _modules['Core/Globals.js'], _modules['Core/Renderer/RendererUtilities.js'], _modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Utilities.js']], function (F, H, R, RendererRegistry, U) {
23250
+ _registerModule(_modules, 'Core/Tooltip.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Templating.js'], _modules['Core/Globals.js'], _modules['Core/Renderer/RendererUtilities.js'], _modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Utilities.js']], function (A, F, H, R, RendererRegistry, U) {
23138
23251
  /* *
23139
23252
  *
23140
23253
  * (c) 2010-2024 Torstein Honsi
@@ -23144,6 +23257,7 @@
23144
23257
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
23145
23258
  *
23146
23259
  * */
23260
+ const { animObject } = A;
23147
23261
  const { format } = F;
23148
23262
  const { composed, doc, isSafari } = H;
23149
23263
  const { distribute } = R;
@@ -23183,7 +23297,6 @@
23183
23297
  this.distance = 0;
23184
23298
  this.isHidden = true;
23185
23299
  this.isSticky = false;
23186
- this.now = {};
23187
23300
  this.options = {};
23188
23301
  this.outside = false;
23189
23302
  this.chart = chart;
@@ -23277,7 +23390,6 @@
23277
23390
  discardElement(this.container);
23278
23391
  }
23279
23392
  U.clearTimeout(this.hideTimer);
23280
- U.clearTimeout(this.tooltipTimeout);
23281
23393
  }
23282
23394
  /**
23283
23395
  * Extendable method to get the anchor position of the tooltip
@@ -23438,19 +23550,15 @@
23438
23550
  // container.
23439
23551
  if (tooltip.outside) {
23440
23552
  const label = this.label;
23441
- const { xSetter, ySetter } = label;
23442
- label.xSetter = function (value) {
23443
- xSetter.call(label, tooltip.distance);
23444
- if (container) {
23445
- container.style.left = value + 'px';
23446
- }
23447
- };
23448
- label.ySetter = function (value) {
23449
- ySetter.call(label, tooltip.distance);
23450
- if (container) {
23451
- container.style.top = value + 'px';
23452
- }
23453
- };
23553
+ [label.xSetter, label.ySetter].forEach((setter, i) => {
23554
+ label[i ? 'ySetter' : 'xSetter'] = (value) => {
23555
+ setter.call(label, tooltip.distance);
23556
+ label[i ? 'y' : 'x'] = value;
23557
+ if (container) {
23558
+ container.style[i ? 'top' : 'left'] = `${value}px`;
23559
+ }
23560
+ };
23561
+ });
23454
23562
  }
23455
23563
  this.label
23456
23564
  .attr({ zIndex: 8 })
@@ -23701,15 +23809,6 @@
23701
23809
  * @type {Array<null>}
23702
23810
  */
23703
23811
  this.crosshairs = [];
23704
- /**
23705
- * Current values of x and y when animating.
23706
- *
23707
- * @private
23708
- * @readonly
23709
- * @name Highcharts.Tooltip#now
23710
- * @type {Highcharts.PositionObject}
23711
- */
23712
- this.now = { x: 0, y: 0 };
23713
23812
  /**
23714
23813
  * Tooltips are initially hidden.
23715
23814
  *
@@ -23773,38 +23872,13 @@
23773
23872
  * @param {number} anchorY
23774
23873
  */
23775
23874
  move(x, y, anchorX, anchorY) {
23776
- const tooltip = this, now = tooltip.now, animate = tooltip.options.animation !== false &&
23777
- !tooltip.isHidden &&
23778
- // When we get close to the target position, abort animation and
23779
- // land on the right place (#3056)
23780
- (Math.abs(x - now.x) > 1 || Math.abs(y - now.y) > 1), skipAnchor = tooltip.followPointer || tooltip.len > 1;
23781
- // Get intermediate values for animation
23782
- extend(now, {
23783
- x: animate ? (2 * now.x + x) / 3 : x,
23784
- y: animate ? (now.y + y) / 2 : y,
23785
- anchorX: skipAnchor ?
23786
- void 0 :
23787
- animate ? (2 * now.anchorX + anchorX) / 3 : anchorX,
23788
- anchorY: skipAnchor ?
23789
- void 0 :
23790
- animate ? (now.anchorY + anchorY) / 2 : anchorY
23791
- });
23792
- // Move to the intermediate value
23793
- tooltip.getLabel().attr(now);
23794
- tooltip.drawTracker();
23795
- // Run on next tick of the mouse tracker
23796
- if (animate) {
23797
- // Never allow two timeouts
23798
- U.clearTimeout(this.tooltipTimeout);
23799
- // Set the fixed interval ticking for the smooth tooltip
23800
- this.tooltipTimeout = setTimeout(function () {
23801
- // The interval function may still be running during destroy,
23802
- // so check that the chart is really there before calling.
23803
- if (tooltip) {
23804
- tooltip.move(x, y, anchorX, anchorY);
23805
- }
23806
- }, 32);
23875
+ const tooltip = this, animation = animObject(!tooltip.isHidden && tooltip.options.animation), skipAnchor = tooltip.followPointer || (tooltip.len || 0) > 1, attr = { x, y };
23876
+ if (!skipAnchor) {
23877
+ attr.anchorX = anchorX;
23878
+ attr.anchorY = anchorY;
23807
23879
  }
23880
+ animation.step = () => tooltip.drawTracker();
23881
+ tooltip.getLabel().animate(attr, animation);
23808
23882
  }
23809
23883
  /**
23810
23884
  * Refresh the tooltip's text and position.
@@ -24527,7 +24601,7 @@
24527
24601
  const { animObject } = A;
24528
24602
  const { defaultOptions } = D;
24529
24603
  const { format } = F;
24530
- const { addEvent, erase, extend, fireEvent, getNestedProperty, isArray, isFunction, isNumber, isObject, merge, pick, syncTimeout, removeEvent, uniqueKey } = U;
24604
+ const { addEvent, crisp, erase, extend, fireEvent, getNestedProperty, isArray, isFunction, isNumber, isObject, merge, pick, syncTimeout, removeEvent, uniqueKey } = U;
24531
24605
  /* eslint-disable no-invalid-this, valid-jsdoc */
24532
24606
  /* *
24533
24607
  *
@@ -25635,7 +25709,8 @@
25635
25709
  }, AST.filterUserAttributes(haloOptions.attributes || {})));
25636
25710
  }
25637
25711
  }
25638
- else if (halo && halo.point && halo.point.haloPath) {
25712
+ else if (halo?.point?.haloPath &&
25713
+ !halo.point.destroyed) {
25639
25714
  // Animate back to 0 on the current halo point (#6055)
25640
25715
  halo.animate({ d: halo.point.haloPath(0) }, null,
25641
25716
  // Hide after unhovering. The `complete` callback runs in the
@@ -25658,7 +25733,7 @@
25658
25733
  */
25659
25734
  haloPath(size) {
25660
25735
  const pos = this.pos();
25661
- return pos ? this.series.chart.renderer.symbols.circle(Math.floor(pos[0]) - size, pos[1] - size, size * 2, size * 2) : [];
25736
+ return pos ? this.series.chart.renderer.symbols.circle(crisp(pos[0], 1) - size, pos[1] - size, size * 2, size * 2) : [];
25662
25737
  }
25663
25738
  }
25664
25739
  /* *
@@ -30357,6 +30432,21 @@
30357
30432
  * @type {Highcharts.AlignValue|null}
30358
30433
  */
30359
30434
  align: 'center',
30435
+ /**
30436
+ * Alignment method for data labels. If set to `plotEdges`, the labels
30437
+ * are aligned within the plot area in the direction of the y-axis. So
30438
+ * in a regular column chart, the labels are aligned vertically
30439
+ * according to the `verticalAlign` setting. In a bar chart, which is
30440
+ * inverted, the labels are aligned horizontally according to the
30441
+ * `align` setting. Applies to cartesian series only.
30442
+ *
30443
+ * @sample {highcharts} highcharts/series-bar/datalabels-alignto/
30444
+ * Align to plot edges
30445
+ *
30446
+ * @type {string}
30447
+ * @since 11.4.2
30448
+ * @apioption plotOptions.series.dataLabels.alignTo
30449
+ */
30360
30450
  /**
30361
30451
  * Whether to allow data labels to overlap. To make the labels less
30362
30452
  * sensitive for overlapping, the
@@ -31414,7 +31504,7 @@
31414
31504
  const { registerEventOptions } = F;
31415
31505
  const { svg, win } = H;
31416
31506
  const { seriesTypes } = SeriesRegistry;
31417
- const { arrayMax, arrayMin, clamp, correctFloat, defined, destroyObjectProperties, diffObjects, erase, error, extend, find, fireEvent, getClosestDistance, getNestedProperty, insertItem, isArray, isNumber, isString, merge, objectEach, pick, removeEvent, splat, syncTimeout } = U;
31507
+ const { arrayMax, arrayMin, clamp, correctFloat, crisp, defined, destroyObjectProperties, diffObjects, erase, error, extend, find, fireEvent, getClosestDistance, getNestedProperty, insertItem, isArray, isNumber, isString, merge, objectEach, pick, removeEvent, splat, syncTimeout } = U;
31418
31508
  /* *
31419
31509
  *
31420
31510
  * Class
@@ -32378,10 +32468,7 @@
32378
32468
  * Force getting extremes of a total series data range.
32379
32469
  */
32380
32470
  getProcessedData(forceExtremesFromAll) {
32381
- const series = this, xAxis = series.xAxis, options = series.options, cropThreshold = options.cropThreshold, getExtremesFromAll = forceExtremesFromAll ||
32382
- series.getExtremesFromAll ||
32383
- options.getExtremesFromAll, // #4599
32384
- logarithmic = xAxis?.logarithmic, isCartesian = series.isCartesian;
32471
+ const series = this, xAxis = series.xAxis, options = series.options, cropThreshold = options.cropThreshold, logarithmic = xAxis?.logarithmic, isCartesian = series.isCartesian;
32385
32472
  let croppedData, cropped, cropStart = 0, xExtremes, min, max,
32386
32473
  // Copied during slice operation:
32387
32474
  processedXData = series.xData, processedYData = series.yData, updatingNames = false;
@@ -32396,7 +32483,7 @@
32396
32483
  // Optionally filter out points outside the plot area
32397
32484
  if (isCartesian &&
32398
32485
  series.sorted &&
32399
- !getExtremesFromAll &&
32486
+ !forceExtremesFromAll &&
32400
32487
  (!cropThreshold ||
32401
32488
  dataLength > cropThreshold ||
32402
32489
  series.forceCrop)) {
@@ -32637,16 +32724,24 @@
32637
32724
  * Force getting extremes of a total series data range.
32638
32725
  */
32639
32726
  getExtremes(yData, forceExtremesFromAll) {
32640
- const xAxis = this.xAxis, yAxis = this.yAxis, xData = this.processedXData || this.xData, activeYData = [],
32727
+ const xAxis = this.xAxis, yAxis = this.yAxis, activeYData = [],
32641
32728
  // Handle X outside the viewed area. This does not work with
32642
32729
  // non-sorted data like scatter (#7639).
32643
32730
  shoulder = this.requireSorting && !this.is('column') ?
32644
32731
  1 : 0,
32645
32732
  // #2117, need to compensate for log X axis
32646
- positiveValuesOnly = yAxis ? yAxis.positiveValuesOnly : false;
32647
- let xExtremes, validValue, withinRange, x, y, i, j, xMin = 0, xMax = 0, activeCounter = 0;
32648
- yData = yData || this.stackedYData || this.processedYData || [];
32649
- const yDataLength = yData.length;
32733
+ positiveValuesOnly = yAxis ? yAxis.positiveValuesOnly : false, getExtremesFromAll = forceExtremesFromAll ||
32734
+ this.getExtremesFromAll ||
32735
+ this.options.getExtremesFromAll; // #4599
32736
+ let { processedXData, processedYData } = this, xExtremes, validValue, withinRange, x, y, i, j, xMin = 0, xMax = 0, activeCounter = 0;
32737
+ // Get the processed data from the full range (#21003)
32738
+ if (this.cropped && getExtremesFromAll) {
32739
+ const processedData = this.getProcessedData(true);
32740
+ processedXData = processedData.xData;
32741
+ processedYData = processedData.yData;
32742
+ }
32743
+ yData = yData || this.stackedYData || processedYData || [];
32744
+ const yDataLength = yData.length, xData = processedXData || this.xData;
32650
32745
  if (xAxis) {
32651
32746
  xExtremes = xAxis.getExtremes();
32652
32747
  xMin = xExtremes.min;
@@ -33216,12 +33311,16 @@
33216
33311
  }
33217
33312
  const pos = point.pos();
33218
33313
  if (isNumber(radius) && pos) {
33219
- attribs.x = pos[0] - radius;
33220
- attribs.y = pos[1] - radius;
33221
33314
  if (seriesOptions.crisp) {
33222
- // Math.floor for #1843:
33223
- attribs.x = Math.floor(attribs.x);
33315
+ pos[0] = crisp(pos[0], point.hasImage ?
33316
+ 0 :
33317
+ symbol === 'rect' ?
33318
+ // Rectangle symbols need crisp edges, others don't
33319
+ seriesMarkerOptions?.lineWidth || 0 :
33320
+ 1);
33224
33321
  }
33322
+ attribs.x = pos[0] - radius;
33323
+ attribs.y = pos[1] - radius;
33225
33324
  }
33226
33325
  if (radius) {
33227
33326
  attribs.width = attribs.height = 2 * radius;
@@ -36393,7 +36492,7 @@
36393
36492
  * @emits Highcharts.Chart#event:afterSetChartSize
36394
36493
  */
36395
36494
  setChartSize(skipAxes) {
36396
- const chart = this, inverted = chart.inverted, renderer = chart.renderer, chartWidth = chart.chartWidth, chartHeight = chart.chartHeight, optionsChart = chart.options.chart, spacing = chart.spacing, clipOffset = chart.clipOffset;
36495
+ const chart = this, { chartHeight, chartWidth, inverted, spacing, renderer } = chart, clipOffset = chart.clipOffset, clipRoundFunc = Math[inverted ? 'floor' : 'round'];
36397
36496
  let plotLeft, plotTop, plotWidth, plotHeight;
36398
36497
  /**
36399
36498
  * The current left position of the plot area in pixels.
@@ -36425,7 +36524,6 @@
36425
36524
  chart.plotHeight = plotHeight = Math.max(0, Math.round(chartHeight - plotTop - chart.marginBottom));
36426
36525
  chart.plotSizeX = inverted ? plotHeight : plotWidth;
36427
36526
  chart.plotSizeY = inverted ? plotWidth : plotHeight;
36428
- chart.plotBorderWidth = optionsChart.plotBorderWidth || 0;
36429
36527
  // Set boxes used for alignment
36430
36528
  chart.spacingBox = renderer.spacingBox = {
36431
36529
  x: spacing[3],
@@ -36439,17 +36537,15 @@
36439
36537
  width: plotWidth,
36440
36538
  height: plotHeight
36441
36539
  };
36442
- const plotBorderWidth = 2 * Math.floor(chart.plotBorderWidth / 2), clipX = Math.ceil(Math.max(plotBorderWidth, clipOffset[3]) / 2), clipY = Math.ceil(Math.max(plotBorderWidth, clipOffset[0]) / 2);
36443
- chart.clipBox = {
36444
- x: clipX,
36445
- y: clipY,
36446
- width: Math.floor(chart.plotSizeX -
36447
- Math.max(plotBorderWidth, clipOffset[1]) / 2 -
36448
- clipX),
36449
- height: Math.max(0, Math.floor(chart.plotSizeY -
36450
- Math.max(plotBorderWidth, clipOffset[2]) / 2 -
36451
- clipY))
36452
- };
36540
+ // Compute the clipping box
36541
+ if (clipOffset) {
36542
+ chart.clipBox = {
36543
+ x: clipRoundFunc(clipOffset[3]),
36544
+ y: clipRoundFunc(clipOffset[0]),
36545
+ width: clipRoundFunc(chart.plotSizeX - clipOffset[1] - clipOffset[3]),
36546
+ height: clipRoundFunc(chart.plotSizeY - clipOffset[0] - clipOffset[2])
36547
+ };
36548
+ }
36453
36549
  if (!skipAxes) {
36454
36550
  chart.axes.forEach(function (axis) {
36455
36551
  axis.setAxisSize();
@@ -36467,7 +36563,7 @@
36467
36563
  */
36468
36564
  resetMargins() {
36469
36565
  fireEvent(this, 'resetMargins');
36470
- const chart = this, chartOptions = chart.options.chart;
36566
+ const chart = this, chartOptions = chart.options.chart, plotBorderWidth = chartOptions.plotBorderWidth || 0, halfWidth = plotBorderWidth / 2;
36471
36567
  // Create margin and spacing array
36472
36568
  ['margin', 'spacing'].forEach(function splashArrays(target) {
36473
36569
  const value = chartOptions[target], values = isObject(value) ? value : [value, value, value, value];
@@ -36486,7 +36582,13 @@
36486
36582
  chart[m] = pick(chart.margin[side], chart.spacing[side]);
36487
36583
  });
36488
36584
  chart.axisOffset = [0, 0, 0, 0]; // Top, right, bottom, left
36489
- chart.clipOffset = [0, 0, 0, 0];
36585
+ chart.clipOffset = [
36586
+ halfWidth,
36587
+ halfWidth,
36588
+ halfWidth,
36589
+ halfWidth
36590
+ ];
36591
+ chart.plotBorderWidth = plotBorderWidth;
36490
36592
  }
36491
36593
  /**
36492
36594
  * Internal function to draw or redraw the borders and backgrounds for chart
@@ -36729,7 +36831,8 @@
36729
36831
  chart.setChartSize();
36730
36832
  for (const axis of axes) {
36731
36833
  const { options } = axis, { labels } = options;
36732
- if (axis.horiz &&
36834
+ if (chart.hasCartesianSeries && // #20948
36835
+ axis.horiz &&
36733
36836
  axis.visible &&
36734
36837
  labels.enabled &&
36735
36838
  axis.series.length &&
@@ -37651,7 +37754,7 @@
37651
37754
  // Remove active points for shared tooltip
37652
37755
  this.hoverPoints?.forEach((point) => point.setState());
37653
37756
  for (const axis of axes) {
37654
- const { horiz, len, minPointOffset = 0, options, reversed } = axis, wh = horiz ? 'width' : 'height', xy = horiz ? 'x' : 'y', toLength = to[wh] || axis.len, fromLength = from[wh] || axis.len,
37757
+ const { horiz, len, minPointOffset = 0, options, reversed } = axis, wh = horiz ? 'width' : 'height', xy = horiz ? 'x' : 'y', toLength = pick(to[wh], axis.len), fromLength = pick(from[wh], axis.len),
37655
37758
  // If fingers pinched very close on this axis, treat as pan
37656
37759
  scale = Math.abs(toLength) < 10 ?
37657
37760
  1 :
@@ -38217,23 +38320,7 @@
38217
38320
  * @private
38218
38321
  */
38219
38322
  moveFixedElements() {
38220
- const { container, inverted, scrollablePixelsX, scrollablePixelsY } = this.chart, fixedRenderer = this.fixedRenderer, fixedSelectors = [
38221
- '.highcharts-breadcrumbs-group',
38222
- '.highcharts-contextbutton',
38223
- '.highcharts-caption',
38224
- '.highcharts-credits',
38225
- '.highcharts-legend',
38226
- '.highcharts-legend-checkbox',
38227
- '.highcharts-navigator-series',
38228
- '.highcharts-navigator-xaxis',
38229
- '.highcharts-navigator-yaxis',
38230
- '.highcharts-navigator',
38231
- '.highcharts-reset-zoom',
38232
- '.highcharts-drillup-button',
38233
- '.highcharts-scrollbar',
38234
- '.highcharts-subtitle',
38235
- '.highcharts-title'
38236
- ];
38323
+ const { container, inverted, scrollablePixelsX, scrollablePixelsY } = this.chart, fixedRenderer = this.fixedRenderer, fixedSelectors = ScrollablePlotArea.fixedSelectors;
38237
38324
  let axisClass;
38238
38325
  if (scrollablePixelsX && !inverted) {
38239
38326
  axisClass = '.highcharts-yaxis';
@@ -38260,6 +38347,24 @@
38260
38347
  }
38261
38348
  }
38262
38349
  }
38350
+ ScrollablePlotArea.fixedSelectors = [
38351
+ '.highcharts-breadcrumbs-group',
38352
+ '.highcharts-contextbutton',
38353
+ '.highcharts-caption',
38354
+ '.highcharts-credits',
38355
+ '.highcharts-drillup-button',
38356
+ '.highcharts-legend',
38357
+ '.highcharts-legend-checkbox',
38358
+ '.highcharts-navigator-series',
38359
+ '.highcharts-navigator-xaxis',
38360
+ '.highcharts-navigator-yaxis',
38361
+ '.highcharts-navigator',
38362
+ '.highcharts-range-selector-group',
38363
+ '.highcharts-reset-zoom',
38364
+ '.highcharts-scrollbar',
38365
+ '.highcharts-subtitle',
38366
+ '.highcharts-title'
38367
+ ];
38263
38368
  /* *
38264
38369
  *
38265
38370
  * Default Export
@@ -39553,7 +39658,248 @@
39553
39658
 
39554
39659
  return LineSeries;
39555
39660
  });
39556
- _registerModule(_modules, 'Series/Area/AreaSeries.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
39661
+ _registerModule(_modules, 'Series/Area/AreaSeriesDefaults.js', [], function () {
39662
+ /* *
39663
+ *
39664
+ * (c) 2010-2024 Torstein Honsi
39665
+ *
39666
+ * License: www.highcharts.com/license
39667
+ *
39668
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
39669
+ *
39670
+ * */
39671
+ /* *
39672
+ *
39673
+ * API Options
39674
+ *
39675
+ * */
39676
+ /**
39677
+ * The area series type.
39678
+ *
39679
+ * @sample {highcharts} highcharts/demo/area-basic/
39680
+ * Area chart
39681
+ * @sample {highstock} stock/demo/area/
39682
+ * Area chart
39683
+ *
39684
+ * @extends plotOptions.line
39685
+ * @excluding useOhlcData
39686
+ * @product highcharts highstock
39687
+ * @optionparent plotOptions.area
39688
+ */
39689
+ const AreaSeriesDefaults = {
39690
+ /**
39691
+ * @see [fillColor](#plotOptions.area.fillColor)
39692
+ * @see [fillOpacity](#plotOptions.area.fillOpacity)
39693
+ *
39694
+ * @apioption plotOptions.area.color
39695
+ */
39696
+ /**
39697
+ * Fill color or gradient for the area. When `undefined`, the series'
39698
+ * `color` is used with the series' `fillOpacity`.
39699
+ *
39700
+ * In styled mode, the fill color can be set with the `.highcharts-area`
39701
+ * class name.
39702
+ *
39703
+ * @see [color](#plotOptions.area.color)
39704
+ * @see [fillOpacity](#plotOptions.area.fillOpacity)
39705
+ *
39706
+ * @sample {highcharts} highcharts/plotoptions/area-fillcolor-default/
39707
+ * Undefined by default
39708
+ * @sample {highcharts} highcharts/plotoptions/area-fillcolor-gradient/
39709
+ * Gradient
39710
+ *
39711
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
39712
+ * @product highcharts highstock
39713
+ * @apioption plotOptions.area.fillColor
39714
+ */
39715
+ /**
39716
+ * Fill opacity for the area. When you set an explicit `fillColor`,
39717
+ * the `fillOpacity` is not applied. Instead, you should define the
39718
+ * opacity in the `fillColor` with an rgba color definition. The
39719
+ * `fillOpacity` setting, also the default setting, overrides the alpha
39720
+ * component of the `color` setting.
39721
+ *
39722
+ * In styled mode, the fill opacity can be set with the
39723
+ * `.highcharts-area` class name.
39724
+ *
39725
+ * @see [color](#plotOptions.area.color)
39726
+ * @see [fillColor](#plotOptions.area.fillColor)
39727
+ *
39728
+ * @sample {highcharts} highcharts/plotoptions/area-fillopacity/
39729
+ * Automatic fill color and fill opacity of 0.1
39730
+ *
39731
+ * @type {number}
39732
+ * @default {highcharts} 0.75
39733
+ * @default {highstock} 0.75
39734
+ * @product highcharts highstock
39735
+ * @apioption plotOptions.area.fillOpacity
39736
+ */
39737
+ /**
39738
+ * A separate color for the graph line. By default the line takes the
39739
+ * `color` of the series, but the lineColor setting allows setting a
39740
+ * separate color for the line without altering the `fillColor`.
39741
+ *
39742
+ * In styled mode, the line stroke can be set with the
39743
+ * `.highcharts-graph` class name.
39744
+ *
39745
+ * @sample {highcharts} highcharts/plotoptions/area-linecolor/
39746
+ * Dark gray line
39747
+ *
39748
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
39749
+ * @product highcharts highstock
39750
+ * @apioption plotOptions.area.lineColor
39751
+ */
39752
+ /**
39753
+ * A separate color for the negative part of the area. Note that `zones`
39754
+ * takes precedence over the negative fill color.
39755
+ *
39756
+ * In styled mode, a negative color is set with the
39757
+ * `.highcharts-negative` class name.
39758
+ *
39759
+ * @see [negativeColor](#plotOptions.area.negativeColor)
39760
+ *
39761
+ * @sample {highcharts} highcharts/css/series-negative-color/
39762
+ * Negative color in styled mode
39763
+ *
39764
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
39765
+ * @since 3.0
39766
+ * @product highcharts
39767
+ * @apioption plotOptions.area.negativeFillColor
39768
+ */
39769
+ /**
39770
+ * Whether the whole area or just the line should respond to mouseover
39771
+ * tooltips and other mouse or touch events.
39772
+ *
39773
+ * @sample {highcharts|highstock} highcharts/plotoptions/area-trackbyarea/
39774
+ * Display the tooltip when the area is hovered
39775
+ *
39776
+ * @type {boolean}
39777
+ * @default false
39778
+ * @since 1.1.6
39779
+ * @product highcharts highstock
39780
+ * @apioption plotOptions.area.trackByArea
39781
+ */
39782
+ /**
39783
+ * The Y axis value to serve as the base for the area, for
39784
+ * distinguishing between values above and below a threshold. The area
39785
+ * between the graph and the threshold is filled.
39786
+ *
39787
+ * * If a number is given, the Y axis will scale to the threshold.
39788
+ * * If `null`, the scaling behaves like a line series with fill between
39789
+ * the graph and the Y axis minimum.
39790
+ * * If `Infinity` or `-Infinity`, the area between the graph and the
39791
+ * corresponding Y axis extreme is filled (since v6.1.0).
39792
+ *
39793
+ * @sample {highcharts} highcharts/plotoptions/area-threshold/
39794
+ * A threshold of 100
39795
+ * @sample {highcharts} highcharts/plotoptions/area-threshold-infinity/
39796
+ * A threshold of Infinity
39797
+ *
39798
+ * @type {number|null}
39799
+ * @since 2.0
39800
+ * @product highcharts highstock
39801
+ */
39802
+ threshold: 0,
39803
+ legendSymbol: 'areaMarker'
39804
+ };
39805
+ /**
39806
+ * A `area` series. If the [type](#series.area.type) option is not
39807
+ * specified, it is inherited from [chart.type](#chart.type).
39808
+ *
39809
+ * @extends series,plotOptions.area
39810
+ * @excluding dataParser, dataURL, useOhlcData
39811
+ * @product highcharts highstock
39812
+ * @apioption series.area
39813
+ */
39814
+ /**
39815
+ * @see [fillColor](#series.area.fillColor)
39816
+ * @see [fillOpacity](#series.area.fillOpacity)
39817
+ *
39818
+ * @apioption series.area.color
39819
+ */
39820
+ /**
39821
+ * An array of data points for the series. For the `area` series type,
39822
+ * points can be given in the following ways:
39823
+ *
39824
+ * 1. An array of numerical values. In this case, the numerical values will be
39825
+ * interpreted as `y` options. The `x` values will be automatically
39826
+ * calculated, either starting at 0 and incremented by 1, or from
39827
+ * `pointStart` * and `pointInterval` given in the series options. If the
39828
+ * axis has categories, these will be used. Example:
39829
+ * ```js
39830
+ * data: [0, 5, 3, 5]
39831
+ * ```
39832
+ *
39833
+ * 2. An array of arrays with 2 values. In this case, the values correspond to
39834
+ * `x,y`. If the first value is a string, it is applied as the name of the
39835
+ * point, and the `x` value is inferred.
39836
+ * ```js
39837
+ * data: [
39838
+ * [0, 9],
39839
+ * [1, 7],
39840
+ * [2, 6]
39841
+ * ]
39842
+ * ```
39843
+ *
39844
+ * 3. An array of objects with named values. The following snippet shows only a
39845
+ * few settings, see the complete options set below. If the total number of
39846
+ * data points exceeds the series'
39847
+ * [turboThreshold](#series.area.turboThreshold), this option is not
39848
+ * available.
39849
+ * ```js
39850
+ * data: [{
39851
+ * x: 1,
39852
+ * y: 9,
39853
+ * name: "Point2",
39854
+ * color: "#00FF00"
39855
+ * }, {
39856
+ * x: 1,
39857
+ * y: 6,
39858
+ * name: "Point1",
39859
+ * color: "#FF00FF"
39860
+ * }]
39861
+ * ```
39862
+ *
39863
+ * @sample {highcharts} highcharts/chart/reflow-true/
39864
+ * Numerical values
39865
+ * @sample {highcharts} highcharts/series/data-array-of-arrays/
39866
+ * Arrays of numeric x and y
39867
+ * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
39868
+ * Arrays of datetime x and y
39869
+ * @sample {highcharts} highcharts/series/data-array-of-name-value/
39870
+ * Arrays of point.name and y
39871
+ * @sample {highcharts} highcharts/series/data-array-of-objects/
39872
+ * Config objects
39873
+ *
39874
+ * @type {Array<number|Array<(number|string),(number|null)>|null|*>}
39875
+ * @extends series.line.data
39876
+ * @product highcharts highstock
39877
+ * @apioption series.area.data
39878
+ */
39879
+ /**
39880
+ * @see [color](#series.area.color)
39881
+ * @see [fillOpacity](#series.area.fillOpacity)
39882
+ *
39883
+ * @apioption series.area.fillColor
39884
+ */
39885
+ /**
39886
+ * @see [color](#series.area.color)
39887
+ * @see [fillColor](#series.area.fillColor)
39888
+ *
39889
+ * @default {highcharts} 0.75
39890
+ * @default {highstock} 0.75
39891
+ * @apioption series.area.fillOpacity
39892
+ */
39893
+ ''; // Adds doclets above to transpiled
39894
+ /* *
39895
+ *
39896
+ * Default Export
39897
+ *
39898
+ * */
39899
+
39900
+ return AreaSeriesDefaults;
39901
+ });
39902
+ _registerModule(_modules, 'Series/Area/AreaSeries.js', [_modules['Series/Area/AreaSeriesDefaults.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (AreaSeriesDefaults, SeriesRegistry, U) {
39557
39903
  /* *
39558
39904
  *
39559
39905
  * (c) 2010-2024 Torstein Honsi
@@ -39866,134 +40212,7 @@
39866
40212
  * Static Properties
39867
40213
  *
39868
40214
  * */
39869
- /**
39870
- * The area series type.
39871
- *
39872
- * @sample {highcharts} highcharts/demo/area-basic/
39873
- * Area chart
39874
- * @sample {highstock} stock/demo/area/
39875
- * Area chart
39876
- *
39877
- * @extends plotOptions.line
39878
- * @excluding useOhlcData
39879
- * @product highcharts highstock
39880
- * @optionparent plotOptions.area
39881
- */
39882
- AreaSeries.defaultOptions = merge(LineSeries.defaultOptions, {
39883
- /**
39884
- * @see [fillColor](#plotOptions.area.fillColor)
39885
- * @see [fillOpacity](#plotOptions.area.fillOpacity)
39886
- *
39887
- * @apioption plotOptions.area.color
39888
- */
39889
- /**
39890
- * Fill color or gradient for the area. When `undefined`, the series'
39891
- * `color` is used with the series' `fillOpacity`.
39892
- *
39893
- * In styled mode, the fill color can be set with the `.highcharts-area`
39894
- * class name.
39895
- *
39896
- * @see [color](#plotOptions.area.color)
39897
- * @see [fillOpacity](#plotOptions.area.fillOpacity)
39898
- *
39899
- * @sample {highcharts} highcharts/plotoptions/area-fillcolor-default/
39900
- * Undefined by default
39901
- * @sample {highcharts} highcharts/plotoptions/area-fillcolor-gradient/
39902
- * Gradient
39903
- *
39904
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
39905
- * @product highcharts highstock
39906
- * @apioption plotOptions.area.fillColor
39907
- */
39908
- /**
39909
- * Fill opacity for the area. When you set an explicit `fillColor`,
39910
- * the `fillOpacity` is not applied. Instead, you should define the
39911
- * opacity in the `fillColor` with an rgba color definition. The
39912
- * `fillOpacity` setting, also the default setting, overrides the alpha
39913
- * component of the `color` setting.
39914
- *
39915
- * In styled mode, the fill opacity can be set with the
39916
- * `.highcharts-area` class name.
39917
- *
39918
- * @see [color](#plotOptions.area.color)
39919
- * @see [fillColor](#plotOptions.area.fillColor)
39920
- *
39921
- * @sample {highcharts} highcharts/plotoptions/area-fillopacity/
39922
- * Automatic fill color and fill opacity of 0.1
39923
- *
39924
- * @type {number}
39925
- * @default {highcharts} 0.75
39926
- * @default {highstock} 0.75
39927
- * @product highcharts highstock
39928
- * @apioption plotOptions.area.fillOpacity
39929
- */
39930
- /**
39931
- * A separate color for the graph line. By default the line takes the
39932
- * `color` of the series, but the lineColor setting allows setting a
39933
- * separate color for the line without altering the `fillColor`.
39934
- *
39935
- * In styled mode, the line stroke can be set with the
39936
- * `.highcharts-graph` class name.
39937
- *
39938
- * @sample {highcharts} highcharts/plotoptions/area-linecolor/
39939
- * Dark gray line
39940
- *
39941
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
39942
- * @product highcharts highstock
39943
- * @apioption plotOptions.area.lineColor
39944
- */
39945
- /**
39946
- * A separate color for the negative part of the area.
39947
- *
39948
- * In styled mode, a negative color is set with the
39949
- * `.highcharts-negative` class name.
39950
- *
39951
- * @see [negativeColor](#plotOptions.area.negativeColor)
39952
- *
39953
- * @sample {highcharts} highcharts/css/series-negative-color/
39954
- * Negative color in styled mode
39955
- *
39956
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
39957
- * @since 3.0
39958
- * @product highcharts
39959
- * @apioption plotOptions.area.negativeFillColor
39960
- */
39961
- /**
39962
- * Whether the whole area or just the line should respond to mouseover
39963
- * tooltips and other mouse or touch events.
39964
- *
39965
- * @sample {highcharts|highstock} highcharts/plotoptions/area-trackbyarea/
39966
- * Display the tooltip when the area is hovered
39967
- *
39968
- * @type {boolean}
39969
- * @default false
39970
- * @since 1.1.6
39971
- * @product highcharts highstock
39972
- * @apioption plotOptions.area.trackByArea
39973
- */
39974
- /**
39975
- * The Y axis value to serve as the base for the area, for
39976
- * distinguishing between values above and below a threshold. The area
39977
- * between the graph and the threshold is filled.
39978
- *
39979
- * * If a number is given, the Y axis will scale to the threshold.
39980
- * * If `null`, the scaling behaves like a line series with fill between
39981
- * the graph and the Y axis minimum.
39982
- * * If `Infinity` or `-Infinity`, the area between the graph and the
39983
- * corresponding Y axis extreme is filled (since v6.1.0).
39984
- *
39985
- * @sample {highcharts} highcharts/plotoptions/area-threshold/
39986
- * A threshold of 100
39987
- * @sample {highcharts} highcharts/plotoptions/area-threshold-infinity/
39988
- * A threshold of Infinity
39989
- *
39990
- * @type {number|null}
39991
- * @since 2.0
39992
- * @product highcharts highstock
39993
- */
39994
- threshold: 0,
39995
- legendSymbol: 'areaMarker'
39996
- });
40215
+ AreaSeries.defaultOptions = merge(LineSeries.defaultOptions, AreaSeriesDefaults);
39997
40216
  extend(AreaSeries.prototype, {
39998
40217
  singleStacks: false
39999
40218
  });
@@ -40003,100 +40222,6 @@
40003
40222
  * Default Export
40004
40223
  *
40005
40224
  * */
40006
- /* *
40007
- *
40008
- * API Options
40009
- *
40010
- * */
40011
- /**
40012
- * A `area` series. If the [type](#series.area.type) option is not
40013
- * specified, it is inherited from [chart.type](#chart.type).
40014
- *
40015
- * @extends series,plotOptions.area
40016
- * @excluding dataParser, dataURL, useOhlcData
40017
- * @product highcharts highstock
40018
- * @apioption series.area
40019
- */
40020
- /**
40021
- * @see [fillColor](#series.area.fillColor)
40022
- * @see [fillOpacity](#series.area.fillOpacity)
40023
- *
40024
- * @apioption series.area.color
40025
- */
40026
- /**
40027
- * An array of data points for the series. For the `area` series type,
40028
- * points can be given in the following ways:
40029
- *
40030
- * 1. An array of numerical values. In this case, the numerical values will be
40031
- * interpreted as `y` options. The `x` values will be automatically
40032
- * calculated, either starting at 0 and incremented by 1, or from
40033
- * `pointStart` * and `pointInterval` given in the series options. If the
40034
- * axis has categories, these will be used. Example:
40035
- * ```js
40036
- * data: [0, 5, 3, 5]
40037
- * ```
40038
- *
40039
- * 2. An array of arrays with 2 values. In this case, the values correspond to
40040
- * `x,y`. If the first value is a string, it is applied as the name of the
40041
- * point, and the `x` value is inferred.
40042
- * ```js
40043
- * data: [
40044
- * [0, 9],
40045
- * [1, 7],
40046
- * [2, 6]
40047
- * ]
40048
- * ```
40049
- *
40050
- * 3. An array of objects with named values. The following snippet shows only a
40051
- * few settings, see the complete options set below. If the total number of
40052
- * data points exceeds the series'
40053
- * [turboThreshold](#series.area.turboThreshold), this option is not
40054
- * available.
40055
- * ```js
40056
- * data: [{
40057
- * x: 1,
40058
- * y: 9,
40059
- * name: "Point2",
40060
- * color: "#00FF00"
40061
- * }, {
40062
- * x: 1,
40063
- * y: 6,
40064
- * name: "Point1",
40065
- * color: "#FF00FF"
40066
- * }]
40067
- * ```
40068
- *
40069
- * @sample {highcharts} highcharts/chart/reflow-true/
40070
- * Numerical values
40071
- * @sample {highcharts} highcharts/series/data-array-of-arrays/
40072
- * Arrays of numeric x and y
40073
- * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
40074
- * Arrays of datetime x and y
40075
- * @sample {highcharts} highcharts/series/data-array-of-name-value/
40076
- * Arrays of point.name and y
40077
- * @sample {highcharts} highcharts/series/data-array-of-objects/
40078
- * Config objects
40079
- *
40080
- * @type {Array<number|Array<(number|string),(number|null)>|null|*>}
40081
- * @extends series.line.data
40082
- * @product highcharts highstock
40083
- * @apioption series.area.data
40084
- */
40085
- /**
40086
- * @see [color](#series.area.color)
40087
- * @see [fillOpacity](#series.area.fillOpacity)
40088
- *
40089
- * @apioption series.area.fillColor
40090
- */
40091
- /**
40092
- * @see [color](#series.area.color)
40093
- * @see [fillColor](#series.area.fillColor)
40094
- *
40095
- * @default {highcharts} 0.75
40096
- * @default {highstock} 0.75
40097
- * @apioption series.area.fillOpacity
40098
- */
40099
- ''; // Adds doclets above to transpiled
40100
40225
 
40101
40226
  return AreaSeries;
40102
40227
  });
@@ -41055,7 +41180,7 @@
41055
41180
  const { animObject } = A;
41056
41181
  const { parse: color } = Color;
41057
41182
  const { noop } = H;
41058
- const { clamp, defined, extend, fireEvent, isArray, isNumber, merge, pick, objectEach } = U;
41183
+ const { clamp, crisp, defined, extend, fireEvent, isArray, isNumber, merge, pick, objectEach } = U;
41059
41184
  /* *
41060
41185
  *
41061
41186
  * Class
@@ -41087,17 +41212,27 @@
41087
41212
  * Whether to initialize the animation or run it
41088
41213
  */
41089
41214
  animate(init) {
41090
- const series = this, yAxis = this.yAxis, yAxisPos = yAxis.pos, options = series.options, inverted = this.chart.inverted, attr = {}, translateProp = inverted ?
41215
+ const series = this, yAxis = this.yAxis, yAxisPos = yAxis.pos, reversed = yAxis.reversed, options = series.options, { clipOffset, inverted } = this.chart, attr = {}, translateProp = inverted ?
41091
41216
  'translateX' :
41092
41217
  'translateY';
41093
41218
  let translateStart, translatedThreshold;
41094
- if (init) {
41219
+ if (init && clipOffset) {
41095
41220
  attr.scaleY = 0.001;
41096
41221
  translatedThreshold = clamp(yAxis.toPixels(options.threshold), yAxisPos, yAxisPos + yAxis.len);
41097
41222
  if (inverted) {
41223
+ // Make sure the columns don't cover the axis line during
41224
+ // entrance animation
41225
+ translatedThreshold += reversed ?
41226
+ -Math.floor(clipOffset[0]) :
41227
+ Math.ceil(clipOffset[2]);
41098
41228
  attr.translateX = translatedThreshold - yAxis.len;
41099
41229
  }
41100
41230
  else {
41231
+ // Make sure the columns don't cover the axis line during
41232
+ // entrance animation
41233
+ translatedThreshold += reversed ?
41234
+ Math.ceil(clipOffset[0]) :
41235
+ -Math.floor(clipOffset[2]);
41101
41236
  attr.translateY = translatedThreshold;
41102
41237
  }
41103
41238
  // Apply final clipping (used in Highcharts Stock) (#7083)
@@ -41217,31 +41352,19 @@
41217
41352
  * @private
41218
41353
  * @function Highcharts.seriesTypes.column#crispCol
41219
41354
  */
41220
- crispCol(x, y, w, h) {
41221
- const borderWidth = this.borderWidth, xCrisp = -(borderWidth % 2 ? 0.5 : 0), yCrisp = borderWidth % 2 ? 0.5 : 1;
41222
- let right;
41355
+ crispCol(x, y, width, height) {
41356
+ const borderWidth = this.borderWidth, inverted = this.chart.inverted, bottom = crisp(y + height, borderWidth, inverted);
41357
+ // Vertical
41358
+ y = crisp(y, borderWidth, inverted);
41359
+ height = bottom - y;
41223
41360
  // Horizontal. We need to first compute the exact right edge, then
41224
41361
  // round it and compute the width from there.
41225
41362
  if (this.options.crisp) {
41226
- right = Math.round(x + w) + xCrisp;
41227
- x = Math.round(x) + xCrisp;
41228
- w = right - x;
41363
+ const right = crisp(x + width, borderWidth);
41364
+ x = crisp(x, borderWidth);
41365
+ width = right - x;
41229
41366
  }
41230
- // Vertical
41231
- const bottom = Math.round(y + h) + yCrisp, fromTop = Math.abs(y) <= 0.5 && bottom > 0.5; // #4504, #4656
41232
- y = Math.round(y) + yCrisp;
41233
- h = bottom - y;
41234
- // Top edges are exceptions
41235
- if (fromTop && h) { // #5146
41236
- y -= 1;
41237
- h += 1;
41238
- }
41239
- return {
41240
- x: x,
41241
- y: y,
41242
- width: w,
41243
- height: h
41244
- };
41367
+ return { x, y, width, height };
41245
41368
  }
41246
41369
  /**
41247
41370
  * Adjust for missing columns, according to the `centerInCategory`
@@ -41323,14 +41446,11 @@
41323
41446
  translate() {
41324
41447
  const series = this, chart = series.chart, options = series.options, dense = series.dense =
41325
41448
  series.closestPointRange * series.xAxis.transA < 2, borderWidth = series.borderWidth = pick(options.borderWidth, dense ? 0 : 1 // #3635
41326
- ), xAxis = series.xAxis, yAxis = series.yAxis, threshold = options.threshold, minPointLength = pick(options.minPointLength, 5), metrics = series.getColumnMetrics(), seriesPointWidth = metrics.width, seriesXOffset = series.pointXOffset = metrics.offset, dataMin = series.dataMin, dataMax = series.dataMax;
41449
+ ), xAxis = series.xAxis, yAxis = series.yAxis, threshold = options.threshold, minPointLength = pick(options.minPointLength, 5), metrics = series.getColumnMetrics(), seriesPointWidth = metrics.width, seriesXOffset = series.pointXOffset = metrics.offset, dataMin = series.dataMin, dataMax = series.dataMax, translatedThreshold = series.translatedThreshold =
41450
+ yAxis.getThreshold(threshold);
41327
41451
  // Postprocessed for border width
41328
41452
  let seriesBarW = series.barW =
41329
- Math.max(seriesPointWidth, 1 + 2 * borderWidth), translatedThreshold = series.translatedThreshold =
41330
- yAxis.getThreshold(threshold);
41331
- if (chart.inverted) {
41332
- translatedThreshold -= 0.5; // #3355
41333
- }
41453
+ Math.max(seriesPointWidth, 1 + 2 * borderWidth);
41334
41454
  // When the pointPadding is 0, we want the columns to be packed
41335
41455
  // tightly, so we allow individual columns to have individual sizes.
41336
41456
  // When pointPadding is greater, we strive for equal-width columns
@@ -41710,7 +41830,7 @@
41710
41830
  * @private
41711
41831
  */
41712
41832
  function alignDataLabel(point, dataLabel, options, alignTo, isNew) {
41713
- const series = this, chart = this.chart, inverted = this.isCartesian && chart.inverted, enabledDataSorting = this.enabledDataSorting, plotX = point.plotX, plotY = point.plotY, rotation = options.rotation || 0, isInsidePlot = defined(plotX) &&
41833
+ const series = this, { chart, enabledDataSorting } = this, inverted = this.isCartesian && chart.inverted, plotX = point.plotX, plotY = point.plotY, rotation = options.rotation || 0, isInsidePlot = defined(plotX) &&
41714
41834
  defined(plotY) &&
41715
41835
  chart.isInsidePlot(plotX, Math.round(plotY), {
41716
41836
  inverted,
@@ -41730,10 +41850,10 @@
41730
41850
  (enabledDataSorting && !justify) ||
41731
41851
  isInsidePlot ||
41732
41852
  (
41733
- // If the data label is inside the align box, it is
41734
- // enough that parts of the align box is inside the
41735
- // plot area (#12370). When stacking, it is always
41736
- // inside regardless of the option (#15148).
41853
+ // If the data label is inside the align box, it is enough
41854
+ // that parts of the align box is inside the plot area
41855
+ // (#12370). When stacking, it is always inside regardless
41856
+ // of the option (#15148).
41737
41857
  pick(options.inside, !!this.options.stacking) &&
41738
41858
  alignTo &&
41739
41859
  chart.isInsidePlot(plotX, inverted ?
@@ -41759,6 +41879,11 @@
41759
41879
  width: 0,
41760
41880
  height: 0
41761
41881
  }, alignTo || {});
41882
+ // Align to plot edges
41883
+ if (options.alignTo === 'plotEdges' && series.isCartesian) {
41884
+ alignTo[inverted ? 'x' : 'y'] = 0;
41885
+ alignTo[inverted ? 'width' : 'height'] = this.yAxis?.len || 0;
41886
+ }
41762
41887
  // Add the text size for alignment calculation
41763
41888
  extend(options, {
41764
41889
  width: bBox.width,
@@ -42096,10 +42221,12 @@
42096
42221
  * @private
42097
42222
  */
42098
42223
  function justifyDataLabel(dataLabel, options, alignAttr, bBox, alignTo, isNew) {
42099
- const chart = this.chart, align = options.align, verticalAlign = options.verticalAlign, padding = dataLabel.box ? 0 : (dataLabel.padding || 0);
42224
+ const chart = this.chart, align = options.align, verticalAlign = options.verticalAlign, padding = dataLabel.box ? 0 : (dataLabel.padding || 0), horizontalAxis = chart.inverted ? this.yAxis : this.xAxis, horizontalAxisShift = horizontalAxis ?
42225
+ horizontalAxis.left - chart.plotLeft : 0, verticalAxis = chart.inverted ? this.xAxis : this.yAxis, verticalAxisShift = verticalAxis ?
42226
+ verticalAxis.top - chart.plotTop : 0;
42100
42227
  let { x = 0, y = 0 } = options, off, justified;
42101
42228
  // Off left
42102
- off = (alignAttr.x || 0) + padding;
42229
+ off = (alignAttr.x || 0) + padding + horizontalAxisShift;
42103
42230
  if (off < 0) {
42104
42231
  if (align === 'right' && x >= 0) {
42105
42232
  options.align = 'left';
@@ -42111,7 +42238,7 @@
42111
42238
  justified = true;
42112
42239
  }
42113
42240
  // Off right
42114
- off = (alignAttr.x || 0) + bBox.width - padding;
42241
+ off = (alignAttr.x || 0) + bBox.width - padding + horizontalAxisShift;
42115
42242
  if (off > chart.plotWidth) {
42116
42243
  if (align === 'left' && x <= 0) {
42117
42244
  options.align = 'right';
@@ -42123,7 +42250,7 @@
42123
42250
  justified = true;
42124
42251
  }
42125
42252
  // Off top
42126
- off = alignAttr.y + padding;
42253
+ off = alignAttr.y + padding + verticalAxisShift;
42127
42254
  if (off < 0) {
42128
42255
  if (verticalAlign === 'bottom' && y >= 0) {
42129
42256
  options.verticalAlign = 'top';
@@ -42135,7 +42262,7 @@
42135
42262
  justified = true;
42136
42263
  }
42137
42264
  // Off bottom
42138
- off = (alignAttr.y || 0) + bBox.height - padding;
42265
+ off = (alignAttr.y || 0) + bBox.height - padding + verticalAxisShift;
42139
42266
  if (off > chart.plotHeight) {
42140
42267
  if (verticalAlign === 'top' && y <= 0) {
42141
42268
  options.verticalAlign = 'bottom';
@@ -42315,7 +42442,7 @@
42315
42442
  // If parts of the box overshoots outside the plot area, modify
42316
42443
  // the box to center the label inside
42317
42444
  const overshoot = alignTo.y + alignTo.height - yLen;
42318
- if (overshoot > 0 && overshoot < alignTo.height) {
42445
+ if (overshoot > 0 && overshoot < alignTo.height - 1) {
42319
42446
  alignTo.height -= overshoot;
42320
42447
  }
42321
42448
  }
@@ -46006,8 +46133,15 @@
46006
46133
  }
46007
46134
  // Record for tooltip etc.
46008
46135
  const point = this.series.points[index];
46136
+ const cumulativeStart = point.series.options.cumulativeStart, withinRange = point.x <= this.series.xAxis.max &&
46137
+ point.x >= this.series.xAxis.min;
46009
46138
  if (point) {
46010
- point.cumulativeSum = value;
46139
+ if (!cumulativeStart || withinRange) {
46140
+ point.cumulativeSum = value;
46141
+ }
46142
+ else {
46143
+ point.cumulativeSum = void 0;
46144
+ }
46011
46145
  }
46012
46146
  return value;
46013
46147
  }
@@ -46052,7 +46186,7 @@
46052
46186
  */
46053
46187
  /**
46054
46188
  * Defines if comparison should start from the first point within the visible
46055
- * range or should start from the first point **before** the range.
46189
+ * range or should start from the last point **before** the range.
46056
46190
  *
46057
46191
  * In other words, this flag determines if first point within the visible range
46058
46192
  * will have 0% (`compareStart=true`) or should have been already calculated
@@ -46102,6 +46236,23 @@
46102
46236
  * @product highstock
46103
46237
  * @apioption plotOptions.series.cumulative
46104
46238
  */
46239
+ /**
46240
+ * Defines if cumulation should start from the first point within the visible
46241
+ * range or should start from the last point **before** the range.
46242
+ *
46243
+ * In other words, this flag determines if first point within the visible range
46244
+ * will start at 0 (`cumulativeStart=true`) or should have been already calculated
46245
+ * according to the previous point (`cumulativeStart=false`).
46246
+ *
46247
+ * @sample {highstock} stock/plotoptions/series-cumulativestart/
46248
+ * Cumulative Start
46249
+ *
46250
+ * @type {boolean}
46251
+ * @default false
46252
+ * @since 11.4.2
46253
+ * @product highstock
46254
+ * @apioption plotOptions.series.cumulativeStart
46255
+ */
46105
46256
  ''; // Keeps doclets above in transpiled file
46106
46257
 
46107
46258
  return DataModifyComposition;
@@ -46551,6 +46702,15 @@
46551
46702
  * @since 6.0.0
46552
46703
  */
46553
46704
  width: 7,
46705
+ /**
46706
+ * Border radius of the handles.
46707
+ *
46708
+ * @sample {highstock} stock/navigator/handles-border-radius/
46709
+ * Border radius on the navigator handles.
46710
+ *
46711
+ * @since 11.4.2
46712
+ */
46713
+ borderRadius: 0,
46554
46714
  /**
46555
46715
  * Height for handles.
46556
46716
  *
@@ -46862,6 +47022,7 @@
46862
47022
  tickLength: 0,
46863
47023
  lineWidth: 0,
46864
47024
  gridLineColor: "#e6e6e6" /* Palette.neutralColor10 */,
47025
+ id: 'navigator-x-axis',
46865
47026
  gridLineWidth: 1,
46866
47027
  tickPixelInterval: 200,
46867
47028
  labels: {
@@ -46915,6 +47076,7 @@
46915
47076
  startOnTick: false,
46916
47077
  endOnTick: false,
46917
47078
  minPadding: 0.1,
47079
+ id: 'navigator-y-axis',
46918
47080
  maxPadding: 0.1,
46919
47081
  labels: {
46920
47082
  enabled: false
@@ -46953,7 +47115,7 @@
46953
47115
 
46954
47116
  return NavigatorDefaults;
46955
47117
  });
46956
- _registerModule(_modules, 'Stock/Navigator/NavigatorSymbols.js', [], function () {
47118
+ _registerModule(_modules, 'Stock/Navigator/NavigatorSymbols.js', [_modules['Core/Renderer/SVG/Symbols.js'], _modules['Core/Utilities.js']], function (rect, U) {
46957
47119
  /* *
46958
47120
  *
46959
47121
  * (c) 2010-2024 Torstein Honsi
@@ -46963,6 +47125,7 @@
46963
47125
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
46964
47126
  *
46965
47127
  * */
47128
+ const { relativeLength } = U;
46966
47129
  /* *
46967
47130
  *
46968
47131
  * Constants
@@ -46973,18 +47136,14 @@
46973
47136
  * @private
46974
47137
  */
46975
47138
  function navigatorHandle(_x, _y, width, height, options = {}) {
46976
- const halfWidth = options.width ? options.width / 2 : width, markerPosition = Math.round(halfWidth / 3) + 0.5;
47139
+ const halfWidth = options.width ? options.width / 2 : width, markerPosition = 1.5, r = relativeLength(options.borderRadius || 0, Math.min(halfWidth * 2, height));
46977
47140
  height = options.height || height;
46978
47141
  return [
46979
- ['M', -halfWidth - 1, 0.5],
46980
- ['L', halfWidth, 0.5],
46981
- ['L', halfWidth, height + 0.5],
46982
- ['L', -halfWidth - 1, height + 0.5],
46983
- ['L', -halfWidth - 1, 0.5],
46984
- ['M', -markerPosition, 4],
46985
- ['L', -markerPosition, height - 3],
46986
- ['M', markerPosition - 1, 4],
46987
- ['L', markerPosition - 1, height - 3]
47142
+ ['M', -markerPosition, height / 2 - 3.5],
47143
+ ['L', -markerPosition, height / 2 + 4.5],
47144
+ ['M', markerPosition - 1, height / 2 - 3.5],
47145
+ ['L', markerPosition - 1, height / 2 + 4.5],
47146
+ ...rect.rect(-halfWidth - 1, 0.5, halfWidth * 2 + 1, height, { r })
46988
47147
  ];
46989
47148
  }
46990
47149
  /* *
@@ -47537,7 +47696,7 @@
47537
47696
  *
47538
47697
  * */
47539
47698
  const { defaultOptions } = D;
47540
- const { addEvent, correctFloat, defined, destroyObjectProperties, fireEvent, merge, pick, removeEvent } = U;
47699
+ const { addEvent, correctFloat, crisp, defined, destroyObjectProperties, fireEvent, merge, pick, removeEvent } = U;
47541
47700
  /* *
47542
47701
  *
47543
47702
  * Constants
@@ -47769,9 +47928,8 @@
47769
47928
  rect.attr(rect.crisp({
47770
47929
  x: -0.5,
47771
47930
  y: -0.5,
47772
- // +1 to compensate for crispifying in rect method
47773
- width: size + 1,
47774
- height: size + 1,
47931
+ width: size,
47932
+ height: size,
47775
47933
  r: options.buttonBorderRadius
47776
47934
  }, rect.strokeWidth()));
47777
47935
  // Button arrow
@@ -47981,8 +48139,8 @@
47981
48139
  const trackBorderWidth = scroller.trackBorderWidth =
47982
48140
  scroller.track.strokeWidth();
47983
48141
  scroller.track.attr({
47984
- x: -trackBorderWidth % 2 / 2,
47985
- y: -trackBorderWidth % 2 / 2
48142
+ x: -crisp(0, trackBorderWidth),
48143
+ y: -crisp(0, trackBorderWidth)
47986
48144
  });
47987
48145
  // Draw the scrollbar itself
47988
48146
  scroller.scrollbarGroup = renderer.g().add(group);
@@ -48016,7 +48174,7 @@
48016
48174
  });
48017
48175
  }
48018
48176
  scroller.scrollbarStrokeWidth = scroller.scrollbar.strokeWidth();
48019
- scroller.scrollbarGroup.translate(-scroller.scrollbarStrokeWidth % 2 / 2, -scroller.scrollbarStrokeWidth % 2 / 2);
48177
+ scroller.scrollbarGroup.translate(-crisp(0, scroller.scrollbarStrokeWidth), -crisp(0, scroller.scrollbarStrokeWidth));
48020
48178
  // Draw the buttons:
48021
48179
  scroller.drawScrollbarButton(0);
48022
48180
  scroller.drawScrollbarButton(1);
@@ -49018,8 +49176,6 @@
49018
49176
  ordinal: baseXaxis.options.ordinal,
49019
49177
  overscroll: baseXaxis.options.overscroll
49020
49178
  }, navigatorOptions.xAxis, {
49021
- id: 'navigator-x-axis',
49022
- yAxis: 'navigator-y-axis',
49023
49179
  type: 'datetime',
49024
49180
  index: xAxisIndex,
49025
49181
  isInternal: true,
@@ -49038,7 +49194,6 @@
49038
49194
  height: height
49039
49195
  }), 'xAxis');
49040
49196
  navigator.yAxis = new Axis(chart, merge(navigatorOptions.yAxis, {
49041
- id: 'navigator-y-axis',
49042
49197
  alignTicks: false,
49043
49198
  offset: 0,
49044
49199
  index: yAxisIndex,
@@ -49190,8 +49345,8 @@
49190
49345
  linkedTo: null,
49191
49346
  group: 'nav',
49192
49347
  padXAxis: false,
49193
- xAxis: 'navigator-x-axis',
49194
- yAxis: 'navigator-y-axis',
49348
+ xAxis: this.navigatorOptions.xAxis?.id,
49349
+ yAxis: this.navigatorOptions.yAxis?.id,
49195
49350
  showInLegend: false,
49196
49351
  stacking: void 0,
49197
49352
  isInternal: true,
@@ -49746,7 +49901,7 @@
49746
49901
  }
49747
49902
  translatedArr[i] = lastTranslated = translated;
49748
49903
  }
49749
- distances.sort();
49904
+ distances.sort((a, b) => a - b);
49750
49905
  medianDistance = distances[Math.floor(distances.length / 2)];
49751
49906
  if (medianDistance < tickPixelIntervalOption * 0.6) {
49752
49907
  medianDistance = null;
@@ -51154,7 +51309,7 @@
51154
51309
  * */
51155
51310
  const { defaultOptions } = D;
51156
51311
  const { composed } = H;
51157
- const { addEvent, defined, extend, find, isNumber, merge, pick, pushUnique } = U;
51312
+ const { addEvent, defined, extend, isNumber, merge, pick, pushUnique } = U;
51158
51313
  /* *
51159
51314
  *
51160
51315
  * Constants
@@ -51238,13 +51393,13 @@
51238
51393
  if (pushUnique(composed, 'RangeSelector')) {
51239
51394
  const chartProto = ChartClass.prototype;
51240
51395
  AxisClass.prototype.minFromRange = axisMinFromRange;
51241
- addEvent(ChartClass, 'afterGetContainer', onChartAfterGetContainer);
51396
+ addEvent(ChartClass, 'afterGetContainer', createRangeSelector);
51242
51397
  addEvent(ChartClass, 'beforeRender', onChartBeforeRender);
51243
51398
  addEvent(ChartClass, 'destroy', onChartDestroy);
51244
51399
  addEvent(ChartClass, 'getMargins', onChartGetMargins);
51245
- addEvent(ChartClass, 'render', onChartRender);
51400
+ addEvent(ChartClass, 'redraw', redrawRangeSelector);
51246
51401
  addEvent(ChartClass, 'update', onChartUpdate);
51247
- chartProto.callbacks.push(onChartCallback);
51402
+ chartProto.callbacks.push(redrawRangeSelector);
51248
51403
  extend(defaultOptions, { rangeSelector: RangeSelectorDefaults.rangeSelector });
51249
51404
  extend(defaultOptions.lang, RangeSelectorDefaults.lang);
51250
51405
  }
@@ -51253,7 +51408,7 @@
51253
51408
  * Initialize rangeselector for stock charts
51254
51409
  * @private
51255
51410
  */
51256
- function onChartAfterGetContainer() {
51411
+ function createRangeSelector() {
51257
51412
  if (this.options.rangeSelector &&
51258
51413
  this.options.rangeSelector.enabled) {
51259
51414
  this.rangeSelector = new RangeSelectorConstructor(this);
@@ -51263,18 +51418,12 @@
51263
51418
  * @private
51264
51419
  */
51265
51420
  function onChartBeforeRender() {
51266
- const chart = this, axes = chart.axes, rangeSelector = chart.rangeSelector;
51421
+ const chart = this, rangeSelector = chart.rangeSelector;
51267
51422
  if (rangeSelector) {
51268
51423
  if (isNumber(rangeSelector.deferredYTDClick)) {
51269
51424
  rangeSelector.clickButton(rangeSelector.deferredYTDClick);
51270
51425
  delete rangeSelector.deferredYTDClick;
51271
51426
  }
51272
- axes.forEach((axis) => {
51273
- axis.updateNames();
51274
- axis.setScale();
51275
- });
51276
- chart.getAxisMargins();
51277
- rangeSelector.render();
51278
51427
  const verticalAlign = rangeSelector.options.verticalAlign;
51279
51428
  if (!rangeSelector.options.floating) {
51280
51429
  if (verticalAlign === 'bottom') {
@@ -51286,53 +51435,34 @@
51286
51435
  }
51287
51436
  }
51288
51437
  }
51289
- /**
51290
- * @private
51291
- */
51292
- function onChartCallback(chart) {
51293
- let extremes, legend, alignTo, verticalAlign;
51294
- const rangeSelector = chart.rangeSelector, redraw = () => {
51295
- if (rangeSelector) {
51296
- extremes = chart.xAxis[0].getExtremes();
51297
- legend = chart.legend;
51298
- verticalAlign = (rangeSelector &&
51299
- rangeSelector.options.verticalAlign);
51300
- if (isNumber(extremes.min)) {
51301
- rangeSelector.render(extremes.min, extremes.max);
51302
- }
51303
- // Re-align the legend so that it's below the rangeselector
51304
- if (legend.display &&
51305
- verticalAlign === 'top' &&
51306
- verticalAlign === legend.options.verticalAlign) {
51307
- // Create a new alignment box for the legend.
51308
- alignTo = merge(chart.spacingBox);
51309
- if (legend.options.layout === 'vertical') {
51310
- alignTo.y = chart.plotTop;
51311
- }
51312
- else {
51313
- alignTo.y += rangeSelector.getHeight();
51314
- }
51315
- legend.group.placed = false; // Don't animate the alignment.
51316
- legend.align(alignTo);
51317
- }
51438
+ function redrawRangeSelector() {
51439
+ const chart = this;
51440
+ const rangeSelector = this.rangeSelector;
51441
+ if (!rangeSelector) {
51442
+ return;
51443
+ }
51444
+ let alignTo;
51445
+ const extremes = chart.xAxis[0].getExtremes();
51446
+ const legend = chart.legend;
51447
+ const verticalAlign = (rangeSelector &&
51448
+ rangeSelector.options.verticalAlign);
51449
+ if (isNumber(extremes.min)) {
51450
+ rangeSelector.render(extremes.min, extremes.max);
51451
+ }
51452
+ // Re-align the legend so that it's below the rangeselector
51453
+ if (legend.display &&
51454
+ verticalAlign === 'top' &&
51455
+ verticalAlign === legend.options.verticalAlign) {
51456
+ // Create a new alignment box for the legend.
51457
+ alignTo = merge(chart.spacingBox);
51458
+ if (legend.options.layout === 'vertical') {
51459
+ alignTo.y = chart.plotTop;
51318
51460
  }
51319
- };
51320
- if (rangeSelector) {
51321
- const events = find(chartDestroyEvents, (e) => e[0] === chart);
51322
- if (!events) {
51323
- chartDestroyEvents.push([chart, [
51324
- // Redraw the scroller on setExtremes
51325
- addEvent(chart.xAxis[0], 'afterSetExtremes', function (e) {
51326
- if (rangeSelector) {
51327
- rangeSelector.render(e.min, e.max);
51328
- }
51329
- }),
51330
- // Redraw the scroller chart resize
51331
- addEvent(chart, 'redraw', redraw)
51332
- ]]);
51461
+ else {
51462
+ alignTo.y += rangeSelector.getHeight();
51333
51463
  }
51334
- // Do it now
51335
- redraw();
51464
+ legend.group.placed = false; // Don't animate the alignment.
51465
+ legend.align(alignTo);
51336
51466
  }
51337
51467
  }
51338
51468
  /**
@@ -51364,22 +51494,6 @@
51364
51494
  }
51365
51495
  }
51366
51496
  }
51367
- /**
51368
- * @private
51369
- */
51370
- function onChartRender() {
51371
- const chart = this, rangeSelector = chart.rangeSelector;
51372
- if (rangeSelector && !rangeSelector.options.floating) {
51373
- rangeSelector.render();
51374
- const verticalAlign = rangeSelector.options.verticalAlign;
51375
- if (verticalAlign === 'bottom') {
51376
- this.extraBottomMargin = true;
51377
- }
51378
- else if (verticalAlign !== 'middle') {
51379
- this.extraTopMargin = true;
51380
- }
51381
- }
51382
- }
51383
51497
  /**
51384
51498
  * @private
51385
51499
  */
@@ -51396,7 +51510,6 @@
51396
51510
  this.extraBottomMargin = false;
51397
51511
  this.extraTopMargin = false;
51398
51512
  if (rangeSelector) {
51399
- onChartCallback(this);
51400
51513
  const verticalAlign = (optionsRangeSelector &&
51401
51514
  optionsRangeSelector.verticalAlign) || (rangeSelector.options && rangeSelector.options.verticalAlign);
51402
51515
  if (!rangeSelector.options.floating) {
@@ -51424,7 +51537,7 @@
51424
51537
 
51425
51538
  return RangeSelectorComposition;
51426
51539
  });
51427
- _registerModule(_modules, 'Stock/RangeSelector/RangeSelector.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Defaults.js'], _modules['Core/Globals.js'], _modules['Stock/RangeSelector/RangeSelectorComposition.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (Axis, D, H, RangeSelectorComposition, SVGElement, U) {
51540
+ _registerModule(_modules, 'Stock/RangeSelector/RangeSelector.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Defaults.js'], _modules['Core/Globals.js'], _modules['Stock/RangeSelector/RangeSelectorComposition.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js'], _modules['Core/Axis/OrdinalAxis.js']], function (Axis, D, H, RangeSelectorComposition, SVGElement, U, OrdinalAxis) {
51428
51541
  /* *
51429
51542
  *
51430
51543
  * (c) 2010-2024 Torstein Honsi
@@ -51500,7 +51613,6 @@
51500
51613
  constructor(chart) {
51501
51614
  this.buttonOptions = RangeSelector.prototype.defaultButtons;
51502
51615
  this.initialButtonGroupWidth = 0;
51503
- this.chart = chart;
51504
51616
  this.init(chart);
51505
51617
  }
51506
51618
  /* *
@@ -51521,7 +51633,7 @@
51521
51633
  clickButton(i, redraw) {
51522
51634
  const rangeSelector = this, chart = rangeSelector.chart, rangeOptions = rangeSelector.buttonOptions[i], baseAxis = chart.xAxis[0], unionExtremes = (chart.scroller && chart.scroller.getUnionExtremes()) || baseAxis || {}, type = rangeOptions.type, dataGrouping = rangeOptions.dataGrouping;
51523
51635
  let dataMin = unionExtremes.dataMin, dataMax = unionExtremes.dataMax, newMin, newMax = baseAxis && Math.round(Math.min(baseAxis.max, pick(dataMax, baseAxis.max))), // #1568
51524
- baseXAxisOptions, range = rangeOptions._range, rangeMin, minSetting, rangeSetting, ctx, ytdExtremes, addOffsetMin = true;
51636
+ baseXAxisOptions, range = rangeOptions._range, rangeMin, ctx, ytdExtremes, addOffsetMin = true;
51525
51637
  // Chart has no data, base series is removed
51526
51638
  if (dataMin === null || dataMax === null) {
51527
51639
  return;
@@ -51619,16 +51731,20 @@
51619
51731
  // Update the chart
51620
51732
  if (!baseAxis) {
51621
51733
  // Axis not yet instantiated. Temporarily set min and range
51622
- // options and remove them on chart load (#4317).
51734
+ // options and axes once defined and remove them on
51735
+ // chart load (#4317 & #20529).
51623
51736
  baseXAxisOptions = splat(chart.options.xAxis)[0];
51624
- rangeSetting = baseXAxisOptions.range;
51625
- baseXAxisOptions.range = range;
51626
- minSetting = baseXAxisOptions.min;
51627
- baseXAxisOptions.min = rangeMin;
51737
+ const axisRangeUpdateEvent = addEvent(chart, 'afterGetAxes', function () {
51738
+ const xAxis = chart.xAxis[0];
51739
+ xAxis.range = xAxis.options.range = range;
51740
+ xAxis.min = xAxis.options.min = rangeMin;
51741
+ });
51628
51742
  addEvent(chart, 'load', function resetMinAndRange() {
51743
+ const xAxis = chart.xAxis[0];
51629
51744
  chart.setFixedRange(rangeOptions._range);
51630
- baseXAxisOptions.range = rangeSetting;
51631
- baseXAxisOptions.min = minSetting;
51745
+ xAxis.options.range = baseXAxisOptions.range;
51746
+ xAxis.options.min = baseXAxisOptions.min;
51747
+ axisRangeUpdateEvent(); // Remove event
51632
51748
  });
51633
51749
  }
51634
51750
  else {
@@ -51702,6 +51818,7 @@
51702
51818
  });
51703
51819
  }
51704
51820
  }));
51821
+ this.createElements();
51705
51822
  }
51706
51823
  /**
51707
51824
  * Dynamically update the range selector buttons after a new range has been
@@ -51711,25 +51828,25 @@
51711
51828
  * @function Highcharts.RangeSelector#updateButtonStates
51712
51829
  */
51713
51830
  updateButtonStates() {
51714
- const rangeSelector = this, chart = this.chart, dropdown = this.dropdown, baseAxis = chart.xAxis[0], actualRange = Math.round(baseAxis.max - baseAxis.min), hasNoData = !baseAxis.hasVisibleSeries, day = 24 * 36e5, // A single day in milliseconds
51831
+ const rangeSelector = this, chart = this.chart, dropdown = this.dropdown, dropdownLabel = this.dropdownLabel, baseAxis = chart.xAxis[0], actualRange = Math.round(baseAxis.max - baseAxis.min), hasNoData = !baseAxis.hasVisibleSeries, day = 24 * 36e5, // A single day in milliseconds
51715
51832
  unionExtremes = (chart.scroller &&
51716
- chart.scroller.getUnionExtremes()) || baseAxis, dataMin = unionExtremes.dataMin, dataMax = unionExtremes.dataMax, ytdExtremes = rangeSelector.getYTDExtremes(dataMax, dataMin, chart.time.useUTC), ytdMin = ytdExtremes.min, ytdMax = ytdExtremes.max, selected = rangeSelector.selected, allButtonsEnabled = rangeSelector.options.allButtonsEnabled, buttons = rangeSelector.buttons;
51717
- let selectedExists = isNumber(selected), isSelectedTooGreat = false;
51833
+ chart.scroller.getUnionExtremes()) || baseAxis, dataMin = unionExtremes.dataMin, dataMax = unionExtremes.dataMax, ytdExtremes = rangeSelector.getYTDExtremes(dataMax, dataMin, chart.time.useUTC), ytdMin = ytdExtremes.min, ytdMax = ytdExtremes.max, selected = rangeSelector.selected, allButtonsEnabled = rangeSelector.options.allButtonsEnabled, buttonStates = new Array(rangeSelector.buttonOptions.length)
51834
+ .fill(0), selectedExists = isNumber(selected), buttons = rangeSelector.buttons;
51835
+ let isSelectedTooGreat = false, selectedIndex = null;
51718
51836
  rangeSelector.buttonOptions.forEach((rangeOptions, i) => {
51719
- const range = rangeOptions._range, type = rangeOptions.type, count = rangeOptions.count || 1, button = buttons[i], offsetRange = rangeOptions._offsetMax -
51837
+ const range = rangeOptions._range, type = rangeOptions.type, count = rangeOptions.count || 1, offsetRange = rangeOptions._offsetMax -
51720
51838
  rangeOptions._offsetMin, isSelected = i === selected,
51721
- // Disable buttons where the range exceeds what is allowed in
51839
+ // Disable buttons where the range exceeds what is allowed i;
51722
51840
  // the current view
51723
51841
  isTooGreatRange = range >
51724
51842
  dataMax - dataMin,
51725
51843
  // Disable buttons where the range is smaller than the minimum
51726
51844
  // range
51727
51845
  isTooSmallRange = range < baseAxis.minRange;
51728
- let state = 0,
51729
51846
  // Do not select the YTD button if not explicitly told so
51730
- isYTDButNotSelected = false,
51847
+ let isYTDButNotSelected = false,
51731
51848
  // Disable the All button if we're already showing all
51732
- isAllButAlreadyShowingAll = false, isSameRange = range === actualRange;
51849
+ isSameRange = range === actualRange;
51733
51850
  if (isSelected && isTooGreatRange) {
51734
51851
  isSelectedTooGreat = true;
51735
51852
  }
@@ -51738,8 +51855,9 @@
51738
51855
  range &&
51739
51856
  actualRange < range) {
51740
51857
  // Handle ordinal ranges
51741
- const positions = baseAxis.ordinal.positions;
51742
- if (positions[positions.length - 1] - positions[0] > range) {
51858
+ const positions = baseAxis.ordinal.positions, prevOrdinalPosition = OrdinalAxis.Additions.findIndexOf(positions, baseAxis.min, true), nextOrdinalPosition = Math.min(OrdinalAxis.Additions.findIndexOf(positions, baseAxis.max, true) + 1, positions.length - 1);
51859
+ if (positions[nextOrdinalPosition] -
51860
+ positions[prevOrdinalPosition] > range) {
51743
51861
  isSameRange = true;
51744
51862
  }
51745
51863
  }
@@ -51759,9 +51877,6 @@
51759
51877
  else if (type === 'all') {
51760
51878
  isSameRange = (baseAxis.max - baseAxis.min >=
51761
51879
  dataMax - dataMin);
51762
- isAllButAlreadyShowingAll = (!isSelected &&
51763
- selectedExists &&
51764
- isSameRange);
51765
51880
  }
51766
51881
  // The new zoom area happens to match the range for a button - mark
51767
51882
  // it selected. This happens when scrolling across an ordinal gap.
@@ -51771,38 +51886,56 @@
51771
51886
  !(isSelectedTooGreat && type === 'all') &&
51772
51887
  (isTooGreatRange ||
51773
51888
  isTooSmallRange ||
51774
- isAllButAlreadyShowingAll ||
51775
51889
  hasNoData));
51776
51890
  const select = ((isSelectedTooGreat && type === 'all') ||
51777
- (isSelected && isSameRange) ||
51778
- (isSameRange && !selectedExists && !isYTDButNotSelected) ||
51891
+ (isYTDButNotSelected ? false : isSameRange) ||
51779
51892
  (isSelected && rangeSelector.frozenStates));
51780
51893
  if (disable) {
51781
- state = 3;
51894
+ buttonStates[i] = 3;
51782
51895
  }
51783
51896
  else if (select) {
51784
- selectedExists = true; // Only one button can be selected
51785
- state = 2;
51897
+ if (!selectedExists || i === selected) {
51898
+ selectedIndex = i;
51899
+ }
51786
51900
  }
51787
- // If state has changed, update the button
51901
+ });
51902
+ if (selectedIndex !== null) {
51903
+ buttonStates[selectedIndex] = 2;
51904
+ rangeSelector.setSelected(selectedIndex);
51905
+ }
51906
+ else {
51907
+ rangeSelector.setSelected();
51908
+ if (dropdownLabel) {
51909
+ dropdownLabel.setState(0);
51910
+ dropdownLabel.attr({
51911
+ text: (defaultOptions.lang.rangeSelectorZoom || '') + ' ▾'
51912
+ });
51913
+ }
51914
+ }
51915
+ for (let i = 0; i < buttonStates.length; i++) {
51916
+ const state = buttonStates[i];
51917
+ const button = buttons[i];
51788
51918
  if (button.state !== state) {
51789
51919
  button.setState(state);
51790
51920
  if (dropdown) {
51791
- dropdown.options[i + 1].disabled = disable;
51921
+ dropdown.options[i + 1].disabled = (state === 3);
51792
51922
  if (state === 2) {
51923
+ if (dropdownLabel) {
51924
+ dropdownLabel.setState(2);
51925
+ dropdownLabel.attr({
51926
+ text: rangeSelector.buttonOptions[i].text + ' ▾'
51927
+ });
51928
+ }
51793
51929
  dropdown.selectedIndex = i + 1;
51794
51930
  }
51795
- }
51796
- // Reset (#9209)
51797
- if (state === 0 && selected === i) {
51798
- rangeSelector.setSelected();
51799
- }
51800
- else if ((state === 2 && !defined(selected)) ||
51801
- isSelectedTooGreat) {
51802
- rangeSelector.setSelected(i);
51931
+ const bbox = dropdownLabel.getBBox();
51932
+ css(dropdown, {
51933
+ width: `${bbox.width}px`,
51934
+ height: `${bbox.height}px`
51935
+ });
51803
51936
  }
51804
51937
  }
51805
- });
51938
+ }
51806
51939
  }
51807
51940
  /**
51808
51941
  * Compute and cache the range for an individual button
@@ -52000,12 +52133,10 @@
52000
52133
  /**
52001
52134
  * @private
52002
52135
  */
52003
- function updateExtremes() {
52004
- const { maxInput, minInput } = rangeSelector, chartAxis = chart.xAxis[0], unionExtremes = (chart.scroller && chart.scroller.getUnionExtremes()) || chartAxis, dataMin = unionExtremes.dataMin, dataMax = unionExtremes.dataMax;
52136
+ function updateExtremes(name) {
52137
+ const { maxInput, minInput } = rangeSelector, chartAxis = chart.xAxis[0], unionExtremes = chart.scroller?.getUnionExtremes() || chartAxis, dataMin = unionExtremes.dataMin, dataMax = unionExtremes.dataMax, currentExtreme = chart.xAxis[0].getExtremes()[name];
52005
52138
  let value = rangeSelector.getInputValue(name);
52006
- if (value !== Number(input.getAttribute('data-hc-time-previous')) &&
52007
- isNumber(value)) {
52008
- input.setAttribute('data-hc-time-previous', value);
52139
+ if (isNumber(value) && value !== currentExtreme) {
52009
52140
  // Validate the extremes. If it goes beyond the data min or
52010
52141
  // max, use the actual data extreme (#2438).
52011
52142
  if (isMin && maxInput && isNumber(dataMin)) {
@@ -52102,7 +52233,7 @@
52102
52233
  if (input === H.doc.activeElement) { // Only when focused
52103
52234
  // Update also when no `change` event is triggered, like when
52104
52235
  // clicking inside the SVG (#4710)
52105
- updateExtremes();
52236
+ updateExtremes(name);
52106
52237
  }
52107
52238
  // #10404 - move hide and blur outside focus
52108
52239
  rangeSelector.hideInput(name);
@@ -52114,7 +52245,7 @@
52114
52245
  input.onchange = () => {
52115
52246
  // Update extremes and blur input when clicking date input calendar
52116
52247
  if (!keyDown) {
52117
- updateExtremes();
52248
+ updateExtremes(name);
52118
52249
  rangeSelector.hideInput(name);
52119
52250
  input.blur();
52120
52251
  }
@@ -52122,14 +52253,16 @@
52122
52253
  input.onkeypress = (event) => {
52123
52254
  // IE does not fire onchange on enter
52124
52255
  if (event.keyCode === 13) {
52125
- updateExtremes();
52256
+ updateExtremes(name);
52126
52257
  }
52127
52258
  };
52128
52259
  input.onkeydown = (event) => {
52129
52260
  keyDown = true;
52130
52261
  // Arrow keys
52131
- if (event.keyCode === 38 || event.keyCode === 40) {
52132
- updateExtremes();
52262
+ if (event.key === 'ArrowUp' ||
52263
+ event.key === 'ArrowDown' ||
52264
+ event.key === 'Tab') {
52265
+ updateExtremes(name);
52133
52266
  }
52134
52267
  };
52135
52268
  input.onkeyup = () => {
@@ -52172,6 +52305,42 @@
52172
52305
  min
52173
52306
  };
52174
52307
  }
52308
+ createElements() {
52309
+ const chart = this.chart, renderer = chart.renderer, container = chart.container, chartOptions = chart.options, options = chartOptions.rangeSelector, inputEnabled = options.inputEnabled, inputsZIndex = pick(chartOptions.chart.style?.zIndex, 0) + 1;
52310
+ if (options.enabled === false) {
52311
+ return;
52312
+ }
52313
+ this.group = renderer.g('range-selector-group')
52314
+ .attr({
52315
+ zIndex: 7
52316
+ })
52317
+ .add();
52318
+ this.div = createElement('div', void 0, {
52319
+ position: 'relative',
52320
+ height: 0,
52321
+ zIndex: inputsZIndex
52322
+ });
52323
+ if (this.buttonOptions.length) {
52324
+ this.renderButtons();
52325
+ }
52326
+ // First create a wrapper outside the container in order to make
52327
+ // the inputs work and make export correct
52328
+ if (container.parentNode) {
52329
+ container.parentNode.insertBefore(this.div, container);
52330
+ }
52331
+ if (inputEnabled) {
52332
+ // Create the group to keep the inputs
52333
+ this.inputGroup = renderer.g('input-group').add(this.group);
52334
+ const minElems = this.drawInput('min');
52335
+ this.minDateBox = minElems.dateBox;
52336
+ this.minLabel = minElems.label;
52337
+ this.minInput = minElems.input;
52338
+ const maxElems = this.drawInput('max');
52339
+ this.maxDateBox = maxElems.dateBox;
52340
+ this.maxLabel = maxElems.label;
52341
+ this.maxInput = maxElems.input;
52342
+ }
52343
+ }
52175
52344
  /**
52176
52345
  * Render the range selector including the buttons and the inputs. The first
52177
52346
  * time render is called, the elements are created and positioned. On
@@ -52185,46 +52354,12 @@
52185
52354
  * X axis maximum
52186
52355
  */
52187
52356
  render(min, max) {
52188
- const chart = this.chart, renderer = chart.renderer, container = chart.container, chartOptions = chart.options, options = chartOptions.rangeSelector,
52357
+ const chart = this.chart, chartOptions = chart.options, options = chartOptions.rangeSelector,
52189
52358
  // Place inputs above the container
52190
- inputsZIndex = pick(chartOptions.chart.style &&
52191
- chartOptions.chart.style.zIndex, 0) + 1, inputEnabled = options.inputEnabled, rendered = this.rendered;
52359
+ inputEnabled = options.inputEnabled;
52192
52360
  if (options.enabled === false) {
52193
52361
  return;
52194
52362
  }
52195
- // Create the elements
52196
- if (!rendered) {
52197
- this.group = renderer.g('range-selector-group')
52198
- .attr({
52199
- zIndex: 7
52200
- })
52201
- .add();
52202
- this.div = createElement('div', void 0, {
52203
- position: 'relative',
52204
- height: 0,
52205
- zIndex: inputsZIndex
52206
- });
52207
- if (this.buttonOptions.length) {
52208
- this.renderButtons();
52209
- }
52210
- // First create a wrapper outside the container in order to make
52211
- // the inputs work and make export correct
52212
- if (container.parentNode) {
52213
- container.parentNode.insertBefore(this.div, container);
52214
- }
52215
- if (inputEnabled) {
52216
- // Create the group to keep the inputs
52217
- this.inputGroup = renderer.g('input-group').add(this.group);
52218
- const minElems = this.drawInput('min');
52219
- this.minDateBox = minElems.dateBox;
52220
- this.minLabel = minElems.label;
52221
- this.minInput = minElems.input;
52222
- const maxElems = this.drawInput('max');
52223
- this.maxDateBox = maxElems.dateBox;
52224
- this.maxLabel = maxElems.label;
52225
- this.maxInput = maxElems.input;
52226
- }
52227
- }
52228
52363
  if (inputEnabled) {
52229
52364
  // Set or reset the input values
52230
52365
  this.setInputValue('min', min);
@@ -52256,7 +52391,7 @@
52256
52391
  }
52257
52392
  }
52258
52393
  this.alignElements();
52259
- this.rendered = true;
52394
+ this.updateButtonStates();
52260
52395
  }
52261
52396
  /**
52262
52397
  * Render the range buttons. This only runs the first time, later the
@@ -52280,33 +52415,39 @@
52280
52415
  this.buttonGroup = renderer.g('range-selector-buttons').add(this.group);
52281
52416
  const dropdown = this.dropdown = createElement('select', void 0, {
52282
52417
  position: 'absolute',
52283
- width: '1px',
52284
- height: '1px',
52285
52418
  padding: 0,
52286
52419
  border: 0,
52287
- top: '-9999em',
52288
52420
  cursor: 'pointer',
52289
52421
  opacity: 0.0001
52290
52422
  }, this.div);
52423
+ // Create a label for dropdown select element
52424
+ const userButtonTheme = chart.userOptions.rangeSelector?.buttonTheme;
52425
+ this.dropdownLabel = renderer.button('', 0, 0, () => { }, merge(buttonTheme, {
52426
+ 'stroke-width': pick(buttonTheme['stroke-width'], 0),
52427
+ width: 'auto',
52428
+ paddingLeft: pick(options.buttonTheme.paddingLeft, userButtonTheme?.padding, 8),
52429
+ paddingRight: pick(options.buttonTheme.paddingRight, userButtonTheme?.padding, 8)
52430
+ }), states && states.hover, states && states.select, states && states.disabled)
52431
+ .hide()
52432
+ .add(this.group);
52291
52433
  // Prevent page zoom on iPhone
52292
52434
  addEvent(dropdown, 'touchstart', () => {
52293
52435
  dropdown.style.fontSize = '16px';
52294
52436
  });
52295
52437
  // Forward events from select to button
52296
- [
52297
- [H.isMS ? 'mouseover' : 'mouseenter'],
52298
- [H.isMS ? 'mouseout' : 'mouseleave'],
52299
- ['change', 'click']
52300
- ].forEach(([from, to]) => {
52301
- addEvent(dropdown, from, () => {
52302
- const button = buttons[this.currentButtonIndex()];
52303
- if (button) {
52304
- fireEvent(button.element, to || from);
52305
- }
52306
- });
52438
+ const mouseOver = H.isMS ? 'mouseover' : 'mouseenter', mouseOut = H.isMS ? 'mouseout' : 'mouseleave';
52439
+ addEvent(dropdown, mouseOver, () => {
52440
+ fireEvent(this.dropdownLabel.element, mouseOver);
52441
+ });
52442
+ addEvent(dropdown, mouseOut, () => {
52443
+ fireEvent(this.dropdownLabel.element, mouseOut);
52444
+ });
52445
+ addEvent(dropdown, 'change', () => {
52446
+ const button = this.buttons[dropdown.selectedIndex - 1];
52447
+ fireEvent(button.element, 'click');
52307
52448
  });
52308
52449
  this.zoomText = renderer
52309
- .label((lang && lang.rangeSelectorZoom) || '', 0)
52450
+ .label(lang.rangeSelectorZoom || '', 0)
52310
52451
  .attr({
52311
52452
  padding: options.buttonTheme.padding,
52312
52453
  height: options.buttonTheme.height,
@@ -52398,10 +52539,13 @@
52398
52539
  this.initialButtonGroupWidth = width;
52399
52540
  }
52400
52541
  plotLeft -= chart.spacing[3];
52401
- this.updateButtonStates();
52402
52542
  // Detect collision between button group and exporting
52403
52543
  const xOffsetForExportButton = getXOffsetForExportButton(buttonGroup, buttonPosition);
52404
52544
  this.alignButtonGroup(xOffsetForExportButton);
52545
+ if (this.buttonGroup?.translateY) {
52546
+ this.dropdownLabel
52547
+ .attr({ y: this.buttonGroup.translateY });
52548
+ }
52405
52549
  // Skip animation
52406
52550
  group.placed = buttonGroup.placed = chart.hasLoaded;
52407
52551
  }
@@ -52571,7 +52715,7 @@
52571
52715
  return buttonWidth;
52572
52716
  };
52573
52717
  const groupsOverlap = (buttonGroupWidth) => {
52574
- if (inputGroup && buttonGroup) {
52718
+ if (inputGroup?.alignOptions && buttonGroup) {
52575
52719
  const inputGroupX = (inputGroup.alignAttr.translateX +
52576
52720
  inputGroup.alignOptions.x -
52577
52721
  xOffsetForExportButton +
@@ -52579,7 +52723,7 @@
52579
52723
  inputGroup.getBBox().x +
52580
52724
  // 2px padding to not overlap input and label
52581
52725
  2);
52582
- const inputGroupWidth = inputGroup.alignOptions.width;
52726
+ const inputGroupWidth = inputGroup.alignOptions.width || 0;
52583
52727
  const buttonGroupX = buttonGroup.alignAttr.translateX +
52584
52728
  buttonGroup.getBBox().x;
52585
52729
  return (buttonGroupX + buttonGroupWidth > inputGroupX) &&
@@ -52603,7 +52747,7 @@
52603
52747
  };
52604
52748
  if (buttonGroup) {
52605
52749
  if (dropdown === 'always') {
52606
- this.collapseButtons(xOffsetForExportButton);
52750
+ this.collapseButtons();
52607
52751
  if (groupsOverlap(maxButtonWidth())) {
52608
52752
  // Move the inputs down if there is still a collision
52609
52753
  // after collapsing the buttons
@@ -52621,7 +52765,7 @@
52621
52765
  // 20 is minimal spacing between elements
52622
52766
  groupsOverlap(this.initialButtonGroupWidth + 20)) {
52623
52767
  if (dropdown === 'responsive') {
52624
- this.collapseButtons(xOffsetForExportButton);
52768
+ this.collapseButtons();
52625
52769
  if (groupsOverlap(maxButtonWidth())) {
52626
52770
  moveInputsDown();
52627
52771
  }
@@ -52636,7 +52780,7 @@
52636
52780
  }
52637
52781
  else if (buttonGroup && dropdown === 'responsive') {
52638
52782
  if (this.initialButtonGroupWidth > chart.plotWidth) {
52639
- this.collapseButtons(xOffsetForExportButton);
52783
+ this.collapseButtons();
52640
52784
  }
52641
52785
  else {
52642
52786
  this.expandButtons();
@@ -52644,54 +52788,20 @@
52644
52788
  }
52645
52789
  }
52646
52790
  /**
52647
- * Collapse the buttons and put the select element on top.
52791
+ * Collapse the buttons and show the select element.
52648
52792
  *
52649
52793
  * @private
52650
52794
  * @function Highcharts.RangeSelector#collapseButtons
52651
52795
  * @param {number} xOffsetForExportButton
52652
52796
  */
52653
- collapseButtons(xOffsetForExportButton) {
52654
- const { buttons, buttonOptions, chart, dropdown, options, zoomText } = this;
52655
- // If the buttons are already collapsed do nothing.
52797
+ collapseButtons() {
52798
+ const { buttons, zoomText } = this;
52656
52799
  if (this.isCollapsed === true) {
52657
52800
  return;
52658
52801
  }
52659
52802
  this.isCollapsed = true;
52660
- const userButtonTheme = (chart.userOptions.rangeSelector &&
52661
- chart.userOptions.rangeSelector.buttonTheme) || {};
52662
- const getAttribs = (text) => ({
52663
- text: text ? `${text} ▾` : '▾',
52664
- width: 'auto',
52665
- paddingLeft: pick(options.buttonTheme.paddingLeft, userButtonTheme.padding, 8),
52666
- paddingRight: pick(options.buttonTheme.paddingRight, userButtonTheme.padding, 8)
52667
- });
52668
- if (zoomText) {
52669
- zoomText.hide();
52670
- }
52671
- let hasActiveButton = false;
52672
- buttonOptions.forEach((rangeOptions, i) => {
52673
- const button = buttons[i];
52674
- if (button.state !== 2) {
52675
- button.hide();
52676
- }
52677
- else {
52678
- button.show();
52679
- button.attr(getAttribs(rangeOptions.text));
52680
- hasActiveButton = true;
52681
- }
52682
- });
52683
- if (!hasActiveButton) {
52684
- if (dropdown) {
52685
- dropdown.selectedIndex = 0;
52686
- }
52687
- buttons[0].show();
52688
- buttons[0].attr(getAttribs(this.zoomText && this.zoomText.textStr));
52689
- }
52690
- const { align } = options.buttonPosition;
52691
- this.positionButtons();
52692
- if (align === 'right' || align === 'center') {
52693
- this.alignButtonGroup(xOffsetForExportButton, buttons[this.currentButtonIndex()].getBBox().width);
52694
- }
52803
+ zoomText.hide();
52804
+ buttons.forEach((button) => void button.hide());
52695
52805
  this.showDropdown();
52696
52806
  }
52697
52807
  /**
@@ -52701,44 +52811,16 @@
52701
52811
  * @function Highcharts.RangeSelector#expandButtons
52702
52812
  */
52703
52813
  expandButtons() {
52704
- const { buttons, buttonOptions, options, zoomText } = this;
52705
- this.hideDropdown();
52706
- // If buttons are already not collapsed, do nothing.
52814
+ const { buttons, zoomText } = this;
52707
52815
  if (this.isCollapsed === false) {
52708
52816
  return;
52709
52817
  }
52710
52818
  this.isCollapsed = false;
52711
- if (zoomText) {
52712
- zoomText.show();
52713
- }
52714
- buttonOptions.forEach((rangeOptions, i) => {
52715
- const button = buttons[i];
52716
- button.show();
52717
- button.attr({
52718
- text: rangeOptions.text,
52719
- width: options.buttonTheme.width || 28,
52720
- paddingLeft: pick(options.buttonTheme.paddingLeft, 'unset'),
52721
- paddingRight: pick(options.buttonTheme.paddingRight, 'unset')
52722
- });
52723
- if (button.state < 2) {
52724
- button.setState(0);
52725
- }
52726
- });
52819
+ this.hideDropdown();
52820
+ zoomText.show();
52821
+ buttons.forEach((button) => void button.show());
52727
52822
  this.positionButtons();
52728
52823
  }
52729
- /**
52730
- * Get the index of the visible button when the buttons are collapsed.
52731
- *
52732
- * @private
52733
- * @function Highcharts.RangeSelector#currentButtonIndex
52734
- */
52735
- currentButtonIndex() {
52736
- const { dropdown } = this;
52737
- if (dropdown && dropdown.selectedIndex > 0) {
52738
- return dropdown.selectedIndex - 1;
52739
- }
52740
- return 0;
52741
- }
52742
52824
  /**
52743
52825
  * Position the select element on top of the button.
52744
52826
  *
@@ -52746,14 +52828,16 @@
52746
52828
  * @function Highcharts.RangeSelector#showDropdown
52747
52829
  */
52748
52830
  showDropdown() {
52749
- const { buttonGroup, buttons, chart, dropdown } = this;
52831
+ const { buttonGroup, chart, dropdownLabel, dropdown } = this;
52750
52832
  if (buttonGroup && dropdown) {
52751
- const { translateX = 0, translateY = 0 } = buttonGroup, bBox = buttons[this.currentButtonIndex()].getBBox();
52833
+ const { translateX = 0, translateY = 0 } = buttonGroup, left = chart.plotLeft + translateX, top = translateY;
52834
+ dropdownLabel
52835
+ .attr({ x: left, y: top })
52836
+ .show();
52752
52837
  css(dropdown, {
52753
- left: (chart.plotLeft + translateX) + 'px',
52754
- top: (translateY + 0.5) + 'px',
52755
- width: bBox.width + 'px',
52756
- height: bBox.height + 'px'
52838
+ left: left + 'px',
52839
+ top: top + 'px',
52840
+ visibility: 'inherit'
52757
52841
  });
52758
52842
  this.hasVisibleDropdown = true;
52759
52843
  }
@@ -52765,8 +52849,9 @@
52765
52849
  hideDropdown() {
52766
52850
  const { dropdown } = this;
52767
52851
  if (dropdown) {
52852
+ this.dropdownLabel.hide();
52768
52853
  css(dropdown, {
52769
- top: '-9999em',
52854
+ visibility: 'hidden',
52770
52855
  width: '1px',
52771
52856
  height: '1px'
52772
52857
  });
@@ -52821,12 +52906,14 @@
52821
52906
  * @function Highcharts.RangeSelector#update
52822
52907
  * @param {Highcharts.RangeSelectorOptions} options
52823
52908
  */
52824
- update(options) {
52909
+ update(options, redraw = true) {
52825
52910
  const chart = this.chart;
52826
52911
  merge(true, chart.options.rangeSelector, options);
52827
52912
  this.destroy();
52828
52913
  this.init(chart);
52829
- this.render();
52914
+ if (redraw) {
52915
+ this.render();
52916
+ }
52830
52917
  }
52831
52918
  /**
52832
52919
  * Destroys allocated elements.
@@ -52966,7 +53053,7 @@
52966
53053
  const { format } = F;
52967
53054
  const { getOptions } = D;
52968
53055
  const { setFixedRange } = StockUtilities;
52969
- const { addEvent, clamp, defined, extend, find, isNumber, isString, merge, pick, splat } = U;
53056
+ const { addEvent, clamp, crisp, defined, extend, find, isNumber, isString, merge, pick, splat } = U;
52970
53057
  /* *
52971
53058
  *
52972
53059
  * Functions
@@ -53585,15 +53672,11 @@
53585
53672
  // normalize to a crisp line
53586
53673
  for (let i = 0; i < points.length; i = i + 2) {
53587
53674
  const start = points[i], end = points[i + 1];
53588
- if (start[1] === end[1]) {
53589
- // Subtract due to #1129. Now bottom and left axis gridlines
53590
- // behave the same.
53591
- start[1] = end[1] =
53592
- Math.round(start[1]) - (width % 2 / 2);
53675
+ if (defined(start[1]) && start[1] === end[1]) {
53676
+ start[1] = end[1] = crisp(start[1], width);
53593
53677
  }
53594
- if (start[2] === end[2]) {
53595
- start[2] = end[2] =
53596
- Math.round(start[2]) + (width % 2 / 2);
53678
+ if (defined(start[2]) && start[2] === end[2]) {
53679
+ start[2] = end[2] = crisp(start[2], width);
53597
53680
  }
53598
53681
  }
53599
53682
  return points;
@@ -53831,7 +53914,7 @@
53831
53914
  *
53832
53915
  * */
53833
53916
  const { column: ColumnSeries } = SeriesRegistry.seriesTypes;
53834
- const { extend, merge } = U;
53917
+ const { crisp, extend, merge } = U;
53835
53918
  /* *
53836
53919
  *
53837
53920
  * Class
@@ -53878,10 +53961,9 @@
53878
53961
  */
53879
53962
  getPointPath(point, graphic) {
53880
53963
  // Crisp vector coordinates
53881
- const strokeWidth = graphic.strokeWidth(), series = point.series, crispCorr = (strokeWidth % 2) / 2,
53964
+ const strokeWidth = graphic.strokeWidth(), series = point.series,
53882
53965
  // #2596:
53883
- crispX = Math.round(point.plotX) - crispCorr, halfWidth = Math.round(point.shapeArgs.width / 2);
53884
- let plotClose = point.plotClose;
53966
+ crispX = crisp(point.plotX || 0, strokeWidth), halfWidth = Math.round(point.shapeArgs.width / 2);
53885
53967
  // The vertical stem
53886
53968
  const path = [
53887
53969
  ['M', crispX, Math.round(point.yBottom)],
@@ -53889,7 +53971,7 @@
53889
53971
  ];
53890
53972
  // Close
53891
53973
  if (point.close !== null) {
53892
- plotClose = Math.round(point.plotClose) + crispCorr;
53974
+ const plotClose = crisp(point.plotClose, strokeWidth);
53893
53975
  path.push(['M', crispX, plotClose], ['L', crispX + halfWidth, plotClose]);
53894
53976
  series.extendStem(path, strokeWidth / 2, plotClose);
53895
53977
  }
@@ -54256,7 +54338,7 @@
54256
54338
  * */
54257
54339
  const { composed } = H;
54258
54340
  const { hlc: HLCSeries } = SeriesRegistry.seriesTypes;
54259
- const { addEvent, extend, merge, pushUnique } = U;
54341
+ const { addEvent, crisp, extend, merge, pushUnique } = U;
54260
54342
  /* *
54261
54343
  *
54262
54344
  * Functions
@@ -54322,11 +54404,9 @@
54322
54404
  *
54323
54405
  * */
54324
54406
  getPointPath(point, graphic) {
54325
- const path = super.getPointPath(point, graphic), strokeWidth = graphic.strokeWidth(), crispCorr = (strokeWidth % 2) / 2, crispX = Math.round(point.plotX) - crispCorr, halfWidth = Math.round(point.shapeArgs.width / 2);
54326
- let plotOpen = point.plotOpen;
54327
- // Crisp vector coordinates
54407
+ const path = super.getPointPath(point, graphic), strokeWidth = graphic.strokeWidth(), crispX = crisp(point.plotX || 0, strokeWidth), halfWidth = Math.round(point.shapeArgs.width / 2);
54328
54408
  if (point.open !== null) {
54329
- plotOpen = Math.round(point.plotOpen) + crispCorr;
54409
+ const plotOpen = crisp(point.plotOpen, strokeWidth);
54330
54410
  path.push(['M', crispX, plotOpen], ['L', crispX - halfWidth, plotOpen]);
54331
54411
  super.extendStem(path, strokeWidth / 2, plotOpen);
54332
54412
  }
@@ -54547,7 +54627,7 @@
54547
54627
 
54548
54628
  return CandlestickSeriesDefaults;
54549
54629
  });
54550
- _registerModule(_modules, 'Series/Candlestick/CandlestickSeries.js', [_modules['Series/Candlestick/CandlestickSeriesDefaults.js'], _modules['Core/Defaults.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (CandlestickSeriesDefaults, D, SeriesRegistry, U) {
54630
+ _registerModule(_modules, 'Series/Candlestick/CandlestickSeries.js', [_modules['Series/Candlestick/CandlestickSeriesDefaults.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (CandlestickSeriesDefaults, SeriesRegistry, U) {
54551
54631
  /* *
54552
54632
  *
54553
54633
  * (c) 2010-2024 Torstein Honsi
@@ -54557,9 +54637,8 @@
54557
54637
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
54558
54638
  *
54559
54639
  * */
54560
- const { defaultOptions } = D;
54561
54640
  const { column: ColumnSeries, ohlc: OHLCSeries } = SeriesRegistry.seriesTypes;
54562
- const { merge } = U;
54641
+ const { crisp, merge } = U;
54563
54642
  /* *
54564
54643
  *
54565
54644
  * Class
@@ -54612,7 +54691,7 @@
54612
54691
  drawPoints() {
54613
54692
  const series = this, points = series.points, chart = series.chart, reversedYAxis = series.yAxis.reversed;
54614
54693
  for (const point of points) {
54615
- let graphic = point.graphic, plotOpen, plotClose, topBox, bottomBox, hasTopWhisker, hasBottomWhisker, crispCorr, crispX, path, halfWidth;
54694
+ let graphic = point.graphic, plotOpen, plotClose, topBox, bottomBox, hasTopWhisker, hasBottomWhisker, crispX, path, halfWidth;
54616
54695
  const isNew = !graphic;
54617
54696
  if (typeof point.plotY !== 'undefined') {
54618
54697
  if (!graphic) {
@@ -54625,9 +54704,9 @@
54625
54704
  .shadow(series.options.shadow);
54626
54705
  }
54627
54706
  // Crisp vector coordinates
54628
- crispCorr = (graphic.strokeWidth() % 2) / 2;
54707
+ const strokeWidth = graphic.strokeWidth();
54629
54708
  // #2596:
54630
- crispX = Math.round(point.plotX) - crispCorr;
54709
+ crispX = crisp(point.plotX || 0, strokeWidth);
54631
54710
  plotOpen = point.plotOpen;
54632
54711
  plotClose = point.plotClose;
54633
54712
  topBox = Math.min(plotOpen, plotClose);
@@ -54636,13 +54715,13 @@
54636
54715
  hasTopWhisker = reversedYAxis ?
54637
54716
  bottomBox !== point.yBottom :
54638
54717
  Math.round(topBox) !==
54639
- Math.round(point.plotHigh);
54718
+ Math.round(point.plotHigh || 0);
54640
54719
  hasBottomWhisker = reversedYAxis ?
54641
54720
  Math.round(topBox) !==
54642
- Math.round(point.plotHigh) :
54721
+ Math.round(point.plotHigh || 0) :
54643
54722
  bottomBox !== point.yBottom;
54644
- topBox = Math.round(topBox) + crispCorr;
54645
- bottomBox = Math.round(bottomBox) + crispCorr;
54723
+ topBox = crisp(topBox, strokeWidth);
54724
+ bottomBox = crisp(bottomBox, strokeWidth);
54646
54725
  // Create the path. Due to a bug in Chrome 49, the path is
54647
54726
  // first instantiated with no values, then the values
54648
54727
  // pushed. For unknown reasons, instantiating the path array
@@ -54680,7 +54759,7 @@
54680
54759
  * Static Properties
54681
54760
  *
54682
54761
  * */
54683
- CandlestickSeries.defaultOptions = merge(OHLCSeries.defaultOptions, defaultOptions.plotOptions, { tooltip: OHLCSeries.defaultOptions.tooltip }, CandlestickSeriesDefaults);
54762
+ CandlestickSeries.defaultOptions = merge(OHLCSeries.defaultOptions, { tooltip: OHLCSeries.defaultOptions.tooltip }, CandlestickSeriesDefaults);
54684
54763
  SeriesRegistry.registerSeriesType('candlestick', CandlestickSeries);
54685
54764
  /* *
54686
54765
  *
@@ -55488,7 +55567,8 @@
55488
55567
  attribs.anchorX = point.anchorX;
55489
55568
  }
55490
55569
  graphic.attr({
55491
- text: point.options.title || options.title || 'A'
55570
+ // Allow empty string as a flag title (#20549)
55571
+ text: point.options.title ?? options.title ?? 'A'
55492
55572
  })[graphic.isNew ? 'attr' : 'animate'](attribs);
55493
55573
  // Rig for the distribute function
55494
55574
  if (!options.allowOverlapX) {
@@ -57006,6 +57086,7 @@
57006
57086
  }
57007
57087
  else {
57008
57088
  series.groupMap = null;
57089
+ series.currentDataGrouping = void 0;
57009
57090
  }
57010
57091
  series.hasGroupedData = hasGroupedData;
57011
57092
  series.preventGraphAnimation =