highcharts 9.2.2 → 9.3.3

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 (894) 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 +250 -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 +197 -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 +4 -48
  151. package/es-modules/Extensions/DataGrouping.js +52 -32
  152. package/es-modules/Extensions/DownloadURL.js +2 -2
  153. package/es-modules/Extensions/DragPanes.js +1 -2
  154. package/es-modules/Extensions/DraggablePoints.js +7 -8
  155. package/es-modules/Extensions/Drilldown.js +11 -7
  156. package/es-modules/Extensions/ExportData.js +6 -5
  157. package/es-modules/Extensions/Exporting/Exporting.js +33 -46
  158. package/es-modules/Extensions/Exporting/ExportingDefaults.js +8 -15
  159. package/es-modules/Extensions/FullScreen.js +4 -3
  160. package/es-modules/Extensions/GeoJSON.js +42 -66
  161. package/es-modules/Extensions/MarkerClusters.js +118 -98
  162. package/es-modules/Extensions/Math3D.js +4 -4
  163. package/es-modules/Extensions/NoDataToDisplay.js +1 -2
  164. package/es-modules/Extensions/OfflineExporting/OfflineExporting.js +32 -32
  165. package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
  166. package/es-modules/Extensions/Oldie/Oldie.js +14 -79
  167. package/es-modules/Extensions/Oldie/VMLAxis3D.js +5 -1
  168. package/es-modules/Extensions/OverlappingDataLabels.js +10 -6
  169. package/es-modules/Extensions/Pane.js +11 -12
  170. package/es-modules/Extensions/ParallelCoordinates.js +5 -3
  171. package/es-modules/Extensions/PatternFill.js +17 -11
  172. package/es-modules/Extensions/Polar.js +7 -4
  173. package/es-modules/Extensions/PriceIndication.js +2 -1
  174. package/es-modules/Extensions/RangeSelector.js +22 -59
  175. package/es-modules/Extensions/ScrollablePlotArea.js +2 -2
  176. package/es-modules/Extensions/SeriesLabel.js +1 -1
  177. package/es-modules/Extensions/Sonification/ChartSonify.js +279 -663
  178. package/es-modules/Extensions/Sonification/Earcon.js +136 -102
  179. package/es-modules/Extensions/Sonification/Instrument.js +493 -426
  180. package/es-modules/Extensions/Sonification/MusicalFrequencies.js +10 -0
  181. package/es-modules/Extensions/Sonification/Options.js +10 -0
  182. package/es-modules/Extensions/Sonification/PointSonify.js +207 -152
  183. package/es-modules/Extensions/Sonification/SeriesSonify.js +474 -0
  184. package/es-modules/Extensions/Sonification/SignalHandler.js +122 -0
  185. package/es-modules/Extensions/Sonification/Sonification.js +27 -53
  186. package/es-modules/Extensions/Sonification/{Utilities.js → SonificationUtilities.js} +70 -88
  187. package/es-modules/Extensions/Sonification/Timeline.js +250 -567
  188. package/es-modules/Extensions/Sonification/TimelineEvent.js +157 -0
  189. package/es-modules/Extensions/Sonification/TimelinePath.js +311 -0
  190. package/es-modules/Extensions/Stacking.js +5 -23
  191. package/es-modules/Extensions/Themes/BrandDark.js +293 -0
  192. package/es-modules/Extensions/Themes/BrandLight.js +259 -0
  193. package/es-modules/Extensions/Themes/DarkUnica.js +4 -2
  194. package/es-modules/Extensions/Themes/Grid.js +4 -2
  195. package/es-modules/Extensions/Themes/GridLight.js +4 -2
  196. package/es-modules/Gantt/Connection.js +2 -2
  197. package/es-modules/Gantt/Pathfinder.js +6 -5
  198. package/es-modules/Gantt/PathfinderAlgorithms.js +12 -12
  199. package/es-modules/Maps/MapNavigation.js +30 -68
  200. package/es-modules/Maps/MapNavigationOptionsDefault.js +3 -0
  201. package/es-modules/Maps/MapPointer.js +8 -5
  202. package/es-modules/Maps/MapSymbols.js +23 -3
  203. package/es-modules/Maps/MapView.js +450 -0
  204. package/es-modules/Maps/MapViewOptionsDefault.js +97 -0
  205. package/es-modules/Maps/Projection.js +436 -0
  206. package/es-modules/Maps/ProjectionDefinition.js +9 -0
  207. package/es-modules/Maps/Projections/EqualEarth.js +42 -0
  208. package/es-modules/Maps/Projections/LambertConformalConic.js +52 -0
  209. package/es-modules/Maps/Projections/Miller.js +16 -0
  210. package/es-modules/Maps/Projections/Orthographic.js +26 -0
  211. package/es-modules/Maps/Projections/ProjectionRegistry.js +19 -0
  212. package/es-modules/Maps/Projections/WebMercator.js +24 -0
  213. package/es-modules/Series/Area/AreaSeries.js +13 -13
  214. package/es-modules/Series/Area3DSeries.js +4 -2
  215. package/es-modules/Series/AreaRange/AreaRangeSeries.js +28 -17
  216. package/es-modules/Series/Bellcurve/BellcurveSeries.js +4 -9
  217. package/es-modules/Series/BoxPlot/BoxPlotSeries.js +1 -2
  218. package/es-modules/Series/Bubble/BubbleLegendDefaults.js +1 -2
  219. package/es-modules/Series/Bubble/BubbleLegendItem.js +5 -15
  220. package/es-modules/Series/Bubble/BubblePoint.js +5 -0
  221. package/es-modules/Series/Bubble/BubbleSeries.js +90 -50
  222. package/es-modules/Series/Candlestick/CandlestickSeries.js +10 -19
  223. package/es-modules/{Mixins/CenteredSeries.js → Series/CenteredUtilities.js} +45 -23
  224. package/es-modules/{Mixins/ColorMapSeries.js → Series/ColorMapMixin.js} +10 -8
  225. package/es-modules/Series/Column/ColumnDataLabel.js +5 -5
  226. package/es-modules/Series/Column/ColumnSeries.js +19 -18
  227. package/es-modules/Series/Column3D/Column3DComposition.js +1 -2
  228. package/es-modules/Series/ColumnPyramid/ColumnPyramidSeries.js +11 -8
  229. package/es-modules/Series/ColumnRange/ColumnRangeSeries.js +2 -1
  230. package/es-modules/Series/Cylinder/CylinderComposition.js +36 -4
  231. package/es-modules/Series/DataModifyComposition.js +539 -0
  232. package/es-modules/Series/DependencyWheel/DependencyWheelPoint.js +2 -6
  233. package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +1 -1
  234. package/es-modules/Series/DerivedComposition.js +137 -0
  235. package/es-modules/Series/DrawPointComposition.js +111 -0
  236. package/es-modules/Series/Dumbbell/DumbbellPoint.js +0 -1
  237. package/es-modules/Series/Dumbbell/DumbbellSeries.js +2 -6
  238. package/es-modules/Series/ErrorBar/ErrorBarSeries.js +1 -2
  239. package/es-modules/Series/Flags/FlagsSeries.js +18 -25
  240. package/es-modules/Series/Flags/FlagsSymbols.js +2 -2
  241. package/es-modules/Series/Funnel/FunnelSeries.js +6 -5
  242. package/es-modules/Series/Funnel3D/Funnel3DComposition.js +14 -8
  243. package/es-modules/Series/Funnel3D/Funnel3DSeries.js +2 -1
  244. package/es-modules/Series/Gantt/GanttPoint.js +1 -1
  245. package/es-modules/Series/Gantt/GanttSeries.js +3 -3
  246. package/es-modules/Series/Gauge/GaugePoint.js +1 -1
  247. package/es-modules/Series/Gauge/GaugeSeries.js +7 -7
  248. package/es-modules/Series/HLC/HLCPoint.js +55 -0
  249. package/es-modules/Series/HLC/HLCSeries.js +378 -0
  250. package/es-modules/Series/Heatmap/HeatmapPoint.js +13 -14
  251. package/es-modules/Series/Heatmap/HeatmapSeries.js +24 -12
  252. package/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +10 -9
  253. package/es-modules/Series/Histogram/HistogramSeries.js +7 -11
  254. package/es-modules/Series/HollowCandlestick/HollowCandlestickPoint.js +1 -4
  255. package/es-modules/Series/HollowCandlestick/HollowCandlestickSeries.js +28 -30
  256. package/es-modules/Series/Item/ItemSeries.js +4 -5
  257. package/es-modules/Series/Line/LineSeries.js +1 -2
  258. package/es-modules/Series/Map/MapPoint.js +27 -14
  259. package/es-modules/Series/Map/MapSeries.js +283 -322
  260. package/es-modules/Series/MapBubble/MapBubblePoint.js +0 -3
  261. package/es-modules/Series/MapBubble/MapBubbleSeries.js +10 -1
  262. package/es-modules/Series/MapLine/MapLineSeries.js +2 -4
  263. package/es-modules/Series/MapPoint/MapPointPoint.js +5 -1
  264. package/es-modules/Series/MapPoint/MapPointSeries.js +99 -14
  265. package/es-modules/Series/Networkgraph/DraggableNodes.js +0 -4
  266. package/es-modules/Series/Networkgraph/Integrations.js +8 -22
  267. package/es-modules/Series/Networkgraph/Networkgraph.js +6 -10
  268. package/es-modules/Series/Networkgraph/QuadTree.js +1 -3
  269. package/es-modules/{Mixins/Nodes.js → Series/NodesComposition.js} +78 -30
  270. package/es-modules/Series/OHLC/OHLCPoint.js +2 -7
  271. package/es-modules/Series/OHLC/OHLCSeries.js +55 -183
  272. package/es-modules/{Mixins/OnSeries.js → Series/OnSeriesComposition.js} +53 -21
  273. package/es-modules/Series/Organization/OrganizationSeries.js +6 -5
  274. package/es-modules/Series/PackedBubble/PackedBubbleComposition.js +1 -0
  275. package/es-modules/Series/PackedBubble/PackedBubblePoint.js +1 -1
  276. package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +48 -10
  277. package/es-modules/Series/ParetoSeries/ParetoSeries.js +3 -7
  278. package/es-modules/Series/Pie/PieDataLabel.js +1 -2
  279. package/es-modules/Series/Pie/PiePoint.js +2 -2
  280. package/es-modules/Series/Pie/PieSeries.js +7 -8
  281. package/es-modules/Series/Pie3D/Pie3DComposition.js +2 -1
  282. package/es-modules/Series/Pie3D/Pie3DPoint.js +2 -1
  283. package/es-modules/Series/Pie3D/Pie3DSeries.js +1 -1
  284. package/es-modules/Series/Pyramid3D/Pyramid3DSeries.js +2 -1
  285. package/es-modules/Series/Sankey/SankeyPoint.js +0 -4
  286. package/es-modules/Series/Sankey/SankeySeries.js +92 -22
  287. package/es-modules/Series/SolidGauge/SolidGaugeComposition.js +3 -1
  288. package/es-modules/Series/Spline/SplineSeries.js +0 -8
  289. package/es-modules/Series/Sunburst/SunburstPoint.js +2 -3
  290. package/es-modules/Series/Sunburst/SunburstSeries.js +6 -6
  291. package/es-modules/Series/Sunburst/SunburstUtilities.js +3 -2
  292. package/es-modules/Series/Tilemap/TilemapPoint.js +2 -5
  293. package/es-modules/Series/Tilemap/TilemapShapes.js +0 -7
  294. package/es-modules/Series/Timeline/TimelineSeries.js +3 -4
  295. package/es-modules/{Mixins/TreeSeries.js → Series/TreeUtilities.js} +88 -78
  296. package/es-modules/Series/Treemap/TreemapPoint.js +2 -2
  297. package/es-modules/Series/Treemap/TreemapSeries.js +22 -25
  298. package/es-modules/Series/Variwide/VariwideSeries.js +5 -1
  299. package/es-modules/Series/Venn/VennPoint.js +16 -7
  300. package/es-modules/Series/Venn/VennSeries.js +11 -17
  301. package/es-modules/Series/Venn/VennUtils.js +551 -439
  302. package/es-modules/Series/Waterfall/WaterfallSeries.js +8 -6
  303. package/es-modules/Series/Windbarb/WindbarbSeries.js +23 -24
  304. package/es-modules/Series/Wordcloud/WordcloudPoint.js +8 -6
  305. package/es-modules/Series/Wordcloud/WordcloudSeries.js +26 -22
  306. package/es-modules/Series/Wordcloud/WordcloudUtils.js +669 -484
  307. package/es-modules/Series/XRange/XRangePoint.js +7 -12
  308. package/es-modules/Series/XRange/XRangeSeries.js +4 -20
  309. package/es-modules/Stock/Indicators/ABands/ABandsIndicator.js +15 -6
  310. package/es-modules/Stock/Indicators/AO/AOIndicator.js +2 -3
  311. package/es-modules/Stock/Indicators/APO/APOIndicator.js +14 -20
  312. package/es-modules/Stock/Indicators/Aroon/AroonIndicator.js +4 -6
  313. package/es-modules/Stock/Indicators/AroonOscillator/AroonOscillatorIndicator.js +11 -13
  314. package/es-modules/Stock/Indicators/ArrayUtilities.js +47 -0
  315. package/es-modules/Stock/Indicators/BB/BBIndicator.js +39 -11
  316. package/es-modules/Stock/Indicators/CMF/CMFIndicator.js +35 -15
  317. package/es-modules/Stock/Indicators/Chaikin/ChaikinIndicator.js +6 -12
  318. package/es-modules/Stock/Indicators/DEMA/DEMAIndicator.js +1 -11
  319. package/es-modules/Stock/Indicators/DMI/DMIIndicator.js +28 -16
  320. package/es-modules/Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js +18 -11
  321. package/es-modules/Stock/Indicators/EMA/EMAIndicator.js +1 -3
  322. package/es-modules/Stock/Indicators/IKH/IKHIndicator.js +6 -6
  323. package/es-modules/Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js +23 -9
  324. package/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +16 -19
  325. package/es-modules/Stock/Indicators/LinearRegression/LinearRegression.js +32 -14
  326. package/es-modules/Stock/Indicators/LinearRegressionAngle/LinearRegressionAngle.js +2 -2
  327. package/es-modules/Stock/Indicators/LinearRegressionIntercept/LinearRegressionIntercept.js +2 -2
  328. package/es-modules/Stock/Indicators/LinearRegressionSlopes/LinearRegressionSlopes.js +2 -2
  329. package/es-modules/Stock/Indicators/MACD/MACDIndicator.js +2 -3
  330. package/es-modules/Stock/Indicators/MultipleLinesComposition.js +294 -0
  331. package/es-modules/Stock/Indicators/NATR/NATRIndicator.js +1 -3
  332. package/es-modules/Stock/Indicators/PC/PCIndicator.js +25 -13
  333. package/es-modules/Stock/Indicators/PPO/PPOIndicator.js +1 -11
  334. package/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +2 -1
  335. package/es-modules/Stock/Indicators/RSI/RSIIndicator.js +2 -1
  336. package/es-modules/Stock/Indicators/SMA/SMAComposition.js +0 -26
  337. package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +32 -50
  338. package/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +0 -8
  339. package/es-modules/Stock/Indicators/Stochastic/StochasticIndicator.js +18 -9
  340. package/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +4 -6
  341. package/es-modules/Stock/Indicators/TEMA/TEMAIndicator.js +26 -11
  342. package/es-modules/Stock/Indicators/TRIX/TRIXIndicator.js +6 -12
  343. package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +26 -10
  344. package/es-modules/Stock/Indicators/VWAP/VWAPIndicator.js +19 -7
  345. package/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +2 -3
  346. package/es-modules/Stock/StockToolsBindings.js +156 -47
  347. package/es-modules/Stock/StockToolsGui.js +442 -37
  348. package/es-modules/masters/highcharts-3d.src.js +1 -1
  349. package/es-modules/masters/highcharts-gantt.src.js +1 -1
  350. package/es-modules/masters/highcharts-more.src.js +1 -1
  351. package/es-modules/masters/highcharts.src.js +1 -1
  352. package/es-modules/masters/highmaps.src.js +1 -1
  353. package/es-modules/masters/highstock.src.js +1 -1
  354. package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
  355. package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
  356. package/es-modules/masters/indicators/ao.src.js +1 -1
  357. package/es-modules/masters/indicators/apo.src.js +1 -1
  358. package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
  359. package/es-modules/masters/indicators/aroon.src.js +1 -1
  360. package/es-modules/masters/indicators/atr.src.js +1 -1
  361. package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
  362. package/es-modules/masters/indicators/cci.src.js +1 -1
  363. package/es-modules/masters/indicators/chaikin.src.js +1 -1
  364. package/es-modules/masters/indicators/cmf.src.js +1 -1
  365. package/es-modules/masters/indicators/cmo.src.js +1 -1
  366. package/es-modules/masters/indicators/dema.src.js +1 -1
  367. package/es-modules/masters/indicators/disparity-index.src.js +1 -1
  368. package/es-modules/masters/indicators/dmi.src.js +1 -1
  369. package/es-modules/masters/indicators/dpo.src.js +1 -1
  370. package/es-modules/masters/indicators/ema.src.js +4 -10
  371. package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
  372. package/es-modules/masters/indicators/indicators-all.src.js +2 -2
  373. package/es-modules/masters/indicators/indicators.src.js +2 -1
  374. package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
  375. package/es-modules/masters/indicators/klinger.src.js +1 -1
  376. package/es-modules/masters/indicators/macd.src.js +1 -1
  377. package/es-modules/masters/indicators/mfi.src.js +1 -1
  378. package/es-modules/masters/indicators/momentum.src.js +1 -1
  379. package/es-modules/masters/indicators/natr.src.js +1 -1
  380. package/es-modules/masters/indicators/obv.src.js +1 -1
  381. package/es-modules/masters/indicators/pivot-points.src.js +1 -1
  382. package/es-modules/masters/indicators/ppo.src.js +1 -1
  383. package/es-modules/masters/indicators/price-channel.src.js +1 -1
  384. package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
  385. package/es-modules/masters/indicators/psar.src.js +1 -1
  386. package/es-modules/masters/indicators/regressions.src.js +1 -1
  387. package/es-modules/masters/indicators/roc.src.js +1 -1
  388. package/es-modules/masters/indicators/rsi.src.js +1 -1
  389. package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
  390. package/es-modules/masters/indicators/stochastic.src.js +1 -1
  391. package/es-modules/masters/indicators/supertrend.src.js +1 -1
  392. package/es-modules/masters/indicators/tema.src.js +1 -1
  393. package/es-modules/masters/indicators/trendline.src.js +1 -1
  394. package/es-modules/masters/indicators/trix.src.js +1 -1
  395. package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
  396. package/es-modules/masters/indicators/vwap.src.js +1 -1
  397. package/es-modules/masters/indicators/williams-r.src.js +1 -1
  398. package/es-modules/masters/indicators/wma.src.js +1 -1
  399. package/es-modules/masters/indicators/zigzag.src.js +1 -1
  400. package/es-modules/masters/modules/accessibility.src.js +16 -2
  401. package/es-modules/masters/modules/annotations-advanced.src.js +3 -1
  402. package/es-modules/masters/modules/annotations.src.js +1 -1
  403. package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
  404. package/es-modules/masters/modules/boost-canvas.src.js +1 -1
  405. package/es-modules/masters/modules/boost.src.js +1 -1
  406. package/es-modules/masters/modules/broken-axis.src.js +1 -1
  407. package/es-modules/masters/modules/bullet.src.js +1 -1
  408. package/es-modules/masters/modules/coloraxis.src.js +1 -1
  409. package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
  410. package/es-modules/masters/modules/cylinder.src.js +1 -1
  411. package/es-modules/masters/modules/data.src.js +6 -3
  412. package/es-modules/masters/modules/datagrouping.src.js +1 -1
  413. package/es-modules/masters/modules/debugger.src.js +1 -1
  414. package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
  415. package/es-modules/masters/modules/dotplot.src.js +1 -1
  416. package/es-modules/masters/modules/drag-panes.src.js +1 -1
  417. package/es-modules/masters/modules/draggable-points.src.js +1 -1
  418. package/es-modules/masters/modules/drilldown.src.js +1 -1
  419. package/es-modules/masters/modules/dumbbell.src.js +1 -1
  420. package/es-modules/masters/modules/export-data.src.js +1 -1
  421. package/es-modules/masters/modules/exporting.src.js +1 -1
  422. package/es-modules/masters/modules/full-screen.src.js +1 -1
  423. package/es-modules/masters/modules/funnel.src.js +1 -1
  424. package/es-modules/masters/modules/funnel3d.src.js +1 -1
  425. package/es-modules/masters/modules/gantt.src.js +1 -1
  426. package/es-modules/masters/modules/grid-axis.src.js +1 -1
  427. package/es-modules/masters/modules/heatmap.src.js +1 -2
  428. package/es-modules/masters/modules/heikinashi.src.js +1 -1
  429. package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
  430. package/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
  431. package/es-modules/masters/modules/item-series.src.js +1 -1
  432. package/es-modules/masters/modules/lollipop.src.js +1 -1
  433. package/es-modules/masters/modules/map.src.js +1 -3
  434. package/es-modules/masters/modules/marker-clusters.src.js +1 -1
  435. package/es-modules/masters/modules/networkgraph.src.js +1 -1
  436. package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
  437. package/es-modules/masters/modules/offline-exporting.src.js +1 -1
  438. package/es-modules/masters/modules/oldie-polyfills.src.js +1 -1
  439. package/es-modules/masters/modules/oldie.src.js +1 -1
  440. package/es-modules/masters/modules/organization.src.js +1 -1
  441. package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
  442. package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
  443. package/es-modules/masters/modules/pareto.src.js +1 -1
  444. package/es-modules/masters/modules/pathfinder.src.js +1 -1
  445. package/es-modules/masters/modules/pattern-fill.src.js +1 -1
  446. package/es-modules/masters/modules/price-indicator.src.js +1 -1
  447. package/es-modules/masters/modules/pyramid3d.src.js +1 -1
  448. package/es-modules/masters/modules/sankey.src.js +1 -1
  449. package/es-modules/masters/modules/series-label.src.js +1 -1
  450. package/es-modules/masters/modules/solid-gauge.src.js +1 -1
  451. package/es-modules/masters/modules/sonification.src.js +33 -2
  452. package/es-modules/masters/modules/static-scale.src.js +1 -1
  453. package/es-modules/masters/modules/stock-tools.src.js +1 -1
  454. package/es-modules/masters/modules/stock.src.js +4 -1
  455. package/es-modules/masters/modules/streamgraph.src.js +1 -1
  456. package/es-modules/masters/modules/sunburst.src.js +1 -1
  457. package/es-modules/masters/modules/tilemap.src.js +1 -1
  458. package/es-modules/masters/modules/timeline.src.js +1 -1
  459. package/es-modules/masters/modules/treegrid.src.js +1 -1
  460. package/es-modules/masters/modules/treemap.src.js +1 -1
  461. package/es-modules/masters/modules/variable-pie.src.js +1 -1
  462. package/es-modules/masters/modules/variwide.src.js +1 -1
  463. package/es-modules/masters/modules/vector.src.js +1 -1
  464. package/es-modules/masters/modules/venn.src.js +1 -1
  465. package/es-modules/masters/modules/windbarb.src.js +1 -1
  466. package/es-modules/masters/modules/wordcloud.src.js +1 -1
  467. package/es-modules/masters/modules/xrange.src.js +1 -1
  468. package/es-modules/masters/themes/avocado.src.js +1 -1
  469. package/es-modules/masters/themes/brand-dark.src.js +14 -0
  470. package/es-modules/masters/themes/brand-light.src.js +14 -0
  471. package/es-modules/masters/themes/dark-blue.src.js +1 -1
  472. package/es-modules/masters/themes/dark-green.src.js +1 -1
  473. package/es-modules/masters/themes/dark-unica.src.js +1 -1
  474. package/es-modules/masters/themes/gray.src.js +1 -1
  475. package/es-modules/masters/themes/grid-light.src.js +1 -1
  476. package/es-modules/masters/themes/grid.src.js +1 -1
  477. package/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
  478. package/es-modules/masters/themes/high-contrast-light.src.js +1 -1
  479. package/es-modules/masters/themes/sand-signika.src.js +1 -1
  480. package/es-modules/masters/themes/skies.src.js +1 -1
  481. package/es-modules/masters/themes/sunset.src.js +1 -1
  482. package/highcharts-3d.js +1 -1
  483. package/highcharts-3d.js.map +1 -1
  484. package/highcharts-3d.src.js +65 -35
  485. package/highcharts-gantt.js +800 -803
  486. package/highcharts-gantt.js.map +1 -1
  487. package/highcharts-gantt.src.js +1356 -1429
  488. package/highcharts-more.js +194 -193
  489. package/highcharts-more.js.map +1 -1
  490. package/highcharts-more.src.js +280 -222
  491. package/highcharts.d.ts +10208 -761
  492. package/highcharts.js +585 -588
  493. package/highcharts.js.map +1 -1
  494. package/highcharts.src.d.ts +10208 -761
  495. package/highcharts.src.js +992 -1066
  496. package/highmaps.js +727 -707
  497. package/highmaps.js.map +1 -1
  498. package/highmaps.src.js +3240 -2135
  499. package/highstock.js +788 -783
  500. package/highstock.js.map +1 -1
  501. package/highstock.src.js +2487 -1981
  502. package/indicators/acceleration-bands.d.ts +17 -1
  503. package/indicators/acceleration-bands.js +11 -9
  504. package/indicators/acceleration-bands.js.map +1 -1
  505. package/indicators/acceleration-bands.src.d.ts +17 -1
  506. package/indicators/acceleration-bands.src.js +238 -112
  507. package/indicators/accumulation-distribution.js +1 -1
  508. package/indicators/accumulation-distribution.src.js +1 -1
  509. package/indicators/ao.js +6 -6
  510. package/indicators/ao.js.map +1 -1
  511. package/indicators/ao.src.js +4 -4
  512. package/indicators/apo.js +5 -6
  513. package/indicators/apo.js.map +1 -1
  514. package/indicators/apo.src.js +16 -84
  515. package/indicators/aroon-oscillator.d.ts +17 -1
  516. package/indicators/aroon-oscillator.js +10 -9
  517. package/indicators/aroon-oscillator.js.map +1 -1
  518. package/indicators/aroon-oscillator.src.d.ts +17 -1
  519. package/indicators/aroon-oscillator.src.js +230 -177
  520. package/indicators/aroon.d.ts +17 -1
  521. package/indicators/aroon.js +11 -9
  522. package/indicators/aroon.js.map +1 -1
  523. package/indicators/aroon.src.d.ts +17 -1
  524. package/indicators/aroon.src.js +227 -112
  525. package/indicators/atr.js +1 -1
  526. package/indicators/atr.src.js +1 -1
  527. package/indicators/bollinger-bands.d.ts +17 -1
  528. package/indicators/bollinger-bands.js +12 -9
  529. package/indicators/bollinger-bands.js.map +1 -1
  530. package/indicators/bollinger-bands.src.d.ts +17 -1
  531. package/indicators/bollinger-bands.src.js +262 -117
  532. package/indicators/cci.js +1 -1
  533. package/indicators/cci.src.js +1 -1
  534. package/indicators/chaikin.js +8 -9
  535. package/indicators/chaikin.js.map +1 -1
  536. package/indicators/chaikin.src.js +8 -76
  537. package/indicators/cmf.js +1 -1
  538. package/indicators/cmf.js.map +1 -1
  539. package/indicators/cmf.src.js +36 -16
  540. package/indicators/cmo.js +1 -1
  541. package/indicators/cmo.src.js +1 -1
  542. package/indicators/dema.js +5 -6
  543. package/indicators/dema.js.map +1 -1
  544. package/indicators/dema.src.js +3 -75
  545. package/indicators/disparity-index.js +6 -7
  546. package/indicators/disparity-index.js.map +1 -1
  547. package/indicators/disparity-index.src.js +20 -74
  548. package/indicators/dmi.js +12 -11
  549. package/indicators/dmi.js.map +1 -1
  550. package/indicators/dmi.src.js +252 -121
  551. package/indicators/dpo.js +1 -1
  552. package/indicators/dpo.src.js +1 -1
  553. package/indicators/ema.js +1 -13
  554. package/indicators/ema.js.map +1 -1
  555. package/indicators/ema.src.js +7 -188
  556. package/indicators/ichimoku-kinko-hyo.js +1 -1
  557. package/indicators/ichimoku-kinko-hyo.js.map +1 -1
  558. package/indicators/ichimoku-kinko-hyo.src.js +7 -7
  559. package/indicators/indicators-all.d.ts +17 -1
  560. package/indicators/indicators-all.js +198 -203
  561. package/indicators/indicators-all.js.map +1 -1
  562. package/indicators/indicators-all.src.d.ts +17 -1
  563. package/indicators/indicators-all.src.js +892 -777
  564. package/indicators/indicators.js +12 -12
  565. package/indicators/indicators.js.map +1 -1
  566. package/indicators/indicators.src.js +213 -144
  567. package/indicators/keltner-channels.d.ts +17 -1
  568. package/indicators/keltner-channels.js +11 -10
  569. package/indicators/keltner-channels.js.map +1 -1
  570. package/indicators/keltner-channels.src.d.ts +17 -1
  571. package/indicators/keltner-channels.src.js +246 -118
  572. package/indicators/klinger.js +14 -13
  573. package/indicators/klinger.js.map +1 -1
  574. package/indicators/klinger.src.js +239 -187
  575. package/indicators/macd.js +2 -2
  576. package/indicators/macd.js.map +1 -1
  577. package/indicators/macd.src.js +3 -4
  578. package/indicators/mfi.js +1 -1
  579. package/indicators/mfi.src.js +1 -1
  580. package/indicators/momentum.js +1 -1
  581. package/indicators/momentum.src.js +1 -1
  582. package/indicators/natr.js +3 -3
  583. package/indicators/natr.js.map +1 -1
  584. package/indicators/natr.src.js +2 -4
  585. package/indicators/obv.js +1 -1
  586. package/indicators/obv.src.js +1 -1
  587. package/indicators/pivot-points.js +1 -1
  588. package/indicators/pivot-points.js.map +1 -1
  589. package/indicators/pivot-points.src.js +3 -2
  590. package/indicators/ppo.js +5 -6
  591. package/indicators/ppo.js.map +1 -1
  592. package/indicators/ppo.src.js +3 -75
  593. package/indicators/price-channel.d.ts +17 -1
  594. package/indicators/price-channel.js +11 -9
  595. package/indicators/price-channel.js.map +1 -1
  596. package/indicators/price-channel.src.d.ts +17 -1
  597. package/indicators/price-channel.src.js +288 -168
  598. package/indicators/price-envelopes.js +1 -1
  599. package/indicators/price-envelopes.src.js +1 -1
  600. package/indicators/psar.js +1 -1
  601. package/indicators/psar.src.js +1 -1
  602. package/indicators/regressions.js +1 -1
  603. package/indicators/regressions.js.map +1 -1
  604. package/indicators/regressions.src.js +39 -21
  605. package/indicators/roc.js +1 -1
  606. package/indicators/roc.src.js +1 -1
  607. package/indicators/rsi.js +1 -1
  608. package/indicators/rsi.js.map +1 -1
  609. package/indicators/rsi.src.js +3 -2
  610. package/indicators/slow-stochastic.js +5 -6
  611. package/indicators/slow-stochastic.js.map +1 -1
  612. package/indicators/slow-stochastic.src.js +2 -72
  613. package/indicators/stochastic.d.ts +17 -1
  614. package/indicators/stochastic.js +12 -10
  615. package/indicators/stochastic.js.map +1 -1
  616. package/indicators/stochastic.src.d.ts +17 -1
  617. package/indicators/stochastic.src.js +282 -165
  618. package/indicators/supertrend.js +10 -10
  619. package/indicators/supertrend.js.map +1 -1
  620. package/indicators/supertrend.src.js +6 -7
  621. package/indicators/tema.js +6 -7
  622. package/indicators/tema.js.map +1 -1
  623. package/indicators/tema.src.js +28 -75
  624. package/indicators/trendline.js +1 -1
  625. package/indicators/trendline.src.js +1 -1
  626. package/indicators/trix.js +4 -5
  627. package/indicators/trix.js.map +1 -1
  628. package/indicators/trix.src.js +8 -76
  629. package/indicators/volume-by-price.js +16 -16
  630. package/indicators/volume-by-price.js.map +1 -1
  631. package/indicators/volume-by-price.src.js +27 -10
  632. package/indicators/vwap.js +1 -1
  633. package/indicators/vwap.js.map +1 -1
  634. package/indicators/vwap.src.js +20 -8
  635. package/indicators/williams-r.js +5 -6
  636. package/indicators/williams-r.js.map +1 -1
  637. package/indicators/williams-r.src.js +41 -51
  638. package/indicators/wma.js +1 -1
  639. package/indicators/wma.src.js +1 -1
  640. package/indicators/zigzag.js +1 -1
  641. package/indicators/zigzag.src.js +1 -1
  642. package/modules/accessibility.d.ts +0 -30
  643. package/modules/accessibility.js +241 -216
  644. package/modules/accessibility.js.map +1 -1
  645. package/modules/accessibility.src.d.ts +0 -30
  646. package/modules/accessibility.src.js +7818 -6398
  647. package/modules/annotations-advanced.d.ts +30 -0
  648. package/modules/annotations-advanced.js +192 -165
  649. package/modules/annotations-advanced.js.map +1 -1
  650. package/modules/annotations-advanced.src.d.ts +30 -0
  651. package/modules/annotations-advanced.src.js +1716 -416
  652. package/modules/annotations.js +125 -110
  653. package/modules/annotations.js.map +1 -1
  654. package/modules/annotations.src.js +1059 -304
  655. package/modules/arrow-symbols.js +1 -1
  656. package/modules/arrow-symbols.src.js +1 -1
  657. package/modules/boost-canvas.js +15 -15
  658. package/modules/boost-canvas.js.map +1 -1
  659. package/modules/boost-canvas.src.js +3 -3
  660. package/modules/boost.js +79 -79
  661. package/modules/boost.js.map +1 -1
  662. package/modules/boost.src.js +42 -51
  663. package/modules/broken-axis.js +1 -1
  664. package/modules/broken-axis.js.map +1 -1
  665. package/modules/broken-axis.src.js +18 -12
  666. package/modules/bullet.js +1 -1
  667. package/modules/bullet.src.js +1 -1
  668. package/modules/coloraxis.js +24 -24
  669. package/modules/coloraxis.js.map +1 -1
  670. package/modules/coloraxis.src.js +77 -103
  671. package/modules/current-date-indicator.js +4 -4
  672. package/modules/current-date-indicator.js.map +1 -1
  673. package/modules/current-date-indicator.src.js +4 -4
  674. package/modules/cylinder.js +1 -1
  675. package/modules/cylinder.js.map +1 -1
  676. package/modules/cylinder.src.js +37 -5
  677. package/modules/data.d.ts +6 -6
  678. package/modules/data.js +31 -31
  679. package/modules/data.js.map +1 -1
  680. package/modules/data.src.d.ts +6 -6
  681. package/modules/data.src.js +18 -58
  682. package/modules/datagrouping.js +20 -20
  683. package/modules/datagrouping.js.map +1 -1
  684. package/modules/datagrouping.src.js +54 -33
  685. package/modules/debugger.js +1 -1
  686. package/modules/debugger.src.js +1 -1
  687. package/modules/dependency-wheel.js +11 -11
  688. package/modules/dependency-wheel.js.map +1 -1
  689. package/modules/dependency-wheel.src.js +5 -8
  690. package/modules/dotplot.js +1 -1
  691. package/modules/dotplot.src.js +1 -1
  692. package/modules/drag-panes.js +8 -8
  693. package/modules/drag-panes.js.map +1 -1
  694. package/modules/drag-panes.src.js +3 -3
  695. package/modules/draggable-points.js +1 -1
  696. package/modules/draggable-points.js.map +1 -1
  697. package/modules/draggable-points.src.js +8 -9
  698. package/modules/drilldown.js +24 -24
  699. package/modules/drilldown.js.map +1 -1
  700. package/modules/drilldown.src.js +13 -8
  701. package/modules/dumbbell.js +17 -17
  702. package/modules/dumbbell.js.map +1 -1
  703. package/modules/dumbbell.src.js +4 -8
  704. package/modules/export-data.js +19 -19
  705. package/modules/export-data.js.map +1 -1
  706. package/modules/export-data.src.js +9 -8
  707. package/modules/exporting.js +39 -38
  708. package/modules/exporting.js.map +1 -1
  709. package/modules/exporting.src.js +132 -113
  710. package/modules/full-screen.js +1 -1
  711. package/modules/full-screen.js.map +1 -1
  712. package/modules/full-screen.src.js +5 -4
  713. package/modules/funnel.js +12 -12
  714. package/modules/funnel.js.map +1 -1
  715. package/modules/funnel.src.js +9 -6
  716. package/modules/funnel3d.js +1 -1
  717. package/modules/funnel3d.js.map +1 -1
  718. package/modules/funnel3d.src.js +17 -10
  719. package/modules/gantt.js +217 -218
  720. package/modules/gantt.js.map +1 -1
  721. package/modules/gantt.src.js +364 -363
  722. package/modules/grid-axis.js +1 -1
  723. package/modules/grid-axis.js.map +1 -1
  724. package/modules/grid-axis.src.js +27 -19
  725. package/modules/heatmap.js +39 -39
  726. package/modules/heatmap.js.map +1 -1
  727. package/modules/heatmap.src.js +132 -141
  728. package/modules/heikinashi.js +1 -1
  729. package/modules/heikinashi.js.map +1 -1
  730. package/modules/heikinashi.src.js +12 -10
  731. package/modules/histogram-bellcurve.js +13 -13
  732. package/modules/histogram-bellcurve.js.map +1 -1
  733. package/modules/histogram-bellcurve.src.js +97 -91
  734. package/modules/hollowcandlestick.js +9 -9
  735. package/modules/hollowcandlestick.js.map +1 -1
  736. package/modules/hollowcandlestick.src.js +31 -35
  737. package/modules/item-series.js +6 -6
  738. package/modules/item-series.js.map +1 -1
  739. package/modules/item-series.src.js +6 -6
  740. package/modules/lollipop.js +1 -1
  741. package/modules/lollipop.src.js +1 -1
  742. package/modules/map.d.ts +138 -14
  743. package/modules/map.js +144 -122
  744. package/modules/map.js.map +1 -1
  745. package/modules/map.src.d.ts +138 -14
  746. package/modules/map.src.js +2253 -1074
  747. package/modules/marker-clusters.js +36 -36
  748. package/modules/marker-clusters.js.map +1 -1
  749. package/modules/marker-clusters.src.js +176 -143
  750. package/modules/networkgraph.d.ts +12 -1
  751. package/modules/networkgraph.js +49 -49
  752. package/modules/networkgraph.js.map +1 -1
  753. package/modules/networkgraph.src.d.ts +12 -1
  754. package/modules/networkgraph.src.js +103 -78
  755. package/modules/no-data-to-display.js +5 -5
  756. package/modules/no-data-to-display.js.map +1 -1
  757. package/modules/no-data-to-display.src.js +3 -3
  758. package/modules/offline-exporting.js +18 -18
  759. package/modules/offline-exporting.js.map +1 -1
  760. package/modules/offline-exporting.src.js +38 -43
  761. package/modules/oldie-polyfills.js +1 -1
  762. package/modules/oldie-polyfills.src.js +1 -1
  763. package/modules/oldie.js +26 -26
  764. package/modules/oldie.js.map +1 -1
  765. package/modules/oldie.src.js +21 -81
  766. package/modules/organization.js +13 -13
  767. package/modules/organization.js.map +1 -1
  768. package/modules/organization.src.js +8 -6
  769. package/modules/overlapping-datalabels.js +1 -1
  770. package/modules/overlapping-datalabels.src.js +1 -1
  771. package/modules/parallel-coordinates.js +1 -1
  772. package/modules/parallel-coordinates.js.map +1 -1
  773. package/modules/parallel-coordinates.src.js +6 -4
  774. package/modules/pareto.js +7 -7
  775. package/modules/pareto.js.map +1 -1
  776. package/modules/pareto.src.js +89 -78
  777. package/modules/pathfinder.js +1 -1
  778. package/modules/pathfinder.js.map +1 -1
  779. package/modules/pathfinder.src.js +21 -20
  780. package/modules/pattern-fill.js +1 -1
  781. package/modules/pattern-fill.js.map +1 -1
  782. package/modules/pattern-fill.src.js +18 -12
  783. package/modules/price-indicator.js +1 -1
  784. package/modules/price-indicator.js.map +1 -1
  785. package/modules/price-indicator.src.js +3 -2
  786. package/modules/pyramid3d.js +1 -1
  787. package/modules/pyramid3d.js.map +1 -1
  788. package/modules/pyramid3d.src.js +3 -2
  789. package/modules/sankey.d.ts +12 -1
  790. package/modules/sankey.js +29 -29
  791. package/modules/sankey.js.map +1 -1
  792. package/modules/sankey.src.d.ts +12 -1
  793. package/modules/sankey.src.js +307 -181
  794. package/modules/series-label.js +1 -1
  795. package/modules/series-label.js.map +1 -1
  796. package/modules/series-label.src.js +2 -2
  797. package/modules/solid-gauge.js +1 -1
  798. package/modules/solid-gauge.js.map +1 -1
  799. package/modules/solid-gauge.src.js +17 -2
  800. package/modules/sonification.js +59 -55
  801. package/modules/sonification.js.map +1 -1
  802. package/modules/sonification.src.js +3093 -2594
  803. package/modules/static-scale.js +1 -1
  804. package/modules/static-scale.src.js +1 -1
  805. package/modules/stock-tools.js +178 -163
  806. package/modules/stock-tools.js.map +1 -1
  807. package/modules/stock-tools.src.js +1136 -229
  808. package/modules/stock.d.ts +39 -6
  809. package/modules/stock.js +204 -196
  810. package/modules/stock.js.map +1 -1
  811. package/modules/stock.src.d.ts +39 -6
  812. package/modules/stock.src.js +1820 -1240
  813. package/modules/streamgraph.js +1 -1
  814. package/modules/streamgraph.src.js +1 -1
  815. package/modules/sunburst.js +60 -60
  816. package/modules/sunburst.js.map +1 -1
  817. package/modules/sunburst.src.js +281 -248
  818. package/modules/tilemap.js +17 -17
  819. package/modules/tilemap.js.map +1 -1
  820. package/modules/tilemap.src.js +3 -13
  821. package/modules/timeline.js +18 -18
  822. package/modules/timeline.js.map +1 -1
  823. package/modules/timeline.src.js +5 -5
  824. package/modules/treegrid.js +56 -57
  825. package/modules/treegrid.js.map +1 -1
  826. package/modules/treegrid.src.js +201 -169
  827. package/modules/treemap.js +41 -41
  828. package/modules/treemap.js.map +1 -1
  829. package/modules/treemap.src.js +266 -232
  830. package/modules/variable-pie.js +1 -1
  831. package/modules/variable-pie.src.js +1 -1
  832. package/modules/variwide.js +1 -1
  833. package/modules/variwide.js.map +1 -1
  834. package/modules/variwide.src.js +7 -3
  835. package/modules/vector.js +1 -1
  836. package/modules/vector.src.js +1 -1
  837. package/modules/venn.js +31 -31
  838. package/modules/venn.js.map +1 -1
  839. package/modules/venn.src.js +740 -731
  840. package/modules/windbarb.js +15 -15
  841. package/modules/windbarb.js.map +1 -1
  842. package/modules/windbarb.src.js +90 -62
  843. package/modules/wordcloud.js +23 -24
  844. package/modules/wordcloud.js.map +1 -1
  845. package/modules/wordcloud.src.js +898 -954
  846. package/modules/xrange.js +2 -2
  847. package/modules/xrange.js.map +1 -1
  848. package/modules/xrange.src.js +12 -33
  849. package/package.json +1 -1
  850. package/themes/avocado.js +1 -1
  851. package/themes/avocado.src.js +1 -1
  852. package/themes/brand-dark.js +15 -0
  853. package/themes/brand-dark.js.map +1 -0
  854. package/themes/brand-dark.src.js +328 -0
  855. package/themes/brand-light.js +15 -0
  856. package/themes/brand-light.js.map +1 -0
  857. package/themes/brand-light.src.js +294 -0
  858. package/themes/dark-blue.js +1 -1
  859. package/themes/dark-blue.src.js +1 -1
  860. package/themes/dark-green.js +1 -1
  861. package/themes/dark-green.src.js +1 -1
  862. package/themes/dark-unica.js +1 -1
  863. package/themes/dark-unica.js.map +1 -1
  864. package/themes/dark-unica.src.js +5 -3
  865. package/themes/gray.js +1 -1
  866. package/themes/gray.src.js +1 -1
  867. package/themes/grid-light.js +1 -1
  868. package/themes/grid-light.js.map +1 -1
  869. package/themes/grid-light.src.js +5 -3
  870. package/themes/grid.js +1 -1
  871. package/themes/grid.js.map +1 -1
  872. package/themes/grid.src.js +5 -3
  873. package/themes/high-contrast-dark.js +1 -1
  874. package/themes/high-contrast-dark.src.js +1 -1
  875. package/themes/high-contrast-light.js +1 -1
  876. package/themes/high-contrast-light.src.js +1 -1
  877. package/themes/sand-signika.js +1 -1
  878. package/themes/sand-signika.src.js +1 -1
  879. package/themes/skies.js +1 -1
  880. package/themes/skies.src.js +1 -1
  881. package/themes/sunset.js +1 -1
  882. package/themes/sunset.src.js +1 -1
  883. package/es-modules/Core/Axis/MapAxis.js +0 -157
  884. package/es-modules/Core/Color/Palette.js +0 -82
  885. package/es-modules/Extensions/Sonification/InstrumentDefinitions.js +0 -32
  886. package/es-modules/Mixins/ColorSeries.js +0 -77
  887. package/es-modules/Mixins/DerivedSeries.js +0 -118
  888. package/es-modules/Mixins/DrawPoint.js +0 -81
  889. package/es-modules/Mixins/IndicatorRequired.js +0 -56
  890. package/es-modules/Mixins/MultipleLines.js +0 -181
  891. package/es-modules/Mixins/Navigation.js +0 -54
  892. package/es-modules/Mixins/NelderMead.js +0 -132
  893. package/es-modules/Mixins/Polygon.js +0 -259
  894. package/es-modules/Mixins/ReduceArray.js +0 -54
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highstock JS v9.2.2 (2021-08-24)
2
+ * @license Highstock JS v9.3.3 (2022-02-01)
3
3
  *
4
4
  * All technical indicators for Highcharts Stock
5
5
  *
@@ -28,68 +28,6 @@
28
28
  obj[path] = fn.apply(null, args);
29
29
  }
30
30
  }
31
- _registerModule(_modules, 'Mixins/IndicatorRequired.js', [_modules['Core/Utilities.js']], function (U) {
32
- /**
33
- *
34
- * (c) 2010-2021 Daniel Studencki
35
- *
36
- * License: www.highcharts.com/license
37
- *
38
- * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
39
- *
40
- * */
41
- var error = U.error;
42
- /* eslint-disable no-invalid-this, valid-jsdoc */
43
- var requiredIndicatorMixin = {
44
- /**
45
- * Check whether given indicator is loaded,
46
- else throw error.
47
- * @private
48
- * @param {Highcharts.Indicator} indicator
49
- * Indicator constructor function.
50
- * @param {string} requiredIndicator
51
- * Required indicator type.
52
- * @param {string} type
53
- * Type of indicator where function was called (parent).
54
- * @param {Highcharts.IndicatorCallbackFunction} callback
55
- * Callback which is triggered if the given indicator is loaded.
56
- * Takes indicator as an argument.
57
- * @param {string} errMessage
58
- * Error message that will be logged in console.
59
- * @return {boolean}
60
- * Returns false when there is no required indicator loaded.
61
- */
62
- isParentLoaded: function (indicator,
63
- requiredIndicator,
64
- type,
65
- callback,
66
- errMessage) {
67
- if (indicator) {
68
- return callback ? callback(indicator) : true;
69
- }
70
- error(errMessage || this.generateMessage(type, requiredIndicator));
71
- return false;
72
- },
73
- /**
74
- * @private
75
- * @param {string} indicatorType
76
- * Indicator type
77
- * @param {string} required
78
- * Required indicator
79
- * @return {string}
80
- * Error message
81
- */
82
- generateMessage: function (indicatorType, required) {
83
- return 'Error: "' + indicatorType +
84
- '" indicator type requires "' + required +
85
- '" indicator loaded before. Please read docs: ' +
86
- 'https://api.highcharts.com/highstock/plotOptions.' +
87
- indicatorType;
88
- }
89
- };
90
-
91
- return requiredIndicatorMixin;
92
- });
93
31
  _registerModule(_modules, 'Stock/Indicators/SMA/SMAComposition.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
94
32
  /* *
95
33
  *
@@ -102,37 +40,9 @@
102
40
  ohlcProto = SeriesRegistry.seriesTypes.ohlc.prototype;
103
41
  var addEvent = U.addEvent,
104
42
  extend = U.extend;
105
- /* *
106
- *
107
- * Composition
108
- *
109
- * */
110
- addEvent(Series, 'init', function (eventOptions) {
111
- // eslint-disable-next-line no-invalid-this
112
- var series = this,
113
- options = eventOptions.options;
114
- if (options.useOhlcData &&
115
- options.id !== 'highcharts-navigator-series') {
116
- extend(series, {
117
- pointValKey: ohlcProto.pointValKey,
118
- // keys: ohlcProto.keys, // @todo potentially nonsense
119
- pointArrayMap: ohlcProto.pointArrayMap,
120
- toYData: ohlcProto.toYData
121
- });
122
- }
123
- });
124
- addEvent(Series, 'afterSetOptions', function (e) {
125
- var options = e.options,
126
- dataGrouping = options.dataGrouping;
127
- if (dataGrouping &&
128
- options.useOhlcData &&
129
- options.id !== 'highcharts-navigator-series') {
130
- dataGrouping.approximation = 'ohlc';
131
- }
132
- });
133
43
 
134
44
  });
135
- _registerModule(_modules, 'Stock/Indicators/SMA/SMAIndicator.js', [_modules['Core/Chart/Chart.js'], _modules['Mixins/IndicatorRequired.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (Chart, RequiredIndicatorMixin, SeriesRegistry, U) {
45
+ _registerModule(_modules, 'Stock/Indicators/SMA/SMAIndicator.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (Chart, SeriesRegistry, U) {
136
46
  /* *
137
47
  *
138
48
  * License: www.highcharts.com/license
@@ -164,7 +74,6 @@
164
74
  merge = U.merge,
165
75
  pick = U.pick,
166
76
  splat = U.splat;
167
- var generateMessage = RequiredIndicatorMixin.generateMessage;
168
77
  /* *
169
78
  *
170
79
  * Class
@@ -278,12 +187,7 @@
278
187
  * @private
279
188
  */
280
189
  SMAIndicator.prototype.init = function (chart, options) {
281
- var indicator = this,
282
- requiredIndicators = indicator.requireIndicators();
283
- // Check whether all required indicators are loaded.
284
- if (!requiredIndicators.allLoaded) {
285
- return error(generateMessage(indicator.type, requiredIndicators.needed));
286
- }
190
+ var indicator = this;
287
191
  _super.prototype.init.call(indicator, chart, options);
288
192
  // Only after series are linked indicator can be processed.
289
193
  var linkedSeriesUnbiner = addEvent(Chart, 'afterLinkSeries',
@@ -291,27 +195,35 @@
291
195
  var hasEvents = !!indicator.dataEventsToUnbind.length;
292
196
  if (indicator.linkedParent) {
293
197
  if (!hasEvents) {
294
- indicator.dataEventsToUnbind.push(addEvent(indicator.bindTo.series ?
295
- indicator.linkedParent :
296
- indicator.linkedParent.xAxis, indicator.bindTo.eventName, function () {
198
+ // No matter which indicator, always recalculate after
199
+ // updating the data.
200
+ indicator.dataEventsToUnbind.push(addEvent(indicator.linkedParent, 'updatedData', function () {
297
201
  indicator.recalculateValues();
298
202
  }));
203
+ // Some indicators (like VBP) requires an additional
204
+ // event (afterSetExtremes) to properly show the data.
205
+ if (indicator.calculateOn.xAxis) {
206
+ indicator.dataEventsToUnbind.push(addEvent(indicator.linkedParent.xAxis, indicator.calculateOn.xAxis, function () {
207
+ indicator.recalculateValues();
208
+ }));
209
+ }
299
210
  }
300
- if (indicator.calculateOn === 'init') {
211
+ // Most indicators are being calculated on chart's init.
212
+ if (indicator.calculateOn.chart === 'init') {
301
213
  if (!indicator.processedYData) {
302
214
  indicator.recalculateValues();
303
215
  }
304
216
  }
305
- else {
306
- if (!hasEvents) {
307
- var unbinder_1 = addEvent(indicator.chart,
308
- indicator.calculateOn,
309
- function () {
310
- indicator.recalculateValues();
311
- // Call this just once, on init
312
- unbinder_1();
313
- });
314
- }
217
+ else if (!hasEvents) {
218
+ // Some indicators (like VBP) has to recalculate their
219
+ // values after other chart's events (render).
220
+ var unbinder_1 = addEvent(indicator.chart,
221
+ indicator.calculateOn.chart,
222
+ function () {
223
+ indicator.recalculateValues();
224
+ // Call this just once.
225
+ unbinder_1();
226
+ });
315
227
  }
316
228
  }
317
229
  else {
@@ -329,7 +241,6 @@
329
241
  };
330
242
  /**
331
243
  * @private
332
- * @return {void}
333
244
  */
334
245
  SMAIndicator.prototype.recalculateValues = function () {
335
246
  var indicator = this,
@@ -394,7 +305,7 @@
394
305
  }
395
306
  // Removal of processedXData property is required because on
396
307
  // first translate processedXData array is empty
397
- if (indicator.bindTo.series === false) {
308
+ if (indicator.calculateOn.xAxis && indicator.processedXData) {
398
309
  delete indicator.processedXData;
399
310
  indicator.isDirty = true;
400
311
  indicator.redraw();
@@ -409,31 +320,16 @@
409
320
  compareToMain = series.options.compareToMain,
410
321
  linkedParent = series.linkedParent;
411
322
  _super.prototype.processData.apply(series, arguments);
412
- if (linkedParent && linkedParent.compareValue && compareToMain) {
413
- series.compareValue = linkedParent.compareValue;
323
+ if (series.dataModify &&
324
+ linkedParent &&
325
+ linkedParent.dataModify &&
326
+ linkedParent.dataModify.compareValue &&
327
+ compareToMain) {
328
+ series.dataModify.compareValue =
329
+ linkedParent.dataModify.compareValue;
414
330
  }
415
331
  return;
416
332
  };
417
- /**
418
- * @private
419
- */
420
- SMAIndicator.prototype.requireIndicators = function () {
421
- var obj = {
422
- allLoaded: true
423
- };
424
- // Check whether all required indicators are loaded, else return
425
- // the object with missing indicator's name.
426
- this.requiredIndicators.forEach(function (indicator) {
427
- if (SeriesRegistry.seriesTypes[indicator]) {
428
- SeriesRegistry.seriesTypes[indicator].prototype.requireIndicators();
429
- }
430
- else {
431
- obj.allLoaded = false;
432
- obj.needed = indicator;
433
- }
434
- });
435
- return obj;
436
- };
437
333
  /**
438
334
  * The parameter allows setting line series type and use OHLC indicators.
439
335
  * Data in OHLC format is required.
@@ -504,7 +400,7 @@
504
400
  * example using OHLC data, index=2 means the indicator will be
505
401
  * calculated using Low values.
506
402
  */
507
- index: 0,
403
+ index: 3,
508
404
  /**
509
405
  * The base period for indicator calculations. This is the number of
510
406
  * data points which are taken into account for the indicator
@@ -516,16 +412,12 @@
516
412
  return SMAIndicator;
517
413
  }(LineSeries));
518
414
  extend(SMAIndicator.prototype, {
519
- bindTo: {
520
- series: true,
521
- eventName: 'updatedData'
415
+ calculateOn: {
416
+ chart: 'init'
522
417
  },
523
- calculateOn: 'init',
524
418
  hasDerivedData: true,
525
419
  nameComponents: ['period'],
526
420
  nameSuffixes: [],
527
- // Defines on which other indicators is this indicator based on.
528
- requiredIndicators: [],
529
421
  useCommonDataGrouping: true
530
422
  });
531
423
  SeriesRegistry.registerSeriesType('sma', SMAIndicator);
@@ -554,6 +446,183 @@
554
446
 
555
447
  return SMAIndicator;
556
448
  });
449
+ _registerModule(_modules, 'Stock/Indicators/EMA/EMAIndicator.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
450
+ /* *
451
+ *
452
+ * License: www.highcharts.com/license
453
+ *
454
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
455
+ *
456
+ * */
457
+ var __extends = (this && this.__extends) || (function () {
458
+ var extendStatics = function (d,
459
+ b) {
460
+ extendStatics = Object.setPrototypeOf ||
461
+ ({ __proto__: [] } instanceof Array && function (d,
462
+ b) { d.__proto__ = b; }) ||
463
+ function (d,
464
+ b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
465
+ return extendStatics(d, b);
466
+ };
467
+ return function (d, b) {
468
+ extendStatics(d, b);
469
+ function __() { this.constructor = d; }
470
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
471
+ };
472
+ })();
473
+ var SMAIndicator = SeriesRegistry.seriesTypes.sma;
474
+ var correctFloat = U.correctFloat,
475
+ isArray = U.isArray,
476
+ merge = U.merge;
477
+ /* *
478
+ *
479
+ * Class
480
+ *
481
+ * */
482
+ /**
483
+ * The EMA series type.
484
+ *
485
+ * @private
486
+ * @class
487
+ * @name Highcharts.seriesTypes.ema
488
+ *
489
+ * @augments Highcharts.Series
490
+ */
491
+ var EMAIndicator = /** @class */ (function (_super) {
492
+ __extends(EMAIndicator, _super);
493
+ function EMAIndicator() {
494
+ var _this = _super !== null && _super.apply(this,
495
+ arguments) || this;
496
+ /* *
497
+ *
498
+ * Properties
499
+ *
500
+ * */
501
+ _this.data = void 0;
502
+ _this.options = void 0;
503
+ _this.points = void 0;
504
+ return _this;
505
+ }
506
+ /* *
507
+ *
508
+ * Functions
509
+ *
510
+ * */
511
+ EMAIndicator.prototype.accumulatePeriodPoints = function (period, index, yVal) {
512
+ var sum = 0,
513
+ i = 0,
514
+ y = 0;
515
+ while (i < period) {
516
+ y = index < 0 ? yVal[i] : yVal[i][index];
517
+ sum = sum + y;
518
+ i++;
519
+ }
520
+ return sum;
521
+ };
522
+ EMAIndicator.prototype.calculateEma = function (xVal, yVal, i, EMApercent, calEMA, index, SMA) {
523
+ var x = xVal[i - 1],
524
+ yValue = index < 0 ?
525
+ yVal[i - 1] :
526
+ yVal[i - 1][index],
527
+ y;
528
+ y = typeof calEMA === 'undefined' ?
529
+ SMA : correctFloat((yValue * EMApercent) +
530
+ (calEMA * (1 - EMApercent)));
531
+ return [x, y];
532
+ };
533
+ EMAIndicator.prototype.getValues = function (series, params) {
534
+ var period = params.period,
535
+ xVal = series.xData,
536
+ yVal = series.yData,
537
+ yValLen = yVal ? yVal.length : 0,
538
+ EMApercent = 2 / (period + 1),
539
+ sum = 0,
540
+ EMA = [],
541
+ xData = [],
542
+ yData = [],
543
+ index = -1,
544
+ SMA = 0,
545
+ calEMA,
546
+ EMAPoint,
547
+ i;
548
+ // Check period, if bigger than points length, skip
549
+ if (yValLen < period) {
550
+ return;
551
+ }
552
+ // Switch index for OHLC / Candlestick / Arearange
553
+ if (isArray(yVal[0])) {
554
+ index = params.index ? params.index : 0;
555
+ }
556
+ // Accumulate first N-points
557
+ sum = this.accumulatePeriodPoints(period, index, yVal);
558
+ // first point
559
+ SMA = sum / period;
560
+ // Calculate value one-by-one for each period in visible data
561
+ for (i = period; i < yValLen + 1; i++) {
562
+ EMAPoint = this.calculateEma(xVal, yVal, i, EMApercent, calEMA, index, SMA);
563
+ EMA.push(EMAPoint);
564
+ xData.push(EMAPoint[0]);
565
+ yData.push(EMAPoint[1]);
566
+ calEMA = EMAPoint[1];
567
+ }
568
+ return {
569
+ values: EMA,
570
+ xData: xData,
571
+ yData: yData
572
+ };
573
+ };
574
+ /**
575
+ * Exponential moving average indicator (EMA). This series requires the
576
+ * `linkedTo` option to be set.
577
+ *
578
+ * @sample stock/indicators/ema
579
+ * Exponential moving average indicator
580
+ *
581
+ * @extends plotOptions.sma
582
+ * @since 6.0.0
583
+ * @product highstock
584
+ * @requires stock/indicators/indicators
585
+ * @optionparent plotOptions.ema
586
+ */
587
+ EMAIndicator.defaultOptions = merge(SMAIndicator.defaultOptions, {
588
+ params: {
589
+ /**
590
+ * The point index which indicator calculations will base. For
591
+ * example using OHLC data, index=2 means the indicator will be
592
+ * calculated using Low values.
593
+ *
594
+ * By default index value used to be set to 0. Since
595
+ * Highcharts Stock 7 by default index is set to 3
596
+ * which means that the ema indicator will be
597
+ * calculated using Close values.
598
+ */
599
+ index: 3,
600
+ period: 9 // @merge 14 in v6.2
601
+ }
602
+ });
603
+ return EMAIndicator;
604
+ }(SMAIndicator));
605
+ SeriesRegistry.registerSeriesType('ema', EMAIndicator);
606
+ /* *
607
+ *
608
+ * Default Export
609
+ *
610
+ * */
611
+ /**
612
+ * A `EMA` series. If the [type](#series.ema.type) option is not
613
+ * specified, it is inherited from [chart.type](#chart.type).
614
+ *
615
+ * @extends series,plotOptions.ema
616
+ * @since 6.0.0
617
+ * @product highstock
618
+ * @excluding dataParser, dataURL
619
+ * @requires stock/indicators/indicators
620
+ * @apioption series.ema
621
+ */
622
+ ''; // adds doclet above to the transpiled file
623
+
624
+ return EMAIndicator;
625
+ });
557
626
  _registerModule(_modules, 'Stock/Indicators/AD/ADIndicator.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
558
627
  /* *
559
628
  *
@@ -737,7 +806,7 @@
737
806
 
738
807
  return ADIndicator;
739
808
  });
740
- _registerModule(_modules, 'Stock/Indicators/AO/AOIndicator.js', [_modules['Core/Globals.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js'], _modules['Core/Color/Palette.js']], function (H, SeriesRegistry, U, palette) {
809
+ _registerModule(_modules, 'Stock/Indicators/AO/AOIndicator.js', [_modules['Core/Globals.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (H, SeriesRegistry, U) {
741
810
  /* *
742
811
  *
743
812
  * License: www.highcharts.com/license
@@ -919,7 +988,7 @@
919
988
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
920
989
  * @since 7.0.0
921
990
  */
922
- greaterBarColor: palette.positiveColor,
991
+ greaterBarColor: "#06b535" /* positiveColor */,
923
992
  /**
924
993
  * Color of the Awesome oscillator series bar that is lower than the
925
994
  * previous one. Note that if a `color` is defined, the `color`
@@ -931,7 +1000,7 @@
931
1000
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
932
1001
  * @since 7.0.0
933
1002
  */
934
- lowerBarColor: palette.negativeColor,
1003
+ lowerBarColor: "#f21313" /* negativeColor */,
935
1004
  threshold: 0,
936
1005
  groupPadding: 0.2,
937
1006
  pointPadding: 0.2,
@@ -980,7 +1049,7 @@
980
1049
 
981
1050
  return AOIndicator;
982
1051
  });
983
- _registerModule(_modules, 'Mixins/MultipleLines.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (H, U) {
1052
+ _registerModule(_modules, 'Stock/Indicators/MultipleLinesComposition.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
984
1053
  /**
985
1054
  *
986
1055
  * (c) 2010-2021 Wojciech Chmiel
@@ -990,131 +1059,151 @@
990
1059
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
991
1060
  *
992
1061
  * */
1062
+ var SMAIndicator = SeriesRegistry.seriesTypes.sma;
993
1063
  var defined = U.defined,
994
1064
  error = U.error,
995
1065
  merge = U.merge;
996
- var SMA = H.seriesTypes.sma;
1066
+ /* *
1067
+ *
1068
+ * Composition
1069
+ *
1070
+ * */
997
1071
  /**
998
- * Mixin useful for all indicators that have more than one line.
999
- * Merge it with your implementation where you will provide
1000
- * getValues method appropriate to your indicator and pointArrayMap,
1001
- * pointValKey, linesApiNames properites. Notice that pointArrayMap
1002
- * should be consistent with amount of lines calculated in getValues method.
1072
+ * Composition useful for all indicators that have more than one line. Compose
1073
+ * it with your implementation where you will provide the `getValues` method
1074
+ * appropriate to your indicator and `pointArrayMap`, `pointValKey`,
1075
+ * `linesApiNames` properties. Notice that `pointArrayMap` should be consistent
1076
+ * with the amount of lines calculated in the `getValues` method.
1003
1077
  *
1004
1078
  * @private
1005
1079
  * @mixin multipleLinesMixin
1006
1080
  */
1007
- var multipleLinesMixin = {
1008
- /* eslint-disable valid-jsdoc */
1009
- /**
1010
- * Lines ids. Required to plot appropriate amount of lines.
1011
- * Notice that pointArrayMap should have more elements than
1012
- * linesApiNames, because it contains main line and additional lines ids.
1013
- * Also it should be consistent with amount of lines calculated in
1014
- * getValues method from your implementation.
1015
- *
1016
- * @private
1017
- * @name multipleLinesMixin.pointArrayMap
1018
- * @type {Array<string>}
1019
- */
1020
- pointArrayMap: ['top', 'bottom'],
1021
- /**
1022
- * Main line id.
1023
- *
1024
- * @private
1025
- * @name multipleLinesMixin.pointValKey
1026
- * @type {string}
1027
- */
1028
- pointValKey: 'top',
1029
- /**
1030
- * Additional lines DOCS names. Elements of linesApiNames array should
1031
- * be consistent with DOCS line names defined in your implementation.
1032
- * Notice that linesApiNames should have decreased amount of elements
1033
- * relative to pointArrayMap (without pointValKey).
1034
- *
1035
- * @private
1036
- * @name multipleLinesMixin.linesApiNames
1037
- * @type {Array<string>}
1038
- */
1039
- linesApiNames: ['bottomLine'],
1040
- /**
1041
- * Create translatedLines Collection based on pointArrayMap.
1042
- *
1043
- * @private
1044
- * @function multipleLinesMixin.getTranslatedLinesNames
1045
- * @param {string} [excludedValue]
1046
- * Main line id
1047
- * @return {Array<string>}
1048
- * Returns translated lines names without excluded value.
1049
- */
1050
- getTranslatedLinesNames: function (excludedValue) {
1051
- var translatedLines = [];
1052
- (this.pointArrayMap || []).forEach(function (propertyName) {
1053
- if (propertyName !== excludedValue) {
1054
- translatedLines.push('plot' +
1055
- propertyName.charAt(0).toUpperCase() +
1056
- propertyName.slice(1));
1057
- }
1058
- });
1059
- return translatedLines;
1060
- },
1081
+ var MultipleLinesComposition;
1082
+ (function (MultipleLinesComposition) {
1083
+ /* *
1084
+ *
1085
+ * Declarations
1086
+ *
1087
+ * */
1088
+ /* *
1089
+ *
1090
+ * Constants
1091
+ *
1092
+ * */
1093
+ var composedClasses = [];
1061
1094
  /**
1095
+ * Additional lines DOCS names. Elements of linesApiNames array should
1096
+ * be consistent with DOCS line names defined in your implementation.
1097
+ * Notice that linesApiNames should have decreased amount of elements
1098
+ * relative to pointArrayMap (without pointValKey).
1099
+ *
1062
1100
  * @private
1063
- * @function multipleLinesMixin.toYData
1064
- * @param {Highcharts.Point} point
1065
- * Indicator point
1066
- * @return {Array<number>}
1067
- * Returns point Y value for all lines
1101
+ * @name multipleLinesMixin.linesApiNames
1102
+ * @type {Array<string>}
1068
1103
  */
1069
- toYData: function (point) {
1070
- var pointColl = [];
1071
- (this.pointArrayMap || []).forEach(function (propertyName) {
1072
- pointColl.push(point[propertyName]);
1073
- });
1074
- return pointColl;
1075
- },
1104
+ var linesApiNames = ['bottomLine'];
1076
1105
  /**
1077
- * Add lines plot pixel values.
1106
+ * Lines ids. Required to plot appropriate amount of lines.
1107
+ * Notice that pointArrayMap should have more elements than
1108
+ * linesApiNames, because it contains main line and additional lines ids.
1109
+ * Also it should be consistent with amount of lines calculated in
1110
+ * getValues method from your implementation.
1078
1111
  *
1079
1112
  * @private
1080
- * @function multipleLinesMixin.translate
1081
- * @return {void}
1113
+ * @name multipleLinesMixin.pointArrayMap
1114
+ * @type {Array<string>}
1082
1115
  */
1083
- translate: function () {
1084
- var indicator = this,
1085
- pointArrayMap = indicator.pointArrayMap,
1086
- LinesNames = [],
1087
- value;
1088
- var modfidyValue = indicator.modifyValue;
1089
- LinesNames = indicator.getTranslatedLinesNames();
1090
- SMA.prototype.translate.apply(indicator, arguments);
1091
- indicator.points.forEach(function (point) {
1092
- pointArrayMap.forEach(function (propertyName, i) {
1093
- value = point[propertyName];
1094
- // If the modifier, like for example compare exists,
1095
- // modified the original value by that method, #15867.
1096
- if (modfidyValue) {
1097
- value = modfidyValue.call(indicator, value);
1098
- }
1099
- if (value !== null) {
1100
- point[LinesNames[i]] = indicator.yAxis.toPixels(value, true);
1116
+ var pointArrayMap = ['top', 'bottom'];
1117
+ /**
1118
+ * Names of the lines, bewteen which the area should be plotted.
1119
+ * If the drawing of the area should
1120
+ * be disabled for some indicators, leave this option as an empty array.
1121
+ * Names should be the same as the names in the pointArrayMap.
1122
+ * @private
1123
+ * @name multipleLinesMixin.areaLinesNames
1124
+ * @type {Array<string>}
1125
+ */
1126
+ var areaLinesNames = ['top'];
1127
+ /**
1128
+ * Main line id.
1129
+ *
1130
+ * @private
1131
+ * @name multipleLinesMixin.pointValKey
1132
+ * @type {string}
1133
+ */
1134
+ var pointValKey = 'top';
1135
+ /* *
1136
+ *
1137
+ * Functions
1138
+ *
1139
+ * */
1140
+ /* eslint-disable valid-jsdoc */
1141
+ /**
1142
+ * @private
1143
+ */
1144
+ function compose(IndicatorClass) {
1145
+ if (composedClasses.indexOf(IndicatorClass) === -1) {
1146
+ composedClasses.push(IndicatorClass);
1147
+ var proto = IndicatorClass.prototype;
1148
+ proto.linesApiNames = (proto.linesApiNames ||
1149
+ linesApiNames.slice());
1150
+ proto.pointArrayMap = (proto.pointArrayMap ||
1151
+ pointArrayMap.slice());
1152
+ proto.pointValKey = (proto.pointValKey ||
1153
+ pointValKey);
1154
+ proto.areaLinesNames = (proto.areaLinesNames ||
1155
+ areaLinesNames.slice());
1156
+ proto.drawGraph = drawGraph;
1157
+ proto.getGraphPath = getGraphPath;
1158
+ proto.toYData = toYData;
1159
+ proto.translate = translate;
1160
+ proto.getTranslatedLinesNames = getTranslatedLinesNames;
1161
+ }
1162
+ return IndicatorClass;
1163
+ }
1164
+ MultipleLinesComposition.compose = compose;
1165
+ /**
1166
+ * Create the path based on points provided as argument.
1167
+ * If indicator.nextPoints option is defined, create the areaFill.
1168
+ *
1169
+ * @param points Points on which the path should be created
1170
+ */
1171
+ function getGraphPath(points) {
1172
+ var indicator = this;
1173
+ var areaPath,
1174
+ path = [],
1175
+ higherAreaPath = [];
1176
+ points = points || this.points;
1177
+ // Render Span
1178
+ if (indicator.fillGraph && indicator.nextPoints) {
1179
+ areaPath = SMAIndicator.prototype.getGraphPath.call(indicator, indicator.nextPoints);
1180
+ if (areaPath && areaPath.length) {
1181
+ areaPath[0][0] = 'L';
1182
+ path = SMAIndicator.prototype.getGraphPath.call(indicator, points);
1183
+ higherAreaPath = areaPath.slice(0, path.length);
1184
+ // Reverse points, so that the areaFill will start from the end:
1185
+ for (var i = higherAreaPath.length - 1; i >= 0; i--) {
1186
+ path.push(higherAreaPath[i]);
1101
1187
  }
1102
- });
1103
- });
1104
- },
1188
+ }
1189
+ }
1190
+ else {
1191
+ path = SMAIndicator.prototype.getGraphPath.apply(indicator, arguments);
1192
+ }
1193
+ return path;
1194
+ }
1105
1195
  /**
1106
1196
  * Draw main and additional lines.
1107
1197
  *
1108
1198
  * @private
1109
1199
  * @function multipleLinesMixin.drawGraph
1110
- * @return {void}
1111
1200
  */
1112
- drawGraph: function () {
1201
+ function drawGraph() {
1113
1202
  var indicator = this,
1114
1203
  pointValKey = indicator.pointValKey,
1115
1204
  linesApiNames = indicator.linesApiNames,
1205
+ areaLinesNames = indicator.areaLinesNames,
1116
1206
  mainLinePoints = indicator.points,
1117
- pointsLength = mainLinePoints.length,
1118
1207
  mainLineOptions = indicator.options,
1119
1208
  mainLinePath = indicator.graph,
1120
1209
  gappedExtend = {
@@ -1124,7 +1213,8 @@
1124
1213
  },
1125
1214
  // additional lines point place holders:
1126
1215
  secondaryLines = [],
1127
- secondaryLinesNames = indicator.getTranslatedLinesNames(pointValKey),
1216
+ secondaryLinesNames = indicator.getTranslatedLinesNames(pointValKey);
1217
+ var pointsLength = mainLinePoints.length,
1128
1218
  point;
1129
1219
  // Generate points for additional lines:
1130
1220
  secondaryLinesNames.forEach(function (plotLine, index) {
@@ -1141,6 +1231,27 @@
1141
1231
  }
1142
1232
  pointsLength = mainLinePoints.length;
1143
1233
  });
1234
+ // Modify options and generate area fill:
1235
+ if (this.userOptions.fillColor && areaLinesNames.length) {
1236
+ var index = secondaryLinesNames.indexOf(getLineName(areaLinesNames[0])),
1237
+ secondLinePoints = secondaryLines[index],
1238
+ firstLinePoints = areaLinesNames.length === 1 ?
1239
+ mainLinePoints :
1240
+ secondaryLines[secondaryLinesNames.indexOf(getLineName(areaLinesNames[1]))],
1241
+ originalColor = indicator.color;
1242
+ indicator.points = firstLinePoints;
1243
+ indicator.nextPoints = secondLinePoints;
1244
+ indicator.color = this.userOptions.fillColor;
1245
+ indicator.options = merge(mainLinePoints, gappedExtend);
1246
+ indicator.graph = indicator.area;
1247
+ indicator.fillGraph = true;
1248
+ SeriesRegistry.seriesTypes.sma.prototype.drawGraph.call(indicator);
1249
+ indicator.area = indicator.graph;
1250
+ // Clean temporary properties:
1251
+ delete indicator.nextPoints;
1252
+ delete indicator.fillGraph;
1253
+ indicator.color = originalColor;
1254
+ }
1144
1255
  // Modify options and generate additional lines:
1145
1256
  linesApiNames.forEach(function (lineName, i) {
1146
1257
  if (secondaryLines[i]) {
@@ -1155,7 +1266,7 @@
1155
1266
  ' at mixin/multiple-line.js:34');
1156
1267
  }
1157
1268
  indicator.graph = indicator['graph' + lineName];
1158
- SMA.prototype.drawGraph.call(indicator);
1269
+ SMAIndicator.prototype.drawGraph.call(indicator);
1159
1270
  // Now save lines:
1160
1271
  indicator['graph' + lineName] = indicator.graph;
1161
1272
  }
@@ -1169,13 +1280,88 @@
1169
1280
  indicator.points = mainLinePoints;
1170
1281
  indicator.options = mainLineOptions;
1171
1282
  indicator.graph = mainLinePath;
1172
- SMA.prototype.drawGraph.call(indicator);
1283
+ SMAIndicator.prototype.drawGraph.call(indicator);
1173
1284
  }
1174
- };
1285
+ /**
1286
+ * Create translatedLines Collection based on pointArrayMap.
1287
+ *
1288
+ * @private
1289
+ * @function multipleLinesMixin.getTranslatedLinesNames
1290
+ * @param {string} [excludedValue]
1291
+ * Main line id
1292
+ * @return {Array<string>}
1293
+ * Returns translated lines names without excluded value.
1294
+ */
1295
+ function getTranslatedLinesNames(excludedValue) {
1296
+ var translatedLines = [];
1297
+ (this.pointArrayMap || []).forEach(function (propertyName) {
1298
+ if (propertyName !== excludedValue) {
1299
+ translatedLines.push(getLineName(propertyName));
1300
+ }
1301
+ });
1302
+ return translatedLines;
1303
+ }
1304
+ /**
1305
+ * Generate the API name of the line
1306
+ * @param propertyName name of the line
1307
+ */
1308
+ function getLineName(propertyName) {
1309
+ return ('plot' +
1310
+ propertyName.charAt(0).toUpperCase() +
1311
+ propertyName.slice(1));
1312
+ }
1313
+ /**
1314
+ * @private
1315
+ * @function multipleLinesMixin.toYData
1316
+ * @param {Highcharts.Point} point
1317
+ * Indicator point
1318
+ * @return {Array<number>}
1319
+ * Returns point Y value for all lines
1320
+ */
1321
+ function toYData(point) {
1322
+ var pointColl = [];
1323
+ (this.pointArrayMap || []).forEach(function (propertyName) {
1324
+ pointColl.push(point[propertyName]);
1325
+ });
1326
+ return pointColl;
1327
+ }
1328
+ /**
1329
+ * Add lines plot pixel values.
1330
+ *
1331
+ * @private
1332
+ * @function multipleLinesMixin.translate
1333
+ */
1334
+ function translate() {
1335
+ var indicator = this,
1336
+ pointArrayMap = indicator.pointArrayMap;
1337
+ var LinesNames = [],
1338
+ value;
1339
+ LinesNames = indicator.getTranslatedLinesNames();
1340
+ SMAIndicator.prototype.translate.apply(indicator, arguments);
1341
+ indicator.points.forEach(function (point) {
1342
+ pointArrayMap.forEach(function (propertyName, i) {
1343
+ value = point[propertyName];
1344
+ // If the modifier, like for example compare exists,
1345
+ // modified the original value by that method, #15867.
1346
+ if (indicator.dataModify) {
1347
+ value = indicator.dataModify.modifyValue(value);
1348
+ }
1349
+ if (value !== null) {
1350
+ point[LinesNames[i]] = indicator.yAxis.toPixels(value, true);
1351
+ }
1352
+ });
1353
+ });
1354
+ }
1355
+ })(MultipleLinesComposition || (MultipleLinesComposition = {}));
1356
+ /* *
1357
+ *
1358
+ * Default Export
1359
+ *
1360
+ * */
1175
1361
 
1176
- return multipleLinesMixin;
1362
+ return MultipleLinesComposition;
1177
1363
  });
1178
- _registerModule(_modules, 'Stock/Indicators/Aroon/AroonIndicator.js', [_modules['Mixins/MultipleLines.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (MultipleLinesMixin, SeriesRegistry, U) {
1364
+ _registerModule(_modules, 'Stock/Indicators/Aroon/AroonIndicator.js', [_modules['Stock/Indicators/MultipleLinesComposition.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (MultipleLinesComposition, SeriesRegistry, U) {
1179
1365
  /* *
1180
1366
  *
1181
1367
  * License: www.highcharts.com/license
@@ -1361,15 +1547,13 @@
1361
1547
  return AroonIndicator;
1362
1548
  }(SMAIndicator));
1363
1549
  extend(AroonIndicator.prototype, {
1550
+ areaLinesNames: [],
1364
1551
  linesApiNames: ['aroonDown'],
1365
1552
  nameBase: 'Aroon',
1366
1553
  pointArrayMap: ['y', 'aroonDown'],
1367
- pointValKey: 'y',
1368
- drawGraph: MultipleLinesMixin.drawGraph,
1369
- getTranslatedLinesNames: MultipleLinesMixin.getTranslatedLinesNames,
1370
- toYData: MultipleLinesMixin.toYData,
1371
- translate: MultipleLinesMixin.translate
1554
+ pointValKey: 'y'
1372
1555
  });
1556
+ MultipleLinesComposition.compose(AroonIndicator);
1373
1557
  SeriesRegistry.registerSeriesType('aroon', AroonIndicator);
1374
1558
  /* *
1375
1559
  *
@@ -1394,7 +1578,7 @@
1394
1578
 
1395
1579
  return AroonIndicator;
1396
1580
  });
1397
- _registerModule(_modules, 'Stock/Indicators/AroonOscillator/AroonOscillatorIndicator.js', [_modules['Mixins/MultipleLines.js'], _modules['Mixins/IndicatorRequired.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (multipleLinesMixin, requiredIndicator, SeriesRegistry, U) {
1581
+ _registerModule(_modules, 'Stock/Indicators/AroonOscillator/AroonOscillatorIndicator.js', [_modules['Stock/Indicators/MultipleLinesComposition.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (MultipleLinesComposition, SeriesRegistry, U) {
1398
1582
  /* *
1399
1583
  *
1400
1584
  * License: www.highcharts.com/license
@@ -1439,6 +1623,11 @@
1439
1623
  var AroonOscillatorIndicator = /** @class */ (function (_super) {
1440
1624
  __extends(AroonOscillatorIndicator, _super);
1441
1625
  function AroonOscillatorIndicator() {
1626
+ /* *
1627
+ *
1628
+ * Static Properties
1629
+ *
1630
+ * */
1442
1631
  var _this = _super !== null && _super.apply(this,
1443
1632
  arguments) || this;
1444
1633
  /* *
@@ -1481,14 +1670,6 @@
1481
1670
  yData: yData
1482
1671
  };
1483
1672
  };
1484
- AroonOscillatorIndicator.prototype.init = function () {
1485
- var args = arguments,
1486
- ctx = this;
1487
- requiredIndicator.isParentLoaded(AROON, 'aroon', ctx.type, function (indicator) {
1488
- indicator.prototype.init.apply(ctx, args);
1489
- return;
1490
- });
1491
- };
1492
1673
  /**
1493
1674
  * Aroon Oscillator. This series requires the `linkedTo` option to be set
1494
1675
  * and should be loaded after the `stock/indicators/indicators.js` and
@@ -1516,12 +1697,13 @@
1516
1697
  });
1517
1698
  return AroonOscillatorIndicator;
1518
1699
  }(AroonIndicator));
1519
- extend(AroonOscillatorIndicator.prototype, merge(multipleLinesMixin, {
1700
+ extend(AroonOscillatorIndicator.prototype, {
1520
1701
  nameBase: 'Aroon Oscillator',
1702
+ linesApiNames: [],
1521
1703
  pointArrayMap: ['y'],
1522
- pointValKey: 'y',
1523
- linesApiNames: []
1524
- }));
1704
+ pointValKey: 'y'
1705
+ });
1706
+ MultipleLinesComposition.compose(AroonIndicator);
1525
1707
  SeriesRegistry.registerSeriesType('aroonoscillator', AroonOscillatorIndicator);
1526
1708
  /* *
1527
1709
  *
@@ -1733,7 +1915,7 @@
1733
1915
 
1734
1916
  return ATRIndicator;
1735
1917
  });
1736
- _registerModule(_modules, 'Stock/Indicators/BB/BBIndicator.js', [_modules['Mixins/MultipleLines.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (MultipleLinesMixin, SeriesRegistry, U) {
1918
+ _registerModule(_modules, 'Stock/Indicators/BB/BBIndicator.js', [_modules['Stock/Indicators/MultipleLinesComposition.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (MultipleLinesComposition, SeriesRegistry, U) {
1737
1919
  /**
1738
1920
  *
1739
1921
  * License: www.highcharts.com/license
@@ -1761,6 +1943,11 @@
1761
1943
  var extend = U.extend,
1762
1944
  isArray = U.isArray,
1763
1945
  merge = U.merge;
1946
+ /* *
1947
+ *
1948
+ * Functions
1949
+ *
1950
+ * */
1764
1951
  /* eslint-disable valid-jsdoc */
1765
1952
  // Utils:
1766
1953
  /**
@@ -1780,7 +1967,11 @@
1780
1967
  std = Math.sqrt(variance);
1781
1968
  return std;
1782
1969
  }
1783
- /* eslint-enable valid-jsdoc */
1970
+ /* *
1971
+ *
1972
+ * Class
1973
+ *
1974
+ * */
1784
1975
  /**
1785
1976
  * Bollinger Bands series type.
1786
1977
  *
@@ -1793,18 +1984,28 @@
1793
1984
  var BBIndicator = /** @class */ (function (_super) {
1794
1985
  __extends(BBIndicator, _super);
1795
1986
  function BBIndicator() {
1987
+ /* *
1988
+ *
1989
+ * Static Properties
1990
+ *
1991
+ * */
1796
1992
  var _this = _super !== null && _super.apply(this,
1797
1993
  arguments) || this;
1798
1994
  /* *
1799
- *
1800
- * Prototype Properties
1801
- *
1802
- * */
1995
+ *
1996
+ * Properties
1997
+ *
1998
+ * */
1803
1999
  _this.data = void 0;
1804
2000
  _this.options = void 0;
1805
2001
  _this.points = void 0;
1806
2002
  return _this;
1807
2003
  }
2004
+ /* *
2005
+ *
2006
+ * Functions
2007
+ *
2008
+ * */
1808
2009
  BBIndicator.prototype.init = function () {
1809
2010
  SeriesRegistry.seriesTypes.sma.prototype.init.apply(this, arguments);
1810
2011
  // Set default color for lines:
@@ -1883,6 +2084,17 @@
1883
2084
  * @optionparent plotOptions.bb
1884
2085
  */
1885
2086
  BBIndicator.defaultOptions = merge(SMAIndicator.defaultOptions, {
2087
+ /**
2088
+ * Option for fill color between lines in Bollinger Bands Indicator.
2089
+ *
2090
+ * @sample {highstock} stock/indicators/indicator-area-fill
2091
+ * Background fill between lines.
2092
+ *
2093
+ * @type {Highcharts.Color}
2094
+ * @since 9.3.2
2095
+ * @apioption plotOptions.bb.fillColor
2096
+ *
2097
+ */
1886
2098
  params: {
1887
2099
  period: 20,
1888
2100
  /**
@@ -1939,15 +2151,13 @@
1939
2151
  return BBIndicator;
1940
2152
  }(SMAIndicator));
1941
2153
  extend(BBIndicator.prototype, {
2154
+ areaLinesNames: ['top', 'bottom'],
1942
2155
  pointArrayMap: ['top', 'middle', 'bottom'],
1943
2156
  pointValKey: 'middle',
1944
2157
  nameComponents: ['period', 'standardDeviation'],
1945
- linesApiNames: ['topLine', 'bottomLine'],
1946
- drawGraph: MultipleLinesMixin.drawGraph,
1947
- getTranslatedLinesNames: MultipleLinesMixin.getTranslatedLinesNames,
1948
- translate: MultipleLinesMixin.translate,
1949
- toYData: MultipleLinesMixin.toYData
2158
+ linesApiNames: ['topLine', 'bottomLine']
1950
2159
  });
2160
+ MultipleLinesComposition.compose(BBIndicator);
1951
2161
  SeriesRegistry.registerSeriesType('bb', BBIndicator);
1952
2162
  /* *
1953
2163
  *
@@ -2256,12 +2466,21 @@
2256
2466
  };
2257
2467
  /**
2258
2468
  * @private
2259
- * @param {Array<number>} xData - x timestamp values
2260
- * @param {Array<number>} seriesYData - yData of basic series
2261
- * @param {Array<number>} volumeSeriesYData - yData of volume series
2262
- * @param {number} period - indicator's param
2263
- * @return {Highcharts.IndicatorNullableValuesObject} object containing computed money
2264
- * flow data
2469
+ *
2470
+ * @param {Array<number>} xData
2471
+ * x timestamp values
2472
+ *
2473
+ * @param {Array<number>} seriesYData
2474
+ * yData of basic series
2475
+ *
2476
+ * @param {Array<number>} volumeSeriesYData
2477
+ * yData of volume series
2478
+ *
2479
+ * @param {number} period
2480
+ * indicator's param
2481
+ *
2482
+ * @return {Highcharts.IndicatorNullableValuesObject}
2483
+ * object containing computed money flow data
2265
2484
  */
2266
2485
  CMFIndicator.prototype.getMoneyFlow = function (xData, seriesYData, volumeSeriesYData, period) {
2267
2486
  var len = seriesYData.length,
@@ -2277,11 +2496,18 @@
2277
2496
  /**
2278
2497
  * Calculates money flow volume, changes i, nullIndex vars from
2279
2498
  * upper scope!
2499
+ *
2280
2500
  * @private
2281
- * @param {Array<number>} ohlc - OHLC point
2282
- * @param {number} volume - Volume point's y value
2283
- * @return {number|null} - volume * moneyFlowMultiplier
2284
- **/
2501
+ *
2502
+ * @param {Array<number>} ohlc
2503
+ * OHLC point
2504
+ *
2505
+ * @param {number} volume
2506
+ * Volume point's y value
2507
+ *
2508
+ * @return {number|null}
2509
+ * Volume * moneyFlowMultiplier
2510
+ */
2285
2511
  function getMoneyFlowVolume(ohlc, volume) {
2286
2512
  var high = ohlc[1],
2287
2513
  low = ohlc[2],
@@ -2293,11 +2519,15 @@
2293
2519
  high !== low;
2294
2520
  /**
2295
2521
  * @private
2296
- * @param {number} h - High value
2297
- * @param {number} l - Low value
2298
- * @param {number} c - Close value
2299
- * @return {number} calculated multiplier for the point
2300
- **/
2522
+ * @param {number} h
2523
+ * High value
2524
+ * @param {number} l
2525
+ * Low value
2526
+ * @param {number} c
2527
+ * Close value
2528
+ * @return {number}
2529
+ * Calculated multiplier for the point
2530
+ */
2301
2531
  function getMoneyFlowMultiplier(h, l, c) {
2302
2532
  return ((c - l) - (h - c)) / (h - l);
2303
2533
  }
@@ -2390,7 +2620,7 @@
2390
2620
 
2391
2621
  return CMFIndicator;
2392
2622
  });
2393
- _registerModule(_modules, 'Stock/Indicators/DMI/DMIIndicator.js', [_modules['Mixins/MultipleLines.js'], _modules['Core/Color/Palette.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (MultipleLinesMixin, palette, SeriesRegistry, U) {
2623
+ _registerModule(_modules, 'Stock/Indicators/DMI/DMIIndicator.js', [_modules['Stock/Indicators/MultipleLinesComposition.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (MultipleLinesComposition, SeriesRegistry, U) {
2394
2624
  /* *
2395
2625
  * (c) 2010-2021 Rafal Sebestjanski
2396
2626
  *
@@ -2439,7 +2669,20 @@
2439
2669
  var DMIIndicator = /** @class */ (function (_super) {
2440
2670
  __extends(DMIIndicator, _super);
2441
2671
  function DMIIndicator() {
2442
- return _super !== null && _super.apply(this, arguments) || this;
2672
+ /* *
2673
+ *
2674
+ * Static Properties
2675
+ *
2676
+ * */
2677
+ var _this = _super !== null && _super.apply(this,
2678
+ arguments) || this;
2679
+ /* *
2680
+ *
2681
+ * Properties
2682
+ *
2683
+ * */
2684
+ _this.options = void 0;
2685
+ return _this;
2443
2686
  }
2444
2687
  /* *
2445
2688
  *
@@ -2585,12 +2828,15 @@
2585
2828
  enabled: false
2586
2829
  },
2587
2830
  tooltip: {
2588
- pointFormat: '<span style="color: {point.color}">\u25CF</span><b> {series.name}</b><br/>' +
2831
+ pointFormat: '<span style="color: {point.color}">' +
2832
+ '\u25CF</span><b> {series.name}</b><br/>' +
2589
2833
  '<span style="color: {point.color}">DX</span>: {point.y}<br/>' +
2590
- '<span style="color: {point.series.options.plusDILine.styles.lineColor}">+DI</span>' +
2591
- ': {point.plusDI}<br/>' +
2592
- '<span style="color: {point.series.options.minusDILine.styles.lineColor}">-DI</span>' +
2593
- ': {point.minusDI}<br/>'
2834
+ '<span style="color: ' +
2835
+ '{point.series.options.plusDILine.styles.lineColor}">' +
2836
+ '+DI</span>: {point.plusDI}<br/>' +
2837
+ '<span style="color: ' +
2838
+ '{point.series.options.minusDILine.styles.lineColor}">' +
2839
+ '-DI</span>: {point.minusDI}<br/>'
2594
2840
  },
2595
2841
  /**
2596
2842
  * +DI line options.
@@ -2609,7 +2855,7 @@
2609
2855
  *
2610
2856
  * @type {Highcharts.ColorString}
2611
2857
  */
2612
- lineColor: palette.positiveColor // green-ish
2858
+ lineColor: "#06b535" /* positiveColor */ // green-ish
2613
2859
  }
2614
2860
  },
2615
2861
  /**
@@ -2629,7 +2875,7 @@
2629
2875
  *
2630
2876
  * @type {Highcharts.ColorString}
2631
2877
  */
2632
- lineColor: palette.negativeColor // red-ish
2878
+ lineColor: "#f21313" /* negativeColor */ // red-ish
2633
2879
  }
2634
2880
  },
2635
2881
  dataGrouping: {
@@ -2639,16 +2885,14 @@
2639
2885
  return DMIIndicator;
2640
2886
  }(SMAIndicator));
2641
2887
  extend(DMIIndicator.prototype, {
2888
+ areaLinesNames: [],
2642
2889
  nameBase: 'DMI',
2890
+ linesApiNames: ['plusDILine', 'minusDILine'],
2643
2891
  pointArrayMap: ['y', 'plusDI', 'minusDI'],
2644
2892
  parallelArrays: ['x', 'y', 'plusDI', 'minusDI'],
2645
- pointValKey: 'y',
2646
- linesApiNames: ['plusDILine', 'minusDILine'],
2647
- drawGraph: MultipleLinesMixin.drawGraph,
2648
- getTranslatedLinesNames: MultipleLinesMixin.getTranslatedLinesNames,
2649
- translate: MultipleLinesMixin.translate,
2650
- toYData: MultipleLinesMixin.toYData
2893
+ pointValKey: 'y'
2651
2894
  });
2895
+ MultipleLinesComposition.compose(DMIIndicator);
2652
2896
  SeriesRegistry.registerSeriesType('dmi', DMIIndicator);
2653
2897
  /* *
2654
2898
  *
@@ -2822,224 +3066,45 @@
2822
3066
  /**
2823
3067
  * Parameters used in calculation of Detrended Price Oscillator series
2824
3068
  * points.
2825
- */
2826
- params: {
2827
- index: 0,
2828
- /**
2829
- * Period for Detrended Price Oscillator
2830
- */
2831
- period: 21
2832
- }
2833
- });
2834
- return DPOIndicator;
2835
- }(SMAIndicator));
2836
- extend(DPOIndicator.prototype, {
2837
- nameBase: 'DPO'
2838
- });
2839
- SeriesRegistry.registerSeriesType('dpo', DPOIndicator);
2840
- /* *
2841
- *
2842
- * Default Export
2843
- *
2844
- * */
2845
- /**
2846
- * A Detrended Price Oscillator. If the [type](#series.dpo.type) option is not
2847
- * specified, it is inherited from [chart.type](#chart.type).
2848
- *
2849
- * @extends series,plotOptions.dpo
2850
- * @since 7.0.0
2851
- * @product highstock
2852
- * @excluding allAreas, colorAxis, compare, compareBase, dataParser, dataURL,
2853
- * joinBy, keys, navigatorOptions, pointInterval, pointIntervalUnit,
2854
- * pointPlacement, pointRange, pointStart, showInNavigator, stacking
2855
- * @requires stock/indicators/indicators
2856
- * @requires stock/indicators/dpo
2857
- * @apioption series.dpo
2858
- */
2859
- ''; // to include the above in the js output'
2860
-
2861
- return DPOIndicator;
2862
- });
2863
- _registerModule(_modules, 'Stock/Indicators/EMA/EMAIndicator.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
2864
- /* *
2865
- *
2866
- * License: www.highcharts.com/license
2867
- *
2868
- * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
2869
- *
2870
- * */
2871
- var __extends = (this && this.__extends) || (function () {
2872
- var extendStatics = function (d,
2873
- b) {
2874
- extendStatics = Object.setPrototypeOf ||
2875
- ({ __proto__: [] } instanceof Array && function (d,
2876
- b) { d.__proto__ = b; }) ||
2877
- function (d,
2878
- b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
2879
- return extendStatics(d, b);
2880
- };
2881
- return function (d, b) {
2882
- extendStatics(d, b);
2883
- function __() { this.constructor = d; }
2884
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2885
- };
2886
- })();
2887
- var SMAIndicator = SeriesRegistry.seriesTypes.sma;
2888
- var correctFloat = U.correctFloat,
2889
- isArray = U.isArray,
2890
- merge = U.merge;
2891
- /* *
2892
- *
2893
- * Class
2894
- *
2895
- * */
2896
- /**
2897
- * The EMA series type.
2898
- *
2899
- * @private
2900
- * @class
2901
- * @name Highcharts.seriesTypes.ema
2902
- *
2903
- * @augments Highcharts.Series
2904
- */
2905
- var EMAIndicator = /** @class */ (function (_super) {
2906
- __extends(EMAIndicator, _super);
2907
- function EMAIndicator() {
2908
- var _this = _super !== null && _super.apply(this,
2909
- arguments) || this;
2910
- /* *
2911
- *
2912
- * Properties
2913
- *
2914
- * */
2915
- _this.data = void 0;
2916
- _this.options = void 0;
2917
- _this.points = void 0;
2918
- return _this;
2919
- }
2920
- /* *
2921
- *
2922
- * Functions
2923
- *
2924
- * */
2925
- EMAIndicator.prototype.accumulatePeriodPoints = function (period, index, yVal) {
2926
- var sum = 0,
2927
- i = 0,
2928
- y = 0;
2929
- while (i < period) {
2930
- y = index < 0 ? yVal[i] : yVal[i][index];
2931
- sum = sum + y;
2932
- i++;
2933
- }
2934
- return sum;
2935
- };
2936
- EMAIndicator.prototype.calculateEma = function (xVal, yVal, i, EMApercent, calEMA, index, SMA) {
2937
- var x = xVal[i - 1],
2938
- yValue = index < 0 ?
2939
- yVal[i - 1] :
2940
- yVal[i - 1][index],
2941
- y;
2942
- y = typeof calEMA === 'undefined' ?
2943
- SMA : correctFloat((yValue * EMApercent) +
2944
- (calEMA * (1 - EMApercent)));
2945
- return [x, y];
2946
- };
2947
- EMAIndicator.prototype.getValues = function (series, params) {
2948
- var period = params.period,
2949
- xVal = series.xData,
2950
- yVal = series.yData,
2951
- yValLen = yVal ? yVal.length : 0,
2952
- EMApercent = 2 / (period + 1),
2953
- sum = 0,
2954
- EMA = [],
2955
- xData = [],
2956
- yData = [],
2957
- index = -1,
2958
- SMA = 0,
2959
- calEMA,
2960
- EMAPoint,
2961
- i;
2962
- // Check period, if bigger than points length, skip
2963
- if (yValLen < period) {
2964
- return;
2965
- }
2966
- // Switch index for OHLC / Candlestick / Arearange
2967
- if (isArray(yVal[0])) {
2968
- index = params.index ? params.index : 0;
2969
- }
2970
- // Accumulate first N-points
2971
- sum = this.accumulatePeriodPoints(period, index, yVal);
2972
- // first point
2973
- SMA = sum / period;
2974
- // Calculate value one-by-one for each period in visible data
2975
- for (i = period; i < yValLen + 1; i++) {
2976
- EMAPoint = this.calculateEma(xVal, yVal, i, EMApercent, calEMA, index, SMA);
2977
- EMA.push(EMAPoint);
2978
- xData.push(EMAPoint[0]);
2979
- yData.push(EMAPoint[1]);
2980
- calEMA = EMAPoint[1];
2981
- }
2982
- return {
2983
- values: EMA,
2984
- xData: xData,
2985
- yData: yData
2986
- };
2987
- };
2988
- /**
2989
- * Exponential moving average indicator (EMA). This series requires the
2990
- * `linkedTo` option to be set.
2991
- *
2992
- * @sample stock/indicators/ema
2993
- * Exponential moving average indicator
2994
- *
2995
- * @extends plotOptions.sma
2996
- * @since 6.0.0
2997
- * @product highstock
2998
- * @requires stock/indicators/indicators
2999
- * @requires stock/indicators/ema
3000
- * @optionparent plotOptions.ema
3001
- */
3002
- EMAIndicator.defaultOptions = merge(SMAIndicator.defaultOptions, {
3003
- params: {
3004
- /**
3005
- * The point index which indicator calculations will base. For
3006
- * example using OHLC data, index=2 means the indicator will be
3007
- * calculated using Low values.
3008
- *
3009
- * By default index value used to be set to 0. Since
3010
- * Highcharts Stock 7 by default index is set to 3
3011
- * which means that the ema indicator will be
3012
- * calculated using Close values.
3069
+ */
3070
+ params: {
3071
+ index: 0,
3072
+ /**
3073
+ * Period for Detrended Price Oscillator
3013
3074
  */
3014
- index: 3,
3015
- period: 9 // @merge 14 in v6.2
3075
+ period: 21
3016
3076
  }
3017
3077
  });
3018
- return EMAIndicator;
3078
+ return DPOIndicator;
3019
3079
  }(SMAIndicator));
3020
- SeriesRegistry.registerSeriesType('ema', EMAIndicator);
3080
+ extend(DPOIndicator.prototype, {
3081
+ nameBase: 'DPO'
3082
+ });
3083
+ SeriesRegistry.registerSeriesType('dpo', DPOIndicator);
3021
3084
  /* *
3022
3085
  *
3023
3086
  * Default Export
3024
3087
  *
3025
3088
  * */
3026
3089
  /**
3027
- * A `EMA` series. If the [type](#series.ema.type) option is not
3090
+ * A Detrended Price Oscillator. If the [type](#series.dpo.type) option is not
3028
3091
  * specified, it is inherited from [chart.type](#chart.type).
3029
3092
  *
3030
- * @extends series,plotOptions.ema
3031
- * @since 6.0.0
3093
+ * @extends series,plotOptions.dpo
3094
+ * @since 7.0.0
3032
3095
  * @product highstock
3033
- * @excluding dataParser, dataURL
3096
+ * @excluding allAreas, colorAxis, compare, compareBase, dataParser, dataURL,
3097
+ * joinBy, keys, navigatorOptions, pointInterval, pointIntervalUnit,
3098
+ * pointPlacement, pointRange, pointStart, showInNavigator, stacking
3034
3099
  * @requires stock/indicators/indicators
3035
- * @requires stock/indicators/ema
3036
- * @apioption series.ema
3100
+ * @requires stock/indicators/dpo
3101
+ * @apioption series.dpo
3037
3102
  */
3038
- ''; // adds doclet above to the transpiled file
3103
+ ''; // to include the above in the js output'
3039
3104
 
3040
- return EMAIndicator;
3105
+ return DPOIndicator;
3041
3106
  });
3042
- _registerModule(_modules, 'Stock/Indicators/Chaikin/ChaikinIndicator.js', [_modules['Mixins/IndicatorRequired.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (RequiredIndicatorMixin, SeriesRegistry, U) {
3107
+ _registerModule(_modules, 'Stock/Indicators/Chaikin/ChaikinIndicator.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
3043
3108
  /* *
3044
3109
  *
3045
3110
  * License: www.highcharts.com/license
@@ -3087,6 +3152,11 @@
3087
3152
  var ChaikinIndicator = /** @class */ (function (_super) {
3088
3153
  __extends(ChaikinIndicator, _super);
3089
3154
  function ChaikinIndicator() {
3155
+ /* *
3156
+ *
3157
+ * Static Properties
3158
+ *
3159
+ * */
3090
3160
  var _this = _super !== null && _super.apply(this,
3091
3161
  arguments) || this;
3092
3162
  /* *
@@ -3104,14 +3174,6 @@
3104
3174
  * Functions
3105
3175
  *
3106
3176
  * */
3107
- ChaikinIndicator.prototype.init = function () {
3108
- var args = arguments,
3109
- ctx = this;
3110
- RequiredIndicatorMixin.isParentLoaded(EMAIndicator, 'ema', ctx.type, function (indicator) {
3111
- indicator.prototype.init.apply(ctx, args);
3112
- return;
3113
- });
3114
- };
3115
3177
  ChaikinIndicator.prototype.getValues = function (series, params) {
3116
3178
  var periods = params.periods,
3117
3179
  period = params.period,
@@ -3168,8 +3230,7 @@
3168
3230
  };
3169
3231
  /**
3170
3232
  * Chaikin Oscillator. This series requires the `linkedTo` option to
3171
- * be set and should be loaded after the `stock/indicators/indicators.js`
3172
- * and `stock/indicators/ema.js`.
3233
+ * be set and should be loaded after the `stock/indicators/indicators.js`.
3173
3234
  *
3174
3235
  * @sample {highstock} stock/indicators/chaikin
3175
3236
  * Chaikin Oscillator
@@ -3181,7 +3242,6 @@
3181
3242
  * pointInterval, pointIntervalUnit, pointPlacement,
3182
3243
  * pointRange, pointStart, showInNavigator, stacking
3183
3244
  * @requires stock/indicators/indicators
3184
- * @requires stock/indicators/ema
3185
3245
  * @requires stock/indicators/chaikin
3186
3246
  * @optionparent plotOptions.chaikin
3187
3247
  */
@@ -3238,7 +3298,6 @@
3238
3298
  * navigatorOptions, pointInterval, pointIntervalUnit,
3239
3299
  * pointPlacement, pointRange, pointStart, stacking, showInNavigator
3240
3300
  * @requires stock/indicators/indicators
3241
- * @requires stock/indicators/ema
3242
3301
  * @requires stock/indicators/chaikin
3243
3302
  * @apioption series.chaikin
3244
3303
  */
@@ -3428,7 +3487,7 @@
3428
3487
 
3429
3488
  return CMOIndicator;
3430
3489
  });
3431
- _registerModule(_modules, 'Stock/Indicators/DEMA/DEMAIndicator.js', [_modules['Mixins/IndicatorRequired.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (RequiredIndicatorMixin, SeriesRegistry, U) {
3490
+ _registerModule(_modules, 'Stock/Indicators/DEMA/DEMAIndicator.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
3432
3491
  /* *
3433
3492
  *
3434
3493
  * License: www.highcharts.com/license
@@ -3476,14 +3535,6 @@
3476
3535
  _this.points = void 0;
3477
3536
  return _this;
3478
3537
  }
3479
- DEMAIndicator.prototype.init = function () {
3480
- var args = arguments,
3481
- ctx = this;
3482
- RequiredIndicatorMixin.isParentLoaded(EMAIndicator, 'ema', ctx.type, function (indicator) {
3483
- indicator.prototype.init.apply(ctx, args);
3484
- return;
3485
- });
3486
- };
3487
3538
  DEMAIndicator.prototype.getEMA = function (yVal, prevEMA, SMA, index, i, xVal) {
3488
3539
  return EMAIndicator.prototype.calculateEma(xVal || [], yVal, typeof i === 'undefined' ? 1 : i, this.EMApercent, prevEMA, typeof index === 'undefined' ? -1 : index, SMA);
3489
3540
  };
@@ -3562,7 +3613,7 @@
3562
3613
  /**
3563
3614
  * Double exponential moving average (DEMA) indicator. This series requires
3564
3615
  * `linkedTo` option to be set and should be loaded after the
3565
- * `stock/indicators/indicators.js` and `stock/indicators/ema.js`.
3616
+ * `stock/indicators/indicators.js`.
3566
3617
  *
3567
3618
  * @sample {highstock} stock/indicators/dema
3568
3619
  * DEMA indicator
@@ -3575,7 +3626,6 @@
3575
3626
  * pointPlacement, pointRange, pointStart, showInNavigator,
3576
3627
  * stacking
3577
3628
  * @requires stock/indicators/indicators
3578
- * @requires stock/indicators/ema
3579
3629
  * @requires stock/indicators/dema
3580
3630
  * @optionparent plotOptions.dema
3581
3631
  */
@@ -3599,7 +3649,6 @@
3599
3649
  * joinBy, keys, navigatorOptions, pointInterval, pointIntervalUnit,
3600
3650
  * pointPlacement, pointRange, pointStart, showInNavigator, stacking
3601
3651
  * @requires stock/indicators/indicators
3602
- * @requires stock/indicators/ema
3603
3652
  * @requires stock/indicators/dema
3604
3653
  * @apioption series.dema
3605
3654
  */
@@ -3607,7 +3656,7 @@
3607
3656
 
3608
3657
  return DEMAIndicator;
3609
3658
  });
3610
- _registerModule(_modules, 'Stock/Indicators/TEMA/TEMAIndicator.js', [_modules['Mixins/IndicatorRequired.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (RequiredIndicatorMixin, SeriesRegistry, U) {
3659
+ _registerModule(_modules, 'Stock/Indicators/TEMA/TEMAIndicator.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
3611
3660
  /* *
3612
3661
  *
3613
3662
  * License: www.highcharts.com/license
@@ -3635,6 +3684,11 @@
3635
3684
  var correctFloat = U.correctFloat,
3636
3685
  isArray = U.isArray,
3637
3686
  merge = U.merge;
3687
+ /* *
3688
+ *
3689
+ * Class
3690
+ *
3691
+ * */
3638
3692
  /**
3639
3693
  * The TEMA series type.
3640
3694
  *
@@ -3647,22 +3701,29 @@
3647
3701
  var TEMAIndicator = /** @class */ (function (_super) {
3648
3702
  __extends(TEMAIndicator, _super);
3649
3703
  function TEMAIndicator() {
3704
+ /* *
3705
+ *
3706
+ * Static Properties
3707
+ *
3708
+ * */
3650
3709
  var _this = _super !== null && _super.apply(this,
3651
3710
  arguments) || this;
3711
+ /* *
3712
+ *
3713
+ * Properties
3714
+ *
3715
+ * */
3652
3716
  _this.EMApercent = void 0;
3653
3717
  _this.data = void 0;
3654
3718
  _this.options = void 0;
3655
3719
  _this.points = void 0;
3656
3720
  return _this;
3657
3721
  }
3658
- TEMAIndicator.prototype.init = function () {
3659
- var args = arguments,
3660
- ctx = this;
3661
- RequiredIndicatorMixin.isParentLoaded(EMAIndicator, 'ema', ctx.type, function (indicator) {
3662
- indicator.prototype.init.apply(ctx, args);
3663
- return;
3664
- });
3665
- };
3722
+ /* *
3723
+ *
3724
+ * Functions
3725
+ *
3726
+ * */
3666
3727
  TEMAIndicator.prototype.getEMA = function (yVal, prevEMA, SMA, index, i, xVal) {
3667
3728
  return EMAIndicator.prototype.calculateEma(xVal || [], yVal, typeof i === 'undefined' ? 1 : i, this.EMApercent, prevEMA, typeof index === 'undefined' ? -1 : index, SMA);
3668
3729
  };
@@ -3776,7 +3837,7 @@
3776
3837
  /**
3777
3838
  * Triple exponential moving average (TEMA) indicator. This series requires
3778
3839
  * `linkedTo` option to be set and should be loaded after the
3779
- * `stock/indicators/indicators.js` and `stock/indicators/ema.js`.
3840
+ * `stock/indicators/indicators.js`.
3780
3841
  *
3781
3842
  * @sample {highstock} stock/indicators/tema
3782
3843
  * TEMA indicator
@@ -3789,7 +3850,6 @@
3789
3850
  * pointPlacement, pointRange, pointStart, showInNavigator,
3790
3851
  * stacking
3791
3852
  * @requires stock/indicators/indicators
3792
- * @requires stock/indicators/ema
3793
3853
  * @requires stock/indicators/tema
3794
3854
  * @optionparent plotOptions.tema
3795
3855
  */
@@ -3802,6 +3862,11 @@
3802
3862
  * Default Export
3803
3863
  *
3804
3864
  * */
3865
+ /* *
3866
+ *
3867
+ * API Options
3868
+ *
3869
+ * */
3805
3870
  /**
3806
3871
  * A `TEMA` series. If the [type](#series.tema.type) option is not
3807
3872
  * specified, it is inherited from [chart.type](#chart.type).
@@ -3813,7 +3878,6 @@
3813
3878
  * joinBy, keys, navigatorOptions, pointInterval, pointIntervalUnit,
3814
3879
  * pointPlacement, pointRange, pointStart, showInNavigator, stacking
3815
3880
  * @requires stock/indicators/indicators
3816
- * @requires stock/indicators/ema
3817
3881
  * @requires stock/indicators/tema
3818
3882
  * @apioption series.tema
3819
3883
  */
@@ -3821,7 +3885,7 @@
3821
3885
 
3822
3886
  return TEMAIndicator;
3823
3887
  });
3824
- _registerModule(_modules, 'Stock/Indicators/TRIX/TRIXIndicator.js', [_modules['Mixins/IndicatorRequired.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (RequiredIndicatorMixin, SeriesRegistry, U) {
3888
+ _registerModule(_modules, 'Stock/Indicators/TRIX/TRIXIndicator.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
3825
3889
  /* *
3826
3890
  *
3827
3891
  * License: www.highcharts.com/license
@@ -3867,14 +3931,6 @@
3867
3931
  _this.points = void 0;
3868
3932
  return _this;
3869
3933
  }
3870
- TRIXIndicator.prototype.init = function () {
3871
- var args = arguments,
3872
- ctx = this;
3873
- RequiredIndicatorMixin.isParentLoaded(SeriesRegistry.seriesTypes.tema, 'tema', ctx.type, function (indicator) {
3874
- indicator.prototype.init.apply(ctx, args);
3875
- return;
3876
- });
3877
- };
3878
3934
  // TRIX is calculated using TEMA so we just extend getTemaPoint method.
3879
3935
  TRIXIndicator.prototype.getTemaPoint = function (xVal, tripledPeriod, EMAlevels, i) {
3880
3936
  if (i > tripledPeriod) {
@@ -3890,11 +3946,8 @@
3890
3946
  * Triple exponential average (TRIX) oscillator. This series requires
3891
3947
  * `linkedTo` option to be set.
3892
3948
  *
3893
- * Requires https://code.highcharts.com/stock/indicators/ema.js
3894
- * and https://code.highcharts.com/stock/indicators/tema.js.
3895
- *
3896
3949
  * @sample {highstock} stock/indicators/trix
3897
- * TRIX indicator
3950
+ * TRIX indicator
3898
3951
  *
3899
3952
  * @extends plotOptions.tema
3900
3953
  * @since 7.0.0
@@ -3903,6 +3956,9 @@
3903
3956
  * navigatorOptions, pointInterval, pointIntervalUnit,
3904
3957
  * pointPlacement, pointRange, pointStart, showInNavigator,
3905
3958
  * stacking
3959
+ * @requires stock/indicators/indicators
3960
+ * @requires stock/indicators/tema
3961
+ * @requires stock/indicators/trix
3906
3962
  * @optionparent plotOptions.trix
3907
3963
  */
3908
3964
  TRIXIndicator.defaultOptions = merge(TEMAIndicator.defaultOptions);
@@ -3924,13 +3980,15 @@
3924
3980
  * @excluding allAreas, colorAxis, compare, compareBase, dataParser, dataURL,
3925
3981
  * joinBy, keys, navigatorOptions, pointInterval, pointIntervalUnit,
3926
3982
  * pointPlacement, pointRange, pointStart, showInNavigator, stacking
3983
+ * @requires stock/indicators/indicators
3984
+ * @requires stock/indicators/tema
3927
3985
  * @apioption series.trix
3928
3986
  */
3929
3987
  ''; // to include the above in the js output
3930
3988
 
3931
3989
  return TRIXIndicator;
3932
3990
  });
3933
- _registerModule(_modules, 'Stock/Indicators/APO/APOIndicator.js', [_modules['Mixins/IndicatorRequired.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (RequiredIndicatorMixin, SeriesRegistry, U) {
3991
+ _registerModule(_modules, 'Stock/Indicators/APO/APOIndicator.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
3934
3992
  /* *
3935
3993
  *
3936
3994
  * License: www.highcharts.com/license
@@ -3975,23 +4033,28 @@
3975
4033
  var APOIndicator = /** @class */ (function (_super) {
3976
4034
  __extends(APOIndicator, _super);
3977
4035
  function APOIndicator() {
4036
+ /* *
4037
+ *
4038
+ * Static Properties
4039
+ *
4040
+ * */
3978
4041
  var _this = _super !== null && _super.apply(this,
3979
4042
  arguments) || this;
3980
4043
  /* *
3981
- *
3982
- * Properties
3983
- *
3984
- * */
4044
+ *
4045
+ * Properties
4046
+ *
4047
+ * */
3985
4048
  _this.data = void 0;
3986
4049
  _this.options = void 0;
3987
4050
  _this.points = void 0;
3988
4051
  return _this;
3989
4052
  }
3990
4053
  /* *
3991
- *
3992
- * Functions
3993
- *
3994
- * */
4054
+ *
4055
+ * Functions
4056
+ *
4057
+ * */
3995
4058
  APOIndicator.prototype.getValues = function (series, params) {
3996
4059
  var periods = params.periods,
3997
4060
  index = params.index,
@@ -4038,18 +4101,9 @@
4038
4101
  yData: yData
4039
4102
  };
4040
4103
  };
4041
- APOIndicator.prototype.init = function () {
4042
- var args = arguments,
4043
- ctx = this;
4044
- RequiredIndicatorMixin.isParentLoaded(EMAIndicator, 'ema', ctx.type, function (indicator) {
4045
- indicator.prototype.init.apply(ctx, args);
4046
- return;
4047
- });
4048
- };
4049
4104
  /**
4050
4105
  * Absolute Price Oscillator. This series requires the `linkedTo` option to
4051
- * be set and should be loaded after the `stock/indicators/indicators.js`
4052
- * and `stock/indicators/ema.js`.
4106
+ * be set and should be loaded after the `stock/indicators/indicators.js`.
4053
4107
  *
4054
4108
  * @sample {highstock} stock/indicators/apo
4055
4109
  * Absolute Price Oscillator
@@ -4061,7 +4115,6 @@
4061
4115
  * pointInterval, pointIntervalUnit, pointPlacement,
4062
4116
  * pointRange, pointStart, showInNavigator, stacking
4063
4117
  * @requires stock/indicators/indicators
4064
- * @requires stock/indicators/ema
4065
4118
  * @requires stock/indicators/apo
4066
4119
  * @optionparent plotOptions.apo
4067
4120
  */
@@ -4107,7 +4160,6 @@
4107
4160
  * navigatorOptions, pointInterval, pointIntervalUnit,
4108
4161
  * pointPlacement, pointRange, pointStart, showInNavigator, stacking
4109
4162
  * @requires stock/indicators/indicators
4110
- * @requires stock/indicators/ema
4111
4163
  * @requires stock/indicators/apo
4112
4164
  * @apioption series.apo
4113
4165
  */
@@ -4496,16 +4548,14 @@
4496
4548
  }
4497
4549
  else {
4498
4550
  // Compare middle point of the section
4499
- concatArrIndex =
4500
- sectionPoints[x].plotY > sectionNextPoints[x].plotY ? 0 : 1;
4551
+ concatArrIndex = (sectionPoints[x].plotY > sectionNextPoints[x].plotY) ? 0 : 1;
4501
4552
  points[concatArrIndex] = points[concatArrIndex].concat(sectionPoints);
4502
4553
  nextPoints[concatArrIndex] = nextPoints[concatArrIndex].concat(sectionNextPoints);
4503
4554
  }
4504
4555
  }
4505
4556
  else {
4506
4557
  // Compare first point of the section
4507
- concatArrIndex =
4508
- sectionPoints[0].plotY > sectionNextPoints[0].plotY ? 0 : 1;
4558
+ concatArrIndex = (sectionPoints[0].plotY > sectionNextPoints[0].plotY) ? 0 : 1;
4509
4559
  points[concatArrIndex] = points[concatArrIndex].concat(sectionPoints);
4510
4560
  nextPoints[concatArrIndex] = nextPoints[concatArrIndex].concat(sectionNextPoints);
4511
4561
  }
@@ -4565,7 +4615,8 @@
4565
4615
  indicator.nextPoints);
4566
4616
  if (spanA && spanA.length) {
4567
4617
  spanA[0][0] = 'L';
4568
- path = SeriesRegistry.seriesTypes.sma.prototype.getGraphPath.call(indicator, points);
4618
+ path = SeriesRegistry.seriesTypes.sma.prototype.getGraphPath
4619
+ .call(indicator, points);
4569
4620
  spanAarr = spanA.slice(0, path.length);
4570
4621
  for (var i = spanAarr.length - 1; i >= 0; i--) {
4571
4622
  path.push(spanAarr[i]);
@@ -4573,7 +4624,8 @@
4573
4624
  }
4574
4625
  }
4575
4626
  else {
4576
- path = SeriesRegistry.seriesTypes.sma.prototype.getGraphPath.apply(indicator, arguments);
4627
+ path = SeriesRegistry.seriesTypes.sma.prototype.getGraphPath
4628
+ .apply(indicator, arguments);
4577
4629
  }
4578
4630
  return path;
4579
4631
  };
@@ -4868,7 +4920,7 @@
4868
4920
 
4869
4921
  return IKHIndicator;
4870
4922
  });
4871
- _registerModule(_modules, 'Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js', [_modules['Mixins/MultipleLines.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (MultipleLinesMixin, SeriesRegistry, U) {
4923
+ _registerModule(_modules, 'Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js', [_modules['Stock/Indicators/MultipleLinesComposition.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (MultipleLinesComposition, SeriesRegistry, U) {
4872
4924
  /* *
4873
4925
  *
4874
4926
  * License: www.highcharts.com/license
@@ -4892,10 +4944,7 @@
4892
4944
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4893
4945
  };
4894
4946
  })();
4895
- var _a = SeriesRegistry.seriesTypes,
4896
- SMAIndicator = _a.sma,
4897
- EMAIndicator = _a.ema,
4898
- ATRIndicator = _a.atr;
4947
+ var SMAIndicator = SeriesRegistry.seriesTypes.sma;
4899
4948
  var correctFloat = U.correctFloat,
4900
4949
  extend = U.extend,
4901
4950
  merge = U.merge;
@@ -5001,7 +5050,24 @@
5001
5050
  * @optionparent plotOptions.keltnerchannels
5002
5051
  */
5003
5052
  KeltnerChannelsIndicator.defaultOptions = merge(SMAIndicator.defaultOptions, {
5053
+ /**
5054
+ * Option for fill color between lines in Keltner Channels Indicator.
5055
+ *
5056
+ * @sample {highstock} stock/indicators/indicator-area-fill
5057
+ * Background fill between lines.
5058
+ *
5059
+ * @type {Highcharts.Color}
5060
+ * @since 9.3.2
5061
+ * @apioption plotOptions.keltnerchannels.fillColor
5062
+ *
5063
+ */
5004
5064
  params: {
5065
+ /**
5066
+ * The point index which indicator calculations will base. For
5067
+ * example using OHLC data, index=2 means the indicator will be
5068
+ * calculated using Low values.
5069
+ */
5070
+ index: 0,
5005
5071
  period: 20,
5006
5072
  /**
5007
5073
  * The ATR period.
@@ -5058,17 +5124,14 @@
5058
5124
  return KeltnerChannelsIndicator;
5059
5125
  }(SMAIndicator));
5060
5126
  extend(KeltnerChannelsIndicator.prototype, {
5061
- pointArrayMap: ['top', 'middle', 'bottom'],
5062
- pointValKey: 'middle',
5063
5127
  nameBase: 'Keltner Channels',
5128
+ areaLinesNames: ['top', 'bottom'],
5064
5129
  nameComponents: ['period', 'periodATR', 'multiplierATR'],
5065
5130
  linesApiNames: ['topLine', 'bottomLine'],
5066
- requiredIndicators: ['ema', 'atr'],
5067
- drawGraph: MultipleLinesMixin.drawGraph,
5068
- getTranslatedLinesNames: MultipleLinesMixin.getTranslatedLinesNames,
5069
- translate: MultipleLinesMixin.translate,
5070
- toYData: MultipleLinesMixin.toYData
5131
+ pointArrayMap: ['top', 'middle', 'bottom'],
5132
+ pointValKey: 'middle'
5071
5133
  });
5134
+ MultipleLinesComposition.compose(KeltnerChannelsIndicator);
5072
5135
  SeriesRegistry.registerSeriesType('keltnerchannels', KeltnerChannelsIndicator);
5073
5136
  /* *
5074
5137
  *
@@ -5094,7 +5157,7 @@
5094
5157
 
5095
5158
  return KeltnerChannelsIndicator;
5096
5159
  });
5097
- _registerModule(_modules, 'Stock/Indicators/Klinger/KlingerIndicator.js', [_modules['Mixins/IndicatorRequired.js'], _modules['Mixins/MultipleLines.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (RequiredIndicatorMixin, MultipleLinesMixin, SeriesRegistry, U) {
5160
+ _registerModule(_modules, 'Stock/Indicators/Klinger/KlingerIndicator.js', [_modules['Stock/Indicators/MultipleLinesComposition.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (MultipleLinesComposition, SeriesRegistry, U) {
5098
5161
  /* *
5099
5162
  *
5100
5163
  * License: www.highcharts.com/license
@@ -5138,6 +5201,11 @@
5138
5201
  var KlingerIndicator = /** @class */ (function (_super) {
5139
5202
  __extends(KlingerIndicator, _super);
5140
5203
  function KlingerIndicator() {
5204
+ /* *
5205
+ *
5206
+ * Static Properties
5207
+ *
5208
+ * */
5141
5209
  var _this = _super !== null && _super.apply(this,
5142
5210
  arguments) || this;
5143
5211
  /* *
@@ -5156,15 +5224,6 @@
5156
5224
  * Functions
5157
5225
  *
5158
5226
  * */
5159
- KlingerIndicator.prototype.init = function () {
5160
- var args = arguments,
5161
- ctx = this;
5162
- // Check if the EMA module is added.
5163
- RequiredIndicatorMixin.isParentLoaded(EMAIndicator, 'ema', ctx.type, function (indicator) {
5164
- indicator.prototype.init.apply(ctx, args);
5165
- return;
5166
- });
5167
- };
5168
5227
  KlingerIndicator.prototype.calculateTrend = function (yVal, i) {
5169
5228
  var isUpward = yVal[i][1] + yVal[i][2] + yVal[i][3] >
5170
5229
  yVal[i - 1][1] + yVal[i - 1][2] + yVal[i - 1][3];
@@ -5356,26 +5415,28 @@
5356
5415
  approximation: 'averages'
5357
5416
  },
5358
5417
  tooltip: {
5359
- pointFormat: '<span style="color: {point.color}">\u25CF</span><b> {series.name}</b><br/>' +
5360
- '<span style="color: {point.color}">Klinger</span>: {point.y}<br/>' +
5361
- '<span style="color: {point.series.options.signalLine.styles.lineColor}">Signal</span>' +
5418
+ pointFormat: '<span style="color: {point.color}">\u25CF</span>' +
5419
+ '<b> {series.name}</b><br/>' +
5420
+ '<span style="color: {point.color}">Klinger</span>: ' +
5421
+ '{point.y}<br/>' +
5422
+ '<span style="color: ' +
5423
+ '{point.series.options.signalLine.styles.lineColor}">' +
5424
+ 'Signal</span>' +
5362
5425
  ': {point.signal}<br/>'
5363
5426
  }
5364
5427
  });
5365
5428
  return KlingerIndicator;
5366
5429
  }(SMAIndicator));
5367
5430
  extend(KlingerIndicator.prototype, {
5431
+ areaLinesNames: [],
5368
5432
  linesApiNames: ['signalLine'],
5369
5433
  nameBase: 'Klinger',
5370
5434
  nameComponents: ['fastAvgPeriod', 'slowAvgPeriod'],
5371
5435
  pointArrayMap: ['y', 'signal'],
5372
5436
  parallelArrays: ['x', 'y', 'signal'],
5373
- pointValKey: 'y',
5374
- drawGraph: MultipleLinesMixin.drawGraph,
5375
- getTranslatedLinesNames: MultipleLinesMixin.getTranslatedLinesNames,
5376
- translate: MultipleLinesMixin.translate,
5377
- toYData: MultipleLinesMixin.toYData
5437
+ pointValKey: 'y'
5378
5438
  });
5439
+ MultipleLinesComposition.compose(KlingerIndicator);
5379
5440
  SeriesRegistry.registerSeriesType('klinger', KlingerIndicator);
5380
5441
  /* *
5381
5442
  *
@@ -5390,7 +5451,6 @@
5390
5451
  * @since 9.1.0
5391
5452
  * @product highstock
5392
5453
  * @requires stock/indicators/indicators
5393
- * @requires stock/indicators/ema
5394
5454
  * @requires stock/indicators/klinger
5395
5455
  * @apioption series.klinger
5396
5456
  */
@@ -5604,7 +5664,7 @@
5604
5664
  this.zones = histogramZones;
5605
5665
  };
5606
5666
  MACDIndicator.prototype.getValues = function (series, params) {
5607
- var indexToShift = params.longPeriod - params.shortPeriod, // #14197
5667
+ var indexToShift = (params.longPeriod - params.shortPeriod), // #14197
5608
5668
  j = 0,
5609
5669
  MACD = [],
5610
5670
  xMACD = [],
@@ -5688,7 +5748,7 @@
5688
5748
  /**
5689
5749
  * Moving Average Convergence Divergence (MACD). This series requires
5690
5750
  * `linkedTo` option to be set and should be loaded after the
5691
- * `stock/indicators/indicators.js` and `stock/indicators/ema.js`.
5751
+ * `stock/indicators/indicators.js`.
5692
5752
  *
5693
5753
  * @sample stock/indicators/macd
5694
5754
  * MACD indicator
@@ -5793,7 +5853,6 @@
5793
5853
  }(SMAIndicator));
5794
5854
  extend(MACDIndicator.prototype, {
5795
5855
  nameComponents: ['longPeriod', 'shortPeriod', 'signalPeriod'],
5796
- requiredIndicators: ['ema'],
5797
5856
  // "y" value is treated as Histogram data
5798
5857
  pointArrayMap: ['y', 'signal', 'MACD'],
5799
5858
  parallelArrays: ['x', 'y', 'signal', 'MACD'],
@@ -6287,9 +6346,6 @@
6287
6346
  });
6288
6347
  return NATRIndicator;
6289
6348
  }(ATRIndicator));
6290
- extend(NATRIndicator.prototype, {
6291
- requiredIndicators: ['atr']
6292
- });
6293
6349
  SeriesRegistry.registerSeriesType('natr', NATRIndicator);
6294
6350
  /* *
6295
6351
  *
@@ -6305,6 +6361,7 @@
6305
6361
  * @product highstock
6306
6362
  * @excluding dataParser, dataURL
6307
6363
  * @requires stock/indicators/indicators
6364
+ * @requires stock/indicators/atr
6308
6365
  * @requires stock/indicators/natr
6309
6366
  * @apioption series.natr
6310
6367
  */
@@ -6759,7 +6816,8 @@
6759
6816
  null;
6760
6817
  }
6761
6818
  }
6762
- SeriesRegistry.seriesTypes.sma.prototype.drawDataLabels.apply(indicator, arguments);
6819
+ SeriesRegistry.seriesTypes.sma.prototype.drawDataLabels
6820
+ .apply(indicator, arguments);
6763
6821
  });
6764
6822
  }
6765
6823
  };
@@ -6943,7 +7001,7 @@
6943
7001
 
6944
7002
  return PivotPointsIndicator;
6945
7003
  });
6946
- _registerModule(_modules, 'Stock/Indicators/PPO/PPOIndicator.js', [_modules['Mixins/IndicatorRequired.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (RequiredIndicatorMixin, SeriesRegistry, U) {
7004
+ _registerModule(_modules, 'Stock/Indicators/PPO/PPOIndicator.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
6947
7005
  /* *
6948
7006
  *
6949
7007
  * License: www.highcharts.com/license
@@ -7006,14 +7064,6 @@
7006
7064
  * Functions
7007
7065
  *
7008
7066
  * */
7009
- PPOIndicator.prototype.init = function () {
7010
- var args = arguments,
7011
- ctx = this;
7012
- RequiredIndicatorMixin.isParentLoaded(EMAIndicator, 'ema', ctx.type, function (indicator) {
7013
- indicator.prototype.init.apply(ctx, args);
7014
- return;
7015
- });
7016
- };
7017
7067
  PPOIndicator.prototype.getValues = function (series, params) {
7018
7068
  var periods = params.periods,
7019
7069
  index = params.index,
@@ -7065,7 +7115,7 @@
7065
7115
  /**
7066
7116
  * Percentage Price Oscillator. This series requires the
7067
7117
  * `linkedTo` option to be set and should be loaded after the
7068
- * `stock/indicators/indicators.js` and `stock/indicators/ema.js`.
7118
+ * `stock/indicators/indicators.js`.
7069
7119
  *
7070
7120
  * @sample {highstock} stock/indicators/ppo
7071
7121
  * Percentage Price Oscillator
@@ -7077,7 +7127,6 @@
7077
7127
  * pointInterval, pointIntervalUnit, pointPlacement,
7078
7128
  * pointRange, pointStart, showInNavigator, stacking
7079
7129
  * @requires stock/indicators/indicators
7080
- * @requires stock/indicators/ema
7081
7130
  * @requires stock/indicators/ppo
7082
7131
  * @optionparent plotOptions.ppo
7083
7132
  */
@@ -7122,7 +7171,6 @@
7122
7171
  * navigatorOptions, pointInterval, pointIntervalUnit,
7123
7172
  * pointPlacement, pointRange, pointStart, showInNavigator, stacking
7124
7173
  * @requires stock/indicators/indicators
7125
- * @requires stock/indicators/ema
7126
7174
  * @requires stock/indicators/ppo
7127
7175
  * @apioption series.ppo
7128
7176
  */
@@ -7130,7 +7178,7 @@
7130
7178
 
7131
7179
  return PPOIndicator;
7132
7180
  });
7133
- _registerModule(_modules, 'Mixins/ReduceArray.js', [], function () {
7181
+ _registerModule(_modules, 'Stock/Indicators/ArrayUtilities.js', [], function () {
7134
7182
  /**
7135
7183
  *
7136
7184
  * (c) 2010-2021 Pawel Fus & Daniel Studencki
@@ -7140,55 +7188,46 @@
7140
7188
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
7141
7189
  *
7142
7190
  * */
7143
- var reduceArrayMixin = {
7144
- /**
7145
- * Get min value of array filled by OHLC data.
7146
- * @private
7147
- * @param {Array<*>} arr Array of OHLC points (arrays).
7148
- * @param {string} index Index of "low" value in point array.
7149
- * @return {number} Returns min value.
7150
- */
7151
- minInArray: function (arr,
7152
- index) {
7153
- return arr.reduce(function (min,
7154
- target) {
7155
- return Math.min(min,
7156
- target[index]);
7157
- }, Number.MAX_VALUE);
7158
- },
7159
- /**
7160
- * Get max value of array filled by OHLC data.
7161
- * @private
7162
- * @param {Array<*>} arr Array of OHLC points (arrays).
7163
- * @param {string} index Index of "high" value in point array.
7164
- * @return {number} Returns max value.
7165
- */
7166
- maxInArray: function (arr, index) {
7167
- return arr.reduce(function (max, target) {
7168
- return Math.max(max, target[index]);
7169
- }, -Number.MAX_VALUE);
7170
- },
7171
- /**
7172
- * Get extremes of array filled by OHLC data.
7173
- * @private
7174
- * @param {Array<*>} arr Array of OHLC points (arrays).
7175
- * @param {string} minIndex Index of "low" value in point array.
7176
- * @param {string} maxIndex Index of "high" value in point array.
7177
- * @return {Array<number,number>} Returns array with min and max value.
7178
- */
7179
- getArrayExtremes: function (arr, minIndex, maxIndex) {
7180
- return arr.reduce(function (prev, target) {
7181
- return [
7182
- Math.min(prev[0], target[minIndex]),
7183
- Math.max(prev[1], target[maxIndex])
7184
- ];
7185
- }, [Number.MAX_VALUE, -Number.MAX_VALUE]);
7186
- }
7187
- };
7191
+ /* *
7192
+ *
7193
+ * Functions
7194
+ *
7195
+ * */
7196
+ /**
7197
+ * Get extremes of array filled by OHLC data.
7198
+ *
7199
+ * @private
7200
+ *
7201
+ * @param {Array<Array<number>>} arr
7202
+ * Array of OHLC points (arrays).
7203
+ *
7204
+ * @param {number} minIndex
7205
+ * Index of "low" value in point array.
7206
+ *
7207
+ * @param {number} maxIndex
7208
+ * Index of "high" value in point array.
7209
+ *
7210
+ * @return {Array<number,number>}
7211
+ * Returns array with min and max value.
7212
+ */
7213
+ function getArrayExtremes(arr, minIndex, maxIndex) {
7214
+ return arr.reduce(function (prev, target) { return [
7215
+ Math.min(prev[0], target[minIndex]),
7216
+ Math.max(prev[1], target[maxIndex])
7217
+ ]; }, [Number.MAX_VALUE, -Number.MAX_VALUE]);
7218
+ }
7219
+ /* *
7220
+ *
7221
+ * Default Export
7222
+ *
7223
+ * */
7224
+ var ArrayUtilities = {
7225
+ getArrayExtremes: getArrayExtremes
7226
+ };
7188
7227
 
7189
- return reduceArrayMixin;
7228
+ return ArrayUtilities;
7190
7229
  });
7191
- _registerModule(_modules, 'Stock/Indicators/PC/PCIndicator.js', [_modules['Core/Color/Palette.js'], _modules['Mixins/MultipleLines.js'], _modules['Mixins/ReduceArray.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (palette, MultipleLinesMixin, ReduceArrayMixin, SeriesRegistry, U) {
7230
+ _registerModule(_modules, 'Stock/Indicators/PC/PCIndicator.js', [_modules['Stock/Indicators/ArrayUtilities.js'], _modules['Stock/Indicators/MultipleLinesComposition.js'], _modules['Core/Color/Palettes.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (AU, MultipleLinesComposition, Palettes, SeriesRegistry, U) {
7192
7231
  /* *
7193
7232
  *
7194
7233
  * License: www.highcharts.com/license
@@ -7215,7 +7254,6 @@
7215
7254
  var SMAIndicator = SeriesRegistry.seriesTypes.sma;
7216
7255
  var merge = U.merge,
7217
7256
  extend = U.extend;
7218
- var getArrayExtremes = ReduceArrayMixin.getArrayExtremes;
7219
7257
  /* *
7220
7258
  *
7221
7259
  * Class
@@ -7233,6 +7271,11 @@
7233
7271
  var PCIndicator = /** @class */ (function (_super) {
7234
7272
  __extends(PCIndicator, _super);
7235
7273
  function PCIndicator() {
7274
+ /* *
7275
+ *
7276
+ * Static Properties
7277
+ *
7278
+ * */
7236
7279
  var _this = _super !== null && _super.apply(this,
7237
7280
  arguments) || this;
7238
7281
  /* *
@@ -7275,7 +7318,7 @@
7275
7318
  for (i = period; i <= yValLen; i++) {
7276
7319
  date = xVal[i - 1];
7277
7320
  slicedY = yVal.slice(i - period, i);
7278
- extremes = getArrayExtremes(slicedY, low, high);
7321
+ extremes = AU.getArrayExtremes(slicedY, low, high);
7279
7322
  TL = extremes[1];
7280
7323
  BL = extremes[0];
7281
7324
  ML = (TL + BL) / 2;
@@ -7308,6 +7351,16 @@
7308
7351
  * @optionparent plotOptions.pc
7309
7352
  */
7310
7353
  PCIndicator.defaultOptions = merge(SMAIndicator.defaultOptions, {
7354
+ /**
7355
+ * Option for fill color between lines in Price channel Indicator.
7356
+ *
7357
+ * @sample {highstock} stock/indicators/indicator-area-fill
7358
+ * background fill between lines
7359
+ *
7360
+ * @type {Highcharts.Color}
7361
+ * @apioption plotOptions.pc.fillColor
7362
+ *
7363
+ */
7311
7364
  /**
7312
7365
  * @excluding index
7313
7366
  */
@@ -7324,7 +7377,7 @@
7324
7377
  *
7325
7378
  * @type {Highcharts.ColorString}
7326
7379
  */
7327
- lineColor: palette.colors[2],
7380
+ lineColor: Palettes.colors[2],
7328
7381
  /**
7329
7382
  * Pixel width of the line.
7330
7383
  */
@@ -7339,7 +7392,7 @@
7339
7392
  *
7340
7393
  * @type {Highcharts.ColorString}
7341
7394
  */
7342
- lineColor: palette.colors[8],
7395
+ lineColor: Palettes.colors[8],
7343
7396
  /**
7344
7397
  * Pixel width of the line.
7345
7398
  */
@@ -7353,16 +7406,14 @@
7353
7406
  return PCIndicator;
7354
7407
  }(SMAIndicator));
7355
7408
  extend(PCIndicator.prototype, {
7356
- getTranslatedLinesNames: MultipleLinesMixin.getTranslatedLinesNames,
7357
- drawGraph: MultipleLinesMixin.drawGraph,
7358
- toYData: MultipleLinesMixin.toYData,
7359
- pointArrayMap: ['top', 'middle', 'bottom'],
7360
- pointValKey: 'middle',
7409
+ areaLinesNames: ['top', 'bottom'],
7361
7410
  nameBase: 'Price Channel',
7362
7411
  nameComponents: ['period'],
7363
7412
  linesApiNames: ['topLine', 'bottomLine'],
7364
- translate: MultipleLinesMixin.translate
7413
+ pointArrayMap: ['top', 'middle', 'bottom'],
7414
+ pointValKey: 'middle'
7365
7415
  });
7416
+ MultipleLinesComposition.compose(PCIndicator);
7366
7417
  SeriesRegistry.registerSeriesType('pc', PCIndicator);
7367
7418
  /* *
7368
7419
  *
@@ -8249,7 +8300,8 @@
8249
8300
  // longer then 4 (HLC, range), this ensures that we are not trying
8250
8301
  // to reach the index out of bounds
8251
8302
  index = Math.min(index, yVal[0].length - 1);
8252
- values = yVal.map(function (value) { return value[index]; });
8303
+ values = yVal
8304
+ .map(function (value) { return value[index]; });
8253
8305
  }
8254
8306
  // Calculate changes for first N points
8255
8307
  while (range < period) {
@@ -8346,7 +8398,7 @@
8346
8398
 
8347
8399
  return RSIIndicator;
8348
8400
  });
8349
- _registerModule(_modules, 'Stock/Indicators/Stochastic/StochasticIndicator.js', [_modules['Mixins/MultipleLines.js'], _modules['Mixins/ReduceArray.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (MultipleLinesMixin, ReduceArrayMixin, SeriesRegistry, U) {
8401
+ _registerModule(_modules, 'Stock/Indicators/Stochastic/StochasticIndicator.js', [_modules['Stock/Indicators/ArrayUtilities.js'], _modules['Stock/Indicators/MultipleLinesComposition.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (AU, MultipleLinesComposition, SeriesRegistry, U) {
8350
8402
  /* *
8351
8403
  *
8352
8404
  * License: www.highcharts.com/license
@@ -8374,6 +8426,11 @@
8374
8426
  var extend = U.extend,
8375
8427
  isArray = U.isArray,
8376
8428
  merge = U.merge;
8429
+ /* *
8430
+ *
8431
+ * Class
8432
+ *
8433
+ * */
8377
8434
  /**
8378
8435
  * The Stochastic series type.
8379
8436
  *
@@ -8386,6 +8443,11 @@
8386
8443
  var StochasticIndicator = /** @class */ (function (_super) {
8387
8444
  __extends(StochasticIndicator, _super);
8388
8445
  function StochasticIndicator() {
8446
+ /* *
8447
+ *
8448
+ * Static Properties
8449
+ *
8450
+ * */
8389
8451
  var _this = _super !== null && _super.apply(this,
8390
8452
  arguments) || this;
8391
8453
  _this.data = void 0;
@@ -8438,7 +8500,7 @@
8438
8500
  for (i = periodK - 1; i < yValLen; i++) {
8439
8501
  slicedY = yVal.slice(i - periodK + 1, i + 1);
8440
8502
  // Calculate %K
8441
- extremes = ReduceArrayMixin.getArrayExtremes(slicedY, low, high);
8503
+ extremes = AU.getArrayExtremes(slicedY, low, high);
8442
8504
  LL = extremes[0]; // Lowest low in %K periods
8443
8505
  CL = yVal[i][close] - LL;
8444
8506
  HL = extremes[1] - LL;
@@ -8447,7 +8509,8 @@
8447
8509
  yData.push([K, null]);
8448
8510
  // Calculate smoothed %D, which is SMA of %K
8449
8511
  if (i >= (periodK - 1) + (periodD - 1)) {
8450
- points = SeriesRegistry.seriesTypes.sma.prototype.getValues.call(this, {
8512
+ points = SeriesRegistry.seriesTypes.sma.prototype.getValues
8513
+ .call(this, {
8451
8514
  xData: xData.slice(-periodD),
8452
8515
  yData: yData.slice(-periodD)
8453
8516
  }, {
@@ -8532,17 +8595,15 @@
8532
8595
  return StochasticIndicator;
8533
8596
  }(SMAIndicator));
8534
8597
  extend(StochasticIndicator.prototype, {
8598
+ areaLinesNames: [],
8535
8599
  nameComponents: ['periods'],
8536
8600
  nameBase: 'Stochastic',
8537
8601
  pointArrayMap: ['y', 'smoothed'],
8538
8602
  parallelArrays: ['x', 'y', 'smoothed'],
8539
8603
  pointValKey: 'y',
8540
- linesApiNames: ['smoothedLine'],
8541
- drawGraph: MultipleLinesMixin.drawGraph,
8542
- getTranslatedLinesNames: MultipleLinesMixin.getTranslatedLinesNames,
8543
- translate: MultipleLinesMixin.translate,
8544
- toYData: MultipleLinesMixin.toYData
8604
+ linesApiNames: ['smoothedLine']
8545
8605
  });
8606
+ MultipleLinesComposition.compose(StochasticIndicator);
8546
8607
  SeriesRegistry.registerSeriesType('stochastic', StochasticIndicator);
8547
8608
  /* *
8548
8609
  *
@@ -8567,7 +8628,7 @@
8567
8628
 
8568
8629
  return StochasticIndicator;
8569
8630
  });
8570
- _registerModule(_modules, 'Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js', [_modules['Mixins/IndicatorRequired.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (RequiredIndicatorMixin, SeriesRegistry, U) {
8631
+ _registerModule(_modules, 'Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
8571
8632
  /* *
8572
8633
  *
8573
8634
  * License: www.highcharts.com/license
@@ -8614,14 +8675,6 @@
8614
8675
  _this.points = void 0;
8615
8676
  return _this;
8616
8677
  }
8617
- SlowStochasticIndicator.prototype.init = function () {
8618
- var args = arguments,
8619
- ctx = this;
8620
- RequiredIndicatorMixin.isParentLoaded(seriesTypes.stochastic, 'stochastic', ctx.type, function (indicator) {
8621
- indicator.prototype.init.apply(ctx, args);
8622
- return;
8623
- });
8624
- };
8625
8678
  SlowStochasticIndicator.prototype.getValues = function (series, params) {
8626
8679
  var periods = params.periods,
8627
8680
  fastValues = seriesTypes.stochastic.prototype.getValues.call(this,
@@ -8718,7 +8771,7 @@
8718
8771
 
8719
8772
  return SlowStochasticIndicator;
8720
8773
  });
8721
- _registerModule(_modules, 'Stock/Indicators/Supertrend/SupertrendIndicator.js', [_modules['Core/Color/Palette.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js'], _modules['Core/Chart/StockChart.js']], function (palette, SeriesRegistry, U, StockChart) {
8774
+ _registerModule(_modules, 'Stock/Indicators/Supertrend/SupertrendIndicator.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js'], _modules['Core/Chart/StockChart.js']], function (SeriesRegistry, U, StockChart) {
8722
8775
  /* *
8723
8776
  *
8724
8777
  * License: www.highcharts.com/license
@@ -9169,7 +9222,7 @@
9169
9222
  *
9170
9223
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
9171
9224
  */
9172
- risingTrendColor: palette.positiveColor,
9225
+ risingTrendColor: "#06b535" /* positiveColor */,
9173
9226
  /**
9174
9227
  * Color of the Supertrend series line that is above the main series.
9175
9228
  *
@@ -9178,7 +9231,7 @@
9178
9231
  *
9179
9232
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
9180
9233
  */
9181
- fallingTrendColor: palette.negativeColor,
9234
+ fallingTrendColor: "#f21313" /* negativeColor */,
9182
9235
  /**
9183
9236
  * The styles for the Supertrend line that intersect main series.
9184
9237
  *
@@ -9196,7 +9249,7 @@
9196
9249
  *
9197
9250
  * @type {Highcharts.ColorString}
9198
9251
  */
9199
- lineColor: palette.neutralColor80,
9252
+ lineColor: "#333333" /* neutralColor80 */,
9200
9253
  /**
9201
9254
  * The dash or dot style of the grid lines. For possible
9202
9255
  * values, see
@@ -9218,8 +9271,7 @@
9218
9271
  }(SMAIndicator));
9219
9272
  extend(SupertrendIndicator.prototype, {
9220
9273
  nameBase: 'Supertrend',
9221
- nameComponents: ['multiplier', 'period'],
9222
- requiredIndicators: ['atr']
9274
+ nameComponents: ['multiplier', 'period']
9223
9275
  });
9224
9276
  SeriesRegistry.registerSeriesType('supertrend', SupertrendIndicator);
9225
9277
  /* *
@@ -9334,6 +9386,7 @@
9334
9386
  arrayMax = U.arrayMax,
9335
9387
  arrayMin = U.arrayMin,
9336
9388
  correctFloat = U.correctFloat,
9389
+ defined = U.defined,
9337
9390
  error = U.error,
9338
9391
  extend = U.extend,
9339
9392
  isArray = U.isArray,
@@ -9641,7 +9694,15 @@
9641
9694
  j = 1,
9642
9695
  rangeStep,
9643
9696
  zoneStartsLength;
9644
- if (!lowRange || !highRange) {
9697
+ // If the compare mode is set on the main series, change the VBP
9698
+ // zones to fit new extremes, #16277.
9699
+ var mainSeries = indicator.linkedParent;
9700
+ if (!indicator.options.compareToMain &&
9701
+ mainSeries.dataModify) {
9702
+ lowRange = mainSeries.dataModify.modifyValue(lowRange);
9703
+ highRange = mainSeries.dataModify.modifyValue(highRange);
9704
+ }
9705
+ if (!defined(lowRange) || !defined(highRange)) {
9645
9706
  if (this.points.length) {
9646
9707
  this.setData([]);
9647
9708
  this.zoneStarts = [];
@@ -9711,6 +9772,15 @@
9711
9772
  yValues[i - 1][3] :
9712
9773
  yValues[i - 1]) :
9713
9774
  value;
9775
+ // If the compare mode is set on the main series,
9776
+ // change the VBP zones to fit new extremes, #16277.
9777
+ var mainSeries = indicator.linkedParent;
9778
+ if (!indicator.options.compareToMain &&
9779
+ mainSeries.dataModify) {
9780
+ value = mainSeries.dataModify.modifyValue(value);
9781
+ previousValue = mainSeries.dataModify
9782
+ .modifyValue(previousValue);
9783
+ }
9714
9784
  // Checks if this is the point with the
9715
9785
  // lowest close value and if so, adds it calculations
9716
9786
  if (value <= zone.start && zone.index === 0) {
@@ -9824,11 +9894,11 @@
9824
9894
  * @default {"color": "#0A9AC9", "dashStyle": "LongDash", "lineWidth": 1}
9825
9895
  */
9826
9896
  styles: {
9827
- /** @ignore-options */
9897
+ /** @ignore-option */
9828
9898
  color: '#0A9AC9',
9829
- /** @ignore-options */
9899
+ /** @ignore-option */
9830
9900
  dashStyle: 'LongDash',
9831
- /** @ignore-options */
9901
+ /** @ignore-option */
9832
9902
  lineWidth: 1
9833
9903
  }
9834
9904
  },
@@ -9881,11 +9951,10 @@
9881
9951
  extend(VBPIndicator.prototype, {
9882
9952
  nameBase: 'Volume by Price',
9883
9953
  nameComponents: ['ranges'],
9884
- bindTo: {
9885
- series: false,
9886
- eventName: 'afterSetExtremes'
9954
+ calculateOn: {
9955
+ chart: 'render',
9956
+ xAxis: 'afterSetExtremes'
9887
9957
  },
9888
- calculateOn: 'render',
9889
9958
  pointClass: VBPPoint,
9890
9959
  markerAttribs: noop,
9891
9960
  drawGraph: noop,
@@ -9905,7 +9974,7 @@
9905
9974
  * @extends series,plotOptions.vbp
9906
9975
  * @since 6.0.0
9907
9976
  * @product highstock
9908
- * @excluding dataParser, dataURL
9977
+ * @excluding dataParser, dataURL, compare, compareBase, compareStart
9909
9978
  * @requires stock/indicators/indicators
9910
9979
  * @requires stock/indicators/volume-by-price
9911
9980
  * @apioption series.vbp
@@ -10004,15 +10073,27 @@
10004
10073
  /**
10005
10074
  * Main algorithm used to calculate Volume Weighted Average Price (VWAP)
10006
10075
  * values
10076
+ *
10007
10077
  * @private
10008
- * @param {boolean} isOHLC - says if data has OHLC format
10009
- * @param {Array<number>} xValues - array of timestamps
10010
- * @param {Array<number|Array<number,number,number,number>>} yValues -
10011
- * array of yValues, can be an array of a four arrays (OHLC) or array of
10078
+ *
10079
+ * @param {boolean} isOHLC
10080
+ * Says if data has OHLC format
10081
+ *
10082
+ * @param {Array<number>} xValues
10083
+ * Array of timestamps
10084
+ *
10085
+ * @param {Array<number|Array<number,number,number,number>>} yValues
10086
+ * Array of yValues, can be an array of a four arrays (OHLC) or array of
10012
10087
  * values (line)
10013
- * @param {Array<*>} volumeSeries - volume series
10014
- * @param {number} period - number of points to be calculated
10015
- * @return {object} - Object contains computed VWAP
10088
+ *
10089
+ * @param {Array<*>} volumeSeries
10090
+ * Volume series
10091
+ *
10092
+ * @param {number} period
10093
+ * Number of points to be calculated
10094
+ *
10095
+ * @return {Object}
10096
+ * Object contains computed VWAP
10016
10097
  **/
10017
10098
  VWAPIndicator.prototype.calculateVWAPValues = function (isOHLC, xValues, yValues, volumeSeries, period) {
10018
10099
  var volumeValues = volumeSeries.yData,
@@ -10120,7 +10201,7 @@
10120
10201
 
10121
10202
  return VWAPIndicator;
10122
10203
  });
10123
- _registerModule(_modules, 'Stock/Indicators/WilliamsR/WilliamsRIndicator.js', [_modules['Mixins/ReduceArray.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (ReduceArrayMixin, SeriesRegistry, U) {
10204
+ _registerModule(_modules, 'Stock/Indicators/WilliamsR/WilliamsRIndicator.js', [_modules['Stock/Indicators/ArrayUtilities.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (AU, SeriesRegistry, U) {
10124
10205
  /* *
10125
10206
  *
10126
10207
  * License: www.highcharts.com/license
@@ -10144,7 +10225,6 @@
10144
10225
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10145
10226
  };
10146
10227
  })();
10147
- var getArrayExtremes = ReduceArrayMixin.getArrayExtremes;
10148
10228
  var SMAIndicator = SeriesRegistry.seriesTypes.sma;
10149
10229
  var extend = U.extend,
10150
10230
  isArray = U.isArray,
@@ -10197,7 +10277,7 @@
10197
10277
  // with (+1)
10198
10278
  for (i = period - 1; i < yValLen; i++) {
10199
10279
  slicedY = yVal.slice(i - period + 1, i + 1);
10200
- extremes = getArrayExtremes(slicedY, low, high);
10280
+ extremes = AU.getArrayExtremes(slicedY, low, high);
10201
10281
  LL = extremes[0];
10202
10282
  HH = extremes[1];
10203
10283
  CC = yVal[i][close];
@@ -10765,13 +10845,18 @@
10765
10845
  * */
10766
10846
  /**
10767
10847
  * Return the slope and intercept of a straight line function.
10848
+ *
10768
10849
  * @private
10769
- * @param {Highcharts.LinearRegressionIndicator} this indicator to use
10770
- * @param {Array<number>} xData - list of all x coordinates in a period
10771
- * @param {Array<number>} yData - list of all y coordinates in a period
10850
+ *
10851
+ * @param {Array<number>} xData
10852
+ * List of all x coordinates in a period.
10853
+ *
10854
+ * @param {Array<number>} yData
10855
+ * List of all y coordinates in a period.
10856
+ *
10772
10857
  * @return {Highcharts.RegressionLineParametersObject}
10773
- * object that contains the slope and the intercept
10774
- * of a straight line function
10858
+ * Object that contains the slope and the intercept of a straight line
10859
+ * function.
10775
10860
  */
10776
10861
  LinearRegressionIndicator.prototype.getRegressionLineParameters = function (xData, yData) {
10777
10862
  // least squares method
@@ -10799,12 +10884,18 @@
10799
10884
  };
10800
10885
  /**
10801
10886
  * Return the y value on a straight line.
10887
+ *
10802
10888
  * @private
10889
+ *
10803
10890
  * @param {Highcharts.RegressionLineParametersObject} lineParameters
10804
- * object that contains the slope and the intercept
10805
- * of a straight line function
10806
- * @param {number} endPointX - x coordinate of the point
10807
- * @return {number} - y value of the point that lies on the line
10891
+ * Object that contains the slope and the intercept of a straight line
10892
+ * function.
10893
+ *
10894
+ * @param {number} endPointX
10895
+ * X coordinate of the point.
10896
+ *
10897
+ * @return {number}
10898
+ * Y value of the point that lies on the line.
10808
10899
  */
10809
10900
  LinearRegressionIndicator.prototype.getEndPointY = function (lineParameters, endPointX) {
10810
10901
  return lineParameters.slope * endPointX + lineParameters.intercept;
@@ -10812,10 +10903,17 @@
10812
10903
  /**
10813
10904
  * Transform the coordinate system so that x values start at 0 and
10814
10905
  * apply xAxisUnit.
10906
+ *
10815
10907
  * @private
10816
- * @param {Array<number>} xData - list of all x coordinates in a period
10817
- * @param {number} xAxisUnit - option (see the API)
10818
- * @return {Array<number>} - array of transformed x data
10908
+ *
10909
+ * @param {Array<number>} xData
10910
+ * List of all x coordinates in a period
10911
+ *
10912
+ * @param {number} xAxisUnit
10913
+ * Option (see the API)
10914
+ *
10915
+ * @return {Array<number>}
10916
+ * Array of transformed x data
10819
10917
  */
10820
10918
  LinearRegressionIndicator.prototype.transformXData = function (xData, xAxisUnit) {
10821
10919
  var xOffset = xData[0];
@@ -10899,7 +10997,7 @@
10899
10997
  * @since 7.0.0
10900
10998
  * @product highstock
10901
10999
  * @requires stock/indicators/indicators
10902
- * @requires stock/indicators/linearregression
11000
+ * @requires stock/indicators/regressions
10903
11001
  * @optionparent plotOptions.linearregression
10904
11002
  */
10905
11003
  LinearRegressionIndicator.defaultOptions = merge(SMAIndicator.defaultOptions, {
@@ -10978,7 +11076,7 @@
10978
11076
  * @product highstock
10979
11077
  * @excluding dataParser,dataURL
10980
11078
  * @requires stock/indicators/indicators
10981
- * @requires stock/indicators/linearregression
11079
+ * @requires stock/indicators/regressions
10982
11080
  * @apioption series.linearregression
10983
11081
  */
10984
11082
  ''; // to include the above in the js output
@@ -11062,7 +11160,7 @@
11062
11160
  * @since 7.0.0
11063
11161
  * @product highstock
11064
11162
  * @requires stock/indicators/indicators
11065
- * @requires stock/indicators/linearregression
11163
+ * @requires stock/indicators/regressions
11066
11164
  * @optionparent plotOptions.linearregressionslope
11067
11165
  */
11068
11166
  LinearRegressionSlopesIndicator.defaultOptions = merge(LinearRegressionIndicator.defaultOptions);
@@ -11087,7 +11185,7 @@
11087
11185
  * @product highstock
11088
11186
  * @excluding dataParser,dataURL
11089
11187
  * @requires stock/indicators/indicators
11090
- * @requires stock/indicators/linearregressionslope
11188
+ * @requires stock/indicators/regressions
11091
11189
  * @apioption series.linearregressionslope
11092
11190
  */
11093
11191
  ''; // to include the above in the js output
@@ -11171,7 +11269,7 @@
11171
11269
  * @since 7.0.0
11172
11270
  * @product highstock
11173
11271
  * @requires stock/indicators/indicators
11174
- * @requires stock/indicators/linearregressionintercept
11272
+ * @requires stock/indicators/regressions
11175
11273
  * @optionparent plotOptions.linearregressionintercept
11176
11274
  */
11177
11275
  LinearRegressionInterceptIndicator.defaultOptions = merge(LinearRegressionIndicator.defaultOptions);
@@ -11196,7 +11294,7 @@
11196
11294
  * @product highstock
11197
11295
  * @excluding dataParser,dataURL
11198
11296
  * @requires stock/indicators/indicators
11199
- * @requires stock/indicators/linearregressionintercept
11297
+ * @requires stock/indicators/regressions
11200
11298
  * @apioption series.linearregressionintercept
11201
11299
  */
11202
11300
  ''; // to include the above in the js output
@@ -11290,7 +11388,7 @@
11290
11388
  * @since 7.0.0
11291
11389
  * @product highstock
11292
11390
  * @requires stock/indicators/indicators
11293
- * @requires stock/indicators/linearregressionangle
11391
+ * @requires stock/indicators/regressions
11294
11392
  * @optionparent plotOptions.linearregressionangle
11295
11393
  */
11296
11394
  LinearRegressionAngleIndicator.defaultOptions = merge(LinearRegressionIndicator.defaultOptions, {
@@ -11320,14 +11418,14 @@
11320
11418
  * @product highstock
11321
11419
  * @excluding dataParser,dataURL
11322
11420
  * @requires stock/indicators/indicators
11323
- * @requires stock/indicators/linearregressionangle
11421
+ * @requires stock/indicators/regressions
11324
11422
  * @apioption series.linearregressionangle
11325
11423
  */
11326
11424
  ''; // to include the above in the js output
11327
11425
 
11328
11426
  return LinearRegressionAngleIndicator;
11329
11427
  });
11330
- _registerModule(_modules, 'Stock/Indicators/ABands/ABandsIndicator.js', [_modules['Mixins/MultipleLines.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (MultipleLinesMixin, SeriesRegistry, U) {
11428
+ _registerModule(_modules, 'Stock/Indicators/ABands/ABandsIndicator.js', [_modules['Stock/Indicators/MultipleLinesComposition.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (MultipleLinesComposition, SeriesRegistry, U) {
11331
11429
  /* *
11332
11430
  *
11333
11431
  * License: www.highcharts.com/license
@@ -11511,6 +11609,17 @@
11511
11609
  * @optionparent plotOptions.abands
11512
11610
  */
11513
11611
  ABandsIndicator.defaultOptions = merge(SMAIndicator.defaultOptions, {
11612
+ /**
11613
+ * Option for fill color between lines in Accelleration bands Indicator.
11614
+ *
11615
+ * @sample {highstock} stock/indicators/indicator-area-fill
11616
+ * Background fill between lines.
11617
+ *
11618
+ * @type {Highcharts.Color}
11619
+ * @since 9.3.2
11620
+ * @apioption plotOptions.abands.fillColor
11621
+ *
11622
+ */
11514
11623
  params: {
11515
11624
  period: 20,
11516
11625
  /**
@@ -11545,16 +11654,14 @@
11545
11654
  return ABandsIndicator;
11546
11655
  }(SMAIndicator));
11547
11656
  extend(ABandsIndicator.prototype, {
11548
- drawGraph: MultipleLinesMixin.drawGraph,
11549
- getTranslatedLinesNames: MultipleLinesMixin.getTranslatedLinesNames,
11657
+ areaLinesNames: ['top', 'bottom'],
11550
11658
  linesApiNames: ['topLine', 'bottomLine'],
11551
11659
  nameBase: 'Acceleration Bands',
11552
11660
  nameComponents: ['period', 'factor'],
11553
11661
  pointArrayMap: ['top', 'middle', 'bottom'],
11554
- pointValKey: 'middle',
11555
- toYData: MultipleLinesMixin.toYData,
11556
- translate: MultipleLinesMixin.translate
11662
+ pointValKey: 'middle'
11557
11663
  });
11664
+ MultipleLinesComposition.compose(ABandsIndicator);
11558
11665
  SeriesRegistry.registerSeriesType('abands', ABandsIndicator);
11559
11666
  /* *
11560
11667
  *
@@ -11754,7 +11861,7 @@
11754
11861
 
11755
11862
  return TrendLineIndicator;
11756
11863
  });
11757
- _registerModule(_modules, 'Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js', [_modules['Mixins/IndicatorRequired.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (RequiredIndicatorMixin, SeriesRegistry, U) {
11864
+ _registerModule(_modules, 'Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
11758
11865
  /* *
11759
11866
  * (c) 2010-2021 Rafal Sebestjanski
11760
11867
  *
@@ -11804,6 +11911,11 @@
11804
11911
  var DisparityIndexIndicator = /** @class */ (function (_super) {
11805
11912
  __extends(DisparityIndexIndicator, _super);
11806
11913
  function DisparityIndexIndicator() {
11914
+ /* *
11915
+ *
11916
+ * Static Properties
11917
+ *
11918
+ * */
11807
11919
  var _this = _super !== null && _super.apply(this,
11808
11920
  arguments) || this;
11809
11921
  /* *
@@ -11827,13 +11939,9 @@
11827
11939
  ctx = this, // Disparity Index indicator
11828
11940
  params = args[1].params, // options.params
11829
11941
  averageType = params && params.average ? params.average : void 0;
11830
- ctx.averageIndicator =
11831
- SeriesRegistry.seriesTypes[averageType] || SMAIndicator;
11832
- // Check if the required average indicator modules is loaded
11833
- RequiredIndicatorMixin.isParentLoaded(ctx.averageIndicator, averageType, ctx.type, function (indicator) {
11834
- indicator.prototype.init.apply(ctx, args);
11835
- return;
11836
- });
11942
+ ctx.averageIndicator = SeriesRegistry
11943
+ .seriesTypes[averageType] || SMAIndicator;
11944
+ ctx.averageIndicator.prototype.init.apply(ctx, args);
11837
11945
  };
11838
11946
  DisparityIndexIndicator.prototype.calculateDisparityIndex = function (curPrice, periodAverage) {
11839
11947
  return correctFloat(curPrice - periodAverage) / periodAverage * 100;
@@ -11899,10 +12007,12 @@
11899
12007
  params: {
11900
12008
  /**
11901
12009
  * The average used to calculate the Disparity Index indicator.
11902
- * By default it uses SMA. To use other averages, e.g. EMA,
11903
- * the `stock/indicators/ema.js` file needs to be loaded.
12010
+ * By default it uses SMA, with EMA as an option. To use other
12011
+ * averages, e.g. TEMA, the `stock/indicators/tema.js` file needs to
12012
+ * be loaded.
11904
12013
  *
11905
- * If value is different than ema|dema|tema|wma, then sma is used.
12014
+ * If value is different than `ema`, `dema`, `tema` or `wma`,
12015
+ * then sma is used.
11906
12016
  */
11907
12017
  average: 'sma',
11908
12018
  index: 3
@@ -11926,6 +12036,11 @@
11926
12036
  * Default Export
11927
12037
  *
11928
12038
  * */
12039
+ /* *
12040
+ *
12041
+ * API Options
12042
+ *
12043
+ * */
11929
12044
  /**
11930
12045
  * The Disparity Index indicator series.
11931
12046
  * If the [type](#series.disparityindex.type) option is not