highcharts 8.2.0 → 8.2.2

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 (731) hide show
  1. package/bower.json +1 -1
  2. package/es-modules/Accessibility/Accessibility.js +3 -2
  3. package/es-modules/Accessibility/AccessibilityComponent.js +7 -8
  4. package/es-modules/Accessibility/Components/ContainerComponent.js +6 -7
  5. package/es-modules/Accessibility/Components/InfoRegionsComponent.js +0 -1
  6. package/es-modules/Accessibility/Components/RangeSelectorComponent.js +4 -4
  7. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +4 -4
  8. package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +3 -2
  9. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +4 -4
  10. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +8 -6
  11. package/es-modules/Accessibility/Components/ZoomComponent.js +7 -6
  12. package/es-modules/Accessibility/KeyboardNavigation.js +7 -3
  13. package/es-modules/Accessibility/Options/Options.js +1 -2
  14. package/es-modules/Accessibility/Utils/ChartUtilities.js +4 -4
  15. package/es-modules/Accessibility/Utils/DOMElementProvider.js +3 -3
  16. package/es-modules/Accessibility/Utils/HTMLUtilities.js +2 -3
  17. package/es-modules/Core/Animation/AnimationUtilities.js +193 -0
  18. package/es-modules/Core/Animation/Fx.js +378 -0
  19. package/es-modules/Core/Axis/Axis.js +12 -6
  20. package/es-modules/Core/Axis/BrokenAxis.js +4 -6
  21. package/es-modules/Core/Axis/ColorAxis.js +11 -10
  22. package/es-modules/Core/Axis/GridAxis.js +113 -57
  23. package/es-modules/Core/Axis/OrdinalAxis.js +4 -5
  24. package/es-modules/Core/Axis/PlotLineOrBand.js +11 -4
  25. package/es-modules/Core/Axis/StackingAxis.js +3 -1
  26. package/es-modules/Core/Axis/TreeGridAxis.js +52 -7
  27. package/es-modules/Core/Chart/Chart.js +13 -8
  28. package/es-modules/Core/Chart/Chart3D.js +2 -1
  29. package/es-modules/Core/Chart/GanttChart.js +5 -9
  30. package/es-modules/Core/Chart/StockChart.js +6 -7
  31. package/es-modules/Core/Color/Color.js +419 -0
  32. package/es-modules/Core/Color/ColorType.js +9 -0
  33. package/es-modules/Core/Dynamics.js +54 -23
  34. package/es-modules/Core/Globals.js +1 -1
  35. package/es-modules/Core/Interaction.js +9 -6
  36. package/es-modules/Core/Legend.js +3 -1
  37. package/es-modules/Core/Navigator.js +8 -4
  38. package/es-modules/Core/Options.js +13 -11
  39. package/es-modules/Core/Pointer.js +2 -2
  40. package/es-modules/Core/Renderer/DOMElementType.js +9 -0
  41. package/es-modules/Core/Renderer/HTML/HTMLElement.js +220 -0
  42. package/es-modules/Core/Renderer/HTML/{HTML.js → HTMLRenderer.js} +8 -202
  43. package/es-modules/Core/Renderer/SVG/SVGElement.js +14 -8
  44. package/es-modules/Core/Renderer/SVG/SVGLabel.js +0 -1
  45. package/es-modules/Core/Renderer/SVG/SVGRenderer.js +2 -3
  46. package/es-modules/Core/Renderer/SVG/SVGRenderer3D.js +5 -3
  47. package/es-modules/Core/Series/BaseSeries.js +157 -0
  48. package/es-modules/Core/Series/CartesianSeries.js +5553 -0
  49. package/es-modules/Core/Series/DataLabels.js +11 -9
  50. package/es-modules/Core/Series/Point.js +5 -3
  51. package/es-modules/Core/Series/Series.js +138 -5528
  52. package/es-modules/Core/Series/Series3D.js +1 -1
  53. package/es-modules/Core/Tooltip.js +2 -1
  54. package/es-modules/Core/Utilities.js +0 -582
  55. package/es-modules/Extensions/Annotations/Annotations.js +4 -2
  56. package/es-modules/Extensions/Annotations/Mixins/ControllableMixin.js +3 -3
  57. package/es-modules/Extensions/Annotations/MockPoint.js +3 -3
  58. package/es-modules/Extensions/Annotations/NavigationBindings.js +5 -4
  59. package/es-modules/Extensions/Annotations/Popup.js +1 -2
  60. package/es-modules/Extensions/Annotations/Types/Measure.js +0 -1
  61. package/es-modules/Extensions/Boost/Boost.js +3 -3
  62. package/es-modules/Extensions/Boost/BoostAttach.js +5 -4
  63. package/es-modules/Extensions/Boost/BoostInit.js +1 -1
  64. package/es-modules/Extensions/Boost/BoostOverrides.js +1 -1
  65. package/es-modules/Extensions/Boost/BoostUtils.js +1 -1
  66. package/es-modules/Extensions/Boost/NamedColors.js +1 -1
  67. package/es-modules/Extensions/Boost/WGLRenderer.js +4 -4
  68. package/es-modules/Extensions/Boost/WGLShader.js +1 -2
  69. package/es-modules/Extensions/BoostCanvas.js +9 -6
  70. package/es-modules/Extensions/CurrentDateIndication.js +3 -7
  71. package/es-modules/Extensions/Data.js +7 -9
  72. package/es-modules/Extensions/DataGrouping.js +3 -2
  73. package/es-modules/Extensions/Debugger.js +3 -2
  74. package/es-modules/Extensions/DownloadURL.js +5 -3
  75. package/es-modules/Extensions/DragPanes.js +1 -1
  76. package/es-modules/Extensions/DraggablePoints.js +6 -5
  77. package/es-modules/Extensions/Drilldown.js +24 -10
  78. package/es-modules/Extensions/ExportData.js +1 -2
  79. package/es-modules/Extensions/Exporting.js +9 -2
  80. package/es-modules/Extensions/MarkerClusters.js +8 -5
  81. package/es-modules/Extensions/NoDataToDisplay.js +13 -13
  82. package/es-modules/Extensions/OfflineExporting.js +14 -14
  83. package/es-modules/Extensions/{Oldie.js → Oldie/Oldie.js} +15 -12
  84. package/es-modules/{Core/Axis → Extensions/Oldie}/VMLAxis3D.js +1 -1
  85. package/es-modules/Extensions/Oldie/VMLRenderer3D.js +46 -0
  86. package/es-modules/Extensions/OverlappingDataLabels.js +4 -0
  87. package/es-modules/Extensions/Pane.js +1 -1
  88. package/es-modules/Extensions/ParallelCoordinates.js +1 -1
  89. package/es-modules/Extensions/PatternFill.js +10 -7
  90. package/es-modules/Extensions/Polar.js +4 -2
  91. package/es-modules/Extensions/ScrollablePlotArea.js +3 -1
  92. package/es-modules/Extensions/SeriesLabel.js +4 -3
  93. package/es-modules/{modules/sonification/chartSonify.js → Extensions/Sonification/ChartSonify.js} +1 -1
  94. package/es-modules/{modules/sonification → Extensions/Sonification}/Earcon.js +0 -0
  95. package/es-modules/{modules/sonification → Extensions/Sonification}/Instrument.js +7 -2
  96. package/es-modules/{modules/sonification/instrumentDefinitions.js → Extensions/Sonification/InstrumentDefinitions.js} +1 -1
  97. package/es-modules/{modules/sonification/musicalFrequencies.js → Extensions/Sonification/MusicalFrequencies.js} +0 -0
  98. package/es-modules/{modules/sonification/options.js → Extensions/Sonification/Options.js} +0 -0
  99. package/es-modules/{modules/sonification/pointSonify.js → Extensions/Sonification/PointSonify.js} +1 -1
  100. package/es-modules/{modules/sonification/sonification.js → Extensions/Sonification/Sonification.js} +10 -9
  101. package/es-modules/{modules/sonification → Extensions/Sonification}/Timeline.js +1 -1
  102. package/es-modules/{modules/sonification/utilities.js → Extensions/Sonification/Utilities.js} +1 -1
  103. package/es-modules/Extensions/Stacking.js +1 -1
  104. package/es-modules/Extensions/StaticScale.js +3 -3
  105. package/es-modules/Extensions/Themes/Avocado.js +3 -4
  106. package/es-modules/Extensions/Themes/DarkUnica.js +5 -7
  107. package/es-modules/Extensions/Themes/Gray.js +3 -4
  108. package/es-modules/Extensions/Themes/HighContrastDark.js +3 -4
  109. package/es-modules/Extensions/Themes/Sunset.js +3 -4
  110. package/es-modules/Gantt/Pathfinder.js +6 -0
  111. package/es-modules/Maps/Map.js +9 -5
  112. package/es-modules/Maps/MapNavigation.js +0 -1
  113. package/es-modules/{mixins → Mixins}/CenteredSeries.js +0 -0
  114. package/es-modules/{mixins → Mixins}/ColorMapSeries.js +7 -3
  115. package/es-modules/{mixins → Mixins}/ColorSeries.js +7 -3
  116. package/es-modules/{mixins → Mixins}/DerivedSeries.js +1 -1
  117. package/es-modules/{mixins → Mixins}/DrawPoint.js +0 -0
  118. package/es-modules/{mixins → Mixins}/Geometry.js +0 -0
  119. package/es-modules/{mixins → Mixins}/GeometryCircles.js +0 -0
  120. package/es-modules/{mixins → Mixins}/IndicatorRequired.js +0 -0
  121. package/es-modules/{mixins → Mixins}/LegendSymbol.js +0 -0
  122. package/es-modules/{mixins → Mixins}/MultipleLines.js +0 -0
  123. package/es-modules/{mixins → Mixins}/Navigation.js +0 -0
  124. package/es-modules/{mixins → Mixins}/NelderMead.js +0 -0
  125. package/es-modules/{mixins → Mixins}/Nodes.js +1 -1
  126. package/es-modules/{mixins → Mixins}/OnSeries.js +1 -1
  127. package/es-modules/{mixins → Mixins}/Polygon.js +0 -0
  128. package/es-modules/{mixins → Mixins}/ReduceArray.js +0 -0
  129. package/es-modules/{mixins → Mixins}/TreeSeries.js +1 -1
  130. package/es-modules/Series/AreaRangeSeries.js +57 -21
  131. package/es-modules/Series/AreaSeries.js +38 -6
  132. package/es-modules/Series/AreaSplineRangeSeries.js +44 -7
  133. package/es-modules/Series/AreaSplineSeries.js +43 -6
  134. package/es-modules/Series/BarSeries.js +2 -5
  135. package/es-modules/Series/BellcurveSeries.js +45 -5
  136. package/es-modules/Series/BoxPlotSeries.js +7 -6
  137. package/es-modules/Series/Bubble/BubbleLegend.js +3 -3
  138. package/es-modules/Series/Bubble/BubbleSeries.js +13 -11
  139. package/es-modules/Series/BulletSeries.js +5 -5
  140. package/es-modules/Series/CandlestickSeries.js +7 -6
  141. package/es-modules/Series/Column3DSeries.js +77 -23
  142. package/es-modules/Series/ColumnPyramidSeries.js +5 -6
  143. package/es-modules/Series/ColumnRangeSeries.js +17 -16
  144. package/es-modules/Series/ColumnSeries.js +18 -14
  145. package/es-modules/Series/CylinderSeries.js +8 -11
  146. package/es-modules/Series/DependencyWheelSeries.js +11 -9
  147. package/es-modules/Series/DotplotSeries.js +3 -11
  148. package/es-modules/Series/DumbbellSeries.js +11 -7
  149. package/es-modules/Series/ErrorBarSeries.js +3 -5
  150. package/es-modules/Series/FlagsSeries.js +13 -9
  151. package/es-modules/Series/Funnel3DSeries.js +8 -12
  152. package/es-modules/Series/FunnelSeries.js +6 -6
  153. package/es-modules/Series/GanttSeries.js +11 -12
  154. package/es-modules/Series/GaugeSeries.js +6 -5
  155. package/es-modules/Series/HeatmapSeries.js +9 -7
  156. package/es-modules/Series/HistogramSeries.js +6 -5
  157. package/es-modules/Series/ItemSeries.js +5 -5
  158. package/es-modules/Series/LineSeries.js +13 -0
  159. package/es-modules/Series/LollipopSeries.js +11 -7
  160. package/es-modules/Series/MapBubbleSeries.js +4 -5
  161. package/es-modules/Series/MapLineSeries.js +4 -6
  162. package/es-modules/Series/MapPointSeries.js +6 -5
  163. package/es-modules/Series/MapSeries.js +15 -12
  164. package/es-modules/Series/Networkgraph/DraggableNodes.js +8 -6
  165. package/es-modules/Series/Networkgraph/Layouts.js +3 -1
  166. package/es-modules/Series/Networkgraph/Networkgraph.js +8 -7
  167. package/es-modules/Series/OHLCSeries.js +4 -6
  168. package/es-modules/Series/OrganizationSeries.js +7 -4
  169. package/es-modules/Series/PackedBubbleSeries.js +10 -10
  170. package/es-modules/Series/ParetoSeries.js +6 -5
  171. package/es-modules/Series/Pie3DSeries.js +3 -2
  172. package/es-modules/Series/PieSeries.js +36 -10
  173. package/es-modules/Series/PolygonSeries.js +6 -6
  174. package/es-modules/Series/Pyramid3DSeries.js +3 -5
  175. package/es-modules/Series/SankeySeries.js +13 -12
  176. package/es-modules/Series/Scatter3DSeries.js +4 -6
  177. package/es-modules/Series/ScatterSeries.js +10 -5
  178. package/es-modules/Series/SolidGaugeSeries.js +7 -7
  179. package/es-modules/Series/SplineSeries.js +5 -3
  180. package/es-modules/Series/StreamgraphSeries.js +41 -5
  181. package/es-modules/Series/SunburstSeries.js +15 -11
  182. package/es-modules/Series/TilemapSeries.js +8 -6
  183. package/es-modules/Series/TimelineSeries.js +6 -5
  184. package/es-modules/Series/TreemapSeries.js +36 -50
  185. package/es-modules/Series/VariablePieSeries.js +9 -7
  186. package/es-modules/Series/VariwideSeries.js +7 -6
  187. package/es-modules/Series/VectorSeries.js +5 -3
  188. package/es-modules/Series/VennSeries.js +20 -17
  189. package/es-modules/Series/WaterfallSeries.js +6 -4
  190. package/es-modules/Series/WindbarbSeries.js +9 -6
  191. package/es-modules/Series/WordcloudSeries.js +11 -9
  192. package/es-modules/Series/XRangeSeries.js +8 -7
  193. package/es-modules/Stock/Indicators/ABIndicator.js +7 -7
  194. package/es-modules/Stock/Indicators/ADIndicator.js +4 -3
  195. package/es-modules/Stock/Indicators/AOIndicator.js +5 -4
  196. package/es-modules/Stock/Indicators/APOIndicator.js +7 -7
  197. package/es-modules/Stock/Indicators/ATRIndicator.js +5 -5
  198. package/es-modules/Stock/Indicators/AroonIndicator.js +6 -5
  199. package/es-modules/Stock/Indicators/AroonOscillatorIndicator.js +5 -5
  200. package/es-modules/Stock/Indicators/BBIndicator.js +7 -7
  201. package/es-modules/Stock/Indicators/CCIIndicator.js +4 -3
  202. package/es-modules/Stock/Indicators/CMFIndicator.js +3 -4
  203. package/es-modules/Stock/Indicators/ChaikinIndicator.js +9 -8
  204. package/es-modules/Stock/Indicators/DEMAIndicator.js +7 -7
  205. package/es-modules/Stock/Indicators/DPOIndicator.js +4 -3
  206. package/es-modules/Stock/Indicators/EMAIndicator.js +3 -3
  207. package/es-modules/Stock/Indicators/IKHIndicator.js +22 -19
  208. package/es-modules/Stock/Indicators/KeltnerChannelsIndicator.js +10 -7
  209. package/es-modules/Stock/Indicators/MACDIndicator.js +7 -4
  210. package/es-modules/Stock/Indicators/MFIIndicator.js +4 -3
  211. package/es-modules/Stock/Indicators/MomentumIndicator.js +4 -3
  212. package/es-modules/Stock/Indicators/NATRIndicator.js +4 -6
  213. package/es-modules/Stock/Indicators/PCIndicator.js +8 -7
  214. package/es-modules/Stock/Indicators/PPOIndicator.js +7 -7
  215. package/es-modules/Stock/Indicators/PSARIndicator.js +3 -4
  216. package/es-modules/Stock/Indicators/PivotPointsIndicator.js +5 -5
  217. package/es-modules/Stock/Indicators/PriceEnvelopesIndicator.js +5 -5
  218. package/es-modules/Stock/Indicators/ROCIndicator.js +4 -3
  219. package/es-modules/Stock/Indicators/RSIIndicator.js +4 -3
  220. package/es-modules/Stock/Indicators/RegressionIndicators.js +7 -6
  221. package/es-modules/Stock/Indicators/{Indicators.js → SMAIndicator.js} +9 -6
  222. package/es-modules/Stock/Indicators/SlowStochasticIndicator.js +6 -8
  223. package/es-modules/Stock/Indicators/StochasticIndicator.js +8 -8
  224. package/es-modules/Stock/Indicators/SupertrendIndicator.js +7 -6
  225. package/es-modules/Stock/Indicators/TEMAIndicator.js +7 -7
  226. package/es-modules/Stock/Indicators/TRIXIndicator.js +7 -7
  227. package/es-modules/Stock/Indicators/TrendLineIndicator.js +4 -3
  228. package/es-modules/Stock/Indicators/VBPIndicator.js +7 -4
  229. package/es-modules/Stock/Indicators/VWAPIndicator.js +4 -3
  230. package/es-modules/Stock/Indicators/WMAIndicator.js +4 -3
  231. package/es-modules/Stock/Indicators/WilliamsRIndicator.js +6 -5
  232. package/es-modules/Stock/Indicators/ZigzagIndicator.js +5 -7
  233. package/es-modules/Stock/StockToolsBindings.js +16 -2
  234. package/es-modules/Stock/StockToolsGui.js +9 -9
  235. package/es-modules/masters/highcharts-3d.src.js +1 -2
  236. package/es-modules/masters/highcharts-gantt.src.js +1 -1
  237. package/es-modules/masters/highcharts-more.src.js +1 -1
  238. package/es-modules/masters/highcharts.src.js +3 -2
  239. package/es-modules/masters/highmaps.src.js +1 -1
  240. package/es-modules/masters/highstock.src.js +1 -1
  241. package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
  242. package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
  243. package/es-modules/masters/indicators/ao.src.js +1 -1
  244. package/es-modules/masters/indicators/apo.src.js +1 -1
  245. package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
  246. package/es-modules/masters/indicators/aroon.src.js +1 -1
  247. package/es-modules/masters/indicators/atr.src.js +1 -1
  248. package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
  249. package/es-modules/masters/indicators/cci.src.js +1 -1
  250. package/es-modules/masters/indicators/chaikin.src.js +1 -1
  251. package/es-modules/masters/indicators/cmf.src.js +1 -1
  252. package/es-modules/masters/indicators/dema.src.js +1 -1
  253. package/es-modules/masters/indicators/dpo.src.js +1 -1
  254. package/es-modules/masters/indicators/ema.src.js +1 -1
  255. package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
  256. package/es-modules/masters/indicators/indicators-all.src.js +2 -2
  257. package/es-modules/masters/indicators/indicators.src.js +2 -2
  258. package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
  259. package/es-modules/masters/indicators/macd.src.js +1 -1
  260. package/es-modules/masters/indicators/mfi.src.js +1 -1
  261. package/es-modules/masters/indicators/momentum.src.js +1 -1
  262. package/es-modules/masters/indicators/natr.src.js +1 -1
  263. package/es-modules/masters/indicators/pivot-points.src.js +1 -1
  264. package/es-modules/masters/indicators/ppo.src.js +1 -1
  265. package/es-modules/masters/indicators/price-channel.src.js +1 -1
  266. package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
  267. package/es-modules/masters/indicators/psar.src.js +1 -1
  268. package/es-modules/masters/indicators/regressions.src.js +1 -1
  269. package/es-modules/masters/indicators/roc.src.js +1 -1
  270. package/es-modules/masters/indicators/rsi.src.js +1 -1
  271. package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
  272. package/es-modules/masters/indicators/stochastic.src.js +1 -1
  273. package/es-modules/masters/indicators/supertrend.src.js +1 -1
  274. package/es-modules/masters/indicators/tema.src.js +1 -1
  275. package/es-modules/masters/indicators/trendline.src.js +1 -1
  276. package/es-modules/masters/indicators/trix.src.js +1 -1
  277. package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
  278. package/es-modules/masters/indicators/vwap.src.js +1 -1
  279. package/es-modules/masters/indicators/williams-r.src.js +1 -1
  280. package/es-modules/masters/indicators/wma.src.js +1 -1
  281. package/es-modules/masters/indicators/zigzag.src.js +1 -1
  282. package/es-modules/masters/modules/accessibility.src.js +1 -1
  283. package/es-modules/masters/modules/annotations-advanced.src.js +1 -1
  284. package/es-modules/masters/modules/annotations.src.js +1 -1
  285. package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
  286. package/es-modules/masters/modules/boost-canvas.src.js +1 -1
  287. package/es-modules/masters/modules/boost.src.js +1 -1
  288. package/es-modules/masters/modules/broken-axis.src.js +1 -1
  289. package/es-modules/masters/modules/bullet.src.js +1 -1
  290. package/es-modules/masters/modules/coloraxis.src.js +1 -1
  291. package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
  292. package/es-modules/masters/modules/cylinder.src.js +1 -1
  293. package/es-modules/masters/modules/data.src.js +1 -1
  294. package/es-modules/masters/modules/datagrouping.src.js +1 -1
  295. package/es-modules/masters/modules/debugger.src.js +1 -1
  296. package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
  297. package/es-modules/masters/modules/dotplot.src.js +1 -1
  298. package/es-modules/masters/modules/drag-panes.src.js +1 -1
  299. package/es-modules/masters/modules/draggable-points.src.js +1 -1
  300. package/es-modules/masters/modules/drilldown.src.js +1 -1
  301. package/es-modules/masters/modules/dumbbell.src.js +1 -1
  302. package/es-modules/masters/modules/export-data.src.js +1 -1
  303. package/es-modules/masters/modules/exporting.src.js +1 -1
  304. package/es-modules/masters/modules/full-screen.src.js +1 -1
  305. package/es-modules/masters/modules/funnel.src.js +1 -1
  306. package/es-modules/masters/modules/funnel3d.src.js +1 -1
  307. package/es-modules/masters/modules/gantt.src.js +1 -1
  308. package/es-modules/masters/modules/grid-axis.src.js +1 -1
  309. package/es-modules/masters/modules/heatmap.src.js +1 -1
  310. package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
  311. package/es-modules/masters/modules/item-series.src.js +1 -1
  312. package/es-modules/masters/modules/lollipop.src.js +1 -1
  313. package/es-modules/masters/modules/map.src.js +1 -1
  314. package/es-modules/masters/modules/marker-clusters.src.js +1 -1
  315. package/es-modules/masters/modules/networkgraph.src.js +1 -1
  316. package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
  317. package/es-modules/masters/modules/offline-exporting.src.js +1 -1
  318. package/es-modules/masters/modules/oldie-polyfills.src.js +1 -1
  319. package/es-modules/masters/modules/oldie.src.js +2 -2
  320. package/es-modules/masters/modules/organization.src.js +1 -1
  321. package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
  322. package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
  323. package/es-modules/masters/modules/pareto.src.js +1 -1
  324. package/es-modules/masters/modules/pathfinder.src.js +1 -1
  325. package/es-modules/masters/modules/pattern-fill.src.js +1 -1
  326. package/es-modules/masters/modules/price-indicator.src.js +1 -1
  327. package/es-modules/masters/modules/pyramid3d.src.js +1 -1
  328. package/es-modules/masters/modules/sankey.src.js +1 -1
  329. package/es-modules/masters/modules/series-label.src.js +1 -1
  330. package/es-modules/masters/modules/solid-gauge.src.js +1 -1
  331. package/es-modules/masters/modules/sonification.src.js +2 -2
  332. package/es-modules/masters/modules/static-scale.src.js +1 -1
  333. package/es-modules/masters/modules/stock-tools.src.js +1 -1
  334. package/es-modules/masters/modules/stock.src.js +1 -1
  335. package/es-modules/masters/modules/streamgraph.src.js +1 -1
  336. package/es-modules/masters/modules/sunburst.src.js +1 -1
  337. package/es-modules/masters/modules/tilemap.src.js +1 -1
  338. package/es-modules/masters/modules/timeline.src.js +1 -1
  339. package/es-modules/masters/modules/treegrid.src.js +1 -1
  340. package/es-modules/masters/modules/treemap.src.js +1 -1
  341. package/es-modules/masters/modules/variable-pie.src.js +1 -1
  342. package/es-modules/masters/modules/variwide.src.js +1 -1
  343. package/es-modules/masters/modules/vector.src.js +1 -1
  344. package/es-modules/masters/modules/venn.src.js +1 -1
  345. package/es-modules/masters/modules/windbarb.src.js +1 -1
  346. package/es-modules/masters/modules/wordcloud.src.js +1 -1
  347. package/es-modules/masters/modules/xrange.src.js +1 -1
  348. package/es-modules/masters/themes/avocado.src.js +1 -1
  349. package/es-modules/masters/themes/dark-blue.src.js +1 -1
  350. package/es-modules/masters/themes/dark-green.src.js +1 -1
  351. package/es-modules/masters/themes/dark-unica.src.js +1 -1
  352. package/es-modules/masters/themes/gray.src.js +1 -1
  353. package/es-modules/masters/themes/grid-light.src.js +1 -1
  354. package/es-modules/masters/themes/grid.src.js +1 -1
  355. package/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
  356. package/es-modules/masters/themes/high-contrast-light.src.js +1 -1
  357. package/es-modules/masters/themes/sand-signika.src.js +1 -1
  358. package/es-modules/masters/themes/skies.src.js +1 -1
  359. package/es-modules/masters/themes/sunset.src.js +1 -1
  360. package/highcharts-3d.js +86 -89
  361. package/highcharts-3d.js.map +1 -1
  362. package/highcharts-3d.src.js +88 -149
  363. package/highcharts-gantt.js +729 -717
  364. package/highcharts-gantt.js.map +1 -1
  365. package/highcharts-gantt.src.js +5570 -5094
  366. package/highcharts-more.js +164 -163
  367. package/highcharts-more.js.map +1 -1
  368. package/highcharts-more.src.js +182 -118
  369. package/highcharts.d.ts +89 -159
  370. package/highcharts.js +537 -530
  371. package/highcharts.js.map +1 -1
  372. package/highcharts.src.d.ts +89 -159
  373. package/highcharts.src.js +5341 -4976
  374. package/highmaps.js +635 -627
  375. package/highmaps.js.map +1 -1
  376. package/highmaps.src.js +5907 -5530
  377. package/highstock.js +696 -689
  378. package/highstock.js.map +1 -1
  379. package/highstock.src.js +5384 -5026
  380. package/indicators/acceleration-bands.js +8 -8
  381. package/indicators/acceleration-bands.js.map +1 -1
  382. package/indicators/acceleration-bands.src.js +7 -7
  383. package/indicators/accumulation-distribution.js +4 -4
  384. package/indicators/accumulation-distribution.js.map +1 -1
  385. package/indicators/accumulation-distribution.src.js +5 -5
  386. package/indicators/ao.js +5 -5
  387. package/indicators/ao.js.map +1 -1
  388. package/indicators/ao.src.js +6 -6
  389. package/indicators/apo.js +5 -5
  390. package/indicators/apo.js.map +1 -1
  391. package/indicators/apo.src.js +7 -7
  392. package/indicators/aroon-oscillator.js +8 -8
  393. package/indicators/aroon-oscillator.js.map +1 -1
  394. package/indicators/aroon-oscillator.src.js +6 -6
  395. package/indicators/aroon.js +7 -7
  396. package/indicators/aroon.js.map +1 -1
  397. package/indicators/aroon.src.js +6 -6
  398. package/indicators/atr.js +4 -4
  399. package/indicators/atr.js.map +1 -1
  400. package/indicators/atr.src.js +6 -14
  401. package/indicators/bollinger-bands.js +8 -8
  402. package/indicators/bollinger-bands.js.map +1 -1
  403. package/indicators/bollinger-bands.src.js +7 -7
  404. package/indicators/cci.js +4 -4
  405. package/indicators/cci.js.map +1 -1
  406. package/indicators/cci.src.js +5 -5
  407. package/indicators/chaikin.js +6 -6
  408. package/indicators/chaikin.js.map +1 -1
  409. package/indicators/chaikin.src.js +75 -74
  410. package/indicators/cmf.js +2 -2
  411. package/indicators/cmf.js.map +1 -1
  412. package/indicators/cmf.src.js +4 -4
  413. package/indicators/dema.js +5 -5
  414. package/indicators/dema.js.map +1 -1
  415. package/indicators/dema.src.js +7 -7
  416. package/indicators/dpo.js +4 -4
  417. package/indicators/dpo.js.map +1 -1
  418. package/indicators/dpo.src.js +5 -5
  419. package/indicators/ema.js +4 -4
  420. package/indicators/ema.js.map +1 -1
  421. package/indicators/ema.src.js +4 -5
  422. package/indicators/ichimoku-kinko-hyo.js +13 -13
  423. package/indicators/ichimoku-kinko-hyo.js.map +1 -1
  424. package/indicators/ichimoku-kinko-hyo.src.js +21 -20
  425. package/indicators/indicators-all.js +118 -118
  426. package/indicators/indicators-all.js.map +1 -1
  427. package/indicators/indicators-all.src.js +227 -230
  428. package/indicators/indicators.js +9 -9
  429. package/indicators/indicators.js.map +1 -1
  430. package/indicators/indicators.src.js +7 -7
  431. package/indicators/keltner-channels.js +8 -8
  432. package/indicators/keltner-channels.js.map +1 -1
  433. package/indicators/keltner-channels.src.js +12 -9
  434. package/indicators/macd.js +10 -10
  435. package/indicators/macd.js.map +1 -1
  436. package/indicators/macd.src.js +8 -7
  437. package/indicators/mfi.js +4 -4
  438. package/indicators/mfi.js.map +1 -1
  439. package/indicators/mfi.src.js +5 -5
  440. package/indicators/momentum.js +4 -4
  441. package/indicators/momentum.js.map +1 -1
  442. package/indicators/momentum.src.js +5 -5
  443. package/indicators/natr.js +3 -3
  444. package/indicators/natr.js.map +1 -1
  445. package/indicators/natr.src.js +5 -5
  446. package/indicators/pivot-points.js +8 -8
  447. package/indicators/pivot-points.js.map +1 -1
  448. package/indicators/pivot-points.src.js +6 -6
  449. package/indicators/ppo.js +5 -5
  450. package/indicators/ppo.js.map +1 -1
  451. package/indicators/ppo.src.js +7 -7
  452. package/indicators/price-channel.js +8 -8
  453. package/indicators/price-channel.js.map +1 -1
  454. package/indicators/price-channel.src.js +65 -65
  455. package/indicators/price-envelopes.js +7 -7
  456. package/indicators/price-envelopes.js.map +1 -1
  457. package/indicators/price-envelopes.src.js +6 -6
  458. package/indicators/psar.js +2 -2
  459. package/indicators/psar.js.map +1 -1
  460. package/indicators/psar.src.js +4 -4
  461. package/indicators/regressions.js +6 -6
  462. package/indicators/regressions.js.map +1 -1
  463. package/indicators/regressions.src.js +8 -8
  464. package/indicators/roc.js +3 -3
  465. package/indicators/roc.js.map +1 -1
  466. package/indicators/roc.src.js +5 -5
  467. package/indicators/rsi.js +4 -4
  468. package/indicators/rsi.js.map +1 -1
  469. package/indicators/rsi.src.js +5 -5
  470. package/indicators/slow-stochastic.js +5 -5
  471. package/indicators/slow-stochastic.js.map +1 -1
  472. package/indicators/slow-stochastic.src.js +6 -6
  473. package/indicators/stochastic.js +9 -9
  474. package/indicators/stochastic.js.map +1 -1
  475. package/indicators/stochastic.src.js +66 -66
  476. package/indicators/supertrend.js +9 -9
  477. package/indicators/supertrend.js.map +1 -1
  478. package/indicators/supertrend.src.js +9 -7
  479. package/indicators/tema.js +6 -6
  480. package/indicators/tema.js.map +1 -1
  481. package/indicators/tema.src.js +7 -7
  482. package/indicators/trendline.js +3 -3
  483. package/indicators/trendline.js.map +1 -1
  484. package/indicators/trendline.src.js +5 -5
  485. package/indicators/trix.js +4 -4
  486. package/indicators/trix.js.map +1 -1
  487. package/indicators/trix.src.js +7 -7
  488. package/indicators/volume-by-price.js +13 -13
  489. package/indicators/volume-by-price.js.map +1 -1
  490. package/indicators/volume-by-price.src.js +7 -8
  491. package/indicators/vwap.js +4 -4
  492. package/indicators/vwap.js.map +1 -1
  493. package/indicators/vwap.src.js +5 -5
  494. package/indicators/williams-r.js +4 -4
  495. package/indicators/williams-r.js.map +1 -1
  496. package/indicators/williams-r.src.js +6 -6
  497. package/indicators/wma.js +4 -4
  498. package/indicators/wma.js.map +1 -1
  499. package/indicators/wma.src.js +5 -5
  500. package/indicators/zigzag.js +4 -4
  501. package/indicators/zigzag.js.map +1 -1
  502. package/indicators/zigzag.src.js +6 -7
  503. package/modules/accessibility.js +148 -147
  504. package/modules/accessibility.js.map +1 -1
  505. package/modules/accessibility.src.js +104 -96
  506. package/modules/annotations-advanced.js +158 -158
  507. package/modules/annotations-advanced.js.map +1 -1
  508. package/modules/annotations-advanced.src.js +15 -14
  509. package/modules/annotations.js +105 -105
  510. package/modules/annotations.js.map +1 -1
  511. package/modules/annotations.src.js +15 -14
  512. package/modules/arrow-symbols.js +1 -1
  513. package/modules/arrow-symbols.src.js +1 -1
  514. package/modules/boost-canvas.js +15 -15
  515. package/modules/boost-canvas.js.map +1 -1
  516. package/modules/boost-canvas.src.js +16 -16
  517. package/modules/boost.d.ts +4 -0
  518. package/modules/boost.js +77 -64
  519. package/modules/boost.js.map +1 -1
  520. package/modules/boost.src.d.ts +4 -0
  521. package/modules/boost.src.js +561 -14
  522. package/modules/broken-axis.js +12 -12
  523. package/modules/broken-axis.js.map +1 -1
  524. package/modules/broken-axis.src.js +4 -5
  525. package/modules/bullet.js +6 -6
  526. package/modules/bullet.js.map +1 -1
  527. package/modules/bullet.src.js +5 -6
  528. package/modules/coloraxis.js +22 -21
  529. package/modules/coloraxis.js.map +1 -1
  530. package/modules/coloraxis.src.js +46 -41
  531. package/modules/current-date-indicator.js +4 -4
  532. package/modules/current-date-indicator.js.map +1 -1
  533. package/modules/current-date-indicator.src.js +4 -6
  534. package/modules/cylinder.js +8 -8
  535. package/modules/cylinder.js.map +1 -1
  536. package/modules/cylinder.src.js +18 -21
  537. package/modules/data.js +32 -32
  538. package/modules/data.js.map +1 -1
  539. package/modules/data.src.js +7 -11
  540. package/modules/datagrouping.js +17 -17
  541. package/modules/datagrouping.js.map +1 -1
  542. package/modules/datagrouping.src.js +3 -4
  543. package/modules/debugger.js +4 -4
  544. package/modules/debugger.js.map +1 -1
  545. package/modules/debugger.src.js +4 -4
  546. package/modules/dependency-wheel.js +8 -8
  547. package/modules/dependency-wheel.js.map +1 -1
  548. package/modules/dependency-wheel.src.js +9 -9
  549. package/modules/dotplot.js +5 -5
  550. package/modules/dotplot.js.map +1 -1
  551. package/modules/dotplot.src.js +4 -12
  552. package/modules/drag-panes.js +7 -7
  553. package/modules/drag-panes.js.map +1 -1
  554. package/modules/drag-panes.src.js +2 -2
  555. package/modules/draggable-points.js +33 -33
  556. package/modules/draggable-points.js.map +1 -1
  557. package/modules/draggable-points.src.js +6 -6
  558. package/modules/drilldown.js +23 -22
  559. package/modules/drilldown.js.map +1 -1
  560. package/modules/drilldown.src.js +21 -11
  561. package/modules/dumbbell.js +24 -20
  562. package/modules/dumbbell.js.map +1 -1
  563. package/modules/dumbbell.src.js +396 -136
  564. package/modules/export-data.js +21 -21
  565. package/modules/export-data.js.map +1 -1
  566. package/modules/export-data.src.js +8 -7
  567. package/modules/exporting.js +32 -32
  568. package/modules/exporting.js.map +1 -1
  569. package/modules/exporting.src.js +10 -3
  570. package/modules/full-screen.js +1 -1
  571. package/modules/full-screen.src.js +1 -1
  572. package/modules/funnel.js +9 -9
  573. package/modules/funnel.js.map +1 -1
  574. package/modules/funnel.src.js +6 -8
  575. package/modules/funnel3d.js +17 -17
  576. package/modules/funnel3d.js.map +1 -1
  577. package/modules/funnel3d.src.js +9 -12
  578. package/modules/gantt.js +194 -189
  579. package/modules/gantt.js.map +1 -1
  580. package/modules/gantt.src.js +232 -121
  581. package/modules/grid-axis.js +22 -19
  582. package/modules/grid-axis.js.map +1 -1
  583. package/modules/grid-axis.src.js +130 -64
  584. package/modules/heatmap.js +33 -33
  585. package/modules/heatmap.js.map +1 -1
  586. package/modules/heatmap.src.js +93 -84
  587. package/modules/histogram-bellcurve.js +10 -10
  588. package/modules/histogram-bellcurve.js.map +1 -1
  589. package/modules/histogram-bellcurve.src.js +49 -11
  590. package/modules/item-series.js +9 -9
  591. package/modules/item-series.js.map +1 -1
  592. package/modules/item-series.src.js +5 -6
  593. package/modules/lollipop.d.ts +20 -1
  594. package/modules/lollipop.js +26 -4
  595. package/modules/lollipop.js.map +1 -1
  596. package/modules/lollipop.src.d.ts +20 -1
  597. package/modules/lollipop.src.js +1431 -9
  598. package/modules/map.d.ts +1 -1
  599. package/modules/map.js +99 -99
  600. package/modules/map.js.map +1 -1
  601. package/modules/map.src.d.ts +1 -1
  602. package/modules/map.src.js +1421 -1409
  603. package/modules/marker-clusters.js +35 -35
  604. package/modules/marker-clusters.js.map +1 -1
  605. package/modules/marker-clusters.src.js +5 -5
  606. package/modules/networkgraph.js +47 -46
  607. package/modules/networkgraph.js.map +1 -1
  608. package/modules/networkgraph.src.js +18 -17
  609. package/modules/no-data-to-display.js +4 -4
  610. package/modules/no-data-to-display.js.map +1 -1
  611. package/modules/no-data-to-display.src.js +15 -12
  612. package/modules/offline-exporting.js +15 -15
  613. package/modules/offline-exporting.js.map +1 -1
  614. package/modules/offline-exporting.src.js +20 -18
  615. package/modules/oldie-polyfills.js +1 -1
  616. package/modules/oldie-polyfills.src.js +1 -1
  617. package/modules/oldie.js +52 -26
  618. package/modules/oldie.js.map +1 -1
  619. package/modules/oldie.src.js +1401 -22
  620. package/modules/organization.js +11 -11
  621. package/modules/organization.js.map +1 -1
  622. package/modules/organization.src.js +6 -5
  623. package/modules/overlapping-datalabels.js +1 -1
  624. package/modules/overlapping-datalabels.src.js +1 -1
  625. package/modules/parallel-coordinates.js +1 -1
  626. package/modules/parallel-coordinates.src.js +1 -1
  627. package/modules/pareto.js +5 -5
  628. package/modules/pareto.js.map +1 -1
  629. package/modules/pareto.src.js +5 -6
  630. package/modules/pathfinder.js +20 -20
  631. package/modules/pathfinder.js.map +1 -1
  632. package/modules/pathfinder.src.js +7 -1
  633. package/modules/pattern-fill.js +13 -13
  634. package/modules/pattern-fill.js.map +1 -1
  635. package/modules/pattern-fill.src.js +10 -10
  636. package/modules/price-indicator.js +1 -1
  637. package/modules/price-indicator.src.js +1 -1
  638. package/modules/pyramid3d.js +3 -3
  639. package/modules/pyramid3d.js.map +1 -1
  640. package/modules/pyramid3d.src.js +3 -4
  641. package/modules/sankey.js +25 -25
  642. package/modules/sankey.js.map +1 -1
  643. package/modules/sankey.src.js +15 -15
  644. package/modules/series-label.js +17 -17
  645. package/modules/series-label.js.map +1 -1
  646. package/modules/series-label.src.js +3 -3
  647. package/modules/solid-gauge.js +8 -8
  648. package/modules/solid-gauge.js.map +1 -1
  649. package/modules/solid-gauge.src.js +4 -5
  650. package/modules/sonification.js +46 -46
  651. package/modules/sonification.js.map +1 -1
  652. package/modules/sonification.src.js +21 -16
  653. package/modules/static-scale.js +4 -4
  654. package/modules/static-scale.js.map +1 -1
  655. package/modules/static-scale.src.js +3 -4
  656. package/modules/stock-tools.js +142 -141
  657. package/modules/stock-tools.js.map +1 -1
  658. package/modules/stock-tools.src.js +40 -21
  659. package/modules/stock.js +161 -161
  660. package/modules/stock.js.map +1 -1
  661. package/modules/stock.src.js +41 -48
  662. package/modules/streamgraph.js +2 -2
  663. package/modules/streamgraph.js.map +1 -1
  664. package/modules/streamgraph.src.js +41 -4
  665. package/modules/sunburst.js +51 -50
  666. package/modules/sunburst.js.map +1 -1
  667. package/modules/sunburst.src.js +134 -65
  668. package/modules/tilemap.js +14 -14
  669. package/modules/tilemap.js.map +1 -1
  670. package/modules/tilemap.src.js +9 -9
  671. package/modules/timeline.js +14 -14
  672. package/modules/timeline.js.map +1 -1
  673. package/modules/timeline.src.js +7 -8
  674. package/modules/treegrid.js +57 -52
  675. package/modules/treegrid.js.map +1 -1
  676. package/modules/treegrid.src.js +191 -77
  677. package/modules/treemap.js +35 -34
  678. package/modules/treemap.js.map +1 -1
  679. package/modules/treemap.src.js +205 -138
  680. package/modules/variable-pie.js +8 -8
  681. package/modules/variable-pie.js.map +1 -1
  682. package/modules/variable-pie.src.js +10 -9
  683. package/modules/variwide.js +8 -8
  684. package/modules/variwide.js.map +1 -1
  685. package/modules/variwide.src.js +6 -7
  686. package/modules/vector.js +6 -6
  687. package/modules/vector.js.map +1 -1
  688. package/modules/vector.src.js +6 -7
  689. package/modules/venn.js +26 -26
  690. package/modules/venn.js.map +1 -1
  691. package/modules/venn.src.js +23 -23
  692. package/modules/windbarb.js +11 -11
  693. package/modules/windbarb.js.map +1 -1
  694. package/modules/windbarb.src.js +8 -9
  695. package/modules/wordcloud.js +19 -19
  696. package/modules/wordcloud.js.map +1 -1
  697. package/modules/wordcloud.src.js +14 -14
  698. package/modules/xrange.js +12 -12
  699. package/modules/xrange.js.map +1 -1
  700. package/modules/xrange.src.js +8 -9
  701. package/package.json +1 -1
  702. package/themes/avocado.js +1 -1
  703. package/themes/avocado.js.map +1 -1
  704. package/themes/avocado.src.js +4 -4
  705. package/themes/dark-blue.js +1 -1
  706. package/themes/dark-blue.src.js +1 -1
  707. package/themes/dark-green.js +1 -1
  708. package/themes/dark-green.src.js +1 -1
  709. package/themes/dark-unica.js +1 -1
  710. package/themes/dark-unica.js.map +1 -1
  711. package/themes/dark-unica.src.js +6 -7
  712. package/themes/gray.js +1 -1
  713. package/themes/gray.js.map +1 -1
  714. package/themes/gray.src.js +4 -4
  715. package/themes/grid-light.js +1 -1
  716. package/themes/grid-light.src.js +1 -1
  717. package/themes/grid.js +1 -1
  718. package/themes/grid.src.js +1 -1
  719. package/themes/high-contrast-dark.js +1 -1
  720. package/themes/high-contrast-dark.js.map +1 -1
  721. package/themes/high-contrast-dark.src.js +4 -4
  722. package/themes/high-contrast-light.js +1 -1
  723. package/themes/high-contrast-light.src.js +1 -1
  724. package/themes/sand-signika.js +1 -1
  725. package/themes/sand-signika.src.js +1 -1
  726. package/themes/skies.js +1 -1
  727. package/themes/skies.src.js +1 -1
  728. package/themes/sunset.js +1 -1
  729. package/themes/sunset.js.map +1 -1
  730. package/themes/sunset.src.js +4 -4
  731. package/es-modules/Core/Renderer/VML/VMLRenderer3D.js +0 -37
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highmaps JS v8.2.0 (2020-08-20)
2
+ * @license Highmaps JS v8.2.2 (2020-10-22)
3
3
  *
4
4
  * Highmaps as a plugin for Highcharts or Highstock.
5
5
  *
@@ -193,7 +193,7 @@
193
193
 
194
194
  return MapAxis;
195
195
  });
196
- _registerModule(_modules, 'Mixins/ColorSeries.js', [_modules['Core/Globals.js']], function (H) {
196
+ _registerModule(_modules, 'Mixins/ColorSeries.js', [], function () {
197
197
  /* *
198
198
  *
199
199
  * (c) 2010-2020 Torstein Honsi
@@ -209,18 +209,18 @@
209
209
  * @private
210
210
  * @mixin Highcharts.colorPointMixin
211
211
  */
212
- H.colorPointMixin = {
213
- /* eslint-disable valid-jsdoc */
214
- /**
215
- * Set the visibility of a single point
216
- * @private
217
- * @function Highcharts.colorPointMixin.setVisible
218
- * @param {boolean} visible
219
- * @return {void}
220
- */
221
- setVisible: function (vis) {
222
- var point = this,
223
- method = vis ? 'show' : 'hide';
212
+ var colorPointMixin = {
213
+ /* eslint-disable valid-jsdoc */
214
+ /**
215
+ * Set the visibility of a single point
216
+ * @private
217
+ * @function Highcharts.colorPointMixin.setVisible
218
+ * @param {boolean} visible
219
+ * @return {void}
220
+ */
221
+ setVisible: function (vis) {
222
+ var point = this,
223
+ method = vis ? 'show' : 'hide';
224
224
  point.visible = point.options.visible = Boolean(vis);
225
225
  // Show and hide associated elements
226
226
  ['graphic', 'dataLabel'].forEach(function (key) {
@@ -236,23 +236,25 @@
236
236
  * @private
237
237
  * @mixin Highcharts.colorSeriesMixin
238
238
  */
239
- H.colorSeriesMixin = {
240
- optionalAxis: 'colorAxis',
241
- colorAxis: 0,
242
- /* eslint-disable valid-jsdoc */
243
- /**
244
- * In choropleth maps, the color is a result of the value, so this needs
245
- * translation too
246
- * @private
247
- * @function Highcharts.colorSeriesMixin.translateColors
248
- * @return {void}
249
- */
250
- translateColors: function () {
251
- var series = this,
252
- points = this.data.length ? this.data : this.points,
253
- nullColor = this.options.nullColor,
254
- colorAxis = this.colorAxis,
255
- colorKey = this.colorKey;
239
+ var colorSeriesMixin = {
240
+ optionalAxis: 'colorAxis',
241
+ colorAxis: 0,
242
+ /* eslint-disable valid-jsdoc */
243
+ /**
244
+ * In choropleth maps,
245
+ the color is a result of the value,
246
+ so this needs
247
+ * translation too
248
+ * @private
249
+ * @function Highcharts.colorSeriesMixin.translateColors
250
+ * @return {void}
251
+ */
252
+ translateColors: function () {
253
+ var series = this,
254
+ points = this.data.length ? this.data : this.points,
255
+ nullColor = this.options.nullColor,
256
+ colorAxis = this.colorAxis,
257
+ colorKey = this.colorKey;
256
258
  points.forEach(function (point) {
257
259
  var value = point.getNestedProperty(colorKey),
258
260
  color;
@@ -272,9 +274,14 @@
272
274
  }
273
275
  /* eslint-enable valid-jsdoc */
274
276
  };
277
+ var exports = {
278
+ colorPointMixin: colorPointMixin,
279
+ colorSeriesMixin: colorSeriesMixin
280
+ };
275
281
 
282
+ return exports;
276
283
  });
277
- _registerModule(_modules, 'Core/Axis/ColorAxis.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Color.js'], _modules['Core/Globals.js'], _modules['Core/Legend.js'], _modules['Mixins/LegendSymbol.js'], _modules['Core/Series/Point.js'], _modules['Core/Utilities.js']], function (Axis, Chart, Color, H, Legend, LegendSymbolMixin, Point, U) {
284
+ _registerModule(_modules, 'Core/Axis/ColorAxis.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Color/Color.js'], _modules['Mixins/ColorSeries.js'], _modules['Core/Animation/Fx.js'], _modules['Core/Globals.js'], _modules['Core/Legend.js'], _modules['Mixins/LegendSymbol.js'], _modules['Series/LineSeries.js'], _modules['Core/Series/Point.js'], _modules['Core/Utilities.js']], function (Axis, Chart, Color, ColorSeriesModule, Fx, H, Legend, LegendSymbolMixin, LineSeries, Point, U) {
278
285
  /* *
279
286
  *
280
287
  * (c) 2010-2020 Torstein Honsi
@@ -301,11 +308,12 @@
301
308
  };
302
309
  })();
303
310
  var color = Color.parse;
311
+ var colorPointMixin = ColorSeriesModule.colorPointMixin,
312
+ colorSeriesMixin = ColorSeriesModule.colorSeriesMixin;
304
313
  var noop = H.noop;
305
314
  var addEvent = U.addEvent,
306
315
  erase = U.erase,
307
316
  extend = U.extend,
308
- Fx = U.Fx,
309
317
  isNumber = U.isNumber,
310
318
  merge = U.merge,
311
319
  pick = U.pick,
@@ -316,10 +324,7 @@
316
324
  * @typedef {"linear"|"logarithmic"} Highcharts.ColorAxisTypeValue
317
325
  */
318
326
  ''; // detach doclet above
319
- var Series = H.Series,
320
- colorPointMixin = H.colorPointMixin,
321
- colorSeriesMixin = H.colorSeriesMixin;
322
- extend(Series.prototype, colorSeriesMixin);
327
+ extend(LineSeries.prototype, colorSeriesMixin);
323
328
  extend(Point.prototype, colorPointMixin);
324
329
  Chart.prototype.collectionsWithUpdate.push('colorAxis');
325
330
  Chart.prototype.collectionsWithInit.colorAxis = [Chart.prototype.addColorAxis];
@@ -728,7 +733,7 @@
728
733
  cSeries.maxColorValue = cSeries[colorKey + 'Max'];
729
734
  }
730
735
  else {
731
- var cExtremes = Series.prototype.getExtremes.call(cSeries,
736
+ var cExtremes = LineSeries.prototype.getExtremes.call(cSeries,
732
737
  colorValArray);
733
738
  cSeries.minColorValue = cExtremes.dataMin;
734
739
  cSeries.maxColorValue = cExtremes.dataMax;
@@ -740,7 +745,7 @@
740
745
  Math.max(this.dataMax, cSeries.maxColorValue);
741
746
  }
742
747
  if (!calculatedExtremes) {
743
- Series.prototype.applyExtremes.call(cSeries);
748
+ LineSeries.prototype.applyExtremes.call(cSeries);
744
749
  }
745
750
  }
746
751
  };
@@ -1413,7 +1418,7 @@
1413
1418
  }
1414
1419
  });
1415
1420
  // Add colorAxis to series axisTypes
1416
- addEvent(Series, 'bindAxes', function () {
1421
+ addEvent(LineSeries, 'bindAxes', function () {
1417
1422
  var axisTypes = this.axisTypes;
1418
1423
  if (!axisTypes) {
1419
1424
  this.axisTypes = ['colorAxis'];
@@ -1479,7 +1484,7 @@
1479
1484
  }
1480
1485
  });
1481
1486
  // Calculate and set colors for points
1482
- addEvent(Series, 'afterTranslate', function () {
1487
+ addEvent(LineSeries, 'afterTranslate', function () {
1483
1488
  if (this.chart.colorAxis &&
1484
1489
  this.chart.colorAxis.length ||
1485
1490
  this.colorAttribs) {
@@ -1508,21 +1513,21 @@
1508
1513
  * @private
1509
1514
  * @mixin Highcharts.colorMapPointMixin
1510
1515
  */
1511
- H.colorMapPointMixin = {
1512
- dataLabelOnNull: true,
1513
- /* eslint-disable valid-jsdoc */
1514
- /**
1515
- * Color points have a value option that determines whether or not it is
1516
- * a null point
1517
- * @private
1518
- * @function Highcharts.colorMapPointMixin.isValid
1519
- * @return {boolean}
1520
- */
1521
- isValid: function () {
1522
- // undefined is allowed
1523
- return (this.value !== null &&
1524
- this.value !== Infinity &&
1525
- this.value !== -Infinity);
1516
+ var colorMapPointMixin = {
1517
+ dataLabelOnNull: true,
1518
+ /* eslint-disable valid-jsdoc */
1519
+ /**
1520
+ * Color points have a value option that determines whether or not it is
1521
+ * a null point
1522
+ * @private
1523
+ * @function Highcharts.colorMapPointMixin.isValid
1524
+ * @return {boolean}
1525
+ */
1526
+ isValid: function () {
1527
+ // undefined is allowed
1528
+ return (this.value !== null &&
1529
+ this.value !== Infinity &&
1530
+ this.value !== -Infinity);
1526
1531
  },
1527
1532
  /**
1528
1533
  * @private
@@ -1544,31 +1549,36 @@
1544
1549
  * @private
1545
1550
  * @mixin Highcharts.colorMapSeriesMixin
1546
1551
  */
1547
- H.colorMapSeriesMixin = {
1548
- pointArrayMap: ['value'],
1549
- axisTypes: ['xAxis', 'yAxis', 'colorAxis'],
1550
- trackerGroups: ['group', 'markerGroup', 'dataLabelsGroup'],
1551
- getSymbol: noop,
1552
- parallelArrays: ['x', 'y', 'value'],
1553
- colorKey: 'value',
1554
- pointAttribs: seriesTypes.column.prototype.pointAttribs,
1555
- /* eslint-disable valid-jsdoc */
1556
- /**
1557
- * Get the color attibutes to apply on the graphic
1558
- * @private
1559
- * @function Highcharts.colorMapSeriesMixin.colorAttribs
1560
- * @param {Highcharts.Point} point
1561
- * @return {Highcharts.SVGAttributes}
1562
- */
1563
- colorAttribs: function (point) {
1564
- var ret = {};
1552
+ var colorMapSeriesMixin = {
1553
+ pointArrayMap: ['value'],
1554
+ axisTypes: ['xAxis', 'yAxis', 'colorAxis'],
1555
+ trackerGroups: ['group', 'markerGroup', 'dataLabelsGroup'],
1556
+ getSymbol: noop,
1557
+ parallelArrays: ['x', 'y', 'value'],
1558
+ colorKey: 'value',
1559
+ pointAttribs: seriesTypes.column.prototype.pointAttribs,
1560
+ /* eslint-disable valid-jsdoc */
1561
+ /**
1562
+ * Get the color attibutes to apply on the graphic
1563
+ * @private
1564
+ * @function Highcharts.colorMapSeriesMixin.colorAttribs
1565
+ * @param {Highcharts.Point} point
1566
+ * @return {Highcharts.SVGAttributes}
1567
+ */
1568
+ colorAttribs: function (point) {
1569
+ var ret = {};
1565
1570
  if (defined(point.color)) {
1566
1571
  ret[this.colorProp || 'fill'] = point.color;
1567
1572
  }
1568
1573
  return ret;
1569
1574
  }
1570
1575
  };
1576
+ var exports = {
1577
+ colorMapPointMixin: colorMapPointMixin,
1578
+ colorMapSeriesMixin: colorMapSeriesMixin
1579
+ };
1571
1580
 
1581
+ return exports;
1572
1582
  });
1573
1583
  _registerModule(_modules, 'Maps/MapNavigation.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (Chart, H, U) {
1574
1584
  /* *
@@ -1965,7 +1975,7 @@
1965
1975
  });
1966
1976
 
1967
1977
  });
1968
- _registerModule(_modules, 'Series/MapSeries.js', [_modules['Core/Globals.js'], _modules['Mixins/LegendSymbol.js'], _modules['Core/Series/Point.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js']], function (H, LegendSymbolMixin, Point, SVGRenderer, U) {
1978
+ _registerModule(_modules, 'Maps/Map.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/Options.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js']], function (Chart, H, O, SVGRenderer, U) {
1969
1979
  /* *
1970
1980
  *
1971
1981
  * (c) 2010-2020 Torstein Honsi
@@ -1975,278 +1985,705 @@
1975
1985
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
1976
1986
  *
1977
1987
  * */
1988
+ var defaultOptions = O.defaultOptions;
1978
1989
  var extend = U.extend,
1979
- fireEvent = U.fireEvent,
1980
- getNestedProperty = U.getNestedProperty,
1981
- isArray = U.isArray,
1982
- isNumber = U.isNumber,
1990
+ getOptions = U.getOptions,
1983
1991
  merge = U.merge,
1984
- objectEach = U.objectEach,
1985
- pick = U.pick,
1986
- seriesType = U.seriesType,
1987
- splat = U.splat;
1988
- var colorMapPointMixin = H.colorMapPointMixin,
1989
- colorMapSeriesMixin = H.colorMapSeriesMixin,
1990
- noop = H.noop,
1991
- Series = H.Series,
1992
- seriesTypes = H.seriesTypes;
1993
- /**
1994
- * @private
1995
- * @class
1996
- * @name Highcharts.seriesTypes.map
1997
- *
1998
- * @augments Highcharts.Series
1999
- */
2000
- seriesType('map', 'scatter',
1992
+ pick = U.pick;
1993
+ var Renderer = H.Renderer,
1994
+ VMLRenderer = H.VMLRenderer;
1995
+ // Add language
1996
+ extend(defaultOptions.lang, {
1997
+ zoomIn: 'Zoom in',
1998
+ zoomOut: 'Zoom out'
1999
+ });
2000
+ // Set the default map navigation options
2001
2001
  /**
2002
- * The map series is used for basic choropleth maps, where each map area has
2003
- * a color based on its value.
2004
- *
2005
- * @sample maps/demo/all-maps/
2006
- * Choropleth map
2007
- *
2008
- * @extends plotOptions.scatter
2009
- * @excluding marker, cluster
2010
2002
  * @product highmaps
2011
- * @optionparent plotOptions.map
2003
+ * @optionparent mapNavigation
2012
2004
  */
2013
- {
2014
- animation: false,
2015
- dataLabels: {
2016
- crop: false,
2017
- formatter: function () {
2018
- return this.point.value;
2005
+ defaultOptions.mapNavigation = {
2006
+ /**
2007
+ * General options for the map navigation buttons. Individual options
2008
+ * can be given from the [mapNavigation.buttons](#mapNavigation.buttons)
2009
+ * option set.
2010
+ *
2011
+ * @sample {highmaps} maps/mapnavigation/button-theme/
2012
+ * Theming the navigation buttons
2013
+ */
2014
+ buttonOptions: {
2015
+ /**
2016
+ * What box to align the buttons to. Possible values are `plotBox`
2017
+ * and `spacingBox`.
2018
+ *
2019
+ * @type {Highcharts.ButtonRelativeToValue}
2020
+ */
2021
+ alignTo: 'plotBox',
2022
+ /**
2023
+ * The alignment of the navigation buttons.
2024
+ *
2025
+ * @type {Highcharts.AlignValue}
2026
+ */
2027
+ align: 'left',
2028
+ /**
2029
+ * The vertical alignment of the buttons. Individual alignment can
2030
+ * be adjusted by each button's `y` offset.
2031
+ *
2032
+ * @type {Highcharts.VerticalAlignValue}
2033
+ */
2034
+ verticalAlign: 'top',
2035
+ /**
2036
+ * The X offset of the buttons relative to its `align` setting.
2037
+ */
2038
+ x: 0,
2039
+ /**
2040
+ * The width of the map navigation buttons.
2041
+ */
2042
+ width: 18,
2043
+ /**
2044
+ * The pixel height of the map navigation buttons.
2045
+ */
2046
+ height: 18,
2047
+ /**
2048
+ * Padding for the navigation buttons.
2049
+ *
2050
+ * @since 5.0.0
2051
+ */
2052
+ padding: 5,
2053
+ /**
2054
+ * Text styles for the map navigation buttons.
2055
+ *
2056
+ * @type {Highcharts.CSSObject}
2057
+ * @default {"fontSize": "15px", "fontWeight": "bold"}
2058
+ */
2059
+ style: {
2060
+ /** @ignore */
2061
+ fontSize: '15px',
2062
+ /** @ignore */
2063
+ fontWeight: 'bold'
2019
2064
  },
2020
- inside: true,
2021
- overflow: false,
2022
- padding: 0,
2023
- verticalAlign: 'middle'
2065
+ /**
2066
+ * A configuration object for the button theme. The object accepts
2067
+ * SVG properties like `stroke-width`, `stroke` and `fill`. Tri-state
2068
+ * button styles are supported by the `states.hover` and `states.select`
2069
+ * objects.
2070
+ *
2071
+ * @sample {highmaps} maps/mapnavigation/button-theme/
2072
+ * Themed navigation buttons
2073
+ *
2074
+ * @type {Highcharts.SVGAttributes}
2075
+ * @default {"stroke-width": 1, "text-align": "center"}
2076
+ */
2077
+ theme: {
2078
+ /** @ignore */
2079
+ 'stroke-width': 1,
2080
+ /** @ignore */
2081
+ 'text-align': 'center'
2082
+ }
2024
2083
  },
2025
2084
  /**
2026
- * @ignore-option
2085
+ * The individual buttons for the map navigation. This usually includes
2086
+ * the zoom in and zoom out buttons. Properties for each button is
2087
+ * inherited from
2088
+ * [mapNavigation.buttonOptions](#mapNavigation.buttonOptions), while
2089
+ * individual options can be overridden. But default, the `onclick`, `text`
2090
+ * and `y` options are individual.
2091
+ */
2092
+ buttons: {
2093
+ /**
2094
+ * Options for the zoom in button. Properties for the zoom in and zoom
2095
+ * out buttons are inherited from
2096
+ * [mapNavigation.buttonOptions](#mapNavigation.buttonOptions), while
2097
+ * individual options can be overridden. By default, the `onclick`,
2098
+ * `text` and `y` options are individual.
2099
+ *
2100
+ * @extends mapNavigation.buttonOptions
2101
+ */
2102
+ zoomIn: {
2103
+ // eslint-disable-next-line valid-jsdoc
2104
+ /**
2105
+ * Click handler for the button.
2106
+ *
2107
+ * @type {Function}
2108
+ * @default function () { this.mapZoom(0.5); }
2109
+ */
2110
+ onclick: function () {
2111
+ this.mapZoom(0.5);
2112
+ },
2113
+ /**
2114
+ * The text for the button. The tooltip (title) is a language option
2115
+ * given by [lang.zoomIn](#lang.zoomIn).
2116
+ */
2117
+ text: '+',
2118
+ /**
2119
+ * The position of the zoomIn button relative to the vertical
2120
+ * alignment.
2121
+ */
2122
+ y: 0
2123
+ },
2124
+ /**
2125
+ * Options for the zoom out button. Properties for the zoom in and
2126
+ * zoom out buttons are inherited from
2127
+ * [mapNavigation.buttonOptions](#mapNavigation.buttonOptions), while
2128
+ * individual options can be overridden. By default, the `onclick`,
2129
+ * `text` and `y` options are individual.
2130
+ *
2131
+ * @extends mapNavigation.buttonOptions
2132
+ */
2133
+ zoomOut: {
2134
+ // eslint-disable-next-line valid-jsdoc
2135
+ /**
2136
+ * Click handler for the button.
2137
+ *
2138
+ * @type {Function}
2139
+ * @default function () { this.mapZoom(2); }
2140
+ */
2141
+ onclick: function () {
2142
+ this.mapZoom(2);
2143
+ },
2144
+ /**
2145
+ * The text for the button. The tooltip (title) is a language option
2146
+ * given by [lang.zoomOut](#lang.zoomIn).
2147
+ */
2148
+ text: '-',
2149
+ /**
2150
+ * The position of the zoomOut button relative to the vertical
2151
+ * alignment.
2152
+ */
2153
+ y: 28
2154
+ }
2155
+ },
2156
+ /**
2157
+ * Whether to enable navigation buttons. By default it inherits the
2158
+ * [enabled](#mapNavigation.enabled) setting.
2027
2159
  *
2028
- * @private
2160
+ * @type {boolean}
2161
+ * @apioption mapNavigation.enableButtons
2029
2162
  */
2030
- marker: null,
2031
2163
  /**
2032
- * The color to apply to null points.
2164
+ * Whether to enable map navigation. The default is not to enable
2165
+ * navigation, as many choropleth maps are simple and don't need it.
2166
+ * Additionally, when touch zoom and mousewheel zoom is enabled, it breaks
2167
+ * the default behaviour of these interactions in the website, and the
2168
+ * implementer should be aware of this.
2033
2169
  *
2034
- * In styled mode, the null point fill is set in the
2035
- * `.highcharts-null-point` class.
2036
- *
2037
- * @sample maps/demo/all-areas-as-null/
2038
- * Null color
2039
- *
2040
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
2041
- *
2042
- * @private
2043
- */
2044
- nullColor: '#f7f7f7',
2045
- /**
2046
- * Whether to allow pointer interaction like tooltips and mouse events
2047
- * on null points.
2170
+ * Individual interactions can be enabled separately, namely buttons,
2171
+ * multitouch zoom, double click zoom, double click zoom to element and
2172
+ * mousewheel zoom.
2048
2173
  *
2049
2174
  * @type {boolean}
2050
- * @since 4.2.7
2051
- * @apioption plotOptions.map.nullInteraction
2052
- *
2053
- * @private
2054
- */
2055
- stickyTracking: false,
2056
- tooltip: {
2057
- followPointer: true,
2058
- pointFormat: '{point.name}: {point.value}<br/>'
2059
- },
2060
- /**
2061
- * @ignore-option
2062
- *
2063
- * @private
2175
+ * @default false
2176
+ * @apioption mapNavigation.enabled
2064
2177
  */
2065
- turboThreshold: 0,
2066
2178
  /**
2067
- * Whether all areas of the map defined in `mapData` should be rendered.
2068
- * If `true`, areas which don't correspond to a data point, are rendered
2069
- * as `null` points. If `false`, those areas are skipped.
2070
- *
2071
- * @sample maps/plotoptions/series-allareas-false/
2072
- * All areas set to false
2179
+ * Enables zooming in on an area on double clicking in the map. By default
2180
+ * it inherits the [enabled](#mapNavigation.enabled) setting.
2073
2181
  *
2074
2182
  * @type {boolean}
2075
- * @default true
2076
- * @product highmaps
2077
- * @apioption plotOptions.series.allAreas
2078
- *
2079
- * @private
2080
- */
2081
- allAreas: true,
2082
- /**
2083
- * The border color of the map areas.
2084
- *
2085
- * In styled mode, the border stroke is given in the `.highcharts-point`
2086
- * class.
2087
- *
2088
- * @sample {highmaps} maps/plotoptions/series-border/
2089
- * Borders demo
2090
- *
2091
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
2092
- * @default '#cccccc'
2093
- * @product highmaps
2094
- * @apioption plotOptions.series.borderColor
2095
- *
2096
- * @private
2183
+ * @apioption mapNavigation.enableDoubleClickZoom
2097
2184
  */
2098
- borderColor: '#cccccc',
2099
2185
  /**
2100
- * The border width of each map area.
2101
- *
2102
- * In styled mode, the border stroke width is given in the
2103
- * `.highcharts-point` class.
2104
- *
2105
- * @sample maps/plotoptions/series-border/
2106
- * Borders demo
2186
+ * Whether to zoom in on an area when that area is double clicked.
2107
2187
  *
2108
- * @type {number}
2109
- * @default 1
2110
- * @product highmaps
2111
- * @apioption plotOptions.series.borderWidth
2188
+ * @sample {highmaps} maps/mapnavigation/doubleclickzoomto/
2189
+ * Enable double click zoom to
2112
2190
  *
2113
- * @private
2114
- */
2115
- borderWidth: 1,
2116
- /**
2117
- * @default value
2118
- * @apioption plotOptions.map.colorKey
2191
+ * @type {boolean}
2192
+ * @default false
2193
+ * @apioption mapNavigation.enableDoubleClickZoomTo
2119
2194
  */
2120
2195
  /**
2121
- * What property to join the `mapData` to the value data. For example,
2122
- * if joinBy is "code", the mapData items with a specific code is merged
2123
- * into the data with the same code. For maps loaded from GeoJSON, the
2124
- * keys may be held in each point's `properties` object.
2125
- *
2126
- * The joinBy option can also be an array of two values, where the first
2127
- * points to a key in the `mapData`, and the second points to another
2128
- * key in the `data`.
2129
- *
2130
- * When joinBy is `null`, the map items are joined by their position in
2131
- * the array, which performs much better in maps with many data points.
2132
- * This is the recommended option if you are printing more than a
2133
- * thousand data points and have a backend that can preprocess the data
2134
- * into a parallel array of the mapData.
2135
- *
2136
- * @sample maps/plotoptions/series-border/
2137
- * Joined by "code"
2138
- * @sample maps/demo/geojson/
2139
- * GeoJSON joined by an array
2140
- * @sample maps/series/joinby-null/
2141
- * Simple data joined by null
2142
- *
2143
- * @type {string|Array<string>}
2144
- * @default hc-key
2145
- * @product highmaps
2146
- * @apioption plotOptions.series.joinBy
2196
+ * Enables zooming by mouse wheel. By default it inherits the [enabled](
2197
+ * #mapNavigation.enabled) setting.
2147
2198
  *
2148
- * @private
2199
+ * @type {boolean}
2200
+ * @apioption mapNavigation.enableMouseWheelZoom
2149
2201
  */
2150
- joinBy: 'hc-key',
2151
2202
  /**
2152
- * Define the z index of the series.
2203
+ * Whether to enable multitouch zooming. Note that if the chart covers the
2204
+ * viewport, this prevents the user from using multitouch and touchdrag on
2205
+ * the web page, so you should make sure the user is not trapped inside the
2206
+ * chart. By default it inherits the [enabled](#mapNavigation.enabled)
2207
+ * setting.
2153
2208
  *
2154
- * @type {number}
2155
- * @product highmaps
2156
- * @apioption plotOptions.series.zIndex
2209
+ * @type {boolean}
2210
+ * @apioption mapNavigation.enableTouchZoom
2157
2211
  */
2158
2212
  /**
2159
- * @apioption plotOptions.series.states
2213
+ * Sensitivity of mouse wheel or trackpad scrolling. 1 is no sensitivity,
2214
+ * while with 2, one mousewheel delta will zoom in 50%.
2160
2215
  *
2161
- * @private
2216
+ * @since 4.2.4
2162
2217
  */
2163
- states: {
2164
- /**
2165
- * @apioption plotOptions.series.states.hover
2166
- */
2167
- hover: {
2168
- /** @ignore-option */
2169
- halo: null,
2170
- /**
2171
- * The color of the shape in this state.
2172
- *
2173
- * @sample maps/plotoptions/series-states-hover/
2174
- * Hover options
2175
- *
2176
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
2177
- * @product highmaps
2178
- * @apioption plotOptions.series.states.hover.color
2179
- */
2180
- /**
2181
- * The border color of the point in this state.
2182
- *
2183
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
2184
- * @product highmaps
2185
- * @apioption plotOptions.series.states.hover.borderColor
2186
- */
2187
- /**
2188
- * The border width of the point in this state
2189
- *
2190
- * @type {number}
2191
- * @product highmaps
2192
- * @apioption plotOptions.series.states.hover.borderWidth
2193
- */
2194
- /**
2195
- * The relative brightness of the point when hovered, relative
2196
- * to the normal point color.
2197
- *
2198
- * @type {number}
2199
- * @product highmaps
2200
- * @default 0.2
2201
- * @apioption plotOptions.series.states.hover.brightness
2202
- */
2203
- brightness: 0.2
2204
- },
2205
- /**
2206
- * @apioption plotOptions.series.states.normal
2207
- */
2208
- normal: {
2209
- /**
2210
- * @productdesc {highmaps}
2211
- * The animation adds some latency in order to reduce the effect
2212
- * of flickering when hovering in and out of for example an
2213
- * uneven coastline.
2214
- *
2215
- * @sample {highmaps} maps/plotoptions/series-states-animation-false/
2216
- * No animation of fill color
2217
- *
2218
- * @apioption plotOptions.series.states.normal.animation
2219
- */
2220
- animation: true
2221
- },
2222
- /**
2223
- * @apioption plotOptions.series.states.select
2224
- */
2225
- select: {
2226
- /**
2227
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
2228
- * @default #cccccc
2229
- * @product highmaps
2230
- * @apioption plotOptions.series.states.select.color
2231
- */
2232
- color: '#cccccc'
2233
- },
2234
- inactive: {
2235
- opacity: 1
2236
- }
2218
+ mouseWheelSensitivity: 1.1
2219
+ // enabled: false,
2220
+ // enableButtons: null, // inherit from enabled
2221
+ // enableTouchZoom: null, // inherit from enabled
2222
+ // enableDoubleClickZoom: null, // inherit from enabled
2223
+ // enableDoubleClickZoomTo: false
2224
+ // enableMouseWheelZoom: null, // inherit from enabled
2225
+ };
2226
+ /* eslint-disable valid-jsdoc */
2227
+ /**
2228
+ * Utility for reading SVG paths directly.
2229
+ *
2230
+ * @requires modules/map
2231
+ *
2232
+ * @function Highcharts.splitPath
2233
+ *
2234
+ * @param {string|Array<string|number>} path
2235
+ *
2236
+ * @return {Highcharts.SVGPathArray}
2237
+ */
2238
+ var splitPath = H.splitPath = function (path) {
2239
+ var arr;
2240
+ if (typeof path === 'string') {
2241
+ path = path
2242
+ // Move letters apart
2243
+ .replace(/([A-Za-z])/g, ' $1 ')
2244
+ // Trim
2245
+ .replace(/^\s*/, '').replace(/\s*$/, '');
2246
+ // Split on spaces and commas. The semicolon is bogus, designed to
2247
+ // circumvent string replacement in the pre-v7 assembler that built
2248
+ // specific styled mode files.
2249
+ var split = path.split(/[ ,;]+/);
2250
+ arr = split.map(function (item) {
2251
+ if (!/[A-za-z]/.test(item)) {
2252
+ return parseFloat(item);
2253
+ }
2254
+ return item;
2255
+ });
2237
2256
  }
2238
- // Prototype members
2239
- }, merge(colorMapSeriesMixin, {
2240
- type: 'map',
2241
- getExtremesFromAll: true,
2242
- useMapGeometry: true,
2243
- forceDL: true,
2244
- searchPoint: noop,
2245
- // When tooltip is not shared, this series (and derivatives) requires
2246
- // direct touch/hover. KD-tree does not apply.
2247
- directTouch: true,
2248
- // X axis and Y axis must have same translation slope
2249
- preserveAspectRatio: true,
2257
+ else {
2258
+ arr = path;
2259
+ }
2260
+ return SVGRenderer.prototype.pathToSegments(arr);
2261
+ };
2262
+ /**
2263
+ * Contains all loaded map data for Highmaps.
2264
+ *
2265
+ * @requires modules/map
2266
+ *
2267
+ * @name Highcharts.maps
2268
+ * @type {Record<string,*>}
2269
+ */
2270
+ H.maps = {};
2271
+ /**
2272
+ * Create symbols for the zoom buttons
2273
+ * @private
2274
+ */
2275
+ function selectiveRoundedRect(x, y, w, h, rTopLeft, rTopRight, rBottomRight, rBottomLeft) {
2276
+ return [
2277
+ ['M', x + rTopLeft, y],
2278
+ // top side
2279
+ ['L', x + w - rTopRight, y],
2280
+ // top right corner
2281
+ ['C', x + w - rTopRight / 2, y, x + w, y + rTopRight / 2, x + w, y + rTopRight],
2282
+ // right side
2283
+ ['L', x + w, y + h - rBottomRight],
2284
+ // bottom right corner
2285
+ ['C', x + w, y + h - rBottomRight / 2, x + w - rBottomRight / 2, y + h, x + w - rBottomRight, y + h],
2286
+ // bottom side
2287
+ ['L', x + rBottomLeft, y + h],
2288
+ // bottom left corner
2289
+ ['C', x + rBottomLeft / 2, y + h, x, y + h - rBottomLeft / 2, x, y + h - rBottomLeft],
2290
+ // left side
2291
+ ['L', x, y + rTopLeft],
2292
+ // top left corner
2293
+ ['C', x, y + rTopLeft / 2, x + rTopLeft / 2, y, x + rTopLeft, y],
2294
+ ['Z']
2295
+ ];
2296
+ }
2297
+ SVGRenderer.prototype.symbols.topbutton = function (x, y, w, h, options) {
2298
+ var r = (options && options.r) || 0;
2299
+ return selectiveRoundedRect(x - 1, y - 1, w, h, r, r, 0, 0);
2300
+ };
2301
+ SVGRenderer.prototype.symbols.bottombutton = function (x, y, w, h, options) {
2302
+ var r = (options && options.r) || 0;
2303
+ return selectiveRoundedRect(x - 1, y - 1, w, h, 0, 0, r, r);
2304
+ };
2305
+ // The symbol callbacks are generated on the SVGRenderer object in all browsers.
2306
+ // Even VML browsers need this in order to generate shapes in export. Now share
2307
+ // them with the VMLRenderer.
2308
+ if (Renderer === VMLRenderer) {
2309
+ ['topbutton', 'bottombutton'].forEach(function (shape) {
2310
+ VMLRenderer.prototype.symbols[shape] =
2311
+ SVGRenderer.prototype.symbols[shape];
2312
+ });
2313
+ }
2314
+ /**
2315
+ * The factory function for creating new map charts. Creates a new {@link
2316
+ * Highcharts.Chart|Chart} object with different default options than the basic
2317
+ * Chart.
2318
+ *
2319
+ * @requires modules/map
2320
+ *
2321
+ * @function Highcharts.mapChart
2322
+ *
2323
+ * @param {string|Highcharts.HTMLDOMElement} [renderTo]
2324
+ * The DOM element to render to, or its id.
2325
+ *
2326
+ * @param {Highcharts.Options} options
2327
+ * The chart options structure as described in the
2328
+ * [options reference](https://api.highcharts.com/highstock).
2329
+ *
2330
+ * @param {Highcharts.ChartCallbackFunction} [callback]
2331
+ * A function to execute when the chart object is finished loading and
2332
+ * rendering. In most cases the chart is built in one thread, but in
2333
+ * Internet Explorer version 8 or less the chart is sometimes
2334
+ * initialized before the document is ready, and in these cases the
2335
+ * chart object will not be finished synchronously. As a consequence,
2336
+ * code that relies on the newly built Chart object should always run in
2337
+ * the callback. Defining a
2338
+ * [chart.events.load](https://api.highcharts.com/highstock/chart.events.load)
2339
+ * handler is equivalent.
2340
+ *
2341
+ * @return {Highcharts.Chart}
2342
+ * The chart object.
2343
+ */
2344
+ var mapChart = H.Map /* fake class for jQuery */ = H.mapChart = function (a,
2345
+ b,
2346
+ c) {
2347
+ var hasRenderToArg = typeof a === 'string' || a.nodeName,
2348
+ options = arguments[hasRenderToArg ? 1 : 0],
2349
+ userOptions = options,
2350
+ hiddenAxis = {
2351
+ endOnTick: false,
2352
+ visible: false,
2353
+ minPadding: 0,
2354
+ maxPadding: 0,
2355
+ startOnTick: false
2356
+ },
2357
+ seriesOptions,
2358
+ defaultCreditsOptions = getOptions().credits;
2359
+ /* For visual testing
2360
+ hiddenAxis.gridLineWidth = 1;
2361
+ hiddenAxis.gridZIndex = 10;
2362
+ hiddenAxis.tickPositions = undefined;
2363
+ // */
2364
+ // Don't merge the data
2365
+ seriesOptions = options.series;
2366
+ options.series = null;
2367
+ options = merge({
2368
+ chart: {
2369
+ panning: {
2370
+ enabled: true,
2371
+ type: 'xy'
2372
+ },
2373
+ type: 'map'
2374
+ },
2375
+ credits: {
2376
+ mapText: pick(defaultCreditsOptions.mapText, ' \u00a9 <a href="{geojson.copyrightUrl}">' +
2377
+ '{geojson.copyrightShort}</a>'),
2378
+ mapTextFull: pick(defaultCreditsOptions.mapTextFull, '{geojson.copyright}')
2379
+ },
2380
+ tooltip: {
2381
+ followTouchMove: false
2382
+ },
2383
+ xAxis: hiddenAxis,
2384
+ yAxis: merge(hiddenAxis, { reversed: true })
2385
+ }, options, // user's options
2386
+ {
2387
+ chart: {
2388
+ inverted: false,
2389
+ alignTicks: false
2390
+ }
2391
+ });
2392
+ options.series = userOptions.series = seriesOptions;
2393
+ return hasRenderToArg ?
2394
+ new Chart(a, options, c) :
2395
+ new Chart(options, b);
2396
+ };
2397
+ var mapModule = {
2398
+ mapChart: mapChart,
2399
+ maps: H.maps,
2400
+ splitPath: splitPath
2401
+ };
2402
+
2403
+ return mapModule;
2404
+ });
2405
+ _registerModule(_modules, 'Series/MapSeries.js', [_modules['Core/Series/Series.js'], _modules['Mixins/ColorMapSeries.js'], _modules['Core/Globals.js'], _modules['Mixins/LegendSymbol.js'], _modules['Maps/Map.js'], _modules['Core/Series/Point.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js']], function (BaseSeries, ColorMapMixin, H, LegendSymbolMixin, mapModule, Point, SVGRenderer, U) {
2406
+ /* *
2407
+ *
2408
+ * (c) 2010-2020 Torstein Honsi
2409
+ *
2410
+ * License: www.highcharts.com/license
2411
+ *
2412
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
2413
+ *
2414
+ * */
2415
+ var colorMapPointMixin = ColorMapMixin.colorMapPointMixin,
2416
+ colorMapSeriesMixin = ColorMapMixin.colorMapSeriesMixin;
2417
+ var noop = H.noop;
2418
+ var maps = mapModule.maps,
2419
+ splitPath = mapModule.splitPath;
2420
+ var extend = U.extend,
2421
+ fireEvent = U.fireEvent,
2422
+ getNestedProperty = U.getNestedProperty,
2423
+ isArray = U.isArray,
2424
+ isNumber = U.isNumber,
2425
+ merge = U.merge,
2426
+ objectEach = U.objectEach,
2427
+ pick = U.pick,
2428
+ splat = U.splat;
2429
+ var Series = H.Series,
2430
+ seriesTypes = BaseSeries.seriesTypes;
2431
+ /**
2432
+ * @private
2433
+ * @class
2434
+ * @name Highcharts.seriesTypes.map
2435
+ *
2436
+ * @augments Highcharts.Series
2437
+ */
2438
+ BaseSeries.seriesType('map', 'scatter',
2439
+ /**
2440
+ * The map series is used for basic choropleth maps, where each map area has
2441
+ * a color based on its value.
2442
+ *
2443
+ * @sample maps/demo/all-maps/
2444
+ * Choropleth map
2445
+ *
2446
+ * @extends plotOptions.scatter
2447
+ * @excluding marker, cluster
2448
+ * @product highmaps
2449
+ * @optionparent plotOptions.map
2450
+ */
2451
+ {
2452
+ animation: false,
2453
+ dataLabels: {
2454
+ crop: false,
2455
+ formatter: function () {
2456
+ return this.point.value;
2457
+ },
2458
+ inside: true,
2459
+ overflow: false,
2460
+ padding: 0,
2461
+ verticalAlign: 'middle'
2462
+ },
2463
+ /**
2464
+ * @ignore-option
2465
+ *
2466
+ * @private
2467
+ */
2468
+ marker: null,
2469
+ /**
2470
+ * The color to apply to null points.
2471
+ *
2472
+ * In styled mode, the null point fill is set in the
2473
+ * `.highcharts-null-point` class.
2474
+ *
2475
+ * @sample maps/demo/all-areas-as-null/
2476
+ * Null color
2477
+ *
2478
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
2479
+ *
2480
+ * @private
2481
+ */
2482
+ nullColor: '#f7f7f7',
2483
+ /**
2484
+ * Whether to allow pointer interaction like tooltips and mouse events
2485
+ * on null points.
2486
+ *
2487
+ * @type {boolean}
2488
+ * @since 4.2.7
2489
+ * @apioption plotOptions.map.nullInteraction
2490
+ *
2491
+ * @private
2492
+ */
2493
+ stickyTracking: false,
2494
+ tooltip: {
2495
+ followPointer: true,
2496
+ pointFormat: '{point.name}: {point.value}<br/>'
2497
+ },
2498
+ /**
2499
+ * @ignore-option
2500
+ *
2501
+ * @private
2502
+ */
2503
+ turboThreshold: 0,
2504
+ /**
2505
+ * Whether all areas of the map defined in `mapData` should be rendered.
2506
+ * If `true`, areas which don't correspond to a data point, are rendered
2507
+ * as `null` points. If `false`, those areas are skipped.
2508
+ *
2509
+ * @sample maps/plotoptions/series-allareas-false/
2510
+ * All areas set to false
2511
+ *
2512
+ * @type {boolean}
2513
+ * @default true
2514
+ * @product highmaps
2515
+ * @apioption plotOptions.series.allAreas
2516
+ *
2517
+ * @private
2518
+ */
2519
+ allAreas: true,
2520
+ /**
2521
+ * The border color of the map areas.
2522
+ *
2523
+ * In styled mode, the border stroke is given in the `.highcharts-point`
2524
+ * class.
2525
+ *
2526
+ * @sample {highmaps} maps/plotoptions/series-border/
2527
+ * Borders demo
2528
+ *
2529
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
2530
+ * @default #cccccc
2531
+ * @product highmaps
2532
+ * @apioption plotOptions.series.borderColor
2533
+ *
2534
+ * @private
2535
+ */
2536
+ borderColor: '#cccccc',
2537
+ /**
2538
+ * The border width of each map area.
2539
+ *
2540
+ * In styled mode, the border stroke width is given in the
2541
+ * `.highcharts-point` class.
2542
+ *
2543
+ * @sample maps/plotoptions/series-border/
2544
+ * Borders demo
2545
+ *
2546
+ * @type {number}
2547
+ * @default 1
2548
+ * @product highmaps
2549
+ * @apioption plotOptions.series.borderWidth
2550
+ *
2551
+ * @private
2552
+ */
2553
+ borderWidth: 1,
2554
+ /**
2555
+ * @type {string}
2556
+ * @default value
2557
+ * @apioption plotOptions.map.colorKey
2558
+ */
2559
+ /**
2560
+ * What property to join the `mapData` to the value data. For example,
2561
+ * if joinBy is "code", the mapData items with a specific code is merged
2562
+ * into the data with the same code. For maps loaded from GeoJSON, the
2563
+ * keys may be held in each point's `properties` object.
2564
+ *
2565
+ * The joinBy option can also be an array of two values, where the first
2566
+ * points to a key in the `mapData`, and the second points to another
2567
+ * key in the `data`.
2568
+ *
2569
+ * When joinBy is `null`, the map items are joined by their position in
2570
+ * the array, which performs much better in maps with many data points.
2571
+ * This is the recommended option if you are printing more than a
2572
+ * thousand data points and have a backend that can preprocess the data
2573
+ * into a parallel array of the mapData.
2574
+ *
2575
+ * @sample maps/plotoptions/series-border/
2576
+ * Joined by "code"
2577
+ * @sample maps/demo/geojson/
2578
+ * GeoJSON joined by an array
2579
+ * @sample maps/series/joinby-null/
2580
+ * Simple data joined by null
2581
+ *
2582
+ * @type {string|Array<string>}
2583
+ * @default hc-key
2584
+ * @product highmaps
2585
+ * @apioption plotOptions.series.joinBy
2586
+ */
2587
+ joinBy: 'hc-key',
2588
+ /**
2589
+ * Define the z index of the series.
2590
+ *
2591
+ * @type {number}
2592
+ * @product highmaps
2593
+ * @apioption plotOptions.series.zIndex
2594
+ */
2595
+ /**
2596
+ * @apioption plotOptions.series.states
2597
+ *
2598
+ * @private
2599
+ */
2600
+ states: {
2601
+ /**
2602
+ * @apioption plotOptions.series.states.hover
2603
+ */
2604
+ hover: {
2605
+ /** @ignore-option */
2606
+ halo: null,
2607
+ /**
2608
+ * The color of the shape in this state.
2609
+ *
2610
+ * @sample maps/plotoptions/series-states-hover/
2611
+ * Hover options
2612
+ *
2613
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
2614
+ * @product highmaps
2615
+ * @apioption plotOptions.series.states.hover.color
2616
+ */
2617
+ /**
2618
+ * The border color of the point in this state.
2619
+ *
2620
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
2621
+ * @product highmaps
2622
+ * @apioption plotOptions.series.states.hover.borderColor
2623
+ */
2624
+ /**
2625
+ * The border width of the point in this state
2626
+ *
2627
+ * @type {number}
2628
+ * @product highmaps
2629
+ * @apioption plotOptions.series.states.hover.borderWidth
2630
+ */
2631
+ /**
2632
+ * The relative brightness of the point when hovered, relative
2633
+ * to the normal point color.
2634
+ *
2635
+ * @type {number}
2636
+ * @product highmaps
2637
+ * @default 0.2
2638
+ * @apioption plotOptions.series.states.hover.brightness
2639
+ */
2640
+ brightness: 0.2
2641
+ },
2642
+ /**
2643
+ * @apioption plotOptions.series.states.normal
2644
+ */
2645
+ normal: {
2646
+ /**
2647
+ * @productdesc {highmaps}
2648
+ * The animation adds some latency in order to reduce the effect
2649
+ * of flickering when hovering in and out of for example an
2650
+ * uneven coastline.
2651
+ *
2652
+ * @sample {highmaps} maps/plotoptions/series-states-animation-false/
2653
+ * No animation of fill color
2654
+ *
2655
+ * @apioption plotOptions.series.states.normal.animation
2656
+ */
2657
+ animation: true
2658
+ },
2659
+ /**
2660
+ * @apioption plotOptions.series.states.select
2661
+ */
2662
+ select: {
2663
+ /**
2664
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
2665
+ * @default #cccccc
2666
+ * @product highmaps
2667
+ * @apioption plotOptions.series.states.select.color
2668
+ */
2669
+ color: '#cccccc'
2670
+ },
2671
+ inactive: {
2672
+ opacity: 1
2673
+ }
2674
+ }
2675
+ // Prototype members
2676
+ }, merge(colorMapSeriesMixin, {
2677
+ type: 'map',
2678
+ getExtremesFromAll: true,
2679
+ useMapGeometry: true,
2680
+ forceDL: true,
2681
+ searchPoint: noop,
2682
+ // When tooltip is not shared, this series (and derivatives) requires
2683
+ // direct touch/hover. KD-tree does not apply.
2684
+ directTouch: true,
2685
+ // X axis and Y axis must have same translation slope
2686
+ preserveAspectRatio: true,
2250
2687
  pointArrayMap: ['value'],
2251
2688
  // Extend setOptions by picking up the joinBy option and applying it
2252
2689
  // to a series property
@@ -2279,7 +2716,7 @@
2279
2716
  (paths || []).forEach(function (point) {
2280
2717
  if (point.path) {
2281
2718
  if (typeof point.path === 'string') {
2282
- point.path = H.splitPath(point.path);
2719
+ point.path = splitPath(point.path);
2283
2720
  // Legacy one-dimensional array
2284
2721
  }
2285
2722
  else if (point.path[0] === 'M') {
@@ -2440,7 +2877,7 @@
2440
2877
  // Collect mapData from chart options if not defined on series
2441
2878
  if (!mapData && globalMapData) {
2442
2879
  mapData = typeof globalMapData === 'string' ?
2443
- H.maps[globalMapData] :
2880
+ maps[globalMapData] :
2444
2881
  globalMapData;
2445
2882
  }
2446
2883
  // Pick up numeric values, add index
@@ -3120,7 +3557,7 @@
3120
3557
  ''; // adds doclets above to the transpiled file
3121
3558
 
3122
3559
  });
3123
- _registerModule(_modules, 'Series/MapLineSeries.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (H, U) {
3560
+ _registerModule(_modules, 'Series/MapLineSeries.js', [_modules['Core/Series/Series.js']], function (BaseSeries) {
3124
3561
  /* *
3125
3562
  *
3126
3563
  * (c) 2010-2020 Torstein Honsi
@@ -3130,8 +3567,7 @@
3130
3567
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
3131
3568
  *
3132
3569
  * */
3133
- var seriesType = U.seriesType;
3134
- var seriesTypes = H.seriesTypes;
3570
+ var seriesTypes = BaseSeries.seriesTypes;
3135
3571
  /**
3136
3572
  * @private
3137
3573
  * @class
@@ -3139,7 +3575,7 @@
3139
3575
  *
3140
3576
  * @augments Highcharts.Series
3141
3577
  */
3142
- seriesType('mapline', 'map',
3578
+ BaseSeries.seriesType('mapline', 'map',
3143
3579
  /**
3144
3580
  * A mapline series is a special case of the map series where the value
3145
3581
  * colors are applied to the strokes rather than the fills. It can also be
@@ -3248,7 +3684,7 @@
3248
3684
  ''; // adds doclets above to transpiled file
3249
3685
 
3250
3686
  });
3251
- _registerModule(_modules, 'Series/MapPointSeries.js', [_modules['Core/Globals.js']], function (H) {
3687
+ _registerModule(_modules, 'Series/MapPointSeries.js', [_modules['Core/Series/Series.js'], _modules['Core/Globals.js'], _modules['Core/Series/Point.js'], _modules['Core/Utilities.js']], function (BaseSeries, H, Point, U) {
3252
3688
  /* *
3253
3689
  *
3254
3690
  * (c) 2010-2020 Torstein Honsi
@@ -3258,10 +3694,8 @@
3258
3694
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
3259
3695
  *
3260
3696
  * */
3261
- var merge = H.merge,
3262
- Point = H.Point,
3263
- Series = H.Series,
3264
- seriesType = H.seriesType;
3697
+ var merge = U.merge;
3698
+ var Series = H.Series;
3265
3699
  /**
3266
3700
  * @private
3267
3701
  * @class
@@ -3269,7 +3703,7 @@
3269
3703
  *
3270
3704
  * @augments Highcharts.Series
3271
3705
  */
3272
- seriesType('mappoint', 'scatter',
3706
+ BaseSeries.seriesType('mappoint', 'scatter',
3273
3707
  /**
3274
3708
  * A mappoint series is a special form of scatter series where the points
3275
3709
  * can be laid out in map coordinates on top of a map.
@@ -3423,7 +3857,7 @@
3423
3857
  ''; // adds doclets above to transpiled file
3424
3858
 
3425
3859
  });
3426
- _registerModule(_modules, 'Series/Bubble/BubbleLegend.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Color.js'], _modules['Core/Globals.js'], _modules['Core/Legend.js'], _modules['Core/Utilities.js']], function (Chart, Color, H, Legend, U) {
3860
+ _registerModule(_modules, 'Series/Bubble/BubbleLegend.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Legend.js'], _modules['Core/Utilities.js']], function (Chart, Color, H, Legend, U) {
3427
3861
  /* *
3428
3862
  *
3429
3863
  * (c) 2010-2020 Highsoft AS
@@ -3484,7 +3918,7 @@
3484
3918
  * individual range.
3485
3919
  *
3486
3920
  * @sample highcharts/bubble-legend/similartoseries/
3487
- * Similat look to the bubble series
3921
+ * Similar look to the bubble series
3488
3922
  * @sample highcharts/bubble-legend/bordercolor/
3489
3923
  * Individual bubble border color
3490
3924
  *
@@ -3512,7 +3946,7 @@
3512
3946
  * individual color is not defined.
3513
3947
  *
3514
3948
  * @sample highcharts/bubble-legend/similartoseries/
3515
- * Similat look to the bubble series
3949
+ * Similar look to the bubble series
3516
3950
  * @sample highcharts/bubble-legend/color/
3517
3951
  * Individual bubble color
3518
3952
  *
@@ -4439,7 +4873,7 @@
4439
4873
 
4440
4874
  return H.BubbleLegend;
4441
4875
  });
4442
- _registerModule(_modules, 'Series/Bubble/BubbleSeries.js', [_modules['Core/Globals.js'], _modules['Core/Color.js'], _modules['Core/Series/Point.js'], _modules['Core/Utilities.js']], function (H, Color, Point, U) {
4876
+ _registerModule(_modules, 'Series/Bubble/BubbleSeries.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Series/Series.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Series/Point.js'], _modules['Core/Utilities.js']], function (Axis, BaseSeries, Color, H, Point, U) {
4443
4877
  /* *
4444
4878
  *
4445
4879
  * (c) 2010-2020 Torstein Honsi
@@ -4449,22 +4883,21 @@
4449
4883
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
4450
4884
  *
4451
4885
  * */
4452
- /**
4453
- * @typedef {"area"|"width"} Highcharts.BubbleSizeByValue
4454
- */
4455
4886
  var color = Color.parse;
4887
+ var noop = H.noop;
4456
4888
  var arrayMax = U.arrayMax,
4457
4889
  arrayMin = U.arrayMin,
4458
4890
  clamp = U.clamp,
4459
4891
  extend = U.extend,
4460
4892
  isNumber = U.isNumber,
4461
4893
  pick = U.pick,
4462
- pInt = U.pInt,
4463
- seriesType = U.seriesType;
4464
- var Axis = H.Axis,
4465
- noop = H.noop,
4466
- Series = H.Series,
4467
- seriesTypes = H.seriesTypes;
4894
+ pInt = U.pInt;
4895
+ var Series = H.Series,
4896
+ seriesTypes = BaseSeries.seriesTypes;
4897
+ /**
4898
+ * @typedef {"area"|"width"} Highcharts.BubbleSizeByValue
4899
+ */
4900
+ ''; // detach doclets above
4468
4901
  /**
4469
4902
  * A bubble series is a three dimensional series type where each point renders
4470
4903
  * an X, Y and Z value. Each points is drawn as a bubble where the position
@@ -4480,7 +4913,7 @@
4480
4913
  * @requires highcharts-more
4481
4914
  * @optionparent plotOptions.bubble
4482
4915
  */
4483
- seriesType('bubble', 'scatter', {
4916
+ BaseSeries.seriesType('bubble', 'scatter', {
4484
4917
  dataLabels: {
4485
4918
  formatter: function () {
4486
4919
  return this.point.z;
@@ -5044,7 +5477,7 @@
5044
5477
  ''; // adds doclets above to transpiled file
5045
5478
 
5046
5479
  });
5047
- _registerModule(_modules, 'Series/MapBubbleSeries.js', [_modules['Core/Globals.js'], _modules['Core/Series/Point.js'], _modules['Core/Utilities.js']], function (H, Point, U) {
5480
+ _registerModule(_modules, 'Series/MapBubbleSeries.js', [_modules['Core/Series/Series.js'], _modules['Core/Series/Point.js'], _modules['Core/Utilities.js']], function (BaseSeries, Point, U) {
5048
5481
  /* *
5049
5482
  *
5050
5483
  * (c) 2010-2020 Torstein Honsi
@@ -5054,9 +5487,8 @@
5054
5487
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
5055
5488
  *
5056
5489
  * */
5057
- var merge = U.merge,
5058
- seriesType = U.seriesType;
5059
- var seriesTypes = H.seriesTypes;
5490
+ var merge = U.merge;
5491
+ var seriesTypes = BaseSeries.seriesTypes;
5060
5492
  // The mapbubble series type
5061
5493
  if (seriesTypes.bubble) {
5062
5494
  /**
@@ -5066,7 +5498,7 @@
5066
5498
  *
5067
5499
  * @augments Highcharts.Series
5068
5500
  */
5069
- seriesType('mapbubble', 'bubble'
5501
+ BaseSeries.seriesType('mapbubble', 'bubble'
5070
5502
  /**
5071
5503
  * A map bubble series is a bubble series laid out on top of a map
5072
5504
  * series, where each bubble is tied to a specific map area.
@@ -5286,7 +5718,7 @@
5286
5718
  ''; // adds doclets above to transpiled file
5287
5719
 
5288
5720
  });
5289
- _registerModule(_modules, 'Series/HeatmapSeries.js', [_modules['Core/Globals.js'], _modules['Mixins/LegendSymbol.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js']], function (H, LegendSymbolMixin, SVGRenderer, U) {
5721
+ _registerModule(_modules, 'Series/HeatmapSeries.js', [_modules['Core/Series/Series.js'], _modules['Mixins/ColorMapSeries.js'], _modules['Core/Globals.js'], _modules['Mixins/LegendSymbol.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js']], function (BaseSeries, ColorMapMixin, H, LegendSymbolMixin, SVGRenderer, U) {
5290
5722
  /* *
5291
5723
  *
5292
5724
  * (c) 2010-2020 Torstein Honsi
@@ -5296,13 +5728,18 @@
5296
5728
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
5297
5729
  *
5298
5730
  * */
5731
+ var colorMapPointMixin = ColorMapMixin.colorMapPointMixin,
5732
+ colorMapSeriesMixin = ColorMapMixin.colorMapSeriesMixin;
5733
+ var noop = H.noop;
5299
5734
  var clamp = U.clamp,
5300
5735
  extend = U.extend,
5301
5736
  fireEvent = U.fireEvent,
5302
5737
  isNumber = U.isNumber,
5303
5738
  merge = U.merge,
5304
- pick = U.pick,
5305
- seriesType = U.seriesType;
5739
+ pick = U.pick;
5740
+ var Series = H.Series,
5741
+ seriesTypes = BaseSeries.seriesTypes,
5742
+ symbols = SVGRenderer.prototype.symbols;
5306
5743
  /* *
5307
5744
  * @interface Highcharts.PointOptionsObject in parts/Point.ts
5308
5745
  */ /**
@@ -5316,12 +5753,6 @@
5316
5753
  * @type {number|null|undefined}
5317
5754
  */
5318
5755
  ''; // detach doclets above
5319
- var colorMapPointMixin = H.colorMapPointMixin,
5320
- colorMapSeriesMixin = H.colorMapSeriesMixin,
5321
- noop = H.noop,
5322
- Series = H.Series,
5323
- seriesTypes = H.seriesTypes,
5324
- symbols = SVGRenderer.prototype.symbols;
5325
5756
  /**
5326
5757
  * @private
5327
5758
  * @class
@@ -5329,7 +5760,7 @@
5329
5760
  *
5330
5761
  * @augments Highcharts.Series
5331
5762
  */
5332
- seriesType('heatmap', 'scatter',
5763
+ BaseSeries.seriesType('heatmap', 'scatter',
5333
5764
  /**
5334
5765
  * A heatmap is a graphical representation of data where the individual
5335
5766
  * values contained in a matrix are represented as colors.
@@ -6047,752 +6478,267 @@
6047
6478
  * @apioption series.heatmap.data
6048
6479
  */
6049
6480
  /**
6050
- * The color of the point. In heat maps the point color is rarely set
6051
- * explicitly, as we use the color to denote the `value`. Options for
6052
- * this are set in the [colorAxis](#colorAxis) configuration.
6053
- *
6054
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
6055
- * @product highcharts highmaps
6056
- * @apioption series.heatmap.data.color
6057
- */
6058
- /**
6059
- * The value of the point, resulting in a color controled by options
6060
- * as set in the [colorAxis](#colorAxis) configuration.
6061
- *
6062
- * @type {number}
6063
- * @product highcharts highmaps
6064
- * @apioption series.heatmap.data.value
6065
- */
6066
- /**
6067
- * The x value of the point. For datetime axes,
6068
- * the X value is the timestamp in milliseconds since 1970.
6069
- *
6070
- * @type {number}
6071
- * @product highcharts highmaps
6072
- * @apioption series.heatmap.data.x
6073
- */
6074
- /**
6075
- * The y value of the point.
6076
- *
6077
- * @type {number}
6078
- * @product highcharts highmaps
6079
- * @apioption series.heatmap.data.y
6080
- */
6081
- /**
6082
- * Point padding for a single point.
6083
- *
6084
- * @sample maps/plotoptions/tilemap-pointpadding
6085
- * Point padding on tiles
6086
- *
6087
- * @type {number}
6088
- * @product highcharts highmaps
6089
- * @apioption series.heatmap.data.pointPadding
6090
- */
6091
- /**
6092
- * @excluding radius, enabledThreshold
6093
- * @product highcharts highmaps
6094
- * @since 8.1
6095
- * @apioption series.heatmap.data.marker
6096
- */
6097
- /**
6098
- * @excluding radius, enabledThreshold
6099
- * @product highcharts highmaps
6100
- * @since 8.1
6101
- * @apioption series.heatmap.marker
6102
- */
6103
- /**
6104
- * @excluding radius, radiusPlus
6105
- * @product highcharts highmaps
6106
- * @apioption series.heatmap.marker.states.hover
6107
- */
6108
- /**
6109
- * @excluding radius
6110
- * @product highcharts highmaps
6111
- * @apioption series.heatmap.marker.states.select
6112
- */
6113
- /**
6114
- * @excluding radius, radiusPlus
6115
- * @product highcharts highmaps
6116
- * @apioption series.heatmap.data.marker.states.hover
6117
- */
6118
- /**
6119
- * @excluding radius
6120
- * @product highcharts highmaps
6121
- * @apioption series.heatmap.data.marker.states.select
6122
- */
6123
- /**
6124
- * Set the marker's fixed width on hover state.
6125
- *
6126
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-linewidthplus
6127
- * 5 pixels wider lineWidth on hover
6128
- *
6129
- * @type {number|undefined}
6130
- * @default 0
6131
- * @product highcharts highmaps
6132
- * @apioption series.heatmap.marker.states.hover.lineWidthPlus
6133
- */
6134
- /**
6135
- * Set the marker's fixed width on hover state.
6136
- *
6137
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
6138
- * 70px fixed marker's width and height on hover
6139
- *
6140
- * @type {number|undefined}
6141
- * @default undefined
6142
- * @product highcharts highmaps
6143
- * @apioption series.heatmap.marker.states.hover.width
6144
- */
6145
- /**
6146
- * Set the marker's fixed height on hover state.
6147
- *
6148
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
6149
- * 70px fixed marker's width and height on hover
6150
- *
6151
- * @type {number|undefined}
6152
- * @default undefined
6153
- * @product highcharts highmaps
6154
- * @apioption series.heatmap.marker.states.hover.height
6155
- */
6156
- /**
6157
- * The number of pixels to increase the width of the
6158
- * hovered point.
6159
- *
6160
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6161
- * One day
6162
- *
6163
- * @type {number|undefined}
6164
- * @default undefined
6165
- * @product highcharts highmaps
6166
- * @apioption series.heatmap.marker.states.hover.widthPlus
6167
- */
6168
- /**
6169
- * The number of pixels to increase the height of the
6170
- * hovered point.
6171
- *
6172
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6173
- * One day
6174
- *
6175
- * @type {number|undefined}
6176
- * @default undefined
6177
- * @product highcharts highmaps
6178
- * @apioption series.heatmap.marker.states.hover.heightPlus
6179
- */
6180
- /**
6181
- * The number of pixels to increase the width of the
6182
- * hovered point.
6183
- *
6184
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6185
- * One day
6186
- *
6187
- * @type {number|undefined}
6188
- * @default undefined
6189
- * @product highcharts highmaps
6190
- * @apioption series.heatmap.marker.states.select.widthPlus
6191
- */
6192
- /**
6193
- * The number of pixels to increase the height of the
6194
- * hovered point.
6195
- *
6196
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6197
- * One day
6481
+ * The color of the point. In heat maps the point color is rarely set
6482
+ * explicitly, as we use the color to denote the `value`. Options for
6483
+ * this are set in the [colorAxis](#colorAxis) configuration.
6198
6484
  *
6199
- * @type {number|undefined}
6200
- * @default undefined
6485
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
6201
6486
  * @product highcharts highmaps
6202
- * @apioption series.heatmap.marker.states.select.heightPlus
6487
+ * @apioption series.heatmap.data.color
6203
6488
  */
6204
6489
  /**
6205
- * Set the marker's fixed width on hover state.
6206
- *
6207
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-linewidthplus
6208
- * 5 pixels wider lineWidth on hover
6209
- *
6210
- * @type {number|undefined}
6211
- * @default 0
6212
- * @product highcharts highmaps
6213
- * @apioption series.heatmap.data.marker.states.hover.lineWidthPlus
6214
- */
6215
- /**
6216
- * Set the marker's fixed width on hover state.
6217
- *
6218
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
6219
- * 70px fixed marker's width and height on hover
6490
+ * The value of the point, resulting in a color controled by options
6491
+ * as set in the [colorAxis](#colorAxis) configuration.
6220
6492
  *
6221
- * @type {number|undefined}
6222
- * @default undefined
6493
+ * @type {number}
6223
6494
  * @product highcharts highmaps
6224
- * @apioption series.heatmap.data.marker.states.hover.width
6495
+ * @apioption series.heatmap.data.value
6225
6496
  */
6226
6497
  /**
6227
- * Set the marker's fixed height on hover state.
6228
- *
6229
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
6230
- * 70px fixed marker's width and height on hover
6498
+ * The x value of the point. For datetime axes,
6499
+ * the X value is the timestamp in milliseconds since 1970.
6231
6500
  *
6232
- * @type {number|undefined}
6233
- * @default undefined
6501
+ * @type {number}
6234
6502
  * @product highcharts highmaps
6235
- * @apioption series.heatmap.data.marker.states.hover.height
6503
+ * @apioption series.heatmap.data.x
6236
6504
  */
6237
6505
  /**
6238
- * The number of pixels to increase the width of the
6239
- * hovered point.
6240
- *
6241
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6242
- * One day
6506
+ * The y value of the point.
6243
6507
  *
6244
- * @type {number|undefined}
6245
- * @default undefined
6246
- * @product highcharts highstock
6247
- * @apioption series.heatmap.data.marker.states.hover.widthPlus
6508
+ * @type {number}
6509
+ * @product highcharts highmaps
6510
+ * @apioption series.heatmap.data.y
6248
6511
  */
6249
6512
  /**
6250
- * The number of pixels to increase the height of the
6251
- * hovered point.
6513
+ * Point padding for a single point.
6252
6514
  *
6253
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6254
- * One day
6515
+ * @sample maps/plotoptions/tilemap-pointpadding
6516
+ * Point padding on tiles
6255
6517
  *
6256
- * @type {number|undefined}
6257
- * @default undefined
6258
- * @product highcharts highstock
6259
- * @apioption series.heatmap.data.marker.states.hover.heightPlus
6518
+ * @type {number}
6519
+ * @product highcharts highmaps
6520
+ * @apioption series.heatmap.data.pointPadding
6260
6521
  */
6261
6522
  /**
6262
- * Set the marker's fixed width on select state.
6263
- *
6264
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
6265
- * 70px fixed marker's width and height on hover
6266
- *
6267
- * @type {number|undefined}
6268
- * @default undefined
6269
- * @product highcharts highmaps
6270
- * @apioption series.heatmap.data.marker.states.select.width
6271
- */
6523
+ * @excluding radius, enabledThreshold
6524
+ * @product highcharts highmaps
6525
+ * @since 8.1
6526
+ * @apioption series.heatmap.data.marker
6527
+ */
6272
6528
  /**
6273
- * Set the marker's fixed height on select state.
6274
- *
6275
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
6276
- * 70px fixed marker's width and height on hover
6277
- *
6278
- * @type {number|undefined}
6279
- * @default undefined
6529
+ * @excluding radius, enabledThreshold
6280
6530
  * @product highcharts highmaps
6281
- * @apioption series.heatmap.data.marker.states.select.height
6531
+ * @since 8.1
6532
+ * @apioption series.heatmap.marker
6282
6533
  */
6283
6534
  /**
6284
- * The number of pixels to increase the width of the
6285
- * hovered point.
6286
- *
6287
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6288
- * One day
6289
- *
6290
- * @type {number|undefined}
6291
- * @default undefined
6292
- * @product highcharts highstock
6293
- * @apioption series.heatmap.data.marker.states.select.widthPlus
6535
+ * @excluding radius, radiusPlus
6536
+ * @product highcharts highmaps
6537
+ * @apioption series.heatmap.marker.states.hover
6294
6538
  */
6295
6539
  /**
6296
- * The number of pixels to increase the height of the
6297
- * hovered point.
6298
- *
6299
- * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6300
- * One day
6301
- *
6302
- * @type {number|undefined}
6303
- * @default undefined
6304
- * @product highcharts highstock
6305
- * @apioption series.heatmap.data.marker.states.select.heightPlus
6540
+ * @excluding radius
6541
+ * @product highcharts highmaps
6542
+ * @apioption series.heatmap.marker.states.select
6306
6543
  */
6307
- ''; // adds doclets above to transpiled file
6308
-
6309
- });
6310
- _registerModule(_modules, 'Extensions/GeoJSON.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (Chart, H, U) {
6311
- /* *
6312
- *
6313
- * (c) 2010-2020 Torstein Honsi
6314
- *
6315
- * License: www.highcharts.com/license
6316
- *
6317
- * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
6318
- *
6319
- * */
6320
- var win = H.win;
6321
- var error = U.error,
6322
- extend = U.extend,
6323
- format = U.format,
6324
- merge = U.merge,
6325
- wrap = U.wrap;
6326
6544
  /**
6327
- * Represents the loose structure of a geographic JSON file.
6328
- *
6329
- * @interface Highcharts.GeoJSON
6330
- */ /**
6331
- * Full copyright note of the geographic data.
6332
- * @name Highcharts.GeoJSON#copyright
6333
- * @type {string|undefined}
6334
- */ /**
6335
- * Short copyright note of the geographic data suitable for watermarks.
6336
- * @name Highcharts.GeoJSON#copyrightShort
6337
- * @type {string|undefined}
6338
- */ /**
6339
- * Additional meta information based on the coordinate reference system.
6340
- * @name Highcharts.GeoJSON#crs
6341
- * @type {Highcharts.Dictionary<any>|undefined}
6342
- */ /**
6343
- * Data sets of geographic features.
6344
- * @name Highcharts.GeoJSON#features
6345
- * @type {Array<Highcharts.GeoJSONFeature>}
6346
- */ /**
6347
- * Map projections and transformations to be used when calculating between
6348
- * lat/lon and chart values. Required for lat/lon support on maps. Allows
6349
- * resizing, rotating, and moving portions of a map within its projected
6350
- * coordinate system while still retaining lat/lon support. If using lat/lon
6351
- * on a portion of the map that does not match a `hitZone`, the definition with
6352
- * the key `default` is used.
6353
- * @name Highcharts.GeoJSON#hc-transform
6354
- * @type {Highcharts.Dictionary<Highcharts.GeoJSONTranslation>|undefined}
6355
- */ /**
6356
- * Title of the geographic data.
6357
- * @name Highcharts.GeoJSON#title
6358
- * @type {string|undefined}
6359
- */ /**
6360
- * Type of the geographic data. Type of an optimized map collection is
6361
- * `FeatureCollection`.
6362
- * @name Highcharts.GeoJSON#type
6363
- * @type {string|undefined}
6364
- */ /**
6365
- * Version of the geographic data.
6366
- * @name Highcharts.GeoJSON#version
6367
- * @type {string|undefined}
6368
- */
6545
+ * @excluding radius, radiusPlus
6546
+ * @product highcharts highmaps
6547
+ * @apioption series.heatmap.data.marker.states.hover
6548
+ */
6369
6549
  /**
6370
- * Data set of a geographic feature.
6371
- * @interface Highcharts.GeoJSONFeature
6372
- * @extends Highcharts.Dictionary<*>
6373
- */ /**
6374
- * Data type of the geographic feature.
6375
- * @name Highcharts.GeoJSONFeature#type
6376
- * @type {string}
6377
- */
6550
+ * @excluding radius
6551
+ * @product highcharts highmaps
6552
+ * @apioption series.heatmap.data.marker.states.select
6553
+ */
6378
6554
  /**
6379
- * Describes the map projection and transformations applied to a portion of
6380
- * a map.
6381
- * @interface Highcharts.GeoJSONTranslation
6382
- */ /**
6383
- * The coordinate reference system used to generate this portion of the map.
6384
- * @name Highcharts.GeoJSONTranslation#crs
6385
- * @type {string}
6386
- */ /**
6387
- * Define the portion of the map that this defintion applies to. Defined as a
6388
- * GeoJSON polygon feature object, with `type` and `coordinates` properties.
6389
- * @name Highcharts.GeoJSONTranslation#hitZone
6390
- * @type {Highcharts.Dictionary<*>|undefined}
6391
- */ /**
6392
- * Property for internal use for maps generated by Highsoft.
6393
- * @name Highcharts.GeoJSONTranslation#jsonmarginX
6394
- * @type {number|undefined}
6395
- */ /**
6396
- * Property for internal use for maps generated by Highsoft.
6397
- * @name Highcharts.GeoJSONTranslation#jsonmarginY
6398
- * @type {number|undefined}
6399
- */ /**
6400
- * Property for internal use for maps generated by Highsoft.
6401
- * @name Highcharts.GeoJSONTranslation#jsonres
6402
- * @type {number|undefined}
6403
- */ /**
6404
- * Specifies clockwise rotation of the coordinates after the projection, but
6405
- * before scaling and panning. Defined in radians, relative to the coordinate
6406
- * system origin.
6407
- * @name Highcharts.GeoJSONTranslation#rotation
6408
- * @type {number|undefined}
6409
- */ /**
6410
- * The scaling factor applied to the projected coordinates.
6411
- * @name Highcharts.GeoJSONTranslation#scale
6412
- * @type {number|undefined}
6413
- */ /**
6414
- * Property for internal use for maps generated by Highsoft.
6415
- * @name Highcharts.GeoJSONTranslation#xoffset
6416
- * @type {number|undefined}
6417
- */ /**
6418
- * X offset of projected coordinates after scaling.
6419
- * @name Highcharts.GeoJSONTranslation#xpan
6420
- * @type {number|undefined}
6421
- */ /**
6422
- * Property for internal use for maps generated by Highsoft.
6423
- * @name Highcharts.GeoJSONTranslation#yoffset
6424
- * @type {number|undefined}
6425
- */ /**
6426
- * Y offset of projected coordinates after scaling.
6427
- * @name Highcharts.GeoJSONTranslation#ypan
6428
- * @type {number|undefined}
6555
+ * Set the marker's fixed width on hover state.
6556
+ *
6557
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-linewidthplus
6558
+ * 5 pixels wider lineWidth on hover
6559
+ *
6560
+ * @type {number|undefined}
6561
+ * @default 0
6562
+ * @product highcharts highmaps
6563
+ * @apioption series.heatmap.marker.states.hover.lineWidthPlus
6429
6564
  */
6430
6565
  /**
6431
- * Result object of a map transformation.
6432
- *
6433
- * @interface Highcharts.MapCoordinateObject
6434
- */ /**
6435
- * X coordinate on the map.
6436
- * @name Highcharts.MapCoordinateObject#x
6437
- * @type {number}
6438
- */ /**
6439
- * Y coordinate on the map.
6440
- * @name Highcharts.MapCoordinateObject#y
6441
- * @type {number|null}
6566
+ * Set the marker's fixed width on hover state.
6567
+ *
6568
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
6569
+ * 70px fixed marker's width and height on hover
6570
+ *
6571
+ * @type {number|undefined}
6572
+ * @default undefined
6573
+ * @product highcharts highmaps
6574
+ * @apioption series.heatmap.marker.states.hover.width
6442
6575
  */
6443
6576
  /**
6444
- * A latitude/longitude object.
6577
+ * Set the marker's fixed height on hover state.
6445
6578
  *
6446
- * @interface Highcharts.MapLatLonObject
6447
- */ /**
6448
- * The latitude.
6449
- * @name Highcharts.MapLatLonObject#lat
6450
- * @type {number}
6451
- */ /**
6452
- * The longitude.
6453
- * @name Highcharts.MapLatLonObject#lon
6454
- * @type {number}
6455
- */
6456
- ''; // detach doclets above
6457
- /* eslint-disable no-invalid-this, valid-jsdoc */
6458
- /**
6459
- * Test for point in polygon. Polygon defined as array of [x,y] points.
6460
- * @private
6579
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
6580
+ * 70px fixed marker's width and height on hover
6581
+ *
6582
+ * @type {number|undefined}
6583
+ * @default undefined
6584
+ * @product highcharts highmaps
6585
+ * @apioption series.heatmap.marker.states.hover.height
6461
6586
  */
6462
- function pointInPolygon(point, polygon) {
6463
- var i,
6464
- j,
6465
- rel1,
6466
- rel2,
6467
- c = false,
6468
- x = point.x,
6469
- y = point.y;
6470
- for (i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
6471
- rel1 = polygon[i][1] > y;
6472
- rel2 = polygon[j][1] > y;
6473
- if (rel1 !== rel2 &&
6474
- (x < (polygon[j][0] -
6475
- polygon[i][0]) * (y - polygon[i][1]) /
6476
- (polygon[j][1] - polygon[i][1]) +
6477
- polygon[i][0])) {
6478
- c = !c;
6479
- }
6480
- }
6481
- return c;
6482
- }
6483
6587
  /**
6484
- * Highmaps only. Get point from latitude and longitude using specified
6485
- * transform definition.
6486
- *
6487
- * @requires modules/map
6488
- *
6489
- * @sample maps/series/latlon-transform/
6490
- * Use specific transformation for lat/lon
6491
- *
6492
- * @function Highcharts.Chart#transformFromLatLon
6493
- *
6494
- * @param {Highcharts.MapLatLonObject} latLon
6495
- * A latitude/longitude object.
6588
+ * The number of pixels to increase the width of the
6589
+ * hovered point.
6590
+ *
6591
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6592
+ * One day
6593
+ *
6594
+ * @type {number|undefined}
6595
+ * @default undefined
6596
+ * @product highcharts highmaps
6597
+ * @apioption series.heatmap.marker.states.hover.widthPlus
6598
+ */
6599
+ /**
6600
+ * The number of pixels to increase the height of the
6601
+ * hovered point.
6496
6602
  *
6497
- * @param {*} transform
6498
- * The transform definition to use as explained in the
6499
- * {@link https://www.highcharts.com/docs/maps/latlon|documentation}.
6603
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6604
+ * One day
6500
6605
  *
6501
- * @return {Highcharts.MapCoordinateObject}
6502
- * An object with `x` and `y` properties.
6606
+ * @type {number|undefined}
6607
+ * @default undefined
6608
+ * @product highcharts highmaps
6609
+ * @apioption series.heatmap.marker.states.hover.heightPlus
6503
6610
  */
6504
- Chart.prototype.transformFromLatLon = function (latLon, transform) {
6505
- /**
6506
- * Allows to manually load the proj4 library from Highcharts options
6507
- * instead of the `window`.
6508
- * In case of loading the library from a `script` tag,
6509
- * this option is not needed, it will be loaded from there by default.
6510
- *
6511
- * @type {function}
6512
- * @product highmaps
6513
- * @apioption chart.proj4
6514
- */
6515
- var _a;
6516
- var proj4 = (((_a = this.userOptions.chart) === null || _a === void 0 ? void 0 : _a.proj4) || win.proj4);
6517
- if (!proj4) {
6518
- error(21, false, this);
6519
- return {
6520
- x: 0,
6521
- y: null
6522
- };
6523
- }
6524
- var projected = proj4(transform.crs,
6525
- [latLon.lon,
6526
- latLon.lat]),
6527
- cosAngle = transform.cosAngle ||
6528
- (transform.rotation && Math.cos(transform.rotation)),
6529
- sinAngle = transform.sinAngle ||
6530
- (transform.rotation && Math.sin(transform.rotation)),
6531
- rotated = transform.rotation ? [
6532
- projected[0] * cosAngle + projected[1] * sinAngle,
6533
- -projected[0] * sinAngle + projected[1] * cosAngle
6534
- ] : projected;
6535
- return {
6536
- x: ((rotated[0] - (transform.xoffset || 0)) * (transform.scale || 1) +
6537
- (transform.xpan || 0)) * (transform.jsonres || 1) +
6538
- (transform.jsonmarginX || 0),
6539
- y: (((transform.yoffset || 0) - rotated[1]) * (transform.scale || 1) +
6540
- (transform.ypan || 0)) * (transform.jsonres || 1) -
6541
- (transform.jsonmarginY || 0)
6542
- };
6543
- };
6544
6611
  /**
6545
- * Highmaps only. Get latLon from point using specified transform definition.
6546
- * The method returns an object with the numeric properties `lat` and `lon`.
6547
- *
6548
- * @requires modules/map
6549
- *
6550
- * @sample maps/series/latlon-transform/
6551
- * Use specific transformation for lat/lon
6552
- *
6553
- * @function Highcharts.Chart#transformToLatLon
6554
- *
6555
- * @param {Highcharts.Point|Highcharts.MapCoordinateObject} point
6556
- * A `Point` instance, or any object containing the properties `x` and
6557
- * `y` with numeric values.
6612
+ * The number of pixels to increase the width of the
6613
+ * hovered point.
6558
6614
  *
6559
- * @param {*} transform
6560
- * The transform definition to use as explained in the
6561
- * {@link https://www.highcharts.com/docs/maps/latlon|documentation}.
6615
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6616
+ * One day
6562
6617
  *
6563
- * @return {Highcharts.MapLatLonObject|undefined}
6564
- * An object with `lat` and `lon` properties.
6618
+ * @type {number|undefined}
6619
+ * @default undefined
6620
+ * @product highcharts highmaps
6621
+ * @apioption series.heatmap.marker.states.select.widthPlus
6565
6622
  */
6566
- Chart.prototype.transformToLatLon = function (point, transform) {
6567
- if (typeof win.proj4 === 'undefined') {
6568
- error(21, false, this);
6569
- return;
6570
- }
6571
- var normalized = {
6572
- x: ((point.x -
6573
- (transform.jsonmarginX || 0)) / (transform.jsonres || 1) -
6574
- (transform.xpan || 0)) / (transform.scale || 1) +
6575
- (transform.xoffset || 0),
6576
- y: ((-point.y - (transform.jsonmarginY || 0)) / (transform.jsonres || 1) +
6577
- (transform.ypan || 0)) / (transform.scale || 1) +
6578
- (transform.yoffset || 0)
6579
- },
6580
- cosAngle = transform.cosAngle ||
6581
- (transform.rotation && Math.cos(transform.rotation)),
6582
- sinAngle = transform.sinAngle ||
6583
- (transform.rotation && Math.sin(transform.rotation)),
6584
- // Note: Inverted sinAngle to reverse rotation direction
6585
- projected = win.proj4(transform.crs, 'WGS84',
6586
- transform.rotation ? {
6587
- x: normalized.x * cosAngle + normalized.y * -sinAngle,
6588
- y: normalized.x * sinAngle + normalized.y * cosAngle
6589
- } : normalized);
6590
- return { lat: projected.y, lon: projected.x };
6591
- };
6592
6623
  /**
6593
- * Highmaps only. Calculate latitude/longitude values for a point. Returns an
6594
- * object with the numeric properties `lat` and `lon`.
6595
- *
6596
- * @requires modules/map
6624
+ * The number of pixels to increase the height of the
6625
+ * hovered point.
6597
6626
  *
6598
- * @sample maps/demo/latlon-advanced/
6599
- * Advanced lat/lon demo
6627
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6628
+ * One day
6600
6629
  *
6601
- * @function Highcharts.Chart#fromPointToLatLon
6630
+ * @type {number|undefined}
6631
+ * @default undefined
6632
+ * @product highcharts highmaps
6633
+ * @apioption series.heatmap.marker.states.select.heightPlus
6634
+ */
6635
+ /**
6636
+ * Set the marker's fixed width on hover state.
6637
+ *
6638
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-linewidthplus
6639
+ * 5 pixels wider lineWidth on hover
6640
+ *
6641
+ * @type {number|undefined}
6642
+ * @default 0
6643
+ * @product highcharts highmaps
6644
+ * @apioption series.heatmap.data.marker.states.hover.lineWidthPlus
6645
+ */
6646
+ /**
6647
+ * Set the marker's fixed width on hover state.
6602
6648
  *
6603
- * @param {Highcharts.Point|Highcharts.MapCoordinateObject} point
6604
- * A `Point` instance or anything containing `x` and `y` properties with
6605
- * numeric values.
6649
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
6650
+ * 70px fixed marker's width and height on hover
6606
6651
  *
6607
- * @return {Highcharts.MapLatLonObject|undefined}
6608
- * An object with `lat` and `lon` properties.
6652
+ * @type {number|undefined}
6653
+ * @default undefined
6654
+ * @product highcharts highmaps
6655
+ * @apioption series.heatmap.data.marker.states.hover.width
6609
6656
  */
6610
- Chart.prototype.fromPointToLatLon = function (point) {
6611
- var transforms = this.mapTransforms,
6612
- transform;
6613
- if (!transforms) {
6614
- error(22, false, this);
6615
- return;
6616
- }
6617
- for (transform in transforms) {
6618
- if (Object.hasOwnProperty.call(transforms, transform) &&
6619
- transforms[transform].hitZone &&
6620
- pointInPolygon({ x: point.x, y: -point.y }, transforms[transform].hitZone.coordinates[0])) {
6621
- return this.transformToLatLon(point, transforms[transform]);
6622
- }
6623
- }
6624
- return this.transformToLatLon(point, transforms['default'] // eslint-disable-line dot-notation
6625
- );
6626
- };
6627
6657
  /**
6628
- * Highmaps only. Get chart coordinates from latitude/longitude. Returns an
6629
- * object with x and y values corresponding to the `xAxis` and `yAxis`.
6658
+ * Set the marker's fixed height on hover state.
6630
6659
  *
6631
- * @requires modules/map
6660
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
6661
+ * 70px fixed marker's width and height on hover
6632
6662
  *
6633
- * @sample maps/series/latlon-to-point/
6634
- * Find a point from lat/lon
6663
+ * @type {number|undefined}
6664
+ * @default undefined
6665
+ * @product highcharts highmaps
6666
+ * @apioption series.heatmap.data.marker.states.hover.height
6667
+ */
6668
+ /**
6669
+ * The number of pixels to increase the width of the
6670
+ * hovered point.
6635
6671
  *
6636
- * @function Highcharts.Chart#fromLatLonToPoint
6672
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6673
+ * One day
6637
6674
  *
6638
- * @param {Highcharts.MapLatLonObject} latLon
6639
- * Coordinates.
6675
+ * @type {number|undefined}
6676
+ * @default undefined
6677
+ * @product highcharts highstock
6678
+ * @apioption series.heatmap.data.marker.states.hover.widthPlus
6679
+ */
6680
+ /**
6681
+ * The number of pixels to increase the height of the
6682
+ * hovered point.
6640
6683
  *
6641
- * @return {Highcharts.MapCoordinateObject}
6642
- * X and Y coordinates in terms of chart axis values.
6684
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6685
+ * One day
6686
+ *
6687
+ * @type {number|undefined}
6688
+ * @default undefined
6689
+ * @product highcharts highstock
6690
+ * @apioption series.heatmap.data.marker.states.hover.heightPlus
6643
6691
  */
6644
- Chart.prototype.fromLatLonToPoint = function (latLon) {
6645
- var transforms = this.mapTransforms,
6646
- transform,
6647
- coords;
6648
- if (!transforms) {
6649
- error(22, false, this);
6650
- return {
6651
- x: 0,
6652
- y: null
6653
- };
6654
- }
6655
- for (transform in transforms) {
6656
- if (Object.hasOwnProperty.call(transforms, transform) &&
6657
- transforms[transform].hitZone) {
6658
- coords = this.transformFromLatLon(latLon, transforms[transform]);
6659
- if (pointInPolygon({ x: coords.x, y: -coords.y }, transforms[transform].hitZone.coordinates[0])) {
6660
- return coords;
6661
- }
6662
- }
6663
- }
6664
- return this.transformFromLatLon(latLon, transforms['default'] // eslint-disable-line dot-notation
6665
- );
6666
- };
6667
6692
  /**
6668
- * Highmaps only. Restructure a GeoJSON object in preparation to be read
6669
- * directly by the
6670
- * {@link https://api.highcharts.com/highmaps/plotOptions.series.mapData|series.mapData}
6671
- * option. The GeoJSON will be broken down to fit a specific Highcharts type,
6672
- * either `map`, `mapline` or `mappoint`. Meta data in GeoJSON's properties
6673
- * object will be copied directly over to {@link Point.properties} in Highmaps.
6693
+ * Set the marker's fixed width on select state.
6694
+ *
6695
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
6696
+ * 70px fixed marker's width and height on hover
6697
+ *
6698
+ * @type {number|undefined}
6699
+ * @default undefined
6700
+ * @product highcharts highmaps
6701
+ * @apioption series.heatmap.data.marker.states.select.width
6702
+ */
6703
+ /**
6704
+ * Set the marker's fixed height on select state.
6674
6705
  *
6675
- * @requires modules/map
6706
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
6707
+ * 70px fixed marker's width and height on hover
6676
6708
  *
6677
- * @sample maps/demo/geojson/
6678
- * Simple areas
6679
- * @sample maps/demo/geojson-multiple-types/
6680
- * Multiple types
6709
+ * @type {number|undefined}
6710
+ * @default undefined
6711
+ * @product highcharts highmaps
6712
+ * @apioption series.heatmap.data.marker.states.select.height
6713
+ */
6714
+ /**
6715
+ * The number of pixels to increase the width of the
6716
+ * hovered point.
6681
6717
  *
6682
- * @function Highcharts.geojson
6718
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6719
+ * One day
6683
6720
  *
6684
- * @param {Highcharts.GeoJSON} geojson
6685
- * The GeoJSON structure to parse, represented as a JavaScript object
6686
- * rather than a JSON string.
6721
+ * @type {number|undefined}
6722
+ * @default undefined
6723
+ * @product highcharts highstock
6724
+ * @apioption series.heatmap.data.marker.states.select.widthPlus
6725
+ */
6726
+ /**
6727
+ * The number of pixels to increase the height of the
6728
+ * hovered point.
6687
6729
  *
6688
- * @param {string} [hType=map]
6689
- * The Highmaps series type to prepare for. Setting "map" will return
6690
- * GeoJSON polygons and multipolygons. Setting "mapline" will return
6691
- * GeoJSON linestrings and multilinestrings. Setting "mappoint" will
6692
- * return GeoJSON points and multipoints.
6730
+ * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
6731
+ * One day
6693
6732
  *
6694
- * @return {Array<*>}
6695
- * An object ready for the `mapData` option.
6733
+ * @type {number|undefined}
6734
+ * @default undefined
6735
+ * @product highcharts highstock
6736
+ * @apioption series.heatmap.data.marker.states.select.heightPlus
6696
6737
  */
6697
- H.geojson = function (geojson, hType, series) {
6698
- var mapData = [],
6699
- path = [],
6700
- polygonToPath = function (polygon) {
6701
- polygon.forEach(function (point,
6702
- i) {
6703
- if (i === 0) {
6704
- path.push(['M',
6705
- point[0], -point[1]]);
6706
- }
6707
- else {
6708
- path.push(['L', point[0], -point[1]]);
6709
- }
6710
- });
6711
- };
6712
- hType = hType || 'map';
6713
- geojson.features.forEach(function (feature) {
6714
- var geometry = feature.geometry,
6715
- type = geometry.type,
6716
- coordinates = geometry.coordinates,
6717
- properties = feature.properties,
6718
- point;
6719
- path = [];
6720
- if (hType === 'map' || hType === 'mapbubble') {
6721
- if (type === 'Polygon') {
6722
- coordinates.forEach(polygonToPath);
6723
- path.push(['Z']);
6724
- }
6725
- else if (type === 'MultiPolygon') {
6726
- coordinates.forEach(function (items) {
6727
- items.forEach(polygonToPath);
6728
- });
6729
- path.push(['Z']);
6730
- }
6731
- if (path.length) {
6732
- point = { path: path };
6733
- }
6734
- }
6735
- else if (hType === 'mapline') {
6736
- if (type === 'LineString') {
6737
- polygonToPath(coordinates);
6738
- }
6739
- else if (type === 'MultiLineString') {
6740
- coordinates.forEach(polygonToPath);
6741
- }
6742
- if (path.length) {
6743
- point = { path: path };
6744
- }
6745
- }
6746
- else if (hType === 'mappoint') {
6747
- if (type === 'Point') {
6748
- point = {
6749
- x: coordinates[0],
6750
- y: -coordinates[1]
6751
- };
6752
- }
6753
- }
6754
- if (point) {
6755
- mapData.push(extend(point, {
6756
- name: properties.name || properties.NAME,
6757
- /**
6758
- * In Highmaps, when data is loaded from GeoJSON, the GeoJSON
6759
- * item's properies are copied over here.
6760
- *
6761
- * @requires modules/map
6762
- * @name Highcharts.Point#properties
6763
- * @type {*}
6764
- */
6765
- properties: properties
6766
- }));
6767
- }
6768
- });
6769
- // Create a credits text that includes map source, to be picked up in
6770
- // Chart.addCredits
6771
- if (series && geojson.copyrightShort) {
6772
- series.chart.mapCredits = format(series.chart.options.credits.mapText, { geojson: geojson });
6773
- series.chart.mapCreditsFull = format(series.chart.options.credits.mapTextFull, { geojson: geojson });
6774
- }
6775
- return mapData;
6776
- };
6777
- // Override addCredits to include map source by default
6778
- wrap(Chart.prototype, 'addCredits', function (proceed, credits) {
6779
- credits = merge(true, this.options.credits, credits);
6780
- // Disable credits link if map credits enabled. This to allow for in-text
6781
- // anchors.
6782
- if (this.mapCredits) {
6783
- credits.href = null;
6784
- }
6785
- proceed.call(this, credits);
6786
- // Add full map credits to hover
6787
- if (this.credits && this.mapCreditsFull) {
6788
- this.credits.attr({
6789
- title: this.mapCreditsFull
6790
- });
6791
- }
6792
- });
6738
+ ''; // adds doclets above to transpiled file
6793
6739
 
6794
6740
  });
6795
- _registerModule(_modules, 'Maps/Map.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/Options.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js']], function (Chart, H, O, SVGRenderer, U) {
6741
+ _registerModule(_modules, 'Extensions/GeoJSON.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (Chart, H, U) {
6796
6742
  /* *
6797
6743
  *
6798
6744
  * (c) 2010-2020 Torstein Honsi
@@ -6801,414 +6747,480 @@
6801
6747
  *
6802
6748
  * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
6803
6749
  *
6804
- * */
6805
- var defaultOptions = O.defaultOptions;
6806
- var extend = U.extend,
6807
- getOptions = U.getOptions,
6808
- merge = U.merge,
6809
- pick = U.pick;
6810
- var Renderer = H.Renderer,
6811
- VMLRenderer = H.VMLRenderer;
6812
- // Add language
6813
- extend(defaultOptions.lang, {
6814
- zoomIn: 'Zoom in',
6815
- zoomOut: 'Zoom out'
6816
- });
6817
- // Set the default map navigation options
6750
+ * */
6751
+ var win = H.win;
6752
+ var error = U.error,
6753
+ extend = U.extend,
6754
+ format = U.format,
6755
+ merge = U.merge,
6756
+ wrap = U.wrap;
6757
+ /**
6758
+ * Represents the loose structure of a geographic JSON file.
6759
+ *
6760
+ * @interface Highcharts.GeoJSON
6761
+ */ /**
6762
+ * Full copyright note of the geographic data.
6763
+ * @name Highcharts.GeoJSON#copyright
6764
+ * @type {string|undefined}
6765
+ */ /**
6766
+ * Short copyright note of the geographic data suitable for watermarks.
6767
+ * @name Highcharts.GeoJSON#copyrightShort
6768
+ * @type {string|undefined}
6769
+ */ /**
6770
+ * Additional meta information based on the coordinate reference system.
6771
+ * @name Highcharts.GeoJSON#crs
6772
+ * @type {Highcharts.Dictionary<any>|undefined}
6773
+ */ /**
6774
+ * Data sets of geographic features.
6775
+ * @name Highcharts.GeoJSON#features
6776
+ * @type {Array<Highcharts.GeoJSONFeature>}
6777
+ */ /**
6778
+ * Map projections and transformations to be used when calculating between
6779
+ * lat/lon and chart values. Required for lat/lon support on maps. Allows
6780
+ * resizing, rotating, and moving portions of a map within its projected
6781
+ * coordinate system while still retaining lat/lon support. If using lat/lon
6782
+ * on a portion of the map that does not match a `hitZone`, the definition with
6783
+ * the key `default` is used.
6784
+ * @name Highcharts.GeoJSON#hc-transform
6785
+ * @type {Highcharts.Dictionary<Highcharts.GeoJSONTranslation>|undefined}
6786
+ */ /**
6787
+ * Title of the geographic data.
6788
+ * @name Highcharts.GeoJSON#title
6789
+ * @type {string|undefined}
6790
+ */ /**
6791
+ * Type of the geographic data. Type of an optimized map collection is
6792
+ * `FeatureCollection`.
6793
+ * @name Highcharts.GeoJSON#type
6794
+ * @type {string|undefined}
6795
+ */ /**
6796
+ * Version of the geographic data.
6797
+ * @name Highcharts.GeoJSON#version
6798
+ * @type {string|undefined}
6799
+ */
6800
+ /**
6801
+ * Data set of a geographic feature.
6802
+ * @interface Highcharts.GeoJSONFeature
6803
+ * @extends Highcharts.Dictionary<*>
6804
+ */ /**
6805
+ * Data type of the geographic feature.
6806
+ * @name Highcharts.GeoJSONFeature#type
6807
+ * @type {string}
6808
+ */
6809
+ /**
6810
+ * Describes the map projection and transformations applied to a portion of
6811
+ * a map.
6812
+ * @interface Highcharts.GeoJSONTranslation
6813
+ */ /**
6814
+ * The coordinate reference system used to generate this portion of the map.
6815
+ * @name Highcharts.GeoJSONTranslation#crs
6816
+ * @type {string}
6817
+ */ /**
6818
+ * Define the portion of the map that this defintion applies to. Defined as a
6819
+ * GeoJSON polygon feature object, with `type` and `coordinates` properties.
6820
+ * @name Highcharts.GeoJSONTranslation#hitZone
6821
+ * @type {Highcharts.Dictionary<*>|undefined}
6822
+ */ /**
6823
+ * Property for internal use for maps generated by Highsoft.
6824
+ * @name Highcharts.GeoJSONTranslation#jsonmarginX
6825
+ * @type {number|undefined}
6826
+ */ /**
6827
+ * Property for internal use for maps generated by Highsoft.
6828
+ * @name Highcharts.GeoJSONTranslation#jsonmarginY
6829
+ * @type {number|undefined}
6830
+ */ /**
6831
+ * Property for internal use for maps generated by Highsoft.
6832
+ * @name Highcharts.GeoJSONTranslation#jsonres
6833
+ * @type {number|undefined}
6834
+ */ /**
6835
+ * Specifies clockwise rotation of the coordinates after the projection, but
6836
+ * before scaling and panning. Defined in radians, relative to the coordinate
6837
+ * system origin.
6838
+ * @name Highcharts.GeoJSONTranslation#rotation
6839
+ * @type {number|undefined}
6840
+ */ /**
6841
+ * The scaling factor applied to the projected coordinates.
6842
+ * @name Highcharts.GeoJSONTranslation#scale
6843
+ * @type {number|undefined}
6844
+ */ /**
6845
+ * Property for internal use for maps generated by Highsoft.
6846
+ * @name Highcharts.GeoJSONTranslation#xoffset
6847
+ * @type {number|undefined}
6848
+ */ /**
6849
+ * X offset of projected coordinates after scaling.
6850
+ * @name Highcharts.GeoJSONTranslation#xpan
6851
+ * @type {number|undefined}
6852
+ */ /**
6853
+ * Property for internal use for maps generated by Highsoft.
6854
+ * @name Highcharts.GeoJSONTranslation#yoffset
6855
+ * @type {number|undefined}
6856
+ */ /**
6857
+ * Y offset of projected coordinates after scaling.
6858
+ * @name Highcharts.GeoJSONTranslation#ypan
6859
+ * @type {number|undefined}
6860
+ */
6861
+ /**
6862
+ * Result object of a map transformation.
6863
+ *
6864
+ * @interface Highcharts.MapCoordinateObject
6865
+ */ /**
6866
+ * X coordinate on the map.
6867
+ * @name Highcharts.MapCoordinateObject#x
6868
+ * @type {number}
6869
+ */ /**
6870
+ * Y coordinate on the map.
6871
+ * @name Highcharts.MapCoordinateObject#y
6872
+ * @type {number|null}
6873
+ */
6818
6874
  /**
6819
- * @product highmaps
6820
- * @optionparent mapNavigation
6821
- */
6822
- defaultOptions.mapNavigation = {
6823
- /**
6824
- * General options for the map navigation buttons. Individual options
6825
- * can be given from the [mapNavigation.buttons](#mapNavigation.buttons)
6826
- * option set.
6827
- *
6828
- * @sample {highmaps} maps/mapnavigation/button-theme/
6829
- * Theming the navigation buttons
6830
- */
6831
- buttonOptions: {
6832
- /**
6833
- * What box to align the buttons to. Possible values are `plotBox`
6834
- * and `spacingBox`.
6835
- *
6836
- * @type {Highcharts.ButtonRelativeToValue}
6837
- */
6838
- alignTo: 'plotBox',
6839
- /**
6840
- * The alignment of the navigation buttons.
6841
- *
6842
- * @type {Highcharts.AlignValue}
6843
- */
6844
- align: 'left',
6845
- /**
6846
- * The vertical alignment of the buttons. Individual alignment can
6847
- * be adjusted by each button's `y` offset.
6848
- *
6849
- * @type {Highcharts.VerticalAlignValue}
6850
- */
6851
- verticalAlign: 'top',
6852
- /**
6853
- * The X offset of the buttons relative to its `align` setting.
6854
- */
6855
- x: 0,
6856
- /**
6857
- * The width of the map navigation buttons.
6858
- */
6859
- width: 18,
6860
- /**
6861
- * The pixel height of the map navigation buttons.
6862
- */
6863
- height: 18,
6864
- /**
6865
- * Padding for the navigation buttons.
6866
- *
6867
- * @since 5.0.0
6868
- */
6869
- padding: 5,
6870
- /**
6871
- * Text styles for the map navigation buttons.
6872
- *
6873
- * @type {Highcharts.CSSObject}
6874
- * @default {"fontSize": "15px", "fontWeight": "bold"}
6875
- */
6876
- style: {
6877
- /** @ignore */
6878
- fontSize: '15px',
6879
- /** @ignore */
6880
- fontWeight: 'bold'
6881
- },
6882
- /**
6883
- * A configuration object for the button theme. The object accepts
6884
- * SVG properties like `stroke-width`, `stroke` and `fill`. Tri-state
6885
- * button styles are supported by the `states.hover` and `states.select`
6886
- * objects.
6887
- *
6888
- * @sample {highmaps} maps/mapnavigation/button-theme/
6889
- * Themed navigation buttons
6890
- *
6891
- * @type {Highcharts.SVGAttributes}
6892
- * @default {"stroke-width": 1, "text-align": "center"}
6893
- */
6894
- theme: {
6895
- /** @ignore */
6896
- 'stroke-width': 1,
6897
- /** @ignore */
6898
- 'text-align': 'center'
6899
- }
6900
- },
6901
- /**
6902
- * The individual buttons for the map navigation. This usually includes
6903
- * the zoom in and zoom out buttons. Properties for each button is
6904
- * inherited from
6905
- * [mapNavigation.buttonOptions](#mapNavigation.buttonOptions), while
6906
- * individual options can be overridden. But default, the `onclick`, `text`
6907
- * and `y` options are individual.
6908
- */
6909
- buttons: {
6910
- /**
6911
- * Options for the zoom in button. Properties for the zoom in and zoom
6912
- * out buttons are inherited from
6913
- * [mapNavigation.buttonOptions](#mapNavigation.buttonOptions), while
6914
- * individual options can be overridden. By default, the `onclick`,
6915
- * `text` and `y` options are individual.
6916
- *
6917
- * @extends mapNavigation.buttonOptions
6918
- */
6919
- zoomIn: {
6920
- // eslint-disable-next-line valid-jsdoc
6921
- /**
6922
- * Click handler for the button.
6923
- *
6924
- * @type {Function}
6925
- * @default function () { this.mapZoom(0.5); }
6926
- */
6927
- onclick: function () {
6928
- this.mapZoom(0.5);
6929
- },
6930
- /**
6931
- * The text for the button. The tooltip (title) is a language option
6932
- * given by [lang.zoomIn](#lang.zoomIn).
6933
- */
6934
- text: '+',
6935
- /**
6936
- * The position of the zoomIn button relative to the vertical
6937
- * alignment.
6938
- */
6939
- y: 0
6940
- },
6941
- /**
6942
- * Options for the zoom out button. Properties for the zoom in and
6943
- * zoom out buttons are inherited from
6944
- * [mapNavigation.buttonOptions](#mapNavigation.buttonOptions), while
6945
- * individual options can be overridden. By default, the `onclick`,
6946
- * `text` and `y` options are individual.
6947
- *
6948
- * @extends mapNavigation.buttonOptions
6949
- */
6950
- zoomOut: {
6951
- // eslint-disable-next-line valid-jsdoc
6952
- /**
6953
- * Click handler for the button.
6954
- *
6955
- * @type {Function}
6956
- * @default function () { this.mapZoom(2); }
6957
- */
6958
- onclick: function () {
6959
- this.mapZoom(2);
6960
- },
6961
- /**
6962
- * The text for the button. The tooltip (title) is a language option
6963
- * given by [lang.zoomOut](#lang.zoomIn).
6964
- */
6965
- text: '-',
6966
- /**
6967
- * The position of the zoomOut button relative to the vertical
6968
- * alignment.
6969
- */
6970
- y: 28
6875
+ * A latitude/longitude object.
6876
+ *
6877
+ * @interface Highcharts.MapLatLonObject
6878
+ */ /**
6879
+ * The latitude.
6880
+ * @name Highcharts.MapLatLonObject#lat
6881
+ * @type {number}
6882
+ */ /**
6883
+ * The longitude.
6884
+ * @name Highcharts.MapLatLonObject#lon
6885
+ * @type {number}
6886
+ */
6887
+ ''; // detach doclets above
6888
+ /* eslint-disable no-invalid-this, valid-jsdoc */
6889
+ /**
6890
+ * Test for point in polygon. Polygon defined as array of [x,y] points.
6891
+ * @private
6892
+ */
6893
+ function pointInPolygon(point, polygon) {
6894
+ var i,
6895
+ j,
6896
+ rel1,
6897
+ rel2,
6898
+ c = false,
6899
+ x = point.x,
6900
+ y = point.y;
6901
+ for (i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
6902
+ rel1 = polygon[i][1] > y;
6903
+ rel2 = polygon[j][1] > y;
6904
+ if (rel1 !== rel2 &&
6905
+ (x < (polygon[j][0] -
6906
+ polygon[i][0]) * (y - polygon[i][1]) /
6907
+ (polygon[j][1] - polygon[i][1]) +
6908
+ polygon[i][0])) {
6909
+ c = !c;
6971
6910
  }
6972
- },
6973
- /**
6974
- * Whether to enable navigation buttons. By default it inherits the
6975
- * [enabled](#mapNavigation.enabled) setting.
6976
- *
6977
- * @type {boolean}
6978
- * @apioption mapNavigation.enableButtons
6979
- */
6980
- /**
6981
- * Whether to enable map navigation. The default is not to enable
6982
- * navigation, as many choropleth maps are simple and don't need it.
6983
- * Additionally, when touch zoom and mousewheel zoom is enabled, it breaks
6984
- * the default behaviour of these interactions in the website, and the
6985
- * implementer should be aware of this.
6986
- *
6987
- * Individual interactions can be enabled separately, namely buttons,
6988
- * multitouch zoom, double click zoom, double click zoom to element and
6989
- * mousewheel zoom.
6990
- *
6991
- * @type {boolean}
6992
- * @default false
6993
- * @apioption mapNavigation.enabled
6994
- */
6995
- /**
6996
- * Enables zooming in on an area on double clicking in the map. By default
6997
- * it inherits the [enabled](#mapNavigation.enabled) setting.
6998
- *
6999
- * @type {boolean}
7000
- * @apioption mapNavigation.enableDoubleClickZoom
7001
- */
7002
- /**
7003
- * Whether to zoom in on an area when that area is double clicked.
7004
- *
7005
- * @sample {highmaps} maps/mapnavigation/doubleclickzoomto/
7006
- * Enable double click zoom to
7007
- *
7008
- * @type {boolean}
7009
- * @default false
7010
- * @apioption mapNavigation.enableDoubleClickZoomTo
7011
- */
7012
- /**
7013
- * Enables zooming by mouse wheel. By default it inherits the [enabled](
7014
- * #mapNavigation.enabled) setting.
7015
- *
7016
- * @type {boolean}
7017
- * @apioption mapNavigation.enableMouseWheelZoom
7018
- */
7019
- /**
7020
- * Whether to enable multitouch zooming. Note that if the chart covers the
7021
- * viewport, this prevents the user from using multitouch and touchdrag on
7022
- * the web page, so you should make sure the user is not trapped inside the
7023
- * chart. By default it inherits the [enabled](#mapNavigation.enabled)
7024
- * setting.
7025
- *
7026
- * @type {boolean}
7027
- * @apioption mapNavigation.enableTouchZoom
7028
- */
6911
+ }
6912
+ return c;
6913
+ }
6914
+ /**
6915
+ * Highmaps only. Get point from latitude and longitude using specified
6916
+ * transform definition.
6917
+ *
6918
+ * @requires modules/map
6919
+ *
6920
+ * @sample maps/series/latlon-transform/
6921
+ * Use specific transformation for lat/lon
6922
+ *
6923
+ * @function Highcharts.Chart#transformFromLatLon
6924
+ *
6925
+ * @param {Highcharts.MapLatLonObject} latLon
6926
+ * A latitude/longitude object.
6927
+ *
6928
+ * @param {*} transform
6929
+ * The transform definition to use as explained in the
6930
+ * {@link https://www.highcharts.com/docs/maps/latlon|documentation}.
6931
+ *
6932
+ * @return {Highcharts.MapCoordinateObject}
6933
+ * An object with `x` and `y` properties.
6934
+ */
6935
+ Chart.prototype.transformFromLatLon = function (latLon, transform) {
7029
6936
  /**
7030
- * Sensitivity of mouse wheel or trackpad scrolling. 1 is no sensitivity,
7031
- * while with 2, one mousewheel delta will zoom in 50%.
6937
+ * Allows to manually load the proj4 library from Highcharts options
6938
+ * instead of the `window`.
6939
+ * In case of loading the library from a `script` tag,
6940
+ * this option is not needed, it will be loaded from there by default.
7032
6941
  *
7033
- * @since 4.2.4
6942
+ * @type {function}
6943
+ * @product highmaps
6944
+ * @apioption chart.proj4
7034
6945
  */
7035
- mouseWheelSensitivity: 1.1
7036
- // enabled: false,
7037
- // enableButtons: null, // inherit from enabled
7038
- // enableTouchZoom: null, // inherit from enabled
7039
- // enableDoubleClickZoom: null, // inherit from enabled
7040
- // enableDoubleClickZoomTo: false
7041
- // enableMouseWheelZoom: null, // inherit from enabled
6946
+ var _a;
6947
+ var proj4 = (((_a = this.userOptions.chart) === null || _a === void 0 ? void 0 : _a.proj4) || win.proj4);
6948
+ if (!proj4) {
6949
+ error(21, false, this);
6950
+ return {
6951
+ x: 0,
6952
+ y: null
6953
+ };
6954
+ }
6955
+ var projected = proj4(transform.crs,
6956
+ [latLon.lon,
6957
+ latLon.lat]),
6958
+ cosAngle = transform.cosAngle ||
6959
+ (transform.rotation && Math.cos(transform.rotation)),
6960
+ sinAngle = transform.sinAngle ||
6961
+ (transform.rotation && Math.sin(transform.rotation)),
6962
+ rotated = transform.rotation ? [
6963
+ projected[0] * cosAngle + projected[1] * sinAngle,
6964
+ -projected[0] * sinAngle + projected[1] * cosAngle
6965
+ ] : projected;
6966
+ return {
6967
+ x: ((rotated[0] - (transform.xoffset || 0)) * (transform.scale || 1) +
6968
+ (transform.xpan || 0)) * (transform.jsonres || 1) +
6969
+ (transform.jsonmarginX || 0),
6970
+ y: (((transform.yoffset || 0) - rotated[1]) * (transform.scale || 1) +
6971
+ (transform.ypan || 0)) * (transform.jsonres || 1) -
6972
+ (transform.jsonmarginY || 0)
6973
+ };
7042
6974
  };
7043
- /* eslint-disable valid-jsdoc */
7044
6975
  /**
7045
- * Utility for reading SVG paths directly.
6976
+ * Highmaps only. Get latLon from point using specified transform definition.
6977
+ * The method returns an object with the numeric properties `lat` and `lon`.
7046
6978
  *
7047
6979
  * @requires modules/map
7048
6980
  *
7049
- * @function Highcharts.splitPath
6981
+ * @sample maps/series/latlon-transform/
6982
+ * Use specific transformation for lat/lon
7050
6983
  *
7051
- * @param {string|Array<string|number>} path
6984
+ * @function Highcharts.Chart#transformToLatLon
7052
6985
  *
7053
- * @return {Highcharts.SVGPathArray}
6986
+ * @param {Highcharts.Point|Highcharts.MapCoordinateObject} point
6987
+ * A `Point` instance, or any object containing the properties `x` and
6988
+ * `y` with numeric values.
6989
+ *
6990
+ * @param {*} transform
6991
+ * The transform definition to use as explained in the
6992
+ * {@link https://www.highcharts.com/docs/maps/latlon|documentation}.
6993
+ *
6994
+ * @return {Highcharts.MapLatLonObject|undefined}
6995
+ * An object with `lat` and `lon` properties.
7054
6996
  */
7055
- H.splitPath = function (path) {
7056
- var arr;
7057
- if (typeof path === 'string') {
7058
- path = path
7059
- // Move letters apart
7060
- .replace(/([A-Za-z])/g, ' $1 ')
7061
- // Trim
7062
- .replace(/^\s*/, '').replace(/\s*$/, '');
7063
- // Split on spaces and commas. The semicolon is bogus, designed to
7064
- // circumvent string replacement in the pre-v7 assembler that built
7065
- // specific styled mode files.
7066
- var split = path.split(/[ ,;]+/);
7067
- arr = split.map(function (item) {
7068
- if (!/[A-za-z]/.test(item)) {
7069
- return parseFloat(item);
7070
- }
7071
- return item;
7072
- });
6997
+ Chart.prototype.transformToLatLon = function (point, transform) {
6998
+ if (typeof win.proj4 === 'undefined') {
6999
+ error(21, false, this);
7000
+ return;
7073
7001
  }
7074
- else {
7075
- arr = path;
7002
+ var normalized = {
7003
+ x: ((point.x -
7004
+ (transform.jsonmarginX || 0)) / (transform.jsonres || 1) -
7005
+ (transform.xpan || 0)) / (transform.scale || 1) +
7006
+ (transform.xoffset || 0),
7007
+ y: ((-point.y - (transform.jsonmarginY || 0)) / (transform.jsonres || 1) +
7008
+ (transform.ypan || 0)) / (transform.scale || 1) +
7009
+ (transform.yoffset || 0)
7010
+ },
7011
+ cosAngle = transform.cosAngle ||
7012
+ (transform.rotation && Math.cos(transform.rotation)),
7013
+ sinAngle = transform.sinAngle ||
7014
+ (transform.rotation && Math.sin(transform.rotation)),
7015
+ // Note: Inverted sinAngle to reverse rotation direction
7016
+ projected = win.proj4(transform.crs, 'WGS84',
7017
+ transform.rotation ? {
7018
+ x: normalized.x * cosAngle + normalized.y * -sinAngle,
7019
+ y: normalized.x * sinAngle + normalized.y * cosAngle
7020
+ } : normalized);
7021
+ return { lat: projected.y, lon: projected.x };
7022
+ };
7023
+ /**
7024
+ * Highmaps only. Calculate latitude/longitude values for a point. Returns an
7025
+ * object with the numeric properties `lat` and `lon`.
7026
+ *
7027
+ * @requires modules/map
7028
+ *
7029
+ * @sample maps/demo/latlon-advanced/
7030
+ * Advanced lat/lon demo
7031
+ *
7032
+ * @function Highcharts.Chart#fromPointToLatLon
7033
+ *
7034
+ * @param {Highcharts.Point|Highcharts.MapCoordinateObject} point
7035
+ * A `Point` instance or anything containing `x` and `y` properties with
7036
+ * numeric values.
7037
+ *
7038
+ * @return {Highcharts.MapLatLonObject|undefined}
7039
+ * An object with `lat` and `lon` properties.
7040
+ */
7041
+ Chart.prototype.fromPointToLatLon = function (point) {
7042
+ var transforms = this.mapTransforms,
7043
+ transform;
7044
+ if (!transforms) {
7045
+ error(22, false, this);
7046
+ return;
7076
7047
  }
7077
- return SVGRenderer.prototype.pathToSegments(arr);
7048
+ for (transform in transforms) {
7049
+ if (Object.hasOwnProperty.call(transforms, transform) &&
7050
+ transforms[transform].hitZone &&
7051
+ pointInPolygon({ x: point.x, y: -point.y }, transforms[transform].hitZone.coordinates[0])) {
7052
+ return this.transformToLatLon(point, transforms[transform]);
7053
+ }
7054
+ }
7055
+ return this.transformToLatLon(point, transforms['default'] // eslint-disable-line dot-notation
7056
+ );
7078
7057
  };
7079
7058
  /**
7080
- * Contains all loaded map data for Highmaps.
7059
+ * Highmaps only. Get chart coordinates from latitude/longitude. Returns an
7060
+ * object with x and y values corresponding to the `xAxis` and `yAxis`.
7081
7061
  *
7082
7062
  * @requires modules/map
7083
7063
  *
7084
- * @name Highcharts.maps
7085
- * @type {Highcharts.Dictionary<*>}
7086
- */
7087
- H.maps = {};
7088
- /**
7089
- * Create symbols for the zoom buttons
7090
- * @private
7064
+ * @sample maps/series/latlon-to-point/
7065
+ * Find a point from lat/lon
7066
+ *
7067
+ * @function Highcharts.Chart#fromLatLonToPoint
7068
+ *
7069
+ * @param {Highcharts.MapLatLonObject} latLon
7070
+ * Coordinates.
7071
+ *
7072
+ * @return {Highcharts.MapCoordinateObject}
7073
+ * X and Y coordinates in terms of chart axis values.
7091
7074
  */
7092
- function selectiveRoundedRect(x, y, w, h, rTopLeft, rTopRight, rBottomRight, rBottomLeft) {
7093
- return [
7094
- ['M', x + rTopLeft, y],
7095
- // top side
7096
- ['L', x + w - rTopRight, y],
7097
- // top right corner
7098
- ['C', x + w - rTopRight / 2, y, x + w, y + rTopRight / 2, x + w, y + rTopRight],
7099
- // right side
7100
- ['L', x + w, y + h - rBottomRight],
7101
- // bottom right corner
7102
- ['C', x + w, y + h - rBottomRight / 2, x + w - rBottomRight / 2, y + h, x + w - rBottomRight, y + h],
7103
- // bottom side
7104
- ['L', x + rBottomLeft, y + h],
7105
- // bottom left corner
7106
- ['C', x + rBottomLeft / 2, y + h, x, y + h - rBottomLeft / 2, x, y + h - rBottomLeft],
7107
- // left side
7108
- ['L', x, y + rTopLeft],
7109
- // top left corner
7110
- ['C', x, y + rTopLeft / 2, x + rTopLeft / 2, y, x + rTopLeft, y],
7111
- ['Z']
7112
- ];
7113
- }
7114
- SVGRenderer.prototype.symbols.topbutton = function (x, y, w, h, options) {
7115
- var r = (options && options.r) || 0;
7116
- return selectiveRoundedRect(x - 1, y - 1, w, h, r, r, 0, 0);
7117
- };
7118
- SVGRenderer.prototype.symbols.bottombutton = function (x, y, w, h, options) {
7119
- var r = (options && options.r) || 0;
7120
- return selectiveRoundedRect(x - 1, y - 1, w, h, 0, 0, r, r);
7075
+ Chart.prototype.fromLatLonToPoint = function (latLon) {
7076
+ var transforms = this.mapTransforms,
7077
+ transform,
7078
+ coords;
7079
+ if (!transforms) {
7080
+ error(22, false, this);
7081
+ return {
7082
+ x: 0,
7083
+ y: null
7084
+ };
7085
+ }
7086
+ for (transform in transforms) {
7087
+ if (Object.hasOwnProperty.call(transforms, transform) &&
7088
+ transforms[transform].hitZone) {
7089
+ coords = this.transformFromLatLon(latLon, transforms[transform]);
7090
+ if (pointInPolygon({ x: coords.x, y: -coords.y }, transforms[transform].hitZone.coordinates[0])) {
7091
+ return coords;
7092
+ }
7093
+ }
7094
+ }
7095
+ return this.transformFromLatLon(latLon, transforms['default'] // eslint-disable-line dot-notation
7096
+ );
7121
7097
  };
7122
- // The symbol callbacks are generated on the SVGRenderer object in all browsers.
7123
- // Even VML browsers need this in order to generate shapes in export. Now share
7124
- // them with the VMLRenderer.
7125
- if (Renderer === VMLRenderer) {
7126
- ['topbutton', 'bottombutton'].forEach(function (shape) {
7127
- VMLRenderer.prototype.symbols[shape] =
7128
- SVGRenderer.prototype.symbols[shape];
7129
- });
7130
- }
7131
7098
  /**
7132
- * The factory function for creating new map charts. Creates a new {@link
7133
- * Highcharts.Chart|Chart} object with different default options than the basic
7134
- * Chart.
7099
+ * Highmaps only. Restructure a GeoJSON object in preparation to be read
7100
+ * directly by the
7101
+ * {@link https://api.highcharts.com/highmaps/plotOptions.series.mapData|series.mapData}
7102
+ * option. The GeoJSON will be broken down to fit a specific Highcharts type,
7103
+ * either `map`, `mapline` or `mappoint`. Meta data in GeoJSON's properties
7104
+ * object will be copied directly over to {@link Point.properties} in Highmaps.
7135
7105
  *
7136
7106
  * @requires modules/map
7137
7107
  *
7138
- * @function Highcharts.mapChart
7108
+ * @sample maps/demo/geojson/
7109
+ * Simple areas
7110
+ * @sample maps/demo/geojson-multiple-types/
7111
+ * Multiple types
7139
7112
  *
7140
- * @param {string|Highcharts.HTMLDOMElement} [renderTo]
7141
- * The DOM element to render to, or its id.
7113
+ * @function Highcharts.geojson
7142
7114
  *
7143
- * @param {Highcharts.Options} options
7144
- * The chart options structure as described in the
7145
- * [options reference](https://api.highcharts.com/highstock).
7115
+ * @param {Highcharts.GeoJSON} geojson
7116
+ * The GeoJSON structure to parse, represented as a JavaScript object
7117
+ * rather than a JSON string.
7146
7118
  *
7147
- * @param {Highcharts.ChartCallbackFunction} [callback]
7148
- * A function to execute when the chart object is finished loading and
7149
- * rendering. In most cases the chart is built in one thread, but in
7150
- * Internet Explorer version 8 or less the chart is sometimes
7151
- * initialized before the document is ready, and in these cases the
7152
- * chart object will not be finished synchronously. As a consequence,
7153
- * code that relies on the newly built Chart object should always run in
7154
- * the callback. Defining a
7155
- * [chart.events.load](https://api.highcharts.com/highstock/chart.events.load)
7156
- * handler is equivalent.
7119
+ * @param {string} [hType=map]
7120
+ * The Highmaps series type to prepare for. Setting "map" will return
7121
+ * GeoJSON polygons and multipolygons. Setting "mapline" will return
7122
+ * GeoJSON linestrings and multilinestrings. Setting "mappoint" will
7123
+ * return GeoJSON points and multipoints.
7157
7124
  *
7158
- * @return {Highcharts.Chart}
7159
- * The chart object.
7125
+ * @return {Array<*>}
7126
+ * An object ready for the `mapData` option.
7160
7127
  */
7161
- H.Map = H.mapChart = function (a, b, c) {
7162
- var hasRenderToArg = typeof a === 'string' || a.nodeName,
7163
- options = arguments[hasRenderToArg ? 1 : 0],
7164
- userOptions = options,
7165
- hiddenAxis = {
7166
- endOnTick: false,
7167
- visible: false,
7168
- minPadding: 0,
7169
- maxPadding: 0,
7170
- startOnTick: false
7171
- },
7172
- seriesOptions,
7173
- defaultCreditsOptions = getOptions().credits;
7174
- /* For visual testing
7175
- hiddenAxis.gridLineWidth = 1;
7176
- hiddenAxis.gridZIndex = 10;
7177
- hiddenAxis.tickPositions = undefined;
7178
- // */
7179
- // Don't merge the data
7180
- seriesOptions = options.series;
7181
- options.series = null;
7182
- options = merge({
7183
- chart: {
7184
- panning: {
7185
- enabled: true,
7186
- type: 'xy'
7187
- },
7188
- type: 'map'
7189
- },
7190
- credits: {
7191
- mapText: pick(defaultCreditsOptions.mapText, ' \u00a9 <a href="{geojson.copyrightUrl}">' +
7192
- '{geojson.copyrightShort}</a>'),
7193
- mapTextFull: pick(defaultCreditsOptions.mapTextFull, '{geojson.copyright}')
7194
- },
7195
- tooltip: {
7196
- followTouchMove: false
7197
- },
7198
- xAxis: hiddenAxis,
7199
- yAxis: merge(hiddenAxis, { reversed: true })
7200
- }, options, // user's options
7201
- {
7202
- chart: {
7203
- inverted: false,
7204
- alignTicks: false
7128
+ H.geojson = function (geojson, hType, series) {
7129
+ var mapData = [],
7130
+ path = [],
7131
+ polygonToPath = function (polygon) {
7132
+ polygon.forEach(function (point,
7133
+ i) {
7134
+ if (i === 0) {
7135
+ path.push(['M',
7136
+ point[0], -point[1]]);
7137
+ }
7138
+ else {
7139
+ path.push(['L', point[0], -point[1]]);
7140
+ }
7141
+ });
7142
+ };
7143
+ hType = hType || 'map';
7144
+ geojson.features.forEach(function (feature) {
7145
+ var geometry = feature.geometry,
7146
+ type = geometry.type,
7147
+ coordinates = geometry.coordinates,
7148
+ properties = feature.properties,
7149
+ point;
7150
+ path = [];
7151
+ if (hType === 'map' || hType === 'mapbubble') {
7152
+ if (type === 'Polygon') {
7153
+ coordinates.forEach(polygonToPath);
7154
+ path.push(['Z']);
7155
+ }
7156
+ else if (type === 'MultiPolygon') {
7157
+ coordinates.forEach(function (items) {
7158
+ items.forEach(polygonToPath);
7159
+ });
7160
+ path.push(['Z']);
7161
+ }
7162
+ if (path.length) {
7163
+ point = { path: path };
7164
+ }
7165
+ }
7166
+ else if (hType === 'mapline') {
7167
+ if (type === 'LineString') {
7168
+ polygonToPath(coordinates);
7169
+ }
7170
+ else if (type === 'MultiLineString') {
7171
+ coordinates.forEach(polygonToPath);
7172
+ }
7173
+ if (path.length) {
7174
+ point = { path: path };
7175
+ }
7176
+ }
7177
+ else if (hType === 'mappoint') {
7178
+ if (type === 'Point') {
7179
+ point = {
7180
+ x: coordinates[0],
7181
+ y: -coordinates[1]
7182
+ };
7183
+ }
7184
+ }
7185
+ if (point) {
7186
+ mapData.push(extend(point, {
7187
+ name: properties.name || properties.NAME,
7188
+ /**
7189
+ * In Highmaps, when data is loaded from GeoJSON, the GeoJSON
7190
+ * item's properies are copied over here.
7191
+ *
7192
+ * @requires modules/map
7193
+ * @name Highcharts.Point#properties
7194
+ * @type {*}
7195
+ */
7196
+ properties: properties
7197
+ }));
7205
7198
  }
7206
7199
  });
7207
- options.series = userOptions.series = seriesOptions;
7208
- return hasRenderToArg ?
7209
- new Chart(a, options, c) :
7210
- new Chart(options, b);
7200
+ // Create a credits text that includes map source, to be picked up in
7201
+ // Chart.addCredits
7202
+ if (series && geojson.copyrightShort) {
7203
+ series.chart.mapCredits = format(series.chart.options.credits.mapText, { geojson: geojson });
7204
+ series.chart.mapCreditsFull = format(series.chart.options.credits.mapTextFull, { geojson: geojson });
7205
+ }
7206
+ return mapData;
7211
7207
  };
7208
+ // Override addCredits to include map source by default
7209
+ wrap(Chart.prototype, 'addCredits', function (proceed, credits) {
7210
+ credits = merge(true, this.options.credits, credits);
7211
+ // Disable credits link if map credits enabled. This to allow for in-text
7212
+ // anchors.
7213
+ if (this.mapCredits) {
7214
+ credits.href = null;
7215
+ }
7216
+ proceed.call(this, credits);
7217
+ // Add full map credits to hover
7218
+ if (this.credits && this.mapCreditsFull) {
7219
+ this.credits.attr({
7220
+ title: this.mapCreditsFull
7221
+ });
7222
+ }
7223
+ });
7212
7224
 
7213
7225
  });
7214
7226
  _registerModule(_modules, 'masters/modules/map.src.js', [], function () {