highcharts 6.1.1 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (871) hide show
  1. package/bower.json +1 -1
  2. package/css/highcharts.css +29 -0
  3. package/css/highcharts.scss +25 -1
  4. package/css/themes/dark-unica.css +29 -0
  5. package/css/themes/grid-light.css +29 -0
  6. package/css/themes/sand-signika.css +29 -0
  7. package/es-modules/indicators/accumulation-distribution.src.js +1 -1
  8. package/es-modules/indicators/atr.src.js +1 -1
  9. package/es-modules/indicators/bollinger-bands.src.js +2 -2
  10. package/es-modules/indicators/cci.src.js +1 -1
  11. package/es-modules/indicators/cmf.src.js +1 -1
  12. package/es-modules/indicators/ema.src.js +1 -1
  13. package/es-modules/indicators/ichimoku-kinko-hyo.src.js +1 -1
  14. package/es-modules/indicators/indicators.src.js +29 -14
  15. package/es-modules/indicators/macd.src.js +4 -4
  16. package/es-modules/indicators/mfi.src.js +1 -1
  17. package/es-modules/indicators/momentum.src.js +2 -2
  18. package/es-modules/indicators/pivot-points.src.js +7 -2
  19. package/es-modules/indicators/price-envelopes.src.js +2 -2
  20. package/es-modules/indicators/psar.src.js +1 -1
  21. package/es-modules/indicators/roc.src.js +1 -1
  22. package/es-modules/indicators/rsi.src.js +1 -1
  23. package/es-modules/indicators/stochastic.src.js +9 -7
  24. package/es-modules/indicators/volume-by-price.src.js +1 -1
  25. package/es-modules/indicators/vwap.src.js +1 -1
  26. package/es-modules/indicators/wma.src.js +1 -1
  27. package/es-modules/indicators/zigzag.src.js +1 -1
  28. package/es-modules/masters/highcharts-gantt.src.js +11 -0
  29. package/es-modules/masters/modules/annotations.src.js +1 -1
  30. package/es-modules/masters/modules/arrow-symbols.src.js +12 -0
  31. package/es-modules/masters/modules/broken-axis.src.js +1 -1
  32. package/es-modules/masters/modules/current-date-indicator.src.js +12 -0
  33. package/es-modules/masters/modules/data.src.js +1 -1
  34. package/es-modules/masters/modules/draggable-points.src.js +9 -0
  35. package/es-modules/masters/modules/export-data.src.js +1 -1
  36. package/es-modules/masters/modules/exporting.src.js +1 -1
  37. package/es-modules/masters/modules/funnel.src.js +1 -1
  38. package/es-modules/masters/modules/gantt.src.js +2 -1
  39. package/es-modules/masters/modules/grid-axis.src.js +1 -1
  40. package/es-modules/masters/modules/heatmap.src.js +1 -1
  41. package/es-modules/masters/modules/item-series.src.js +1 -1
  42. package/es-modules/masters/modules/map.src.js +1 -1
  43. package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
  44. package/es-modules/masters/modules/pathfinder.src.js +12 -0
  45. package/es-modules/masters/modules/sankey.src.js +1 -1
  46. package/es-modules/masters/modules/series-label.src.js +1 -1
  47. package/es-modules/masters/modules/solid-gauge.src.js +1 -1
  48. package/es-modules/masters/modules/stock.src.js +1 -1
  49. package/es-modules/masters/modules/streamgraph.src.js +1 -1
  50. package/es-modules/masters/modules/treegrid.src.js +12 -0
  51. package/es-modules/masters/modules/variwide.src.js +1 -1
  52. package/es-modules/masters/modules/vector.src.js +1 -1
  53. package/es-modules/masters/modules/windbarb.src.js +1 -1
  54. package/es-modules/masters/modules/xrange.src.js +1 -1
  55. package/es-modules/masters/themes/dark-blue.src.js +1 -1
  56. package/es-modules/masters/themes/dark-green.src.js +1 -1
  57. package/es-modules/masters/themes/dark-unica.src.js +1 -1
  58. package/es-modules/masters/themes/gray.src.js +1 -1
  59. package/es-modules/masters/themes/grid-light.src.js +1 -1
  60. package/es-modules/masters/themes/grid.src.js +1 -1
  61. package/es-modules/masters/themes/sand-signika.src.js +1 -1
  62. package/es-modules/masters/themes/skies.src.js +1 -1
  63. package/es-modules/mixins/centered-series.js +36 -5
  64. package/es-modules/mixins/on-series.js +1 -1
  65. package/es-modules/mixins/polygon.js +4 -4
  66. package/es-modules/modules/annotations.src.js +2 -2
  67. package/es-modules/modules/boost-canvas.src.js +19 -8
  68. package/es-modules/modules/boost.src.js +300 -137
  69. package/es-modules/modules/broken-axis.src.js +169 -134
  70. package/es-modules/modules/bullet.src.js +2 -2
  71. package/es-modules/modules/data.src.js +8 -6
  72. package/es-modules/modules/draggable-points.src.js +2257 -0
  73. package/es-modules/modules/drilldown.src.js +4 -2
  74. package/es-modules/modules/export-data.src.js +11 -1
  75. package/es-modules/modules/exporting.src.js +62 -36
  76. package/es-modules/modules/funnel.src.js +5 -5
  77. package/es-modules/modules/histogram.src.js +30 -28
  78. package/es-modules/modules/item-series.src.js +36 -11
  79. package/es-modules/modules/keyboard-navigation.src.js +81 -44
  80. package/es-modules/modules/no-data-to-display.src.js +5 -5
  81. package/es-modules/modules/oldie.src.js +14 -9
  82. package/es-modules/modules/overlapping-datalabels.src.js +45 -21
  83. package/es-modules/modules/parallel-coordinates.src.js +4 -3
  84. package/es-modules/modules/pareto.src.js +1 -1
  85. package/es-modules/modules/sankey.src.js +28 -10
  86. package/es-modules/modules/series-label.src.js +6 -6
  87. package/es-modules/modules/solid-gauge.src.js +10 -7
  88. package/es-modules/modules/static-scale.src.js +67 -28
  89. package/es-modules/modules/streamgraph.src.js +4 -4
  90. package/es-modules/modules/sunburst.src.js +4 -4
  91. package/es-modules/modules/tilemap.src.js +231 -134
  92. package/es-modules/modules/treemap.src.js +30 -27
  93. package/es-modules/modules/variable-pie.src.js +3 -3
  94. package/es-modules/modules/variwide.src.js +36 -24
  95. package/es-modules/modules/vector.src.js +98 -28
  96. package/es-modules/modules/windbarb.src.js +4 -4
  97. package/es-modules/modules/wordcloud.src.js +133 -48
  98. package/es-modules/modules/xrange.src.js +258 -78
  99. package/es-modules/parts/AreaSeries.js +83 -50
  100. package/es-modules/parts/AreaSplineSeries.js +66 -29
  101. package/es-modules/parts/Axis.js +2184 -745
  102. package/es-modules/parts/BarSeries.js +70 -53
  103. package/es-modules/parts/CandlestickSeries.js +20 -10
  104. package/es-modules/parts/Chart.js +349 -157
  105. package/es-modules/parts/Color.js +74 -25
  106. package/es-modules/parts/ColumnSeries.js +274 -147
  107. package/es-modules/parts/DataGrouping.js +36 -3
  108. package/es-modules/parts/DataLabels.js +318 -144
  109. package/es-modules/parts/DateTimeAxis.js +27 -5
  110. package/es-modules/parts/Dynamics.js +236 -144
  111. package/es-modules/parts/FlagsSeries.js +49 -7
  112. package/es-modules/parts/Globals.js +4 -3
  113. package/es-modules/parts/Html.js +82 -16
  114. package/es-modules/parts/Interaction.js +198 -65
  115. package/es-modules/parts/Legend.js +181 -31
  116. package/es-modules/parts/LogarithmicAxis.js +36 -3
  117. package/es-modules/parts/MSPointer.js +31 -4
  118. package/es-modules/parts/Navigator.js +479 -187
  119. package/es-modules/parts/OHLCSeries.js +11 -5
  120. package/es-modules/parts/Options.js +1052 -686
  121. package/es-modules/parts/OrdinalAxis.js +20 -6
  122. package/es-modules/parts/PieSeries.js +258 -142
  123. package/es-modules/parts/PlotBandSeries.experimental.js +2 -2
  124. package/es-modules/parts/PlotLineOrBand.js +671 -35
  125. package/es-modules/parts/Point.js +189 -73
  126. package/es-modules/parts/Pointer.js +263 -62
  127. package/es-modules/parts/RangeSelector.js +601 -91
  128. package/es-modules/parts/Responsive.js +82 -36
  129. package/es-modules/parts/ScatterSeries.js +59 -27
  130. package/es-modules/parts/ScrollablePlotArea.js +30 -9
  131. package/es-modules/parts/Scrollbar.js +284 -113
  132. package/es-modules/parts/Series.js +1105 -836
  133. package/es-modules/parts/SplineSeries.js +53 -31
  134. package/es-modules/parts/Stacking.js +108 -7
  135. package/es-modules/parts/StockChart.js +26 -8
  136. package/es-modules/parts/SvgRenderer.js +1251 -613
  137. package/es-modules/parts/Tick.js +164 -30
  138. package/es-modules/parts/Time.js +171 -71
  139. package/es-modules/parts/Tooltip.js +271 -49
  140. package/es-modules/parts/TouchPointer.js +70 -3
  141. package/es-modules/parts/Utilities.js +1024 -429
  142. package/es-modules/parts-3d/Axis.js +4 -3
  143. package/es-modules/parts-3d/Chart.js +8 -9
  144. package/es-modules/parts-3d/Column.js +1 -1
  145. package/es-modules/parts-3d/Math.js +1 -1
  146. package/es-modules/parts-3d/Pie.js +1 -1
  147. package/es-modules/parts-3d/SVGRenderer.js +13 -10
  148. package/es-modules/parts-3d/Scatter.js +4 -4
  149. package/es-modules/parts-3d/Series.js +1 -1
  150. package/es-modules/parts-3d/VMLRenderer.js +1 -1
  151. package/es-modules/parts-gantt/ArrowSymbols.js +110 -0
  152. package/es-modules/parts-gantt/CurrentDateIndicator.js +92 -0
  153. package/es-modules/parts-gantt/GanttChart.js +111 -0
  154. package/es-modules/parts-gantt/GanttSeries.js +376 -0
  155. package/es-modules/parts-gantt/GridAxis.js +965 -0
  156. package/es-modules/parts-gantt/Pathfinder.js +1247 -0
  157. package/es-modules/parts-gantt/PathfinderAlgorithms.js +746 -0
  158. package/es-modules/parts-gantt/Tree.js +146 -0
  159. package/es-modules/parts-gantt/TreeGrid.js +917 -0
  160. package/es-modules/parts-map/ColorAxis.js +4 -5
  161. package/es-modules/parts-map/ColorSeriesMixin.js +3 -1
  162. package/es-modules/parts-map/GeoJSON.js +1 -1
  163. package/es-modules/parts-map/HeatmapSeries.js +126 -55
  164. package/es-modules/parts-map/Map.js +144 -51
  165. package/es-modules/parts-map/MapAxis.js +1 -1
  166. package/es-modules/parts-map/MapBubbleSeries.js +6 -5
  167. package/es-modules/parts-map/MapLineSeries.js +4 -4
  168. package/es-modules/parts-map/MapNavigation.js +50 -12
  169. package/es-modules/parts-map/MapPointSeries.js +3 -3
  170. package/es-modules/parts-map/MapPointer.js +1 -1
  171. package/es-modules/parts-map/MapSeries.js +7 -7
  172. package/es-modules/parts-more/AreaRangeSeries.js +82 -40
  173. package/es-modules/parts-more/AreaSplineRangeSeries.js +3 -3
  174. package/es-modules/parts-more/BoxPlotSeries.js +3 -3
  175. package/es-modules/parts-more/BubbleSeries.js +9 -4
  176. package/es-modules/parts-more/ColumnRangeSeries.js +3 -3
  177. package/es-modules/parts-more/ErrorBarSeries.js +6 -4
  178. package/es-modules/parts-more/GaugeSeries.js +3 -3
  179. package/es-modules/parts-more/Pane.js +3 -2
  180. package/es-modules/parts-more/Polar.js +1 -1
  181. package/es-modules/parts-more/PolygonSeries.js +3 -3
  182. package/es-modules/parts-more/RadialAxis.js +5 -4
  183. package/es-modules/parts-more/WaterfallSeries.js +9 -4
  184. package/es-modules/supplemental.docs.js +0 -1955
  185. package/es-modules/themes/dark-blue.js +1 -1
  186. package/es-modules/themes/dark-green.js +1 -1
  187. package/es-modules/themes/dark-unica.js +1 -1
  188. package/es-modules/themes/gray.js +1 -1
  189. package/es-modules/themes/grid-light.js +1 -1
  190. package/es-modules/themes/grid.js +1 -1
  191. package/es-modules/themes/sand-signika.js +1 -1
  192. package/es-modules/themes/skies.js +1 -1
  193. package/highcharts-3d.js +77 -75
  194. package/highcharts-3d.js.map +1 -8
  195. package/highcharts-3d.src.js +39 -32
  196. package/highcharts-gantt.js +503 -0
  197. package/highcharts-gantt.js.map +1 -0
  198. package/highcharts-gantt.src.js +49289 -0
  199. package/highcharts-more.js +66 -64
  200. package/highcharts-more.js.map +1 -8
  201. package/highcharts-more.src.js +135 -75
  202. package/highcharts.js +413 -403
  203. package/highcharts.js.map +1 -8
  204. package/highcharts.src.js +11114 -4781
  205. package/highmaps.js +442 -433
  206. package/highmaps.js.map +1 -8
  207. package/highmaps.src.js +10740 -4598
  208. package/highstock.js +553 -540
  209. package/highstock.js.map +1 -8
  210. package/highstock.src.js +12807 -5343
  211. package/indicators/accumulation-distribution.js +4 -3
  212. package/indicators/accumulation-distribution.js.map +1 -8
  213. package/indicators/accumulation-distribution.src.js +6 -2
  214. package/indicators/atr.js +4 -3
  215. package/indicators/atr.js.map +1 -8
  216. package/indicators/atr.src.js +6 -2
  217. package/indicators/bollinger-bands.js +7 -6
  218. package/indicators/bollinger-bands.js.map +1 -8
  219. package/indicators/bollinger-bands.src.js +7 -3
  220. package/indicators/cci.js +4 -3
  221. package/indicators/cci.js.map +1 -8
  222. package/indicators/cci.src.js +6 -2
  223. package/indicators/cmf.js +5 -4
  224. package/indicators/cmf.js.map +1 -8
  225. package/indicators/cmf.src.js +6 -2
  226. package/indicators/ema.js +4 -3
  227. package/indicators/ema.js.map +1 -8
  228. package/indicators/ema.src.js +6 -2
  229. package/indicators/ichimoku-kinko-hyo.js +10 -9
  230. package/indicators/ichimoku-kinko-hyo.js.map +1 -8
  231. package/indicators/ichimoku-kinko-hyo.src.js +6 -2
  232. package/indicators/indicators.js +6 -5
  233. package/indicators/indicators.js.map +1 -8
  234. package/indicators/indicators.src.js +34 -15
  235. package/indicators/macd.js +11 -10
  236. package/indicators/macd.js.map +1 -8
  237. package/indicators/macd.src.js +10 -6
  238. package/indicators/mfi.js +5 -3
  239. package/indicators/mfi.js.map +1 -8
  240. package/indicators/mfi.src.js +6 -2
  241. package/indicators/momentum.js +4 -3
  242. package/indicators/momentum.js.map +1 -8
  243. package/indicators/momentum.src.js +7 -3
  244. package/indicators/pivot-points.js +8 -7
  245. package/indicators/pivot-points.js.map +1 -8
  246. package/indicators/pivot-points.src.js +12 -3
  247. package/indicators/price-envelopes.js +7 -6
  248. package/indicators/price-envelopes.js.map +1 -8
  249. package/indicators/price-envelopes.src.js +7 -3
  250. package/indicators/psar.js +5 -4
  251. package/indicators/psar.js.map +1 -8
  252. package/indicators/psar.src.js +6 -2
  253. package/indicators/roc.js +4 -3
  254. package/indicators/roc.js.map +1 -8
  255. package/indicators/roc.src.js +6 -2
  256. package/indicators/rsi.js +4 -3
  257. package/indicators/rsi.js.map +1 -8
  258. package/indicators/rsi.src.js +6 -2
  259. package/indicators/stochastic.js +7 -5
  260. package/indicators/stochastic.js.map +1 -8
  261. package/indicators/stochastic.src.js +14 -8
  262. package/indicators/volume-by-price.js +13 -12
  263. package/indicators/volume-by-price.js.map +1 -8
  264. package/indicators/volume-by-price.src.js +6 -2
  265. package/indicators/vwap.js +4 -3
  266. package/indicators/vwap.js.map +1 -8
  267. package/indicators/vwap.src.js +6 -2
  268. package/indicators/wma.js +4 -3
  269. package/indicators/wma.js.map +1 -8
  270. package/indicators/wma.src.js +6 -2
  271. package/indicators/zigzag.js +5 -3
  272. package/indicators/zigzag.js.map +1 -8
  273. package/indicators/zigzag.src.js +6 -2
  274. package/js/es-modules/indicators/accumulation-distribution.src.js +1 -1
  275. package/js/es-modules/indicators/atr.src.js +1 -1
  276. package/js/es-modules/indicators/bollinger-bands.src.js +2 -2
  277. package/js/es-modules/indicators/cci.src.js +1 -1
  278. package/js/es-modules/indicators/cmf.src.js +1 -1
  279. package/js/es-modules/indicators/ema.src.js +1 -1
  280. package/js/es-modules/indicators/ichimoku-kinko-hyo.src.js +1 -1
  281. package/js/es-modules/indicators/indicators.src.js +29 -14
  282. package/js/es-modules/indicators/macd.src.js +4 -4
  283. package/js/es-modules/indicators/mfi.src.js +1 -1
  284. package/js/es-modules/indicators/momentum.src.js +2 -2
  285. package/js/es-modules/indicators/pivot-points.src.js +7 -2
  286. package/js/es-modules/indicators/price-envelopes.src.js +2 -2
  287. package/js/es-modules/indicators/psar.src.js +1 -1
  288. package/js/es-modules/indicators/roc.src.js +1 -1
  289. package/js/es-modules/indicators/rsi.src.js +1 -1
  290. package/js/es-modules/indicators/stochastic.src.js +9 -7
  291. package/js/es-modules/indicators/volume-by-price.src.js +1 -1
  292. package/js/es-modules/indicators/vwap.src.js +1 -1
  293. package/js/es-modules/indicators/wma.src.js +1 -1
  294. package/js/es-modules/indicators/zigzag.src.js +1 -1
  295. package/js/es-modules/masters/highcharts-gantt.src.js +11 -0
  296. package/js/es-modules/masters/modules/annotations.src.js +1 -1
  297. package/js/es-modules/masters/modules/arrow-symbols.src.js +12 -0
  298. package/js/es-modules/masters/modules/broken-axis.src.js +1 -1
  299. package/js/es-modules/masters/modules/current-date-indicator.src.js +12 -0
  300. package/js/es-modules/masters/modules/data.src.js +1 -1
  301. package/js/es-modules/masters/modules/draggable-points.src.js +9 -0
  302. package/js/es-modules/masters/modules/export-data.src.js +1 -1
  303. package/js/es-modules/masters/modules/exporting.src.js +1 -1
  304. package/js/es-modules/masters/modules/funnel.src.js +1 -1
  305. package/js/es-modules/masters/modules/gantt.src.js +2 -1
  306. package/js/es-modules/masters/modules/grid-axis.src.js +1 -1
  307. package/js/es-modules/masters/modules/heatmap.src.js +1 -1
  308. package/js/es-modules/masters/modules/item-series.src.js +1 -1
  309. package/js/es-modules/masters/modules/map.src.js +1 -1
  310. package/js/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
  311. package/js/es-modules/masters/modules/pathfinder.src.js +12 -0
  312. package/js/es-modules/masters/modules/sankey.src.js +1 -1
  313. package/js/es-modules/masters/modules/series-label.src.js +1 -1
  314. package/js/es-modules/masters/modules/solid-gauge.src.js +1 -1
  315. package/js/es-modules/masters/modules/stock.src.js +1 -1
  316. package/js/es-modules/masters/modules/streamgraph.src.js +1 -1
  317. package/js/es-modules/masters/modules/treegrid.src.js +12 -0
  318. package/js/es-modules/masters/modules/variwide.src.js +1 -1
  319. package/js/es-modules/masters/modules/vector.src.js +1 -1
  320. package/js/es-modules/masters/modules/windbarb.src.js +1 -1
  321. package/js/es-modules/masters/modules/xrange.src.js +1 -1
  322. package/js/es-modules/masters/themes/dark-blue.src.js +1 -1
  323. package/js/es-modules/masters/themes/dark-green.src.js +1 -1
  324. package/js/es-modules/masters/themes/dark-unica.src.js +1 -1
  325. package/js/es-modules/masters/themes/gray.src.js +1 -1
  326. package/js/es-modules/masters/themes/grid-light.src.js +1 -1
  327. package/js/es-modules/masters/themes/grid.src.js +1 -1
  328. package/js/es-modules/masters/themes/sand-signika.src.js +1 -1
  329. package/js/es-modules/masters/themes/skies.src.js +1 -1
  330. package/js/es-modules/mixins/centered-series.js +36 -5
  331. package/js/es-modules/mixins/on-series.js +1 -1
  332. package/js/es-modules/mixins/polygon.js +4 -4
  333. package/js/es-modules/modules/annotations.src.js +2 -2
  334. package/js/es-modules/modules/boost-canvas.src.js +19 -8
  335. package/js/es-modules/modules/boost.src.js +300 -137
  336. package/js/es-modules/modules/broken-axis.src.js +169 -134
  337. package/js/es-modules/modules/bullet.src.js +2 -2
  338. package/js/es-modules/modules/data.src.js +8 -6
  339. package/js/es-modules/modules/draggable-points.src.js +2257 -0
  340. package/js/es-modules/modules/drilldown.src.js +4 -2
  341. package/js/es-modules/modules/export-data.src.js +11 -1
  342. package/js/es-modules/modules/exporting.src.js +62 -36
  343. package/js/es-modules/modules/funnel.src.js +5 -5
  344. package/js/es-modules/modules/histogram.src.js +30 -28
  345. package/js/es-modules/modules/item-series.src.js +36 -11
  346. package/js/es-modules/modules/keyboard-navigation.src.js +81 -44
  347. package/js/es-modules/modules/no-data-to-display.src.js +5 -5
  348. package/js/es-modules/modules/oldie.src.js +14 -9
  349. package/js/es-modules/modules/overlapping-datalabels.src.js +45 -21
  350. package/js/es-modules/modules/parallel-coordinates.src.js +4 -3
  351. package/js/es-modules/modules/pareto.src.js +1 -1
  352. package/js/es-modules/modules/sankey.src.js +23 -7
  353. package/js/es-modules/modules/series-label.src.js +6 -6
  354. package/js/es-modules/modules/solid-gauge.src.js +8 -5
  355. package/js/es-modules/modules/static-scale.src.js +67 -28
  356. package/js/es-modules/modules/streamgraph.src.js +4 -4
  357. package/js/es-modules/modules/sunburst.src.js +4 -4
  358. package/js/es-modules/modules/tilemap.src.js +231 -134
  359. package/js/es-modules/modules/treemap.src.js +29 -26
  360. package/js/es-modules/modules/variable-pie.src.js +3 -3
  361. package/js/es-modules/modules/variwide.src.js +36 -24
  362. package/js/es-modules/modules/vector.src.js +98 -28
  363. package/js/es-modules/modules/windbarb.src.js +4 -4
  364. package/js/es-modules/modules/wordcloud.src.js +133 -48
  365. package/js/es-modules/modules/xrange.src.js +256 -69
  366. package/js/es-modules/parts/AreaSeries.js +83 -50
  367. package/js/es-modules/parts/AreaSplineSeries.js +66 -29
  368. package/js/es-modules/parts/Axis.js +2089 -694
  369. package/js/es-modules/parts/BarSeries.js +70 -53
  370. package/js/es-modules/parts/CandlestickSeries.js +20 -10
  371. package/js/es-modules/parts/Chart.js +349 -157
  372. package/js/es-modules/parts/Color.js +74 -25
  373. package/js/es-modules/parts/ColumnSeries.js +241 -128
  374. package/js/es-modules/parts/DataGrouping.js +36 -3
  375. package/js/es-modules/parts/DataLabels.js +287 -116
  376. package/js/es-modules/parts/DateTimeAxis.js +27 -5
  377. package/js/es-modules/parts/Dynamics.js +236 -144
  378. package/js/es-modules/parts/FlagsSeries.js +49 -7
  379. package/js/es-modules/parts/Globals.js +4 -3
  380. package/js/es-modules/parts/Html.js +82 -16
  381. package/js/es-modules/parts/Interaction.js +187 -67
  382. package/js/es-modules/parts/Legend.js +181 -31
  383. package/js/es-modules/parts/LogarithmicAxis.js +36 -3
  384. package/js/es-modules/parts/MSPointer.js +31 -4
  385. package/js/es-modules/parts/Navigator.js +432 -162
  386. package/js/es-modules/parts/OHLCSeries.js +5 -5
  387. package/js/es-modules/parts/Options.js +855 -592
  388. package/js/es-modules/parts/OrdinalAxis.js +20 -6
  389. package/js/es-modules/parts/PieSeries.js +247 -134
  390. package/js/es-modules/parts/PlotBandSeries.experimental.js +2 -2
  391. package/js/es-modules/parts/PlotLineOrBand.js +671 -35
  392. package/js/es-modules/parts/Point.js +182 -70
  393. package/js/es-modules/parts/Pointer.js +263 -62
  394. package/js/es-modules/parts/RangeSelector.js +579 -91
  395. package/js/es-modules/parts/Responsive.js +82 -36
  396. package/js/es-modules/parts/ScatterSeries.js +58 -27
  397. package/js/es-modules/parts/ScrollablePlotArea.js +30 -9
  398. package/js/es-modules/parts/Scrollbar.js +201 -71
  399. package/js/es-modules/parts/Series.js +995 -745
  400. package/js/es-modules/parts/SplineSeries.js +53 -31
  401. package/js/es-modules/parts/Stacking.js +108 -7
  402. package/js/es-modules/parts/StockChart.js +26 -8
  403. package/js/es-modules/parts/SvgRenderer.js +1208 -598
  404. package/js/es-modules/parts/Tick.js +164 -30
  405. package/js/es-modules/parts/Time.js +171 -71
  406. package/js/es-modules/parts/Tooltip.js +276 -49
  407. package/js/es-modules/parts/TouchPointer.js +70 -3
  408. package/js/es-modules/parts/Utilities.js +1024 -429
  409. package/js/es-modules/parts-3d/Axis.js +4 -3
  410. package/js/es-modules/parts-3d/Chart.js +8 -9
  411. package/js/es-modules/parts-3d/Column.js +1 -1
  412. package/js/es-modules/parts-3d/Math.js +1 -1
  413. package/js/es-modules/parts-3d/Pie.js +1 -1
  414. package/js/es-modules/parts-3d/SVGRenderer.js +13 -10
  415. package/js/es-modules/parts-3d/Scatter.js +4 -4
  416. package/js/es-modules/parts-3d/Series.js +1 -1
  417. package/js/es-modules/parts-3d/VMLRenderer.js +1 -1
  418. package/js/es-modules/parts-gantt/ArrowSymbols.js +110 -0
  419. package/js/es-modules/parts-gantt/CurrentDateIndicator.js +92 -0
  420. package/js/es-modules/parts-gantt/GanttChart.js +111 -0
  421. package/js/es-modules/parts-gantt/GanttSeries.js +371 -0
  422. package/js/es-modules/parts-gantt/GridAxis.js +962 -0
  423. package/js/es-modules/parts-gantt/Pathfinder.js +1225 -0
  424. package/js/es-modules/parts-gantt/PathfinderAlgorithms.js +746 -0
  425. package/js/es-modules/parts-gantt/Tree.js +146 -0
  426. package/js/es-modules/parts-gantt/TreeGrid.js +891 -0
  427. package/js/es-modules/parts-map/ColorAxis.js +4 -5
  428. package/js/es-modules/parts-map/ColorSeriesMixin.js +3 -1
  429. package/js/es-modules/parts-map/GeoJSON.js +1 -1
  430. package/js/es-modules/parts-map/HeatmapSeries.js +124 -54
  431. package/js/es-modules/parts-map/Map.js +136 -47
  432. package/js/es-modules/parts-map/MapAxis.js +1 -1
  433. package/js/es-modules/parts-map/MapBubbleSeries.js +6 -5
  434. package/js/es-modules/parts-map/MapLineSeries.js +4 -4
  435. package/js/es-modules/parts-map/MapNavigation.js +50 -12
  436. package/js/es-modules/parts-map/MapPointSeries.js +3 -3
  437. package/js/es-modules/parts-map/MapPointer.js +1 -1
  438. package/js/es-modules/parts-map/MapSeries.js +5 -5
  439. package/js/es-modules/parts-more/AreaRangeSeries.js +82 -40
  440. package/js/es-modules/parts-more/AreaSplineRangeSeries.js +3 -3
  441. package/js/es-modules/parts-more/BoxPlotSeries.js +3 -3
  442. package/js/es-modules/parts-more/BubbleSeries.js +9 -4
  443. package/js/es-modules/parts-more/ColumnRangeSeries.js +3 -3
  444. package/js/es-modules/parts-more/ErrorBarSeries.js +6 -4
  445. package/js/es-modules/parts-more/GaugeSeries.js +3 -3
  446. package/js/es-modules/parts-more/Pane.js +3 -2
  447. package/js/es-modules/parts-more/Polar.js +1 -1
  448. package/js/es-modules/parts-more/PolygonSeries.js +3 -3
  449. package/js/es-modules/parts-more/RadialAxis.js +5 -4
  450. package/js/es-modules/parts-more/WaterfallSeries.js +9 -4
  451. package/js/es-modules/supplemental.docs.js +0 -1955
  452. package/js/es-modules/themes/dark-blue.js +1 -1
  453. package/js/es-modules/themes/dark-green.js +1 -1
  454. package/js/es-modules/themes/dark-unica.js +1 -1
  455. package/js/es-modules/themes/gray.js +1 -1
  456. package/js/es-modules/themes/grid-light.js +1 -1
  457. package/js/es-modules/themes/grid.js +1 -1
  458. package/js/es-modules/themes/sand-signika.js +1 -1
  459. package/js/es-modules/themes/skies.js +1 -1
  460. package/js/highcharts-3d.js +75 -74
  461. package/js/highcharts-3d.js.map +1 -8
  462. package/js/highcharts-3d.src.js +39 -32
  463. package/js/highcharts-gantt.js +480 -0
  464. package/js/highcharts-gantt.js.map +1 -0
  465. package/js/highcharts-gantt.src.js +47011 -0
  466. package/js/highcharts-more.js +63 -61
  467. package/js/highcharts-more.js.map +1 -8
  468. package/js/highcharts-more.src.js +135 -75
  469. package/js/highcharts.js +396 -387
  470. package/js/highcharts.js.map +1 -8
  471. package/js/highcharts.src.js +10765 -4659
  472. package/js/highmaps.js +419 -411
  473. package/js/highmaps.js.map +1 -8
  474. package/js/highmaps.src.js +10198 -4285
  475. package/js/highstock.js +529 -516
  476. package/js/highstock.js.map +1 -8
  477. package/js/highstock.src.js +12108 -4962
  478. package/js/indicators/accumulation-distribution.js +4 -3
  479. package/js/indicators/accumulation-distribution.js.map +1 -8
  480. package/js/indicators/accumulation-distribution.src.js +6 -2
  481. package/js/indicators/atr.js +4 -3
  482. package/js/indicators/atr.js.map +1 -8
  483. package/js/indicators/atr.src.js +6 -2
  484. package/js/indicators/bollinger-bands.js +7 -6
  485. package/js/indicators/bollinger-bands.js.map +1 -8
  486. package/js/indicators/bollinger-bands.src.js +7 -3
  487. package/js/indicators/cci.js +4 -3
  488. package/js/indicators/cci.js.map +1 -8
  489. package/js/indicators/cci.src.js +6 -2
  490. package/js/indicators/cmf.js +5 -4
  491. package/js/indicators/cmf.js.map +1 -8
  492. package/js/indicators/cmf.src.js +6 -2
  493. package/js/indicators/ema.js +4 -3
  494. package/js/indicators/ema.js.map +1 -8
  495. package/js/indicators/ema.src.js +6 -2
  496. package/js/indicators/ichimoku-kinko-hyo.js +10 -9
  497. package/js/indicators/ichimoku-kinko-hyo.js.map +1 -8
  498. package/js/indicators/ichimoku-kinko-hyo.src.js +6 -2
  499. package/js/indicators/indicators.js +6 -5
  500. package/js/indicators/indicators.js.map +1 -8
  501. package/js/indicators/indicators.src.js +34 -15
  502. package/js/indicators/macd.js +11 -10
  503. package/js/indicators/macd.js.map +1 -8
  504. package/js/indicators/macd.src.js +10 -6
  505. package/js/indicators/mfi.js +5 -3
  506. package/js/indicators/mfi.js.map +1 -8
  507. package/js/indicators/mfi.src.js +6 -2
  508. package/js/indicators/momentum.js +4 -3
  509. package/js/indicators/momentum.js.map +1 -8
  510. package/js/indicators/momentum.src.js +7 -3
  511. package/js/indicators/pivot-points.js +8 -7
  512. package/js/indicators/pivot-points.js.map +1 -8
  513. package/js/indicators/pivot-points.src.js +12 -3
  514. package/js/indicators/price-envelopes.js +7 -6
  515. package/js/indicators/price-envelopes.js.map +1 -8
  516. package/js/indicators/price-envelopes.src.js +7 -3
  517. package/js/indicators/psar.js +5 -4
  518. package/js/indicators/psar.js.map +1 -8
  519. package/js/indicators/psar.src.js +6 -2
  520. package/js/indicators/roc.js +4 -3
  521. package/js/indicators/roc.js.map +1 -8
  522. package/js/indicators/roc.src.js +6 -2
  523. package/js/indicators/rsi.js +4 -3
  524. package/js/indicators/rsi.js.map +1 -8
  525. package/js/indicators/rsi.src.js +6 -2
  526. package/js/indicators/stochastic.js +7 -5
  527. package/js/indicators/stochastic.js.map +1 -8
  528. package/js/indicators/stochastic.src.js +14 -8
  529. package/js/indicators/volume-by-price.js +13 -12
  530. package/js/indicators/volume-by-price.js.map +1 -8
  531. package/js/indicators/volume-by-price.src.js +6 -2
  532. package/js/indicators/vwap.js +4 -3
  533. package/js/indicators/vwap.js.map +1 -8
  534. package/js/indicators/vwap.src.js +6 -2
  535. package/js/indicators/wma.js +4 -3
  536. package/js/indicators/wma.js.map +1 -8
  537. package/js/indicators/wma.src.js +6 -2
  538. package/js/indicators/zigzag.js +5 -3
  539. package/js/indicators/zigzag.js.map +1 -8
  540. package/js/indicators/zigzag.src.js +6 -2
  541. package/js/modules/accessibility.js +52 -51
  542. package/js/modules/accessibility.js.map +1 -8
  543. package/js/modules/accessibility.src.js +86 -45
  544. package/js/modules/annotations.js +22 -21
  545. package/js/modules/annotations.js.map +1 -8
  546. package/js/modules/annotations.src.js +8 -4
  547. package/js/modules/arrow-symbols.js +13 -0
  548. package/js/modules/arrow-symbols.js.map +1 -0
  549. package/js/modules/arrow-symbols.src.js +138 -0
  550. package/js/modules/boost-canvas.js +15 -13
  551. package/js/modules/boost-canvas.js.map +1 -8
  552. package/js/modules/boost-canvas.src.js +24 -9
  553. package/js/modules/boost.js +57 -52
  554. package/js/modules/boost.js.map +1 -8
  555. package/js/modules/boost.src.js +305 -138
  556. package/js/modules/broken-axis.js +12 -10
  557. package/js/modules/broken-axis.js.map +1 -8
  558. package/js/modules/broken-axis.src.js +175 -136
  559. package/js/modules/bullet.js +3 -2
  560. package/js/modules/bullet.js.map +1 -8
  561. package/js/modules/bullet.src.js +7 -3
  562. package/js/modules/current-date-indicator.js +13 -0
  563. package/js/modules/current-date-indicator.js.map +1 -0
  564. package/js/modules/current-date-indicator.src.js +120 -0
  565. package/js/modules/data.js +25 -24
  566. package/js/modules/data.js.map +1 -8
  567. package/js/modules/data.src.js +14 -8
  568. package/js/modules/drag-panes.js +9 -8
  569. package/js/modules/drag-panes.js.map +1 -8
  570. package/js/modules/drag-panes.src.js +5 -1
  571. package/js/modules/draggable-points.js +38 -0
  572. package/js/modules/draggable-points.js.map +1 -0
  573. package/js/modules/draggable-points.src.js +2281 -0
  574. package/js/modules/drilldown.js +20 -19
  575. package/js/modules/drilldown.js.map +1 -8
  576. package/js/modules/drilldown.src.js +9 -3
  577. package/js/modules/export-data.js +20 -19
  578. package/js/modules/export-data.js.map +1 -8
  579. package/js/modules/export-data.src.js +17 -3
  580. package/js/modules/exporting.js +24 -23
  581. package/js/modules/exporting.js.map +1 -8
  582. package/js/modules/exporting.src.js +68 -38
  583. package/js/modules/funnel.js +8 -6
  584. package/js/modules/funnel.js.map +1 -8
  585. package/js/modules/funnel.src.js +11 -7
  586. package/js/modules/gantt.js +81 -18
  587. package/js/modules/gantt.js.map +1 -8
  588. package/js/modules/gantt.src.js +5494 -372
  589. package/js/modules/grid-axis.js +16 -10
  590. package/js/modules/grid-axis.js.map +1 -8
  591. package/js/modules/grid-axis.src.js +735 -293
  592. package/js/modules/heatmap.js +22 -21
  593. package/js/modules/heatmap.js.map +1 -8
  594. package/js/modules/heatmap.src.js +137 -62
  595. package/js/modules/histogram-bellcurve.js +9 -8
  596. package/js/modules/histogram-bellcurve.js.map +1 -8
  597. package/js/modules/histogram-bellcurve.src.js +35 -29
  598. package/js/modules/item-series.js +6 -4
  599. package/js/modules/item-series.js.map +1 -8
  600. package/js/modules/item-series.src.js +42 -13
  601. package/js/modules/map.js +63 -62
  602. package/js/modules/map.js.map +1 -8
  603. package/js/modules/map.src.js +353 -145
  604. package/js/modules/no-data-to-display.js +5 -4
  605. package/js/modules/no-data-to-display.js.map +1 -8
  606. package/js/modules/no-data-to-display.src.js +10 -6
  607. package/js/modules/offline-exporting.js +14 -13
  608. package/js/modules/offline-exporting.js.map +1 -8
  609. package/js/modules/offline-exporting.src.js +6 -2
  610. package/js/modules/oldie.js +29 -27
  611. package/js/modules/oldie.js.map +1 -8
  612. package/js/modules/oldie.src.js +20 -11
  613. package/js/modules/overlapping-datalabels.js +4 -3
  614. package/js/modules/overlapping-datalabels.js.map +1 -8
  615. package/js/modules/overlapping-datalabels.src.js +6 -2
  616. package/js/modules/parallel-coordinates.js +10 -9
  617. package/js/modules/parallel-coordinates.js.map +1 -8
  618. package/js/modules/parallel-coordinates.src.js +9 -4
  619. package/js/modules/pareto.js +5 -4
  620. package/js/modules/pareto.js.map +1 -8
  621. package/js/modules/pareto.src.js +6 -2
  622. package/js/modules/pathfinder.js +34 -0
  623. package/js/modules/pathfinder.js.map +1 -0
  624. package/js/modules/pathfinder.src.js +2106 -0
  625. package/js/modules/pattern-fill.js +13 -12
  626. package/js/modules/pattern-fill.js.map +1 -8
  627. package/js/modules/pattern-fill.src.js +5 -1
  628. package/js/modules/sankey.js +13 -12
  629. package/js/modules/sankey.js.map +1 -8
  630. package/js/modules/sankey.src.js +29 -9
  631. package/js/modules/series-label.js +17 -15
  632. package/js/modules/series-label.js.map +1 -8
  633. package/js/modules/series-label.src.js +12 -8
  634. package/js/modules/solid-gauge.js +9 -8
  635. package/js/modules/solid-gauge.js.map +1 -8
  636. package/js/modules/solid-gauge.src.js +14 -7
  637. package/js/modules/static-scale.js +4 -3
  638. package/js/modules/static-scale.js.map +1 -8
  639. package/js/modules/static-scale.src.js +69 -26
  640. package/js/modules/stock.js +136 -132
  641. package/js/modules/stock.js.map +1 -8
  642. package/js/modules/stock.src.js +1543 -499
  643. package/js/modules/streamgraph.js +4 -3
  644. package/js/modules/streamgraph.js.map +1 -8
  645. package/js/modules/streamgraph.src.js +10 -6
  646. package/js/modules/sunburst.js +40 -39
  647. package/js/modules/sunburst.js.map +1 -8
  648. package/js/modules/sunburst.src.js +38 -31
  649. package/js/modules/tilemap.js +19 -18
  650. package/js/modules/tilemap.js.map +1 -8
  651. package/js/modules/tilemap.src.js +363 -190
  652. package/js/modules/treegrid.js +51 -0
  653. package/js/modules/treegrid.js.map +1 -0
  654. package/js/modules/treegrid.src.js +2759 -0
  655. package/js/modules/treemap.js +27 -26
  656. package/js/modules/treemap.js.map +1 -8
  657. package/js/modules/treemap.src.js +34 -27
  658. package/js/modules/variable-pie.js +8 -7
  659. package/js/modules/variable-pie.js.map +1 -8
  660. package/js/modules/variable-pie.src.js +8 -4
  661. package/js/modules/variwide.js +8 -7
  662. package/js/modules/variwide.js.map +1 -8
  663. package/js/modules/variwide.src.js +42 -26
  664. package/js/modules/vector.js +7 -6
  665. package/js/modules/vector.js.map +1 -8
  666. package/js/modules/vector.src.js +104 -30
  667. package/js/modules/windbarb.js +11 -10
  668. package/js/modules/windbarb.js.map +1 -8
  669. package/js/modules/windbarb.src.js +11 -7
  670. package/js/modules/wordcloud.js +18 -15
  671. package/js/modules/wordcloud.js.map +1 -8
  672. package/js/modules/wordcloud.src.js +142 -53
  673. package/js/modules/xrange.js +12 -10
  674. package/js/modules/xrange.js.map +1 -8
  675. package/js/modules/xrange.src.js +262 -71
  676. package/js/themes/avocado.js +3 -2
  677. package/js/themes/avocado.js.map +1 -8
  678. package/js/themes/avocado.src.js +5 -1
  679. package/js/themes/dark-blue.js +9 -8
  680. package/js/themes/dark-blue.js.map +1 -8
  681. package/js/themes/dark-blue.src.js +7 -3
  682. package/js/themes/dark-green.js +9 -8
  683. package/js/themes/dark-green.js.map +1 -8
  684. package/js/themes/dark-green.src.js +7 -3
  685. package/js/themes/dark-unica.js +9 -7
  686. package/js/themes/dark-unica.js.map +1 -8
  687. package/js/themes/dark-unica.src.js +7 -3
  688. package/js/themes/gray.js +10 -8
  689. package/js/themes/gray.js.map +1 -8
  690. package/js/themes/gray.src.js +7 -3
  691. package/js/themes/grid-light.js +5 -4
  692. package/js/themes/grid-light.js.map +1 -8
  693. package/js/themes/grid-light.src.js +7 -3
  694. package/js/themes/grid.js +6 -5
  695. package/js/themes/grid.js.map +1 -8
  696. package/js/themes/grid.src.js +7 -3
  697. package/js/themes/sand-signika.js +6 -5
  698. package/js/themes/sand-signika.js.map +1 -8
  699. package/js/themes/sand-signika.src.js +7 -3
  700. package/js/themes/skies.js +6 -5
  701. package/js/themes/skies.js.map +1 -8
  702. package/js/themes/skies.src.js +7 -3
  703. package/js/themes/sunset.js +3 -2
  704. package/js/themes/sunset.js.map +1 -8
  705. package/js/themes/sunset.src.js +5 -1
  706. package/modules/accessibility.js +53 -51
  707. package/modules/accessibility.js.map +1 -8
  708. package/modules/accessibility.src.js +86 -45
  709. package/modules/annotations.js +24 -22
  710. package/modules/annotations.js.map +1 -8
  711. package/modules/annotations.src.js +8 -4
  712. package/modules/arrow-symbols.js +13 -0
  713. package/modules/arrow-symbols.js.map +1 -0
  714. package/modules/arrow-symbols.src.js +138 -0
  715. package/modules/boost-canvas.js +15 -13
  716. package/modules/boost-canvas.js.map +1 -8
  717. package/modules/boost-canvas.src.js +24 -9
  718. package/modules/boost.js +57 -52
  719. package/modules/boost.js.map +1 -8
  720. package/modules/boost.src.js +305 -138
  721. package/modules/broken-axis.js +12 -10
  722. package/modules/broken-axis.js.map +1 -8
  723. package/modules/broken-axis.src.js +175 -136
  724. package/modules/bullet.js +6 -5
  725. package/modules/bullet.js.map +1 -8
  726. package/modules/bullet.src.js +7 -3
  727. package/modules/current-date-indicator.js +13 -0
  728. package/modules/current-date-indicator.js.map +1 -0
  729. package/modules/current-date-indicator.src.js +120 -0
  730. package/modules/data.js +25 -24
  731. package/modules/data.js.map +1 -8
  732. package/modules/data.src.js +14 -8
  733. package/modules/drag-panes.js +9 -8
  734. package/modules/drag-panes.js.map +1 -8
  735. package/modules/drag-panes.src.js +5 -1
  736. package/modules/draggable-points.js +38 -0
  737. package/modules/draggable-points.js.map +1 -0
  738. package/modules/draggable-points.src.js +2281 -0
  739. package/modules/drilldown.js +16 -15
  740. package/modules/drilldown.js.map +1 -8
  741. package/modules/drilldown.src.js +9 -3
  742. package/modules/export-data.js +20 -19
  743. package/modules/export-data.js.map +1 -8
  744. package/modules/export-data.src.js +17 -3
  745. package/modules/exporting.js +23 -21
  746. package/modules/exporting.js.map +1 -8
  747. package/modules/exporting.src.js +68 -38
  748. package/modules/funnel.js +8 -7
  749. package/modules/funnel.js.map +1 -8
  750. package/modules/funnel.src.js +11 -7
  751. package/modules/gantt.js +84 -19
  752. package/modules/gantt.js.map +1 -8
  753. package/modules/gantt.src.js +5557 -379
  754. package/modules/grid-axis.js +17 -10
  755. package/modules/grid-axis.js.map +1 -8
  756. package/modules/grid-axis.src.js +736 -293
  757. package/modules/heatmap.js +22 -21
  758. package/modules/heatmap.js.map +1 -8
  759. package/modules/heatmap.src.js +139 -63
  760. package/modules/histogram-bellcurve.js +9 -8
  761. package/modules/histogram-bellcurve.js.map +1 -8
  762. package/modules/histogram-bellcurve.src.js +35 -29
  763. package/modules/item-series.js +6 -4
  764. package/modules/item-series.js.map +1 -8
  765. package/modules/item-series.src.js +42 -13
  766. package/modules/map.js +65 -64
  767. package/modules/map.js.map +1 -8
  768. package/modules/map.src.js +365 -152
  769. package/modules/no-data-to-display.js +5 -4
  770. package/modules/no-data-to-display.js.map +1 -8
  771. package/modules/no-data-to-display.src.js +10 -6
  772. package/modules/offline-exporting.js +14 -12
  773. package/modules/offline-exporting.js.map +1 -8
  774. package/modules/offline-exporting.src.js +6 -2
  775. package/modules/oldie.js +29 -27
  776. package/modules/oldie.js.map +1 -8
  777. package/modules/oldie.src.js +20 -11
  778. package/modules/overlapping-datalabels.js +4 -3
  779. package/modules/overlapping-datalabels.js.map +1 -8
  780. package/modules/overlapping-datalabels.src.js +6 -2
  781. package/modules/parallel-coordinates.js +10 -9
  782. package/modules/parallel-coordinates.js.map +1 -8
  783. package/modules/parallel-coordinates.src.js +9 -4
  784. package/modules/pareto.js +5 -4
  785. package/modules/pareto.js.map +1 -8
  786. package/modules/pareto.src.js +6 -2
  787. package/modules/pathfinder.js +35 -0
  788. package/modules/pathfinder.js.map +1 -0
  789. package/modules/pathfinder.src.js +2128 -0
  790. package/modules/pattern-fill.js +13 -12
  791. package/modules/pattern-fill.js.map +1 -8
  792. package/modules/pattern-fill.src.js +5 -1
  793. package/modules/sankey.js +13 -12
  794. package/modules/sankey.js.map +1 -8
  795. package/modules/sankey.src.js +34 -12
  796. package/modules/series-label.js +17 -15
  797. package/modules/series-label.js.map +1 -8
  798. package/modules/series-label.src.js +12 -8
  799. package/modules/solid-gauge.js +9 -8
  800. package/modules/solid-gauge.js.map +1 -8
  801. package/modules/solid-gauge.src.js +16 -9
  802. package/modules/static-scale.js +4 -3
  803. package/modules/static-scale.js.map +1 -8
  804. package/modules/static-scale.src.js +69 -26
  805. package/modules/stock.js +143 -139
  806. package/modules/stock.js.map +1 -8
  807. package/modules/stock.src.js +1701 -566
  808. package/modules/streamgraph.js +4 -3
  809. package/modules/streamgraph.js.map +1 -8
  810. package/modules/streamgraph.src.js +10 -6
  811. package/modules/sunburst.js +42 -41
  812. package/modules/sunburst.js.map +1 -8
  813. package/modules/sunburst.src.js +39 -32
  814. package/modules/tilemap.js +18 -17
  815. package/modules/tilemap.js.map +1 -8
  816. package/modules/tilemap.src.js +365 -191
  817. package/modules/treegrid.js +52 -0
  818. package/modules/treegrid.js.map +1 -0
  819. package/modules/treegrid.src.js +2797 -0
  820. package/modules/treemap.js +29 -28
  821. package/modules/treemap.js.map +1 -8
  822. package/modules/treemap.src.js +35 -28
  823. package/modules/variable-pie.js +8 -7
  824. package/modules/variable-pie.js.map +1 -8
  825. package/modules/variable-pie.src.js +8 -4
  826. package/modules/variwide.js +8 -7
  827. package/modules/variwide.js.map +1 -8
  828. package/modules/variwide.src.js +42 -26
  829. package/modules/vector.js +7 -6
  830. package/modules/vector.js.map +1 -8
  831. package/modules/vector.src.js +104 -30
  832. package/modules/windbarb.js +11 -10
  833. package/modules/windbarb.js.map +1 -8
  834. package/modules/windbarb.src.js +11 -7
  835. package/modules/wordcloud.js +18 -15
  836. package/modules/wordcloud.js.map +1 -8
  837. package/modules/wordcloud.src.js +142 -53
  838. package/modules/xrange.js +13 -11
  839. package/modules/xrange.js.map +1 -8
  840. package/modules/xrange.src.js +264 -80
  841. package/package.json +1 -1
  842. package/themes/avocado.js +3 -2
  843. package/themes/avocado.js.map +1 -8
  844. package/themes/avocado.src.js +5 -1
  845. package/themes/dark-blue.js +9 -8
  846. package/themes/dark-blue.js.map +1 -8
  847. package/themes/dark-blue.src.js +7 -3
  848. package/themes/dark-green.js +9 -8
  849. package/themes/dark-green.js.map +1 -8
  850. package/themes/dark-green.src.js +7 -3
  851. package/themes/dark-unica.js +9 -7
  852. package/themes/dark-unica.js.map +1 -8
  853. package/themes/dark-unica.src.js +7 -3
  854. package/themes/gray.js +10 -8
  855. package/themes/gray.js.map +1 -8
  856. package/themes/gray.src.js +7 -3
  857. package/themes/grid-light.js +5 -4
  858. package/themes/grid-light.js.map +1 -8
  859. package/themes/grid-light.src.js +7 -3
  860. package/themes/grid.js +6 -5
  861. package/themes/grid.js.map +1 -8
  862. package/themes/grid.src.js +7 -3
  863. package/themes/sand-signika.js +6 -5
  864. package/themes/sand-signika.js.map +1 -8
  865. package/themes/sand-signika.src.js +7 -3
  866. package/themes/skies.js +6 -5
  867. package/themes/skies.js.map +1 -8
  868. package/themes/skies.src.js +7 -3
  869. package/themes/sunset.js +3 -2
  870. package/themes/sunset.js.map +1 -8
  871. package/themes/sunset.src.js +5 -1
@@ -1,13 +1,261 @@
1
1
  /**
2
- * (c) 2010-2017 Torstein Honsi
2
+ * (c) 2010-2018 Torstein Honsi
3
3
  *
4
4
  * License: www.highcharts.com/license
5
5
  */
6
6
 
7
+ /**
8
+ * Options to align the element relative to the chart or another box.
9
+ *
10
+ * @typedef Highcharts.AlignObject
11
+ *
12
+ * @property {string} [align='left']
13
+ * Horizontal alignment. Can be one of `left`, `center` and
14
+ * `right`.
15
+ *
16
+ * @property {string} [verticalAlign='top']
17
+ * Vertical alignment. Can be one of `top`, `middle` and `bottom`.
18
+ *
19
+ * @property {number} [x=0]
20
+ * Horizontal pixel offset from alignment.
21
+ *
22
+ * @property {number} [y=0]
23
+ * Vertical pixel offset from alignment.
24
+ *
25
+ * @property {boolean} [alignByTranslate=false]
26
+ * Use the `transform` attribute with translateX and translateY
27
+ * custom attributes to align this elements rather than `x` and
28
+ * `y` attributes.
29
+ */
30
+
31
+ /**
32
+ * Bounding box of an element.
33
+ *
34
+ * @typedef Highcharts.BBoxObject
35
+ *
36
+ * @property {number} height
37
+ * Height of the bounding box.
38
+ *
39
+ * @property {number} width
40
+ * Width of the bounding box.
41
+ *
42
+ * @property {number} x
43
+ * Horizontal position of the bounding box.
44
+ *
45
+ * @property {number} y
46
+ * Vertical position of the bounding box.
47
+ */
48
+
49
+ /**
50
+ * A clipping rectangle that can be applied to one or more
51
+ * {@link SVGElement} instances. It is instanciated with the
52
+ * {@link SVGRenderer#clipRect} function and applied with the
53
+ * {@link SVGElement#clip} function.
54
+ *
55
+ * @example
56
+ * var circle = renderer.circle(100, 100, 100)
57
+ * .attr({ fill: 'red' })
58
+ * .add();
59
+ * var clipRect = renderer.clipRect(100, 100, 100, 100);
60
+ *
61
+ * // Leave only the lower right quarter visible
62
+ * circle.clip(clipRect);
63
+ *
64
+ * @typedef {Highcharts.SVGElement} Highcharts.ClipRectElement
65
+ */
66
+
67
+ /**
68
+ * The font metrics.
69
+ *
70
+ * @typedef Highcharts.FontMetricsObject
71
+ *
72
+ * @property {number} b
73
+ * The baseline relative to the top of the box.
74
+ *
75
+ * @property {number} h
76
+ * The line height.
77
+ *
78
+ * @property {number} f
79
+ * The font size.
80
+ */
81
+
82
+ /**
83
+ * Gradient options instead of a solid color.
84
+ *
85
+ * @example
86
+ * // Linear gradient used as a color option
87
+ * color: {
88
+ * linearGradient: { x1: 0, x2: 0, y1: 0, y2: 1 },
89
+ * stops: [
90
+ * [0, '#003399'], // start
91
+ * [0.5, '#ffffff'], // middle
92
+ * [1, '#3366AA'] // end
93
+ * ]
94
+ * }
95
+ * }
96
+ *
97
+ * @private
98
+ * @typedef Highcharts.GradientColorObject
99
+ *
100
+ * @property {Highcharts.LinearGradientColorObject} linearGradient
101
+ * Holds an object that defines the start position and the end
102
+ * position relative to the shape.
103
+ *
104
+ * @property {Highcharts.RadialGradientColorObject} radialGradient
105
+ * Holds an object that defines the center position and the
106
+ * radius.
107
+ *
108
+ * @property {Array<Array<number|string>>} stops
109
+ * The first item in each tuple is the position in the gradient,
110
+ * where 0 is the start of the gradient and 1 is the end of the
111
+ * gradient. Multiple stops can be applied. The second item is the
112
+ * color for each stop. This color can also be given in the rgba
113
+ * format.
114
+ */
115
+
116
+ /**
117
+ * Defines the start position and the end position for a gradient relative
118
+ * to the shape.
119
+ *
120
+ * @private
121
+ * @typedef Highcharts.LinearGradientColorObject
122
+ *
123
+ * @property {number} x1
124
+ * Start horizontal position of the gradient. Ranges 0-1.
125
+ *
126
+ * @property {number} x2
127
+ * End horizontal position of the gradient. Ranges 0-1.
128
+ *
129
+ * @property {number} y1
130
+ * Start vertical position of the gradient. Ranges 0-1.
131
+ *
132
+ * @property {number} y2
133
+ * End vertical position of the gradient. Ranges 0-1.
134
+ */
135
+
136
+ /**
137
+ * Defines the center position and the radius for a gradient.
138
+ *
139
+ * @private
140
+ * @typedef Highcharts.RadialGradientColorObject
141
+ *
142
+ * @property {number} cx
143
+ * Center horizontal position relative to the shape. Ranges 0-1.
144
+ *
145
+ * @property {number} cy
146
+ * Center vertical position relative to the shape. Ranges 0-1.
147
+ *
148
+ * @property {number} r
149
+ * Radius relative to the shape. Ranges 0-1.
150
+ */
151
+
152
+ /**
153
+ * A rectangle.
154
+ *
155
+ * @typedef Highcharts.RectangleObject
156
+ *
157
+ * @property {number} height
158
+ * Height of the rectangle.
159
+ *
160
+ * @property {number} width
161
+ * Width of the rectangle.
162
+ *
163
+ * @property {number} x
164
+ * Horizontal position of the rectangle.
165
+ *
166
+ * @property {number} y
167
+ * Vertical position of the rectangle.
168
+ */
169
+
170
+ /**
171
+ * The shadow options.
172
+ *
173
+ * @typedef Highcharts.ShadowOptionsObject
174
+ *
175
+ * @property {string} [color=#000000]
176
+ * The shadow color.
177
+ *
178
+ * @property {number} [offsetX=1]
179
+ * The horizontal offset from the element.
180
+ *
181
+ * @property {number} [offsetY=1]
182
+ * The vertical offset from the element.
183
+ *
184
+ * @property {number} [opacity=0.15]
185
+ * The shadow opacity.
186
+ *
187
+ * @property {number} [width=3]
188
+ * The shadow width or distance from the element.
189
+ */
190
+
191
+ /**
192
+ * Serialized form of an SVG definition, including children. Some key
193
+ * property names are reserved: tagName, textContent, and children.
194
+ *
195
+ * @typedef Highcharts.SVGDefinitionObject
196
+ *
197
+ * @property {number|string|Array<Highcharts.SVGDefinitionObject>|undefined} [key:string]
198
+ *
199
+ * @property {Array<Highcharts.SVGDefinitionObject>} [children]
200
+ *
201
+ * @property {string} [tagName]
202
+ *
203
+ * @property {string} [textContent]
204
+ */
205
+
206
+ /**
207
+ * An extendable collection of functions for defining symbol paths.
208
+ *
209
+ * @typedef Highcharts.SymbolDictionary
210
+ *
211
+ * @property {Function} [key:Highcharts.SymbolKey]
212
+ */
213
+
214
+ /**
215
+ * Can be one of `arc`, `callout`, `circle`, `diamond`, `square`,
216
+ * `triangle`, `triangle-down`. Symbols are used internally for point
217
+ * markers, button and label borders and backgrounds, or custom shapes.
218
+ * Extendable by adding to {@link SVGRenderer#symbols}.
219
+ *
220
+ * @typedef {string} Highcharts.SymbolKey
221
+ *
222
+ * @validvalue ["arc", "callout", "circle", "diamond", "square", "triangle",
223
+ * "triangle-down"]
224
+ */
225
+
226
+ /**
227
+ * Additional options, depending on the actual symbol drawn.
228
+ *
229
+ * @typedef Highcharts.SymbolOptionsObject
230
+ *
231
+ * @property {number} anchorX
232
+ * The anchor X position for the `callout` symbol. This is where
233
+ * the chevron points to.
234
+ *
235
+ * @property {number} anchorY
236
+ * The anchor Y position for the `callout` symbol. This is where
237
+ * the chevron points to.
238
+ *
239
+ * @property {number} end
240
+ * The end angle of an `arc` symbol.
241
+ *
242
+ * @property {boolean} open
243
+ * Whether to draw `arc` symbol open or closed.
244
+ *
245
+ * @property {number} r
246
+ * The radius of an `arc` symbol, or the border radius for the
247
+ * `callout` symbol.
248
+ *
249
+ * @property {number} start
250
+ * The start angle of an `arc` symbol.
251
+ */
252
+
7
253
  'use strict';
254
+
8
255
  import H from './Globals.js';
9
256
  import './Utilities.js';
10
257
  import './Color.js';
258
+
11
259
  var SVGElement,
12
260
  SVGRenderer,
13
261
 
@@ -47,9 +295,6 @@ var SVGElement,
47
295
  symbolSizes = H.symbolSizes,
48
296
  win = H.win;
49
297
 
50
- /**
51
- * @typedef {Object} SVGDOMElement - An SVG DOM element.
52
- */
53
298
  /**
54
299
  * The SVGElement prototype is a JavaScript wrapper for SVG elements used in the
55
300
  * rendering layer of Highcharts. Combined with the {@link
@@ -65,7 +310,8 @@ var SVGElement,
65
310
  * [label]{@link Highcharts.SVGRenderer#label}, [g]{@link
66
311
  * Highcharts.SVGRenderer#g} and more.
67
312
  *
68
- * @class Highcharts.SVGElement
313
+ * @class
314
+ * @name Highcharts.SVGElement
69
315
  */
70
316
  SVGElement = H.SVGElement = function () {
71
317
  return this;
@@ -80,21 +326,24 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
80
326
  * For labels, these CSS properties are applied to the `text` node directly.
81
327
  *
82
328
  * @private
83
- * @type {Array<String>}
329
+ * @name Highcharts.SVGElement#textProps
330
+ * @type {Array<string>}
84
331
  */
85
332
  textProps: ['direction', 'fontSize', 'fontWeight', 'fontFamily',
86
333
  'fontStyle', 'color', 'lineHeight', 'width', 'textAlign',
87
- 'textDecoration', 'textOverflow', 'textOutline'],
334
+ 'textDecoration', 'textOverflow', 'textOutline', 'cursor'],
88
335
 
89
336
  /**
90
337
  * Initialize the SVG element. This function only exists to make the
91
338
  * initiation process overridable. It should not be called directly.
92
339
  *
93
- * @param {SVGRenderer} renderer
94
- * The SVGRenderer instance to initialize to.
95
- * @param {String} nodeName
96
- * The SVG node name.
340
+ * @function Highcharts.SVGElement#init
341
+ *
342
+ * @param {Highcharts.SVGRenderer} renderer
343
+ * The SVGRenderer instance to initialize to.
97
344
  *
345
+ * @param {string} nodeName
346
+ * The SVG node name.
98
347
  */
99
348
  init: function (renderer, nodeName) {
100
349
 
@@ -102,9 +351,8 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
102
351
  * The primary DOM node. Each `SVGElement` instance wraps a main DOM
103
352
  * node, but may also represent more nodes.
104
353
  *
105
- * @name element
106
- * @memberof SVGElement
107
- * @type {SVGDOMNode|HTMLDOMNode}
354
+ * @name Highcharts.SVGElement#element
355
+ * @type {Highcharts.SVGDOMElement|Highcharts.HTMLDOMElement}
108
356
  */
109
357
  this.element = nodeName === 'span' ?
110
358
  createElement(nodeName) :
@@ -113,9 +361,8 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
113
361
  /**
114
362
  * The renderer that the SVGElement belongs to.
115
363
  *
116
- * @name renderer
117
- * @memberof SVGElement
118
- * @type {SVGRenderer}
364
+ * @name Highcharts.SVGElement#renderer
365
+ * @type {Highcharts.SVGRenderer}
119
366
  */
120
367
  this.renderer = renderer;
121
368
  },
@@ -123,14 +370,22 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
123
370
  /**
124
371
  * Animate to given attributes or CSS properties.
125
372
  *
126
- * @param {SVGAttributes} params SVG attributes or CSS to animate.
127
- * @param {AnimationOptions} [options] Animation options.
128
- * @param {Function} [complete] Function to perform at the end of animation.
129
- *
130
373
  * @sample highcharts/members/element-on/
131
374
  * Setting some attributes by animation
132
375
  *
133
- * @returns {SVGElement} Returns the SVGElement for chaining.
376
+ * @function Highcharts.SVGElement#animate
377
+ *
378
+ * @param {Highcharts.SVGAttributes} params
379
+ * SVG attributes or CSS to animate.
380
+ *
381
+ * @param {Highcharts.AnimationOptionsObject} [options]
382
+ * Animation options.
383
+ *
384
+ * @param {Function} [complete]
385
+ * Function to perform at the end of animation.
386
+ *
387
+ * @return {Highcharts.SVGElement}
388
+ * Returns the SVGElement for chaining.
134
389
  */
135
390
  animate: function (params, options, complete) {
136
391
  var animOptions = H.animObject(
@@ -152,54 +407,22 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
152
407
  return this;
153
408
  },
154
409
 
155
- /**
156
- * @typedef {Object} GradientOptions
157
- * @property {Object} linearGradient Holds an object that defines the start
158
- * position and the end position relative to the shape.
159
- * @property {Number} linearGradient.x1 Start horizontal position of the
160
- * gradient. Ranges 0-1.
161
- * @property {Number} linearGradient.x2 End horizontal position of the
162
- * gradient. Ranges 0-1.
163
- * @property {Number} linearGradient.y1 Start vertical position of the
164
- * gradient. Ranges 0-1.
165
- * @property {Number} linearGradient.y2 End vertical position of the
166
- * gradient. Ranges 0-1.
167
- * @property {Object} radialGradient Holds an object that defines the center
168
- * position and the radius.
169
- * @property {Number} radialGradient.cx Center horizontal position relative
170
- * to the shape. Ranges 0-1.
171
- * @property {Number} radialGradient.cy Center vertical position relative
172
- * to the shape. Ranges 0-1.
173
- * @property {Number} radialGradient.r Radius relative to the shape. Ranges
174
- * 0-1.
175
- * @property {Array<Array<Number|String>>} stops The first item in each
176
- * tuple is the position in the gradient, where 0 is the start of the
177
- * gradient and 1 is the end of the gradient. Multiple stops can be
178
- * applied. The second item is the color for each stop. This color can
179
- * also be given in the rgba format.
180
- *
181
- * @example
182
- * // Linear gradient used as a color option
183
- * color: {
184
- * linearGradient: { x1: 0, x2: 0, y1: 0, y2: 1 },
185
- * stops: [
186
- * [0, '#003399'], // start
187
- * [0.5, '#ffffff'], // middle
188
- * [1, '#3366AA'] // end
189
- * ]
190
- * }
191
- * }
192
- */
193
410
  /**
194
411
  * Build and apply an SVG gradient out of a common JavaScript configuration
195
412
  * object. This function is called from the attribute setters. An event
196
413
  * hook is added for supporting other complex color types.
197
414
  *
198
415
  * @private
199
- * @param {GradientOptions} color The gradient options structure.
200
- * @param {string} prop The property to apply, can either be `fill` or
201
- * `stroke`.
202
- * @param {SVGDOMElement} elem SVG DOM element to apply the gradient on.
416
+ * @function Highcharts.SVGElement#complexColor
417
+ *
418
+ * @param {Highcharts.GradientColorObject} color
419
+ * The gradient options structure.
420
+ *
421
+ * @param {string} prop
422
+ * The property to apply, can either be `fill` or `stroke`.
423
+ *
424
+ * @param {Highcharts.SVGDOMElement} elem
425
+ * SVG DOM element to apply the gradient on.
203
426
  */
204
427
  complexColor: function (color, prop, elem) {
205
428
  var renderer = this.renderer,
@@ -327,12 +550,9 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
327
550
 
328
551
  /**
329
552
  * Apply a text outline through a custom CSS property, by copying the text
330
- * element and apply stroke to the copy. Used internally. Contrast checks
331
- * at http://jsfiddle.net/highcharts/43soe9m1/2/ .
553
+ * element and apply stroke to the copy. Used internally. Contrast checks at
554
+ * {@link https://jsfiddle.net/highcharts/43soe9m1/2/}.
332
555
  *
333
- * @private
334
- * @param {String} textOutline A custom CSS `text-outline` setting, defined
335
- * by `width color`.
336
556
  * @example
337
557
  * // Specific color
338
558
  * text.css({
@@ -343,6 +563,12 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
343
563
  * color: '#000000', // black text
344
564
  * textOutline: '1px contrast' // => white outline
345
565
  * });
566
+ *
567
+ * @private
568
+ * @function Highcharts.SVGElement#applyTextOutline
569
+ *
570
+ * @param {string} textOutline
571
+ * A custom CSS `text-outline` setting, defined by `width color`.
346
572
  */
347
573
  applyTextOutline: function (textOutline) {
348
574
  var elem = this.element,
@@ -429,23 +655,6 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
429
655
  }
430
656
  },
431
657
 
432
- /**
433
- *
434
- * @typedef {Object} SVGAttributes An object of key-value pairs for SVG
435
- * attributes. Attributes in Highcharts elements for the most parts
436
- * correspond to SVG, but some are specific to Highcharts, like `zIndex`,
437
- * `rotation`, `rotationOriginX`, `rotationOriginY`, `translateX`,
438
- * `translateY`, `scaleX` and `scaleY`. SVG attributes containing a hyphen
439
- * are _not_ camel-cased, they should be quoted to preserve the hyphen.
440
- *
441
- * @example
442
- * {
443
- * 'stroke': '#ff0000', // basic
444
- * 'stroke-width': 2, // hyphenated
445
- * 'rotation': 45 // custom
446
- * 'd': ['M', 10, 10, 'L', 30, 30, 'z'] // path definition, note format
447
- * }
448
- */
449
658
  /**
450
659
  * Apply native and custom attributes to the SVG elements.
451
660
  *
@@ -456,24 +665,6 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
456
665
  * Attributes frequently used in Highcharts are `fill`, `stroke`,
457
666
  * `stroke-width`.
458
667
  *
459
- * @param {SVGAttributes|String} hash - The native and custom SVG
460
- * attributes.
461
- * @param {string} [val] - If the type of the first argument is `string`,
462
- * the second can be a value, which will serve as a single attribute
463
- * setter. If the first argument is a string and the second is undefined,
464
- * the function serves as a getter and the current value of the property
465
- * is returned.
466
- * @param {Function} [complete] - A callback function to execute after
467
- * setting the attributes. This makes the function compliant and
468
- * interchangeable with the {@link SVGElement#animate} function.
469
- * @param {boolean} [continueAnimation=true] Used internally when `.attr` is
470
- * called as part of an animation step. Otherwise, calling `.attr` for an
471
- * attribute will stop animation for that attribute.
472
- *
473
- * @returns {SVGElement|string|number} If used as a setter, it returns the
474
- * current {@link SVGElement} so the calls can be chained. If used as a
475
- * getter, the current value of the attribute is returned.
476
- *
477
668
  * @sample highcharts/members/renderer-rect/
478
669
  * Setting some attributes
479
670
  *
@@ -492,6 +683,32 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
492
683
  * // Get an attribute
493
684
  * element.attr('stroke'); // => 'red'
494
685
  *
686
+ * @function Highcharts.SVGElement#attr
687
+ *
688
+ * @param {string|Highcharts.SVGAttributes} [hash]
689
+ * The native and custom SVG attributes.
690
+ *
691
+ * @param {string} [val]
692
+ * If the type of the first argument is `string`, the second can be a
693
+ * value, which will serve as a single attribute setter. If the first
694
+ * argument is a string and the second is undefined, the function
695
+ * serves as a getter and the current value of the property is
696
+ * returned.
697
+ *
698
+ * @param {Function} [complete]
699
+ * A callback function to execute after setting the attributes. This
700
+ * makes the function compliant and interchangeable with the
701
+ * {@link SVGElement#animate} function.
702
+ *
703
+ * @param {boolean} [continueAnimation=true]
704
+ * Used internally when `.attr` is called as part of an animation
705
+ * step. Otherwise, calling `.attr` for an attribute will stop
706
+ * animation for that attribute.
707
+ *
708
+ * @return {number|string|Highcharts.SVGElement}
709
+ * If used as a setter, it returns the current
710
+ * {@link Highcharts.SVGElement} so the calls can be chained. If
711
+ * used as a getter, the current value of the attribute is returned.
495
712
  */
496
713
  attr: function (hash, val, complete, continueAnimation) {
497
714
  var key,
@@ -580,6 +797,7 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
580
797
  * scale are merged in one "transform" attribute in the SVG node.
581
798
  *
582
799
  * @private
800
+ * @function Highcharts.SVGElement#afterSetters
583
801
  */
584
802
  afterSetters: function () {
585
803
  // Update transform. Do this outside the loop to prevent redundant
@@ -595,11 +813,16 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
595
813
  * Update the shadow elements with new attributes.
596
814
  *
597
815
  * @private
598
- * @param {String} key - The attribute name.
599
- * @param {String|Number} value - The value of the attribute.
600
- * @param {Function} setter - The setter function, inherited from the
601
- * parent wrapper
816
+ * @function Highcharts.SVGElement#updateShadows
817
+ *
818
+ * @param {string} key
819
+ * The attribute name.
602
820
  *
821
+ * @param {string|number} value
822
+ * The value of the attribute.
823
+ *
824
+ * @param {Function} setter
825
+ * The setter function, inherited from the parent wrapper.
603
826
  */
604
827
  updateShadows: function (key, value, setter) {
605
828
  var shadows = this.shadows,
@@ -621,11 +844,17 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
621
844
  /**
622
845
  * Add a class name to an element.
623
846
  *
624
- * @param {string} className - The new class name to add.
625
- * @param {boolean} [replace=false] - When true, the existing class name(s)
626
- * will be overwritten with the new one. When false, the new one is
627
- * added.
628
- * @returns {SVGElement} Return the SVG element for chainability.
847
+ * @function Highcharts.SVGElement#addClass
848
+ *
849
+ * @param {string} className
850
+ * The new class name to add.
851
+ *
852
+ * @param {boolean} [replace=false]
853
+ * When true, the existing class name(s) will be overwritten with
854
+ * the new one. When false, the new one is added.
855
+ *
856
+ * @return {Highcharts.SVGElement}
857
+ * Return the SVG element for chainability.
629
858
  */
630
859
  addClass: function (className, replace) {
631
860
  var currentClassName = this.attr('class') || '';
@@ -643,9 +872,13 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
643
872
 
644
873
  /**
645
874
  * Check if an element has the given class name.
646
- * @param {string} className
647
- * The class name to check for.
648
- * @return {Boolean}
875
+ *
876
+ * @function Highcharts.SVGElement#hasClass
877
+ *
878
+ * @param {string} className
879
+ * The class name to check for.
880
+ *
881
+ * @return {boolean}
649
882
  * Whether the class name is found.
650
883
  */
651
884
  hasClass: function (className) {
@@ -657,8 +890,13 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
657
890
 
658
891
  /**
659
892
  * Remove a class name from the element.
660
- * @param {String|RegExp} className The class name to remove.
661
- * @return {SVGElement} Returns the SVG element for chainability.
893
+ *
894
+ * @function Highcharts.SVGElement#removeClass
895
+ *
896
+ * @param {string|RegExp} className
897
+ * The class name to remove.
898
+ *
899
+ * @return {Highcharts.SVGElement} Returns the SVG element for chainability.
662
900
  */
663
901
  removeClass: function (className) {
664
902
  return this.attr(
@@ -671,8 +909,12 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
671
909
  * If one of the symbol size affecting parameters are changed,
672
910
  * check all the others only once for each call to an element's
673
911
  * .attr() method
674
- * @param {Object} hash - The attributes to set.
912
+ *
675
913
  * @private
914
+ * @function Highcharts.SVGElement#symbolAttr
915
+ *
916
+ * @param {Highcharts.Dictionary<number|string>} hash
917
+ * The attributes to set.
676
918
  */
677
919
  symbolAttr: function (hash) {
678
920
  var wrapper = this;
@@ -706,9 +948,13 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
706
948
  /**
707
949
  * Apply a clipping rectangle to this element.
708
950
  *
709
- * @param {ClipRect} [clipRect] - The clipping rectangle. If skipped, the
710
- * current clip is removed.
711
- * @returns {SVGElement} Returns the SVG element to allow chaining.
951
+ * @function Highcharts.SVGElement#clip
952
+ *
953
+ * @param {Highcharts.ClipRectElement} [clipRect]
954
+ * The clipping rectangle. If skipped, the current clip is removed.
955
+ *
956
+ * @return {Highcharts.SVGElement}
957
+ * Returns the SVG element to allow chaining.
712
958
  */
713
959
  clip: function (clipRect) {
714
960
  return this.attr(
@@ -723,17 +969,17 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
723
969
  * Calculate the coordinates needed for drawing a rectangle crisply and
724
970
  * return the calculated attributes.
725
971
  *
726
- * @param {Object} rect - A rectangle.
727
- * @param {number} rect.x - The x position.
728
- * @param {number} rect.y - The y position.
729
- * @param {number} rect.width - The width.
730
- * @param {number} rect.height - The height.
731
- * @param {number} [strokeWidth] - The stroke width to consider when
732
- * computing crisp positioning. It can also be set directly on the rect
733
- * parameter.
734
- *
735
- * @returns {{x: Number, y: Number, width: Number, height: Number}} The
736
- * modified rectangle arguments.
972
+ * @function Highcharts.SVGElement#crisp
973
+ *
974
+ * @param {Highcharts.RectangleObject} rect
975
+ * Rectangle to crisp.
976
+ *
977
+ * @param {number} [strokeWidth]
978
+ * The stroke width to consider when computing crisp positioning. It
979
+ * can also be set directly on the rect parameter.
980
+ *
981
+ * @return {Highcharts.RectangleObject}
982
+ * The modified rectangle arguments.
737
983
  */
738
984
  crisp: function (rect, strokeWidth) {
739
985
 
@@ -764,11 +1010,17 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
764
1010
  * native SVG and HTML elements, there are also some custom made for
765
1011
  * Highcharts, like `width`, `ellipsis` and `textOverflow` for SVG text
766
1012
  * elements.
767
- * @param {CSSObject} styles The new CSS styles.
768
- * @returns {SVGElement} Return the SVG element for chaining.
769
1013
  *
770
1014
  * @sample highcharts/members/renderer-text-on-chart/
771
1015
  * Styled text
1016
+ *
1017
+ * @function Highcharts.SVGElement#css
1018
+ *
1019
+ * @param {Highcharts.CSSObject} styles
1020
+ * The new CSS styles.
1021
+ *
1022
+ * @return {Highcharts.SVGElement}
1023
+ * Return the SVG element for chaining.
772
1024
  */
773
1025
  css: function (styles) {
774
1026
  var oldStyles = this.styles,
@@ -872,8 +1124,12 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
872
1124
  /**
873
1125
  * Get the current stroke width. In classic mode, the setter registers it
874
1126
  * directly on the element.
875
- * @returns {number} The stroke width in pixels.
1127
+ *
876
1128
  * @ignore
1129
+ * @function Highcharts.SVGElement#strokeWidth
1130
+ *
1131
+ * @return {number}
1132
+ * The stroke width in pixels.
877
1133
  */
878
1134
  strokeWidth: function () {
879
1135
  return this['stroke-width'] || 0;
@@ -884,15 +1140,22 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
884
1140
  * Add an event listener. This is a simple setter that replaces all other
885
1141
  * events of the same type, opposed to the {@link Highcharts#addEvent}
886
1142
  * function.
887
- * @param {string} eventType - The event type. If the type is `click`,
888
- * Highcharts will internally translate it to a `touchstart` event on
889
- * touch devices, to prevent the browser from waiting for a click event
890
- * from firing.
891
- * @param {Function} handler - The handler callback.
892
- * @returns {SVGElement} The SVGElement for chaining.
893
1143
  *
894
1144
  * @sample highcharts/members/element-on/
895
1145
  * A clickable rectangle
1146
+ *
1147
+ * @function Highcharts.SVGElement#on
1148
+ *
1149
+ * @param {string} eventType
1150
+ * The event type. If the type is `click`, Highcharts will internally
1151
+ * translate it to a `touchstart` event on touch devices, to prevent
1152
+ * the browser from waiting for a click event from firing.
1153
+ *
1154
+ * @param {Function} handler
1155
+ * The handler callback.
1156
+ *
1157
+ * @return {Highcharts.SVGElement}
1158
+ * The SVGElement for chaining.
896
1159
  */
897
1160
  on: function (eventType, handler) {
898
1161
  var svgElement = this,
@@ -923,9 +1186,14 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
923
1186
  * a shape regardless of positioning inside the chart. Used on pie slices
924
1187
  * to make all the slices have the same radial reference point.
925
1188
  *
926
- * @param {Array} coordinates The center reference. The format is
927
- * `[centerX, centerY, diameter]` in pixels.
928
- * @returns {SVGElement} Returns the SVGElement for chaining.
1189
+ * @function Highcharts.SVGElement#setRadialReference
1190
+ *
1191
+ * @param {Array<number>} coordinates
1192
+ * The center reference. The format is `[centerX, centerY, diameter]`
1193
+ * in pixels.
1194
+ *
1195
+ * @return {Highcharts.SVGElement}
1196
+ * Returns the SVGElement for chaining.
929
1197
  */
930
1198
  setRadialReference: function (coordinates) {
931
1199
  var existingGradient = this.renderer.gradients[this.element.gradient];
@@ -949,8 +1217,13 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
949
1217
  /**
950
1218
  * Move an object and its children by x and y values.
951
1219
  *
952
- * @param {number} x - The x value.
953
- * @param {number} y - The y value.
1220
+ * @function Highcharts.SVGElement#translate
1221
+ *
1222
+ * @param {number} x
1223
+ * The x value.
1224
+ *
1225
+ * @param {number} y
1226
+ * The y value.
954
1227
  */
955
1228
  translate: function (x, y) {
956
1229
  return this.attr({
@@ -964,10 +1237,13 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
964
1237
  * charts, where the points and graphs are drawn as if not inverted, then
965
1238
  * the series group elements are inverted.
966
1239
  *
967
- * @param {boolean} inverted
968
- * Whether to invert or not. An inverted shape can be un-inverted by
969
- * setting it to false.
970
- * @return {SVGElement}
1240
+ * @function Highcharts.SVGElement#invert
1241
+ *
1242
+ * @param {boolean} inverted
1243
+ * Whether to invert or not. An inverted shape can be un-inverted by
1244
+ * setting it to false.
1245
+ *
1246
+ * @return {Highcharts.SVGElement}
971
1247
  * Return the SVGElement for chaining.
972
1248
  */
973
1249
  invert: function (inverted) {
@@ -981,8 +1257,9 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
981
1257
  * Update the transform attribute based on internal properties. Deals with
982
1258
  * the custom `translateX`, `translateY`, `rotation`, `scaleX` and `scaleY`
983
1259
  * attributes and updates the SVG `transform` attribute.
984
- * @private
985
1260
  *
1261
+ * @private
1262
+ * @function Highcharts.SVGElement#updateTransform
986
1263
  */
987
1264
  updateTransform: function () {
988
1265
  var wrapper = this,
@@ -1042,10 +1319,13 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1042
1319
  /**
1043
1320
  * Bring the element to the front. Alternatively, a new zIndex can be set.
1044
1321
  *
1045
- * @returns {SVGElement} Returns the SVGElement for chaining.
1046
- *
1047
1322
  * @sample highcharts/members/element-tofront/
1048
1323
  * Click an element to bring it to front
1324
+ *
1325
+ * @function Highcharts.SVGElement#toFront
1326
+ *
1327
+ * @return {Highcharts.SVGElement}
1328
+ * Returns the SVGElement for chaining.
1049
1329
  */
1050
1330
  toFront: function () {
1051
1331
  var element = this.element;
@@ -1057,24 +1337,23 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1057
1337
  /**
1058
1338
  * Align the element relative to the chart or another box.
1059
1339
  *
1060
- * @param {Object} [alignOptions] The alignment options. The function can be
1061
- * called without this parameter in order to re-align an element after the
1062
- * box has been updated.
1063
- * @param {string} [alignOptions.align=left] Horizontal alignment. Can be
1064
- * one of `left`, `center` and `right`.
1065
- * @param {string} [alignOptions.verticalAlign=top] Vertical alignment. Can
1066
- * be one of `top`, `middle` and `bottom`.
1067
- * @param {number} [alignOptions.x=0] Horizontal pixel offset from
1068
- * alignment.
1069
- * @param {number} [alignOptions.y=0] Vertical pixel offset from alignment.
1070
- * @param {Boolean} [alignByTranslate=false] Use the `transform` attribute
1071
- * with translateX and translateY custom attributes to align this elements
1072
- * rather than `x` and `y` attributes.
1073
- * @param {String|Object} box The box to align to, needs a width and height.
1074
- * When the box is a string, it refers to an object in the Renderer. For
1075
- * example, when box is `spacingBox`, it refers to `Renderer.spacingBox`
1076
- * which holds `width`, `height`, `x` and `y` properties.
1077
- * @returns {SVGElement} Returns the SVGElement for chaining.
1340
+ * @function Highcharts.SVGElement#align
1341
+ *
1342
+ * @param {Highcharts.AlignObject} [alignOptions]
1343
+ * The alignment options. The function can be called without this
1344
+ * parameter in order to re-align an element after the box has been
1345
+ * updated.
1346
+ *
1347
+ * @param {boolean} [alignByTranslate]
1348
+ * Align element by translation.
1349
+ *
1350
+ * @param {string|Highcharts.BBoxObject} [box]
1351
+ * The box to align to, needs a width and height. When the box is a
1352
+ * string, it refers to an object in the Renderer. For example, when
1353
+ * box is `spacingBox`, it refers to `Renderer.spacingBox` which
1354
+ * holds `width`, `height`, `x` and `y` properties.
1355
+ *
1356
+ * @return {Highcharts.SVGElement} Returns the SVGElement for chaining.
1078
1357
  */
1079
1358
  align: function (alignOptions, alignByTranslate, box) {
1080
1359
  var align,
@@ -1154,16 +1433,21 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1154
1433
  * a single text line of rotation 90 will report a greater height, and a
1155
1434
  * width corresponding to the line-height.
1156
1435
  *
1157
- * @param {boolean} [reload] Skip the cache and get the updated DOM bouding
1158
- * box.
1159
- * @param {number} [rot] Override the element's rotation. This is internally
1160
- * used on axis labels with a value of 0 to find out what the bounding box
1161
- * would be have been if it were not rotated.
1162
- * @returns {Object} The bounding box with `x`, `y`, `width` and `height`
1163
- * properties.
1164
- *
1165
1436
  * @sample highcharts/members/renderer-on-chart/
1166
1437
  * Draw a rectangle based on a text's bounding box
1438
+ *
1439
+ * @function Highcharts.SVGElement#getBBox
1440
+ *
1441
+ * @param {boolean} [reload]
1442
+ * Skip the cache and get the updated DOM bouding box.
1443
+ *
1444
+ * @param {number} [rot]
1445
+ * Override the element's rotation. This is internally used on axis
1446
+ * labels with a value of 0 to find out what the bounding box would
1447
+ * be have been if it were not rotated.
1448
+ *
1449
+ * @return {Highcharts.BBoxObject}
1450
+ * The bounding box with `x`, `y`, `width` and `height` properties.
1167
1451
  */
1168
1452
  getBBox: function (reload, rot) {
1169
1453
  var wrapper = this,
@@ -1180,6 +1464,7 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1180
1464
  toggleTextShadowShim,
1181
1465
  cache = renderer.cache,
1182
1466
  cacheKeys = renderer.cacheKeys,
1467
+ isSVG = element.namespaceURI === wrapper.SVG_NS,
1183
1468
  cacheKey;
1184
1469
 
1185
1470
  rotation = pick(rot, wrapper.rotation);
@@ -1222,7 +1507,7 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1222
1507
  if (!bBox) {
1223
1508
 
1224
1509
  // SVG elements
1225
- if (element.namespaceURI === wrapper.SVG_NS || renderer.forExport) {
1510
+ if (isSVG || renderer.forExport) {
1226
1511
  try { // Fails in Firefox if the container has display: none.
1227
1512
 
1228
1513
  // When the text shadow shim is used, we need to hide the
@@ -1287,14 +1572,18 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1287
1572
  // stands uncorrected, it results in more padding added below
1288
1573
  // the text than above when adding a label border or background.
1289
1574
  // Also vertical positioning is affected.
1290
- // http://jsfiddle.net/highcharts/em37nvuj/
1575
+ // https://jsfiddle.net/highcharts/em37nvuj/
1291
1576
  // (#1101, #1505, #1669, #2568, #6213).
1292
- if (
1293
- styles &&
1294
- styles.fontSize === '11px' &&
1295
- Math.round(height) === 17
1296
- ) {
1297
- bBox.height = height = 14;
1577
+ if (isSVG) {
1578
+ bBox.height = height = (
1579
+ {
1580
+ '11px,17': 14,
1581
+ '13px,20': 16
1582
+ }[
1583
+ styles && styles.fontSize + ',' + Math.round(height)
1584
+ ] ||
1585
+ height
1586
+ );
1298
1587
  }
1299
1588
 
1300
1589
  // Adjust for rotated text
@@ -1327,11 +1616,15 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1327
1616
  /**
1328
1617
  * Show the element after it has been hidden.
1329
1618
  *
1330
- * @param {boolean} [inherit=false] Set the visibility attribute to
1331
- * `inherit` rather than `visible`. The difference is that an element with
1332
- * `visibility="visible"` will be visible even if the parent is hidden.
1619
+ * @function Highcharts.SVGElement#show
1620
+ *
1621
+ * @param {boolean} [inherit=false]
1622
+ * Set the visibility attribute to `inherit` rather than `visible`.
1623
+ * The difference is that an element with `visibility="visible"`
1624
+ * will be visible even if the parent is hidden.
1333
1625
  *
1334
- * @returns {SVGElement} Returns the SVGElement for chaining.
1626
+ * @return {Highcharts.SVGElement}
1627
+ * Returns the SVGElement for chaining.
1335
1628
  */
1336
1629
  show: function (inherit) {
1337
1630
  return this.attr({ visibility: inherit ? 'inherit' : 'visible' });
@@ -1341,7 +1634,10 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1341
1634
  * Hide the element, equivalent to setting the `visibility` attribute to
1342
1635
  * `hidden`.
1343
1636
  *
1344
- * @returns {SVGElement} Returns the SVGElement for chaining.
1637
+ * @function Highcharts.SVGElement#hide
1638
+ *
1639
+ * @return {Highcharts.SVGElement}
1640
+ * Returns the SVGElement for chaining.
1345
1641
  */
1346
1642
  hide: function () {
1347
1643
  return this.attr({ visibility: 'hidden' });
@@ -1351,7 +1647,10 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1351
1647
  * Fade out an element by animating its opacity down to 0, and hide it on
1352
1648
  * complete. Used internally for the tooltip.
1353
1649
  *
1354
- * @param {number} [duration=150] The fade duration in milliseconds.
1650
+ * @function Highcharts.SVGElement#fadeOut
1651
+ *
1652
+ * @param {number} [duration=150]
1653
+ * The fade duration in milliseconds.
1355
1654
  */
1356
1655
  fadeOut: function (duration) {
1357
1656
  var elemWrapper = this;
@@ -1369,13 +1668,17 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1369
1668
  /**
1370
1669
  * Add the element to the DOM. All elements must be added this way.
1371
1670
  *
1372
- * @param {SVGElement|SVGDOMElement} [parent] The parent item to add it to.
1373
- * If undefined, the element is added to the {@link
1374
- * Highcharts.SVGRenderer.box}.
1671
+ * @sample highcharts/members/renderer-g
1672
+ * Elements added to a group
1375
1673
  *
1376
- * @returns {SVGElement} Returns the SVGElement for chaining.
1674
+ * @function Highcharts.SVGElement#add
1377
1675
  *
1378
- * @sample highcharts/members/renderer-g - Elements added to a group
1676
+ * @param {Highcharts.SVGElement|Highcharts.SVGDOMElement} [parent]
1677
+ * The parent item to add it to. If undefined, the element is added
1678
+ * to the {@link Highcharts.SVGRenderer.box}.
1679
+ *
1680
+ * @return {Highcharts.SVGElement}
1681
+ * Returns the SVGElement for chaining.
1379
1682
  */
1380
1683
  add: function (parent) {
1381
1684
 
@@ -1421,7 +1724,10 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1421
1724
  * Removes an element from the DOM.
1422
1725
  *
1423
1726
  * @private
1424
- * @param {SVGDOMElement|HTMLDOMElement} element The DOM node to remove.
1727
+ * @function Highcharts.SVGElement#safeRemoveChild
1728
+ *
1729
+ * @param {Highcharts.SVGDOMElement|Highcharts.HTMLDOMElement} element
1730
+ * The DOM node to remove.
1425
1731
  */
1426
1732
  safeRemoveChild: function (element) {
1427
1733
  var parentNode = element.parentNode;
@@ -1434,7 +1740,7 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1434
1740
  * Destroy the element and element wrapper and clear up the DOM and event
1435
1741
  * hooks.
1436
1742
  *
1437
- *
1743
+ * @function Highcharts.SVGElement#destroy
1438
1744
  */
1439
1745
  destroy: function () {
1440
1746
  var wrapper = this,
@@ -1517,35 +1823,34 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1517
1823
  },
1518
1824
 
1519
1825
 
1520
- /**
1521
- * @typedef {Object} ShadowOptions
1522
- * @property {string} [color=#000000] The shadow color.
1523
- * @property {number} [offsetX=1] The horizontal offset from the element.
1524
- * @property {number} [offsetY=1] The vertical offset from the element.
1525
- * @property {number} [opacity=0.15] The shadow opacity.
1526
- * @property {number} [width=3] The shadow width or distance from the
1527
- * element.
1528
- */
1826
+
1529
1827
  /**
1530
1828
  * Add a shadow to the element. Must be called after the element is added to
1531
1829
  * the DOM. In styled mode, this method is not used, instead use `defs` and
1532
1830
  * filters.
1533
1831
  *
1534
- * @param {boolean|ShadowOptions} shadowOptions The shadow options. If
1535
- * `true`, the default options are applied. If `false`, the current
1536
- * shadow will be removed.
1537
- * @param {SVGElement} [group] The SVG group element where the shadows will
1538
- * be applied. The default is to add it to the same parent as the current
1539
- * element. Internally, this is ised for pie slices, where all the
1540
- * shadows are added to an element behind all the slices.
1541
- * @param {boolean} [cutOff] Used internally for column shadows.
1542
- *
1543
- * @returns {SVGElement} Returns the SVGElement for chaining.
1544
- *
1545
1832
  * @example
1546
1833
  * renderer.rect(10, 100, 100, 100)
1547
1834
  * .attr({ fill: 'red' })
1548
1835
  * .shadow(true);
1836
+ *
1837
+ * @function Highcharts.SVGElement#shadow
1838
+ *
1839
+ * @param {boolean|Highcharts.ShadowOptionsObject} shadowOptions
1840
+ * The shadow options. If `true`, the default options are applied. If
1841
+ * `false`, the current shadow will be removed.
1842
+ *
1843
+ * @param {Highcharts.SVGElement} [group]
1844
+ * The SVG group element where the shadows will be applied. The
1845
+ * default is to add it to the same parent as the current element.
1846
+ * Internally, this is ised for pie slices, where all the shadows are
1847
+ * added to an element behind all the slices.
1848
+ *
1849
+ * @param {boolean} [cutOff]
1850
+ * Used internally for column shadows.
1851
+ *
1852
+ * @return {Highcharts.SVGElement}
1853
+ * Returns the SVGElement for chaining.
1549
1854
  */
1550
1855
  shadow: function (shadowOptions, group, cutOff) {
1551
1856
  var shadows = [],
@@ -1574,7 +1879,6 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1574
1879
  shadow = element.cloneNode(0);
1575
1880
  strokeWidth = (shadowWidth * 2) + 1 - (2 * i);
1576
1881
  attr(shadow, {
1577
- 'isShadow': 'true',
1578
1882
  'stroke':
1579
1883
  shadowOptions.color || '#000000',
1580
1884
  'stroke-opacity': shadowElementOpacity * i,
@@ -1582,6 +1886,10 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1582
1886
  'transform': 'translate' + transform,
1583
1887
  'fill': 'none'
1584
1888
  });
1889
+ shadow.setAttribute(
1890
+ 'class',
1891
+ (shadow.getAttribute('class') || '') + ' highcharts-shadow'
1892
+ );
1585
1893
  if (cutOff) {
1586
1894
  attr(
1587
1895
  shadow,
@@ -1608,7 +1916,9 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1608
1916
 
1609
1917
  /**
1610
1918
  * Destroy shadows on the element.
1919
+ *
1611
1920
  * @private
1921
+ * @function Highcharts.SVGElement#destroyShadows
1612
1922
  */
1613
1923
  destroyShadows: function () {
1614
1924
  each(this.shadows || [], function (shadow) {
@@ -1619,6 +1929,14 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1619
1929
 
1620
1930
 
1621
1931
 
1932
+ /**
1933
+ * @private
1934
+ * @function Highcharts.SVGElement#xGetter
1935
+ *
1936
+ * @param {string} key
1937
+ *
1938
+ * @return {number|string|null}
1939
+ */
1622
1940
  xGetter: function (key) {
1623
1941
  if (this.element.nodeName === 'circle') {
1624
1942
  if (key === 'x') {
@@ -1631,12 +1949,18 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1631
1949
  },
1632
1950
 
1633
1951
  /**
1634
- * Get the current value of an attribute or pseudo attribute, used mainly
1635
- * for animation. Called internally from the {@link
1636
- * Highcharts.SVGRenderer#attr}
1637
- * function.
1952
+ * Get the current value of an attribute or pseudo attribute,
1953
+ * used mainly for animation. Called internally from
1954
+ * the {@link Highcharts.SVGRenderer#attr} function.
1638
1955
  *
1639
1956
  * @private
1957
+ * @function Highcharts.SVGElement#_defaultGetter
1958
+ *
1959
+ * @param {string} key
1960
+ * Property key.
1961
+ *
1962
+ * @return {number|string|null}
1963
+ * Property value.
1640
1964
  */
1641
1965
  _defaultGetter: function (key) {
1642
1966
  var ret = pick(
@@ -1652,7 +1976,16 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1652
1976
  return ret;
1653
1977
  },
1654
1978
 
1655
-
1979
+ /**
1980
+ * @private
1981
+ * @function Highcharts.SVGElement#dSettter
1982
+ *
1983
+ * @param {number|string|Highcharts.SVGPathArray} value
1984
+ *
1985
+ * @param {string} key
1986
+ *
1987
+ * @param {Highcharts.SVGDOMElement} element
1988
+ */
1656
1989
  dSetter: function (value, key, element) {
1657
1990
  if (value && value.join) { // join path
1658
1991
  value = value.join(' ');
@@ -1670,7 +2003,15 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1670
2003
  }
1671
2004
 
1672
2005
  },
2006
+
1673
2007
 
2008
+
2009
+ /**
2010
+ * @private
2011
+ * @function Highcharts.SVGElement#dashstyleSetter
2012
+ *
2013
+ * @param {string} value
2014
+ */
1674
2015
  dashstyleSetter: function (value) {
1675
2016
  var i,
1676
2017
  strokeWidth = this['stroke-width'];
@@ -1702,16 +2043,40 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1702
2043
  this.element.setAttribute('stroke-dasharray', value);
1703
2044
  }
1704
2045
  },
2046
+
1705
2047
 
2048
+
2049
+ /**
2050
+ * @private
2051
+ * @function Highcharts.SVGElement#alignSetter
2052
+ *
2053
+ * @param {"start"|"middle"|"end"} value
2054
+ */
1706
2055
  alignSetter: function (value) {
1707
2056
  var convert = { left: 'start', center: 'middle', right: 'end' };
1708
2057
  this.alignValue = value;
1709
2058
  this.element.setAttribute('text-anchor', convert[value]);
1710
2059
  },
2060
+ /**
2061
+ * @private
2062
+ * @function Highcharts.SVGElement#opacitySetter
2063
+ *
2064
+ * @param {string} value
2065
+ *
2066
+ * @param {string} key
2067
+ *
2068
+ * @param {Highcharts.SVGDOMElement} element
2069
+ */
1711
2070
  opacitySetter: function (value, key, element) {
1712
2071
  this[key] = value;
1713
2072
  element.setAttribute(key, value);
1714
2073
  },
2074
+ /**
2075
+ * @private
2076
+ * @function Highcharts.SVGElement#titleSetter
2077
+ *
2078
+ * @param {string} value
2079
+ */
1715
2080
  titleSetter: function (value) {
1716
2081
  var titleNode = this.element.getElementsByTagName('title')[0];
1717
2082
  if (!titleNode) {
@@ -1734,6 +2099,12 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1734
2099
  )
1735
2100
  );
1736
2101
  },
2102
+ /**
2103
+ * @private
2104
+ * @function Highcharts.SVGElement#textSetter
2105
+ *
2106
+ * @param {string} value
2107
+ */
1737
2108
  textSetter: function (value) {
1738
2109
  if (value !== this.textStr) {
1739
2110
  // Delete bBox memo when the text changes
@@ -1745,6 +2116,16 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1745
2116
  }
1746
2117
  }
1747
2118
  },
2119
+ /**
2120
+ * @private
2121
+ * @function Highcharts.SVGElement#fillSetter
2122
+ *
2123
+ * @param {Highcharts.Color|Highcharts.ColorString} value
2124
+ *
2125
+ * @param {string} key
2126
+ *
2127
+ * @param {Highcharts.SVGDOMElement} element
2128
+ */
1748
2129
  fillSetter: function (value, key, element) {
1749
2130
  if (typeof value === 'string') {
1750
2131
  element.setAttribute(key, value);
@@ -1752,6 +2133,16 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1752
2133
  this.complexColor(value, key, element);
1753
2134
  }
1754
2135
  },
2136
+ /**
2137
+ * @private
2138
+ * @function Highcharts.SVGElement#visibilitySetter
2139
+ *
2140
+ * @param {string} value
2141
+ *
2142
+ * @param {string} key
2143
+ *
2144
+ * @param {Highcharts.SVGDOMElement} element
2145
+ */
1755
2146
  visibilitySetter: function (value, key, element) {
1756
2147
  // IE9-11 doesn't handle visibilty:inherit well, so we remove the
1757
2148
  // attribute instead (#2881, #3909)
@@ -1762,6 +2153,16 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1762
2153
  }
1763
2154
  this[key] = value;
1764
2155
  },
2156
+ /**
2157
+ * @private
2158
+ * @function Highcharts.SVGElement#zIndexSetter
2159
+ *
2160
+ * @param {string} value
2161
+ *
2162
+ * @param {string} key
2163
+ *
2164
+ * @return {boolean}
2165
+ */
1765
2166
  zIndexSetter: function (value, key) {
1766
2167
  var renderer = this.renderer,
1767
2168
  parentGroup = this.parentGroup,
@@ -1846,6 +2247,16 @@ extend(SVGElement.prototype, /** @lends Highcharts.SVGElement.prototype */ {
1846
2247
  }
1847
2248
  return inserted;
1848
2249
  },
2250
+ /**
2251
+ * @private
2252
+ * @function Highcharts.SVGElement#_defaultSetter
2253
+ *
2254
+ * @param {string} value
2255
+ *
2256
+ * @param {string} key
2257
+ *
2258
+ * @param {Highcharts.SVGDOMElement} element
2259
+ */
1849
2260
  _defaultSetter: function (value, key, element) {
1850
2261
  element.setAttribute(key, value);
1851
2262
  }
@@ -1871,6 +2282,16 @@ SVGElement.prototype.matrixSetter = function (value, key) {
1871
2282
  // WebKit and Batik have problems with a stroke-width of zero, so in this case
1872
2283
  // we remove the stroke attribute altogether. #1270, #1369, #3065, #3072.
1873
2284
  SVGElement.prototype['stroke-widthSetter'] =
2285
+ /**
2286
+ * @private
2287
+ * @function Highcharts.SVGElement#strokeSetter
2288
+ *
2289
+ * @param {number|string} value
2290
+ *
2291
+ * @param {string} key
2292
+ *
2293
+ * @param {Highcharts.SVGDOMElement} element
2294
+ */
1874
2295
  SVGElement.prototype.strokeSetter = function (value, key, element) {
1875
2296
  this[key] = value;
1876
2297
  // Only apply the stroke attribute if the stroke width is defined and larger
@@ -1903,24 +2324,33 @@ SVGElement.prototype.strokeSetter = function (value, key, element) {
1903
2324
  * An existing chart's renderer can be accessed through {@link Chart.renderer}.
1904
2325
  * The renderer can also be used completely decoupled from a chart.
1905
2326
  *
1906
- * @param {HTMLDOMElement} container - Where to put the SVG in the web page.
1907
- * @param {number} width - The width of the SVG.
1908
- * @param {number} height - The height of the SVG.
1909
- * @param {boolean} [forExport=false] - Whether the rendered content is intended
1910
- * for export.
1911
- * @param {boolean} [allowHTML=true] - Whether the renderer is allowed to
1912
- * include HTML text, which will be projected on top of the SVG.
2327
+ * @sample highcharts/members/renderer-on-chart
2328
+ * Annotating a chart programmatically.
2329
+ * @sample highcharts/members/renderer-basic
2330
+ * Independent SVG drawing.
1913
2331
  *
1914
2332
  * @example
1915
2333
  * // Use directly without a chart object.
1916
2334
  * var renderer = new Highcharts.Renderer(parentNode, 600, 400);
1917
2335
  *
1918
- * @sample highcharts/members/renderer-on-chart
1919
- * Annotating a chart programmatically.
1920
- * @sample highcharts/members/renderer-basic
1921
- * Independent SVG drawing.
2336
+ * @class
2337
+ * @name Highcharts.SVGRenderer
2338
+ *
2339
+ * @param {Highcharts.HTMLDOMElement} container
2340
+ * Where to put the SVG in the web page.
2341
+ *
2342
+ * @param {number} width
2343
+ * The width of the SVG.
2344
+ *
2345
+ * @param {number} height
2346
+ * The height of the SVG.
1922
2347
  *
1923
- * @class Highcharts.SVGRenderer
2348
+ * @param {boolean} [forExport=false]
2349
+ * Whether the rendered content is intended for export.
2350
+ *
2351
+ * @param {boolean} [allowHTML=true]
2352
+ * Whether the renderer is allowed to include HTML text, which will be
2353
+ * projected on top of the SVG.
1924
2354
  */
1925
2355
  SVGRenderer = H.SVGRenderer = function () {
1926
2356
  this.init.apply(this, arguments);
@@ -1929,13 +2359,35 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
1929
2359
  /**
1930
2360
  * A pointer to the renderer's associated Element class. The VMLRenderer
1931
2361
  * will have a pointer to VMLElement here.
1932
- * @type {SVGElement}
2362
+ *
2363
+ * @name Highcharts.SVGRenderer#Element
2364
+ * @type {Highcharts.SVGElement}
1933
2365
  */
1934
2366
  Element: SVGElement,
2367
+
1935
2368
  SVG_NS: SVG_NS,
2369
+
1936
2370
  /**
1937
2371
  * Initialize the SVGRenderer. Overridable initiator function that takes
1938
2372
  * the same parameters as the constructor.
2373
+ *
2374
+ * @function Highcharts.SVGRenderer#init
2375
+ *
2376
+ * @param {Highcharts.HTMLDOMElement} container
2377
+ * Where to put the SVG in the web page.
2378
+ *
2379
+ * @param {number} width
2380
+ * The width of the SVG.
2381
+ *
2382
+ * @param {number} height
2383
+ * The height of the SVG.
2384
+ *
2385
+ * @param {boolean} [forExport=false]
2386
+ * Whether the rendered content is intended for export.
2387
+ *
2388
+ * @param {boolean} [allowHTML=true]
2389
+ * Whether the renderer is allowed to include HTML text, which will
2390
+ * be projected on top of the SVG.
1939
2391
  */
1940
2392
  init: function (container, width, height, style, forExport, allowHTML) {
1941
2393
  var renderer = this,
@@ -1968,23 +2420,25 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
1968
2420
 
1969
2421
  /**
1970
2422
  * The root `svg` node of the renderer.
1971
- * @name box
1972
- * @memberof SVGRenderer
1973
- * @type {SVGDOMElement}
2423
+ *
2424
+ * @name Highcharts.SVGRenderer#box
2425
+ * @type {Highcharts.SVGDOMElement}
1974
2426
  */
1975
2427
  this.box = element;
1976
2428
  /**
1977
2429
  * The wrapper for the root `svg` node of the renderer.
1978
2430
  *
1979
- * @name boxWrapper
1980
- * @memberof SVGRenderer
1981
- * @type {SVGElement}
2431
+ * @name Highcharts.SVGRenderer#boxWrapper
2432
+ * @type {Highcharts.SVGElement}
1982
2433
  */
1983
2434
  this.boxWrapper = boxWrapper;
1984
2435
  renderer.alignedObjects = [];
1985
2436
 
1986
2437
  /**
1987
2438
  * Page url used for internal references.
2439
+ *
2440
+ * @private
2441
+ * @name Highcharts.SVGRenderer#url
1988
2442
  * @type {string}
1989
2443
  */
1990
2444
  // #24, #672, #1070
@@ -1993,7 +2447,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
1993
2447
  doc.getElementsByTagName('base').length
1994
2448
  ) ?
1995
2449
  win.location.href
1996
- .replace(/#.*?$/, '') // remove the hash
2450
+ .split('#')[0] // remove the hash
1997
2451
  .replace(/<[^>]*>/g, '') // wing cut HTML
1998
2452
  // escape parantheses and quotes
1999
2453
  .replace(/([\('\)])/g, '\\$1')
@@ -2009,9 +2463,9 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2009
2463
 
2010
2464
  /**
2011
2465
  * A pointer to the `defs` node of the root SVG.
2012
- * @type {SVGElement}
2013
- * @name defs
2014
- * @memberof SVGRenderer
2466
+ *
2467
+ * @name Highcharts.SVGRenderer#defs
2468
+ * @type {Highcharts.SVGElement}
2015
2469
  */
2016
2470
  renderer.defs = this.createElement('defs').add();
2017
2471
  renderer.allowHTML = allowHTML;
@@ -2050,14 +2504,22 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2050
2504
  renderer.unSubPixelFix = addEvent(win, 'resize', subPixelFix);
2051
2505
  }
2052
2506
  },
2507
+
2053
2508
 
2054
2509
 
2055
2510
 
2511
+
2056
2512
  /**
2057
2513
  * Get the global style setting for the renderer.
2514
+ *
2058
2515
  * @private
2059
- * @param {CSSObject} style - Style settings.
2060
- * @return {CSSObject} The style settings mixed with defaults.
2516
+ * @function Highcharts.SVGRenderer#getStyle
2517
+ *
2518
+ * @param {Highcharts.CSSObject} style
2519
+ * Style settings.
2520
+ *
2521
+ * @return {Highcharts.CSSObject}
2522
+ * The style settings mixed with defaults.
2061
2523
  */
2062
2524
  getStyle: function (style) {
2063
2525
  this.style = extend({
@@ -2069,14 +2531,19 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2069
2531
  }, style);
2070
2532
  return this.style;
2071
2533
  },
2534
+
2072
2535
  /**
2073
2536
  * Apply the global style on the renderer, mixed with the default styles.
2074
2537
  *
2075
- * @param {CSSObject} style - CSS to apply.
2538
+ * @function Highcharts.SVGRenderer#setStyle
2539
+ *
2540
+ * @param {Highcharts.CSSObject} style
2541
+ * CSS to apply.
2076
2542
  */
2077
2543
  setStyle: function (style) {
2078
2544
  this.boxWrapper.css(this.getStyle(style));
2079
2545
  },
2546
+
2080
2547
 
2081
2548
 
2082
2549
  /**
@@ -2085,7 +2552,10 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2085
2552
  * needto render preliminarily in another div to get the text bounding boxes
2086
2553
  * right.
2087
2554
  *
2088
- * @returns {boolean} True if it is hidden.
2555
+ * @function Highcharts.SVGRenderer#isHidden
2556
+ *
2557
+ * @return {boolean}
2558
+ * True if it is hidden.
2089
2559
  */
2090
2560
  isHidden: function () { // #608
2091
2561
  return !this.boxWrapper.getBBox().width;
@@ -2093,6 +2563,8 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2093
2563
 
2094
2564
  /**
2095
2565
  * Destroys the renderer and its allocated members.
2566
+ *
2567
+ * @function Highcharts.SVGRenderer#destroy
2096
2568
  */
2097
2569
  destroy: function () {
2098
2570
  var renderer = this,
@@ -2126,8 +2598,13 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2126
2598
  * primitive factories like {@link SVGRenderer#path}, {@link
2127
2599
  * SVGRenderer#rect} or {@link SVGRenderer#text}.
2128
2600
  *
2129
- * @param {string} nodeName - The node name, for example `rect`, `g` etc.
2130
- * @returns {SVGElement} The generated SVGElement.
2601
+ * @function Highcharts.SVGRenderer#createElement
2602
+ *
2603
+ * @param {string} nodeName
2604
+ * The node name, for example `rect`, `g` etc.
2605
+ *
2606
+ * @return {Highcharts.SVGElement}
2607
+ * The generated SVGElement.
2131
2608
  */
2132
2609
  createElement: function (nodeName) {
2133
2610
  var wrapper = new this.Element();
@@ -2138,7 +2615,9 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2138
2615
  /**
2139
2616
  * Dummy function for plugins, called every time the renderer is updated.
2140
2617
  * Prior to Highcharts 5, this was used for the canvg renderer.
2141
- * @function
2618
+ *
2619
+ * @deprecated
2620
+ * @function Highcharts.SVGRenderer#draw
2142
2621
  */
2143
2622
  draw: noop,
2144
2623
 
@@ -2148,6 +2627,13 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2148
2627
  * function.
2149
2628
  *
2150
2629
  * @private
2630
+ * @function Highcharts.SVGRenderer#getRadialAttr
2631
+ *
2632
+ * @param {Array<number>} radialReference
2633
+ *
2634
+ * @param {Highcharts.SVGAttributes} gradAttr
2635
+ *
2636
+ * @return {Highcharts.SVGAttributes}
2151
2637
  */
2152
2638
  getRadialAttr: function (radialReference, gradAttr) {
2153
2639
  return {
@@ -2160,38 +2646,107 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2160
2646
  },
2161
2647
 
2162
2648
  /**
2163
- * Extendable function to measure the tspan width.
2649
+ * Truncate the text node contents to a given length. Used when the css
2650
+ * width is set. If the `textOverflow` is `ellipsis`, the text is truncated
2651
+ * character by character to the given length. If not, the text is
2652
+ * word-wrapped line by line.
2164
2653
  *
2165
2654
  * @private
2655
+ * @function Highcharts.SVGRenderer#truncate
2656
+ *
2657
+ * @param {Highcharts.SVGElement} wrapper
2658
+ *
2659
+ * @param {Highcharts.SVGDOMElement} tspan
2660
+ *
2661
+ * @param {string} text
2662
+ *
2663
+ * @param {Array.<string>} words
2664
+ *
2665
+ * @param {number} width
2666
+ *
2667
+ * @param {Function} getString
2668
+ *
2669
+ * @return {boolean}
2670
+ * True if tspan is too long.
2166
2671
  */
2167
- getSpanWidth: function (wrapper) {
2168
- return wrapper.getBBox(true).width;
2169
- },
2170
-
2171
- applyEllipsis: function (wrapper, tspan, text, width) {
2672
+ truncate: function (
2673
+ wrapper,
2674
+ tspan,
2675
+ text,
2676
+ words,
2677
+ startAt,
2678
+ width,
2679
+ getString
2680
+ ) {
2172
2681
  var renderer = this,
2173
2682
  rotation = wrapper.rotation,
2174
- str = text,
2175
- currentIndex,
2176
- minIndex = 0,
2177
- maxIndex = text.length,
2683
+ str,
2684
+ // Word wrap can not be truncated to shorter than one word, ellipsis
2685
+ // text can be completely blank.
2686
+ minIndex = words ? 1 : 0,
2687
+ maxIndex = (text || words).length,
2688
+ currentIndex = maxIndex,
2689
+ // Cache the lengths to avoid checking the same twice
2690
+ lengths = [],
2178
2691
  updateTSpan = function (s) {
2179
- tspan.removeChild(tspan.firstChild);
2692
+ if (tspan.firstChild) {
2693
+ tspan.removeChild(tspan.firstChild);
2694
+ }
2180
2695
  if (s) {
2181
2696
  tspan.appendChild(doc.createTextNode(s));
2182
2697
  }
2183
2698
  },
2699
+ getSubStringLength = function (charEnd, concatenatedEnd) {
2700
+ // charEnd is useed when finding the character-by-character
2701
+ // break for ellipsis, concatenatedEnd is used for word-by-word
2702
+ // break for word wrapping.
2703
+ var end = concatenatedEnd || charEnd;
2704
+ if (lengths[end] === undefined) {
2705
+ // Modern browsers
2706
+ if (tspan.getSubStringLength) {
2707
+ // Fails with DOM exception on unit-tests/legend/members
2708
+ // of unknown reason. Desired width is 0, text content
2709
+ // is "5" and end is 1.
2710
+ try {
2711
+ lengths[end] = startAt + tspan.getSubStringLength(
2712
+ 0,
2713
+ words ? end + 1 : end
2714
+ );
2715
+
2716
+ } catch (e) {}
2717
+
2718
+ // Legacy
2719
+ } else if (renderer.getSpanWidth) { // #9058 jsdom
2720
+ updateTSpan(getString(text || words, charEnd));
2721
+ lengths[end] = startAt +
2722
+ renderer.getSpanWidth(wrapper, tspan);
2723
+ }
2724
+ }
2725
+ return lengths[end];
2726
+ },
2184
2727
  actualWidth,
2185
- wasTooLong;
2728
+ truncated;
2729
+
2186
2730
  wrapper.rotation = 0; // discard rotation when computing box
2187
- actualWidth = renderer.getSpanWidth(wrapper, tspan);
2188
- wasTooLong = actualWidth > width;
2189
- if (wasTooLong) {
2731
+ actualWidth = getSubStringLength(tspan.textContent.length);
2732
+ truncated = startAt + actualWidth > width;
2733
+ if (truncated) {
2734
+
2735
+ // Do a binary search for the index where to truncate the text
2190
2736
  while (minIndex <= maxIndex) {
2191
2737
  currentIndex = Math.ceil((minIndex + maxIndex) / 2);
2192
- str = text.substring(0, currentIndex) + '\u2026';
2193
- updateTSpan(str);
2194
- actualWidth = renderer.getSpanWidth(wrapper, tspan);
2738
+
2739
+ // When checking words for word-wrap, we need to build the
2740
+ // string and measure the subStringLength at the concatenated
2741
+ // word length.
2742
+ if (words) {
2743
+ str = getString(words, currentIndex);
2744
+ }
2745
+ actualWidth = getSubStringLength(
2746
+ currentIndex,
2747
+ str && str.length - 1
2748
+ );
2749
+
2195
2750
  if (minIndex === maxIndex) {
2196
2751
  // Complete
2197
2752
  minIndex = maxIndex + 1;
@@ -2203,14 +2758,29 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2203
2758
  minIndex = currentIndex;
2204
2759
  }
2205
2760
  }
2206
- // If max index was 0 it means just ellipsis was also to large.
2761
+ // If max index was 0 it means the shortest possible text was also
2762
+ // too large. For ellipsis that means only the ellipsis, while for
2763
+ // word wrap it means the whole first word.
2207
2764
  if (maxIndex === 0) {
2208
- // Remove ellipses.
2765
+ // Remove ellipsis
2209
2766
  updateTSpan('');
2767
+
2768
+ // If the new text length is one less than the original, we don't
2769
+ // need the ellipsis
2770
+ } else if (!(text && maxIndex === text.length - 1)) {
2771
+ updateTSpan(str || getString(text || words, currentIndex));
2210
2772
  }
2211
2773
  }
2774
+
2775
+ // When doing line wrapping, prepare for the next line by removing the
2776
+ // items from this line.
2777
+ if (words) {
2778
+ words.splice(0, currentIndex);
2779
+ }
2780
+
2781
+ wrapper.actualWidth = actualWidth;
2212
2782
  wrapper.rotation = rotation; // Apply rotation again.
2213
- return wasTooLong;
2783
+ return truncated;
2214
2784
  },
2215
2785
 
2216
2786
  /**
@@ -2223,7 +2793,8 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2223
2793
  * // Add support for unescaping quotes
2224
2794
  * Highcharts.SVGRenderer.prototype.escapes['"'] = '&quot;';
2225
2795
  *
2226
- * @type {Object}
2796
+ * @name Highcharts.SVGRenderer#escapes
2797
+ * @type {Highcharts.Dictionary<string>}
2227
2798
  */
2228
2799
  escapes: {
2229
2800
  '&': '&amp;',
@@ -2235,11 +2806,15 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2235
2806
 
2236
2807
  /**
2237
2808
  * Parse a simple HTML string into SVG tspans. Called internally when text
2238
- * is set on an SVGElement. The function supports a subset of HTML tags,
2239
- * CSS text features like `width`, `text-overflow`, `white-space`, and
2240
- * also attributes like `href` and `style`.
2809
+ * is set on an SVGElement. The function supports a subset of HTML tags, CSS
2810
+ * text features like `width`, `text-overflow`, `white-space`, and also
2811
+ * attributes like `href` and `style`.
2812
+ *
2241
2813
  * @private
2242
- * @param {SVGElement} wrapper The parent SVGElement.
2814
+ * @function Highcharts.SVGRenderer#buildText
2815
+ *
2816
+ * @param {Highcharts.SVGElement} wrapper
2817
+ * The parent SVGElement.
2243
2818
  */
2244
2819
  buildText: function (wrapper) {
2245
2820
  var textNode = wrapper.element,
@@ -2249,7 +2824,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2249
2824
  hasMarkup = textStr.indexOf('<') !== -1,
2250
2825
  lines,
2251
2826
  childNodes = textNode.childNodes,
2252
- wasTooLong,
2827
+ truncated,
2253
2828
  parentX = attr(textNode, 'x'),
2254
2829
  textStyles = wrapper.styles,
2255
2830
  width = wrapper.textWidth,
@@ -2371,7 +2946,8 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2371
2946
  // build the lines
2372
2947
  each(lines, function buildTextLines(line, lineNo) {
2373
2948
  var spans,
2374
- spanNo = 0;
2949
+ spanNo = 0,
2950
+ lineLength = 0;
2375
2951
  line = line
2376
2952
  // Trim to prevent useless/costly process on the spaces
2377
2953
  // (#5258)
@@ -2465,88 +3041,55 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2465
3041
  );
2466
3042
  }
2467
3043
 
2468
- /*
2469
- // Experimental text wrapping based on
2470
- // getSubstringLength
2471
- if (width) {
2472
- var spans = renderer.breakText(wrapper, width);
2473
-
2474
- each(spans, function (span) {
2475
-
2476
- var dy = getLineHeight(tspan);
2477
- tspan = doc.createElementNS(
2478
- SVG_NS,
2479
- 'tspan'
2480
- );
2481
- tspan.appendChild(
2482
- doc.createTextNode(span)
2483
- );
2484
- attr(tspan, {
2485
- dy: dy,
2486
- x: parentX
2487
- });
2488
- if (spanStyle) { // #390
2489
- attr(tspan, 'style', spanStyle);
2490
- }
2491
- textNode.appendChild(tspan);
2492
- });
2493
-
2494
- }
2495
- // */
2496
-
2497
3044
  // Check width and apply soft breaks or ellipsis
2498
3045
  if (width) {
2499
3046
  var words = span.replace(
2500
3047
  /([^\^])-/g,
2501
3048
  '$1- '
2502
3049
  ).split(' '), // #1273
2503
- hasWhiteSpace = (
3050
+ hasWhiteSpace = !noWrap && (
2504
3051
  spans.length > 1 ||
2505
3052
  lineNo ||
2506
- (words.length > 1 && !noWrap)
3053
+ words.length > 1
2507
3054
  ),
2508
- tooLong,
2509
- rest = [],
2510
- actualWidth,
2511
- dy = getLineHeight(tspan),
2512
- rotation = wrapper.rotation;
3055
+ wrapLineNo = 0,
3056
+ dy = getLineHeight(tspan);
2513
3057
 
2514
3058
  if (ellipsis) {
2515
- wasTooLong = renderer.applyEllipsis(
3059
+ truncated = renderer.truncate(
2516
3060
  wrapper,
2517
3061
  tspan,
2518
3062
  span,
2519
- width
2520
- );
2521
- }
2522
-
2523
- while (
2524
- !ellipsis &&
2525
- hasWhiteSpace &&
2526
- (words.length || rest.length)
2527
- ) {
2528
- // discard rotation when computing box
2529
- wrapper.rotation = 0;
2530
- actualWidth = renderer.getSpanWidth(
2531
- wrapper,
2532
- tspan
3063
+ undefined,
3064
+ 0,
3065
+ // Target width
3066
+ Math.max(
3067
+ 0,
3068
+ // Substract the font face to make
3069
+ // room for the ellipsis itself
3070
+ width - parseInt(fontSize || 12, 10)
3071
+ ),
3072
+ // Build the text to test for
3073
+ function (text, currentIndex) {
3074
+ return text.substring(
3075
+ 0,
3076
+ currentIndex
3077
+ ) + '\u2026';
3078
+ }
2533
3079
  );
2534
- tooLong = actualWidth > width;
3080
+ } else if (hasWhiteSpace) {
2535
3081
 
2536
- // For ellipsis, do a binary search for the
2537
- // correct string length
2538
- if (wasTooLong === undefined) {
2539
- wasTooLong = tooLong; // First time
2540
- }
3082
+ while (words.length) {
2541
3083
 
2542
- // Looping down, this is the first word
2543
- // sequence that is not too long, so we can
2544
- // move on to build the next line.
2545
- if (!tooLong || words.length === 1) {
2546
- words = rest;
2547
- rest = [];
3084
+ // For subsequent lines, create tspans
3085
+ // with the same style attributes as the
3086
+ // parent text node.
3087
+ if (
3088
+ words.length &&
3089
+ !noWrap &&
3090
+ wrapLineNo > 0
3091
+ ) {
2548
3092
 
2549
- if (words.length && !noWrap) {
2550
3093
  tspan = doc.createElementNS(
2551
3094
  SVG_NS,
2552
3095
  'tspan'
@@ -2562,34 +3105,48 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2562
3105
  styleAttribute
2563
3106
  );
2564
3107
  }
3108
+ // Start by appending the full
3109
+ // remaining text
3110
+ tspan.appendChild(
3111
+ doc.createTextNode(
3112
+ words.join(' ')
3113
+ .replace(/- /g, '-')
3114
+ )
3115
+ );
2565
3116
  textNode.appendChild(tspan);
2566
3117
  }
2567
3118
 
2568
- // a single word is pressing it out
2569
- if (actualWidth > width) {
2570
- // one more pixel for Chrome, #3158
2571
- width = actualWidth + 1;
2572
- }
2573
- } else { // append to existing line tspan
2574
- tspan.removeChild(tspan.firstChild);
2575
- rest.unshift(words.pop());
2576
- }
2577
- if (words.length) {
2578
- tspan.appendChild(
2579
- doc.createTextNode(
2580
- words.join(' ')
2581
- .replace(/- /g, '-')
2582
- )
3119
+ // For each line, truncate the remaining
3120
+ // words into the line length.
3121
+ renderer.truncate(
3122
+ wrapper,
3123
+ tspan,
3124
+ null,
3125
+ words,
3126
+ wrapLineNo === 0 ? lineLength : 0,
3127
+ width,
3128
+ // Build the text to test for
3129
+ function (text, currentIndex) {
3130
+ return words
3131
+ .slice(0, currentIndex)
3132
+ .join(' ')
3133
+ .replace(/- /g, '-');
3134
+ }
2583
3135
  );
3136
+
3137
+ lineLength = wrapper.actualWidth;
3138
+ wrapLineNo++;
2584
3139
  }
2585
3140
  }
2586
- wrapper.rotation = rotation;
2587
3141
  }
2588
3142
 
2589
3143
  spanNo++;
2590
3144
  }
3145
+
2591
3146
  }
3147
+
2592
3148
  });
3149
+
2593
3150
  // To avoid beginning lines that doesn't add to the textNode
2594
3151
  // (#6144)
2595
3152
  isSubsequentLine = (
@@ -2598,7 +3155,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2598
3155
  );
2599
3156
  });
2600
3157
 
2601
- if (ellipsis && wasTooLong) {
3158
+ if (ellipsis && truncated) {
2602
3159
  wrapper.attr(
2603
3160
  'title',
2604
3161
  unescapeEntities(wrapper.textStr, ['&lt;', '&gt;']) // #7179
@@ -2615,99 +3172,63 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2615
3172
  }
2616
3173
  },
2617
3174
 
2618
-
2619
-
2620
- /*
2621
- breakText: function (wrapper, width) {
2622
- var bBox = wrapper.getBBox(),
2623
- node = wrapper.element,
2624
- charnum = node.textContent.length,
2625
- stringWidth,
2626
- // try this position first, based on average character width
2627
- guessedLineCharLength = Math.round(width * charnum / bBox.width),
2628
- pos = guessedLineCharLength,
2629
- spans = [],
2630
- increment = 0,
2631
- startPos = 0,
2632
- endPos,
2633
- safe = 0;
2634
-
2635
- if (bBox.width > width) {
2636
- while (startPos < charnum && safe < 100) {
2637
-
2638
- while (endPos === undefined && safe < 100) {
2639
- stringWidth = node.getSubStringLength(
2640
- startPos,
2641
- pos - startPos
2642
- );
2643
-
2644
- if (stringWidth <= width) {
2645
- if (increment === -1) {
2646
- endPos = pos;
2647
- } else {
2648
- increment = 1;
2649
- }
2650
- } else {
2651
- if (increment === 1) {
2652
- endPos = pos - 1;
2653
- } else {
2654
- increment = -1;
2655
- }
2656
- }
2657
- pos += increment;
2658
- safe++;
2659
- }
2660
-
2661
- spans.push(
2662
- node.textContent.substr(startPos, endPos - startPos)
2663
- );
2664
-
2665
- startPos = endPos;
2666
- pos = startPos + guessedLineCharLength;
2667
- endPos = undefined;
2668
- }
2669
- }
2670
-
2671
- return spans;
2672
- },
2673
- // */
2674
-
2675
3175
  /**
2676
3176
  * Returns white for dark colors and black for bright colors.
2677
3177
  *
2678
- * @param {ColorString} rgba - The color to get the contrast for.
2679
- * @returns {string} The contrast color, either `#000000` or `#FFFFFF`.
3178
+ * @function Highcharts.SVGRenderer#getContrast
3179
+ *
3180
+ * @param {Highcharts.ColorString} rgba
3181
+ * The color to get the contrast for.
3182
+ *
3183
+ * @return {string}
3184
+ * The contrast color, either `#000000` or `#FFFFFF`.
2680
3185
  */
2681
3186
  getContrast: function (rgba) {
2682
3187
  rgba = color(rgba).rgba;
2683
3188
 
2684
3189
  // The threshold may be discussed. Here's a proposal for adding
2685
3190
  // different weight to the color channels (#6216)
2686
- /*
2687
3191
  rgba[0] *= 1; // red
2688
3192
  rgba[1] *= 1.2; // green
2689
- rgba[2] *= 0.7; // blue
2690
- */
3193
+ rgba[2] *= 0.5; // blue
2691
3194
 
2692
- return rgba[0] + rgba[1] + rgba[2] > 2 * 255 ? '#000000' : '#FFFFFF';
3195
+ return rgba[0] + rgba[1] + rgba[2] > 1.8 * 255 ? '#000000' : '#FFFFFF';
2693
3196
  },
2694
3197
 
2695
3198
  /**
2696
3199
  * Create a button with preset states.
2697
- * @param {string} text - The text or HTML to draw.
2698
- * @param {number} x - The x position of the button's left side.
2699
- * @param {number} y - The y position of the button's top side.
2700
- * @param {Function} callback - The function to execute on button click or
2701
- * touch.
2702
- * @param {SVGAttributes} [normalState] - SVG attributes for the normal
2703
- * state.
2704
- * @param {SVGAttributes} [hoverState] - SVG attributes for the hover state.
2705
- * @param {SVGAttributes} [pressedState] - SVG attributes for the pressed
2706
- * state.
2707
- * @param {SVGAttributes} [disabledState] - SVG attributes for the disabled
2708
- * state.
2709
- * @param {Symbol} [shape=rect] - The shape type.
2710
- * @returns {SVGRenderer} The button element.
3200
+ *
3201
+ * @function Highcharts.SVGRenderer#button
3202
+ *
3203
+ * @param {string} text
3204
+ * The text or HTML to draw.
3205
+ *
3206
+ * @param {number} x
3207
+ * The x position of the button's left side.
3208
+ *
3209
+ * @param {number} y
3210
+ * The y position of the button's top side.
3211
+ *
3212
+ * @param {Function} callback
3213
+ * The function to execute on button click or touch.
3214
+ *
3215
+ * @param {Highcharts.SVGAttributes} [normalState]
3216
+ * SVG attributes for the normal state.
3217
+ *
3218
+ * @param {Highcharts.SVGAttributes} [hoverState]
3219
+ * SVG attributes for the hover state.
3220
+ *
3221
+ * @param {Highcharts.SVGAttributes} [pressedState]
3222
+ * SVG attributes for the pressed state.
3223
+ *
3224
+ * @param {Highcharts.SVGAttributes} [disabledState]
3225
+ * SVG attributes for the disabled state.
3226
+ *
3227
+ * @param {Highcharts.SymbolKey} [shape=rect]
3228
+ * The shape type.
3229
+ *
3230
+ * @return {Highcharts.SVGElement}
3231
+ * The button element.
2711
3232
  */
2712
3233
  button: function (
2713
3234
  text,
@@ -2850,11 +3371,16 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2850
3371
  /**
2851
3372
  * Make a straight line crisper by not spilling out to neighbour pixels.
2852
3373
  *
2853
- * @param {Array} points - The original points on the format
2854
- * `['M', 0, 0, 'L', 100, 0]`.
2855
- * @param {number} width - The width of the line.
2856
- * @returns {Array} The original points array, but modified to render
2857
- * crisply.
3374
+ * @function Highcharts.SVGRenderer#crispLine
3375
+ *
3376
+ * @param {Highcharts.SVGPathArray} points
3377
+ * The original points on the format `['M', 0, 0, 'L', 100, 0]`.
3378
+ *
3379
+ * @param {number} width
3380
+ * The width of the line.
3381
+ *
3382
+ * @return {Highcharts.SVGPathArray}
3383
+ * The original points array, but modified to render crisply.
2858
3384
  */
2859
3385
  crispLine: function (points, width) {
2860
3386
  // normalize to a crisp line
@@ -2873,24 +3399,34 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2873
3399
  /**
2874
3400
  * Draw a path, wraps the SVG `path` element.
2875
3401
  *
2876
- * @param {Array} [path] An SVG path definition in array form.
3402
+ * @sample highcharts/members/renderer-path-on-chart/
3403
+ * Draw a path in a chart
3404
+ * @sample highcharts/members/renderer-path/
3405
+ * Draw a path independent from a chart
2877
3406
  *
2878
3407
  * @example
2879
3408
  * var path = renderer.path(['M', 10, 10, 'L', 30, 30, 'z'])
2880
3409
  * .attr({ stroke: '#ff00ff' })
2881
3410
  * .add();
2882
- * @returns {SVGElement} The generated wrapper element.
2883
3411
  *
2884
- * @sample highcharts/members/renderer-path-on-chart/
2885
- * Draw a path in a chart
2886
- * @sample highcharts/members/renderer-path/
2887
- * Draw a path independent from a chart
3412
+ * @function Highcharts.SVGRenderer#path
3413
+ *
3414
+ * @param {Highcharts.SVGPathArray} [path]
3415
+ * An SVG path definition in array form.
3416
+ *
3417
+ * @return {Highcharts.SVGElement}
3418
+ * The generated wrapper element.
2888
3419
  *
2889
3420
  *//**
2890
3421
  * Draw a path, wraps the SVG `path` element.
2891
3422
  *
2892
- * @param {SVGAttributes} [attribs] The initial attributes.
2893
- * @returns {SVGElement} The generated wrapper element.
3423
+ * @function Highcharts.SVGRenderer#path
3424
+ *
3425
+ * @param {Highcharts.SVGAttributes} [attribs]
3426
+ * The initial attributes.
3427
+ *
3428
+ * @return {Highcharts.SVGElement}
3429
+ * The generated wrapper element.
2894
3430
  */
2895
3431
  path: function (path) {
2896
3432
  var attribs = {
@@ -2909,17 +3445,32 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2909
3445
  /**
2910
3446
  * Draw a circle, wraps the SVG `circle` element.
2911
3447
  *
2912
- * @param {number} [x] The center x position.
2913
- * @param {number} [y] The center y position.
2914
- * @param {number} [r] The radius.
2915
- * @returns {SVGElement} The generated wrapper element.
3448
+ * @sample highcharts/members/renderer-circle/
3449
+ * Drawing a circle
3450
+ *
3451
+ * @function Highcharts.SVGRenderer#circle
2916
3452
  *
2917
- * @sample highcharts/members/renderer-circle/ Drawing a circle
3453
+ * @param {number} [x]
3454
+ * The center x position.
3455
+ *
3456
+ * @param {number} [y]
3457
+ * The center y position.
3458
+ *
3459
+ * @param {number} [r]
3460
+ * The radius.
3461
+ *
3462
+ * @return {Highcharts.SVGElement}
3463
+ * The generated wrapper element.
2918
3464
  *//**
2919
3465
  * Draw a circle, wraps the SVG `circle` element.
2920
3466
  *
2921
- * @param {SVGAttributes} [attribs] The initial attributes.
2922
- * @returns {SVGElement} The generated wrapper element.
3467
+ * @function Highcharts.SVGRenderer#circle
3468
+ *
3469
+ * @param {Highcharts.SVGAttributes} [attribs]
3470
+ * The initial attributes.
3471
+ *
3472
+ * @return {Highcharts.SVGElement}
3473
+ * The generated wrapper element.
2923
3474
  */
2924
3475
  circle: function (x, y, r) {
2925
3476
  var attribs = isObject(x) ? x : { x: x, y: y, r: r },
@@ -2935,22 +3486,44 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2935
3486
 
2936
3487
  /**
2937
3488
  * Draw and return an arc.
2938
- * @param {number} [x=0] Center X position.
2939
- * @param {number} [y=0] Center Y position.
2940
- * @param {number} [r=0] The outer radius of the arc.
2941
- * @param {number} [innerR=0] Inner radius like used in donut charts.
2942
- * @param {number} [start=0] The starting angle of the arc in radians, where
2943
- * 0 is to the right and `-Math.PI/2` is up.
2944
- * @param {number} [end=0] The ending angle of the arc in radians, where 0
2945
- * is to the right and `-Math.PI/2` is up.
2946
- * @returns {SVGElement} The generated wrapper element.
2947
3489
  *
2948
3490
  * @sample highcharts/members/renderer-arc/
2949
3491
  * Drawing an arc
3492
+ *
3493
+ * @function Highcharts.SVGRenderer#arc
3494
+ *
3495
+ * @param {number} [x=0]
3496
+ * Center X position.
3497
+ *
3498
+ * @param {number} [y=0]
3499
+ * Center Y position.
3500
+ *
3501
+ * @param {number} [r=0]
3502
+ * The outer radius of the arc.
3503
+ *
3504
+ * @param {number} [innerR=0]
3505
+ * Inner radius like used in donut charts.
3506
+ *
3507
+ * @param {number} [start=0]
3508
+ * The starting angle of the arc in radians, where 0 is to the right
3509
+ * and `-Math.PI/2` is up.
3510
+ *
3511
+ * @param {number} [end=0]
3512
+ * The ending angle of the arc in radians, where 0 is to the right
3513
+ * and `-Math.PI/2` is up.
3514
+ *
3515
+ * @return {Highcharts.SVGElement}
3516
+ * The generated wrapper element.
2950
3517
  *//**
2951
3518
  * Draw and return an arc. Overloaded function that takes arguments object.
2952
- * @param {SVGAttributes} attribs Initial SVG attributes.
2953
- * @returns {SVGElement} The generated wrapper element.
3519
+ *
3520
+ * @function Highcharts.SVGRenderer#arc
3521
+ *
3522
+ * @param {Highcharts.SVGAttributes} attribs
3523
+ * Initial SVG attributes.
3524
+ *
3525
+ * @return {Highcharts.SVGElement}
3526
+ * The generated wrapper element.
2954
3527
  */
2955
3528
  arc: function (x, y, r, innerR, start, end) {
2956
3529
  var arc,
@@ -2981,25 +3554,44 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
2981
3554
 
2982
3555
  /**
2983
3556
  * Draw and return a rectangle.
2984
- * @param {number} [x] Left position.
2985
- * @param {number} [y] Top position.
2986
- * @param {number} [width] Width of the rectangle.
2987
- * @param {number} [height] Height of the rectangle.
2988
- * @param {number} [r] Border corner radius.
2989
- * @param {number} [strokeWidth] A stroke width can be supplied to allow
2990
- * crisp drawing.
2991
- * @returns {SVGElement} The generated wrapper element.
3557
+ *
3558
+ * @function Highcharts.SVGRenderer#rect
3559
+ *
3560
+ * @param {number} [x]
3561
+ * Left position.
3562
+ *
3563
+ * @param {number} [y]
3564
+ * Top position.
3565
+ *
3566
+ * @param {number} [width]
3567
+ * Width of the rectangle.
3568
+ *
3569
+ * @param {number} [height]
3570
+ * Height of the rectangle.
3571
+ *
3572
+ * @param {number} [r]
3573
+ * Border corner radius.
3574
+ *
3575
+ * @param {number} [strokeWidth]
3576
+ * A stroke width can be supplied to allow crisp drawing.
3577
+ *
3578
+ * @return {Highcharts.SVGElement}
3579
+ * The generated wrapper element.
2992
3580
  *//**
2993
3581
  * Draw and return a rectangle.
2994
- * @param {SVGAttributes} [attributes]
2995
- * General SVG attributes for the rectangle.
2996
- * @return {SVGElement}
2997
- * The generated wrapper element.
2998
3582
  *
2999
3583
  * @sample highcharts/members/renderer-rect-on-chart/
3000
3584
  * Draw a rectangle in a chart
3001
3585
  * @sample highcharts/members/renderer-rect/
3002
3586
  * Draw a rectangle independent from a chart
3587
+ *
3588
+ * @function Highcharts.SVGRenderer#rect
3589
+ *
3590
+ * @param {Highcharts.SVGAttributes} [attributes]
3591
+ * General SVG attributes for the rectangle.
3592
+ *
3593
+ * @return {Highcharts.SVGElement}
3594
+ * The generated wrapper element.
3003
3595
  */
3004
3596
  rect: function (x, y, width, height, r, strokeWidth) {
3005
3597
 
@@ -3038,12 +3630,20 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3038
3630
  /**
3039
3631
  * Resize the {@link SVGRenderer#box} and re-align all aligned child
3040
3632
  * elements.
3041
- * @param {number} width
3042
- * The new pixel width.
3043
- * @param {number} height
3044
- * The new pixel height.
3045
- * @param {Boolean|AnimationOptions} [animate=true]
3046
- * Whether and how to animate.
3633
+ *
3634
+ * @sample highcharts/members/renderer-g/
3635
+ * Show and hide grouped objects
3636
+ *
3637
+ * @function Highcharts.SVGRenderer#setSize
3638
+ *
3639
+ * @param {number} width
3640
+ * The new pixel width.
3641
+ *
3642
+ * @param {number} height
3643
+ * The new pixel height.
3644
+ *
3645
+ * @param {boolean|Highcharts.AnimationOptionsObject} [animate=true]
3646
+ * Whether and how to animate.
3047
3647
  */
3048
3648
  setSize: function (width, height, animate) {
3049
3649
  var renderer = this,
@@ -3074,15 +3674,16 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3074
3674
  /**
3075
3675
  * Create and return an svg group element. Child
3076
3676
  * {@link Highcharts.SVGElement} objects are added to the group by using the
3077
- * group as the first parameter
3078
- * in {@link Highcharts.SVGElement#add|add()}.
3677
+ * group as the first parameter in {@link Highcharts.SVGElement#add|add()}.
3079
3678
  *
3080
- * @param {string} [name] The group will be given a class name of
3081
- * `highcharts-{name}`. This can be used for styling and scripting.
3082
- * @returns {SVGElement} The generated wrapper element.
3679
+ * @function Highcharts.SVGRenderer#g
3083
3680
  *
3084
- * @sample highcharts/members/renderer-g/
3085
- * Show and hide grouped objects
3681
+ * @param {string} [name]
3682
+ * The group will be given a class name of `highcharts-{name}`. This
3683
+ * can be used for styling and scripting.
3684
+ *
3685
+ * @return {Highcharts.SVGElement}
3686
+ * The generated wrapper element.
3086
3687
  */
3087
3688
  g: function (name) {
3088
3689
  var elem = this.createElement('g');
@@ -3091,20 +3692,35 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3091
3692
 
3092
3693
  /**
3093
3694
  * Display an image.
3094
- * @param {string} src The image source.
3095
- * @param {number} [x] The X position.
3096
- * @param {number} [y] The Y position.
3097
- * @param {number} [width] The image width. If omitted, it defaults to the
3098
- * image file width.
3099
- * @param {number} [height] The image height. If omitted it defaults to the
3100
- * image file height.
3101
- * @param {function} [onload] Event handler for image load.
3102
- * @returns {SVGElement} The generated wrapper element.
3103
3695
  *
3104
3696
  * @sample highcharts/members/renderer-image-on-chart/
3105
3697
  * Add an image in a chart
3106
3698
  * @sample highcharts/members/renderer-image/
3107
3699
  * Add an image independent of a chart
3700
+ *
3701
+ * @function Highcharts.SVGRenderer#image
3702
+ *
3703
+ * @param {string} src
3704
+ * The image source.
3705
+ *
3706
+ * @param {number} [x]
3707
+ * The X position.
3708
+ *
3709
+ * @param {number} [y]
3710
+ * The Y position.
3711
+ *
3712
+ * @param {number} [width]
3713
+ * The image width. If omitted, it defaults to the image file width.
3714
+ *
3715
+ * @param {number} [height]
3716
+ * The image height. If omitted it defaults to the image file
3717
+ * height.
3718
+ *
3719
+ * @param {Function} [onload]
3720
+ * Event handler for image load.
3721
+ *
3722
+ * @return {Highcharts.SVGElement}
3723
+ * The generated wrapper element.
3108
3724
  */
3109
3725
  image: function (src, x, y, width, height, onload) {
3110
3726
  var attribs = {
@@ -3170,23 +3786,27 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3170
3786
  * It is used in Highcharts for point makers, which cake a `symbol` option,
3171
3787
  * and label and button backgrounds like in the tooltip and stock flags.
3172
3788
  *
3173
- * @param {Symbol} symbol - The symbol name.
3174
- * @param {number} x - The X coordinate for the top left position.
3175
- * @param {number} y - The Y coordinate for the top left position.
3176
- * @param {number} width - The pixel width.
3177
- * @param {number} height - The pixel height.
3178
- * @param {Object} [options] - Additional options, depending on the actual
3179
- * symbol drawn.
3180
- * @param {number} [options.anchorX] - The anchor X position for the
3181
- * `callout` symbol. This is where the chevron points to.
3182
- * @param {number} [options.anchorY] - The anchor Y position for the
3183
- * `callout` symbol. This is where the chevron points to.
3184
- * @param {number} [options.end] - The end angle of an `arc` symbol.
3185
- * @param {boolean} [options.open] - Whether to draw `arc` symbol open or
3186
- * closed.
3187
- * @param {number} [options.r] - The radius of an `arc` symbol, or the
3188
- * border radius for the `callout` symbol.
3189
- * @param {number} [options.start] - The start angle of an `arc` symbol.
3789
+ * @function Highcharts.SVGRenderer#symbol
3790
+ *
3791
+ * @param {symbol} symbol
3792
+ * The symbol name.
3793
+ *
3794
+ * @param {number} x
3795
+ * The X coordinate for the top left position.
3796
+ *
3797
+ * @param {number} y
3798
+ * The Y coordinate for the top left position.
3799
+ *
3800
+ * @param {number} width
3801
+ * The pixel width.
3802
+ *
3803
+ * @param {number} height
3804
+ * The pixel height.
3805
+ *
3806
+ * @param {Highcharts.SymbolOptionsObject} [options]
3807
+ * Additional options, depending on the actual symbol drawn.
3808
+ *
3809
+ * @return {Highcharts.SVGElement}
3190
3810
  */
3191
3811
  symbol: function (symbol, x, y, width, height, options) {
3192
3812
 
@@ -3351,16 +3971,11 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3351
3971
  return obj;
3352
3972
  },
3353
3973
 
3354
- /**
3355
- * @typedef {string} Symbol
3356
- *
3357
- * Can be one of `arc`, `callout`, `circle`, `diamond`, `square`,
3358
- * `triangle`, `triangle-down`. Symbols are used internally for point
3359
- * markers, button and label borders and backgrounds, or custom shapes.
3360
- * Extendable by adding to {@link SVGRenderer#symbols}.
3361
- */
3362
3974
  /**
3363
3975
  * An extendable collection of functions for defining symbol paths.
3976
+ *
3977
+ * @name Highcharts.SVGRenderer#symbols
3978
+ * @type {Highcharts.SymbolDictionary}
3364
3979
  */
3365
3980
  symbols: {
3366
3981
  'circle': function (x, y, w, h) {
@@ -3467,7 +4082,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3467
4082
  * Callout shape used for default tooltips, also used for rounded
3468
4083
  * rectangles in VML
3469
4084
  */
3470
- callout: function (x, y, w, h, options) {
4085
+ 'callout': function (x, y, w, h, options) {
3471
4086
  var arrowLength = 6,
3472
4087
  halfDistance = 6,
3473
4088
  r = Math.min((options && options.r) || 0, w, h),
@@ -3570,10 +4185,9 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3570
4185
  },
3571
4186
 
3572
4187
  /**
3573
- * @typedef {SVGElement} ClipRect - A clipping rectangle that can be applied
3574
- * to one or more {@link SVGElement} instances. It is instanciated with the
3575
- * {@link SVGRenderer#clipRect} function and applied with the {@link
3576
- * SVGElement#clip} function.
4188
+ * Define a clipping rectangle. The clipping rectangle is later applied
4189
+ * to {@link SVGElement} objects through the {@link SVGElement#clip}
4190
+ * function.
3577
4191
  *
3578
4192
  * @example
3579
4193
  * var circle = renderer.circle(100, 100, 100)
@@ -3583,27 +4197,21 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3583
4197
  *
3584
4198
  * // Leave only the lower right quarter visible
3585
4199
  * circle.clip(clipRect);
3586
- */
3587
- /**
3588
- * Define a clipping rectangle. The clipping rectangle is later applied
3589
- * to {@link SVGElement} objects through the {@link SVGElement#clip}
3590
- * function.
3591
4200
  *
3592
- * @param {String} id
4201
+ * @function Highcharts.SVGRenderer#clipRect
4202
+ *
4203
+ * @param {string} id
4204
+ *
3593
4205
  * @param {number} x
4206
+ *
3594
4207
  * @param {number} y
4208
+ *
3595
4209
  * @param {number} width
3596
- * @param {number} height
3597
- * @returns {ClipRect} A clipping rectangle.
3598
4210
  *
3599
- * @example
3600
- * var circle = renderer.circle(100, 100, 100)
3601
- * .attr({ fill: 'red' })
3602
- * .add();
3603
- * var clipRect = renderer.clipRect(100, 100, 100, 100);
4211
+ * @param {number} height
3604
4212
  *
3605
- * // Leave only the lower right quarter visible
3606
- * circle.clip(clipRect);
4213
+ * @return {Highcharts.ClipRectElement}
4214
+ * A clipping rectangle.
3607
4215
  */
3608
4216
  clipRect: function (x, y, width, height) {
3609
4217
  var wrapper,
@@ -3630,16 +4238,6 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3630
4238
  * and some basic text styling of these. For more advanced features like
3631
4239
  * border and background, use {@link Highcharts.SVGRenderer#label} instead.
3632
4240
  * To update the text after render, run `text.attr({ text: 'New text' })`.
3633
- * @param {String} str
3634
- * The text of (subset) HTML to draw.
3635
- * @param {number} x
3636
- * The x position of the text's lower left corner.
3637
- * @param {number} y
3638
- * The y position of the text's lower left corner.
3639
- * @param {Boolean} [useHTML=false]
3640
- * Use HTML to render the text.
3641
- *
3642
- * @return {SVGElement} The text object.
3643
4241
  *
3644
4242
  * @sample highcharts/members/renderer-text-on-chart/
3645
4243
  * Annotate the chart freely
@@ -3647,6 +4245,23 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3647
4245
  * Annotate with a border and in response to the data
3648
4246
  * @sample highcharts/members/renderer-text/
3649
4247
  * Formatted text
4248
+ *
4249
+ * @function Highcharts.SVGRenderer#text
4250
+ *
4251
+ * @param {string} str
4252
+ * The text of (subset) HTML to draw.
4253
+ *
4254
+ * @param {number} x
4255
+ * The x position of the text's lower left corner.
4256
+ *
4257
+ * @param {number} y
4258
+ * The y position of the text's lower left corner.
4259
+ *
4260
+ * @param {boolean} [useHTML=false]
4261
+ * Use HTML to render the text.
4262
+ *
4263
+ * @return {Highcharts.SVGElement}
4264
+ * The text object.
3650
4265
  */
3651
4266
  text: function (str, x, y, useHTML) {
3652
4267
 
@@ -3663,7 +4278,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3663
4278
  if (y) {
3664
4279
  attribs.y = Math.round(y);
3665
4280
  }
3666
- if (str || str === 0) {
4281
+ if (defined(str)) {
3667
4282
  attribs.text = str;
3668
4283
  }
3669
4284
 
@@ -3695,12 +4310,17 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3695
4310
  * Utility to return the baseline offset and total line height from the font
3696
4311
  * size.
3697
4312
  *
3698
- * @param {?string} fontSize The current font size to inspect. If not given,
3699
- * the font size will be found from the DOM element.
3700
- * @param {SVGElement|SVGDOMElement} [elem] The element to inspect for a
3701
- * current font size.
3702
- * @returns {Object} An object containing `h`: the line height, `b`: the
3703
- * baseline relative to the top of the box, and `f`: the font size.
4313
+ * @function Highcharts.SVGRenderer#fontMetrics
4314
+ *
4315
+ * @param {string} [fontSize]
4316
+ * The current font size to inspect. If not given, the font size
4317
+ * will be found from the DOM element.
4318
+ *
4319
+ * @param {Highcharts.SVGElement|Highcharts.SVGDOMElement} [elem]
4320
+ * The element to inspect for a current font size.
4321
+ *
4322
+ * @return {Highcharts.FontMetricsObject}
4323
+ * The font metrics.
3704
4324
  */
3705
4325
  fontMetrics: function (fontSize, elem) {
3706
4326
  var lineHeight,
@@ -3728,7 +4348,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3728
4348
 
3729
4349
  // Empirical values found by comparing font size and bounding box
3730
4350
  // height. Applies to the default font family.
3731
- // http://jsfiddle.net/highcharts/7xvn7/
4351
+ // https://jsfiddle.net/highcharts/7xvn7/
3732
4352
  lineHeight = fontSize < 24 ? fontSize + 3 : Math.round(fontSize * 1.2);
3733
4353
  baseline = Math.round(lineHeight * 0.8);
3734
4354
 
@@ -3743,6 +4363,13 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3743
4363
  * Correct X and Y positioning of a label for rotation (#1764).
3744
4364
  *
3745
4365
  * @private
4366
+ * @function Highcharts.SVGRenderer#rotCorr
4367
+ *
4368
+ * @param {number} baseline
4369
+ *
4370
+ * @param {number} rotation
4371
+ *
4372
+ * @param {boolean} alterY
3746
4373
  */
3747
4374
  rotCorr: function (baseline, rotation, alterY) {
3748
4375
  var y = baseline;
@@ -3763,35 +4390,52 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3763
4390
  * using the {@link Highcharts.SVGElement#attr|attr} method. To update the
3764
4391
  * text after render, run `label.attr({ text: 'New text' })`.
3765
4392
  *
3766
- * @param {string} str
3767
- * The initial text string or (subset) HTML to render.
3768
- * @param {number} x
3769
- * The x position of the label's left side.
3770
- * @param {number} y
3771
- * The y position of the label's top side or baseline, depending on
3772
- * the `baseline` parameter.
3773
- * @param {String} shape
3774
- * The shape of the label's border/background, if any. Defaults to
3775
- * `rect`. Other possible values are `callout` or other shapes
3776
- * defined in {@link Highcharts.SVGRenderer#symbols}.
3777
- * @param {number} anchorX
3778
- * In case the `shape` has a pointer, like a flag, this is the
3779
- * coordinates it should be pinned to.
3780
- * @param {number} anchorY
3781
- * In case the `shape` has a pointer, like a flag, this is the
3782
- * coordinates it should be pinned to.
3783
- * @param {Boolean} baseline
3784
- * Whether to position the label relative to the text baseline,
3785
- * like {@link Highcharts.SVGRenderer#text|renderer.text}, or to the
3786
- * upper border of the rectangle.
3787
- * @param {String} className
3788
- * Class name for the group.
3789
- *
3790
- * @return {SVGElement}
3791
- * The generated label.
3792
- *
3793
4393
  * @sample highcharts/members/renderer-label-on-chart/
3794
4394
  * A label on the chart
4395
+ *
4396
+ * @function Highcharts.SVGRenderer#label
4397
+ *
4398
+ * @param {string} str
4399
+ * The initial text string or (subset) HTML to render.
4400
+ *
4401
+ * @param {number} x
4402
+ * The x position of the label's left side.
4403
+ *
4404
+ * @param {number} y
4405
+ * The y position of the label's top side or baseline, depending on
4406
+ * the `baseline` parameter.
4407
+ *
4408
+ * @param {string} [shape='rect']
4409
+ * The shape of the label's border/background, if any. Defaults to
4410
+ * `rect`. Other possible values are `callout` or other shapes
4411
+ * defined in {@link Highcharts.SVGRenderer#symbols}.
4412
+ *
4413
+ * @param {string} [shape='rect']
4414
+ * The shape of the label's border/background, if any. Defaults to
4415
+ * `rect`. Other possible values are `callout` or other shapes
4416
+ * defined in {@link Highcharts.SVGRenderer#symbols}.
4417
+ *
4418
+ * @param {number} [anchorX]
4419
+ * In case the `shape` has a pointer, like a flag, this is the
4420
+ * coordinates it should be pinned to.
4421
+ *
4422
+ * @param {number} [anchorY]
4423
+ * In case the `shape` has a pointer, like a flag, this is the
4424
+ * coordinates it should be pinned to.
4425
+ *
4426
+ * @param {boolean} [useHTML=false]
4427
+ * Wether to use HTML to render the label.
4428
+ *
4429
+ * @param {boolean} [baseline=false]
4430
+ * Whether to position the label relative to the text baseline,
4431
+ * like {@link Highcharts.SVGRenderer#text|renderer.text}, or to the
4432
+ * upper border of the rectangle.
4433
+ *
4434
+ * @param {string} [className]
4435
+ * Class name for the group.
4436
+ *
4437
+ * @return {Highcharts.SVGElement}
4438
+ * The generated label.
3795
4439
  */
3796
4440
  label: function (
3797
4441
  str,
@@ -3843,7 +4487,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3843
4487
 
3844
4488
 
3845
4489
 
3846
- /**
4490
+ /*
3847
4491
  * This function runs after the label is added to the DOM (when the
3848
4492
  * bounding box is available), and after the text of the label is
3849
4493
  * updated to detect the new bounding box and reflect it in the border
@@ -3901,9 +4545,9 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3901
4545
  }
3902
4546
  };
3903
4547
 
3904
- /**
4548
+ /*
3905
4549
  * This function runs after setting text or padding, but only if padding
3906
- * is changed
4550
+ * is changed.
3907
4551
  */
3908
4552
  updateTextPadding = function () {
3909
4553
  var textX = paddingLeft + padding,
@@ -3941,10 +4585,8 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3941
4585
  text.y = textY;
3942
4586
  };
3943
4587
 
3944
- /**
4588
+ /*
3945
4589
  * Set a box attribute, or defer it if the box is not yet created
3946
- * @param {Object} key
3947
- * @param {Object} value
3948
4590
  */
3949
4591
  boxAttr = function (key, value) {
3950
4592
  if (box) {
@@ -3954,7 +4596,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
3954
4596
  }
3955
4597
  };
3956
4598
 
3957
- /**
4599
+ /*
3958
4600
  * After the text element is added, get the desired size of the border
3959
4601
  * box and add it before the text in the DOM.
3960
4602
  */
@@ -4076,10 +4718,9 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
4076
4718
  // Redirect certain methods to either the box or the text
4077
4719
  var baseCss = wrapper.css;
4078
4720
  return extend(wrapper, {
4079
- /**
4721
+ /*
4080
4722
  * Pick up some properties and apply them to the text instead of the
4081
4723
  * wrapper.
4082
- * @ignore
4083
4724
  */
4084
4725
  css: function (styles) {
4085
4726
  if (styles) {
@@ -4101,9 +4742,8 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
4101
4742
  }
4102
4743
  return baseCss.call(wrapper, styles);
4103
4744
  },
4104
- /**
4745
+ /*
4105
4746
  * Return the bounding box of the box, not the group.
4106
- * @ignore
4107
4747
  */
4108
4748
  getBBox: function () {
4109
4749
  return {
@@ -4114,9 +4754,8 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
4114
4754
  };
4115
4755
  },
4116
4756
 
4117
- /**
4757
+ /*
4118
4758
  * Apply the shadow to the box.
4119
- * @ignore
4120
4759
  */
4121
4760
  shadow: function (b) {
4122
4761
  if (b) {
@@ -4128,9 +4767,8 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
4128
4767
  return wrapper;
4129
4768
  },
4130
4769
 
4131
- /**
4770
+ /*
4132
4771
  * Destroy and release memory.
4133
- * @ignore
4134
4772
  */
4135
4773
  destroy: function () {
4136
4774