highcharts 9.3.3 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (917) hide show
  1. package/bower.json +1 -1
  2. package/css/highcharts.css +19 -2
  3. package/css/highcharts.scss +17 -2
  4. package/css/themes/dark-unica.css +19 -2
  5. package/css/themes/grid-light.css +19 -2
  6. package/css/themes/sand-signika.css +19 -2
  7. package/es-modules/Accessibility/A11yI18n.js +4 -4
  8. package/es-modules/Accessibility/Accessibility.js +3 -4
  9. package/es-modules/Accessibility/Components/AnnotationsA11y.js +3 -3
  10. package/es-modules/Accessibility/Components/ContainerComponent.js +11 -10
  11. package/es-modules/Accessibility/Components/InfoRegionsComponent.js +18 -11
  12. package/es-modules/Accessibility/Components/LegendComponent.js +34 -26
  13. package/es-modules/Accessibility/Components/MenuComponent.js +7 -6
  14. package/es-modules/Accessibility/Components/RangeSelectorComponent.js +5 -3
  15. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +7 -6
  16. package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +1 -1
  17. package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +3 -2
  18. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +34 -18
  19. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +96 -39
  20. package/es-modules/Accessibility/Components/ZoomComponent.js +43 -80
  21. package/es-modules/Accessibility/FocusBorder.js +6 -5
  22. package/es-modules/Accessibility/HighContrastMode.js +3 -3
  23. package/es-modules/Accessibility/KeyboardNavigation.js +113 -98
  24. package/es-modules/Accessibility/Options/{Options.js → A11yDefaults.js} +72 -4
  25. package/es-modules/Accessibility/Options/DeprecatedOptions.js +12 -2
  26. package/es-modules/Accessibility/Options/{LangOptions.js → LangDefaults.js} +46 -31
  27. package/es-modules/Accessibility/ProxyElement.js +14 -6
  28. package/es-modules/Accessibility/ProxyProvider.js +10 -2
  29. package/es-modules/Accessibility/Utils/ChartUtilities.js +10 -5
  30. package/es-modules/Core/Animation/Fx.js +1 -1
  31. package/es-modules/Core/Axis/Axis.js +197 -91
  32. package/es-modules/Core/Axis/AxisDefaults.js +8 -8
  33. package/es-modules/Core/Axis/Color/ColorAxis.js +26 -7
  34. package/es-modules/Core/Axis/Color/ColorAxisDefaults.js +3 -3
  35. package/es-modules/Core/Axis/DateTimeAxis.js +5 -3
  36. package/es-modules/Core/Axis/GridAxis.js +821 -821
  37. package/es-modules/Core/Axis/LogarithmicAxis.js +1 -1
  38. package/es-modules/Core/Axis/OrdinalAxis.js +26 -3
  39. package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +3 -3
  40. package/es-modules/Core/Axis/StackingAxis.js +0 -1
  41. package/es-modules/Core/Axis/Tick.js +22 -18
  42. package/es-modules/Core/Axis/TreeGridTick.js +13 -2
  43. package/es-modules/Core/Axis/ZAxis.js +3 -1
  44. package/es-modules/Core/Chart/Chart.js +27 -8
  45. package/es-modules/Core/Chart/Chart3D.js +1 -11
  46. package/es-modules/Core/Chart/ChartDefaults.js +46 -14
  47. package/es-modules/Core/Chart/GanttChart.js +3 -1
  48. package/es-modules/Core/Chart/MapChart.js +4 -7
  49. package/es-modules/Core/Chart/StockChart.js +7 -5
  50. package/es-modules/Core/Color/Color.js +1 -1
  51. package/es-modules/Core/DefaultOptions.js +19 -15
  52. package/es-modules/Core/Geometry/PolygonClip.js +84 -0
  53. package/es-modules/Core/Globals.js +4 -18
  54. package/es-modules/Core/HttpUtilities.js +46 -39
  55. package/es-modules/Core/Legend/Legend.js +14 -12
  56. package/es-modules/Core/MSPointer.js +3 -1
  57. package/es-modules/Core/Navigator.js +16 -13
  58. package/es-modules/Core/Pointer.js +16 -12
  59. package/es-modules/Core/Renderer/HTML/AST.js +68 -8
  60. package/es-modules/Core/Renderer/HTML/HTMLElement.js +3 -1
  61. package/es-modules/Core/Renderer/HTML/HTMLRenderer.js +3 -1
  62. package/es-modules/Core/Renderer/SVG/SVGElement.js +54 -70
  63. package/es-modules/Core/Renderer/SVG/SVGElement3D.js +17 -5
  64. package/es-modules/Core/Renderer/SVG/SVGLabel.js +3 -1
  65. package/es-modules/Core/Renderer/SVG/SVGRenderer.js +60 -55
  66. package/es-modules/Core/Renderer/SVG/SVGRenderer3D.js +4 -2
  67. package/es-modules/Core/Renderer/SVG/TextBuilder.js +12 -10
  68. package/es-modules/Core/Scrollbar.js +9 -5
  69. package/es-modules/Core/ScrollbarDefaults.js +8 -8
  70. package/es-modules/Core/Series/DataLabel.js +67 -38
  71. package/es-modules/Core/Series/Point.js +11 -2
  72. package/es-modules/Core/Series/Series.js +57 -27
  73. package/es-modules/Core/Series/Series3D.js +3 -1
  74. package/es-modules/Core/Series/SeriesDefaults.js +7 -4
  75. package/es-modules/Core/Time.js +6 -7
  76. package/es-modules/Core/Tooltip.js +17 -34
  77. package/es-modules/Core/Utilities.js +33 -33
  78. package/es-modules/Data/DataConverter.js +1 -1
  79. package/es-modules/Data/DataTable.js +12 -10
  80. package/es-modules/Data/Modifiers/ChainModifier.js +3 -1
  81. package/es-modules/Data/Modifiers/GroupModifier.js +3 -1
  82. package/es-modules/Data/Modifiers/InvertModifier.js +9 -7
  83. package/es-modules/Data/Modifiers/RangeModifier.js +3 -1
  84. package/es-modules/Data/Modifiers/SeriesPointsModifier.js +3 -1
  85. package/es-modules/Data/Modifiers/SortModifier.js +3 -1
  86. package/es-modules/Data/Parsers/CSVParser.js +3 -1
  87. package/es-modules/Data/Parsers/DataParser.js +1 -1
  88. package/es-modules/Data/Parsers/GoogleSheetsParser.js +3 -2
  89. package/es-modules/Data/Parsers/HTMLTableParser.js +3 -1
  90. package/es-modules/Data/Stores/CSVStore.js +8 -5
  91. package/es-modules/Data/Stores/GoogleSheetsStore.js +3 -1
  92. package/es-modules/Data/Stores/HTMLTableStore.js +3 -1
  93. package/es-modules/Extensions/Annotations/{Annotations.js → Annotation.js} +30 -11
  94. package/es-modules/Extensions/Annotations/AnnotationsDefaults.js +0 -0
  95. package/es-modules/Extensions/Annotations/ControlPoint.js +1 -1
  96. package/es-modules/Extensions/Annotations/Controllables/ControllableEllipse.js +5 -2
  97. package/es-modules/Extensions/Annotations/MockPoint.js +1 -1
  98. package/es-modules/Extensions/Annotations/NavigationBindings.js +16 -5
  99. package/es-modules/Extensions/Annotations/Popup.js +2 -2
  100. package/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +18 -12
  101. package/es-modules/Extensions/Annotations/Types/CrookedLine.js +4 -2
  102. package/es-modules/Extensions/Annotations/Types/ElliottWave.js +4 -2
  103. package/es-modules/Extensions/Annotations/Types/Fibonacci.js +5 -3
  104. package/es-modules/Extensions/Annotations/Types/FibonacciTimeZones.js +4 -2
  105. package/es-modules/Extensions/Annotations/Types/InfinityLine.js +4 -2
  106. package/es-modules/Extensions/Annotations/Types/Measure.js +4 -2
  107. package/es-modules/Extensions/Annotations/Types/Pitchfork.js +4 -2
  108. package/es-modules/Extensions/Annotations/Types/TimeCycles.js +4 -2
  109. package/es-modules/Extensions/Annotations/Types/Tunnel.js +5 -2
  110. package/es-modules/Extensions/Annotations/Types/VerticalLine.js +4 -2
  111. package/es-modules/Extensions/Boost/BoostAttach.js +5 -1
  112. package/es-modules/Extensions/Boost/BoostInit.js +9 -3
  113. package/es-modules/Extensions/Boost/BoostOptions.js +26 -0
  114. package/es-modules/Extensions/Boost/Boostables.js +1 -0
  115. package/es-modules/Extensions/Boost/WGLRenderer.js +48 -37
  116. package/es-modules/Extensions/Boost/WGLShader.js +4 -3
  117. package/es-modules/Extensions/BoostCanvas.js +11 -5
  118. package/es-modules/Extensions/Breadcrumbs.js +898 -0
  119. package/es-modules/Extensions/CurrentDateIndication.js +1 -1
  120. package/es-modules/Extensions/Data.js +661 -613
  121. package/es-modules/Extensions/DataGrouping.js +8 -3
  122. package/es-modules/Extensions/Debugger/ErrorMessages.js +4 -0
  123. package/es-modules/Extensions/DownloadURL.js +3 -3
  124. package/es-modules/Extensions/DragPanes.js +1 -1
  125. package/es-modules/Extensions/DraggablePoints.js +9 -7
  126. package/es-modules/Extensions/Drilldown.js +152 -97
  127. package/es-modules/Extensions/ExportData.js +58 -9
  128. package/es-modules/Extensions/Exporting/Exporting.js +34 -23
  129. package/es-modules/Extensions/Exporting/ExportingDefaults.js +56 -8
  130. package/es-modules/Extensions/FullScreen.js +121 -54
  131. package/es-modules/Extensions/GeoJSON.js +149 -125
  132. package/es-modules/Extensions/MarkerClusters.js +36 -22
  133. package/es-modules/Extensions/NoDataToDisplay.js +1 -1
  134. package/es-modules/Extensions/OfflineExporting/OfflineExporting.js +110 -22
  135. package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
  136. package/es-modules/Extensions/Oldie/Oldie.js +2 -2
  137. package/es-modules/Extensions/OverlappingDataLabels.js +5 -4
  138. package/es-modules/Extensions/Pane.js +3 -3
  139. package/es-modules/Extensions/ParallelCoordinates.js +1 -1
  140. package/es-modules/Extensions/PatternFill.js +14 -2
  141. package/es-modules/Extensions/RangeSelector.js +29 -18
  142. package/es-modules/Extensions/ScrollablePlotArea.js +8 -4
  143. package/es-modules/Extensions/{SeriesLabel.js → SeriesLabel/SeriesLabel.js} +262 -384
  144. package/es-modules/Extensions/SeriesLabel/SeriesLabelDefaults.js +124 -0
  145. package/es-modules/Extensions/SeriesLabel/SeriesLabelUtilities.js +67 -0
  146. package/es-modules/Extensions/Sonification/Earcon.js +1 -1
  147. package/es-modules/Extensions/Stacking.js +5 -4
  148. package/es-modules/Extensions/Themes/HighContrastDark.js +10 -10
  149. package/es-modules/Extensions/Themes/HighContrastLight.js +10 -10
  150. package/es-modules/Maps/MapNavigation.js +49 -12
  151. package/es-modules/Maps/MapPointer.js +16 -0
  152. package/es-modules/Maps/MapUtilities.js +56 -0
  153. package/es-modules/Maps/MapView.js +619 -137
  154. package/es-modules/Maps/MapViewInsetsOptionsDefault.js +148 -0
  155. package/es-modules/Maps/MapViewOptionsDefault.js +60 -20
  156. package/es-modules/Maps/Projection.js +182 -88
  157. package/es-modules/Maps/Projections/EqualEarth.js +15 -6
  158. package/es-modules/Maps/Projections/LambertConformalConic.js +27 -19
  159. package/es-modules/Maps/Projections/Miller.js +23 -10
  160. package/es-modules/Maps/Projections/Orthographic.js +21 -10
  161. package/es-modules/Maps/Projections/WebMercator.js +25 -13
  162. package/es-modules/Series/ArcDiagram/ArcDiagramPoint.js +79 -0
  163. package/es-modules/Series/ArcDiagram/ArcDiagramSeries.js +591 -0
  164. package/es-modules/Series/Area/AreaSeries.js +21 -14
  165. package/es-modules/Series/AreaRange/AreaRangePoint.js +24 -11
  166. package/es-modules/Series/AreaRange/AreaRangeSeries.js +154 -147
  167. package/es-modules/Series/AreaSpline/AreaSplineSeries.js +45 -41
  168. package/es-modules/Series/AreaSplineRange/AreaSplineRangeSeries.js +43 -43
  169. package/es-modules/Series/Bar/BarSeries.js +3 -1
  170. package/es-modules/Series/Bellcurve/BellcurveSeries.js +3 -1
  171. package/es-modules/Series/BoxPlot/BoxPlotSeries.js +4 -2
  172. package/es-modules/Series/Bubble/BubbleLegendDefaults.js +1 -1
  173. package/es-modules/Series/Bubble/BubblePoint.js +3 -1
  174. package/es-modules/Series/Bubble/BubbleSeries.js +15 -6
  175. package/es-modules/Series/Bullet/BulletPoint.js +3 -1
  176. package/es-modules/Series/Bullet/BulletSeries.js +4 -3
  177. package/es-modules/Series/Candlestick/CandlestickSeries.js +5 -3
  178. package/es-modules/Series/CenteredUtilities.js +8 -2
  179. package/es-modules/Series/ColorMapComposition.js +111 -0
  180. package/es-modules/Series/Column/ColumnSeries.js +10 -7
  181. package/es-modules/Series/ColumnPyramid/ColumnPyramidSeries.js +3 -1
  182. package/es-modules/Series/ColumnRange/ColumnRangePoint.js +17 -13
  183. package/es-modules/Series/ColumnRange/ColumnRangeSeries.js +60 -57
  184. package/es-modules/Series/Cylinder/CylinderPoint.js +3 -1
  185. package/es-modules/Series/Cylinder/CylinderSeries.js +3 -1
  186. package/es-modules/Series/DataModifyComposition.js +1 -0
  187. package/es-modules/Series/DependencyWheel/DependencyWheelPoint.js +3 -1
  188. package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +5 -3
  189. package/es-modules/Series/DotPlot/DotPlotSeries.js +3 -1
  190. package/es-modules/Series/DrawPointUtilities.js +87 -0
  191. package/es-modules/Series/Dumbbell/DumbbellPoint.js +3 -1
  192. package/es-modules/Series/Dumbbell/DumbbellSeries.js +4 -2
  193. package/es-modules/Series/ErrorBar/ErrorBarSeries.js +4 -2
  194. package/es-modules/Series/Flags/FlagsPoint.js +4 -1
  195. package/es-modules/Series/Flags/FlagsSeries.js +13 -16
  196. package/es-modules/Series/Funnel/FunnelSeries.js +5 -3
  197. package/es-modules/Series/Funnel3D/Funnel3DPoint.js +3 -1
  198. package/es-modules/Series/Funnel3D/Funnel3DSeries.js +3 -1
  199. package/es-modules/Series/Gantt/GanttPoint.js +3 -1
  200. package/es-modules/Series/Gantt/GanttSeries.js +3 -1
  201. package/es-modules/Series/Gauge/GaugePoint.js +3 -1
  202. package/es-modules/Series/Gauge/GaugeSeries.js +196 -174
  203. package/es-modules/Series/HLC/HLCPoint.js +3 -1
  204. package/es-modules/Series/HLC/HLCSeries.js +4 -2
  205. package/es-modules/Series/Heatmap/HeatmapPoint.js +7 -5
  206. package/es-modules/Series/Heatmap/HeatmapSeries.js +29 -33
  207. package/es-modules/Series/HeikinAshi/HeikinAshiPoint.js +3 -1
  208. package/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +3 -1
  209. package/es-modules/Series/Histogram/HistogramSeries.js +3 -1
  210. package/es-modules/Series/HollowCandlestick/HollowCandlestickPoint.js +3 -1
  211. package/es-modules/Series/HollowCandlestick/HollowCandlestickSeries.js +11 -9
  212. package/es-modules/Series/Item/ItemPoint.js +3 -1
  213. package/es-modules/Series/Item/ItemSeries.js +3 -1
  214. package/es-modules/Series/Line/LineSeries.js +4 -2
  215. package/es-modules/Series/Lollipop/LollipopPoint.js +3 -1
  216. package/es-modules/Series/Lollipop/LollipopSeries.js +4 -2
  217. package/es-modules/Series/Map/MapPoint.js +32 -7
  218. package/es-modules/Series/Map/MapSeries.js +298 -189
  219. package/es-modules/Series/MapBubble/MapBubblePoint.js +19 -25
  220. package/es-modules/Series/MapBubble/MapBubbleSeries.js +61 -2
  221. package/es-modules/Series/MapLine/MapLineSeries.js +18 -1
  222. package/es-modules/Series/MapPoint/MapPointPoint.js +6 -10
  223. package/es-modules/Series/MapPoint/MapPointSeries.js +50 -16
  224. package/es-modules/Series/Networkgraph/Networkgraph.js +3 -1
  225. package/es-modules/Series/NodesComposition.js +101 -49
  226. package/es-modules/Series/OHLC/OHLCPoint.js +3 -1
  227. package/es-modules/Series/OHLC/OHLCSeries.js +10 -1
  228. package/es-modules/Series/Organization/OrganizationPoint.js +71 -3
  229. package/es-modules/Series/Organization/OrganizationSeries.js +84 -28
  230. package/es-modules/Series/PackedBubble/PackedBubbleComposition.js +0 -2
  231. package/es-modules/Series/PackedBubble/PackedBubblePoint.js +3 -1
  232. package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +3 -1
  233. package/es-modules/Series/ParetoSeries/ParetoSeries.js +3 -1
  234. package/es-modules/Series/Pie/PieDataLabel.js +4 -2
  235. package/es-modules/Series/Pie/PiePoint.js +15 -6
  236. package/es-modules/Series/Pie/PieSeries.js +51 -37
  237. package/es-modules/Series/Pie3D/Pie3DPoint.js +3 -1
  238. package/es-modules/Series/Pie3D/Pie3DSeries.js +22 -1
  239. package/es-modules/Series/PolarComposition.js +819 -0
  240. package/es-modules/Series/Polygon/PolygonSeries.js +3 -1
  241. package/es-modules/Series/Pyramid/PyramidSeries.js +3 -1
  242. package/es-modules/Series/Pyramid3D/Pyramid3DSeries.js +3 -1
  243. package/es-modules/Series/Sankey/SankeyColumnComposition.js +193 -0
  244. package/es-modules/Series/Sankey/SankeyPoint.js +40 -2
  245. package/es-modules/Series/Sankey/SankeySeries.js +35 -136
  246. package/es-modules/Series/Scatter/ScatterSeries.js +11 -6
  247. package/es-modules/Series/Scatter3D/Scatter3DPoint.js +3 -1
  248. package/es-modules/Series/Scatter3D/Scatter3DSeries.js +3 -1
  249. package/es-modules/Series/SeriesOnPointComposition.js +391 -0
  250. package/es-modules/Series/SolidGauge/SolidGaugeSeries.js +5 -3
  251. package/es-modules/Series/Spline/SplineSeries.js +13 -4
  252. package/es-modules/Series/Streamgraph/StreamgraphSeries.js +3 -1
  253. package/es-modules/Series/Sunburst/SunburstPoint.js +3 -3
  254. package/es-modules/Series/Sunburst/SunburstSeries.js +21 -5
  255. package/es-modules/Series/Tilemap/TilemapPoint.js +3 -1
  256. package/es-modules/Series/Tilemap/TilemapSeries.js +3 -1
  257. package/es-modules/Series/Timeline/TimelinePoint.js +3 -1
  258. package/es-modules/Series/Timeline/TimelineSeries.js +6 -4
  259. package/es-modules/Series/Treemap/TreemapPoint.js +8 -4
  260. package/es-modules/Series/Treemap/TreemapSeries.js +97 -87
  261. package/es-modules/Series/VariablePie/VariablePieSeries.js +3 -1
  262. package/es-modules/Series/Variwide/VariwidePoint.js +3 -1
  263. package/es-modules/Series/Variwide/VariwideSeries.js +3 -1
  264. package/es-modules/Series/Vector/VectorSeries.js +3 -1
  265. package/es-modules/Series/Venn/VennPoint.js +5 -5
  266. package/es-modules/Series/Venn/VennSeries.js +9 -6
  267. package/es-modules/Series/Waterfall/WaterfallPoint.js +3 -1
  268. package/es-modules/Series/Waterfall/WaterfallSeries.js +16 -12
  269. package/es-modules/Series/Windbarb/WindbarbPoint.js +3 -1
  270. package/es-modules/Series/Windbarb/WindbarbSeries.js +3 -1
  271. package/es-modules/Series/Wordcloud/WordcloudPoint.js +6 -6
  272. package/es-modules/Series/Wordcloud/WordcloudSeries.js +11 -8
  273. package/es-modules/Series/XRange/XRangePoint.js +3 -1
  274. package/es-modules/Series/XRange/XRangeSeries.js +3 -1
  275. package/es-modules/Stock/Indicators/ABands/ABandsIndicator.js +3 -1
  276. package/es-modules/Stock/Indicators/AD/ADIndicator.js +3 -1
  277. package/es-modules/Stock/Indicators/AO/AOIndicator.js +5 -3
  278. package/es-modules/Stock/Indicators/APO/APOIndicator.js +3 -1
  279. package/es-modules/Stock/Indicators/ATR/ATRIndicator.js +3 -1
  280. package/es-modules/Stock/Indicators/Aroon/AroonIndicator.js +3 -1
  281. package/es-modules/Stock/Indicators/AroonOscillator/AroonOscillatorIndicator.js +3 -1
  282. package/es-modules/Stock/Indicators/BB/BBIndicator.js +6 -4
  283. package/es-modules/Stock/Indicators/CCI/CCIIndicator.js +3 -1
  284. package/es-modules/Stock/Indicators/CMF/CMFIndicator.js +3 -1
  285. package/es-modules/Stock/Indicators/CMO/CMOIndicator.js +3 -1
  286. package/es-modules/Stock/Indicators/Chaikin/ChaikinIndicator.js +3 -1
  287. package/es-modules/Stock/Indicators/DEMA/DEMAIndicator.js +3 -1
  288. package/es-modules/Stock/Indicators/DMI/DMIIndicator.js +13 -7
  289. package/es-modules/Stock/Indicators/DPO/DPOIndicator.js +3 -1
  290. package/es-modules/Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js +3 -1
  291. package/es-modules/Stock/Indicators/EMA/EMAIndicator.js +3 -1
  292. package/es-modules/Stock/Indicators/IKH/IKHIndicator.js +3 -1
  293. package/es-modules/Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js +3 -1
  294. package/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +3 -1
  295. package/es-modules/Stock/Indicators/LinearRegression/LinearRegression.js +3 -1
  296. package/es-modules/Stock/Indicators/LinearRegressionAngle/LinearRegressionAngle.js +3 -1
  297. package/es-modules/Stock/Indicators/LinearRegressionIntercept/LinearRegressionIntercept.js +3 -1
  298. package/es-modules/Stock/Indicators/LinearRegressionSlopes/LinearRegressionSlopes.js +3 -1
  299. package/es-modules/Stock/Indicators/MACD/MACDIndicator.js +26 -13
  300. package/es-modules/Stock/Indicators/MFI/MFIIndicator.js +3 -1
  301. package/es-modules/Stock/Indicators/Momentum/MomentumIndicator.js +3 -1
  302. package/es-modules/Stock/Indicators/MultipleLinesComposition.js +85 -95
  303. package/es-modules/Stock/Indicators/NATR/NATRIndicator.js +3 -1
  304. package/es-modules/Stock/Indicators/OBV/OBVIndicator.js +3 -1
  305. package/es-modules/Stock/Indicators/PC/PCIndicator.js +3 -1
  306. package/es-modules/Stock/Indicators/PPO/PPOIndicator.js +3 -1
  307. package/es-modules/Stock/Indicators/PSAR/PSARIndicator.js +3 -1
  308. package/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +3 -1
  309. package/es-modules/Stock/Indicators/PivotPoints/PivotPointsPoint.js +3 -1
  310. package/es-modules/Stock/Indicators/PriceEnvelopes/PriceEnvelopesIndicator.js +3 -1
  311. package/es-modules/Stock/Indicators/ROC/ROCIndicator.js +3 -1
  312. package/es-modules/Stock/Indicators/RSI/RSIIndicator.js +3 -1
  313. package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +12 -3
  314. package/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +3 -1
  315. package/es-modules/Stock/Indicators/Stochastic/StochasticIndicator.js +3 -1
  316. package/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +6 -4
  317. package/es-modules/Stock/Indicators/TEMA/TEMAIndicator.js +3 -1
  318. package/es-modules/Stock/Indicators/TRIX/TRIXIndicator.js +3 -1
  319. package/es-modules/Stock/Indicators/TrendLine/TrendLineIndicator.js +3 -1
  320. package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +3 -1
  321. package/es-modules/Stock/Indicators/VBP/VBPPoint.js +3 -1
  322. package/es-modules/Stock/Indicators/VWAP/VWAPIndicator.js +3 -1
  323. package/es-modules/Stock/Indicators/WMA/WMAIndicator.js +3 -1
  324. package/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +3 -1
  325. package/es-modules/Stock/Indicators/Zigzag/ZigzagIndicator.js +3 -1
  326. package/es-modules/Stock/StockToolsBindings.js +51 -43
  327. package/es-modules/Stock/StockToolsGui.js +1 -1
  328. package/es-modules/masters/highcharts-3d.src.js +1 -1
  329. package/es-modules/masters/highcharts-gantt.src.js +1 -1
  330. package/es-modules/masters/highcharts-more.src.js +4 -4
  331. package/es-modules/masters/highcharts.src.js +1 -1
  332. package/es-modules/masters/highmaps.src.js +1 -1
  333. package/es-modules/masters/highstock.src.js +1 -1
  334. package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
  335. package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
  336. package/es-modules/masters/indicators/ao.src.js +1 -1
  337. package/es-modules/masters/indicators/apo.src.js +1 -1
  338. package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
  339. package/es-modules/masters/indicators/aroon.src.js +1 -1
  340. package/es-modules/masters/indicators/atr.src.js +1 -1
  341. package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
  342. package/es-modules/masters/indicators/cci.src.js +1 -1
  343. package/es-modules/masters/indicators/chaikin.src.js +1 -1
  344. package/es-modules/masters/indicators/cmf.src.js +1 -1
  345. package/es-modules/masters/indicators/cmo.src.js +1 -1
  346. package/es-modules/masters/indicators/dema.src.js +1 -1
  347. package/es-modules/masters/indicators/disparity-index.src.js +1 -1
  348. package/es-modules/masters/indicators/dmi.src.js +1 -1
  349. package/es-modules/masters/indicators/dpo.src.js +1 -1
  350. package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
  351. package/es-modules/masters/indicators/indicators-all.src.js +1 -1
  352. package/es-modules/masters/indicators/indicators.src.js +1 -1
  353. package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
  354. package/es-modules/masters/indicators/klinger.src.js +1 -1
  355. package/es-modules/masters/indicators/macd.src.js +1 -1
  356. package/es-modules/masters/indicators/mfi.src.js +1 -1
  357. package/es-modules/masters/indicators/momentum.src.js +1 -1
  358. package/es-modules/masters/indicators/natr.src.js +1 -1
  359. package/es-modules/masters/indicators/obv.src.js +1 -1
  360. package/es-modules/masters/indicators/pivot-points.src.js +1 -1
  361. package/es-modules/masters/indicators/ppo.src.js +1 -1
  362. package/es-modules/masters/indicators/price-channel.src.js +1 -1
  363. package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
  364. package/es-modules/masters/indicators/psar.src.js +1 -1
  365. package/es-modules/masters/indicators/regressions.src.js +1 -1
  366. package/es-modules/masters/indicators/roc.src.js +1 -1
  367. package/es-modules/masters/indicators/rsi.src.js +1 -1
  368. package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
  369. package/es-modules/masters/indicators/stochastic.src.js +1 -1
  370. package/es-modules/masters/indicators/supertrend.src.js +1 -1
  371. package/es-modules/masters/indicators/tema.src.js +1 -1
  372. package/es-modules/masters/indicators/trendline.src.js +1 -1
  373. package/es-modules/masters/indicators/trix.src.js +1 -1
  374. package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
  375. package/es-modules/masters/indicators/vwap.src.js +1 -1
  376. package/es-modules/masters/indicators/williams-r.src.js +1 -1
  377. package/es-modules/masters/indicators/wma.src.js +1 -1
  378. package/es-modules/masters/indicators/zigzag.src.js +1 -1
  379. package/es-modules/masters/modules/accessibility.src.js +1 -1
  380. package/es-modules/masters/modules/annotations-advanced.src.js +2 -2
  381. package/es-modules/masters/modules/annotations.src.js +2 -2
  382. package/es-modules/masters/modules/arc-diagram.src.js +14 -0
  383. package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
  384. package/es-modules/masters/modules/boost-canvas.src.js +1 -1
  385. package/es-modules/masters/modules/boost.src.js +1 -1
  386. package/es-modules/masters/modules/broken-axis.src.js +1 -1
  387. package/es-modules/masters/modules/bullet.src.js +1 -1
  388. package/es-modules/masters/modules/coloraxis.src.js +1 -1
  389. package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
  390. package/es-modules/masters/modules/cylinder.src.js +1 -1
  391. package/es-modules/masters/modules/data.src.js +2 -1
  392. package/es-modules/masters/modules/datagrouping.src.js +1 -1
  393. package/es-modules/masters/modules/debugger.src.js +1 -1
  394. package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
  395. package/es-modules/masters/modules/dotplot.src.js +1 -1
  396. package/es-modules/masters/modules/drag-panes.src.js +1 -1
  397. package/es-modules/masters/modules/draggable-points.src.js +1 -1
  398. package/es-modules/masters/modules/drilldown.src.js +2 -1
  399. package/es-modules/masters/modules/dumbbell.src.js +1 -1
  400. package/es-modules/masters/modules/export-data.src.js +1 -1
  401. package/es-modules/masters/modules/exporting.src.js +1 -1
  402. package/es-modules/masters/modules/full-screen.src.js +1 -1
  403. package/es-modules/masters/modules/funnel.src.js +1 -1
  404. package/es-modules/masters/modules/funnel3d.src.js +1 -1
  405. package/es-modules/masters/modules/gantt.src.js +1 -1
  406. package/es-modules/masters/modules/grid-axis.src.js +1 -1
  407. package/es-modules/masters/modules/heatmap.src.js +1 -1
  408. package/es-modules/masters/modules/heikinashi.src.js +1 -1
  409. package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
  410. package/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
  411. package/es-modules/masters/modules/item-series.src.js +1 -1
  412. package/es-modules/masters/modules/lollipop.src.js +1 -1
  413. package/es-modules/masters/modules/map.src.js +5 -1
  414. package/es-modules/masters/modules/marker-clusters.src.js +1 -1
  415. package/es-modules/masters/modules/networkgraph.src.js +1 -1
  416. package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
  417. package/es-modules/masters/modules/offline-exporting.src.js +1 -1
  418. package/es-modules/masters/modules/oldie-polyfills.src.js +1 -1
  419. package/es-modules/masters/modules/oldie.src.js +1 -1
  420. package/es-modules/masters/modules/organization.src.js +1 -1
  421. package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
  422. package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
  423. package/es-modules/masters/modules/pareto.src.js +1 -1
  424. package/es-modules/masters/modules/pathfinder.src.js +1 -1
  425. package/es-modules/masters/modules/pattern-fill.src.js +1 -1
  426. package/es-modules/masters/modules/price-indicator.src.js +1 -1
  427. package/es-modules/masters/modules/pyramid3d.src.js +1 -1
  428. package/es-modules/masters/modules/sankey.src.js +1 -1
  429. package/es-modules/masters/modules/series-label.src.js +5 -2
  430. package/es-modules/masters/modules/series-on-point.src.js +16 -0
  431. package/es-modules/masters/modules/solid-gauge.src.js +1 -1
  432. package/es-modules/masters/modules/sonification.src.js +2 -6
  433. package/es-modules/masters/modules/static-scale.src.js +1 -1
  434. package/es-modules/masters/modules/stock-tools.src.js +1 -1
  435. package/es-modules/masters/modules/stock.src.js +1 -1
  436. package/es-modules/masters/modules/streamgraph.src.js +1 -1
  437. package/es-modules/masters/modules/sunburst.src.js +1 -1
  438. package/es-modules/masters/modules/tilemap.src.js +1 -1
  439. package/es-modules/masters/modules/timeline.src.js +1 -1
  440. package/es-modules/masters/modules/treegrid.src.js +1 -1
  441. package/es-modules/masters/modules/treemap.src.js +5 -1
  442. package/es-modules/masters/modules/variable-pie.src.js +1 -1
  443. package/es-modules/masters/modules/variwide.src.js +1 -1
  444. package/es-modules/masters/modules/vector.src.js +1 -1
  445. package/es-modules/masters/modules/venn.src.js +1 -1
  446. package/es-modules/masters/modules/windbarb.src.js +1 -1
  447. package/es-modules/masters/modules/wordcloud.src.js +1 -1
  448. package/es-modules/masters/modules/xrange.src.js +1 -1
  449. package/es-modules/masters/themes/avocado.src.js +1 -1
  450. package/es-modules/masters/themes/brand-dark.src.js +1 -1
  451. package/es-modules/masters/themes/brand-light.src.js +1 -1
  452. package/es-modules/masters/themes/dark-blue.src.js +1 -1
  453. package/es-modules/masters/themes/dark-green.src.js +1 -1
  454. package/es-modules/masters/themes/dark-unica.src.js +1 -1
  455. package/es-modules/masters/themes/gray.src.js +1 -1
  456. package/es-modules/masters/themes/grid-light.src.js +1 -1
  457. package/es-modules/masters/themes/grid.src.js +1 -1
  458. package/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
  459. package/es-modules/masters/themes/high-contrast-light.src.js +1 -1
  460. package/es-modules/masters/themes/sand-signika.src.js +1 -1
  461. package/es-modules/masters/themes/skies.src.js +1 -1
  462. package/es-modules/masters/themes/sunset.src.js +1 -1
  463. package/highcharts-3d.js +99 -98
  464. package/highcharts-3d.js.map +1 -1
  465. package/highcharts-3d.src.js +51 -21
  466. package/highcharts-gantt.js +811 -801
  467. package/highcharts-gantt.js.map +1 -1
  468. package/highcharts-gantt.src.js +2020 -1607
  469. package/highcharts-more.d.ts +10 -0
  470. package/highcharts-more.js +194 -194
  471. package/highcharts-more.js.map +1 -1
  472. package/highcharts-more.src.d.ts +10 -0
  473. package/highcharts-more.src.js +3512 -3364
  474. package/highcharts.d.ts +12336 -965
  475. package/highcharts.js +595 -586
  476. package/highcharts.js.map +1 -1
  477. package/highcharts.src.d.ts +12336 -965
  478. package/highcharts.src.js +1047 -665
  479. package/highmaps.js +763 -728
  480. package/highmaps.js.map +1 -1
  481. package/highmaps.src.js +4482 -2639
  482. package/highstock.js +798 -788
  483. package/highstock.js.map +1 -1
  484. package/highstock.src.js +1177 -739
  485. package/indicators/acceleration-bands.d.ts +1 -17
  486. package/indicators/acceleration-bands.js +11 -11
  487. package/indicators/acceleration-bands.js.map +1 -1
  488. package/indicators/acceleration-bands.src.d.ts +1 -17
  489. package/indicators/acceleration-bands.src.js +99 -100
  490. package/indicators/accumulation-distribution.js +5 -5
  491. package/indicators/accumulation-distribution.js.map +1 -1
  492. package/indicators/accumulation-distribution.src.js +11 -2
  493. package/indicators/ao.js +6 -6
  494. package/indicators/ao.js.map +1 -1
  495. package/indicators/ao.src.js +13 -4
  496. package/indicators/apo.js +5 -5
  497. package/indicators/apo.js.map +1 -1
  498. package/indicators/apo.src.js +11 -2
  499. package/indicators/aroon-oscillator.d.ts +1 -17
  500. package/indicators/aroon-oscillator.js +10 -10
  501. package/indicators/aroon-oscillator.js.map +1 -1
  502. package/indicators/aroon-oscillator.src.d.ts +1 -17
  503. package/indicators/aroon-oscillator.src.js +99 -100
  504. package/indicators/aroon.d.ts +1 -17
  505. package/indicators/aroon.js +11 -11
  506. package/indicators/aroon.js.map +1 -1
  507. package/indicators/aroon.src.d.ts +1 -17
  508. package/indicators/aroon.src.js +99 -100
  509. package/indicators/atr.js +5 -5
  510. package/indicators/atr.js.map +1 -1
  511. package/indicators/atr.src.js +11 -2
  512. package/indicators/bollinger-bands.d.ts +1 -17
  513. package/indicators/bollinger-bands.js +11 -12
  514. package/indicators/bollinger-bands.js.map +1 -1
  515. package/indicators/bollinger-bands.src.d.ts +1 -17
  516. package/indicators/bollinger-bands.src.js +102 -103
  517. package/indicators/cci.js +5 -5
  518. package/indicators/cci.js.map +1 -1
  519. package/indicators/cci.src.js +11 -2
  520. package/indicators/chaikin.js +8 -8
  521. package/indicators/chaikin.js.map +1 -1
  522. package/indicators/chaikin.src.js +11 -2
  523. package/indicators/cmf.js +6 -6
  524. package/indicators/cmf.js.map +1 -1
  525. package/indicators/cmf.src.js +11 -2
  526. package/indicators/cmo.js +5 -5
  527. package/indicators/cmo.js.map +1 -1
  528. package/indicators/cmo.src.js +11 -2
  529. package/indicators/dema.js +5 -5
  530. package/indicators/dema.js.map +1 -1
  531. package/indicators/dema.src.js +11 -2
  532. package/indicators/disparity-index.js +6 -6
  533. package/indicators/disparity-index.js.map +1 -1
  534. package/indicators/disparity-index.src.js +11 -2
  535. package/indicators/dmi.js +12 -12
  536. package/indicators/dmi.js.map +1 -1
  537. package/indicators/dmi.src.js +109 -106
  538. package/indicators/dpo.js +5 -5
  539. package/indicators/dpo.js.map +1 -1
  540. package/indicators/dpo.src.js +11 -2
  541. package/indicators/ema.js +2 -1
  542. package/indicators/ema.js.map +1 -1
  543. package/indicators/ema.src.js +10 -1
  544. package/indicators/ichimoku-kinko-hyo.js +16 -16
  545. package/indicators/ichimoku-kinko-hyo.js.map +1 -1
  546. package/indicators/ichimoku-kinko-hyo.src.js +11 -2
  547. package/indicators/indicators-all.d.ts +1 -17
  548. package/indicators/indicators-all.js +198 -196
  549. package/indicators/indicators-all.js.map +1 -1
  550. package/indicators/indicators-all.src.d.ts +1 -17
  551. package/indicators/indicators-all.src.js +151 -129
  552. package/indicators/indicators.js +13 -12
  553. package/indicators/indicators.js.map +1 -1
  554. package/indicators/indicators.src.js +21 -5
  555. package/indicators/keltner-channels.d.ts +1 -17
  556. package/indicators/keltner-channels.js +11 -11
  557. package/indicators/keltner-channels.js.map +1 -1
  558. package/indicators/keltner-channels.src.d.ts +1 -17
  559. package/indicators/keltner-channels.src.js +99 -100
  560. package/indicators/klinger.js +14 -14
  561. package/indicators/klinger.js.map +1 -1
  562. package/indicators/klinger.src.js +99 -100
  563. package/indicators/macd.js +13 -11
  564. package/indicators/macd.js.map +1 -1
  565. package/indicators/macd.src.js +35 -14
  566. package/indicators/mfi.js +6 -6
  567. package/indicators/mfi.js.map +1 -1
  568. package/indicators/mfi.src.js +11 -2
  569. package/indicators/momentum.js +5 -5
  570. package/indicators/momentum.js.map +1 -1
  571. package/indicators/momentum.src.js +11 -2
  572. package/indicators/natr.js +5 -4
  573. package/indicators/natr.js.map +1 -1
  574. package/indicators/natr.src.js +11 -2
  575. package/indicators/obv.js +5 -5
  576. package/indicators/obv.js.map +1 -1
  577. package/indicators/obv.src.js +11 -2
  578. package/indicators/pivot-points.js +11 -11
  579. package/indicators/pivot-points.js.map +1 -1
  580. package/indicators/pivot-points.src.js +11 -2
  581. package/indicators/ppo.js +5 -5
  582. package/indicators/ppo.js.map +1 -1
  583. package/indicators/ppo.src.js +11 -2
  584. package/indicators/price-channel.d.ts +1 -17
  585. package/indicators/price-channel.js +11 -11
  586. package/indicators/price-channel.js.map +1 -1
  587. package/indicators/price-channel.src.d.ts +1 -17
  588. package/indicators/price-channel.src.js +99 -100
  589. package/indicators/price-envelopes.js +8 -8
  590. package/indicators/price-envelopes.js.map +1 -1
  591. package/indicators/price-envelopes.src.js +11 -2
  592. package/indicators/psar.js +7 -6
  593. package/indicators/psar.js.map +1 -1
  594. package/indicators/psar.src.js +11 -2
  595. package/indicators/regressions.js +12 -12
  596. package/indicators/regressions.js.map +1 -1
  597. package/indicators/regressions.src.js +11 -2
  598. package/indicators/roc.js +5 -5
  599. package/indicators/roc.js.map +1 -1
  600. package/indicators/roc.src.js +11 -2
  601. package/indicators/rsi.js +6 -5
  602. package/indicators/rsi.js.map +1 -1
  603. package/indicators/rsi.src.js +11 -2
  604. package/indicators/slow-stochastic.js +5 -5
  605. package/indicators/slow-stochastic.js.map +1 -1
  606. package/indicators/slow-stochastic.src.js +11 -2
  607. package/indicators/stochastic.d.ts +1 -17
  608. package/indicators/stochastic.js +12 -12
  609. package/indicators/stochastic.js.map +1 -1
  610. package/indicators/stochastic.src.d.ts +1 -17
  611. package/indicators/stochastic.src.js +99 -100
  612. package/indicators/supertrend.js +10 -10
  613. package/indicators/supertrend.js.map +1 -1
  614. package/indicators/supertrend.src.js +14 -5
  615. package/indicators/tema.js +6 -6
  616. package/indicators/tema.js.map +1 -1
  617. package/indicators/tema.src.js +11 -2
  618. package/indicators/trendline.js +5 -5
  619. package/indicators/trendline.js.map +1 -1
  620. package/indicators/trendline.src.js +11 -2
  621. package/indicators/trix.js +4 -4
  622. package/indicators/trix.js.map +1 -1
  623. package/indicators/trix.src.js +11 -2
  624. package/indicators/volume-by-price.js +17 -17
  625. package/indicators/volume-by-price.js.map +1 -1
  626. package/indicators/volume-by-price.src.js +11 -2
  627. package/indicators/vwap.js +5 -5
  628. package/indicators/vwap.js.map +1 -1
  629. package/indicators/vwap.src.js +11 -2
  630. package/indicators/williams-r.js +6 -5
  631. package/indicators/williams-r.js.map +1 -1
  632. package/indicators/williams-r.src.js +11 -2
  633. package/indicators/wma.js +5 -5
  634. package/indicators/wma.js.map +1 -1
  635. package/indicators/wma.src.js +11 -2
  636. package/indicators/zigzag.js +6 -6
  637. package/indicators/zigzag.js.map +1 -1
  638. package/indicators/zigzag.src.js +11 -2
  639. package/lib/jspdf.js +299 -184
  640. package/lib/jspdf.src.js +25266 -18067
  641. package/lib/svg2pdf.js +35 -31
  642. package/lib/svg2pdf.src.js +5721 -4179
  643. package/modules/accessibility.js +242 -237
  644. package/modules/accessibility.js.map +1 -1
  645. package/modules/accessibility.src.js +599 -390
  646. package/modules/annotations-advanced.js +192 -192
  647. package/modules/annotations-advanced.js.map +1 -1
  648. package/modules/annotations-advanced.src.js +96 -47
  649. package/modules/annotations.js +126 -126
  650. package/modules/annotations.js.map +1 -1
  651. package/modules/annotations.src.js +67 -25
  652. package/modules/arc-diagram.js +25 -0
  653. package/modules/arc-diagram.js.map +1 -0
  654. package/modules/arc-diagram.src.js +778 -0
  655. package/modules/arrow-symbols.js +4 -3
  656. package/modules/arrow-symbols.js.map +1 -1
  657. package/modules/arrow-symbols.src.js +11 -2
  658. package/modules/boost-canvas.js +16 -15
  659. package/modules/boost-canvas.js.map +1 -1
  660. package/modules/boost-canvas.src.js +22 -7
  661. package/modules/boost.js +81 -79
  662. package/modules/boost.js.map +1 -1
  663. package/modules/boost.src.js +90 -51
  664. package/modules/broken-axis.js +13 -13
  665. package/modules/broken-axis.js.map +1 -1
  666. package/modules/broken-axis.src.js +11 -2
  667. package/modules/bullet.js +9 -9
  668. package/modules/bullet.js.map +1 -1
  669. package/modules/bullet.src.js +12 -6
  670. package/modules/coloraxis.js +24 -24
  671. package/modules/coloraxis.js.map +1 -1
  672. package/modules/coloraxis.src.js +37 -11
  673. package/modules/current-date-indicator.js +5 -4
  674. package/modules/current-date-indicator.js.map +1 -1
  675. package/modules/current-date-indicator.src.js +12 -3
  676. package/modules/cylinder.js +11 -11
  677. package/modules/cylinder.js.map +1 -1
  678. package/modules/cylinder.src.js +11 -2
  679. package/modules/data.d.ts +12 -12
  680. package/modules/data.js +33 -33
  681. package/modules/data.js.map +1 -1
  682. package/modules/data.src.d.ts +12 -12
  683. package/modules/data.src.js +906 -846
  684. package/modules/datagrouping.js +21 -20
  685. package/modules/datagrouping.js.map +1 -1
  686. package/modules/datagrouping.src.js +19 -5
  687. package/modules/debugger.js +8 -7
  688. package/modules/debugger.js.map +1 -1
  689. package/modules/debugger.src.js +15 -2
  690. package/modules/dependency-wheel.js +12 -11
  691. package/modules/dependency-wheel.js.map +1 -1
  692. package/modules/dependency-wheel.src.js +14 -5
  693. package/modules/dotplot.js +6 -6
  694. package/modules/dotplot.js.map +1 -1
  695. package/modules/dotplot.src.js +11 -2
  696. package/modules/drag-panes.js +10 -10
  697. package/modules/drag-panes.js.map +1 -1
  698. package/modules/drag-panes.src.js +12 -3
  699. package/modules/draggable-points.js +35 -34
  700. package/modules/draggable-points.js.map +1 -1
  701. package/modules/draggable-points.src.js +20 -9
  702. package/modules/drilldown.d.ts +19 -0
  703. package/modules/drilldown.js +37 -25
  704. package/modules/drilldown.js.map +1 -1
  705. package/modules/drilldown.src.d.ts +19 -0
  706. package/modules/drilldown.src.js +1124 -108
  707. package/modules/dumbbell.d.ts +4 -0
  708. package/modules/dumbbell.js +17 -17
  709. package/modules/dumbbell.js.map +1 -1
  710. package/modules/dumbbell.src.d.ts +4 -0
  711. package/modules/dumbbell.src.js +34 -13
  712. package/modules/export-data.js +24 -21
  713. package/modules/export-data.js.map +1 -1
  714. package/modules/export-data.src.js +87 -14
  715. package/modules/exporting.d.ts +8 -8
  716. package/modules/exporting.js +39 -39
  717. package/modules/exporting.js.map +1 -1
  718. package/modules/exporting.src.d.ts +8 -8
  719. package/modules/exporting.src.js +270 -135
  720. package/modules/full-screen.js +8 -7
  721. package/modules/full-screen.js.map +1 -1
  722. package/modules/full-screen.src.js +135 -58
  723. package/modules/funnel.js +12 -12
  724. package/modules/funnel.js.map +1 -1
  725. package/modules/funnel.src.js +13 -4
  726. package/modules/funnel3d.js +21 -21
  727. package/modules/funnel3d.js.map +1 -1
  728. package/modules/funnel3d.src.js +11 -2
  729. package/modules/gantt.js +218 -217
  730. package/modules/gantt.js.map +1 -1
  731. package/modules/gantt.src.js +983 -943
  732. package/modules/grid-axis.js +23 -23
  733. package/modules/grid-axis.js.map +1 -1
  734. package/modules/grid-axis.src.js +900 -890
  735. package/modules/heatmap.js +40 -39
  736. package/modules/heatmap.js.map +1 -1
  737. package/modules/heatmap.src.js +160 -113
  738. package/modules/heikinashi.js +8 -8
  739. package/modules/heikinashi.js.map +1 -1
  740. package/modules/heikinashi.src.js +11 -2
  741. package/modules/histogram-bellcurve.js +13 -13
  742. package/modules/histogram-bellcurve.js.map +1 -1
  743. package/modules/histogram-bellcurve.src.js +11 -2
  744. package/modules/hollowcandlestick.js +9 -9
  745. package/modules/hollowcandlestick.js.map +1 -1
  746. package/modules/hollowcandlestick.src.js +19 -10
  747. package/modules/item-series.js +12 -12
  748. package/modules/item-series.js.map +1 -1
  749. package/modules/item-series.src.js +11 -2
  750. package/modules/lollipop.js +7 -7
  751. package/modules/lollipop.js.map +1 -1
  752. package/modules/lollipop.src.js +12 -3
  753. package/modules/map.d.ts +80 -43
  754. package/modules/map.js +171 -144
  755. package/modules/map.js.map +1 -1
  756. package/modules/map.src.d.ts +80 -43
  757. package/modules/map.src.js +8292 -6822
  758. package/modules/marker-clusters.js +36 -36
  759. package/modules/marker-clusters.js.map +1 -1
  760. package/modules/marker-clusters.src.js +48 -28
  761. package/modules/networkgraph.d.ts +1 -12
  762. package/modules/networkgraph.js +46 -45
  763. package/modules/networkgraph.js.map +1 -1
  764. package/modules/networkgraph.src.d.ts +1 -12
  765. package/modules/networkgraph.src.js +127 -55
  766. package/modules/no-data-to-display.js +5 -5
  767. package/modules/no-data-to-display.js.map +1 -1
  768. package/modules/no-data-to-display.src.js +12 -3
  769. package/modules/offline-exporting.js +20 -18
  770. package/modules/offline-exporting.js.map +1 -1
  771. package/modules/offline-exporting.src.js +129 -28
  772. package/modules/oldie-polyfills.js +7 -7
  773. package/modules/oldie-polyfills.js.map +1 -1
  774. package/modules/oldie-polyfills.src.js +11 -2
  775. package/modules/oldie.js +30 -30
  776. package/modules/oldie.js.map +1 -1
  777. package/modules/oldie.src.js +13 -4
  778. package/modules/organization.js +16 -14
  779. package/modules/organization.js.map +1 -1
  780. package/modules/organization.src.js +168 -34
  781. package/modules/overlapping-datalabels.js +3 -2
  782. package/modules/overlapping-datalabels.js.map +1 -1
  783. package/modules/overlapping-datalabels.src.js +11 -2
  784. package/modules/parallel-coordinates.js +11 -11
  785. package/modules/parallel-coordinates.js.map +1 -1
  786. package/modules/parallel-coordinates.src.js +12 -3
  787. package/modules/pareto.js +7 -7
  788. package/modules/pareto.js.map +1 -1
  789. package/modules/pareto.src.js +11 -2
  790. package/modules/pathfinder.js +31 -31
  791. package/modules/pathfinder.js.map +1 -1
  792. package/modules/pathfinder.src.js +11 -2
  793. package/modules/pattern-fill.js +15 -14
  794. package/modules/pattern-fill.js.map +1 -1
  795. package/modules/pattern-fill.src.js +25 -3
  796. package/modules/price-indicator.js +5 -5
  797. package/modules/price-indicator.js.map +1 -1
  798. package/modules/price-indicator.src.js +11 -2
  799. package/modules/pyramid3d.js +4 -4
  800. package/modules/pyramid3d.js.map +1 -1
  801. package/modules/pyramid3d.src.js +11 -2
  802. package/modules/sankey.d.ts +1 -12
  803. package/modules/sankey.js +32 -29
  804. package/modules/sankey.js.map +1 -1
  805. package/modules/sankey.src.d.ts +1 -12
  806. package/modules/sankey.src.js +422 -207
  807. package/modules/series-label.js +18 -17
  808. package/modules/series-label.js.map +1 -1
  809. package/modules/series-label.src.js +482 -386
  810. package/modules/series-on-point.js +18 -0
  811. package/modules/series-on-point.js.map +1 -0
  812. package/modules/series-on-point.src.js +464 -0
  813. package/modules/solid-gauge.js +10 -10
  814. package/modules/solid-gauge.js.map +1 -1
  815. package/modules/solid-gauge.src.js +15 -6
  816. package/modules/sonification.js +59 -59
  817. package/modules/sonification.js.map +1 -1
  818. package/modules/sonification.src.js +13 -8
  819. package/modules/static-scale.js +5 -4
  820. package/modules/static-scale.js.map +1 -1
  821. package/modules/static-scale.src.js +11 -2
  822. package/modules/stock-tools.js +167 -167
  823. package/modules/stock-tools.js.map +1 -1
  824. package/modules/stock-tools.src.js +118 -67
  825. package/modules/stock.js +205 -204
  826. package/modules/stock.js.map +1 -1
  827. package/modules/stock.src.js +141 -76
  828. package/modules/streamgraph.js +5 -4
  829. package/modules/streamgraph.js.map +1 -1
  830. package/modules/streamgraph.src.js +11 -2
  831. package/modules/sunburst.d.ts +3 -0
  832. package/modules/sunburst.js +73 -60
  833. package/modules/sunburst.js.map +1 -1
  834. package/modules/sunburst.src.d.ts +3 -0
  835. package/modules/sunburst.src.js +1391 -406
  836. package/modules/tilemap.js +17 -17
  837. package/modules/tilemap.js.map +1 -1
  838. package/modules/tilemap.src.js +11 -2
  839. package/modules/timeline.js +18 -18
  840. package/modules/timeline.js.map +1 -1
  841. package/modules/timeline.src.js +14 -5
  842. package/modules/treegrid.js +57 -56
  843. package/modules/treegrid.js.map +1 -1
  844. package/modules/treegrid.src.js +913 -892
  845. package/modules/treemap.d.ts +3 -0
  846. package/modules/treemap.js +54 -41
  847. package/modules/treemap.js.map +1 -1
  848. package/modules/treemap.src.d.ts +3 -0
  849. package/modules/treemap.src.js +1229 -255
  850. package/modules/variable-pie.js +9 -9
  851. package/modules/variable-pie.js.map +1 -1
  852. package/modules/variable-pie.src.js +11 -2
  853. package/modules/variwide.js +12 -12
  854. package/modules/variwide.js.map +1 -1
  855. package/modules/variwide.src.js +11 -2
  856. package/modules/vector.js +8 -7
  857. package/modules/vector.js.map +1 -1
  858. package/modules/vector.src.js +11 -2
  859. package/modules/venn.js +31 -31
  860. package/modules/venn.js.map +1 -1
  861. package/modules/venn.src.js +88 -105
  862. package/modules/windbarb.js +15 -15
  863. package/modules/windbarb.js.map +1 -1
  864. package/modules/windbarb.src.js +11 -2
  865. package/modules/wordcloud.js +23 -23
  866. package/modules/wordcloud.js.map +1 -1
  867. package/modules/wordcloud.src.js +92 -109
  868. package/modules/xrange.js +16 -16
  869. package/modules/xrange.js.map +1 -1
  870. package/modules/xrange.src.js +11 -2
  871. package/package.json +1 -1
  872. package/themes/avocado.js +4 -3
  873. package/themes/avocado.js.map +1 -1
  874. package/themes/avocado.src.js +11 -2
  875. package/themes/brand-dark.js +9 -8
  876. package/themes/brand-dark.js.map +1 -1
  877. package/themes/brand-dark.src.js +11 -2
  878. package/themes/brand-light.js +8 -8
  879. package/themes/brand-light.js.map +1 -1
  880. package/themes/brand-light.src.js +11 -2
  881. package/themes/dark-blue.js +9 -8
  882. package/themes/dark-blue.js.map +1 -1
  883. package/themes/dark-blue.src.js +11 -2
  884. package/themes/dark-green.js +9 -8
  885. package/themes/dark-green.js.map +1 -1
  886. package/themes/dark-green.src.js +11 -2
  887. package/themes/dark-unica.js +8 -7
  888. package/themes/dark-unica.js.map +1 -1
  889. package/themes/dark-unica.src.js +11 -2
  890. package/themes/gray.js +9 -8
  891. package/themes/gray.js.map +1 -1
  892. package/themes/gray.src.js +11 -2
  893. package/themes/grid-light.js +5 -4
  894. package/themes/grid-light.js.map +1 -1
  895. package/themes/grid-light.src.js +11 -2
  896. package/themes/grid.js +5 -5
  897. package/themes/grid.js.map +1 -1
  898. package/themes/grid.src.js +11 -2
  899. package/themes/high-contrast-dark.js +7 -7
  900. package/themes/high-contrast-dark.js.map +1 -1
  901. package/themes/high-contrast-dark.src.js +21 -12
  902. package/themes/high-contrast-light.js +3 -3
  903. package/themes/high-contrast-light.js.map +1 -1
  904. package/themes/high-contrast-light.src.js +21 -12
  905. package/themes/sand-signika.js +5 -5
  906. package/themes/sand-signika.js.map +1 -1
  907. package/themes/sand-signika.src.js +11 -2
  908. package/themes/skies.js +5 -5
  909. package/themes/skies.js.map +1 -1
  910. package/themes/skies.src.js +11 -2
  911. package/themes/sunset.js +3 -3
  912. package/themes/sunset.js.map +1 -1
  913. package/themes/sunset.src.js +11 -2
  914. package/es-modules/Extensions/Polar.js +0 -740
  915. package/es-modules/Maps/ProjectionDefinition.js +0 -9
  916. package/es-modules/Series/ColorMapMixin.js +0 -84
  917. package/es-modules/Series/DrawPointComposition.js +0 -111
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v9.3.3 (2022-02-01)
2
+ * @license Highcharts JS v10.2.0 (2022-07-05)
3
3
  *
4
4
  * Data module
5
5
  *
@@ -7,7 +7,6 @@
7
7
  *
8
8
  * License: www.highcharts.com/license
9
9
  */
10
- 'use strict';
11
10
  (function (factory) {
12
11
  if (typeof module === 'object' && module.exports) {
13
12
  factory['default'] = factory;
@@ -22,10 +21,20 @@
22
21
  factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
23
22
  }
24
23
  }(function (Highcharts) {
24
+ 'use strict';
25
25
  var _modules = Highcharts ? Highcharts._modules : {};
26
26
  function _registerModule(obj, path, args, fn) {
27
27
  if (!obj.hasOwnProperty(path)) {
28
28
  obj[path] = fn.apply(null, args);
29
+
30
+ if (typeof CustomEvent === 'function') {
31
+ window.dispatchEvent(
32
+ new CustomEvent(
33
+ 'HighchartsModuleLoaded',
34
+ { detail: { path: path, module: obj[path] }
35
+ })
36
+ );
37
+ }
29
38
  }
30
39
  }
31
40
  _registerModule(_modules, 'Core/HttpUtilities.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (G, U) {
@@ -43,29 +52,24 @@
43
52
  discardElement = U.discardElement,
44
53
  merge = U.merge,
45
54
  objectEach = U.objectEach;
55
+ /* *
56
+ *
57
+ * Functions
58
+ *
59
+ * */
46
60
  /**
47
61
  * Perform an Ajax call.
48
62
  *
49
63
  * @function Highcharts.ajax
50
64
  *
51
- * @param {Partial<Highcharts.AjaxSettingsObject>} attr
65
+ * @param {Highcharts.AjaxSettingsObject} settings
52
66
  * The Ajax settings to use.
53
67
  *
54
68
  * @return {false|undefined}
55
69
  * Returns false, if error occured.
56
70
  */
57
- function ajax(attr) {
58
- var options = merge(true, {
59
- url: false,
60
- type: 'get',
61
- dataType: 'json',
62
- success: false,
63
- error: false,
64
- data: false,
65
- headers: {}
66
- },
67
- attr),
68
- headers = {
71
+ function ajax(settings) {
72
+ var headers = {
69
73
  json: 'application/json',
70
74
  xml: 'application/xml',
71
75
  text: 'text/plain',
@@ -73,6 +77,7 @@
73
77
  },
74
78
  r = new XMLHttpRequest();
75
79
  /**
80
+ * Private error handler.
76
81
  * @private
77
82
  * @param {XMLHttpRequest} xhr
78
83
  * Internal request object.
@@ -80,49 +85,53 @@
80
85
  * Occured error.
81
86
  */
82
87
  function handleError(xhr, err) {
83
- if (options.error) {
84
- options.error(xhr, err);
88
+ if (settings.error) {
89
+ settings.error(xhr, err);
85
90
  }
86
91
  else {
87
92
  // @todo Maybe emit a highcharts error event here
88
93
  }
89
94
  }
90
- if (!options.url) {
95
+ if (!settings.url) {
91
96
  return false;
92
97
  }
93
- r.open(options.type.toUpperCase(), options.url, true);
94
- if (!options.headers['Content-Type']) {
95
- r.setRequestHeader('Content-Type', headers[options.dataType] || headers.text);
98
+ r.open((settings.type || 'get').toUpperCase(), settings.url, true);
99
+ if (!settings.headers || !settings.headers['Content-Type']) {
100
+ r.setRequestHeader('Content-Type', headers[settings.dataType || 'json'] || headers.text);
96
101
  }
97
- objectEach(options.headers, function (val, key) {
102
+ objectEach(settings.headers, function (val, key) {
98
103
  r.setRequestHeader(key, val);
99
104
  });
105
+ if (settings.responseType) {
106
+ r.responseType = settings.responseType;
107
+ }
100
108
  // @todo lacking timeout handling
101
109
  r.onreadystatechange = function () {
102
110
  var res;
103
111
  if (r.readyState === 4) {
104
112
  if (r.status === 200) {
105
- res = r.responseText;
106
- if (options.dataType === 'json') {
107
- try {
108
- res = JSON.parse(res);
109
- }
110
- catch (e) {
111
- return handleError(r, e);
113
+ if (settings.responseType !== 'blob') {
114
+ res = r.responseText;
115
+ if (settings.dataType === 'json') {
116
+ try {
117
+ res = JSON.parse(res);
118
+ }
119
+ catch (e) {
120
+ if (e instanceof Error) {
121
+ return handleError(r, e);
122
+ }
123
+ }
112
124
  }
113
125
  }
114
- return options.success && options.success(res);
126
+ return settings.success && settings.success(res, r);
115
127
  }
116
128
  handleError(r, r.responseText);
117
129
  }
118
130
  };
119
- try {
120
- options.data = JSON.stringify(options.data);
131
+ if (settings.data && typeof settings.data !== 'string') {
132
+ settings.data = JSON.stringify(settings.data);
121
133
  }
122
- catch (e) {
123
- // empty
124
- }
125
- r.send(options.data || true);
134
+ r.send(settings.data);
126
135
  }
127
136
  /**
128
137
  * Get a JSON resource over XHR, also supporting CORS without preflight.
@@ -179,7 +188,7 @@
179
188
  type: 'hidden',
180
189
  name: name,
181
190
  value: val
182
- }, null, form);
191
+ }, void 0, form);
183
192
  });
184
193
  // submit
185
194
  form.submit();
@@ -196,33 +205,38 @@
196
205
  getJSON: getJSON,
197
206
  post: post
198
207
  };
208
+ /* *
209
+ *
210
+ * API Declarations
211
+ *
212
+ * */
199
213
  /**
200
214
  * @interface Highcharts.AjaxSettingsObject
201
215
  */ /**
202
216
  * The payload to send.
203
217
  *
204
218
  * @name Highcharts.AjaxSettingsObject#data
205
- * @type {string|Highcharts.Dictionary<any>}
219
+ * @type {string|Highcharts.Dictionary<any>|undefined}
206
220
  */ /**
207
221
  * The data type expected.
208
222
  * @name Highcharts.AjaxSettingsObject#dataType
209
- * @type {"json"|"xml"|"text"|"octet"}
223
+ * @type {"json"|"xml"|"text"|"octet"|undefined}
210
224
  */ /**
211
225
  * Function to call on error.
212
226
  * @name Highcharts.AjaxSettingsObject#error
213
- * @type {Function}
227
+ * @type {Function|undefined}
214
228
  */ /**
215
229
  * The headers; keyed on header name.
216
230
  * @name Highcharts.AjaxSettingsObject#headers
217
- * @type {Highcharts.Dictionary<string>}
231
+ * @type {Highcharts.Dictionary<string>|undefined}
218
232
  */ /**
219
233
  * Function to call on success.
220
234
  * @name Highcharts.AjaxSettingsObject#success
221
- * @type {Function}
235
+ * @type {Function|undefined}
222
236
  */ /**
223
237
  * The HTTP method to use. For example GET or POST.
224
238
  * @name Highcharts.AjaxSettingsObject#type
225
- * @type {string}
239
+ * @type {string|undefined}
226
240
  */ /**
227
241
  * The URL to call.
228
242
  * @name Highcharts.AjaxSettingsObject#url
@@ -232,7 +246,7 @@
232
246
 
233
247
  return HttpUtilities;
234
248
  });
235
- _registerModule(_modules, 'Extensions/Data.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/HttpUtilities.js'], _modules['Core/Series/Point.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (Chart, G, HU, Point, SeriesRegistry, U) {
249
+ _registerModule(_modules, 'Extensions/Data.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/HttpUtilities.js'], _modules['Core/Series/Point.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js'], _modules['Core/DefaultOptions.js']], function (Chart, G, HU, Point, SeriesRegistry, U, D) {
236
250
  /* *
237
251
  *
238
252
  * Data module
@@ -247,6 +261,7 @@
247
261
  var doc = G.doc;
248
262
  var ajax = HU.ajax;
249
263
  var seriesTypes = SeriesRegistry.seriesTypes;
264
+ var getOptions = D.getOptions;
250
265
  var addEvent = U.addEvent,
251
266
  defined = U.defined,
252
267
  extend = U.extend,
@@ -256,492 +271,61 @@
256
271
  objectEach = U.objectEach,
257
272
  pick = U.pick,
258
273
  splat = U.splat;
259
- /**
260
- * Callback function to modify the CSV before parsing it by the data module.
261
- *
262
- * @callback Highcharts.DataBeforeParseCallbackFunction
263
- *
264
- * @param {string} csv
265
- * The CSV to modify.
266
- *
267
- * @return {string}
268
- * The CSV to parse.
269
- */
270
- /**
271
- * Callback function that gets called after parsing data.
272
- *
273
- * @callback Highcharts.DataCompleteCallbackFunction
274
- *
275
- * @param {Highcharts.Options} chartOptions
276
- * The chart options that were used.
277
- */
278
- /**
279
- * Callback function that returns the correspondig Date object to a match.
280
- *
281
- * @callback Highcharts.DataDateFormatCallbackFunction
282
- *
283
- * @param {Array<number>} match
284
- *
285
- * @return {number}
286
- */
287
- /**
288
- * Structure for alternative date formats to parse.
289
- *
290
- * @interface Highcharts.DataDateFormatObject
291
- */ /**
292
- * @name Highcharts.DataDateFormatObject#alternative
293
- * @type {string|undefined}
294
- */ /**
295
- * @name Highcharts.DataDateFormatObject#parser
296
- * @type {Highcharts.DataDateFormatCallbackFunction}
297
- */ /**
298
- * @name Highcharts.DataDateFormatObject#regex
299
- * @type {global.RegExp}
300
- */
301
- /**
302
- * Possible types for a data item in a column or row.
303
- *
304
- * @typedef {number|string|null} Highcharts.DataValueType
305
- */
306
- /**
307
- * Callback function to parse string representations of dates into
308
- * JavaScript timestamps (milliseconds since 1.1.1970).
309
- *
310
- * @callback Highcharts.DataParseDateCallbackFunction
311
- *
312
- * @param {string} dateValue
313
- *
314
- * @return {number}
315
- * Timestamp (milliseconds since 1.1.1970) as integer for Date class.
316
- */
317
- /**
318
- * Callback function to access the parsed columns, the two-dimentional
319
- * input data array directly, before they are interpreted into series
320
- * data and categories.
321
- *
322
- * @callback Highcharts.DataParsedCallbackFunction
323
- *
324
- * @param {Array<Array<*>>} columns
325
- * The parsed columns by the data module.
326
- *
327
- * @return {boolean|undefined}
328
- * Return `false` to stop completion, or call `this.complete()` to
329
- * continue async.
330
- */
331
- /**
332
- * The Data module provides a simplified interface for adding data to
333
- * a chart from sources like CVS, HTML tables or grid views. See also
334
- * the [tutorial article on the Data module](
335
- * https://www.highcharts.com/docs/working-with-data/data-module).
336
- *
337
- * It requires the `modules/data.js` file to be loaded.
338
- *
339
- * Please note that the default way of adding data in Highcharts, without
340
- * the need of a module, is through the [series._type_.data](#series.line.data)
341
- * option.
342
- *
343
- * @sample {highcharts} highcharts/demo/column-parsed/
344
- * HTML table
345
- * @sample {highcharts} highcharts/data/csv/
346
- * CSV
347
- *
348
- * @since 4.0
349
- * @requires modules/data
350
- * @apioption data
351
- */
352
- /**
353
- * A callback function to modify the CSV before parsing it. Return the modified
354
- * string.
355
- *
356
- * @sample {highcharts} highcharts/demo/line-ajax/
357
- * Modify CSV before parse
358
- *
359
- * @type {Highcharts.DataBeforeParseCallbackFunction}
360
- * @since 6.1
361
- * @apioption data.beforeParse
362
- */
363
- /**
364
- * A two-dimensional array representing the input data on tabular form.
365
- * This input can be used when the data is already parsed, for example
366
- * from a grid view component. Each cell can be a string or number.
367
- * If not switchRowsAndColumns is set, the columns are interpreted as
368
- * series.
369
- *
370
- * @see [data.rows](#data.rows)
371
- *
372
- * @sample {highcharts} highcharts/data/columns/
373
- * Columns
374
- *
375
- * @type {Array<Array<Highcharts.DataValueType>>}
376
- * @since 4.0
377
- * @apioption data.columns
378
- */
379
- /**
380
- * The callback that is evaluated when the data is finished loading,
381
- * optionally from an external source, and parsed. The first argument
382
- * passed is a finished chart options object, containing the series.
383
- * These options can be extended with additional options and passed
384
- * directly to the chart constructor.
385
- *
386
- * @see [data.parsed](#data.parsed)
387
- *
388
- * @sample {highcharts} highcharts/data/complete/
389
- * Modify data on complete
390
- *
391
- * @type {Highcharts.DataCompleteCallbackFunction}
392
- * @since 4.0
393
- * @apioption data.complete
394
- */
395
- /**
396
- * A comma delimited string to be parsed. Related options are [startRow](
397
- * #data.startRow), [endRow](#data.endRow), [startColumn](#data.startColumn)
398
- * and [endColumn](#data.endColumn) to delimit what part of the table
399
- * is used. The [lineDelimiter](#data.lineDelimiter) and [itemDelimiter](
400
- * #data.itemDelimiter) options define the CSV delimiter formats.
401
- *
402
- * The built-in CSV parser doesn't support all flavours of CSV, so in
403
- * some cases it may be necessary to use an external CSV parser. See
404
- * [this example](https://jsfiddle.net/highcharts/u59176h4/) of parsing
405
- * CSV through the MIT licensed [Papa Parse](http://papaparse.com/)
406
- * library.
274
+ /* *
407
275
  *
408
- * @sample {highcharts} highcharts/data/csv/
409
- * Data from CSV
276
+ * Functions
410
277
  *
411
- * @type {string}
412
- * @since 4.0
413
- * @apioption data.csv
414
- */
278
+ * */
415
279
  /**
416
- * Which of the predefined date formats in Date.prototype.dateFormats
417
- * to use to parse date values. Defaults to a best guess based on what
418
- * format gives valid and ordered dates. Valid options include: `YYYY/mm/dd`,
419
- * `dd/mm/YYYY`, `mm/dd/YYYY`, `dd/mm/YY`, `mm/dd/YY`.
420
- *
421
- * @see [data.parseDate](#data.parseDate)
422
- *
423
- * @sample {highcharts} highcharts/data/dateformat-auto/
424
- * Best guess date format
425
- *
426
- * @type {string}
427
- * @since 4.0
428
- * @validvalue ["YYYY/mm/dd", "dd/mm/YYYY", "mm/dd/YYYY", "dd/mm/YYYY",
429
- * "dd/mm/YY", "mm/dd/YY"]
430
- * @apioption data.dateFormat
280
+ * @private
431
281
  */
432
- /**
433
- * The decimal point used for parsing numbers in the CSV.
434
- *
435
- * If both this and data.delimiter is set to `undefined`, the parser will
436
- * attempt to deduce the decimal point automatically.
282
+ function getFreeIndexes(numberOfColumns, seriesBuilders) {
283
+ var freeIndexes = [],
284
+ freeIndexValues = [];
285
+ var s,
286
+ i,
287
+ referencedIndexes;
288
+ // Add all columns as free
289
+ for (i = 0; i < numberOfColumns; i = i + 1) {
290
+ freeIndexes.push(true);
291
+ }
292
+ // Loop all defined builders and remove their referenced columns
293
+ for (s = 0; s < seriesBuilders.length; s = s + 1) {
294
+ referencedIndexes = seriesBuilders[s].getReferencedColumnIndexes();
295
+ for (i = 0; i < referencedIndexes.length; i = i + 1) {
296
+ freeIndexes[referencedIndexes[i]] = false;
297
+ }
298
+ }
299
+ // Collect the values for the free indexes
300
+ for (i = 0; i < freeIndexes.length; i = i + 1) {
301
+ if (freeIndexes[i]) {
302
+ freeIndexValues.push(i);
303
+ }
304
+ }
305
+ return freeIndexValues;
306
+ }
307
+ function hasURLOption(options) {
308
+ return Boolean(options &&
309
+ (options.rowsURL || options.csvURL || options.columnsURL));
310
+ }
311
+ /* *
437
312
  *
438
- * @sample {highcharts} highcharts/data/delimiters/
439
- * Comma as decimal point
313
+ * Class
440
314
  *
441
- * @type {string}
442
- * @default .
443
- * @since 4.1.0
444
- * @apioption data.decimalPoint
445
- */
315
+ * */
446
316
  /**
447
- * In tabular input data, the last column (indexed by 0) to use. Defaults
448
- * to the last column containing data.
449
- *
450
- * @sample {highcharts} highcharts/data/start-end/
451
- * Limited data
317
+ * The Data class
452
318
  *
453
- * @type {number}
454
- * @since 4.0
455
- * @apioption data.endColumn
456
- */
457
- /**
458
- * In tabular input data, the last row (indexed by 0) to use. Defaults
459
- * to the last row containing data.
319
+ * @requires module:modules/data
460
320
  *
461
- * @sample {highcharts} highcharts/data/start-end/
462
- * Limited data
321
+ * @class
322
+ * @name Highcharts.Data
463
323
  *
464
- * @type {number}
465
- * @since 4.0.4
466
- * @apioption data.endRow
467
- */
468
- /**
469
- * Whether to use the first row in the data set as series names.
324
+ * @param {Highcharts.DataOptions} dataOptions
470
325
  *
471
- * @sample {highcharts} highcharts/data/start-end/
472
- * Don't get series names from the CSV
473
- * @sample {highstock} highcharts/data/start-end/
474
- * Don't get series names from the CSV
326
+ * @param {Highcharts.Options} [chartOptions]
475
327
  *
476
- * @type {boolean}
477
- * @default true
478
- * @since 4.1.0
479
- * @product highcharts highstock gantt
480
- * @apioption data.firstRowAsNames
481
- */
482
- /**
483
- * The Google Spreadsheet API key required for access generated at [API Services
484
- * / Credentials](https://console.cloud.google.com/apis/credentials). See a
485
- * comprehensive tutorial for setting up the key at the
486
- * [Hands-On Data Visualization](https://handsondataviz.org/google-sheets-api-key.html)
487
- * book website.
488
- *
489
- * @sample {highcharts} highcharts/data/google-spreadsheet/
490
- * Load a Google Spreadsheet
491
- *
492
- * @type {string}
493
- * @since 9.2.2
494
- * @apioption data.googleAPIKey
495
- */
496
- /**
497
- * The key or `spreadsheetId` value for a Google Spreadsheet to load. See
498
- * [developers.google.com](https://developers.google.com/sheets/api/guides/concepts)
499
- * for how to find the `spreadsheetId`.
500
- *
501
- * In order for Google Sheets to load, a valid [googleAPIKey](#data.googleAPIKey)
502
- * must also be given.
503
- *
504
- * @sample {highcharts} highcharts/data/google-spreadsheet/
505
- * Load a Google Spreadsheet
506
- *
507
- * @type {string}
508
- * @since 4.0
509
- * @apioption data.googleSpreadsheetKey
510
- */
511
- /**
512
- * The Google Spreadsheet `range` to use in combination with
513
- * [googleSpreadsheetKey](#data.googleSpreadsheetKey). See
514
- * [developers.google.com](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get)
515
- * for details.
516
- *
517
- * If given, it takes precedence over `startColumn`, `endColumn`, `startRow` and
518
- * `endRow`.
519
- *
520
- * @example
521
- * googleSpreadsheetRange: 'Fruit Consumption' // Load a named worksheet
522
- * googleSpreadsheetRange: 'A:Z' // Load columns A to Z
523
- *
524
- * @sample {highcharts} highcharts/data/google-spreadsheet/
525
- * Load a Google Spreadsheet
526
- *
527
- * @type {string|undefined}
528
- * @since 9.2.2
529
- * @apioption data.googleSpreadsheetRange
530
- */
531
- /**
532
- * No longer works since v9.2.2, that uses Google Sheets API v4. Instead, use
533
- * the [googleSpreadsheetRange](#data.googleSpreadsheetRange) option to load a
534
- * specific sheet.
535
- *
536
- * @deprecated
537
- * @type {string}
538
- * @since 4.0
539
- * @apioption data.googleSpreadsheetWorksheet
540
- */
541
- /**
542
- * Item or cell delimiter for parsing CSV. Defaults to the tab character
543
- * `\t` if a tab character is found in the CSV string, if not it defaults
544
- * to `,`.
545
- *
546
- * If this is set to false or undefined, the parser will attempt to deduce
547
- * the delimiter automatically.
548
- *
549
- * @sample {highcharts} highcharts/data/delimiters/
550
- * Delimiters
551
- *
552
- * @type {string}
553
- * @since 4.0
554
- * @apioption data.itemDelimiter
555
- */
556
- /**
557
- * Line delimiter for parsing CSV.
558
- *
559
- * @sample {highcharts} highcharts/data/delimiters/
560
- * Delimiters
561
- *
562
- * @type {string}
563
- * @default \n
564
- * @since 4.0
565
- * @apioption data.lineDelimiter
566
- */
567
- /**
568
- * A callback function to access the parsed columns, the two-dimentional
569
- * input data array directly, before they are interpreted into series
570
- * data and categories. Return `false` to stop completion, or call
571
- * `this.complete()` to continue async.
572
- *
573
- * @see [data.complete](#data.complete)
574
- *
575
- * @sample {highcharts} highcharts/data/parsed/
576
- * Modify data after parse
577
- *
578
- * @type {Highcharts.DataParsedCallbackFunction}
579
- * @since 4.0
580
- * @apioption data.parsed
581
- */
582
- /**
583
- * A callback function to parse string representations of dates into
584
- * JavaScript timestamps. Should return an integer timestamp on success.
585
- *
586
- * @see [dateFormat](#data.dateFormat)
587
- *
588
- * @type {Highcharts.DataParseDateCallbackFunction}
589
- * @since 4.0
590
- * @apioption data.parseDate
591
- */
592
- /**
593
- * The same as the columns input option, but defining rows intead of
594
- * columns.
595
- *
596
- * @see [data.columns](#data.columns)
597
- *
598
- * @sample {highcharts} highcharts/data/rows/
599
- * Data in rows
600
- *
601
- * @type {Array<Array<Highcharts.DataValueType>>}
602
- * @since 4.0
603
- * @apioption data.rows
604
- */
605
- /**
606
- * An array containing dictionaries for each series. A dictionary exists of
607
- * Point property names as the key and the CSV column index as the value.
608
- *
609
- * @sample {highcharts} highcharts/data/seriesmapping-label/
610
- * Label from data set
611
- *
612
- * @type {Array<Highcharts.Dictionary<number>>}
613
- * @since 4.0.4
614
- * @apioption data.seriesMapping
615
- */
616
- /**
617
- * In tabular input data, the first column (indexed by 0) to use.
618
- *
619
- * @sample {highcharts} highcharts/data/start-end/
620
- * Limited data
621
- *
622
- * @type {number}
623
- * @default 0
624
- * @since 4.0
625
- * @apioption data.startColumn
626
- */
627
- /**
628
- * In tabular input data, the first row (indexed by 0) to use.
629
- *
630
- * @sample {highcharts} highcharts/data/start-end/
631
- * Limited data
632
- *
633
- * @type {number}
634
- * @default 0
635
- * @since 4.0
636
- * @apioption data.startRow
637
- */
638
- /**
639
- * Switch rows and columns of the input data, so that `this.columns`
640
- * effectively becomes the rows of the data set, and the rows are interpreted
641
- * as series.
642
- *
643
- * @sample {highcharts} highcharts/data/switchrowsandcolumns/
644
- * Switch rows and columns
645
- *
646
- * @type {boolean}
647
- * @default false
648
- * @since 4.0
649
- * @apioption data.switchRowsAndColumns
650
- */
651
- /**
652
- * An HTML table or the id of such to be parsed as input data. Related
653
- * options are `startRow`, `endRow`, `startColumn` and `endColumn` to
654
- * delimit what part of the table is used.
655
- *
656
- * @sample {highcharts} highcharts/demo/column-parsed/
657
- * Parsed table
658
- *
659
- * @type {string|global.HTMLElement}
660
- * @since 4.0
661
- * @apioption data.table
662
- */
663
- /**
664
- * An URL to a remote CSV dataset. Will be fetched when the chart is created
665
- * using Ajax.
666
- *
667
- * @sample highcharts/data/livedata-columns
668
- * Categorized bar chart with CSV and live polling
669
- * @sample highcharts/data/livedata-csv
670
- * Time based line chart with CSV and live polling
671
- *
672
- * @type {string}
673
- * @apioption data.csvURL
674
- */
675
- /**
676
- * A URL to a remote JSON dataset, structured as a row array.
677
- * Will be fetched when the chart is created using Ajax.
678
- *
679
- * @sample highcharts/data/livedata-rows
680
- * Rows with live polling
681
- *
682
- * @type {string}
683
- * @apioption data.rowsURL
684
- */
685
- /**
686
- * A URL to a remote JSON dataset, structured as a column array.
687
- * Will be fetched when the chart is created using Ajax.
688
- *
689
- * @sample highcharts/data/livedata-columns
690
- * Columns with live polling
691
- *
692
- * @type {string}
693
- * @apioption data.columnsURL
694
- */
695
- /**
696
- * Sets the refresh rate for data polling when importing remote dataset by
697
- * setting [data.csvURL](data.csvURL), [data.rowsURL](data.rowsURL),
698
- * [data.columnsURL](data.columnsURL), or
699
- * [data.googleSpreadsheetKey](data.googleSpreadsheetKey).
700
- *
701
- * Note that polling must be enabled by setting
702
- * [data.enablePolling](data.enablePolling) to true.
703
- *
704
- * The value is the number of seconds between pollings.
705
- * It cannot be set to less than 1 second.
706
- *
707
- * @sample highcharts/demo/live-data
708
- * Live data with user set refresh rate
709
- *
710
- * @default 1
711
- * @type {number}
712
- * @apioption data.dataRefreshRate
713
- */
714
- /**
715
- * Enables automatic refetching of remote datasets every _n_ seconds (defined by
716
- * setting [data.dataRefreshRate](data.dataRefreshRate)).
717
- *
718
- * Only works when either [data.csvURL](data.csvURL),
719
- * [data.rowsURL](data.rowsURL), [data.columnsURL](data.columnsURL), or
720
- * [data.googleSpreadsheetKey](data.googleSpreadsheetKey).
721
- *
722
- * @sample highcharts/demo/live-data
723
- * Live data
724
- * @sample highcharts/data/livedata-columns
725
- * Categorized bar chart with CSV and live polling
726
- *
727
- * @type {boolean}
728
- * @default false
729
- * @apioption data.enablePolling
730
- */
731
- /* eslint-disable valid-jsdoc */
732
- /**
733
- * The Data class
734
- *
735
- * @requires module:modules/data
736
- *
737
- * @class
738
- * @name Highcharts.Data
739
- *
740
- * @param {Highcharts.DataOptions} dataOptions
741
- *
742
- * @param {Highcharts.Options} [chartOptions]
743
- *
744
- * @param {Highcharts.Chart} [chart]
328
+ * @param {Highcharts.Chart} [chart]
745
329
  */
746
330
  var Data = /** @class */ (function () {
747
331
  /* *
@@ -750,25 +334,22 @@
750
334
  *
751
335
  * */
752
336
  function Data(dataOptions, chartOptions, chart) {
753
- this.chart = void 0;
754
- this.chartOptions = void 0;
755
- this.firstRowAsNames = void 0;
756
- this.rawColumns = void 0;
757
- this.options = void 0;
758
- /**
759
- * A collection of available date formats, extendable from the outside to
760
- * support custom date formats.
761
- *
762
- * @name Highcharts.Data#dateFormats
763
- * @type {Highcharts.Dictionary<Highcharts.DataDateFormatObject>}
764
- */
765
- this.dateFormats = {
766
- 'YYYY/mm/dd': {
767
- regex: /^([0-9]{4})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{1,2})$/,
768
- parser: function (match) {
769
- return (match ?
770
- Date.UTC(+match[1], match[2] - 1, +match[3]) :
771
- NaN);
337
+ if (chartOptions === void 0) { chartOptions = {}; }
338
+ this.rowsToColumns = Data.rowsToColumns; // backwards compatibility
339
+ /**
340
+ * A collection of available date formats, extendable from the outside to
341
+ * support custom date formats.
342
+ *
343
+ * @name Highcharts.Data#dateFormats
344
+ * @type {Highcharts.Dictionary<Highcharts.DataDateFormatObject>}
345
+ */
346
+ this.dateFormats = {
347
+ 'YYYY/mm/dd': {
348
+ regex: /^([0-9]{4})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{1,2})$/,
349
+ parser: function (match) {
350
+ return (match ?
351
+ Date.UTC(+match[1], match[2] - 1, +match[3]) :
352
+ NaN);
772
353
  }
773
354
  },
774
355
  'dd/mm/YYYY': {
@@ -794,8 +375,8 @@
794
375
  if (!match) {
795
376
  return NaN;
796
377
  }
797
- var year = +match[3],
798
- d = new Date();
378
+ var d = new Date();
379
+ var year = +match[3];
799
380
  if (year > (d.getFullYear() - 2000)) {
800
381
  year += 1900;
801
382
  }
@@ -815,8 +396,52 @@
815
396
  }
816
397
  }
817
398
  };
399
+ this.chart = chart;
400
+ this.chartOptions = chartOptions;
401
+ this.options = dataOptions;
402
+ this.rawColumns = [];
818
403
  this.init(dataOptions, chartOptions, chart);
819
404
  }
405
+ /* *
406
+ *
407
+ * Static Properties
408
+ *
409
+ * */
410
+ /**
411
+ * Creates a data object to parse data for a chart.
412
+ *
413
+ * @function Highcharts.data
414
+ */
415
+ Data.data = function (dataOptions, chartOptions, chart) {
416
+ if (chartOptions === void 0) { chartOptions = {}; }
417
+ return new Data(dataOptions, chartOptions, chart);
418
+ };
419
+ /**
420
+ * Reorganize rows into columns.
421
+ *
422
+ * @function Highcharts.Data.rowsToColumns
423
+ */
424
+ Data.rowsToColumns = function (rows) {
425
+ var row,
426
+ rowsLength,
427
+ col,
428
+ colsLength,
429
+ columns;
430
+ if (rows) {
431
+ columns = [];
432
+ rowsLength = rows.length;
433
+ for (row = 0; row < rowsLength; row++) {
434
+ colsLength = rows[row].length;
435
+ for (col = 0; col < colsLength; col++) {
436
+ if (!columns[col]) {
437
+ columns[col] = [];
438
+ }
439
+ columns[col][row] = rows[row][col];
440
+ }
441
+ }
442
+ }
443
+ return columns;
444
+ };
820
445
  /* *
821
446
  *
822
447
  * Functions
@@ -828,8 +453,8 @@
828
453
  * @private
829
454
  * @function Highcharts.Data#init
830
455
  */
831
- Data.prototype.init = function (options, chartOptions, chart) {
832
- var decimalPoint = options.decimalPoint,
456
+ Data.prototype.init = function (dataOptions, chartOptions, chart) {
457
+ var decimalPoint = dataOptions.decimalPoint,
833
458
  hasData;
834
459
  if (chartOptions) {
835
460
  this.chartOptions = chartOptions;
@@ -840,13 +465,17 @@
840
465
  if (decimalPoint !== '.' && decimalPoint !== ',') {
841
466
  decimalPoint = void 0;
842
467
  }
843
- this.options = options;
844
- this.columns = (options.columns ||
845
- this.rowsToColumns(options.rows) ||
468
+ this.options = dataOptions;
469
+ this.columns = (dataOptions.columns ||
470
+ this.rowsToColumns(dataOptions.rows) ||
846
471
  []);
847
- this.firstRowAsNames = pick(options.firstRowAsNames, this.firstRowAsNames, true);
472
+ this.firstRowAsNames = pick(dataOptions.firstRowAsNames, this.firstRowAsNames, true);
848
473
  this.decimalRegex = (decimalPoint &&
849
474
  new RegExp('^(-?[0-9]+)' + decimalPoint + '([0-9]+)$'));
475
+ // Always stop old polling when we have new options
476
+ if (this.liveDataTimeout !== void 0) {
477
+ clearTimeout(this.liveDataTimeout);
478
+ }
850
479
  // This is a two-dimensional array holding the raw, trimmed string
851
480
  // values with the same organisation as the columns array. It makes it
852
481
  // possible for example to revert from interpreted timestamps to
@@ -855,11 +484,7 @@
855
484
  // No need to parse or interpret anything
856
485
  if (this.columns.length) {
857
486
  this.dataFound();
858
- hasData = true;
859
- }
860
- if (this.hasURLOption(options)) {
861
- clearTimeout(this.liveDataTimeout);
862
- hasData = false;
487
+ hasData = !hasURLOption(dataOptions);
863
488
  }
864
489
  if (!hasData) {
865
490
  // Fetch live data
@@ -878,14 +503,10 @@
878
503
  // Parse a Google Spreadsheet
879
504
  hasData = this.parseGoogleSpreadsheet();
880
505
  }
881
- if (!hasData && options.afterComplete) {
882
- options.afterComplete();
506
+ if (!hasData && dataOptions.afterComplete) {
507
+ dataOptions.afterComplete();
883
508
  }
884
509
  };
885
- Data.prototype.hasURLOption = function (options) {
886
- return Boolean(options &&
887
- (options.rowsURL || options.csvURL || options.columnsURL));
888
- };
889
510
  /**
890
511
  * Get the column distribution. For example, a line series takes a single
891
512
  * column for Y values. A range series takes two columns for low and high
@@ -903,7 +524,7 @@
903
524
  return seriesTypes[type || 'line'].prototype.pointArrayMap;
904
525
  }, globalType = (chartOptions &&
905
526
  chartOptions.chart &&
906
- chartOptions.chart.type), individualCounts = [], seriesBuilders = [], seriesIndex = 0,
527
+ chartOptions.chart.type), individualCounts = [], seriesBuilders = [],
907
528
  // If no series mapping is defined, check if the series array is
908
529
  // defined with types.
909
530
  seriesMapping = ((options && options.seriesMapping) ||
@@ -912,7 +533,9 @@
912
533
  chartOptions.series.map(function () {
913
534
  return { x: 0 };
914
535
  })) ||
915
- []), i;
536
+ []);
537
+ var seriesIndex = 0,
538
+ i;
916
539
  ((chartOptions && chartOptions.series) || []).forEach(function (series) {
917
540
  individualCounts.push(getValueCount(series.type || globalType));
918
541
  });
@@ -1003,12 +626,8 @@
1003
626
  * @function Highcharts.Data#parseCSV
1004
627
  */
1005
628
  Data.prototype.parseCSV = function (inOptions) {
1006
- var self = this, options = inOptions || this.options, csv = options.csv, columns, startRow = (typeof options.startRow !== 'undefined' && options.startRow ?
1007
- options.startRow :
1008
- 0), endRow = options.endRow || Number.MAX_VALUE, startColumn = (typeof options.startColumn !== 'undefined' &&
1009
- options.startColumn) ? options.startColumn : 0, endColumn = options.endColumn || Number.MAX_VALUE, itemDelimiter, lines, rowIt = 0,
1010
- // activeRowNo = 0,
1011
- dataTypes = [],
629
+ var self = this, columns = this.columns = [], options = inOptions || this.options, startColumn = (typeof options.startColumn !== 'undefined' &&
630
+ options.startColumn) ? options.startColumn : 0, endColumn = options.endColumn || Number.MAX_VALUE, dataTypes = [],
1012
631
  // We count potential delimiters in the prepass, and use the
1013
632
  // result as the basis of half-intelligent guesses.
1014
633
  potDelimiters = {
@@ -1016,7 +635,15 @@
1016
635
  ';': 0,
1017
636
  '\t': 0
1018
637
  };
1019
- columns = this.columns = [];
638
+ var csv = options.csv,
639
+ startRow = (typeof options.startRow !== 'undefined' && options.startRow ?
640
+ options.startRow :
641
+ 0),
642
+ endRow = options.endRow || Number.MAX_VALUE,
643
+ itemDelimiter,
644
+ lines,
645
+ // activeRowNo = 0,
646
+ rowIt = 0;
1020
647
  /*
1021
648
  This implementation is quite verbose. It will be shortened once
1022
649
  it's stable and passes all the test.
@@ -1258,14 +885,14 @@
1258
885
  */
1259
886
  function deduceDateFormat(data, limit) {
1260
887
  var format = 'YYYY/mm/dd',
1261
- thing,
888
+ stable = [],
889
+ max = [];
890
+ var thing,
1262
891
  guessedFormat = [],
1263
892
  calculatedFormat,
1264
893
  i = 0,
1265
894
  madeDeduction = false,
1266
895
  // candidates = {},
1267
- stable = [],
1268
- max = [],
1269
896
  j;
1270
897
  if (!limit || limit > data.length) {
1271
898
  limit = data.length;
@@ -1439,13 +1066,13 @@
1439
1066
  */
1440
1067
  Data.prototype.parseTable = function () {
1441
1068
  var options = this.options,
1442
- table = options.table,
1443
1069
  columns = this.columns || [],
1444
1070
  startRow = options.startRow || 0,
1445
1071
  endRow = options.endRow || Number.MAX_VALUE,
1446
1072
  startColumn = options.startColumn || 0,
1447
1073
  endColumn = options.endColumn || Number.MAX_VALUE;
1448
- if (table) {
1074
+ if (options.table) {
1075
+ var table = options.table;
1449
1076
  if (typeof table === 'string') {
1450
1077
  table = doc.getElementById(table);
1451
1078
  }
@@ -1490,11 +1117,11 @@
1490
1117
  chart = this.chart,
1491
1118
  options = this.options,
1492
1119
  maxRetries = 3,
1493
- currentRetries = 0,
1494
1120
  pollingEnabled = options.enablePolling,
1495
- updateIntervalMs = (options.dataRefreshRate || 2) * 1000,
1496
1121
  originalOptions = merge(options);
1497
- if (!this.hasURLOption(options)) {
1122
+ var currentRetries = 0,
1123
+ updateIntervalMs = (options.dataRefreshRate || 2) * 1000;
1124
+ if (!hasURLOption(options)) {
1498
1125
  return false;
1499
1126
  }
1500
1127
  // Do not allow polling more than once a second
@@ -1578,7 +1205,7 @@
1578
1205
  }
1579
1206
  }
1580
1207
  performFetch(true);
1581
- return this.hasURLOption(options);
1208
+ return hasURLOption(options);
1582
1209
  };
1583
1210
  /**
1584
1211
  * Parse a Google spreadsheet.
@@ -1609,7 +1236,7 @@
1609
1236
  if (defined(options.endRow)) {
1610
1237
  end += options.endRow + 1;
1611
1238
  }
1612
- return start + ":" + end;
1239
+ return "" + start + ":".concat(end);
1613
1240
  };
1614
1241
  /**
1615
1242
  * Fetch the actual spreadsheet using XMLHttpRequest.
@@ -1633,7 +1260,7 @@
1633
1260
  success: function (json) {
1634
1261
  fn(json);
1635
1262
  if (options.enablePolling) {
1636
- setTimeout(function () {
1263
+ data.liveDataTimeout = setTimeout(function () {
1637
1264
  fetchSheet(fn);
1638
1265
  }, refreshRate);
1639
1266
  }
@@ -1712,8 +1339,8 @@
1712
1339
  * @function Highcharts.Data#parseTypes
1713
1340
  */
1714
1341
  Data.prototype.parseTypes = function () {
1715
- var columns = this.columns,
1716
- col = columns.length;
1342
+ var columns = this.columns || [];
1343
+ var col = columns.length;
1717
1344
  while (col--) {
1718
1345
  this.parseColumn(columns[col], col);
1719
1346
  }
@@ -1732,23 +1359,24 @@
1732
1359
  Data.prototype.parseColumn = function (column, col) {
1733
1360
  var rawColumns = this.rawColumns,
1734
1361
  columns = this.columns,
1735
- row = column.length,
1736
- val,
1737
- floatVal,
1738
- trimVal,
1739
- trimInsideVal,
1740
1362
  firstRowAsNames = this.firstRowAsNames,
1741
1363
  isXColumn = this.valueCount.xColumns.indexOf(col) !== -1,
1742
- dateVal,
1743
1364
  backup = [],
1744
- diff,
1745
1365
  chartOptions = this.chartOptions,
1746
- descending,
1747
1366
  columnTypes = this.options.columnTypes || [],
1748
1367
  columnType = columnTypes[col],
1749
1368
  forceCategory = isXColumn && ((chartOptions &&
1750
1369
  chartOptions.xAxis &&
1751
- splat(chartOptions.xAxis)[0].type === 'category') || columnType === 'string');
1370
+ splat(chartOptions.xAxis)[0].type === 'category') || columnType === 'string'),
1371
+ columnHasName = defined(column.name);
1372
+ var row = column.length,
1373
+ val,
1374
+ floatVal,
1375
+ trimVal,
1376
+ trimInsideVal,
1377
+ dateVal,
1378
+ diff,
1379
+ descending;
1752
1380
  if (!rawColumns[col]) {
1753
1381
  rawColumns[col] = [];
1754
1382
  }
@@ -1763,7 +1391,8 @@
1763
1391
  }
1764
1392
  // Disable number or date parsing by setting the X axis type to
1765
1393
  // category
1766
- if (forceCategory || (row === 0 && firstRowAsNames)) {
1394
+ if (forceCategory ||
1395
+ (row === 0 && firstRowAsNames && !columnHasName)) {
1767
1396
  column[row] = '' + trimVal;
1768
1397
  }
1769
1398
  else if (+trimInsideVal === floatVal) { // is numeric
@@ -1910,32 +1539,6 @@
1910
1539
  }
1911
1540
  return ret;
1912
1541
  };
1913
- /**
1914
- * Reorganize rows into columns.
1915
- *
1916
- * @function Highcharts.Data#rowsToColumns
1917
- */
1918
- Data.prototype.rowsToColumns = function (rows) {
1919
- var row,
1920
- rowsLength,
1921
- col,
1922
- colsLength,
1923
- columns;
1924
- if (rows) {
1925
- columns = [];
1926
- rowsLength = rows.length;
1927
- for (row = 0; row < rowsLength; row++) {
1928
- colsLength = rows[row].length;
1929
- for (col = 0; col < colsLength; col++) {
1930
- if (!columns[col]) {
1931
- columns[col] = [];
1932
- }
1933
- columns[col][row] = rows[row][col];
1934
- }
1935
- }
1936
- }
1937
- return columns;
1938
- };
1939
1542
  /**
1940
1543
  * Get the parsed data in a form that we can apply directly to the
1941
1544
  * `series.data` config. Array positions can be mapped using the
@@ -1965,35 +1568,6 @@
1965
1568
  return this.options.parsed.call(this, this.columns);
1966
1569
  }
1967
1570
  };
1968
- /**
1969
- * @private
1970
- * @function Highcharts.Data#getFreeIndexes
1971
- */
1972
- Data.prototype.getFreeIndexes = function (numberOfColumns, seriesBuilders) {
1973
- var s,
1974
- i,
1975
- freeIndexes = [],
1976
- freeIndexValues = [],
1977
- referencedIndexes;
1978
- // Add all columns as free
1979
- for (i = 0; i < numberOfColumns; i = i + 1) {
1980
- freeIndexes.push(true);
1981
- }
1982
- // Loop all defined builders and remove their referenced columns
1983
- for (s = 0; s < seriesBuilders.length; s = s + 1) {
1984
- referencedIndexes = seriesBuilders[s].getReferencedColumnIndexes();
1985
- for (i = 0; i < referencedIndexes.length; i = i + 1) {
1986
- freeIndexes[referencedIndexes[i]] = false;
1987
- }
1988
- }
1989
- // Collect the values for the free indexes
1990
- for (i = 0; i < freeIndexes.length; i = i + 1) {
1991
- if (freeIndexes[i]) {
1992
- freeIndexValues.push(i);
1993
- }
1994
- }
1995
- return freeIndexValues;
1996
- };
1997
1571
  /**
1998
1572
  * If a complete callback function is provided in the options, interpret the
1999
1573
  * columns into a Highcharts options object.
@@ -2003,8 +1577,9 @@
2003
1577
  Data.prototype.complete = function () {
2004
1578
  var columns = this.columns,
2005
1579
  xColumns = [],
2006
- type,
2007
1580
  options = this.options,
1581
+ allSeriesBuilders = [];
1582
+ var type,
2008
1583
  series,
2009
1584
  data,
2010
1585
  i,
@@ -2012,7 +1587,6 @@
2012
1587
  r,
2013
1588
  seriesIndex,
2014
1589
  chartOptions,
2015
- allSeriesBuilders = [],
2016
1590
  builder,
2017
1591
  freeIndexes,
2018
1592
  typeCol,
@@ -2030,7 +1604,7 @@
2030
1604
  }
2031
1605
  // Use the next columns for series
2032
1606
  series = [];
2033
- freeIndexes = this.getFreeIndexes(columns.length, this.valueCount.seriesBuilders);
1607
+ freeIndexes = getFreeIndexes(columns.length, this.valueCount.seriesBuilders);
2034
1608
  // Populate defined series
2035
1609
  for (seriesIndex = 0; seriesIndex < this.valueCount.seriesBuilders.length; seriesIndex++) {
2036
1610
  builder = this.valueCount.seriesBuilders[seriesIndex];
@@ -2137,7 +1711,8 @@
2137
1711
  * @param {boolean} [redraw=true]
2138
1712
  */
2139
1713
  Data.prototype.update = function (options, redraw) {
2140
- var chart = this.chart;
1714
+ var chart = this.chart,
1715
+ chartOptions = chart.options;
2141
1716
  if (options) {
2142
1717
  // Set the complete handler
2143
1718
  options.afterComplete = function (dataOptions) {
@@ -2156,223 +1731,708 @@
2156
1731
  }
2157
1732
  };
2158
1733
  // Apply it
2159
- merge(true, chart.options.data, options);
2160
- this.init(chart.options.data);
1734
+ merge(true, chartOptions.data, options);
1735
+ // Reset columns if fetching spreadsheet, to force a re-fetch
1736
+ if (chartOptions.data && chartOptions.data.googleSpreadsheetKey &&
1737
+ !options.columns) {
1738
+ delete chartOptions.data.columns;
1739
+ }
1740
+ this.init(chartOptions.data);
2161
1741
  }
2162
1742
  };
2163
1743
  return Data;
2164
1744
  }());
2165
- // Register the Data prototype and data function on Highcharts
2166
- // Highcharts.Data = Data as any;
1745
+ // Extend Chart.init so that the Chart constructor accepts a new configuration
1746
+ // option group, data.
1747
+ addEvent(Chart, 'init', function (e) {
1748
+ var chart = this,
1749
+ callback = e.args[1],
1750
+ defaultDataOptions = getOptions().data;
1751
+ var userOptions = (e.args[0] || {});
1752
+ if ((defaultDataOptions || userOptions && userOptions.data) &&
1753
+ !chart.hasDataDef) {
1754
+ chart.hasDataDef = true;
1755
+ /**
1756
+ * The data parser for this chart.
1757
+ *
1758
+ * @name Highcharts.Chart#data
1759
+ * @type {Highcharts.Data|undefined}
1760
+ */
1761
+ var dataOptions = merge(defaultDataOptions,
1762
+ userOptions.data);
1763
+ chart.data = new Data(extend(dataOptions, {
1764
+ afterComplete: function (dataOptions) {
1765
+ var i,
1766
+ series;
1767
+ // Merge series configs
1768
+ if (Object.hasOwnProperty.call(userOptions, 'series')) {
1769
+ if (typeof userOptions.series === 'object') {
1770
+ i = Math.max(userOptions.series.length, dataOptions && dataOptions.series ?
1771
+ dataOptions.series.length :
1772
+ 0);
1773
+ while (i--) {
1774
+ series = userOptions.series[i] || {};
1775
+ userOptions.series[i] = merge(series, dataOptions && dataOptions.series ?
1776
+ dataOptions.series[i] :
1777
+ {});
1778
+ }
1779
+ }
1780
+ else { // Allow merging in dataOptions.series (#2856)
1781
+ delete userOptions.series;
1782
+ }
1783
+ }
1784
+ // Do the merge
1785
+ userOptions = merge(dataOptions, userOptions);
1786
+ // Run chart.init again
1787
+ chart.init(userOptions, callback);
1788
+ }
1789
+ }), userOptions, chart);
1790
+ e.preventDefault();
1791
+ }
1792
+ });
1793
+ /**
1794
+ * Creates a new SeriesBuilder. A SeriesBuilder consists of a number
1795
+ * of ColumnReaders that reads columns and give them a name.
1796
+ * Ex: A series builder can be constructed to read column 3 as 'x' and
1797
+ * column 7 and 8 as 'y1' and 'y2'.
1798
+ * The output would then be points/rows of the form {x: 11, y1: 22, y2: 33}
1799
+ *
1800
+ * The name of the builder is taken from the second column. In the above
1801
+ * example it would be the column with index 7.
1802
+ *
1803
+ * @private
1804
+ * @class
1805
+ * @name SeriesBuilder
1806
+ */
1807
+ var SeriesBuilder = /** @class */ (function () {
1808
+ function SeriesBuilder() {
1809
+ /* eslint-disable no-invalid-this */
1810
+ this.readers = [];
1811
+ this.pointIsArray = true;
1812
+ }
1813
+ /**
1814
+ * Populates readers with column indexes. A reader can be added without
1815
+ * a specific index and for those readers the index is taken sequentially
1816
+ * from the free columns (this is handled by the ColumnCursor instance).
1817
+ *
1818
+ * @function SeriesBuilder#populateColumns
1819
+ */
1820
+ SeriesBuilder.prototype.populateColumns = function (freeIndexes) {
1821
+ var builder = this;
1822
+ var enoughColumns = true;
1823
+ // Loop each reader and give it an index if its missing.
1824
+ // The freeIndexes.shift() will return undefined if there
1825
+ // are no more columns.
1826
+ builder.readers.forEach(function (reader) {
1827
+ if (typeof reader.columnIndex === 'undefined') {
1828
+ reader.columnIndex = freeIndexes.shift();
1829
+ }
1830
+ });
1831
+ // Now, all readers should have columns mapped. If not
1832
+ // then return false to signal that this series should
1833
+ // not be added.
1834
+ builder.readers.forEach(function (reader) {
1835
+ if (typeof reader.columnIndex === 'undefined') {
1836
+ enoughColumns = false;
1837
+ }
1838
+ });
1839
+ return enoughColumns;
1840
+ };
1841
+ /**
1842
+ * Reads a row from the dataset and returns a point or array depending
1843
+ * on the names of the readers.
1844
+ *
1845
+ * @function SeriesBuilder#read<T>
1846
+ */
1847
+ SeriesBuilder.prototype.read = function (columns, rowIndex) {
1848
+ var builder = this,
1849
+ pointIsArray = builder.pointIsArray,
1850
+ point = pointIsArray ? [] : {};
1851
+ var columnIndexes;
1852
+ // Loop each reader and ask it to read its value.
1853
+ // Then, build an array or point based on the readers names.
1854
+ builder.readers.forEach(function (reader) {
1855
+ var value = columns[reader.columnIndex][rowIndex];
1856
+ if (pointIsArray) {
1857
+ point.push(value);
1858
+ }
1859
+ else {
1860
+ if (reader.configName.indexOf('.') > 0) {
1861
+ // Handle nested property names
1862
+ Point.prototype.setNestedProperty(point, value, reader.configName);
1863
+ }
1864
+ else {
1865
+ point[reader.configName] = value;
1866
+ }
1867
+ }
1868
+ });
1869
+ // The name comes from the first column (excluding the x column)
1870
+ if (typeof this.name === 'undefined' && builder.readers.length >= 2) {
1871
+ columnIndexes = builder.getReferencedColumnIndexes();
1872
+ if (columnIndexes.length >= 2) {
1873
+ // remove the first one (x col)
1874
+ columnIndexes.shift();
1875
+ // Sort the remaining
1876
+ columnIndexes.sort(function (a, b) {
1877
+ return a - b;
1878
+ });
1879
+ // Now use the lowest index as name column
1880
+ this.name = columns[columnIndexes.shift()].name;
1881
+ }
1882
+ }
1883
+ return point;
1884
+ };
1885
+ /**
1886
+ * Creates and adds ColumnReader from the given columnIndex and configName.
1887
+ * ColumnIndex can be undefined and in that case the reader will be given
1888
+ * an index when columns are populated.
1889
+ *
1890
+ * @function SeriesBuilder#addColumnReader
1891
+ */
1892
+ SeriesBuilder.prototype.addColumnReader = function (columnIndex, configName) {
1893
+ this.readers.push({
1894
+ columnIndex: columnIndex,
1895
+ configName: configName
1896
+ });
1897
+ if (!(configName === 'x' ||
1898
+ configName === 'y' ||
1899
+ typeof configName === 'undefined')) {
1900
+ this.pointIsArray = false;
1901
+ }
1902
+ };
1903
+ /**
1904
+ * Returns an array of column indexes that the builder will use when
1905
+ * reading data.
1906
+ *
1907
+ * @function SeriesBuilder#getReferencedColumnIndexes
1908
+ */
1909
+ SeriesBuilder.prototype.getReferencedColumnIndexes = function () {
1910
+ var referencedColumnIndexes = [];
1911
+ var i,
1912
+ columnReader;
1913
+ for (i = 0; i < this.readers.length; i = i + 1) {
1914
+ columnReader = this.readers[i];
1915
+ if (typeof columnReader.columnIndex !== 'undefined') {
1916
+ referencedColumnIndexes.push(columnReader.columnIndex);
1917
+ }
1918
+ }
1919
+ return referencedColumnIndexes;
1920
+ };
1921
+ /**
1922
+ * Returns true if the builder has a reader for the given configName.
1923
+ *
1924
+ * @function SeriesBuider#hasReader
1925
+ */
1926
+ SeriesBuilder.prototype.hasReader = function (configName) {
1927
+ var i,
1928
+ columnReader;
1929
+ for (i = 0; i < this.readers.length; i = i + 1) {
1930
+ columnReader = this.readers[i];
1931
+ if (columnReader.configName === configName) {
1932
+ return true;
1933
+ }
1934
+ }
1935
+ // Else return undefined
1936
+ };
1937
+ return SeriesBuilder;
1938
+ }());
1939
+ /* *
1940
+ *
1941
+ * Default Export
1942
+ *
1943
+ * */
1944
+ /* *
1945
+ *
1946
+ * API Declarations
1947
+ *
1948
+ * */
1949
+ /**
1950
+ * Callback function to modify the CSV before parsing it by the data module.
1951
+ *
1952
+ * @callback Highcharts.DataBeforeParseCallbackFunction
1953
+ *
1954
+ * @param {string} csv
1955
+ * The CSV to modify.
1956
+ *
1957
+ * @return {string}
1958
+ * The CSV to parse.
1959
+ */
1960
+ /**
1961
+ * Callback function that gets called after parsing data.
1962
+ *
1963
+ * @callback Highcharts.DataCompleteCallbackFunction
1964
+ *
1965
+ * @param {Highcharts.Options} chartOptions
1966
+ * The chart options that were used.
1967
+ */
1968
+ /**
1969
+ * Callback function that returns the correspondig Date object to a match.
1970
+ *
1971
+ * @callback Highcharts.DataDateFormatCallbackFunction
1972
+ *
1973
+ * @param {Array<number>} match
1974
+ *
1975
+ * @return {number}
1976
+ */
1977
+ /**
1978
+ * Structure for alternative date formats to parse.
1979
+ *
1980
+ * @interface Highcharts.DataDateFormatObject
1981
+ */ /**
1982
+ * @name Highcharts.DataDateFormatObject#alternative
1983
+ * @type {string|undefined}
1984
+ */ /**
1985
+ * @name Highcharts.DataDateFormatObject#parser
1986
+ * @type {Highcharts.DataDateFormatCallbackFunction}
1987
+ */ /**
1988
+ * @name Highcharts.DataDateFormatObject#regex
1989
+ * @type {global.RegExp}
1990
+ */
1991
+ /**
1992
+ * Possible types for a data item in a column or row.
1993
+ *
1994
+ * @typedef {number|string|null} Highcharts.DataValueType
1995
+ */
1996
+ /**
1997
+ * Callback function to parse string representations of dates into
1998
+ * JavaScript timestamps (milliseconds since 1.1.1970).
1999
+ *
2000
+ * @callback Highcharts.DataParseDateCallbackFunction
2001
+ *
2002
+ * @param {string} dateValue
2003
+ *
2004
+ * @return {number}
2005
+ * Timestamp (milliseconds since 1.1.1970) as integer for Date class.
2006
+ */
2007
+ /**
2008
+ * Callback function to access the parsed columns, the two-dimentional
2009
+ * input data array directly, before they are interpreted into series
2010
+ * data and categories.
2011
+ *
2012
+ * @callback Highcharts.DataParsedCallbackFunction
2013
+ *
2014
+ * @param {Array<Array<*>>} columns
2015
+ * The parsed columns by the data module.
2016
+ *
2017
+ * @return {boolean|undefined}
2018
+ * Return `false` to stop completion, or call `this.complete()` to
2019
+ * continue async.
2020
+ */
2021
+ /* *
2022
+ *
2023
+ * API Options
2024
+ *
2025
+ * */
2026
+ /**
2027
+ * The Data module provides a simplified interface for adding data to
2028
+ * a chart from sources like CVS, HTML tables or grid views. See also
2029
+ * the [tutorial article on the Data module](
2030
+ * https://www.highcharts.com/docs/working-with-data/data-module).
2031
+ *
2032
+ * It requires the `modules/data.js` file to be loaded.
2033
+ *
2034
+ * Please note that the default way of adding data in Highcharts, without
2035
+ * the need of a module, is through the [series._type_.data](#series.line.data)
2036
+ * option.
2037
+ *
2038
+ * @sample {highcharts} highcharts/demo/column-parsed/
2039
+ * HTML table
2040
+ * @sample {highcharts} highcharts/data/csv/
2041
+ * CSV
2042
+ *
2043
+ * @since 4.0
2044
+ * @requires modules/data
2045
+ * @apioption data
2046
+ */
2047
+ /**
2048
+ * A callback function to modify the CSV before parsing it. Return the modified
2049
+ * string.
2050
+ *
2051
+ * @sample {highcharts} highcharts/demo/line-ajax/
2052
+ * Modify CSV before parse
2053
+ *
2054
+ * @type {Highcharts.DataBeforeParseCallbackFunction}
2055
+ * @since 6.1
2056
+ * @apioption data.beforeParse
2057
+ */
2058
+ /**
2059
+ * A two-dimensional array representing the input data on tabular form.
2060
+ * This input can be used when the data is already parsed, for example
2061
+ * from a grid view component. Each cell can be a string or number.
2062
+ * If not switchRowsAndColumns is set, the columns are interpreted as
2063
+ * series.
2064
+ *
2065
+ * @see [data.rows](#data.rows)
2066
+ *
2067
+ * @sample {highcharts} highcharts/data/columns/
2068
+ * Columns
2069
+ *
2070
+ * @type {Array<Array<Highcharts.DataValueType>>}
2071
+ * @since 4.0
2072
+ * @apioption data.columns
2073
+ */
2074
+ /**
2075
+ * The callback that is evaluated when the data is finished loading,
2076
+ * optionally from an external source, and parsed. The first argument
2077
+ * passed is a finished chart options object, containing the series.
2078
+ * These options can be extended with additional options and passed
2079
+ * directly to the chart constructor.
2080
+ *
2081
+ * @see [data.parsed](#data.parsed)
2082
+ *
2083
+ * @sample {highcharts} highcharts/data/complete/
2084
+ * Modify data on complete
2085
+ *
2086
+ * @type {Highcharts.DataCompleteCallbackFunction}
2087
+ * @since 4.0
2088
+ * @apioption data.complete
2089
+ */
2090
+ /**
2091
+ * A comma delimited string to be parsed. Related options are [startRow](
2092
+ * #data.startRow), [endRow](#data.endRow), [startColumn](#data.startColumn)
2093
+ * and [endColumn](#data.endColumn) to delimit what part of the table
2094
+ * is used. The [lineDelimiter](#data.lineDelimiter) and [itemDelimiter](
2095
+ * #data.itemDelimiter) options define the CSV delimiter formats.
2096
+ *
2097
+ * The built-in CSV parser doesn't support all flavours of CSV, so in
2098
+ * some cases it may be necessary to use an external CSV parser. See
2099
+ * [this example](https://jsfiddle.net/highcharts/u59176h4/) of parsing
2100
+ * CSV through the MIT licensed [Papa Parse](http://papaparse.com/)
2101
+ * library.
2102
+ *
2103
+ * @sample {highcharts} highcharts/data/csv/
2104
+ * Data from CSV
2105
+ *
2106
+ * @type {string}
2107
+ * @since 4.0
2108
+ * @apioption data.csv
2109
+ */
2110
+ /**
2111
+ * Which of the predefined date formats in Date.prototype.dateFormats
2112
+ * to use to parse date values. Defaults to a best guess based on what
2113
+ * format gives valid and ordered dates. Valid options include: `YYYY/mm/dd`,
2114
+ * `dd/mm/YYYY`, `mm/dd/YYYY`, `dd/mm/YY`, `mm/dd/YY`.
2115
+ *
2116
+ * @see [data.parseDate](#data.parseDate)
2117
+ *
2118
+ * @sample {highcharts} highcharts/data/dateformat-auto/
2119
+ * Best guess date format
2120
+ *
2121
+ * @type {string}
2122
+ * @since 4.0
2123
+ * @validvalue ["YYYY/mm/dd", "dd/mm/YYYY", "mm/dd/YYYY", "dd/mm/YYYY",
2124
+ * "dd/mm/YY", "mm/dd/YY"]
2125
+ * @apioption data.dateFormat
2126
+ */
2127
+ /**
2128
+ * The decimal point used for parsing numbers in the CSV.
2129
+ *
2130
+ * If both this and data.delimiter is set to `undefined`, the parser will
2131
+ * attempt to deduce the decimal point automatically.
2132
+ *
2133
+ * @sample {highcharts} highcharts/data/delimiters/
2134
+ * Comma as decimal point
2135
+ *
2136
+ * @type {string}
2137
+ * @default .
2138
+ * @since 4.1.0
2139
+ * @apioption data.decimalPoint
2140
+ */
2141
+ /**
2142
+ * In tabular input data, the last column (indexed by 0) to use. Defaults
2143
+ * to the last column containing data.
2144
+ *
2145
+ * @sample {highcharts} highcharts/data/start-end/
2146
+ * Limited data
2147
+ *
2148
+ * @type {number}
2149
+ * @since 4.0
2150
+ * @apioption data.endColumn
2151
+ */
2152
+ /**
2153
+ * In tabular input data, the last row (indexed by 0) to use. Defaults
2154
+ * to the last row containing data.
2155
+ *
2156
+ * @sample {highcharts} highcharts/data/start-end/
2157
+ * Limited data
2158
+ *
2159
+ * @type {number}
2160
+ * @since 4.0.4
2161
+ * @apioption data.endRow
2162
+ */
2163
+ /**
2164
+ * Whether to use the first row in the data set as series names.
2165
+ *
2166
+ * @sample {highcharts} highcharts/data/start-end/
2167
+ * Don't get series names from the CSV
2168
+ * @sample {highstock} highcharts/data/start-end/
2169
+ * Don't get series names from the CSV
2170
+ *
2171
+ * @type {boolean}
2172
+ * @default true
2173
+ * @since 4.1.0
2174
+ * @product highcharts highstock gantt
2175
+ * @apioption data.firstRowAsNames
2176
+ */
2177
+ /**
2178
+ * The Google Spreadsheet API key required for access generated at [API Services
2179
+ * / Credentials](https://console.cloud.google.com/apis/credentials). See a
2180
+ * comprehensive tutorial for setting up the key at the
2181
+ * [Hands-On Data Visualization](https://handsondataviz.org/google-sheets-api-key.html)
2182
+ * book website.
2183
+ *
2184
+ * @sample {highcharts} highcharts/data/google-spreadsheet/
2185
+ * Load a Google Spreadsheet
2186
+ *
2187
+ * @type {string}
2188
+ * @since 9.2.2
2189
+ * @apioption data.googleAPIKey
2190
+ */
2191
+ /**
2192
+ * The key or `spreadsheetId` value for a Google Spreadsheet to load. See
2193
+ * [developers.google.com](https://developers.google.com/sheets/api/guides/concepts)
2194
+ * for how to find the `spreadsheetId`.
2195
+ *
2196
+ * In order for Google Sheets to load, a valid [googleAPIKey](#data.googleAPIKey)
2197
+ * must also be given.
2198
+ *
2199
+ * @sample {highcharts} highcharts/data/google-spreadsheet/
2200
+ * Load a Google Spreadsheet
2201
+ *
2202
+ * @type {string}
2203
+ * @since 4.0
2204
+ * @apioption data.googleSpreadsheetKey
2205
+ */
2206
+ /**
2207
+ * The Google Spreadsheet `range` to use in combination with
2208
+ * [googleSpreadsheetKey](#data.googleSpreadsheetKey). See
2209
+ * [developers.google.com](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get)
2210
+ * for details.
2211
+ *
2212
+ * If given, it takes precedence over `startColumn`, `endColumn`, `startRow` and
2213
+ * `endRow`.
2214
+ *
2215
+ * @example
2216
+ * googleSpreadsheetRange: 'Fruit Consumption' // Load a named worksheet
2217
+ * googleSpreadsheetRange: 'A:Z' // Load columns A to Z
2218
+ *
2219
+ * @sample {highcharts} highcharts/data/google-spreadsheet/
2220
+ * Load a Google Spreadsheet
2221
+ *
2222
+ * @type {string|undefined}
2223
+ * @since 9.2.2
2224
+ * @apioption data.googleSpreadsheetRange
2225
+ */
2226
+ /**
2227
+ * No longer works since v9.2.2, that uses Google Sheets API v4. Instead, use
2228
+ * the [googleSpreadsheetRange](#data.googleSpreadsheetRange) option to load a
2229
+ * specific sheet.
2230
+ *
2231
+ * @deprecated
2232
+ * @type {string}
2233
+ * @since 4.0
2234
+ * @apioption data.googleSpreadsheetWorksheet
2235
+ */
2236
+ /**
2237
+ * Item or cell delimiter for parsing CSV. Defaults to the tab character
2238
+ * `\t` if a tab character is found in the CSV string, if not it defaults
2239
+ * to `,`.
2240
+ *
2241
+ * If this is set to false or undefined, the parser will attempt to deduce
2242
+ * the delimiter automatically.
2243
+ *
2244
+ * @sample {highcharts} highcharts/data/delimiters/
2245
+ * Delimiters
2246
+ *
2247
+ * @type {string}
2248
+ * @since 4.0
2249
+ * @apioption data.itemDelimiter
2250
+ */
2251
+ /**
2252
+ * Line delimiter for parsing CSV.
2253
+ *
2254
+ * @sample {highcharts} highcharts/data/delimiters/
2255
+ * Delimiters
2256
+ *
2257
+ * @type {string}
2258
+ * @default \n
2259
+ * @since 4.0
2260
+ * @apioption data.lineDelimiter
2261
+ */
2262
+ /**
2263
+ * A callback function to access the parsed columns, the two-dimentional
2264
+ * input data array directly, before they are interpreted into series
2265
+ * data and categories. Return `false` to stop completion, or call
2266
+ * `this.complete()` to continue async.
2267
+ *
2268
+ * @see [data.complete](#data.complete)
2269
+ *
2270
+ * @sample {highcharts} highcharts/data/parsed/
2271
+ * Modify data after parse
2272
+ *
2273
+ * @type {Highcharts.DataParsedCallbackFunction}
2274
+ * @since 4.0
2275
+ * @apioption data.parsed
2276
+ */
2277
+ /**
2278
+ * A callback function to parse string representations of dates into
2279
+ * JavaScript timestamps. Should return an integer timestamp on success.
2280
+ *
2281
+ * @see [dateFormat](#data.dateFormat)
2282
+ *
2283
+ * @type {Highcharts.DataParseDateCallbackFunction}
2284
+ * @since 4.0
2285
+ * @apioption data.parseDate
2286
+ */
2287
+ /**
2288
+ * The same as the columns input option, but defining rows intead of
2289
+ * columns.
2290
+ *
2291
+ * @see [data.columns](#data.columns)
2292
+ *
2293
+ * @sample {highcharts} highcharts/data/rows/
2294
+ * Data in rows
2295
+ *
2296
+ * @type {Array<Array<Highcharts.DataValueType>>}
2297
+ * @since 4.0
2298
+ * @apioption data.rows
2299
+ */
2300
+ /**
2301
+ * An array containing dictionaries for each series. A dictionary exists of
2302
+ * Point property names as the key and the CSV column index as the value.
2303
+ *
2304
+ * @sample {highcharts} highcharts/data/seriesmapping-label/
2305
+ * Label from data set
2306
+ *
2307
+ * @type {Array<Highcharts.Dictionary<number>>}
2308
+ * @since 4.0.4
2309
+ * @apioption data.seriesMapping
2310
+ */
2311
+ /**
2312
+ * In tabular input data, the first column (indexed by 0) to use.
2313
+ *
2314
+ * @sample {highcharts} highcharts/data/start-end/
2315
+ * Limited data
2316
+ *
2317
+ * @type {number}
2318
+ * @default 0
2319
+ * @since 4.0
2320
+ * @apioption data.startColumn
2321
+ */
2322
+ /**
2323
+ * In tabular input data, the first row (indexed by 0) to use.
2324
+ *
2325
+ * @sample {highcharts} highcharts/data/start-end/
2326
+ * Limited data
2327
+ *
2328
+ * @type {number}
2329
+ * @default 0
2330
+ * @since 4.0
2331
+ * @apioption data.startRow
2332
+ */
2333
+ /**
2334
+ * Switch rows and columns of the input data, so that `this.columns`
2335
+ * effectively becomes the rows of the data set, and the rows are interpreted
2336
+ * as series.
2337
+ *
2338
+ * @sample {highcharts} highcharts/data/switchrowsandcolumns/
2339
+ * Switch rows and columns
2340
+ *
2341
+ * @type {boolean}
2342
+ * @default false
2343
+ * @since 4.0
2344
+ * @apioption data.switchRowsAndColumns
2345
+ */
2167
2346
  /**
2168
- * Creates a data object to parse data for a chart.
2347
+ * An HTML table or the id of such to be parsed as input data. Related
2348
+ * options are `startRow`, `endRow`, `startColumn` and `endColumn` to
2349
+ * delimit what part of the table is used.
2350
+ *
2351
+ * @sample {highcharts} highcharts/demo/column-parsed/
2352
+ * Parsed table
2169
2353
  *
2170
- * @function Highcharts.data
2354
+ * @type {string|global.HTMLElement}
2355
+ * @since 4.0
2356
+ * @apioption data.table
2171
2357
  */
2172
- G.data = function (dataOptions, chartOptions, chart) {
2173
- return new G.Data(dataOptions, chartOptions, chart);
2174
- };
2175
- // Extend Chart.init so that the Chart constructor accepts a new configuration
2176
- // option group, data.
2177
- addEvent(Chart, 'init', function (e) {
2178
- var chart = this, // eslint-disable-line no-invalid-this
2179
- userOptions = (e.args[0] || {}),
2180
- callback = e.args[1];
2181
- if (userOptions && userOptions.data && !chart.hasDataDef) {
2182
- chart.hasDataDef = true;
2183
- /**
2184
- * The data parser for this chart.
2185
- *
2186
- * @name Highcharts.Chart#data
2187
- * @type {Highcharts.Data|undefined}
2188
- */
2189
- chart.data = new G.Data(extend(userOptions.data, {
2190
- afterComplete: function (dataOptions) {
2191
- var i,
2192
- series;
2193
- // Merge series configs
2194
- if (Object.hasOwnProperty.call(userOptions, 'series')) {
2195
- if (typeof userOptions.series === 'object') {
2196
- i = Math.max(userOptions.series.length, dataOptions && dataOptions.series ?
2197
- dataOptions.series.length :
2198
- 0);
2199
- while (i--) {
2200
- series = userOptions.series[i] || {};
2201
- userOptions.series[i] = merge(series, dataOptions && dataOptions.series ?
2202
- dataOptions.series[i] :
2203
- {});
2204
- }
2205
- }
2206
- else { // Allow merging in dataOptions.series (#2856)
2207
- delete userOptions.series;
2208
- }
2209
- }
2210
- // Do the merge
2211
- userOptions = merge(dataOptions, userOptions);
2212
- // Run chart.init again
2213
- chart.init(userOptions, callback);
2214
- }
2215
- }), userOptions, chart);
2216
- e.preventDefault();
2217
- }
2218
- });
2219
2358
  /**
2220
- * Creates a new SeriesBuilder. A SeriesBuilder consists of a number
2221
- * of ColumnReaders that reads columns and give them a name.
2222
- * Ex: A series builder can be constructed to read column 3 as 'x' and
2223
- * column 7 and 8 as 'y1' and 'y2'.
2224
- * The output would then be points/rows of the form {x: 11, y1: 22, y2: 33}
2359
+ * An URL to a remote CSV dataset. Will be fetched when the chart is created
2360
+ * using Ajax.
2225
2361
  *
2226
- * The name of the builder is taken from the second column. In the above
2227
- * example it would be the column with index 7.
2362
+ * @sample highcharts/data/livedata-columns
2363
+ * Categorized bar chart with CSV and live polling
2364
+ * @sample highcharts/data/livedata-csv
2365
+ * Time based line chart with CSV and live polling
2228
2366
  *
2229
- * @private
2230
- * @class
2231
- * @name SeriesBuilder
2367
+ * @type {string}
2368
+ * @apioption data.csvURL
2232
2369
  */
2233
- var SeriesBuilder = /** @class */ (function () {
2234
- function SeriesBuilder() {
2235
- /* eslint-disable no-invalid-this */
2236
- this.readers = [];
2237
- this.pointIsArray = true;
2238
- /* eslint-enable no-invalid-this */
2239
- this.name = void 0;
2240
- }
2241
- /**
2242
- * Populates readers with column indexes. A reader can be added without
2243
- * a specific index and for those readers the index is taken sequentially
2244
- * from the free columns (this is handled by the ColumnCursor instance).
2245
- *
2246
- * @function SeriesBuilder#populateColumns
2247
- */
2248
- SeriesBuilder.prototype.populateColumns = function (freeIndexes) {
2249
- var builder = this,
2250
- enoughColumns = true;
2251
- // Loop each reader and give it an index if its missing.
2252
- // The freeIndexes.shift() will return undefined if there
2253
- // are no more columns.
2254
- builder.readers.forEach(function (reader) {
2255
- if (typeof reader.columnIndex === 'undefined') {
2256
- reader.columnIndex = freeIndexes.shift();
2257
- }
2258
- });
2259
- // Now, all readers should have columns mapped. If not
2260
- // then return false to signal that this series should
2261
- // not be added.
2262
- builder.readers.forEach(function (reader) {
2263
- if (typeof reader.columnIndex === 'undefined') {
2264
- enoughColumns = false;
2265
- }
2266
- });
2267
- return enoughColumns;
2268
- };
2269
- /**
2270
- * Reads a row from the dataset and returns a point or array depending
2271
- * on the names of the readers.
2272
- *
2273
- * @function SeriesBuilder#read<T>
2274
- */
2275
- SeriesBuilder.prototype.read = function (columns, rowIndex) {
2276
- var builder = this,
2277
- pointIsArray = builder.pointIsArray,
2278
- point = pointIsArray ? [] : {},
2279
- columnIndexes;
2280
- // Loop each reader and ask it to read its value.
2281
- // Then, build an array or point based on the readers names.
2282
- builder.readers.forEach(function (reader) {
2283
- var value = columns[reader.columnIndex][rowIndex];
2284
- if (pointIsArray) {
2285
- point.push(value);
2286
- }
2287
- else {
2288
- if (reader.configName.indexOf('.') > 0) {
2289
- // Handle nested property names
2290
- Point.prototype.setNestedProperty(point, value, reader.configName);
2291
- }
2292
- else {
2293
- point[reader.configName] = value;
2294
- }
2295
- }
2296
- });
2297
- // The name comes from the first column (excluding the x column)
2298
- if (typeof this.name === 'undefined' && builder.readers.length >= 2) {
2299
- columnIndexes = builder.getReferencedColumnIndexes();
2300
- if (columnIndexes.length >= 2) {
2301
- // remove the first one (x col)
2302
- columnIndexes.shift();
2303
- // Sort the remaining
2304
- columnIndexes.sort(function (a, b) {
2305
- return a - b;
2306
- });
2307
- // Now use the lowest index as name column
2308
- this.name = columns[columnIndexes.shift()].name;
2309
- }
2310
- }
2311
- return point;
2312
- };
2313
- /**
2314
- * Creates and adds ColumnReader from the given columnIndex and configName.
2315
- * ColumnIndex can be undefined and in that case the reader will be given
2316
- * an index when columns are populated.
2317
- *
2318
- * @function SeriesBuilder#addColumnReader
2319
- */
2320
- SeriesBuilder.prototype.addColumnReader = function (columnIndex, configName) {
2321
- this.readers.push({
2322
- columnIndex: columnIndex,
2323
- configName: configName
2324
- });
2325
- if (!(configName === 'x' ||
2326
- configName === 'y' ||
2327
- typeof configName === 'undefined')) {
2328
- this.pointIsArray = false;
2329
- }
2330
- };
2331
- /**
2332
- * Returns an array of column indexes that the builder will use when
2333
- * reading data.
2334
- *
2335
- * @function SeriesBuilder#getReferencedColumnIndexes
2336
- */
2337
- SeriesBuilder.prototype.getReferencedColumnIndexes = function () {
2338
- var i,
2339
- referencedColumnIndexes = [],
2340
- columnReader;
2341
- for (i = 0; i < this.readers.length; i = i + 1) {
2342
- columnReader = this.readers[i];
2343
- if (typeof columnReader.columnIndex !== 'undefined') {
2344
- referencedColumnIndexes.push(columnReader.columnIndex);
2345
- }
2346
- }
2347
- return referencedColumnIndexes;
2348
- };
2349
- /**
2350
- * Returns true if the builder has a reader for the given configName.
2351
- *
2352
- * @function SeriesBuider#hasReader
2353
- */
2354
- SeriesBuilder.prototype.hasReader = function (configName) {
2355
- var i,
2356
- columnReader;
2357
- for (i = 0; i < this.readers.length; i = i + 1) {
2358
- columnReader = this.readers[i];
2359
- if (columnReader.configName === configName) {
2360
- return true;
2361
- }
2362
- }
2363
- // Else return undefined
2364
- };
2365
- return SeriesBuilder;
2366
- }());
2367
- G.Data = Data;
2370
+ /**
2371
+ * A URL to a remote JSON dataset, structured as a row array.
2372
+ * Will be fetched when the chart is created using Ajax.
2373
+ *
2374
+ * @sample highcharts/data/livedata-rows
2375
+ * Rows with live polling
2376
+ *
2377
+ * @type {string}
2378
+ * @apioption data.rowsURL
2379
+ */
2380
+ /**
2381
+ * A URL to a remote JSON dataset, structured as a column array.
2382
+ * Will be fetched when the chart is created using Ajax.
2383
+ *
2384
+ * @sample highcharts/data/livedata-columns
2385
+ * Columns with live polling
2386
+ *
2387
+ * @type {string}
2388
+ * @apioption data.columnsURL
2389
+ */
2390
+ /**
2391
+ * Sets the refresh rate for data polling when importing remote dataset by
2392
+ * setting [data.csvURL](data.csvURL), [data.rowsURL](data.rowsURL),
2393
+ * [data.columnsURL](data.columnsURL), or
2394
+ * [data.googleSpreadsheetKey](data.googleSpreadsheetKey).
2395
+ *
2396
+ * Note that polling must be enabled by setting
2397
+ * [data.enablePolling](data.enablePolling) to true.
2398
+ *
2399
+ * The value is the number of seconds between pollings.
2400
+ * It cannot be set to less than 1 second.
2401
+ *
2402
+ * @sample highcharts/demo/live-data
2403
+ * Live data with user set refresh rate
2404
+ *
2405
+ * @default 1
2406
+ * @type {number}
2407
+ * @apioption data.dataRefreshRate
2408
+ */
2409
+ /**
2410
+ * Enables automatic refetching of remote datasets every _n_ seconds (defined by
2411
+ * setting [data.dataRefreshRate](data.dataRefreshRate)).
2412
+ *
2413
+ * Only works when either [data.csvURL](data.csvURL),
2414
+ * [data.rowsURL](data.rowsURL), [data.columnsURL](data.columnsURL), or
2415
+ * [data.googleSpreadsheetKey](data.googleSpreadsheetKey).
2416
+ *
2417
+ * @sample highcharts/demo/live-data
2418
+ * Live data
2419
+ * @sample highcharts/data/livedata-columns
2420
+ * Categorized bar chart with CSV and live polling
2421
+ *
2422
+ * @type {boolean}
2423
+ * @default false
2424
+ * @apioption data.enablePolling
2425
+ */
2426
+ (''); // keeps doclets above in JS file
2368
2427
 
2369
- return G.Data;
2428
+ return Data;
2370
2429
  });
2371
2430
  _registerModule(_modules, 'masters/modules/data.src.js', [_modules['Core/Globals.js'], _modules['Core/HttpUtilities.js'], _modules['Extensions/Data.js']], function (Highcharts, HttpUtilities, Data) {
2372
2431
 
2373
2432
  var G = Highcharts;
2374
2433
  // Functions
2375
2434
  G.ajax = HttpUtilities.ajax;
2435
+ G.data = Data.data;
2376
2436
  G.getJSON = HttpUtilities.getJSON;
2377
2437
  G.post = HttpUtilities.post;
2378
2438
  // Classes