highcharts 9.2.1 → 9.3.2

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 (896) hide show
  1. package/README.md +13 -6
  2. package/bower.json +1 -1
  3. package/css/annotations/popup.css +48 -8
  4. package/css/annotations/popup.scss +70 -22
  5. package/css/highcharts.css +46 -1
  6. package/css/highcharts.scss +40 -0
  7. package/css/stocktools/gui.css +1 -1
  8. package/css/themes/dark-unica.css +46 -1
  9. package/css/themes/grid-light.css +46 -1
  10. package/css/themes/sand-signika.css +46 -1
  11. package/es-modules/Accessibility/A11yI18n.js +269 -224
  12. package/es-modules/Accessibility/Accessibility.js +244 -129
  13. package/es-modules/Accessibility/AccessibilityComponent.js +78 -313
  14. package/es-modules/Accessibility/Components/AnnotationsA11y.js +19 -5
  15. package/es-modules/Accessibility/Components/ContainerComponent.js +53 -28
  16. package/es-modules/Accessibility/Components/InfoRegionsComponent.js +178 -120
  17. package/es-modules/Accessibility/Components/LegendComponent.js +251 -129
  18. package/es-modules/Accessibility/Components/MenuComponent.js +239 -154
  19. package/es-modules/Accessibility/Components/RangeSelectorComponent.js +172 -93
  20. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +161 -115
  21. package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +138 -69
  22. package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +67 -28
  23. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +48 -56
  24. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +387 -343
  25. package/es-modules/Accessibility/Components/ZoomComponent.js +156 -70
  26. package/es-modules/Accessibility/FocusBorder.js +192 -152
  27. package/es-modules/Accessibility/HighContrastMode.js +79 -66
  28. package/es-modules/Accessibility/HighContrastTheme.js +10 -0
  29. package/es-modules/Accessibility/KeyboardNavigation.js +151 -75
  30. package/es-modules/Accessibility/KeyboardNavigationHandler.js +71 -44
  31. package/es-modules/Accessibility/Options/DeprecatedOptions.js +21 -4
  32. package/es-modules/Accessibility/Options/LangOptions.js +4 -5
  33. package/es-modules/Accessibility/Options/Options.js +32 -17
  34. package/es-modules/Accessibility/ProxyElement.js +218 -0
  35. package/es-modules/Accessibility/ProxyProvider.js +302 -0
  36. package/es-modules/Accessibility/Utils/Announcer.js +17 -10
  37. package/es-modules/Accessibility/Utils/ChartUtilities.js +55 -45
  38. package/es-modules/Accessibility/Utils/DOMElementProvider.js +27 -15
  39. package/es-modules/Accessibility/Utils/EventProvider.js +27 -17
  40. package/es-modules/Accessibility/Utils/HTMLUtilities.js +125 -42
  41. package/es-modules/Core/Animation/Fx.js +5 -14
  42. package/es-modules/Core/Axis/Axis.js +77 -96
  43. package/es-modules/Core/Axis/Axis3D.js +10 -4
  44. package/es-modules/Core/Axis/AxisDefaults.js +35 -24
  45. package/es-modules/Core/Axis/BrokenAxis.js +17 -11
  46. package/es-modules/Core/Axis/Color/ColorAxis.js +7 -4
  47. package/es-modules/Core/Axis/Color/ColorAxisComposition.js +55 -5
  48. package/es-modules/Core/Axis/Color/ColorAxisDefaults.js +5 -5
  49. package/es-modules/Core/Axis/DateTimeAxis.js +3 -14
  50. package/es-modules/Core/Axis/GridAxis.js +26 -16
  51. package/es-modules/Core/Axis/NavigatorAxis.js +0 -5
  52. package/es-modules/Core/Axis/OrdinalAxis.js +88 -92
  53. package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +4 -5
  54. package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js +0 -5
  55. package/es-modules/Core/Axis/RadialAxis.js +7 -28
  56. package/es-modules/Core/Axis/ScrollbarAxis.js +27 -12
  57. package/es-modules/Core/Axis/StackingAxis.js +2 -1
  58. package/es-modules/Core/Axis/Tick.js +2 -4
  59. package/es-modules/Core/Axis/TreeGridAxis.js +28 -19
  60. package/es-modules/Core/Axis/TreeGridTick.js +5 -3
  61. package/es-modules/Core/Axis/WaterfallAxis.js +1 -1
  62. package/es-modules/Core/Axis/ZAxis.js +1 -1
  63. package/es-modules/Core/Chart/Chart.js +44 -47
  64. package/es-modules/Core/Chart/Chart3D.js +23 -10
  65. package/es-modules/Core/Chart/ChartDefaults.js +3 -4
  66. package/es-modules/Core/Chart/ChartNavigationComposition.js +92 -0
  67. package/es-modules/Core/Chart/GanttChart.js +4 -4
  68. package/es-modules/Core/Chart/MapChart.js +13 -25
  69. package/es-modules/Core/Chart/StockChart.js +13 -316
  70. package/es-modules/Core/Color/Palettes.js +22 -0
  71. package/es-modules/Core/DefaultOptions.js +22 -19
  72. package/es-modules/Core/Foundation.js +39 -31
  73. package/es-modules/Core/Geometry/CircleUtilities.js +2 -1
  74. package/es-modules/Core/Globals.js +1 -1
  75. package/es-modules/Core/HttpUtilities.js +8 -7
  76. package/es-modules/Core/Legend/Legend.js +19 -16
  77. package/es-modules/Core/Navigator.js +41 -30
  78. package/es-modules/Core/Pointer.js +52 -45
  79. package/es-modules/Core/Renderer/HTML/AST.js +29 -14
  80. package/es-modules/Core/Renderer/HTML/HTMLElement.js +27 -20
  81. package/es-modules/Core/Renderer/HTML/HTMLRenderer.js +8 -6
  82. package/es-modules/Core/Renderer/RendererUtilities.js +2 -2
  83. package/es-modules/Core/Renderer/SVG/SVGElement.js +11 -20
  84. package/es-modules/Core/Renderer/SVG/SVGLabel.js +17 -8
  85. package/es-modules/Core/Renderer/SVG/SVGRenderer.js +25 -29
  86. package/es-modules/Core/Renderer/SVG/SVGRenderer3D.js +12 -5
  87. package/es-modules/Core/Renderer/SVG/TextBuilder.js +18 -12
  88. package/es-modules/Core/Responsive.js +2 -3
  89. package/es-modules/Core/Scrollbar.js +14 -12
  90. package/es-modules/Core/ScrollbarDefaults.js +10 -9
  91. package/es-modules/Core/Series/DataLabel.js +19 -15
  92. package/es-modules/Core/Series/Point.js +22 -19
  93. package/es-modules/Core/Series/Series.js +200 -235
  94. package/es-modules/Core/Series/SeriesDefaults.js +8 -8
  95. package/es-modules/Core/Series/SeriesRegistry.js +1 -2
  96. package/es-modules/Core/Time.js +14 -11
  97. package/es-modules/Core/Tooltip.js +63 -53
  98. package/es-modules/Core/Utilities.js +20 -24
  99. package/es-modules/Data/DataConverter.js +483 -0
  100. package/es-modules/Data/DataPromise.js +252 -0
  101. package/es-modules/Data/DataSeriesConverter.js +207 -0
  102. package/es-modules/Data/DataTable.js +1205 -0
  103. package/es-modules/Data/Modifiers/ChainModifier.js +299 -0
  104. package/es-modules/Data/Modifiers/DataModifier.js +303 -0
  105. package/es-modules/Data/Modifiers/GroupModifier.js +144 -0
  106. package/es-modules/Data/Modifiers/InvertModifier.js +254 -0
  107. package/es-modules/Data/Modifiers/RangeModifier.js +143 -0
  108. package/es-modules/Data/Modifiers/SeriesPointsModifier.js +110 -0
  109. package/es-modules/Data/Modifiers/SortModifier.js +249 -0
  110. package/es-modules/Data/Parsers/CSVParser.js +400 -0
  111. package/es-modules/Data/Parsers/DataParser.js +101 -0
  112. package/es-modules/Data/Parsers/GoogleSheetsParser.js +223 -0
  113. package/es-modules/Data/Parsers/HTMLTableParser.js +213 -0
  114. package/es-modules/Data/Stores/CSVStore.js +317 -0
  115. package/es-modules/Data/Stores/DataStore.js +276 -0
  116. package/es-modules/Data/Stores/GoogleSheetsStore.js +169 -0
  117. package/es-modules/Data/Stores/HTMLTableStore.js +353 -0
  118. package/es-modules/Extensions/Annotations/Annotations.js +69 -18
  119. package/es-modules/Extensions/Annotations/ControlPoint.js +1 -3
  120. package/es-modules/Extensions/Annotations/Controllables/ControllableCircle.js +1 -1
  121. package/es-modules/Extensions/Annotations/Controllables/ControllableEllipse.js +199 -0
  122. package/es-modules/Extensions/Annotations/Controllables/ControllableImage.js +1 -1
  123. package/es-modules/Extensions/Annotations/Controllables/ControllableLabel.js +3 -6
  124. package/es-modules/Extensions/Annotations/Controllables/ControllablePath.js +3 -2
  125. package/es-modules/Extensions/Annotations/Controllables/ControllableRect.js +1 -1
  126. package/es-modules/Extensions/Annotations/Mixins/ControllableMixin.js +13 -4
  127. package/es-modules/Extensions/Annotations/Mixins/EventEmitterMixin.js +0 -1
  128. package/es-modules/Extensions/Annotations/Mixins/MarkerMixin.js +5 -4
  129. package/es-modules/Extensions/Annotations/NavigationBindings.js +120 -53
  130. package/es-modules/Extensions/Annotations/Popup.js +494 -148
  131. package/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +51 -2
  132. package/es-modules/Extensions/Annotations/Types/CrookedLine.js +5 -3
  133. package/es-modules/Extensions/Annotations/Types/ElliottWave.js +1 -1
  134. package/es-modules/Extensions/Annotations/Types/Fibonacci.js +2 -3
  135. package/es-modules/Extensions/Annotations/Types/FibonacciTimeZones.js +219 -0
  136. package/es-modules/Extensions/Annotations/Types/InfinityLine.js +1 -1
  137. package/es-modules/Extensions/Annotations/Types/Measure.js +29 -19
  138. package/es-modules/Extensions/Annotations/Types/Pitchfork.js +7 -6
  139. package/es-modules/Extensions/Annotations/Types/TimeCycles.js +211 -0
  140. package/es-modules/Extensions/Annotations/Types/Tunnel.js +13 -10
  141. package/es-modules/Extensions/Annotations/Types/VerticalLine.js +1 -1
  142. package/es-modules/Extensions/Boost/BoostOptions.js +2 -2
  143. package/es-modules/Extensions/Boost/BoostOverrides.js +6 -10
  144. package/es-modules/Extensions/Boost/BoostUtils.js +0 -6
  145. package/es-modules/Extensions/Boost/WGLRenderer.js +16 -12
  146. package/es-modules/Extensions/Boost/WGLShader.js +13 -11
  147. package/es-modules/Extensions/Boost/WGLVBuffer.js +4 -7
  148. package/es-modules/Extensions/BoostCanvas.js +1 -2
  149. package/es-modules/Extensions/CurrentDateIndication.js +2 -3
  150. package/es-modules/Extensions/Data.js +77 -115
  151. package/es-modules/Extensions/DataGrouping.js +54 -32
  152. package/es-modules/Extensions/Debugger/ErrorMessages.js +2 -2
  153. package/es-modules/Extensions/DownloadURL.js +2 -2
  154. package/es-modules/Extensions/DragPanes.js +1 -2
  155. package/es-modules/Extensions/DraggablePoints.js +7 -8
  156. package/es-modules/Extensions/Drilldown.js +11 -7
  157. package/es-modules/Extensions/ExportData.js +6 -5
  158. package/es-modules/Extensions/Exporting/Exporting.js +35 -48
  159. package/es-modules/Extensions/Exporting/ExportingDefaults.js +8 -15
  160. package/es-modules/Extensions/FullScreen.js +4 -3
  161. package/es-modules/Extensions/GeoJSON.js +42 -66
  162. package/es-modules/Extensions/MarkerClusters.js +118 -98
  163. package/es-modules/Extensions/Math3D.js +4 -4
  164. package/es-modules/Extensions/NoDataToDisplay.js +1 -2
  165. package/es-modules/Extensions/OfflineExporting/OfflineExporting.js +33 -33
  166. package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
  167. package/es-modules/Extensions/Oldie/Oldie.js +14 -79
  168. package/es-modules/Extensions/Oldie/VMLAxis3D.js +5 -1
  169. package/es-modules/Extensions/OverlappingDataLabels.js +10 -6
  170. package/es-modules/Extensions/Pane.js +11 -12
  171. package/es-modules/Extensions/ParallelCoordinates.js +5 -3
  172. package/es-modules/Extensions/PatternFill.js +17 -11
  173. package/es-modules/Extensions/Polar.js +7 -4
  174. package/es-modules/Extensions/PriceIndication.js +2 -1
  175. package/es-modules/Extensions/RangeSelector.js +22 -59
  176. package/es-modules/Extensions/ScrollablePlotArea.js +2 -2
  177. package/es-modules/Extensions/SeriesLabel.js +1 -1
  178. package/es-modules/Extensions/Sonification/ChartSonify.js +279 -663
  179. package/es-modules/Extensions/Sonification/Earcon.js +136 -102
  180. package/es-modules/Extensions/Sonification/Instrument.js +493 -426
  181. package/es-modules/Extensions/Sonification/MusicalFrequencies.js +10 -0
  182. package/es-modules/Extensions/Sonification/Options.js +10 -0
  183. package/es-modules/Extensions/Sonification/PointSonify.js +207 -152
  184. package/es-modules/Extensions/Sonification/SeriesSonify.js +474 -0
  185. package/es-modules/Extensions/Sonification/SignalHandler.js +122 -0
  186. package/es-modules/Extensions/Sonification/Sonification.js +27 -53
  187. package/es-modules/Extensions/Sonification/{Utilities.js → SonificationUtilities.js} +70 -88
  188. package/es-modules/Extensions/Sonification/Timeline.js +250 -567
  189. package/es-modules/Extensions/Sonification/TimelineEvent.js +157 -0
  190. package/es-modules/Extensions/Sonification/TimelinePath.js +311 -0
  191. package/es-modules/Extensions/Stacking.js +5 -23
  192. package/es-modules/Extensions/Themes/BrandDark.js +293 -0
  193. package/es-modules/Extensions/Themes/BrandLight.js +259 -0
  194. package/es-modules/Extensions/Themes/DarkUnica.js +4 -2
  195. package/es-modules/Extensions/Themes/Grid.js +4 -2
  196. package/es-modules/Extensions/Themes/GridLight.js +4 -2
  197. package/es-modules/Gantt/Connection.js +2 -2
  198. package/es-modules/Gantt/Pathfinder.js +6 -5
  199. package/es-modules/Gantt/PathfinderAlgorithms.js +12 -12
  200. package/es-modules/Maps/MapNavigation.js +30 -68
  201. package/es-modules/Maps/MapNavigationOptionsDefault.js +3 -0
  202. package/es-modules/Maps/MapPointer.js +8 -5
  203. package/es-modules/Maps/MapSymbols.js +23 -3
  204. package/es-modules/Maps/MapView.js +450 -0
  205. package/es-modules/Maps/MapViewOptionsDefault.js +97 -0
  206. package/es-modules/Maps/Projection.js +436 -0
  207. package/es-modules/Maps/ProjectionDefinition.js +9 -0
  208. package/es-modules/Maps/Projections/EqualEarth.js +42 -0
  209. package/es-modules/Maps/Projections/LambertConformalConic.js +52 -0
  210. package/es-modules/Maps/Projections/Miller.js +16 -0
  211. package/es-modules/Maps/Projections/Orthographic.js +26 -0
  212. package/es-modules/Maps/Projections/ProjectionRegistry.js +19 -0
  213. package/es-modules/Maps/Projections/WebMercator.js +24 -0
  214. package/es-modules/Series/Area/AreaSeries.js +13 -13
  215. package/es-modules/Series/Area3DSeries.js +4 -2
  216. package/es-modules/Series/AreaRange/AreaRangeSeries.js +28 -17
  217. package/es-modules/Series/Bellcurve/BellcurveSeries.js +4 -9
  218. package/es-modules/Series/BoxPlot/BoxPlotSeries.js +1 -2
  219. package/es-modules/Series/Bubble/BubbleLegendDefaults.js +1 -2
  220. package/es-modules/Series/Bubble/BubbleLegendItem.js +5 -15
  221. package/es-modules/Series/Bubble/BubblePoint.js +5 -0
  222. package/es-modules/Series/Bubble/BubbleSeries.js +90 -50
  223. package/es-modules/Series/Candlestick/CandlestickSeries.js +10 -19
  224. package/es-modules/{Mixins/CenteredSeries.js → Series/CenteredUtilities.js} +45 -23
  225. package/es-modules/{Mixins/ColorMapSeries.js → Series/ColorMapMixin.js} +10 -8
  226. package/es-modules/Series/Column/ColumnDataLabel.js +5 -5
  227. package/es-modules/Series/Column/ColumnSeries.js +19 -18
  228. package/es-modules/Series/Column3D/Column3DComposition.js +1 -2
  229. package/es-modules/Series/ColumnPyramid/ColumnPyramidSeries.js +11 -8
  230. package/es-modules/Series/ColumnRange/ColumnRangeSeries.js +2 -1
  231. package/es-modules/Series/Cylinder/CylinderComposition.js +36 -4
  232. package/es-modules/Series/DataModifyComposition.js +539 -0
  233. package/es-modules/Series/DependencyWheel/DependencyWheelPoint.js +2 -6
  234. package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +1 -1
  235. package/es-modules/Series/DerivedComposition.js +137 -0
  236. package/es-modules/Series/DrawPointComposition.js +111 -0
  237. package/es-modules/Series/Dumbbell/DumbbellPoint.js +0 -1
  238. package/es-modules/Series/Dumbbell/DumbbellSeries.js +2 -6
  239. package/es-modules/Series/ErrorBar/ErrorBarSeries.js +1 -2
  240. package/es-modules/Series/Flags/FlagsSeries.js +18 -25
  241. package/es-modules/Series/Flags/FlagsSymbols.js +2 -2
  242. package/es-modules/Series/Funnel/FunnelSeries.js +6 -5
  243. package/es-modules/Series/Funnel3D/Funnel3DComposition.js +14 -8
  244. package/es-modules/Series/Funnel3D/Funnel3DSeries.js +2 -1
  245. package/es-modules/Series/Gantt/GanttPoint.js +1 -1
  246. package/es-modules/Series/Gantt/GanttSeries.js +3 -3
  247. package/es-modules/Series/Gauge/GaugePoint.js +1 -1
  248. package/es-modules/Series/Gauge/GaugeSeries.js +7 -7
  249. package/es-modules/Series/HLC/HLCPoint.js +55 -0
  250. package/es-modules/Series/HLC/HLCSeries.js +378 -0
  251. package/es-modules/Series/Heatmap/HeatmapPoint.js +13 -14
  252. package/es-modules/Series/Heatmap/HeatmapSeries.js +24 -12
  253. package/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +10 -9
  254. package/es-modules/Series/Histogram/HistogramSeries.js +7 -11
  255. package/es-modules/Series/HollowCandlestick/HollowCandlestickPoint.js +1 -4
  256. package/es-modules/Series/HollowCandlestick/HollowCandlestickSeries.js +28 -30
  257. package/es-modules/Series/Item/ItemSeries.js +4 -5
  258. package/es-modules/Series/Line/LineSeries.js +1 -2
  259. package/es-modules/Series/Map/MapPoint.js +27 -14
  260. package/es-modules/Series/Map/MapSeries.js +283 -322
  261. package/es-modules/Series/MapBubble/MapBubblePoint.js +0 -3
  262. package/es-modules/Series/MapBubble/MapBubbleSeries.js +10 -1
  263. package/es-modules/Series/MapLine/MapLineSeries.js +2 -4
  264. package/es-modules/Series/MapPoint/MapPointPoint.js +5 -1
  265. package/es-modules/Series/MapPoint/MapPointSeries.js +99 -14
  266. package/es-modules/Series/Networkgraph/DraggableNodes.js +0 -4
  267. package/es-modules/Series/Networkgraph/Integrations.js +8 -22
  268. package/es-modules/Series/Networkgraph/Networkgraph.js +6 -10
  269. package/es-modules/Series/Networkgraph/QuadTree.js +1 -3
  270. package/es-modules/{Mixins/Nodes.js → Series/NodesComposition.js} +78 -30
  271. package/es-modules/Series/OHLC/OHLCPoint.js +2 -7
  272. package/es-modules/Series/OHLC/OHLCSeries.js +55 -183
  273. package/es-modules/{Mixins/OnSeries.js → Series/OnSeriesComposition.js} +53 -21
  274. package/es-modules/Series/Organization/OrganizationSeries.js +6 -5
  275. package/es-modules/Series/PackedBubble/PackedBubbleComposition.js +1 -0
  276. package/es-modules/Series/PackedBubble/PackedBubblePoint.js +1 -1
  277. package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +48 -10
  278. package/es-modules/Series/ParetoSeries/ParetoSeries.js +3 -7
  279. package/es-modules/Series/Pie/PieDataLabel.js +1 -2
  280. package/es-modules/Series/Pie/PiePoint.js +2 -2
  281. package/es-modules/Series/Pie/PieSeries.js +7 -8
  282. package/es-modules/Series/Pie3D/Pie3DComposition.js +2 -1
  283. package/es-modules/Series/Pie3D/Pie3DPoint.js +2 -1
  284. package/es-modules/Series/Pie3D/Pie3DSeries.js +1 -1
  285. package/es-modules/Series/Pyramid3D/Pyramid3DSeries.js +2 -1
  286. package/es-modules/Series/Sankey/SankeyPoint.js +0 -4
  287. package/es-modules/Series/Sankey/SankeySeries.js +92 -22
  288. package/es-modules/Series/SolidGauge/SolidGaugeComposition.js +3 -1
  289. package/es-modules/Series/Spline/SplineSeries.js +0 -8
  290. package/es-modules/Series/Sunburst/SunburstPoint.js +2 -3
  291. package/es-modules/Series/Sunburst/SunburstSeries.js +6 -6
  292. package/es-modules/Series/Sunburst/SunburstUtilities.js +3 -2
  293. package/es-modules/Series/Tilemap/TilemapPoint.js +2 -5
  294. package/es-modules/Series/Tilemap/TilemapShapes.js +0 -7
  295. package/es-modules/Series/Timeline/TimelineSeries.js +3 -4
  296. package/es-modules/{Mixins/TreeSeries.js → Series/TreeUtilities.js} +88 -78
  297. package/es-modules/Series/Treemap/TreemapPoint.js +2 -2
  298. package/es-modules/Series/Treemap/TreemapSeries.js +22 -25
  299. package/es-modules/Series/Variwide/VariwideSeries.js +5 -1
  300. package/es-modules/Series/Venn/VennPoint.js +16 -7
  301. package/es-modules/Series/Venn/VennSeries.js +11 -17
  302. package/es-modules/Series/Venn/VennUtils.js +551 -439
  303. package/es-modules/Series/Waterfall/WaterfallSeries.js +8 -6
  304. package/es-modules/Series/Windbarb/WindbarbSeries.js +23 -24
  305. package/es-modules/Series/Wordcloud/WordcloudPoint.js +8 -6
  306. package/es-modules/Series/Wordcloud/WordcloudSeries.js +26 -22
  307. package/es-modules/Series/Wordcloud/WordcloudUtils.js +669 -484
  308. package/es-modules/Series/XRange/XRangePoint.js +7 -12
  309. package/es-modules/Series/XRange/XRangeSeries.js +4 -20
  310. package/es-modules/Stock/Indicators/ABands/ABandsIndicator.js +15 -6
  311. package/es-modules/Stock/Indicators/AO/AOIndicator.js +2 -3
  312. package/es-modules/Stock/Indicators/APO/APOIndicator.js +14 -20
  313. package/es-modules/Stock/Indicators/Aroon/AroonIndicator.js +4 -6
  314. package/es-modules/Stock/Indicators/AroonOscillator/AroonOscillatorIndicator.js +11 -13
  315. package/es-modules/Stock/Indicators/ArrayUtilities.js +47 -0
  316. package/es-modules/Stock/Indicators/BB/BBIndicator.js +39 -11
  317. package/es-modules/Stock/Indicators/CMF/CMFIndicator.js +35 -15
  318. package/es-modules/Stock/Indicators/Chaikin/ChaikinIndicator.js +6 -12
  319. package/es-modules/Stock/Indicators/DEMA/DEMAIndicator.js +1 -11
  320. package/es-modules/Stock/Indicators/DMI/DMIIndicator.js +28 -16
  321. package/es-modules/Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js +18 -11
  322. package/es-modules/Stock/Indicators/EMA/EMAIndicator.js +1 -3
  323. package/es-modules/Stock/Indicators/IKH/IKHIndicator.js +6 -6
  324. package/es-modules/Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js +23 -9
  325. package/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +16 -19
  326. package/es-modules/Stock/Indicators/LinearRegression/LinearRegression.js +32 -14
  327. package/es-modules/Stock/Indicators/LinearRegressionAngle/LinearRegressionAngle.js +2 -2
  328. package/es-modules/Stock/Indicators/LinearRegressionIntercept/LinearRegressionIntercept.js +2 -2
  329. package/es-modules/Stock/Indicators/LinearRegressionSlopes/LinearRegressionSlopes.js +2 -2
  330. package/es-modules/Stock/Indicators/MACD/MACDIndicator.js +2 -3
  331. package/es-modules/Stock/Indicators/MultipleLinesComposition.js +294 -0
  332. package/es-modules/Stock/Indicators/NATR/NATRIndicator.js +1 -3
  333. package/es-modules/Stock/Indicators/PC/PCIndicator.js +25 -13
  334. package/es-modules/Stock/Indicators/PPO/PPOIndicator.js +1 -11
  335. package/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +2 -1
  336. package/es-modules/Stock/Indicators/RSI/RSIIndicator.js +2 -1
  337. package/es-modules/Stock/Indicators/SMA/SMAComposition.js +0 -26
  338. package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +32 -50
  339. package/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +0 -8
  340. package/es-modules/Stock/Indicators/Stochastic/StochasticIndicator.js +18 -9
  341. package/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +4 -6
  342. package/es-modules/Stock/Indicators/TEMA/TEMAIndicator.js +26 -11
  343. package/es-modules/Stock/Indicators/TRIX/TRIXIndicator.js +6 -12
  344. package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +26 -10
  345. package/es-modules/Stock/Indicators/VWAP/VWAPIndicator.js +19 -7
  346. package/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +2 -3
  347. package/es-modules/Stock/StockToolsBindings.js +156 -47
  348. package/es-modules/Stock/StockToolsGui.js +442 -37
  349. package/es-modules/masters/highcharts-3d.src.js +1 -1
  350. package/es-modules/masters/highcharts-gantt.src.js +1 -1
  351. package/es-modules/masters/highcharts-more.src.js +1 -1
  352. package/es-modules/masters/highcharts.src.js +1 -1
  353. package/es-modules/masters/highmaps.src.js +1 -1
  354. package/es-modules/masters/highstock.src.js +1 -1
  355. package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
  356. package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
  357. package/es-modules/masters/indicators/ao.src.js +1 -1
  358. package/es-modules/masters/indicators/apo.src.js +1 -1
  359. package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
  360. package/es-modules/masters/indicators/aroon.src.js +1 -1
  361. package/es-modules/masters/indicators/atr.src.js +1 -1
  362. package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
  363. package/es-modules/masters/indicators/cci.src.js +1 -1
  364. package/es-modules/masters/indicators/chaikin.src.js +1 -1
  365. package/es-modules/masters/indicators/cmf.src.js +1 -1
  366. package/es-modules/masters/indicators/cmo.src.js +1 -1
  367. package/es-modules/masters/indicators/dema.src.js +1 -1
  368. package/es-modules/masters/indicators/disparity-index.src.js +1 -1
  369. package/es-modules/masters/indicators/dmi.src.js +1 -1
  370. package/es-modules/masters/indicators/dpo.src.js +1 -1
  371. package/es-modules/masters/indicators/ema.src.js +4 -10
  372. package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
  373. package/es-modules/masters/indicators/indicators-all.src.js +2 -2
  374. package/es-modules/masters/indicators/indicators.src.js +2 -1
  375. package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
  376. package/es-modules/masters/indicators/klinger.src.js +1 -1
  377. package/es-modules/masters/indicators/macd.src.js +1 -1
  378. package/es-modules/masters/indicators/mfi.src.js +1 -1
  379. package/es-modules/masters/indicators/momentum.src.js +1 -1
  380. package/es-modules/masters/indicators/natr.src.js +1 -1
  381. package/es-modules/masters/indicators/obv.src.js +1 -1
  382. package/es-modules/masters/indicators/pivot-points.src.js +1 -1
  383. package/es-modules/masters/indicators/ppo.src.js +1 -1
  384. package/es-modules/masters/indicators/price-channel.src.js +1 -1
  385. package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
  386. package/es-modules/masters/indicators/psar.src.js +1 -1
  387. package/es-modules/masters/indicators/regressions.src.js +1 -1
  388. package/es-modules/masters/indicators/roc.src.js +1 -1
  389. package/es-modules/masters/indicators/rsi.src.js +1 -1
  390. package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
  391. package/es-modules/masters/indicators/stochastic.src.js +1 -1
  392. package/es-modules/masters/indicators/supertrend.src.js +1 -1
  393. package/es-modules/masters/indicators/tema.src.js +1 -1
  394. package/es-modules/masters/indicators/trendline.src.js +1 -1
  395. package/es-modules/masters/indicators/trix.src.js +1 -1
  396. package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
  397. package/es-modules/masters/indicators/vwap.src.js +1 -1
  398. package/es-modules/masters/indicators/williams-r.src.js +1 -1
  399. package/es-modules/masters/indicators/wma.src.js +1 -1
  400. package/es-modules/masters/indicators/zigzag.src.js +1 -1
  401. package/es-modules/masters/modules/accessibility.src.js +16 -2
  402. package/es-modules/masters/modules/annotations-advanced.src.js +3 -1
  403. package/es-modules/masters/modules/annotations.src.js +1 -1
  404. package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
  405. package/es-modules/masters/modules/boost-canvas.src.js +1 -1
  406. package/es-modules/masters/modules/boost.src.js +1 -1
  407. package/es-modules/masters/modules/broken-axis.src.js +1 -1
  408. package/es-modules/masters/modules/bullet.src.js +1 -1
  409. package/es-modules/masters/modules/coloraxis.src.js +1 -1
  410. package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
  411. package/es-modules/masters/modules/cylinder.src.js +1 -1
  412. package/es-modules/masters/modules/data.src.js +6 -3
  413. package/es-modules/masters/modules/datagrouping.src.js +1 -1
  414. package/es-modules/masters/modules/debugger.src.js +1 -1
  415. package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
  416. package/es-modules/masters/modules/dotplot.src.js +1 -1
  417. package/es-modules/masters/modules/drag-panes.src.js +1 -1
  418. package/es-modules/masters/modules/draggable-points.src.js +1 -1
  419. package/es-modules/masters/modules/drilldown.src.js +1 -1
  420. package/es-modules/masters/modules/dumbbell.src.js +1 -1
  421. package/es-modules/masters/modules/export-data.src.js +1 -1
  422. package/es-modules/masters/modules/exporting.src.js +1 -1
  423. package/es-modules/masters/modules/full-screen.src.js +1 -1
  424. package/es-modules/masters/modules/funnel.src.js +1 -1
  425. package/es-modules/masters/modules/funnel3d.src.js +1 -1
  426. package/es-modules/masters/modules/gantt.src.js +1 -1
  427. package/es-modules/masters/modules/grid-axis.src.js +1 -1
  428. package/es-modules/masters/modules/heatmap.src.js +1 -2
  429. package/es-modules/masters/modules/heikinashi.src.js +1 -1
  430. package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
  431. package/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
  432. package/es-modules/masters/modules/item-series.src.js +1 -1
  433. package/es-modules/masters/modules/lollipop.src.js +1 -1
  434. package/es-modules/masters/modules/map.src.js +1 -3
  435. package/es-modules/masters/modules/marker-clusters.src.js +1 -1
  436. package/es-modules/masters/modules/networkgraph.src.js +1 -1
  437. package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
  438. package/es-modules/masters/modules/offline-exporting.src.js +1 -1
  439. package/es-modules/masters/modules/oldie-polyfills.src.js +1 -1
  440. package/es-modules/masters/modules/oldie.src.js +1 -1
  441. package/es-modules/masters/modules/organization.src.js +1 -1
  442. package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
  443. package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
  444. package/es-modules/masters/modules/pareto.src.js +1 -1
  445. package/es-modules/masters/modules/pathfinder.src.js +1 -1
  446. package/es-modules/masters/modules/pattern-fill.src.js +1 -1
  447. package/es-modules/masters/modules/price-indicator.src.js +1 -1
  448. package/es-modules/masters/modules/pyramid3d.src.js +1 -1
  449. package/es-modules/masters/modules/sankey.src.js +1 -1
  450. package/es-modules/masters/modules/series-label.src.js +1 -1
  451. package/es-modules/masters/modules/solid-gauge.src.js +1 -1
  452. package/es-modules/masters/modules/sonification.src.js +33 -2
  453. package/es-modules/masters/modules/static-scale.src.js +1 -1
  454. package/es-modules/masters/modules/stock-tools.src.js +1 -1
  455. package/es-modules/masters/modules/stock.src.js +4 -1
  456. package/es-modules/masters/modules/streamgraph.src.js +1 -1
  457. package/es-modules/masters/modules/sunburst.src.js +1 -1
  458. package/es-modules/masters/modules/tilemap.src.js +1 -1
  459. package/es-modules/masters/modules/timeline.src.js +1 -1
  460. package/es-modules/masters/modules/treegrid.src.js +1 -1
  461. package/es-modules/masters/modules/treemap.src.js +1 -1
  462. package/es-modules/masters/modules/variable-pie.src.js +1 -1
  463. package/es-modules/masters/modules/variwide.src.js +1 -1
  464. package/es-modules/masters/modules/vector.src.js +1 -1
  465. package/es-modules/masters/modules/venn.src.js +1 -1
  466. package/es-modules/masters/modules/windbarb.src.js +1 -1
  467. package/es-modules/masters/modules/wordcloud.src.js +1 -1
  468. package/es-modules/masters/modules/xrange.src.js +1 -1
  469. package/es-modules/masters/themes/avocado.src.js +1 -1
  470. package/es-modules/masters/themes/brand-dark.src.js +14 -0
  471. package/es-modules/masters/themes/brand-light.src.js +14 -0
  472. package/es-modules/masters/themes/dark-blue.src.js +1 -1
  473. package/es-modules/masters/themes/dark-green.src.js +1 -1
  474. package/es-modules/masters/themes/dark-unica.src.js +1 -1
  475. package/es-modules/masters/themes/gray.src.js +1 -1
  476. package/es-modules/masters/themes/grid-light.src.js +1 -1
  477. package/es-modules/masters/themes/grid.src.js +1 -1
  478. package/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
  479. package/es-modules/masters/themes/high-contrast-light.src.js +1 -1
  480. package/es-modules/masters/themes/sand-signika.src.js +1 -1
  481. package/es-modules/masters/themes/skies.src.js +1 -1
  482. package/es-modules/masters/themes/sunset.src.js +1 -1
  483. package/highcharts-3d.js +1 -1
  484. package/highcharts-3d.js.map +1 -1
  485. package/highcharts-3d.src.js +65 -35
  486. package/highcharts-gantt.js +800 -803
  487. package/highcharts-gantt.js.map +1 -1
  488. package/highcharts-gantt.src.js +1359 -1429
  489. package/highcharts-more.js +194 -193
  490. package/highcharts-more.js.map +1 -1
  491. package/highcharts-more.src.js +280 -222
  492. package/highcharts.d.ts +10228 -768
  493. package/highcharts.js +585 -588
  494. package/highcharts.js.map +1 -1
  495. package/highcharts.src.d.ts +10228 -768
  496. package/highcharts.src.js +995 -1066
  497. package/highmaps.js +727 -707
  498. package/highmaps.js.map +1 -1
  499. package/highmaps.src.js +3243 -2135
  500. package/highstock.js +788 -783
  501. package/highstock.js.map +1 -1
  502. package/highstock.src.js +2492 -1981
  503. package/indicators/acceleration-bands.d.ts +17 -1
  504. package/indicators/acceleration-bands.js +11 -9
  505. package/indicators/acceleration-bands.js.map +1 -1
  506. package/indicators/acceleration-bands.src.d.ts +17 -1
  507. package/indicators/acceleration-bands.src.js +238 -112
  508. package/indicators/accumulation-distribution.js +1 -1
  509. package/indicators/accumulation-distribution.src.js +1 -1
  510. package/indicators/ao.js +6 -6
  511. package/indicators/ao.js.map +1 -1
  512. package/indicators/ao.src.js +4 -4
  513. package/indicators/apo.js +5 -6
  514. package/indicators/apo.js.map +1 -1
  515. package/indicators/apo.src.js +16 -84
  516. package/indicators/aroon-oscillator.d.ts +17 -1
  517. package/indicators/aroon-oscillator.js +10 -9
  518. package/indicators/aroon-oscillator.js.map +1 -1
  519. package/indicators/aroon-oscillator.src.d.ts +17 -1
  520. package/indicators/aroon-oscillator.src.js +230 -177
  521. package/indicators/aroon.d.ts +17 -1
  522. package/indicators/aroon.js +11 -9
  523. package/indicators/aroon.js.map +1 -1
  524. package/indicators/aroon.src.d.ts +17 -1
  525. package/indicators/aroon.src.js +227 -112
  526. package/indicators/atr.js +1 -1
  527. package/indicators/atr.src.js +1 -1
  528. package/indicators/bollinger-bands.d.ts +17 -1
  529. package/indicators/bollinger-bands.js +12 -9
  530. package/indicators/bollinger-bands.js.map +1 -1
  531. package/indicators/bollinger-bands.src.d.ts +17 -1
  532. package/indicators/bollinger-bands.src.js +262 -117
  533. package/indicators/cci.js +1 -1
  534. package/indicators/cci.src.js +1 -1
  535. package/indicators/chaikin.js +8 -9
  536. package/indicators/chaikin.js.map +1 -1
  537. package/indicators/chaikin.src.js +8 -76
  538. package/indicators/cmf.js +1 -1
  539. package/indicators/cmf.js.map +1 -1
  540. package/indicators/cmf.src.js +36 -16
  541. package/indicators/cmo.js +1 -1
  542. package/indicators/cmo.src.js +1 -1
  543. package/indicators/dema.js +5 -6
  544. package/indicators/dema.js.map +1 -1
  545. package/indicators/dema.src.js +3 -75
  546. package/indicators/disparity-index.js +6 -7
  547. package/indicators/disparity-index.js.map +1 -1
  548. package/indicators/disparity-index.src.js +20 -74
  549. package/indicators/dmi.js +12 -11
  550. package/indicators/dmi.js.map +1 -1
  551. package/indicators/dmi.src.js +252 -121
  552. package/indicators/dpo.js +1 -1
  553. package/indicators/dpo.src.js +1 -1
  554. package/indicators/ema.js +1 -13
  555. package/indicators/ema.js.map +1 -1
  556. package/indicators/ema.src.js +7 -188
  557. package/indicators/ichimoku-kinko-hyo.js +1 -1
  558. package/indicators/ichimoku-kinko-hyo.js.map +1 -1
  559. package/indicators/ichimoku-kinko-hyo.src.js +7 -7
  560. package/indicators/indicators-all.d.ts +17 -1
  561. package/indicators/indicators-all.js +198 -203
  562. package/indicators/indicators-all.js.map +1 -1
  563. package/indicators/indicators-all.src.d.ts +17 -1
  564. package/indicators/indicators-all.src.js +892 -777
  565. package/indicators/indicators.js +12 -12
  566. package/indicators/indicators.js.map +1 -1
  567. package/indicators/indicators.src.js +213 -144
  568. package/indicators/keltner-channels.d.ts +17 -1
  569. package/indicators/keltner-channels.js +11 -10
  570. package/indicators/keltner-channels.js.map +1 -1
  571. package/indicators/keltner-channels.src.d.ts +17 -1
  572. package/indicators/keltner-channels.src.js +246 -118
  573. package/indicators/klinger.js +14 -13
  574. package/indicators/klinger.js.map +1 -1
  575. package/indicators/klinger.src.js +239 -187
  576. package/indicators/macd.js +2 -2
  577. package/indicators/macd.js.map +1 -1
  578. package/indicators/macd.src.js +3 -4
  579. package/indicators/mfi.js +1 -1
  580. package/indicators/mfi.src.js +1 -1
  581. package/indicators/momentum.js +1 -1
  582. package/indicators/momentum.src.js +1 -1
  583. package/indicators/natr.js +3 -3
  584. package/indicators/natr.js.map +1 -1
  585. package/indicators/natr.src.js +2 -4
  586. package/indicators/obv.js +1 -1
  587. package/indicators/obv.src.js +1 -1
  588. package/indicators/pivot-points.js +1 -1
  589. package/indicators/pivot-points.js.map +1 -1
  590. package/indicators/pivot-points.src.js +3 -2
  591. package/indicators/ppo.js +5 -6
  592. package/indicators/ppo.js.map +1 -1
  593. package/indicators/ppo.src.js +3 -75
  594. package/indicators/price-channel.d.ts +17 -1
  595. package/indicators/price-channel.js +11 -9
  596. package/indicators/price-channel.js.map +1 -1
  597. package/indicators/price-channel.src.d.ts +17 -1
  598. package/indicators/price-channel.src.js +288 -168
  599. package/indicators/price-envelopes.js +1 -1
  600. package/indicators/price-envelopes.src.js +1 -1
  601. package/indicators/psar.js +1 -1
  602. package/indicators/psar.src.js +1 -1
  603. package/indicators/regressions.js +1 -1
  604. package/indicators/regressions.js.map +1 -1
  605. package/indicators/regressions.src.js +39 -21
  606. package/indicators/roc.js +1 -1
  607. package/indicators/roc.src.js +1 -1
  608. package/indicators/rsi.js +1 -1
  609. package/indicators/rsi.js.map +1 -1
  610. package/indicators/rsi.src.js +3 -2
  611. package/indicators/slow-stochastic.js +5 -6
  612. package/indicators/slow-stochastic.js.map +1 -1
  613. package/indicators/slow-stochastic.src.js +2 -72
  614. package/indicators/stochastic.d.ts +17 -1
  615. package/indicators/stochastic.js +12 -10
  616. package/indicators/stochastic.js.map +1 -1
  617. package/indicators/stochastic.src.d.ts +17 -1
  618. package/indicators/stochastic.src.js +282 -165
  619. package/indicators/supertrend.js +10 -10
  620. package/indicators/supertrend.js.map +1 -1
  621. package/indicators/supertrend.src.js +6 -7
  622. package/indicators/tema.js +6 -7
  623. package/indicators/tema.js.map +1 -1
  624. package/indicators/tema.src.js +28 -75
  625. package/indicators/trendline.js +1 -1
  626. package/indicators/trendline.src.js +1 -1
  627. package/indicators/trix.js +4 -5
  628. package/indicators/trix.js.map +1 -1
  629. package/indicators/trix.src.js +8 -76
  630. package/indicators/volume-by-price.js +16 -16
  631. package/indicators/volume-by-price.js.map +1 -1
  632. package/indicators/volume-by-price.src.js +27 -10
  633. package/indicators/vwap.js +1 -1
  634. package/indicators/vwap.js.map +1 -1
  635. package/indicators/vwap.src.js +20 -8
  636. package/indicators/williams-r.js +5 -6
  637. package/indicators/williams-r.js.map +1 -1
  638. package/indicators/williams-r.src.js +41 -51
  639. package/indicators/wma.js +1 -1
  640. package/indicators/wma.src.js +1 -1
  641. package/indicators/zigzag.js +1 -1
  642. package/indicators/zigzag.src.js +1 -1
  643. package/modules/accessibility.d.ts +0 -30
  644. package/modules/accessibility.js +240 -216
  645. package/modules/accessibility.js.map +1 -1
  646. package/modules/accessibility.src.d.ts +0 -30
  647. package/modules/accessibility.src.js +7807 -6400
  648. package/modules/annotations-advanced.d.ts +30 -0
  649. package/modules/annotations-advanced.js +192 -165
  650. package/modules/annotations-advanced.js.map +1 -1
  651. package/modules/annotations-advanced.src.d.ts +30 -0
  652. package/modules/annotations-advanced.src.js +1716 -416
  653. package/modules/annotations.js +125 -110
  654. package/modules/annotations.js.map +1 -1
  655. package/modules/annotations.src.js +1059 -304
  656. package/modules/arrow-symbols.js +1 -1
  657. package/modules/arrow-symbols.src.js +1 -1
  658. package/modules/boost-canvas.js +15 -15
  659. package/modules/boost-canvas.js.map +1 -1
  660. package/modules/boost-canvas.src.js +3 -3
  661. package/modules/boost.js +79 -79
  662. package/modules/boost.js.map +1 -1
  663. package/modules/boost.src.js +42 -51
  664. package/modules/broken-axis.js +1 -1
  665. package/modules/broken-axis.js.map +1 -1
  666. package/modules/broken-axis.src.js +18 -12
  667. package/modules/bullet.js +1 -1
  668. package/modules/bullet.src.js +1 -1
  669. package/modules/coloraxis.js +24 -24
  670. package/modules/coloraxis.js.map +1 -1
  671. package/modules/coloraxis.src.js +77 -103
  672. package/modules/current-date-indicator.js +4 -4
  673. package/modules/current-date-indicator.js.map +1 -1
  674. package/modules/current-date-indicator.src.js +4 -4
  675. package/modules/cylinder.js +1 -1
  676. package/modules/cylinder.js.map +1 -1
  677. package/modules/cylinder.src.js +37 -5
  678. package/modules/data.d.ts +6 -6
  679. package/modules/data.js +32 -32
  680. package/modules/data.js.map +1 -1
  681. package/modules/data.src.d.ts +6 -6
  682. package/modules/data.src.js +94 -140
  683. package/modules/datagrouping.js +20 -20
  684. package/modules/datagrouping.js.map +1 -1
  685. package/modules/datagrouping.src.js +56 -33
  686. package/modules/debugger.js +3 -3
  687. package/modules/debugger.js.map +1 -1
  688. package/modules/debugger.src.js +3 -3
  689. package/modules/dependency-wheel.js +11 -11
  690. package/modules/dependency-wheel.js.map +1 -1
  691. package/modules/dependency-wheel.src.js +5 -8
  692. package/modules/dotplot.js +1 -1
  693. package/modules/dotplot.src.js +1 -1
  694. package/modules/drag-panes.js +8 -8
  695. package/modules/drag-panes.js.map +1 -1
  696. package/modules/drag-panes.src.js +3 -3
  697. package/modules/draggable-points.js +1 -1
  698. package/modules/draggable-points.js.map +1 -1
  699. package/modules/draggable-points.src.js +8 -9
  700. package/modules/drilldown.js +24 -24
  701. package/modules/drilldown.js.map +1 -1
  702. package/modules/drilldown.src.js +13 -8
  703. package/modules/dumbbell.js +17 -17
  704. package/modules/dumbbell.js.map +1 -1
  705. package/modules/dumbbell.src.js +4 -8
  706. package/modules/export-data.js +19 -19
  707. package/modules/export-data.js.map +1 -1
  708. package/modules/export-data.src.js +9 -8
  709. package/modules/exporting.js +39 -38
  710. package/modules/exporting.js.map +1 -1
  711. package/modules/exporting.src.js +134 -116
  712. package/modules/full-screen.js +1 -1
  713. package/modules/full-screen.js.map +1 -1
  714. package/modules/full-screen.src.js +5 -4
  715. package/modules/funnel.js +12 -12
  716. package/modules/funnel.js.map +1 -1
  717. package/modules/funnel.src.js +9 -6
  718. package/modules/funnel3d.js +1 -1
  719. package/modules/funnel3d.js.map +1 -1
  720. package/modules/funnel3d.src.js +17 -10
  721. package/modules/gantt.js +217 -218
  722. package/modules/gantt.js.map +1 -1
  723. package/modules/gantt.src.js +364 -363
  724. package/modules/grid-axis.js +1 -1
  725. package/modules/grid-axis.js.map +1 -1
  726. package/modules/grid-axis.src.js +27 -19
  727. package/modules/heatmap.js +39 -39
  728. package/modules/heatmap.js.map +1 -1
  729. package/modules/heatmap.src.js +132 -141
  730. package/modules/heikinashi.js +1 -1
  731. package/modules/heikinashi.js.map +1 -1
  732. package/modules/heikinashi.src.js +12 -10
  733. package/modules/histogram-bellcurve.js +13 -13
  734. package/modules/histogram-bellcurve.js.map +1 -1
  735. package/modules/histogram-bellcurve.src.js +97 -91
  736. package/modules/hollowcandlestick.js +9 -9
  737. package/modules/hollowcandlestick.js.map +1 -1
  738. package/modules/hollowcandlestick.src.js +31 -35
  739. package/modules/item-series.js +6 -6
  740. package/modules/item-series.js.map +1 -1
  741. package/modules/item-series.src.js +6 -6
  742. package/modules/lollipop.js +1 -1
  743. package/modules/lollipop.src.js +1 -1
  744. package/modules/map.d.ts +138 -14
  745. package/modules/map.js +144 -122
  746. package/modules/map.js.map +1 -1
  747. package/modules/map.src.d.ts +138 -14
  748. package/modules/map.src.js +2253 -1074
  749. package/modules/marker-clusters.js +36 -36
  750. package/modules/marker-clusters.js.map +1 -1
  751. package/modules/marker-clusters.src.js +176 -143
  752. package/modules/networkgraph.d.ts +12 -1
  753. package/modules/networkgraph.js +49 -49
  754. package/modules/networkgraph.js.map +1 -1
  755. package/modules/networkgraph.src.d.ts +12 -1
  756. package/modules/networkgraph.src.js +103 -78
  757. package/modules/no-data-to-display.js +5 -5
  758. package/modules/no-data-to-display.js.map +1 -1
  759. package/modules/no-data-to-display.src.js +3 -3
  760. package/modules/offline-exporting.js +18 -17
  761. package/modules/offline-exporting.js.map +1 -1
  762. package/modules/offline-exporting.src.js +39 -44
  763. package/modules/oldie-polyfills.js +1 -1
  764. package/modules/oldie-polyfills.src.js +1 -1
  765. package/modules/oldie.js +26 -26
  766. package/modules/oldie.js.map +1 -1
  767. package/modules/oldie.src.js +21 -81
  768. package/modules/organization.js +13 -13
  769. package/modules/organization.js.map +1 -1
  770. package/modules/organization.src.js +8 -6
  771. package/modules/overlapping-datalabels.js +1 -1
  772. package/modules/overlapping-datalabels.src.js +1 -1
  773. package/modules/parallel-coordinates.js +1 -1
  774. package/modules/parallel-coordinates.js.map +1 -1
  775. package/modules/parallel-coordinates.src.js +6 -4
  776. package/modules/pareto.js +7 -7
  777. package/modules/pareto.js.map +1 -1
  778. package/modules/pareto.src.js +89 -78
  779. package/modules/pathfinder.js +1 -1
  780. package/modules/pathfinder.js.map +1 -1
  781. package/modules/pathfinder.src.js +21 -20
  782. package/modules/pattern-fill.js +1 -1
  783. package/modules/pattern-fill.js.map +1 -1
  784. package/modules/pattern-fill.src.js +18 -12
  785. package/modules/price-indicator.js +1 -1
  786. package/modules/price-indicator.js.map +1 -1
  787. package/modules/price-indicator.src.js +3 -2
  788. package/modules/pyramid3d.js +1 -1
  789. package/modules/pyramid3d.js.map +1 -1
  790. package/modules/pyramid3d.src.js +3 -2
  791. package/modules/sankey.d.ts +12 -1
  792. package/modules/sankey.js +29 -29
  793. package/modules/sankey.js.map +1 -1
  794. package/modules/sankey.src.d.ts +12 -1
  795. package/modules/sankey.src.js +307 -181
  796. package/modules/series-label.js +1 -1
  797. package/modules/series-label.js.map +1 -1
  798. package/modules/series-label.src.js +2 -2
  799. package/modules/solid-gauge.js +1 -1
  800. package/modules/solid-gauge.js.map +1 -1
  801. package/modules/solid-gauge.src.js +17 -2
  802. package/modules/sonification.js +59 -55
  803. package/modules/sonification.js.map +1 -1
  804. package/modules/sonification.src.js +3093 -2594
  805. package/modules/static-scale.js +1 -1
  806. package/modules/static-scale.src.js +1 -1
  807. package/modules/stock-tools.js +178 -163
  808. package/modules/stock-tools.js.map +1 -1
  809. package/modules/stock-tools.src.js +1136 -229
  810. package/modules/stock.d.ts +39 -6
  811. package/modules/stock.js +204 -196
  812. package/modules/stock.js.map +1 -1
  813. package/modules/stock.src.d.ts +39 -6
  814. package/modules/stock.src.js +1822 -1240
  815. package/modules/streamgraph.js +1 -1
  816. package/modules/streamgraph.src.js +1 -1
  817. package/modules/sunburst.js +60 -60
  818. package/modules/sunburst.js.map +1 -1
  819. package/modules/sunburst.src.js +281 -248
  820. package/modules/tilemap.js +17 -17
  821. package/modules/tilemap.js.map +1 -1
  822. package/modules/tilemap.src.js +3 -13
  823. package/modules/timeline.js +18 -18
  824. package/modules/timeline.js.map +1 -1
  825. package/modules/timeline.src.js +5 -5
  826. package/modules/treegrid.js +56 -57
  827. package/modules/treegrid.js.map +1 -1
  828. package/modules/treegrid.src.js +201 -169
  829. package/modules/treemap.js +41 -41
  830. package/modules/treemap.js.map +1 -1
  831. package/modules/treemap.src.js +266 -232
  832. package/modules/variable-pie.js +1 -1
  833. package/modules/variable-pie.src.js +1 -1
  834. package/modules/variwide.js +1 -1
  835. package/modules/variwide.js.map +1 -1
  836. package/modules/variwide.src.js +7 -3
  837. package/modules/vector.js +1 -1
  838. package/modules/vector.src.js +1 -1
  839. package/modules/venn.js +31 -31
  840. package/modules/venn.js.map +1 -1
  841. package/modules/venn.src.js +740 -731
  842. package/modules/windbarb.js +15 -15
  843. package/modules/windbarb.js.map +1 -1
  844. package/modules/windbarb.src.js +90 -62
  845. package/modules/wordcloud.js +23 -24
  846. package/modules/wordcloud.js.map +1 -1
  847. package/modules/wordcloud.src.js +898 -954
  848. package/modules/xrange.js +2 -2
  849. package/modules/xrange.js.map +1 -1
  850. package/modules/xrange.src.js +12 -33
  851. package/package.json +1 -1
  852. package/themes/avocado.js +1 -1
  853. package/themes/avocado.src.js +1 -1
  854. package/themes/brand-dark.js +15 -0
  855. package/themes/brand-dark.js.map +1 -0
  856. package/themes/brand-dark.src.js +328 -0
  857. package/themes/brand-light.js +15 -0
  858. package/themes/brand-light.js.map +1 -0
  859. package/themes/brand-light.src.js +294 -0
  860. package/themes/dark-blue.js +1 -1
  861. package/themes/dark-blue.src.js +1 -1
  862. package/themes/dark-green.js +1 -1
  863. package/themes/dark-green.src.js +1 -1
  864. package/themes/dark-unica.js +1 -1
  865. package/themes/dark-unica.js.map +1 -1
  866. package/themes/dark-unica.src.js +5 -3
  867. package/themes/gray.js +1 -1
  868. package/themes/gray.src.js +1 -1
  869. package/themes/grid-light.js +1 -1
  870. package/themes/grid-light.js.map +1 -1
  871. package/themes/grid-light.src.js +5 -3
  872. package/themes/grid.js +1 -1
  873. package/themes/grid.js.map +1 -1
  874. package/themes/grid.src.js +5 -3
  875. package/themes/high-contrast-dark.js +1 -1
  876. package/themes/high-contrast-dark.src.js +1 -1
  877. package/themes/high-contrast-light.js +1 -1
  878. package/themes/high-contrast-light.src.js +1 -1
  879. package/themes/sand-signika.js +1 -1
  880. package/themes/sand-signika.src.js +1 -1
  881. package/themes/skies.js +1 -1
  882. package/themes/skies.src.js +1 -1
  883. package/themes/sunset.js +1 -1
  884. package/themes/sunset.src.js +1 -1
  885. package/es-modules/Core/Axis/MapAxis.js +0 -157
  886. package/es-modules/Core/Color/Palette.js +0 -82
  887. package/es-modules/Extensions/Sonification/InstrumentDefinitions.js +0 -32
  888. package/es-modules/Mixins/ColorSeries.js +0 -77
  889. package/es-modules/Mixins/DerivedSeries.js +0 -118
  890. package/es-modules/Mixins/DrawPoint.js +0 -81
  891. package/es-modules/Mixins/IndicatorRequired.js +0 -56
  892. package/es-modules/Mixins/MultipleLines.js +0 -181
  893. package/es-modules/Mixins/Navigation.js +0 -54
  894. package/es-modules/Mixins/NelderMead.js +0 -132
  895. package/es-modules/Mixins/Polygon.js +0 -259
  896. package/es-modules/Mixins/ReduceArray.js +0 -54
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highstock JS v9.2.1 (2021-08-19)
2
+ * @license Highstock JS v9.3.2 (2021-11-29)
3
3
  *
4
4
  * Highcharts Stock as a plugin for Highcharts
5
5
  *
@@ -250,12 +250,12 @@
250
250
  while (i--) {
251
251
  translated = translatedArr[i];
252
252
  distance = Math.abs(lastTranslated - translated);
253
- // #4175 - when axis is reversed, the distance, is negative
254
- // but tickPixelIntervalOption positive, so we need to
255
- // compare the same values
253
+ // #4175 - when axis is reversed, the distance, is negative but
254
+ // tickPixelIntervalOption positive, so we need to compare the
255
+ // same values
256
256
  // Remove ticks that are closer than 0.6 times the pixel
257
- // interval from the one to the right, but not if it is
258
- // close to the median distance (#748).
257
+ // interval from the one to the right, but not if it is close to
258
+ // the median distance (#748).
259
259
  if (lastTranslated &&
260
260
  distance < tickPixelIntervalOption * 0.8 &&
261
261
  (medianDistance === null || distance < medianDistance * 0.8)) {
@@ -287,11 +287,8 @@
287
287
  *
288
288
  * @private
289
289
  * @function Highcharts.Axis#index2val
290
- *
291
290
  * @param {number} index
292
- * The index value of searched point
293
- *
294
- * @return {number}
291
+ * The index value of searched point
295
292
  */
296
293
  function index2val(index) {
297
294
  var axis = this,
@@ -328,11 +325,8 @@
328
325
  *
329
326
  * @private
330
327
  * @function Highcharts.Axis#lin2val
331
- *
332
328
  * @param {number} val
333
- * The linear abstracted value.
334
- *
335
- * @return {number}
329
+ * The linear abstracted value.
336
330
  */
337
331
  function lin2val(val) {
338
332
  var axis = this,
@@ -345,37 +339,37 @@
345
339
  return val;
346
340
  }
347
341
  // Convert back from modivied value to pixels. // #15970
348
- var pixelVal = (val - localMin) * localA + axis.minPixelPadding,
342
+ var pixelVal = (val - localMin) * localA +
343
+ axis.minPixelPadding,
349
344
  isInside = pixelVal > 0 && pixelVal < axis.left + axis.len;
350
- // If the value is not inside the plot area,
351
- // use the extended positions.
345
+ // If the value is not inside the plot area, use the extended positions.
352
346
  // (array contains also points that are outside of the plotArea).
353
347
  if (!isInside) {
354
348
  // When iterating for the first time,
355
349
  // get the extended ordinal positional and assign them.
356
350
  if (!ordinal.extendedOrdinalPositions) {
357
- ordinal.extendedOrdinalPositions = ordinal.getExtendedPositions();
351
+ ordinal.extendedOrdinalPositions = (ordinal.getExtendedPositions());
358
352
  }
359
353
  positions = ordinal.extendedOrdinalPositions;
360
354
  }
361
- // In some cases (especially in early stages of the chart creation)
362
- // the getExtendedPositions might return undefined.
355
+ // In some cases (especially in early stages of the chart creation) the
356
+ // getExtendedPositions might return undefined.
363
357
  if (positions && positions.length) {
364
358
  var index = ordinal.getIndexOfPoint(pixelVal,
365
359
  positions),
366
360
  mantissa = correctFloat(index % 1);
367
- // Check if the index is inside position array.
368
- // If true, read/approximate value for that exact index.
369
- if (index >= 0 && index < positions.length) {
361
+ // Check if the index is inside position array. If true,
362
+ // read/approximate value for that exact index.
363
+ if (index >= 0 && index < positions.length - 1) {
370
364
  var leftNeighbour = positions[Math.floor(index)],
371
365
  rightNeighbour = positions[Math.ceil(index)],
372
366
  distance = rightNeighbour - leftNeighbour;
373
367
  return positions[Math.floor(index)] + mantissa * distance;
374
368
  }
375
- // For cases when the index is not in the extended ordinal
376
- // position array, like when the value we are looking
377
- // for exceed the available data,
378
- // approximate that value based on the calculated slope.
369
+ // For cases when the index is not in the extended ordinal position
370
+ // array, like when the value we are looking for exceed the
371
+ // available data, approximate that value based on the calculated
372
+ // slope.
379
373
  var positionsLength = positions.length,
380
374
  firstPositionsValue = positions[0],
381
375
  lastPositionsValue = positions[positionsLength - 1],
@@ -388,8 +382,8 @@
388
382
  return val;
389
383
  }
390
384
  /**
391
- * Internal function to calculate the precise index
392
- * in ordinalPositions array.
385
+ * Internal function to calculate the precise index in ordinalPositions
386
+ * array.
393
387
  * @private
394
388
  */
395
389
  function getIndexInArray(ordinalPositions, val) {
@@ -460,9 +454,8 @@
460
454
  }
461
455
  }
462
456
  /**
463
- * @private
464
- *
465
457
  * Extending the Chart.pan method for ordinal axes
458
+ * @private
466
459
  */
467
460
  function onChartPan(e) {
468
461
  var chart = this,
@@ -488,7 +481,11 @@
488
481
  // how many ordinal units did we move?
489
482
  movedUnits = (mouseDownX - chartX) / pointPixelWidth,
490
483
  // get index of all the chart's points
491
- extendedAxis = { ordinal: { positions: xAxis.ordinal.getExtendedPositions() } },
484
+ extendedAxis = {
485
+ ordinal: {
486
+ positions: xAxis.ordinal.getExtendedPositions()
487
+ }
488
+ },
492
489
  index2val_1 = xAxis.index2val,
493
490
  val2lin_1 = xAxis.val2lin;
494
491
  var trimmedRange = void 0,
@@ -508,37 +505,41 @@
508
505
  }
509
506
  if (movedUnits < 0) {
510
507
  searchAxisLeft = extendedAxis;
511
- searchAxisRight = xAxis.ordinal.positions ? xAxis : extendedAxis;
508
+ searchAxisRight = xAxis.ordinal.positions ?
509
+ xAxis : extendedAxis;
512
510
  }
513
511
  else {
514
- searchAxisLeft = xAxis.ordinal.positions ? xAxis : extendedAxis;
512
+ searchAxisLeft = xAxis.ordinal.positions ?
513
+ xAxis : extendedAxis;
515
514
  searchAxisRight = extendedAxis;
516
515
  }
517
- // In grouped data series, the last ordinal position
518
- // represents the grouped data, which is to the left of the
519
- // real data max. If we don't compensate for this, we will
520
- // be allowed to pan grouped data series passed the right of
521
- // the plot area.
516
+ // In grouped data series, the last ordinal position represents
517
+ // the grouped data, which is to the left of the real data max.
518
+ // If we don't compensate for this, we will be allowed to pan
519
+ // grouped data series passed the right of the plot area.
522
520
  ordinalPositions = searchAxisRight.ordinal.positions;
523
521
  if (dataMax >
524
522
  ordinalPositions[ordinalPositions.length - 1]) {
525
523
  ordinalPositions.push(dataMax);
526
524
  }
527
- // Get the new min and max values by getting the ordinal
528
- // index for the current extreme, then add the moved units
529
- // and translate back to values. This happens on the
530
- // extended ordinal positions if the new position is out of
531
- // range, else it happens on the current x axis which is
532
- // smaller and faster.
525
+ // Get the new min and max values by getting the ordinal index
526
+ // for the current extreme, then add the moved units and
527
+ // translate back to values. This happens on the extended
528
+ // ordinal positions if the new position is out of range, else
529
+ // it happens on the current x axis which is smaller and faster.
533
530
  chart.fixedRange = max - min;
534
- trimmedRange = xAxis.navigatorAxis.toFixedRange(null, null, index2val_1.apply(searchAxisLeft, [
535
- val2lin_1.apply(searchAxisLeft, [min, true]) + movedUnits
531
+ trimmedRange = xAxis.navigatorAxis
532
+ .toFixedRange(void 0, void 0, index2val_1.apply(searchAxisLeft, [
533
+ val2lin_1.apply(searchAxisLeft, [min, true]) +
534
+ movedUnits
536
535
  ]), index2val_1.apply(searchAxisRight, [
537
- val2lin_1.apply(searchAxisRight, [max, true]) + movedUnits
536
+ val2lin_1.apply(searchAxisRight, [max, true]) +
537
+ movedUnits
538
538
  ]));
539
539
  // Apply it if it is within the available data range
540
540
  if (trimmedRange.min >= Math.min(extremes.dataMin, min) &&
541
- trimmedRange.max <= Math.max(dataMax, max) + overscroll) {
541
+ trimmedRange.max <= Math.max(dataMax, max) +
542
+ overscroll) {
542
543
  xAxis.setExtremes(trimmedRange.min, trimmedRange.max, true, false, { trigger: 'pan' });
543
544
  }
544
545
  chart.mouseDownX = chartX; // set new reference for next run
@@ -578,14 +579,10 @@
578
579
  *
579
580
  * @private
580
581
  * @function Highcharts.Axis#val2lin
581
- *
582
582
  * @param {number} val
583
583
  * The axis value.
584
- *
585
584
  * @param {boolean} [toIndex]
586
585
  * Whether to return the index in the ordinalPositions or the new value.
587
- *
588
- * @return {number}
589
586
  */
590
587
  function val2lin(val, toIndex) {
591
588
  var axis = this,
@@ -632,7 +629,8 @@
632
629
  val <=
633
630
  extendedOrdinalPositions[length_2 - 1]) {
634
631
  // Return Value
635
- ordinalIndex = getIndexInArray(extendedOrdinalPositions, val) - originalPositionsReference;
632
+ ordinalIndex = getIndexInArray(extendedOrdinalPositions, val) -
633
+ originalPositionsReference;
636
634
  }
637
635
  else {
638
636
  // Since ordinal.slope is the average distance between 2
@@ -706,7 +704,6 @@
706
704
  maxIndex,
707
705
  slope,
708
706
  i,
709
- hasBoostedSeries,
710
707
  ordinalPositions = [],
711
708
  overscrollPointsRange = Number.MAX_VALUE,
712
709
  useOrdinal = false;
@@ -715,7 +712,9 @@
715
712
  axis.series.forEach(function (series, i) {
716
713
  uniqueOrdinalPositions = [];
717
714
  if ((!ignoreHiddenSeries || series.visible !== false) &&
718
- (series.takeOrdinalPosition !== false || hasBreaks)) {
715
+ (series
716
+ .takeOrdinalPosition !== false ||
717
+ hasBreaks)) {
719
718
  // concatenate the processed X data into the existing
720
719
  // positions, or the empty array
721
720
  ordinalPositions = ordinalPositions.concat(series.processedXData);
@@ -731,25 +730,21 @@
731
730
  if (len) {
732
731
  i = 0;
733
732
  while (i < len - 1) {
734
- if (ordinalPositions[i] !== ordinalPositions[i + 1]) {
733
+ if (ordinalPositions[i] !==
734
+ ordinalPositions[i + 1]) {
735
735
  uniqueOrdinalPositions.push(ordinalPositions[i + 1]);
736
736
  }
737
737
  i++;
738
738
  }
739
739
  // Check first item:
740
- if (uniqueOrdinalPositions[0] !== ordinalPositions[0]) {
740
+ if (uniqueOrdinalPositions[0] !==
741
+ ordinalPositions[0]) {
741
742
  uniqueOrdinalPositions.unshift(ordinalPositions[0]);
742
743
  }
743
744
  ordinalPositions = uniqueOrdinalPositions;
744
745
  }
745
746
  }
746
- if (series.isSeriesBoosting) {
747
- hasBoostedSeries = true;
748
- }
749
747
  });
750
- if (hasBoostedSeries) {
751
- ordinalPositions.length = 0;
752
- }
753
748
  // cache the length
754
749
  len = ordinalPositions.length;
755
750
  // Check if we really need the overhead of mapping axis data
@@ -759,7 +754,8 @@
759
754
  dist = ordinalPositions[1] - ordinalPositions[0];
760
755
  i = len - 1;
761
756
  while (i-- && !useOrdinal) {
762
- if (ordinalPositions[i + 1] - ordinalPositions[i] !== dist) {
757
+ if (ordinalPositions[i + 1] - ordinalPositions[i] !==
758
+ dist) {
763
759
  useOrdinal = true;
764
760
  }
765
761
  }
@@ -768,8 +764,8 @@
768
764
  // spaced.
769
765
  if (!axis.options.keepOrdinalPadding &&
770
766
  (ordinalPositions[0] - min > dist ||
771
- max - ordinalPositions[ordinalPositions.length - 1] >
772
- dist)) {
767
+ (max -
768
+ ordinalPositions[ordinalPositions.length - 1]) > dist)) {
773
769
  useOrdinal = true;
774
770
  }
775
771
  }
@@ -947,11 +943,10 @@
947
943
  fakeAxis.series.push(fakeSeries);
948
944
  series.processData.apply(fakeSeries);
949
945
  });
950
- // Apply grouping if needed.
951
- axis.applyGrouping.call(fakeAxis);
952
- // Force to use the ordinal when points are evenly spaced
953
- // (e.g. weeks), #3825.
954
- if (fakeSeries.closestPointRange !== fakeSeries.basePointRange &&
946
+ // Force to use the ordinal when points are evenly spaced (e.g.
947
+ // weeks), #3825.
948
+ if ((fakeSeries.closestPointRange !==
949
+ fakeSeries.basePointRange) &&
955
950
  fakeSeries.currentDataGrouping) {
956
951
  fakeAxis.forceOrdinal = true;
957
952
  }
@@ -999,8 +994,8 @@
999
994
  if (!groupIntervalFactor) {
1000
995
  // Register all the distances in an array
1001
996
  for (i = 0; i < len - 1; i++) {
1002
- distances[i] =
1003
- processedXData[i + 1] - processedXData[i];
997
+ distances[i] = (processedXData[i + 1] -
998
+ processedXData[i]);
1004
999
  }
1005
1000
  // Sort them and find the median
1006
1001
  distances.sort(function (a, b) {
@@ -1022,15 +1017,12 @@
1022
1017
  *
1023
1018
  * @private
1024
1019
  * @param {number} val
1025
- * The pixel value of a point.
1020
+ * The pixel value of a point.
1026
1021
  *
1027
1022
  * @param {Array<number>} [ordinallArray]
1028
- * An array of all points available on the axis
1029
- * for the given data set.
1030
- * Either ordinalPositions if the value is inside the plotArea
1031
- * or extendedOrdinalPositions if not.
1032
- *
1033
- * @return {number}
1023
+ * An array of all points available on the axis for the given data set.
1024
+ * Either ordinalPositions if the value is inside the plotArea or
1025
+ * extendedOrdinalPositions if not.
1034
1026
  */
1035
1027
  Additions.prototype.getIndexOfPoint = function (val, ordinalArray) {
1036
1028
  var ordinal = this,
@@ -1043,17 +1035,19 @@
1043
1035
  // When more series assign to axis, find the smallest one, #15987.
1044
1036
  if (axis.series.length > 1) {
1045
1037
  axis.series.forEach(function (series) {
1046
- if (defined(series.points[0]) &&
1038
+ if (series.points &&
1039
+ defined(series.points[0]) &&
1047
1040
  defined(series.points[0].plotX) &&
1048
1041
  series.points[0].plotX < firstPointX) {
1049
1042
  firstPointX = series.points[0].plotX;
1050
1043
  }
1051
1044
  });
1052
1045
  }
1053
- // Distance in pixels between two points
1054
- // on the ordinal axis in the current zoom.
1055
- var ordinalPointPixelInterval = axis.translationSlope *
1056
- (ordinal.slope || axis.closestPointRange || ordinal.overscrollPointsRange),
1046
+ // Distance in pixels between two points on the ordinal axis in the
1047
+ // current zoom.
1048
+ var ordinalPointPixelInterval = axis.translationSlope * (ordinal.slope ||
1049
+ axis.closestPointRange ||
1050
+ ordinal.overscrollPointsRange),
1057
1051
  // toValue for the first point.
1058
1052
  shiftIndex = (val - firstPointX) / ordinalPointPixelInterval;
1059
1053
  return Additions.findIndexOf(ordinalArray, firstPointVal) + shiftIndex;
@@ -1089,19 +1083,20 @@
1089
1083
  * @private
1090
1084
  */
1091
1085
  Additions.prototype.postProcessTickInterval = function (tickInterval) {
1092
- // Problem: https://jsfiddle.net/highcharts/FQm4E/1/
1093
- // This is a case where this algorithm doesn't work optimally. In
1094
- // this case, the tick labels are spread out per week, but all the
1095
- // gaps reside within weeks. So we have a situation where the labels
1096
- // are courser than the ordinal gaps, and thus the tick interval
1097
- // should not be altered.
1086
+ // Problem: https://jsfiddle.net/highcharts/FQm4E/1/. This is a case
1087
+ // where this algorithm doesn't work optimally. In this case, the
1088
+ // tick labels are spread out per week, but all the gaps reside
1089
+ // within weeks. So we have a situation where the labels are courser
1090
+ // than the ordinal gaps, and thus the tick interval should not be
1091
+ // altered.
1098
1092
  var ordinal = this,
1099
1093
  axis = ordinal.axis,
1100
1094
  ordinalSlope = ordinal.slope;
1101
1095
  var ret;
1102
1096
  if (ordinalSlope) {
1103
1097
  if (!axis.options.breaks) {
1104
- ret = tickInterval / (ordinalSlope / axis.closestPointRange);
1098
+ ret = (tickInterval /
1099
+ (ordinalSlope / axis.closestPointRange));
1105
1100
  }
1106
1101
  else {
1107
1102
  ret = axis.closestPointRange || tickInterval; // #7275
@@ -1124,33 +1119,33 @@
1124
1119
 
1125
1120
  return OrdinalAxis;
1126
1121
  });
1127
- _registerModule(_modules, 'Core/Axis/BrokenAxis.js', [_modules['Extensions/Stacking.js'], _modules['Core/Utilities.js']], function (StackItem, U) {
1122
+ _registerModule(_modules, 'Series/DataModifyComposition.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Series/Point.js'], _modules['Core/Series/Series.js'], _modules['Core/Utilities.js']], function (Axis, Point, Series, U) {
1128
1123
  /* *
1129
1124
  *
1130
- * (c) 2009-2021 Torstein Honsi
1125
+ * (c) 2010-2021 Torstein Honsi
1131
1126
  *
1132
1127
  * License: www.highcharts.com/license
1133
1128
  *
1134
1129
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
1135
1130
  *
1136
1131
  * */
1132
+ var pointTooltipFormatter = Point.prototype.tooltipFormatter;
1137
1133
  var addEvent = U.addEvent,
1138
- find = U.find,
1139
- fireEvent = U.fireEvent,
1134
+ arrayMax = U.arrayMax,
1135
+ arrayMin = U.arrayMin,
1136
+ correctFloat = U.correctFloat,
1137
+ defined = U.defined,
1140
1138
  isArray = U.isArray,
1141
1139
  isNumber = U.isNumber,
1140
+ isString = U.isString,
1142
1141
  pick = U.pick;
1143
1142
  /* *
1144
1143
  *
1145
1144
  * Composition
1146
1145
  *
1147
1146
  * */
1148
- /**
1149
- * Axis with support of broken data rows.
1150
- * @private
1151
- */
1152
- var BrokenAxis;
1153
- (function (BrokenAxis) {
1147
+ var DataModifyComposition;
1148
+ (function (DataModifyComposition) {
1154
1149
  /* *
1155
1150
  *
1156
1151
  * Declarations
@@ -1169,331 +1164,882 @@
1169
1164
  * */
1170
1165
  /* eslint-disable valid-jsdoc */
1171
1166
  /**
1172
- * Adds support for broken axes.
1167
+ * Extends the series, axis and point classes with
1168
+ * compare and cumulative support.
1169
+ *
1173
1170
  * @private
1171
+ *
1172
+ * @param SeriesClass
1173
+ * Series class to use.
1174
+ *
1175
+ * @param AxisClass
1176
+ * Axis class to extend.
1177
+ *
1178
+ * @param PointClass
1179
+ * Point class to use.
1174
1180
  */
1175
- function compose(AxisClass, SeriesClass) {
1176
- if (composedClasses.indexOf(AxisClass) === -1) {
1177
- composedClasses.push(AxisClass);
1178
- AxisClass.keepProps.push('brokenAxis');
1179
- addEvent(AxisClass, 'init', onAxisInit);
1180
- addEvent(AxisClass, 'afterInit', onAxisAfterInit);
1181
- addEvent(AxisClass, 'afterSetTickPositions', onAxisAfterSetTickPositions);
1182
- addEvent(AxisClass, 'afterSetOptions', onAxisAfterSetOptions);
1183
- }
1181
+ function compose(SeriesClass, AxisClass, PointClass) {
1184
1182
  if (composedClasses.indexOf(SeriesClass) === -1) {
1185
1183
  composedClasses.push(SeriesClass);
1186
1184
  var seriesProto = SeriesClass.prototype;
1187
- seriesProto.drawBreaks = seriesDrawBreaks;
1188
- seriesProto.gappedPath = seriesGappedPath;
1189
- addEvent(SeriesClass, 'afterGeneratePoints', onSeriesAfterGeneratePoints);
1190
- addEvent(SeriesClass, 'afterRender', onSeriesAfterRender);
1185
+ seriesProto.setCompare = seriesSetCompare;
1186
+ seriesProto.setCumulative = seriesSetCumulative;
1187
+ addEvent(SeriesClass, 'afterInit', afterInit);
1188
+ addEvent(SeriesClass, 'afterGetExtremes', afterGetExtremes);
1189
+ addEvent(SeriesClass, 'afterProcessData', afterProcessData);
1191
1190
  }
1192
- return AxisClass;
1191
+ if (composedClasses.indexOf(AxisClass) === -1) {
1192
+ composedClasses.push(AxisClass);
1193
+ var axisProto = AxisClass.prototype;
1194
+ axisProto.setCompare = axisSetCompare;
1195
+ axisProto.setModifier = setModifier;
1196
+ axisProto.setCumulative = axisSetCumulative;
1197
+ }
1198
+ if (composedClasses.indexOf(PointClass) === -1) {
1199
+ composedClasses.push(PointClass);
1200
+ var pointProto = PointClass.prototype;
1201
+ pointProto.tooltipFormatter = tooltipFormatter;
1202
+ }
1203
+ return SeriesClass;
1193
1204
  }
1194
- BrokenAxis.compose = compose;
1205
+ DataModifyComposition.compose = compose;
1206
+ /* ********************************************************************** *
1207
+ * Start shared compare and cumulative logic *
1208
+ * ********************************************************************** */
1195
1209
  /**
1210
+ * Shared code for the axis.setCompare() and the axis.setCumulative()
1211
+ * methods. Inits the 'compare' or the 'cumulative' mode.
1196
1212
  * @private
1197
1213
  */
1198
- function onAxisAfterInit() {
1199
- if (typeof this.brokenAxis !== 'undefined') {
1200
- this.brokenAxis.setBreaks(this.options.breaks, false);
1214
+ function setModifier(mode, modeState, redraw) {
1215
+ if (!this.isXAxis) {
1216
+ this.series.forEach(function (series) {
1217
+ if (mode === 'compare' &&
1218
+ typeof modeState !== 'boolean') {
1219
+ series.setCompare(modeState, false);
1220
+ }
1221
+ else if (mode === 'cumulative' &&
1222
+ !isString(modeState)) {
1223
+ series.setCumulative(modeState, false);
1224
+ }
1225
+ });
1226
+ if (pick(redraw, true)) {
1227
+ this.chart.redraw();
1228
+ }
1201
1229
  }
1202
1230
  }
1203
1231
  /**
1204
- * Force Axis to be not-ordinal when breaks are defined.
1205
- * @private
1232
+ * Extend the tooltip formatter by adding support for the point.change
1233
+ * variable as well as the changeDecimals option.
1234
+ *
1235
+ * @ignore
1236
+ * @function Highcharts.Point#tooltipFormatter
1237
+ *
1238
+ * @param {string} pointFormat
1206
1239
  */
1207
- function onAxisAfterSetOptions() {
1208
- var axis = this;
1209
- if (axis.brokenAxis && axis.brokenAxis.hasBreaks) {
1210
- axis.options.ordinal = false;
1240
+ function tooltipFormatter(pointFormat) {
1241
+ var point = this, numberFormatter = point.series.chart.numberFormatter, replace = function (value) {
1242
+ pointFormat = pointFormat.replace('{point.' + value + '}', (point[value] > 0 && value === 'change' ? '+' : '') +
1243
+ numberFormatter(point[value], pick(point.series.tooltipOptions.changeDecimals, 2)));
1244
+ };
1245
+ if (defined(point.change)) {
1246
+ replace('change');
1211
1247
  }
1248
+ if (defined(point.cumulativeSum)) {
1249
+ replace('cumulativeSum');
1250
+ }
1251
+ return pointTooltipFormatter.apply(this, [pointFormat]);
1212
1252
  }
1213
1253
  /**
1214
- * @private
1215
- */
1216
- function onAxisAfterSetTickPositions() {
1217
- var axis = this,
1218
- brokenAxis = axis.brokenAxis;
1219
- if (brokenAxis &&
1220
- brokenAxis.hasBreaks) {
1221
- var tickPositions = axis.tickPositions,
1222
- info = axis.tickPositions.info,
1223
- newPositions = [];
1224
- for (var i = 0; i < tickPositions.length; i++) {
1225
- if (!brokenAxis.isInAnyBreak(tickPositions[i])) {
1226
- newPositions.push(tickPositions[i]);
1227
- }
1254
+ * Extend series.init by adding a methods to modify the y values used
1255
+ * for plotting on the y axis. For compare mode, this method is called both
1256
+ * from the axis when finding dataMin and dataMax,
1257
+ * and from the series.translate method.
1258
+ *
1259
+ * @ignore
1260
+ * @function Highcharts.Series#init
1261
+ */
1262
+ function afterInit() {
1263
+ var compare = this.options.compare;
1264
+ var dataModify;
1265
+ if (compare === 'percent' ||
1266
+ compare === 'value' ||
1267
+ this.options.cumulative) {
1268
+ dataModify = new Additions(this);
1269
+ if (compare === 'percent' || compare === 'value') {
1270
+ // Set comparison mode
1271
+ dataModify.initCompare(compare);
1272
+ }
1273
+ else {
1274
+ // Set Cumulative Sum mode
1275
+ dataModify.initCumulative();
1228
1276
  }
1229
- axis.tickPositions = newPositions;
1230
- axis.tickPositions.info = info;
1231
1277
  }
1278
+ this.dataModify = dataModify;
1232
1279
  }
1233
1280
  /**
1281
+ * Adjust the extremes (compare and cumulative modify the data).
1234
1282
  * @private
1235
1283
  */
1236
- function onAxisInit() {
1237
- var axis = this;
1238
- if (!axis.brokenAxis) {
1239
- axis.brokenAxis = new Additions(axis);
1284
+ function afterGetExtremes(e) {
1285
+ var dataExtremes = e.dataExtremes,
1286
+ activeYData = dataExtremes.activeYData;
1287
+ if (this.dataModify && dataExtremes) {
1288
+ var extremes = void 0;
1289
+ if (this.options.compare) {
1290
+ extremes = [
1291
+ this.dataModify.modifyValue(dataExtremes.dataMin),
1292
+ this.dataModify.modifyValue(dataExtremes.dataMax)
1293
+ ];
1294
+ }
1295
+ else if (this.options.cumulative &&
1296
+ isArray(activeYData) &&
1297
+ // If only one y visible, sum doesn't change
1298
+ // so no need to change extremes
1299
+ activeYData.length >= 2) {
1300
+ extremes = Additions.getCumulativeExtremes(activeYData);
1301
+ }
1302
+ if (extremes) {
1303
+ dataExtremes.dataMin = arrayMin(extremes);
1304
+ dataExtremes.dataMax = arrayMax(extremes);
1305
+ }
1306
+ }
1307
+ }
1308
+ /* ********************************************************************** *
1309
+ * End shared compare and cumulative logic *
1310
+ * ********************************************************************** */
1311
+ /* ********************************************************************** *
1312
+ * Start value compare logic *
1313
+ * ********************************************************************** */
1314
+ /**
1315
+ * Highcharts Stock only. Set the
1316
+ * [compare](https://api.highcharts.com/highstock/plotOptions.series.compare)
1317
+ * mode of the series after render time.
1318
+ * In most cases it is more useful running
1319
+ * {@link Axis#setCompare} on the X axis to update all its series.
1320
+ *
1321
+ * @function Highcharts.Series#setCompare
1322
+ *
1323
+ * @param {string|null} [compare]
1324
+ * Can be one of `undefined` (default), `null`, `"percent"`
1325
+ * or `"value"`.
1326
+ *
1327
+ * @param {boolean} [redraw=true]
1328
+ * Whether to redraw the chart or to wait for a later call to
1329
+ * {@link Chart#redraw}.
1330
+ */
1331
+ function seriesSetCompare(compare, redraw) {
1332
+ // Survive to export, #5485 (and for options generally)
1333
+ this.options.compare = this.userOptions.compare = compare;
1334
+ // Fire series.init() that will set or delete series.dataModify
1335
+ this.update({}, pick(redraw, true));
1336
+ if (this.dataModify && (compare === 'value' || compare === 'percent')) {
1337
+ this.dataModify.initCompare(compare);
1338
+ }
1339
+ else {
1340
+ // When disabling, clear the points
1341
+ this.points.forEach(function (point) {
1342
+ delete point.change;
1343
+ });
1240
1344
  }
1241
1345
  }
1242
1346
  /**
1243
- * @private
1244
- */
1245
- function onSeriesAfterGeneratePoints() {
1246
- var _a = this,
1247
- isDirty = _a.isDirty,
1248
- connectNulls = _a.options.connectNulls,
1249
- points = _a.points,
1250
- xAxis = _a.xAxis,
1251
- yAxis = _a.yAxis;
1252
- // Set, or reset visibility of the points. Axis.setBreaks marks
1253
- // the series as isDirty
1254
- if (isDirty) {
1255
- var i = points.length;
1256
- while (i--) {
1257
- var point = points[i];
1258
- // Respect nulls inside the break (#4275)
1259
- var nullGap = point.y === null && connectNulls === false;
1260
- var isPointInBreak = (!nullGap && ((xAxis &&
1261
- xAxis.brokenAxis &&
1262
- xAxis.brokenAxis.isInAnyBreak(point.x,
1263
- true)) || (yAxis &&
1264
- yAxis.brokenAxis &&
1265
- yAxis.brokenAxis.isInAnyBreak(point.y,
1266
- true))));
1267
- // Set point.visible if in any break.
1268
- // If not in break, reset visible to original value.
1269
- point.visible = isPointInBreak ?
1270
- false :
1271
- point.options.visible !== false;
1347
+ * Extend series.processData by finding the first y value in the plot area,
1348
+ * used for comparing the following values
1349
+ *
1350
+ * @ignore
1351
+ * @function Highcharts.Series#processData
1352
+ */
1353
+ function afterProcessData() {
1354
+ var series = this;
1355
+ if (series.xAxis && // not pies
1356
+ series.processedYData &&
1357
+ series.dataModify) {
1358
+ var processedXData = series.processedXData,
1359
+ processedYData = series.processedYData,
1360
+ length_1 = processedYData.length,
1361
+ compareStart = series.options.compareStart === true ? 0 : 1;
1362
+ var keyIndex = -1,
1363
+ i = void 0;
1364
+ // For series with more than one value (range, OHLC etc), compare
1365
+ // against close or the pointValKey (#4922, #3112, #9854)
1366
+ if (series.pointArrayMap) {
1367
+ keyIndex = series.pointArrayMap.indexOf(series.options.pointValKey || series.pointValKey || 'y');
1368
+ }
1369
+ // find the first value for comparison
1370
+ for (i = 0; i < length_1 - compareStart; i++) {
1371
+ var compareValue = processedYData[i] && keyIndex > -1 ?
1372
+ processedYData[i][keyIndex] : processedYData[i];
1373
+ if (isNumber(compareValue) &&
1374
+ compareValue !== 0 &&
1375
+ processedXData[i + compareStart] >= (series.xAxis.min || 0)) {
1376
+ series.dataModify.compareValue = compareValue;
1377
+ break;
1378
+ }
1272
1379
  }
1273
1380
  }
1274
1381
  }
1275
1382
  /**
1276
- * @private
1383
+ * Highcharts Stock only. Set the compare mode on all series
1384
+ * belonging to a Y axis.
1385
+ *
1386
+ * @see [plotOptions.series.compare](https://api.highcharts.com/highstock/plotOptions.series.compare)
1387
+ *
1388
+ * @sample stock/members/axis-setcompare/
1389
+ * Set compare
1390
+ *
1391
+ * @function Highcharts.Axis#setCompare
1392
+ *
1393
+ * @param {string|null} [compare]
1394
+ * The compare mode. Can be one of `undefined` (default), `null`,
1395
+ * `"value"` or `"percent"`.
1396
+ *
1397
+ * @param {boolean} [redraw=true]
1398
+ * Whether to redraw the chart or to wait for a later call to
1399
+ * {@link Chart#redraw}.
1277
1400
  */
1278
- function onSeriesAfterRender() {
1279
- this.drawBreaks(this.xAxis, ['x']);
1280
- this.drawBreaks(this.yAxis, pick(this.pointArrayMap, ['y']));
1401
+ function axisSetCompare(compare, redraw) {
1402
+ this.setModifier('compare', compare, redraw);
1281
1403
  }
1282
- /**
1283
- * @private
1284
- */
1285
- function seriesDrawBreaks(axis, keys) {
1286
- var series = this,
1287
- points = series.points;
1288
- var breaks,
1289
- threshold,
1290
- eventName,
1291
- y;
1292
- if (axis && // #5950
1293
- axis.brokenAxis &&
1294
- axis.brokenAxis.hasBreaks) {
1295
- var brokenAxis_1 = axis.brokenAxis;
1296
- keys.forEach(function (key) {
1297
- breaks = brokenAxis_1 && brokenAxis_1.breakArray || [];
1298
- threshold = axis.isXAxis ?
1299
- axis.min :
1300
- pick(series.options.threshold, axis.min);
1301
- points.forEach(function (point) {
1302
- y = pick(point['stack' + key.toUpperCase()], point[key]);
1303
- breaks.forEach(function (brk) {
1304
- if (isNumber(threshold) && isNumber(y)) {
1305
- eventName = false;
1306
- if ((threshold < brk.from && y > brk.to) ||
1307
- (threshold > brk.from && y < brk.from)) {
1308
- eventName = 'pointBreak';
1309
- }
1310
- else if ((threshold < brk.from && y > brk.from && y < brk.to) ||
1311
- (threshold > brk.from && y > brk.to && y < brk.from)) {
1312
- eventName = 'pointInBreak';
1313
- }
1314
- if (eventName) {
1315
- fireEvent(axis, eventName, { point: point, brk: brk });
1316
- }
1317
- }
1318
- });
1319
- });
1404
+ /* ********************************************************************** *
1405
+ * End value compare logic *
1406
+ * ********************************************************************** */
1407
+ /* ********************************************************************** *
1408
+ * Start Cumulative Sum logic, author: Rafal Sebestjanski *
1409
+ * ********************************************************************** */
1410
+ /**
1411
+ * Highcharts Stock only. Set the
1412
+ * [cumulative](https://api.highcharts.com/highstock/plotOptions.series.cumulative)
1413
+ * mode of the series after render time.
1414
+ * In most cases it is more useful running
1415
+ * {@link Axis#setCumulative} on the Y axis to update all its series.
1416
+ *
1417
+ * @function Highcharts.Series#setCumulative
1418
+ *
1419
+ * @param {boolean} [cumulative=false]
1420
+ * Either enable or disable Cumulative Sum mode.
1421
+ * Can be one of `false` (default) or `true`.
1422
+ *
1423
+ * @param {boolean} [redraw=true]
1424
+ * Whether to redraw the chart or to wait for a later call to
1425
+ * {@link Chart#redraw}.
1426
+ */
1427
+ function seriesSetCumulative(cumulative, redraw) {
1428
+ // Set default value to false
1429
+ cumulative = pick(cumulative, false);
1430
+ // Survive to export, #5485 (and for options generally)
1431
+ this.options.cumulative = this.userOptions.cumulative = cumulative;
1432
+ // Fire series.init() that will set or delete series.dataModify
1433
+ this.update({}, pick(redraw, true));
1434
+ // If should, turn on the Cumulative Sum mode
1435
+ if (this.dataModify) {
1436
+ this.dataModify.initCumulative();
1437
+ }
1438
+ else {
1439
+ // When disabling, clear the points
1440
+ this.points.forEach(function (point) {
1441
+ delete point.cumulativeSum;
1320
1442
  });
1321
1443
  }
1322
1444
  }
1323
1445
  /**
1324
- * Extend getGraphPath by identifying gaps in the data so that we
1325
- * can draw a gap in the line or area. This was moved from ordinal
1326
- * axis module to broken axis module as of #5045.
1446
+ * Highcharts Stock only. Set the cumulative mode on all series
1447
+ * belonging to a Y axis.
1327
1448
  *
1328
- * @private
1329
- * @function Highcharts.Series#gappedPath
1449
+ * @see [plotOptions.series.cumulative](https://api.highcharts.com/highstock/plotOptions.series.cumulative)
1330
1450
  *
1331
- * @return {Highcharts.SVGPathArray}
1332
- * Gapped path
1451
+ * @sample stock/members/axis-setcumulative/
1452
+ * Set cumulative
1453
+ *
1454
+ * @function Highcharts.Axis#setCumulative
1455
+ *
1456
+ * @param {boolean} [cumulative]
1457
+ * Whether to disable or enable the cumulative mode.
1458
+ * Can be one of `undefined` (default, treated as `false`),
1459
+ * `false` or `true`.
1460
+ *
1461
+ * @param {boolean} [redraw=true]
1462
+ * Whether to redraw the chart or to wait for a later call to
1463
+ * {@link Chart#redraw}.
1333
1464
  */
1334
- function seriesGappedPath() {
1335
- var currentDataGrouping = this.currentDataGrouping,
1336
- groupingSize = currentDataGrouping && currentDataGrouping.gapSize,
1337
- points = this.points.slice(),
1338
- yAxis = this.yAxis;
1339
- var gapSize = this.options.gapSize,
1340
- i = points.length - 1,
1341
- stack;
1465
+ function axisSetCumulative(cumulative, redraw) {
1466
+ this.setModifier('cumulative', cumulative, redraw);
1467
+ }
1468
+ /* *
1469
+ *
1470
+ * Classes
1471
+ *
1472
+ * */
1473
+ /**
1474
+ * @private
1475
+ */
1476
+ var Additions = /** @class */ (function () {
1477
+ /* *
1478
+ *
1479
+ * Constructors
1480
+ *
1481
+ * */
1482
+ /**
1483
+ * @private
1484
+ */
1485
+ function Additions(series) {
1486
+ this.series = series;
1487
+ }
1488
+ /* *
1489
+ *
1490
+ * Functions
1491
+ *
1492
+ * */
1342
1493
  /**
1343
- * Defines when to display a gap in the graph, together with the
1344
- * [gapUnit](plotOptions.series.gapUnit) option.
1494
+ * @private
1495
+ */
1496
+ Additions.prototype.modifyValue = function () {
1497
+ return 0;
1498
+ };
1499
+ /**
1500
+ * @ignore
1501
+ * @function Highcharts.Series#getCumulativeExtremes
1345
1502
  *
1346
- * In case when `dataGrouping` is enabled, points can be grouped
1347
- * into a larger time span. This can make the grouped points to
1348
- * have a greater distance than the absolute value of `gapSize`
1349
- * property, which will result in disappearing graph completely.
1350
- * To prevent this situation the mentioned distance between
1351
- * grouped points is used instead of previously defined
1352
- * `gapSize`.
1503
+ * @param {Array} [activeYData]
1504
+ * An array cointaining all the points' y values
1505
+ * in a visible range.
1506
+ */
1507
+ Additions.getCumulativeExtremes = function (activeYData) {
1508
+ var cumulativeDataMin = Infinity,
1509
+ cumulativeDataMax = -Infinity;
1510
+ activeYData.reduce(function (prev, cur) {
1511
+ var sum = prev + cur;
1512
+ cumulativeDataMin = Math.min(cumulativeDataMin, sum, prev);
1513
+ cumulativeDataMax = Math.max(cumulativeDataMax, sum, prev);
1514
+ return sum;
1515
+ });
1516
+ return [cumulativeDataMin, cumulativeDataMax];
1517
+ };
1518
+ /**
1519
+ * @ignore
1520
+ * @function Highcharts.Series#initCompare
1353
1521
  *
1354
- * In practice, this option is most often used to visualize gaps
1355
- * in time series. In a stock chart, intraday data is available
1356
- * for daytime hours, while gaps will appear in nights and
1357
- * weekends.
1358
- *
1359
- * @see [gapUnit](plotOptions.series.gapUnit)
1360
- * @see [xAxis.breaks](#xAxis.breaks)
1361
- *
1362
- * @sample {highstock} stock/plotoptions/series-gapsize/
1363
- * Setting the gap size to 2 introduces gaps for weekends in
1364
- * daily datasets.
1365
- *
1366
- * @type {number}
1367
- * @default 0
1368
- * @product highstock
1369
- * @requires modules/broken-axis
1370
- * @apioption plotOptions.series.gapSize
1522
+ * @param {string} [compare]
1523
+ * Can be one of `"percent"` or `"value"`.
1371
1524
  */
1525
+ Additions.prototype.initCompare = function (compare) {
1526
+ // Set the modifyValue method
1527
+ this.modifyValue = function (value, index) {
1528
+ if (value === null) {
1529
+ value = 0;
1530
+ }
1531
+ var compareValue = this.compareValue;
1532
+ if (typeof value !== 'undefined' &&
1533
+ typeof compareValue !== 'undefined') { // #2601, #5814
1534
+ // Get the modified value
1535
+ if (compare === 'value') {
1536
+ value -= compareValue;
1537
+ // Compare percent
1538
+ }
1539
+ else {
1540
+ var compareBase = this.series.options.compareBase;
1541
+ value = 100 * (value / compareValue) -
1542
+ (compareBase === 100 ? 0 : 100);
1543
+ }
1544
+ // record for tooltip etc.
1545
+ if (typeof index !== 'undefined') {
1546
+ var point = this.series.points[index];
1547
+ if (point) {
1548
+ point.change = value;
1549
+ }
1550
+ }
1551
+ return value;
1552
+ }
1553
+ return 0;
1554
+ };
1555
+ };
1372
1556
  /**
1373
- * Together with [gapSize](plotOptions.series.gapSize), this
1374
- * option defines where to draw gaps in the graph.
1375
- *
1376
- * When the `gapUnit` is `"relative"` (default), a gap size of 5
1377
- * means that if the distance between two points is greater than
1378
- * 5 times that of the two closest points, the graph will be
1379
- * broken.
1380
- *
1381
- * When the `gapUnit` is `"value"`, the gap is based on absolute
1382
- * axis values, which on a datetime axis is milliseconds. This
1383
- * also applies to the navigator series that inherits gap
1384
- * options from the base series.
1385
- *
1386
- * @see [gapSize](plotOptions.series.gapSize)
1387
- *
1388
- * @type {string}
1389
- * @default relative
1390
- * @since 5.0.13
1391
- * @product highstock
1392
- * @validvalue ["relative", "value"]
1393
- * @requires modules/broken-axis
1394
- * @apioption plotOptions.series.gapUnit
1557
+ * @ignore
1558
+ * @function Highcharts.Series#initCumulative
1395
1559
  */
1396
- if (gapSize && i > 0) { // #5008
1397
- // Gap unit is relative
1398
- if (this.options.gapUnit !== 'value') {
1399
- gapSize *= this.basePointRange;
1400
- }
1401
- // Setting a new gapSize in case dataGrouping is enabled
1402
- // (#7686)
1403
- if (groupingSize &&
1404
- groupingSize > gapSize &&
1405
- // Except when DG is forced (e.g. from other series)
1406
- // and has lower granularity than actual points (#11351)
1407
- groupingSize >= this.basePointRange) {
1408
- gapSize = groupingSize;
1409
- }
1410
- // extension for ordinal breaks
1411
- var current = void 0,
1412
- next = void 0;
1413
- while (i--) {
1414
- // Reassign next if it is not visible
1415
- if (!(next && next.visible !== false)) {
1416
- next = points[i + 1];
1417
- }
1418
- current = points[i];
1419
- // Skip iteration if one of the points is not visible
1420
- if (next.visible === false || current.visible === false) {
1421
- continue;
1422
- }
1423
- if (next.x - current.x > gapSize) {
1424
- var xRange = (current.x + next.x) / 2;
1425
- points.splice(// insert after this one
1426
- i + 1, 0, {
1427
- isNull: true,
1428
- x: xRange
1429
- });
1430
- // For stacked chart generate empty stack items,
1431
- // #6546
1432
- if (yAxis.stacking && this.options.stacking) {
1433
- stack = yAxis.stacking.stacks[this.stackKey][xRange] =
1434
- new StackItem(yAxis, yAxis.options
1435
- .stackLabels, false, xRange, this.stack);
1436
- stack.total = 0;
1560
+ Additions.prototype.initCumulative = function () {
1561
+ // Set the modifyValue method
1562
+ this.modifyValue = function (value, index) {
1563
+ if (value === null) {
1564
+ value = 0;
1565
+ }
1566
+ if (value !== void 0 && index !== void 0) {
1567
+ var prevPoint = index > 0 ?
1568
+ this.series.points[index - 1] : null;
1569
+ // Get the modified value
1570
+ if (prevPoint && prevPoint.cumulativeSum) {
1571
+ value = correctFloat(prevPoint.cumulativeSum + value);
1572
+ }
1573
+ // Record for tooltip etc.
1574
+ var point = this.series.points[index];
1575
+ if (point) {
1576
+ point.cumulativeSum = value;
1437
1577
  }
1578
+ return value;
1438
1579
  }
1439
- // Assign current to next for the upcoming iteration
1440
- next = current;
1441
- }
1442
- }
1443
- // Call base method
1444
- return this.getGraphPath(points);
1445
- }
1580
+ return 0;
1581
+ };
1582
+ };
1583
+ return Additions;
1584
+ }());
1585
+ DataModifyComposition.Additions = Additions;
1586
+ })(DataModifyComposition || (DataModifyComposition = {}));
1587
+ /* *
1588
+ *
1589
+ * Default Export
1590
+ *
1591
+ * */
1592
+ /* *
1593
+ *
1594
+ * API Options
1595
+ *
1596
+ * */
1597
+ /**
1598
+ * Compare the values of the series against the first non-null, non-
1599
+ * zero value in the visible range. The y axis will show percentage
1600
+ * or absolute change depending on whether `compare` is set to `"percent"`
1601
+ * or `"value"`. When this is applied to multiple series, it allows
1602
+ * comparing the development of the series against each other. Adds
1603
+ * a `change` field to every point object.
1604
+ *
1605
+ * @see [compareBase](#plotOptions.series.compareBase)
1606
+ * @see [Axis.setCompare()](/class-reference/Highcharts.Axis#setCompare)
1607
+ * @see [Series.setCompare()](/class-reference/Highcharts.Series#setCompare)
1608
+ *
1609
+ * @sample {highstock} stock/plotoptions/series-compare-percent/
1610
+ * Percent
1611
+ * @sample {highstock} stock/plotoptions/series-compare-value/
1612
+ * Value
1613
+ *
1614
+ * @type {string}
1615
+ * @since 1.0.1
1616
+ * @product highstock
1617
+ * @apioption plotOptions.series.compare
1618
+ */
1619
+ /**
1620
+ * Defines if comparison should start from the first point within the visible
1621
+ * range or should start from the first point **before** the range.
1622
+ *
1623
+ * In other words, this flag determines if first point within the visible range
1624
+ * will have 0% (`compareStart=true`) or should have been already calculated
1625
+ * according to the previous point (`compareStart=false`).
1626
+ *
1627
+ * @sample {highstock} stock/plotoptions/series-comparestart/
1628
+ * Calculate compare within visible range
1629
+ *
1630
+ * @type {boolean}
1631
+ * @default false
1632
+ * @since 6.0.0
1633
+ * @product highstock
1634
+ * @apioption plotOptions.series.compareStart
1635
+ */
1636
+ /**
1637
+ * When [compare](#plotOptions.series.compare) is `percent`, this option
1638
+ * dictates whether to use 0 or 100 as the base of comparison.
1639
+ *
1640
+ * @sample {highstock} stock/plotoptions/series-comparebase/
1641
+ * Compare base is 100
1642
+ *
1643
+ * @type {number}
1644
+ * @default 0
1645
+ * @since 5.0.6
1646
+ * @product highstock
1647
+ * @validvalue [0, 100]
1648
+ * @apioption plotOptions.series.compareBase
1649
+ */
1650
+ /**
1651
+ * Cumulative Sum feature replaces points' values with the following formula:
1652
+ * `sum of all previous points' values + current point's value`.
1653
+ * Works only for points in a visible range.
1654
+ * Adds the `cumulativeSum` field to each point object that can be accessed
1655
+ * e.g. in the [tooltip.pointFormat](https://api.highcharts.com/highstock/tooltip.pointFormat).
1656
+ *
1657
+ * @see [Axis.setCumulative()](/class-reference/Highcharts.Axis#setCumulative)
1658
+ * @see [Series.setCumulative()](/class-reference/Highcharts.Series#setCumulative)
1659
+ *
1660
+ * @sample {highstock} stock/plotoptions/series-cumulative-sum/
1661
+ * Cumulative Sum
1662
+ *
1663
+ * @type {boolean}
1664
+ * @default false
1665
+ * @since 9.3.0
1666
+ * @product highstock
1667
+ * @apioption plotOptions.series.cumulative
1668
+ */
1669
+ ''; // keeps doclets above in transpiled file
1670
+
1671
+ return DataModifyComposition;
1672
+ });
1673
+ _registerModule(_modules, 'Core/Axis/BrokenAxis.js', [_modules['Extensions/Stacking.js'], _modules['Core/Utilities.js']], function (StackItem, U) {
1674
+ /* *
1675
+ *
1676
+ * (c) 2009-2021 Torstein Honsi
1677
+ *
1678
+ * License: www.highcharts.com/license
1679
+ *
1680
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
1681
+ *
1682
+ * */
1683
+ var addEvent = U.addEvent,
1684
+ find = U.find,
1685
+ fireEvent = U.fireEvent,
1686
+ isArray = U.isArray,
1687
+ isNumber = U.isNumber,
1688
+ pick = U.pick;
1689
+ /* *
1690
+ *
1691
+ * Composition
1692
+ *
1693
+ * */
1694
+ /**
1695
+ * Axis with support of broken data rows.
1696
+ * @private
1697
+ */
1698
+ var BrokenAxis;
1699
+ (function (BrokenAxis) {
1446
1700
  /* *
1447
1701
  *
1448
- * Class
1702
+ * Declarations
1703
+ *
1704
+ * */
1705
+ /* *
1706
+ *
1707
+ * Constants
1708
+ *
1709
+ * */
1710
+ var composedClasses = [];
1711
+ /* *
1712
+ *
1713
+ * Functions
1449
1714
  *
1450
1715
  * */
1716
+ /* eslint-disable valid-jsdoc */
1451
1717
  /**
1452
- * Provides support for broken axes.
1718
+ * Adds support for broken axes.
1453
1719
  * @private
1454
- * @class
1455
1720
  */
1456
- var Additions = /** @class */ (function () {
1457
- /* *
1458
- *
1459
- * Constructors
1460
- *
1461
- * */
1462
- function Additions(axis) {
1463
- this.hasBreaks = false;
1464
- this.axis = axis;
1721
+ function compose(AxisClass, SeriesClass) {
1722
+ if (composedClasses.indexOf(AxisClass) === -1) {
1723
+ composedClasses.push(AxisClass);
1724
+ AxisClass.keepProps.push('brokenAxis');
1725
+ addEvent(AxisClass, 'init', onAxisInit);
1726
+ addEvent(AxisClass, 'afterInit', onAxisAfterInit);
1727
+ addEvent(AxisClass, 'afterSetTickPositions', onAxisAfterSetTickPositions);
1728
+ addEvent(AxisClass, 'afterSetOptions', onAxisAfterSetOptions);
1465
1729
  }
1466
- /* *
1467
- *
1468
- * Static Functions
1469
- *
1470
- * */
1471
- /**
1472
- * @private
1473
- */
1474
- Additions.isInBreak = function (brk, val) {
1475
- var repeat = brk.repeat || Infinity,
1476
- from = brk.from,
1477
- length = brk.to - brk.from,
1478
- test = (val >= from ?
1479
- (val - from) % repeat :
1480
- repeat - ((from - val) % repeat));
1481
- var ret;
1482
- if (!brk.inclusive) {
1483
- ret = test < length && test !== 0;
1484
- }
1485
- else {
1486
- ret = test <= length;
1487
- }
1488
- return ret;
1489
- };
1490
- /**
1491
- * @private
1492
- */
1493
- Additions.lin2Val = function (val) {
1494
- var axis = this;
1495
- var brokenAxis = axis.brokenAxis;
1496
- var breakArray = brokenAxis && brokenAxis.breakArray;
1730
+ if (composedClasses.indexOf(SeriesClass) === -1) {
1731
+ composedClasses.push(SeriesClass);
1732
+ var seriesProto = SeriesClass.prototype;
1733
+ seriesProto.drawBreaks = seriesDrawBreaks;
1734
+ seriesProto.gappedPath = seriesGappedPath;
1735
+ addEvent(SeriesClass, 'afterGeneratePoints', onSeriesAfterGeneratePoints);
1736
+ addEvent(SeriesClass, 'afterRender', onSeriesAfterRender);
1737
+ }
1738
+ return AxisClass;
1739
+ }
1740
+ BrokenAxis.compose = compose;
1741
+ /**
1742
+ * @private
1743
+ */
1744
+ function onAxisAfterInit() {
1745
+ if (typeof this.brokenAxis !== 'undefined') {
1746
+ this.brokenAxis.setBreaks(this.options.breaks, false);
1747
+ }
1748
+ }
1749
+ /**
1750
+ * Force Axis to be not-ordinal when breaks are defined.
1751
+ * @private
1752
+ */
1753
+ function onAxisAfterSetOptions() {
1754
+ var axis = this;
1755
+ if (axis.brokenAxis && axis.brokenAxis.hasBreaks) {
1756
+ axis.options.ordinal = false;
1757
+ }
1758
+ }
1759
+ /**
1760
+ * @private
1761
+ */
1762
+ function onAxisAfterSetTickPositions() {
1763
+ var axis = this,
1764
+ brokenAxis = axis.brokenAxis;
1765
+ if (brokenAxis &&
1766
+ brokenAxis.hasBreaks) {
1767
+ var tickPositions = axis.tickPositions,
1768
+ info = axis.tickPositions.info,
1769
+ newPositions = [];
1770
+ for (var i = 0; i < tickPositions.length; i++) {
1771
+ if (!brokenAxis.isInAnyBreak(tickPositions[i])) {
1772
+ newPositions.push(tickPositions[i]);
1773
+ }
1774
+ }
1775
+ axis.tickPositions = newPositions;
1776
+ axis.tickPositions.info = info;
1777
+ }
1778
+ }
1779
+ /**
1780
+ * @private
1781
+ */
1782
+ function onAxisInit() {
1783
+ var axis = this;
1784
+ if (!axis.brokenAxis) {
1785
+ axis.brokenAxis = new Additions(axis);
1786
+ }
1787
+ }
1788
+ /**
1789
+ * @private
1790
+ */
1791
+ function onSeriesAfterGeneratePoints() {
1792
+ var _a = this,
1793
+ isDirty = _a.isDirty,
1794
+ connectNulls = _a.options.connectNulls,
1795
+ points = _a.points,
1796
+ xAxis = _a.xAxis,
1797
+ yAxis = _a.yAxis;
1798
+ // Set, or reset visibility of the points. Axis.setBreaks marks
1799
+ // the series as isDirty
1800
+ if (isDirty) {
1801
+ var i = points.length;
1802
+ while (i--) {
1803
+ var point = points[i];
1804
+ // Respect nulls inside the break (#4275)
1805
+ var nullGap = point.y === null && connectNulls === false;
1806
+ var isPointInBreak = (!nullGap && ((xAxis &&
1807
+ xAxis.brokenAxis &&
1808
+ xAxis.brokenAxis.isInAnyBreak(point.x,
1809
+ true)) || (yAxis &&
1810
+ yAxis.brokenAxis &&
1811
+ yAxis.brokenAxis.isInAnyBreak(point.y,
1812
+ true))));
1813
+ // Set point.visible if in any break.
1814
+ // If not in break, reset visible to original value.
1815
+ point.visible = isPointInBreak ?
1816
+ false :
1817
+ point.options.visible !== false;
1818
+ }
1819
+ }
1820
+ }
1821
+ /**
1822
+ * @private
1823
+ */
1824
+ function onSeriesAfterRender() {
1825
+ this.drawBreaks(this.xAxis, ['x']);
1826
+ this.drawBreaks(this.yAxis, pick(this.pointArrayMap, ['y']));
1827
+ }
1828
+ /**
1829
+ * @private
1830
+ */
1831
+ function seriesDrawBreaks(axis, keys) {
1832
+ var series = this,
1833
+ points = series.points;
1834
+ var breaks,
1835
+ threshold,
1836
+ eventName,
1837
+ y;
1838
+ if (axis && // #5950
1839
+ axis.brokenAxis &&
1840
+ axis.brokenAxis.hasBreaks) {
1841
+ var brokenAxis_1 = axis.brokenAxis;
1842
+ keys.forEach(function (key) {
1843
+ breaks = brokenAxis_1 && brokenAxis_1.breakArray || [];
1844
+ threshold = axis.isXAxis ?
1845
+ axis.min :
1846
+ pick(series.options.threshold, axis.min);
1847
+ points.forEach(function (point) {
1848
+ y = pick(point['stack' + key.toUpperCase()], point[key]);
1849
+ breaks.forEach(function (brk) {
1850
+ if (isNumber(threshold) && isNumber(y)) {
1851
+ eventName = false;
1852
+ if ((threshold < brk.from && y > brk.to) ||
1853
+ (threshold > brk.from && y < brk.from)) {
1854
+ eventName = 'pointBreak';
1855
+ }
1856
+ else if ((threshold < brk.from &&
1857
+ y > brk.from &&
1858
+ y < brk.to) || (threshold > brk.from &&
1859
+ y > brk.to &&
1860
+ y < brk.from)) {
1861
+ eventName = 'pointInBreak';
1862
+ }
1863
+ if (eventName) {
1864
+ fireEvent(axis, eventName, { point: point, brk: brk });
1865
+ }
1866
+ }
1867
+ });
1868
+ });
1869
+ });
1870
+ }
1871
+ }
1872
+ /**
1873
+ * Extend getGraphPath by identifying gaps in the data so that we
1874
+ * can draw a gap in the line or area. This was moved from ordinal
1875
+ * axis module to broken axis module as of #5045.
1876
+ *
1877
+ * @private
1878
+ * @function Highcharts.Series#gappedPath
1879
+ *
1880
+ * @return {Highcharts.SVGPathArray}
1881
+ * Gapped path
1882
+ */
1883
+ function seriesGappedPath() {
1884
+ var currentDataGrouping = this.currentDataGrouping,
1885
+ groupingSize = currentDataGrouping && currentDataGrouping.gapSize,
1886
+ points = this.points.slice(),
1887
+ yAxis = this.yAxis;
1888
+ var gapSize = this.options.gapSize,
1889
+ i = points.length - 1,
1890
+ stack;
1891
+ /**
1892
+ * Defines when to display a gap in the graph, together with the
1893
+ * [gapUnit](plotOptions.series.gapUnit) option.
1894
+ *
1895
+ * In case when `dataGrouping` is enabled, points can be grouped
1896
+ * into a larger time span. This can make the grouped points to
1897
+ * have a greater distance than the absolute value of `gapSize`
1898
+ * property, which will result in disappearing graph completely.
1899
+ * To prevent this situation the mentioned distance between
1900
+ * grouped points is used instead of previously defined
1901
+ * `gapSize`.
1902
+ *
1903
+ * In practice, this option is most often used to visualize gaps
1904
+ * in time series. In a stock chart, intraday data is available
1905
+ * for daytime hours, while gaps will appear in nights and
1906
+ * weekends.
1907
+ *
1908
+ * @see [gapUnit](plotOptions.series.gapUnit)
1909
+ * @see [xAxis.breaks](#xAxis.breaks)
1910
+ *
1911
+ * @sample {highstock} stock/plotoptions/series-gapsize/
1912
+ * Setting the gap size to 2 introduces gaps for weekends in
1913
+ * daily datasets.
1914
+ *
1915
+ * @type {number}
1916
+ * @default 0
1917
+ * @product highstock
1918
+ * @requires modules/broken-axis
1919
+ * @apioption plotOptions.series.gapSize
1920
+ */
1921
+ /**
1922
+ * Together with [gapSize](plotOptions.series.gapSize), this
1923
+ * option defines where to draw gaps in the graph.
1924
+ *
1925
+ * When the `gapUnit` is `"relative"` (default), a gap size of 5
1926
+ * means that if the distance between two points is greater than
1927
+ * 5 times that of the two closest points, the graph will be
1928
+ * broken.
1929
+ *
1930
+ * When the `gapUnit` is `"value"`, the gap is based on absolute
1931
+ * axis values, which on a datetime axis is milliseconds. This
1932
+ * also applies to the navigator series that inherits gap
1933
+ * options from the base series.
1934
+ *
1935
+ * @see [gapSize](plotOptions.series.gapSize)
1936
+ *
1937
+ * @type {string}
1938
+ * @default relative
1939
+ * @since 5.0.13
1940
+ * @product highstock
1941
+ * @validvalue ["relative", "value"]
1942
+ * @requires modules/broken-axis
1943
+ * @apioption plotOptions.series.gapUnit
1944
+ */
1945
+ if (gapSize && i > 0) { // #5008
1946
+ // Gap unit is relative
1947
+ if (this.options.gapUnit !== 'value') {
1948
+ gapSize *= this.basePointRange;
1949
+ }
1950
+ // Setting a new gapSize in case dataGrouping is enabled
1951
+ // (#7686)
1952
+ if (groupingSize &&
1953
+ groupingSize > gapSize &&
1954
+ // Except when DG is forced (e.g. from other series)
1955
+ // and has lower granularity than actual points (#11351)
1956
+ groupingSize >= this.basePointRange) {
1957
+ gapSize = groupingSize;
1958
+ }
1959
+ // extension for ordinal breaks
1960
+ var current = void 0,
1961
+ next = void 0;
1962
+ while (i--) {
1963
+ // Reassign next if it is not visible
1964
+ if (!(next && next.visible !== false)) {
1965
+ next = points[i + 1];
1966
+ }
1967
+ current = points[i];
1968
+ // Skip iteration if one of the points is not visible
1969
+ if (next.visible === false || current.visible === false) {
1970
+ continue;
1971
+ }
1972
+ if (next.x - current.x > gapSize) {
1973
+ var xRange = (current.x + next.x) / 2;
1974
+ points.splice(// insert after this one
1975
+ i + 1, 0, {
1976
+ isNull: true,
1977
+ x: xRange
1978
+ });
1979
+ // For stacked chart generate empty stack items, #6546
1980
+ if (yAxis.stacking && this.options.stacking) {
1981
+ stack = yAxis.stacking.stacks[this.stackKey][xRange] = new StackItem(yAxis, yAxis.options.stackLabels, false, xRange, this.stack);
1982
+ stack.total = 0;
1983
+ }
1984
+ }
1985
+ // Assign current to next for the upcoming iteration
1986
+ next = current;
1987
+ }
1988
+ }
1989
+ // Call base method
1990
+ return this.getGraphPath(points);
1991
+ }
1992
+ /* *
1993
+ *
1994
+ * Class
1995
+ *
1996
+ * */
1997
+ /**
1998
+ * Provides support for broken axes.
1999
+ * @private
2000
+ * @class
2001
+ */
2002
+ var Additions = /** @class */ (function () {
2003
+ /* *
2004
+ *
2005
+ * Constructors
2006
+ *
2007
+ * */
2008
+ function Additions(axis) {
2009
+ this.hasBreaks = false;
2010
+ this.axis = axis;
2011
+ }
2012
+ /* *
2013
+ *
2014
+ * Static Functions
2015
+ *
2016
+ * */
2017
+ /**
2018
+ * @private
2019
+ */
2020
+ Additions.isInBreak = function (brk, val) {
2021
+ var repeat = brk.repeat || Infinity,
2022
+ from = brk.from,
2023
+ length = brk.to - brk.from,
2024
+ test = (val >= from ?
2025
+ (val - from) % repeat :
2026
+ repeat - ((from - val) % repeat));
2027
+ var ret;
2028
+ if (!brk.inclusive) {
2029
+ ret = test < length && test !== 0;
2030
+ }
2031
+ else {
2032
+ ret = test <= length;
2033
+ }
2034
+ return ret;
2035
+ };
2036
+ /**
2037
+ * @private
2038
+ */
2039
+ Additions.lin2Val = function (val) {
2040
+ var axis = this;
2041
+ var brokenAxis = axis.brokenAxis;
2042
+ var breakArray = brokenAxis && brokenAxis.breakArray;
1497
2043
  if (!breakArray || !isNumber(val)) {
1498
2044
  return val;
1499
2045
  }
@@ -1669,10 +2215,12 @@
1669
2215
  repeat_1 = brk.repeat || Infinity;
1670
2216
  if (isNumber(min_1) && isNumber(max_1)) {
1671
2217
  if (Additions.isInBreak(brk, min_1)) {
1672
- min_1 += (brk.to % repeat_1) - (min_1 % repeat_1);
2218
+ min_1 += ((brk.to % repeat_1) -
2219
+ (min_1 % repeat_1));
1673
2220
  }
1674
2221
  if (Additions.isInBreak(brk, max_1)) {
1675
- max_1 -= (max_1 % repeat_1) - (brk.from % repeat_1);
2222
+ max_1 -= ((max_1 % repeat_1) -
2223
+ (brk.from % repeat_1));
1676
2224
  }
1677
2225
  }
1678
2226
  });
@@ -1720,13 +2268,17 @@
1720
2268
  to: brk.value,
1721
2269
  len: brk.value - start_1 - (brk.size || 0)
1722
2270
  });
1723
- length_1 += brk.value - start_1 - (brk.size || 0);
2271
+ length_1 += (brk.value -
2272
+ start_1 -
2273
+ (brk.size || 0));
1724
2274
  }
1725
2275
  });
1726
2276
  brokenAxis.breakArray = breakArray_1;
1727
2277
  // Used with staticScale, and below the actual axis
1728
2278
  // length, when breaks are substracted.
1729
- if (isNumber(min_1) && isNumber(max_1) && isNumber(axis.min)) {
2279
+ if (isNumber(min_1) &&
2280
+ isNumber(max_1) &&
2281
+ isNumber(axis.min)) {
1730
2282
  brokenAxis.unitLength = max_1 - min_1 - length_1 +
1731
2283
  pointRangePadding;
1732
2284
  fireEvent(axis, 'afterBreaks');
@@ -1894,8 +2446,18 @@
1894
2446
  arr[arr.length - 1] :
1895
2447
  (arr.hasNulls ? null : void 0);
1896
2448
  },
1897
- // ohlc and range are special cases where a multidimensional array is
1898
- // input and an array is output
2449
+ // HLC, OHLC and range are special cases where a multidimensional array is
2450
+ // input and an array is output.
2451
+ hlc: function (high, low, close) {
2452
+ high = approximations.high(high);
2453
+ low = approximations.low(low);
2454
+ close = approximations.close(close);
2455
+ if (isNumber(high) ||
2456
+ isNumber(low) ||
2457
+ isNumber(close)) {
2458
+ return [high, low, close];
2459
+ }
2460
+ },
1899
2461
  ohlc: function (open, high, low, close) {
1900
2462
  open = approximations.open(open);
1901
2463
  high = approximations.high(high);
@@ -1907,7 +2469,6 @@
1907
2469
  isNumber(close)) {
1908
2470
  return [open, high, low, close];
1909
2471
  }
1910
- // else, return is undefined
1911
2472
  },
1912
2473
  range: function (low, high) {
1913
2474
  low = approximations.low(low);
@@ -1921,7 +2482,7 @@
1921
2482
  // else, return is undefined
1922
2483
  }
1923
2484
  };
1924
- var applyGrouping = function () {
2485
+ var applyGrouping = function (hasExtemesChanged) {
1925
2486
  var series = this,
1926
2487
  chart = series.chart,
1927
2488
  options = series.options,
@@ -1940,9 +2501,9 @@
1940
2501
  if (groupingEnabled && !series.requireSorting) {
1941
2502
  series.requireSorting = revertRequireSorting = true;
1942
2503
  }
1943
- // Skip if processData returns false or if grouping is disabled (in that
1944
- // order)
1945
- skip = skipDataGrouping(series) || !groupingEnabled;
2504
+ // Skip if skipDataGrouping method returns false or if grouping is disabled
2505
+ // (in that order).
2506
+ skip = skipDataGrouping(series, hasExtemesChanged) === false || !groupingEnabled;
1946
2507
  // Revert original requireSorting value if changed
1947
2508
  if (revertRequireSorting) {
1948
2509
  series.requireSorting = false;
@@ -2000,13 +2561,17 @@
2000
2561
  groupedXData = groupedData.groupedXData,
2001
2562
  groupedYData = groupedData.groupedYData,
2002
2563
  gapSize = 0;
2003
- // The smoothed option is deprecated, instead,
2004
- // there is a fallback to the new anchoring mechanism. #12455.
2005
- if (dataGroupingOptions && dataGroupingOptions.smoothed && groupedXData.length) {
2564
+ // The smoothed option is deprecated, instead, there is a fallback
2565
+ // to the new anchoring mechanism. #12455.
2566
+ if (dataGroupingOptions &&
2567
+ dataGroupingOptions.smoothed &&
2568
+ groupedXData.length) {
2006
2569
  dataGroupingOptions.firstAnchor = 'firstPoint';
2007
2570
  dataGroupingOptions.anchor = 'middle';
2008
2571
  dataGroupingOptions.lastAnchor = 'lastPoint';
2009
- error(32, false, chart, { 'dataGrouping.smoothed': 'use dataGrouping.anchor' });
2572
+ error(32, false, chart, {
2573
+ 'dataGrouping.smoothed': 'use dataGrouping.anchor'
2574
+ });
2010
2575
  }
2011
2576
  anchorPoints(series, groupedXData, xMax);
2012
2577
  // Record what data grouping values were used
@@ -2053,13 +2618,13 @@
2053
2618
  (currentDataGrouping && currentDataGrouping.totalRange);
2054
2619
  }
2055
2620
  };
2056
- var skipDataGrouping = function (series) {
2057
- if (series.isCartesian &&
2621
+ var skipDataGrouping = function (series,
2622
+ force) {
2623
+ return !(series.isCartesian &&
2058
2624
  !series.isDirty &&
2059
2625
  !series.xAxis.isDirty &&
2060
- !series.yAxis.isDirty) {
2061
- return false;
2062
- }
2626
+ !series.yAxis.isDirty &&
2627
+ !force);
2063
2628
  };
2064
2629
  var groupData = function (xData,
2065
2630
  yData,
@@ -2083,7 +2648,8 @@
2083
2648
  pointArrayMap = series.pointArrayMap,
2084
2649
  pointArrayMapLength = pointArrayMap && pointArrayMap.length,
2085
2650
  extendedPointArrayMap = ['x'].concat(pointArrayMap || ['y']),
2086
- groupAll = this.options.dataGrouping && this.options.dataGrouping.groupAll,
2651
+ groupAll = (this.options.dataGrouping &&
2652
+ this.options.dataGrouping.groupAll),
2087
2653
  pos = 0,
2088
2654
  start = 0,
2089
2655
  valuesLen,
@@ -2213,7 +2779,7 @@
2213
2779
  xMax) {
2214
2780
  var options = series.options,
2215
2781
  dataGroupingOptions = options.dataGrouping,
2216
- totalRange = series.currentDataGrouping && series.currentDataGrouping.gapSize;
2782
+ totalRange = (series.currentDataGrouping && series.currentDataGrouping.gapSize);
2217
2783
  var i;
2218
2784
  // DataGrouping x-coordinates.
2219
2785
  if (dataGroupingOptions && series.xData && totalRange && series.groupMap) {
@@ -2225,9 +2791,9 @@
2225
2791
  anchor);
2226
2792
  // Anchor points that are not extremes.
2227
2793
  if (anchor && anchor !== 'start') {
2228
- var shiftInterval = totalRange *
2794
+ var shiftInterval = (totalRange *
2229
2795
  { middle: 0.5,
2230
- end: 1 }[anchor];
2796
+ end: 1 }[anchor]);
2231
2797
  i = groupedXData.length - 1;
2232
2798
  while (i-- && i > 0) {
2233
2799
  groupedXData[i] += shiftInterval;
@@ -2373,7 +2939,10 @@
2373
2939
  ohlc: {
2374
2940
  groupPixelWidth: 5
2375
2941
  },
2376
- // Move to HeikinAshiSeries.ts aftre refactoring data grouping.
2942
+ hlc: {
2943
+ groupPixelWidth: 5
2944
+ // Move to HeikinAshiSeries.ts aftre refactoring data grouping.
2945
+ },
2377
2946
  heikinashi: {
2378
2947
  groupPixelWidth: 10
2379
2948
  }
@@ -2416,6 +2985,9 @@
2416
2985
  if (this.is('ohlc')) {
2417
2986
  return 'ohlc';
2418
2987
  }
2988
+ if (this.is('hlc')) {
2989
+ return 'hlc';
2990
+ }
2419
2991
  if (this.is('column')) {
2420
2992
  return 'sum';
2421
2993
  }
@@ -2481,17 +3053,20 @@
2481
3053
  *
2482
3054
  * @function Highcharts.Axis#applyGrouping
2483
3055
  */
2484
- Axis.prototype.applyGrouping = function () {
3056
+ Axis.prototype.applyGrouping = function (e) {
2485
3057
  var axis = this,
2486
3058
  series = axis.series;
2487
3059
  series.forEach(function (series) {
2488
3060
  // Reset the groupPixelWidth, then calculate if needed.
2489
3061
  series.groupPixelWidth = void 0; // #2110
2490
- series.groupPixelWidth = axis.getGroupPixelWidth && axis.getGroupPixelWidth();
3062
+ series.groupPixelWidth = (axis.getGroupPixelWidth &&
3063
+ axis.getGroupPixelWidth());
2491
3064
  if (series.groupPixelWidth) {
2492
3065
  series.hasProcessed = true; // #2692
2493
- series.applyGrouping();
2494
3066
  }
3067
+ // Fire independing on series.groupPixelWidth to always set a proper
3068
+ // dataGrouping state, (#16238)
3069
+ series.applyGrouping(!!e.hasExtemesChanged);
2495
3070
  });
2496
3071
  };
2497
3072
  // Get the data grouping pixel width based on the greatest defined individual
@@ -2524,8 +3099,8 @@
2524
3099
  // Execute grouping if the amount of points is greater than the
2525
3100
  // limit defined in groupPixelWidth
2526
3101
  if (series[i].groupPixelWidth ||
2527
- dataLength >
2528
- (this.chart.plotSizeX / groupPixelWidth) ||
3102
+ (dataLength >
3103
+ (this.chart.plotSizeX / groupPixelWidth)) ||
2529
3104
  (dataLength && dgOptions.forced)) {
2530
3105
  doGrouping = true;
2531
3106
  }
@@ -2666,10 +3241,10 @@
2666
3241
  type = this.type,
2667
3242
  plotOptions = this.chart.options.plotOptions,
2668
3243
  defaultOptions = D.defaultOptions.plotOptions[type].dataGrouping,
2669
- // External series, for example technical indicators should also
2670
- // inherit commonOptions which are not available outside this module
2671
- baseOptions = this.useCommonDataGrouping && commonOptions;
2672
- if (specificOptions[type] || baseOptions) { // #1284
3244
+ // External series, for example technical indicators should also inherit
3245
+ // commonOptions which are not available outside this module
3246
+ baseOptions = (this.useCommonDataGrouping && commonOptions);
3247
+ if (plotOptions && (specificOptions[type] || baseOptions)) { // #1284
2673
3248
  if (!defaultOptions) {
2674
3249
  defaultOptions = merge(commonOptions, specificOptions[type]);
2675
3250
  }
@@ -2763,7 +3338,7 @@
2763
3338
  * from the raw data.
2764
3339
  *
2765
3340
  * Defaults to `average` for line-type series, `sum` for columns, `range`
2766
- * for range series and `ohlc` for OHLC and candlestick.
3341
+ * for range series, `hlc` for HLC, and `ohlc` for OHLC and candlestick.
2767
3342
  *
2768
3343
  * @sample {highstock} stock/plotoptions/series-datagrouping-approximation
2769
3344
  * Approximation callback with custom data
@@ -2802,7 +3377,7 @@
2802
3377
  * to two weeks, the second and third item of the week array are used,
2803
3378
  * and applied to the start and end date of the time span.
2804
3379
  *
2805
- * @type {object}
3380
+ * @type {Object}
2806
3381
  * @apioption plotOptions.series.dataGrouping.dateTimeLabelFormats
2807
3382
  */
2808
3383
  /**
@@ -2879,113 +3454,567 @@
2879
3454
  * @sample {highstock} stock/plotoptions/series-datagrouping-groupall/
2880
3455
  * Two series with the same data but different groupAll setting
2881
3456
  *
2882
- * @type {boolean}
2883
- * @default false
2884
- * @since 6.1.0
2885
- * @apioption plotOptions.series.dataGrouping.groupAll
2886
- */
2887
- /**
2888
- * Specifies how the last grouped point is positioned on the xAxis.
2889
- * If firstAnchor and/or lastAnchor are defined, then those options take
2890
- * precedence over anchor for the first and/or last grouped points.
2891
- * Available options:
3457
+ * @type {boolean}
3458
+ * @default false
3459
+ * @since 6.1.0
3460
+ * @apioption plotOptions.series.dataGrouping.groupAll
3461
+ */
3462
+ /**
3463
+ * Specifies how the last grouped point is positioned on the xAxis.
3464
+ * If firstAnchor and/or lastAnchor are defined, then those options take
3465
+ * precedence over anchor for the first and/or last grouped points.
3466
+ * Available options:
3467
+ *
3468
+ * -`start` places the point at the beginning of the group
3469
+ * (e.g. range 00:00:00 - 23:59:59 -> 00:00:00)
3470
+ *
3471
+ * -`middle` places the point in the middle of the group
3472
+ * (e.g. range 00:00:00 - 23:59:59 -> 12:00:00)
3473
+ *
3474
+ * -`end` places the point at the end of the group
3475
+ * (e.g. range 00:00:00 - 23:59:59 -> 23:59:59)
3476
+ *
3477
+ * -`firstPoint` the first point in the group
3478
+ * (e.g. points at 00:13, 00:35, 00:59 -> 00:13)
3479
+ *
3480
+ * -`lastPoint` the last point in the group
3481
+ * (e.g. points at 00:13, 00:35, 00:59 -> 00:59)
3482
+ *
3483
+ * @sample {highstock} stock/plotoptions/series-datagrouping-first-anchor
3484
+ * Applying first and last anchor.
3485
+ *
3486
+ * @sample {highstock} stock/plotoptions/series-datagrouping-last-anchor
3487
+ * Applying the last anchor in the chart with live data.
3488
+ *
3489
+ * @see [dataGrouping.anchor](#plotOptions.series.dataGrouping.anchor)
3490
+ *
3491
+ * @type {Highcharts.DataGroupingAnchorExtremes}
3492
+ * @since 9.1.0
3493
+ * @default start
3494
+ * @apioption plotOptions.series.dataGrouping.lastAnchor
3495
+ */
3496
+ /**
3497
+ * Normally, a group is indexed by the start of that group, so for example
3498
+ * when 30 daily values are grouped into one month, that month's x value
3499
+ * will be the 1st of the month. This apparently shifts the data to
3500
+ * the left. When the smoothed option is true, this is compensated for.
3501
+ * The data is shifted to the middle of the group, and min and max
3502
+ * values are preserved. Internally, this is used in the Navigator series.
3503
+ *
3504
+ * @type {boolean}
3505
+ * @default false
3506
+ * @deprecated
3507
+ * @apioption plotOptions.series.dataGrouping.smoothed
3508
+ */
3509
+ /**
3510
+ * An array determining what time intervals the data is allowed to be
3511
+ * grouped to. Each array item is an array where the first value is
3512
+ * the time unit and the second value another array of allowed multiples.
3513
+ *
3514
+ * Defaults to:
3515
+ * ```js
3516
+ * units: [[
3517
+ * 'millisecond', // unit name
3518
+ * [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
3519
+ * ], [
3520
+ * 'second',
3521
+ * [1, 2, 5, 10, 15, 30]
3522
+ * ], [
3523
+ * 'minute',
3524
+ * [1, 2, 5, 10, 15, 30]
3525
+ * ], [
3526
+ * 'hour',
3527
+ * [1, 2, 3, 4, 6, 8, 12]
3528
+ * ], [
3529
+ * 'day',
3530
+ * [1]
3531
+ * ], [
3532
+ * 'week',
3533
+ * [1]
3534
+ * ], [
3535
+ * 'month',
3536
+ * [1, 3, 6]
3537
+ * ], [
3538
+ * 'year',
3539
+ * null
3540
+ * ]]
3541
+ * ```
3542
+ *
3543
+ * @type {Array<Array<string,(Array<number>|null)>>}
3544
+ * @apioption plotOptions.series.dataGrouping.units
3545
+ */
3546
+ /**
3547
+ * The approximate pixel width of each group. If for example a series
3548
+ * with 30 points is displayed over a 600 pixel wide plot area, no grouping
3549
+ * is performed. If however the series contains so many points that
3550
+ * the spacing is less than the groupPixelWidth, Highcharts will try
3551
+ * to group it into appropriate groups so that each is more or less
3552
+ * two pixels wide. Defaults to `10`.
3553
+ *
3554
+ * @sample {highstock} stock/plotoptions/series-datagrouping-grouppixelwidth/
3555
+ * Two series with the same data density but different groupPixelWidth
3556
+ *
3557
+ * @type {number}
3558
+ * @default 10
3559
+ * @apioption plotOptions.column.dataGrouping.groupPixelWidth
3560
+ */
3561
+ ''; // required by JSDoc parsing
3562
+
3563
+ return dataGrouping;
3564
+ });
3565
+ _registerModule(_modules, 'Series/HLC/HLCPoint.js', [_modules['Core/Series/SeriesRegistry.js']], function (SeriesRegistry) {
3566
+ /* *
3567
+ *
3568
+ * (c) 2010-2021 Pawel Lysy
3569
+ *
3570
+ * License: www.highcharts.com/license
3571
+ *
3572
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
3573
+ *
3574
+ * */
3575
+ var __extends = (this && this.__extends) || (function () {
3576
+ var extendStatics = function (d,
3577
+ b) {
3578
+ extendStatics = Object.setPrototypeOf ||
3579
+ ({ __proto__: [] } instanceof Array && function (d,
3580
+ b) { d.__proto__ = b; }) ||
3581
+ function (d,
3582
+ b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3583
+ return extendStatics(d, b);
3584
+ };
3585
+ return function (d, b) {
3586
+ extendStatics(d, b);
3587
+ function __() { this.constructor = d; }
3588
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3589
+ };
3590
+ })();
3591
+ var ColumnSeries = SeriesRegistry.seriesTypes.column;
3592
+ /* *
3593
+ *
3594
+ * Class
3595
+ *
3596
+ * */
3597
+ var HLCPoint = /** @class */ (function (_super) {
3598
+ __extends(HLCPoint, _super);
3599
+ function HLCPoint() {
3600
+ /* *
3601
+ *
3602
+ * Properties
3603
+ *
3604
+ * */
3605
+ var _this = _super !== null && _super.apply(this,
3606
+ arguments) || this;
3607
+ _this.close = void 0;
3608
+ _this.high = void 0;
3609
+ _this.low = void 0;
3610
+ _this.options = void 0;
3611
+ _this.plotClose = void 0;
3612
+ _this.series = void 0;
3613
+ return _this;
3614
+ }
3615
+ return HLCPoint;
3616
+ }(ColumnSeries.prototype.pointClass));
3617
+ /* *
3618
+ *
3619
+ * Default Export
2892
3620
  *
2893
- * -`start` places the point at the beginning of the group
2894
- * (e.g. range 00:00:00 - 23:59:59 -> 00:00:00)
3621
+ * */
3622
+
3623
+ return HLCPoint;
3624
+ });
3625
+ _registerModule(_modules, 'Series/HLC/HLCSeries.js', [_modules['Series/HLC/HLCPoint.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (HLCPoint, SeriesRegistry, U) {
3626
+ /* *
2895
3627
  *
2896
- * -`middle` places the point in the middle of the group
2897
- * (e.g. range 00:00:00 - 23:59:59 -> 12:00:00)
3628
+ * (c) 2010-2021 Pawel Lysy
2898
3629
  *
2899
- * -`end` places the point at the end of the group
2900
- * (e.g. range 00:00:00 - 23:59:59 -> 23:59:59)
3630
+ * License: www.highcharts.com/license
2901
3631
  *
2902
- * -`firstPoint` the first point in the group
2903
- * (e.g. points at 00:13, 00:35, 00:59 -> 00:13)
3632
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
2904
3633
  *
2905
- * -`lastPoint` the last point in the group
2906
- * (e.g. points at 00:13, 00:35, 00:59 -> 00:59)
3634
+ * */
3635
+ var __extends = (this && this.__extends) || (function () {
3636
+ var extendStatics = function (d,
3637
+ b) {
3638
+ extendStatics = Object.setPrototypeOf ||
3639
+ ({ __proto__: [] } instanceof Array && function (d,
3640
+ b) { d.__proto__ = b; }) ||
3641
+ function (d,
3642
+ b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3643
+ return extendStatics(d, b);
3644
+ };
3645
+ return function (d, b) {
3646
+ extendStatics(d, b);
3647
+ function __() { this.constructor = d; }
3648
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3649
+ };
3650
+ })();
3651
+ var ColumnSeries = SeriesRegistry.seriesTypes.column;
3652
+ var extend = U.extend,
3653
+ merge = U.merge;
3654
+ /* *
2907
3655
  *
2908
- * @sample {highstock} stock/plotoptions/series-datagrouping-first-anchor
2909
- * Applying first and last anchor.
3656
+ * Class
2910
3657
  *
2911
- * @sample {highstock} stock/plotoptions/series-datagrouping-last-anchor
2912
- * Applying the last anchor in the chart with live data.
3658
+ * */
3659
+ /**
3660
+ * The hlc series type.
2913
3661
  *
2914
- * @see [dataGrouping.anchor](#plotOptions.series.dataGrouping.anchor)
3662
+ * @private
3663
+ * @class
3664
+ * @name Highcharts.seriesTypes.hlc
2915
3665
  *
2916
- * @type {Highcharts.DataGroupingAnchorExtremes}
2917
- * @since 9.1.0
2918
- * @default start
2919
- * @apioption plotOptions.series.dataGrouping.lastAnchor
3666
+ * @augments Highcharts.Series
2920
3667
  */
2921
- /**
2922
- * Normally, a group is indexed by the start of that group, so for example
2923
- * when 30 daily values are grouped into one month, that month's x value
2924
- * will be the 1st of the month. This apparently shifts the data to
2925
- * the left. When the smoothed option is true, this is compensated for.
2926
- * The data is shifted to the middle of the group, and min and max
2927
- * values are preserved. Internally, this is used in the Navigator series.
3668
+ var HLCSeries = /** @class */ (function (_super) {
3669
+ __extends(HLCSeries, _super);
3670
+ function HLCSeries() {
3671
+ /* *
3672
+ *
3673
+ * Static Properties
3674
+ *
3675
+ * */
3676
+ var _this = _super !== null && _super.apply(this,
3677
+ arguments) || this;
3678
+ /* *
3679
+ *
3680
+ * Properties
3681
+ *
3682
+ * */
3683
+ _this.data = void 0;
3684
+ _this.options = void 0;
3685
+ _this.points = void 0;
3686
+ _this.yData = void 0;
3687
+ return _this;
3688
+ /* eslint-enable valid-jsdoc */
3689
+ }
3690
+ /* *
3691
+ *
3692
+ * Functions
3693
+ *
3694
+ * */
3695
+ /* eslint-disable valid-jsdoc */
3696
+ /**
3697
+ * Extend the path if close is not between high and low.
3698
+ *
3699
+ * @param {SVGPath} path the path array of the point
3700
+ * @param {number} halfStrokeWidth
3701
+ * @param {number} value value of the point to which the stem should be extended
3702
+ */
3703
+ HLCSeries.prototype.extendStem = function (path, halfStrokeWidth, value) {
3704
+ var start = path[0];
3705
+ var end = path[1];
3706
+ // We don't need to worry about crisp - close value
3707
+ // is already crisped and halfStrokeWidth should remove it.
3708
+ if (typeof start[2] === 'number') {
3709
+ start[2] = Math.max(value + halfStrokeWidth, start[2]);
3710
+ }
3711
+ if (typeof end[2] === 'number') {
3712
+ end[2] = Math.min(value - halfStrokeWidth, end[2]);
3713
+ }
3714
+ };
3715
+ /**
3716
+ * Function to create SVGPath of the point based on the
3717
+ * plot positions of this point.
3718
+ * @private
3719
+ */
3720
+ HLCSeries.prototype.getPointPath = function (point, graphic) {
3721
+ // crisp vector coordinates
3722
+ var strokeWidth = graphic.strokeWidth(),
3723
+ series = point.series,
3724
+ crispCorr = (strokeWidth % 2) / 2,
3725
+ // #2596:
3726
+ crispX = Math.round(point.plotX) - crispCorr,
3727
+ halfWidth = Math.round(point.shapeArgs.width / 2);
3728
+ var path,
3729
+ plotClose = point.plotClose;
3730
+ // the vertical stem
3731
+ path = [
3732
+ ['M', crispX, Math.round(point.yBottom)],
3733
+ ['L', crispX, Math.round(point.plotHigh)]
3734
+ ];
3735
+ // close
3736
+ if (point.close !== null) {
3737
+ plotClose = Math.round(point.plotClose) + crispCorr;
3738
+ path.push(['M', crispX, plotClose], ['L', crispX + halfWidth, plotClose]);
3739
+ series.extendStem(path, strokeWidth / 2, plotClose);
3740
+ }
3741
+ return path;
3742
+ };
3743
+ /**
3744
+ * Draw single point
3745
+ * @private
3746
+ */
3747
+ HLCSeries.prototype.drawSinglePoint = function (point) {
3748
+ var series = point.series,
3749
+ chart = series.chart;
3750
+ var path,
3751
+ graphic = point.graphic,
3752
+ isNew = !graphic;
3753
+ if (typeof point.plotY !== 'undefined') {
3754
+ // Create and/or update the graphic
3755
+ if (!graphic) {
3756
+ point.graphic = graphic = chart.renderer.path()
3757
+ .add(series.group);
3758
+ }
3759
+ if (!chart.styledMode) {
3760
+ graphic.attr(series.pointAttribs(point, (point.selected && 'select'))); // #3897
3761
+ }
3762
+ // crisp vector coordinates
3763
+ path = series.getPointPath(point, graphic);
3764
+ graphic[isNew ? 'attr' : 'animate']({ d: path })
3765
+ .addClass(point.getClassName(), true);
3766
+ }
3767
+ };
3768
+ /**
3769
+ * Draw the data points
3770
+ * @private
3771
+ */
3772
+ HLCSeries.prototype.drawPoints = function () {
3773
+ this.points.forEach(this.drawSinglePoint);
3774
+ };
3775
+ /**
3776
+ * @private
3777
+ * @function Highcharts.seriesTypes.hlc#init
3778
+ */
3779
+ HLCSeries.prototype.init = function () {
3780
+ _super.prototype.init.apply(this, arguments);
3781
+ this.options.stacking = void 0; // #8817
3782
+ };
3783
+ /**
3784
+ * Postprocess mapping between options and SVG attributes
3785
+ * @private
3786
+ */
3787
+ HLCSeries.prototype.pointAttribs = function (point, state) {
3788
+ var attribs = _super.prototype.pointAttribs.call(this,
3789
+ point,
3790
+ state);
3791
+ delete attribs.fill;
3792
+ return attribs;
3793
+ };
3794
+ HLCSeries.prototype.toYData = function (point) {
3795
+ // return a plain array for speedy calculation
3796
+ return [point.high, point.low, point.close];
3797
+ };
3798
+ /**
3799
+ * Translate data points from raw values x and y to plotX and plotY
3800
+ *
3801
+ * @private
3802
+ * @function Highcharts.seriesTypes.hlc#translate
3803
+ */
3804
+ HLCSeries.prototype.translate = function () {
3805
+ var series = this,
3806
+ yAxis = series.yAxis,
3807
+ names = (this.pointArrayMap && this.pointArrayMap.slice()) || [],
3808
+ translated = names.map(function (name) {
3809
+ return "plot" + (name.charAt(0).toUpperCase() + name.slice(1));
3810
+ });
3811
+ translated.push('yBottom');
3812
+ names.push('low');
3813
+ _super.prototype.translate.apply(series);
3814
+ // Do the translation
3815
+ series.points.forEach(function (point) {
3816
+ names.forEach(function (name, i) {
3817
+ var value = point[name];
3818
+ if (value !== null) {
3819
+ if (series.dataModify) {
3820
+ value = series.dataModify.modifyValue(value);
3821
+ }
3822
+ point[translated[i]] =
3823
+ yAxis.toPixels(value, true);
3824
+ }
3825
+ });
3826
+ // Align the tooltip to the high value to avoid covering the
3827
+ // point
3828
+ point.tooltipPos[1] =
3829
+ point.plotHigh + yAxis.pos - series.chart.plotTop;
3830
+ });
3831
+ };
3832
+ /**
3833
+ * An HLC chart is a style of financial chart used to describe price
3834
+ * movements over time. It displays high, low and close values per
3835
+ * data point.
3836
+ *
3837
+ * @sample stock/demo/hlc/
3838
+ * HLC chart
3839
+ *
3840
+ * @extends plotOptions.column
3841
+ * @excluding borderColor, borderRadius, borderWidth, crisp, stacking,
3842
+ * stack
3843
+ * @product highstock
3844
+ * @optionparent plotOptions.hlc
3845
+ */
3846
+ HLCSeries.defaultOptions = merge(ColumnSeries.defaultOptions, {
3847
+ /**
3848
+ * The approximate pixel width of each group. If for example a series
3849
+ * with 30 points is displayed over a 600 pixel wide plot area, no
3850
+ * grouping is performed. If however the series contains so many points
3851
+ * that the spacing is less than the groupPixelWidth, Highcharts will
3852
+ * try to group it into appropriate groups so that each is more or less
3853
+ * two pixels wide. Defaults to `5`.
3854
+ *
3855
+ * @type {number}
3856
+ * @default 5
3857
+ * @product highstock
3858
+ * @apioption plotOptions.hlc.dataGrouping.groupPixelWidth
3859
+ */
3860
+ /**
3861
+ * @type {Highcharts.DataGroupingApproximationValue|Function}
3862
+ * @default hlc
3863
+ * @product highstock
3864
+ * @apioption plotOptions.hlc.dataGrouping.approximation
3865
+ */
3866
+ /**
3867
+ * @default close
3868
+ * @apioption plotOptions.hlc.colorKey
3869
+ */
3870
+ /**
3871
+ * The pixel width of the line/border. Defaults to `1`.
3872
+ *
3873
+ * @sample {highstock} stock/plotoptions/hlc-linewidth/
3874
+ * A greater line width
3875
+ *
3876
+ * @type {number}
3877
+ * @default 1
3878
+ * @product highstock
3879
+ *
3880
+ * @public
3881
+ */
3882
+ lineWidth: 1,
3883
+ tooltip: {
3884
+ pointFormat: '<span style="color:{point.color}">\u25CF</span> ' +
3885
+ '<b> {series.name}</b><br/>' +
3886
+ 'High: {point.high}<br/>' +
3887
+ 'Low: {point.low}<br/>' +
3888
+ 'Close: {point.close}<br/>'
3889
+ },
3890
+ threshold: null,
3891
+ states: {
3892
+ /**
3893
+ * @extends plotOptions.column.states.hover
3894
+ * @product highstock
3895
+ */
3896
+ hover: {
3897
+ /**
3898
+ * The pixel width of the line representing the HLC point.
3899
+ *
3900
+ * @type {number}
3901
+ * @default 3
3902
+ * @product highstock
3903
+ */
3904
+ lineWidth: 3
3905
+ }
3906
+ },
3907
+ /**
3908
+ * Determines which one of `high`, `low`, `close` values should
3909
+ * be represented as `point.y`, which is later used to set dataLabel
3910
+ * position and [compare](#plotOptions.series.compare).
3911
+ *
3912
+ * @sample {highstock} stock/plotoptions/hlc-pointvalkey/
3913
+ * Possible values
3914
+ *
3915
+ * @type {string}
3916
+ * @default close
3917
+ * @validvalue ["high", "low", "close"]
3918
+ * @product highstock
3919
+ * @apioption plotOptions.hlc.pointValKey
3920
+ */
3921
+ /**
3922
+ * @default close
3923
+ * @apioption plotOptions.hlc.colorKey
3924
+ */
3925
+ stickyTracking: true
3926
+ });
3927
+ return HLCSeries;
3928
+ }(ColumnSeries));
3929
+ extend(HLCSeries.prototype, {
3930
+ animate: null,
3931
+ directTouch: false,
3932
+ pointArrayMap: ['high', 'low', 'close'],
3933
+ pointAttrToOptions: {
3934
+ stroke: 'color',
3935
+ 'stroke-width': 'lineWidth'
3936
+ },
3937
+ pointValKey: 'close'
3938
+ });
3939
+ HLCSeries.prototype.pointClass = HLCPoint;
3940
+ SeriesRegistry.registerSeriesType('hlc', HLCSeries);
3941
+ /* *
3942
+ *
3943
+ * Default Export
3944
+ *
3945
+ * */
3946
+ /* *
3947
+ *
3948
+ * API Options
2928
3949
  *
2929
- * @type {boolean}
2930
- * @default false
2931
- * @deprecated
2932
- * @apioption plotOptions.series.dataGrouping.smoothed
3950
+ * */
3951
+ /**
3952
+ * A `hlc` series. If the [type](#series.hlc.type) option is not
3953
+ * specified, it is inherited from [chart.type](#chart.type).
3954
+ *
3955
+ * @extends series,plotOptions.hlc
3956
+ * @excluding dataParser, dataURL
3957
+ * @product highstock
3958
+ * @apioption series.hlc
2933
3959
  */
2934
3960
  /**
2935
- * An array determining what time intervals the data is allowed to be
2936
- * grouped to. Each array item is an array where the first value is
2937
- * the time unit and the second value another array of allowed multiples.
3961
+ * An array of data points for the series. For the `hlc` series type,
3962
+ * points can be given in the following ways:
2938
3963
  *
2939
- * Defaults to:
2940
- * ```js
2941
- * units: [[
2942
- * 'millisecond', // unit name
2943
- * [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
2944
- * ], [
2945
- * 'second',
2946
- * [1, 2, 5, 10, 15, 30]
2947
- * ], [
2948
- * 'minute',
2949
- * [1, 2, 5, 10, 15, 30]
2950
- * ], [
2951
- * 'hour',
2952
- * [1, 2, 3, 4, 6, 8, 12]
2953
- * ], [
2954
- * 'day',
2955
- * [1]
2956
- * ], [
2957
- * 'week',
2958
- * [1]
2959
- * ], [
2960
- * 'month',
2961
- * [1, 3, 6]
2962
- * ], [
2963
- * 'year',
2964
- * null
2965
- * ]]
2966
- * ```
3964
+ * 1. An array of arrays with 4 or 3 values. In this case, the values correspond
3965
+ * to `x,high,low,close`. If the first value is a string, it is applied
3966
+ * as the name of the point, and the `x` value is inferred. The `x` value can
3967
+ * also be omitted, in which case the inner arrays should be of length of 3\.
3968
+ * Then the `x` value is automatically calculated, either starting at 0 and
3969
+ * incremented by 1, or from `pointStart` and `pointInterval` given in the
3970
+ * series options.
3971
+ * ```js
3972
+ * data: [
3973
+ * [0, 5, 6, 7],
3974
+ * [1, 4, 8, 2],
3975
+ * [2, 3, 4, 10]
3976
+ * ]
3977
+ * ```
2967
3978
  *
2968
- * @type {Array<Array<string,(Array<number>|null)>>}
2969
- * @apioption plotOptions.series.dataGrouping.units
3979
+ * 2. An array of objects with named values. The following snippet shows only a
3980
+ * few settings, see the complete options set below. If the total number of
3981
+ * data points exceeds the series'
3982
+ * [turboThreshold](#series.hlc.turboThreshold), this option is not
3983
+ * available.
3984
+ * ```js
3985
+ * data: [{
3986
+ * x: 1,
3987
+ * high: 4,
3988
+ * low: 5,
3989
+ * close: 2,
3990
+ * name: "Point2",
3991
+ * color: "#00FF00"
3992
+ * }, {
3993
+ * x: 1,
3994
+ * high: 3,
3995
+ * low: 6,
3996
+ * close: 7,
3997
+ * name: "Point1",
3998
+ * color: "#FF00FF"
3999
+ * }]
4000
+ * ```
4001
+ *
4002
+ * @type {Array<Array<(number|string),number,number>|Array<(number|string),number,number,number>|*>}
4003
+ * @extends series.arearange.data
4004
+ * @excluding y, marker
4005
+ * @product highstock
4006
+ * @apioption series.hlc.data
2970
4007
  */
2971
4008
  /**
2972
- * The approximate pixel width of each group. If for example a series
2973
- * with 30 points is displayed over a 600 pixel wide plot area, no grouping
2974
- * is performed. If however the series contains so many points that
2975
- * the spacing is less than the groupPixelWidth, Highcharts will try
2976
- * to group it into appropriate groups so that each is more or less
2977
- * two pixels wide. Defaults to `10`.
2978
- *
2979
- * @sample {highstock} stock/plotoptions/series-datagrouping-grouppixelwidth/
2980
- * Two series with the same data density but different groupPixelWidth
4009
+ * The closing value of each data point.
2981
4010
  *
2982
4011
  * @type {number}
2983
- * @default 10
2984
- * @apioption plotOptions.column.dataGrouping.groupPixelWidth
4012
+ * @product highstock
4013
+ * @apioption series.hlc.data.close
2985
4014
  */
2986
- ''; // required by JSDoc parsing
4015
+ ''; // adds doclets above to transpilat
2987
4016
 
2988
- return dataGrouping;
4017
+ return HLCSeries;
2989
4018
  });
2990
4019
  _registerModule(_modules, 'Series/OHLC/OHLCPoint.js', [_modules['Core/Series/SeriesRegistry.js']], function (SeriesRegistry) {
2991
4020
  /* *
@@ -3013,7 +4042,7 @@
3013
4042
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3014
4043
  };
3015
4044
  })();
3016
- var ColumnSeries = SeriesRegistry.seriesTypes.column;
4045
+ var HLCSeries = SeriesRegistry.seriesTypes.hlc;
3017
4046
  /* *
3018
4047
  *
3019
4048
  * Class
@@ -3029,12 +4058,8 @@
3029
4058
  * */
3030
4059
  var _this = _super !== null && _super.apply(this,
3031
4060
  arguments) || this;
3032
- _this.close = void 0;
3033
- _this.high = void 0;
3034
- _this.low = void 0;
3035
4061
  _this.open = void 0;
3036
4062
  _this.options = void 0;
3037
- _this.plotClose = void 0;
3038
4063
  _this.plotOpen = void 0;
3039
4064
  _this.series = void 0;
3040
4065
  return _this;
@@ -3050,7 +4075,6 @@
3050
4075
  * Extend the parent method by adding up or down to the class name.
3051
4076
  * @private
3052
4077
  * @function Highcharts.seriesTypes.ohlc#getClassName
3053
- * @return {string}
3054
4078
  */
3055
4079
  OHLCPoint.prototype.getClassName = function () {
3056
4080
  return _super.prototype.getClassName.call(this) +
@@ -3104,7 +4128,7 @@
3104
4128
  return this;
3105
4129
  };
3106
4130
  return OHLCPoint;
3107
- }(ColumnSeries.prototype.pointClass));
4131
+ }(HLCSeries.prototype.pointClass));
3108
4132
  /* *
3109
4133
  *
3110
4134
  * Default Export
@@ -3139,14 +4163,11 @@
3139
4163
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3140
4164
  };
3141
4165
  })();
3142
- var ColumnSeries = SeriesRegistry.seriesTypes.column;
3143
- var extend = U.extend,
4166
+ var Series = SeriesRegistry.series,
4167
+ HLCSeries = SeriesRegistry.seriesTypes.hlc;
4168
+ var addEvent = U.addEvent,
4169
+ extend = U.extend,
3144
4170
  merge = U.merge;
3145
- /* *
3146
- *
3147
- * Class
3148
- *
3149
- * */
3150
4171
  /**
3151
4172
  * The ohlc series type.
3152
4173
  *
@@ -3174,97 +4195,31 @@
3174
4195
  _this.data = void 0;
3175
4196
  _this.options = void 0;
3176
4197
  _this.points = void 0;
3177
- _this.yData = void 0;
3178
4198
  return _this;
3179
- /* eslint-enable valid-jsdoc */
3180
4199
  }
3181
4200
  /* *
3182
4201
  *
3183
4202
  * Functions
3184
4203
  *
3185
4204
  * */
3186
- /* eslint-disable valid-jsdoc */
3187
- /**
3188
- * Draw the data points
3189
- * @private
3190
- */
3191
- OHLCSeries.prototype.drawPoints = function () {
3192
- var series = this,
3193
- points = series.points,
3194
- chart = series.chart,
3195
- /**
3196
- * Extend vertical stem to open and close values.
3197
- */
3198
- extendStem = function (path,
3199
- halfStrokeWidth,
3200
- openOrClose) {
3201
- var start = path[0];
3202
- var end = path[1];
3203
- // We don't need to worry about crisp - openOrClose value
3204
- // is already crisped and halfStrokeWidth should remove it.
3205
- if (typeof start[2] === 'number') {
3206
- start[2] = Math.max(openOrClose + halfStrokeWidth, start[2]);
3207
- }
3208
- if (typeof end[2] === 'number') {
3209
- end[2] = Math.min(openOrClose - halfStrokeWidth, end[2]);
3210
- }
3211
- };
3212
- points.forEach(function (point) {
3213
- var plotOpen,
3214
- plotClose,
3215
- crispCorr,
3216
- halfWidth,
3217
- path,
3218
- graphic = point.graphic,
3219
- crispX,
3220
- isNew = !graphic,
3221
- strokeWidth;
3222
- if (typeof point.plotY !== 'undefined') {
3223
- // Create and/or update the graphic
3224
- if (!graphic) {
3225
- point.graphic = graphic = chart.renderer.path()
3226
- .add(series.group);
3227
- }
3228
- if (!chart.styledMode) {
3229
- graphic.attr(series.pointAttribs(point, (point.selected && 'select'))); // #3897
3230
- }
3231
- // crisp vector coordinates
3232
- strokeWidth = graphic.strokeWidth();
3233
- crispCorr = (strokeWidth % 2) / 2;
3234
- // #2596:
3235
- crispX = Math.round(point.plotX) - crispCorr;
3236
- halfWidth = Math.round(point.shapeArgs.width / 2);
3237
- // the vertical stem
3238
- path = [
3239
- ['M', crispX, Math.round(point.yBottom)],
3240
- ['L', crispX, Math.round(point.plotHigh)]
3241
- ];
3242
- // open
3243
- if (point.open !== null) {
3244
- plotOpen = Math.round(point.plotOpen) + crispCorr;
3245
- path.push(['M', crispX, plotOpen], ['L', crispX - halfWidth, plotOpen]);
3246
- extendStem(path, strokeWidth / 2, plotOpen);
3247
- }
3248
- // close
3249
- if (point.close !== null) {
3250
- plotClose = Math.round(point.plotClose) + crispCorr;
3251
- path.push(['M', crispX, plotClose], ['L', crispX + halfWidth, plotClose]);
3252
- extendStem(path, strokeWidth / 2, plotClose);
3253
- }
3254
- graphic[isNew ? 'attr' : 'animate']({ d: path })
3255
- .addClass(point.getClassName(), true);
3256
- }
3257
- });
3258
- };
3259
- /**
3260
- * @private
3261
- * @function Highcarts.seriesTypes.ohlc#init
3262
- * @return {void}
3263
- */
3264
- OHLCSeries.prototype.init = function () {
3265
- _super.prototype.init.apply(this, arguments);
3266
- this.options.stacking = void 0; // #8817
4205
+ OHLCSeries.prototype.getPointPath = function (point, graphic) {
4206
+ var path = _super.prototype.getPointPath.call(this,
4207
+ point,
4208
+ graphic),
4209
+ strokeWidth = graphic.strokeWidth(),
4210
+ crispCorr = (strokeWidth % 2) / 2,
4211
+ crispX = Math.round(point.plotX) - crispCorr,
4212
+ halfWidth = Math.round(point.shapeArgs.width / 2);
4213
+ var plotOpen = point.plotOpen;
4214
+ // crisp vector coordinates
4215
+ if (point.open !== null) {
4216
+ plotOpen = Math.round(point.plotOpen) + crispCorr;
4217
+ path.push(['M', crispX, plotOpen], ['L', crispX - halfWidth, plotOpen]);
4218
+ _super.prototype.extendStem.call(this, path, strokeWidth / 2, plotOpen);
4219
+ }
4220
+ return path;
3267
4221
  };
4222
+ /* eslint-disable valid-jsdoc */
3268
4223
  /**
3269
4224
  * Postprocess mapping between options and SVG attributes
3270
4225
  * @private
@@ -3286,43 +4241,6 @@
3286
4241
  // return a plain array for speedy calculation
3287
4242
  return [point.open, point.high, point.low, point.close];
3288
4243
  };
3289
- /**
3290
- * Translate data points from raw values x and y to plotX and plotY
3291
- *
3292
- * @private
3293
- * @function Highcharts.seriesTypes.ohlc#translate
3294
- * @return {void}
3295
- */
3296
- OHLCSeries.prototype.translate = function () {
3297
- var series = this,
3298
- yAxis = series.yAxis,
3299
- hasModifyValue = !!series.modifyValue,
3300
- translated = [
3301
- 'plotOpen',
3302
- 'plotHigh',
3303
- 'plotLow',
3304
- 'plotClose',
3305
- 'yBottom'
3306
- ]; // translate OHLC for
3307
- _super.prototype.translate.apply(series);
3308
- // Do the translation
3309
- series.points.forEach(function (point) {
3310
- [point.open, point.high, point.low, point.close, point.low]
3311
- .forEach(function (value, i) {
3312
- if (value !== null) {
3313
- if (hasModifyValue) {
3314
- value = series.modifyValue(value);
3315
- }
3316
- point[translated[i]] =
3317
- yAxis.toPixels(value, true);
3318
- }
3319
- });
3320
- // Align the tooltip to the high value to avoid covering the
3321
- // point
3322
- point.tooltipPos[1] =
3323
- point.plotHigh + yAxis.pos - series.chart.plotTop;
3324
- });
3325
- };
3326
4244
  /**
3327
4245
  * An OHLC chart is a style of financial chart used to describe price
3328
4246
  * movements over time. It displays open, high, low and close values per
@@ -3331,39 +4249,28 @@
3331
4249
  * @sample stock/demo/ohlc/
3332
4250
  * OHLC chart
3333
4251
  *
3334
- * @extends plotOptions.column
3335
- * @excluding borderColor, borderRadius, borderWidth, crisp, stacking,
3336
- * stack
4252
+ * @extends plotOptions.hlc
3337
4253
  * @product highstock
3338
4254
  * @optionparent plotOptions.ohlc
3339
4255
  */
3340
- OHLCSeries.defaultOptions = merge(ColumnSeries.defaultOptions, {
4256
+ /**
4257
+ * The parameter allows setting line series type and use OHLC indicators.
4258
+ * Data in OHLC format is required.
4259
+ *
4260
+ * @sample {highstock} stock/indicators/use-ohlc-data
4261
+ * Use OHLC data format to plot line chart
4262
+ *
4263
+ * @type {boolean}
4264
+ * @product highstock
4265
+ * @apioption plotOptions.line.useOhlcData
4266
+ */
4267
+ OHLCSeries.defaultOptions = merge(HLCSeries.defaultOptions, {
3341
4268
  /**
3342
- * The approximate pixel width of each group. If for example a series
3343
- * with 30 points is displayed over a 600 pixel wide plot area, no
3344
- * grouping is performed. If however the series contains so many points
3345
- * that the spacing is less than the groupPixelWidth, Highcharts will
3346
- * try to group it into appropriate groups so that each is more or less
3347
- * two pixels wide. Defaults to `5`.
3348
- *
3349
- * @type {number}
3350
- * @default 5
4269
+ * @type {Highcharts.DataGroupingApproximationValue|Function}
4270
+ * @default ohlc
3351
4271
  * @product highstock
3352
- * @apioption plotOptions.ohlc.dataGrouping.groupPixelWidth
3353
- */
3354
- /**
3355
- * The pixel width of the line/border. Defaults to `1`.
3356
- *
3357
- * @sample {highstock} stock/plotoptions/ohlc-linewidth/
3358
- * A greater line width
3359
- *
3360
- * @type {number}
3361
- * @default 1
3362
- * @product highstock
3363
- *
3364
- * @private
4272
+ * @apioption plotOptions.ohlc.dataGrouping.approximation
3365
4273
  */
3366
- lineWidth: 1,
3367
4274
  tooltip: {
3368
4275
  pointFormat: '<span style="color:{point.color}">\u25CF</span> ' +
3369
4276
  '<b> {series.name}</b><br/>' +
@@ -3371,42 +4278,17 @@
3371
4278
  'High: {point.high}<br/>' +
3372
4279
  'Low: {point.low}<br/>' +
3373
4280
  'Close: {point.close}<br/>'
3374
- },
3375
- threshold: null,
3376
- states: {
3377
- /**
3378
- * @extends plotOptions.column.states.hover
3379
- * @product highstock
3380
- */
3381
- hover: {
3382
- /**
3383
- * The pixel width of the line representing the OHLC point.
3384
- *
3385
- * @type {number}
3386
- * @default 3
3387
- * @product highstock
3388
- */
3389
- lineWidth: 3
3390
- }
3391
- },
4281
+ }
3392
4282
  /**
3393
- * Determines which one of `open`, `high`, `low`, `close` values should
4283
+ * Determines which one of `open`, `high`, `low`, `close` values should
3394
4284
  * be represented as `point.y`, which is later used to set dataLabel
3395
4285
  * position and [compare](#plotOptions.series.compare).
3396
4286
  *
3397
- * @sample {highstock} stock/plotoptions/ohlc-pointvalkey/
3398
- * Possible values
3399
- *
3400
- * @type {string}
3401
4287
  * @default close
3402
4288
  * @validvalue ["open", "high", "low", "close"]
3403
4289
  * @product highstock
3404
4290
  * @apioption plotOptions.ohlc.pointValKey
3405
4291
  */
3406
- /**
3407
- * @default close
3408
- * @apioption plotOptions.ohlc.colorKey
3409
- */
3410
4292
  /**
3411
4293
  * Line color for up points.
3412
4294
  *
@@ -3414,19 +4296,11 @@
3414
4296
  * @product highstock
3415
4297
  * @apioption plotOptions.ohlc.upColor
3416
4298
  */
3417
- stickyTracking: true
3418
4299
  });
3419
4300
  return OHLCSeries;
3420
- }(ColumnSeries));
4301
+ }(HLCSeries));
3421
4302
  extend(OHLCSeries.prototype, {
3422
- animate: null,
3423
- directTouch: false,
3424
- pointArrayMap: ['open', 'high', 'low', 'close'],
3425
- pointAttrToOptions: {
3426
- stroke: 'color',
3427
- 'stroke-width': 'lineWidth'
3428
- },
3429
- pointValKey: 'close'
4303
+ pointArrayMap: ['open', 'high', 'low', 'close']
3430
4304
  });
3431
4305
  OHLCSeries.prototype.pointClass = OHLCPoint;
3432
4306
  SeriesRegistry.registerSeriesType('ohlc', OHLCSeries);
@@ -3435,6 +4309,30 @@
3435
4309
  * Default Export
3436
4310
  *
3437
4311
  * */
4312
+ // Add useOhlcData option
4313
+ addEvent(Series, 'init', function (eventOptions) {
4314
+ // eslint-disable-next-line no-invalid-this
4315
+ var series = this,
4316
+ options = eventOptions.options;
4317
+ if (options.useOhlcData &&
4318
+ options.id !== 'highcharts-navigator-series') {
4319
+ extend(series, {
4320
+ pointValKey: OHLCSeries.prototype.pointValKey,
4321
+ // keys: ohlcProto.keys, // @todo potentially nonsense
4322
+ pointArrayMap: OHLCSeries.prototype.pointArrayMap,
4323
+ toYData: OHLCSeries.prototype.toYData
4324
+ });
4325
+ }
4326
+ });
4327
+ addEvent(Series, 'afterSetOptions', function (e) {
4328
+ var options = e.options,
4329
+ dataGrouping = options.dataGrouping;
4330
+ if (dataGrouping &&
4331
+ options.useOhlcData &&
4332
+ options.id !== 'highcharts-navigator-series') {
4333
+ dataGrouping.approximation = 'ohlc';
4334
+ }
4335
+ });
3438
4336
  /* *
3439
4337
  *
3440
4338
  * API Options
@@ -3495,16 +4393,9 @@
3495
4393
  *
3496
4394
  * @type {Array<Array<(number|string),number,number,number>|Array<(number|string),number,number,number,number>|*>}
3497
4395
  * @extends series.arearange.data
3498
- * @excluding y, marker
3499
- * @product highstock
3500
- * @apioption series.ohlc.data
3501
- */
3502
- /**
3503
- * The closing value of each data point.
3504
- *
3505
- * @type {number}
4396
+ * @excluding y, marker
3506
4397
  * @product highstock
3507
- * @apioption series.ohlc.data.close
4398
+ * @apioption series.ohlc.data
3508
4399
  */
3509
4400
  /**
3510
4401
  * The opening value of each data point.
@@ -3517,7 +4408,7 @@
3517
4408
 
3518
4409
  return OHLCSeries;
3519
4410
  });
3520
- _registerModule(_modules, 'Series/Candlestick/CandlestickSeries.js', [_modules['Core/DefaultOptions.js'], _modules['Core/Color/Palette.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (D, palette, SeriesRegistry, U) {
4411
+ _registerModule(_modules, 'Series/Candlestick/CandlestickSeries.js', [_modules['Core/DefaultOptions.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (D, SeriesRegistry, U) {
3521
4412
  /* *
3522
4413
  *
3523
4414
  * (c) 2010-2021 Torstein Honsi
@@ -3567,7 +4458,7 @@
3567
4458
  function CandlestickSeries() {
3568
4459
  /* *
3569
4460
  *
3570
- * Static properties
4461
+ * Static Properties
3571
4462
  *
3572
4463
  * */
3573
4464
  var _this = _super !== null && _super.apply(this,
@@ -3623,7 +4514,6 @@
3623
4514
  *
3624
4515
  * @private
3625
4516
  * @function Highcharts.seriesTypes.candlestick#drawPoints
3626
- * @return {void}
3627
4517
  */
3628
4518
  CandlestickSeries.prototype.drawPoints = function () {
3629
4519
  var series = this,
@@ -3704,9 +4594,10 @@
3704
4594
  });
3705
4595
  /* eslint-enable valid-jsdoc */
3706
4596
  };
4597
+ CandlestickSeries.defaultOptions = merge(OHLCSeries.defaultOptions, defaultOptions.plotOptions,
3707
4598
  /**
3708
- * A candlestick chart is a style of financial chart used to describe price
3709
- * movements over time.
4599
+ * A candlestick chart is a style of financial chart used to describe
4600
+ * price movements over time.
3710
4601
  *
3711
4602
  * @sample stock/demo/candlestick/
3712
4603
  * Candlestick chart
@@ -3716,7 +4607,7 @@
3716
4607
  * @product highstock
3717
4608
  * @optionparent plotOptions.candlestick
3718
4609
  */
3719
- CandlestickSeries.defaultOptions = merge(OHLCSeries.defaultOptions, defaultOptions.plotOptions, {
4610
+ {
3720
4611
  /**
3721
4612
  * The specific line color for up candle sticks. The default is to
3722
4613
  * inherit the general `lineColor` setting.
@@ -3729,12 +4620,6 @@
3729
4620
  * @product highstock
3730
4621
  * @apioption plotOptions.candlestick.upLineColor
3731
4622
  */
3732
- /**
3733
- * @type {Highcharts.DataGroupingApproximationValue|Function}
3734
- * @default ohlc
3735
- * @product highstock
3736
- * @apioption plotOptions.candlestick.dataGrouping.approximation
3737
- */
3738
4623
  states: {
3739
4624
  /**
3740
4625
  * @extends plotOptions.column.states.hover
@@ -3742,16 +4627,14 @@
3742
4627
  */
3743
4628
  hover: {
3744
4629
  /**
3745
- * The pixel width of the line/border around the candlestick.
4630
+ * The pixel width of the line/border around the
4631
+ * candlestick.
3746
4632
  *
3747
4633
  * @product highstock
3748
4634
  */
3749
4635
  lineWidth: 2
3750
4636
  }
3751
4637
  },
3752
- /**
3753
- * @extends plotOptions.ohlc.tooltip
3754
- */
3755
4638
  tooltip: defaultOptions.plotOptions.ohlc.tooltip,
3756
4639
  /**
3757
4640
  * @type {number|null}
@@ -3773,7 +4656,7 @@
3773
4656
  * @default #000000
3774
4657
  * @product highstock
3775
4658
  */
3776
- lineColor: palette.neutralColor100,
4659
+ lineColor: "#000000" /* neutralColor100 */,
3777
4660
  /**
3778
4661
  * The pixel width of the candlestick line/border. Defaults to `1`.
3779
4662
  *
@@ -3798,8 +4681,8 @@
3798
4681
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
3799
4682
  * @default #ffffff
3800
4683
  * @product highstock
3801
- */
3802
- upColor: palette.backgroundColor,
4684
+ */
4685
+ upColor: "#ffffff" /* backgroundColor */,
3803
4686
  /**
3804
4687
  * @product highstock
3805
4688
  */
@@ -3961,7 +4844,7 @@
3961
4844
 
3962
4845
  return FlagsPoint;
3963
4846
  });
3964
- _registerModule(_modules, 'Mixins/OnSeries.js', [_modules['Series/Column/ColumnSeries.js'], _modules['Core/Series/Series.js'], _modules['Core/Utilities.js']], function (ColumnSeries, Series, U) {
4847
+ _registerModule(_modules, 'Series/OnSeriesComposition.js', [_modules['Series/Column/ColumnSeries.js'], _modules['Core/Series/Series.js'], _modules['Core/Utilities.js']], function (ColumnSeries, Series, U) {
3965
4848
  /* *
3966
4849
  *
3967
4850
  * (c) 2010-2021 Torstein Honsi
@@ -3975,52 +4858,78 @@
3975
4858
  var seriesProto = Series.prototype;
3976
4859
  var defined = U.defined,
3977
4860
  stableSort = U.stableSort;
3978
- /**
3979
- * @private
3980
- * @mixin onSeriesMixin
3981
- */
3982
- var onSeriesMixin = {
3983
- /* eslint-disable valid-jsdoc */
3984
- /**
3985
- * Override getPlotBox. If the onSeries option is valid,
3986
- return the plot box
3987
- * of the onSeries,
3988
- otherwise proceed as usual.
3989
- *
3990
- * @private
3991
- * @function onSeriesMixin.getPlotBox
3992
- * @return {Highcharts.SeriesPlotBoxObject}
3993
- */
3994
- getPlotBox: function () {
3995
- return seriesProto.getPlotBox.call((this.options.onSeries &&
3996
- this.chart.get(this.options.onSeries)) || this);
3997
- },
4861
+ /* *
4862
+ *
4863
+ * Composition
4864
+ *
4865
+ * */
4866
+ var OnSeriesComposition;
4867
+ (function (OnSeriesComposition) {
4868
+ /* *
4869
+ *
4870
+ * Declarations
4871
+ *
4872
+ * */
4873
+ /* *
4874
+ *
4875
+ * Properties
4876
+ *
4877
+ * */
4878
+ var composedClasses = [];
4879
+ /* *
4880
+ *
4881
+ * Functions
4882
+ *
4883
+ * */
4884
+ /* eslint-disable valid-jsdoc */
4885
+ /**
4886
+ * @private
4887
+ */
4888
+ function compose(SeriesClass) {
4889
+ if (composedClasses.indexOf(SeriesClass) === -1) {
4890
+ composedClasses.push(SeriesClass);
4891
+ var seriesProto_1 = SeriesClass.prototype;
4892
+ seriesProto_1.getPlotBox = getPlotBox;
4893
+ seriesProto_1.translate = translate;
4894
+ }
4895
+ return SeriesClass;
4896
+ }
4897
+ OnSeriesComposition.compose = compose;
4898
+ /**
4899
+ * Override getPlotBox. If the onSeries option is valid, return the plot box
4900
+ * of the onSeries, otherwise proceed as usual.
4901
+ *
4902
+ * @private
4903
+ */
4904
+ function getPlotBox() {
4905
+ return seriesProto.getPlotBox.call((this.options.onSeries &&
4906
+ this.chart.get(this.options.onSeries)) || this);
4907
+ }
4908
+ OnSeriesComposition.getPlotBox = getPlotBox;
3998
4909
  /**
3999
4910
  * Extend the translate method by placing the point on the related series
4000
4911
  *
4001
4912
  * @private
4002
- * @function onSeriesMixin.translate
4003
- * @return {void}
4004
4913
  */
4005
- translate: function () {
4914
+ function translate() {
4006
4915
  columnProto.translate.apply(this);
4007
4916
  var series = this,
4008
4917
  options = series.options,
4009
4918
  chart = series.chart,
4010
4919
  points = series.points,
4011
- cursor = points.length - 1,
4012
- point,
4013
- lastPoint,
4014
4920
  optionsOnSeries = options.onSeries,
4015
4921
  onSeries = (optionsOnSeries &&
4016
4922
  chart.get(optionsOnSeries)),
4017
- onKey = options.onKey || 'y',
4018
4923
  step = onSeries && onSeries.options.step,
4019
4924
  onData = (onSeries && onSeries.points),
4020
- i = onData && onData.length,
4021
4925
  inverted = chart.inverted,
4022
4926
  xAxis = series.xAxis,
4023
- yAxis = series.yAxis,
4927
+ yAxis = series.yAxis;
4928
+ var cursor = points.length - 1,
4929
+ point,
4930
+ lastPoint,
4931
+ onKey = options.onKey || 'y',
4932
+ i = onData && onData.length,
4024
4933
  xOffset = 0,
4025
4934
  leftPoint,
4026
4935
  lastX,
@@ -4034,9 +4943,7 @@
4034
4943
  lastX = (onData[i - 1].x +
4035
4944
  (currentDataGrouping ? currentDataGrouping.totalRange : 0)); // #2374
4036
4945
  // sort the data points
4037
- stableSort(points, function (a, b) {
4038
- return (a.x - b.x);
4039
- });
4946
+ stableSort(points, function (a, b) { return (a.x - b.x); });
4040
4947
  onKey = 'plot' + onKey[0].toUpperCase() + onKey.substr(1);
4041
4948
  while (i-- && points[cursor]) {
4042
4949
  leftPoint = onData[i];
@@ -4115,10 +5022,15 @@
4115
5022
  });
4116
5023
  this.onSeries = onSeries;
4117
5024
  }
4118
- /* eslint-enable valid-jsdoc */
4119
- };
5025
+ OnSeriesComposition.translate = translate;
5026
+ })(OnSeriesComposition || (OnSeriesComposition = {}));
5027
+ /* *
5028
+ *
5029
+ * Default Export
5030
+ *
5031
+ * */
4120
5032
 
4121
- return onSeriesMixin;
5033
+ return OnSeriesComposition;
4122
5034
  });
4123
5035
  _registerModule(_modules, 'Series/Flags/FlagsSymbols.js', [_modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Renderer/SVG/SVGRenderer.js']], function (RendererRegistry, SVGRenderer) {
4124
5036
  /* *
@@ -4146,8 +5058,8 @@
4146
5058
  /**
4147
5059
  * Create the circlepin and squarepin icons with anchor.
4148
5060
  * @private
4149
- * @param {string} shape - circle or square
4150
- * @return {void}
5061
+ * @param {string} shape
5062
+ * circle or square
4151
5063
  */
4152
5064
  function createPinSymbol(shape) {
4153
5065
  symbols[(shape + 'pin')] = function (x, y, w, h, options) {
@@ -4214,7 +5126,7 @@
4214
5126
 
4215
5127
  return symbols;
4216
5128
  });
4217
- _registerModule(_modules, 'Series/Flags/FlagsSeries.js', [_modules['Series/Flags/FlagsPoint.js'], _modules['Core/Globals.js'], _modules['Mixins/OnSeries.js'], _modules['Core/Color/Palette.js'], _modules['Core/Renderer/RendererUtilities.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (FlagsPoint, H, OnSeriesMixin, palette, R, SeriesRegistry, SVGElement, U) {
5129
+ _registerModule(_modules, 'Series/Flags/FlagsSeries.js', [_modules['Series/Flags/FlagsPoint.js'], _modules['Core/Globals.js'], _modules['Series/OnSeriesComposition.js'], _modules['Core/Renderer/RendererUtilities.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (FlagsPoint, H, OnSeriesComposition, R, SeriesRegistry, SVGElement, U) {
4218
5130
  /* *
4219
5131
  *
4220
5132
  * (c) 2010-2021 Torstein Honsi
@@ -4419,11 +5331,15 @@
4419
5331
  }
4420
5332
  // Handle X-dimension overlapping
4421
5333
  if (!options.allowOverlapX) {
5334
+ var maxDistance_1 = 100;
4422
5335
  objectEach(boxesMap, function (box) {
4423
5336
  box.plotX = box.anchorX;
4424
5337
  boxes.push(box);
5338
+ maxDistance_1 = Math.max(box.size, maxDistance_1);
4425
5339
  });
4426
- distribute(boxes, inverted ? yAxis.len : this.xAxis.len, 100);
5340
+ // If necessary (for overlapping or long labels) distribute it
5341
+ // depending on the label width or a hardcoded value, #16041.
5342
+ distribute(boxes, inverted ? yAxis.len : this.xAxis.len, maxDistance_1);
4427
5343
  points.forEach(function (point) {
4428
5344
  var box = point.graphic && boxesMap[point.plotX];
4429
5345
  if (box) {
@@ -4687,7 +5603,7 @@
4687
5603
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
4688
5604
  * @product highstock
4689
5605
  */
4690
- fillColor: palette.backgroundColor,
5606
+ fillColor: "#ffffff" /* backgroundColor */,
4691
5607
  /**
4692
5608
  * The color of the line/border of the flag.
4693
5609
  *
@@ -4717,14 +5633,14 @@
4717
5633
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
4718
5634
  * @product highstock
4719
5635
  */
4720
- lineColor: palette.neutralColor100,
5636
+ lineColor: "#000000" /* neutralColor100 */,
4721
5637
  /**
4722
5638
  * The fill or background color of the flag.
4723
5639
  *
4724
5640
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
4725
5641
  * @product highstock
4726
5642
  */
4727
- fillColor: palette.highlightColor20
5643
+ fillColor: "#ccd6eb" /* highlightColor20 */
4728
5644
  }
4729
5645
  },
4730
5646
  /**
@@ -4746,37 +5662,27 @@
4746
5662
  });
4747
5663
  return FlagsSeries;
4748
5664
  }(ColumnSeries));
5665
+ OnSeriesComposition.compose(FlagsSeries);
4749
5666
  extend(FlagsSeries.prototype, {
4750
5667
  allowDG: false,
4751
- /**
4752
- * @private
4753
- * @function Highcharts.seriesTypes.flags#buildKDTree
4754
- */
4755
- buildKDTree: noop,
4756
5668
  forceCrop: true,
4757
- getPlotBox: OnSeriesMixin.getPlotBox,
5669
+ invertible: false,
5670
+ noSharedTooltip: true,
5671
+ pointClass: FlagsPoint,
5672
+ sorted: false,
5673
+ takeOrdinalPosition: false,
5674
+ trackerGroups: ['markerGroup'],
5675
+ buildKDTree: noop,
4758
5676
  /**
4759
5677
  * Inherit the initialization from base Series.
4760
- *
4761
5678
  * @private
4762
- * @borrows Highcharts.Series#init as Highcharts.seriesTypes.flags#init
4763
5679
  */
4764
5680
  init: Series.prototype.init,
4765
5681
  /**
4766
5682
  * Don't invert the flag marker group (#4960).
4767
- *
4768
5683
  * @private
4769
- * @function Highcharts.seriesTypes.flags#invertGroups
4770
5684
  */
4771
- invertGroups: noop,
4772
- // Flags series group should not be invertible (#14063).
4773
- invertible: false,
4774
- noSharedTooltip: true,
4775
- pointClass: FlagsPoint,
4776
- sorted: false,
4777
- takeOrdinalPosition: false,
4778
- trackerGroups: ['markerGroup'],
4779
- translate: OnSeriesMixin.translate
5685
+ invertGroups: noop
4780
5686
  });
4781
5687
  SeriesRegistry.registerSeriesType('flags', FlagsSeries);
4782
5688
  /* *
@@ -4956,7 +5862,8 @@
4956
5862
  from = unitedMin + range * (1 - this.to);
4957
5863
  }
4958
5864
  if (this.shouldUpdateExtremes(e.DOMType)) {
4959
- axis.setExtremes(from, to, true, e.DOMType !== 'mousemove' && e.DOMType !== 'touchmove', e);
5865
+ axis.setExtremes(from, to, true, (e.DOMType !== 'mousemove' &&
5866
+ e.DOMType !== 'touchmove'), e);
4960
5867
  }
4961
5868
  else {
4962
5869
  // When live redraw is disabled, don't change extremes
@@ -4973,7 +5880,7 @@
4973
5880
  scrollMin = _a.scrollMin,
4974
5881
  scrollMax = _a.scrollMax,
4975
5882
  scrollbar = axis.scrollbar,
4976
- offset = axis.axisTitleMargin + (axis.titleOffset || 0),
5883
+ offset = (axis.axisTitleMargin + (axis.titleOffset || 0)),
4977
5884
  scrollbarsOffsets = axis.chart.scrollbarsOffsets,
4978
5885
  axisMargin = axis.options.margin || 0,
4979
5886
  offsetsIndex,
@@ -4985,8 +5892,11 @@
4985
5892
  if (!axis.opposite) {
4986
5893
  scrollbarsOffsets[1] += offset;
4987
5894
  }
4988
- scrollbar.position(axis.left, axis.top + axis.height + 2 + scrollbarsOffsets[1] -
4989
- (axis.opposite ? axisMargin : 0), axis.width, axis.height);
5895
+ scrollbar.position(axis.left, (axis.top +
5896
+ axis.height +
5897
+ 2 +
5898
+ scrollbarsOffsets[1] -
5899
+ (axis.opposite ? axisMargin : 0)), axis.width, axis.height);
4990
5900
  // Next scrollbar should reserve space for margin (if set)
4991
5901
  if (!axis.opposite) {
4992
5902
  scrollbarsOffsets[1] += axisMargin;
@@ -4998,8 +5908,18 @@
4998
5908
  if (axis.opposite) {
4999
5909
  scrollbarsOffsets[0] += offset;
5000
5910
  }
5001
- scrollbar.position(axis.left + axis.width + 2 + scrollbarsOffsets[0] -
5002
- (axis.opposite ? 0 : axisMargin), axis.top, axis.width, axis.height);
5911
+ var xPosition = void 0;
5912
+ if (!scrollbar.options.opposite) {
5913
+ xPosition = axis.opposite ? 0 : axisMargin;
5914
+ }
5915
+ else {
5916
+ xPosition = axis.left +
5917
+ axis.width +
5918
+ 2 +
5919
+ scrollbarsOffsets[0] -
5920
+ (axis.opposite ? 0 : axisMargin);
5921
+ }
5922
+ scrollbar.position(xPosition, axis.top, axis.width, axis.height);
5003
5923
  // Next scrollbar should reserve space for margin (if set)
5004
5924
  if (axis.opposite) {
5005
5925
  scrollbarsOffsets[0] += axisMargin;
@@ -5020,10 +5940,10 @@
5020
5940
  scrollbar.setRange(0, 1);
5021
5941
  }
5022
5942
  else {
5023
- from =
5024
- (axis.min - scrollMin) / (scrollMax - scrollMin);
5025
- to =
5026
- (axis.max - scrollMin) / (scrollMax - scrollMin);
5943
+ from = ((axis.min - scrollMin) /
5944
+ (scrollMax - scrollMin));
5945
+ to = ((axis.max - scrollMin) /
5946
+ (scrollMax - scrollMin));
5027
5947
  if ((axis.horiz && !axis.reversed) ||
5028
5948
  (!axis.horiz && axis.reversed)) {
5029
5949
  scrollbar.setRange(from, to);
@@ -5038,10 +5958,12 @@
5038
5958
  // Make space for a scrollbar:
5039
5959
  addEvent(AxisClass, 'afterGetOffset', function () {
5040
5960
  var axis = this,
5041
- index = axis.horiz ? 2 : 1,
5961
+ opposite = axis.scrollbar && !axis.scrollbar.options.opposite,
5962
+ index = axis.horiz ? 2 : opposite ? 3 : 1,
5042
5963
  scrollbar = axis.scrollbar;
5043
5964
  if (scrollbar) {
5044
- axis.chart.scrollbarsOffsets = [0, 0]; // reset scrollbars offsets
5965
+ // reset scrollbars offsets
5966
+ axis.chart.scrollbarsOffsets = [0, 0];
5045
5967
  axis.chart.axisOffset[index] +=
5046
5968
  scrollbar.size + scrollbar.options.margin;
5047
5969
  }
@@ -5054,7 +5976,7 @@
5054
5976
 
5055
5977
  return ScrollbarAxis;
5056
5978
  });
5057
- _registerModule(_modules, 'Core/ScrollbarDefaults.js', [_modules['Core/Globals.js'], _modules['Core/Color/Palette.js']], function (H, Palette) {
5979
+ _registerModule(_modules, 'Core/ScrollbarDefaults.js', [_modules['Core/Globals.js']], function (H) {
5058
5980
  /* *
5059
5981
  *
5060
5982
  * (c) 2010-2021 Torstein Honsi
@@ -5153,6 +6075,8 @@
5153
6075
  * @since 1.2.5
5154
6076
  */
5155
6077
  minWidth: 6,
6078
+ /** @ignore-option */
6079
+ opposite: true,
5156
6080
  /**
5157
6081
  * Whether to show or hide the scrollbar when the scrolled content is
5158
6082
  * zoomed out to it full extent.
@@ -5174,7 +6098,7 @@
5174
6098
  *
5175
6099
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5176
6100
  */
5177
- barBackgroundColor: Palette.neutralColor20,
6101
+ barBackgroundColor: "#cccccc" /* neutralColor20 */,
5178
6102
  /**
5179
6103
  * The width of the bar's border.
5180
6104
  *
@@ -5187,7 +6111,7 @@
5187
6111
  *
5188
6112
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5189
6113
  */
5190
- barBorderColor: Palette.neutralColor20,
6114
+ barBorderColor: "#cccccc" /* neutralColor20 */,
5191
6115
  /**
5192
6116
  * The color of the small arrow inside the scrollbar buttons.
5193
6117
  *
@@ -5196,7 +6120,7 @@
5196
6120
  *
5197
6121
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5198
6122
  */
5199
- buttonArrowColor: Palette.neutralColor80,
6123
+ buttonArrowColor: "#333333" /* neutralColor80 */,
5200
6124
  /**
5201
6125
  * The color of scrollbar buttons.
5202
6126
  *
@@ -5205,7 +6129,7 @@
5205
6129
  *
5206
6130
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5207
6131
  */
5208
- buttonBackgroundColor: Palette.neutralColor10,
6132
+ buttonBackgroundColor: "#e6e6e6" /* neutralColor10 */,
5209
6133
  /**
5210
6134
  * The color of the border of the scrollbar buttons.
5211
6135
  *
@@ -5214,7 +6138,7 @@
5214
6138
  *
5215
6139
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5216
6140
  */
5217
- buttonBorderColor: Palette.neutralColor20,
6141
+ buttonBorderColor: "#cccccc" /* neutralColor20 */,
5218
6142
  /**
5219
6143
  * The border width of the scrollbar buttons.
5220
6144
  *
@@ -5227,7 +6151,7 @@
5227
6151
  *
5228
6152
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5229
6153
  */
5230
- rifleColor: Palette.neutralColor80,
6154
+ rifleColor: "#333333" /* neutralColor80 */,
5231
6155
  /**
5232
6156
  * The color of the track background.
5233
6157
  *
@@ -5236,7 +6160,7 @@
5236
6160
  *
5237
6161
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5238
6162
  */
5239
- trackBackgroundColor: Palette.neutralColor5,
6163
+ trackBackgroundColor: "#f2f2f2" /* neutralColor5 */,
5240
6164
  /**
5241
6165
  * The color of the border of the scrollbar track.
5242
6166
  *
@@ -5245,7 +6169,7 @@
5245
6169
  *
5246
6170
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5247
6171
  */
5248
- trackBorderColor: Palette.neutralColor5,
6172
+ trackBorderColor: "#f2f2f2" /* neutralColor5 */,
5249
6173
  /**
5250
6174
  * The corner radius of the border of the scrollbar track.
5251
6175
  *
@@ -5406,10 +6330,16 @@
5406
6330
  mouseUpHandler = this.mouseUpHandler.bind(this);
5407
6331
  // Mouse events
5408
6332
  var _events = [
5409
- [buttons[buttonsOrder[0]].element, 'click',
5410
- this.buttonToMinClick.bind(this)],
5411
- [buttons[buttonsOrder[1]].element, 'click',
5412
- this.buttonToMaxClick.bind(this)],
6333
+ [
6334
+ buttons[buttonsOrder[0]].element,
6335
+ 'click',
6336
+ this.buttonToMinClick.bind(this)
6337
+ ],
6338
+ [
6339
+ buttons[buttonsOrder[1]].element,
6340
+ 'click',
6341
+ this.buttonToMaxClick.bind(this)
6342
+ ],
5413
6343
  [track, 'click',
5414
6344
  this.trackClick.bind(this)],
5415
6345
  [bar, 'mousedown',
@@ -5431,7 +6361,8 @@
5431
6361
  };
5432
6362
  Scrollbar.prototype.buttonToMaxClick = function (e) {
5433
6363
  var scroller = this;
5434
- var range = (scroller.to - scroller.from) * pick(scroller.options.step, 0.2);
6364
+ var range = ((scroller.to - scroller.from) *
6365
+ pick(scroller.options.step, 0.2));
5435
6366
  scroller.updatePosition(scroller.from + range, scroller.to + range);
5436
6367
  fireEvent(scroller, 'changed', {
5437
6368
  from: scroller.from,
@@ -5484,7 +6415,6 @@
5484
6415
  *
5485
6416
  * @private
5486
6417
  * @function Highcharts.Scrollbar#destroy
5487
- * @return {void}
5488
6418
  */
5489
6419
  Scrollbar.prototype.destroy = function () {
5490
6420
  var scroller = this,
@@ -5517,7 +6447,6 @@
5517
6447
  * @function Highcharts.Scrollbar#drawScrollbarButton
5518
6448
  * @param {number} index
5519
6449
  * 0 is left, 1 is right
5520
- * @return {void}
5521
6450
  */
5522
6451
  Scrollbar.prototype.drawScrollbarButton = function (index) {
5523
6452
  var scroller = this,
@@ -5610,7 +6539,8 @@
5610
6539
  var scroller = this,
5611
6540
  normalizedEvent = scroller.chart.pointer.normalize(e),
5612
6541
  options = scroller.options,
5613
- direction = options.vertical ? 'chartY' : 'chartX',
6542
+ direction = options.vertical ?
6543
+ 'chartY' : 'chartX',
5614
6544
  initPositions = scroller.initPositions || [];
5615
6545
  var scrollPosition,
5616
6546
  chartPosition,
@@ -5671,7 +6601,6 @@
5671
6601
  * width of the scrollbar
5672
6602
  * @param {number} height
5673
6603
  * height of the scorllbar
5674
- * @return {void}
5675
6604
  */
5676
6605
  Scrollbar.prototype.position = function (x, y, width, height) {
5677
6606
  var scroller = this,
@@ -5720,7 +6649,6 @@
5720
6649
  *
5721
6650
  * @private
5722
6651
  * @function Highcharts.Scrollbar#removeEvents
5723
- * @return {void}
5724
6652
  */
5725
6653
  Scrollbar.prototype.removeEvents = function () {
5726
6654
  this._events.forEach(function (args) {
@@ -5812,7 +6740,6 @@
5812
6740
  * scale (0-1) where bar should start
5813
6741
  * @param {number} to
5814
6742
  * scale (0-1) where bar should end
5815
- * @return {void}
5816
6743
  */
5817
6744
  Scrollbar.prototype.setRange = function (from, to) {
5818
6745
  var scroller = this,
@@ -5891,8 +6818,6 @@
5891
6818
  *
5892
6819
  * @private
5893
6820
  * @function Highcharts.Scrollbar#shouldUpdateExtremes
5894
- * @param {string} [eventType]
5895
- * @return {boolean}
5896
6821
  */
5897
6822
  Scrollbar.prototype.shouldUpdateExtremes = function (eventType) {
5898
6823
  return (pick(this.options.liveRedraw, H.svg && !H.isTouchDevice && !this.chart.isBoosting) ||
@@ -5942,7 +6867,6 @@
5942
6867
  * @function Highcharts.Scrollbar#updatePosition
5943
6868
  * @param {number} from
5944
6869
  * @param {number} to
5945
- * @return {void}
5946
6870
  */
5947
6871
  Scrollbar.prototype.updatePosition = function (from, to) {
5948
6872
  if (to > 1) {
@@ -6025,11 +6949,6 @@
6025
6949
  *
6026
6950
  * @private
6027
6951
  * @function Highcharts.Axis#toFixedRange
6028
- * @param {number} [pxMin]
6029
- * @param {number} [pxMax]
6030
- * @param {number} [fixedMin]
6031
- * @param {number} [fixedMax]
6032
- * @return {*}
6033
6952
  */
6034
6953
  NavigatorAxisAdditions.prototype.toFixedRange = function (pxMin, pxMax, fixedMin, fixedMax) {
6035
6954
  var navigator = this;
@@ -6154,7 +7073,7 @@
6154
7073
 
6155
7074
  return NavigatorAxis;
6156
7075
  });
6157
- _registerModule(_modules, 'Core/Navigator.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Axis/NavigatorAxis.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Color/Palette.js'], _modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Scrollbar.js'], _modules['Core/Series/Series.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (Axis, Chart, Color, H, NavigatorAxis, D, Palette, RendererRegistry, Scrollbar, Series, SeriesRegistry, U) {
7076
+ _registerModule(_modules, 'Core/Navigator.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Axis/NavigatorAxis.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Scrollbar.js'], _modules['Core/Series/Series.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (Axis, Chart, Color, H, NavigatorAxis, D, RendererRegistry, Scrollbar, Series, SeriesRegistry, U) {
6158
7077
  /* *
6159
7078
  *
6160
7079
  * (c) 2010-2021 Torstein Honsi
@@ -6362,13 +7281,13 @@
6362
7281
  *
6363
7282
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
6364
7283
  */
6365
- backgroundColor: Palette.neutralColor5,
7284
+ backgroundColor: "#f2f2f2" /* neutralColor5 */,
6366
7285
  /**
6367
7286
  * The stroke for the handle border and the stripes inside.
6368
7287
  *
6369
7288
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
6370
7289
  */
6371
- borderColor: Palette.neutralColor40
7290
+ borderColor: "#999999" /* neutralColor40 */
6372
7291
  },
6373
7292
  /**
6374
7293
  * The color of the mask covering the areas of the navigator series
@@ -6385,7 +7304,7 @@
6385
7304
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
6386
7305
  * @default rgba(102,133,194,0.3)
6387
7306
  */
6388
- maskFill: color(Palette.highlightColor60).setOpacity(0.3).get(),
7307
+ maskFill: color("#6685c2" /* highlightColor60 */).setOpacity(0.3).get(),
6389
7308
  /**
6390
7309
  * The color of the line marking the currently zoomed area in the
6391
7310
  * navigator.
@@ -6396,7 +7315,7 @@
6396
7315
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
6397
7316
  * @default #cccccc
6398
7317
  */
6399
- outlineColor: Palette.neutralColor20,
7318
+ outlineColor: "#cccccc" /* neutralColor20 */,
6400
7319
  /**
6401
7320
  * The width of the line marking the currently zoomed area in the
6402
7321
  * navigator.
@@ -6587,7 +7506,7 @@
6587
7506
  className: 'highcharts-navigator-xaxis',
6588
7507
  tickLength: 0,
6589
7508
  lineWidth: 0,
6590
- gridLineColor: Palette.neutralColor10,
7509
+ gridLineColor: "#e6e6e6" /* neutralColor10 */,
6591
7510
  gridLineWidth: 1,
6592
7511
  tickPixelInterval: 200,
6593
7512
  labels: {
@@ -6597,7 +7516,7 @@
6597
7516
  */
6598
7517
  style: {
6599
7518
  /** @ignore */
6600
- color: Palette.neutralColor40
7519
+ color: "#999999" /* neutralColor40 */
6601
7520
  },
6602
7521
  x: 3,
6603
7522
  y: -4
@@ -6780,17 +7699,32 @@
6780
7699
  verticalMin = navigatorTop + zoomedMax + outlineCorrection;
6781
7700
  zoomedMax = navigatorTop + zoomedMin + outlineCorrection;
6782
7701
  path = [
6783
- ['M', left + outlineHeight, navigatorTop - scrollbarHeight - outlineCorrection],
7702
+ [
7703
+ 'M',
7704
+ left + outlineHeight,
7705
+ navigatorTop - scrollbarHeight - outlineCorrection
7706
+ ],
7707
+ // top right of zoomed range
6784
7708
  ['L', left + outlineHeight, verticalMin],
6785
7709
  ['L', left, verticalMin],
6786
7710
  ['L', left, zoomedMax],
6787
7711
  ['L', left + outlineHeight, zoomedMax],
6788
- ['L', left + outlineHeight, navigatorTop + navigatorSize + scrollbarHeight]
7712
+ [
7713
+ 'L',
7714
+ left + outlineHeight,
7715
+ navigatorTop + navigatorSize + scrollbarHeight
7716
+ ]
6789
7717
  ];
6790
7718
  if (maskInside) {
6791
- path.push(['M', left + outlineHeight, verticalMin - halfOutline], // upper left of zoomed range
6792
- ['L', left + outlineHeight, zoomedMax + halfOutline] // upper right of z.r.
6793
- );
7719
+ path.push(
7720
+ // upper left of zoomed range
7721
+ ['M', left + outlineHeight, verticalMin - halfOutline],
7722
+ // upper right of z.r.
7723
+ [
7724
+ 'L',
7725
+ left + outlineHeight,
7726
+ zoomedMax + halfOutline
7727
+ ]);
6794
7728
  }
6795
7729
  }
6796
7730
  else {
@@ -6798,17 +7732,25 @@
6798
7732
  zoomedMax += left + scrollbarHeight - outlineCorrection;
6799
7733
  navigatorTop += halfOutline;
6800
7734
  path = [
7735
+ // left
6801
7736
  ['M', left, navigatorTop],
7737
+ // upper left of zoomed range
6802
7738
  ['L', zoomedMin, navigatorTop],
7739
+ // lower left of z.r.
6803
7740
  ['L', zoomedMin, navigatorTop + outlineHeight],
7741
+ // lower right of z.r.
6804
7742
  ['L', zoomedMax, navigatorTop + outlineHeight],
7743
+ // upper right of z.r.
6805
7744
  ['L', zoomedMax, navigatorTop],
6806
- ['L', left + navigatorSize + scrollbarHeight * 2, navigatorTop] // right
7745
+ // right
7746
+ ['L', left + navigatorSize + scrollbarHeight * 2, navigatorTop]
6807
7747
  ];
6808
7748
  if (maskInside) {
6809
- path.push(['M', zoomedMin - halfOutline, navigatorTop], // upper left of zoomed range
6810
- ['L', zoomedMax + halfOutline, navigatorTop] // upper right of z.r.
6811
- );
7749
+ path.push(
7750
+ // upper left of zoomed range
7751
+ ['M', zoomedMin - halfOutline, navigatorTop],
7752
+ // upper right of z.r.
7753
+ ['L', zoomedMax + halfOutline, navigatorTop]);
6812
7754
  }
6813
7755
  }
6814
7756
  navigator.outline[verb]({
@@ -6994,7 +7936,6 @@
6994
7936
  * Pixel value minimum
6995
7937
  * @param {number} [pxMax]
6996
7938
  * Pixel value maximum
6997
- * @return {void}
6998
7939
  */
6999
7940
  Navigator.prototype.render = function (min, max, pxMin, pxMax) {
7000
7941
  var navigator = this,
@@ -7271,7 +8212,6 @@
7271
8212
  * Mouse event
7272
8213
  * @param {number} index
7273
8214
  * Index of a handle in Navigator.handles array
7274
- * @return {void}
7275
8215
  */
7276
8216
  Navigator.prototype.handlesMousedown = function (e, index) {
7277
8217
  e = this.chart.pointer.normalize(e);
@@ -7367,7 +8307,6 @@
7367
8307
  * @function Highcharts.Navigator#onMouseUp
7368
8308
  * @param {Highcharts.PointerEventObject} e
7369
8309
  * Mouse event
7370
- * @return {void}
7371
8310
  */
7372
8311
  Navigator.prototype.onMouseUp = function (e) {
7373
8312
  var navigator = this,
@@ -7454,7 +8393,6 @@
7454
8393
  *
7455
8394
  * @private
7456
8395
  * @function Highcharts.Navigator#removeEvents
7457
- * @return {void}
7458
8396
  */
7459
8397
  Navigator.prototype.removeEvents = function () {
7460
8398
  if (this.eventsToUnbind) {
@@ -7470,7 +8408,6 @@
7470
8408
  *
7471
8409
  * @private
7472
8410
  * @function Highcharts.Navigator#removeBaseSeriesEvents
7473
- * @return {void}
7474
8411
  */
7475
8412
  Navigator.prototype.removeBaseSeriesEvents = function () {
7476
8413
  var baseSeries = this.baseSeries || [];
@@ -7556,7 +8493,8 @@
7556
8493
  offset: 0,
7557
8494
  index: yAxisIndex,
7558
8495
  isInternal: true,
7559
- reversed: pick((navigatorOptions.yAxis && navigatorOptions.yAxis.reversed), (chart.yAxis[0] && chart.yAxis[0].reversed), false),
8496
+ reversed: pick((navigatorOptions.yAxis &&
8497
+ navigatorOptions.yAxis.reversed), (chart.yAxis[0] && chart.yAxis[0].reversed), false),
7560
8498
  zoomEnabled: false
7561
8499
  }, chart.inverted ? {
7562
8500
  width: height
@@ -7638,9 +8576,6 @@
7638
8576
  *
7639
8577
  * @private
7640
8578
  * @function Highcharts.Navigator#getUnionExtremes
7641
- * @param {boolean} [returnFalseOnNoBaseSeries]
7642
- * as the param says.
7643
- * @return {Highcharts.Dictionary<(number|undefined)>|undefined}
7644
8579
  */
7645
8580
  Navigator.prototype.getUnionExtremes = function (returnFalseOnNoBaseSeries) {
7646
8581
  var baseAxis = this.chart.xAxis[0],
@@ -7668,7 +8603,6 @@
7668
8603
  * Additional series options for a navigator
7669
8604
  * @param {boolean} [redraw]
7670
8605
  * Whether to redraw after update.
7671
- * @return {void}
7672
8606
  */
7673
8607
  Navigator.prototype.setBaseSeries = function (baseSeriesOptions, redraw) {
7674
8608
  var chart = this.chart,
@@ -7707,7 +8641,6 @@
7707
8641
  * @function Highcharts.Navigator.updateNavigatorSeries
7708
8642
  * @param {boolean} addEvents
7709
8643
  * @param {boolean} [redraw]
7710
- * @return {void}
7711
8644
  */
7712
8645
  Navigator.prototype.updateNavigatorSeries = function (addEvents, redraw) {
7713
8646
  var navigator = this,
@@ -7848,7 +8781,6 @@
7848
8781
  *
7849
8782
  * @private
7850
8783
  * @function Highcharts.Navigator#addBaseSeriesEvent
7851
- * @return {void}
7852
8784
  */
7853
8785
  Navigator.prototype.addBaseSeriesEvents = function () {
7854
8786
  var navigator = this,
@@ -8024,7 +8956,7 @@
8024
8956
  // If range declared, stick to the minimum only if the range
8025
8957
  // is smaller than the data set range.
8026
8958
  if (range && max - xDataMin > 0) {
8027
- stickToMin = max - xDataMin < range && (!this.chart.fixedRange);
8959
+ stickToMin = max - xDataMin < range;
8028
8960
  }
8029
8961
  else {
8030
8962
  // If the current axis minimum falls outside the new
@@ -8042,7 +8974,6 @@
8042
8974
  *
8043
8975
  * @private
8044
8976
  * @function Highcharts.Navigator#addChartEvents
8045
- * @return {void}
8046
8977
  */
8047
8978
  Navigator.prototype.addChartEvents = function () {
8048
8979
  if (!this.eventsToUnbind) {
@@ -8251,7 +9182,7 @@
8251
9182
 
8252
9183
  return H.Navigator;
8253
9184
  });
8254
- _registerModule(_modules, 'Extensions/RangeSelector.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Color/Palette.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (Axis, Chart, H, D, palette, SVGElement, U) {
9185
+ _registerModule(_modules, 'Extensions/RangeSelector.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (Axis, Chart, H, D, SVGElement, U) {
8255
9186
  /* *
8256
9187
  *
8257
9188
  * (c) 2010-2021 Torstein Honsi
@@ -8741,7 +9672,7 @@
8741
9672
  */
8742
9673
  inputStyle: {
8743
9674
  /** @ignore */
8744
- color: palette.highlightColor80,
9675
+ color: "#335cad" /* highlightColor80 */,
8745
9676
  /** @ignore */
8746
9677
  cursor: 'pointer'
8747
9678
  },
@@ -8758,7 +9689,7 @@
8758
9689
  */
8759
9690
  labelStyle: {
8760
9691
  /** @ignore */
8761
- color: palette.neutralColor60
9692
+ color: "#666666" /* neutralColor60 */
8762
9693
  }
8763
9694
  }
8764
9695
  });
@@ -8841,7 +9772,6 @@
8841
9772
  * @param {number} i
8842
9773
  * The index of the button
8843
9774
  * @param {boolean} [redraw]
8844
- * @return {void}
8845
9775
  */
8846
9776
  RangeSelector.prototype.clickButton = function (i, redraw) {
8847
9777
  var rangeSelector = this,
@@ -8939,7 +9869,8 @@
8939
9869
  // If the navigator exist and the axis range is declared reset that
8940
9870
  // range and from now on only use the range set by a user, #14742.
8941
9871
  if (chart.navigator && chart.navigator.baseSeries[0]) {
8942
- chart.navigator.baseSeries[0].xAxis.options.range = void 0;
9872
+ chart.navigator.baseSeries[0].xAxis.options
9873
+ .range = void 0;
8943
9874
  }
8944
9875
  newMin = dataMin;
8945
9876
  newMax = dataMax;
@@ -8984,7 +9915,6 @@
8984
9915
  * @private
8985
9916
  * @function Highcharts.RangeSelector#setSelected
8986
9917
  * @param {number} [selected]
8987
- * @return {void}
8988
9918
  */
8989
9919
  RangeSelector.prototype.setSelected = function (selected) {
8990
9920
  this.selected = this.options.selected = selected;
@@ -8995,12 +9925,11 @@
8995
9925
  * @private
8996
9926
  * @function Highcharts.RangeSelector#init
8997
9927
  * @param {Highcharts.Chart} chart
8998
- * @return {void}
8999
9928
  */
9000
9929
  RangeSelector.prototype.init = function (chart) {
9001
9930
  var rangeSelector = this,
9002
9931
  options = chart.options.rangeSelector,
9003
- buttonOptions = options.buttons || rangeSelector.defaultButtons.slice(),
9932
+ buttonOptions = (options.buttons || rangeSelector.defaultButtons.slice()),
9004
9933
  selectedOption = options.selected,
9005
9934
  blurInputs = function () {
9006
9935
  var minInput = rangeSelector.minInput,
@@ -9050,7 +9979,6 @@
9050
9979
  *
9051
9980
  * @private
9052
9981
  * @function Highcharts.RangeSelector#updateButtonStates
9053
- * @return {void}
9054
9982
  */
9055
9983
  RangeSelector.prototype.updateButtonStates = function () {
9056
9984
  var rangeSelector = this,
@@ -9156,7 +10084,6 @@
9156
10084
  * @private
9157
10085
  * @function Highcharts.RangeSelector#computeButtonRange
9158
10086
  * @param {Highcharts.RangeSelectorButtonsOptions} rangeOptions
9159
- * @return {void}
9160
10087
  */
9161
10088
  RangeSelector.prototype.computeButtonRange = function (rangeOptions) {
9162
10089
  var type = rangeOptions.type,
@@ -9191,12 +10118,11 @@
9191
10118
  *
9192
10119
  * @private
9193
10120
  * @function Highcharts.RangeSelector#getInputValue
9194
- * @param {string} name
9195
- * @return {number}
9196
10121
  */
9197
10122
  RangeSelector.prototype.getInputValue = function (name) {
9198
10123
  var input = name === 'min' ? this.minInput : this.maxInput;
9199
- var options = this.chart.options.rangeSelector;
10124
+ var options = this.chart.options
10125
+ .rangeSelector;
9200
10126
  var time = this.chart.time;
9201
10127
  if (input) {
9202
10128
  return ((input.type === 'text' && options.inputDateParser) ||
@@ -9209,9 +10135,6 @@
9209
10135
  *
9210
10136
  * @private
9211
10137
  * @function Highcharts.RangeSelector#setInputValue
9212
- * @param {string} name
9213
- * @param {number} [inputTime]
9214
- * @return {void}
9215
10138
  */
9216
10139
  RangeSelector.prototype.setInputValue = function (name, inputTime) {
9217
10140
  var options = this.options, time = this.chart.time, input = name === 'min' ? this.minInput : this.maxInput, dateBox = name === 'min' ? this.minDateBox : this.maxDateBox;
@@ -9226,7 +10149,8 @@
9226
10149
  input.setAttribute('data-hc-time', inputTime);
9227
10150
  updatedTime = inputTime;
9228
10151
  }
9229
- input.value = time.dateFormat(this.inputTypeFormats[input.type] || options.inputEditDateFormat, updatedTime);
10152
+ input.value = time.dateFormat((this.inputTypeFormats[input.type] ||
10153
+ options.inputEditDateFormat), updatedTime);
9230
10154
  if (dateBox) {
9231
10155
  dateBox.attr({
9232
10156
  text: time.dateFormat(options.inputDateFormat, updatedTime)
@@ -9239,10 +10163,6 @@
9239
10163
  *
9240
10164
  * @private
9241
10165
  * @function Highcharts.RangeSelector#setInputExtremes
9242
- * @param {string} name
9243
- * @param {number} min
9244
- * @param {number} max
9245
- * @return {void}
9246
10166
  */
9247
10167
  RangeSelector.prototype.setInputExtremes = function (name, min, max) {
9248
10168
  var input = name === 'min' ? this.minInput : this.maxInput;
@@ -9267,7 +10187,6 @@
9267
10187
  * @private
9268
10188
  * @function Highcharts.RangeSelector#showInput
9269
10189
  * @param {string} name
9270
- * @return {void}
9271
10190
  */
9272
10191
  RangeSelector.prototype.showInput = function (name) {
9273
10192
  var dateBox = name === 'min' ? this.minDateBox : this.maxDateBox;
@@ -9279,7 +10198,9 @@
9279
10198
  translateY = _a.translateY;
9280
10199
  var inputBoxWidth = this.options.inputBoxWidth;
9281
10200
  css(input, {
9282
- width: isTextInput ? ((dateBox.width + (inputBoxWidth ? -2 : 20)) + 'px') : 'auto',
10201
+ width: isTextInput ?
10202
+ ((dateBox.width + (inputBoxWidth ? -2 : 20)) + 'px') :
10203
+ 'auto',
9283
10204
  height: isTextInput ? ((dateBox.height - 2) + 'px') : 'auto',
9284
10205
  border: '2px solid silver'
9285
10206
  });
@@ -9305,7 +10226,6 @@
9305
10226
  * @private
9306
10227
  * @function Highcharts.RangeSelector#hideInput
9307
10228
  * @param {string} name
9308
- * @return {void}
9309
10229
  */
9310
10230
  RangeSelector.prototype.hideInput = function (name) {
9311
10231
  var input = name === 'min' ? this.minInput : this.maxInput;
@@ -9357,8 +10277,6 @@
9357
10277
  *
9358
10278
  * @private
9359
10279
  * @function Highcharts.RangeSelector#drawInput
9360
- * @param {string} name
9361
- * @return {RangeSelectorInputElements}
9362
10280
  */
9363
10281
  RangeSelector.prototype.drawInput = function (name) {
9364
10282
  var _a = this,
@@ -9461,7 +10379,7 @@
9461
10379
  // Styles
9462
10380
  label.css(merge(chartStyle, options.labelStyle));
9463
10381
  dateBox.css(merge({
9464
- color: palette.neutralColor80
10382
+ color: "#333333" /* neutralColor80 */
9465
10383
  }, chartStyle, options.inputStyle));
9466
10384
  css(input, extend({
9467
10385
  position: 'absolute',
@@ -9527,8 +10445,6 @@
9527
10445
  *
9528
10446
  * @private
9529
10447
  * @function Highcharts.RangeSelector#getPosition
9530
- *
9531
- * @return {Highcharts.Dictionary<number>}
9532
10448
  */
9533
10449
  RangeSelector.prototype.getPosition = function () {
9534
10450
  var chart = this.chart,
@@ -9548,13 +10464,8 @@
9548
10464
  *
9549
10465
  * @private
9550
10466
  * @function Highcharts.RangeSelector#getYTDExtremes
9551
- *
9552
- * @param {number} dataMax
9553
- *
9554
- * @param {number} dataMin
9555
- *
9556
10467
  * @return {*}
9557
- * Returns min and max for the YTD
10468
+ * Returns min and max for the YTD
9558
10469
  */
9559
10470
  RangeSelector.prototype.getYTDExtremes = function (dataMax, dataMin, useUTC) {
9560
10471
  var time = this.chart.time,
@@ -9583,7 +10494,6 @@
9583
10494
  * X axis minimum
9584
10495
  * @param {number} [max]
9585
10496
  * X axis maximum
9586
- * @return {void}
9587
10497
  */
9588
10498
  RangeSelector.prototype.render = function (min, max) {
9589
10499
  var chart = this.chart,
@@ -9637,7 +10547,8 @@
9637
10547
  this.setInputValue('min', min);
9638
10548
  this.setInputValue('max', max);
9639
10549
  var unionExtremes = (chart.scroller && chart.scroller.getUnionExtremes()) || chart.xAxis[0] || {};
9640
- if (defined(unionExtremes.dataMin) && defined(unionExtremes.dataMax)) {
10550
+ if (defined(unionExtremes.dataMin) &&
10551
+ defined(unionExtremes.dataMax)) {
9641
10552
  var minRange = chart.xAxis[0].minRange || 0;
9642
10553
  this.setInputExtremes('min', unionExtremes.dataMin, Math.min(unionExtremes.dataMax, this.getInputValue('max')) - minRange);
9643
10554
  this.setInputExtremes('max', Math.max(unionExtremes.dataMin, this.getInputValue('min')) + minRange, unionExtremes.dataMax);
@@ -9670,7 +10581,6 @@
9670
10581
  *
9671
10582
  * @private
9672
10583
  * @function Highcharts.RangeSelector#renderButtons
9673
- * @return {void}
9674
10584
  */
9675
10585
  RangeSelector.prototype.renderButtons = function () {
9676
10586
  var _this = this;
@@ -9771,7 +10681,6 @@
9771
10681
  *
9772
10682
  * @private
9773
10683
  * @function Highcharts.RangeSelector#alignElements
9774
- * @return {void}
9775
10684
  */
9776
10685
  RangeSelector.prototype.alignElements = function () {
9777
10686
  var _this = this;
@@ -9927,7 +10836,6 @@
9927
10836
  * @function Highcharts.RangeSelector#alignButtonGroup
9928
10837
  * @param {number} xOffsetForExportButton
9929
10838
  * @param {number} [width]
9930
- * @return {void}
9931
10839
  */
9932
10840
  RangeSelector.prototype.alignButtonGroup = function (xOffsetForExportButton, width) {
9933
10841
  var _a = this,
@@ -9957,7 +10865,6 @@
9957
10865
  /**
9958
10866
  * @private
9959
10867
  * @function Highcharts.RangeSelector#positionButtons
9960
- * @return {void}
9961
10868
  */
9962
10869
  RangeSelector.prototype.positionButtons = function () {
9963
10870
  var _a = this,
@@ -9998,7 +10905,6 @@
9998
10905
  * @param {number} xOffsetForExportButton
9999
10906
  * The X offset of the group required to make room for the
10000
10907
  * exporting button
10001
- * @return {void}
10002
10908
  */
10003
10909
  RangeSelector.prototype.handleCollision = function (xOffsetForExportButton) {
10004
10910
  var _this = this;
@@ -10099,7 +11005,6 @@
10099
11005
  * @private
10100
11006
  * @function Highcharts.RangeSelector#collapseButtons
10101
11007
  * @param {number} xOffsetForExportButton
10102
- * @return {void}
10103
11008
  */
10104
11009
  RangeSelector.prototype.collapseButtons = function (xOffsetForExportButton) {
10105
11010
  var _a = this,
@@ -10153,7 +11058,6 @@
10153
11058
  *
10154
11059
  * @private
10155
11060
  * @function Highcharts.RangeSelector#expandButtons
10156
- * @return {void}
10157
11061
  */
10158
11062
  RangeSelector.prototype.expandButtons = function () {
10159
11063
  var _a = this,
@@ -10185,7 +11089,6 @@
10185
11089
  *
10186
11090
  * @private
10187
11091
  * @function Highcharts.RangeSelector#currentButtonIndex
10188
- * @return {number}
10189
11092
  */
10190
11093
  RangeSelector.prototype.currentButtonIndex = function () {
10191
11094
  var dropdown = this.dropdown;
@@ -10199,7 +11102,6 @@
10199
11102
  *
10200
11103
  * @private
10201
11104
  * @function Highcharts.RangeSelector#showDropdown
10202
- * @return {void}
10203
11105
  */
10204
11106
  RangeSelector.prototype.showDropdown = function () {
10205
11107
  var _a = this,
@@ -10223,7 +11125,6 @@
10223
11125
  /**
10224
11126
  * @private
10225
11127
  * @function Highcharts.RangeSelector#hideDropdown
10226
- * @return {void}
10227
11128
  */
10228
11129
  RangeSelector.prototype.hideDropdown = function () {
10229
11130
  var dropdown = this.dropdown;
@@ -10242,7 +11143,7 @@
10242
11143
  * @private
10243
11144
  * @function Highcharts.RangeSelector#getHeight
10244
11145
  * @return {number}
10245
- * Returns rangeSelector height
11146
+ * Returns rangeSelector height
10246
11147
  */
10247
11148
  RangeSelector.prototype.getHeight = function () {
10248
11149
  var rangeSelector = this,
@@ -10278,11 +11179,8 @@
10278
11179
  *
10279
11180
  * @private
10280
11181
  * @function Highcharts.RangeSelector#titleCollision
10281
- *
10282
- * @param {Highcharts.Chart} chart
10283
- *
10284
11182
  * @return {boolean}
10285
- * Returns collision status
11183
+ * Returns collision status
10286
11184
  */
10287
11185
  RangeSelector.prototype.titleCollision = function (chart) {
10288
11186
  return !(chart.options.title.text ||
@@ -10294,7 +11192,6 @@
10294
11192
  * @private
10295
11193
  * @function Highcharts.RangeSelector#update
10296
11194
  * @param {Highcharts.RangeSelectorOptions} options
10297
- * @return {void}
10298
11195
  */
10299
11196
  RangeSelector.prototype.update = function (options) {
10300
11197
  var chart = this.chart;
@@ -10390,17 +11287,14 @@
10390
11287
  *
10391
11288
  * @private
10392
11289
  * @function preferredInputType
10393
- * @param {string} format
10394
- * @return {string}
10395
11290
  */
10396
11291
  function preferredInputType(format) {
10397
11292
  var ms = format.indexOf('%L') !== -1;
10398
11293
  if (ms) {
10399
11294
  return 'text';
10400
11295
  }
10401
- var date = ['a', 'A', 'd', 'e', 'w', 'b', 'B', 'm', 'o', 'y', 'Y'].some(function (char) {
10402
- return format.indexOf('%' + char) !== -1;
10403
- });
11296
+ var date = ['a', 'A', 'd', 'e', 'w', 'b', 'B', 'm', 'o', 'y', 'Y']
11297
+ .some(function (char) { return format.indexOf('%' + char) !== -1; });
10404
11298
  var time = ['H', 'k', 'I', 'l', 'M', 'S'].some(function (char) {
10405
11299
  return format.indexOf('%' + char) !== -1;
10406
11300
  });
@@ -10437,7 +11331,8 @@
10437
11331
  // Get the true range from a start date
10438
11332
  getTrueRange = function (base,
10439
11333
  count) {
10440
- var timeName = type === 'year' ? 'FullYear' : 'Month';
11334
+ var timeName = type === 'year' ?
11335
+ 'FullYear' : 'Month';
10441
11336
  var date = new time.Date(base);
10442
11337
  var basePeriod = time.get(timeName,
10443
11338
  date);
@@ -10644,7 +11539,7 @@
10644
11539
 
10645
11540
  return RangeSelector;
10646
11541
  });
10647
- _registerModule(_modules, 'Core/Chart/StockChart.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/FormatUtilities.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Color/Palette.js'], _modules['Core/Series/Point.js'], _modules['Core/Series/Series.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js']], function (A, Axis, Chart, F, D, Palette, Point, Series, SVGRenderer, U) {
11542
+ _registerModule(_modules, 'Core/Chart/StockChart.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/FormatUtilities.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Series/Series.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js']], function (A, Axis, Chart, F, D, Series, SVGRenderer, U) {
10648
11543
  /* *
10649
11544
  *
10650
11545
  * (c) 2010-2021 Torstein Honsi
@@ -10673,13 +11568,7 @@
10673
11568
  var animObject = A.animObject;
10674
11569
  var format = F.format;
10675
11570
  var getOptions = D.getOptions;
10676
- var pointTooltipFormatter = Point.prototype.tooltipFormatter;
10677
- var _a = Series.prototype,
10678
- seriesInit = _a.init,
10679
- seriesProcessData = _a.processData;
10680
11571
  var addEvent = U.addEvent,
10681
- arrayMax = U.arrayMax,
10682
- arrayMin = U.arrayMin,
10683
11572
  clamp = U.clamp,
10684
11573
  defined = U.defined,
10685
11574
  extend = U.extend,
@@ -10727,10 +11616,9 @@
10727
11616
  * Function to run when the chart has loaded and and all external
10728
11617
  * images are loaded.
10729
11618
  *
10730
- * @return {void}
10731
11619
  *
10732
- * @fires Highcharts.StockChart#event:init
10733
- * @fires Highcharts.StockChart#event:afterInit
11620
+ * @emits Highcharts.StockChart#event:init
11621
+ * @emits Highcharts.StockChart#event:afterInit
10734
11622
  */
10735
11623
  StockChart.prototype.init = function (userOptions, callback) {
10736
11624
  var defaultOptions = getOptions(),
@@ -10756,7 +11644,8 @@
10756
11644
  },
10757
11645
  scrollbar: {
10758
11646
  // #4988 - check if setOptions was called
10759
- enabled: pick(defaultOptions.scrollbar && defaultOptions.scrollbar.enabled,
11647
+ enabled: pick((defaultOptions.scrollbar &&
11648
+ defaultOptions.scrollbar.enabled),
10760
11649
  true)
10761
11650
  },
10762
11651
  rangeSelector: {
@@ -10785,15 +11674,15 @@
10785
11674
  // apply X axis options to both single and multi y axes
10786
11675
  options.xAxis = splat(userOptions.xAxis || {}).map(function (xAxisOptions, i) {
10787
11676
  return merge(getDefaultAxisOptions('xAxis', xAxisOptions), defaultOptions.xAxis, // #3802
10788
- defaultOptions.xAxis && defaultOptions.xAxis[i], // #7690
10789
- xAxisOptions, // user options
11677
+ // #7690
11678
+ defaultOptions.xAxis && defaultOptions.xAxis[i], xAxisOptions, // user options
10790
11679
  getForcedAxisOptions('xAxis', userOptions));
10791
11680
  });
10792
11681
  // apply Y axis options to both single and multi y axes
10793
11682
  options.yAxis = splat(userOptions.yAxis || {}).map(function (yAxisOptions, i) {
10794
11683
  return merge(getDefaultAxisOptions('yAxis', yAxisOptions), defaultOptions.yAxis, // #3802
10795
- defaultOptions.yAxis && defaultOptions.yAxis[i], // #7690
10796
- yAxisOptions // user options
11684
+ // #7690
11685
+ defaultOptions.yAxis && defaultOptions.yAxis[i], yAxisOptions // user options
10797
11686
  );
10798
11687
  });
10799
11688
  _super.prototype.init.call(this, options, callback);
@@ -10804,14 +11693,10 @@
10804
11693
  *
10805
11694
  * @private
10806
11695
  * @function Highcharts.StockChart#createAxis
10807
- *
10808
11696
  * @param {string} type
10809
- * An axis type.
10810
- *
11697
+ * An axis type.
10811
11698
  * @param {Chart.CreateAxisOptionsObject} options
10812
- * The axis creation options.
10813
- *
10814
- * @return {Highcharts.Axis | Highcharts.ColorAxis}
11699
+ * The axis creation options.
10815
11700
  */
10816
11701
  StockChart.prototype.createAxis = function (type, options) {
10817
11702
  options.axis = merge(getDefaultAxisOptions(type, options.axis), options.axis, getForcedAxisOptions(type, this.userOptions));
@@ -10867,9 +11752,6 @@
10867
11752
  *
10868
11753
  * @private
10869
11754
  * @function getDefaultAxisOptions
10870
- * @param {string} type
10871
- * @param {Highcharts.AxisOptions} options
10872
- * @return {Highcharts.AxisOptions}
10873
11755
  */
10874
11756
  function getDefaultAxisOptions(type, options) {
10875
11757
  if (type === 'xAxis') {
@@ -10916,9 +11798,6 @@
10916
11798
  *
10917
11799
  * @private
10918
11800
  * @function getForcedAxisOptions
10919
- * @param {string} type
10920
- * @param {Highcharts.Options} chartOptions
10921
- * @return {Highcharts.AxisOptions}
10922
11801
  */
10923
11802
  function getForcedAxisOptions(type, chartOptions) {
10924
11803
  if (type === 'xAxis') {
@@ -11137,9 +12016,6 @@
11137
12016
  *
11138
12017
  * @private
11139
12018
  * @function Highcharts.SVGRenderer#crispPolyLine
11140
- * @param {Highcharts.SVGPathArray} points
11141
- * @param {number} width
11142
- * @return {Highcharts.SVGPathArray}
11143
12019
  */
11144
12020
  SVGRenderer.prototype.crispPolyLine = function (points, width) {
11145
12021
  // points format: [['M', 0, 0], ['L', 100, 0]]
@@ -11213,12 +12089,12 @@
11213
12089
  .attr({
11214
12090
  fill: options.backgroundColor ||
11215
12091
  point && point.series && point.series.color || // #14888
11216
- Palette.neutralColor60,
12092
+ "#666666" /* neutralColor60 */,
11217
12093
  stroke: options.borderColor || '',
11218
12094
  'stroke-width': options.borderWidth || 0
11219
12095
  })
11220
12096
  .css(extend({
11221
- color: Palette.backgroundColor,
12097
+ color: "#ffffff" /* backgroundColor */,
11222
12098
  fontWeight: 'normal',
11223
12099
  fontSize: '11px',
11224
12100
  textAlign: 'center'
@@ -11311,76 +12187,6 @@
11311
12187
  posy + crossBox.height / 2
11312
12188
  });
11313
12189
  });
11314
- /* ************************************************************************** *
11315
- * Start value compare logic *
11316
- * ************************************************************************** */
11317
- /**
11318
- * Extend series.init by adding a method to modify the y value used for plotting
11319
- * on the y axis. This method is called both from the axis when finding dataMin
11320
- * and dataMax, and from the series.translate method.
11321
- *
11322
- * @ignore
11323
- * @function Highcharts.Series#init
11324
- */
11325
- Series.prototype.init = function () {
11326
- // Call base method
11327
- seriesInit.apply(this, arguments);
11328
- // Set comparison mode
11329
- this.initCompare(this.options.compare);
11330
- };
11331
- /**
11332
- * Highcharts Stock only. Set the
11333
- * [compare](https://api.highcharts.com/highstock/plotOptions.series.compare)
11334
- * mode of the series after render time. In most cases it is more useful running
11335
- * {@link Axis#setCompare} on the X axis to update all its series.
11336
- *
11337
- * @function Highcharts.Series#setCompare
11338
- *
11339
- * @param {string} [compare]
11340
- * Can be one of `null` (default), `"percent"` or `"value"`.
11341
- */
11342
- Series.prototype.setCompare = function (compare) {
11343
- this.initCompare(compare);
11344
- // Survive to export, #5485
11345
- this.userOptions.compare = compare;
11346
- };
11347
- /**
11348
- * @ignore
11349
- * @function Highcharts.Series#initCompare
11350
- *
11351
- * @param {string} [compare]
11352
- * Can be one of `null` (default), `"percent"` or `"value"`.
11353
- */
11354
- Series.prototype.initCompare = function (compare) {
11355
- // Set or unset the modifyValue method
11356
- this.modifyValue = (compare === 'value' || compare === 'percent') ?
11357
- function (value, point) {
11358
- var compareValue = this.compareValue;
11359
- if (typeof value !== 'undefined' &&
11360
- typeof compareValue !== 'undefined') { // #2601, #5814
11361
- // Get the modified value
11362
- if (compare === 'value') {
11363
- value -= compareValue;
11364
- // Compare percent
11365
- }
11366
- else {
11367
- value = 100 * (value / compareValue) -
11368
- (this.options.compareBase === 100 ? 0 : 100);
11369
- }
11370
- // record for tooltip etc.
11371
- if (point) {
11372
- point.change = value;
11373
- }
11374
- return value;
11375
- }
11376
- return 0;
11377
- } :
11378
- null;
11379
- // Mark dirty
11380
- if (this.chart.hasRendered) {
11381
- this.isDirty = true;
11382
- }
11383
- };
11384
12190
  /**
11385
12191
  * Based on the data grouping options decides whether
11386
12192
  * the data should be cropped while processing.
@@ -11397,173 +12203,6 @@
11397
12203
  chart.options.isStock);
11398
12204
  return groupingEnabled;
11399
12205
  };
11400
- /**
11401
- * Extend series.processData by finding the first y value in the plot area,
11402
- * used for comparing the following values
11403
- *
11404
- * @ignore
11405
- * @function Highcharts.Series#processData
11406
- */
11407
- Series.prototype.processData = function (force) {
11408
- var series = this,
11409
- i,
11410
- keyIndex = -1,
11411
- processedXData,
11412
- processedYData,
11413
- compareStart = series.options.compareStart === true ? 0 : 1,
11414
- length,
11415
- compareValue;
11416
- // call base method
11417
- seriesProcessData.apply(this, arguments);
11418
- if (series.xAxis && series.processedYData) { // not pies
11419
- // local variables
11420
- processedXData = series.processedXData;
11421
- processedYData = series.processedYData;
11422
- length = processedYData.length;
11423
- // For series with more than one value (range, OHLC etc), compare
11424
- // against close or the pointValKey (#4922, #3112, #9854)
11425
- if (series.pointArrayMap) {
11426
- keyIndex = series.pointArrayMap.indexOf(series.options.pointValKey || series.pointValKey || 'y');
11427
- }
11428
- // find the first value for comparison
11429
- for (i = 0; i < length - compareStart; i++) {
11430
- compareValue = processedYData[i] && keyIndex > -1 ?
11431
- processedYData[i][keyIndex] :
11432
- processedYData[i];
11433
- if (isNumber(compareValue) &&
11434
- processedXData[i + compareStart] >=
11435
- series.xAxis.min &&
11436
- compareValue !== 0) {
11437
- series.compareValue = compareValue;
11438
- break;
11439
- }
11440
- }
11441
- }
11442
- return;
11443
- };
11444
- // Modify series extremes
11445
- addEvent(Series, 'afterGetExtremes', function (e) {
11446
- var dataExtremes = e.dataExtremes;
11447
- if (this.modifyValue && dataExtremes) {
11448
- var extremes = [
11449
- this.modifyValue(dataExtremes.dataMin),
11450
- this.modifyValue(dataExtremes.dataMax)
11451
- ];
11452
- dataExtremes.dataMin = arrayMin(extremes);
11453
- dataExtremes.dataMax = arrayMax(extremes);
11454
- }
11455
- });
11456
- /**
11457
- * Highcharts Stock only. Set the compare mode on all series
11458
- * belonging to an Y axis after render time.
11459
- *
11460
- * @see [series.plotOptions.compare](https://api.highcharts.com/highstock/series.plotOptions.compare)
11461
- *
11462
- * @sample stock/members/axis-setcompare/
11463
- * Set compoare
11464
- *
11465
- * @function Highcharts.Axis#setCompare
11466
- *
11467
- * @param {string} [compare]
11468
- * The compare mode. Can be one of `null` (default), `"value"` or
11469
- * `"percent"`.
11470
- *
11471
- * @param {boolean} [redraw=true]
11472
- * Whether to redraw the chart or to wait for a later call to
11473
- * {@link Chart#redraw}.
11474
- */
11475
- Axis.prototype.setCompare = function (compare, redraw) {
11476
- if (!this.isXAxis) {
11477
- this.series.forEach(function (series) {
11478
- series.setCompare(compare);
11479
- });
11480
- if (pick(redraw, true)) {
11481
- this.chart.redraw();
11482
- }
11483
- }
11484
- };
11485
- /**
11486
- * Extend the tooltip formatter by adding support for the point.change variable
11487
- * as well as the changeDecimals option.
11488
- *
11489
- * @ignore
11490
- * @function Highcharts.Point#tooltipFormatter
11491
- *
11492
- * @param {string} pointFormat
11493
- */
11494
- Point.prototype.tooltipFormatter = function (pointFormat) {
11495
- var point = this;
11496
- var numberFormatter = point.series.chart.numberFormatter;
11497
- pointFormat = pointFormat.replace('{point.change}', (point.change > 0 ? '+' : '') + numberFormatter(point.change, pick(point.series.tooltipOptions.changeDecimals, 2)));
11498
- return pointTooltipFormatter.apply(this, [pointFormat]);
11499
- };
11500
- /* ************************************************************************** *
11501
- * End value compare logic *
11502
- * ************************************************************************** */
11503
- // Extend the Series prototype to create a separate series clip box. This is
11504
- // related to using multiple panes, and a future pane logic should incorporate
11505
- // this feature (#2754).
11506
- addEvent(Series, 'render', function () {
11507
- var chart = this.chart,
11508
- clipHeight;
11509
- // Only do this on not 3d (#2939, #5904) nor polar (#6057) charts, and only
11510
- // if the series type handles clipping in the animate method (#2975).
11511
- if (!(chart.is3d && chart.is3d()) &&
11512
- !chart.polar &&
11513
- this.xAxis &&
11514
- !this.xAxis.isRadial && // Gauge, #6192
11515
- this.options.clip !== false // #15128
11516
- ) {
11517
- clipHeight = this.yAxis.len;
11518
- // Include xAxis line width (#8031) but only if the Y axis ends on the
11519
- // edge of the X axis (#11005).
11520
- if (this.xAxis.axisLine) {
11521
- var dist = chart.plotTop + chart.plotHeight -
11522
- this.yAxis.pos - this.yAxis.len,
11523
- lineHeightCorrection = Math.floor(this.xAxis.axisLine.strokeWidth() / 2);
11524
- if (dist >= 0) {
11525
- clipHeight -= Math.max(lineHeightCorrection - dist, 0);
11526
- }
11527
- }
11528
- // First render, initial clip box. clipBox also needs to be updated if
11529
- // the series is rendered again before starting animating, in
11530
- // compliance with a responsive rule (#13858).
11531
- if (!chart.hasLoaded || (!this.clipBox && this.isDirty && !this.isDirtyData)) {
11532
- this.clipBox = this.clipBox || merge(chart.clipBox);
11533
- this.clipBox.width = this.xAxis.len;
11534
- this.clipBox.height = clipHeight;
11535
- }
11536
- if (chart.hasRendered) {
11537
- var animation = animObject(this.options.animation);
11538
- // #15435: this.sharedClipKey might not have been set yet, for
11539
- // example when updating the series, so we need to use this
11540
- // function instead
11541
- var sharedClipKey = this.getSharedClipKey(animation);
11542
- var clipRect = chart.sharedClips[sharedClipKey];
11543
- // On redrawing, resizing etc, update the clip rectangle.
11544
- //
11545
- // #15435: Update it even when we are creating/updating clipBox,
11546
- // since there could be series updating and pane size changes
11547
- // happening at the same time and we dont destroy shared clips in
11548
- // stock.
11549
- if (clipRect) {
11550
- // animate in case resize is done during initial animation
11551
- clipRect.animate({
11552
- width: this.xAxis.len,
11553
- height: clipHeight
11554
- });
11555
- var markerClipRect = chart.sharedClips[sharedClipKey + 'm'];
11556
- // also change markers clip animation for consistency
11557
- // (marker clip rects should exist only on chart init)
11558
- if (markerClipRect) {
11559
- markerClipRect.animate({
11560
- width: this.xAxis.len
11561
- });
11562
- }
11563
- }
11564
- }
11565
- }
11566
- });
11567
12206
  addEvent(Chart, 'update', function (e) {
11568
12207
  var options = e.options;
11569
12208
  // Use case: enabling scrollbar from a disabled state.
@@ -11580,68 +12219,10 @@
11580
12219
  * Default Export
11581
12220
  *
11582
12221
  * */
11583
- /* *
11584
- *
11585
- * API Options
11586
- *
11587
- * */
11588
- /**
11589
- * Compare the values of the series against the first non-null, non-
11590
- * zero value in the visible range. The y axis will show percentage
11591
- * or absolute change depending on whether `compare` is set to `"percent"`
11592
- * or `"value"`. When this is applied to multiple series, it allows
11593
- * comparing the development of the series against each other. Adds
11594
- * a `change` field to every point object.
11595
- *
11596
- * @see [compareBase](#plotOptions.series.compareBase)
11597
- * @see [Axis.setCompare()](/class-reference/Highcharts.Axis#setCompare)
11598
- *
11599
- * @sample {highstock} stock/plotoptions/series-compare-percent/
11600
- * Percent
11601
- * @sample {highstock} stock/plotoptions/series-compare-value/
11602
- * Value
11603
- *
11604
- * @type {string}
11605
- * @since 1.0.1
11606
- * @product highstock
11607
- * @apioption plotOptions.series.compare
11608
- */
11609
- /**
11610
- * Defines if comparison should start from the first point within the visible
11611
- * range or should start from the first point **before** the range.
11612
- *
11613
- * In other words, this flag determines if first point within the visible range
11614
- * will have 0% (`compareStart=true`) or should have been already calculated
11615
- * according to the previous point (`compareStart=false`).
11616
- *
11617
- * @sample {highstock} stock/plotoptions/series-comparestart/
11618
- * Calculate compare within visible range
11619
- *
11620
- * @type {boolean}
11621
- * @default false
11622
- * @since 6.0.0
11623
- * @product highstock
11624
- * @apioption plotOptions.series.compareStart
11625
- */
11626
- /**
11627
- * When [compare](#plotOptions.series.compare) is `percent`, this option
11628
- * dictates whether to use 0 or 100 as the base of comparison.
11629
- *
11630
- * @sample {highstock} stock/plotoptions/series-comparebase/
11631
- * Compare base is 100
11632
- *
11633
- * @type {number}
11634
- * @default 0
11635
- * @since 5.0.6
11636
- * @product highstock
11637
- * @validvalue [0, 100]
11638
- * @apioption plotOptions.series.compareBase
11639
- */
11640
- ''; // keeps doclets above in transpiled file
11641
12222
 
11642
12223
  return StockChart;
11643
12224
  });
11644
- _registerModule(_modules, 'masters/modules/stock.src.js', [_modules['Core/Globals.js'], _modules['Core/Axis/OrdinalAxis.js'], _modules['Core/Scrollbar.js'], _modules['Core/Chart/StockChart.js']], function (Highcharts, OrdinalAxis, Scrollbar, StockChart) {
12225
+ _registerModule(_modules, 'masters/modules/stock.src.js', [_modules['Core/Globals.js'], _modules['Core/Axis/OrdinalAxis.js'], _modules['Series/DataModifyComposition.js'], _modules['Core/Scrollbar.js'], _modules['Core/Chart/StockChart.js']], function (Highcharts, OrdinalAxis, DataModifyComposition, Scrollbar, StockChart) {
11645
12226
 
11646
12227
  var G = Highcharts;
11647
12228
  // Classes
@@ -11650,6 +12231,7 @@
11650
12231
  // Compositions
11651
12232
  Scrollbar.compose(G.Axis);
11652
12233
  OrdinalAxis.compose(G.Axis, G.Series, G.Chart);
12234
+ DataModifyComposition.compose(G.Series, G.Axis, G.Point);
11653
12235
 
11654
12236
  });
11655
12237
  }));