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 Highcharts JS v9.2.0 (2021-08-18)
2
+ * @license Highcharts JS v9.3.1 (2021-11-05)
3
3
  *
4
4
  * Annotations module
5
5
  *
@@ -293,8 +293,7 @@
293
293
  * @param {Highcharts.AnnotationControllable} target
294
294
  * @return {Highcharts.PositionObject}
295
295
  */
296
- var extend = U.extend,
297
- merge = U.merge,
296
+ var merge = U.merge,
298
297
  pick = U.pick;
299
298
  /* eslint-disable no-invalid-this, valid-jsdoc */
300
299
  /**
@@ -1188,8 +1187,11 @@
1188
1187
  *
1189
1188
  * @param {number} dx translation for x coordinate
1190
1189
  * @param {number} dy translation for y coordinate
1190
+ * @param {boolean|undefined} translateSecondPoint If the shape has two
1191
+ * points attached to it, this option allows you to translate also
1192
+ * the second point
1191
1193
  */
1192
- translateShape: function (dx, dy) {
1194
+ translateShape: function (dx, dy, translateSecondPoint) {
1193
1195
  var chart = this.annotation.chart,
1194
1196
  // Annotation.options
1195
1197
  shapeOptions = this.annotation.userOptions,
@@ -1197,6 +1199,9 @@
1197
1199
  annotationIndex = chart.annotations.indexOf(this.annotation),
1198
1200
  chartOptions = chart.options.annotations[annotationIndex];
1199
1201
  this.translatePoint(dx, dy, 0);
1202
+ if (translateSecondPoint) {
1203
+ this.translatePoint(dx, dy, 1);
1204
+ }
1200
1205
  // Options stored in:
1201
1206
  // - chart (for exporting)
1202
1207
  // - current config (for redraws)
@@ -1890,6 +1895,215 @@
1890
1895
 
1891
1896
  return ControllableCircle;
1892
1897
  });
1898
+ _registerModule(_modules, 'Extensions/Annotations/Controllables/ControllableEllipse.js', [_modules['Extensions/Annotations/Mixins/ControllableMixin.js'], _modules['Extensions/Annotations/Controllables/ControllablePath.js'], _modules['Core/Utilities.js']], function (ControllableMixin, ControllablePath, U) {
1899
+ /* *
1900
+ *
1901
+ * Author: Pawel Lysy
1902
+ *
1903
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
1904
+ *
1905
+ * */
1906
+ var merge = U.merge,
1907
+ defined = U.defined;
1908
+ /**
1909
+ * A controllable ellipse class.
1910
+ *
1911
+ * @requires modules/annotations
1912
+ *
1913
+ * @private
1914
+ * @class
1915
+ * @name Highcharts.AnnotationControllableEllipse
1916
+ *
1917
+ * @param {Highcharts.Annotation} annotation an annotation instance
1918
+ * @param {Highcharts.AnnotationsShapeOptions} options a shape's options
1919
+ * @param {number} index of the Ellipse
1920
+ */
1921
+ var ControllableEllipse = /** @class */ (function () {
1922
+ /* *
1923
+ *
1924
+ * Constructor
1925
+ *
1926
+ * */
1927
+ function ControllableEllipse(annotation, options, index) {
1928
+ /* *
1929
+ *
1930
+ * Properties
1931
+ *
1932
+ * */
1933
+ this.addControlPoints = ControllableMixin.addControlPoints;
1934
+ this.anchor = ControllableMixin.anchor;
1935
+ this.attr = ControllableMixin.attr;
1936
+ this.attrsFromOptions = ControllableMixin.attrsFromOptions;
1937
+ this.destroy = ControllableMixin.destroy;
1938
+ this.getPointsOptions = ControllableMixin.getPointsOptions;
1939
+ this.linkPoints = ControllableMixin.linkPoints;
1940
+ this.point = ControllableMixin.point;
1941
+ this.scale = ControllableMixin.scale;
1942
+ this.setControlPointsVisibility = ControllableMixin.setControlPointsVisibility;
1943
+ this.shouldBeDrawn = ControllableMixin.shouldBeDrawn;
1944
+ this.transform = ControllableMixin.transform;
1945
+ this.translatePoint = ControllableMixin.translatePoint;
1946
+ this.transformPoint = ControllableMixin.transformPoint;
1947
+ /**
1948
+ * @type 'ellipse'
1949
+ */
1950
+ this.type = 'ellipse';
1951
+ this.init(annotation, options, index);
1952
+ this.collection = 'shapes';
1953
+ }
1954
+ /* *
1955
+ *
1956
+ * Functions
1957
+ *
1958
+ * */
1959
+ ControllableEllipse.prototype.init = function (annotation, options, index) {
1960
+ if (defined(options.yAxis)) {
1961
+ options.points.forEach(function (point) {
1962
+ point.yAxis = options.yAxis;
1963
+ });
1964
+ }
1965
+ if (defined(options.xAxis)) {
1966
+ options.points.forEach(function (point) {
1967
+ point.xAxis = options.xAxis;
1968
+ });
1969
+ }
1970
+ ControllableMixin.init.call(this, annotation, options, index);
1971
+ };
1972
+ /**
1973
+ *
1974
+ * Render the element
1975
+ * @param parent parent SVG element.
1976
+ */
1977
+ ControllableEllipse.prototype.render = function (parent) {
1978
+ this.graphic = this.annotation.chart.renderer.createElement('ellipse')
1979
+ .attr(this.attrsFromOptions(this.options))
1980
+ .add(parent);
1981
+ ControllableMixin.render.call(this);
1982
+ };
1983
+ /**
1984
+ * Translate the points.
1985
+ * Mostly used to handle dragging of the ellipse.
1986
+ */
1987
+ ControllableEllipse.prototype.translate = function (dx, dy) {
1988
+ ControllableMixin.translateShape.call(this, dx, dy, true);
1989
+ };
1990
+ /**
1991
+ * Get the distance from the line to the point.
1992
+ * @param point1 first point which is on the line
1993
+ * @param point2 second point
1994
+ * @param x0 point's x value from which you want to calculate the distance from
1995
+ * @param y0 point's y value from which you want to calculate the distance from
1996
+ */
1997
+ ControllableEllipse.prototype.getDistanceFromLine = function (point1, point2, x0, y0) {
1998
+ return Math.abs((point2.y - point1.y) * x0 - (point2.x - point1.x) * y0 +
1999
+ point2.x * point1.y - point2.y * point1.x) / Math.sqrt((point2.y - point1.y) * (point2.y - point1.y) +
2000
+ (point2.x - point1.x) * (point2.x - point1.x));
2001
+ };
2002
+ /**
2003
+ * The fuction calculates the svg attributes of the ellipse, and returns all
2004
+ * parameters neccessary to draw the ellipse.
2005
+ * @param position absolute position of the first point in points array
2006
+ * @param position2 absolute position of the second point in points array
2007
+ */
2008
+ ControllableEllipse.prototype.getAttrs = function (position, position2) {
2009
+ var x1 = position.x,
2010
+ y1 = position.y,
2011
+ x2 = position2.x,
2012
+ y2 = position2.y,
2013
+ cx = (x1 + x2) / 2,
2014
+ cy = (y1 + y2) / 2,
2015
+ rx = Math.sqrt((x1 - x2) * (x1 - x2) / 4 + (y1 - y2) * (y1 - y2) / 4),
2016
+ tan = (y2 - y1) / (x2 - x1);
2017
+ var angle = Math.atan(tan) * 180 / Math.PI;
2018
+ if (cx < x1) {
2019
+ angle += 180;
2020
+ }
2021
+ var ry = this.getRY();
2022
+ return { cx: cx, cy: cy, rx: rx, ry: ry, angle: angle };
2023
+ };
2024
+ /**
2025
+ * Get the value of minor radius of the ellipse.
2026
+ */
2027
+ ControllableEllipse.prototype.getRY = function () {
2028
+ var yAxis = this.getYAxis();
2029
+ return defined(yAxis) ?
2030
+ Math.abs(yAxis.toPixels(this.options.ry) - yAxis.toPixels(0)) :
2031
+ this.options.ry;
2032
+ };
2033
+ /**
2034
+ * get the yAxis object to which the ellipse is pinned.
2035
+ */
2036
+ ControllableEllipse.prototype.getYAxis = function () {
2037
+ var yAxisIndex = this.options.yAxis;
2038
+ return this.chart.yAxis[yAxisIndex];
2039
+ };
2040
+ /**
2041
+ * Get the absolute coordinates of the MockPoint
2042
+ * @param point MockPoint that is added through options
2043
+ */
2044
+ ControllableEllipse.prototype.getAbsolutePosition = function (point) {
2045
+ return this.anchor(point).absolutePosition;
2046
+ };
2047
+ /**
2048
+ *
2049
+ * Redraw the element
2050
+ * @param animation display an annimation
2051
+ */
2052
+ ControllableEllipse.prototype.redraw = function (animation) {
2053
+ var position = this.getAbsolutePosition(this.points[0]),
2054
+ position2 = this.getAbsolutePosition(this.points[1]),
2055
+ attrs = this.getAttrs(position,
2056
+ position2);
2057
+ if (position) {
2058
+ this.graphic[animation ? 'animate' : 'attr']({
2059
+ cx: attrs.cx,
2060
+ cy: attrs.cy,
2061
+ rx: attrs.rx,
2062
+ ry: attrs.ry,
2063
+ rotation: attrs.angle,
2064
+ rotationOriginX: attrs.cx,
2065
+ rotationOriginY: attrs.cy
2066
+ });
2067
+ }
2068
+ else {
2069
+ this.graphic.attr({
2070
+ x: 0,
2071
+ y: -9e9
2072
+ });
2073
+ }
2074
+ this.graphic.placed = Boolean(position);
2075
+ ControllableMixin.redraw.call(this, animation);
2076
+ };
2077
+ /**
2078
+ * Set the radius Y.
2079
+ *
2080
+ * @param {number} ry a radius in y direction to be set
2081
+ */
2082
+ ControllableEllipse.prototype.setYRadius = function (ry) {
2083
+ this.options.ry = ry;
2084
+ this.annotation.userOptions.shapes[0].ry = ry;
2085
+ this.annotation.options.shapes[0].ry = ry;
2086
+ };
2087
+ /* *
2088
+ *
2089
+ * Static Properties
2090
+ *
2091
+ * */
2092
+ /**
2093
+ * A map object which allows to map options attributes to element
2094
+ * attributes.
2095
+ *
2096
+ * @name Highcharts.AnnotationControllableEllipse.attrsMap
2097
+ * @type {Highcharts.Dictionary<string>}
2098
+ */
2099
+ ControllableEllipse.attrsMap = merge(ControllablePath.attrsMap, {
2100
+ ry: 'ry'
2101
+ });
2102
+ return ControllableEllipse;
2103
+ }());
2104
+
2105
+ return ControllableEllipse;
2106
+ });
1893
2107
  _registerModule(_modules, 'Extensions/Annotations/Controllables/ControllableLabel.js', [_modules['Extensions/Annotations/Mixins/ControllableMixin.js'], _modules['Core/FormatUtilities.js'], _modules['Extensions/Annotations/MockPoint.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Tooltip.js'], _modules['Core/Utilities.js']], function (ControllableMixin, F, MockPoint, SVGRenderer, Tooltip, U) {
1894
2108
  /* *
1895
2109
  *
@@ -2424,7 +2638,7 @@
2424
2638
 
2425
2639
  return ControllableImage;
2426
2640
  });
2427
- _registerModule(_modules, 'Extensions/Annotations/Annotations.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Chart/Chart.js'], _modules['Extensions/Annotations/Mixins/ControllableMixin.js'], _modules['Extensions/Annotations/Controllables/ControllableRect.js'], _modules['Extensions/Annotations/Controllables/ControllableCircle.js'], _modules['Extensions/Annotations/Controllables/ControllablePath.js'], _modules['Extensions/Annotations/Controllables/ControllableImage.js'], _modules['Extensions/Annotations/Controllables/ControllableLabel.js'], _modules['Extensions/Annotations/ControlPoint.js'], _modules['Extensions/Annotations/Mixins/EventEmitterMixin.js'], _modules['Core/Globals.js'], _modules['Extensions/Annotations/MockPoint.js'], _modules['Core/Pointer.js'], _modules['Core/Utilities.js'], _modules['Core/Color/Palette.js']], function (A, Chart, ControllableMixin, ControllableRect, ControllableCircle, ControllablePath, ControllableImage, ControllableLabel, ControlPoint, EventEmitterMixin, H, MockPoint, Pointer, U, palette) {
2641
+ _registerModule(_modules, 'Extensions/Annotations/Annotations.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Chart/Chart.js'], _modules['Extensions/Annotations/Mixins/ControllableMixin.js'], _modules['Extensions/Annotations/Controllables/ControllableRect.js'], _modules['Extensions/Annotations/Controllables/ControllableCircle.js'], _modules['Extensions/Annotations/Controllables/ControllableEllipse.js'], _modules['Extensions/Annotations/Controllables/ControllablePath.js'], _modules['Extensions/Annotations/Controllables/ControllableImage.js'], _modules['Extensions/Annotations/Controllables/ControllableLabel.js'], _modules['Extensions/Annotations/ControlPoint.js'], _modules['Extensions/Annotations/Mixins/EventEmitterMixin.js'], _modules['Core/Globals.js'], _modules['Extensions/Annotations/MockPoint.js'], _modules['Core/Pointer.js'], _modules['Core/Utilities.js']], function (A, Chart, ControllableMixin, ControllableRect, ControllableCircle, ControllableEllipse, ControllablePath, ControllableImage, ControllableLabel, ControlPoint, EventEmitterMixin, H, MockPoint, Pointer, U) {
2428
2642
  /* *
2429
2643
  *
2430
2644
  * (c) 2009-2021 Highsoft, Black Label
@@ -2646,7 +2860,10 @@
2646
2860
  };
2647
2861
  Annotation.prototype.addClipPaths = function () {
2648
2862
  this.setClipAxes();
2649
- if (this.clipXAxis && this.clipYAxis) {
2863
+ if (this.clipXAxis &&
2864
+ this.clipYAxis &&
2865
+ this.options.crop // #15399
2866
+ ) {
2650
2867
  this.clipRect = this.chart.renderer.clipRect(this.getClipBox());
2651
2868
  }
2652
2869
  };
@@ -2748,8 +2965,10 @@
2748
2965
  .add();
2749
2966
  this.shapesGroup = renderer
2750
2967
  .g('annotation-shapes')
2751
- .add(this.graphic)
2752
- .clip(this.chart.plotBoxClip);
2968
+ .add(this.graphic);
2969
+ if (this.options.crop) { // #15399
2970
+ this.shapesGroup.clip(this.chart.plotBoxClip);
2971
+ }
2753
2972
  this.labelsGroup = renderer
2754
2973
  .g('annotation-labels')
2755
2974
  .attr({
@@ -2866,6 +3085,9 @@
2866
3085
  * Initialisation of a single shape
2867
3086
  * @private
2868
3087
  * @param {Object} shapeOptions - a confg object for a single shape
3088
+ * @param {number} index - annotation may have many shapes,
3089
+ * this is the shape's index saved in shapes.index.
3090
+
2869
3091
  */
2870
3092
  Annotation.prototype.initShape = function (shapeOptions, index) {
2871
3093
  var options = merge(this.options.shapeOptions, {
@@ -2971,6 +3193,7 @@
2971
3193
  Annotation.shapesMap = {
2972
3194
  'rect': ControllableRect,
2973
3195
  'circle': ControllableCircle,
3196
+ 'ellipse': ControllableEllipse,
2974
3197
  'path': ControllablePath,
2975
3198
  'image': ControllableImage
2976
3199
  };
@@ -3047,9 +3270,18 @@
3047
3270
  * Animation defer settings
3048
3271
  * @type {boolean|Partial<Highcharts.AnimationOptionsObject>}
3049
3272
  * @since 8.2.0
3050
- * @apioption annotations.animation
3051
3273
  */
3052
3274
  animation: {},
3275
+ /**
3276
+ * Whether to hide the part of the annotation
3277
+ * that is outside the plot area.
3278
+ *
3279
+ * @sample highcharts/annotations/label-crop-overflow/
3280
+ * Crop line annotation
3281
+ * @type {boolean}
3282
+ * @since 9.3.0
3283
+ */
3284
+ crop: true,
3053
3285
  /**
3054
3286
  * The animation delay time in milliseconds.
3055
3287
  * Set to `0` renders annotation immediately.
@@ -3114,7 +3346,7 @@
3114
3346
  *
3115
3347
  * @type {Highcharts.ColorString}
3116
3348
  */
3117
- borderColor: palette.neutralColor100,
3349
+ borderColor: "#000000" /* neutralColor100 */,
3118
3350
  /**
3119
3351
  * The border radius in pixels for the annotaiton's label.
3120
3352
  *
@@ -3409,6 +3641,32 @@
3409
3641
  * @requires modules/annotations
3410
3642
  */
3411
3643
  shapeOptions: {
3644
+ /**
3645
+ *
3646
+ * The radius of the shape in y direction.
3647
+ * Used for the ellipse.
3648
+ *
3649
+ * @sample highcharts/annotations/ellipse/
3650
+ * Ellipse annotation
3651
+ *
3652
+ * @type {number}
3653
+ * @apioption annotations.shapeOptions.ry
3654
+ **/
3655
+ /**
3656
+ *
3657
+ * The xAxis index to which the points should be attached.
3658
+ * Used for the ellipse.
3659
+ *
3660
+ * @type {number}
3661
+ * @apioption annotations.shapeOptions.xAxis
3662
+ **/
3663
+ /**
3664
+ * The yAxis index to which the points should be attached.
3665
+ * Used for the ellipse.
3666
+ *
3667
+ * @type {number}
3668
+ * @apioption annotations.shapeOptions.yAxis
3669
+ **/
3412
3670
  /**
3413
3671
  * The width of the shape.
3414
3672
  *
@@ -3428,11 +3686,15 @@
3428
3686
  * @apioption annotations.shapeOptions.height
3429
3687
  */
3430
3688
  /**
3431
- * The type of the shape, e.g. circle or rectangle.
3689
+ * The type of the shape.
3690
+ * Avaliable options are circle, rect and ellipse.
3432
3691
  *
3433
3692
  * @sample highcharts/annotations/shape/
3434
3693
  * Basic shape annotation
3435
3694
  *
3695
+ * @sample highcharts/annotations/ellipse/
3696
+ * Ellipse annotation
3697
+ *
3436
3698
  * @type {string}
3437
3699
  * @default rect
3438
3700
  * @apioption annotations.shapeOptions.type
@@ -3514,9 +3776,10 @@
3514
3776
  width: 10,
3515
3777
  height: 10,
3516
3778
  style: {
3517
- stroke: palette.neutralColor100,
3518
- 'stroke-width': 2,
3519
- fill: palette.backgroundColor
3779
+ cursor: 'pointer',
3780
+ fill: "#ffffff" /* backgroundColor */,
3781
+ stroke: "#000000" /* neutralColor100 */,
3782
+ 'stroke-width': 2
3520
3783
  },
3521
3784
  visible: false,
3522
3785
  events: {}
@@ -3579,7 +3842,8 @@
3579
3842
  * @param {Highcharts.AnnotationsOptions} options
3580
3843
  * The annotation options for the new, detailed annotation.
3581
3844
  * @param {boolean} [redraw]
3582
- *
3845
+ * @sample highcharts/annotations/add-annotation/
3846
+ * Add annotation
3583
3847
  * @return {Highcharts.Annotation} - The newly generated annotation.
3584
3848
  */
3585
3849
  addAnnotation: function (userOptions, redraw) {
@@ -3846,7 +4110,7 @@
3846
4110
 
3847
4111
  return Annotation;
3848
4112
  });
3849
- _registerModule(_modules, 'Mixins/Navigation.js', [], function () {
4113
+ _registerModule(_modules, 'Core/Chart/ChartNavigationComposition.js', [], function () {
3850
4114
  /**
3851
4115
  *
3852
4116
  * (c) 2010-2021 Paweł Fus
@@ -3856,56 +4120,91 @@
3856
4120
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
3857
4121
  *
3858
4122
  * */
3859
- var chartNavigation = {
3860
- /**
3861
- * Initializes `chart.navigation` object which delegates `update()` methods
3862
- * to all other common classes (used in exporting and navigationBindings).
3863
- *
3864
- * @private
3865
- * @param {Highcharts.Chart} chart
3866
- * The chart instance.
3867
- * @return {void}
3868
- */
3869
- initUpdate: function (chart) {
3870
- if (!chart.navigation) {
3871
- chart.navigation = {
3872
- updates: [],
3873
- update: function (options,
3874
- redraw) {
3875
- this.updates.forEach(function (updateConfig) {
3876
- updateConfig.update.call(updateConfig.context,
3877
- options,
3878
- redraw);
3879
- });
3880
- }
3881
- };
3882
- }
3883
- },
3884
- /**
3885
- * Registers an `update()` method in the `chart.navigation` object.
4123
+ /* *
4124
+ *
4125
+ * Composition
4126
+ *
4127
+ * */
4128
+ var ChartNavigationComposition;
4129
+ (function (ChartNavigationComposition) {
4130
+ /* *
4131
+ *
4132
+ * Declarations
4133
+ *
4134
+ * */
4135
+ /* *
3886
4136
  *
4137
+ * Functions
4138
+ *
4139
+ * */
4140
+ /* eslint-disable valid-jsdoc */
4141
+ /**
3887
4142
  * @private
3888
- * @param {Highcharts.ChartNavigationUpdateFunction} update
3889
- * The `update()` method that will be called in `chart.update()`.
3890
- * @param {Highcharts.Chart} chart
3891
- * The chart instance. `update()` will use that as a context
3892
- * (`this`).
3893
- * @return {void}
3894
4143
  */
3895
- addUpdate: function (update, chart) {
4144
+ function compose(chart) {
3896
4145
  if (!chart.navigation) {
3897
- this.initUpdate(chart);
4146
+ chart.navigation = new Additions(chart);
3898
4147
  }
3899
- chart.navigation.updates.push({
3900
- update: update,
3901
- context: chart
3902
- });
4148
+ return chart;
3903
4149
  }
3904
- };
4150
+ ChartNavigationComposition.compose = compose;
4151
+ /* *
4152
+ *
4153
+ * Class
4154
+ *
4155
+ * */
4156
+ /**
4157
+ * Initializes `chart.navigation` object which delegates `update()` methods
4158
+ * to all other common classes (used in exporting and navigationBindings).
4159
+ * @private
4160
+ */
4161
+ var Additions = /** @class */ (function () {
4162
+ /* *
4163
+ *
4164
+ * Constructor
4165
+ *
4166
+ * */
4167
+ function Additions(chart) {
4168
+ this.updates = [];
4169
+ this.chart = chart;
4170
+ }
4171
+ /* *
4172
+ *
4173
+ * Functions
4174
+ *
4175
+ * */
4176
+ /**
4177
+ * Registers an `update()` method in the `chart.navigation` object.
4178
+ *
4179
+ * @private
4180
+ * @param {UpdateFunction} updateFn
4181
+ * The `update()` method that will be called in `chart.update()`.
4182
+ */
4183
+ Additions.prototype.addUpdate = function (updateFn) {
4184
+ this.chart.navigation.updates.push(updateFn);
4185
+ };
4186
+ /**
4187
+ * @private
4188
+ */
4189
+ Additions.prototype.update = function (options, redraw) {
4190
+ var _this = this;
4191
+ this.updates.forEach(function (updateFn) {
4192
+ updateFn.call(_this.chart, options, redraw);
4193
+ });
4194
+ };
4195
+ return Additions;
4196
+ }());
4197
+ ChartNavigationComposition.Additions = Additions;
4198
+ })(ChartNavigationComposition || (ChartNavigationComposition = {}));
4199
+ /* *
4200
+ *
4201
+ * Default Export
4202
+ *
4203
+ * */
3905
4204
 
3906
- return chartNavigation;
4205
+ return ChartNavigationComposition;
3907
4206
  });
3908
- _registerModule(_modules, 'Extensions/Annotations/NavigationBindings.js', [_modules['Extensions/Annotations/Annotations.js'], _modules['Core/Chart/Chart.js'], _modules['Mixins/Navigation.js'], _modules['Core/FormatUtilities.js'], _modules['Core/Globals.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Utilities.js']], function (Annotation, Chart, chartNavigationMixin, F, H, D, U) {
4207
+ _registerModule(_modules, 'Extensions/Annotations/NavigationBindings.js', [_modules['Extensions/Annotations/Annotations.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Chart/ChartNavigationComposition.js'], _modules['Core/FormatUtilities.js'], _modules['Core/Globals.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Utilities.js']], function (Annotation, Chart, ChartNavigationComposition, F, H, D, U) {
3909
4208
  /* *
3910
4209
  *
3911
4210
  * (c) 2009-2021 Highsoft, Black Label
@@ -4053,8 +4352,9 @@
4053
4352
  */
4054
4353
  getAssignedAxis: function (coords) {
4055
4354
  return coords.filter(function (coord) {
4056
- var axisMin = coord.axis.min,
4057
- axisMax = coord.axis.max,
4355
+ var extremes = coord.axis.getExtremes(),
4356
+ axisMin = extremes.min,
4357
+ axisMax = extremes.max,
4058
4358
  // Correct axis edges when axis has series
4059
4359
  // with pointRange (like column)
4060
4360
  minPointOffset = pick(coord.axis.minPointOffset, 0);
@@ -4155,9 +4455,11 @@
4155
4455
  */
4156
4456
  NavigationBindings.prototype.initUpdate = function () {
4157
4457
  var navigation = this;
4158
- chartNavigationMixin.addUpdate(function (options) {
4458
+ ChartNavigationComposition
4459
+ .compose(this.chart).navigation
4460
+ .addUpdate(function (options) {
4159
4461
  navigation.update(options);
4160
- }, this.chart);
4462
+ });
4161
4463
  };
4162
4464
  /**
4163
4465
  * Hook for click on a button, method selcts/unselects buttons,
@@ -4177,8 +4479,13 @@
4177
4479
  */
4178
4480
  NavigationBindings.prototype.bindingsButtonClick = function (button, events, clickEvent) {
4179
4481
  var navigation = this,
4180
- chart = navigation.chart;
4482
+ chart = navigation.chart,
4483
+ svgContainer = chart.renderer.boxWrapper;
4484
+ var shouldEventBeFired = true;
4181
4485
  if (navigation.selectedButtonElement) {
4486
+ if (navigation.selectedButtonElement.classList === button.classList) {
4487
+ shouldEventBeFired = false;
4488
+ }
4182
4489
  fireEvent(navigation, 'deselectButton', { button: navigation.selectedButtonElement });
4183
4490
  if (navigation.nextEvent) {
4184
4491
  // Remove in-progress annotations adders:
@@ -4189,15 +4496,24 @@
4189
4496
  navigation.mouseMoveEvent = navigation.nextEvent = false;
4190
4497
  }
4191
4498
  }
4192
- navigation.selectedButton = events;
4193
- navigation.selectedButtonElement = button;
4194
- fireEvent(navigation, 'selectButton', { button: button });
4195
- // Call "init" event, for example to open modal window
4196
- if (events.init) {
4197
- events.init.call(navigation, button, clickEvent);
4499
+ if (shouldEventBeFired) {
4500
+ navigation.selectedButton = events;
4501
+ navigation.selectedButtonElement = button;
4502
+ fireEvent(navigation, 'selectButton', { button: button });
4503
+ // Call "init" event, for example to open modal window
4504
+ if (events.init) {
4505
+ events.init.call(navigation, button, clickEvent);
4506
+ }
4507
+ if (events.start || events.steps) {
4508
+ chart.renderer.boxWrapper.addClass(PREFIX + 'draw-mode');
4509
+ }
4198
4510
  }
4199
- if (events.start || events.steps) {
4200
- chart.renderer.boxWrapper.addClass(PREFIX + 'draw-mode');
4511
+ else {
4512
+ chart.stockTools && chart.stockTools.toggleButtonAciveClass(button);
4513
+ svgContainer.removeClass(PREFIX + 'draw-mode');
4514
+ navigation.nextEvent = false;
4515
+ navigation.mouseMoveEvent = false;
4516
+ navigation.selectedButton = null;
4201
4517
  }
4202
4518
  };
4203
4519
  /**
@@ -4602,6 +4918,7 @@
4602
4918
  },
4603
4919
  // Simple shapes:
4604
4920
  circle: ['shapes'],
4921
+ ellipse: ['shapes'],
4605
4922
  verticalLine: [],
4606
4923
  label: ['labelOptions'],
4607
4924
  // Measure
@@ -4618,7 +4935,9 @@
4618
4935
  // Define non editable fields per annotation, for example Rectangle inherits
4619
4936
  // options from Measure, but crosshairs are not available
4620
4937
  NavigationBindings.annotationsNonEditable = {
4621
- rectangle: ['crosshairX', 'crosshairY', 'label']
4938
+ rectangle: ['crosshairX', 'crosshairY', 'labelOptions'],
4939
+ ellipse: ['labelOptions'],
4940
+ circle: ['labelOptions']
4622
4941
  };
4623
4942
  return NavigationBindings;
4624
4943
  }());
@@ -4735,7 +5054,6 @@
4735
5054
  * Configure the Popup strings in the chart. Requires the
4736
5055
  * `annotations.js` or `annotations-advanced.src.js` module to be
4737
5056
  * loaded.
4738
- *
4739
5057
  * @since 7.0.0
4740
5058
  * @product highcharts highstock
4741
5059
  */
@@ -4749,6 +5067,7 @@
4749
5067
  simpleShapes: 'Simple shapes',
4750
5068
  lines: 'Lines',
4751
5069
  circle: 'Circle',
5070
+ ellipse: 'Ellipse',
4752
5071
  rectangle: 'Rectangle',
4753
5072
  label: 'Label',
4754
5073
  shapeOptions: 'Shape options',
@@ -4809,9 +5128,16 @@
4809
5128
  * - `end`: last event to be called after last step event
4810
5129
  *
4811
5130
  * @type {Highcharts.Dictionary<Highcharts.NavigationBindingsOptionsObject>|*}
4812
- * @sample stock/stocktools/stocktools-thresholds
4813
- * Custom bindings in Highcharts Stock
5131
+ *
5132
+ * @sample {highstock} stock/stocktools/stocktools-thresholds
5133
+ * Custom bindings
5134
+ * @sample {highcharts} highcharts/annotations/bindings/
5135
+ * Simple binding
5136
+ * @sample {highcharts} highcharts/annotations/bindings-custom-annotation/
5137
+ * Custom annotation binding
5138
+ *
4814
5139
  * @since 7.0.0
5140
+ * @requires modules/annotations
4815
5141
  * @product highcharts highstock
4816
5142
  */
4817
5143
  bindings: {
@@ -4848,27 +5174,21 @@
4848
5174
  },
4849
5175
  r: 5
4850
5176
  }]
4851
- }, navigation
4852
- .annotationsOptions, navigation
4853
- .bindings
4854
- .circleAnnotation
4855
- .annotationsOptions));
5177
+ }, navigation.annotationsOptions, navigation.bindings.circleAnnotation.annotationsOptions));
4856
5178
  },
4857
5179
  /** @ignore-option */
4858
5180
  steps: [
4859
5181
  function (e, annotation) {
4860
5182
  var mockPointOpts = annotation.options.shapes[0]
4861
5183
  .point,
4862
- inverted = this.chart.inverted,
4863
- x,
4864
- y,
4865
5184
  distance;
4866
5185
  if (isNumber(mockPointOpts.xAxis) &&
4867
5186
  isNumber(mockPointOpts.yAxis)) {
4868
- x = this.chart.xAxis[mockPointOpts.xAxis]
4869
- .toPixels(mockPointOpts.x);
4870
- y = this.chart.yAxis[mockPointOpts.yAxis]
4871
- .toPixels(mockPointOpts.y);
5187
+ var inverted = this.chart.inverted,
5188
+ x = this.chart.xAxis[mockPointOpts.xAxis]
5189
+ .toPixels(mockPointOpts.x),
5190
+ y = this.chart.yAxis[mockPointOpts.yAxis]
5191
+ .toPixels(mockPointOpts.y);
4872
5192
  distance = Math.max(Math.sqrt(Math.pow(inverted ? y - e.chartX : x - e.chartX, 2) +
4873
5193
  Math.pow(inverted ? x - e.chartY : y - e.chartY, 2)), 5);
4874
5194
  }
@@ -4880,6 +5200,58 @@
4880
5200
  }
4881
5201
  ]
4882
5202
  },
5203
+ ellipseAnnotation: {
5204
+ className: 'highcharts-ellipse-annotation',
5205
+ start: function (e) {
5206
+ var coords = this.chart.pointer.getCoordinates(e),
5207
+ coordsX = this.utils.getAssignedAxis(coords.xAxis),
5208
+ coordsY = this.utils.getAssignedAxis(coords.yAxis),
5209
+ navigation = this.chart.options.navigation;
5210
+ if (!coordsX || !coordsY) {
5211
+ return;
5212
+ }
5213
+ return this.chart.addAnnotation(merge({
5214
+ langKey: 'ellipse',
5215
+ type: 'basicAnnotation',
5216
+ shapes: [
5217
+ {
5218
+ type: 'ellipse',
5219
+ xAxis: coordsX.axis.options.index,
5220
+ yAxis: coordsY.axis.options.index,
5221
+ points: [{
5222
+ x: coordsX.value,
5223
+ y: coordsY.value
5224
+ }, {
5225
+ x: coordsX.value,
5226
+ y: coordsY.value
5227
+ }],
5228
+ ry: 1
5229
+ }
5230
+ ]
5231
+ }, navigation.annotationsOptions, navigation.bindings.ellipseAnnotation.annotationOptions));
5232
+ },
5233
+ steps: [
5234
+ function (e, annotation) {
5235
+ var target = annotation.shapes[0],
5236
+ position = target.getAbsolutePosition(target.points[1]);
5237
+ target.translatePoint(e.chartX - position.x, e.chartY - position.y, 1);
5238
+ target.redraw(false);
5239
+ },
5240
+ function (e, annotation) {
5241
+ var target = annotation.shapes[0],
5242
+ position = target.getAbsolutePosition(target.points[0]),
5243
+ position2 = target.getAbsolutePosition(target.points[1]),
5244
+ newR = target.getDistanceFromLine(position,
5245
+ position2,
5246
+ e.chartX,
5247
+ e.chartY),
5248
+ yAxis = target.getYAxis(),
5249
+ newRY = Math.abs(yAxis.toValue(0) - yAxis.toValue(newR));
5250
+ target.setYRadius(newRY);
5251
+ target.redraw(false);
5252
+ }
5253
+ ]
5254
+ },
4883
5255
  /**
4884
5256
  * A rectangle annotation bindings. Includes `start` and one event
4885
5257
  * in `steps` array.
@@ -4913,7 +5285,8 @@
4913
5285
  { xAxis: xAxis, yAxis: yAxis, x: x, y: y },
4914
5286
  { xAxis: xAxis, yAxis: yAxis, x: x, y: y },
4915
5287
  { xAxis: xAxis, yAxis: yAxis, x: x, y: y },
4916
- { xAxis: xAxis, yAxis: yAxis, x: x, y: y }
5288
+ { xAxis: xAxis, yAxis: yAxis, x: x, y: y },
5289
+ { command: 'Z' }
4917
5290
  ]
4918
5291
  }]
4919
5292
  }, navigation
@@ -4998,7 +5371,7 @@
4998
5371
  * from a different server.
4999
5372
  *
5000
5373
  * @type {string}
5001
- * @default https://code.highcharts.com/9.2.0/gfx/stock-icons/
5374
+ * @default https://code.highcharts.com/9.3.1/gfx/stock-icons/
5002
5375
  * @since 7.1.3
5003
5376
  * @apioption navigation.iconsURL
5004
5377
  */
@@ -5054,6 +5427,7 @@
5054
5427
  * @extends annotations
5055
5428
  * @exclude crookedLine, elliottWave, fibonacci, infinityLine,
5056
5429
  * measure, pitchfork, tunnel, verticalLine, basicAnnotation
5430
+ * @requires modules/annotations
5057
5431
  * @apioption navigation.annotationsOptions
5058
5432
  */
5059
5433
  annotationsOptions: {
@@ -5138,20 +5512,34 @@
5138
5512
  fireEvent = U.fireEvent,
5139
5513
  isArray = U.isArray,
5140
5514
  isObject = U.isObject,
5141
- isString = U.isString,
5142
5515
  objectEach = U.objectEach,
5143
5516
  pick = U.pick,
5144
5517
  stableSort = U.stableSort,
5145
5518
  wrap = U.wrap;
5146
- var indexFilter = /\d/g, PREFIX = 'highcharts-', DIV = 'div', INPUT = 'input', LABEL = 'label', BUTTON = 'button', SELECT = 'select', OPTION = 'option', SPAN = 'span', UL = 'ul', LI = 'li', H3 = 'h3';
5519
+ var indexFilter = /\d/g, PREFIX = 'highcharts-', A = 'a', DIV = 'div', INPUT = 'input', LABEL = 'label', BUTTON = 'button', SELECT = 'select', OPTION = 'option', SPAN = 'span', UL = 'ul', LI = 'li', H3 = 'h3';
5520
+ /**
5521
+ * Enum for properties which should have dropdown list.
5522
+ * @private
5523
+ */
5524
+ var DropdownProperties;
5525
+ (function (DropdownProperties) {
5526
+ DropdownProperties[DropdownProperties["params.algorithm"] = 0] = "params.algorithm";
5527
+ DropdownProperties[DropdownProperties["params.average"] = 1] = "params.average";
5528
+ })(DropdownProperties || (DropdownProperties = {}));
5529
+ /**
5530
+ * List of available algorithms for the specific indicator.
5531
+ * @private
5532
+ */
5533
+ var dropdownParameters = {
5534
+ 'algorithm-pivotpoints': ['standard', 'fibonacci', 'camarilla'],
5535
+ 'average-disparityindex': ['sma', 'ema', 'dema', 'tema', 'wma']
5536
+ };
5147
5537
  /* eslint-disable no-invalid-this, valid-jsdoc */
5148
5538
  // onContainerMouseDown blocks internal popup events, due to e.preventDefault.
5149
5539
  // Related issue #4606
5150
5540
  wrap(Pointer.prototype, 'onContainerMouseDown', function (proceed, e) {
5151
- var popupClass = e.target && e.target.className;
5152
5541
  // elements is not in popup
5153
- if (!(isString(popupClass) &&
5154
- popupClass.indexOf(PREFIX + 'popup-field') >= 0)) {
5542
+ if (!this.inClass(e.target, PREFIX + 'popup')) {
5155
5543
  proceed.apply(this, Array.prototype.slice.call(arguments, 1));
5156
5544
  }
5157
5545
  });
@@ -5172,7 +5560,22 @@
5172
5560
  // create popup div
5173
5561
  this.container = createElement(DIV, {
5174
5562
  className: PREFIX + 'popup highcharts-no-tooltip'
5175
- }, null, parentDiv);
5563
+ }, void 0, parentDiv);
5564
+ addEvent(this.container, 'mousedown', function () {
5565
+ var activeAnnotation = chart &&
5566
+ chart.navigationBindings &&
5567
+ chart.navigationBindings.activeAnnotation;
5568
+ if (activeAnnotation) {
5569
+ activeAnnotation.cancelClick = true;
5570
+ var unbind_1 = addEvent(H.doc, 'click',
5571
+ function () {
5572
+ setTimeout(function () {
5573
+ activeAnnotation.cancelClick = false;
5574
+ }, 0);
5575
+ unbind_1();
5576
+ });
5577
+ }
5578
+ });
5176
5579
  this.lang = this.getLangpack();
5177
5580
  this.iconsURL = iconsURL;
5178
5581
  // add close button
@@ -5189,7 +5592,7 @@
5189
5592
  // create close popup btn
5190
5593
  closeBtn = createElement(DIV, {
5191
5594
  className: PREFIX + 'popup-close'
5192
- }, null, this.container);
5595
+ }, void 0, this.container);
5193
5596
  closeBtn.style['background-image'] = 'url(' +
5194
5597
  (iconsURL.match(/png|svg|jpeg|jpg|gif/ig) ?
5195
5598
  iconsURL : iconsURL + 'close.svg') + ')';
@@ -5218,15 +5621,15 @@
5218
5621
  // left column
5219
5622
  lhsCol = createElement(DIV, {
5220
5623
  className: PREFIX + 'popup-lhs-col'
5221
- }, null, container);
5624
+ }, void 0, container);
5222
5625
  // right column
5223
5626
  rhsCol = createElement(DIV, {
5224
5627
  className: PREFIX + 'popup-rhs-col'
5225
- }, null, container);
5628
+ }, void 0, container);
5226
5629
  // wrapper content
5227
5630
  createElement(DIV, {
5228
5631
  className: PREFIX + 'popup-rhs-col-wrapper'
5229
- }, null, rhsCol);
5632
+ }, void 0, rhsCol);
5230
5633
  return {
5231
5634
  lhsCol: lhsCol,
5232
5635
  rhsCol: rhsCol
@@ -5234,34 +5637,43 @@
5234
5637
  },
5235
5638
  /**
5236
5639
  * Create input with label.
5640
+ *
5237
5641
  * @private
5642
+ *
5238
5643
  * @param {string} option
5239
- * Chain of fields i.e params.styles.fontSize
5240
- * @param {string} type
5241
- * Indicator type
5242
- * @param {Highhcharts.HTMLDOMElement}
5243
- * Container where elements should be added
5244
- * @param {string} value
5245
- * Default value of input i.e period value is 14, extracted from
5246
- * defaultOptions (ADD mode) or series options (EDIT mode)
5644
+ * Chain of fields i.e params.styles.fontSize separeted by the dot.
5645
+ *
5646
+ * @param {string} indicatorType
5647
+ * Type of the indicator i.e. sma, ema...
5648
+ *
5649
+ * @param {HTMLDOMElement} parentDiv
5650
+ * HTML parent element.
5651
+ *
5652
+ * @param {Highcharts.InputAttributes} inputAttributes
5653
+ * Attributes of the input.
5654
+ *
5655
+ * @return {HTMLInputElement}
5656
+ * Return created input element.
5247
5657
  */
5248
- addInput: function (option, type, parentDiv, value) {
5249
- var optionParamList = option.split('.'), optionName = optionParamList[optionParamList.length - 1], lang = this.lang, inputName = PREFIX + type + '-' + optionName;
5658
+ addInput: function (option, indicatorType, parentDiv, inputAttributes) {
5659
+ var optionParamList = option.split('.'), optionName = optionParamList[optionParamList.length - 1], lang = this.lang, inputName = PREFIX + indicatorType + '-' + pick(inputAttributes.htmlFor, optionName);
5660
+ var input;
5250
5661
  if (!inputName.match(indexFilter)) {
5251
5662
  // add label
5252
5663
  createElement(LABEL, {
5253
- htmlFor: inputName
5664
+ htmlFor: inputName,
5665
+ className: inputAttributes.labelClassName
5254
5666
  }, void 0, parentDiv).appendChild(doc.createTextNode(lang[optionName] || optionName));
5255
5667
  }
5256
5668
  // add input
5257
- if (value !== '') {
5258
- createElement(INPUT, {
5259
- name: inputName,
5260
- value: value[0],
5261
- type: value[1],
5262
- className: PREFIX + 'popup-field'
5263
- }, void 0, parentDiv).setAttribute(PREFIX + 'data-name', option);
5264
- }
5669
+ input = createElement(INPUT, {
5670
+ name: inputName,
5671
+ value: inputAttributes.value,
5672
+ type: inputAttributes.type,
5673
+ className: PREFIX + 'popup-field'
5674
+ }, void 0, parentDiv);
5675
+ input.setAttribute(PREFIX + 'data-name', option);
5676
+ return input;
5265
5677
  },
5266
5678
  /**
5267
5679
  * Create button.
@@ -5279,38 +5691,46 @@
5279
5691
  * @return {Highcharts.HTMLDOMElement}
5280
5692
  * HTML button
5281
5693
  */
5282
- addButton: function (parentDiv, label, type, callback, fieldsDiv) {
5694
+ addButton: function (parentDiv, label, type, fieldsDiv, callback) {
5283
5695
  var _self = this,
5284
5696
  closePopup = this.closePopup,
5285
5697
  getFields = this.getFields,
5286
5698
  button;
5287
5699
  button = createElement(BUTTON, void 0, void 0, parentDiv);
5288
5700
  button.appendChild(doc.createTextNode(label));
5289
- ['click', 'touchstart'].forEach(function (eventName) {
5290
- addEvent(button, eventName, function () {
5291
- closePopup.call(_self);
5292
- return callback(getFields(fieldsDiv, type));
5701
+ if (callback) {
5702
+ ['click', 'touchstart'].forEach(function (eventName) {
5703
+ addEvent(button, eventName, function () {
5704
+ closePopup.call(_self);
5705
+ return callback(getFields(fieldsDiv, type));
5706
+ });
5293
5707
  });
5294
- });
5708
+ }
5295
5709
  return button;
5296
5710
  },
5297
5711
  /**
5298
- * Get values from all inputs and create JSON.
5712
+ * Get values from all inputs and selections then create JSON.
5713
+ *
5299
5714
  * @private
5300
- * @param {Highcharts.HTMLDOMElement} - container where inputs are created
5301
- * @param {string} - add | edit | remove
5302
- * @return {Highcharts.PopupFieldsObject} - fields
5715
+ *
5716
+ * @param {Highcharts.HTMLDOMElement} parentDiv
5717
+ * The container where inputs and selections are created.
5718
+ *
5719
+ * @param {string} type
5720
+ * Type of the popup bookmark (add|edit|remove).
5721
+ *
5722
+ * @return {Highcharts.PopupFieldsObject}
5303
5723
  */
5304
5724
  getFields: function (parentDiv, type) {
5305
- var inputList = parentDiv.querySelectorAll('input'), optionSeries = '#' + PREFIX + 'select-series > option:checked', optionVolume = '#' + PREFIX + 'select-volume > option:checked', linkedTo = parentDiv.querySelectorAll(optionSeries)[0], volumeTo = parentDiv.querySelectorAll(optionVolume)[0], seriesId, param, fieldsOutput;
5725
+ var inputList = Array.prototype.slice.call(parentDiv.querySelectorAll(INPUT)), selectList = Array.prototype.slice.call(parentDiv.querySelectorAll(SELECT)), optionSeries = '#' + PREFIX + 'select-series > option:checked', optionVolume = '#' + PREFIX + 'select-volume > option:checked', linkedTo = parentDiv.querySelectorAll(optionSeries)[0], volumeTo = parentDiv.querySelectorAll(optionVolume)[0];
5726
+ var fieldsOutput;
5306
5727
  fieldsOutput = {
5307
5728
  actionType: type,
5308
- linkedTo: linkedTo && linkedTo.getAttribute('value'),
5729
+ linkedTo: linkedTo && linkedTo.getAttribute('value') || '',
5309
5730
  fields: {}
5310
5731
  };
5311
- [].forEach.call(inputList, function (input) {
5312
- param = input.getAttribute(PREFIX + 'data-name');
5313
- seriesId = input.getAttribute(PREFIX + 'data-series-id');
5732
+ inputList.forEach(function (input) {
5733
+ var param = input.getAttribute(PREFIX + 'data-name'), seriesId = input.getAttribute(PREFIX + 'data-series-id');
5314
5734
  // params
5315
5735
  if (seriesId) {
5316
5736
  fieldsOutput.seriesId = input.value;
@@ -5323,8 +5743,16 @@
5323
5743
  fieldsOutput.type = input.value;
5324
5744
  }
5325
5745
  });
5746
+ selectList.forEach(function (select) {
5747
+ var id = select.id;
5748
+ // Get inputs only for the parameters, not for series and volume.
5749
+ if (id !== PREFIX + 'select-series' && id !== PREFIX + 'select-volume') {
5750
+ var parameter = id.split('highcharts-select-')[1];
5751
+ fieldsOutput.fields[parameter] = select.value;
5752
+ }
5753
+ });
5326
5754
  if (volumeTo) {
5327
- fieldsOutput.fields['params.volumeSeriesID'] = volumeTo.getAttribute('value');
5755
+ fieldsOutput.fields['params.volumeSeriesID'] = volumeTo.getAttribute('value') || '';
5328
5756
  }
5329
5757
  return fieldsOutput;
5330
5758
  },
@@ -5434,13 +5862,13 @@
5434
5862
  // Basic shapes:
5435
5863
  options.shapes && options.shapes[0].type)));
5436
5864
  // add buttons
5437
- button = this.addButton(popupDiv, lang.removeButton || 'remove', 'remove', callback, popupDiv);
5865
+ button = this.addButton(popupDiv, lang.removeButton || 'remove', 'remove', popupDiv, callback);
5438
5866
  button.className += ' ' + PREFIX + 'annotation-remove-button';
5439
5867
  button.style['background-image'] = 'url(' +
5440
5868
  this.iconsURL + 'destroy.svg)';
5441
- button = this.addButton(popupDiv, lang.editButton || 'edit', 'edit', function () {
5869
+ button = this.addButton(popupDiv, lang.editButton || 'edit', 'edit', popupDiv, function () {
5442
5870
  showForm.call(_self, 'annotation-edit', chart, options, callback);
5443
- }, popupDiv);
5871
+ });
5444
5872
  button.className += ' ' + PREFIX + 'annotation-edit-button';
5445
5873
  button.style['background-image'] = 'url(' +
5446
5874
  this.iconsURL + 'edit.svg)';
@@ -5474,14 +5902,14 @@
5474
5902
  // left column
5475
5903
  lhsCol = createElement(DIV, {
5476
5904
  className: PREFIX + 'popup-lhs-col ' + PREFIX + 'popup-lhs-full'
5477
- }, null, popupDiv);
5905
+ }, void 0, popupDiv);
5478
5906
  bottomRow = createElement(DIV, {
5479
5907
  className: PREFIX + 'popup-bottom-row'
5480
- }, null, popupDiv);
5908
+ }, void 0, popupDiv);
5481
5909
  this.annotations.addFormFields.call(this, lhsCol, chart, '', options, [], true);
5482
5910
  this.addButton(bottomRow, isInit ?
5483
5911
  (lang.addButton || 'add') :
5484
- (lang.saveButton || 'save'), isInit ? 'add' : 'save', callback, popupDiv);
5912
+ (lang.saveButton || 'save'), isInit ? 'add' : 'save', popupDiv, callback);
5485
5913
  },
5486
5914
  /**
5487
5915
  * Create annotation's form fields.
@@ -5554,6 +5982,10 @@
5554
5982
  }, void 0, genInput[2]).appendChild(doc.createTextNode(genInput[1]));
5555
5983
  }
5556
5984
  else {
5985
+ genInput[4] = {
5986
+ value: genInput[4][0],
5987
+ type: genInput[4][1]
5988
+ };
5557
5989
  addInput.apply(genInput[0], genInput.splice(1));
5558
5990
  }
5559
5991
  });
@@ -5581,138 +6013,431 @@
5581
6013
  .querySelectorAll('.' + PREFIX + 'tab-item-content');
5582
6014
  // ADD tab
5583
6015
  this.addColsContainer(tabsContainers[0]);
6016
+ indicators.addSearchBox.call(this, chart, tabsContainers[0]);
5584
6017
  indicators.addIndicatorList.call(this, chart, tabsContainers[0], 'add');
5585
6018
  buttonParentDiv = tabsContainers[0]
5586
6019
  .querySelectorAll('.' + PREFIX + 'popup-rhs-col')[0];
5587
- this.addButton(buttonParentDiv, lang.addButton || 'add', 'add', callback, buttonParentDiv);
6020
+ this.addButton(buttonParentDiv, lang.addButton || 'add', 'add', buttonParentDiv, callback);
5588
6021
  // EDIT tab
5589
6022
  this.addColsContainer(tabsContainers[1]);
5590
6023
  indicators.addIndicatorList.call(this, chart, tabsContainers[1], 'edit');
5591
6024
  buttonParentDiv = tabsContainers[1]
5592
6025
  .querySelectorAll('.' + PREFIX + 'popup-rhs-col')[0];
5593
- this.addButton(buttonParentDiv, lang.saveButton || 'save', 'edit', callback, buttonParentDiv);
5594
- this.addButton(buttonParentDiv, lang.removeButton || 'remove', 'remove', callback, buttonParentDiv);
6026
+ this.addButton(buttonParentDiv, lang.saveButton || 'save', 'edit', buttonParentDiv, callback);
6027
+ this.addButton(buttonParentDiv, lang.removeButton || 'remove', 'remove', buttonParentDiv, callback);
6028
+ },
6029
+ /**
6030
+ * Filter object of series which are not indicators.
6031
+ * If the filter string exists, check against it.
6032
+ *
6033
+ * @private
6034
+ *
6035
+ * @param {Highcharts.FilteredSeries} series
6036
+ * All series are available in the plotOptions.
6037
+ *
6038
+ * @param {string|undefined} filter
6039
+ * Applied filter string from the input.
6040
+ * For the first iteration, it's an empty string.
6041
+ *
6042
+ * @return {Array<Highcharts.FilteredSeries>} filteredSeriesArray
6043
+ * Returns array of filtered series based on filter string.
6044
+ */
6045
+ filterSeries: function (series, filter) {
6046
+ var popup = this,
6047
+ indicators = popup.indicators,
6048
+ lang = popup.chart && popup.chart.options.lang,
6049
+ indicatorAliases = lang &&
6050
+ lang.navigation &&
6051
+ lang.navigation.popup &&
6052
+ lang.navigation.popup.indicatorAliases;
6053
+ var filteredSeriesArray = [],
6054
+ filteredSeries;
6055
+ objectEach(series, function (series, value) {
6056
+ var seriesOptions = series.options;
6057
+ // Allow only indicators.
6058
+ if (series.params || seriesOptions &&
6059
+ seriesOptions.params) {
6060
+ var _a = indicators.getNameType(series,
6061
+ value),
6062
+ indicatorFullName = _a.indicatorFullName,
6063
+ indicatorType = _a.indicatorType;
6064
+ if (filter) {
6065
+ // Replace invalid characters.
6066
+ var validFilter = filter.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
6067
+ var regex = new RegExp(validFilter, 'i'),
6068
+ alias = indicatorAliases &&
6069
+ indicatorAliases[indicatorType] &&
6070
+ indicatorAliases[indicatorType].join(' ') || '';
6071
+ if (indicatorFullName.match(regex) || alias.match(regex)) {
6072
+ filteredSeries = {
6073
+ indicatorFullName: indicatorFullName,
6074
+ indicatorType: indicatorType,
6075
+ series: series
6076
+ };
6077
+ filteredSeriesArray.push(filteredSeries);
6078
+ }
6079
+ }
6080
+ else {
6081
+ filteredSeries = {
6082
+ indicatorFullName: indicatorFullName,
6083
+ indicatorType: indicatorType,
6084
+ series: series
6085
+ };
6086
+ filteredSeriesArray.push(filteredSeries);
6087
+ }
6088
+ }
6089
+ });
6090
+ return filteredSeriesArray;
6091
+ },
6092
+ /**
6093
+ * Filter an array of series and map its names and types.
6094
+ *
6095
+ * @private
6096
+ *
6097
+ * @param {Highcharts.FilteredSeries} series
6098
+ * All series that are available in the plotOptions.
6099
+ *
6100
+ * @return {Array<Highcharts.FilteredSeries>} filteredSeriesArray
6101
+ * Returns array of filtered series based on filter string.
6102
+ */
6103
+ filterSeriesArray: function (series) {
6104
+ var filteredSeriesArray = [],
6105
+ filteredSeries;
6106
+ // Allow only indicators.
6107
+ series.forEach(function (series) {
6108
+ var seriesOptions = series.options;
6109
+ if (series.is('sma')) {
6110
+ filteredSeries = {
6111
+ indicatorFullName: series.name,
6112
+ indicatorType: series.type,
6113
+ series: series
6114
+ };
6115
+ filteredSeriesArray.push(filteredSeries);
6116
+ }
6117
+ });
6118
+ return filteredSeriesArray;
5595
6119
  },
5596
6120
  /**
5597
6121
  * Create HTML list of all indicators (ADD mode) or added indicators
5598
6122
  * (EDIT mode).
6123
+ *
5599
6124
  * @private
6125
+ *
6126
+ * @param {Highcharts.AnnotationChart} chart
6127
+ * The chart object.
6128
+ *
6129
+ * @param {string} [optionName]
6130
+ * Name of the option into which selection is being added.
6131
+ *
6132
+ * @param {HTMLDOMElement} [parentDiv]
6133
+ * HTML parent element.
6134
+ *
6135
+ * @param {string} listType
6136
+ * Type of list depending on the selected bookmark.
6137
+ * Might be 'add' or 'edit'.
6138
+ *
6139
+ * @param {string|undefined} filter
6140
+ * Applied filter string from the input.
6141
+ * For the first iteration, it's an empty string.
5600
6142
  */
5601
- addIndicatorList: function (chart, parentDiv, listType) {
5602
- var _self = this, lhsCol = parentDiv.querySelectorAll('.' + PREFIX + 'popup-lhs-col')[0], rhsCol = parentDiv.querySelectorAll('.' + PREFIX + 'popup-rhs-col')[0], isEdit = listType === 'edit', series = (isEdit ?
6143
+ addIndicatorList: function (chart, parentDiv, listType, filter) {
6144
+ var popup = this, indicators = popup.indicators, lang = popup.lang, lhsCol = parentDiv.querySelectorAll('.' + PREFIX + 'popup-lhs-col')[0], rhsCol = parentDiv.querySelectorAll('.' + PREFIX + 'popup-rhs-col')[0], isEdit = listType === 'edit', addFormFields = this.indicators.addFormFields, series = (isEdit ?
5603
6145
  chart.series : // EDIT mode
5604
- chart.options.plotOptions // ADD mode
5605
- ), addFormFields = this.indicators.addFormFields, rhsColWrapper, indicatorList, item;
5606
- if (!chart) {
6146
+ chart.options.plotOptions || {} // ADD mode
6147
+ );
6148
+ if (!chart && series) {
5607
6149
  return;
5608
6150
  }
5609
- // create wrapper for list
6151
+ var rhsColWrapper,
6152
+ indicatorList,
6153
+ item,
6154
+ filteredSeriesArray = [];
6155
+ // Filter and sort the series.
6156
+ if (!isEdit && !isArray(series)) {
6157
+ // Apply filters only for the 'add' indicator list.
6158
+ filteredSeriesArray = indicators.filterSeries.call(this, series, filter);
6159
+ }
6160
+ else if (isArray(series)) {
6161
+ filteredSeriesArray = indicators.filterSeriesArray.call(this, series);
6162
+ }
6163
+ // Sort indicators alphabeticaly.
6164
+ stableSort(filteredSeriesArray, function (a, b) {
6165
+ var seriesAName = a.indicatorFullName.toLowerCase(),
6166
+ seriesBName = b.indicatorFullName.toLowerCase();
6167
+ return (seriesAName < seriesBName) ?
6168
+ -1 : (seriesAName > seriesBName) ? 1 : 0;
6169
+ });
6170
+ // If the list exists remove it from the DOM
6171
+ // in order to create a new one with different filters.
6172
+ if (lhsCol.children[1]) {
6173
+ lhsCol.children[1].remove();
6174
+ }
6175
+ // Create wrapper for list.
5610
6176
  indicatorList = createElement(UL, {
5611
6177
  className: PREFIX + 'indicator-list'
5612
- }, null, lhsCol);
6178
+ }, void 0, lhsCol);
5613
6179
  rhsColWrapper = rhsCol
5614
6180
  .querySelectorAll('.' + PREFIX + 'popup-rhs-col-wrapper')[0];
5615
- objectEach(series, function (serie, value) {
5616
- var seriesOptions = serie.options;
5617
- if (serie.params ||
5618
- seriesOptions && seriesOptions.params) {
5619
- var indicatorNameType_1 = _self.indicators.getNameType(serie,
5620
- value),
5621
- indicatorType_1 = indicatorNameType_1.type;
5622
- item = createElement(LI, {
5623
- className: PREFIX + 'indicator-list'
5624
- }, void 0, indicatorList);
5625
- item.appendChild(doc.createTextNode(indicatorNameType_1.name));
5626
- ['click', 'touchstart'].forEach(function (eventName) {
5627
- addEvent(item, eventName, function () {
5628
- addFormFields.call(_self, chart, isEdit ? serie : series[indicatorType_1], indicatorNameType_1.type, rhsColWrapper);
5629
- // add hidden input with series.id
5630
- if (isEdit && serie.options) {
5631
- createElement(INPUT, {
5632
- type: 'hidden',
5633
- name: PREFIX + 'id-' + indicatorType_1,
5634
- value: serie.options.id
5635
- }, null, rhsColWrapper)
5636
- .setAttribute(PREFIX + 'data-series-id', serie.options.id);
5637
- }
5638
- });
6181
+ filteredSeriesArray.forEach(function (seriesSet) {
6182
+ var indicatorFullName = seriesSet.indicatorFullName,
6183
+ indicatorType = seriesSet.indicatorType,
6184
+ series = seriesSet.series;
6185
+ item = createElement(LI, {
6186
+ className: PREFIX + 'indicator-list'
6187
+ }, void 0, indicatorList);
6188
+ item.appendChild(doc.createTextNode(indicatorFullName));
6189
+ ['click', 'touchstart'].forEach(function (eventName) {
6190
+ addEvent(item, eventName, function () {
6191
+ var button = rhsColWrapper.parentNode.children[1];
6192
+ addFormFields.call(popup, chart, series, indicatorType, rhsColWrapper);
6193
+ if (button) {
6194
+ button.style.display = 'block';
6195
+ }
6196
+ // add hidden input with series.id
6197
+ if (isEdit && series.options) {
6198
+ createElement(INPUT, {
6199
+ type: 'hidden',
6200
+ name: PREFIX + 'id-' + indicatorType,
6201
+ value: series.options.id
6202
+ }, void 0, rhsColWrapper).setAttribute(PREFIX + 'data-series-id', series.options.id);
6203
+ }
5639
6204
  });
5640
- }
6205
+ });
5641
6206
  });
5642
6207
  // select first item from the list
5643
6208
  if (indicatorList.childNodes.length > 0) {
5644
6209
  indicatorList.childNodes[0].click();
5645
6210
  }
6211
+ else if (!isEdit) {
6212
+ rhsColWrapper.parentNode.children[0].innerHTML = lang.noFilterMatch || '';
6213
+ rhsColWrapper.parentNode.children[1].style.display = 'none';
6214
+ }
6215
+ },
6216
+ /**
6217
+ * Add searchbox HTML element and its' label.
6218
+ *
6219
+ * @private
6220
+ *
6221
+ * @param {Highcharts.AnnotationChart} chart
6222
+ * The chart object.
6223
+ *
6224
+ * @param {HTMLDOMElement} parentDiv
6225
+ * HTML parent element.
6226
+ */
6227
+ addSearchBox: function (chart, parentDiv) {
6228
+ var popup = this, lhsCol = parentDiv.querySelectorAll('.' + PREFIX + 'popup-lhs-col')[0], options = 'searchIndicators', inputAttributes = {
6229
+ value: '',
6230
+ type: 'text',
6231
+ htmlFor: 'search-indicators',
6232
+ labelClassName: 'highcharts-input-search-indicators-label'
6233
+ }, clearFilterText = this.lang.clearFilter, inputWrapper = createElement(DIV, {
6234
+ className: 'highcharts-input-wrapper'
6235
+ }, void 0, lhsCol);
6236
+ var handleInputChange = function (inputText) {
6237
+ // Apply some filters.
6238
+ popup.indicators.addIndicatorList.call(popup,
6239
+ chart,
6240
+ popup.container, 'add',
6241
+ inputText);
6242
+ };
6243
+ // Add input field with the label and button.
6244
+ var input = this.addInput(options,
6245
+ INPUT,
6246
+ inputWrapper,
6247
+ inputAttributes),
6248
+ button = createElement(A, {
6249
+ textContent: clearFilterText
6250
+ },
6251
+ void 0,
6252
+ inputWrapper);
6253
+ input.classList.add('highcharts-input-search-indicators');
6254
+ button.classList.add('clear-filter-button');
6255
+ // Add input change events.
6256
+ addEvent(input, 'input', function (e) {
6257
+ handleInputChange(this.value);
6258
+ // Show clear filter button.
6259
+ if (this.value.length) {
6260
+ button.style.display = 'inline-block';
6261
+ }
6262
+ else {
6263
+ button.style.display = 'none';
6264
+ }
6265
+ });
6266
+ // Add clear filter click event.
6267
+ ['click', 'touchstart'].forEach(function (eventName) {
6268
+ addEvent(button, eventName, function () {
6269
+ // Clear the input.
6270
+ input.value = '';
6271
+ handleInputChange('');
6272
+ // Hide clear filter button- no longer nececary.
6273
+ button.style.display = 'none';
6274
+ });
6275
+ });
6276
+ },
6277
+ /**
6278
+ * Add selection HTML element and its' label.
6279
+ *
6280
+ * @private
6281
+ *
6282
+ * @param {string} indicatorType
6283
+ * Type of the indicator i.e. sma, ema...
6284
+ *
6285
+ * @param {string} [optionName]
6286
+ * Name of the option into which selection is being added.
6287
+ *
6288
+ * @param {HTMLDOMElement} [parentDiv]
6289
+ * HTML parent element.
6290
+ *
6291
+ * @return {HTMLSelectElement}
6292
+ */
6293
+ addSelection: function (indicatorType, optionName, parentDiv) {
6294
+ var optionParamList = optionName.split('.'),
6295
+ labelText = optionParamList[optionParamList.length - 1];
6296
+ var selectName = PREFIX + optionName + '-type-' + indicatorType,
6297
+ lang = this.lang,
6298
+ selectBox;
6299
+ // Add a label for the selection box.
6300
+ createElement(LABEL, {
6301
+ htmlFor: selectName
6302
+ }, null, parentDiv).appendChild(doc.createTextNode(lang[labelText] || optionName));
6303
+ // Create a selection box.
6304
+ selectBox = createElement(SELECT, {
6305
+ name: selectName,
6306
+ className: PREFIX + 'popup-field',
6307
+ id: PREFIX + 'select-' + optionName
6308
+ }, null, parentDiv);
6309
+ selectBox.setAttribute('id', PREFIX + 'select-' + optionName);
6310
+ return selectBox;
6311
+ },
6312
+ /**
6313
+ * Get and add selection options.
6314
+ *
6315
+ * @private
6316
+ *
6317
+ * @param {Highcharts.AnnotationChart} chart
6318
+ * The chart object.
6319
+ *
6320
+ * @param {string} [optionName]
6321
+ * Name of the option into which selection is being added.
6322
+ *
6323
+ * @param {HTMLSelectElement} [selectBox]
6324
+ * HTML select box element to which the options are being added.
6325
+ *
6326
+ * @param {string|undefined} indicatorType
6327
+ * Type of the indicator i.e. sma, ema...
6328
+ *
6329
+ * @param {string|undefined} parameterName
6330
+ * Name of the parameter which should be applied.
6331
+ *
6332
+ * @param {string|undefined} selectedOption
6333
+ * Default value in dropdown.
6334
+ */
6335
+ addSelectionOptions: function (chart, optionName, selectBox, indicatorType, parameterName, selectedOption, currentSeries) {
6336
+ var popup = this;
6337
+ // Get and apply selection options for the possible series.
6338
+ if (optionName === 'series' || optionName === 'volume') {
6339
+ // List all series which have id - mandatory for indicator.
6340
+ chart.series.forEach(function (series) {
6341
+ var seriesOptions = series.options,
6342
+ seriesName = seriesOptions.name ||
6343
+ seriesOptions.params ? series.name : seriesOptions.id || '';
6344
+ if (seriesOptions.id !== PREFIX + 'navigator-series' &&
6345
+ seriesOptions.id !== (currentSeries && currentSeries.options && currentSeries.options.id)) {
6346
+ if (!defined(selectedOption) &&
6347
+ optionName === 'volume' &&
6348
+ series.type === 'column') {
6349
+ selectedOption = seriesOptions.id;
6350
+ }
6351
+ createElement(OPTION, {
6352
+ value: seriesOptions.id
6353
+ }, void 0, selectBox).appendChild(doc.createTextNode(seriesName));
6354
+ }
6355
+ });
6356
+ }
6357
+ else if (indicatorType && parameterName) {
6358
+ // Get and apply options for the possible parameters.
6359
+ var dropdownKey = parameterName + '-' + indicatorType,
6360
+ parameterOption = dropdownParameters[dropdownKey];
6361
+ parameterOption.forEach(function (element) {
6362
+ createElement(OPTION, {
6363
+ value: element
6364
+ }, void 0, selectBox).appendChild(doc.createTextNode(element));
6365
+ });
6366
+ }
6367
+ // Add the default dropdown value if defined.
6368
+ if (defined(selectedOption)) {
6369
+ selectBox.value = selectedOption;
6370
+ }
5646
6371
  },
5647
6372
  /**
5648
6373
  * Extract full name and type of requested indicator.
6374
+ *
5649
6375
  * @private
6376
+ *
5650
6377
  * @param {Highcharts.Series} series
5651
- * Series which name is needed. (EDIT mode - defaultOptions.series, ADD
5652
- * mode - indicator series).
5653
- * @param {string} - indicator type like: sma, ema, etc.
5654
- * @return {Object} - series name and type like: sma, ema, etc.
6378
+ * Series which name is needed(EDITmode - defaultOptions.series,
6379
+ * ADDmode - indicator series).
6380
+ *
6381
+ * @param {string} [IndicatorType]
6382
+ * Type of the indicator i.e. sma, ema...
6383
+ *
6384
+ * @return Highcharts.Dictionary<string>
6385
+ * Full name and series type.
5655
6386
  */
5656
- getNameType: function (series, type) {
6387
+ getNameType: function (series, indicatorType) {
5657
6388
  var options = series.options,
5658
- seriesTypes = H.seriesTypes,
5659
- // add mode
5660
- seriesName = seriesTypes[type] &&
5661
- seriesTypes[type].prototype.nameBase || type.toUpperCase(),
5662
- seriesType = type;
6389
+ seriesTypes = H.seriesTypes;
6390
+ // add mode
6391
+ var seriesName = (seriesTypes[indicatorType] &&
6392
+ seriesTypes[indicatorType].prototype.nameBase) ||
6393
+ indicatorType.toUpperCase(),
6394
+ seriesType = indicatorType;
5663
6395
  // edit
5664
6396
  if (options && options.type) {
5665
6397
  seriesType = series.options.type;
5666
6398
  seriesName = series.name;
5667
6399
  }
5668
6400
  return {
5669
- name: seriesName,
5670
- type: seriesType
6401
+ indicatorFullName: seriesName,
6402
+ indicatorType: seriesType
5671
6403
  };
5672
6404
  },
5673
6405
  /**
5674
- * List all series with unique ID. Its mandatory for indicators to set
5675
- * correct linking.
6406
+ * Create the selection box for the series,
6407
+ * add options and apply the default one.
6408
+ *
5676
6409
  * @private
5677
- * @param {string} type
5678
- * Indicator type like: sma, ema, etc.
5679
- * @param {string} optionName
5680
- * Type of select i.e series or volume.
5681
- * @param {Highcharts.Chart} chart
5682
- * Chart
5683
- * @param {Highcharts.HTMLDOMElement} parentDiv
5684
- * Element where created HTML list is added
5685
- * @param {string} selectedOption
5686
- * optional param for default value in dropdown
6410
+ *
6411
+ * @param {string} indicatorType
6412
+ * Type of the indicator i.e. sma, ema...
6413
+ *
6414
+ * @param {string} [optionName]
6415
+ * Name of the option into which selection is being added.
6416
+ *
6417
+ * @param {Highcharts.AnnotationChart} chart
6418
+ * The chart object.
6419
+ *
6420
+ * @param {HTMLDOMElement} [parentDiv]
6421
+ * HTML parent element.
6422
+ *
6423
+ * @param {string|undefined} selectedOption
6424
+ * Default value in dropdown.
5687
6425
  */
5688
- listAllSeries: function (type, optionName, chart, parentDiv, selectedOption) {
5689
- var selectName = PREFIX + optionName + '-type-' + type,
5690
- lang = this.lang,
5691
- selectBox,
5692
- seriesOptions;
6426
+ listAllSeries: function (indicatorType, optionName, chart, parentDiv, currentSeries, selectedOption) {
6427
+ var popup = this,
6428
+ indicators = popup.indicators;
6429
+ // Won't work without the chart.
5693
6430
  if (!chart) {
5694
6431
  return;
5695
6432
  }
5696
- createElement(LABEL, {
5697
- htmlFor: selectName
5698
- }, null, parentDiv).appendChild(doc.createTextNode(lang[optionName] || optionName));
5699
- // select type
5700
- selectBox = createElement(SELECT, {
5701
- name: selectName,
5702
- className: PREFIX + 'popup-field'
5703
- }, null, parentDiv);
5704
- selectBox.setAttribute('id', PREFIX + 'select-' + optionName);
5705
- // list all series which have id - mandatory for creating indicator
5706
- chart.series.forEach(function (serie) {
5707
- seriesOptions = serie.options;
5708
- if (!seriesOptions.params &&
5709
- seriesOptions.id &&
5710
- seriesOptions.id !== PREFIX + 'navigator-series') {
5711
- createElement(OPTION, {
5712
- value: seriesOptions.id
5713
- }, null, selectBox).appendChild(doc.createTextNode(seriesOptions.name || seriesOptions.id));
5714
- }
5715
- });
6433
+ // Add selection boxes.
6434
+ var selectBox = indicators.addSelection.call(popup,
6435
+ indicatorType,
6436
+ optionName,
6437
+ parentDiv);
6438
+ // Add possible dropdown options.
6439
+ indicators.addSelectionOptions.call(popup, chart, optionName, selectBox, void 0, void 0, void 0, currentSeries);
6440
+ // Add the default dropdown value if defined.
5716
6441
  if (defined(selectedOption)) {
5717
6442
  selectBox.value = selectedOption;
5718
6443
  }
@@ -5741,17 +6466,17 @@
5741
6466
  // create title (indicator name in the right column)
5742
6467
  createElement(H3, {
5743
6468
  className: PREFIX + 'indicator-title'
5744
- }, void 0, rhsColWrapper).appendChild(doc.createTextNode(getNameType(series, seriesType).name));
6469
+ }, void 0, rhsColWrapper).appendChild(doc.createTextNode(getNameType(series, seriesType).indicatorFullName));
5745
6470
  // input type
5746
6471
  createElement(INPUT, {
5747
6472
  type: 'hidden',
5748
6473
  name: PREFIX + 'type-' + seriesType,
5749
6474
  value: seriesType
5750
- }, null, rhsColWrapper);
6475
+ }, void 0, rhsColWrapper);
5751
6476
  // list all series with id
5752
- this.indicators.listAllSeries.call(this, seriesType, 'series', chart, rhsColWrapper, series.linkedParent && fields.volumeSeriesID);
6477
+ this.indicators.listAllSeries.call(this, seriesType, 'series', chart, rhsColWrapper, series, series.linkedParent && series.linkedParent.options.id);
5753
6478
  if (fields.volumeSeriesID) {
5754
- this.indicators.listAllSeries.call(this, seriesType, 'volume', chart, rhsColWrapper, series.linkedParent && series.linkedParent.options.id);
6479
+ this.indicators.listAllSeries.call(this, seriesType, 'volume', chart, rhsColWrapper, series, series.linkedParent && fields.volumeSeriesID);
5755
6480
  }
5756
6481
  // add param fields
5757
6482
  this.indicators.addParamInputs.call(this, chart, 'params', fields, seriesType, rhsColWrapper);
@@ -5773,8 +6498,9 @@
5773
6498
  * Element where created HTML list is added
5774
6499
  */
5775
6500
  addParamInputs: function (chart, parentNode, fields, type, parentDiv) {
5776
- var _self = this,
5777
- addParamInputs = this.indicators.addParamInputs,
6501
+ var popup = this,
6502
+ indicators = popup.indicators;
6503
+ var addParamInputs = this.indicators.addParamInputs,
5778
6504
  addInput = this.addInput,
5779
6505
  parentFullName;
5780
6506
  if (!chart) {
@@ -5783,16 +6509,33 @@
5783
6509
  objectEach(fields, function (value, fieldName) {
5784
6510
  // create name like params.styles.fontSize
5785
6511
  parentFullName = parentNode + '.' + fieldName;
5786
- if (value !== void 0) { // skip if field is unnecessary, #15362
6512
+ if (defined(value) && // skip if field is unnecessary, #15362
6513
+ parentFullName) {
5787
6514
  if (isObject(value)) {
5788
6515
  addInput.call(// (15733) 'Periods' has an arrayed value. Label must be created here.
5789
- _self, parentFullName, type, parentDiv, '');
5790
- addParamInputs.call(_self, chart, parentFullName, value, type, parentDiv);
6516
+ popup, parentFullName, type, parentDiv, {});
6517
+ addParamInputs.call(popup, chart, parentFullName, value, type, parentDiv);
6518
+ }
6519
+ // If the option is listed in dropdown enum,
6520
+ // add the selection box for it.
6521
+ if (parentFullName in DropdownProperties) {
6522
+ // Add selection boxes.
6523
+ var selectBox = indicators.addSelection.call(popup,
6524
+ type,
6525
+ parentFullName,
6526
+ parentDiv);
6527
+ // Add possible dropdown options.
6528
+ indicators.addSelectionOptions.call(popup, chart, parentNode, selectBox, type, fieldName, value);
5791
6529
  }
5792
6530
  else if (
5793
- // skip volume field which is created by addFormFields
5794
- parentFullName !== 'params.volumeSeriesID') {
5795
- addInput.call(_self, parentFullName, type, parentDiv, [value, 'text'] // all inputs are text type
6531
+ // Skip volume field which is created by addFormFields.
6532
+ parentFullName !== 'params.volumeSeriesID' &&
6533
+ !isArray(value) // Skip params declared in array.
6534
+ ) {
6535
+ addInput.call(popup, parentFullName, type, parentDiv, {
6536
+ value: value,
6537
+ type: 'text'
6538
+ } // all inputs are text type
5796
6539
  );
5797
6540
  }
5798
6541
  }
@@ -5875,7 +6618,7 @@
5875
6618
  var popupDiv = this.popup.container;
5876
6619
  return createElement(DIV, {
5877
6620
  className: PREFIX + 'tab-item-content ' + PREFIX + 'no-mousewheel' // #12100
5878
- }, null, popupDiv);
6621
+ }, void 0, popupDiv);
5879
6622
  },
5880
6623
  /**
5881
6624
  * Add click event to each tab
@@ -5938,7 +6681,7 @@
5938
6681
  this.popup = new H.Popup(this.chart.container, (this.chart.options.navigation.iconsURL ||
5939
6682
  (this.chart.options.stockTools &&
5940
6683
  this.chart.options.stockTools.gui.iconsURL) ||
5941
- 'https://code.highcharts.com/9.2.0/gfx/stock-icons/'), this.chart);
6684
+ 'https://code.highcharts.com/9.3.1/gfx/stock-icons/'), this.chart);
5942
6685
  }
5943
6686
  this.popup.showForm(config.formType, this.chart, config.options, config.onSubmit);
5944
6687
  });