highcharts 10.1.0 → 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 (772) hide show
  1. package/bower.json +1 -1
  2. package/es-modules/Accessibility/Accessibility.js +2 -3
  3. package/es-modules/Accessibility/Components/AnnotationsA11y.js +3 -3
  4. package/es-modules/Accessibility/Components/ContainerComponent.js +3 -1
  5. package/es-modules/Accessibility/Components/InfoRegionsComponent.js +5 -3
  6. package/es-modules/Accessibility/Components/LegendComponent.js +3 -3
  7. package/es-modules/Accessibility/Components/MenuComponent.js +3 -1
  8. package/es-modules/Accessibility/Components/RangeSelectorComponent.js +3 -1
  9. package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +3 -1
  10. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +12 -6
  11. package/es-modules/Accessibility/Components/ZoomComponent.js +30 -70
  12. package/es-modules/Accessibility/HighContrastMode.js +1 -1
  13. package/es-modules/Accessibility/KeyboardNavigation.js +2 -2
  14. package/es-modules/Accessibility/Options/{Options.js → A11yDefaults.js} +6 -1
  15. package/es-modules/Accessibility/Options/DeprecatedOptions.js +12 -2
  16. package/es-modules/Accessibility/Options/{LangOptions.js → LangDefaults.js} +10 -0
  17. package/es-modules/Accessibility/Utils/ChartUtilities.js +1 -1
  18. package/es-modules/Core/Animation/Fx.js +1 -1
  19. package/es-modules/Core/Axis/Axis.js +18 -19
  20. package/es-modules/Core/Axis/AxisDefaults.js +8 -8
  21. package/es-modules/Core/Axis/Color/ColorAxis.js +4 -2
  22. package/es-modules/Core/Axis/Color/ColorAxisDefaults.js +3 -3
  23. package/es-modules/Core/Axis/DateTimeAxis.js +5 -3
  24. package/es-modules/Core/Axis/GridAxis.js +817 -821
  25. package/es-modules/Core/Axis/OrdinalAxis.js +23 -1
  26. package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +2 -2
  27. package/es-modules/Core/Axis/Tick.js +20 -16
  28. package/es-modules/Core/Axis/TreeGridTick.js +2 -2
  29. package/es-modules/Core/Axis/ZAxis.js +3 -1
  30. package/es-modules/Core/Chart/Chart.js +13 -12
  31. package/es-modules/Core/Chart/ChartDefaults.js +3 -3
  32. package/es-modules/Core/Chart/GanttChart.js +3 -1
  33. package/es-modules/Core/Chart/MapChart.js +3 -1
  34. package/es-modules/Core/Chart/StockChart.js +6 -4
  35. package/es-modules/Core/Color/Color.js +1 -1
  36. package/es-modules/Core/DefaultOptions.js +11 -11
  37. package/es-modules/Core/Globals.js +1 -1
  38. package/es-modules/Core/HttpUtilities.js +39 -37
  39. package/es-modules/Core/Legend/Legend.js +3 -3
  40. package/es-modules/Core/MSPointer.js +3 -1
  41. package/es-modules/Core/Navigator.js +6 -6
  42. package/es-modules/Core/Pointer.js +1 -1
  43. package/es-modules/Core/Renderer/HTML/AST.js +1 -1
  44. package/es-modules/Core/Renderer/HTML/HTMLElement.js +3 -1
  45. package/es-modules/Core/Renderer/HTML/HTMLRenderer.js +3 -1
  46. package/es-modules/Core/Renderer/SVG/SVGElement.js +7 -7
  47. package/es-modules/Core/Renderer/SVG/SVGLabel.js +3 -1
  48. package/es-modules/Core/Renderer/SVG/SVGRenderer.js +37 -35
  49. package/es-modules/Core/Renderer/SVG/SVGRenderer3D.js +3 -1
  50. package/es-modules/Core/ScrollbarDefaults.js +8 -8
  51. package/es-modules/Core/Series/DataLabel.js +2 -2
  52. package/es-modules/Core/Series/Point.js +9 -0
  53. package/es-modules/Core/Series/Series.js +5 -5
  54. package/es-modules/Core/Series/Series3D.js +3 -1
  55. package/es-modules/Core/Series/SeriesDefaults.js +3 -3
  56. package/es-modules/Core/Time.js +6 -7
  57. package/es-modules/Core/Tooltip.js +3 -3
  58. package/es-modules/Core/Utilities.js +5 -5
  59. package/es-modules/Data/DataConverter.js +1 -1
  60. package/es-modules/Data/DataTable.js +12 -10
  61. package/es-modules/Data/Modifiers/ChainModifier.js +3 -1
  62. package/es-modules/Data/Modifiers/GroupModifier.js +3 -1
  63. package/es-modules/Data/Modifiers/InvertModifier.js +9 -7
  64. package/es-modules/Data/Modifiers/RangeModifier.js +3 -1
  65. package/es-modules/Data/Modifiers/SeriesPointsModifier.js +3 -1
  66. package/es-modules/Data/Modifiers/SortModifier.js +3 -1
  67. package/es-modules/Data/Parsers/CSVParser.js +3 -1
  68. package/es-modules/Data/Parsers/DataParser.js +1 -1
  69. package/es-modules/Data/Parsers/GoogleSheetsParser.js +3 -2
  70. package/es-modules/Data/Parsers/HTMLTableParser.js +3 -1
  71. package/es-modules/Data/Stores/CSVStore.js +8 -5
  72. package/es-modules/Data/Stores/GoogleSheetsStore.js +3 -1
  73. package/es-modules/Data/Stores/HTMLTableStore.js +3 -1
  74. package/es-modules/Extensions/Annotations/{Annotations.js → Annotation.js} +21 -9
  75. package/es-modules/Extensions/Annotations/AnnotationsDefaults.js +0 -0
  76. package/es-modules/Extensions/Annotations/Controllables/ControllableEllipse.js +5 -2
  77. package/es-modules/Extensions/Annotations/NavigationBindings.js +8 -5
  78. package/es-modules/Extensions/Annotations/Popup.js +2 -2
  79. package/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +13 -9
  80. package/es-modules/Extensions/Annotations/Types/CrookedLine.js +4 -2
  81. package/es-modules/Extensions/Annotations/Types/ElliottWave.js +4 -2
  82. package/es-modules/Extensions/Annotations/Types/Fibonacci.js +5 -3
  83. package/es-modules/Extensions/Annotations/Types/FibonacciTimeZones.js +4 -2
  84. package/es-modules/Extensions/Annotations/Types/InfinityLine.js +4 -2
  85. package/es-modules/Extensions/Annotations/Types/Measure.js +4 -2
  86. package/es-modules/Extensions/Annotations/Types/Pitchfork.js +4 -2
  87. package/es-modules/Extensions/Annotations/Types/TimeCycles.js +4 -2
  88. package/es-modules/Extensions/Annotations/Types/Tunnel.js +5 -2
  89. package/es-modules/Extensions/Annotations/Types/VerticalLine.js +4 -2
  90. package/es-modules/Extensions/Boost/BoostAttach.js +5 -1
  91. package/es-modules/Extensions/Boost/BoostInit.js +3 -2
  92. package/es-modules/Extensions/BoostCanvas.js +11 -5
  93. package/es-modules/Extensions/Breadcrumbs.js +31 -6
  94. package/es-modules/Extensions/CurrentDateIndication.js +1 -1
  95. package/es-modules/Extensions/Data.js +638 -602
  96. package/es-modules/Extensions/DownloadURL.js +3 -3
  97. package/es-modules/Extensions/DragPanes.js +1 -1
  98. package/es-modules/Extensions/Drilldown.js +2 -2
  99. package/es-modules/Extensions/ExportData.js +57 -7
  100. package/es-modules/Extensions/Exporting/Exporting.js +3 -3
  101. package/es-modules/Extensions/Exporting/ExportingDefaults.js +7 -7
  102. package/es-modules/Extensions/GeoJSON.js +0 -2
  103. package/es-modules/Extensions/MarkerClusters.js +3 -3
  104. package/es-modules/Extensions/NoDataToDisplay.js +1 -1
  105. package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
  106. package/es-modules/Extensions/Oldie/Oldie.js +2 -2
  107. package/es-modules/Extensions/Pane.js +3 -3
  108. package/es-modules/Extensions/ParallelCoordinates.js +1 -1
  109. package/es-modules/Extensions/PatternFill.js +14 -2
  110. package/es-modules/Extensions/RangeSelector.js +29 -18
  111. package/es-modules/Extensions/ScrollablePlotArea.js +3 -3
  112. package/es-modules/Extensions/{SeriesLabel.js → SeriesLabel/SeriesLabel.js} +262 -384
  113. package/es-modules/Extensions/SeriesLabel/SeriesLabelDefaults.js +124 -0
  114. package/es-modules/Extensions/SeriesLabel/SeriesLabelUtilities.js +67 -0
  115. package/es-modules/Extensions/Sonification/Earcon.js +1 -1
  116. package/es-modules/Extensions/Stacking.js +1 -1
  117. package/es-modules/Maps/MapNavigation.js +2 -2
  118. package/es-modules/Maps/MapView.js +23 -16
  119. package/es-modules/Maps/MapViewInsetsOptionsDefault.js +1 -1
  120. package/es-modules/Maps/Projection.js +13 -11
  121. package/es-modules/Series/ArcDiagram/ArcDiagramPoint.js +3 -1
  122. package/es-modules/Series/ArcDiagram/ArcDiagramSeries.js +3 -1
  123. package/es-modules/Series/Area/AreaSeries.js +21 -14
  124. package/es-modules/Series/AreaRange/AreaRangePoint.js +24 -11
  125. package/es-modules/Series/AreaRange/AreaRangeSeries.js +154 -147
  126. package/es-modules/Series/AreaSpline/AreaSplineSeries.js +45 -41
  127. package/es-modules/Series/AreaSplineRange/AreaSplineRangeSeries.js +43 -43
  128. package/es-modules/Series/Bar/BarSeries.js +3 -1
  129. package/es-modules/Series/Bellcurve/BellcurveSeries.js +3 -1
  130. package/es-modules/Series/BoxPlot/BoxPlotSeries.js +4 -2
  131. package/es-modules/Series/Bubble/BubbleLegendDefaults.js +1 -1
  132. package/es-modules/Series/Bubble/BubblePoint.js +3 -1
  133. package/es-modules/Series/Bubble/BubbleSeries.js +15 -6
  134. package/es-modules/Series/Bullet/BulletPoint.js +3 -1
  135. package/es-modules/Series/Bullet/BulletSeries.js +4 -3
  136. package/es-modules/Series/Candlestick/CandlestickSeries.js +5 -3
  137. package/es-modules/Series/CenteredUtilities.js +2 -1
  138. package/es-modules/Series/ColorMapComposition.js +111 -0
  139. package/es-modules/Series/Column/ColumnSeries.js +6 -4
  140. package/es-modules/Series/ColumnPyramid/ColumnPyramidSeries.js +3 -1
  141. package/es-modules/Series/ColumnRange/ColumnRangePoint.js +17 -13
  142. package/es-modules/Series/ColumnRange/ColumnRangeSeries.js +60 -57
  143. package/es-modules/Series/Cylinder/CylinderPoint.js +3 -1
  144. package/es-modules/Series/Cylinder/CylinderSeries.js +3 -1
  145. package/es-modules/Series/DependencyWheel/DependencyWheelPoint.js +3 -1
  146. package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +3 -1
  147. package/es-modules/Series/DotPlot/DotPlotSeries.js +3 -1
  148. package/es-modules/Series/DrawPointUtilities.js +87 -0
  149. package/es-modules/Series/Dumbbell/DumbbellPoint.js +3 -1
  150. package/es-modules/Series/Dumbbell/DumbbellSeries.js +4 -2
  151. package/es-modules/Series/ErrorBar/ErrorBarSeries.js +4 -2
  152. package/es-modules/Series/Flags/FlagsPoint.js +4 -1
  153. package/es-modules/Series/Flags/FlagsSeries.js +6 -4
  154. package/es-modules/Series/Funnel/FunnelSeries.js +5 -3
  155. package/es-modules/Series/Funnel3D/Funnel3DPoint.js +3 -1
  156. package/es-modules/Series/Funnel3D/Funnel3DSeries.js +3 -1
  157. package/es-modules/Series/Gantt/GanttPoint.js +3 -1
  158. package/es-modules/Series/Gantt/GanttSeries.js +3 -1
  159. package/es-modules/Series/Gauge/GaugePoint.js +3 -1
  160. package/es-modules/Series/Gauge/GaugeSeries.js +195 -173
  161. package/es-modules/Series/HLC/HLCPoint.js +3 -1
  162. package/es-modules/Series/HLC/HLCSeries.js +4 -2
  163. package/es-modules/Series/Heatmap/HeatmapPoint.js +7 -5
  164. package/es-modules/Series/Heatmap/HeatmapSeries.js +16 -13
  165. package/es-modules/Series/HeikinAshi/HeikinAshiPoint.js +3 -1
  166. package/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +3 -1
  167. package/es-modules/Series/Histogram/HistogramSeries.js +3 -1
  168. package/es-modules/Series/HollowCandlestick/HollowCandlestickPoint.js +3 -1
  169. package/es-modules/Series/HollowCandlestick/HollowCandlestickSeries.js +11 -9
  170. package/es-modules/Series/Item/ItemPoint.js +3 -1
  171. package/es-modules/Series/Item/ItemSeries.js +3 -1
  172. package/es-modules/Series/Line/LineSeries.js +4 -2
  173. package/es-modules/Series/Lollipop/LollipopPoint.js +3 -1
  174. package/es-modules/Series/Lollipop/LollipopSeries.js +3 -1
  175. package/es-modules/Series/Map/MapPoint.js +8 -6
  176. package/es-modules/Series/Map/MapSeries.js +98 -26
  177. package/es-modules/Series/MapBubble/MapBubblePoint.js +3 -1
  178. package/es-modules/Series/MapBubble/MapBubbleSeries.js +3 -1
  179. package/es-modules/Series/MapLine/MapLineSeries.js +18 -1
  180. package/es-modules/Series/MapPoint/MapPointPoint.js +4 -2
  181. package/es-modules/Series/MapPoint/MapPointSeries.js +10 -2
  182. package/es-modules/Series/Networkgraph/Networkgraph.js +3 -1
  183. package/es-modules/Series/NodesComposition.js +45 -40
  184. package/es-modules/Series/OHLC/OHLCPoint.js +3 -1
  185. package/es-modules/Series/OHLC/OHLCSeries.js +3 -1
  186. package/es-modules/Series/Organization/OrganizationPoint.js +3 -1
  187. package/es-modules/Series/Organization/OrganizationSeries.js +5 -3
  188. package/es-modules/Series/PackedBubble/PackedBubbleComposition.js +0 -2
  189. package/es-modules/Series/PackedBubble/PackedBubblePoint.js +3 -1
  190. package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +3 -1
  191. package/es-modules/Series/ParetoSeries/ParetoSeries.js +3 -1
  192. package/es-modules/Series/Pie/PieDataLabel.js +1 -1
  193. package/es-modules/Series/Pie/PiePoint.js +3 -1
  194. package/es-modules/Series/Pie/PieSeries.js +39 -36
  195. package/es-modules/Series/Pie3D/Pie3DPoint.js +3 -1
  196. package/es-modules/Series/Pie3D/Pie3DSeries.js +3 -1
  197. package/es-modules/Series/PolarComposition.js +819 -0
  198. package/es-modules/Series/Polygon/PolygonSeries.js +3 -1
  199. package/es-modules/Series/Pyramid/PyramidSeries.js +3 -1
  200. package/es-modules/Series/Pyramid3D/Pyramid3DSeries.js +3 -1
  201. package/es-modules/Series/Sankey/SankeyPoint.js +3 -1
  202. package/es-modules/Series/Sankey/SankeySeries.js +22 -8
  203. package/es-modules/Series/Scatter/ScatterSeries.js +10 -5
  204. package/es-modules/Series/Scatter3D/Scatter3DPoint.js +3 -1
  205. package/es-modules/Series/Scatter3D/Scatter3DSeries.js +3 -1
  206. package/es-modules/Series/SeriesOnPointComposition.js +391 -0
  207. package/es-modules/Series/SolidGauge/SolidGaugeSeries.js +5 -3
  208. package/es-modules/Series/Spline/SplineSeries.js +13 -4
  209. package/es-modules/Series/Streamgraph/StreamgraphSeries.js +3 -1
  210. package/es-modules/Series/Sunburst/SunburstPoint.js +3 -3
  211. package/es-modules/Series/Sunburst/SunburstSeries.js +7 -2
  212. package/es-modules/Series/Tilemap/TilemapPoint.js +3 -1
  213. package/es-modules/Series/Tilemap/TilemapSeries.js +3 -1
  214. package/es-modules/Series/Timeline/TimelinePoint.js +3 -1
  215. package/es-modules/Series/Timeline/TimelineSeries.js +6 -4
  216. package/es-modules/Series/Treemap/TreemapPoint.js +8 -4
  217. package/es-modules/Series/Treemap/TreemapSeries.js +9 -7
  218. package/es-modules/Series/VariablePie/VariablePieSeries.js +3 -1
  219. package/es-modules/Series/Variwide/VariwidePoint.js +3 -1
  220. package/es-modules/Series/Variwide/VariwideSeries.js +3 -1
  221. package/es-modules/Series/Vector/VectorSeries.js +3 -1
  222. package/es-modules/Series/Venn/VennPoint.js +5 -5
  223. package/es-modules/Series/Venn/VennSeries.js +9 -6
  224. package/es-modules/Series/Waterfall/WaterfallPoint.js +3 -1
  225. package/es-modules/Series/Waterfall/WaterfallSeries.js +14 -12
  226. package/es-modules/Series/Windbarb/WindbarbPoint.js +3 -1
  227. package/es-modules/Series/Windbarb/WindbarbSeries.js +3 -1
  228. package/es-modules/Series/Wordcloud/WordcloudPoint.js +6 -6
  229. package/es-modules/Series/Wordcloud/WordcloudSeries.js +7 -4
  230. package/es-modules/Series/XRange/XRangePoint.js +3 -1
  231. package/es-modules/Series/XRange/XRangeSeries.js +3 -1
  232. package/es-modules/Stock/Indicators/ABands/ABandsIndicator.js +3 -1
  233. package/es-modules/Stock/Indicators/AD/ADIndicator.js +3 -1
  234. package/es-modules/Stock/Indicators/AO/AOIndicator.js +5 -3
  235. package/es-modules/Stock/Indicators/APO/APOIndicator.js +3 -1
  236. package/es-modules/Stock/Indicators/ATR/ATRIndicator.js +3 -1
  237. package/es-modules/Stock/Indicators/Aroon/AroonIndicator.js +3 -1
  238. package/es-modules/Stock/Indicators/AroonOscillator/AroonOscillatorIndicator.js +3 -1
  239. package/es-modules/Stock/Indicators/BB/BBIndicator.js +6 -4
  240. package/es-modules/Stock/Indicators/CCI/CCIIndicator.js +3 -1
  241. package/es-modules/Stock/Indicators/CMF/CMFIndicator.js +3 -1
  242. package/es-modules/Stock/Indicators/CMO/CMOIndicator.js +3 -1
  243. package/es-modules/Stock/Indicators/Chaikin/ChaikinIndicator.js +3 -1
  244. package/es-modules/Stock/Indicators/DEMA/DEMAIndicator.js +3 -1
  245. package/es-modules/Stock/Indicators/DMI/DMIIndicator.js +13 -7
  246. package/es-modules/Stock/Indicators/DPO/DPOIndicator.js +3 -1
  247. package/es-modules/Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js +3 -1
  248. package/es-modules/Stock/Indicators/EMA/EMAIndicator.js +3 -1
  249. package/es-modules/Stock/Indicators/IKH/IKHIndicator.js +3 -1
  250. package/es-modules/Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js +3 -1
  251. package/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +3 -1
  252. package/es-modules/Stock/Indicators/LinearRegression/LinearRegression.js +3 -1
  253. package/es-modules/Stock/Indicators/LinearRegressionAngle/LinearRegressionAngle.js +3 -1
  254. package/es-modules/Stock/Indicators/LinearRegressionIntercept/LinearRegressionIntercept.js +3 -1
  255. package/es-modules/Stock/Indicators/LinearRegressionSlopes/LinearRegressionSlopes.js +3 -1
  256. package/es-modules/Stock/Indicators/MACD/MACDIndicator.js +26 -13
  257. package/es-modules/Stock/Indicators/MFI/MFIIndicator.js +3 -1
  258. package/es-modules/Stock/Indicators/Momentum/MomentumIndicator.js +3 -1
  259. package/es-modules/Stock/Indicators/MultipleLinesComposition.js +85 -95
  260. package/es-modules/Stock/Indicators/NATR/NATRIndicator.js +3 -1
  261. package/es-modules/Stock/Indicators/OBV/OBVIndicator.js +3 -1
  262. package/es-modules/Stock/Indicators/PC/PCIndicator.js +3 -1
  263. package/es-modules/Stock/Indicators/PPO/PPOIndicator.js +3 -1
  264. package/es-modules/Stock/Indicators/PSAR/PSARIndicator.js +3 -1
  265. package/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +3 -1
  266. package/es-modules/Stock/Indicators/PivotPoints/PivotPointsPoint.js +3 -1
  267. package/es-modules/Stock/Indicators/PriceEnvelopes/PriceEnvelopesIndicator.js +3 -1
  268. package/es-modules/Stock/Indicators/ROC/ROCIndicator.js +3 -1
  269. package/es-modules/Stock/Indicators/RSI/RSIIndicator.js +3 -1
  270. package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +3 -1
  271. package/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +3 -1
  272. package/es-modules/Stock/Indicators/Stochastic/StochasticIndicator.js +3 -1
  273. package/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +6 -4
  274. package/es-modules/Stock/Indicators/TEMA/TEMAIndicator.js +3 -1
  275. package/es-modules/Stock/Indicators/TRIX/TRIXIndicator.js +3 -1
  276. package/es-modules/Stock/Indicators/TrendLine/TrendLineIndicator.js +3 -1
  277. package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +3 -1
  278. package/es-modules/Stock/Indicators/VBP/VBPPoint.js +3 -1
  279. package/es-modules/Stock/Indicators/VWAP/VWAPIndicator.js +3 -1
  280. package/es-modules/Stock/Indicators/WMA/WMAIndicator.js +3 -1
  281. package/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +3 -1
  282. package/es-modules/Stock/Indicators/Zigzag/ZigzagIndicator.js +3 -1
  283. package/es-modules/Stock/StockToolsBindings.js +20 -19
  284. package/es-modules/Stock/StockToolsGui.js +1 -1
  285. package/es-modules/masters/highcharts-3d.src.js +1 -1
  286. package/es-modules/masters/highcharts-gantt.src.js +1 -1
  287. package/es-modules/masters/highcharts-more.src.js +4 -4
  288. package/es-modules/masters/highcharts.src.js +1 -1
  289. package/es-modules/masters/highmaps.src.js +1 -1
  290. package/es-modules/masters/highstock.src.js +1 -1
  291. package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
  292. package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
  293. package/es-modules/masters/indicators/ao.src.js +1 -1
  294. package/es-modules/masters/indicators/apo.src.js +1 -1
  295. package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
  296. package/es-modules/masters/indicators/aroon.src.js +1 -1
  297. package/es-modules/masters/indicators/atr.src.js +1 -1
  298. package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
  299. package/es-modules/masters/indicators/cci.src.js +1 -1
  300. package/es-modules/masters/indicators/chaikin.src.js +1 -1
  301. package/es-modules/masters/indicators/cmf.src.js +1 -1
  302. package/es-modules/masters/indicators/cmo.src.js +1 -1
  303. package/es-modules/masters/indicators/dema.src.js +1 -1
  304. package/es-modules/masters/indicators/disparity-index.src.js +1 -1
  305. package/es-modules/masters/indicators/dmi.src.js +1 -1
  306. package/es-modules/masters/indicators/dpo.src.js +1 -1
  307. package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
  308. package/es-modules/masters/indicators/indicators-all.src.js +1 -1
  309. package/es-modules/masters/indicators/indicators.src.js +1 -1
  310. package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
  311. package/es-modules/masters/indicators/klinger.src.js +1 -1
  312. package/es-modules/masters/indicators/macd.src.js +1 -1
  313. package/es-modules/masters/indicators/mfi.src.js +1 -1
  314. package/es-modules/masters/indicators/momentum.src.js +1 -1
  315. package/es-modules/masters/indicators/natr.src.js +1 -1
  316. package/es-modules/masters/indicators/obv.src.js +1 -1
  317. package/es-modules/masters/indicators/pivot-points.src.js +1 -1
  318. package/es-modules/masters/indicators/ppo.src.js +1 -1
  319. package/es-modules/masters/indicators/price-channel.src.js +1 -1
  320. package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
  321. package/es-modules/masters/indicators/psar.src.js +1 -1
  322. package/es-modules/masters/indicators/regressions.src.js +1 -1
  323. package/es-modules/masters/indicators/roc.src.js +1 -1
  324. package/es-modules/masters/indicators/rsi.src.js +1 -1
  325. package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
  326. package/es-modules/masters/indicators/stochastic.src.js +1 -1
  327. package/es-modules/masters/indicators/supertrend.src.js +1 -1
  328. package/es-modules/masters/indicators/tema.src.js +1 -1
  329. package/es-modules/masters/indicators/trendline.src.js +1 -1
  330. package/es-modules/masters/indicators/trix.src.js +1 -1
  331. package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
  332. package/es-modules/masters/indicators/vwap.src.js +1 -1
  333. package/es-modules/masters/indicators/williams-r.src.js +1 -1
  334. package/es-modules/masters/indicators/wma.src.js +1 -1
  335. package/es-modules/masters/indicators/zigzag.src.js +1 -1
  336. package/es-modules/masters/modules/accessibility.src.js +1 -1
  337. package/es-modules/masters/modules/annotations-advanced.src.js +2 -2
  338. package/es-modules/masters/modules/annotations.src.js +2 -2
  339. package/es-modules/masters/modules/arc-diagram.src.js +1 -1
  340. package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
  341. package/es-modules/masters/modules/boost-canvas.src.js +1 -1
  342. package/es-modules/masters/modules/boost.src.js +1 -1
  343. package/es-modules/masters/modules/broken-axis.src.js +1 -1
  344. package/es-modules/masters/modules/bullet.src.js +1 -1
  345. package/es-modules/masters/modules/coloraxis.src.js +1 -1
  346. package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
  347. package/es-modules/masters/modules/cylinder.src.js +1 -1
  348. package/es-modules/masters/modules/data.src.js +2 -1
  349. package/es-modules/masters/modules/datagrouping.src.js +1 -1
  350. package/es-modules/masters/modules/debugger.src.js +1 -1
  351. package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
  352. package/es-modules/masters/modules/dotplot.src.js +1 -1
  353. package/es-modules/masters/modules/drag-panes.src.js +1 -1
  354. package/es-modules/masters/modules/draggable-points.src.js +1 -1
  355. package/es-modules/masters/modules/drilldown.src.js +1 -1
  356. package/es-modules/masters/modules/dumbbell.src.js +1 -1
  357. package/es-modules/masters/modules/export-data.src.js +1 -1
  358. package/es-modules/masters/modules/exporting.src.js +1 -1
  359. package/es-modules/masters/modules/full-screen.src.js +1 -1
  360. package/es-modules/masters/modules/funnel.src.js +1 -1
  361. package/es-modules/masters/modules/funnel3d.src.js +1 -1
  362. package/es-modules/masters/modules/gantt.src.js +1 -1
  363. package/es-modules/masters/modules/grid-axis.src.js +1 -1
  364. package/es-modules/masters/modules/heatmap.src.js +1 -1
  365. package/es-modules/masters/modules/heikinashi.src.js +1 -1
  366. package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
  367. package/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
  368. package/es-modules/masters/modules/item-series.src.js +1 -1
  369. package/es-modules/masters/modules/lollipop.src.js +1 -1
  370. package/es-modules/masters/modules/map.src.js +1 -1
  371. package/es-modules/masters/modules/marker-clusters.src.js +1 -1
  372. package/es-modules/masters/modules/networkgraph.src.js +1 -1
  373. package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
  374. package/es-modules/masters/modules/offline-exporting.src.js +1 -1
  375. package/es-modules/masters/modules/oldie-polyfills.src.js +1 -1
  376. package/es-modules/masters/modules/oldie.src.js +1 -1
  377. package/es-modules/masters/modules/organization.src.js +1 -1
  378. package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
  379. package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
  380. package/es-modules/masters/modules/pareto.src.js +1 -1
  381. package/es-modules/masters/modules/pathfinder.src.js +1 -1
  382. package/es-modules/masters/modules/pattern-fill.src.js +1 -1
  383. package/es-modules/masters/modules/price-indicator.src.js +1 -1
  384. package/es-modules/masters/modules/pyramid3d.src.js +1 -1
  385. package/es-modules/masters/modules/sankey.src.js +1 -1
  386. package/es-modules/masters/modules/series-label.src.js +5 -2
  387. package/es-modules/masters/modules/series-on-point.src.js +16 -0
  388. package/es-modules/masters/modules/solid-gauge.src.js +1 -1
  389. package/es-modules/masters/modules/sonification.src.js +2 -6
  390. package/es-modules/masters/modules/static-scale.src.js +1 -1
  391. package/es-modules/masters/modules/stock-tools.src.js +1 -1
  392. package/es-modules/masters/modules/stock.src.js +1 -1
  393. package/es-modules/masters/modules/streamgraph.src.js +1 -1
  394. package/es-modules/masters/modules/sunburst.src.js +1 -1
  395. package/es-modules/masters/modules/tilemap.src.js +1 -1
  396. package/es-modules/masters/modules/timeline.src.js +1 -1
  397. package/es-modules/masters/modules/treegrid.src.js +1 -1
  398. package/es-modules/masters/modules/treemap.src.js +1 -1
  399. package/es-modules/masters/modules/variable-pie.src.js +1 -1
  400. package/es-modules/masters/modules/variwide.src.js +1 -1
  401. package/es-modules/masters/modules/vector.src.js +1 -1
  402. package/es-modules/masters/modules/venn.src.js +1 -1
  403. package/es-modules/masters/modules/windbarb.src.js +1 -1
  404. package/es-modules/masters/modules/wordcloud.src.js +1 -1
  405. package/es-modules/masters/modules/xrange.src.js +1 -1
  406. package/es-modules/masters/themes/avocado.src.js +1 -1
  407. package/es-modules/masters/themes/brand-dark.src.js +1 -1
  408. package/es-modules/masters/themes/brand-light.src.js +1 -1
  409. package/es-modules/masters/themes/dark-blue.src.js +1 -1
  410. package/es-modules/masters/themes/dark-green.src.js +1 -1
  411. package/es-modules/masters/themes/dark-unica.src.js +1 -1
  412. package/es-modules/masters/themes/gray.src.js +1 -1
  413. package/es-modules/masters/themes/grid-light.src.js +1 -1
  414. package/es-modules/masters/themes/grid.src.js +1 -1
  415. package/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
  416. package/es-modules/masters/themes/high-contrast-light.src.js +1 -1
  417. package/es-modules/masters/themes/sand-signika.src.js +1 -1
  418. package/es-modules/masters/themes/skies.src.js +1 -1
  419. package/es-modules/masters/themes/sunset.src.js +1 -1
  420. package/highcharts-3d.js +1 -1
  421. package/highcharts-3d.src.js +1 -1
  422. package/highcharts-gantt.js +811 -809
  423. package/highcharts-gantt.js.map +1 -1
  424. package/highcharts-gantt.src.js +1271 -1213
  425. package/highcharts-more.d.ts +10 -0
  426. package/highcharts-more.js +194 -195
  427. package/highcharts-more.js.map +1 -1
  428. package/highcharts-more.src.d.ts +10 -0
  429. package/highcharts-more.src.js +5649 -5515
  430. package/highcharts.d.ts +9118 -429
  431. package/highcharts.js +595 -594
  432. package/highcharts.js.map +1 -1
  433. package/highcharts.src.d.ts +9118 -429
  434. package/highcharts.src.js +335 -285
  435. package/highmaps.js +763 -760
  436. package/highmaps.js.map +1 -1
  437. package/highmaps.src.js +640 -448
  438. package/highstock.js +797 -794
  439. package/highstock.js.map +1 -1
  440. package/highstock.src.js +414 -327
  441. package/indicators/acceleration-bands.d.ts +1 -17
  442. package/indicators/acceleration-bands.js +11 -12
  443. package/indicators/acceleration-bands.js.map +1 -1
  444. package/indicators/acceleration-bands.src.d.ts +1 -17
  445. package/indicators/acceleration-bands.src.js +89 -99
  446. package/indicators/accumulation-distribution.js +1 -1
  447. package/indicators/accumulation-distribution.src.js +1 -1
  448. package/indicators/ao.js +1 -1
  449. package/indicators/ao.src.js +3 -3
  450. package/indicators/apo.js +1 -1
  451. package/indicators/apo.src.js +1 -1
  452. package/indicators/aroon-oscillator.d.ts +1 -17
  453. package/indicators/aroon-oscillator.js +10 -10
  454. package/indicators/aroon-oscillator.js.map +1 -1
  455. package/indicators/aroon-oscillator.src.d.ts +1 -17
  456. package/indicators/aroon-oscillator.src.js +89 -99
  457. package/indicators/aroon.d.ts +1 -17
  458. package/indicators/aroon.js +11 -11
  459. package/indicators/aroon.js.map +1 -1
  460. package/indicators/aroon.src.d.ts +1 -17
  461. package/indicators/aroon.src.js +89 -99
  462. package/indicators/atr.js +1 -1
  463. package/indicators/atr.src.js +1 -1
  464. package/indicators/bollinger-bands.d.ts +1 -17
  465. package/indicators/bollinger-bands.js +11 -12
  466. package/indicators/bollinger-bands.js.map +1 -1
  467. package/indicators/bollinger-bands.src.d.ts +1 -17
  468. package/indicators/bollinger-bands.src.js +92 -102
  469. package/indicators/cci.js +1 -1
  470. package/indicators/cci.src.js +1 -1
  471. package/indicators/chaikin.js +1 -1
  472. package/indicators/chaikin.src.js +1 -1
  473. package/indicators/cmf.js +1 -1
  474. package/indicators/cmf.src.js +1 -1
  475. package/indicators/cmo.js +1 -1
  476. package/indicators/cmo.src.js +1 -1
  477. package/indicators/dema.js +1 -1
  478. package/indicators/dema.src.js +1 -1
  479. package/indicators/disparity-index.js +1 -1
  480. package/indicators/disparity-index.src.js +1 -1
  481. package/indicators/dmi.js +12 -12
  482. package/indicators/dmi.js.map +1 -1
  483. package/indicators/dmi.src.js +99 -105
  484. package/indicators/dpo.js +1 -1
  485. package/indicators/dpo.src.js +1 -1
  486. package/indicators/ichimoku-kinko-hyo.js +1 -1
  487. package/indicators/ichimoku-kinko-hyo.src.js +1 -1
  488. package/indicators/indicators-all.d.ts +1 -17
  489. package/indicators/indicators-all.js +195 -194
  490. package/indicators/indicators-all.js.map +1 -1
  491. package/indicators/indicators-all.src.d.ts +1 -17
  492. package/indicators/indicators-all.src.js +131 -125
  493. package/indicators/indicators.js +1 -1
  494. package/indicators/indicators.src.js +1 -1
  495. package/indicators/keltner-channels.d.ts +1 -17
  496. package/indicators/keltner-channels.js +11 -12
  497. package/indicators/keltner-channels.js.map +1 -1
  498. package/indicators/keltner-channels.src.d.ts +1 -17
  499. package/indicators/keltner-channels.src.js +89 -99
  500. package/indicators/klinger.js +14 -14
  501. package/indicators/klinger.js.map +1 -1
  502. package/indicators/klinger.src.js +89 -99
  503. package/indicators/macd.js +10 -9
  504. package/indicators/macd.js.map +1 -1
  505. package/indicators/macd.src.js +25 -13
  506. package/indicators/mfi.js +1 -1
  507. package/indicators/mfi.src.js +1 -1
  508. package/indicators/momentum.js +1 -1
  509. package/indicators/momentum.src.js +1 -1
  510. package/indicators/natr.js +1 -1
  511. package/indicators/natr.src.js +1 -1
  512. package/indicators/obv.js +1 -1
  513. package/indicators/obv.src.js +1 -1
  514. package/indicators/pivot-points.js +1 -1
  515. package/indicators/pivot-points.src.js +1 -1
  516. package/indicators/ppo.js +1 -1
  517. package/indicators/ppo.src.js +1 -1
  518. package/indicators/price-channel.d.ts +1 -17
  519. package/indicators/price-channel.js +11 -11
  520. package/indicators/price-channel.js.map +1 -1
  521. package/indicators/price-channel.src.d.ts +1 -17
  522. package/indicators/price-channel.src.js +89 -99
  523. package/indicators/price-envelopes.js +1 -1
  524. package/indicators/price-envelopes.src.js +1 -1
  525. package/indicators/psar.js +1 -1
  526. package/indicators/psar.src.js +1 -1
  527. package/indicators/regressions.js +1 -1
  528. package/indicators/regressions.src.js +1 -1
  529. package/indicators/roc.js +1 -1
  530. package/indicators/roc.src.js +1 -1
  531. package/indicators/rsi.js +1 -1
  532. package/indicators/rsi.src.js +1 -1
  533. package/indicators/slow-stochastic.js +1 -1
  534. package/indicators/slow-stochastic.src.js +1 -1
  535. package/indicators/stochastic.d.ts +1 -17
  536. package/indicators/stochastic.js +12 -12
  537. package/indicators/stochastic.js.map +1 -1
  538. package/indicators/stochastic.src.d.ts +1 -17
  539. package/indicators/stochastic.src.js +89 -99
  540. package/indicators/supertrend.js +1 -1
  541. package/indicators/supertrend.src.js +4 -4
  542. package/indicators/tema.js +1 -1
  543. package/indicators/tema.src.js +1 -1
  544. package/indicators/trendline.js +1 -1
  545. package/indicators/trendline.src.js +1 -1
  546. package/indicators/trix.js +1 -1
  547. package/indicators/trix.src.js +1 -1
  548. package/indicators/volume-by-price.js +1 -1
  549. package/indicators/volume-by-price.src.js +1 -1
  550. package/indicators/vwap.js +1 -1
  551. package/indicators/vwap.src.js +1 -1
  552. package/indicators/williams-r.js +1 -1
  553. package/indicators/williams-r.src.js +1 -1
  554. package/indicators/wma.js +1 -1
  555. package/indicators/wma.src.js +1 -1
  556. package/indicators/zigzag.js +1 -1
  557. package/indicators/zigzag.src.js +1 -1
  558. package/modules/accessibility.js +230 -229
  559. package/modules/accessibility.js.map +1 -1
  560. package/modules/accessibility.src.js +110 -115
  561. package/modules/annotations-advanced.js +187 -187
  562. package/modules/annotations-advanced.js.map +1 -1
  563. package/modules/annotations-advanced.src.js +62 -39
  564. package/modules/annotations.js +61 -61
  565. package/modules/annotations.js.map +1 -1
  566. package/modules/annotations.src.js +38 -20
  567. package/modules/arc-diagram.js +1 -1
  568. package/modules/arc-diagram.src.js +1 -1
  569. package/modules/arrow-symbols.js +1 -1
  570. package/modules/arrow-symbols.src.js +1 -1
  571. package/modules/boost-canvas.js +12 -11
  572. package/modules/boost-canvas.js.map +1 -1
  573. package/modules/boost-canvas.src.js +12 -6
  574. package/modules/boost.js +81 -80
  575. package/modules/boost.js.map +1 -1
  576. package/modules/boost.src.js +20 -9
  577. package/modules/broken-axis.js +1 -1
  578. package/modules/broken-axis.src.js +1 -1
  579. package/modules/bullet.js +1 -1
  580. package/modules/bullet.js.map +1 -1
  581. package/modules/bullet.src.js +2 -5
  582. package/modules/coloraxis.js +2 -2
  583. package/modules/coloraxis.js.map +1 -1
  584. package/modules/coloraxis.src.js +5 -5
  585. package/modules/current-date-indicator.js +1 -1
  586. package/modules/current-date-indicator.src.js +2 -2
  587. package/modules/cylinder.js +1 -1
  588. package/modules/cylinder.src.js +1 -1
  589. package/modules/data.d.ts +12 -12
  590. package/modules/data.js +33 -34
  591. package/modules/data.js.map +1 -1
  592. package/modules/data.src.d.ts +12 -12
  593. package/modules/data.src.js +862 -829
  594. package/modules/datagrouping.js +1 -1
  595. package/modules/datagrouping.src.js +1 -1
  596. package/modules/debugger.js +1 -1
  597. package/modules/debugger.src.js +1 -1
  598. package/modules/dependency-wheel.js +1 -1
  599. package/modules/dependency-wheel.src.js +1 -1
  600. package/modules/dotplot.js +1 -1
  601. package/modules/dotplot.src.js +1 -1
  602. package/modules/drag-panes.js +1 -1
  603. package/modules/drag-panes.src.js +2 -2
  604. package/modules/draggable-points.js +1 -1
  605. package/modules/draggable-points.src.js +1 -1
  606. package/modules/drilldown.js +37 -36
  607. package/modules/drilldown.js.map +1 -1
  608. package/modules/drilldown.src.js +40 -9
  609. package/modules/dumbbell.d.ts +4 -0
  610. package/modules/dumbbell.js +17 -17
  611. package/modules/dumbbell.js.map +1 -1
  612. package/modules/dumbbell.src.d.ts +4 -0
  613. package/modules/dumbbell.src.js +24 -12
  614. package/modules/export-data.js +24 -22
  615. package/modules/export-data.js.map +1 -1
  616. package/modules/export-data.src.js +76 -11
  617. package/modules/exporting.d.ts +8 -8
  618. package/modules/exporting.js +36 -36
  619. package/modules/exporting.js.map +1 -1
  620. package/modules/exporting.src.d.ts +8 -8
  621. package/modules/exporting.src.js +50 -50
  622. package/modules/full-screen.js +1 -1
  623. package/modules/full-screen.src.js +1 -1
  624. package/modules/funnel.js +1 -1
  625. package/modules/funnel.src.js +3 -3
  626. package/modules/funnel3d.js +1 -1
  627. package/modules/funnel3d.src.js +1 -1
  628. package/modules/gantt.js +218 -218
  629. package/modules/gantt.js.map +1 -1
  630. package/modules/gantt.src.js +935 -927
  631. package/modules/grid-axis.js +23 -23
  632. package/modules/grid-axis.js.map +1 -1
  633. package/modules/grid-axis.src.js +886 -890
  634. package/modules/heatmap.js +40 -40
  635. package/modules/heatmap.js.map +1 -1
  636. package/modules/heatmap.src.js +115 -87
  637. package/modules/heikinashi.js +1 -1
  638. package/modules/heikinashi.src.js +1 -1
  639. package/modules/histogram-bellcurve.js +1 -1
  640. package/modules/histogram-bellcurve.src.js +1 -1
  641. package/modules/hollowcandlestick.js +1 -1
  642. package/modules/hollowcandlestick.src.js +9 -9
  643. package/modules/item-series.js +1 -1
  644. package/modules/item-series.src.js +1 -1
  645. package/modules/lollipop.js +1 -1
  646. package/modules/lollipop.src.js +1 -1
  647. package/modules/map.js +171 -169
  648. package/modules/map.js.map +1 -1
  649. package/modules/map.src.js +306 -164
  650. package/modules/marker-clusters.js +1 -1
  651. package/modules/marker-clusters.js.map +1 -1
  652. package/modules/marker-clusters.src.js +2 -6
  653. package/modules/networkgraph.d.ts +1 -17
  654. package/modules/networkgraph.js +49 -49
  655. package/modules/networkgraph.js.map +1 -1
  656. package/modules/networkgraph.src.d.ts +1 -17
  657. package/modules/networkgraph.src.js +55 -45
  658. package/modules/no-data-to-display.js +1 -1
  659. package/modules/no-data-to-display.src.js +2 -2
  660. package/modules/offline-exporting.js +3 -3
  661. package/modules/offline-exporting.js.map +1 -1
  662. package/modules/offline-exporting.src.js +5 -5
  663. package/modules/oldie-polyfills.js +1 -1
  664. package/modules/oldie-polyfills.src.js +1 -1
  665. package/modules/oldie.js +2 -2
  666. package/modules/oldie.src.js +3 -3
  667. package/modules/organization.js +1 -1
  668. package/modules/organization.src.js +3 -3
  669. package/modules/overlapping-datalabels.js +1 -1
  670. package/modules/overlapping-datalabels.src.js +1 -1
  671. package/modules/parallel-coordinates.js +2 -2
  672. package/modules/parallel-coordinates.js.map +1 -1
  673. package/modules/parallel-coordinates.src.js +2 -2
  674. package/modules/pareto.js +1 -1
  675. package/modules/pareto.src.js +1 -1
  676. package/modules/pathfinder.js +1 -1
  677. package/modules/pathfinder.src.js +1 -1
  678. package/modules/pattern-fill.js +15 -14
  679. package/modules/pattern-fill.js.map +1 -1
  680. package/modules/pattern-fill.src.js +15 -2
  681. package/modules/price-indicator.js +1 -1
  682. package/modules/price-indicator.src.js +1 -1
  683. package/modules/pyramid3d.js +1 -1
  684. package/modules/pyramid3d.src.js +1 -1
  685. package/modules/sankey.d.ts +1 -17
  686. package/modules/sankey.js +32 -32
  687. package/modules/sankey.js.map +1 -1
  688. package/modules/sankey.src.d.ts +1 -17
  689. package/modules/sankey.src.js +86 -55
  690. package/modules/series-label.js +18 -18
  691. package/modules/series-label.js.map +1 -1
  692. package/modules/series-label.src.js +472 -385
  693. package/modules/series-on-point.js +18 -0
  694. package/modules/series-on-point.js.map +1 -0
  695. package/modules/series-on-point.src.js +464 -0
  696. package/modules/solid-gauge.js +4 -4
  697. package/modules/solid-gauge.js.map +1 -1
  698. package/modules/solid-gauge.src.js +5 -5
  699. package/modules/sonification.js +1 -1
  700. package/modules/sonification.js.map +1 -1
  701. package/modules/sonification.src.js +3 -7
  702. package/modules/static-scale.js +1 -1
  703. package/modules/static-scale.src.js +1 -1
  704. package/modules/stock-tools.js +142 -142
  705. package/modules/stock-tools.js.map +1 -1
  706. package/modules/stock-tools.src.js +57 -38
  707. package/modules/stock.js +205 -204
  708. package/modules/stock.js.map +1 -1
  709. package/modules/stock.src.js +80 -43
  710. package/modules/streamgraph.js +1 -1
  711. package/modules/streamgraph.src.js +1 -1
  712. package/modules/sunburst.js +73 -73
  713. package/modules/sunburst.js.map +1 -1
  714. package/modules/sunburst.src.js +211 -177
  715. package/modules/tilemap.js +1 -1
  716. package/modules/tilemap.src.js +1 -1
  717. package/modules/timeline.js +1 -1
  718. package/modules/timeline.src.js +4 -4
  719. package/modules/treegrid.js +56 -56
  720. package/modules/treegrid.js.map +1 -1
  721. package/modules/treegrid.src.js +888 -892
  722. package/modules/treemap.js +54 -53
  723. package/modules/treemap.js.map +1 -1
  724. package/modules/treemap.src.js +208 -176
  725. package/modules/variable-pie.js +1 -1
  726. package/modules/variable-pie.src.js +1 -1
  727. package/modules/variwide.js +1 -1
  728. package/modules/variwide.src.js +1 -1
  729. package/modules/vector.js +1 -1
  730. package/modules/vector.src.js +1 -1
  731. package/modules/venn.js +31 -31
  732. package/modules/venn.js.map +1 -1
  733. package/modules/venn.src.js +78 -107
  734. package/modules/windbarb.js +1 -1
  735. package/modules/windbarb.src.js +1 -1
  736. package/modules/wordcloud.js +23 -24
  737. package/modules/wordcloud.js.map +1 -1
  738. package/modules/wordcloud.src.js +78 -107
  739. package/modules/xrange.js +1 -1
  740. package/modules/xrange.src.js +1 -1
  741. package/package.json +1 -1
  742. package/themes/avocado.js +1 -1
  743. package/themes/avocado.src.js +1 -1
  744. package/themes/brand-dark.js +1 -1
  745. package/themes/brand-dark.src.js +1 -1
  746. package/themes/brand-light.js +1 -1
  747. package/themes/brand-light.src.js +1 -1
  748. package/themes/dark-blue.js +1 -1
  749. package/themes/dark-blue.src.js +1 -1
  750. package/themes/dark-green.js +1 -1
  751. package/themes/dark-green.src.js +1 -1
  752. package/themes/dark-unica.js +1 -1
  753. package/themes/dark-unica.src.js +1 -1
  754. package/themes/gray.js +1 -1
  755. package/themes/gray.src.js +1 -1
  756. package/themes/grid-light.js +1 -1
  757. package/themes/grid-light.src.js +1 -1
  758. package/themes/grid.js +1 -1
  759. package/themes/grid.src.js +1 -1
  760. package/themes/high-contrast-dark.js +1 -1
  761. package/themes/high-contrast-dark.src.js +1 -1
  762. package/themes/high-contrast-light.js +1 -1
  763. package/themes/high-contrast-light.src.js +1 -1
  764. package/themes/sand-signika.js +1 -1
  765. package/themes/sand-signika.src.js +1 -1
  766. package/themes/skies.js +1 -1
  767. package/themes/skies.src.js +1 -1
  768. package/themes/sunset.js +1 -1
  769. package/themes/sunset.src.js +1 -1
  770. package/es-modules/Extensions/Polar.js +0 -743
  771. package/es-modules/Series/ColorMapMixin.js +0 -84
  772. package/es-modules/Series/DrawPointComposition.js +0 -114
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v10.1.0 (2022-04-29)
2
+ * @license Highcharts JS v10.2.0 (2022-07-05)
3
3
  *
4
4
  * Data module
5
5
  *
@@ -52,29 +52,24 @@
52
52
  discardElement = U.discardElement,
53
53
  merge = U.merge,
54
54
  objectEach = U.objectEach;
55
+ /* *
56
+ *
57
+ * Functions
58
+ *
59
+ * */
55
60
  /**
56
61
  * Perform an Ajax call.
57
62
  *
58
63
  * @function Highcharts.ajax
59
64
  *
60
- * @param {Partial<Highcharts.AjaxSettingsObject>} attr
65
+ * @param {Highcharts.AjaxSettingsObject} settings
61
66
  * The Ajax settings to use.
62
67
  *
63
68
  * @return {false|undefined}
64
69
  * Returns false, if error occured.
65
70
  */
66
- function ajax(attr) {
67
- var options = merge(true, {
68
- url: false,
69
- type: 'get',
70
- dataType: 'json',
71
- success: false,
72
- error: false,
73
- data: false,
74
- headers: {}
75
- },
76
- attr),
77
- headers = {
71
+ function ajax(settings) {
72
+ var headers = {
78
73
  json: 'application/json',
79
74
  xml: 'application/xml',
80
75
  text: 'text/plain',
@@ -82,6 +77,7 @@
82
77
  },
83
78
  r = new XMLHttpRequest();
84
79
  /**
80
+ * Private error handler.
85
81
  * @private
86
82
  * @param {XMLHttpRequest} xhr
87
83
  * Internal request object.
@@ -89,54 +85,53 @@
89
85
  * Occured error.
90
86
  */
91
87
  function handleError(xhr, err) {
92
- if (options.error) {
93
- options.error(xhr, err);
88
+ if (settings.error) {
89
+ settings.error(xhr, err);
94
90
  }
95
91
  else {
96
92
  // @todo Maybe emit a highcharts error event here
97
93
  }
98
94
  }
99
- if (!options.url) {
95
+ if (!settings.url) {
100
96
  return false;
101
97
  }
102
- r.open(options.type.toUpperCase(), options.url, true);
103
- if (!options.headers['Content-Type']) {
104
- 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);
105
101
  }
106
- objectEach(options.headers, function (val, key) {
102
+ objectEach(settings.headers, function (val, key) {
107
103
  r.setRequestHeader(key, val);
108
104
  });
109
- if (options.responseType) {
110
- r.responseType = options.responseType;
105
+ if (settings.responseType) {
106
+ r.responseType = settings.responseType;
111
107
  }
112
108
  // @todo lacking timeout handling
113
109
  r.onreadystatechange = function () {
114
110
  var res;
115
111
  if (r.readyState === 4) {
116
112
  if (r.status === 200) {
117
- if (options.responseType !== 'blob') {
113
+ if (settings.responseType !== 'blob') {
118
114
  res = r.responseText;
119
- if (options.dataType === 'json') {
115
+ if (settings.dataType === 'json') {
120
116
  try {
121
117
  res = JSON.parse(res);
122
118
  }
123
119
  catch (e) {
124
- return handleError(r, e);
120
+ if (e instanceof Error) {
121
+ return handleError(r, e);
122
+ }
125
123
  }
126
124
  }
127
125
  }
128
- return options.success && options.success(res, r);
126
+ return settings.success && settings.success(res, r);
129
127
  }
130
128
  handleError(r, r.responseText);
131
129
  }
132
130
  };
133
- try {
134
- options.data = JSON.stringify(options.data);
131
+ if (settings.data && typeof settings.data !== 'string') {
132
+ settings.data = JSON.stringify(settings.data);
135
133
  }
136
- catch (e) {
137
- // empty
138
- }
139
- r.send(options.data || true);
134
+ r.send(settings.data);
140
135
  }
141
136
  /**
142
137
  * Get a JSON resource over XHR, also supporting CORS without preflight.
@@ -193,7 +188,7 @@
193
188
  type: 'hidden',
194
189
  name: name,
195
190
  value: val
196
- }, null, form);
191
+ }, void 0, form);
197
192
  });
198
193
  // submit
199
194
  form.submit();
@@ -210,33 +205,38 @@
210
205
  getJSON: getJSON,
211
206
  post: post
212
207
  };
208
+ /* *
209
+ *
210
+ * API Declarations
211
+ *
212
+ * */
213
213
  /**
214
214
  * @interface Highcharts.AjaxSettingsObject
215
215
  */ /**
216
216
  * The payload to send.
217
217
  *
218
218
  * @name Highcharts.AjaxSettingsObject#data
219
- * @type {string|Highcharts.Dictionary<any>}
219
+ * @type {string|Highcharts.Dictionary<any>|undefined}
220
220
  */ /**
221
221
  * The data type expected.
222
222
  * @name Highcharts.AjaxSettingsObject#dataType
223
- * @type {"json"|"xml"|"text"|"octet"}
223
+ * @type {"json"|"xml"|"text"|"octet"|undefined}
224
224
  */ /**
225
225
  * Function to call on error.
226
226
  * @name Highcharts.AjaxSettingsObject#error
227
- * @type {Function}
227
+ * @type {Function|undefined}
228
228
  */ /**
229
229
  * The headers; keyed on header name.
230
230
  * @name Highcharts.AjaxSettingsObject#headers
231
- * @type {Highcharts.Dictionary<string>}
231
+ * @type {Highcharts.Dictionary<string>|undefined}
232
232
  */ /**
233
233
  * Function to call on success.
234
234
  * @name Highcharts.AjaxSettingsObject#success
235
- * @type {Function}
235
+ * @type {Function|undefined}
236
236
  */ /**
237
237
  * The HTTP method to use. For example GET or POST.
238
238
  * @name Highcharts.AjaxSettingsObject#type
239
- * @type {string}
239
+ * @type {string|undefined}
240
240
  */ /**
241
241
  * The URL to call.
242
242
  * @name Highcharts.AjaxSettingsObject#url
@@ -271,492 +271,61 @@
271
271
  objectEach = U.objectEach,
272
272
  pick = U.pick,
273
273
  splat = U.splat;
274
- /**
275
- * Callback function to modify the CSV before parsing it by the data module.
276
- *
277
- * @callback Highcharts.DataBeforeParseCallbackFunction
278
- *
279
- * @param {string} csv
280
- * The CSV to modify.
281
- *
282
- * @return {string}
283
- * The CSV to parse.
284
- */
285
- /**
286
- * Callback function that gets called after parsing data.
287
- *
288
- * @callback Highcharts.DataCompleteCallbackFunction
289
- *
290
- * @param {Highcharts.Options} chartOptions
291
- * The chart options that were used.
292
- */
293
- /**
294
- * Callback function that returns the correspondig Date object to a match.
295
- *
296
- * @callback Highcharts.DataDateFormatCallbackFunction
297
- *
298
- * @param {Array<number>} match
299
- *
300
- * @return {number}
301
- */
302
- /**
303
- * Structure for alternative date formats to parse.
304
- *
305
- * @interface Highcharts.DataDateFormatObject
306
- */ /**
307
- * @name Highcharts.DataDateFormatObject#alternative
308
- * @type {string|undefined}
309
- */ /**
310
- * @name Highcharts.DataDateFormatObject#parser
311
- * @type {Highcharts.DataDateFormatCallbackFunction}
312
- */ /**
313
- * @name Highcharts.DataDateFormatObject#regex
314
- * @type {global.RegExp}
315
- */
316
- /**
317
- * Possible types for a data item in a column or row.
318
- *
319
- * @typedef {number|string|null} Highcharts.DataValueType
320
- */
321
- /**
322
- * Callback function to parse string representations of dates into
323
- * JavaScript timestamps (milliseconds since 1.1.1970).
324
- *
325
- * @callback Highcharts.DataParseDateCallbackFunction
326
- *
327
- * @param {string} dateValue
328
- *
329
- * @return {number}
330
- * Timestamp (milliseconds since 1.1.1970) as integer for Date class.
331
- */
332
- /**
333
- * Callback function to access the parsed columns, the two-dimentional
334
- * input data array directly, before they are interpreted into series
335
- * data and categories.
336
- *
337
- * @callback Highcharts.DataParsedCallbackFunction
338
- *
339
- * @param {Array<Array<*>>} columns
340
- * The parsed columns by the data module.
341
- *
342
- * @return {boolean|undefined}
343
- * Return `false` to stop completion, or call `this.complete()` to
344
- * continue async.
345
- */
346
- /**
347
- * The Data module provides a simplified interface for adding data to
348
- * a chart from sources like CVS, HTML tables or grid views. See also
349
- * the [tutorial article on the Data module](
350
- * https://www.highcharts.com/docs/working-with-data/data-module).
351
- *
352
- * It requires the `modules/data.js` file to be loaded.
353
- *
354
- * Please note that the default way of adding data in Highcharts, without
355
- * the need of a module, is through the [series._type_.data](#series.line.data)
356
- * option.
357
- *
358
- * @sample {highcharts} highcharts/demo/column-parsed/
359
- * HTML table
360
- * @sample {highcharts} highcharts/data/csv/
361
- * CSV
362
- *
363
- * @since 4.0
364
- * @requires modules/data
365
- * @apioption data
366
- */
367
- /**
368
- * A callback function to modify the CSV before parsing it. Return the modified
369
- * string.
370
- *
371
- * @sample {highcharts} highcharts/demo/line-ajax/
372
- * Modify CSV before parse
373
- *
374
- * @type {Highcharts.DataBeforeParseCallbackFunction}
375
- * @since 6.1
376
- * @apioption data.beforeParse
377
- */
378
- /**
379
- * A two-dimensional array representing the input data on tabular form.
380
- * This input can be used when the data is already parsed, for example
381
- * from a grid view component. Each cell can be a string or number.
382
- * If not switchRowsAndColumns is set, the columns are interpreted as
383
- * series.
384
- *
385
- * @see [data.rows](#data.rows)
386
- *
387
- * @sample {highcharts} highcharts/data/columns/
388
- * Columns
389
- *
390
- * @type {Array<Array<Highcharts.DataValueType>>}
391
- * @since 4.0
392
- * @apioption data.columns
393
- */
394
- /**
395
- * The callback that is evaluated when the data is finished loading,
396
- * optionally from an external source, and parsed. The first argument
397
- * passed is a finished chart options object, containing the series.
398
- * These options can be extended with additional options and passed
399
- * directly to the chart constructor.
400
- *
401
- * @see [data.parsed](#data.parsed)
402
- *
403
- * @sample {highcharts} highcharts/data/complete/
404
- * Modify data on complete
405
- *
406
- * @type {Highcharts.DataCompleteCallbackFunction}
407
- * @since 4.0
408
- * @apioption data.complete
409
- */
410
- /**
411
- * A comma delimited string to be parsed. Related options are [startRow](
412
- * #data.startRow), [endRow](#data.endRow), [startColumn](#data.startColumn)
413
- * and [endColumn](#data.endColumn) to delimit what part of the table
414
- * is used. The [lineDelimiter](#data.lineDelimiter) and [itemDelimiter](
415
- * #data.itemDelimiter) options define the CSV delimiter formats.
416
- *
417
- * The built-in CSV parser doesn't support all flavours of CSV, so in
418
- * some cases it may be necessary to use an external CSV parser. See
419
- * [this example](https://jsfiddle.net/highcharts/u59176h4/) of parsing
420
- * CSV through the MIT licensed [Papa Parse](http://papaparse.com/)
421
- * library.
422
- *
423
- * @sample {highcharts} highcharts/data/csv/
424
- * Data from CSV
425
- *
426
- * @type {string}
427
- * @since 4.0
428
- * @apioption data.csv
429
- */
430
- /**
431
- * Which of the predefined date formats in Date.prototype.dateFormats
432
- * to use to parse date values. Defaults to a best guess based on what
433
- * format gives valid and ordered dates. Valid options include: `YYYY/mm/dd`,
434
- * `dd/mm/YYYY`, `mm/dd/YYYY`, `dd/mm/YY`, `mm/dd/YY`.
435
- *
436
- * @see [data.parseDate](#data.parseDate)
274
+ /* *
437
275
  *
438
- * @sample {highcharts} highcharts/data/dateformat-auto/
439
- * Best guess date format
276
+ * Functions
440
277
  *
441
- * @type {string}
442
- * @since 4.0
443
- * @validvalue ["YYYY/mm/dd", "dd/mm/YYYY", "mm/dd/YYYY", "dd/mm/YYYY",
444
- * "dd/mm/YY", "mm/dd/YY"]
445
- * @apioption data.dateFormat
446
- */
278
+ * */
447
279
  /**
448
- * The decimal point used for parsing numbers in the CSV.
449
- *
450
- * If both this and data.delimiter is set to `undefined`, the parser will
451
- * attempt to deduce the decimal point automatically.
452
- *
453
- * @sample {highcharts} highcharts/data/delimiters/
454
- * Comma as decimal point
455
- *
456
- * @type {string}
457
- * @default .
458
- * @since 4.1.0
459
- * @apioption data.decimalPoint
280
+ * @private
460
281
  */
461
- /**
462
- * In tabular input data, the last column (indexed by 0) to use. Defaults
463
- * to the last column containing data.
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
+ /* *
464
312
  *
465
- * @sample {highcharts} highcharts/data/start-end/
466
- * Limited data
313
+ * Class
467
314
  *
468
- * @type {number}
469
- * @since 4.0
470
- * @apioption data.endColumn
471
- */
315
+ * */
472
316
  /**
473
- * In tabular input data, the last row (indexed by 0) to use. Defaults
474
- * to the last row containing data.
475
- *
476
- * @sample {highcharts} highcharts/data/start-end/
477
- * Limited data
317
+ * The Data class
478
318
  *
479
- * @type {number}
480
- * @since 4.0.4
481
- * @apioption data.endRow
482
- */
483
- /**
484
- * Whether to use the first row in the data set as series names.
319
+ * @requires module:modules/data
485
320
  *
486
- * @sample {highcharts} highcharts/data/start-end/
487
- * Don't get series names from the CSV
488
- * @sample {highstock} highcharts/data/start-end/
489
- * Don't get series names from the CSV
321
+ * @class
322
+ * @name Highcharts.Data
490
323
  *
491
- * @type {boolean}
492
- * @default true
493
- * @since 4.1.0
494
- * @product highcharts highstock gantt
495
- * @apioption data.firstRowAsNames
496
- */
497
- /**
498
- * The Google Spreadsheet API key required for access generated at [API Services
499
- * / Credentials](https://console.cloud.google.com/apis/credentials). See a
500
- * comprehensive tutorial for setting up the key at the
501
- * [Hands-On Data Visualization](https://handsondataviz.org/google-sheets-api-key.html)
502
- * book website.
324
+ * @param {Highcharts.DataOptions} dataOptions
503
325
  *
504
- * @sample {highcharts} highcharts/data/google-spreadsheet/
505
- * Load a Google Spreadsheet
326
+ * @param {Highcharts.Options} [chartOptions]
506
327
  *
507
- * @type {string}
508
- * @since 9.2.2
509
- * @apioption data.googleAPIKey
510
- */
511
- /**
512
- * The key or `spreadsheetId` value for a Google Spreadsheet to load. See
513
- * [developers.google.com](https://developers.google.com/sheets/api/guides/concepts)
514
- * for how to find the `spreadsheetId`.
515
- *
516
- * In order for Google Sheets to load, a valid [googleAPIKey](#data.googleAPIKey)
517
- * must also be given.
518
- *
519
- * @sample {highcharts} highcharts/data/google-spreadsheet/
520
- * Load a Google Spreadsheet
521
- *
522
- * @type {string}
523
- * @since 4.0
524
- * @apioption data.googleSpreadsheetKey
525
- */
526
- /**
527
- * The Google Spreadsheet `range` to use in combination with
528
- * [googleSpreadsheetKey](#data.googleSpreadsheetKey). See
529
- * [developers.google.com](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get)
530
- * for details.
531
- *
532
- * If given, it takes precedence over `startColumn`, `endColumn`, `startRow` and
533
- * `endRow`.
534
- *
535
- * @example
536
- * googleSpreadsheetRange: 'Fruit Consumption' // Load a named worksheet
537
- * googleSpreadsheetRange: 'A:Z' // Load columns A to Z
538
- *
539
- * @sample {highcharts} highcharts/data/google-spreadsheet/
540
- * Load a Google Spreadsheet
541
- *
542
- * @type {string|undefined}
543
- * @since 9.2.2
544
- * @apioption data.googleSpreadsheetRange
545
- */
546
- /**
547
- * No longer works since v9.2.2, that uses Google Sheets API v4. Instead, use
548
- * the [googleSpreadsheetRange](#data.googleSpreadsheetRange) option to load a
549
- * specific sheet.
550
- *
551
- * @deprecated
552
- * @type {string}
553
- * @since 4.0
554
- * @apioption data.googleSpreadsheetWorksheet
555
- */
556
- /**
557
- * Item or cell delimiter for parsing CSV. Defaults to the tab character
558
- * `\t` if a tab character is found in the CSV string, if not it defaults
559
- * to `,`.
560
- *
561
- * If this is set to false or undefined, the parser will attempt to deduce
562
- * the delimiter automatically.
563
- *
564
- * @sample {highcharts} highcharts/data/delimiters/
565
- * Delimiters
566
- *
567
- * @type {string}
568
- * @since 4.0
569
- * @apioption data.itemDelimiter
570
- */
571
- /**
572
- * Line delimiter for parsing CSV.
573
- *
574
- * @sample {highcharts} highcharts/data/delimiters/
575
- * Delimiters
576
- *
577
- * @type {string}
578
- * @default \n
579
- * @since 4.0
580
- * @apioption data.lineDelimiter
581
- */
582
- /**
583
- * A callback function to access the parsed columns, the two-dimentional
584
- * input data array directly, before they are interpreted into series
585
- * data and categories. Return `false` to stop completion, or call
586
- * `this.complete()` to continue async.
587
- *
588
- * @see [data.complete](#data.complete)
589
- *
590
- * @sample {highcharts} highcharts/data/parsed/
591
- * Modify data after parse
592
- *
593
- * @type {Highcharts.DataParsedCallbackFunction}
594
- * @since 4.0
595
- * @apioption data.parsed
596
- */
597
- /**
598
- * A callback function to parse string representations of dates into
599
- * JavaScript timestamps. Should return an integer timestamp on success.
600
- *
601
- * @see [dateFormat](#data.dateFormat)
602
- *
603
- * @type {Highcharts.DataParseDateCallbackFunction}
604
- * @since 4.0
605
- * @apioption data.parseDate
606
- */
607
- /**
608
- * The same as the columns input option, but defining rows intead of
609
- * columns.
610
- *
611
- * @see [data.columns](#data.columns)
612
- *
613
- * @sample {highcharts} highcharts/data/rows/
614
- * Data in rows
615
- *
616
- * @type {Array<Array<Highcharts.DataValueType>>}
617
- * @since 4.0
618
- * @apioption data.rows
619
- */
620
- /**
621
- * An array containing dictionaries for each series. A dictionary exists of
622
- * Point property names as the key and the CSV column index as the value.
623
- *
624
- * @sample {highcharts} highcharts/data/seriesmapping-label/
625
- * Label from data set
626
- *
627
- * @type {Array<Highcharts.Dictionary<number>>}
628
- * @since 4.0.4
629
- * @apioption data.seriesMapping
630
- */
631
- /**
632
- * In tabular input data, the first column (indexed by 0) to use.
633
- *
634
- * @sample {highcharts} highcharts/data/start-end/
635
- * Limited data
636
- *
637
- * @type {number}
638
- * @default 0
639
- * @since 4.0
640
- * @apioption data.startColumn
641
- */
642
- /**
643
- * In tabular input data, the first row (indexed by 0) to use.
644
- *
645
- * @sample {highcharts} highcharts/data/start-end/
646
- * Limited data
647
- *
648
- * @type {number}
649
- * @default 0
650
- * @since 4.0
651
- * @apioption data.startRow
652
- */
653
- /**
654
- * Switch rows and columns of the input data, so that `this.columns`
655
- * effectively becomes the rows of the data set, and the rows are interpreted
656
- * as series.
657
- *
658
- * @sample {highcharts} highcharts/data/switchrowsandcolumns/
659
- * Switch rows and columns
660
- *
661
- * @type {boolean}
662
- * @default false
663
- * @since 4.0
664
- * @apioption data.switchRowsAndColumns
665
- */
666
- /**
667
- * An HTML table or the id of such to be parsed as input data. Related
668
- * options are `startRow`, `endRow`, `startColumn` and `endColumn` to
669
- * delimit what part of the table is used.
670
- *
671
- * @sample {highcharts} highcharts/demo/column-parsed/
672
- * Parsed table
673
- *
674
- * @type {string|global.HTMLElement}
675
- * @since 4.0
676
- * @apioption data.table
677
- */
678
- /**
679
- * An URL to a remote CSV dataset. Will be fetched when the chart is created
680
- * using Ajax.
681
- *
682
- * @sample highcharts/data/livedata-columns
683
- * Categorized bar chart with CSV and live polling
684
- * @sample highcharts/data/livedata-csv
685
- * Time based line chart with CSV and live polling
686
- *
687
- * @type {string}
688
- * @apioption data.csvURL
689
- */
690
- /**
691
- * A URL to a remote JSON dataset, structured as a row array.
692
- * Will be fetched when the chart is created using Ajax.
693
- *
694
- * @sample highcharts/data/livedata-rows
695
- * Rows with live polling
696
- *
697
- * @type {string}
698
- * @apioption data.rowsURL
699
- */
700
- /**
701
- * A URL to a remote JSON dataset, structured as a column array.
702
- * Will be fetched when the chart is created using Ajax.
703
- *
704
- * @sample highcharts/data/livedata-columns
705
- * Columns with live polling
706
- *
707
- * @type {string}
708
- * @apioption data.columnsURL
709
- */
710
- /**
711
- * Sets the refresh rate for data polling when importing remote dataset by
712
- * setting [data.csvURL](data.csvURL), [data.rowsURL](data.rowsURL),
713
- * [data.columnsURL](data.columnsURL), or
714
- * [data.googleSpreadsheetKey](data.googleSpreadsheetKey).
715
- *
716
- * Note that polling must be enabled by setting
717
- * [data.enablePolling](data.enablePolling) to true.
718
- *
719
- * The value is the number of seconds between pollings.
720
- * It cannot be set to less than 1 second.
721
- *
722
- * @sample highcharts/demo/live-data
723
- * Live data with user set refresh rate
724
- *
725
- * @default 1
726
- * @type {number}
727
- * @apioption data.dataRefreshRate
728
- */
729
- /**
730
- * Enables automatic refetching of remote datasets every _n_ seconds (defined by
731
- * setting [data.dataRefreshRate](data.dataRefreshRate)).
732
- *
733
- * Only works when either [data.csvURL](data.csvURL),
734
- * [data.rowsURL](data.rowsURL), [data.columnsURL](data.columnsURL), or
735
- * [data.googleSpreadsheetKey](data.googleSpreadsheetKey).
736
- *
737
- * @sample highcharts/demo/live-data
738
- * Live data
739
- * @sample highcharts/data/livedata-columns
740
- * Categorized bar chart with CSV and live polling
741
- *
742
- * @type {boolean}
743
- * @default false
744
- * @apioption data.enablePolling
745
- */
746
- /* eslint-disable valid-jsdoc */
747
- /**
748
- * The Data class
749
- *
750
- * @requires module:modules/data
751
- *
752
- * @class
753
- * @name Highcharts.Data
754
- *
755
- * @param {Highcharts.DataOptions} dataOptions
756
- *
757
- * @param {Highcharts.Options} [chartOptions]
758
- *
759
- * @param {Highcharts.Chart} [chart]
328
+ * @param {Highcharts.Chart} [chart]
760
329
  */
761
330
  var Data = /** @class */ (function () {
762
331
  /* *
@@ -765,26 +334,23 @@
765
334
  *
766
335
  * */
767
336
  function Data(dataOptions, chartOptions, chart) {
768
- this.chart = void 0;
769
- this.chartOptions = void 0;
770
- this.firstRowAsNames = void 0;
771
- this.rawColumns = void 0;
772
- this.options = void 0;
773
- /**
774
- * A collection of available date formats, extendable from the outside to
775
- * support custom date formats.
776
- *
777
- * @name Highcharts.Data#dateFormats
778
- * @type {Highcharts.Dictionary<Highcharts.DataDateFormatObject>}
779
- */
780
- this.dateFormats = {
781
- 'YYYY/mm/dd': {
782
- regex: /^([0-9]{4})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{1,2})$/,
783
- parser: function (match) {
784
- return (match ?
785
- Date.UTC(+match[1], match[2] - 1, +match[3]) :
786
- NaN);
787
- }
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);
353
+ }
788
354
  },
789
355
  'dd/mm/YYYY': {
790
356
  regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,
@@ -809,8 +375,8 @@
809
375
  if (!match) {
810
376
  return NaN;
811
377
  }
812
- var year = +match[3],
813
- d = new Date();
378
+ var d = new Date();
379
+ var year = +match[3];
814
380
  if (year > (d.getFullYear() - 2000)) {
815
381
  year += 1900;
816
382
  }
@@ -830,8 +396,52 @@
830
396
  }
831
397
  }
832
398
  };
399
+ this.chart = chart;
400
+ this.chartOptions = chartOptions;
401
+ this.options = dataOptions;
402
+ this.rawColumns = [];
833
403
  this.init(dataOptions, chartOptions, chart);
834
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
+ };
835
445
  /* *
836
446
  *
837
447
  * Functions
@@ -843,8 +453,8 @@
843
453
  * @private
844
454
  * @function Highcharts.Data#init
845
455
  */
846
- Data.prototype.init = function (options, chartOptions, chart) {
847
- var decimalPoint = options.decimalPoint,
456
+ Data.prototype.init = function (dataOptions, chartOptions, chart) {
457
+ var decimalPoint = dataOptions.decimalPoint,
848
458
  hasData;
849
459
  if (chartOptions) {
850
460
  this.chartOptions = chartOptions;
@@ -855,11 +465,11 @@
855
465
  if (decimalPoint !== '.' && decimalPoint !== ',') {
856
466
  decimalPoint = void 0;
857
467
  }
858
- this.options = options;
859
- this.columns = (options.columns ||
860
- this.rowsToColumns(options.rows) ||
468
+ this.options = dataOptions;
469
+ this.columns = (dataOptions.columns ||
470
+ this.rowsToColumns(dataOptions.rows) ||
861
471
  []);
862
- this.firstRowAsNames = pick(options.firstRowAsNames, this.firstRowAsNames, true);
472
+ this.firstRowAsNames = pick(dataOptions.firstRowAsNames, this.firstRowAsNames, true);
863
473
  this.decimalRegex = (decimalPoint &&
864
474
  new RegExp('^(-?[0-9]+)' + decimalPoint + '([0-9]+)$'));
865
475
  // Always stop old polling when we have new options
@@ -874,7 +484,7 @@
874
484
  // No need to parse or interpret anything
875
485
  if (this.columns.length) {
876
486
  this.dataFound();
877
- hasData = !this.hasURLOption(options);
487
+ hasData = !hasURLOption(dataOptions);
878
488
  }
879
489
  if (!hasData) {
880
490
  // Fetch live data
@@ -893,14 +503,10 @@
893
503
  // Parse a Google Spreadsheet
894
504
  hasData = this.parseGoogleSpreadsheet();
895
505
  }
896
- if (!hasData && options.afterComplete) {
897
- options.afterComplete();
506
+ if (!hasData && dataOptions.afterComplete) {
507
+ dataOptions.afterComplete();
898
508
  }
899
509
  };
900
- Data.prototype.hasURLOption = function (options) {
901
- return Boolean(options &&
902
- (options.rowsURL || options.csvURL || options.columnsURL));
903
- };
904
510
  /**
905
511
  * Get the column distribution. For example, a line series takes a single
906
512
  * column for Y values. A range series takes two columns for low and high
@@ -918,7 +524,7 @@
918
524
  return seriesTypes[type || 'line'].prototype.pointArrayMap;
919
525
  }, globalType = (chartOptions &&
920
526
  chartOptions.chart &&
921
- chartOptions.chart.type), individualCounts = [], seriesBuilders = [], seriesIndex = 0,
527
+ chartOptions.chart.type), individualCounts = [], seriesBuilders = [],
922
528
  // If no series mapping is defined, check if the series array is
923
529
  // defined with types.
924
530
  seriesMapping = ((options && options.seriesMapping) ||
@@ -927,7 +533,9 @@
927
533
  chartOptions.series.map(function () {
928
534
  return { x: 0 };
929
535
  })) ||
930
- []), i;
536
+ []);
537
+ var seriesIndex = 0,
538
+ i;
931
539
  ((chartOptions && chartOptions.series) || []).forEach(function (series) {
932
540
  individualCounts.push(getValueCount(series.type || globalType));
933
541
  });
@@ -1018,12 +626,8 @@
1018
626
  * @function Highcharts.Data#parseCSV
1019
627
  */
1020
628
  Data.prototype.parseCSV = function (inOptions) {
1021
- var self = this, options = inOptions || this.options, csv = options.csv, columns, startRow = (typeof options.startRow !== 'undefined' && options.startRow ?
1022
- options.startRow :
1023
- 0), endRow = options.endRow || Number.MAX_VALUE, startColumn = (typeof options.startColumn !== 'undefined' &&
1024
- options.startColumn) ? options.startColumn : 0, endColumn = options.endColumn || Number.MAX_VALUE, itemDelimiter, lines, rowIt = 0,
1025
- // activeRowNo = 0,
1026
- 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 = [],
1027
631
  // We count potential delimiters in the prepass, and use the
1028
632
  // result as the basis of half-intelligent guesses.
1029
633
  potDelimiters = {
@@ -1031,7 +635,15 @@
1031
635
  ';': 0,
1032
636
  '\t': 0
1033
637
  };
1034
- 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;
1035
647
  /*
1036
648
  This implementation is quite verbose. It will be shortened once
1037
649
  it's stable and passes all the test.
@@ -1273,14 +885,14 @@
1273
885
  */
1274
886
  function deduceDateFormat(data, limit) {
1275
887
  var format = 'YYYY/mm/dd',
1276
- thing,
888
+ stable = [],
889
+ max = [];
890
+ var thing,
1277
891
  guessedFormat = [],
1278
892
  calculatedFormat,
1279
893
  i = 0,
1280
894
  madeDeduction = false,
1281
895
  // candidates = {},
1282
- stable = [],
1283
- max = [],
1284
896
  j;
1285
897
  if (!limit || limit > data.length) {
1286
898
  limit = data.length;
@@ -1454,13 +1066,13 @@
1454
1066
  */
1455
1067
  Data.prototype.parseTable = function () {
1456
1068
  var options = this.options,
1457
- table = options.table,
1458
1069
  columns = this.columns || [],
1459
1070
  startRow = options.startRow || 0,
1460
1071
  endRow = options.endRow || Number.MAX_VALUE,
1461
1072
  startColumn = options.startColumn || 0,
1462
1073
  endColumn = options.endColumn || Number.MAX_VALUE;
1463
- if (table) {
1074
+ if (options.table) {
1075
+ var table = options.table;
1464
1076
  if (typeof table === 'string') {
1465
1077
  table = doc.getElementById(table);
1466
1078
  }
@@ -1505,11 +1117,11 @@
1505
1117
  chart = this.chart,
1506
1118
  options = this.options,
1507
1119
  maxRetries = 3,
1508
- currentRetries = 0,
1509
1120
  pollingEnabled = options.enablePolling,
1510
- updateIntervalMs = (options.dataRefreshRate || 2) * 1000,
1511
1121
  originalOptions = merge(options);
1512
- if (!this.hasURLOption(options)) {
1122
+ var currentRetries = 0,
1123
+ updateIntervalMs = (options.dataRefreshRate || 2) * 1000;
1124
+ if (!hasURLOption(options)) {
1513
1125
  return false;
1514
1126
  }
1515
1127
  // Do not allow polling more than once a second
@@ -1593,7 +1205,7 @@
1593
1205
  }
1594
1206
  }
1595
1207
  performFetch(true);
1596
- return this.hasURLOption(options);
1208
+ return hasURLOption(options);
1597
1209
  };
1598
1210
  /**
1599
1211
  * Parse a Google spreadsheet.
@@ -1624,7 +1236,7 @@
1624
1236
  if (defined(options.endRow)) {
1625
1237
  end += options.endRow + 1;
1626
1238
  }
1627
- return start + ":" + end;
1239
+ return "" + start + ":".concat(end);
1628
1240
  };
1629
1241
  /**
1630
1242
  * Fetch the actual spreadsheet using XMLHttpRequest.
@@ -1727,8 +1339,8 @@
1727
1339
  * @function Highcharts.Data#parseTypes
1728
1340
  */
1729
1341
  Data.prototype.parseTypes = function () {
1730
- var columns = this.columns,
1731
- col = columns.length;
1342
+ var columns = this.columns || [];
1343
+ var col = columns.length;
1732
1344
  while (col--) {
1733
1345
  this.parseColumn(columns[col], col);
1734
1346
  }
@@ -1927,32 +1539,6 @@
1927
1539
  }
1928
1540
  return ret;
1929
1541
  };
1930
- /**
1931
- * Reorganize rows into columns.
1932
- *
1933
- * @function Highcharts.Data#rowsToColumns
1934
- */
1935
- Data.prototype.rowsToColumns = function (rows) {
1936
- var row,
1937
- rowsLength,
1938
- col,
1939
- colsLength,
1940
- columns;
1941
- if (rows) {
1942
- columns = [];
1943
- rowsLength = rows.length;
1944
- for (row = 0; row < rowsLength; row++) {
1945
- colsLength = rows[row].length;
1946
- for (col = 0; col < colsLength; col++) {
1947
- if (!columns[col]) {
1948
- columns[col] = [];
1949
- }
1950
- columns[col][row] = rows[row][col];
1951
- }
1952
- }
1953
- }
1954
- return columns;
1955
- };
1956
1542
  /**
1957
1543
  * Get the parsed data in a form that we can apply directly to the
1958
1544
  * `series.data` config. Array positions can be mapped using the
@@ -1982,35 +1568,6 @@
1982
1568
  return this.options.parsed.call(this, this.columns);
1983
1569
  }
1984
1570
  };
1985
- /**
1986
- * @private
1987
- * @function Highcharts.Data#getFreeIndexes
1988
- */
1989
- Data.prototype.getFreeIndexes = function (numberOfColumns, seriesBuilders) {
1990
- var s,
1991
- i,
1992
- freeIndexes = [],
1993
- freeIndexValues = [],
1994
- referencedIndexes;
1995
- // Add all columns as free
1996
- for (i = 0; i < numberOfColumns; i = i + 1) {
1997
- freeIndexes.push(true);
1998
- }
1999
- // Loop all defined builders and remove their referenced columns
2000
- for (s = 0; s < seriesBuilders.length; s = s + 1) {
2001
- referencedIndexes = seriesBuilders[s].getReferencedColumnIndexes();
2002
- for (i = 0; i < referencedIndexes.length; i = i + 1) {
2003
- freeIndexes[referencedIndexes[i]] = false;
2004
- }
2005
- }
2006
- // Collect the values for the free indexes
2007
- for (i = 0; i < freeIndexes.length; i = i + 1) {
2008
- if (freeIndexes[i]) {
2009
- freeIndexValues.push(i);
2010
- }
2011
- }
2012
- return freeIndexValues;
2013
- };
2014
1571
  /**
2015
1572
  * If a complete callback function is provided in the options, interpret the
2016
1573
  * columns into a Highcharts options object.
@@ -2020,8 +1577,9 @@
2020
1577
  Data.prototype.complete = function () {
2021
1578
  var columns = this.columns,
2022
1579
  xColumns = [],
2023
- type,
2024
1580
  options = this.options,
1581
+ allSeriesBuilders = [];
1582
+ var type,
2025
1583
  series,
2026
1584
  data,
2027
1585
  i,
@@ -2029,7 +1587,6 @@
2029
1587
  r,
2030
1588
  seriesIndex,
2031
1589
  chartOptions,
2032
- allSeriesBuilders = [],
2033
1590
  builder,
2034
1591
  freeIndexes,
2035
1592
  typeCol,
@@ -2047,7 +1604,7 @@
2047
1604
  }
2048
1605
  // Use the next columns for series
2049
1606
  series = [];
2050
- freeIndexes = this.getFreeIndexes(columns.length, this.valueCount.seriesBuilders);
1607
+ freeIndexes = getFreeIndexes(columns.length, this.valueCount.seriesBuilders);
2051
1608
  // Populate defined series
2052
1609
  for (seriesIndex = 0; seriesIndex < this.valueCount.seriesBuilders.length; seriesIndex++) {
2053
1610
  builder = this.valueCount.seriesBuilders[seriesIndex];
@@ -2185,221 +1742,697 @@
2185
1742
  };
2186
1743
  return Data;
2187
1744
  }());
2188
- // Register the Data prototype and data function on Highcharts
2189
- // 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
+ */
2190
2346
  /**
2191
- * 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
2192
2353
  *
2193
- * @function Highcharts.data
2354
+ * @type {string|global.HTMLElement}
2355
+ * @since 4.0
2356
+ * @apioption data.table
2194
2357
  */
2195
- G.data = function (dataOptions, chartOptions, chart) {
2196
- return new G.Data(dataOptions, chartOptions, chart);
2197
- };
2198
- // Extend Chart.init so that the Chart constructor accepts a new configuration
2199
- // option group, data.
2200
- addEvent(Chart, 'init', function (e) {
2201
- var chart = this, // eslint-disable-line no-invalid-this
2202
- userOptions = (e.args[0] || {}),
2203
- callback = e.args[1];
2204
- var defaultDataOptions = getOptions().data;
2205
- if ((defaultDataOptions || userOptions && userOptions.data) &&
2206
- !chart.hasDataDef) {
2207
- chart.hasDataDef = true;
2208
- /**
2209
- * The data parser for this chart.
2210
- *
2211
- * @name Highcharts.Chart#data
2212
- * @type {Highcharts.Data|undefined}
2213
- */
2214
- var dataOptions = merge(defaultDataOptions,
2215
- userOptions.data);
2216
- chart.data = new G.Data(extend(dataOptions, {
2217
- afterComplete: function (dataOptions) {
2218
- var i,
2219
- series;
2220
- // Merge series configs
2221
- if (Object.hasOwnProperty.call(userOptions, 'series')) {
2222
- if (typeof userOptions.series === 'object') {
2223
- i = Math.max(userOptions.series.length, dataOptions && dataOptions.series ?
2224
- dataOptions.series.length :
2225
- 0);
2226
- while (i--) {
2227
- series = userOptions.series[i] || {};
2228
- userOptions.series[i] = merge(series, dataOptions && dataOptions.series ?
2229
- dataOptions.series[i] :
2230
- {});
2231
- }
2232
- }
2233
- else { // Allow merging in dataOptions.series (#2856)
2234
- delete userOptions.series;
2235
- }
2236
- }
2237
- // Do the merge
2238
- userOptions = merge(dataOptions, userOptions);
2239
- // Run chart.init again
2240
- chart.init(userOptions, callback);
2241
- }
2242
- }), userOptions, chart);
2243
- e.preventDefault();
2244
- }
2245
- });
2246
2358
  /**
2247
- * Creates a new SeriesBuilder. A SeriesBuilder consists of a number
2248
- * of ColumnReaders that reads columns and give them a name.
2249
- * Ex: A series builder can be constructed to read column 3 as 'x' and
2250
- * column 7 and 8 as 'y1' and 'y2'.
2251
- * 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.
2252
2361
  *
2253
- * The name of the builder is taken from the second column. In the above
2254
- * 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
2255
2366
  *
2256
- * @private
2257
- * @class
2258
- * @name SeriesBuilder
2367
+ * @type {string}
2368
+ * @apioption data.csvURL
2259
2369
  */
2260
- var SeriesBuilder = /** @class */ (function () {
2261
- function SeriesBuilder() {
2262
- /* eslint-disable no-invalid-this */
2263
- this.readers = [];
2264
- this.pointIsArray = true;
2265
- /* eslint-enable no-invalid-this */
2266
- this.name = void 0;
2267
- }
2268
- /**
2269
- * Populates readers with column indexes. A reader can be added without
2270
- * a specific index and for those readers the index is taken sequentially
2271
- * from the free columns (this is handled by the ColumnCursor instance).
2272
- *
2273
- * @function SeriesBuilder#populateColumns
2274
- */
2275
- SeriesBuilder.prototype.populateColumns = function (freeIndexes) {
2276
- var builder = this,
2277
- enoughColumns = true;
2278
- // Loop each reader and give it an index if its missing.
2279
- // The freeIndexes.shift() will return undefined if there
2280
- // are no more columns.
2281
- builder.readers.forEach(function (reader) {
2282
- if (typeof reader.columnIndex === 'undefined') {
2283
- reader.columnIndex = freeIndexes.shift();
2284
- }
2285
- });
2286
- // Now, all readers should have columns mapped. If not
2287
- // then return false to signal that this series should
2288
- // not be added.
2289
- builder.readers.forEach(function (reader) {
2290
- if (typeof reader.columnIndex === 'undefined') {
2291
- enoughColumns = false;
2292
- }
2293
- });
2294
- return enoughColumns;
2295
- };
2296
- /**
2297
- * Reads a row from the dataset and returns a point or array depending
2298
- * on the names of the readers.
2299
- *
2300
- * @function SeriesBuilder#read<T>
2301
- */
2302
- SeriesBuilder.prototype.read = function (columns, rowIndex) {
2303
- var builder = this,
2304
- pointIsArray = builder.pointIsArray,
2305
- point = pointIsArray ? [] : {},
2306
- columnIndexes;
2307
- // Loop each reader and ask it to read its value.
2308
- // Then, build an array or point based on the readers names.
2309
- builder.readers.forEach(function (reader) {
2310
- var value = columns[reader.columnIndex][rowIndex];
2311
- if (pointIsArray) {
2312
- point.push(value);
2313
- }
2314
- else {
2315
- if (reader.configName.indexOf('.') > 0) {
2316
- // Handle nested property names
2317
- Point.prototype.setNestedProperty(point, value, reader.configName);
2318
- }
2319
- else {
2320
- point[reader.configName] = value;
2321
- }
2322
- }
2323
- });
2324
- // The name comes from the first column (excluding the x column)
2325
- if (typeof this.name === 'undefined' && builder.readers.length >= 2) {
2326
- columnIndexes = builder.getReferencedColumnIndexes();
2327
- if (columnIndexes.length >= 2) {
2328
- // remove the first one (x col)
2329
- columnIndexes.shift();
2330
- // Sort the remaining
2331
- columnIndexes.sort(function (a, b) {
2332
- return a - b;
2333
- });
2334
- // Now use the lowest index as name column
2335
- this.name = columns[columnIndexes.shift()].name;
2336
- }
2337
- }
2338
- return point;
2339
- };
2340
- /**
2341
- * Creates and adds ColumnReader from the given columnIndex and configName.
2342
- * ColumnIndex can be undefined and in that case the reader will be given
2343
- * an index when columns are populated.
2344
- *
2345
- * @function SeriesBuilder#addColumnReader
2346
- */
2347
- SeriesBuilder.prototype.addColumnReader = function (columnIndex, configName) {
2348
- this.readers.push({
2349
- columnIndex: columnIndex,
2350
- configName: configName
2351
- });
2352
- if (!(configName === 'x' ||
2353
- configName === 'y' ||
2354
- typeof configName === 'undefined')) {
2355
- this.pointIsArray = false;
2356
- }
2357
- };
2358
- /**
2359
- * Returns an array of column indexes that the builder will use when
2360
- * reading data.
2361
- *
2362
- * @function SeriesBuilder#getReferencedColumnIndexes
2363
- */
2364
- SeriesBuilder.prototype.getReferencedColumnIndexes = function () {
2365
- var i,
2366
- referencedColumnIndexes = [],
2367
- columnReader;
2368
- for (i = 0; i < this.readers.length; i = i + 1) {
2369
- columnReader = this.readers[i];
2370
- if (typeof columnReader.columnIndex !== 'undefined') {
2371
- referencedColumnIndexes.push(columnReader.columnIndex);
2372
- }
2373
- }
2374
- return referencedColumnIndexes;
2375
- };
2376
- /**
2377
- * Returns true if the builder has a reader for the given configName.
2378
- *
2379
- * @function SeriesBuider#hasReader
2380
- */
2381
- SeriesBuilder.prototype.hasReader = function (configName) {
2382
- var i,
2383
- columnReader;
2384
- for (i = 0; i < this.readers.length; i = i + 1) {
2385
- columnReader = this.readers[i];
2386
- if (columnReader.configName === configName) {
2387
- return true;
2388
- }
2389
- }
2390
- // Else return undefined
2391
- };
2392
- return SeriesBuilder;
2393
- }());
2394
- 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
2395
2427
 
2396
- return G.Data;
2428
+ return Data;
2397
2429
  });
2398
2430
  _registerModule(_modules, 'masters/modules/data.src.js', [_modules['Core/Globals.js'], _modules['Core/HttpUtilities.js'], _modules['Extensions/Data.js']], function (Highcharts, HttpUtilities, Data) {
2399
2431
 
2400
2432
  var G = Highcharts;
2401
2433
  // Functions
2402
2434
  G.ajax = HttpUtilities.ajax;
2435
+ G.data = Data.data;
2403
2436
  G.getJSON = HttpUtilities.getJSON;
2404
2437
  G.post = HttpUtilities.post;
2405
2438
  // Classes