highcharts 9.2.0 → 9.3.1

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 (755) 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 +45 -0
  6. package/css/highcharts.scss +40 -0
  7. package/css/themes/dark-unica.css +45 -0
  8. package/css/themes/grid-light.css +45 -0
  9. package/css/themes/sand-signika.css +45 -0
  10. package/es-modules/Accessibility/A11yI18n.js +273 -224
  11. package/es-modules/Accessibility/Accessibility.js +237 -128
  12. package/es-modules/Accessibility/AccessibilityComponent.js +79 -314
  13. package/es-modules/Accessibility/Components/AnnotationsA11y.js +10 -0
  14. package/es-modules/Accessibility/Components/ContainerComponent.js +52 -27
  15. package/es-modules/Accessibility/Components/InfoRegionsComponent.js +173 -104
  16. package/es-modules/Accessibility/Components/LegendComponent.js +97 -65
  17. package/es-modules/Accessibility/Components/MenuComponent.js +243 -149
  18. package/es-modules/Accessibility/Components/RangeSelectorComponent.js +170 -88
  19. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +152 -115
  20. package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +133 -68
  21. package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +64 -27
  22. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +38 -21
  23. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +380 -325
  24. package/es-modules/Accessibility/Components/ZoomComponent.js +28 -20
  25. package/es-modules/Accessibility/FocusBorder.js +192 -147
  26. package/es-modules/Accessibility/HighContrastMode.js +78 -66
  27. package/es-modules/Accessibility/HighContrastTheme.js +10 -0
  28. package/es-modules/Accessibility/KeyboardNavigation.js +146 -71
  29. package/es-modules/Accessibility/KeyboardNavigationHandler.js +71 -44
  30. package/es-modules/Accessibility/Options/DeprecatedOptions.js +11 -1
  31. package/es-modules/Accessibility/Options/LangOptions.js +1 -2
  32. package/es-modules/Accessibility/Options/Options.js +32 -17
  33. package/es-modules/Accessibility/ProxyElement.js +212 -0
  34. package/es-modules/Accessibility/ProxyProvider.js +305 -0
  35. package/es-modules/Accessibility/Utils/Announcer.js +15 -8
  36. package/es-modules/Accessibility/Utils/ChartUtilities.js +41 -16
  37. package/es-modules/Accessibility/Utils/DOMElementProvider.js +27 -15
  38. package/es-modules/Accessibility/Utils/EventProvider.js +27 -17
  39. package/es-modules/Accessibility/Utils/HTMLUtilities.js +125 -30
  40. package/es-modules/Core/Axis/Axis.js +37 -30
  41. package/es-modules/Core/Axis/AxisDefaults.js +35 -24
  42. package/es-modules/Core/Axis/Color/ColorAxisComposition.js +54 -4
  43. package/es-modules/Core/Axis/Color/ColorAxisDefaults.js +5 -5
  44. package/es-modules/Core/Axis/OrdinalAxis.js +5 -13
  45. package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +4 -5
  46. package/es-modules/Core/Axis/ScrollbarAxis.js +10 -3
  47. package/es-modules/Core/Axis/TreeGridAxis.js +2 -2
  48. package/es-modules/Core/Axis/TreeGridTick.js +1 -2
  49. package/es-modules/Core/Chart/Chart.js +2 -3
  50. package/es-modules/Core/Chart/ChartDefaults.js +3 -4
  51. package/es-modules/Core/Chart/ChartNavigationComposition.js +92 -0
  52. package/es-modules/Core/Chart/MapChart.js +10 -22
  53. package/es-modules/Core/Chart/StockChart.js +3 -293
  54. package/es-modules/Core/Color/Palettes.js +22 -0
  55. package/es-modules/Core/DefaultOptions.js +19 -17
  56. package/es-modules/Core/Foundation.js +39 -31
  57. package/es-modules/Core/Globals.js +1 -1
  58. package/es-modules/Core/HttpUtilities.js +3 -3
  59. package/es-modules/Core/Legend/Legend.js +7 -3
  60. package/es-modules/Core/Navigator.js +7 -8
  61. package/es-modules/Core/Pointer.js +39 -36
  62. package/es-modules/Core/Renderer/HTML/AST.js +3 -6
  63. package/es-modules/Core/Renderer/HTML/HTMLElement.js +23 -18
  64. package/es-modules/Core/Renderer/SVG/SVGElement.js +3 -4
  65. package/es-modules/Core/Renderer/SVG/SVGRenderer.js +21 -18
  66. package/es-modules/Core/Renderer/SVG/TextBuilder.js +17 -13
  67. package/es-modules/Core/ScrollbarDefaults.js +10 -9
  68. package/es-modules/Core/Series/DataLabel.js +2 -3
  69. package/es-modules/Core/Series/Point.js +5 -3
  70. package/es-modules/Core/Series/Series.js +156 -162
  71. package/es-modules/Core/Series/SeriesDefaults.js +3 -4
  72. package/es-modules/Core/Series/SeriesRegistry.js +1 -2
  73. package/es-modules/Core/Tooltip.js +44 -17
  74. package/es-modules/Core/Utilities.js +15 -7
  75. package/es-modules/Data/DataConverter.js +489 -0
  76. package/es-modules/Data/DataPromise.js +252 -0
  77. package/es-modules/Data/DataSeriesConverter.js +203 -0
  78. package/es-modules/Data/DataTable.js +1204 -0
  79. package/es-modules/Data/Modifiers/ChainModifier.js +299 -0
  80. package/es-modules/Data/Modifiers/DataModifier.js +303 -0
  81. package/es-modules/Data/Modifiers/GroupModifier.js +144 -0
  82. package/es-modules/Data/Modifiers/InvertModifier.js +254 -0
  83. package/es-modules/Data/Modifiers/RangeModifier.js +143 -0
  84. package/es-modules/Data/Modifiers/SeriesPointsModifier.js +110 -0
  85. package/es-modules/Data/Modifiers/SortModifier.js +249 -0
  86. package/es-modules/Data/Parsers/CSVParser.js +399 -0
  87. package/es-modules/Data/Parsers/DataParser.js +101 -0
  88. package/es-modules/Data/Parsers/GoogleSheetsParser.js +220 -0
  89. package/es-modules/Data/Parsers/HTMLTableParser.js +213 -0
  90. package/es-modules/Data/Stores/CSVStore.js +317 -0
  91. package/es-modules/Data/Stores/DataStore.js +276 -0
  92. package/es-modules/Data/Stores/GoogleSheetsStore.js +167 -0
  93. package/es-modules/Data/Stores/HTMLTableStore.js +351 -0
  94. package/es-modules/Extensions/Annotations/Annotations.js +61 -11
  95. package/es-modules/Extensions/Annotations/ControlPoint.js +1 -1
  96. package/es-modules/Extensions/Annotations/Controllables/ControllableEllipse.js +199 -0
  97. package/es-modules/Extensions/Annotations/Mixins/ControllableMixin.js +7 -1
  98. package/es-modules/Extensions/Annotations/NavigationBindings.js +90 -28
  99. package/es-modules/Extensions/Annotations/Popup.js +479 -141
  100. package/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +51 -2
  101. package/es-modules/Extensions/Annotations/Types/CrookedLine.js +1 -1
  102. package/es-modules/Extensions/Annotations/Types/Fibonacci.js +2 -3
  103. package/es-modules/Extensions/Annotations/Types/FibonacciTimeZones.js +219 -0
  104. package/es-modules/Extensions/Annotations/Types/InfinityLine.js +1 -1
  105. package/es-modules/Extensions/Annotations/Types/Measure.js +14 -8
  106. package/es-modules/Extensions/Annotations/Types/Pitchfork.js +5 -5
  107. package/es-modules/Extensions/Annotations/Types/TimeCycles.js +207 -0
  108. package/es-modules/Extensions/Annotations/Types/Tunnel.js +3 -5
  109. package/es-modules/Extensions/Annotations/Types/VerticalLine.js +1 -1
  110. package/es-modules/Extensions/Boost/BoostOptions.js +2 -2
  111. package/es-modules/Extensions/Boost/BoostOverrides.js +3 -1
  112. package/es-modules/Extensions/Boost/WGLShader.js +4 -3
  113. package/es-modules/Extensions/BoostCanvas.js +1 -2
  114. package/es-modules/Extensions/CurrentDateIndication.js +2 -3
  115. package/es-modules/Extensions/Data.js +73 -67
  116. package/es-modules/Extensions/DataGrouping.js +33 -18
  117. package/es-modules/Extensions/Debugger/ErrorMessages.js +2 -2
  118. package/es-modules/Extensions/DownloadURL.js +2 -2
  119. package/es-modules/Extensions/DragPanes.js +1 -2
  120. package/es-modules/Extensions/Drilldown.js +2 -3
  121. package/es-modules/Extensions/Exporting/Exporting.js +12 -11
  122. package/es-modules/Extensions/Exporting/ExportingDefaults.js +8 -15
  123. package/es-modules/Extensions/GeoJSON.js +39 -63
  124. package/es-modules/Extensions/MarkerClusters.js +115 -97
  125. package/es-modules/Extensions/NoDataToDisplay.js +1 -2
  126. package/es-modules/Extensions/OfflineExporting/OfflineExporting.js +10 -9
  127. package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
  128. package/es-modules/Extensions/Oldie/Oldie.js +2 -3
  129. package/es-modules/Extensions/Pane.js +5 -6
  130. package/es-modules/Extensions/Polar.js +1 -1
  131. package/es-modules/Extensions/RangeSelector.js +3 -4
  132. package/es-modules/Extensions/Sonification/ChartSonify.js +247 -637
  133. package/es-modules/Extensions/Sonification/Earcon.js +136 -102
  134. package/es-modules/Extensions/Sonification/Instrument.js +496 -426
  135. package/es-modules/Extensions/Sonification/MusicalFrequencies.js +10 -0
  136. package/es-modules/Extensions/Sonification/Options.js +10 -0
  137. package/es-modules/Extensions/Sonification/PointSonify.js +203 -152
  138. package/es-modules/Extensions/Sonification/SeriesSonify.js +459 -0
  139. package/es-modules/Extensions/Sonification/SignalHandler.js +124 -0
  140. package/es-modules/Extensions/Sonification/Sonification.js +26 -52
  141. package/es-modules/Extensions/Sonification/{Utilities.js → SonificationUtilities.js} +62 -84
  142. package/es-modules/Extensions/Sonification/Timeline.js +255 -567
  143. package/es-modules/Extensions/Sonification/TimelineEvent.js +158 -0
  144. package/es-modules/Extensions/Sonification/TimelinePath.js +311 -0
  145. package/es-modules/Maps/MapNavigation.js +27 -64
  146. package/es-modules/Maps/MapNavigationOptionsDefault.js +3 -0
  147. package/es-modules/Maps/MapPointer.js +7 -5
  148. package/es-modules/Maps/MapView.js +450 -0
  149. package/es-modules/Maps/MapViewOptionsDefault.js +97 -0
  150. package/es-modules/Maps/Projection.js +436 -0
  151. package/es-modules/Maps/ProjectionDefinition.js +9 -0
  152. package/es-modules/Maps/Projections/EqualEarth.js +42 -0
  153. package/es-modules/Maps/Projections/LambertConformalConic.js +52 -0
  154. package/es-modules/Maps/Projections/Miller.js +16 -0
  155. package/es-modules/Maps/Projections/Orthographic.js +26 -0
  156. package/es-modules/Maps/Projections/ProjectionRegistry.js +19 -0
  157. package/es-modules/Maps/Projections/WebMercator.js +24 -0
  158. package/es-modules/Series/AreaRange/AreaRangeSeries.js +4 -5
  159. package/es-modules/Series/Bellcurve/BellcurveSeries.js +2 -8
  160. package/es-modules/Series/BoxPlot/BoxPlotSeries.js +1 -2
  161. package/es-modules/Series/Bubble/BubbleLegendDefaults.js +1 -2
  162. package/es-modules/Series/Bubble/BubbleLegendItem.js +3 -3
  163. package/es-modules/Series/Bubble/BubblePoint.js +5 -0
  164. package/es-modules/Series/Bubble/BubbleSeries.js +90 -50
  165. package/es-modules/Series/Candlestick/CandlestickSeries.js +10 -18
  166. package/es-modules/{Mixins/CenteredSeries.js → Series/CenteredUtilities.js} +45 -23
  167. package/es-modules/Series/ColorMapComposition.js +109 -0
  168. package/es-modules/Series/Column/ColumnDataLabel.js +5 -5
  169. package/es-modules/Series/Column/ColumnSeries.js +3 -4
  170. package/es-modules/Series/ColumnPyramid/ColumnPyramidSeries.js +6 -6
  171. package/es-modules/Series/DataModifyComposition.js +539 -0
  172. package/es-modules/Series/DependencyWheel/DependencyWheelPoint.js +2 -6
  173. package/es-modules/Series/DerivedComposition.js +137 -0
  174. package/es-modules/Series/DrawPointComposition.js +111 -0
  175. package/es-modules/Series/Dumbbell/DumbbellSeries.js +2 -3
  176. package/es-modules/Series/ErrorBar/ErrorBarSeries.js +1 -2
  177. package/es-modules/Series/Flags/FlagsSeries.js +18 -25
  178. package/es-modules/Series/Funnel/FunnelSeries.js +6 -5
  179. package/es-modules/Series/Gantt/GanttSeries.js +0 -2
  180. package/es-modules/Series/Gauge/GaugePoint.js +1 -1
  181. package/es-modules/Series/Gauge/GaugeSeries.js +7 -7
  182. package/es-modules/Series/HLC/HLCPoint.js +55 -0
  183. package/es-modules/Series/HLC/HLCSeries.js +383 -0
  184. package/es-modules/Series/Heatmap/HeatmapPoint.js +3 -4
  185. package/es-modules/Series/Heatmap/HeatmapSeries.js +19 -6
  186. package/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +2 -3
  187. package/es-modules/Series/Histogram/HistogramSeries.js +3 -7
  188. package/es-modules/Series/HollowCandlestick/HollowCandlestickPoint.js +2 -2
  189. package/es-modules/Series/HollowCandlestick/HollowCandlestickSeries.js +33 -34
  190. package/es-modules/Series/Line/LineSeries.js +1 -2
  191. package/es-modules/Series/Map/MapPoint.js +23 -16
  192. package/es-modules/Series/Map/MapSeries.js +271 -309
  193. package/es-modules/Series/MapBubble/MapBubblePoint.js +0 -3
  194. package/es-modules/Series/MapBubble/MapBubbleSeries.js +10 -1
  195. package/es-modules/Series/MapLine/MapLineSeries.js +2 -0
  196. package/es-modules/Series/MapPoint/MapPointPoint.js +5 -1
  197. package/es-modules/Series/MapPoint/MapPointSeries.js +99 -14
  198. package/es-modules/Series/Networkgraph/Networkgraph.js +5 -5
  199. package/es-modules/{Mixins/Nodes.js → Series/NodesComposition.js} +76 -29
  200. package/es-modules/Series/OHLC/OHLCPoint.js +2 -6
  201. package/es-modules/Series/OHLC/OHLCSeries.js +55 -183
  202. package/es-modules/{Mixins/OnSeries.js → Series/OnSeriesComposition.js} +53 -21
  203. package/es-modules/Series/Organization/OrganizationSeries.js +2 -3
  204. package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +46 -6
  205. package/es-modules/Series/ParetoSeries/ParetoSeries.js +3 -7
  206. package/es-modules/Series/Pie/PieDataLabel.js +1 -2
  207. package/es-modules/Series/Pie/PieSeries.js +6 -7
  208. package/es-modules/Series/Sankey/SankeyPoint.js +0 -4
  209. package/es-modules/Series/Sankey/SankeySeries.js +89 -20
  210. package/es-modules/Series/Sunburst/SunburstPoint.js +2 -3
  211. package/es-modules/Series/Sunburst/SunburstSeries.js +4 -4
  212. package/es-modules/Series/Tilemap/TilemapPoint.js +2 -3
  213. package/es-modules/Series/Timeline/TimelineSeries.js +3 -4
  214. package/es-modules/{Mixins/TreeSeries.js → Series/TreeUtilities.js} +86 -76
  215. package/es-modules/Series/Treemap/TreemapPoint.js +2 -2
  216. package/es-modules/Series/Treemap/TreemapSeries.js +8 -8
  217. package/es-modules/Series/Venn/VennPoint.js +16 -7
  218. package/es-modules/Series/Venn/VennSeries.js +5 -8
  219. package/es-modules/Series/Venn/VennUtils.js +550 -439
  220. package/es-modules/Series/Waterfall/WaterfallSeries.js +2 -3
  221. package/es-modules/Series/Windbarb/WindbarbSeries.js +23 -24
  222. package/es-modules/Series/Wordcloud/WordcloudPoint.js +8 -6
  223. package/es-modules/Series/Wordcloud/WordcloudSeries.js +24 -20
  224. package/es-modules/Series/Wordcloud/WordcloudUtils.js +673 -484
  225. package/es-modules/Series/XRange/XRangePoint.js +1 -0
  226. package/es-modules/Stock/Indicators/ABands/ABandsIndicator.js +3 -6
  227. package/es-modules/Stock/Indicators/AO/AOIndicator.js +2 -3
  228. package/es-modules/Stock/Indicators/APO/APOIndicator.js +14 -20
  229. package/es-modules/Stock/Indicators/Aroon/AroonIndicator.js +3 -6
  230. package/es-modules/Stock/Indicators/AroonOscillator/AroonOscillatorIndicator.js +11 -13
  231. package/es-modules/Stock/Indicators/ArrayUtilities.js +47 -0
  232. package/es-modules/Stock/Indicators/BB/BBIndicator.js +27 -11
  233. package/es-modules/Stock/Indicators/Chaikin/ChaikinIndicator.js +6 -12
  234. package/es-modules/Stock/Indicators/DEMA/DEMAIndicator.js +1 -11
  235. package/es-modules/Stock/Indicators/DMI/DMIIndicator.js +19 -11
  236. package/es-modules/Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js +17 -11
  237. package/es-modules/Stock/Indicators/EMA/EMAIndicator.js +1 -3
  238. package/es-modules/Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js +11 -9
  239. package/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +8 -16
  240. package/es-modules/Stock/Indicators/LinearRegression/LinearRegression.js +2 -2
  241. package/es-modules/Stock/Indicators/LinearRegressionAngle/LinearRegressionAngle.js +2 -2
  242. package/es-modules/Stock/Indicators/LinearRegressionIntercept/LinearRegressionIntercept.js +2 -2
  243. package/es-modules/Stock/Indicators/LinearRegressionSlopes/LinearRegressionSlopes.js +2 -2
  244. package/es-modules/Stock/Indicators/MACD/MACDIndicator.js +1 -2
  245. package/es-modules/{Mixins/MultipleLines.js → Stock/Indicators/MultipleLinesComposition.js} +136 -87
  246. package/es-modules/Stock/Indicators/NATR/NATRIndicator.js +1 -3
  247. package/es-modules/Stock/Indicators/PC/PCIndicator.js +14 -13
  248. package/es-modules/Stock/Indicators/PPO/PPOIndicator.js +1 -11
  249. package/es-modules/Stock/Indicators/SMA/SMAComposition.js +0 -26
  250. package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +32 -49
  251. package/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +0 -8
  252. package/es-modules/Stock/Indicators/Stochastic/StochasticIndicator.js +15 -8
  253. package/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +4 -6
  254. package/es-modules/Stock/Indicators/TEMA/TEMAIndicator.js +26 -11
  255. package/es-modules/Stock/Indicators/TRIX/TRIXIndicator.js +6 -12
  256. package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +23 -7
  257. package/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +2 -3
  258. package/es-modules/Stock/StockToolsBindings.js +144 -42
  259. package/es-modules/Stock/StockToolsGui.js +409 -15
  260. package/es-modules/masters/highcharts-3d.src.js +1 -1
  261. package/es-modules/masters/highcharts-gantt.src.js +1 -1
  262. package/es-modules/masters/highcharts-more.src.js +1 -1
  263. package/es-modules/masters/highcharts.src.js +1 -1
  264. package/es-modules/masters/highmaps.src.js +1 -1
  265. package/es-modules/masters/highstock.src.js +1 -1
  266. package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
  267. package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
  268. package/es-modules/masters/indicators/ao.src.js +1 -1
  269. package/es-modules/masters/indicators/apo.src.js +1 -1
  270. package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
  271. package/es-modules/masters/indicators/aroon.src.js +1 -1
  272. package/es-modules/masters/indicators/atr.src.js +1 -1
  273. package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
  274. package/es-modules/masters/indicators/cci.src.js +1 -1
  275. package/es-modules/masters/indicators/chaikin.src.js +1 -1
  276. package/es-modules/masters/indicators/cmf.src.js +1 -1
  277. package/es-modules/masters/indicators/cmo.src.js +1 -1
  278. package/es-modules/masters/indicators/dema.src.js +1 -1
  279. package/es-modules/masters/indicators/disparity-index.src.js +1 -1
  280. package/es-modules/masters/indicators/dmi.src.js +1 -1
  281. package/es-modules/masters/indicators/dpo.src.js +1 -1
  282. package/es-modules/masters/indicators/ema.src.js +4 -10
  283. package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
  284. package/es-modules/masters/indicators/indicators-all.src.js +2 -2
  285. package/es-modules/masters/indicators/indicators.src.js +2 -1
  286. package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
  287. package/es-modules/masters/indicators/klinger.src.js +1 -1
  288. package/es-modules/masters/indicators/macd.src.js +1 -1
  289. package/es-modules/masters/indicators/mfi.src.js +1 -1
  290. package/es-modules/masters/indicators/momentum.src.js +1 -1
  291. package/es-modules/masters/indicators/natr.src.js +1 -1
  292. package/es-modules/masters/indicators/obv.src.js +1 -1
  293. package/es-modules/masters/indicators/pivot-points.src.js +1 -1
  294. package/es-modules/masters/indicators/ppo.src.js +1 -1
  295. package/es-modules/masters/indicators/price-channel.src.js +1 -1
  296. package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
  297. package/es-modules/masters/indicators/psar.src.js +1 -1
  298. package/es-modules/masters/indicators/regressions.src.js +1 -1
  299. package/es-modules/masters/indicators/roc.src.js +1 -1
  300. package/es-modules/masters/indicators/rsi.src.js +1 -1
  301. package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
  302. package/es-modules/masters/indicators/stochastic.src.js +1 -1
  303. package/es-modules/masters/indicators/supertrend.src.js +1 -1
  304. package/es-modules/masters/indicators/tema.src.js +1 -1
  305. package/es-modules/masters/indicators/trendline.src.js +1 -1
  306. package/es-modules/masters/indicators/trix.src.js +1 -1
  307. package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
  308. package/es-modules/masters/indicators/vwap.src.js +1 -1
  309. package/es-modules/masters/indicators/williams-r.src.js +1 -1
  310. package/es-modules/masters/indicators/wma.src.js +1 -1
  311. package/es-modules/masters/indicators/zigzag.src.js +1 -1
  312. package/es-modules/masters/modules/accessibility.src.js +16 -2
  313. package/es-modules/masters/modules/annotations-advanced.src.js +3 -1
  314. package/es-modules/masters/modules/annotations.src.js +1 -1
  315. package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
  316. package/es-modules/masters/modules/boost-canvas.src.js +1 -1
  317. package/es-modules/masters/modules/boost.src.js +1 -1
  318. package/es-modules/masters/modules/broken-axis.src.js +1 -1
  319. package/es-modules/masters/modules/bullet.src.js +1 -1
  320. package/es-modules/masters/modules/coloraxis.src.js +1 -1
  321. package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
  322. package/es-modules/masters/modules/cylinder.src.js +1 -1
  323. package/es-modules/masters/modules/data.src.js +6 -3
  324. package/es-modules/masters/modules/datagrouping.src.js +1 -1
  325. package/es-modules/masters/modules/debugger.src.js +1 -1
  326. package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
  327. package/es-modules/masters/modules/dotplot.src.js +1 -1
  328. package/es-modules/masters/modules/drag-panes.src.js +1 -1
  329. package/es-modules/masters/modules/draggable-points.src.js +1 -1
  330. package/es-modules/masters/modules/drilldown.src.js +1 -1
  331. package/es-modules/masters/modules/dumbbell.src.js +1 -1
  332. package/es-modules/masters/modules/export-data.src.js +1 -1
  333. package/es-modules/masters/modules/exporting.src.js +1 -1
  334. package/es-modules/masters/modules/full-screen.src.js +1 -1
  335. package/es-modules/masters/modules/funnel.src.js +1 -1
  336. package/es-modules/masters/modules/funnel3d.src.js +1 -1
  337. package/es-modules/masters/modules/gantt.src.js +1 -1
  338. package/es-modules/masters/modules/grid-axis.src.js +1 -1
  339. package/es-modules/masters/modules/heatmap.src.js +1 -2
  340. package/es-modules/masters/modules/heikinashi.src.js +1 -1
  341. package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
  342. package/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
  343. package/es-modules/masters/modules/item-series.src.js +1 -1
  344. package/es-modules/masters/modules/lollipop.src.js +1 -1
  345. package/es-modules/masters/modules/map.src.js +1 -3
  346. package/es-modules/masters/modules/marker-clusters.src.js +1 -1
  347. package/es-modules/masters/modules/networkgraph.src.js +1 -1
  348. package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
  349. package/es-modules/masters/modules/offline-exporting.src.js +1 -1
  350. package/es-modules/masters/modules/oldie-polyfills.src.js +1 -1
  351. package/es-modules/masters/modules/oldie.src.js +1 -1
  352. package/es-modules/masters/modules/organization.src.js +1 -1
  353. package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
  354. package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
  355. package/es-modules/masters/modules/pareto.src.js +1 -1
  356. package/es-modules/masters/modules/pathfinder.src.js +1 -1
  357. package/es-modules/masters/modules/pattern-fill.src.js +1 -1
  358. package/es-modules/masters/modules/price-indicator.src.js +1 -1
  359. package/es-modules/masters/modules/pyramid3d.src.js +1 -1
  360. package/es-modules/masters/modules/sankey.src.js +1 -1
  361. package/es-modules/masters/modules/series-label.src.js +1 -1
  362. package/es-modules/masters/modules/solid-gauge.src.js +1 -1
  363. package/es-modules/masters/modules/sonification.src.js +33 -2
  364. package/es-modules/masters/modules/static-scale.src.js +1 -1
  365. package/es-modules/masters/modules/stock-tools.src.js +1 -1
  366. package/es-modules/masters/modules/stock.src.js +4 -1
  367. package/es-modules/masters/modules/streamgraph.src.js +1 -1
  368. package/es-modules/masters/modules/sunburst.src.js +1 -1
  369. package/es-modules/masters/modules/tilemap.src.js +1 -1
  370. package/es-modules/masters/modules/timeline.src.js +1 -1
  371. package/es-modules/masters/modules/treegrid.src.js +1 -1
  372. package/es-modules/masters/modules/treemap.src.js +1 -1
  373. package/es-modules/masters/modules/variable-pie.src.js +1 -1
  374. package/es-modules/masters/modules/variwide.src.js +1 -1
  375. package/es-modules/masters/modules/vector.src.js +1 -1
  376. package/es-modules/masters/modules/venn.src.js +1 -1
  377. package/es-modules/masters/modules/windbarb.src.js +1 -1
  378. package/es-modules/masters/modules/wordcloud.src.js +1 -1
  379. package/es-modules/masters/modules/xrange.src.js +1 -1
  380. package/es-modules/masters/themes/avocado.src.js +1 -1
  381. package/es-modules/masters/themes/dark-blue.src.js +1 -1
  382. package/es-modules/masters/themes/dark-green.src.js +1 -1
  383. package/es-modules/masters/themes/dark-unica.src.js +1 -1
  384. package/es-modules/masters/themes/gray.src.js +1 -1
  385. package/es-modules/masters/themes/grid-light.src.js +1 -1
  386. package/es-modules/masters/themes/grid.src.js +1 -1
  387. package/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
  388. package/es-modules/masters/themes/high-contrast-light.src.js +1 -1
  389. package/es-modules/masters/themes/sand-signika.src.js +1 -1
  390. package/es-modules/masters/themes/skies.src.js +1 -1
  391. package/es-modules/masters/themes/sunset.src.js +1 -1
  392. package/highcharts-3d.js +1 -1
  393. package/highcharts-3d.src.js +1 -1
  394. package/highcharts-gantt.js +799 -801
  395. package/highcharts-gantt.js.map +1 -1
  396. package/highcharts-gantt.src.js +793 -755
  397. package/highcharts-more.js +194 -193
  398. package/highcharts-more.js.map +1 -1
  399. package/highcharts-more.src.js +208 -120
  400. package/highcharts.d.ts +9814 -4231
  401. package/highcharts.js +585 -587
  402. package/highcharts.js.map +1 -1
  403. package/highcharts.src.d.ts +9814 -4231
  404. package/highcharts.src.js +626 -603
  405. package/highmaps.js +728 -707
  406. package/highmaps.js.map +1 -1
  407. package/highmaps.src.js +2824 -1613
  408. package/highstock.js +788 -782
  409. package/highstock.js.map +1 -1
  410. package/highstock.src.js +1913 -1284
  411. package/indicators/acceleration-bands.js +10 -9
  412. package/indicators/acceleration-bands.js.map +1 -1
  413. package/indicators/acceleration-bands.src.js +156 -112
  414. package/indicators/accumulation-distribution.js +1 -1
  415. package/indicators/accumulation-distribution.src.js +1 -1
  416. package/indicators/ao.js +6 -6
  417. package/indicators/ao.js.map +1 -1
  418. package/indicators/ao.src.js +4 -4
  419. package/indicators/apo.js +5 -6
  420. package/indicators/apo.js.map +1 -1
  421. package/indicators/apo.src.js +16 -84
  422. package/indicators/aroon-oscillator.js +9 -9
  423. package/indicators/aroon-oscillator.js.map +1 -1
  424. package/indicators/aroon-oscillator.src.js +160 -177
  425. package/indicators/aroon.js +9 -9
  426. package/indicators/aroon.js.map +1 -1
  427. package/indicators/aroon.src.js +156 -112
  428. package/indicators/atr.js +1 -1
  429. package/indicators/atr.src.js +1 -1
  430. package/indicators/bollinger-bands.js +10 -9
  431. package/indicators/bollinger-bands.js.map +1 -1
  432. package/indicators/bollinger-bands.src.js +180 -117
  433. package/indicators/cci.js +1 -1
  434. package/indicators/cci.src.js +1 -1
  435. package/indicators/chaikin.js +8 -9
  436. package/indicators/chaikin.js.map +1 -1
  437. package/indicators/chaikin.src.js +8 -76
  438. package/indicators/cmf.js +1 -1
  439. package/indicators/cmf.src.js +1 -1
  440. package/indicators/cmo.js +1 -1
  441. package/indicators/cmo.src.js +1 -1
  442. package/indicators/dema.js +5 -6
  443. package/indicators/dema.js.map +1 -1
  444. package/indicators/dema.src.js +3 -75
  445. package/indicators/disparity-index.js +6 -7
  446. package/indicators/disparity-index.js.map +1 -1
  447. package/indicators/disparity-index.src.js +19 -74
  448. package/indicators/dmi.js +11 -11
  449. package/indicators/dmi.js.map +1 -1
  450. package/indicators/dmi.src.js +173 -116
  451. package/indicators/dpo.js +1 -1
  452. package/indicators/dpo.src.js +1 -1
  453. package/indicators/ema.js +1 -13
  454. package/indicators/ema.js.map +1 -1
  455. package/indicators/ema.src.js +7 -188
  456. package/indicators/ichimoku-kinko-hyo.js +1 -1
  457. package/indicators/ichimoku-kinko-hyo.src.js +1 -1
  458. package/indicators/indicators-all.js +197 -203
  459. package/indicators/indicators-all.js.map +1 -1
  460. package/indicators/indicators-all.src.js +677 -743
  461. package/indicators/indicators.js +12 -12
  462. package/indicators/indicators.js.map +1 -1
  463. package/indicators/indicators.src.js +213 -143
  464. package/indicators/keltner-channels.js +10 -10
  465. package/indicators/keltner-channels.js.map +1 -1
  466. package/indicators/keltner-channels.src.js +164 -118
  467. package/indicators/klinger.js +12 -13
  468. package/indicators/klinger.js.map +1 -1
  469. package/indicators/klinger.src.js +161 -184
  470. package/indicators/macd.js +2 -2
  471. package/indicators/macd.js.map +1 -1
  472. package/indicators/macd.src.js +2 -3
  473. package/indicators/mfi.js +1 -1
  474. package/indicators/mfi.src.js +1 -1
  475. package/indicators/momentum.js +1 -1
  476. package/indicators/momentum.src.js +1 -1
  477. package/indicators/natr.js +3 -3
  478. package/indicators/natr.js.map +1 -1
  479. package/indicators/natr.src.js +2 -4
  480. package/indicators/obv.js +1 -1
  481. package/indicators/obv.src.js +1 -1
  482. package/indicators/pivot-points.js +1 -1
  483. package/indicators/pivot-points.src.js +1 -1
  484. package/indicators/ppo.js +5 -6
  485. package/indicators/ppo.js.map +1 -1
  486. package/indicators/ppo.src.js +3 -75
  487. package/indicators/price-channel.js +9 -9
  488. package/indicators/price-channel.js.map +1 -1
  489. package/indicators/price-channel.src.js +207 -168
  490. package/indicators/price-envelopes.js +1 -1
  491. package/indicators/price-envelopes.src.js +1 -1
  492. package/indicators/psar.js +1 -1
  493. package/indicators/psar.src.js +1 -1
  494. package/indicators/regressions.js +1 -1
  495. package/indicators/regressions.src.js +9 -9
  496. package/indicators/roc.js +1 -1
  497. package/indicators/roc.src.js +1 -1
  498. package/indicators/rsi.js +1 -1
  499. package/indicators/rsi.src.js +1 -1
  500. package/indicators/slow-stochastic.js +5 -6
  501. package/indicators/slow-stochastic.js.map +1 -1
  502. package/indicators/slow-stochastic.src.js +2 -72
  503. package/indicators/stochastic.js +10 -10
  504. package/indicators/stochastic.js.map +1 -1
  505. package/indicators/stochastic.src.js +209 -164
  506. package/indicators/supertrend.js +10 -10
  507. package/indicators/supertrend.js.map +1 -1
  508. package/indicators/supertrend.src.js +6 -7
  509. package/indicators/tema.js +6 -7
  510. package/indicators/tema.js.map +1 -1
  511. package/indicators/tema.src.js +28 -75
  512. package/indicators/trendline.js +1 -1
  513. package/indicators/trendline.src.js +1 -1
  514. package/indicators/trix.js +4 -5
  515. package/indicators/trix.js.map +1 -1
  516. package/indicators/trix.src.js +8 -76
  517. package/indicators/volume-by-price.js +16 -16
  518. package/indicators/volume-by-price.js.map +1 -1
  519. package/indicators/volume-by-price.src.js +24 -7
  520. package/indicators/vwap.js +1 -1
  521. package/indicators/vwap.src.js +1 -1
  522. package/indicators/williams-r.js +5 -6
  523. package/indicators/williams-r.js.map +1 -1
  524. package/indicators/williams-r.src.js +41 -51
  525. package/indicators/wma.js +1 -1
  526. package/indicators/wma.src.js +1 -1
  527. package/indicators/zigzag.js +1 -1
  528. package/indicators/zigzag.src.js +1 -1
  529. package/modules/accessibility.d.ts +5 -0
  530. package/modules/accessibility.js +237 -216
  531. package/modules/accessibility.js.map +1 -1
  532. package/modules/accessibility.src.d.ts +5 -0
  533. package/modules/accessibility.src.js +7400 -6078
  534. package/modules/annotations-advanced.d.ts +30 -0
  535. package/modules/annotations-advanced.js +192 -165
  536. package/modules/annotations-advanced.js.map +1 -1
  537. package/modules/annotations-advanced.src.d.ts +30 -0
  538. package/modules/annotations-advanced.src.js +1604 -332
  539. package/modules/annotations.js +121 -106
  540. package/modules/annotations.js.map +1 -1
  541. package/modules/annotations.src.js +981 -238
  542. package/modules/arrow-symbols.js +1 -1
  543. package/modules/arrow-symbols.src.js +1 -1
  544. package/modules/boost-canvas.js +15 -15
  545. package/modules/boost-canvas.js.map +1 -1
  546. package/modules/boost-canvas.src.js +3 -3
  547. package/modules/boost.js +79 -79
  548. package/modules/boost.js.map +1 -1
  549. package/modules/boost.src.js +10 -9
  550. package/modules/broken-axis.js +1 -1
  551. package/modules/broken-axis.src.js +1 -1
  552. package/modules/bullet.js +1 -1
  553. package/modules/bullet.src.js +1 -1
  554. package/modules/coloraxis.js +24 -24
  555. package/modules/coloraxis.js.map +1 -1
  556. package/modules/coloraxis.src.js +69 -98
  557. package/modules/current-date-indicator.js +4 -4
  558. package/modules/current-date-indicator.js.map +1 -1
  559. package/modules/current-date-indicator.src.js +4 -4
  560. package/modules/cylinder.js +1 -1
  561. package/modules/cylinder.src.js +1 -1
  562. package/modules/data.js +32 -32
  563. package/modules/data.js.map +1 -1
  564. package/modules/data.src.js +85 -88
  565. package/modules/datagrouping.js +20 -20
  566. package/modules/datagrouping.js.map +1 -1
  567. package/modules/datagrouping.src.js +35 -19
  568. package/modules/debugger.js +3 -3
  569. package/modules/debugger.js.map +1 -1
  570. package/modules/debugger.src.js +3 -3
  571. package/modules/dependency-wheel.js +11 -11
  572. package/modules/dependency-wheel.js.map +1 -1
  573. package/modules/dependency-wheel.src.js +4 -7
  574. package/modules/dotplot.js +1 -1
  575. package/modules/dotplot.src.js +1 -1
  576. package/modules/drag-panes.js +8 -8
  577. package/modules/drag-panes.js.map +1 -1
  578. package/modules/drag-panes.src.js +3 -3
  579. package/modules/draggable-points.js +1 -1
  580. package/modules/draggable-points.src.js +1 -1
  581. package/modules/drilldown.js +24 -24
  582. package/modules/drilldown.js.map +1 -1
  583. package/modules/drilldown.src.js +4 -4
  584. package/modules/dumbbell.js +17 -17
  585. package/modules/dumbbell.js.map +1 -1
  586. package/modules/dumbbell.src.js +4 -4
  587. package/modules/export-data.js +1 -1
  588. package/modules/export-data.js.map +1 -1
  589. package/modules/export-data.src.js +3 -3
  590. package/modules/exporting.js +39 -38
  591. package/modules/exporting.js.map +1 -1
  592. package/modules/exporting.src.js +102 -72
  593. package/modules/full-screen.js +1 -1
  594. package/modules/full-screen.src.js +1 -1
  595. package/modules/funnel.js +12 -12
  596. package/modules/funnel.js.map +1 -1
  597. package/modules/funnel.src.js +9 -6
  598. package/modules/funnel3d.js +1 -1
  599. package/modules/funnel3d.src.js +1 -1
  600. package/modules/gantt.js +217 -218
  601. package/modules/gantt.js.map +1 -1
  602. package/modules/gantt.src.js +167 -152
  603. package/modules/grid-axis.js +1 -1
  604. package/modules/grid-axis.src.js +1 -1
  605. package/modules/heatmap.js +39 -39
  606. package/modules/heatmap.js.map +1 -1
  607. package/modules/heatmap.src.js +177 -162
  608. package/modules/heikinashi.js +1 -1
  609. package/modules/heikinashi.src.js +4 -4
  610. package/modules/histogram-bellcurve.js +13 -13
  611. package/modules/histogram-bellcurve.js.map +1 -1
  612. package/modules/histogram-bellcurve.src.js +91 -86
  613. package/modules/hollowcandlestick.js +9 -9
  614. package/modules/hollowcandlestick.js.map +1 -1
  615. package/modules/hollowcandlestick.src.js +37 -37
  616. package/modules/item-series.js +1 -1
  617. package/modules/item-series.src.js +1 -1
  618. package/modules/lollipop.js +1 -1
  619. package/modules/lollipop.src.js +1 -1
  620. package/modules/map.d.ts +136 -14
  621. package/modules/map.js +144 -122
  622. package/modules/map.js.map +1 -1
  623. package/modules/map.src.d.ts +136 -14
  624. package/modules/map.src.js +2227 -1039
  625. package/modules/marker-clusters.js +36 -36
  626. package/modules/marker-clusters.js.map +1 -1
  627. package/modules/marker-clusters.src.js +173 -142
  628. package/modules/networkgraph.d.ts +12 -1
  629. package/modules/networkgraph.js +49 -49
  630. package/modules/networkgraph.js.map +1 -1
  631. package/modules/networkgraph.src.d.ts +12 -1
  632. package/modules/networkgraph.src.js +91 -43
  633. package/modules/no-data-to-display.js +5 -5
  634. package/modules/no-data-to-display.js.map +1 -1
  635. package/modules/no-data-to-display.src.js +3 -3
  636. package/modules/offline-exporting.js +18 -17
  637. package/modules/offline-exporting.js.map +1 -1
  638. package/modules/offline-exporting.src.js +14 -14
  639. package/modules/oldie-polyfills.js +1 -1
  640. package/modules/oldie-polyfills.src.js +1 -1
  641. package/modules/oldie.js +26 -26
  642. package/modules/oldie.js.map +1 -1
  643. package/modules/oldie.src.js +4 -4
  644. package/modules/organization.js +13 -13
  645. package/modules/organization.js.map +1 -1
  646. package/modules/organization.src.js +4 -4
  647. package/modules/overlapping-datalabels.js +1 -1
  648. package/modules/overlapping-datalabels.src.js +1 -1
  649. package/modules/parallel-coordinates.js +1 -1
  650. package/modules/parallel-coordinates.src.js +1 -1
  651. package/modules/pareto.js +7 -7
  652. package/modules/pareto.js.map +1 -1
  653. package/modules/pareto.src.js +89 -78
  654. package/modules/pathfinder.js +1 -1
  655. package/modules/pathfinder.src.js +1 -1
  656. package/modules/pattern-fill.js +1 -1
  657. package/modules/pattern-fill.src.js +1 -1
  658. package/modules/price-indicator.js +1 -1
  659. package/modules/price-indicator.src.js +1 -1
  660. package/modules/pyramid3d.js +1 -1
  661. package/modules/pyramid3d.src.js +1 -1
  662. package/modules/sankey.d.ts +12 -1
  663. package/modules/sankey.js +29 -29
  664. package/modules/sankey.js.map +1 -1
  665. package/modules/sankey.src.d.ts +12 -1
  666. package/modules/sankey.src.js +300 -176
  667. package/modules/series-label.js +1 -1
  668. package/modules/series-label.src.js +1 -1
  669. package/modules/solid-gauge.js +1 -1
  670. package/modules/solid-gauge.src.js +1 -1
  671. package/modules/sonification.js +59 -55
  672. package/modules/sonification.js.map +1 -1
  673. package/modules/sonification.src.js +3034 -2553
  674. package/modules/static-scale.js +1 -1
  675. package/modules/static-scale.src.js +1 -1
  676. package/modules/stock-tools.js +178 -163
  677. package/modules/stock-tools.js.map +1 -1
  678. package/modules/stock-tools.src.js +1028 -144
  679. package/modules/stock.d.ts +39 -6
  680. package/modules/stock.js +204 -196
  681. package/modules/stock.js.map +1 -1
  682. package/modules/stock.src.d.ts +39 -6
  683. package/modules/stock.src.js +1667 -1061
  684. package/modules/streamgraph.js +1 -1
  685. package/modules/streamgraph.src.js +1 -1
  686. package/modules/sunburst.js +61 -60
  687. package/modules/sunburst.js.map +1 -1
  688. package/modules/sunburst.src.js +329 -266
  689. package/modules/tilemap.js +17 -17
  690. package/modules/tilemap.js.map +1 -1
  691. package/modules/tilemap.src.js +3 -4
  692. package/modules/timeline.js +18 -18
  693. package/modules/timeline.js.map +1 -1
  694. package/modules/timeline.src.js +5 -5
  695. package/modules/treegrid.js +56 -57
  696. package/modules/treegrid.js.map +1 -1
  697. package/modules/treegrid.src.js +126 -120
  698. package/modules/treemap.js +41 -41
  699. package/modules/treemap.js.map +1 -1
  700. package/modules/treemap.src.js +319 -254
  701. package/modules/variable-pie.js +1 -1
  702. package/modules/variable-pie.src.js +1 -1
  703. package/modules/variwide.js +1 -1
  704. package/modules/variwide.src.js +1 -1
  705. package/modules/vector.js +1 -1
  706. package/modules/vector.src.js +1 -1
  707. package/modules/venn.js +31 -31
  708. package/modules/venn.js.map +1 -1
  709. package/modules/venn.src.js +731 -721
  710. package/modules/windbarb.js +15 -15
  711. package/modules/windbarb.js.map +1 -1
  712. package/modules/windbarb.src.js +90 -62
  713. package/modules/wordcloud.js +23 -24
  714. package/modules/wordcloud.js.map +1 -1
  715. package/modules/wordcloud.src.js +897 -949
  716. package/modules/xrange.js +2 -2
  717. package/modules/xrange.js.map +1 -1
  718. package/modules/xrange.src.js +2 -1
  719. package/package.json +1 -1
  720. package/themes/avocado.js +1 -1
  721. package/themes/avocado.src.js +1 -1
  722. package/themes/dark-blue.js +1 -1
  723. package/themes/dark-blue.src.js +1 -1
  724. package/themes/dark-green.js +1 -1
  725. package/themes/dark-green.src.js +1 -1
  726. package/themes/dark-unica.js +1 -1
  727. package/themes/dark-unica.src.js +1 -1
  728. package/themes/gray.js +1 -1
  729. package/themes/gray.src.js +1 -1
  730. package/themes/grid-light.js +1 -1
  731. package/themes/grid-light.src.js +1 -1
  732. package/themes/grid.js +1 -1
  733. package/themes/grid.src.js +1 -1
  734. package/themes/high-contrast-dark.js +1 -1
  735. package/themes/high-contrast-dark.src.js +1 -1
  736. package/themes/high-contrast-light.js +1 -1
  737. package/themes/high-contrast-light.src.js +1 -1
  738. package/themes/sand-signika.js +1 -1
  739. package/themes/sand-signika.src.js +1 -1
  740. package/themes/skies.js +1 -1
  741. package/themes/skies.src.js +1 -1
  742. package/themes/sunset.js +1 -1
  743. package/themes/sunset.src.js +1 -1
  744. package/es-modules/Core/Axis/MapAxis.js +0 -157
  745. package/es-modules/Core/Color/Palette.js +0 -82
  746. package/es-modules/Extensions/Sonification/InstrumentDefinitions.js +0 -32
  747. package/es-modules/Mixins/ColorMapSeries.js +0 -82
  748. package/es-modules/Mixins/ColorSeries.js +0 -77
  749. package/es-modules/Mixins/DerivedSeries.js +0 -118
  750. package/es-modules/Mixins/DrawPoint.js +0 -81
  751. package/es-modules/Mixins/IndicatorRequired.js +0 -56
  752. package/es-modules/Mixins/Navigation.js +0 -54
  753. package/es-modules/Mixins/NelderMead.js +0 -132
  754. package/es-modules/Mixins/Polygon.js +0 -259
  755. package/es-modules/Mixins/ReduceArray.js +0 -54
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highstock JS v9.2.0 (2021-08-18)
2
+ * @license Highstock JS v9.3.1 (2021-11-05)
3
3
  *
4
4
  * Highcharts Stock as a plugin for Highcharts
5
5
  *
@@ -366,7 +366,7 @@
366
366
  mantissa = correctFloat(index % 1);
367
367
  // Check if the index is inside position array.
368
368
  // If true, read/approximate value for that exact index.
369
- if (index >= 0 && index < positions.length) {
369
+ if (index >= 0 && index < positions.length - 1) {
370
370
  var leftNeighbour = positions[Math.floor(index)],
371
371
  rightNeighbour = positions[Math.ceil(index)],
372
372
  distance = rightNeighbour - leftNeighbour;
@@ -460,9 +460,8 @@
460
460
  }
461
461
  }
462
462
  /**
463
- * @private
464
- *
465
463
  * Extending the Chart.pan method for ordinal axes
464
+ * @private
466
465
  */
467
466
  function onChartPan(e) {
468
467
  var chart = this,
@@ -706,7 +705,6 @@
706
705
  maxIndex,
707
706
  slope,
708
707
  i,
709
- hasBoostedSeries,
710
708
  ordinalPositions = [],
711
709
  overscrollPointsRange = Number.MAX_VALUE,
712
710
  useOrdinal = false;
@@ -743,13 +741,7 @@
743
741
  ordinalPositions = uniqueOrdinalPositions;
744
742
  }
745
743
  }
746
- if (series.isSeriesBoosting) {
747
- hasBoostedSeries = true;
748
- }
749
744
  });
750
- if (hasBoostedSeries) {
751
- ordinalPositions.length = 0;
752
- }
753
745
  // cache the length
754
746
  len = ordinalPositions.length;
755
747
  // Check if we really need the overhead of mapping axis data
@@ -947,8 +939,6 @@
947
939
  fakeAxis.series.push(fakeSeries);
948
940
  series.processData.apply(fakeSeries);
949
941
  });
950
- // Apply grouping if needed.
951
- axis.applyGrouping.call(fakeAxis);
952
942
  // Force to use the ordinal when points are evenly spaced
953
943
  // (e.g. weeks), #3825.
954
944
  if (fakeSeries.closestPointRange !== fakeSeries.basePointRange &&
@@ -1043,7 +1033,8 @@
1043
1033
  // When more series assign to axis, find the smallest one, #15987.
1044
1034
  if (axis.series.length > 1) {
1045
1035
  axis.series.forEach(function (series) {
1046
- if (defined(series.points[0]) &&
1036
+ if (series.points &&
1037
+ defined(series.points[0]) &&
1047
1038
  defined(series.points[0].plotX) &&
1048
1039
  series.points[0].plotX < firstPointX) {
1049
1040
  firstPointX = series.points[0].plotX;
@@ -1124,33 +1115,33 @@
1124
1115
 
1125
1116
  return OrdinalAxis;
1126
1117
  });
1127
- _registerModule(_modules, 'Core/Axis/BrokenAxis.js', [_modules['Extensions/Stacking.js'], _modules['Core/Utilities.js']], function (StackItem, U) {
1118
+ _registerModule(_modules, 'Series/DataModifyComposition.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Series/Point.js'], _modules['Core/Series/Series.js'], _modules['Core/Utilities.js']], function (Axis, Point, Series, U) {
1128
1119
  /* *
1129
1120
  *
1130
- * (c) 2009-2021 Torstein Honsi
1121
+ * (c) 2010-2021 Torstein Honsi
1131
1122
  *
1132
1123
  * License: www.highcharts.com/license
1133
1124
  *
1134
1125
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
1135
1126
  *
1136
1127
  * */
1128
+ var pointTooltipFormatter = Point.prototype.tooltipFormatter;
1137
1129
  var addEvent = U.addEvent,
1138
- find = U.find,
1139
- fireEvent = U.fireEvent,
1130
+ arrayMax = U.arrayMax,
1131
+ arrayMin = U.arrayMin,
1132
+ correctFloat = U.correctFloat,
1133
+ defined = U.defined,
1140
1134
  isArray = U.isArray,
1141
1135
  isNumber = U.isNumber,
1136
+ isString = U.isString,
1142
1137
  pick = U.pick;
1143
1138
  /* *
1144
1139
  *
1145
1140
  * Composition
1146
1141
  *
1147
1142
  * */
1148
- /**
1149
- * Axis with support of broken data rows.
1150
- * @private
1151
- */
1152
- var BrokenAxis;
1153
- (function (BrokenAxis) {
1143
+ var DataModifyComposition;
1144
+ (function (DataModifyComposition) {
1154
1145
  /* *
1155
1146
  *
1156
1147
  * Declarations
@@ -1169,405 +1160,956 @@
1169
1160
  * */
1170
1161
  /* eslint-disable valid-jsdoc */
1171
1162
  /**
1172
- * Adds support for broken axes.
1163
+ * Extends the series, axis and point classes with
1164
+ * compare and cumulative support.
1165
+ *
1173
1166
  * @private
1167
+ *
1168
+ * @param SeriesClass
1169
+ * Series class to use.
1170
+ *
1171
+ * @param AxisClass
1172
+ * Axis class to extend.
1173
+ *
1174
+ * @param PointClass
1175
+ * Point class to use.
1174
1176
  */
1175
- function compose(AxisClass, SeriesClass) {
1176
- if (composedClasses.indexOf(AxisClass) === -1) {
1177
- composedClasses.push(AxisClass);
1178
- AxisClass.keepProps.push('brokenAxis');
1179
- addEvent(AxisClass, 'init', onAxisInit);
1180
- addEvent(AxisClass, 'afterInit', onAxisAfterInit);
1181
- addEvent(AxisClass, 'afterSetTickPositions', onAxisAfterSetTickPositions);
1182
- addEvent(AxisClass, 'afterSetOptions', onAxisAfterSetOptions);
1183
- }
1177
+ function compose(SeriesClass, AxisClass, PointClass) {
1184
1178
  if (composedClasses.indexOf(SeriesClass) === -1) {
1185
1179
  composedClasses.push(SeriesClass);
1186
1180
  var seriesProto = SeriesClass.prototype;
1187
- seriesProto.drawBreaks = seriesDrawBreaks;
1188
- seriesProto.gappedPath = seriesGappedPath;
1189
- addEvent(SeriesClass, 'afterGeneratePoints', onSeriesAfterGeneratePoints);
1190
- addEvent(SeriesClass, 'afterRender', onSeriesAfterRender);
1181
+ seriesProto.setCompare = seriesSetCompare;
1182
+ seriesProto.setCumulative = seriesSetCumulative;
1183
+ addEvent(SeriesClass, 'afterInit', afterInit);
1184
+ addEvent(SeriesClass, 'afterGetExtremes', afterGetExtremes);
1185
+ addEvent(SeriesClass, 'afterProcessData', afterProcessData);
1191
1186
  }
1192
- return AxisClass;
1187
+ if (composedClasses.indexOf(AxisClass) === -1) {
1188
+ composedClasses.push(AxisClass);
1189
+ var axisProto = AxisClass.prototype;
1190
+ axisProto.setCompare = axisSetCompare;
1191
+ axisProto.setModifier = setModifier;
1192
+ axisProto.setCumulative = axisSetCumulative;
1193
+ }
1194
+ if (composedClasses.indexOf(PointClass) === -1) {
1195
+ composedClasses.push(PointClass);
1196
+ var pointProto = PointClass.prototype;
1197
+ pointProto.tooltipFormatter = tooltipFormatter;
1198
+ }
1199
+ return SeriesClass;
1193
1200
  }
1194
- BrokenAxis.compose = compose;
1201
+ DataModifyComposition.compose = compose;
1202
+ /* ********************************************************************** *
1203
+ * Start shared compare and cumulative logic *
1204
+ * ********************************************************************** */
1195
1205
  /**
1206
+ * Shared code for the axis.setCompare() and the axis.setCumulative()
1207
+ * methods. Inits the 'compare' or the 'cumulative' mode.
1196
1208
  * @private
1197
1209
  */
1198
- function onAxisAfterInit() {
1199
- if (typeof this.brokenAxis !== 'undefined') {
1200
- this.brokenAxis.setBreaks(this.options.breaks, false);
1210
+ function setModifier(mode, modeState, redraw) {
1211
+ if (!this.isXAxis) {
1212
+ this.series.forEach(function (series) {
1213
+ if (mode === 'compare' &&
1214
+ typeof modeState !== 'boolean') {
1215
+ series.setCompare(modeState, false);
1216
+ }
1217
+ else if (mode === 'cumulative' &&
1218
+ !isString(modeState)) {
1219
+ series.setCumulative(modeState, false);
1220
+ }
1221
+ });
1222
+ if (pick(redraw, true)) {
1223
+ this.chart.redraw();
1224
+ }
1201
1225
  }
1202
1226
  }
1203
1227
  /**
1204
- * Force Axis to be not-ordinal when breaks are defined.
1205
- * @private
1228
+ * Extend the tooltip formatter by adding support for the point.change
1229
+ * variable as well as the changeDecimals option.
1230
+ *
1231
+ * @ignore
1232
+ * @function Highcharts.Point#tooltipFormatter
1233
+ *
1234
+ * @param {string} pointFormat
1206
1235
  */
1207
- function onAxisAfterSetOptions() {
1208
- var axis = this;
1209
- if (axis.brokenAxis && axis.brokenAxis.hasBreaks) {
1210
- axis.options.ordinal = false;
1236
+ function tooltipFormatter(pointFormat) {
1237
+ var point = this, numberFormatter = point.series.chart.numberFormatter, replace = function (value) {
1238
+ pointFormat = pointFormat.replace('{point.' + value + '}', (point[value] > 0 && value === 'change' ? '+' : '') +
1239
+ numberFormatter(point[value], pick(point.series.tooltipOptions.changeDecimals, 2)));
1240
+ };
1241
+ if (defined(point.change)) {
1242
+ replace('change');
1211
1243
  }
1244
+ if (defined(point.cumulativeSum)) {
1245
+ replace('cumulativeSum');
1246
+ }
1247
+ return pointTooltipFormatter.apply(this, [pointFormat]);
1212
1248
  }
1213
1249
  /**
1214
- * @private
1215
- */
1216
- function onAxisAfterSetTickPositions() {
1217
- var axis = this,
1218
- brokenAxis = axis.brokenAxis;
1219
- if (brokenAxis &&
1220
- brokenAxis.hasBreaks) {
1221
- var tickPositions = axis.tickPositions,
1222
- info = axis.tickPositions.info,
1223
- newPositions = [];
1224
- for (var i = 0; i < tickPositions.length; i++) {
1225
- if (!brokenAxis.isInAnyBreak(tickPositions[i])) {
1226
- newPositions.push(tickPositions[i]);
1227
- }
1250
+ * Extend series.init by adding a methods to modify the y values used
1251
+ * for plotting on the y axis. For compare mode, this method is called both
1252
+ * from the axis when finding dataMin and dataMax,
1253
+ * and from the series.translate method.
1254
+ *
1255
+ * @ignore
1256
+ * @function Highcharts.Series#init
1257
+ */
1258
+ function afterInit() {
1259
+ var compare = this.options.compare;
1260
+ var dataModify;
1261
+ if (compare === 'percent' ||
1262
+ compare === 'value' ||
1263
+ this.options.cumulative) {
1264
+ dataModify = new Additions(this);
1265
+ if (compare === 'percent' || compare === 'value') {
1266
+ // Set comparison mode
1267
+ dataModify.initCompare(compare);
1268
+ }
1269
+ else {
1270
+ // Set Cumulative Sum mode
1271
+ dataModify.initCumulative();
1228
1272
  }
1229
- axis.tickPositions = newPositions;
1230
- axis.tickPositions.info = info;
1231
1273
  }
1274
+ this.dataModify = dataModify;
1232
1275
  }
1233
1276
  /**
1277
+ * Adjust the extremes (compare and cumulative modify the data).
1234
1278
  * @private
1235
1279
  */
1236
- function onAxisInit() {
1237
- var axis = this;
1238
- if (!axis.brokenAxis) {
1239
- axis.brokenAxis = new Additions(axis);
1280
+ function afterGetExtremes(e) {
1281
+ var dataExtremes = e.dataExtremes,
1282
+ activeYData = dataExtremes.activeYData;
1283
+ if (this.dataModify && dataExtremes) {
1284
+ var extremes = void 0;
1285
+ if (this.options.compare) {
1286
+ extremes = [
1287
+ this.dataModify.modifyValue(dataExtremes.dataMin),
1288
+ this.dataModify.modifyValue(dataExtremes.dataMax)
1289
+ ];
1290
+ }
1291
+ else if (this.options.cumulative &&
1292
+ isArray(activeYData) &&
1293
+ // If only one y visible, sum doesn't change
1294
+ // so no need to change extremes
1295
+ activeYData.length >= 2) {
1296
+ extremes = Additions.getCumulativeExtremes(activeYData);
1297
+ }
1298
+ if (extremes) {
1299
+ dataExtremes.dataMin = arrayMin(extremes);
1300
+ dataExtremes.dataMax = arrayMax(extremes);
1301
+ }
1302
+ }
1303
+ }
1304
+ /* ********************************************************************** *
1305
+ * End shared compare and cumulative logic *
1306
+ * ********************************************************************** */
1307
+ /* ********************************************************************** *
1308
+ * Start value compare logic *
1309
+ * ********************************************************************** */
1310
+ /**
1311
+ * Highcharts Stock only. Set the
1312
+ * [compare](https://api.highcharts.com/highstock/plotOptions.series.compare)
1313
+ * mode of the series after render time.
1314
+ * In most cases it is more useful running
1315
+ * {@link Axis#setCompare} on the X axis to update all its series.
1316
+ *
1317
+ * @function Highcharts.Series#setCompare
1318
+ *
1319
+ * @param {string|null} [compare]
1320
+ * Can be one of `undefined` (default), `null`, `"percent"`
1321
+ * or `"value"`.
1322
+ *
1323
+ * @param {boolean} [redraw=true]
1324
+ * Whether to redraw the chart or to wait for a later call to
1325
+ * {@link Chart#redraw}.
1326
+ */
1327
+ function seriesSetCompare(compare, redraw) {
1328
+ // Survive to export, #5485 (and for options generally)
1329
+ this.options.compare = this.userOptions.compare = compare;
1330
+ // Fire series.init() that will set or delete series.dataModify
1331
+ this.update({}, pick(redraw, true));
1332
+ if (this.dataModify && (compare === 'value' || compare === 'percent')) {
1333
+ this.dataModify.initCompare(compare);
1334
+ }
1335
+ else {
1336
+ // When disabling, clear the points
1337
+ this.points.forEach(function (point) {
1338
+ delete point.change;
1339
+ });
1240
1340
  }
1241
1341
  }
1242
1342
  /**
1243
- * @private
1244
- */
1245
- function onSeriesAfterGeneratePoints() {
1246
- var _a = this,
1247
- isDirty = _a.isDirty,
1248
- connectNulls = _a.options.connectNulls,
1249
- points = _a.points,
1250
- xAxis = _a.xAxis,
1251
- yAxis = _a.yAxis;
1252
- // Set, or reset visibility of the points. Axis.setBreaks marks
1253
- // the series as isDirty
1254
- if (isDirty) {
1255
- var i = points.length;
1256
- while (i--) {
1257
- var point = points[i];
1258
- // Respect nulls inside the break (#4275)
1259
- var nullGap = point.y === null && connectNulls === false;
1260
- var isPointInBreak = (!nullGap && ((xAxis &&
1261
- xAxis.brokenAxis &&
1262
- xAxis.brokenAxis.isInAnyBreak(point.x,
1263
- true)) || (yAxis &&
1264
- yAxis.brokenAxis &&
1265
- yAxis.brokenAxis.isInAnyBreak(point.y,
1266
- true))));
1267
- // Set point.visible if in any break.
1268
- // If not in break, reset visible to original value.
1269
- point.visible = isPointInBreak ?
1270
- false :
1271
- point.options.visible !== false;
1343
+ * Extend series.processData by finding the first y value in the plot area,
1344
+ * used for comparing the following values
1345
+ *
1346
+ * @ignore
1347
+ * @function Highcharts.Series#processData
1348
+ */
1349
+ function afterProcessData() {
1350
+ var series = this;
1351
+ if (series.xAxis && // not pies
1352
+ series.processedYData &&
1353
+ series.dataModify) {
1354
+ var processedXData = series.processedXData,
1355
+ processedYData = series.processedYData,
1356
+ length_1 = processedYData.length,
1357
+ compareStart = series.options.compareStart === true ? 0 : 1;
1358
+ var keyIndex = -1,
1359
+ i = void 0;
1360
+ // For series with more than one value (range, OHLC etc), compare
1361
+ // against close or the pointValKey (#4922, #3112, #9854)
1362
+ if (series.pointArrayMap) {
1363
+ keyIndex = series.pointArrayMap.indexOf(series.options.pointValKey || series.pointValKey || 'y');
1364
+ }
1365
+ // find the first value for comparison
1366
+ for (i = 0; i < length_1 - compareStart; i++) {
1367
+ var compareValue = processedYData[i] && keyIndex > -1 ?
1368
+ processedYData[i][keyIndex] : processedYData[i];
1369
+ if (isNumber(compareValue) &&
1370
+ compareValue !== 0 &&
1371
+ processedXData[i + compareStart] >= (series.xAxis.min || 0)) {
1372
+ series.dataModify.compareValue = compareValue;
1373
+ break;
1374
+ }
1272
1375
  }
1273
1376
  }
1274
1377
  }
1275
1378
  /**
1276
- * @private
1379
+ * Highcharts Stock only. Set the compare mode on all series
1380
+ * belonging to a Y axis.
1381
+ *
1382
+ * @see [plotOptions.series.compare](https://api.highcharts.com/highstock/plotOptions.series.compare)
1383
+ *
1384
+ * @sample stock/members/axis-setcompare/
1385
+ * Set compare
1386
+ *
1387
+ * @function Highcharts.Axis#setCompare
1388
+ *
1389
+ * @param {string|null} [compare]
1390
+ * The compare mode. Can be one of `undefined` (default), `null`,
1391
+ * `"value"` or `"percent"`.
1392
+ *
1393
+ * @param {boolean} [redraw=true]
1394
+ * Whether to redraw the chart or to wait for a later call to
1395
+ * {@link Chart#redraw}.
1277
1396
  */
1278
- function onSeriesAfterRender() {
1279
- this.drawBreaks(this.xAxis, ['x']);
1280
- this.drawBreaks(this.yAxis, pick(this.pointArrayMap, ['y']));
1397
+ function axisSetCompare(compare, redraw) {
1398
+ this.setModifier('compare', compare, redraw);
1281
1399
  }
1282
- /**
1283
- * @private
1284
- */
1285
- function seriesDrawBreaks(axis, keys) {
1286
- var series = this,
1287
- points = series.points;
1288
- var breaks,
1289
- threshold,
1290
- eventName,
1291
- y;
1292
- if (axis && // #5950
1293
- axis.brokenAxis &&
1294
- axis.brokenAxis.hasBreaks) {
1295
- var brokenAxis_1 = axis.brokenAxis;
1296
- keys.forEach(function (key) {
1297
- breaks = brokenAxis_1 && brokenAxis_1.breakArray || [];
1298
- threshold = axis.isXAxis ?
1299
- axis.min :
1300
- pick(series.options.threshold, axis.min);
1301
- points.forEach(function (point) {
1302
- y = pick(point['stack' + key.toUpperCase()], point[key]);
1303
- breaks.forEach(function (brk) {
1304
- if (isNumber(threshold) && isNumber(y)) {
1305
- eventName = false;
1306
- if ((threshold < brk.from && y > brk.to) ||
1307
- (threshold > brk.from && y < brk.from)) {
1308
- eventName = 'pointBreak';
1309
- }
1310
- else if ((threshold < brk.from && y > brk.from && y < brk.to) ||
1311
- (threshold > brk.from && y > brk.to && y < brk.from)) {
1312
- eventName = 'pointInBreak';
1313
- }
1314
- if (eventName) {
1315
- fireEvent(axis, eventName, { point: point, brk: brk });
1316
- }
1317
- }
1318
- });
1319
- });
1400
+ /* ********************************************************************** *
1401
+ * End value compare logic *
1402
+ * ********************************************************************** */
1403
+ /* ********************************************************************** *
1404
+ * Start Cumulative Sum logic, author: Rafal Sebestjanski *
1405
+ * ********************************************************************** */
1406
+ /**
1407
+ * Highcharts Stock only. Set the
1408
+ * [cumulative](https://api.highcharts.com/highstock/plotOptions.series.cumulative)
1409
+ * mode of the series after render time.
1410
+ * In most cases it is more useful running
1411
+ * {@link Axis#setCumulative} on the Y axis to update all its series.
1412
+ *
1413
+ * @function Highcharts.Series#setCumulative
1414
+ *
1415
+ * @param {boolean} [cumulative=false]
1416
+ * Either enable or disable Cumulative Sum mode.
1417
+ * Can be one of `false` (default) or `true`.
1418
+ *
1419
+ * @param {boolean} [redraw=true]
1420
+ * Whether to redraw the chart or to wait for a later call to
1421
+ * {@link Chart#redraw}.
1422
+ */
1423
+ function seriesSetCumulative(cumulative, redraw) {
1424
+ // Set default value to false
1425
+ cumulative = pick(cumulative, false);
1426
+ // Survive to export, #5485 (and for options generally)
1427
+ this.options.cumulative = this.userOptions.cumulative = cumulative;
1428
+ // Fire series.init() that will set or delete series.dataModify
1429
+ this.update({}, pick(redraw, true));
1430
+ // If should, turn on the Cumulative Sum mode
1431
+ if (this.dataModify) {
1432
+ this.dataModify.initCumulative();
1433
+ }
1434
+ else {
1435
+ // When disabling, clear the points
1436
+ this.points.forEach(function (point) {
1437
+ delete point.cumulativeSum;
1320
1438
  });
1321
1439
  }
1322
1440
  }
1323
1441
  /**
1324
- * Extend getGraphPath by identifying gaps in the data so that we
1325
- * can draw a gap in the line or area. This was moved from ordinal
1326
- * axis module to broken axis module as of #5045.
1442
+ * Highcharts Stock only. Set the cumulative mode on all series
1443
+ * belonging to a Y axis.
1327
1444
  *
1328
- * @private
1329
- * @function Highcharts.Series#gappedPath
1445
+ * @see [plotOptions.series.cumulative](https://api.highcharts.com/highstock/plotOptions.series.cumulative)
1330
1446
  *
1331
- * @return {Highcharts.SVGPathArray}
1332
- * Gapped path
1447
+ * @sample stock/members/axis-setcumulative/
1448
+ * Set cumulative
1449
+ *
1450
+ * @function Highcharts.Axis#setCumulative
1451
+ *
1452
+ * @param {boolean} [cumulative]
1453
+ * Whether to disable or enable the cumulative mode.
1454
+ * Can be one of `undefined` (default, treated as `false`),
1455
+ * `false` or `true`.
1456
+ *
1457
+ * @param {boolean} [redraw=true]
1458
+ * Whether to redraw the chart or to wait for a later call to
1459
+ * {@link Chart#redraw}.
1333
1460
  */
1334
- function seriesGappedPath() {
1335
- var currentDataGrouping = this.currentDataGrouping,
1336
- groupingSize = currentDataGrouping && currentDataGrouping.gapSize,
1337
- points = this.points.slice(),
1338
- yAxis = this.yAxis;
1339
- var gapSize = this.options.gapSize,
1340
- i = points.length - 1,
1341
- stack;
1461
+ function axisSetCumulative(cumulative, redraw) {
1462
+ this.setModifier('cumulative', cumulative, redraw);
1463
+ }
1464
+ /* *
1465
+ *
1466
+ * Classes
1467
+ *
1468
+ * */
1469
+ /**
1470
+ * @private
1471
+ */
1472
+ var Additions = /** @class */ (function () {
1473
+ /* *
1474
+ *
1475
+ * Constructors
1476
+ *
1477
+ * */
1478
+ /**
1479
+ * @private
1480
+ */
1481
+ function Additions(series) {
1482
+ this.series = series;
1483
+ }
1484
+ /* *
1485
+ *
1486
+ * Functions
1487
+ *
1488
+ * */
1342
1489
  /**
1343
- * Defines when to display a gap in the graph, together with the
1344
- * [gapUnit](plotOptions.series.gapUnit) option.
1345
- *
1346
- * In case when `dataGrouping` is enabled, points can be grouped
1347
- * into a larger time span. This can make the grouped points to
1348
- * have a greater distance than the absolute value of `gapSize`
1349
- * property, which will result in disappearing graph completely.
1350
- * To prevent this situation the mentioned distance between
1351
- * grouped points is used instead of previously defined
1352
- * `gapSize`.
1353
- *
1354
- * In practice, this option is most often used to visualize gaps
1355
- * in time series. In a stock chart, intraday data is available
1356
- * for daytime hours, while gaps will appear in nights and
1357
- * weekends.
1358
- *
1359
- * @see [gapUnit](plotOptions.series.gapUnit)
1360
- * @see [xAxis.breaks](#xAxis.breaks)
1361
- *
1362
- * @sample {highstock} stock/plotoptions/series-gapsize/
1363
- * Setting the gap size to 2 introduces gaps for weekends in
1364
- * daily datasets.
1365
- *
1366
- * @type {number}
1367
- * @default 0
1368
- * @product highstock
1369
- * @requires modules/broken-axis
1370
- * @apioption plotOptions.series.gapSize
1490
+ * @private
1371
1491
  */
1492
+ Additions.prototype.modifyValue = function () {
1493
+ return 0;
1494
+ };
1372
1495
  /**
1373
- * Together with [gapSize](plotOptions.series.gapSize), this
1374
- * option defines where to draw gaps in the graph.
1496
+ * @ignore
1497
+ * @function Highcharts.Series#getCumulativeExtremes
1375
1498
  *
1376
- * When the `gapUnit` is `"relative"` (default), a gap size of 5
1377
- * means that if the distance between two points is greater than
1378
- * 5 times that of the two closest points, the graph will be
1379
- * broken.
1380
- *
1381
- * When the `gapUnit` is `"value"`, the gap is based on absolute
1382
- * axis values, which on a datetime axis is milliseconds. This
1383
- * also applies to the navigator series that inherits gap
1384
- * options from the base series.
1385
- *
1386
- * @see [gapSize](plotOptions.series.gapSize)
1499
+ * @param {Array} [activeYData]
1500
+ * An array cointaining all the points' y values
1501
+ * in a visible range.
1502
+ */
1503
+ Additions.getCumulativeExtremes = function (activeYData) {
1504
+ var cumulativeDataMin = Infinity,
1505
+ cumulativeDataMax = -Infinity;
1506
+ activeYData.reduce(function (prev, cur) {
1507
+ var sum = prev + cur;
1508
+ cumulativeDataMin = Math.min(cumulativeDataMin, sum, prev);
1509
+ cumulativeDataMax = Math.max(cumulativeDataMax, sum, prev);
1510
+ return sum;
1511
+ });
1512
+ return [cumulativeDataMin, cumulativeDataMax];
1513
+ };
1514
+ /**
1515
+ * @ignore
1516
+ * @function Highcharts.Series#initCompare
1387
1517
  *
1388
- * @type {string}
1389
- * @default relative
1390
- * @since 5.0.13
1391
- * @product highstock
1392
- * @validvalue ["relative", "value"]
1393
- * @requires modules/broken-axis
1394
- * @apioption plotOptions.series.gapUnit
1518
+ * @param {string} [compare]
1519
+ * Can be one of `"percent"` or `"value"`.
1395
1520
  */
1396
- if (gapSize && i > 0) { // #5008
1397
- // Gap unit is relative
1398
- if (this.options.gapUnit !== 'value') {
1399
- gapSize *= this.basePointRange;
1400
- }
1401
- // Setting a new gapSize in case dataGrouping is enabled
1402
- // (#7686)
1403
- if (groupingSize &&
1404
- groupingSize > gapSize &&
1405
- // Except when DG is forced (e.g. from other series)
1406
- // and has lower granularity than actual points (#11351)
1407
- groupingSize >= this.basePointRange) {
1408
- gapSize = groupingSize;
1409
- }
1410
- // extension for ordinal breaks
1411
- var current = void 0,
1412
- next = void 0;
1413
- while (i--) {
1414
- // Reassign next if it is not visible
1415
- if (!(next && next.visible !== false)) {
1416
- next = points[i + 1];
1417
- }
1418
- current = points[i];
1419
- // Skip iteration if one of the points is not visible
1420
- if (next.visible === false || current.visible === false) {
1421
- continue;
1521
+ Additions.prototype.initCompare = function (compare) {
1522
+ // Set the modifyValue method
1523
+ this.modifyValue = function (value, index) {
1524
+ if (value === null) {
1525
+ value = 0;
1526
+ }
1527
+ var compareValue = this.compareValue;
1528
+ if (typeof value !== 'undefined' &&
1529
+ typeof compareValue !== 'undefined') { // #2601, #5814
1530
+ // Get the modified value
1531
+ if (compare === 'value') {
1532
+ value -= compareValue;
1533
+ // Compare percent
1534
+ }
1535
+ else {
1536
+ var compareBase = this.series.options.compareBase;
1537
+ value = 100 * (value / compareValue) -
1538
+ (compareBase === 100 ? 0 : 100);
1539
+ }
1540
+ // record for tooltip etc.
1541
+ if (typeof index !== 'undefined') {
1542
+ var point = this.series.points[index];
1543
+ if (point) {
1544
+ point.change = value;
1545
+ }
1546
+ }
1547
+ return value;
1422
1548
  }
1423
- if (next.x - current.x > gapSize) {
1424
- var xRange = (current.x + next.x) / 2;
1425
- points.splice(// insert after this one
1426
- i + 1, 0, {
1427
- isNull: true,
1428
- x: xRange
1429
- });
1430
- // For stacked chart generate empty stack items,
1431
- // #6546
1432
- if (yAxis.stacking && this.options.stacking) {
1433
- stack = yAxis.stacking.stacks[this.stackKey][xRange] =
1434
- new StackItem(yAxis, yAxis.options
1435
- .stackLabels, false, xRange, this.stack);
1436
- stack.total = 0;
1549
+ return 0;
1550
+ };
1551
+ };
1552
+ /**
1553
+ * @ignore
1554
+ * @function Highcharts.Series#initCumulative
1555
+ */
1556
+ Additions.prototype.initCumulative = function () {
1557
+ // Set the modifyValue method
1558
+ this.modifyValue = function (value, index) {
1559
+ if (value === null) {
1560
+ value = 0;
1561
+ }
1562
+ if (value !== void 0 && index !== void 0) {
1563
+ var prevPoint = index > 0 ?
1564
+ this.series.points[index - 1] : null;
1565
+ // Get the modified value
1566
+ if (prevPoint && prevPoint.cumulativeSum) {
1567
+ value = correctFloat(prevPoint.cumulativeSum + value);
1437
1568
  }
1569
+ // Record for tooltip etc.
1570
+ var point = this.series.points[index];
1571
+ if (point) {
1572
+ point.cumulativeSum = value;
1573
+ }
1574
+ return value;
1438
1575
  }
1439
- // Assign current to next for the upcoming iteration
1440
- next = current;
1441
- }
1442
- }
1443
- // Call base method
1444
- return this.getGraphPath(points);
1445
- }
1576
+ return 0;
1577
+ };
1578
+ };
1579
+ return Additions;
1580
+ }());
1581
+ DataModifyComposition.Additions = Additions;
1582
+ })(DataModifyComposition || (DataModifyComposition = {}));
1583
+ /* *
1584
+ *
1585
+ * Default Export
1586
+ *
1587
+ * */
1588
+ /* *
1589
+ *
1590
+ * API Options
1591
+ *
1592
+ * */
1593
+ /**
1594
+ * Compare the values of the series against the first non-null, non-
1595
+ * zero value in the visible range. The y axis will show percentage
1596
+ * or absolute change depending on whether `compare` is set to `"percent"`
1597
+ * or `"value"`. When this is applied to multiple series, it allows
1598
+ * comparing the development of the series against each other. Adds
1599
+ * a `change` field to every point object.
1600
+ *
1601
+ * @see [compareBase](#plotOptions.series.compareBase)
1602
+ * @see [Axis.setCompare()](/class-reference/Highcharts.Axis#setCompare)
1603
+ * @see [Series.setCompare()](/class-reference/Highcharts.Series#setCompare)
1604
+ *
1605
+ * @sample {highstock} stock/plotoptions/series-compare-percent/
1606
+ * Percent
1607
+ * @sample {highstock} stock/plotoptions/series-compare-value/
1608
+ * Value
1609
+ *
1610
+ * @type {string}
1611
+ * @since 1.0.1
1612
+ * @product highstock
1613
+ * @apioption plotOptions.series.compare
1614
+ */
1615
+ /**
1616
+ * Defines if comparison should start from the first point within the visible
1617
+ * range or should start from the first point **before** the range.
1618
+ *
1619
+ * In other words, this flag determines if first point within the visible range
1620
+ * will have 0% (`compareStart=true`) or should have been already calculated
1621
+ * according to the previous point (`compareStart=false`).
1622
+ *
1623
+ * @sample {highstock} stock/plotoptions/series-comparestart/
1624
+ * Calculate compare within visible range
1625
+ *
1626
+ * @type {boolean}
1627
+ * @default false
1628
+ * @since 6.0.0
1629
+ * @product highstock
1630
+ * @apioption plotOptions.series.compareStart
1631
+ */
1632
+ /**
1633
+ * When [compare](#plotOptions.series.compare) is `percent`, this option
1634
+ * dictates whether to use 0 or 100 as the base of comparison.
1635
+ *
1636
+ * @sample {highstock} stock/plotoptions/series-comparebase/
1637
+ * Compare base is 100
1638
+ *
1639
+ * @type {number}
1640
+ * @default 0
1641
+ * @since 5.0.6
1642
+ * @product highstock
1643
+ * @validvalue [0, 100]
1644
+ * @apioption plotOptions.series.compareBase
1645
+ */
1646
+ /**
1647
+ * Cumulative Sum feature replaces points' values with the following formula:
1648
+ * `sum of all previous points' values + current point's value`.
1649
+ * Works only for points in a visible range.
1650
+ * Adds the `cumulativeSum` field to each point object that can be accessed
1651
+ * e.g. in the [tooltip.pointFormat](https://api.highcharts.com/highstock/tooltip.pointFormat).
1652
+ *
1653
+ * @see [Axis.setCumulative()](/class-reference/Highcharts.Axis#setCumulative)
1654
+ * @see [Series.setCumulative()](/class-reference/Highcharts.Series#setCumulative)
1655
+ *
1656
+ * @sample {highstock} stock/plotoptions/series-cumulative-sum/
1657
+ * Cumulative Sum
1658
+ *
1659
+ * @type {boolean}
1660
+ * @default false
1661
+ * @since 9.3.0
1662
+ * @product highstock
1663
+ * @apioption plotOptions.series.cumulative
1664
+ */
1665
+ ''; // keeps doclets above in transpiled file
1666
+
1667
+ return DataModifyComposition;
1668
+ });
1669
+ _registerModule(_modules, 'Core/Axis/BrokenAxis.js', [_modules['Extensions/Stacking.js'], _modules['Core/Utilities.js']], function (StackItem, U) {
1670
+ /* *
1671
+ *
1672
+ * (c) 2009-2021 Torstein Honsi
1673
+ *
1674
+ * License: www.highcharts.com/license
1675
+ *
1676
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
1677
+ *
1678
+ * */
1679
+ var addEvent = U.addEvent,
1680
+ find = U.find,
1681
+ fireEvent = U.fireEvent,
1682
+ isArray = U.isArray,
1683
+ isNumber = U.isNumber,
1684
+ pick = U.pick;
1685
+ /* *
1686
+ *
1687
+ * Composition
1688
+ *
1689
+ * */
1690
+ /**
1691
+ * Axis with support of broken data rows.
1692
+ * @private
1693
+ */
1694
+ var BrokenAxis;
1695
+ (function (BrokenAxis) {
1446
1696
  /* *
1447
1697
  *
1448
- * Class
1698
+ * Declarations
1699
+ *
1700
+ * */
1701
+ /* *
1702
+ *
1703
+ * Constants
1704
+ *
1705
+ * */
1706
+ var composedClasses = [];
1707
+ /* *
1708
+ *
1709
+ * Functions
1449
1710
  *
1450
1711
  * */
1712
+ /* eslint-disable valid-jsdoc */
1451
1713
  /**
1452
- * Provides support for broken axes.
1714
+ * Adds support for broken axes.
1453
1715
  * @private
1454
- * @class
1455
1716
  */
1456
- var Additions = /** @class */ (function () {
1457
- /* *
1458
- *
1459
- * Constructors
1460
- *
1461
- * */
1462
- function Additions(axis) {
1463
- this.hasBreaks = false;
1464
- this.axis = axis;
1717
+ function compose(AxisClass, SeriesClass) {
1718
+ if (composedClasses.indexOf(AxisClass) === -1) {
1719
+ composedClasses.push(AxisClass);
1720
+ AxisClass.keepProps.push('brokenAxis');
1721
+ addEvent(AxisClass, 'init', onAxisInit);
1722
+ addEvent(AxisClass, 'afterInit', onAxisAfterInit);
1723
+ addEvent(AxisClass, 'afterSetTickPositions', onAxisAfterSetTickPositions);
1724
+ addEvent(AxisClass, 'afterSetOptions', onAxisAfterSetOptions);
1465
1725
  }
1466
- /* *
1467
- *
1468
- * Static Functions
1469
- *
1470
- * */
1471
- /**
1472
- * @private
1473
- */
1474
- Additions.isInBreak = function (brk, val) {
1475
- var repeat = brk.repeat || Infinity,
1476
- from = brk.from,
1477
- length = brk.to - brk.from,
1478
- test = (val >= from ?
1479
- (val - from) % repeat :
1480
- repeat - ((from - val) % repeat));
1481
- var ret;
1482
- if (!brk.inclusive) {
1483
- ret = test < length && test !== 0;
1484
- }
1485
- else {
1486
- ret = test <= length;
1487
- }
1488
- return ret;
1489
- };
1490
- /**
1491
- * @private
1492
- */
1493
- Additions.lin2Val = function (val) {
1494
- var axis = this;
1495
- var brokenAxis = axis.brokenAxis;
1496
- var breakArray = brokenAxis && brokenAxis.breakArray;
1497
- if (!breakArray || !isNumber(val)) {
1498
- return val;
1499
- }
1500
- var nval = val,
1501
- brk,
1502
- i;
1503
- for (i = 0; i < breakArray.length; i++) {
1504
- brk = breakArray[i];
1505
- if (brk.from >= nval) {
1506
- break;
1507
- }
1508
- else if (brk.to < nval) {
1509
- nval += brk.len;
1510
- }
1511
- else if (Additions.isInBreak(brk, nval)) {
1512
- nval += brk.len;
1726
+ if (composedClasses.indexOf(SeriesClass) === -1) {
1727
+ composedClasses.push(SeriesClass);
1728
+ var seriesProto = SeriesClass.prototype;
1729
+ seriesProto.drawBreaks = seriesDrawBreaks;
1730
+ seriesProto.gappedPath = seriesGappedPath;
1731
+ addEvent(SeriesClass, 'afterGeneratePoints', onSeriesAfterGeneratePoints);
1732
+ addEvent(SeriesClass, 'afterRender', onSeriesAfterRender);
1733
+ }
1734
+ return AxisClass;
1735
+ }
1736
+ BrokenAxis.compose = compose;
1737
+ /**
1738
+ * @private
1739
+ */
1740
+ function onAxisAfterInit() {
1741
+ if (typeof this.brokenAxis !== 'undefined') {
1742
+ this.brokenAxis.setBreaks(this.options.breaks, false);
1743
+ }
1744
+ }
1745
+ /**
1746
+ * Force Axis to be not-ordinal when breaks are defined.
1747
+ * @private
1748
+ */
1749
+ function onAxisAfterSetOptions() {
1750
+ var axis = this;
1751
+ if (axis.brokenAxis && axis.brokenAxis.hasBreaks) {
1752
+ axis.options.ordinal = false;
1753
+ }
1754
+ }
1755
+ /**
1756
+ * @private
1757
+ */
1758
+ function onAxisAfterSetTickPositions() {
1759
+ var axis = this,
1760
+ brokenAxis = axis.brokenAxis;
1761
+ if (brokenAxis &&
1762
+ brokenAxis.hasBreaks) {
1763
+ var tickPositions = axis.tickPositions,
1764
+ info = axis.tickPositions.info,
1765
+ newPositions = [];
1766
+ for (var i = 0; i < tickPositions.length; i++) {
1767
+ if (!brokenAxis.isInAnyBreak(tickPositions[i])) {
1768
+ newPositions.push(tickPositions[i]);
1513
1769
  }
1514
1770
  }
1515
- return nval;
1516
- };
1517
- /**
1518
- * @private
1519
- */
1520
- Additions.val2Lin = function (val) {
1521
- var axis = this;
1522
- var brokenAxis = axis.brokenAxis;
1523
- var breakArray = brokenAxis && brokenAxis.breakArray;
1524
- if (!breakArray || !isNumber(val)) {
1525
- return val;
1526
- }
1527
- var nval = val,
1528
- brk,
1529
- i;
1530
- for (i = 0; i < breakArray.length; i++) {
1531
- brk = breakArray[i];
1532
- if (brk.to <= val) {
1533
- nval -= brk.len;
1534
- }
1535
- else if (brk.from >= val) {
1536
- break;
1537
- }
1538
- else if (Additions.isInBreak(brk, val)) {
1539
- nval -= (val - brk.from);
1540
- break;
1541
- }
1771
+ axis.tickPositions = newPositions;
1772
+ axis.tickPositions.info = info;
1773
+ }
1774
+ }
1775
+ /**
1776
+ * @private
1777
+ */
1778
+ function onAxisInit() {
1779
+ var axis = this;
1780
+ if (!axis.brokenAxis) {
1781
+ axis.brokenAxis = new Additions(axis);
1782
+ }
1783
+ }
1784
+ /**
1785
+ * @private
1786
+ */
1787
+ function onSeriesAfterGeneratePoints() {
1788
+ var _a = this,
1789
+ isDirty = _a.isDirty,
1790
+ connectNulls = _a.options.connectNulls,
1791
+ points = _a.points,
1792
+ xAxis = _a.xAxis,
1793
+ yAxis = _a.yAxis;
1794
+ // Set, or reset visibility of the points. Axis.setBreaks marks
1795
+ // the series as isDirty
1796
+ if (isDirty) {
1797
+ var i = points.length;
1798
+ while (i--) {
1799
+ var point = points[i];
1800
+ // Respect nulls inside the break (#4275)
1801
+ var nullGap = point.y === null && connectNulls === false;
1802
+ var isPointInBreak = (!nullGap && ((xAxis &&
1803
+ xAxis.brokenAxis &&
1804
+ xAxis.brokenAxis.isInAnyBreak(point.x,
1805
+ true)) || (yAxis &&
1806
+ yAxis.brokenAxis &&
1807
+ yAxis.brokenAxis.isInAnyBreak(point.y,
1808
+ true))));
1809
+ // Set point.visible if in any break.
1810
+ // If not in break, reset visible to original value.
1811
+ point.visible = isPointInBreak ?
1812
+ false :
1813
+ point.options.visible !== false;
1542
1814
  }
1543
- return nval;
1544
- };
1545
- /* *
1815
+ }
1816
+ }
1817
+ /**
1818
+ * @private
1819
+ */
1820
+ function onSeriesAfterRender() {
1821
+ this.drawBreaks(this.xAxis, ['x']);
1822
+ this.drawBreaks(this.yAxis, pick(this.pointArrayMap, ['y']));
1823
+ }
1824
+ /**
1825
+ * @private
1826
+ */
1827
+ function seriesDrawBreaks(axis, keys) {
1828
+ var series = this,
1829
+ points = series.points;
1830
+ var breaks,
1831
+ threshold,
1832
+ eventName,
1833
+ y;
1834
+ if (axis && // #5950
1835
+ axis.brokenAxis &&
1836
+ axis.brokenAxis.hasBreaks) {
1837
+ var brokenAxis_1 = axis.brokenAxis;
1838
+ keys.forEach(function (key) {
1839
+ breaks = brokenAxis_1 && brokenAxis_1.breakArray || [];
1840
+ threshold = axis.isXAxis ?
1841
+ axis.min :
1842
+ pick(series.options.threshold, axis.min);
1843
+ points.forEach(function (point) {
1844
+ y = pick(point['stack' + key.toUpperCase()], point[key]);
1845
+ breaks.forEach(function (brk) {
1846
+ if (isNumber(threshold) && isNumber(y)) {
1847
+ eventName = false;
1848
+ if ((threshold < brk.from && y > brk.to) ||
1849
+ (threshold > brk.from && y < brk.from)) {
1850
+ eventName = 'pointBreak';
1851
+ }
1852
+ else if ((threshold < brk.from && y > brk.from && y < brk.to) ||
1853
+ (threshold > brk.from && y > brk.to && y < brk.from)) {
1854
+ eventName = 'pointInBreak';
1855
+ }
1856
+ if (eventName) {
1857
+ fireEvent(axis, eventName, { point: point, brk: brk });
1858
+ }
1859
+ }
1860
+ });
1861
+ });
1862
+ });
1863
+ }
1864
+ }
1865
+ /**
1866
+ * Extend getGraphPath by identifying gaps in the data so that we
1867
+ * can draw a gap in the line or area. This was moved from ordinal
1868
+ * axis module to broken axis module as of #5045.
1869
+ *
1870
+ * @private
1871
+ * @function Highcharts.Series#gappedPath
1872
+ *
1873
+ * @return {Highcharts.SVGPathArray}
1874
+ * Gapped path
1875
+ */
1876
+ function seriesGappedPath() {
1877
+ var currentDataGrouping = this.currentDataGrouping,
1878
+ groupingSize = currentDataGrouping && currentDataGrouping.gapSize,
1879
+ points = this.points.slice(),
1880
+ yAxis = this.yAxis;
1881
+ var gapSize = this.options.gapSize,
1882
+ i = points.length - 1,
1883
+ stack;
1884
+ /**
1885
+ * Defines when to display a gap in the graph, together with the
1886
+ * [gapUnit](plotOptions.series.gapUnit) option.
1546
1887
  *
1547
- * Functions
1888
+ * In case when `dataGrouping` is enabled, points can be grouped
1889
+ * into a larger time span. This can make the grouped points to
1890
+ * have a greater distance than the absolute value of `gapSize`
1891
+ * property, which will result in disappearing graph completely.
1892
+ * To prevent this situation the mentioned distance between
1893
+ * grouped points is used instead of previously defined
1894
+ * `gapSize`.
1548
1895
  *
1549
- * */
1550
- /**
1551
- * Returns the first break found where the x is larger then break.from
1552
- * and smaller then break.to.
1896
+ * In practice, this option is most often used to visualize gaps
1897
+ * in time series. In a stock chart, intraday data is available
1898
+ * for daytime hours, while gaps will appear in nights and
1899
+ * weekends.
1553
1900
  *
1554
- * @param {number} x
1555
- * The number which should be within a break.
1901
+ * @see [gapUnit](plotOptions.series.gapUnit)
1902
+ * @see [xAxis.breaks](#xAxis.breaks)
1556
1903
  *
1557
- * @param {Array<Highcharts.XAxisBreaksOptions>} breaks
1558
- * The array of breaks to search within.
1904
+ * @sample {highstock} stock/plotoptions/series-gapsize/
1905
+ * Setting the gap size to 2 introduces gaps for weekends in
1906
+ * daily datasets.
1559
1907
  *
1560
- * @return {Highcharts.XAxisBreaksOptions|undefined}
1561
- * Returns the first break found that matches, returns false if no break
1562
- * is found.
1908
+ * @type {number}
1909
+ * @default 0
1910
+ * @product highstock
1911
+ * @requires modules/broken-axis
1912
+ * @apioption plotOptions.series.gapSize
1563
1913
  */
1564
- Additions.prototype.findBreakAt = function (x, breaks) {
1565
- return find(breaks, function (b) {
1566
- return b.from < x && x < b.to;
1567
- });
1568
- };
1569
1914
  /**
1570
- * @private
1915
+ * Together with [gapSize](plotOptions.series.gapSize), this
1916
+ * option defines where to draw gaps in the graph.
1917
+ *
1918
+ * When the `gapUnit` is `"relative"` (default), a gap size of 5
1919
+ * means that if the distance between two points is greater than
1920
+ * 5 times that of the two closest points, the graph will be
1921
+ * broken.
1922
+ *
1923
+ * When the `gapUnit` is `"value"`, the gap is based on absolute
1924
+ * axis values, which on a datetime axis is milliseconds. This
1925
+ * also applies to the navigator series that inherits gap
1926
+ * options from the base series.
1927
+ *
1928
+ * @see [gapSize](plotOptions.series.gapSize)
1929
+ *
1930
+ * @type {string}
1931
+ * @default relative
1932
+ * @since 5.0.13
1933
+ * @product highstock
1934
+ * @validvalue ["relative", "value"]
1935
+ * @requires modules/broken-axis
1936
+ * @apioption plotOptions.series.gapUnit
1937
+ */
1938
+ if (gapSize && i > 0) { // #5008
1939
+ // Gap unit is relative
1940
+ if (this.options.gapUnit !== 'value') {
1941
+ gapSize *= this.basePointRange;
1942
+ }
1943
+ // Setting a new gapSize in case dataGrouping is enabled
1944
+ // (#7686)
1945
+ if (groupingSize &&
1946
+ groupingSize > gapSize &&
1947
+ // Except when DG is forced (e.g. from other series)
1948
+ // and has lower granularity than actual points (#11351)
1949
+ groupingSize >= this.basePointRange) {
1950
+ gapSize = groupingSize;
1951
+ }
1952
+ // extension for ordinal breaks
1953
+ var current = void 0,
1954
+ next = void 0;
1955
+ while (i--) {
1956
+ // Reassign next if it is not visible
1957
+ if (!(next && next.visible !== false)) {
1958
+ next = points[i + 1];
1959
+ }
1960
+ current = points[i];
1961
+ // Skip iteration if one of the points is not visible
1962
+ if (next.visible === false || current.visible === false) {
1963
+ continue;
1964
+ }
1965
+ if (next.x - current.x > gapSize) {
1966
+ var xRange = (current.x + next.x) / 2;
1967
+ points.splice(// insert after this one
1968
+ i + 1, 0, {
1969
+ isNull: true,
1970
+ x: xRange
1971
+ });
1972
+ // For stacked chart generate empty stack items,
1973
+ // #6546
1974
+ if (yAxis.stacking && this.options.stacking) {
1975
+ stack = yAxis.stacking.stacks[this.stackKey][xRange] =
1976
+ new StackItem(yAxis, yAxis.options
1977
+ .stackLabels, false, xRange, this.stack);
1978
+ stack.total = 0;
1979
+ }
1980
+ }
1981
+ // Assign current to next for the upcoming iteration
1982
+ next = current;
1983
+ }
1984
+ }
1985
+ // Call base method
1986
+ return this.getGraphPath(points);
1987
+ }
1988
+ /* *
1989
+ *
1990
+ * Class
1991
+ *
1992
+ * */
1993
+ /**
1994
+ * Provides support for broken axes.
1995
+ * @private
1996
+ * @class
1997
+ */
1998
+ var Additions = /** @class */ (function () {
1999
+ /* *
2000
+ *
2001
+ * Constructors
2002
+ *
2003
+ * */
2004
+ function Additions(axis) {
2005
+ this.hasBreaks = false;
2006
+ this.axis = axis;
2007
+ }
2008
+ /* *
2009
+ *
2010
+ * Static Functions
2011
+ *
2012
+ * */
2013
+ /**
2014
+ * @private
2015
+ */
2016
+ Additions.isInBreak = function (brk, val) {
2017
+ var repeat = brk.repeat || Infinity,
2018
+ from = brk.from,
2019
+ length = brk.to - brk.from,
2020
+ test = (val >= from ?
2021
+ (val - from) % repeat :
2022
+ repeat - ((from - val) % repeat));
2023
+ var ret;
2024
+ if (!brk.inclusive) {
2025
+ ret = test < length && test !== 0;
2026
+ }
2027
+ else {
2028
+ ret = test <= length;
2029
+ }
2030
+ return ret;
2031
+ };
2032
+ /**
2033
+ * @private
2034
+ */
2035
+ Additions.lin2Val = function (val) {
2036
+ var axis = this;
2037
+ var brokenAxis = axis.brokenAxis;
2038
+ var breakArray = brokenAxis && brokenAxis.breakArray;
2039
+ if (!breakArray || !isNumber(val)) {
2040
+ return val;
2041
+ }
2042
+ var nval = val,
2043
+ brk,
2044
+ i;
2045
+ for (i = 0; i < breakArray.length; i++) {
2046
+ brk = breakArray[i];
2047
+ if (brk.from >= nval) {
2048
+ break;
2049
+ }
2050
+ else if (brk.to < nval) {
2051
+ nval += brk.len;
2052
+ }
2053
+ else if (Additions.isInBreak(brk, nval)) {
2054
+ nval += brk.len;
2055
+ }
2056
+ }
2057
+ return nval;
2058
+ };
2059
+ /**
2060
+ * @private
2061
+ */
2062
+ Additions.val2Lin = function (val) {
2063
+ var axis = this;
2064
+ var brokenAxis = axis.brokenAxis;
2065
+ var breakArray = brokenAxis && brokenAxis.breakArray;
2066
+ if (!breakArray || !isNumber(val)) {
2067
+ return val;
2068
+ }
2069
+ var nval = val,
2070
+ brk,
2071
+ i;
2072
+ for (i = 0; i < breakArray.length; i++) {
2073
+ brk = breakArray[i];
2074
+ if (brk.to <= val) {
2075
+ nval -= brk.len;
2076
+ }
2077
+ else if (brk.from >= val) {
2078
+ break;
2079
+ }
2080
+ else if (Additions.isInBreak(brk, val)) {
2081
+ nval -= (val - brk.from);
2082
+ break;
2083
+ }
2084
+ }
2085
+ return nval;
2086
+ };
2087
+ /* *
2088
+ *
2089
+ * Functions
2090
+ *
2091
+ * */
2092
+ /**
2093
+ * Returns the first break found where the x is larger then break.from
2094
+ * and smaller then break.to.
2095
+ *
2096
+ * @param {number} x
2097
+ * The number which should be within a break.
2098
+ *
2099
+ * @param {Array<Highcharts.XAxisBreaksOptions>} breaks
2100
+ * The array of breaks to search within.
2101
+ *
2102
+ * @return {Highcharts.XAxisBreaksOptions|undefined}
2103
+ * Returns the first break found that matches, returns false if no break
2104
+ * is found.
2105
+ */
2106
+ Additions.prototype.findBreakAt = function (x, breaks) {
2107
+ return find(breaks, function (b) {
2108
+ return b.from < x && x < b.to;
2109
+ });
2110
+ };
2111
+ /**
2112
+ * @private
1571
2113
  */
1572
2114
  Additions.prototype.isInAnyBreak = function (val, testKeep) {
1573
2115
  var brokenAxis = this,
@@ -1894,8 +2436,18 @@
1894
2436
  arr[arr.length - 1] :
1895
2437
  (arr.hasNulls ? null : void 0);
1896
2438
  },
1897
- // ohlc and range are special cases where a multidimensional array is
1898
- // input and an array is output
2439
+ // HLC, OHLC and range are special cases where a multidimensional array is
2440
+ // input and an array is output.
2441
+ hlc: function (high, low, close) {
2442
+ high = approximations.high(high);
2443
+ low = approximations.low(low);
2444
+ close = approximations.close(close);
2445
+ if (isNumber(high) ||
2446
+ isNumber(low) ||
2447
+ isNumber(close)) {
2448
+ return [high, low, close];
2449
+ }
2450
+ },
1899
2451
  ohlc: function (open, high, low, close) {
1900
2452
  open = approximations.open(open);
1901
2453
  high = approximations.high(high);
@@ -1907,7 +2459,6 @@
1907
2459
  isNumber(close)) {
1908
2460
  return [open, high, low, close];
1909
2461
  }
1910
- // else, return is undefined
1911
2462
  },
1912
2463
  range: function (low, high) {
1913
2464
  low = approximations.low(low);
@@ -1921,7 +2472,7 @@
1921
2472
  // else, return is undefined
1922
2473
  }
1923
2474
  };
1924
- var applyGrouping = function () {
2475
+ var applyGrouping = function (hasExtemesChanged) {
1925
2476
  var series = this,
1926
2477
  chart = series.chart,
1927
2478
  options = series.options,
@@ -1940,9 +2491,9 @@
1940
2491
  if (groupingEnabled && !series.requireSorting) {
1941
2492
  series.requireSorting = revertRequireSorting = true;
1942
2493
  }
1943
- // Skip if processData returns false or if grouping is disabled (in that
1944
- // order)
1945
- skip = skipDataGrouping(series) || !groupingEnabled;
2494
+ // Skip if skipDataGrouping method returns false or if grouping is disabled
2495
+ // (in that order).
2496
+ skip = skipDataGrouping(series, hasExtemesChanged) === false || !groupingEnabled;
1946
2497
  // Revert original requireSorting value if changed
1947
2498
  if (revertRequireSorting) {
1948
2499
  series.requireSorting = false;
@@ -2053,13 +2604,13 @@
2053
2604
  (currentDataGrouping && currentDataGrouping.totalRange);
2054
2605
  }
2055
2606
  };
2056
- var skipDataGrouping = function (series) {
2057
- if (series.isCartesian &&
2607
+ var skipDataGrouping = function (series,
2608
+ force) {
2609
+ return !(series.isCartesian &&
2058
2610
  !series.isDirty &&
2059
2611
  !series.xAxis.isDirty &&
2060
- !series.yAxis.isDirty) {
2061
- return false;
2062
- }
2612
+ !series.yAxis.isDirty &&
2613
+ !force);
2063
2614
  };
2064
2615
  var groupData = function (xData,
2065
2616
  yData,
@@ -2373,7 +2924,10 @@
2373
2924
  ohlc: {
2374
2925
  groupPixelWidth: 5
2375
2926
  },
2376
- // Move to HeikinAshiSeries.ts aftre refactoring data grouping.
2927
+ hlc: {
2928
+ groupPixelWidth: 5
2929
+ // Move to HeikinAshiSeries.ts aftre refactoring data grouping.
2930
+ },
2377
2931
  heikinashi: {
2378
2932
  groupPixelWidth: 10
2379
2933
  }
@@ -2416,6 +2970,9 @@
2416
2970
  if (this.is('ohlc')) {
2417
2971
  return 'ohlc';
2418
2972
  }
2973
+ if (this.is('hlc')) {
2974
+ return 'hlc';
2975
+ }
2419
2976
  if (this.is('column')) {
2420
2977
  return 'sum';
2421
2978
  }
@@ -2481,7 +3038,7 @@
2481
3038
  *
2482
3039
  * @function Highcharts.Axis#applyGrouping
2483
3040
  */
2484
- Axis.prototype.applyGrouping = function () {
3041
+ Axis.prototype.applyGrouping = function (e) {
2485
3042
  var axis = this,
2486
3043
  series = axis.series;
2487
3044
  series.forEach(function (series) {
@@ -2490,8 +3047,10 @@
2490
3047
  series.groupPixelWidth = axis.getGroupPixelWidth && axis.getGroupPixelWidth();
2491
3048
  if (series.groupPixelWidth) {
2492
3049
  series.hasProcessed = true; // #2692
2493
- series.applyGrouping();
2494
3050
  }
3051
+ // Fire independing on series.groupPixelWidth to always set a proper
3052
+ // dataGrouping state, (#16238)
3053
+ series.applyGrouping(!!e.hasExtemesChanged);
2495
3054
  });
2496
3055
  };
2497
3056
  // Get the data grouping pixel width based on the greatest defined individual
@@ -2524,8 +3083,7 @@
2524
3083
  // Execute grouping if the amount of points is greater than the
2525
3084
  // limit defined in groupPixelWidth
2526
3085
  if (series[i].groupPixelWidth ||
2527
- dataLength >
2528
- (this.chart.plotSizeX / groupPixelWidth) ||
3086
+ dataLength > (this.chart.plotSizeX / groupPixelWidth) ||
2529
3087
  (dataLength && dgOptions.forced)) {
2530
3088
  doGrouping = true;
2531
3089
  }
@@ -2763,7 +3321,7 @@
2763
3321
  * from the raw data.
2764
3322
  *
2765
3323
  * Defaults to `average` for line-type series, `sum` for columns, `range`
2766
- * for range series and `ohlc` for OHLC and candlestick.
3324
+ * for range series, `hlc` for HLC, and `ohlc` for OHLC and candlestick.
2767
3325
  *
2768
3326
  * @sample {highstock} stock/plotoptions/series-datagrouping-approximation
2769
3327
  * Approximation callback with custom data
@@ -2905,87 +3463,546 @@
2905
3463
  * -`lastPoint` the last point in the group
2906
3464
  * (e.g. points at 00:13, 00:35, 00:59 -> 00:59)
2907
3465
  *
2908
- * @sample {highstock} stock/plotoptions/series-datagrouping-first-anchor
2909
- * Applying first and last anchor.
3466
+ * @sample {highstock} stock/plotoptions/series-datagrouping-first-anchor
3467
+ * Applying first and last anchor.
3468
+ *
3469
+ * @sample {highstock} stock/plotoptions/series-datagrouping-last-anchor
3470
+ * Applying the last anchor in the chart with live data.
3471
+ *
3472
+ * @see [dataGrouping.anchor](#plotOptions.series.dataGrouping.anchor)
3473
+ *
3474
+ * @type {Highcharts.DataGroupingAnchorExtremes}
3475
+ * @since 9.1.0
3476
+ * @default start
3477
+ * @apioption plotOptions.series.dataGrouping.lastAnchor
3478
+ */
3479
+ /**
3480
+ * Normally, a group is indexed by the start of that group, so for example
3481
+ * when 30 daily values are grouped into one month, that month's x value
3482
+ * will be the 1st of the month. This apparently shifts the data to
3483
+ * the left. When the smoothed option is true, this is compensated for.
3484
+ * The data is shifted to the middle of the group, and min and max
3485
+ * values are preserved. Internally, this is used in the Navigator series.
3486
+ *
3487
+ * @type {boolean}
3488
+ * @default false
3489
+ * @deprecated
3490
+ * @apioption plotOptions.series.dataGrouping.smoothed
3491
+ */
3492
+ /**
3493
+ * An array determining what time intervals the data is allowed to be
3494
+ * grouped to. Each array item is an array where the first value is
3495
+ * the time unit and the second value another array of allowed multiples.
3496
+ *
3497
+ * Defaults to:
3498
+ * ```js
3499
+ * units: [[
3500
+ * 'millisecond', // unit name
3501
+ * [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
3502
+ * ], [
3503
+ * 'second',
3504
+ * [1, 2, 5, 10, 15, 30]
3505
+ * ], [
3506
+ * 'minute',
3507
+ * [1, 2, 5, 10, 15, 30]
3508
+ * ], [
3509
+ * 'hour',
3510
+ * [1, 2, 3, 4, 6, 8, 12]
3511
+ * ], [
3512
+ * 'day',
3513
+ * [1]
3514
+ * ], [
3515
+ * 'week',
3516
+ * [1]
3517
+ * ], [
3518
+ * 'month',
3519
+ * [1, 3, 6]
3520
+ * ], [
3521
+ * 'year',
3522
+ * null
3523
+ * ]]
3524
+ * ```
3525
+ *
3526
+ * @type {Array<Array<string,(Array<number>|null)>>}
3527
+ * @apioption plotOptions.series.dataGrouping.units
3528
+ */
3529
+ /**
3530
+ * The approximate pixel width of each group. If for example a series
3531
+ * with 30 points is displayed over a 600 pixel wide plot area, no grouping
3532
+ * is performed. If however the series contains so many points that
3533
+ * the spacing is less than the groupPixelWidth, Highcharts will try
3534
+ * to group it into appropriate groups so that each is more or less
3535
+ * two pixels wide. Defaults to `10`.
3536
+ *
3537
+ * @sample {highstock} stock/plotoptions/series-datagrouping-grouppixelwidth/
3538
+ * Two series with the same data density but different groupPixelWidth
3539
+ *
3540
+ * @type {number}
3541
+ * @default 10
3542
+ * @apioption plotOptions.column.dataGrouping.groupPixelWidth
3543
+ */
3544
+ ''; // required by JSDoc parsing
3545
+
3546
+ return dataGrouping;
3547
+ });
3548
+ _registerModule(_modules, 'Series/HLC/HLCPoint.js', [_modules['Core/Series/SeriesRegistry.js']], function (SeriesRegistry) {
3549
+ /* *
3550
+ *
3551
+ * (c) 2010-2021 Pawel Lysy
3552
+ *
3553
+ * License: www.highcharts.com/license
3554
+ *
3555
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
3556
+ *
3557
+ * */
3558
+ var __extends = (this && this.__extends) || (function () {
3559
+ var extendStatics = function (d,
3560
+ b) {
3561
+ extendStatics = Object.setPrototypeOf ||
3562
+ ({ __proto__: [] } instanceof Array && function (d,
3563
+ b) { d.__proto__ = b; }) ||
3564
+ function (d,
3565
+ b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3566
+ return extendStatics(d, b);
3567
+ };
3568
+ return function (d, b) {
3569
+ extendStatics(d, b);
3570
+ function __() { this.constructor = d; }
3571
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3572
+ };
3573
+ })();
3574
+ var ColumnSeries = SeriesRegistry.seriesTypes.column;
3575
+ /* *
3576
+ *
3577
+ * Class
3578
+ *
3579
+ * */
3580
+ var HLCPoint = /** @class */ (function (_super) {
3581
+ __extends(HLCPoint, _super);
3582
+ function HLCPoint() {
3583
+ /* *
3584
+ *
3585
+ * Properties
3586
+ *
3587
+ * */
3588
+ var _this = _super !== null && _super.apply(this,
3589
+ arguments) || this;
3590
+ _this.close = void 0;
3591
+ _this.high = void 0;
3592
+ _this.low = void 0;
3593
+ _this.options = void 0;
3594
+ _this.plotClose = void 0;
3595
+ _this.series = void 0;
3596
+ return _this;
3597
+ }
3598
+ return HLCPoint;
3599
+ }(ColumnSeries.prototype.pointClass));
3600
+ /* *
3601
+ *
3602
+ * Default Export
3603
+ *
3604
+ * */
3605
+
3606
+ return HLCPoint;
3607
+ });
3608
+ _registerModule(_modules, 'Series/HLC/HLCSeries.js', [_modules['Series/HLC/HLCPoint.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (HLCPoint, SeriesRegistry, U) {
3609
+ /* *
3610
+ *
3611
+ * (c) 2010-2021 Pawel Lysy
3612
+ *
3613
+ * License: www.highcharts.com/license
3614
+ *
3615
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
3616
+ *
3617
+ * */
3618
+ var __extends = (this && this.__extends) || (function () {
3619
+ var extendStatics = function (d,
3620
+ b) {
3621
+ extendStatics = Object.setPrototypeOf ||
3622
+ ({ __proto__: [] } instanceof Array && function (d,
3623
+ b) { d.__proto__ = b; }) ||
3624
+ function (d,
3625
+ b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3626
+ return extendStatics(d, b);
3627
+ };
3628
+ return function (d, b) {
3629
+ extendStatics(d, b);
3630
+ function __() { this.constructor = d; }
3631
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3632
+ };
3633
+ })();
3634
+ var ColumnSeries = SeriesRegistry.seriesTypes.column;
3635
+ var extend = U.extend,
3636
+ merge = U.merge;
3637
+ /* *
3638
+ *
3639
+ * Class
3640
+ *
3641
+ * */
3642
+ /**
3643
+ * The hlc series type.
3644
+ *
3645
+ * @private
3646
+ * @class
3647
+ * @name Highcharts.seriesTypes.hlc
3648
+ *
3649
+ * @augments Highcharts.Series
3650
+ */
3651
+ var HLCSeries = /** @class */ (function (_super) {
3652
+ __extends(HLCSeries, _super);
3653
+ function HLCSeries() {
3654
+ /* *
3655
+ *
3656
+ * Static Properties
3657
+ *
3658
+ * */
3659
+ var _this = _super !== null && _super.apply(this,
3660
+ arguments) || this;
3661
+ /* *
3662
+ *
3663
+ * Properties
3664
+ *
3665
+ * */
3666
+ _this.data = void 0;
3667
+ _this.options = void 0;
3668
+ _this.points = void 0;
3669
+ _this.yData = void 0;
3670
+ return _this;
3671
+ /* eslint-enable valid-jsdoc */
3672
+ }
3673
+ /* *
3674
+ *
3675
+ * Functions
3676
+ *
3677
+ * */
3678
+ /* eslint-disable valid-jsdoc */
3679
+ /**
3680
+ * Extend the path if close is not between high and low.
3681
+ *
3682
+ * @param {SVGPath} path the path array of the point
3683
+ * @param {number} halfStrokeWidth
3684
+ * @param {number} value value of the point to which the stem should be extended
3685
+ */
3686
+ HLCSeries.prototype.extendStem = function (path, halfStrokeWidth, value) {
3687
+ var start = path[0];
3688
+ var end = path[1];
3689
+ // We don't need to worry about crisp - close value
3690
+ // is already crisped and halfStrokeWidth should remove it.
3691
+ if (typeof start[2] === 'number') {
3692
+ start[2] = Math.max(value + halfStrokeWidth, start[2]);
3693
+ }
3694
+ if (typeof end[2] === 'number') {
3695
+ end[2] = Math.min(value - halfStrokeWidth, end[2]);
3696
+ }
3697
+ };
3698
+ /**
3699
+ * Function to create SVGPath of the point based on the
3700
+ * plot positions of this point.
3701
+ *
3702
+ * @param {SVGPath} point
3703
+ * @param {SVGElement} graphic
3704
+ * @returns {SVGPath}
3705
+ */
3706
+ HLCSeries.prototype.getPointPath = function (point, graphic) {
3707
+ // crisp vector coordinates
3708
+ var strokeWidth = graphic.strokeWidth(),
3709
+ series = point.series,
3710
+ crispCorr = (strokeWidth % 2) / 2,
3711
+ // #2596:
3712
+ crispX = Math.round(point.plotX) - crispCorr,
3713
+ halfWidth = Math.round(point.shapeArgs.width / 2);
3714
+ var path,
3715
+ plotClose = point.plotClose;
3716
+ // the vertical stem
3717
+ path = [
3718
+ ['M', crispX, Math.round(point.yBottom)],
3719
+ ['L', crispX, Math.round(point.plotHigh)]
3720
+ ];
3721
+ // close
3722
+ if (point.close !== null) {
3723
+ plotClose = Math.round(point.plotClose) + crispCorr;
3724
+ path.push(['M', crispX, plotClose], ['L', crispX + halfWidth, plotClose]);
3725
+ series.extendStem(path, strokeWidth / 2, plotClose);
3726
+ }
3727
+ return path;
3728
+ };
3729
+ /**
3730
+ * Draw single point
3731
+ * @private
3732
+ */
3733
+ HLCSeries.prototype.drawSinglePoint = function (point) {
3734
+ var series = point.series,
3735
+ chart = series.chart;
3736
+ var path,
3737
+ graphic = point.graphic,
3738
+ isNew = !graphic;
3739
+ if (typeof point.plotY !== 'undefined') {
3740
+ // Create and/or update the graphic
3741
+ if (!graphic) {
3742
+ point.graphic = graphic = chart.renderer.path()
3743
+ .add(series.group);
3744
+ }
3745
+ if (!chart.styledMode) {
3746
+ graphic.attr(series.pointAttribs(point, (point.selected && 'select'))); // #3897
3747
+ }
3748
+ // crisp vector coordinates
3749
+ path = series.getPointPath(point, graphic);
3750
+ graphic[isNew ? 'attr' : 'animate']({ d: path })
3751
+ .addClass(point.getClassName(), true);
3752
+ }
3753
+ };
3754
+ /**
3755
+ * Draw the data points
3756
+ * @private
3757
+ */
3758
+ HLCSeries.prototype.drawPoints = function () {
3759
+ this.points.forEach(this.drawSinglePoint);
3760
+ };
3761
+ /**
3762
+ * @private
3763
+ * @function Highcharts.seriesTypes.hlc#init
3764
+ * @return {void}
3765
+ */
3766
+ HLCSeries.prototype.init = function () {
3767
+ _super.prototype.init.apply(this, arguments);
3768
+ this.options.stacking = void 0; // #8817
3769
+ };
3770
+ /**
3771
+ * Postprocess mapping between options and SVG attributes
3772
+ * @private
3773
+ */
3774
+ HLCSeries.prototype.pointAttribs = function (point, state) {
3775
+ var attribs = _super.prototype.pointAttribs.call(this,
3776
+ point,
3777
+ state);
3778
+ delete attribs.fill;
3779
+ return attribs;
3780
+ };
3781
+ HLCSeries.prototype.toYData = function (point) {
3782
+ // return a plain array for speedy calculation
3783
+ return [point.high, point.low, point.close];
3784
+ };
3785
+ /**
3786
+ * Translate data points from raw values x and y to plotX and plotY
3787
+ *
3788
+ * @private
3789
+ * @function Highcharts.seriesTypes.hlc#translate
3790
+ * @return {void}
3791
+ */
3792
+ HLCSeries.prototype.translate = function () {
3793
+ var series = this,
3794
+ yAxis = series.yAxis,
3795
+ names = (this.pointArrayMap && this.pointArrayMap.slice()) || [],
3796
+ translated = names.map(function (name) {
3797
+ return "plot" + (name.charAt(0).toUpperCase() + name.slice(1));
3798
+ });
3799
+ translated.push('yBottom');
3800
+ names.push('low');
3801
+ _super.prototype.translate.apply(series);
3802
+ // Do the translation
3803
+ series.points.forEach(function (point) {
3804
+ names.forEach(function (name, i) {
3805
+ var value = point[name];
3806
+ if (value !== null) {
3807
+ if (series.dataModify) {
3808
+ value = series.dataModify.modifyValue(value);
3809
+ }
3810
+ point[translated[i]] =
3811
+ yAxis.toPixels(value, true);
3812
+ }
3813
+ });
3814
+ // Align the tooltip to the high value to avoid covering the
3815
+ // point
3816
+ point.tooltipPos[1] =
3817
+ point.plotHigh + yAxis.pos - series.chart.plotTop;
3818
+ });
3819
+ };
3820
+ /**
3821
+ * An HLC chart is a style of financial chart used to describe price
3822
+ * movements over time. It displays high, low and close values per
3823
+ * data point.
3824
+ *
3825
+ * @sample stock/demo/hlc/
3826
+ * HLC chart
3827
+ *
3828
+ * @extends plotOptions.column
3829
+ * @excluding borderColor, borderRadius, borderWidth, crisp, stacking,
3830
+ * stack
3831
+ * @product highstock
3832
+ * @optionparent plotOptions.hlc
3833
+ */
3834
+ HLCSeries.defaultOptions = merge(ColumnSeries.defaultOptions, {
3835
+ /**
3836
+ * The approximate pixel width of each group. If for example a series
3837
+ * with 30 points is displayed over a 600 pixel wide plot area, no
3838
+ * grouping is performed. If however the series contains so many points
3839
+ * that the spacing is less than the groupPixelWidth, Highcharts will
3840
+ * try to group it into appropriate groups so that each is more or less
3841
+ * two pixels wide. Defaults to `5`.
3842
+ *
3843
+ * @type {number}
3844
+ * @default 5
3845
+ * @product highstock
3846
+ * @apioption plotOptions.hlc.dataGrouping.groupPixelWidth
3847
+ */
3848
+ /**
3849
+ * @type {Highcharts.DataGroupingApproximationValue|Function}
3850
+ * @default hlc
3851
+ * @product highstock
3852
+ * @apioption plotOptions.hlc.dataGrouping.approximation
3853
+ */
3854
+ /**
3855
+ * @default close
3856
+ * @apioption plotOptions.hlc.colorKey
3857
+ */
3858
+ /**
3859
+ * The pixel width of the line/border. Defaults to `1`.
3860
+ *
3861
+ * @sample {highstock} stock/plotoptions/hlc-linewidth/
3862
+ * A greater line width
3863
+ *
3864
+ * @type {number}
3865
+ * @default 1
3866
+ * @product highstock
3867
+ *
3868
+ * @public
3869
+ */
3870
+ lineWidth: 1,
3871
+ tooltip: {
3872
+ pointFormat: '<span style="color:{point.color}">\u25CF</span> ' +
3873
+ '<b> {series.name}</b><br/>' +
3874
+ 'High: {point.high}<br/>' +
3875
+ 'Low: {point.low}<br/>' +
3876
+ 'Close: {point.close}<br/>'
3877
+ },
3878
+ threshold: null,
3879
+ states: {
3880
+ /**
3881
+ * @extends plotOptions.column.states.hover
3882
+ * @product highstock
3883
+ */
3884
+ hover: {
3885
+ /**
3886
+ * The pixel width of the line representing the HLC point.
3887
+ *
3888
+ * @type {number}
3889
+ * @default 3
3890
+ * @product highstock
3891
+ */
3892
+ lineWidth: 3
3893
+ }
3894
+ },
3895
+ /**
3896
+ * Determines which one of `high`, `low`, `close` values should
3897
+ * be represented as `point.y`, which is later used to set dataLabel
3898
+ * position and [compare](#plotOptions.series.compare).
3899
+ *
3900
+ * @sample {highstock} stock/plotoptions/hlc-pointvalkey/
3901
+ * Possible values
3902
+ *
3903
+ * @type {string}
3904
+ * @default close
3905
+ * @validvalue ["high", "low", "close"]
3906
+ * @product highstock
3907
+ * @apioption plotOptions.hlc.pointValKey
3908
+ */
3909
+ /**
3910
+ * @default close
3911
+ * @apioption plotOptions.hlc.colorKey
3912
+ */
3913
+ stickyTracking: true
3914
+ });
3915
+ return HLCSeries;
3916
+ }(ColumnSeries));
3917
+ extend(HLCSeries.prototype, {
3918
+ animate: null,
3919
+ directTouch: false,
3920
+ pointArrayMap: ['high', 'low', 'close'],
3921
+ pointAttrToOptions: {
3922
+ stroke: 'color',
3923
+ 'stroke-width': 'lineWidth'
3924
+ },
3925
+ pointValKey: 'close'
3926
+ });
3927
+ HLCSeries.prototype.pointClass = HLCPoint;
3928
+ SeriesRegistry.registerSeriesType('hlc', HLCSeries);
3929
+ /* *
3930
+ *
3931
+ * Default Export
2910
3932
  *
2911
- * @sample {highstock} stock/plotoptions/series-datagrouping-last-anchor
2912
- * Applying the last anchor in the chart with live data.
3933
+ * */
3934
+ /* *
2913
3935
  *
2914
- * @see [dataGrouping.anchor](#plotOptions.series.dataGrouping.anchor)
3936
+ * API Options
2915
3937
  *
2916
- * @type {Highcharts.DataGroupingAnchorExtremes}
2917
- * @since 9.1.0
2918
- * @default start
2919
- * @apioption plotOptions.series.dataGrouping.lastAnchor
2920
- */
3938
+ * */
2921
3939
  /**
2922
- * Normally, a group is indexed by the start of that group, so for example
2923
- * when 30 daily values are grouped into one month, that month's x value
2924
- * will be the 1st of the month. This apparently shifts the data to
2925
- * the left. When the smoothed option is true, this is compensated for.
2926
- * The data is shifted to the middle of the group, and min and max
2927
- * values are preserved. Internally, this is used in the Navigator series.
3940
+ * A `hlc` series. If the [type](#series.hlc.type) option is not
3941
+ * specified, it is inherited from [chart.type](#chart.type).
2928
3942
  *
2929
- * @type {boolean}
2930
- * @default false
2931
- * @deprecated
2932
- * @apioption plotOptions.series.dataGrouping.smoothed
3943
+ * @extends series,plotOptions.hlc
3944
+ * @excluding dataParser, dataURL
3945
+ * @product highstock
3946
+ * @apioption series.hlc
2933
3947
  */
2934
3948
  /**
2935
- * An array determining what time intervals the data is allowed to be
2936
- * grouped to. Each array item is an array where the first value is
2937
- * the time unit and the second value another array of allowed multiples.
3949
+ * An array of data points for the series. For the `hlc` series type,
3950
+ * points can be given in the following ways:
2938
3951
  *
2939
- * Defaults to:
2940
- * ```js
2941
- * units: [[
2942
- * 'millisecond', // unit name
2943
- * [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
2944
- * ], [
2945
- * 'second',
2946
- * [1, 2, 5, 10, 15, 30]
2947
- * ], [
2948
- * 'minute',
2949
- * [1, 2, 5, 10, 15, 30]
2950
- * ], [
2951
- * 'hour',
2952
- * [1, 2, 3, 4, 6, 8, 12]
2953
- * ], [
2954
- * 'day',
2955
- * [1]
2956
- * ], [
2957
- * 'week',
2958
- * [1]
2959
- * ], [
2960
- * 'month',
2961
- * [1, 3, 6]
2962
- * ], [
2963
- * 'year',
2964
- * null
2965
- * ]]
2966
- * ```
3952
+ * 1. An array of arrays with 4 or 3 values. In this case, the values correspond
3953
+ * to `x,high,low,close`. If the first value is a string, it is applied
3954
+ * as the name of the point, and the `x` value is inferred. The `x` value can
3955
+ * also be omitted, in which case the inner arrays should be of length of 3\.
3956
+ * Then the `x` value is automatically calculated, either starting at 0 and
3957
+ * incremented by 1, or from `pointStart` and `pointInterval` given in the
3958
+ * series options.
3959
+ * ```js
3960
+ * data: [
3961
+ * [0, 5, 6, 7],
3962
+ * [1, 4, 8, 2],
3963
+ * [2, 3, 4, 10]
3964
+ * ]
3965
+ * ```
2967
3966
  *
2968
- * @type {Array<Array<string,(Array<number>|null)>>}
2969
- * @apioption plotOptions.series.dataGrouping.units
3967
+ * 2. An array of objects with named values. The following snippet shows only a
3968
+ * few settings, see the complete options set below. If the total number of
3969
+ * data points exceeds the series'
3970
+ * [turboThreshold](#series.hlc.turboThreshold), this option is not
3971
+ * available.
3972
+ * ```js
3973
+ * data: [{
3974
+ * x: 1,
3975
+ * high: 4,
3976
+ * low: 5,
3977
+ * close: 2,
3978
+ * name: "Point2",
3979
+ * color: "#00FF00"
3980
+ * }, {
3981
+ * x: 1,
3982
+ * high: 3,
3983
+ * low: 6,
3984
+ * close: 7,
3985
+ * name: "Point1",
3986
+ * color: "#FF00FF"
3987
+ * }]
3988
+ * ```
3989
+ *
3990
+ * @type {Array<Array<(number|string),number,number>|Array<(number|string),number,number,number>|*>}
3991
+ * @extends series.arearange.data
3992
+ * @excluding y, marker
3993
+ * @product highstock
3994
+ * @apioption series.hlc.data
2970
3995
  */
2971
3996
  /**
2972
- * The approximate pixel width of each group. If for example a series
2973
- * with 30 points is displayed over a 600 pixel wide plot area, no grouping
2974
- * is performed. If however the series contains so many points that
2975
- * the spacing is less than the groupPixelWidth, Highcharts will try
2976
- * to group it into appropriate groups so that each is more or less
2977
- * two pixels wide. Defaults to `10`.
2978
- *
2979
- * @sample {highstock} stock/plotoptions/series-datagrouping-grouppixelwidth/
2980
- * Two series with the same data density but different groupPixelWidth
3997
+ * The closing value of each data point.
2981
3998
  *
2982
3999
  * @type {number}
2983
- * @default 10
2984
- * @apioption plotOptions.column.dataGrouping.groupPixelWidth
4000
+ * @product highstock
4001
+ * @apioption series.hlc.data.close
2985
4002
  */
2986
- ''; // required by JSDoc parsing
4003
+ ''; // adds doclets above to transpilat
2987
4004
 
2988
- return dataGrouping;
4005
+ return HLCSeries;
2989
4006
  });
2990
4007
  _registerModule(_modules, 'Series/OHLC/OHLCPoint.js', [_modules['Core/Series/SeriesRegistry.js']], function (SeriesRegistry) {
2991
4008
  /* *
@@ -3013,7 +4030,7 @@
3013
4030
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3014
4031
  };
3015
4032
  })();
3016
- var ColumnSeries = SeriesRegistry.seriesTypes.column;
4033
+ var HLCSeries = SeriesRegistry.seriesTypes.hlc;
3017
4034
  /* *
3018
4035
  *
3019
4036
  * Class
@@ -3029,12 +4046,8 @@
3029
4046
  * */
3030
4047
  var _this = _super !== null && _super.apply(this,
3031
4048
  arguments) || this;
3032
- _this.close = void 0;
3033
- _this.high = void 0;
3034
- _this.low = void 0;
3035
4049
  _this.open = void 0;
3036
4050
  _this.options = void 0;
3037
- _this.plotClose = void 0;
3038
4051
  _this.plotOpen = void 0;
3039
4052
  _this.series = void 0;
3040
4053
  return _this;
@@ -3104,7 +4117,7 @@
3104
4117
  return this;
3105
4118
  };
3106
4119
  return OHLCPoint;
3107
- }(ColumnSeries.prototype.pointClass));
4120
+ }(HLCSeries.prototype.pointClass));
3108
4121
  /* *
3109
4122
  *
3110
4123
  * Default Export
@@ -3139,14 +4152,11 @@
3139
4152
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3140
4153
  };
3141
4154
  })();
3142
- var ColumnSeries = SeriesRegistry.seriesTypes.column;
3143
- var extend = U.extend,
4155
+ var Series = SeriesRegistry.series,
4156
+ HLCSeries = SeriesRegistry.seriesTypes.hlc;
4157
+ var addEvent = U.addEvent,
4158
+ extend = U.extend,
3144
4159
  merge = U.merge;
3145
- /* *
3146
- *
3147
- * Class
3148
- *
3149
- * */
3150
4160
  /**
3151
4161
  * The ohlc series type.
3152
4162
  *
@@ -3174,97 +4184,31 @@
3174
4184
  _this.data = void 0;
3175
4185
  _this.options = void 0;
3176
4186
  _this.points = void 0;
3177
- _this.yData = void 0;
3178
4187
  return _this;
3179
- /* eslint-enable valid-jsdoc */
3180
4188
  }
3181
4189
  /* *
3182
4190
  *
3183
4191
  * Functions
3184
4192
  *
3185
4193
  * */
3186
- /* eslint-disable valid-jsdoc */
3187
- /**
3188
- * Draw the data points
3189
- * @private
3190
- */
3191
- OHLCSeries.prototype.drawPoints = function () {
3192
- var series = this,
3193
- points = series.points,
3194
- chart = series.chart,
3195
- /**
3196
- * Extend vertical stem to open and close values.
3197
- */
3198
- extendStem = function (path,
3199
- halfStrokeWidth,
3200
- openOrClose) {
3201
- var start = path[0];
3202
- var end = path[1];
3203
- // We don't need to worry about crisp - openOrClose value
3204
- // is already crisped and halfStrokeWidth should remove it.
3205
- if (typeof start[2] === 'number') {
3206
- start[2] = Math.max(openOrClose + halfStrokeWidth, start[2]);
3207
- }
3208
- if (typeof end[2] === 'number') {
3209
- end[2] = Math.min(openOrClose - halfStrokeWidth, end[2]);
3210
- }
3211
- };
3212
- points.forEach(function (point) {
3213
- var plotOpen,
3214
- plotClose,
3215
- crispCorr,
3216
- halfWidth,
3217
- path,
3218
- graphic = point.graphic,
3219
- crispX,
3220
- isNew = !graphic,
3221
- strokeWidth;
3222
- if (typeof point.plotY !== 'undefined') {
3223
- // Create and/or update the graphic
3224
- if (!graphic) {
3225
- point.graphic = graphic = chart.renderer.path()
3226
- .add(series.group);
3227
- }
3228
- if (!chart.styledMode) {
3229
- graphic.attr(series.pointAttribs(point, (point.selected && 'select'))); // #3897
3230
- }
3231
- // crisp vector coordinates
3232
- strokeWidth = graphic.strokeWidth();
3233
- crispCorr = (strokeWidth % 2) / 2;
3234
- // #2596:
3235
- crispX = Math.round(point.plotX) - crispCorr;
3236
- halfWidth = Math.round(point.shapeArgs.width / 2);
3237
- // the vertical stem
3238
- path = [
3239
- ['M', crispX, Math.round(point.yBottom)],
3240
- ['L', crispX, Math.round(point.plotHigh)]
3241
- ];
3242
- // open
3243
- if (point.open !== null) {
3244
- plotOpen = Math.round(point.plotOpen) + crispCorr;
3245
- path.push(['M', crispX, plotOpen], ['L', crispX - halfWidth, plotOpen]);
3246
- extendStem(path, strokeWidth / 2, plotOpen);
3247
- }
3248
- // close
3249
- if (point.close !== null) {
3250
- plotClose = Math.round(point.plotClose) + crispCorr;
3251
- path.push(['M', crispX, plotClose], ['L', crispX + halfWidth, plotClose]);
3252
- extendStem(path, strokeWidth / 2, plotClose);
3253
- }
3254
- graphic[isNew ? 'attr' : 'animate']({ d: path })
3255
- .addClass(point.getClassName(), true);
3256
- }
3257
- });
3258
- };
3259
- /**
3260
- * @private
3261
- * @function Highcarts.seriesTypes.ohlc#init
3262
- * @return {void}
3263
- */
3264
- OHLCSeries.prototype.init = function () {
3265
- _super.prototype.init.apply(this, arguments);
3266
- this.options.stacking = void 0; // #8817
4194
+ OHLCSeries.prototype.getPointPath = function (point, graphic) {
4195
+ var path = _super.prototype.getPointPath.call(this,
4196
+ point,
4197
+ graphic),
4198
+ strokeWidth = graphic.strokeWidth(),
4199
+ crispCorr = (strokeWidth % 2) / 2,
4200
+ crispX = Math.round(point.plotX) - crispCorr,
4201
+ halfWidth = Math.round(point.shapeArgs.width / 2);
4202
+ var plotOpen = point.plotOpen;
4203
+ // crisp vector coordinates
4204
+ if (point.open !== null) {
4205
+ plotOpen = Math.round(point.plotOpen) + crispCorr;
4206
+ path.push(['M', crispX, plotOpen], ['L', crispX - halfWidth, plotOpen]);
4207
+ _super.prototype.extendStem.call(this, path, strokeWidth / 2, plotOpen);
4208
+ }
4209
+ return path;
3267
4210
  };
4211
+ /* eslint-disable valid-jsdoc */
3268
4212
  /**
3269
4213
  * Postprocess mapping between options and SVG attributes
3270
4214
  * @private
@@ -3286,43 +4230,6 @@
3286
4230
  // return a plain array for speedy calculation
3287
4231
  return [point.open, point.high, point.low, point.close];
3288
4232
  };
3289
- /**
3290
- * Translate data points from raw values x and y to plotX and plotY
3291
- *
3292
- * @private
3293
- * @function Highcharts.seriesTypes.ohlc#translate
3294
- * @return {void}
3295
- */
3296
- OHLCSeries.prototype.translate = function () {
3297
- var series = this,
3298
- yAxis = series.yAxis,
3299
- hasModifyValue = !!series.modifyValue,
3300
- translated = [
3301
- 'plotOpen',
3302
- 'plotHigh',
3303
- 'plotLow',
3304
- 'plotClose',
3305
- 'yBottom'
3306
- ]; // translate OHLC for
3307
- _super.prototype.translate.apply(series);
3308
- // Do the translation
3309
- series.points.forEach(function (point) {
3310
- [point.open, point.high, point.low, point.close, point.low]
3311
- .forEach(function (value, i) {
3312
- if (value !== null) {
3313
- if (hasModifyValue) {
3314
- value = series.modifyValue(value);
3315
- }
3316
- point[translated[i]] =
3317
- yAxis.toPixels(value, true);
3318
- }
3319
- });
3320
- // Align the tooltip to the high value to avoid covering the
3321
- // point
3322
- point.tooltipPos[1] =
3323
- point.plotHigh + yAxis.pos - series.chart.plotTop;
3324
- });
3325
- };
3326
4233
  /**
3327
4234
  * An OHLC chart is a style of financial chart used to describe price
3328
4235
  * movements over time. It displays open, high, low and close values per
@@ -3331,82 +4238,46 @@
3331
4238
  * @sample stock/demo/ohlc/
3332
4239
  * OHLC chart
3333
4240
  *
3334
- * @extends plotOptions.column
3335
- * @excluding borderColor, borderRadius, borderWidth, crisp, stacking,
3336
- * stack
4241
+ * @extends plotOptions.ohlc
3337
4242
  * @product highstock
3338
4243
  * @optionparent plotOptions.ohlc
3339
4244
  */
3340
- OHLCSeries.defaultOptions = merge(ColumnSeries.defaultOptions, {
3341
- /**
3342
- * The approximate pixel width of each group. If for example a series
3343
- * with 30 points is displayed over a 600 pixel wide plot area, no
3344
- * grouping is performed. If however the series contains so many points
3345
- * that the spacing is less than the groupPixelWidth, Highcharts will
3346
- * try to group it into appropriate groups so that each is more or less
3347
- * two pixels wide. Defaults to `5`.
3348
- *
3349
- * @type {number}
3350
- * @default 5
3351
- * @product highstock
3352
- * @apioption plotOptions.ohlc.dataGrouping.groupPixelWidth
3353
- */
4245
+ /**
4246
+ * The parameter allows setting line series type and use OHLC indicators.
4247
+ * Data in OHLC format is required.
4248
+ *
4249
+ * @sample {highstock} stock/indicators/use-ohlc-data
4250
+ * Use OHLC data format to plot line chart
4251
+ *
4252
+ * @type {boolean}
4253
+ * @product highstock
4254
+ * @apioption plotOptions.line.useOhlcData
4255
+ */
4256
+ OHLCSeries.defaultOptions = merge(HLCSeries.defaultOptions, {
3354
4257
  /**
3355
- * The pixel width of the line/border. Defaults to `1`.
3356
- *
3357
- * @sample {highstock} stock/plotoptions/ohlc-linewidth/
3358
- * A greater line width
3359
- *
3360
- * @type {number}
3361
- * @default 1
3362
- * @product highstock
3363
- *
3364
- * @private
3365
- */
3366
- lineWidth: 1,
3367
- tooltip: {
3368
- pointFormat: '<span style="color:{point.color}">\u25CF</span> ' +
3369
- '<b> {series.name}</b><br/>' +
3370
- 'Open: {point.open}<br/>' +
3371
- 'High: {point.high}<br/>' +
3372
- 'Low: {point.low}<br/>' +
3373
- 'Close: {point.close}<br/>'
3374
- },
3375
- threshold: null,
3376
- states: {
3377
- /**
3378
- * @extends plotOptions.column.states.hover
3379
- * @product highstock
3380
- */
3381
- hover: {
3382
- /**
3383
- * The pixel width of the line representing the OHLC point.
3384
- *
3385
- * @type {number}
3386
- * @default 3
3387
- * @product highstock
3388
- */
3389
- lineWidth: 3
3390
- }
3391
- },
4258
+ * @type {Highcharts.DataGroupingApproximationValue|Function}
4259
+ * @default ohlc
4260
+ * @product highstock
4261
+ * @apioption plotOptions.ohlc.dataGrouping.approximation
4262
+ */
4263
+ tooltip: {
4264
+ pointFormat: '<span style="color:{point.color}">\u25CF</span> ' +
4265
+ '<b> {series.name}</b><br/>' +
4266
+ 'Open: {point.open}<br/>' +
4267
+ 'High: {point.high}<br/>' +
4268
+ 'Low: {point.low}<br/>' +
4269
+ 'Close: {point.close}<br/>'
4270
+ }
3392
4271
  /**
3393
- * Determines which one of `open`, `high`, `low`, `close` values should
4272
+ * Determines which one of `open`, `high`, `low`, `close` values should
3394
4273
  * be represented as `point.y`, which is later used to set dataLabel
3395
4274
  * position and [compare](#plotOptions.series.compare).
3396
4275
  *
3397
- * @sample {highstock} stock/plotoptions/ohlc-pointvalkey/
3398
- * Possible values
3399
- *
3400
- * @type {string}
3401
4276
  * @default close
3402
4277
  * @validvalue ["open", "high", "low", "close"]
3403
4278
  * @product highstock
3404
4279
  * @apioption plotOptions.ohlc.pointValKey
3405
4280
  */
3406
- /**
3407
- * @default close
3408
- * @apioption plotOptions.ohlc.colorKey
3409
- */
3410
4281
  /**
3411
4282
  * Line color for up points.
3412
4283
  *
@@ -3414,19 +4285,11 @@
3414
4285
  * @product highstock
3415
4286
  * @apioption plotOptions.ohlc.upColor
3416
4287
  */
3417
- stickyTracking: true
3418
4288
  });
3419
4289
  return OHLCSeries;
3420
- }(ColumnSeries));
4290
+ }(HLCSeries));
3421
4291
  extend(OHLCSeries.prototype, {
3422
- animate: null,
3423
- directTouch: false,
3424
- pointArrayMap: ['open', 'high', 'low', 'close'],
3425
- pointAttrToOptions: {
3426
- stroke: 'color',
3427
- 'stroke-width': 'lineWidth'
3428
- },
3429
- pointValKey: 'close'
4292
+ pointArrayMap: ['open', 'high', 'low', 'close']
3430
4293
  });
3431
4294
  OHLCSeries.prototype.pointClass = OHLCPoint;
3432
4295
  SeriesRegistry.registerSeriesType('ohlc', OHLCSeries);
@@ -3435,6 +4298,30 @@
3435
4298
  * Default Export
3436
4299
  *
3437
4300
  * */
4301
+ // Add useOhlcData option
4302
+ addEvent(Series, 'init', function (eventOptions) {
4303
+ // eslint-disable-next-line no-invalid-this
4304
+ var series = this,
4305
+ options = eventOptions.options;
4306
+ if (options.useOhlcData &&
4307
+ options.id !== 'highcharts-navigator-series') {
4308
+ extend(series, {
4309
+ pointValKey: OHLCSeries.prototype.pointValKey,
4310
+ // keys: ohlcProto.keys, // @todo potentially nonsense
4311
+ pointArrayMap: OHLCSeries.prototype.pointArrayMap,
4312
+ toYData: OHLCSeries.prototype.toYData
4313
+ });
4314
+ }
4315
+ });
4316
+ addEvent(Series, 'afterSetOptions', function (e) {
4317
+ var options = e.options,
4318
+ dataGrouping = options.dataGrouping;
4319
+ if (dataGrouping &&
4320
+ options.useOhlcData &&
4321
+ options.id !== 'highcharts-navigator-series') {
4322
+ dataGrouping.approximation = 'ohlc';
4323
+ }
4324
+ });
3438
4325
  /* *
3439
4326
  *
3440
4327
  * API Options
@@ -3499,13 +4386,6 @@
3499
4386
  * @product highstock
3500
4387
  * @apioption series.ohlc.data
3501
4388
  */
3502
- /**
3503
- * The closing value of each data point.
3504
- *
3505
- * @type {number}
3506
- * @product highstock
3507
- * @apioption series.ohlc.data.close
3508
- */
3509
4389
  /**
3510
4390
  * The opening value of each data point.
3511
4391
  *
@@ -3517,7 +4397,7 @@
3517
4397
 
3518
4398
  return OHLCSeries;
3519
4399
  });
3520
- _registerModule(_modules, 'Series/Candlestick/CandlestickSeries.js', [_modules['Core/DefaultOptions.js'], _modules['Core/Color/Palette.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (D, palette, SeriesRegistry, U) {
4400
+ _registerModule(_modules, 'Series/Candlestick/CandlestickSeries.js', [_modules['Core/DefaultOptions.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (D, SeriesRegistry, U) {
3521
4401
  /* *
3522
4402
  *
3523
4403
  * (c) 2010-2021 Torstein Honsi
@@ -3567,7 +4447,7 @@
3567
4447
  function CandlestickSeries() {
3568
4448
  /* *
3569
4449
  *
3570
- * Static properties
4450
+ * Static Properties
3571
4451
  *
3572
4452
  * */
3573
4453
  var _this = _super !== null && _super.apply(this,
@@ -3704,9 +4584,10 @@
3704
4584
  });
3705
4585
  /* eslint-enable valid-jsdoc */
3706
4586
  };
4587
+ CandlestickSeries.defaultOptions = merge(OHLCSeries.defaultOptions, defaultOptions.plotOptions,
3707
4588
  /**
3708
- * A candlestick chart is a style of financial chart used to describe price
3709
- * movements over time.
4589
+ * A candlestick chart is a style of financial chart used to describe
4590
+ * price movements over time.
3710
4591
  *
3711
4592
  * @sample stock/demo/candlestick/
3712
4593
  * Candlestick chart
@@ -3716,7 +4597,7 @@
3716
4597
  * @product highstock
3717
4598
  * @optionparent plotOptions.candlestick
3718
4599
  */
3719
- CandlestickSeries.defaultOptions = merge(OHLCSeries.defaultOptions, defaultOptions.plotOptions, {
4600
+ {
3720
4601
  /**
3721
4602
  * The specific line color for up candle sticks. The default is to
3722
4603
  * inherit the general `lineColor` setting.
@@ -3729,12 +4610,6 @@
3729
4610
  * @product highstock
3730
4611
  * @apioption plotOptions.candlestick.upLineColor
3731
4612
  */
3732
- /**
3733
- * @type {Highcharts.DataGroupingApproximationValue|Function}
3734
- * @default ohlc
3735
- * @product highstock
3736
- * @apioption plotOptions.candlestick.dataGrouping.approximation
3737
- */
3738
4613
  states: {
3739
4614
  /**
3740
4615
  * @extends plotOptions.column.states.hover
@@ -3742,16 +4617,14 @@
3742
4617
  */
3743
4618
  hover: {
3744
4619
  /**
3745
- * The pixel width of the line/border around the candlestick.
4620
+ * The pixel width of the line/border around the
4621
+ * candlestick.
3746
4622
  *
3747
4623
  * @product highstock
3748
4624
  */
3749
4625
  lineWidth: 2
3750
4626
  }
3751
4627
  },
3752
- /**
3753
- * @extends plotOptions.ohlc.tooltip
3754
- */
3755
4628
  tooltip: defaultOptions.plotOptions.ohlc.tooltip,
3756
4629
  /**
3757
4630
  * @type {number|null}
@@ -3773,7 +4646,7 @@
3773
4646
  * @default #000000
3774
4647
  * @product highstock
3775
4648
  */
3776
- lineColor: palette.neutralColor100,
4649
+ lineColor: "#000000" /* neutralColor100 */,
3777
4650
  /**
3778
4651
  * The pixel width of the candlestick line/border. Defaults to `1`.
3779
4652
  *
@@ -3798,8 +4671,8 @@
3798
4671
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
3799
4672
  * @default #ffffff
3800
4673
  * @product highstock
3801
- */
3802
- upColor: palette.backgroundColor,
4674
+ */
4675
+ upColor: "#ffffff" /* backgroundColor */,
3803
4676
  /**
3804
4677
  * @product highstock
3805
4678
  */
@@ -3961,7 +4834,7 @@
3961
4834
 
3962
4835
  return FlagsPoint;
3963
4836
  });
3964
- _registerModule(_modules, 'Mixins/OnSeries.js', [_modules['Series/Column/ColumnSeries.js'], _modules['Core/Series/Series.js'], _modules['Core/Utilities.js']], function (ColumnSeries, Series, U) {
4837
+ _registerModule(_modules, 'Series/OnSeriesComposition.js', [_modules['Series/Column/ColumnSeries.js'], _modules['Core/Series/Series.js'], _modules['Core/Utilities.js']], function (ColumnSeries, Series, U) {
3965
4838
  /* *
3966
4839
  *
3967
4840
  * (c) 2010-2021 Torstein Honsi
@@ -3975,52 +4848,78 @@
3975
4848
  var seriesProto = Series.prototype;
3976
4849
  var defined = U.defined,
3977
4850
  stableSort = U.stableSort;
3978
- /**
3979
- * @private
3980
- * @mixin onSeriesMixin
3981
- */
3982
- var onSeriesMixin = {
3983
- /* eslint-disable valid-jsdoc */
3984
- /**
3985
- * Override getPlotBox. If the onSeries option is valid,
3986
- return the plot box
3987
- * of the onSeries,
3988
- otherwise proceed as usual.
3989
- *
3990
- * @private
3991
- * @function onSeriesMixin.getPlotBox
3992
- * @return {Highcharts.SeriesPlotBoxObject}
3993
- */
3994
- getPlotBox: function () {
3995
- return seriesProto.getPlotBox.call((this.options.onSeries &&
3996
- this.chart.get(this.options.onSeries)) || this);
3997
- },
4851
+ /* *
4852
+ *
4853
+ * Composition
4854
+ *
4855
+ * */
4856
+ var OnSeriesComposition;
4857
+ (function (OnSeriesComposition) {
4858
+ /* *
4859
+ *
4860
+ * Declarations
4861
+ *
4862
+ * */
4863
+ /* *
4864
+ *
4865
+ * Properties
4866
+ *
4867
+ * */
4868
+ var composedClasses = [];
4869
+ /* *
4870
+ *
4871
+ * Functions
4872
+ *
4873
+ * */
4874
+ /* eslint-disable valid-jsdoc */
4875
+ /**
4876
+ * @private
4877
+ */
4878
+ function compose(SeriesClass) {
4879
+ if (composedClasses.indexOf(SeriesClass) === -1) {
4880
+ composedClasses.push(SeriesClass);
4881
+ var seriesProto_1 = SeriesClass.prototype;
4882
+ seriesProto_1.getPlotBox = getPlotBox;
4883
+ seriesProto_1.translate = translate;
4884
+ }
4885
+ return SeriesClass;
4886
+ }
4887
+ OnSeriesComposition.compose = compose;
4888
+ /**
4889
+ * Override getPlotBox. If the onSeries option is valid, return the plot box
4890
+ * of the onSeries, otherwise proceed as usual.
4891
+ *
4892
+ * @private
4893
+ */
4894
+ function getPlotBox() {
4895
+ return seriesProto.getPlotBox.call((this.options.onSeries &&
4896
+ this.chart.get(this.options.onSeries)) || this);
4897
+ }
4898
+ OnSeriesComposition.getPlotBox = getPlotBox;
3998
4899
  /**
3999
4900
  * Extend the translate method by placing the point on the related series
4000
4901
  *
4001
4902
  * @private
4002
- * @function onSeriesMixin.translate
4003
- * @return {void}
4004
4903
  */
4005
- translate: function () {
4904
+ function translate() {
4006
4905
  columnProto.translate.apply(this);
4007
4906
  var series = this,
4008
4907
  options = series.options,
4009
4908
  chart = series.chart,
4010
4909
  points = series.points,
4011
- cursor = points.length - 1,
4012
- point,
4013
- lastPoint,
4014
4910
  optionsOnSeries = options.onSeries,
4015
4911
  onSeries = (optionsOnSeries &&
4016
4912
  chart.get(optionsOnSeries)),
4017
- onKey = options.onKey || 'y',
4018
4913
  step = onSeries && onSeries.options.step,
4019
4914
  onData = (onSeries && onSeries.points),
4020
- i = onData && onData.length,
4021
4915
  inverted = chart.inverted,
4022
4916
  xAxis = series.xAxis,
4023
- yAxis = series.yAxis,
4917
+ yAxis = series.yAxis;
4918
+ var cursor = points.length - 1,
4919
+ point,
4920
+ lastPoint,
4921
+ onKey = options.onKey || 'y',
4922
+ i = onData && onData.length,
4024
4923
  xOffset = 0,
4025
4924
  leftPoint,
4026
4925
  lastX,
@@ -4034,9 +4933,7 @@
4034
4933
  lastX = (onData[i - 1].x +
4035
4934
  (currentDataGrouping ? currentDataGrouping.totalRange : 0)); // #2374
4036
4935
  // sort the data points
4037
- stableSort(points, function (a, b) {
4038
- return (a.x - b.x);
4039
- });
4936
+ stableSort(points, function (a, b) { return (a.x - b.x); });
4040
4937
  onKey = 'plot' + onKey[0].toUpperCase() + onKey.substr(1);
4041
4938
  while (i-- && points[cursor]) {
4042
4939
  leftPoint = onData[i];
@@ -4115,10 +5012,15 @@
4115
5012
  });
4116
5013
  this.onSeries = onSeries;
4117
5014
  }
4118
- /* eslint-enable valid-jsdoc */
4119
- };
5015
+ OnSeriesComposition.translate = translate;
5016
+ })(OnSeriesComposition || (OnSeriesComposition = {}));
5017
+ /* *
5018
+ *
5019
+ * Default Export
5020
+ *
5021
+ * */
4120
5022
 
4121
- return onSeriesMixin;
5023
+ return OnSeriesComposition;
4122
5024
  });
4123
5025
  _registerModule(_modules, 'Series/Flags/FlagsSymbols.js', [_modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Renderer/SVG/SVGRenderer.js']], function (RendererRegistry, SVGRenderer) {
4124
5026
  /* *
@@ -4214,7 +5116,7 @@
4214
5116
 
4215
5117
  return symbols;
4216
5118
  });
4217
- _registerModule(_modules, 'Series/Flags/FlagsSeries.js', [_modules['Series/Flags/FlagsPoint.js'], _modules['Core/Globals.js'], _modules['Mixins/OnSeries.js'], _modules['Core/Color/Palette.js'], _modules['Core/Renderer/RendererUtilities.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (FlagsPoint, H, OnSeriesMixin, palette, R, SeriesRegistry, SVGElement, U) {
5119
+ _registerModule(_modules, 'Series/Flags/FlagsSeries.js', [_modules['Series/Flags/FlagsPoint.js'], _modules['Core/Globals.js'], _modules['Series/OnSeriesComposition.js'], _modules['Core/Renderer/RendererUtilities.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (FlagsPoint, H, OnSeriesComposition, R, SeriesRegistry, SVGElement, U) {
4218
5120
  /* *
4219
5121
  *
4220
5122
  * (c) 2010-2021 Torstein Honsi
@@ -4419,11 +5321,15 @@
4419
5321
  }
4420
5322
  // Handle X-dimension overlapping
4421
5323
  if (!options.allowOverlapX) {
5324
+ var maxDistance_1 = 100;
4422
5325
  objectEach(boxesMap, function (box) {
4423
5326
  box.plotX = box.anchorX;
4424
5327
  boxes.push(box);
5328
+ maxDistance_1 = Math.max(box.size, maxDistance_1);
4425
5329
  });
4426
- distribute(boxes, inverted ? yAxis.len : this.xAxis.len, 100);
5330
+ // If necessary (for overlapping or long labels) distribute it
5331
+ // depending on the label width or a hardcoded value, #16041.
5332
+ distribute(boxes, inverted ? yAxis.len : this.xAxis.len, maxDistance_1);
4427
5333
  points.forEach(function (point) {
4428
5334
  var box = point.graphic && boxesMap[point.plotX];
4429
5335
  if (box) {
@@ -4687,7 +5593,7 @@
4687
5593
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
4688
5594
  * @product highstock
4689
5595
  */
4690
- fillColor: palette.backgroundColor,
5596
+ fillColor: "#ffffff" /* backgroundColor */,
4691
5597
  /**
4692
5598
  * The color of the line/border of the flag.
4693
5599
  *
@@ -4717,14 +5623,14 @@
4717
5623
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
4718
5624
  * @product highstock
4719
5625
  */
4720
- lineColor: palette.neutralColor100,
5626
+ lineColor: "#000000" /* neutralColor100 */,
4721
5627
  /**
4722
5628
  * The fill or background color of the flag.
4723
5629
  *
4724
5630
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
4725
5631
  * @product highstock
4726
5632
  */
4727
- fillColor: palette.highlightColor20
5633
+ fillColor: "#ccd6eb" /* highlightColor20 */
4728
5634
  }
4729
5635
  },
4730
5636
  /**
@@ -4746,37 +5652,27 @@
4746
5652
  });
4747
5653
  return FlagsSeries;
4748
5654
  }(ColumnSeries));
5655
+ OnSeriesComposition.compose(FlagsSeries);
4749
5656
  extend(FlagsSeries.prototype, {
4750
5657
  allowDG: false,
4751
- /**
4752
- * @private
4753
- * @function Highcharts.seriesTypes.flags#buildKDTree
4754
- */
4755
- buildKDTree: noop,
4756
5658
  forceCrop: true,
4757
- getPlotBox: OnSeriesMixin.getPlotBox,
5659
+ invertible: false,
5660
+ noSharedTooltip: true,
5661
+ pointClass: FlagsPoint,
5662
+ sorted: false,
5663
+ takeOrdinalPosition: false,
5664
+ trackerGroups: ['markerGroup'],
5665
+ buildKDTree: noop,
4758
5666
  /**
4759
5667
  * Inherit the initialization from base Series.
4760
- *
4761
5668
  * @private
4762
- * @borrows Highcharts.Series#init as Highcharts.seriesTypes.flags#init
4763
5669
  */
4764
5670
  init: Series.prototype.init,
4765
5671
  /**
4766
5672
  * Don't invert the flag marker group (#4960).
4767
- *
4768
5673
  * @private
4769
- * @function Highcharts.seriesTypes.flags#invertGroups
4770
5674
  */
4771
- invertGroups: noop,
4772
- // Flags series group should not be invertible (#14063).
4773
- invertible: false,
4774
- noSharedTooltip: true,
4775
- pointClass: FlagsPoint,
4776
- sorted: false,
4777
- takeOrdinalPosition: false,
4778
- trackerGroups: ['markerGroup'],
4779
- translate: OnSeriesMixin.translate
5675
+ invertGroups: noop
4780
5676
  });
4781
5677
  SeriesRegistry.registerSeriesType('flags', FlagsSeries);
4782
5678
  /* *
@@ -4998,8 +5894,15 @@
4998
5894
  if (axis.opposite) {
4999
5895
  scrollbarsOffsets[0] += offset;
5000
5896
  }
5001
- scrollbar.position(axis.left + axis.width + 2 + scrollbarsOffsets[0] -
5002
- (axis.opposite ? 0 : axisMargin), axis.top, axis.width, axis.height);
5897
+ var xPosition = void 0;
5898
+ if (!scrollbar.options.opposite) {
5899
+ xPosition = axis.opposite ? 0 : axisMargin;
5900
+ }
5901
+ else {
5902
+ xPosition = axis.left + axis.width + 2 + scrollbarsOffsets[0] -
5903
+ (axis.opposite ? 0 : axisMargin);
5904
+ }
5905
+ scrollbar.position(xPosition, axis.top, axis.width, axis.height);
5003
5906
  // Next scrollbar should reserve space for margin (if set)
5004
5907
  if (axis.opposite) {
5005
5908
  scrollbarsOffsets[0] += axisMargin;
@@ -5038,7 +5941,8 @@
5038
5941
  // Make space for a scrollbar:
5039
5942
  addEvent(AxisClass, 'afterGetOffset', function () {
5040
5943
  var axis = this,
5041
- index = axis.horiz ? 2 : 1,
5944
+ opposite = axis.scrollbar && !axis.scrollbar.options.opposite,
5945
+ index = axis.horiz ? 2 : opposite ? 3 : 1,
5042
5946
  scrollbar = axis.scrollbar;
5043
5947
  if (scrollbar) {
5044
5948
  axis.chart.scrollbarsOffsets = [0, 0]; // reset scrollbars offsets
@@ -5054,7 +5958,7 @@
5054
5958
 
5055
5959
  return ScrollbarAxis;
5056
5960
  });
5057
- _registerModule(_modules, 'Core/ScrollbarDefaults.js', [_modules['Core/Globals.js'], _modules['Core/Color/Palette.js']], function (H, Palette) {
5961
+ _registerModule(_modules, 'Core/ScrollbarDefaults.js', [_modules['Core/Globals.js']], function (H) {
5058
5962
  /* *
5059
5963
  *
5060
5964
  * (c) 2010-2021 Torstein Honsi
@@ -5153,6 +6057,8 @@
5153
6057
  * @since 1.2.5
5154
6058
  */
5155
6059
  minWidth: 6,
6060
+ /** @ignore-option */
6061
+ opposite: true,
5156
6062
  /**
5157
6063
  * Whether to show or hide the scrollbar when the scrolled content is
5158
6064
  * zoomed out to it full extent.
@@ -5174,7 +6080,7 @@
5174
6080
  *
5175
6081
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5176
6082
  */
5177
- barBackgroundColor: Palette.neutralColor20,
6083
+ barBackgroundColor: "#cccccc" /* neutralColor20 */,
5178
6084
  /**
5179
6085
  * The width of the bar's border.
5180
6086
  *
@@ -5187,7 +6093,7 @@
5187
6093
  *
5188
6094
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5189
6095
  */
5190
- barBorderColor: Palette.neutralColor20,
6096
+ barBorderColor: "#cccccc" /* neutralColor20 */,
5191
6097
  /**
5192
6098
  * The color of the small arrow inside the scrollbar buttons.
5193
6099
  *
@@ -5196,7 +6102,7 @@
5196
6102
  *
5197
6103
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5198
6104
  */
5199
- buttonArrowColor: Palette.neutralColor80,
6105
+ buttonArrowColor: "#333333" /* neutralColor80 */,
5200
6106
  /**
5201
6107
  * The color of scrollbar buttons.
5202
6108
  *
@@ -5205,7 +6111,7 @@
5205
6111
  *
5206
6112
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5207
6113
  */
5208
- buttonBackgroundColor: Palette.neutralColor10,
6114
+ buttonBackgroundColor: "#e6e6e6" /* neutralColor10 */,
5209
6115
  /**
5210
6116
  * The color of the border of the scrollbar buttons.
5211
6117
  *
@@ -5214,7 +6120,7 @@
5214
6120
  *
5215
6121
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5216
6122
  */
5217
- buttonBorderColor: Palette.neutralColor20,
6123
+ buttonBorderColor: "#cccccc" /* neutralColor20 */,
5218
6124
  /**
5219
6125
  * The border width of the scrollbar buttons.
5220
6126
  *
@@ -5227,7 +6133,7 @@
5227
6133
  *
5228
6134
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5229
6135
  */
5230
- rifleColor: Palette.neutralColor80,
6136
+ rifleColor: "#333333" /* neutralColor80 */,
5231
6137
  /**
5232
6138
  * The color of the track background.
5233
6139
  *
@@ -5236,7 +6142,7 @@
5236
6142
  *
5237
6143
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5238
6144
  */
5239
- trackBackgroundColor: Palette.neutralColor5,
6145
+ trackBackgroundColor: "#f2f2f2" /* neutralColor5 */,
5240
6146
  /**
5241
6147
  * The color of the border of the scrollbar track.
5242
6148
  *
@@ -5245,7 +6151,7 @@
5245
6151
  *
5246
6152
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
5247
6153
  */
5248
- trackBorderColor: Palette.neutralColor5,
6154
+ trackBorderColor: "#f2f2f2" /* neutralColor5 */,
5249
6155
  /**
5250
6156
  * The corner radius of the border of the scrollbar track.
5251
6157
  *
@@ -6154,7 +7060,7 @@
6154
7060
 
6155
7061
  return NavigatorAxis;
6156
7062
  });
6157
- _registerModule(_modules, 'Core/Navigator.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Axis/NavigatorAxis.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Color/Palette.js'], _modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Scrollbar.js'], _modules['Core/Series/Series.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (Axis, Chart, Color, H, NavigatorAxis, D, Palette, RendererRegistry, Scrollbar, Series, SeriesRegistry, U) {
7063
+ _registerModule(_modules, 'Core/Navigator.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Axis/NavigatorAxis.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Scrollbar.js'], _modules['Core/Series/Series.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (Axis, Chart, Color, H, NavigatorAxis, D, RendererRegistry, Scrollbar, Series, SeriesRegistry, U) {
6158
7064
  /* *
6159
7065
  *
6160
7066
  * (c) 2010-2021 Torstein Honsi
@@ -6362,13 +7268,13 @@
6362
7268
  *
6363
7269
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
6364
7270
  */
6365
- backgroundColor: Palette.neutralColor5,
7271
+ backgroundColor: "#f2f2f2" /* neutralColor5 */,
6366
7272
  /**
6367
7273
  * The stroke for the handle border and the stripes inside.
6368
7274
  *
6369
7275
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
6370
7276
  */
6371
- borderColor: Palette.neutralColor40
7277
+ borderColor: "#999999" /* neutralColor40 */
6372
7278
  },
6373
7279
  /**
6374
7280
  * The color of the mask covering the areas of the navigator series
@@ -6385,7 +7291,7 @@
6385
7291
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
6386
7292
  * @default rgba(102,133,194,0.3)
6387
7293
  */
6388
- maskFill: color(Palette.highlightColor60).setOpacity(0.3).get(),
7294
+ maskFill: color("#6685c2" /* highlightColor60 */).setOpacity(0.3).get(),
6389
7295
  /**
6390
7296
  * The color of the line marking the currently zoomed area in the
6391
7297
  * navigator.
@@ -6396,7 +7302,7 @@
6396
7302
  * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
6397
7303
  * @default #cccccc
6398
7304
  */
6399
- outlineColor: Palette.neutralColor20,
7305
+ outlineColor: "#cccccc" /* neutralColor20 */,
6400
7306
  /**
6401
7307
  * The width of the line marking the currently zoomed area in the
6402
7308
  * navigator.
@@ -6587,7 +7493,7 @@
6587
7493
  className: 'highcharts-navigator-xaxis',
6588
7494
  tickLength: 0,
6589
7495
  lineWidth: 0,
6590
- gridLineColor: Palette.neutralColor10,
7496
+ gridLineColor: "#e6e6e6" /* neutralColor10 */,
6591
7497
  gridLineWidth: 1,
6592
7498
  tickPixelInterval: 200,
6593
7499
  labels: {
@@ -6597,7 +7503,7 @@
6597
7503
  */
6598
7504
  style: {
6599
7505
  /** @ignore */
6600
- color: Palette.neutralColor40
7506
+ color: "#999999" /* neutralColor40 */
6601
7507
  },
6602
7508
  x: 3,
6603
7509
  y: -4
@@ -8024,7 +8930,7 @@
8024
8930
  // If range declared, stick to the minimum only if the range
8025
8931
  // is smaller than the data set range.
8026
8932
  if (range && max - xDataMin > 0) {
8027
- stickToMin = max - xDataMin < range && (!this.chart.fixedRange);
8933
+ stickToMin = max - xDataMin < range;
8028
8934
  }
8029
8935
  else {
8030
8936
  // If the current axis minimum falls outside the new
@@ -8251,7 +9157,7 @@
8251
9157
 
8252
9158
  return H.Navigator;
8253
9159
  });
8254
- _registerModule(_modules, 'Extensions/RangeSelector.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Color/Palette.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (Axis, Chart, H, D, palette, SVGElement, U) {
9160
+ _registerModule(_modules, 'Extensions/RangeSelector.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (Axis, Chart, H, D, SVGElement, U) {
8255
9161
  /* *
8256
9162
  *
8257
9163
  * (c) 2010-2021 Torstein Honsi
@@ -8741,7 +9647,7 @@
8741
9647
  */
8742
9648
  inputStyle: {
8743
9649
  /** @ignore */
8744
- color: palette.highlightColor80,
9650
+ color: "#335cad" /* highlightColor80 */,
8745
9651
  /** @ignore */
8746
9652
  cursor: 'pointer'
8747
9653
  },
@@ -8758,7 +9664,7 @@
8758
9664
  */
8759
9665
  labelStyle: {
8760
9666
  /** @ignore */
8761
- color: palette.neutralColor60
9667
+ color: "#666666" /* neutralColor60 */
8762
9668
  }
8763
9669
  }
8764
9670
  });
@@ -9461,7 +10367,7 @@
9461
10367
  // Styles
9462
10368
  label.css(merge(chartStyle, options.labelStyle));
9463
10369
  dateBox.css(merge({
9464
- color: palette.neutralColor80
10370
+ color: "#333333" /* neutralColor80 */
9465
10371
  }, chartStyle, options.inputStyle));
9466
10372
  css(input, extend({
9467
10373
  position: 'absolute',
@@ -10644,7 +11550,7 @@
10644
11550
 
10645
11551
  return RangeSelector;
10646
11552
  });
10647
- _registerModule(_modules, 'Core/Chart/StockChart.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/FormatUtilities.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Color/Palette.js'], _modules['Core/Series/Point.js'], _modules['Core/Series/Series.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js']], function (A, Axis, Chart, F, D, Palette, Point, Series, SVGRenderer, U) {
11553
+ _registerModule(_modules, 'Core/Chart/StockChart.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/FormatUtilities.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Series/Series.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js']], function (A, Axis, Chart, F, D, Series, SVGRenderer, U) {
10648
11554
  /* *
10649
11555
  *
10650
11556
  * (c) 2010-2021 Torstein Honsi
@@ -10673,13 +11579,7 @@
10673
11579
  var animObject = A.animObject;
10674
11580
  var format = F.format;
10675
11581
  var getOptions = D.getOptions;
10676
- var pointTooltipFormatter = Point.prototype.tooltipFormatter;
10677
- var _a = Series.prototype,
10678
- seriesInit = _a.init,
10679
- seriesProcessData = _a.processData;
10680
11582
  var addEvent = U.addEvent,
10681
- arrayMax = U.arrayMax,
10682
- arrayMin = U.arrayMin,
10683
11583
  clamp = U.clamp,
10684
11584
  defined = U.defined,
10685
11585
  extend = U.extend,
@@ -11213,12 +12113,12 @@
11213
12113
  .attr({
11214
12114
  fill: options.backgroundColor ||
11215
12115
  point && point.series && point.series.color || // #14888
11216
- Palette.neutralColor60,
12116
+ "#666666" /* neutralColor60 */,
11217
12117
  stroke: options.borderColor || '',
11218
12118
  'stroke-width': options.borderWidth || 0
11219
12119
  })
11220
12120
  .css(extend({
11221
- color: Palette.backgroundColor,
12121
+ color: "#ffffff" /* backgroundColor */,
11222
12122
  fontWeight: 'normal',
11223
12123
  fontSize: '11px',
11224
12124
  textAlign: 'center'
@@ -11311,76 +12211,6 @@
11311
12211
  posy + crossBox.height / 2
11312
12212
  });
11313
12213
  });
11314
- /* ************************************************************************** *
11315
- * Start value compare logic *
11316
- * ************************************************************************** */
11317
- /**
11318
- * Extend series.init by adding a method to modify the y value used for plotting
11319
- * on the y axis. This method is called both from the axis when finding dataMin
11320
- * and dataMax, and from the series.translate method.
11321
- *
11322
- * @ignore
11323
- * @function Highcharts.Series#init
11324
- */
11325
- Series.prototype.init = function () {
11326
- // Call base method
11327
- seriesInit.apply(this, arguments);
11328
- // Set comparison mode
11329
- this.initCompare(this.options.compare);
11330
- };
11331
- /**
11332
- * Highcharts Stock only. Set the
11333
- * [compare](https://api.highcharts.com/highstock/plotOptions.series.compare)
11334
- * mode of the series after render time. In most cases it is more useful running
11335
- * {@link Axis#setCompare} on the X axis to update all its series.
11336
- *
11337
- * @function Highcharts.Series#setCompare
11338
- *
11339
- * @param {string} [compare]
11340
- * Can be one of `null` (default), `"percent"` or `"value"`.
11341
- */
11342
- Series.prototype.setCompare = function (compare) {
11343
- this.initCompare(compare);
11344
- // Survive to export, #5485
11345
- this.userOptions.compare = compare;
11346
- };
11347
- /**
11348
- * @ignore
11349
- * @function Highcharts.Series#initCompare
11350
- *
11351
- * @param {string} [compare]
11352
- * Can be one of `null` (default), `"percent"` or `"value"`.
11353
- */
11354
- Series.prototype.initCompare = function (compare) {
11355
- // Set or unset the modifyValue method
11356
- this.modifyValue = (compare === 'value' || compare === 'percent') ?
11357
- function (value, point) {
11358
- var compareValue = this.compareValue;
11359
- if (typeof value !== 'undefined' &&
11360
- typeof compareValue !== 'undefined') { // #2601, #5814
11361
- // Get the modified value
11362
- if (compare === 'value') {
11363
- value -= compareValue;
11364
- // Compare percent
11365
- }
11366
- else {
11367
- value = 100 * (value / compareValue) -
11368
- (this.options.compareBase === 100 ? 0 : 100);
11369
- }
11370
- // record for tooltip etc.
11371
- if (point) {
11372
- point.change = value;
11373
- }
11374
- return value;
11375
- }
11376
- return 0;
11377
- } :
11378
- null;
11379
- // Mark dirty
11380
- if (this.chart.hasRendered) {
11381
- this.isDirty = true;
11382
- }
11383
- };
11384
12214
  /**
11385
12215
  * Based on the data grouping options decides whether
11386
12216
  * the data should be cropped while processing.
@@ -11397,173 +12227,6 @@
11397
12227
  chart.options.isStock);
11398
12228
  return groupingEnabled;
11399
12229
  };
11400
- /**
11401
- * Extend series.processData by finding the first y value in the plot area,
11402
- * used for comparing the following values
11403
- *
11404
- * @ignore
11405
- * @function Highcharts.Series#processData
11406
- */
11407
- Series.prototype.processData = function (force) {
11408
- var series = this,
11409
- i,
11410
- keyIndex = -1,
11411
- processedXData,
11412
- processedYData,
11413
- compareStart = series.options.compareStart === true ? 0 : 1,
11414
- length,
11415
- compareValue;
11416
- // call base method
11417
- seriesProcessData.apply(this, arguments);
11418
- if (series.xAxis && series.processedYData) { // not pies
11419
- // local variables
11420
- processedXData = series.processedXData;
11421
- processedYData = series.processedYData;
11422
- length = processedYData.length;
11423
- // For series with more than one value (range, OHLC etc), compare
11424
- // against close or the pointValKey (#4922, #3112, #9854)
11425
- if (series.pointArrayMap) {
11426
- keyIndex = series.pointArrayMap.indexOf(series.options.pointValKey || series.pointValKey || 'y');
11427
- }
11428
- // find the first value for comparison
11429
- for (i = 0; i < length - compareStart; i++) {
11430
- compareValue = processedYData[i] && keyIndex > -1 ?
11431
- processedYData[i][keyIndex] :
11432
- processedYData[i];
11433
- if (isNumber(compareValue) &&
11434
- processedXData[i + compareStart] >=
11435
- series.xAxis.min &&
11436
- compareValue !== 0) {
11437
- series.compareValue = compareValue;
11438
- break;
11439
- }
11440
- }
11441
- }
11442
- return;
11443
- };
11444
- // Modify series extremes
11445
- addEvent(Series, 'afterGetExtremes', function (e) {
11446
- var dataExtremes = e.dataExtremes;
11447
- if (this.modifyValue && dataExtremes) {
11448
- var extremes = [
11449
- this.modifyValue(dataExtremes.dataMin),
11450
- this.modifyValue(dataExtremes.dataMax)
11451
- ];
11452
- dataExtremes.dataMin = arrayMin(extremes);
11453
- dataExtremes.dataMax = arrayMax(extremes);
11454
- }
11455
- });
11456
- /**
11457
- * Highcharts Stock only. Set the compare mode on all series
11458
- * belonging to an Y axis after render time.
11459
- *
11460
- * @see [series.plotOptions.compare](https://api.highcharts.com/highstock/series.plotOptions.compare)
11461
- *
11462
- * @sample stock/members/axis-setcompare/
11463
- * Set compoare
11464
- *
11465
- * @function Highcharts.Axis#setCompare
11466
- *
11467
- * @param {string} [compare]
11468
- * The compare mode. Can be one of `null` (default), `"value"` or
11469
- * `"percent"`.
11470
- *
11471
- * @param {boolean} [redraw=true]
11472
- * Whether to redraw the chart or to wait for a later call to
11473
- * {@link Chart#redraw}.
11474
- */
11475
- Axis.prototype.setCompare = function (compare, redraw) {
11476
- if (!this.isXAxis) {
11477
- this.series.forEach(function (series) {
11478
- series.setCompare(compare);
11479
- });
11480
- if (pick(redraw, true)) {
11481
- this.chart.redraw();
11482
- }
11483
- }
11484
- };
11485
- /**
11486
- * Extend the tooltip formatter by adding support for the point.change variable
11487
- * as well as the changeDecimals option.
11488
- *
11489
- * @ignore
11490
- * @function Highcharts.Point#tooltipFormatter
11491
- *
11492
- * @param {string} pointFormat
11493
- */
11494
- Point.prototype.tooltipFormatter = function (pointFormat) {
11495
- var point = this;
11496
- var numberFormatter = point.series.chart.numberFormatter;
11497
- pointFormat = pointFormat.replace('{point.change}', (point.change > 0 ? '+' : '') + numberFormatter(point.change, pick(point.series.tooltipOptions.changeDecimals, 2)));
11498
- return pointTooltipFormatter.apply(this, [pointFormat]);
11499
- };
11500
- /* ************************************************************************** *
11501
- * End value compare logic *
11502
- * ************************************************************************** */
11503
- // Extend the Series prototype to create a separate series clip box. This is
11504
- // related to using multiple panes, and a future pane logic should incorporate
11505
- // this feature (#2754).
11506
- addEvent(Series, 'render', function () {
11507
- var chart = this.chart,
11508
- clipHeight;
11509
- // Only do this on not 3d (#2939, #5904) nor polar (#6057) charts, and only
11510
- // if the series type handles clipping in the animate method (#2975).
11511
- if (!(chart.is3d && chart.is3d()) &&
11512
- !chart.polar &&
11513
- this.xAxis &&
11514
- !this.xAxis.isRadial && // Gauge, #6192
11515
- this.options.clip !== false // #15128
11516
- ) {
11517
- clipHeight = this.yAxis.len;
11518
- // Include xAxis line width (#8031) but only if the Y axis ends on the
11519
- // edge of the X axis (#11005).
11520
- if (this.xAxis.axisLine) {
11521
- var dist = chart.plotTop + chart.plotHeight -
11522
- this.yAxis.pos - this.yAxis.len,
11523
- lineHeightCorrection = Math.floor(this.xAxis.axisLine.strokeWidth() / 2);
11524
- if (dist >= 0) {
11525
- clipHeight -= Math.max(lineHeightCorrection - dist, 0);
11526
- }
11527
- }
11528
- // First render, initial clip box. clipBox also needs to be updated if
11529
- // the series is rendered again before starting animating, in
11530
- // compliance with a responsive rule (#13858).
11531
- if (!chart.hasLoaded || (!this.clipBox && this.isDirty && !this.isDirtyData)) {
11532
- this.clipBox = this.clipBox || merge(chart.clipBox);
11533
- this.clipBox.width = this.xAxis.len;
11534
- this.clipBox.height = clipHeight;
11535
- }
11536
- if (chart.hasRendered) {
11537
- var animation = animObject(this.options.animation);
11538
- // #15435: this.sharedClipKey might not have been set yet, for
11539
- // example when updating the series, so we need to use this
11540
- // function instead
11541
- var sharedClipKey = this.getSharedClipKey(animation);
11542
- var clipRect = chart.sharedClips[sharedClipKey];
11543
- // On redrawing, resizing etc, update the clip rectangle.
11544
- //
11545
- // #15435: Update it even when we are creating/updating clipBox,
11546
- // since there could be series updating and pane size changes
11547
- // happening at the same time and we dont destroy shared clips in
11548
- // stock.
11549
- if (clipRect) {
11550
- // animate in case resize is done during initial animation
11551
- clipRect.animate({
11552
- width: this.xAxis.len,
11553
- height: clipHeight
11554
- });
11555
- var markerClipRect = chart.sharedClips[sharedClipKey + 'm'];
11556
- // also change markers clip animation for consistency
11557
- // (marker clip rects should exist only on chart init)
11558
- if (markerClipRect) {
11559
- markerClipRect.animate({
11560
- width: this.xAxis.len
11561
- });
11562
- }
11563
- }
11564
- }
11565
- }
11566
- });
11567
12230
  addEvent(Chart, 'update', function (e) {
11568
12231
  var options = e.options;
11569
12232
  // Use case: enabling scrollbar from a disabled state.
@@ -11580,68 +12243,10 @@
11580
12243
  * Default Export
11581
12244
  *
11582
12245
  * */
11583
- /* *
11584
- *
11585
- * API Options
11586
- *
11587
- * */
11588
- /**
11589
- * Compare the values of the series against the first non-null, non-
11590
- * zero value in the visible range. The y axis will show percentage
11591
- * or absolute change depending on whether `compare` is set to `"percent"`
11592
- * or `"value"`. When this is applied to multiple series, it allows
11593
- * comparing the development of the series against each other. Adds
11594
- * a `change` field to every point object.
11595
- *
11596
- * @see [compareBase](#plotOptions.series.compareBase)
11597
- * @see [Axis.setCompare()](/class-reference/Highcharts.Axis#setCompare)
11598
- *
11599
- * @sample {highstock} stock/plotoptions/series-compare-percent/
11600
- * Percent
11601
- * @sample {highstock} stock/plotoptions/series-compare-value/
11602
- * Value
11603
- *
11604
- * @type {string}
11605
- * @since 1.0.1
11606
- * @product highstock
11607
- * @apioption plotOptions.series.compare
11608
- */
11609
- /**
11610
- * Defines if comparison should start from the first point within the visible
11611
- * range or should start from the first point **before** the range.
11612
- *
11613
- * In other words, this flag determines if first point within the visible range
11614
- * will have 0% (`compareStart=true`) or should have been already calculated
11615
- * according to the previous point (`compareStart=false`).
11616
- *
11617
- * @sample {highstock} stock/plotoptions/series-comparestart/
11618
- * Calculate compare within visible range
11619
- *
11620
- * @type {boolean}
11621
- * @default false
11622
- * @since 6.0.0
11623
- * @product highstock
11624
- * @apioption plotOptions.series.compareStart
11625
- */
11626
- /**
11627
- * When [compare](#plotOptions.series.compare) is `percent`, this option
11628
- * dictates whether to use 0 or 100 as the base of comparison.
11629
- *
11630
- * @sample {highstock} stock/plotoptions/series-comparebase/
11631
- * Compare base is 100
11632
- *
11633
- * @type {number}
11634
- * @default 0
11635
- * @since 5.0.6
11636
- * @product highstock
11637
- * @validvalue [0, 100]
11638
- * @apioption plotOptions.series.compareBase
11639
- */
11640
- ''; // keeps doclets above in transpiled file
11641
12246
 
11642
12247
  return StockChart;
11643
12248
  });
11644
- _registerModule(_modules, 'masters/modules/stock.src.js', [_modules['Core/Globals.js'], _modules['Core/Axis/OrdinalAxis.js'], _modules['Core/Scrollbar.js'], _modules['Core/Chart/StockChart.js']], function (Highcharts, OrdinalAxis, Scrollbar, StockChart) {
12249
+ _registerModule(_modules, 'masters/modules/stock.src.js', [_modules['Core/Globals.js'], _modules['Core/Axis/OrdinalAxis.js'], _modules['Series/DataModifyComposition.js'], _modules['Core/Scrollbar.js'], _modules['Core/Chart/StockChart.js']], function (Highcharts, OrdinalAxis, DataModifyComposition, Scrollbar, StockChart) {
11645
12250
 
11646
12251
  var G = Highcharts;
11647
12252
  // Classes
@@ -11650,6 +12255,7 @@
11650
12255
  // Compositions
11651
12256
  Scrollbar.compose(G.Axis);
11652
12257
  OrdinalAxis.compose(G.Axis, G.Series, G.Chart);
12258
+ DataModifyComposition.compose(G.Series, G.Axis, G.Point);
11653
12259
 
11654
12260
  });
11655
12261
  }));