highcharts 9.3.3 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (917) hide show
  1. package/bower.json +1 -1
  2. package/css/highcharts.css +19 -2
  3. package/css/highcharts.scss +17 -2
  4. package/css/themes/dark-unica.css +19 -2
  5. package/css/themes/grid-light.css +19 -2
  6. package/css/themes/sand-signika.css +19 -2
  7. package/es-modules/Accessibility/A11yI18n.js +4 -4
  8. package/es-modules/Accessibility/Accessibility.js +3 -4
  9. package/es-modules/Accessibility/Components/AnnotationsA11y.js +3 -3
  10. package/es-modules/Accessibility/Components/ContainerComponent.js +11 -10
  11. package/es-modules/Accessibility/Components/InfoRegionsComponent.js +18 -11
  12. package/es-modules/Accessibility/Components/LegendComponent.js +34 -26
  13. package/es-modules/Accessibility/Components/MenuComponent.js +7 -6
  14. package/es-modules/Accessibility/Components/RangeSelectorComponent.js +5 -3
  15. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +7 -6
  16. package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +1 -1
  17. package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +3 -2
  18. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +34 -18
  19. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +96 -39
  20. package/es-modules/Accessibility/Components/ZoomComponent.js +43 -80
  21. package/es-modules/Accessibility/FocusBorder.js +6 -5
  22. package/es-modules/Accessibility/HighContrastMode.js +3 -3
  23. package/es-modules/Accessibility/KeyboardNavigation.js +113 -98
  24. package/es-modules/Accessibility/Options/{Options.js → A11yDefaults.js} +72 -4
  25. package/es-modules/Accessibility/Options/DeprecatedOptions.js +12 -2
  26. package/es-modules/Accessibility/Options/{LangOptions.js → LangDefaults.js} +46 -31
  27. package/es-modules/Accessibility/ProxyElement.js +14 -6
  28. package/es-modules/Accessibility/ProxyProvider.js +10 -2
  29. package/es-modules/Accessibility/Utils/ChartUtilities.js +10 -5
  30. package/es-modules/Core/Animation/Fx.js +1 -1
  31. package/es-modules/Core/Axis/Axis.js +197 -91
  32. package/es-modules/Core/Axis/AxisDefaults.js +8 -8
  33. package/es-modules/Core/Axis/Color/ColorAxis.js +26 -7
  34. package/es-modules/Core/Axis/Color/ColorAxisDefaults.js +3 -3
  35. package/es-modules/Core/Axis/DateTimeAxis.js +5 -3
  36. package/es-modules/Core/Axis/GridAxis.js +821 -821
  37. package/es-modules/Core/Axis/LogarithmicAxis.js +1 -1
  38. package/es-modules/Core/Axis/OrdinalAxis.js +26 -3
  39. package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +3 -3
  40. package/es-modules/Core/Axis/StackingAxis.js +0 -1
  41. package/es-modules/Core/Axis/Tick.js +22 -18
  42. package/es-modules/Core/Axis/TreeGridTick.js +13 -2
  43. package/es-modules/Core/Axis/ZAxis.js +3 -1
  44. package/es-modules/Core/Chart/Chart.js +27 -8
  45. package/es-modules/Core/Chart/Chart3D.js +1 -11
  46. package/es-modules/Core/Chart/ChartDefaults.js +46 -14
  47. package/es-modules/Core/Chart/GanttChart.js +3 -1
  48. package/es-modules/Core/Chart/MapChart.js +4 -7
  49. package/es-modules/Core/Chart/StockChart.js +7 -5
  50. package/es-modules/Core/Color/Color.js +1 -1
  51. package/es-modules/Core/DefaultOptions.js +19 -15
  52. package/es-modules/Core/Geometry/PolygonClip.js +84 -0
  53. package/es-modules/Core/Globals.js +4 -18
  54. package/es-modules/Core/HttpUtilities.js +46 -39
  55. package/es-modules/Core/Legend/Legend.js +14 -12
  56. package/es-modules/Core/MSPointer.js +3 -1
  57. package/es-modules/Core/Navigator.js +16 -13
  58. package/es-modules/Core/Pointer.js +16 -12
  59. package/es-modules/Core/Renderer/HTML/AST.js +68 -8
  60. package/es-modules/Core/Renderer/HTML/HTMLElement.js +3 -1
  61. package/es-modules/Core/Renderer/HTML/HTMLRenderer.js +3 -1
  62. package/es-modules/Core/Renderer/SVG/SVGElement.js +54 -70
  63. package/es-modules/Core/Renderer/SVG/SVGElement3D.js +17 -5
  64. package/es-modules/Core/Renderer/SVG/SVGLabel.js +3 -1
  65. package/es-modules/Core/Renderer/SVG/SVGRenderer.js +60 -55
  66. package/es-modules/Core/Renderer/SVG/SVGRenderer3D.js +4 -2
  67. package/es-modules/Core/Renderer/SVG/TextBuilder.js +12 -10
  68. package/es-modules/Core/Scrollbar.js +9 -5
  69. package/es-modules/Core/ScrollbarDefaults.js +8 -8
  70. package/es-modules/Core/Series/DataLabel.js +67 -38
  71. package/es-modules/Core/Series/Point.js +11 -2
  72. package/es-modules/Core/Series/Series.js +57 -27
  73. package/es-modules/Core/Series/Series3D.js +3 -1
  74. package/es-modules/Core/Series/SeriesDefaults.js +7 -4
  75. package/es-modules/Core/Time.js +6 -7
  76. package/es-modules/Core/Tooltip.js +17 -34
  77. package/es-modules/Core/Utilities.js +33 -33
  78. package/es-modules/Data/DataConverter.js +1 -1
  79. package/es-modules/Data/DataTable.js +12 -10
  80. package/es-modules/Data/Modifiers/ChainModifier.js +3 -1
  81. package/es-modules/Data/Modifiers/GroupModifier.js +3 -1
  82. package/es-modules/Data/Modifiers/InvertModifier.js +9 -7
  83. package/es-modules/Data/Modifiers/RangeModifier.js +3 -1
  84. package/es-modules/Data/Modifiers/SeriesPointsModifier.js +3 -1
  85. package/es-modules/Data/Modifiers/SortModifier.js +3 -1
  86. package/es-modules/Data/Parsers/CSVParser.js +3 -1
  87. package/es-modules/Data/Parsers/DataParser.js +1 -1
  88. package/es-modules/Data/Parsers/GoogleSheetsParser.js +3 -2
  89. package/es-modules/Data/Parsers/HTMLTableParser.js +3 -1
  90. package/es-modules/Data/Stores/CSVStore.js +8 -5
  91. package/es-modules/Data/Stores/GoogleSheetsStore.js +3 -1
  92. package/es-modules/Data/Stores/HTMLTableStore.js +3 -1
  93. package/es-modules/Extensions/Annotations/{Annotations.js → Annotation.js} +30 -11
  94. package/es-modules/Extensions/Annotations/AnnotationsDefaults.js +0 -0
  95. package/es-modules/Extensions/Annotations/ControlPoint.js +1 -1
  96. package/es-modules/Extensions/Annotations/Controllables/ControllableEllipse.js +5 -2
  97. package/es-modules/Extensions/Annotations/MockPoint.js +1 -1
  98. package/es-modules/Extensions/Annotations/NavigationBindings.js +16 -5
  99. package/es-modules/Extensions/Annotations/Popup.js +2 -2
  100. package/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +18 -12
  101. package/es-modules/Extensions/Annotations/Types/CrookedLine.js +4 -2
  102. package/es-modules/Extensions/Annotations/Types/ElliottWave.js +4 -2
  103. package/es-modules/Extensions/Annotations/Types/Fibonacci.js +5 -3
  104. package/es-modules/Extensions/Annotations/Types/FibonacciTimeZones.js +4 -2
  105. package/es-modules/Extensions/Annotations/Types/InfinityLine.js +4 -2
  106. package/es-modules/Extensions/Annotations/Types/Measure.js +4 -2
  107. package/es-modules/Extensions/Annotations/Types/Pitchfork.js +4 -2
  108. package/es-modules/Extensions/Annotations/Types/TimeCycles.js +4 -2
  109. package/es-modules/Extensions/Annotations/Types/Tunnel.js +5 -2
  110. package/es-modules/Extensions/Annotations/Types/VerticalLine.js +4 -2
  111. package/es-modules/Extensions/Boost/BoostAttach.js +5 -1
  112. package/es-modules/Extensions/Boost/BoostInit.js +9 -3
  113. package/es-modules/Extensions/Boost/BoostOptions.js +26 -0
  114. package/es-modules/Extensions/Boost/Boostables.js +1 -0
  115. package/es-modules/Extensions/Boost/WGLRenderer.js +48 -37
  116. package/es-modules/Extensions/Boost/WGLShader.js +4 -3
  117. package/es-modules/Extensions/BoostCanvas.js +11 -5
  118. package/es-modules/Extensions/Breadcrumbs.js +898 -0
  119. package/es-modules/Extensions/CurrentDateIndication.js +1 -1
  120. package/es-modules/Extensions/Data.js +661 -613
  121. package/es-modules/Extensions/DataGrouping.js +8 -3
  122. package/es-modules/Extensions/Debugger/ErrorMessages.js +4 -0
  123. package/es-modules/Extensions/DownloadURL.js +3 -3
  124. package/es-modules/Extensions/DragPanes.js +1 -1
  125. package/es-modules/Extensions/DraggablePoints.js +9 -7
  126. package/es-modules/Extensions/Drilldown.js +152 -97
  127. package/es-modules/Extensions/ExportData.js +58 -9
  128. package/es-modules/Extensions/Exporting/Exporting.js +34 -23
  129. package/es-modules/Extensions/Exporting/ExportingDefaults.js +56 -8
  130. package/es-modules/Extensions/FullScreen.js +121 -54
  131. package/es-modules/Extensions/GeoJSON.js +149 -125
  132. package/es-modules/Extensions/MarkerClusters.js +36 -22
  133. package/es-modules/Extensions/NoDataToDisplay.js +1 -1
  134. package/es-modules/Extensions/OfflineExporting/OfflineExporting.js +110 -22
  135. package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
  136. package/es-modules/Extensions/Oldie/Oldie.js +2 -2
  137. package/es-modules/Extensions/OverlappingDataLabels.js +5 -4
  138. package/es-modules/Extensions/Pane.js +3 -3
  139. package/es-modules/Extensions/ParallelCoordinates.js +1 -1
  140. package/es-modules/Extensions/PatternFill.js +14 -2
  141. package/es-modules/Extensions/RangeSelector.js +29 -18
  142. package/es-modules/Extensions/ScrollablePlotArea.js +8 -4
  143. package/es-modules/Extensions/{SeriesLabel.js → SeriesLabel/SeriesLabel.js} +262 -384
  144. package/es-modules/Extensions/SeriesLabel/SeriesLabelDefaults.js +124 -0
  145. package/es-modules/Extensions/SeriesLabel/SeriesLabelUtilities.js +67 -0
  146. package/es-modules/Extensions/Sonification/Earcon.js +1 -1
  147. package/es-modules/Extensions/Stacking.js +5 -4
  148. package/es-modules/Extensions/Themes/HighContrastDark.js +10 -10
  149. package/es-modules/Extensions/Themes/HighContrastLight.js +10 -10
  150. package/es-modules/Maps/MapNavigation.js +49 -12
  151. package/es-modules/Maps/MapPointer.js +16 -0
  152. package/es-modules/Maps/MapUtilities.js +56 -0
  153. package/es-modules/Maps/MapView.js +619 -137
  154. package/es-modules/Maps/MapViewInsetsOptionsDefault.js +148 -0
  155. package/es-modules/Maps/MapViewOptionsDefault.js +60 -20
  156. package/es-modules/Maps/Projection.js +182 -88
  157. package/es-modules/Maps/Projections/EqualEarth.js +15 -6
  158. package/es-modules/Maps/Projections/LambertConformalConic.js +27 -19
  159. package/es-modules/Maps/Projections/Miller.js +23 -10
  160. package/es-modules/Maps/Projections/Orthographic.js +21 -10
  161. package/es-modules/Maps/Projections/WebMercator.js +25 -13
  162. package/es-modules/Series/ArcDiagram/ArcDiagramPoint.js +79 -0
  163. package/es-modules/Series/ArcDiagram/ArcDiagramSeries.js +591 -0
  164. package/es-modules/Series/Area/AreaSeries.js +21 -14
  165. package/es-modules/Series/AreaRange/AreaRangePoint.js +24 -11
  166. package/es-modules/Series/AreaRange/AreaRangeSeries.js +154 -147
  167. package/es-modules/Series/AreaSpline/AreaSplineSeries.js +45 -41
  168. package/es-modules/Series/AreaSplineRange/AreaSplineRangeSeries.js +43 -43
  169. package/es-modules/Series/Bar/BarSeries.js +3 -1
  170. package/es-modules/Series/Bellcurve/BellcurveSeries.js +3 -1
  171. package/es-modules/Series/BoxPlot/BoxPlotSeries.js +4 -2
  172. package/es-modules/Series/Bubble/BubbleLegendDefaults.js +1 -1
  173. package/es-modules/Series/Bubble/BubblePoint.js +3 -1
  174. package/es-modules/Series/Bubble/BubbleSeries.js +15 -6
  175. package/es-modules/Series/Bullet/BulletPoint.js +3 -1
  176. package/es-modules/Series/Bullet/BulletSeries.js +4 -3
  177. package/es-modules/Series/Candlestick/CandlestickSeries.js +5 -3
  178. package/es-modules/Series/CenteredUtilities.js +8 -2
  179. package/es-modules/Series/ColorMapComposition.js +111 -0
  180. package/es-modules/Series/Column/ColumnSeries.js +10 -7
  181. package/es-modules/Series/ColumnPyramid/ColumnPyramidSeries.js +3 -1
  182. package/es-modules/Series/ColumnRange/ColumnRangePoint.js +17 -13
  183. package/es-modules/Series/ColumnRange/ColumnRangeSeries.js +60 -57
  184. package/es-modules/Series/Cylinder/CylinderPoint.js +3 -1
  185. package/es-modules/Series/Cylinder/CylinderSeries.js +3 -1
  186. package/es-modules/Series/DataModifyComposition.js +1 -0
  187. package/es-modules/Series/DependencyWheel/DependencyWheelPoint.js +3 -1
  188. package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +5 -3
  189. package/es-modules/Series/DotPlot/DotPlotSeries.js +3 -1
  190. package/es-modules/Series/DrawPointUtilities.js +87 -0
  191. package/es-modules/Series/Dumbbell/DumbbellPoint.js +3 -1
  192. package/es-modules/Series/Dumbbell/DumbbellSeries.js +4 -2
  193. package/es-modules/Series/ErrorBar/ErrorBarSeries.js +4 -2
  194. package/es-modules/Series/Flags/FlagsPoint.js +4 -1
  195. package/es-modules/Series/Flags/FlagsSeries.js +13 -16
  196. package/es-modules/Series/Funnel/FunnelSeries.js +5 -3
  197. package/es-modules/Series/Funnel3D/Funnel3DPoint.js +3 -1
  198. package/es-modules/Series/Funnel3D/Funnel3DSeries.js +3 -1
  199. package/es-modules/Series/Gantt/GanttPoint.js +3 -1
  200. package/es-modules/Series/Gantt/GanttSeries.js +3 -1
  201. package/es-modules/Series/Gauge/GaugePoint.js +3 -1
  202. package/es-modules/Series/Gauge/GaugeSeries.js +196 -174
  203. package/es-modules/Series/HLC/HLCPoint.js +3 -1
  204. package/es-modules/Series/HLC/HLCSeries.js +4 -2
  205. package/es-modules/Series/Heatmap/HeatmapPoint.js +7 -5
  206. package/es-modules/Series/Heatmap/HeatmapSeries.js +29 -33
  207. package/es-modules/Series/HeikinAshi/HeikinAshiPoint.js +3 -1
  208. package/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +3 -1
  209. package/es-modules/Series/Histogram/HistogramSeries.js +3 -1
  210. package/es-modules/Series/HollowCandlestick/HollowCandlestickPoint.js +3 -1
  211. package/es-modules/Series/HollowCandlestick/HollowCandlestickSeries.js +11 -9
  212. package/es-modules/Series/Item/ItemPoint.js +3 -1
  213. package/es-modules/Series/Item/ItemSeries.js +3 -1
  214. package/es-modules/Series/Line/LineSeries.js +4 -2
  215. package/es-modules/Series/Lollipop/LollipopPoint.js +3 -1
  216. package/es-modules/Series/Lollipop/LollipopSeries.js +4 -2
  217. package/es-modules/Series/Map/MapPoint.js +32 -7
  218. package/es-modules/Series/Map/MapSeries.js +298 -189
  219. package/es-modules/Series/MapBubble/MapBubblePoint.js +19 -25
  220. package/es-modules/Series/MapBubble/MapBubbleSeries.js +61 -2
  221. package/es-modules/Series/MapLine/MapLineSeries.js +18 -1
  222. package/es-modules/Series/MapPoint/MapPointPoint.js +6 -10
  223. package/es-modules/Series/MapPoint/MapPointSeries.js +50 -16
  224. package/es-modules/Series/Networkgraph/Networkgraph.js +3 -1
  225. package/es-modules/Series/NodesComposition.js +101 -49
  226. package/es-modules/Series/OHLC/OHLCPoint.js +3 -1
  227. package/es-modules/Series/OHLC/OHLCSeries.js +10 -1
  228. package/es-modules/Series/Organization/OrganizationPoint.js +71 -3
  229. package/es-modules/Series/Organization/OrganizationSeries.js +84 -28
  230. package/es-modules/Series/PackedBubble/PackedBubbleComposition.js +0 -2
  231. package/es-modules/Series/PackedBubble/PackedBubblePoint.js +3 -1
  232. package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +3 -1
  233. package/es-modules/Series/ParetoSeries/ParetoSeries.js +3 -1
  234. package/es-modules/Series/Pie/PieDataLabel.js +4 -2
  235. package/es-modules/Series/Pie/PiePoint.js +15 -6
  236. package/es-modules/Series/Pie/PieSeries.js +51 -37
  237. package/es-modules/Series/Pie3D/Pie3DPoint.js +3 -1
  238. package/es-modules/Series/Pie3D/Pie3DSeries.js +22 -1
  239. package/es-modules/Series/PolarComposition.js +819 -0
  240. package/es-modules/Series/Polygon/PolygonSeries.js +3 -1
  241. package/es-modules/Series/Pyramid/PyramidSeries.js +3 -1
  242. package/es-modules/Series/Pyramid3D/Pyramid3DSeries.js +3 -1
  243. package/es-modules/Series/Sankey/SankeyColumnComposition.js +193 -0
  244. package/es-modules/Series/Sankey/SankeyPoint.js +40 -2
  245. package/es-modules/Series/Sankey/SankeySeries.js +35 -136
  246. package/es-modules/Series/Scatter/ScatterSeries.js +11 -6
  247. package/es-modules/Series/Scatter3D/Scatter3DPoint.js +3 -1
  248. package/es-modules/Series/Scatter3D/Scatter3DSeries.js +3 -1
  249. package/es-modules/Series/SeriesOnPointComposition.js +391 -0
  250. package/es-modules/Series/SolidGauge/SolidGaugeSeries.js +5 -3
  251. package/es-modules/Series/Spline/SplineSeries.js +13 -4
  252. package/es-modules/Series/Streamgraph/StreamgraphSeries.js +3 -1
  253. package/es-modules/Series/Sunburst/SunburstPoint.js +3 -3
  254. package/es-modules/Series/Sunburst/SunburstSeries.js +21 -5
  255. package/es-modules/Series/Tilemap/TilemapPoint.js +3 -1
  256. package/es-modules/Series/Tilemap/TilemapSeries.js +3 -1
  257. package/es-modules/Series/Timeline/TimelinePoint.js +3 -1
  258. package/es-modules/Series/Timeline/TimelineSeries.js +6 -4
  259. package/es-modules/Series/Treemap/TreemapPoint.js +8 -4
  260. package/es-modules/Series/Treemap/TreemapSeries.js +97 -87
  261. package/es-modules/Series/VariablePie/VariablePieSeries.js +3 -1
  262. package/es-modules/Series/Variwide/VariwidePoint.js +3 -1
  263. package/es-modules/Series/Variwide/VariwideSeries.js +3 -1
  264. package/es-modules/Series/Vector/VectorSeries.js +3 -1
  265. package/es-modules/Series/Venn/VennPoint.js +5 -5
  266. package/es-modules/Series/Venn/VennSeries.js +9 -6
  267. package/es-modules/Series/Waterfall/WaterfallPoint.js +3 -1
  268. package/es-modules/Series/Waterfall/WaterfallSeries.js +16 -12
  269. package/es-modules/Series/Windbarb/WindbarbPoint.js +3 -1
  270. package/es-modules/Series/Windbarb/WindbarbSeries.js +3 -1
  271. package/es-modules/Series/Wordcloud/WordcloudPoint.js +6 -6
  272. package/es-modules/Series/Wordcloud/WordcloudSeries.js +11 -8
  273. package/es-modules/Series/XRange/XRangePoint.js +3 -1
  274. package/es-modules/Series/XRange/XRangeSeries.js +3 -1
  275. package/es-modules/Stock/Indicators/ABands/ABandsIndicator.js +3 -1
  276. package/es-modules/Stock/Indicators/AD/ADIndicator.js +3 -1
  277. package/es-modules/Stock/Indicators/AO/AOIndicator.js +5 -3
  278. package/es-modules/Stock/Indicators/APO/APOIndicator.js +3 -1
  279. package/es-modules/Stock/Indicators/ATR/ATRIndicator.js +3 -1
  280. package/es-modules/Stock/Indicators/Aroon/AroonIndicator.js +3 -1
  281. package/es-modules/Stock/Indicators/AroonOscillator/AroonOscillatorIndicator.js +3 -1
  282. package/es-modules/Stock/Indicators/BB/BBIndicator.js +6 -4
  283. package/es-modules/Stock/Indicators/CCI/CCIIndicator.js +3 -1
  284. package/es-modules/Stock/Indicators/CMF/CMFIndicator.js +3 -1
  285. package/es-modules/Stock/Indicators/CMO/CMOIndicator.js +3 -1
  286. package/es-modules/Stock/Indicators/Chaikin/ChaikinIndicator.js +3 -1
  287. package/es-modules/Stock/Indicators/DEMA/DEMAIndicator.js +3 -1
  288. package/es-modules/Stock/Indicators/DMI/DMIIndicator.js +13 -7
  289. package/es-modules/Stock/Indicators/DPO/DPOIndicator.js +3 -1
  290. package/es-modules/Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js +3 -1
  291. package/es-modules/Stock/Indicators/EMA/EMAIndicator.js +3 -1
  292. package/es-modules/Stock/Indicators/IKH/IKHIndicator.js +3 -1
  293. package/es-modules/Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js +3 -1
  294. package/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +3 -1
  295. package/es-modules/Stock/Indicators/LinearRegression/LinearRegression.js +3 -1
  296. package/es-modules/Stock/Indicators/LinearRegressionAngle/LinearRegressionAngle.js +3 -1
  297. package/es-modules/Stock/Indicators/LinearRegressionIntercept/LinearRegressionIntercept.js +3 -1
  298. package/es-modules/Stock/Indicators/LinearRegressionSlopes/LinearRegressionSlopes.js +3 -1
  299. package/es-modules/Stock/Indicators/MACD/MACDIndicator.js +26 -13
  300. package/es-modules/Stock/Indicators/MFI/MFIIndicator.js +3 -1
  301. package/es-modules/Stock/Indicators/Momentum/MomentumIndicator.js +3 -1
  302. package/es-modules/Stock/Indicators/MultipleLinesComposition.js +85 -95
  303. package/es-modules/Stock/Indicators/NATR/NATRIndicator.js +3 -1
  304. package/es-modules/Stock/Indicators/OBV/OBVIndicator.js +3 -1
  305. package/es-modules/Stock/Indicators/PC/PCIndicator.js +3 -1
  306. package/es-modules/Stock/Indicators/PPO/PPOIndicator.js +3 -1
  307. package/es-modules/Stock/Indicators/PSAR/PSARIndicator.js +3 -1
  308. package/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +3 -1
  309. package/es-modules/Stock/Indicators/PivotPoints/PivotPointsPoint.js +3 -1
  310. package/es-modules/Stock/Indicators/PriceEnvelopes/PriceEnvelopesIndicator.js +3 -1
  311. package/es-modules/Stock/Indicators/ROC/ROCIndicator.js +3 -1
  312. package/es-modules/Stock/Indicators/RSI/RSIIndicator.js +3 -1
  313. package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +12 -3
  314. package/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +3 -1
  315. package/es-modules/Stock/Indicators/Stochastic/StochasticIndicator.js +3 -1
  316. package/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +6 -4
  317. package/es-modules/Stock/Indicators/TEMA/TEMAIndicator.js +3 -1
  318. package/es-modules/Stock/Indicators/TRIX/TRIXIndicator.js +3 -1
  319. package/es-modules/Stock/Indicators/TrendLine/TrendLineIndicator.js +3 -1
  320. package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +3 -1
  321. package/es-modules/Stock/Indicators/VBP/VBPPoint.js +3 -1
  322. package/es-modules/Stock/Indicators/VWAP/VWAPIndicator.js +3 -1
  323. package/es-modules/Stock/Indicators/WMA/WMAIndicator.js +3 -1
  324. package/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +3 -1
  325. package/es-modules/Stock/Indicators/Zigzag/ZigzagIndicator.js +3 -1
  326. package/es-modules/Stock/StockToolsBindings.js +51 -43
  327. package/es-modules/Stock/StockToolsGui.js +1 -1
  328. package/es-modules/masters/highcharts-3d.src.js +1 -1
  329. package/es-modules/masters/highcharts-gantt.src.js +1 -1
  330. package/es-modules/masters/highcharts-more.src.js +4 -4
  331. package/es-modules/masters/highcharts.src.js +1 -1
  332. package/es-modules/masters/highmaps.src.js +1 -1
  333. package/es-modules/masters/highstock.src.js +1 -1
  334. package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
  335. package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
  336. package/es-modules/masters/indicators/ao.src.js +1 -1
  337. package/es-modules/masters/indicators/apo.src.js +1 -1
  338. package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
  339. package/es-modules/masters/indicators/aroon.src.js +1 -1
  340. package/es-modules/masters/indicators/atr.src.js +1 -1
  341. package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
  342. package/es-modules/masters/indicators/cci.src.js +1 -1
  343. package/es-modules/masters/indicators/chaikin.src.js +1 -1
  344. package/es-modules/masters/indicators/cmf.src.js +1 -1
  345. package/es-modules/masters/indicators/cmo.src.js +1 -1
  346. package/es-modules/masters/indicators/dema.src.js +1 -1
  347. package/es-modules/masters/indicators/disparity-index.src.js +1 -1
  348. package/es-modules/masters/indicators/dmi.src.js +1 -1
  349. package/es-modules/masters/indicators/dpo.src.js +1 -1
  350. package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
  351. package/es-modules/masters/indicators/indicators-all.src.js +1 -1
  352. package/es-modules/masters/indicators/indicators.src.js +1 -1
  353. package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
  354. package/es-modules/masters/indicators/klinger.src.js +1 -1
  355. package/es-modules/masters/indicators/macd.src.js +1 -1
  356. package/es-modules/masters/indicators/mfi.src.js +1 -1
  357. package/es-modules/masters/indicators/momentum.src.js +1 -1
  358. package/es-modules/masters/indicators/natr.src.js +1 -1
  359. package/es-modules/masters/indicators/obv.src.js +1 -1
  360. package/es-modules/masters/indicators/pivot-points.src.js +1 -1
  361. package/es-modules/masters/indicators/ppo.src.js +1 -1
  362. package/es-modules/masters/indicators/price-channel.src.js +1 -1
  363. package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
  364. package/es-modules/masters/indicators/psar.src.js +1 -1
  365. package/es-modules/masters/indicators/regressions.src.js +1 -1
  366. package/es-modules/masters/indicators/roc.src.js +1 -1
  367. package/es-modules/masters/indicators/rsi.src.js +1 -1
  368. package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
  369. package/es-modules/masters/indicators/stochastic.src.js +1 -1
  370. package/es-modules/masters/indicators/supertrend.src.js +1 -1
  371. package/es-modules/masters/indicators/tema.src.js +1 -1
  372. package/es-modules/masters/indicators/trendline.src.js +1 -1
  373. package/es-modules/masters/indicators/trix.src.js +1 -1
  374. package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
  375. package/es-modules/masters/indicators/vwap.src.js +1 -1
  376. package/es-modules/masters/indicators/williams-r.src.js +1 -1
  377. package/es-modules/masters/indicators/wma.src.js +1 -1
  378. package/es-modules/masters/indicators/zigzag.src.js +1 -1
  379. package/es-modules/masters/modules/accessibility.src.js +1 -1
  380. package/es-modules/masters/modules/annotations-advanced.src.js +2 -2
  381. package/es-modules/masters/modules/annotations.src.js +2 -2
  382. package/es-modules/masters/modules/arc-diagram.src.js +14 -0
  383. package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
  384. package/es-modules/masters/modules/boost-canvas.src.js +1 -1
  385. package/es-modules/masters/modules/boost.src.js +1 -1
  386. package/es-modules/masters/modules/broken-axis.src.js +1 -1
  387. package/es-modules/masters/modules/bullet.src.js +1 -1
  388. package/es-modules/masters/modules/coloraxis.src.js +1 -1
  389. package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
  390. package/es-modules/masters/modules/cylinder.src.js +1 -1
  391. package/es-modules/masters/modules/data.src.js +2 -1
  392. package/es-modules/masters/modules/datagrouping.src.js +1 -1
  393. package/es-modules/masters/modules/debugger.src.js +1 -1
  394. package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
  395. package/es-modules/masters/modules/dotplot.src.js +1 -1
  396. package/es-modules/masters/modules/drag-panes.src.js +1 -1
  397. package/es-modules/masters/modules/draggable-points.src.js +1 -1
  398. package/es-modules/masters/modules/drilldown.src.js +2 -1
  399. package/es-modules/masters/modules/dumbbell.src.js +1 -1
  400. package/es-modules/masters/modules/export-data.src.js +1 -1
  401. package/es-modules/masters/modules/exporting.src.js +1 -1
  402. package/es-modules/masters/modules/full-screen.src.js +1 -1
  403. package/es-modules/masters/modules/funnel.src.js +1 -1
  404. package/es-modules/masters/modules/funnel3d.src.js +1 -1
  405. package/es-modules/masters/modules/gantt.src.js +1 -1
  406. package/es-modules/masters/modules/grid-axis.src.js +1 -1
  407. package/es-modules/masters/modules/heatmap.src.js +1 -1
  408. package/es-modules/masters/modules/heikinashi.src.js +1 -1
  409. package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
  410. package/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
  411. package/es-modules/masters/modules/item-series.src.js +1 -1
  412. package/es-modules/masters/modules/lollipop.src.js +1 -1
  413. package/es-modules/masters/modules/map.src.js +5 -1
  414. package/es-modules/masters/modules/marker-clusters.src.js +1 -1
  415. package/es-modules/masters/modules/networkgraph.src.js +1 -1
  416. package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
  417. package/es-modules/masters/modules/offline-exporting.src.js +1 -1
  418. package/es-modules/masters/modules/oldie-polyfills.src.js +1 -1
  419. package/es-modules/masters/modules/oldie.src.js +1 -1
  420. package/es-modules/masters/modules/organization.src.js +1 -1
  421. package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
  422. package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
  423. package/es-modules/masters/modules/pareto.src.js +1 -1
  424. package/es-modules/masters/modules/pathfinder.src.js +1 -1
  425. package/es-modules/masters/modules/pattern-fill.src.js +1 -1
  426. package/es-modules/masters/modules/price-indicator.src.js +1 -1
  427. package/es-modules/masters/modules/pyramid3d.src.js +1 -1
  428. package/es-modules/masters/modules/sankey.src.js +1 -1
  429. package/es-modules/masters/modules/series-label.src.js +5 -2
  430. package/es-modules/masters/modules/series-on-point.src.js +16 -0
  431. package/es-modules/masters/modules/solid-gauge.src.js +1 -1
  432. package/es-modules/masters/modules/sonification.src.js +2 -6
  433. package/es-modules/masters/modules/static-scale.src.js +1 -1
  434. package/es-modules/masters/modules/stock-tools.src.js +1 -1
  435. package/es-modules/masters/modules/stock.src.js +1 -1
  436. package/es-modules/masters/modules/streamgraph.src.js +1 -1
  437. package/es-modules/masters/modules/sunburst.src.js +1 -1
  438. package/es-modules/masters/modules/tilemap.src.js +1 -1
  439. package/es-modules/masters/modules/timeline.src.js +1 -1
  440. package/es-modules/masters/modules/treegrid.src.js +1 -1
  441. package/es-modules/masters/modules/treemap.src.js +5 -1
  442. package/es-modules/masters/modules/variable-pie.src.js +1 -1
  443. package/es-modules/masters/modules/variwide.src.js +1 -1
  444. package/es-modules/masters/modules/vector.src.js +1 -1
  445. package/es-modules/masters/modules/venn.src.js +1 -1
  446. package/es-modules/masters/modules/windbarb.src.js +1 -1
  447. package/es-modules/masters/modules/wordcloud.src.js +1 -1
  448. package/es-modules/masters/modules/xrange.src.js +1 -1
  449. package/es-modules/masters/themes/avocado.src.js +1 -1
  450. package/es-modules/masters/themes/brand-dark.src.js +1 -1
  451. package/es-modules/masters/themes/brand-light.src.js +1 -1
  452. package/es-modules/masters/themes/dark-blue.src.js +1 -1
  453. package/es-modules/masters/themes/dark-green.src.js +1 -1
  454. package/es-modules/masters/themes/dark-unica.src.js +1 -1
  455. package/es-modules/masters/themes/gray.src.js +1 -1
  456. package/es-modules/masters/themes/grid-light.src.js +1 -1
  457. package/es-modules/masters/themes/grid.src.js +1 -1
  458. package/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
  459. package/es-modules/masters/themes/high-contrast-light.src.js +1 -1
  460. package/es-modules/masters/themes/sand-signika.src.js +1 -1
  461. package/es-modules/masters/themes/skies.src.js +1 -1
  462. package/es-modules/masters/themes/sunset.src.js +1 -1
  463. package/highcharts-3d.js +99 -98
  464. package/highcharts-3d.js.map +1 -1
  465. package/highcharts-3d.src.js +51 -21
  466. package/highcharts-gantt.js +811 -801
  467. package/highcharts-gantt.js.map +1 -1
  468. package/highcharts-gantt.src.js +2020 -1607
  469. package/highcharts-more.d.ts +10 -0
  470. package/highcharts-more.js +194 -194
  471. package/highcharts-more.js.map +1 -1
  472. package/highcharts-more.src.d.ts +10 -0
  473. package/highcharts-more.src.js +3512 -3364
  474. package/highcharts.d.ts +12336 -965
  475. package/highcharts.js +595 -586
  476. package/highcharts.js.map +1 -1
  477. package/highcharts.src.d.ts +12336 -965
  478. package/highcharts.src.js +1047 -665
  479. package/highmaps.js +763 -728
  480. package/highmaps.js.map +1 -1
  481. package/highmaps.src.js +4482 -2639
  482. package/highstock.js +798 -788
  483. package/highstock.js.map +1 -1
  484. package/highstock.src.js +1177 -739
  485. package/indicators/acceleration-bands.d.ts +1 -17
  486. package/indicators/acceleration-bands.js +11 -11
  487. package/indicators/acceleration-bands.js.map +1 -1
  488. package/indicators/acceleration-bands.src.d.ts +1 -17
  489. package/indicators/acceleration-bands.src.js +99 -100
  490. package/indicators/accumulation-distribution.js +5 -5
  491. package/indicators/accumulation-distribution.js.map +1 -1
  492. package/indicators/accumulation-distribution.src.js +11 -2
  493. package/indicators/ao.js +6 -6
  494. package/indicators/ao.js.map +1 -1
  495. package/indicators/ao.src.js +13 -4
  496. package/indicators/apo.js +5 -5
  497. package/indicators/apo.js.map +1 -1
  498. package/indicators/apo.src.js +11 -2
  499. package/indicators/aroon-oscillator.d.ts +1 -17
  500. package/indicators/aroon-oscillator.js +10 -10
  501. package/indicators/aroon-oscillator.js.map +1 -1
  502. package/indicators/aroon-oscillator.src.d.ts +1 -17
  503. package/indicators/aroon-oscillator.src.js +99 -100
  504. package/indicators/aroon.d.ts +1 -17
  505. package/indicators/aroon.js +11 -11
  506. package/indicators/aroon.js.map +1 -1
  507. package/indicators/aroon.src.d.ts +1 -17
  508. package/indicators/aroon.src.js +99 -100
  509. package/indicators/atr.js +5 -5
  510. package/indicators/atr.js.map +1 -1
  511. package/indicators/atr.src.js +11 -2
  512. package/indicators/bollinger-bands.d.ts +1 -17
  513. package/indicators/bollinger-bands.js +11 -12
  514. package/indicators/bollinger-bands.js.map +1 -1
  515. package/indicators/bollinger-bands.src.d.ts +1 -17
  516. package/indicators/bollinger-bands.src.js +102 -103
  517. package/indicators/cci.js +5 -5
  518. package/indicators/cci.js.map +1 -1
  519. package/indicators/cci.src.js +11 -2
  520. package/indicators/chaikin.js +8 -8
  521. package/indicators/chaikin.js.map +1 -1
  522. package/indicators/chaikin.src.js +11 -2
  523. package/indicators/cmf.js +6 -6
  524. package/indicators/cmf.js.map +1 -1
  525. package/indicators/cmf.src.js +11 -2
  526. package/indicators/cmo.js +5 -5
  527. package/indicators/cmo.js.map +1 -1
  528. package/indicators/cmo.src.js +11 -2
  529. package/indicators/dema.js +5 -5
  530. package/indicators/dema.js.map +1 -1
  531. package/indicators/dema.src.js +11 -2
  532. package/indicators/disparity-index.js +6 -6
  533. package/indicators/disparity-index.js.map +1 -1
  534. package/indicators/disparity-index.src.js +11 -2
  535. package/indicators/dmi.js +12 -12
  536. package/indicators/dmi.js.map +1 -1
  537. package/indicators/dmi.src.js +109 -106
  538. package/indicators/dpo.js +5 -5
  539. package/indicators/dpo.js.map +1 -1
  540. package/indicators/dpo.src.js +11 -2
  541. package/indicators/ema.js +2 -1
  542. package/indicators/ema.js.map +1 -1
  543. package/indicators/ema.src.js +10 -1
  544. package/indicators/ichimoku-kinko-hyo.js +16 -16
  545. package/indicators/ichimoku-kinko-hyo.js.map +1 -1
  546. package/indicators/ichimoku-kinko-hyo.src.js +11 -2
  547. package/indicators/indicators-all.d.ts +1 -17
  548. package/indicators/indicators-all.js +198 -196
  549. package/indicators/indicators-all.js.map +1 -1
  550. package/indicators/indicators-all.src.d.ts +1 -17
  551. package/indicators/indicators-all.src.js +151 -129
  552. package/indicators/indicators.js +13 -12
  553. package/indicators/indicators.js.map +1 -1
  554. package/indicators/indicators.src.js +21 -5
  555. package/indicators/keltner-channels.d.ts +1 -17
  556. package/indicators/keltner-channels.js +11 -11
  557. package/indicators/keltner-channels.js.map +1 -1
  558. package/indicators/keltner-channels.src.d.ts +1 -17
  559. package/indicators/keltner-channels.src.js +99 -100
  560. package/indicators/klinger.js +14 -14
  561. package/indicators/klinger.js.map +1 -1
  562. package/indicators/klinger.src.js +99 -100
  563. package/indicators/macd.js +13 -11
  564. package/indicators/macd.js.map +1 -1
  565. package/indicators/macd.src.js +35 -14
  566. package/indicators/mfi.js +6 -6
  567. package/indicators/mfi.js.map +1 -1
  568. package/indicators/mfi.src.js +11 -2
  569. package/indicators/momentum.js +5 -5
  570. package/indicators/momentum.js.map +1 -1
  571. package/indicators/momentum.src.js +11 -2
  572. package/indicators/natr.js +5 -4
  573. package/indicators/natr.js.map +1 -1
  574. package/indicators/natr.src.js +11 -2
  575. package/indicators/obv.js +5 -5
  576. package/indicators/obv.js.map +1 -1
  577. package/indicators/obv.src.js +11 -2
  578. package/indicators/pivot-points.js +11 -11
  579. package/indicators/pivot-points.js.map +1 -1
  580. package/indicators/pivot-points.src.js +11 -2
  581. package/indicators/ppo.js +5 -5
  582. package/indicators/ppo.js.map +1 -1
  583. package/indicators/ppo.src.js +11 -2
  584. package/indicators/price-channel.d.ts +1 -17
  585. package/indicators/price-channel.js +11 -11
  586. package/indicators/price-channel.js.map +1 -1
  587. package/indicators/price-channel.src.d.ts +1 -17
  588. package/indicators/price-channel.src.js +99 -100
  589. package/indicators/price-envelopes.js +8 -8
  590. package/indicators/price-envelopes.js.map +1 -1
  591. package/indicators/price-envelopes.src.js +11 -2
  592. package/indicators/psar.js +7 -6
  593. package/indicators/psar.js.map +1 -1
  594. package/indicators/psar.src.js +11 -2
  595. package/indicators/regressions.js +12 -12
  596. package/indicators/regressions.js.map +1 -1
  597. package/indicators/regressions.src.js +11 -2
  598. package/indicators/roc.js +5 -5
  599. package/indicators/roc.js.map +1 -1
  600. package/indicators/roc.src.js +11 -2
  601. package/indicators/rsi.js +6 -5
  602. package/indicators/rsi.js.map +1 -1
  603. package/indicators/rsi.src.js +11 -2
  604. package/indicators/slow-stochastic.js +5 -5
  605. package/indicators/slow-stochastic.js.map +1 -1
  606. package/indicators/slow-stochastic.src.js +11 -2
  607. package/indicators/stochastic.d.ts +1 -17
  608. package/indicators/stochastic.js +12 -12
  609. package/indicators/stochastic.js.map +1 -1
  610. package/indicators/stochastic.src.d.ts +1 -17
  611. package/indicators/stochastic.src.js +99 -100
  612. package/indicators/supertrend.js +10 -10
  613. package/indicators/supertrend.js.map +1 -1
  614. package/indicators/supertrend.src.js +14 -5
  615. package/indicators/tema.js +6 -6
  616. package/indicators/tema.js.map +1 -1
  617. package/indicators/tema.src.js +11 -2
  618. package/indicators/trendline.js +5 -5
  619. package/indicators/trendline.js.map +1 -1
  620. package/indicators/trendline.src.js +11 -2
  621. package/indicators/trix.js +4 -4
  622. package/indicators/trix.js.map +1 -1
  623. package/indicators/trix.src.js +11 -2
  624. package/indicators/volume-by-price.js +17 -17
  625. package/indicators/volume-by-price.js.map +1 -1
  626. package/indicators/volume-by-price.src.js +11 -2
  627. package/indicators/vwap.js +5 -5
  628. package/indicators/vwap.js.map +1 -1
  629. package/indicators/vwap.src.js +11 -2
  630. package/indicators/williams-r.js +6 -5
  631. package/indicators/williams-r.js.map +1 -1
  632. package/indicators/williams-r.src.js +11 -2
  633. package/indicators/wma.js +5 -5
  634. package/indicators/wma.js.map +1 -1
  635. package/indicators/wma.src.js +11 -2
  636. package/indicators/zigzag.js +6 -6
  637. package/indicators/zigzag.js.map +1 -1
  638. package/indicators/zigzag.src.js +11 -2
  639. package/lib/jspdf.js +299 -184
  640. package/lib/jspdf.src.js +25266 -18067
  641. package/lib/svg2pdf.js +35 -31
  642. package/lib/svg2pdf.src.js +5721 -4179
  643. package/modules/accessibility.js +242 -237
  644. package/modules/accessibility.js.map +1 -1
  645. package/modules/accessibility.src.js +599 -390
  646. package/modules/annotations-advanced.js +192 -192
  647. package/modules/annotations-advanced.js.map +1 -1
  648. package/modules/annotations-advanced.src.js +96 -47
  649. package/modules/annotations.js +126 -126
  650. package/modules/annotations.js.map +1 -1
  651. package/modules/annotations.src.js +67 -25
  652. package/modules/arc-diagram.js +25 -0
  653. package/modules/arc-diagram.js.map +1 -0
  654. package/modules/arc-diagram.src.js +778 -0
  655. package/modules/arrow-symbols.js +4 -3
  656. package/modules/arrow-symbols.js.map +1 -1
  657. package/modules/arrow-symbols.src.js +11 -2
  658. package/modules/boost-canvas.js +16 -15
  659. package/modules/boost-canvas.js.map +1 -1
  660. package/modules/boost-canvas.src.js +22 -7
  661. package/modules/boost.js +81 -79
  662. package/modules/boost.js.map +1 -1
  663. package/modules/boost.src.js +90 -51
  664. package/modules/broken-axis.js +13 -13
  665. package/modules/broken-axis.js.map +1 -1
  666. package/modules/broken-axis.src.js +11 -2
  667. package/modules/bullet.js +9 -9
  668. package/modules/bullet.js.map +1 -1
  669. package/modules/bullet.src.js +12 -6
  670. package/modules/coloraxis.js +24 -24
  671. package/modules/coloraxis.js.map +1 -1
  672. package/modules/coloraxis.src.js +37 -11
  673. package/modules/current-date-indicator.js +5 -4
  674. package/modules/current-date-indicator.js.map +1 -1
  675. package/modules/current-date-indicator.src.js +12 -3
  676. package/modules/cylinder.js +11 -11
  677. package/modules/cylinder.js.map +1 -1
  678. package/modules/cylinder.src.js +11 -2
  679. package/modules/data.d.ts +12 -12
  680. package/modules/data.js +33 -33
  681. package/modules/data.js.map +1 -1
  682. package/modules/data.src.d.ts +12 -12
  683. package/modules/data.src.js +906 -846
  684. package/modules/datagrouping.js +21 -20
  685. package/modules/datagrouping.js.map +1 -1
  686. package/modules/datagrouping.src.js +19 -5
  687. package/modules/debugger.js +8 -7
  688. package/modules/debugger.js.map +1 -1
  689. package/modules/debugger.src.js +15 -2
  690. package/modules/dependency-wheel.js +12 -11
  691. package/modules/dependency-wheel.js.map +1 -1
  692. package/modules/dependency-wheel.src.js +14 -5
  693. package/modules/dotplot.js +6 -6
  694. package/modules/dotplot.js.map +1 -1
  695. package/modules/dotplot.src.js +11 -2
  696. package/modules/drag-panes.js +10 -10
  697. package/modules/drag-panes.js.map +1 -1
  698. package/modules/drag-panes.src.js +12 -3
  699. package/modules/draggable-points.js +35 -34
  700. package/modules/draggable-points.js.map +1 -1
  701. package/modules/draggable-points.src.js +20 -9
  702. package/modules/drilldown.d.ts +19 -0
  703. package/modules/drilldown.js +37 -25
  704. package/modules/drilldown.js.map +1 -1
  705. package/modules/drilldown.src.d.ts +19 -0
  706. package/modules/drilldown.src.js +1124 -108
  707. package/modules/dumbbell.d.ts +4 -0
  708. package/modules/dumbbell.js +17 -17
  709. package/modules/dumbbell.js.map +1 -1
  710. package/modules/dumbbell.src.d.ts +4 -0
  711. package/modules/dumbbell.src.js +34 -13
  712. package/modules/export-data.js +24 -21
  713. package/modules/export-data.js.map +1 -1
  714. package/modules/export-data.src.js +87 -14
  715. package/modules/exporting.d.ts +8 -8
  716. package/modules/exporting.js +39 -39
  717. package/modules/exporting.js.map +1 -1
  718. package/modules/exporting.src.d.ts +8 -8
  719. package/modules/exporting.src.js +270 -135
  720. package/modules/full-screen.js +8 -7
  721. package/modules/full-screen.js.map +1 -1
  722. package/modules/full-screen.src.js +135 -58
  723. package/modules/funnel.js +12 -12
  724. package/modules/funnel.js.map +1 -1
  725. package/modules/funnel.src.js +13 -4
  726. package/modules/funnel3d.js +21 -21
  727. package/modules/funnel3d.js.map +1 -1
  728. package/modules/funnel3d.src.js +11 -2
  729. package/modules/gantt.js +218 -217
  730. package/modules/gantt.js.map +1 -1
  731. package/modules/gantt.src.js +983 -943
  732. package/modules/grid-axis.js +23 -23
  733. package/modules/grid-axis.js.map +1 -1
  734. package/modules/grid-axis.src.js +900 -890
  735. package/modules/heatmap.js +40 -39
  736. package/modules/heatmap.js.map +1 -1
  737. package/modules/heatmap.src.js +160 -113
  738. package/modules/heikinashi.js +8 -8
  739. package/modules/heikinashi.js.map +1 -1
  740. package/modules/heikinashi.src.js +11 -2
  741. package/modules/histogram-bellcurve.js +13 -13
  742. package/modules/histogram-bellcurve.js.map +1 -1
  743. package/modules/histogram-bellcurve.src.js +11 -2
  744. package/modules/hollowcandlestick.js +9 -9
  745. package/modules/hollowcandlestick.js.map +1 -1
  746. package/modules/hollowcandlestick.src.js +19 -10
  747. package/modules/item-series.js +12 -12
  748. package/modules/item-series.js.map +1 -1
  749. package/modules/item-series.src.js +11 -2
  750. package/modules/lollipop.js +7 -7
  751. package/modules/lollipop.js.map +1 -1
  752. package/modules/lollipop.src.js +12 -3
  753. package/modules/map.d.ts +80 -43
  754. package/modules/map.js +171 -144
  755. package/modules/map.js.map +1 -1
  756. package/modules/map.src.d.ts +80 -43
  757. package/modules/map.src.js +8292 -6822
  758. package/modules/marker-clusters.js +36 -36
  759. package/modules/marker-clusters.js.map +1 -1
  760. package/modules/marker-clusters.src.js +48 -28
  761. package/modules/networkgraph.d.ts +1 -12
  762. package/modules/networkgraph.js +46 -45
  763. package/modules/networkgraph.js.map +1 -1
  764. package/modules/networkgraph.src.d.ts +1 -12
  765. package/modules/networkgraph.src.js +127 -55
  766. package/modules/no-data-to-display.js +5 -5
  767. package/modules/no-data-to-display.js.map +1 -1
  768. package/modules/no-data-to-display.src.js +12 -3
  769. package/modules/offline-exporting.js +20 -18
  770. package/modules/offline-exporting.js.map +1 -1
  771. package/modules/offline-exporting.src.js +129 -28
  772. package/modules/oldie-polyfills.js +7 -7
  773. package/modules/oldie-polyfills.js.map +1 -1
  774. package/modules/oldie-polyfills.src.js +11 -2
  775. package/modules/oldie.js +30 -30
  776. package/modules/oldie.js.map +1 -1
  777. package/modules/oldie.src.js +13 -4
  778. package/modules/organization.js +16 -14
  779. package/modules/organization.js.map +1 -1
  780. package/modules/organization.src.js +168 -34
  781. package/modules/overlapping-datalabels.js +3 -2
  782. package/modules/overlapping-datalabels.js.map +1 -1
  783. package/modules/overlapping-datalabels.src.js +11 -2
  784. package/modules/parallel-coordinates.js +11 -11
  785. package/modules/parallel-coordinates.js.map +1 -1
  786. package/modules/parallel-coordinates.src.js +12 -3
  787. package/modules/pareto.js +7 -7
  788. package/modules/pareto.js.map +1 -1
  789. package/modules/pareto.src.js +11 -2
  790. package/modules/pathfinder.js +31 -31
  791. package/modules/pathfinder.js.map +1 -1
  792. package/modules/pathfinder.src.js +11 -2
  793. package/modules/pattern-fill.js +15 -14
  794. package/modules/pattern-fill.js.map +1 -1
  795. package/modules/pattern-fill.src.js +25 -3
  796. package/modules/price-indicator.js +5 -5
  797. package/modules/price-indicator.js.map +1 -1
  798. package/modules/price-indicator.src.js +11 -2
  799. package/modules/pyramid3d.js +4 -4
  800. package/modules/pyramid3d.js.map +1 -1
  801. package/modules/pyramid3d.src.js +11 -2
  802. package/modules/sankey.d.ts +1 -12
  803. package/modules/sankey.js +32 -29
  804. package/modules/sankey.js.map +1 -1
  805. package/modules/sankey.src.d.ts +1 -12
  806. package/modules/sankey.src.js +422 -207
  807. package/modules/series-label.js +18 -17
  808. package/modules/series-label.js.map +1 -1
  809. package/modules/series-label.src.js +482 -386
  810. package/modules/series-on-point.js +18 -0
  811. package/modules/series-on-point.js.map +1 -0
  812. package/modules/series-on-point.src.js +464 -0
  813. package/modules/solid-gauge.js +10 -10
  814. package/modules/solid-gauge.js.map +1 -1
  815. package/modules/solid-gauge.src.js +15 -6
  816. package/modules/sonification.js +59 -59
  817. package/modules/sonification.js.map +1 -1
  818. package/modules/sonification.src.js +13 -8
  819. package/modules/static-scale.js +5 -4
  820. package/modules/static-scale.js.map +1 -1
  821. package/modules/static-scale.src.js +11 -2
  822. package/modules/stock-tools.js +167 -167
  823. package/modules/stock-tools.js.map +1 -1
  824. package/modules/stock-tools.src.js +118 -67
  825. package/modules/stock.js +205 -204
  826. package/modules/stock.js.map +1 -1
  827. package/modules/stock.src.js +141 -76
  828. package/modules/streamgraph.js +5 -4
  829. package/modules/streamgraph.js.map +1 -1
  830. package/modules/streamgraph.src.js +11 -2
  831. package/modules/sunburst.d.ts +3 -0
  832. package/modules/sunburst.js +73 -60
  833. package/modules/sunburst.js.map +1 -1
  834. package/modules/sunburst.src.d.ts +3 -0
  835. package/modules/sunburst.src.js +1391 -406
  836. package/modules/tilemap.js +17 -17
  837. package/modules/tilemap.js.map +1 -1
  838. package/modules/tilemap.src.js +11 -2
  839. package/modules/timeline.js +18 -18
  840. package/modules/timeline.js.map +1 -1
  841. package/modules/timeline.src.js +14 -5
  842. package/modules/treegrid.js +57 -56
  843. package/modules/treegrid.js.map +1 -1
  844. package/modules/treegrid.src.js +913 -892
  845. package/modules/treemap.d.ts +3 -0
  846. package/modules/treemap.js +54 -41
  847. package/modules/treemap.js.map +1 -1
  848. package/modules/treemap.src.d.ts +3 -0
  849. package/modules/treemap.src.js +1229 -255
  850. package/modules/variable-pie.js +9 -9
  851. package/modules/variable-pie.js.map +1 -1
  852. package/modules/variable-pie.src.js +11 -2
  853. package/modules/variwide.js +12 -12
  854. package/modules/variwide.js.map +1 -1
  855. package/modules/variwide.src.js +11 -2
  856. package/modules/vector.js +8 -7
  857. package/modules/vector.js.map +1 -1
  858. package/modules/vector.src.js +11 -2
  859. package/modules/venn.js +31 -31
  860. package/modules/venn.js.map +1 -1
  861. package/modules/venn.src.js +88 -105
  862. package/modules/windbarb.js +15 -15
  863. package/modules/windbarb.js.map +1 -1
  864. package/modules/windbarb.src.js +11 -2
  865. package/modules/wordcloud.js +23 -23
  866. package/modules/wordcloud.js.map +1 -1
  867. package/modules/wordcloud.src.js +92 -109
  868. package/modules/xrange.js +16 -16
  869. package/modules/xrange.js.map +1 -1
  870. package/modules/xrange.src.js +11 -2
  871. package/package.json +1 -1
  872. package/themes/avocado.js +4 -3
  873. package/themes/avocado.js.map +1 -1
  874. package/themes/avocado.src.js +11 -2
  875. package/themes/brand-dark.js +9 -8
  876. package/themes/brand-dark.js.map +1 -1
  877. package/themes/brand-dark.src.js +11 -2
  878. package/themes/brand-light.js +8 -8
  879. package/themes/brand-light.js.map +1 -1
  880. package/themes/brand-light.src.js +11 -2
  881. package/themes/dark-blue.js +9 -8
  882. package/themes/dark-blue.js.map +1 -1
  883. package/themes/dark-blue.src.js +11 -2
  884. package/themes/dark-green.js +9 -8
  885. package/themes/dark-green.js.map +1 -1
  886. package/themes/dark-green.src.js +11 -2
  887. package/themes/dark-unica.js +8 -7
  888. package/themes/dark-unica.js.map +1 -1
  889. package/themes/dark-unica.src.js +11 -2
  890. package/themes/gray.js +9 -8
  891. package/themes/gray.js.map +1 -1
  892. package/themes/gray.src.js +11 -2
  893. package/themes/grid-light.js +5 -4
  894. package/themes/grid-light.js.map +1 -1
  895. package/themes/grid-light.src.js +11 -2
  896. package/themes/grid.js +5 -5
  897. package/themes/grid.js.map +1 -1
  898. package/themes/grid.src.js +11 -2
  899. package/themes/high-contrast-dark.js +7 -7
  900. package/themes/high-contrast-dark.js.map +1 -1
  901. package/themes/high-contrast-dark.src.js +21 -12
  902. package/themes/high-contrast-light.js +3 -3
  903. package/themes/high-contrast-light.js.map +1 -1
  904. package/themes/high-contrast-light.src.js +21 -12
  905. package/themes/sand-signika.js +5 -5
  906. package/themes/sand-signika.js.map +1 -1
  907. package/themes/sand-signika.src.js +11 -2
  908. package/themes/skies.js +5 -5
  909. package/themes/skies.js.map +1 -1
  910. package/themes/skies.src.js +11 -2
  911. package/themes/sunset.js +3 -3
  912. package/themes/sunset.js.map +1 -1
  913. package/themes/sunset.src.js +11 -2
  914. package/es-modules/Extensions/Polar.js +0 -740
  915. package/es-modules/Maps/ProjectionDefinition.js +0 -9
  916. package/es-modules/Series/ColorMapMixin.js +0 -84
  917. package/es-modules/Series/DrawPointComposition.js +0 -111
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts Gantt JS v9.3.3 (2022-02-01)
2
+ * @license Highcharts Gantt JS v10.2.0 (2022-07-05)
3
3
  *
4
4
  * Gantt series
5
5
  *
@@ -7,7 +7,6 @@
7
7
  *
8
8
  * License: www.highcharts.com/license
9
9
  */
10
- 'use strict';
11
10
  (function (factory) {
12
11
  if (typeof module === 'object' && module.exports) {
13
12
  factory['default'] = factory;
@@ -22,10 +21,20 @@
22
21
  factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
23
22
  }
24
23
  }(function (Highcharts) {
24
+ 'use strict';
25
25
  var _modules = Highcharts ? Highcharts._modules : {};
26
26
  function _registerModule(obj, path, args, fn) {
27
27
  if (!obj.hasOwnProperty(path)) {
28
28
  obj[path] = fn.apply(null, args);
29
+
30
+ if (typeof CustomEvent === 'function') {
31
+ window.dispatchEvent(
32
+ new CustomEvent(
33
+ 'HighchartsModuleLoaded',
34
+ { detail: { path: path, module: obj[path] }
35
+ })
36
+ );
37
+ }
29
38
  }
30
39
  }
31
40
  _registerModule(_modules, 'Series/XRange/XRangePoint.js', [_modules['Core/Series/Point.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (Point, SeriesRegistry, U) {
@@ -1715,19 +1724,49 @@
1715
1724
  pick = U.pick,
1716
1725
  timeUnits = U.timeUnits,
1717
1726
  wrap = U.wrap;
1727
+ /* *
1728
+ *
1729
+ * Enums
1730
+ *
1731
+ * */
1732
+ /**
1733
+ * Enum for which side the axis is on. Maps to axis.side.
1734
+ * @private
1735
+ */
1736
+ var GridAxisSide;
1737
+ (function (GridAxisSide) {
1738
+ GridAxisSide[GridAxisSide["top"] = 0] = "top";
1739
+ GridAxisSide[GridAxisSide["right"] = 1] = "right";
1740
+ GridAxisSide[GridAxisSide["bottom"] = 2] = "bottom";
1741
+ GridAxisSide[GridAxisSide["left"] = 3] = "left";
1742
+ })(GridAxisSide || (GridAxisSide = {}));
1743
+ /* *
1744
+ *
1745
+ * Constants
1746
+ *
1747
+ * */
1748
+ var composedClasses = [];
1718
1749
  /* *
1719
1750
  *
1720
1751
  * Functions
1721
1752
  *
1722
1753
  * */
1723
- /* eslint-disable require-jsdoc */
1754
+ /**
1755
+ * @private
1756
+ */
1724
1757
  function argsToArray(args) {
1725
1758
  return Array.prototype.slice.call(args, 1);
1726
1759
  }
1760
+ /**
1761
+ * @private
1762
+ */
1727
1763
  function isObject(x) {
1728
1764
  // Always use strict mode
1729
1765
  return U.isObject(x, true);
1730
1766
  }
1767
+ /**
1768
+ * @private
1769
+ */
1731
1770
  function applyGridOptions(axis) {
1732
1771
  var options = axis.options;
1733
1772
  // Center-align by default
@@ -1752,960 +1791,925 @@
1752
1791
  options.labels.rotation = 0;
1753
1792
  }
1754
1793
  /**
1755
- * Axis with grid support.
1794
+ * Extends axis class with grid support.
1756
1795
  * @private
1757
1796
  */
1758
- var GridAxis;
1759
- (function (GridAxis) {
1760
- /* *
1761
- *
1762
- * Declarations
1763
- *
1764
- * */
1765
- /**
1766
- * Enum for which side the axis is on. Maps to axis.side.
1767
- * @private
1768
- */
1769
- var Side;
1770
- (function (Side) {
1771
- Side[Side["top"] = 0] = "top";
1772
- Side[Side["right"] = 1] = "right";
1773
- Side[Side["bottom"] = 2] = "bottom";
1774
- Side[Side["left"] = 3] = "left";
1775
- })(Side = GridAxis.Side || (GridAxis.Side = {}));
1776
- /* *
1777
- *
1778
- * Functions
1779
- *
1780
- * */
1781
- /* eslint-disable valid-jsdoc */
1782
- /**
1783
- * Extends axis class with grid support.
1784
- * @private
1785
- */
1786
- function compose(AxisClass, ChartClass, TickClass) {
1787
- if (AxisClass.keepProps.indexOf('grid') === -1) {
1788
- AxisClass.keepProps.push('grid');
1789
- AxisClass.prototype.getMaxLabelDimensions = getMaxLabelDimensions;
1790
- wrap(AxisClass.prototype, 'unsquish', wrapUnsquish);
1791
- // Add event handlers
1792
- addEvent(AxisClass, 'init', onInit);
1793
- addEvent(AxisClass, 'afterGetOffset', onAfterGetOffset);
1794
- addEvent(AxisClass, 'afterGetTitlePosition', onAfterGetTitlePosition);
1795
- addEvent(AxisClass, 'afterInit', onAfterInit);
1796
- addEvent(AxisClass, 'afterRender', onAfterRender);
1797
- addEvent(AxisClass, 'afterSetAxisTranslation', onAfterSetAxisTranslation);
1798
- addEvent(AxisClass, 'afterSetOptions', onAfterSetOptions);
1799
- addEvent(AxisClass, 'afterSetOptions', onAfterSetOptions2);
1800
- addEvent(AxisClass, 'afterSetScale', onAfterSetScale);
1801
- addEvent(AxisClass, 'afterTickSize', onAfterTickSize);
1802
- addEvent(AxisClass, 'trimTicks', onTrimTicks);
1803
- addEvent(AxisClass, 'destroy', onDestroy);
1804
- }
1797
+ function compose(AxisClass, ChartClass, TickClass) {
1798
+ if (composedClasses.indexOf(AxisClass) === -1) {
1799
+ composedClasses.push(AxisClass);
1800
+ AxisClass.keepProps.push('grid');
1801
+ AxisClass.prototype.getMaxLabelDimensions = getMaxLabelDimensions;
1802
+ wrap(AxisClass.prototype, 'unsquish', wrapUnsquish);
1803
+ // Add event handlers
1804
+ addEvent(AxisClass, 'init', onInit);
1805
+ addEvent(AxisClass, 'afterGetOffset', onAfterGetOffset);
1806
+ addEvent(AxisClass, 'afterGetTitlePosition', onAfterGetTitlePosition);
1807
+ addEvent(AxisClass, 'afterInit', onAfterInit);
1808
+ addEvent(AxisClass, 'afterRender', onAfterRender);
1809
+ addEvent(AxisClass, 'afterSetAxisTranslation', onAfterSetAxisTranslation);
1810
+ addEvent(AxisClass, 'afterSetOptions', onAfterSetOptions);
1811
+ addEvent(AxisClass, 'afterSetOptions', onAfterSetOptions2);
1812
+ addEvent(AxisClass, 'afterSetScale', onAfterSetScale);
1813
+ addEvent(AxisClass, 'afterTickSize', onAfterTickSize);
1814
+ addEvent(AxisClass, 'trimTicks', onTrimTicks);
1815
+ addEvent(AxisClass, 'destroy', onDestroy);
1816
+ }
1817
+ if (composedClasses.indexOf(ChartClass) === -1) {
1805
1818
  addEvent(ChartClass, 'afterSetChartSize', onChartAfterSetChartSize);
1819
+ }
1820
+ if (composedClasses.indexOf(TickClass) === -1) {
1806
1821
  addEvent(TickClass, 'afterGetLabelPosition', onTickAfterGetLabelPosition);
1807
1822
  addEvent(TickClass, 'labelFormat', onTickLabelFormat);
1808
- return AxisClass;
1809
1823
  }
1810
- GridAxis.compose = compose;
1811
- /**
1812
- * Get the largest label width and height.
1813
- *
1814
- * @private
1815
- * @function Highcharts.Axis#getMaxLabelDimensions
1816
- *
1817
- * @param {Highcharts.Dictionary<Highcharts.Tick>} ticks
1818
- * All the ticks on one axis.
1819
- *
1820
- * @param {Array<number|string>} tickPositions
1821
- * All the tick positions on one axis.
1822
- *
1823
- * @return {Highcharts.SizeObject}
1824
- * Object containing the properties height and width.
1825
- *
1826
- * @todo Move this to the generic axis implementation, as it is used there.
1827
- */
1828
- function getMaxLabelDimensions(ticks, tickPositions) {
1829
- var dimensions = {
1830
- width: 0,
1831
- height: 0
1832
- };
1833
- tickPositions.forEach(function (pos) {
1834
- var tick = ticks[pos];
1835
- var labelHeight = 0,
1836
- labelWidth = 0,
1837
- label;
1838
- if (isObject(tick)) {
1839
- label = isObject(tick.label) ? tick.label : {};
1840
- // Find width and height of label
1841
- labelHeight = label.getBBox ? label.getBBox().height : 0;
1842
- if (label.textStr && !isNumber(label.textPxLength)) {
1843
- label.textPxLength = label.getBBox().width;
1844
- }
1845
- labelWidth = isNumber(label.textPxLength) ?
1846
- // Math.round ensures crisp lines
1847
- Math.round(label.textPxLength) :
1848
- 0;
1849
- if (label.textStr) {
1850
- // Set the tickWidth same as the label width after ellipsis
1851
- // applied #10281
1852
- labelWidth = Math.round(label.getBBox().width);
1853
- }
1854
- // Update the result if width and/or height are larger
1855
- dimensions.height = Math.max(labelHeight, dimensions.height);
1856
- dimensions.width = Math.max(labelWidth, dimensions.width);
1824
+ return AxisClass;
1825
+ }
1826
+ /**
1827
+ * Get the largest label width and height.
1828
+ *
1829
+ * @private
1830
+ * @function Highcharts.Axis#getMaxLabelDimensions
1831
+ *
1832
+ * @param {Highcharts.Dictionary<Highcharts.Tick>} ticks
1833
+ * All the ticks on one axis.
1834
+ *
1835
+ * @param {Array<number|string>} tickPositions
1836
+ * All the tick positions on one axis.
1837
+ *
1838
+ * @return {Highcharts.SizeObject}
1839
+ * Object containing the properties height and width.
1840
+ *
1841
+ * @todo Move this to the generic axis implementation, as it is used there.
1842
+ */
1843
+ function getMaxLabelDimensions(ticks, tickPositions) {
1844
+ var dimensions = {
1845
+ width: 0,
1846
+ height: 0
1847
+ };
1848
+ tickPositions.forEach(function (pos) {
1849
+ var tick = ticks[pos];
1850
+ var labelHeight = 0,
1851
+ labelWidth = 0,
1852
+ label;
1853
+ if (isObject(tick)) {
1854
+ label = isObject(tick.label) ? tick.label : {};
1855
+ // Find width and height of label
1856
+ labelHeight = label.getBBox ? label.getBBox().height : 0;
1857
+ if (label.textStr && !isNumber(label.textPxLength)) {
1858
+ label.textPxLength = label.getBBox().width;
1859
+ }
1860
+ labelWidth = isNumber(label.textPxLength) ?
1861
+ // Math.round ensures crisp lines
1862
+ Math.round(label.textPxLength) :
1863
+ 0;
1864
+ if (label.textStr) {
1865
+ // Set the tickWidth same as the label width after ellipsis
1866
+ // applied #10281
1867
+ labelWidth = Math.round(label.getBBox().width);
1857
1868
  }
1858
- });
1859
- // For tree grid, add indentation
1860
- if (this.options.type === 'treegrid' &&
1861
- this.treeGrid &&
1862
- this.treeGrid.mapOfPosToGridNode) {
1863
- var treeDepth = this.treeGrid.mapOfPosToGridNode[-1].height || 0;
1864
- dimensions.width += (this.options.labels.indentation *
1865
- (treeDepth - 1));
1866
- }
1867
- return dimensions;
1869
+ // Update the result if width and/or height are larger
1870
+ dimensions.height = Math.max(labelHeight, dimensions.height);
1871
+ dimensions.width = Math.max(labelWidth, dimensions.width);
1872
+ }
1873
+ });
1874
+ // For tree grid, add indentation
1875
+ if (this.options.type === 'treegrid' &&
1876
+ this.treeGrid &&
1877
+ this.treeGrid.mapOfPosToGridNode) {
1878
+ var treeDepth = this.treeGrid.mapOfPosToGridNode[-1].height || 0;
1879
+ dimensions.width += (this.options.labels.indentation *
1880
+ (treeDepth - 1));
1868
1881
  }
1869
- /**
1870
- * Handle columns and getOffset.
1871
- * @private
1872
- */
1873
- function onAfterGetOffset() {
1874
- var grid = this.grid;
1875
- (grid && grid.columns || []).forEach(function (column) {
1876
- column.getOffset();
1877
- });
1882
+ return dimensions;
1883
+ }
1884
+ /**
1885
+ * Handle columns and getOffset.
1886
+ * @private
1887
+ */
1888
+ function onAfterGetOffset() {
1889
+ var grid = this.grid;
1890
+ (grid && grid.columns || []).forEach(function (column) {
1891
+ column.getOffset();
1892
+ });
1893
+ }
1894
+ /**
1895
+ * @private
1896
+ */
1897
+ function onAfterGetTitlePosition(e) {
1898
+ var axis = this;
1899
+ var options = axis.options;
1900
+ var gridOptions = options.grid || {};
1901
+ if (gridOptions.enabled === true) {
1902
+ // compute anchor points for each of the title align options
1903
+ var axisTitle = axis.axisTitle,
1904
+ axisHeight = axis.height,
1905
+ horiz = axis.horiz,
1906
+ axisLeft = axis.left,
1907
+ offset = axis.offset,
1908
+ opposite = axis.opposite,
1909
+ options_1 = axis.options,
1910
+ axisTop = axis.top,
1911
+ axisWidth = axis.width;
1912
+ var tickSize = axis.tickSize();
1913
+ var titleWidth = axisTitle && axisTitle.getBBox().width;
1914
+ var xOption = options_1.title.x;
1915
+ var yOption = options_1.title.y;
1916
+ var titleMargin = pick(options_1.title.margin,
1917
+ horiz ? 5 : 10);
1918
+ var titleFontSize = axis.chart.renderer.fontMetrics(options_1.title.style.fontSize,
1919
+ axisTitle).f;
1920
+ var crispCorr = tickSize ? tickSize[0] / 2 : 0;
1921
+ // TODO account for alignment
1922
+ // the position in the perpendicular direction of the axis
1923
+ var offAxis = ((horiz ? axisTop + axisHeight : axisLeft) +
1924
+ (horiz ? 1 : -1) * // horizontal axis reverses the margin
1925
+ (opposite ? -1 : 1) * // so does opposite axes
1926
+ crispCorr +
1927
+ (axis.side === GridAxisSide.bottom ? titleFontSize : 0));
1928
+ e.titlePosition.x = horiz ?
1929
+ axisLeft - (titleWidth || 0) / 2 - titleMargin + xOption :
1930
+ offAxis + (opposite ? axisWidth : 0) + offset + xOption;
1931
+ e.titlePosition.y = horiz ?
1932
+ (offAxis -
1933
+ (opposite ? axisHeight : 0) +
1934
+ (opposite ? titleFontSize : -titleFontSize) / 2 +
1935
+ offset +
1936
+ yOption) :
1937
+ axisTop - titleMargin + yOption;
1878
1938
  }
1879
- /**
1880
- * @private
1881
- */
1882
- function onAfterGetTitlePosition(e) {
1883
- var axis = this;
1884
- var options = axis.options;
1885
- var gridOptions = options.grid || {};
1886
- if (gridOptions.enabled === true) {
1887
- // compute anchor points for each of the title align options
1888
- var axisTitle = axis.axisTitle,
1889
- axisHeight = axis.height,
1890
- horiz = axis.horiz,
1891
- axisLeft = axis.left,
1892
- offset = axis.offset,
1893
- opposite = axis.opposite,
1894
- options_1 = axis.options,
1895
- axisTop = axis.top,
1896
- axisWidth = axis.width;
1897
- var tickSize = axis.tickSize();
1898
- var titleWidth = axisTitle && axisTitle.getBBox().width;
1899
- var xOption = options_1.title.x;
1900
- var yOption = options_1.title.y;
1901
- var titleMargin = pick(options_1.title.margin,
1902
- horiz ? 5 : 10);
1903
- var titleFontSize = axis.chart.renderer.fontMetrics(options_1.title.style.fontSize,
1904
- axisTitle).f;
1905
- var crispCorr = tickSize ? tickSize[0] / 2 : 0;
1906
- // TODO account for alignment
1907
- // the position in the perpendicular direction of the axis
1908
- var offAxis = ((horiz ? axisTop + axisHeight : axisLeft) +
1909
- (horiz ? 1 : -1) * // horizontal axis reverses the margin
1910
- (opposite ? -1 : 1) * // so does opposite axes
1911
- crispCorr +
1912
- (axis.side === GridAxis.Side.bottom ? titleFontSize : 0));
1913
- e.titlePosition.x = horiz ?
1914
- axisLeft - (titleWidth || 0) / 2 - titleMargin + xOption :
1915
- offAxis + (opposite ? axisWidth : 0) + offset + xOption;
1916
- e.titlePosition.y = horiz ?
1917
- (offAxis -
1918
- (opposite ? axisHeight : 0) +
1919
- (opposite ? titleFontSize : -titleFontSize) / 2 +
1920
- offset +
1921
- yOption) :
1922
- axisTop - titleMargin + yOption;
1923
- }
1939
+ }
1940
+ /**
1941
+ * @private
1942
+ */
1943
+ function onAfterInit() {
1944
+ var axis = this;
1945
+ var chart = axis.chart,
1946
+ _a = axis.options.grid,
1947
+ gridOptions = _a === void 0 ? {} : _a,
1948
+ userOptions = axis.userOptions;
1949
+ if (gridOptions.enabled) {
1950
+ applyGridOptions(axis);
1924
1951
  }
1925
- /**
1926
- * @private
1927
- */
1928
- function onAfterInit() {
1929
- var axis = this;
1930
- var chart = axis.chart,
1931
- _a = axis.options.grid,
1932
- gridOptions = _a === void 0 ? {} : _a,
1933
- userOptions = axis.userOptions;
1934
- if (gridOptions.enabled) {
1935
- applyGridOptions(axis);
1936
- }
1937
- if (gridOptions.columns) {
1938
- var columns = axis.grid.columns = [];
1939
- var columnIndex = axis.grid.columnIndex = 0;
1940
- // Handle columns, each column is a grid axis
1941
- while (++columnIndex < gridOptions.columns.length) {
1942
- var columnOptions = merge(userOptions,
1943
- gridOptions.columns[gridOptions.columns.length - columnIndex - 1], {
1944
- linkedTo: 0,
1945
- // Force to behave like category axis
1946
- type: 'category',
1947
- // Disable by default the scrollbar on the grid axis
1948
- scrollbar: {
1949
- enabled: false
1950
- }
1951
- });
1952
- delete columnOptions.grid.columns; // Prevent recursion
1953
- var column = new Axis(axis.chart,
1954
- columnOptions);
1955
- column.grid.isColumn = true;
1956
- column.grid.columnIndex = columnIndex;
1957
- // Remove column axis from chart axes array, and place it
1958
- // in the columns array.
1959
- erase(chart.axes, column);
1960
- erase(chart[axis.coll], column);
1961
- columns.push(column);
1962
- }
1952
+ if (gridOptions.columns) {
1953
+ var columns = axis.grid.columns = [];
1954
+ var columnIndex = axis.grid.columnIndex = 0;
1955
+ // Handle columns, each column is a grid axis
1956
+ while (++columnIndex < gridOptions.columns.length) {
1957
+ var columnOptions = merge(userOptions,
1958
+ gridOptions.columns[gridOptions.columns.length - columnIndex - 1], {
1959
+ linkedTo: 0,
1960
+ // Force to behave like category axis
1961
+ type: 'category',
1962
+ // Disable by default the scrollbar on the grid axis
1963
+ scrollbar: {
1964
+ enabled: false
1965
+ }
1966
+ });
1967
+ delete columnOptions.grid.columns; // Prevent recursion
1968
+ var column = new Axis(axis.chart,
1969
+ columnOptions);
1970
+ column.grid.isColumn = true;
1971
+ column.grid.columnIndex = columnIndex;
1972
+ // Remove column axis from chart axes array, and place it
1973
+ // in the columns array.
1974
+ erase(chart.axes, column);
1975
+ erase(chart[axis.coll], column);
1976
+ columns.push(column);
1963
1977
  }
1964
1978
  }
1965
- /**
1966
- * Draw an extra line on the far side of the outermost axis,
1967
- * creating floor/roof/wall of a grid. And some padding.
1968
- * ```
1969
- * Make this:
1970
- * (axis.min) __________________________ (axis.max)
1971
- * | | | | |
1972
- * Into this:
1973
- * (axis.min) __________________________ (axis.max)
1974
- * ___|____|____|____|____|__
1975
- * ```
1976
- * @private
1977
- */
1978
- function onAfterRender() {
1979
- var axis = this,
1980
- grid = axis.grid,
1981
- options = axis.options,
1982
- gridOptions = options.grid || {};
1983
- if (gridOptions.enabled === true) {
1984
- var min = axis.min || 0,
1985
- max = axis.max || 0;
1986
- // @todo acutual label padding (top, bottom, left, right)
1987
- axis.maxLabelDimensions = axis.getMaxLabelDimensions(axis.ticks, axis.tickPositions);
1988
- // Remove right wall before rendering if updating
1989
- if (axis.rightWall) {
1990
- axis.rightWall.destroy();
1991
- }
1992
- /*
1993
- Draw an extra axis line on outer axes
1994
- >
1995
- Make this: |______|______|______|___
1979
+ }
1980
+ /**
1981
+ * Draw an extra line on the far side of the outermost axis,
1982
+ * creating floor/roof/wall of a grid. And some padding.
1983
+ * ```
1984
+ * Make this:
1985
+ * (axis.min) __________________________ (axis.max)
1986
+ * | | | | |
1987
+ * Into this:
1988
+ * (axis.min) __________________________ (axis.max)
1989
+ * ___|____|____|____|____|__
1990
+ * ```
1991
+ * @private
1992
+ */
1993
+ function onAfterRender() {
1994
+ var axis = this,
1995
+ grid = axis.grid,
1996
+ options = axis.options,
1997
+ gridOptions = options.grid || {};
1998
+ if (gridOptions.enabled === true) {
1999
+ var min = axis.min || 0,
2000
+ max = axis.max || 0;
2001
+ // @todo acutual label padding (top, bottom, left, right)
2002
+ axis.maxLabelDimensions = axis.getMaxLabelDimensions(axis.ticks, axis.tickPositions);
2003
+ // Remove right wall before rendering if updating
2004
+ if (axis.rightWall) {
2005
+ axis.rightWall.destroy();
2006
+ }
2007
+ /*
2008
+ Draw an extra axis line on outer axes
2009
+ >
2010
+ Make this: |______|______|______|___
1996
2011
 
1997
- > _________________________
1998
- Into this: |______|______|______|__|
1999
- */
2000
- if (axis.grid && axis.grid.isOuterAxis() && axis.axisLine) {
2001
- var lineWidth = options.lineWidth;
2002
- if (lineWidth) {
2003
- var linePath = axis.getLinePath(lineWidth),
2004
- startPoint = linePath[0],
2005
- endPoint = linePath[1],
2006
- // Negate distance if top or left axis
2007
- // Subtract 1px to draw the line at the end of the tick
2008
- tickLength = (axis.tickSize('tick') || [1])[0],
2009
- distance = (tickLength - 1) * ((axis.side === GridAxis.Side.top ||
2010
- axis.side === GridAxis.Side.left) ? -1 : 1);
2011
- // If axis is horizontal, reposition line path vertically
2012
- if (startPoint[0] === 'M' && endPoint[0] === 'L') {
2013
- if (axis.horiz) {
2014
- startPoint[2] += distance;
2015
- endPoint[2] += distance;
2016
- }
2017
- else {
2018
- startPoint[1] += distance;
2019
- endPoint[1] += distance;
2020
- }
2012
+ > _________________________
2013
+ Into this: |______|______|______|__|
2014
+ */
2015
+ if (axis.grid && axis.grid.isOuterAxis() && axis.axisLine) {
2016
+ var lineWidth = options.lineWidth;
2017
+ if (lineWidth) {
2018
+ var linePath = axis.getLinePath(lineWidth),
2019
+ startPoint = linePath[0],
2020
+ endPoint = linePath[1],
2021
+ // Negate distance if top or left axis
2022
+ // Subtract 1px to draw the line at the end of the tick
2023
+ tickLength = (axis.tickSize('tick') || [1])[0],
2024
+ distance = (tickLength - 1) * ((axis.side === GridAxisSide.top ||
2025
+ axis.side === GridAxisSide.left) ? -1 : 1);
2026
+ // If axis is horizontal, reposition line path vertically
2027
+ if (startPoint[0] === 'M' && endPoint[0] === 'L') {
2028
+ if (axis.horiz) {
2029
+ startPoint[2] += distance;
2030
+ endPoint[2] += distance;
2021
2031
  }
2022
- // If it doesn't exist, add an upper and lower border
2023
- // for the vertical grid axis.
2024
- if (!axis.horiz && axis.chart.marginRight) {
2025
- var upperBorderStartPoint = startPoint,
2026
- upperBorderEndPoint = [
2027
- 'L',
2028
- axis.left,
2029
- startPoint[2] || 0
2030
- ],
2031
- upperBorderPath = [
2032
- upperBorderStartPoint,
2033
- upperBorderEndPoint
2034
- ],
2035
- lowerBorderEndPoint = [
2036
- 'L',
2037
- axis.chart.chartWidth - axis.chart.marginRight,
2038
- axis.toPixels(max + axis.tickmarkOffset)
2039
- ],
2040
- lowerBorderStartPoint = [
2041
- 'M',
2042
- endPoint[1] || 0,
2043
- axis.toPixels(max + axis.tickmarkOffset)
2044
- ],
2045
- lowerBorderPath = [
2046
- lowerBorderStartPoint,
2047
- lowerBorderEndPoint
2048
- ];
2049
- if (!axis.grid.upperBorder && min % 1 !== 0) {
2050
- axis.grid.upperBorder = axis.grid.renderBorder(upperBorderPath);
2051
- }
2052
- if (axis.grid.upperBorder) {
2053
- axis.grid.upperBorder.attr({
2054
- stroke: options.lineColor,
2055
- 'stroke-width': options.lineWidth
2056
- });
2057
- axis.grid.upperBorder.animate({
2058
- d: upperBorderPath
2059
- });
2060
- }
2061
- if (!axis.grid.lowerBorder && max % 1 !== 0) {
2062
- axis.grid.lowerBorder = axis.grid.renderBorder(lowerBorderPath);
2063
- }
2064
- if (axis.grid.lowerBorder) {
2065
- axis.grid.lowerBorder.attr({
2066
- stroke: options.lineColor,
2067
- 'stroke-width': options.lineWidth
2068
- });
2069
- axis.grid.lowerBorder.animate({
2070
- d: lowerBorderPath
2071
- });
2072
- }
2032
+ else {
2033
+ startPoint[1] += distance;
2034
+ endPoint[1] += distance;
2035
+ }
2036
+ }
2037
+ // If it doesn't exist, add an upper and lower border
2038
+ // for the vertical grid axis.
2039
+ if (!axis.horiz && axis.chart.marginRight) {
2040
+ var upperBorderStartPoint = startPoint,
2041
+ upperBorderEndPoint = [
2042
+ 'L',
2043
+ axis.left,
2044
+ startPoint[2] || 0
2045
+ ],
2046
+ upperBorderPath = [
2047
+ upperBorderStartPoint,
2048
+ upperBorderEndPoint
2049
+ ],
2050
+ lowerBorderEndPoint = [
2051
+ 'L',
2052
+ axis.chart.chartWidth - axis.chart.marginRight,
2053
+ axis.toPixels(max + axis.tickmarkOffset)
2054
+ ],
2055
+ lowerBorderStartPoint = [
2056
+ 'M',
2057
+ endPoint[1] || 0,
2058
+ axis.toPixels(max + axis.tickmarkOffset)
2059
+ ],
2060
+ lowerBorderPath = [
2061
+ lowerBorderStartPoint,
2062
+ lowerBorderEndPoint
2063
+ ];
2064
+ if (!axis.grid.upperBorder && min % 1 !== 0) {
2065
+ axis.grid.upperBorder = axis.grid.renderBorder(upperBorderPath);
2073
2066
  }
2074
- // Render an extra line parallel to the existing axes, to
2075
- // close the grid.
2076
- if (!axis.grid.axisLineExtra) {
2077
- axis.grid.axisLineExtra = axis.grid.renderBorder(linePath);
2067
+ if (axis.grid.upperBorder) {
2068
+ axis.grid.upperBorder.attr({
2069
+ stroke: options.lineColor,
2070
+ 'stroke-width': options.lineWidth
2071
+ });
2072
+ axis.grid.upperBorder.animate({
2073
+ d: upperBorderPath
2074
+ });
2078
2075
  }
2079
- else {
2080
- axis.grid.axisLineExtra.attr({
2076
+ if (!axis.grid.lowerBorder && max % 1 !== 0) {
2077
+ axis.grid.lowerBorder = axis.grid.renderBorder(lowerBorderPath);
2078
+ }
2079
+ if (axis.grid.lowerBorder) {
2080
+ axis.grid.lowerBorder.attr({
2081
2081
  stroke: options.lineColor,
2082
2082
  'stroke-width': options.lineWidth
2083
2083
  });
2084
- axis.grid.axisLineExtra.animate({
2085
- d: linePath
2084
+ axis.grid.lowerBorder.animate({
2085
+ d: lowerBorderPath
2086
2086
  });
2087
2087
  }
2088
- // show or hide the line depending on options.showEmpty
2089
- axis.axisLine[axis.showAxis ? 'show' : 'hide'](true);
2090
2088
  }
2091
- }
2092
- (grid && grid.columns || []).forEach(function (column) {
2093
- column.render();
2094
- });
2095
- // Manipulate the tick mark visibility
2096
- // based on the axis.max- allows smooth scrolling.
2097
- if (!axis.horiz &&
2098
- axis.chart.hasRendered &&
2099
- (axis.scrollbar ||
2100
- (axis.linkedParent && axis.linkedParent.scrollbar))) {
2101
- var tickmarkOffset = axis.tickmarkOffset,
2102
- lastTick = axis.tickPositions[axis.tickPositions.length - 1],
2103
- firstTick = axis.tickPositions[0];
2104
- var label = void 0;
2105
- while ((label = axis.hiddenLabels.pop()) && label.element) {
2106
- label.show(); // #15453
2089
+ // Render an extra line parallel to the existing axes, to
2090
+ // close the grid.
2091
+ if (!axis.grid.axisLineExtra) {
2092
+ axis.grid.axisLineExtra = axis.grid.renderBorder(linePath);
2107
2093
  }
2108
- // Hide/show firts tick label.
2109
- label = axis.ticks[firstTick].label;
2110
- if (label) {
2111
- if (min - firstTick > tickmarkOffset) {
2112
- axis.hiddenLabels.push(label.hide());
2113
- }
2114
- else {
2115
- label.show();
2116
- }
2094
+ else {
2095
+ axis.grid.axisLineExtra.attr({
2096
+ stroke: options.lineColor,
2097
+ 'stroke-width': options.lineWidth
2098
+ });
2099
+ axis.grid.axisLineExtra.animate({
2100
+ d: linePath
2101
+ });
2117
2102
  }
2118
- // Hide/show last tick mark/label.
2119
- label = axis.ticks[lastTick].label;
2120
- if (label) {
2121
- if (lastTick - max > tickmarkOffset) {
2122
- axis.hiddenLabels.push(label.hide());
2123
- }
2124
- else {
2125
- label.show();
2126
- }
2103
+ // show or hide the line depending on options.showEmpty
2104
+ axis.axisLine[axis.showAxis ? 'show' : 'hide']();
2105
+ }
2106
+ }
2107
+ (grid && grid.columns || []).forEach(function (column) { return column.render(); });
2108
+ // Manipulate the tick mark visibility
2109
+ // based on the axis.max- allows smooth scrolling.
2110
+ if (!axis.horiz &&
2111
+ axis.chart.hasRendered &&
2112
+ (axis.scrollbar ||
2113
+ (axis.linkedParent && axis.linkedParent.scrollbar))) {
2114
+ var tickmarkOffset = axis.tickmarkOffset,
2115
+ lastTick = axis.tickPositions[axis.tickPositions.length - 1],
2116
+ firstTick = axis.tickPositions[0];
2117
+ var label = void 0,
2118
+ tickMark = void 0;
2119
+ while ((label = axis.hiddenLabels.pop()) && label.element) {
2120
+ label.show(); // #15453
2121
+ }
2122
+ while ((tickMark = axis.hiddenMarks.pop()) &&
2123
+ tickMark.element) {
2124
+ tickMark.show(); // #16439
2125
+ }
2126
+ // Hide/show firts tick label.
2127
+ label = axis.ticks[firstTick].label;
2128
+ if (label) {
2129
+ if (min - firstTick > tickmarkOffset) {
2130
+ axis.hiddenLabels.push(label.hide());
2127
2131
  }
2128
- var mark = axis.ticks[lastTick].mark;
2129
- if (mark) {
2130
- if (lastTick - max < tickmarkOffset &&
2131
- lastTick - max > 0 && axis.ticks[lastTick].isLast) {
2132
- mark.hide();
2133
- }
2134
- else if (axis.ticks[lastTick - 1]) {
2135
- mark.show();
2136
- }
2132
+ else {
2133
+ label.show();
2134
+ }
2135
+ }
2136
+ // Hide/show last tick mark/label.
2137
+ label = axis.ticks[lastTick].label;
2138
+ if (label) {
2139
+ if (lastTick - max > tickmarkOffset) {
2140
+ axis.hiddenLabels.push(label.hide());
2141
+ }
2142
+ else {
2143
+ label.show();
2137
2144
  }
2138
2145
  }
2146
+ var mark = axis.ticks[lastTick].mark;
2147
+ if (mark &&
2148
+ lastTick - max < tickmarkOffset &&
2149
+ lastTick - max > 0 && axis.ticks[lastTick].isLast) {
2150
+ axis.hiddenMarks.push(mark.hide());
2151
+ }
2139
2152
  }
2140
2153
  }
2141
- /**
2142
- * @private
2143
- */
2144
- function onAfterSetAxisTranslation() {
2145
- var axis = this;
2146
- var tickInfo = axis.tickPositions && axis.tickPositions.info;
2147
- var options = axis.options;
2148
- var gridOptions = options.grid || {};
2149
- var userLabels = axis.userOptions.labels || {};
2150
- // Fire this only for the Gantt type chart, #14868.
2151
- if (gridOptions.enabled) {
2152
- if (axis.horiz) {
2153
- axis.series.forEach(function (series) {
2154
- series.options.pointRange = 0;
2155
- });
2156
- // Lower level time ticks, like hours or minutes, represent
2157
- // points in time and not ranges. These should be aligned
2158
- // left in the grid cell by default. The same applies to
2159
- // years of higher order.
2160
- if (tickInfo &&
2161
- options.dateTimeLabelFormats &&
2162
- options.labels &&
2163
- !defined(userLabels.align) &&
2164
- (options.dateTimeLabelFormats[tickInfo.unitName]
2165
- .range === false ||
2166
- tickInfo.count > 1 // years
2167
- )) {
2168
- options.labels.align = 'left';
2169
- if (!defined(userLabels.x)) {
2170
- options.labels.x = 3;
2171
- }
2154
+ }
2155
+ /**
2156
+ * @private
2157
+ */
2158
+ function onAfterSetAxisTranslation() {
2159
+ var axis = this;
2160
+ var tickInfo = axis.tickPositions && axis.tickPositions.info;
2161
+ var options = axis.options;
2162
+ var gridOptions = options.grid || {};
2163
+ var userLabels = axis.userOptions.labels || {};
2164
+ // Fire this only for the Gantt type chart, #14868.
2165
+ if (gridOptions.enabled) {
2166
+ if (axis.horiz) {
2167
+ axis.series.forEach(function (series) {
2168
+ series.options.pointRange = 0;
2169
+ });
2170
+ // Lower level time ticks, like hours or minutes, represent
2171
+ // points in time and not ranges. These should be aligned
2172
+ // left in the grid cell by default. The same applies to
2173
+ // years of higher order.
2174
+ if (tickInfo &&
2175
+ options.dateTimeLabelFormats &&
2176
+ options.labels &&
2177
+ !defined(userLabels.align) &&
2178
+ (options.dateTimeLabelFormats[tickInfo.unitName]
2179
+ .range === false ||
2180
+ tickInfo.count > 1 // years
2181
+ )) {
2182
+ options.labels.align = 'left';
2183
+ if (!defined(userLabels.x)) {
2184
+ options.labels.x = 3;
2172
2185
  }
2173
2186
  }
2174
- else {
2175
- // Don't trim ticks which not in min/max range but
2176
- // they are still in the min/max plus tickInterval.
2177
- if (this.options.type !== 'treegrid' &&
2178
- axis.grid &&
2179
- axis.grid.columns) {
2180
- this.minPointOffset = this.tickInterval;
2181
- }
2187
+ }
2188
+ else {
2189
+ // Don't trim ticks which not in min/max range but
2190
+ // they are still in the min/max plus tickInterval.
2191
+ if (this.options.type !== 'treegrid' &&
2192
+ axis.grid &&
2193
+ axis.grid.columns) {
2194
+ this.minPointOffset = this.tickInterval;
2182
2195
  }
2183
2196
  }
2184
2197
  }
2185
- /**
2186
- * Creates a left and right wall on horizontal axes:
2187
- * - Places leftmost tick at the start of the axis, to create a left
2188
- * wall
2189
- * - Ensures that the rightmost tick is at the end of the axis, to
2190
- * create a right wall.
2191
- * @private
2192
- */
2193
- function onAfterSetOptions(e) {
2194
- var options = this.options,
2195
- userOptions = e.userOptions,
2196
- gridOptions = ((options && isObject(options.grid)) ? options.grid : {});
2197
- var gridAxisOptions;
2198
- if (gridOptions.enabled === true) {
2199
- // Merge the user options into default grid axis options so
2200
- // that when a user option is set, it takes presedence.
2201
- gridAxisOptions = merge(true, {
2202
- className: ('highcharts-grid-axis ' + (userOptions.className || '')),
2203
- dateTimeLabelFormats: {
2204
- hour: {
2205
- list: ['%H:%M', '%H']
2206
- },
2207
- day: {
2208
- list: ['%A, %e. %B', '%a, %e. %b', '%E']
2209
- },
2210
- week: {
2211
- list: ['Week %W', 'W%W']
2212
- },
2213
- month: {
2214
- list: ['%B', '%b', '%o']
2215
- }
2216
- },
2217
- grid: {
2218
- borderWidth: 1
2198
+ }
2199
+ /**
2200
+ * Creates a left and right wall on horizontal axes:
2201
+ * - Places leftmost tick at the start of the axis, to create a left
2202
+ * wall
2203
+ * - Ensures that the rightmost tick is at the end of the axis, to
2204
+ * create a right wall.
2205
+ * @private
2206
+ */
2207
+ function onAfterSetOptions(e) {
2208
+ var options = this.options,
2209
+ userOptions = e.userOptions,
2210
+ gridOptions = ((options && isObject(options.grid)) ? options.grid : {});
2211
+ var gridAxisOptions;
2212
+ if (gridOptions.enabled === true) {
2213
+ // Merge the user options into default grid axis options so
2214
+ // that when a user option is set, it takes presedence.
2215
+ gridAxisOptions = merge(true, {
2216
+ className: ('highcharts-grid-axis ' + (userOptions.className || '')),
2217
+ dateTimeLabelFormats: {
2218
+ hour: {
2219
+ list: ['%H:%M', '%H']
2219
2220
  },
2220
- labels: {
2221
- padding: 2,
2222
- style: {
2223
- fontSize: '13px'
2224
- }
2221
+ day: {
2222
+ list: ['%A, %e. %B', '%a, %e. %b', '%E']
2225
2223
  },
2226
- margin: 0,
2227
- title: {
2228
- text: null,
2229
- reserveSpace: false,
2230
- rotation: 0
2224
+ week: {
2225
+ list: ['Week %W', 'W%W']
2231
2226
  },
2232
- // In a grid axis, only allow one unit of certain types,
2233
- // for example we shouln't have one grid cell spanning
2234
- // two days.
2235
- units: [[
2236
- 'millisecond',
2237
- [1, 10, 100]
2238
- ], [
2239
- 'second',
2240
- [1, 10]
2241
- ], [
2242
- 'minute',
2243
- [1, 5, 15]
2244
- ], [
2245
- 'hour',
2246
- [1, 6]
2247
- ], [
2248
- 'day',
2249
- [1]
2250
- ], [
2251
- 'week',
2252
- [1]
2253
- ], [
2254
- 'month',
2255
- [1]
2256
- ], [
2257
- 'year',
2258
- null
2259
- ]]
2260
- }, userOptions);
2261
- // X-axis specific options
2262
- if (this.coll === 'xAxis') {
2263
- // For linked axes, tickPixelInterval is used only if
2264
- // the tickPositioner below doesn't run or returns
2265
- // undefined (like multiple years)
2266
- if (defined(userOptions.linkedTo) &&
2267
- !defined(userOptions.tickPixelInterval)) {
2268
- gridAxisOptions.tickPixelInterval = 350;
2227
+ month: {
2228
+ list: ['%B', '%b', '%o']
2269
2229
  }
2270
- // For the secondary grid axis, use the primary axis'
2271
- // tick intervals and return ticks one level higher.
2272
- if (
2273
- // Check for tick pixel interval in options
2274
- !defined(userOptions.tickPixelInterval) &&
2275
- // Only for linked axes
2276
- defined(userOptions.linkedTo) &&
2277
- !defined(userOptions.tickPositioner) &&
2278
- !defined(userOptions.tickInterval)) {
2279
- gridAxisOptions.tickPositioner = function (min, max) {
2280
- var parentInfo = (this.linkedParent &&
2281
- this.linkedParent.tickPositions &&
2282
- this.linkedParent.tickPositions.info);
2283
- if (parentInfo) {
2284
- var units = (gridAxisOptions.units || []);
2285
- var unitIdx = void 0,
2286
- count = void 0,
2287
- unitName = void 0;
2288
- for (var i = 0; i < units.length; i++) {
2289
- if (units[i][0] ===
2290
- parentInfo.unitName) {
2291
- unitIdx = i;
2292
- break;
2293
- }
2294
- }
2295
- // Get the first allowed count on the next
2296
- // unit.
2297
- if (units[unitIdx + 1]) {
2298
- unitName = units[unitIdx + 1][0];
2299
- count =
2300
- (units[unitIdx + 1][1] || [1])[0];
2301
- // In case the base X axis shows years, make
2302
- // the secondary axis show ten times the
2303
- // years (#11427)
2304
- }
2305
- else if (parentInfo.unitName === 'year') {
2306
- unitName = 'year';
2307
- count = parentInfo.count * 10;
2230
+ },
2231
+ grid: {
2232
+ borderWidth: 1
2233
+ },
2234
+ labels: {
2235
+ padding: 2,
2236
+ style: {
2237
+ fontSize: '13px'
2238
+ }
2239
+ },
2240
+ margin: 0,
2241
+ title: {
2242
+ text: null,
2243
+ reserveSpace: false,
2244
+ rotation: 0
2245
+ },
2246
+ // In a grid axis, only allow one unit of certain types,
2247
+ // for example we shouln't have one grid cell spanning
2248
+ // two days.
2249
+ units: [[
2250
+ 'millisecond',
2251
+ [1, 10, 100]
2252
+ ], [
2253
+ 'second',
2254
+ [1, 10]
2255
+ ], [
2256
+ 'minute',
2257
+ [1, 5, 15]
2258
+ ], [
2259
+ 'hour',
2260
+ [1, 6]
2261
+ ], [
2262
+ 'day',
2263
+ [1]
2264
+ ], [
2265
+ 'week',
2266
+ [1]
2267
+ ], [
2268
+ 'month',
2269
+ [1]
2270
+ ], [
2271
+ 'year',
2272
+ null
2273
+ ]]
2274
+ }, userOptions);
2275
+ // X-axis specific options
2276
+ if (this.coll === 'xAxis') {
2277
+ // For linked axes, tickPixelInterval is used only if
2278
+ // the tickPositioner below doesn't run or returns
2279
+ // undefined (like multiple years)
2280
+ if (defined(userOptions.linkedTo) &&
2281
+ !defined(userOptions.tickPixelInterval)) {
2282
+ gridAxisOptions.tickPixelInterval = 350;
2283
+ }
2284
+ // For the secondary grid axis, use the primary axis'
2285
+ // tick intervals and return ticks one level higher.
2286
+ if (
2287
+ // Check for tick pixel interval in options
2288
+ !defined(userOptions.tickPixelInterval) &&
2289
+ // Only for linked axes
2290
+ defined(userOptions.linkedTo) &&
2291
+ !defined(userOptions.tickPositioner) &&
2292
+ !defined(userOptions.tickInterval)) {
2293
+ gridAxisOptions.tickPositioner = function (min, max) {
2294
+ var parentInfo = (this.linkedParent &&
2295
+ this.linkedParent.tickPositions &&
2296
+ this.linkedParent.tickPositions.info);
2297
+ if (parentInfo) {
2298
+ var units = (gridAxisOptions.units || []);
2299
+ var unitIdx = void 0,
2300
+ count = 1,
2301
+ unitName = 'year';
2302
+ for (var i = 0; i < units.length; i++) {
2303
+ var unit_1 = units[i];
2304
+ if (unit_1 && unit_1[0] === parentInfo.unitName) {
2305
+ unitIdx = i;
2306
+ break;
2308
2307
  }
2309
- var unitRange = timeUnits[unitName];
2310
- this.tickInterval = unitRange * count;
2311
- return this.getTimeTicks({
2312
- unitRange: unitRange,
2313
- count: count,
2314
- unitName: unitName
2315
- }, min, max, this.options.startOfWeek);
2316
2308
  }
2317
- };
2318
- }
2319
- }
2320
- // Now merge the combined options into the axis options
2321
- merge(true, this.options, gridAxisOptions);
2322
- if (this.horiz) {
2323
- /* _________________________
2324
- Make this: ___|_____|_____|_____|__|
2325
- ^ ^
2326
- _________________________
2327
- Into this: |_____|_____|_____|_____|
2328
- ^ ^ */
2329
- options.minPadding = pick(userOptions.minPadding, 0);
2330
- options.maxPadding = pick(userOptions.maxPadding, 0);
2331
- }
2332
- // If borderWidth is set, then use its value for tick and
2333
- // line width.
2334
- if (isNumber(options.grid.borderWidth)) {
2335
- options.tickWidth = options.lineWidth =
2336
- gridOptions.borderWidth;
2309
+ // Get the first allowed count on the next unit.
2310
+ var unit = (isNumber(unitIdx) && units[unitIdx + 1]);
2311
+ if (unit) {
2312
+ unitName = unit[0] || 'year';
2313
+ var counts = unit[1];
2314
+ count = counts && counts[0] || 1;
2315
+ // In case the base X axis shows years, make the
2316
+ // secondary axis show ten times the years (#11427)
2317
+ }
2318
+ else if (parentInfo.unitName === 'year') {
2319
+ // unitName is 'year'
2320
+ count = parentInfo.count * 10;
2321
+ }
2322
+ var unitRange = timeUnits[unitName];
2323
+ this.tickInterval = unitRange * count;
2324
+ return this.chart.time.getTimeTicks({ unitRange: unitRange, count: count, unitName: unitName }, min, max, this.options.startOfWeek);
2325
+ }
2326
+ };
2337
2327
  }
2338
2328
  }
2339
- }
2340
- /**
2341
- * @private
2342
- */
2343
- function onAfterSetOptions2(e) {
2344
- var axis = this;
2345
- var userOptions = e.userOptions;
2346
- var gridOptions = userOptions && userOptions.grid || {};
2347
- var columns = gridOptions.columns;
2348
- // Add column options to the parent axis. Children has their column
2349
- // options set on init in onGridAxisAfterInit.
2350
- if (gridOptions.enabled && columns) {
2351
- merge(true, axis.options, columns[columns.length - 1]);
2329
+ // Now merge the combined options into the axis options
2330
+ merge(true, this.options, gridAxisOptions);
2331
+ if (this.horiz) {
2332
+ /* _________________________
2333
+ Make this: ___|_____|_____|_____|__|
2334
+ ^ ^
2335
+ _________________________
2336
+ Into this: |_____|_____|_____|_____|
2337
+ ^ ^ */
2338
+ options.minPadding = pick(userOptions.minPadding, 0);
2339
+ options.maxPadding = pick(userOptions.maxPadding, 0);
2340
+ }
2341
+ // If borderWidth is set, then use its value for tick and
2342
+ // line width.
2343
+ if (isNumber(options.grid.borderWidth)) {
2344
+ options.tickWidth = options.lineWidth =
2345
+ gridOptions.borderWidth;
2352
2346
  }
2353
2347
  }
2354
- /**
2355
- * Handle columns and setScale.
2356
- * @private
2357
- */
2358
- function onAfterSetScale() {
2359
- var axis = this;
2360
- (axis.grid.columns || []).forEach(function (column) {
2361
- column.setScale();
2362
- });
2348
+ }
2349
+ /**
2350
+ * @private
2351
+ */
2352
+ function onAfterSetOptions2(e) {
2353
+ var axis = this;
2354
+ var userOptions = e.userOptions;
2355
+ var gridOptions = userOptions && userOptions.grid || {};
2356
+ var columns = gridOptions.columns;
2357
+ // Add column options to the parent axis. Children has their column
2358
+ // options set on init in onGridAxisAfterInit.
2359
+ if (gridOptions.enabled && columns) {
2360
+ merge(true, axis.options, columns[columns.length - 1]);
2363
2361
  }
2364
- /**
2365
- * Draw vertical axis ticks extra long to create cell floors and roofs.
2366
- * Overrides the tickLength for vertical axes.
2367
- * @private
2368
- */
2369
- function onAfterTickSize(e) {
2370
- var defaultLeftAxisOptions = AxisDefaults.defaultLeftAxisOptions;
2371
- var _a = this,
2372
- horiz = _a.horiz,
2373
- maxLabelDimensions = _a.maxLabelDimensions,
2374
- _b = _a.options.grid,
2375
- gridOptions = _b === void 0 ? {} : _b;
2376
- if (gridOptions.enabled && maxLabelDimensions) {
2377
- var labelPadding = (Math.abs(defaultLeftAxisOptions.labels.x) * 2);
2378
- var distance = horiz ?
2379
- (gridOptions.cellHeight ||
2380
- labelPadding + maxLabelDimensions.height) :
2381
- labelPadding + maxLabelDimensions.width;
2382
- if (isArray(e.tickSize)) {
2383
- e.tickSize[0] = distance;
2384
- }
2385
- else {
2386
- e.tickSize = [distance, 0];
2387
- }
2362
+ }
2363
+ /**
2364
+ * Handle columns and setScale.
2365
+ * @private
2366
+ */
2367
+ function onAfterSetScale() {
2368
+ var axis = this;
2369
+ (axis.grid.columns || []).forEach(function (column) { return column.setScale(); });
2370
+ }
2371
+ /**
2372
+ * Draw vertical axis ticks extra long to create cell floors and roofs.
2373
+ * Overrides the tickLength for vertical axes.
2374
+ * @private
2375
+ */
2376
+ function onAfterTickSize(e) {
2377
+ var defaultLeftAxisOptions = AxisDefaults.defaultLeftAxisOptions;
2378
+ var _a = this,
2379
+ horiz = _a.horiz,
2380
+ maxLabelDimensions = _a.maxLabelDimensions,
2381
+ _b = _a.options.grid,
2382
+ gridOptions = _b === void 0 ? {} : _b;
2383
+ if (gridOptions.enabled && maxLabelDimensions) {
2384
+ var labelPadding = (Math.abs(defaultLeftAxisOptions.labels.x) * 2);
2385
+ var distance = horiz ?
2386
+ (gridOptions.cellHeight ||
2387
+ labelPadding + maxLabelDimensions.height) :
2388
+ labelPadding + maxLabelDimensions.width;
2389
+ if (isArray(e.tickSize)) {
2390
+ e.tickSize[0] = distance;
2391
+ }
2392
+ else {
2393
+ e.tickSize = [distance, 0];
2388
2394
  }
2389
2395
  }
2390
- /**
2391
- * @private
2392
- */
2393
- function onChartAfterSetChartSize() {
2394
- this.axes.forEach(function (axis) {
2395
- (axis.grid && axis.grid.columns || []).forEach(function (column) {
2396
- column.setAxisSize();
2397
- column.setAxisTranslation();
2398
- });
2396
+ }
2397
+ /**
2398
+ * @private
2399
+ */
2400
+ function onChartAfterSetChartSize() {
2401
+ this.axes.forEach(function (axis) {
2402
+ (axis.grid && axis.grid.columns || []).forEach(function (column) {
2403
+ column.setAxisSize();
2404
+ column.setAxisTranslation();
2399
2405
  });
2406
+ });
2407
+ }
2408
+ /**
2409
+ * @private
2410
+ */
2411
+ function onDestroy(e) {
2412
+ var grid = this.grid;
2413
+ (grid.columns || []).forEach(function (column) { return column.destroy(e.keepEvents); });
2414
+ grid.columns = void 0;
2415
+ }
2416
+ /**
2417
+ * Wraps axis init to draw cell walls on vertical axes.
2418
+ * @private
2419
+ */
2420
+ function onInit(e) {
2421
+ var axis = this;
2422
+ var userOptions = e.userOptions || {};
2423
+ var gridOptions = userOptions.grid || {};
2424
+ if (gridOptions.enabled && defined(gridOptions.borderColor)) {
2425
+ userOptions.tickColor = userOptions.lineColor = (gridOptions.borderColor);
2400
2426
  }
2401
- /**
2402
- * @private
2403
- */
2404
- function onDestroy(e) {
2405
- var grid = this.grid;
2406
- (grid.columns || []).forEach(function (column) {
2407
- column.destroy(e.keepEvents);
2408
- });
2409
- grid.columns = void 0;
2427
+ if (!axis.grid) {
2428
+ axis.grid = new GridAxisAdditions(axis);
2410
2429
  }
2411
- /**
2412
- * Wraps axis init to draw cell walls on vertical axes.
2413
- * @private
2414
- */
2415
- function onInit(e) {
2416
- var axis = this;
2417
- var userOptions = e.userOptions || {};
2418
- var gridOptions = userOptions.grid || {};
2419
- if (gridOptions.enabled && defined(gridOptions.borderColor)) {
2420
- userOptions.tickColor = userOptions.lineColor = (gridOptions.borderColor);
2430
+ axis.hiddenLabels = [];
2431
+ axis.hiddenMarks = [];
2432
+ }
2433
+ /**
2434
+ * Center tick labels in cells.
2435
+ * @private
2436
+ */
2437
+ function onTickAfterGetLabelPosition(e) {
2438
+ var tick = this,
2439
+ label = tick.label,
2440
+ axis = tick.axis,
2441
+ reversed = axis.reversed,
2442
+ chart = axis.chart,
2443
+ options = axis.options,
2444
+ gridOptions = options.grid || {},
2445
+ labelOpts = axis.options.labels,
2446
+ align = labelOpts.align,
2447
+ // verticalAlign is currently not supported for axis.labels.
2448
+ verticalAlign = 'middle', // labelOpts.verticalAlign,
2449
+ side = GridAxisSide[axis.side],
2450
+ tickmarkOffset = e.tickmarkOffset,
2451
+ tickPositions = axis.tickPositions,
2452
+ tickPos = tick.pos - tickmarkOffset,
2453
+ nextTickPos = (isNumber(tickPositions[e.index + 1]) ?
2454
+ tickPositions[e.index + 1] - tickmarkOffset :
2455
+ (axis.max || 0) + tickmarkOffset),
2456
+ tickSize = axis.tickSize('tick'),
2457
+ tickWidth = tickSize ? tickSize[0] : 0,
2458
+ crispCorr = tickSize ? tickSize[1] / 2 : 0;
2459
+ var labelHeight,
2460
+ lblMetrics,
2461
+ lines,
2462
+ bottom,
2463
+ top,
2464
+ left,
2465
+ right;
2466
+ // Only center tick labels in grid axes
2467
+ if (gridOptions.enabled === true) {
2468
+ // Calculate top and bottom positions of the cell.
2469
+ if (side === 'top') {
2470
+ bottom = axis.top + axis.offset;
2471
+ top = bottom - tickWidth;
2472
+ }
2473
+ else if (side === 'bottom') {
2474
+ top = chart.chartHeight - axis.bottom + axis.offset;
2475
+ bottom = top + tickWidth;
2421
2476
  }
2422
- if (!axis.grid) {
2423
- axis.grid = new Additions(axis);
2477
+ else {
2478
+ bottom = axis.top + axis.len - (axis.translate(reversed ? nextTickPos : tickPos) || 0);
2479
+ top = axis.top + axis.len - (axis.translate(reversed ? tickPos : nextTickPos) || 0);
2424
2480
  }
2425
- axis.hiddenLabels = [];
2426
- }
2427
- /**
2428
- * Center tick labels in cells.
2429
- * @private
2430
- */
2431
- function onTickAfterGetLabelPosition(e) {
2432
- var tick = this,
2433
- label = tick.label,
2434
- axis = tick.axis,
2435
- reversed = axis.reversed,
2436
- chart = axis.chart,
2437
- options = axis.options,
2438
- gridOptions = options.grid || {},
2439
- labelOpts = axis.options.labels,
2440
- align = labelOpts.align,
2441
- // verticalAlign is currently not supported for axis.labels.
2442
- verticalAlign = 'middle', // labelOpts.verticalAlign,
2443
- side = GridAxis.Side[axis.side],
2444
- tickmarkOffset = e.tickmarkOffset,
2445
- tickPositions = axis.tickPositions,
2446
- tickPos = tick.pos - tickmarkOffset,
2447
- nextTickPos = (isNumber(tickPositions[e.index + 1]) ?
2448
- tickPositions[e.index + 1] - tickmarkOffset :
2449
- (axis.max || 0) + tickmarkOffset),
2450
- tickSize = axis.tickSize('tick'),
2451
- tickWidth = tickSize ? tickSize[0] : 0,
2452
- crispCorr = tickSize ? tickSize[1] / 2 : 0;
2453
- var labelHeight,
2454
- lblMetrics,
2455
- lines,
2456
- bottom,
2457
- top,
2458
- left,
2459
- right;
2460
- // Only center tick labels in grid axes
2461
- if (gridOptions.enabled === true) {
2462
- // Calculate top and bottom positions of the cell.
2463
- if (side === 'top') {
2464
- bottom = axis.top + axis.offset;
2465
- top = bottom - tickWidth;
2466
- }
2467
- else if (side === 'bottom') {
2468
- top = chart.chartHeight - axis.bottom + axis.offset;
2469
- bottom = top + tickWidth;
2470
- }
2471
- else {
2472
- bottom = axis.top + axis.len - (axis.translate(reversed ? nextTickPos : tickPos) || 0);
2473
- top = axis.top + axis.len - (axis.translate(reversed ? tickPos : nextTickPos) || 0);
2474
- }
2475
- // Calculate left and right positions of the cell.
2476
- if (side === 'right') {
2477
- left = chart.chartWidth - axis.right + axis.offset;
2478
- right = left + tickWidth;
2479
- }
2480
- else if (side === 'left') {
2481
- right = axis.left + axis.offset;
2482
- left = right - tickWidth;
2483
- }
2484
- else {
2485
- left = Math.round(axis.left + (axis.translate(reversed ? nextTickPos : tickPos) || 0)) - crispCorr;
2486
- right = Math.min(// #15742
2487
- Math.round(axis.left + (axis.translate(reversed ? tickPos : nextTickPos) || 0)) - crispCorr, axis.left + axis.len);
2488
- }
2489
- tick.slotWidth = right - left;
2490
- // Calculate the positioning of the label based on
2491
- // alignment.
2492
- e.pos.x = (align === 'left' ?
2493
- left :
2494
- align === 'right' ?
2495
- right :
2496
- left + ((right - left) / 2) // default to center
2497
- );
2498
- e.pos.y = (verticalAlign === 'top' ?
2499
- top :
2500
- verticalAlign === 'bottom' ?
2501
- bottom :
2502
- top + ((bottom - top) / 2) // default to middle
2503
- );
2504
- lblMetrics = chart.renderer.fontMetrics(labelOpts.style.fontSize, label && label.element);
2505
- labelHeight = label ? label.getBBox().height : 0;
2506
- // Adjustment to y position to align the label correctly.
2507
- // Would be better to have a setter or similar for this.
2508
- if (!labelOpts.useHTML) {
2509
- lines = Math.round(labelHeight / lblMetrics.h);
2510
- e.pos.y += (
2511
- // Center the label
2512
- // TODO: why does this actually center the label?
2513
- ((lblMetrics.b - (lblMetrics.h - lblMetrics.f)) / 2) +
2514
- // Adjust for height of additional lines.
2515
- -(((lines - 1) * lblMetrics.h) / 2));
2516
- }
2517
- else {
2518
- e.pos.y += (
2519
- // Readjust yCorr in htmlUpdateTransform
2520
- lblMetrics.b +
2521
- // Adjust for height of html label
2522
- -(labelHeight / 2));
2523
- }
2524
- e.pos.x += (axis.horiz && labelOpts.x) || 0;
2481
+ // Calculate left and right positions of the cell.
2482
+ if (side === 'right') {
2483
+ left = chart.chartWidth - axis.right + axis.offset;
2484
+ right = left + tickWidth;
2525
2485
  }
2526
- }
2527
- /**
2528
- * @private
2529
- */
2530
- function onTickLabelFormat(ctx) {
2531
- var axis = ctx.axis,
2532
- value = ctx.value;
2533
- if (axis.options.grid &&
2534
- axis.options.grid.enabled) {
2535
- var tickPos = axis.tickPositions;
2536
- var series = (axis.linkedParent || axis).series[0];
2537
- var isFirst = value === tickPos[0];
2538
- var isLast = value === tickPos[tickPos.length - 1];
2539
- var point = series && find(series.options.data,
2540
- function (p) {
2541
- return p[axis.isXAxis ? 'x' : 'y'] === value;
2542
- });
2543
- var pointCopy = void 0;
2544
- if (point && series.is('gantt')) {
2545
- // For the Gantt set point aliases to the pointCopy
2546
- // to do not change the original point
2547
- pointCopy = merge(point);
2548
- H.seriesTypes.gantt.prototype.pointClass
2549
- .setGanttPointAliases(pointCopy);
2550
- }
2551
- // Make additional properties available for the
2552
- // formatter
2553
- ctx.isFirst = isFirst;
2554
- ctx.isLast = isLast;
2555
- ctx.point = pointCopy;
2486
+ else if (side === 'left') {
2487
+ right = axis.left + axis.offset;
2488
+ left = right - tickWidth;
2556
2489
  }
2557
- }
2558
- /**
2559
- * Makes tick labels which are usually ignored in a linked axis
2560
- * displayed if they are within range of linkedParent.min.
2561
- * ```
2562
- * _____________________________
2563
- * | | | | |
2564
- * Make this: | | 2 | 3 | 4 |
2565
- * |___|_______|_______|_______|
2566
- * ^
2567
- * _____________________________
2568
- * | | | | |
2569
- * Into this: | 1 | 2 | 3 | 4 |
2570
- * |___|_______|_______|_______|
2571
- * ^
2572
- * ```
2573
- * @private
2574
- * @todo Does this function do what the drawing says? Seems to affect
2575
- * ticks and not the labels directly?
2576
- */
2577
- function onTrimTicks() {
2578
- var axis = this;
2579
- var options = axis.options;
2580
- var gridOptions = options.grid || {};
2581
- var categoryAxis = axis.categories;
2582
- var tickPositions = axis.tickPositions;
2583
- var firstPos = tickPositions[0];
2584
- var lastPos = tickPositions[tickPositions.length - 1];
2585
- var linkedMin = axis.linkedParent && axis.linkedParent.min;
2586
- var linkedMax = axis.linkedParent && axis.linkedParent.max;
2587
- var min = linkedMin || axis.min;
2588
- var max = linkedMax || axis.max;
2589
- var tickInterval = axis.tickInterval;
2590
- var endMoreThanMin = (firstPos < min &&
2591
- firstPos + tickInterval > min);
2592
- var startLessThanMax = (lastPos > max &&
2593
- lastPos - tickInterval < max);
2594
- if (gridOptions.enabled === true &&
2595
- !categoryAxis &&
2596
- (axis.horiz || axis.isLinked)) {
2597
- if (endMoreThanMin && !options.startOnTick) {
2598
- tickPositions[0] = min;
2599
- }
2600
- if (startLessThanMax && !options.endOnTick) {
2601
- tickPositions[tickPositions.length - 1] = max;
2602
- }
2490
+ else {
2491
+ left = Math.round(axis.left + (axis.translate(reversed ? nextTickPos : tickPos) || 0)) - crispCorr;
2492
+ right = Math.min(// #15742
2493
+ Math.round(axis.left + (axis.translate(reversed ? tickPos : nextTickPos) || 0)) - crispCorr, axis.left + axis.len);
2494
+ }
2495
+ tick.slotWidth = right - left;
2496
+ // Calculate the positioning of the label based on
2497
+ // alignment.
2498
+ e.pos.x = (align === 'left' ?
2499
+ left :
2500
+ align === 'right' ?
2501
+ right :
2502
+ left + ((right - left) / 2) // default to center
2503
+ );
2504
+ e.pos.y = (verticalAlign === 'top' ?
2505
+ top :
2506
+ verticalAlign === 'bottom' ?
2507
+ bottom :
2508
+ top + ((bottom - top) / 2) // default to middle
2509
+ );
2510
+ lblMetrics = chart.renderer.fontMetrics(labelOpts.style.fontSize, label && label.element);
2511
+ labelHeight = label ? label.getBBox().height : 0;
2512
+ // Adjustment to y position to align the label correctly.
2513
+ // Would be better to have a setter or similar for this.
2514
+ if (!labelOpts.useHTML) {
2515
+ lines = Math.round(labelHeight / lblMetrics.h);
2516
+ e.pos.y += (
2517
+ // Center the label
2518
+ // TODO: why does this actually center the label?
2519
+ ((lblMetrics.b - (lblMetrics.h - lblMetrics.f)) / 2) +
2520
+ // Adjust for height of additional lines.
2521
+ -(((lines - 1) * lblMetrics.h) / 2));
2603
2522
  }
2523
+ else {
2524
+ e.pos.y += (
2525
+ // Readjust yCorr in htmlUpdateTransform
2526
+ lblMetrics.b +
2527
+ // Adjust for height of html label
2528
+ -(labelHeight / 2));
2529
+ }
2530
+ e.pos.x += (axis.horiz && labelOpts.x) || 0;
2604
2531
  }
2605
- /**
2606
- * Avoid altering tickInterval when reserving space.
2607
- * @private
2608
- */
2609
- function wrapUnsquish(proceed) {
2610
- var axis = this;
2611
- var _a = axis.options.grid,
2612
- gridOptions = _a === void 0 ? {} : _a;
2613
- if (gridOptions.enabled === true && axis.categories) {
2614
- return axis.tickInterval;
2532
+ }
2533
+ /**
2534
+ * @private
2535
+ */
2536
+ function onTickLabelFormat(ctx) {
2537
+ var axis = ctx.axis,
2538
+ value = ctx.value;
2539
+ if (axis.options.grid &&
2540
+ axis.options.grid.enabled) {
2541
+ var tickPos = axis.tickPositions;
2542
+ var series = (axis.linkedParent || axis).series[0];
2543
+ var isFirst = value === tickPos[0];
2544
+ var isLast = value === tickPos[tickPos.length - 1];
2545
+ var point = series && find(series.options.data,
2546
+ function (p) {
2547
+ return p[axis.isXAxis ? 'x' : 'y'] === value;
2548
+ });
2549
+ var pointCopy = void 0;
2550
+ if (point && series.is('gantt')) {
2551
+ // For the Gantt set point aliases to the pointCopy
2552
+ // to do not change the original point
2553
+ pointCopy = merge(point);
2554
+ H.seriesTypes.gantt.prototype.pointClass
2555
+ .setGanttPointAliases(pointCopy);
2556
+ }
2557
+ // Make additional properties available for the
2558
+ // formatter
2559
+ ctx.isFirst = isFirst;
2560
+ ctx.isLast = isLast;
2561
+ ctx.point = pointCopy;
2562
+ }
2563
+ }
2564
+ /**
2565
+ * Makes tick labels which are usually ignored in a linked axis
2566
+ * displayed if they are within range of linkedParent.min.
2567
+ * ```
2568
+ * _____________________________
2569
+ * | | | | |
2570
+ * Make this: | | 2 | 3 | 4 |
2571
+ * |___|_______|_______|_______|
2572
+ * ^
2573
+ * _____________________________
2574
+ * | | | | |
2575
+ * Into this: | 1 | 2 | 3 | 4 |
2576
+ * |___|_______|_______|_______|
2577
+ * ^
2578
+ * ```
2579
+ * @private
2580
+ * @todo Does this function do what the drawing says? Seems to affect
2581
+ * ticks and not the labels directly?
2582
+ */
2583
+ function onTrimTicks() {
2584
+ var axis = this;
2585
+ var options = axis.options;
2586
+ var gridOptions = options.grid || {};
2587
+ var categoryAxis = axis.categories;
2588
+ var tickPositions = axis.tickPositions;
2589
+ var firstPos = tickPositions[0];
2590
+ var lastPos = tickPositions[tickPositions.length - 1];
2591
+ var linkedMin = axis.linkedParent && axis.linkedParent.min;
2592
+ var linkedMax = axis.linkedParent && axis.linkedParent.max;
2593
+ var min = linkedMin || axis.min;
2594
+ var max = linkedMax || axis.max;
2595
+ var tickInterval = axis.tickInterval;
2596
+ var endMoreThanMin = (firstPos < min &&
2597
+ firstPos + tickInterval > min);
2598
+ var startLessThanMax = (lastPos > max &&
2599
+ lastPos - tickInterval < max);
2600
+ if (gridOptions.enabled === true &&
2601
+ !categoryAxis &&
2602
+ (axis.horiz || axis.isLinked)) {
2603
+ if (endMoreThanMin && !options.startOnTick) {
2604
+ tickPositions[0] = min;
2605
+ }
2606
+ if (startLessThanMax && !options.endOnTick) {
2607
+ tickPositions[tickPositions.length - 1] = max;
2615
2608
  }
2616
- return proceed.apply(axis, argsToArray(arguments));
2609
+ }
2610
+ }
2611
+ /**
2612
+ * Avoid altering tickInterval when reserving space.
2613
+ * @private
2614
+ */
2615
+ function wrapUnsquish(proceed) {
2616
+ var axis = this;
2617
+ var _a = axis.options.grid,
2618
+ gridOptions = _a === void 0 ? {} : _a;
2619
+ if (gridOptions.enabled === true && axis.categories) {
2620
+ return axis.tickInterval;
2621
+ }
2622
+ return proceed.apply(axis, argsToArray(arguments));
2623
+ }
2624
+ /* *
2625
+ *
2626
+ * Class
2627
+ *
2628
+ * */
2629
+ /**
2630
+ * Additions for grid axes.
2631
+ * @private
2632
+ * @class
2633
+ */
2634
+ var GridAxisAdditions = /** @class */ (function () {
2635
+ /* *
2636
+ *
2637
+ * Constructors
2638
+ *
2639
+ * */
2640
+ function GridAxisAdditions(axis) {
2641
+ this.axis = axis;
2617
2642
  }
2618
2643
  /* *
2644
+ *
2645
+ * Functions
2646
+ *
2647
+ * */
2648
+ /**
2649
+ * Checks if an axis is the outer axis in its dimension. Since
2650
+ * axes are placed outwards in order, the axis with the highest
2651
+ * index is the outermost axis.
2619
2652
  *
2620
- * Class
2653
+ * Example: If there are multiple x-axes at the top of the chart,
2654
+ * this function returns true if the axis supplied is the last
2655
+ * of the x-axes.
2621
2656
  *
2622
- * */
2623
- /**
2624
- * Additions for grid axes.
2625
2657
  * @private
2626
- * @class
2658
+ *
2659
+ * @return {boolean}
2660
+ * True if the axis is the outermost axis in its dimension; false if
2661
+ * not.
2627
2662
  */
2628
- var Additions = /** @class */ (function () {
2629
- /* *
2630
- *
2631
- * Constructors
2632
- *
2633
- * */
2634
- function Additions(axis) {
2635
- this.axis = axis;
2636
- }
2637
- /* *
2638
- *
2639
- * Functions
2640
- *
2641
- * */
2642
- /**
2643
- * Checks if an axis is the outer axis in its dimension. Since
2644
- * axes are placed outwards in order, the axis with the highest
2645
- * index is the outermost axis.
2646
- *
2647
- * Example: If there are multiple x-axes at the top of the chart,
2648
- * this function returns true if the axis supplied is the last
2649
- * of the x-axes.
2650
- *
2651
- * @private
2652
- *
2653
- * @return {boolean}
2654
- * True if the axis is the outermost axis in its dimension; false if
2655
- * not.
2656
- */
2657
- Additions.prototype.isOuterAxis = function () {
2658
- var axis = this.axis;
2659
- var chart = axis.chart;
2660
- var columnIndex = axis.grid.columnIndex;
2661
- var columns = (axis.linkedParent && axis.linkedParent.grid.columns ||
2662
- axis.grid.columns);
2663
- var parentAxis = columnIndex ? axis.linkedParent : axis;
2664
- var thisIndex = -1,
2665
- lastIndex = 0;
2666
- chart[axis.coll].forEach(function (otherAxis, index) {
2667
- if (otherAxis.side === axis.side &&
2668
- !otherAxis.options.isInternal) {
2669
- lastIndex = index;
2670
- if (otherAxis === parentAxis) {
2671
- // Get the index of the axis in question
2672
- thisIndex = index;
2673
- }
2663
+ GridAxisAdditions.prototype.isOuterAxis = function () {
2664
+ var axis = this.axis;
2665
+ var chart = axis.chart;
2666
+ var columnIndex = axis.grid.columnIndex;
2667
+ var columns = (axis.linkedParent && axis.linkedParent.grid.columns ||
2668
+ axis.grid.columns);
2669
+ var parentAxis = columnIndex ? axis.linkedParent : axis;
2670
+ var thisIndex = -1,
2671
+ lastIndex = 0;
2672
+ (chart[axis.coll] || []).forEach(function (otherAxis, index) {
2673
+ if (otherAxis.side === axis.side &&
2674
+ !otherAxis.options.isInternal) {
2675
+ lastIndex = index;
2676
+ if (otherAxis === parentAxis) {
2677
+ // Get the index of the axis in question
2678
+ thisIndex = index;
2674
2679
  }
2675
- });
2676
- return (lastIndex === thisIndex &&
2677
- (isNumber(columnIndex) ?
2678
- columns.length === columnIndex :
2679
- true));
2680
- };
2681
- /**
2682
- * Add extra border based on the provided path.
2683
- * @private
2684
- * @param {SVGPath} path
2685
- * The path of the border.
2686
- * @return {Highcharts.SVGElement}
2687
- * Border
2688
- */
2689
- Additions.prototype.renderBorder = function (path) {
2690
- var axis = this.axis,
2691
- renderer = axis.chart.renderer,
2692
- options = axis.options,
2693
- extraBorderLine = renderer.path(path)
2694
- .addClass('highcharts-axis-line')
2695
- .add(axis.axisBorder);
2696
- if (!renderer.styledMode) {
2697
- extraBorderLine.attr({
2698
- stroke: options.lineColor,
2699
- 'stroke-width': options.lineWidth,
2700
- zIndex: 7
2701
- });
2702
2680
  }
2703
- return extraBorderLine;
2704
- };
2705
- return Additions;
2706
- }());
2707
- GridAxis.Additions = Additions;
2708
- })(GridAxis || (GridAxis = {}));
2681
+ });
2682
+ return (lastIndex === thisIndex &&
2683
+ (isNumber(columnIndex) ?
2684
+ columns.length === columnIndex :
2685
+ true));
2686
+ };
2687
+ /**
2688
+ * Add extra border based on the provided path.
2689
+ * @private
2690
+ * @param {SVGPath} path
2691
+ * The path of the border.
2692
+ * @return {Highcharts.SVGElement}
2693
+ * Border
2694
+ */
2695
+ GridAxisAdditions.prototype.renderBorder = function (path) {
2696
+ var axis = this.axis,
2697
+ renderer = axis.chart.renderer,
2698
+ options = axis.options,
2699
+ extraBorderLine = renderer.path(path)
2700
+ .addClass('highcharts-axis-line')
2701
+ .add(axis.axisBorder);
2702
+ if (!renderer.styledMode) {
2703
+ extraBorderLine.attr({
2704
+ stroke: options.lineColor,
2705
+ 'stroke-width': options.lineWidth,
2706
+ zIndex: 7
2707
+ });
2708
+ }
2709
+ return extraBorderLine;
2710
+ };
2711
+ return GridAxisAdditions;
2712
+ }());
2709
2713
  /* *
2710
2714
  *
2711
2715
  * Registry
@@ -2717,7 +2721,10 @@
2717
2721
  };
2718
2722
  // Adds week date format
2719
2723
  dateFormats.W = function (timestamp) {
2720
- var d = new this.Date(timestamp);
2724
+ var time = this, d = new this.Date(timestamp), unitsToOmit = ['Hours', 'Milliseconds', 'Minutes', 'Seconds'];
2725
+ unitsToOmit.forEach(function (format) {
2726
+ time.set(format, d, 0);
2727
+ });
2721
2728
  var firstDay = (this.get('Day',
2722
2729
  d) + 6) % 7;
2723
2730
  var thursday = new this.Date(d.valueOf());
@@ -2736,6 +2743,9 @@
2736
2743
  * Default Export
2737
2744
  *
2738
2745
  * */
2746
+ var GridAxis = {
2747
+ compose: compose
2748
+ };
2739
2749
  /* *
2740
2750
  *
2741
2751
  * API Options
@@ -3064,13 +3074,13 @@
3064
3074
  .add(params.group);
3065
3075
  }
3066
3076
  // Set the new position, and show or hide
3067
- icon.attr({ y: shouldRender ? 0 : -9999 }); // #14904, #1338
3077
+ icon[shouldRender ? 'show' : 'hide'](); // #14904, #1338
3068
3078
  // Presentational attributes
3069
3079
  if (!renderer.styledMode) {
3070
3080
  icon
3071
3081
  .attr({
3072
3082
  cursor: 'pointer',
3073
- 'fill': pick(params.color, "#666666" /* neutralColor60 */),
3083
+ 'fill': pick(params.color, "#666666" /* Palette.neutralColor60 */),
3074
3084
  'stroke-width': 1,
3075
3085
  stroke: options.lineColor,
3076
3086
  strokeWidth: options.lineWidth || 0
@@ -3246,6 +3256,17 @@
3246
3256
  brokenAxis.setBreaks(breaks, pick(redraw, true));
3247
3257
  }
3248
3258
  };
3259
+ /**
3260
+ * Destroy remaining labelIcon if exist.
3261
+ *
3262
+ * @private
3263
+ * @function Highcharts.Tick#destroy
3264
+ */
3265
+ Additions.prototype.destroy = function () {
3266
+ if (this.labelIcon) {
3267
+ this.labelIcon.destroy();
3268
+ }
3269
+ };
3249
3270
  /**
3250
3271
  * Expand the grid cell. Used when axis is of type treegrid.
3251
3272
  *
@@ -4337,7 +4358,7 @@
4337
4358
  * @apioption xAxis.currentDateIndicator
4338
4359
  */
4339
4360
  var defaultOptions = {
4340
- color: "#ccd6eb" /* highlightColor20 */,
4361
+ color: "#ccd6eb" /* Palette.highlightColor20 */,
4341
4362
  width: 2,
4342
4363
  /**
4343
4364
  * @declare Highcharts.AxisCurrentDateIndicatorLabelOptions
@@ -8030,7 +8051,7 @@
8030
8051
  *
8031
8052
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
8032
8053
  */
8033
- barBackgroundColor: "#cccccc" /* neutralColor20 */,
8054
+ barBackgroundColor: "#cccccc" /* Palette.neutralColor20 */,
8034
8055
  /**
8035
8056
  * The width of the bar's border.
8036
8057
  *
@@ -8043,7 +8064,7 @@
8043
8064
  *
8044
8065
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
8045
8066
  */
8046
- barBorderColor: "#cccccc" /* neutralColor20 */,
8067
+ barBorderColor: "#cccccc" /* Palette.neutralColor20 */,
8047
8068
  /**
8048
8069
  * The color of the small arrow inside the scrollbar buttons.
8049
8070
  *
@@ -8052,7 +8073,7 @@
8052
8073
  *
8053
8074
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
8054
8075
  */
8055
- buttonArrowColor: "#333333" /* neutralColor80 */,
8076
+ buttonArrowColor: "#333333" /* Palette.neutralColor80 */,
8056
8077
  /**
8057
8078
  * The color of scrollbar buttons.
8058
8079
  *
@@ -8061,7 +8082,7 @@
8061
8082
  *
8062
8083
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
8063
8084
  */
8064
- buttonBackgroundColor: "#e6e6e6" /* neutralColor10 */,
8085
+ buttonBackgroundColor: "#e6e6e6" /* Palette.neutralColor10 */,
8065
8086
  /**
8066
8087
  * The color of the border of the scrollbar buttons.
8067
8088
  *
@@ -8070,7 +8091,7 @@
8070
8091
  *
8071
8092
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
8072
8093
  */
8073
- buttonBorderColor: "#cccccc" /* neutralColor20 */,
8094
+ buttonBorderColor: "#cccccc" /* Palette.neutralColor20 */,
8074
8095
  /**
8075
8096
  * The border width of the scrollbar buttons.
8076
8097
  *
@@ -8083,7 +8104,7 @@
8083
8104
  *
8084
8105
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
8085
8106
  */
8086
- rifleColor: "#333333" /* neutralColor80 */,
8107
+ rifleColor: "#333333" /* Palette.neutralColor80 */,
8087
8108
  /**
8088
8109
  * The color of the track background.
8089
8110
  *
@@ -8092,7 +8113,7 @@
8092
8113
  *
8093
8114
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
8094
8115
  */
8095
- trackBackgroundColor: "#f2f2f2" /* neutralColor5 */,
8116
+ trackBackgroundColor: "#f2f2f2" /* Palette.neutralColor5 */,
8096
8117
  /**
8097
8118
  * The color of the border of the scrollbar track.
8098
8119
  *
@@ -8101,7 +8122,7 @@
8101
8122
  *
8102
8123
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
8103
8124
  */
8104
- trackBorderColor: "#f2f2f2" /* neutralColor5 */,
8125
+ trackBorderColor: "#f2f2f2" /* Palette.neutralColor5 */,
8105
8126
  /**
8106
8127
  * The corner radius of the border of the scrollbar track.
8107
8128
  *
@@ -8541,6 +8562,8 @@
8541
8562
  method = scroller.rendered ? 'animate' : 'attr';
8542
8563
  var xOffset = height,
8543
8564
  yOffset = 0;
8565
+ // Make the scrollbar visible when it is repositioned, #15763.
8566
+ scroller.group.show();
8544
8567
  scroller.x = x;
8545
8568
  scroller.y = y + this.trackBorderWidth;
8546
8569
  scroller.width = width; // width with buttons
@@ -8600,10 +8623,12 @@
8600
8623
  options = scroller.options,
8601
8624
  size = scroller.size,
8602
8625
  styledMode = scroller.chart.styledMode,
8603
- group = renderer.g('scrollbar').attr({
8604
- zIndex: options.zIndex,
8605
- translateY: -99999
8606
- }).add();
8626
+ group = renderer.g('scrollbar')
8627
+ .attr({
8628
+ zIndex: options.zIndex
8629
+ })
8630
+ .hide() // initially hide the scrollbar #15863
8631
+ .add();
8607
8632
  // Draw the scrollbar group
8608
8633
  scroller.group = group;
8609
8634
  // Draw the scrollbar track:
@@ -8731,7 +8756,7 @@
8731
8756
  scroller.scrollbarRifles.hide();
8732
8757
  }
8733
8758
  else {
8734
- scroller.scrollbarRifles.show(true);
8759
+ scroller.scrollbarRifles.show();
8735
8760
  }
8736
8761
  // Show or hide the scrollbar based on the showFull setting
8737
8762
  if (options.showFull === false) {
@@ -9324,7 +9349,7 @@
9324
9349
  */
9325
9350
  inputStyle: {
9326
9351
  /** @ignore */
9327
- color: "#335cad" /* highlightColor80 */,
9352
+ color: "#335cad" /* Palette.highlightColor80 */,
9328
9353
  /** @ignore */
9329
9354
  cursor: 'pointer'
9330
9355
  },
@@ -9341,7 +9366,7 @@
9341
9366
  */
9342
9367
  labelStyle: {
9343
9368
  /** @ignore */
9344
- color: "#666666" /* neutralColor60 */
9369
+ color: "#666666" /* Palette.neutralColor60 */
9345
9370
  }
9346
9371
  }
9347
9372
  });
@@ -9445,7 +9470,8 @@
9445
9470
  rangeSetting,
9446
9471
  ctx,
9447
9472
  ytdExtremes,
9448
- dataGrouping = rangeOptions.dataGrouping;
9473
+ dataGrouping = rangeOptions.dataGrouping,
9474
+ addOffsetMin = true;
9449
9475
  // chart has no data, base series is removed
9450
9476
  if (dataMin === null || dataMax === null) {
9451
9477
  return;
@@ -9478,12 +9504,16 @@
9478
9504
  if (isNumber(ctx.newMax)) {
9479
9505
  newMax = ctx.newMax;
9480
9506
  }
9507
+ // #15799: offsetMin is added in minFromRange so that it works
9508
+ // with pre-selected buttons as well
9509
+ addOffsetMin = false;
9481
9510
  }
9482
9511
  // Fixed times like minutes, hours, days
9483
9512
  }
9484
9513
  else if (range) {
9485
9514
  newMin = Math.max(newMax - range, dataMin);
9486
9515
  newMax = Math.min(newMin + range, dataMax);
9516
+ addOffsetMin = false;
9487
9517
  }
9488
9518
  else if (type === 'ytd') {
9489
9519
  // On user clicks on the buttons, or a delayed action running from
@@ -9494,14 +9524,17 @@
9494
9524
  // event (below). When the series are initialized, but before
9495
9525
  // the chart is rendered, we have access to the xData array
9496
9526
  // (#942).
9497
- if (typeof dataMax === 'undefined') {
9527
+ if (typeof dataMax === 'undefined' ||
9528
+ typeof dataMin === 'undefined') {
9498
9529
  dataMin = Number.MAX_VALUE;
9499
9530
  dataMax = Number.MIN_VALUE;
9500
9531
  chart.series.forEach(function (series) {
9501
9532
  // reassign it to the last item
9502
9533
  var xData = series.xData;
9503
- dataMin = Math.min(xData[0], dataMin);
9504
- dataMax = Math.max(xData[xData.length - 1], dataMax);
9534
+ if (xData) {
9535
+ dataMin = Math.min(xData[0], dataMin);
9536
+ dataMax = Math.max(xData[xData.length - 1], dataMax);
9537
+ }
9505
9538
  });
9506
9539
  redraw = false;
9507
9540
  }
@@ -9521,16 +9554,15 @@
9521
9554
  // If the navigator exist and the axis range is declared reset that
9522
9555
  // range and from now on only use the range set by a user, #14742.
9523
9556
  if (chart.navigator && chart.navigator.baseSeries[0]) {
9524
- chart.navigator.baseSeries[0].xAxis.options
9525
- .range = void 0;
9557
+ chart.navigator.baseSeries[0].xAxis.options.range = void 0;
9526
9558
  }
9527
9559
  newMin = dataMin;
9528
9560
  newMax = dataMax;
9529
9561
  }
9530
- if (defined(newMin)) {
9562
+ if (addOffsetMin && rangeOptions._offsetMin && defined(newMin)) {
9531
9563
  newMin += rangeOptions._offsetMin;
9532
9564
  }
9533
- if (defined(newMax)) {
9565
+ if (rangeOptions._offsetMax && defined(newMax)) {
9534
9566
  newMax += rangeOptions._offsetMax;
9535
9567
  }
9536
9568
  if (this.dropdown) {
@@ -9587,10 +9619,10 @@
9587
9619
  var minInput = rangeSelector.minInput,
9588
9620
  maxInput = rangeSelector.maxInput;
9589
9621
  // #3274 in some case blur is not defined
9590
- if (minInput && minInput.blur) {
9622
+ if (minInput && (minInput.blur)) {
9591
9623
  fireEvent(minInput, 'blur');
9592
9624
  }
9593
- if (maxInput && maxInput.blur) {
9625
+ if (maxInput && (maxInput.blur)) {
9594
9626
  fireEvent(maxInput, 'blur');
9595
9627
  }
9596
9628
  };
@@ -9909,7 +9941,7 @@
9909
9941
  }
9910
9942
  else if (H.isSafari && !hasTimezone(input)) {
9911
9943
  var offset = new Date(input).getTimezoneOffset() / 60;
9912
- input += offset <= 0 ? "+" + pad(-offset) + ":00" : "-" + pad(offset) + ":00";
9944
+ input += offset <= 0 ? "+".concat(pad(-offset), ":00") : "-".concat(pad(offset), ":00");
9913
9945
  }
9914
9946
  var date = Date.parse(input);
9915
9947
  // If the value isn't parsed directly to a value by the
@@ -10031,7 +10063,7 @@
10031
10063
  // Styles
10032
10064
  label.css(merge(chartStyle, options.labelStyle));
10033
10065
  dateBox.css(merge({
10034
- color: "#333333" /* neutralColor80 */
10066
+ color: "#333333" /* Palette.neutralColor80 */
10035
10067
  }, chartStyle, options.inputStyle));
10036
10068
  css(input, extend({
10037
10069
  position: 'absolute',
@@ -10669,7 +10701,7 @@
10669
10701
  var userButtonTheme = (chart.userOptions.rangeSelector &&
10670
10702
  chart.userOptions.rangeSelector.buttonTheme) || {};
10671
10703
  var getAttribs = function (text) { return ({
10672
- text: text ? text + " \u25BE" : '▾',
10704
+ text: text ? "" + text + " \u25BE" : '▾',
10673
10705
  width: 'auto',
10674
10706
  paddingLeft: pick(options.buttonTheme.paddingLeft,
10675
10707
  userButtonTheme.padding, 8),
@@ -10998,8 +11030,8 @@
10998
11030
  min = max - rangeOptions;
10999
11031
  range = rangeOptions;
11000
11032
  }
11001
- else {
11002
- min = max + getTrueRange(max, -rangeOptions.count);
11033
+ else if (rangeOptions) {
11034
+ min = max + getTrueRange(max, -(rangeOptions.count || 1));
11003
11035
  // Let the fixedRange reflect initial settings (#5930)
11004
11036
  if (this.chart) {
11005
11037
  this.chart.fixedRange = max - min;
@@ -11014,11 +11046,16 @@
11014
11046
  if (typeof range === 'undefined') { // #4501
11015
11047
  range = getTrueRange(min, rangeOptions.count);
11016
11048
  }
11017
- this.newMax = Math.min(min + range, this.dataMax);
11049
+ this.newMax = Math.min(min + range, pick(this.dataMax, Number.MAX_VALUE));
11018
11050
  }
11019
11051
  if (!isNumber(max)) {
11020
11052
  min = void 0;
11021
11053
  }
11054
+ else if (!isNumber(rangeOptions) &&
11055
+ rangeOptions &&
11056
+ rangeOptions._offsetMin) {
11057
+ min += rangeOptions._offsetMin;
11058
+ }
11022
11059
  return min;
11023
11060
  };
11024
11061
  if (!H.RangeSelector) {
@@ -11570,13 +11607,13 @@
11570
11607
  *
11571
11608
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
11572
11609
  */
11573
- backgroundColor: "#f2f2f2" /* neutralColor5 */,
11610
+ backgroundColor: "#f2f2f2" /* Palette.neutralColor5 */,
11574
11611
  /**
11575
11612
  * The stroke for the handle border and the stripes inside.
11576
11613
  *
11577
11614
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
11578
11615
  */
11579
- borderColor: "#999999" /* neutralColor40 */
11616
+ borderColor: "#999999" /* Palette.neutralColor40 */
11580
11617
  },
11581
11618
  /**
11582
11619
  * The color of the mask covering the areas of the navigator series
@@ -11593,7 +11630,7 @@
11593
11630
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
11594
11631
  * @default rgba(102,133,194,0.3)
11595
11632
  */
11596
- maskFill: color("#6685c2" /* highlightColor60 */).setOpacity(0.3).get(),
11633
+ maskFill: color("#6685c2" /* Palette.highlightColor60 */).setOpacity(0.3).get(),
11597
11634
  /**
11598
11635
  * The color of the line marking the currently zoomed area in the
11599
11636
  * navigator.
@@ -11604,7 +11641,7 @@
11604
11641
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
11605
11642
  * @default #cccccc
11606
11643
  */
11607
- outlineColor: "#cccccc" /* neutralColor20 */,
11644
+ outlineColor: "#cccccc" /* Palette.neutralColor20 */,
11608
11645
  /**
11609
11646
  * The width of the line marking the currently zoomed area in the
11610
11647
  * navigator.
@@ -11795,7 +11832,7 @@
11795
11832
  className: 'highcharts-navigator-xaxis',
11796
11833
  tickLength: 0,
11797
11834
  lineWidth: 0,
11798
- gridLineColor: "#e6e6e6" /* neutralColor10 */,
11835
+ gridLineColor: "#e6e6e6" /* Palette.neutralColor10 */,
11799
11836
  gridLineWidth: 1,
11800
11837
  tickPixelInterval: 200,
11801
11838
  labels: {
@@ -11805,7 +11842,7 @@
11805
11842
  */
11806
11843
  style: {
11807
11844
  /** @ignore */
11808
- color: "#999999" /* neutralColor40 */
11845
+ color: "#999999" /* Palette.neutralColor40 */
11809
11846
  },
11810
11847
  x: 3,
11811
11848
  y: -4
@@ -12142,19 +12179,21 @@
12142
12179
  maskInside,
12143
12180
  !maskInside
12144
12181
  ].forEach(function (hasMask, index) {
12145
- navigator.shades[index] = renderer.rect()
12146
- .addClass('highcharts-navigator-mask' +
12147
- (index === 1 ? '-inside' : '-outside'))
12148
- .add(navigatorGroup);
12182
+ var shade = renderer.rect()
12183
+ .addClass('highcharts-navigator-mask' +
12184
+ (index === 1 ? '-inside' : '-outside'))
12185
+ .add(navigatorGroup);
12149
12186
  if (!chart.styledMode) {
12150
- navigator.shades[index]
12151
- .attr({
12187
+ shade.attr({
12152
12188
  fill: hasMask ?
12153
12189
  navigatorOptions.maskFill :
12154
12190
  'rgba(0,0,0,0)'
12155
- })
12156
- .css((index === 1) && mouseCursor);
12191
+ });
12192
+ if (index === 1) {
12193
+ shade.css(mouseCursor);
12194
+ }
12157
12195
  }
12196
+ navigator.shades[index] = shade;
12158
12197
  });
12159
12198
  // Create the outline:
12160
12199
  navigator.outline = renderer.path()
@@ -12317,7 +12356,7 @@
12317
12356
  zoomedMin = Math.round(navigator.zoomedMin);
12318
12357
  if (navigatorEnabled) {
12319
12358
  navigator.navigatorGroup.attr({
12320
- visibility: 'visible'
12359
+ visibility: 'inherit'
12321
12360
  });
12322
12361
  // Place elements
12323
12362
  verb = rendered && !navigator.hasDragged ? 'animate' : 'attr';
@@ -13122,7 +13161,8 @@
13122
13161
  Navigator.prototype.getBaseSeriesMin = function (currentSeriesMin) {
13123
13162
  return this.baseSeries.reduce(function (min, series) {
13124
13163
  // (#10193)
13125
- return Math.min(min, series.xData ? series.xData[0] : min);
13164
+ return Math.min(min, series.xData && series.xData.length ?
13165
+ series.xData[0] : min);
13126
13166
  }, currentSeriesMin);
13127
13167
  };
13128
13168
  /**