highcharts 12.0.2 → 12.1.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 (331) hide show
  1. package/bower.json +1 -1
  2. package/es-modules/Accessibility/Options/A11yDefaults.js +2 -0
  3. package/es-modules/Core/Color/Color.js +5 -12
  4. package/es-modules/Core/Renderer/HTML/HTMLElement.js +1 -3
  5. package/es-modules/Core/Renderer/SVG/SVGElement.js +3 -1
  6. package/es-modules/Core/Renderer/SVG/SVGLabel.js +8 -11
  7. package/es-modules/Core/Series/DataLabel.js +3 -1
  8. package/es-modules/Core/Series/Series.js +13 -15
  9. package/es-modules/Core/Templating.js +14 -10
  10. package/es-modules/Core/Time.js +6 -3
  11. package/es-modules/Core/Utilities.js +1 -1
  12. package/es-modules/Data/Converters/CSVConverter.js +1 -0
  13. package/es-modules/Data/Converters/DataConverter.js +31 -0
  14. package/es-modules/Data/Converters/GoogleSheetsConverter.js +1 -0
  15. package/es-modules/Data/Converters/HTMLTableConverter.js +1 -0
  16. package/es-modules/Data/Converters/JSONConverter.js +1 -0
  17. package/es-modules/Extensions/Boost/BoostSeries.js +13 -7
  18. package/es-modules/Extensions/DragPanes/AxisResizer.js +1 -1
  19. package/es-modules/Extensions/SeriesLabel/SeriesLabelDefaults.js +7 -2
  20. package/es-modules/Series/Bubble/BubbleSeries.js +24 -0
  21. package/es-modules/Series/Organization/OrganizationSeriesDefaults.js +3 -1
  22. package/es-modules/Series/Timeline/TimelineSeriesDefaults.js +3 -1
  23. package/es-modules/Series/Treegraph/TreegraphSeriesDefaults.js +3 -1
  24. package/es-modules/Series/Treemap/TreemapPoint.js +7 -2
  25. package/es-modules/Series/Treemap/TreemapSeries.js +154 -53
  26. package/es-modules/Series/Treemap/TreemapSeriesDefaults.js +126 -4
  27. package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +1 -0
  28. package/es-modules/Stock/RangeSelector/RangeSelector.js +68 -72
  29. package/es-modules/Stock/RangeSelector/RangeSelectorDefaults.js +10 -4
  30. package/es-modules/masters/indicators/indicators-all.src.js +4 -0
  31. package/es-modules/tsconfig.tsbuildinfo +1 -1
  32. package/highcharts-3d.js +2 -2
  33. package/highcharts-3d.src.js +1 -1
  34. package/highcharts-gantt.js +5 -5
  35. package/highcharts-gantt.src.js +140 -141
  36. package/highcharts-more.js +2 -2
  37. package/highcharts-more.src.js +25 -1
  38. package/highcharts.d.ts +281 -762
  39. package/highcharts.js +3 -3
  40. package/highcharts.src.d.ts +281 -762
  41. package/highcharts.src.js +57 -60
  42. package/highmaps.js +5 -5
  43. package/highmaps.src.js +84 -63
  44. package/highstock.js +5 -5
  45. package/highstock.src.js +140 -141
  46. package/indicators/acceleration-bands.js +2 -2
  47. package/indicators/acceleration-bands.src.js +1 -1
  48. package/indicators/accumulation-distribution.js +2 -2
  49. package/indicators/accumulation-distribution.src.js +1 -1
  50. package/indicators/ao.js +2 -2
  51. package/indicators/ao.src.js +1 -1
  52. package/indicators/apo.js +2 -2
  53. package/indicators/apo.src.js +1 -1
  54. package/indicators/aroon-oscillator.js +2 -2
  55. package/indicators/aroon-oscillator.src.js +1 -1
  56. package/indicators/aroon.js +2 -2
  57. package/indicators/aroon.src.js +1 -1
  58. package/indicators/atr.js +2 -2
  59. package/indicators/atr.src.js +1 -1
  60. package/indicators/bollinger-bands.js +2 -2
  61. package/indicators/bollinger-bands.src.js +1 -1
  62. package/indicators/cci.js +2 -2
  63. package/indicators/cci.src.js +1 -1
  64. package/indicators/chaikin.js +2 -2
  65. package/indicators/chaikin.src.js +1 -1
  66. package/indicators/cmf.js +2 -2
  67. package/indicators/cmf.src.js +1 -1
  68. package/indicators/cmo.js +2 -2
  69. package/indicators/cmo.src.js +1 -1
  70. package/indicators/dema.js +2 -2
  71. package/indicators/dema.src.js +1 -1
  72. package/indicators/disparity-index.js +2 -2
  73. package/indicators/disparity-index.src.js +1 -1
  74. package/indicators/dmi.js +2 -2
  75. package/indicators/dmi.src.js +1 -1
  76. package/indicators/dpo.js +2 -2
  77. package/indicators/dpo.src.js +1 -1
  78. package/indicators/ema.js +1 -1
  79. package/indicators/ichimoku-kinko-hyo.js +2 -2
  80. package/indicators/ichimoku-kinko-hyo.src.js +1 -1
  81. package/indicators/indicators-all.js +2 -2
  82. package/indicators/indicators-all.src.js +6 -1
  83. package/indicators/indicators.js +2 -2
  84. package/indicators/indicators.src.js +1 -1
  85. package/indicators/keltner-channels.js +2 -2
  86. package/indicators/keltner-channels.src.js +1 -1
  87. package/indicators/klinger.js +2 -2
  88. package/indicators/klinger.src.js +1 -1
  89. package/indicators/macd.js +2 -2
  90. package/indicators/macd.src.js +1 -1
  91. package/indicators/mfi.js +2 -2
  92. package/indicators/mfi.src.js +1 -1
  93. package/indicators/momentum.js +2 -2
  94. package/indicators/momentum.src.js +1 -1
  95. package/indicators/natr.js +2 -2
  96. package/indicators/natr.src.js +1 -1
  97. package/indicators/obv.js +2 -2
  98. package/indicators/obv.src.js +1 -1
  99. package/indicators/pivot-points.js +2 -2
  100. package/indicators/pivot-points.src.js +1 -1
  101. package/indicators/ppo.js +2 -2
  102. package/indicators/ppo.src.js +1 -1
  103. package/indicators/price-channel.js +2 -2
  104. package/indicators/price-channel.src.js +1 -1
  105. package/indicators/price-envelopes.js +2 -2
  106. package/indicators/price-envelopes.src.js +1 -1
  107. package/indicators/psar.js +2 -2
  108. package/indicators/psar.src.js +1 -1
  109. package/indicators/regressions.js +2 -2
  110. package/indicators/regressions.src.js +1 -1
  111. package/indicators/roc.js +2 -2
  112. package/indicators/roc.src.js +1 -1
  113. package/indicators/rsi.js +2 -2
  114. package/indicators/rsi.src.js +1 -1
  115. package/indicators/slow-stochastic.js +2 -2
  116. package/indicators/slow-stochastic.src.js +1 -1
  117. package/indicators/stochastic.js +2 -2
  118. package/indicators/stochastic.src.js +1 -1
  119. package/indicators/supertrend.js +2 -2
  120. package/indicators/supertrend.src.js +1 -1
  121. package/indicators/tema.js +2 -2
  122. package/indicators/tema.src.js +1 -1
  123. package/indicators/trendline.js +2 -2
  124. package/indicators/trendline.src.js +1 -1
  125. package/indicators/trix.js +2 -2
  126. package/indicators/trix.src.js +1 -1
  127. package/indicators/volume-by-price.js +2 -2
  128. package/indicators/volume-by-price.src.js +2 -1
  129. package/indicators/vwap.js +2 -2
  130. package/indicators/vwap.src.js +1 -1
  131. package/indicators/williams-r.js +2 -2
  132. package/indicators/williams-r.src.js +1 -1
  133. package/indicators/wma.js +2 -2
  134. package/indicators/wma.src.js +1 -1
  135. package/indicators/zigzag.js +2 -2
  136. package/indicators/zigzag.src.js +1 -1
  137. package/modules/accessibility.js +2 -2
  138. package/modules/accessibility.src.js +3 -1
  139. package/modules/annotations-advanced.js +3 -3
  140. package/modules/annotations-advanced.src.js +4 -4
  141. package/modules/annotations.js +2 -2
  142. package/modules/annotations.src.js +3 -3
  143. package/modules/arc-diagram.js +2 -2
  144. package/modules/arc-diagram.src.js +1 -1
  145. package/modules/arrow-symbols.js +2 -2
  146. package/modules/arrow-symbols.src.js +1 -1
  147. package/modules/boost-canvas.js +2 -2
  148. package/modules/boost-canvas.src.js +14 -11
  149. package/modules/boost.js +2 -2
  150. package/modules/boost.src.js +14 -11
  151. package/modules/broken-axis.js +2 -2
  152. package/modules/broken-axis.src.js +1 -1
  153. package/modules/bullet.js +2 -2
  154. package/modules/bullet.src.js +1 -1
  155. package/modules/coloraxis.js +2 -2
  156. package/modules/coloraxis.src.js +1 -1
  157. package/modules/current-date-indicator.js +2 -2
  158. package/modules/current-date-indicator.src.js +1 -1
  159. package/modules/cylinder.js +2 -2
  160. package/modules/cylinder.src.js +1 -1
  161. package/modules/data-tools.js +2 -2
  162. package/modules/data-tools.src.js +36 -1
  163. package/modules/data.js +2 -2
  164. package/modules/data.src.js +1 -1
  165. package/modules/datagrouping.js +2 -2
  166. package/modules/datagrouping.src.js +1 -1
  167. package/modules/debugger.js +2 -2
  168. package/modules/debugger.src.js +1 -1
  169. package/modules/dependency-wheel.js +2 -2
  170. package/modules/dependency-wheel.src.js +1 -1
  171. package/modules/dotplot.js +2 -2
  172. package/modules/dotplot.src.js +1 -1
  173. package/modules/drag-panes.js +2 -2
  174. package/modules/drag-panes.src.js +2 -2
  175. package/modules/draggable-points.js +2 -2
  176. package/modules/draggable-points.src.js +1 -1
  177. package/modules/drilldown.js +2 -2
  178. package/modules/drilldown.src.js +1 -1
  179. package/modules/dumbbell.js +2 -2
  180. package/modules/dumbbell.src.js +1 -1
  181. package/modules/export-data.js +2 -2
  182. package/modules/export-data.src.js +1 -1
  183. package/modules/exporting.js +2 -2
  184. package/modules/exporting.src.js +1 -1
  185. package/modules/flowmap.js +2 -2
  186. package/modules/flowmap.src.js +1 -1
  187. package/modules/full-screen.js +2 -2
  188. package/modules/full-screen.src.js +1 -1
  189. package/modules/funnel.js +2 -2
  190. package/modules/funnel.src.js +1 -1
  191. package/modules/funnel3d.js +2 -2
  192. package/modules/funnel3d.src.js +1 -1
  193. package/modules/gantt.js +6 -6
  194. package/modules/gantt.src.js +82 -80
  195. package/modules/geoheatmap.js +2 -2
  196. package/modules/geoheatmap.src.js +1 -1
  197. package/modules/grid-axis.js +2 -2
  198. package/modules/grid-axis.src.js +1 -1
  199. package/modules/heatmap.js +3 -3
  200. package/modules/heatmap.src.js +2 -2
  201. package/modules/heikinashi.js +2 -2
  202. package/modules/heikinashi.src.js +1 -1
  203. package/modules/histogram-bellcurve.js +2 -2
  204. package/modules/histogram-bellcurve.src.js +1 -1
  205. package/modules/hollowcandlestick.js +2 -2
  206. package/modules/hollowcandlestick.src.js +1 -1
  207. package/modules/item-series.js +2 -2
  208. package/modules/item-series.src.js +1 -1
  209. package/modules/lollipop.js +2 -2
  210. package/modules/lollipop.src.js +1 -1
  211. package/modules/map.js +4 -4
  212. package/modules/map.src.js +26 -2
  213. package/modules/marker-clusters.js +2 -2
  214. package/modules/marker-clusters.src.js +1 -1
  215. package/modules/mouse-wheel-zoom.js +2 -2
  216. package/modules/mouse-wheel-zoom.src.js +1 -1
  217. package/modules/navigator.js +2 -2
  218. package/modules/navigator.src.js +1 -1
  219. package/modules/networkgraph.js +2 -2
  220. package/modules/networkgraph.src.js +1 -1
  221. package/modules/no-data-to-display.js +2 -2
  222. package/modules/no-data-to-display.src.js +1 -1
  223. package/modules/offline-exporting.js +2 -2
  224. package/modules/offline-exporting.src.js +2 -2
  225. package/modules/organization.js +2 -2
  226. package/modules/organization.src.js +4 -2
  227. package/modules/overlapping-datalabels.js +2 -2
  228. package/modules/overlapping-datalabels.src.js +1 -1
  229. package/modules/parallel-coordinates.js +2 -2
  230. package/modules/parallel-coordinates.src.js +1 -1
  231. package/modules/pareto.js +2 -2
  232. package/modules/pareto.src.js +1 -1
  233. package/modules/pathfinder.js +2 -2
  234. package/modules/pathfinder.src.js +1 -1
  235. package/modules/pattern-fill.js +2 -2
  236. package/modules/pattern-fill.src.js +1 -1
  237. package/modules/pictorial.js +2 -2
  238. package/modules/pictorial.src.js +1 -1
  239. package/modules/pointandfigure.js +2 -2
  240. package/modules/pointandfigure.src.js +1 -1
  241. package/modules/price-indicator.js +2 -2
  242. package/modules/price-indicator.src.js +1 -1
  243. package/modules/pyramid3d.js +2 -2
  244. package/modules/pyramid3d.src.js +1 -1
  245. package/modules/renko.js +2 -2
  246. package/modules/renko.src.js +1 -1
  247. package/modules/sankey.js +2 -2
  248. package/modules/sankey.src.js +1 -1
  249. package/modules/series-label.js +2 -2
  250. package/modules/series-label.src.js +8 -3
  251. package/modules/series-on-point.js +2 -2
  252. package/modules/series-on-point.src.js +1 -1
  253. package/modules/solid-gauge.js +2 -2
  254. package/modules/solid-gauge.src.js +1 -1
  255. package/modules/sonification.js +2 -2
  256. package/modules/sonification.src.js +1 -1
  257. package/modules/static-scale.js +2 -2
  258. package/modules/static-scale.src.js +1 -1
  259. package/modules/stock-tools.js +2 -2
  260. package/modules/stock-tools.src.js +3 -3
  261. package/modules/stock.js +6 -6
  262. package/modules/stock.src.js +82 -80
  263. package/modules/streamgraph.js +2 -2
  264. package/modules/streamgraph.src.js +1 -1
  265. package/modules/sunburst.js +2 -2
  266. package/modules/sunburst.src.js +290 -62
  267. package/modules/textpath.js +2 -2
  268. package/modules/textpath.src.js +1 -1
  269. package/modules/tiledwebmap.js +3 -3
  270. package/modules/tiledwebmap.src.js +1 -1
  271. package/modules/tilemap.js +2 -2
  272. package/modules/tilemap.src.js +1 -1
  273. package/modules/timeline.js +2 -2
  274. package/modules/timeline.src.js +4 -2
  275. package/modules/treegraph.js +2 -2
  276. package/modules/treegraph.src.js +4 -2
  277. package/modules/treegrid.js +2 -2
  278. package/modules/treegrid.src.js +1 -1
  279. package/modules/treemap.js +2 -2
  280. package/modules/treemap.src.js +288 -60
  281. package/modules/variable-pie.js +2 -2
  282. package/modules/variable-pie.src.js +1 -1
  283. package/modules/variwide.js +2 -2
  284. package/modules/variwide.src.js +1 -1
  285. package/modules/vector.js +2 -2
  286. package/modules/vector.src.js +1 -1
  287. package/modules/venn.js +2 -2
  288. package/modules/venn.src.js +1 -1
  289. package/modules/windbarb.js +2 -2
  290. package/modules/windbarb.src.js +1 -1
  291. package/modules/wordcloud.js +2 -2
  292. package/modules/wordcloud.src.js +1 -1
  293. package/modules/xrange.js +2 -2
  294. package/modules/xrange.src.js +1 -1
  295. package/options/treegraph.d.ts +559 -70
  296. package/options/treegraph.src.d.ts +559 -70
  297. package/options/treemap.d.ts +314 -160
  298. package/options/treemap.src.d.ts +314 -160
  299. package/options/vbp.d.ts +1 -1
  300. package/options/vbp.src.d.ts +1 -1
  301. package/package.json +1 -1
  302. package/standalone-navigator.js +3 -3
  303. package/standalone-navigator.src.js +58 -61
  304. package/themes/avocado.js +2 -2
  305. package/themes/avocado.src.js +1 -1
  306. package/themes/brand-dark.js +2 -2
  307. package/themes/brand-dark.src.js +1 -1
  308. package/themes/brand-light.js +2 -2
  309. package/themes/brand-light.src.js +1 -1
  310. package/themes/dark-blue.js +2 -2
  311. package/themes/dark-blue.src.js +1 -1
  312. package/themes/dark-green.js +2 -2
  313. package/themes/dark-green.src.js +1 -1
  314. package/themes/dark-unica.js +2 -2
  315. package/themes/dark-unica.src.js +1 -1
  316. package/themes/gray.js +2 -2
  317. package/themes/gray.src.js +1 -1
  318. package/themes/grid-light.js +2 -2
  319. package/themes/grid-light.src.js +1 -1
  320. package/themes/grid.js +2 -2
  321. package/themes/grid.src.js +1 -1
  322. package/themes/high-contrast-dark.js +2 -2
  323. package/themes/high-contrast-dark.src.js +1 -1
  324. package/themes/high-contrast-light.js +2 -2
  325. package/themes/high-contrast-light.src.js +1 -1
  326. package/themes/sand-signika.js +2 -2
  327. package/themes/sand-signika.src.js +1 -1
  328. package/themes/skies.js +2 -2
  329. package/themes/skies.src.js +1 -1
  330. package/themes/sunset.js +2 -2
  331. package/themes/sunset.src.js +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v12.0.2 (2024-12-04)
2
+ * @license Highcharts JS v12.1.0 (2024-12-17)
3
3
  * @module highcharts/modules/sunburst
4
4
  * @requires highcharts
5
5
  *
@@ -1470,6 +1470,7 @@ class TreemapPoint extends ScatterPoint {
1470
1470
  *
1471
1471
  * */
1472
1472
  super(...arguments);
1473
+ this.groupedPointsAmount = 0;
1473
1474
  this.shapeType = 'rect';
1474
1475
  }
1475
1476
  /* *
@@ -1488,11 +1489,15 @@ class TreemapPoint extends ScatterPoint {
1488
1489
  this.node.children.length) {
1489
1490
  className += ' highcharts-above-level';
1490
1491
  }
1491
- else if (!this.node.isLeaf &&
1492
+ else if (!this.node.isGroup &&
1493
+ !this.node.isLeaf &&
1494
+ !series.nodeMap[series.rootNode].isGroup &&
1492
1495
  !TreemapPoint_pick(options.interactByLeaf, !options.allowTraversingTree)) {
1493
1496
  className += ' highcharts-internal-node-interactive';
1494
1497
  }
1495
- else if (!this.node.isLeaf) {
1498
+ else if (!this.node.isGroup &&
1499
+ !this.node.isLeaf &&
1500
+ !series.nodeMap[series.rootNode].isGroup) {
1496
1501
  className += ' highcharts-internal-node';
1497
1502
  }
1498
1503
  return className;
@@ -1559,7 +1564,7 @@ const { isString: TreemapSeriesDefaults_isString } = (highcharts_commonjs_highch
1559
1564
  * Treemap
1560
1565
  *
1561
1566
  * @extends plotOptions.scatter
1562
- * @excluding cluster, connectEnds, connectNulls, dataSorting, dragDrop, jitter, marker
1567
+ * @excluding connectEnds, connectNulls, dataSorting, dragDrop, jitter, marker
1563
1568
  * @product highcharts
1564
1569
  * @requires modules/treemap
1565
1570
  * @optionparent plotOptions.treemap
@@ -1586,6 +1591,8 @@ const TreemapSeriesDefaults = {
1586
1591
  *
1587
1592
  * @sample {highcharts} highcharts/plotoptions/treemap-allowtraversingtree/
1588
1593
  * Enabled
1594
+ * @sample {highcharts} highcharts/plotoptions/treemap-grouping-traversing/
1595
+ * Traversing to Grouped Points node
1589
1596
  *
1590
1597
  * @since 7.0.3
1591
1598
  * @product highcharts
@@ -1708,11 +1715,28 @@ const TreemapSeriesDefaults = {
1708
1715
  return name;
1709
1716
  },
1710
1717
  inside: true,
1711
- verticalAlign: 'middle'
1718
+ padding: 2,
1719
+ verticalAlign: 'middle',
1720
+ style: {
1721
+ textOverflow: 'ellipsis'
1722
+ }
1712
1723
  },
1713
1724
  tooltip: {
1714
1725
  headerFormat: '',
1715
- pointFormat: '<b>{point.name}</b>: {point.value}<br/>'
1726
+ pointFormat: '<b>{point.name}</b>: {point.value}<br/>',
1727
+ /**
1728
+ * The HTML of the grouped point's nodes in the tooltip. Works only for
1729
+ * Treemap series grouping and analogously to
1730
+ * [pointFormat](#tooltip.pointFormat).
1731
+ *
1732
+ * The grouped nodes point tooltip can be also formatted using
1733
+ * `tooltip.formatter` callback function and `point.isGroupNode` flag.
1734
+ *
1735
+ * @type {string}
1736
+ * @default '+ {point.groupedPointsAmount} more...'
1737
+ * @apioption tooltip.clusterFormat
1738
+ */
1739
+ clusterFormat: '+ {point.groupedPointsAmount} more...<br/>'
1716
1740
  },
1717
1741
  /**
1718
1742
  * Whether to ignore hidden points when the layout algorithm runs.
@@ -2006,7 +2030,110 @@ const TreemapSeriesDefaults = {
2006
2030
  *
2007
2031
  * @product highcharts
2008
2032
  */
2009
- traverseToLeaf: false
2033
+ traverseToLeaf: false,
2034
+ /**
2035
+ * An option to optimize treemap series rendering by grouping smaller leaf
2036
+ * nodes below a certain square area threshold in pixels. If the square area
2037
+ * of a point becomes smaller than the specified threshold, determined by
2038
+ * the `pixelWidth` and/or `pixelHeight` options, then this point is moved
2039
+ * into one group point per series.
2040
+ *
2041
+ * @sample {highcharts} highcharts/plotoptions/treemap-grouping-simple
2042
+ * Simple demo of Treemap grouping
2043
+ * @sample {highcharts} highcharts/plotoptions/treemap-grouping-multiple-parents
2044
+ * Treemap grouping with multiple parents
2045
+ * @sample {highcharts} highcharts/plotoptions/treemap-grouping-advanced
2046
+ * Advanced demo of Treemap grouping
2047
+ *
2048
+ * @since 12.1.0
2049
+ *
2050
+ * @excluding allowOverlap, animation, dataLabels, drillToCluster, events,
2051
+ * layoutAlgorithm, marker, states, zones
2052
+ *
2053
+ * @product highcharts
2054
+ */
2055
+ cluster: {
2056
+ /**
2057
+ * An additional, individual class name for the grouped point's graphic
2058
+ * representation.
2059
+ *
2060
+ * @type string
2061
+ * @product highcharts
2062
+ */
2063
+ className: void 0,
2064
+ /**
2065
+ * Individual color for the grouped point. By default the color is
2066
+ * pulled from the parent color.
2067
+ *
2068
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
2069
+ * @product highcharts
2070
+ */
2071
+ color: void 0,
2072
+ /**
2073
+ * Enable or disable Treemap grouping.
2074
+ *
2075
+ * @type {boolean}
2076
+ * @since 12.1.0
2077
+ * @product highcharts
2078
+ */
2079
+ enabled: false,
2080
+ /**
2081
+ * The pixel threshold width of area, which is used in Treemap grouping.
2082
+ *
2083
+ * @type {number}
2084
+ * @since 12.1.0
2085
+ * @product highcharts
2086
+ */
2087
+ pixelWidth: void 0,
2088
+ /**
2089
+ * The pixel threshold height of area, which is used in Treemap
2090
+ * grouping.
2091
+ *
2092
+ * @type {number}
2093
+ * @since 12.1.0
2094
+ * @product highcharts
2095
+ */
2096
+ pixelHeight: void 0,
2097
+ /**
2098
+ * The name of the point of grouped nodes shown in the tooltip,
2099
+ * dataLabels, etc. By default it is set to '+ n', where n is number of
2100
+ * grouped points.
2101
+ *
2102
+ * @type {string}
2103
+ * @since 12.1.0
2104
+ * @product highcharts
2105
+ */
2106
+ name: void 0,
2107
+ /**
2108
+ * A configuration property that specifies the factor by which the value
2109
+ * and size of a grouped node are reduced. This can be particularly
2110
+ * useful when a grouped node occupies a disproportionately large
2111
+ * portion of the graph, ensuring better visual balance and readability.
2112
+ *
2113
+ * @type {number}
2114
+ * @since 12.1.0
2115
+ * @product highcharts
2116
+ */
2117
+ reductionFactor: void 0,
2118
+ /**
2119
+ * Defines the minimum number of child nodes required to create a group
2120
+ * of small nodes.
2121
+ *
2122
+ * @type {number}
2123
+ * @since 12.1.0
2124
+ * @product highcharts
2125
+ */
2126
+ minimumClusterSize: 5,
2127
+ layoutAlgorithm: {
2128
+ distance: 0,
2129
+ gridSize: 0,
2130
+ kmeansThreshold: 0
2131
+ },
2132
+ marker: {
2133
+ lineWidth: 0,
2134
+ radius: 0
2135
+ }
2136
+ }
2010
2137
  };
2011
2138
  /**
2012
2139
  * A `treemap` series. If the [type](#series.treemap.type) option is
@@ -2392,7 +2519,7 @@ const { column: ColumnSeries, scatter: ScatterSeries } = (highcharts_SeriesRegis
2392
2519
 
2393
2520
  const { getColor: TreemapSeries_getColor, getLevelOptions: TreemapSeries_getLevelOptions, updateRootId: TreemapSeries_updateRootId } = Series_TreeUtilities;
2394
2521
 
2395
- const { addEvent: TreemapSeries_addEvent, correctFloat, crisp, defined: TreemapSeries_defined, error, extend: TreemapSeries_extend, fireEvent: TreemapSeries_fireEvent, isArray: TreemapSeries_isArray, isObject: TreemapSeries_isObject, isString: TreemapSeries_isString, merge: TreemapSeries_merge, pick: TreemapSeries_pick, pushUnique: TreemapSeries_pushUnique, stableSort } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
2522
+ const { addEvent: TreemapSeries_addEvent, correctFloat, crisp, defined: TreemapSeries_defined, error, extend: TreemapSeries_extend, fireEvent: TreemapSeries_fireEvent, isArray: TreemapSeries_isArray, isObject: TreemapSeries_isObject, isString: TreemapSeries_isString, merge: TreemapSeries_merge, pick: TreemapSeries_pick, pushUnique: TreemapSeries_pushUnique, splat, stableSort } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
2396
2523
  /* *
2397
2524
  *
2398
2525
  * Constants
@@ -2549,7 +2676,9 @@ class TreemapSeries extends ScatterSeries {
2549
2676
  x: pX,
2550
2677
  y: pY,
2551
2678
  width: pW,
2552
- height: pH
2679
+ height: pH,
2680
+ direction: 0,
2681
+ val: 0
2553
2682
  });
2554
2683
  if (directionChange) {
2555
2684
  direction = 1 - direction;
@@ -2586,28 +2715,93 @@ class TreemapSeries extends ScatterSeries {
2586
2715
  * Over the alignment method by setting z index.
2587
2716
  * @private
2588
2717
  */
2589
- alignDataLabel(point, dataLabel, labelOptions) {
2590
- const style = labelOptions.style;
2591
- // #8160: Prevent the label from exceeding the point's
2592
- // boundaries in treemaps by applying ellipsis overflow.
2593
- // The issue was happening when datalabel's text contained a
2594
- // long sequence of characters without a whitespace.
2595
- if (style &&
2596
- !TreemapSeries_defined(style.textOverflow) &&
2597
- dataLabel.text &&
2598
- dataLabel.getBBox().width > (dataLabel.text.textWidth || 0)) {
2599
- dataLabel.css({
2600
- textOverflow: 'ellipsis',
2601
- // Unit (px) is required when useHTML is true
2602
- width: style.width += 'px'
2603
- });
2604
- }
2718
+ alignDataLabel(point,
2719
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2720
+ dataLabel,
2721
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2722
+ labelOptions) {
2605
2723
  ColumnSeries.prototype.alignDataLabel.apply(this, arguments);
2606
2724
  if (point.dataLabel) {
2607
2725
  // `point.node.zIndex` could be undefined (#6956)
2608
2726
  point.dataLabel.attr({ zIndex: (point.node.zIndex || 0) + 1 });
2609
2727
  }
2610
2728
  }
2729
+ applyTreeGrouping() {
2730
+ const series = this, parentList = series.parentList || {}, { cluster } = series.options, minimumClusterSize = cluster?.minimumClusterSize || 5;
2731
+ if (cluster?.enabled) {
2732
+ const parentGroups = {};
2733
+ const checkIfHide = (node) => {
2734
+ if (node?.point?.shapeArgs) {
2735
+ const { width = 0, height = 0 } = node.point.shapeArgs, area = width * height;
2736
+ const { pixelWidth = 0, pixelHeight = 0 } = cluster, compareHeight = TreemapSeries_defined(pixelHeight), thresholdArea = pixelHeight ?
2737
+ pixelWidth * pixelHeight :
2738
+ pixelWidth * pixelWidth;
2739
+ if (width < pixelWidth ||
2740
+ height < (compareHeight ? pixelHeight : pixelWidth) ||
2741
+ area < thresholdArea) {
2742
+ if (!node.isGroup && TreemapSeries_defined(node.parent)) {
2743
+ if (!parentGroups[node.parent]) {
2744
+ parentGroups[node.parent] = [];
2745
+ }
2746
+ parentGroups[node.parent].push(node);
2747
+ }
2748
+ }
2749
+ }
2750
+ node?.children.forEach((child) => {
2751
+ checkIfHide(child);
2752
+ });
2753
+ };
2754
+ checkIfHide(series.tree);
2755
+ for (const parent in parentGroups) {
2756
+ if (parentGroups[parent]) {
2757
+ if (parentGroups[parent].length > minimumClusterSize) {
2758
+ parentGroups[parent].forEach((node) => {
2759
+ const index = parentList[parent].indexOf(node.i);
2760
+ if (index !== -1) {
2761
+ parentList[parent].splice(index, 1);
2762
+ const id = `highcharts-grouped-treemap-points-${node.parent || 'root'}`;
2763
+ let groupPoint = series.points
2764
+ .find((p) => p.id === id);
2765
+ if (!groupPoint) {
2766
+ const PointClass = series.pointClass, pointIndex = series.points.length;
2767
+ groupPoint = new PointClass(series, {
2768
+ className: cluster.className,
2769
+ color: cluster.color,
2770
+ id,
2771
+ index: pointIndex,
2772
+ isGroup: true,
2773
+ value: 0
2774
+ });
2775
+ TreemapSeries_extend(groupPoint, {
2776
+ formatPrefix: 'cluster'
2777
+ });
2778
+ series.points.push(groupPoint);
2779
+ parentList[parent].push(pointIndex);
2780
+ parentList[id] = [];
2781
+ }
2782
+ const amount = groupPoint.groupedPointsAmount + 1, val = series.points[groupPoint.index]
2783
+ .options.value || 0, name = cluster.name ||
2784
+ `+ ${amount}`;
2785
+ // Update the point directly in points array to
2786
+ // prevent wrong instance update
2787
+ series.points[groupPoint.index]
2788
+ .groupedPointsAmount = amount;
2789
+ series.points[groupPoint.index].options.value =
2790
+ val + (node.point.value || 0);
2791
+ series.points[groupPoint.index].name = name;
2792
+ parentList[id].push(node.point.index);
2793
+ }
2794
+ });
2795
+ }
2796
+ }
2797
+ }
2798
+ series.nodeMap = {};
2799
+ series.nodeList = [];
2800
+ series.parentList = parentList;
2801
+ const tree = series.buildTree('', -1, 0, series.parentList);
2802
+ series.translate(tree);
2803
+ }
2804
+ }
2611
2805
  /**
2612
2806
  * Recursive function which calculates the area for all children of a
2613
2807
  * node.
@@ -2622,10 +2816,14 @@ class TreemapSeries extends ScatterSeries {
2622
2816
  * The rectangular area of the parent.
2623
2817
  */
2624
2818
  calculateChildrenAreas(parent, area) {
2625
- const series = this, options = series.options, mapOptionsToLevel = series.mapOptionsToLevel, level = mapOptionsToLevel[parent.level + 1], algorithm = TreemapSeries_pick((series[(level && level.layoutAlgorithm)] &&
2626
- level.layoutAlgorithm), options.layoutAlgorithm), alternate = options.alternateStartingDirection,
2819
+ const series = this, options = series.options, mapOptionsToLevel = series.mapOptionsToLevel, level = mapOptionsToLevel[parent.level + 1], algorithm = TreemapSeries_pick((level?.layoutAlgorithm &&
2820
+ series[level?.layoutAlgorithm] &&
2821
+ level.layoutAlgorithm), series.options.layoutAlgorithm), alternate = options.alternateStartingDirection,
2627
2822
  // Collect all children which should be included
2628
- children = parent.children.filter((n) => !n.ignore);
2823
+ children = parent.children.filter((n) => parent.isGroup || !n.ignore);
2824
+ if (!algorithm) {
2825
+ return;
2826
+ }
2629
2827
  let childrenValues = [];
2630
2828
  if (level && level.layoutStartingDirection) {
2631
2829
  area.direction = level.layoutStartingDirection === 'vertical' ?
@@ -2702,15 +2900,18 @@ class TreemapSeries extends ScatterSeries {
2702
2900
  */
2703
2901
  drawDataLabels() {
2704
2902
  const series = this, mapOptionsToLevel = series.mapOptionsToLevel, points = series.points.filter(function (n) {
2705
- return n.node.visible;
2706
- });
2903
+ return n.node.visible || TreemapSeries_defined(n.dataLabel);
2904
+ }), padding = splat(series.options.dataLabels || {})[0]?.padding;
2707
2905
  let options, level;
2708
2906
  for (const point of points) {
2709
2907
  level = mapOptionsToLevel[point.node.level];
2710
2908
  // Set options to new object to avoid problems with scope
2711
2909
  options = { style: {} };
2712
2910
  // If not a leaf, then label should be disabled as default
2713
- if (!point.node.isLeaf) {
2911
+ if (!point.node.isLeaf &&
2912
+ !point.node.isGroup ||
2913
+ (point.node.isGroup &&
2914
+ point.node.level <= series.nodeMap[series.rootNode].level)) {
2714
2915
  options.enabled = false;
2715
2916
  }
2716
2917
  // If options for level exists, include them as well
@@ -2718,10 +2919,12 @@ class TreemapSeries extends ScatterSeries {
2718
2919
  options = TreemapSeries_merge(options, level.dataLabels);
2719
2920
  series.hasDataLabels = () => true;
2720
2921
  }
2721
- // Set dataLabel width to the width of the point shape.
2922
+ // Set dataLabel width to the width of the point shape minus the
2923
+ // padding
2722
2924
  if (point.shapeArgs) {
2723
2925
  const css = {
2724
- width: `${point.shapeArgs.width || 0}px`,
2926
+ width: ((point.shapeArgs.width || 0) -
2927
+ 2 * (options.padding || padding || 0)) + 'px',
2725
2928
  lineClamp: Math.floor((point.shapeArgs.height || 0) / 16)
2726
2929
  };
2727
2930
  TreemapSeries_extend(options.style, css);
@@ -2730,7 +2933,7 @@ class TreemapSeries extends ScatterSeries {
2730
2933
  // Merge custom options with point options
2731
2934
  point.dlOptions = TreemapSeries_merge(options, point.options.dataLabels);
2732
2935
  }
2733
- super.drawDataLabels();
2936
+ super.drawDataLabels(points);
2734
2937
  }
2735
2938
  /**
2736
2939
  * Override drawPoints
@@ -2801,7 +3004,8 @@ class TreemapSeries extends ScatterSeries {
2801
3004
  */
2802
3005
  drillToByGroup(point) {
2803
3006
  let drillId = false;
2804
- if (!point.node.isLeaf &&
3007
+ if ((!point.node.isLeaf ||
3008
+ point.node.isGroup) &&
2805
3009
  (point.node.level - this.nodeMap[this.rootNode].level) === 1) {
2806
3010
  drillId = point.id;
2807
3011
  }
@@ -2901,10 +3105,11 @@ class TreemapSeries extends ScatterSeries {
2901
3105
  getTree() {
2902
3106
  const series = this, allIds = this.data.map(function (d) {
2903
3107
  return d.id;
2904
- }), parentList = series.getListOfParents(this.data, allIds);
3108
+ });
3109
+ series.parentList = series.getListOfParents(this.data, allIds);
2905
3110
  series.nodeMap = {};
2906
3111
  series.nodeList = [];
2907
- return series.buildTree('', -1, 0, parentList);
3112
+ return series.buildTree('', -1, 0, series.parentList || {});
2908
3113
  }
2909
3114
  buildTree(id, index, level, list, parent) {
2910
3115
  const series = this, children = [], point = series.points[index];
@@ -3209,16 +3414,23 @@ class TreemapSeries extends ScatterSeries {
3209
3414
  // Sort the children
3210
3415
  stableSort(children, (a, b) => ((a.sortIndex || 0) - (b.sortIndex || 0)));
3211
3416
  // Set the values
3212
- const val = TreemapSeries_pick(point && point.options.value, childrenTotal);
3417
+ let val = TreemapSeries_pick(point && point.options.value, childrenTotal);
3213
3418
  if (point) {
3214
3419
  point.value = val;
3215
3420
  }
3421
+ if (point?.isGroup && options.cluster?.reductionFactor) {
3422
+ val /= options.cluster.reductionFactor;
3423
+ }
3424
+ if (tree.parentNode?.point?.isGroup && series.rootNode !== tree.parent) {
3425
+ tree.visible = false;
3426
+ }
3216
3427
  TreemapSeries_extend(tree, {
3217
3428
  children: children,
3218
3429
  childrenTotal: childrenTotal,
3219
3430
  // Ignore this node if point is not visible
3220
3431
  ignore: !(TreemapSeries_pick(point && point.visible, true) && (val > 0)),
3221
3432
  isLeaf: tree.visible && !childrenTotal,
3433
+ isGroup: point?.isGroup,
3222
3434
  levelDynamic: (tree.level - (levelIsConstant ? 0 : nodeRoot.level)),
3223
3435
  name: TreemapSeries_pick(point && point.name, ''),
3224
3436
  sortIndex: TreemapSeries_pick(point && point.sortIndex, -val),
@@ -3238,30 +3450,41 @@ class TreemapSeries extends ScatterSeries {
3238
3450
  stripes(parent, children) {
3239
3451
  return this.algorithmFill(false, parent, children);
3240
3452
  }
3241
- translate() {
3242
- const series = this, options = series.options;
3453
+ translate(tree) {
3454
+ const series = this, options = series.options, applyGrouping = !tree;
3243
3455
  let // NOTE: updateRootId modifies series.
3244
3456
  rootId = TreemapSeries_updateRootId(series), rootNode, pointValues, seriesArea, val;
3245
- // Call prototype function
3246
- super.translate();
3247
- // @todo Only if series.isDirtyData is true
3248
- const tree = series.tree = series.getTree();
3457
+ if (!tree && !rootId.startsWith('highcharts-grouped-treemap-points-')) {
3458
+ // Group points are removed, but not destroyed during generatePoints
3459
+ (this.points || []).forEach((point) => {
3460
+ if (point.isGroup) {
3461
+ point.destroy();
3462
+ }
3463
+ });
3464
+ // Call prototype function
3465
+ super.translate();
3466
+ // @todo Only if series.isDirtyData is true
3467
+ tree = series.getTree();
3468
+ }
3469
+ // Ensure `tree` and `series.tree` are synchronized
3470
+ series.tree = tree = tree || series.tree;
3249
3471
  rootNode = series.nodeMap[rootId];
3250
- if (rootId !== '' &&
3251
- (!rootNode)) {
3472
+ if (rootId !== '' && !rootNode) {
3252
3473
  series.setRootNode('', false);
3253
3474
  rootId = series.rootNode;
3254
3475
  rootNode = series.nodeMap[rootId];
3255
3476
  }
3256
- series.mapOptionsToLevel = TreemapSeries_getLevelOptions({
3257
- from: rootNode.level + 1,
3258
- levels: options.levels,
3259
- to: tree.height,
3260
- defaults: {
3261
- levelIsConstant: series.options.levelIsConstant,
3262
- colorByPoint: options.colorByPoint
3263
- }
3264
- });
3477
+ if (!rootNode.point?.isGroup) {
3478
+ series.mapOptionsToLevel = TreemapSeries_getLevelOptions({
3479
+ from: rootNode.level + 1,
3480
+ levels: options.levels,
3481
+ to: tree.height,
3482
+ defaults: {
3483
+ levelIsConstant: series.options.levelIsConstant,
3484
+ colorByPoint: options.colorByPoint
3485
+ }
3486
+ });
3487
+ }
3265
3488
  // Parents of the root node is by default visible
3266
3489
  Treemap_TreemapUtilities.recursive(series.nodeMap[series.rootNode], (node) => {
3267
3490
  const p = node.parent;
@@ -3305,14 +3528,19 @@ class TreemapSeries extends ScatterSeries {
3305
3528
  }
3306
3529
  // Update axis extremes according to the root node.
3307
3530
  if (options.allowTraversingTree) {
3308
- val = rootNode.pointValues;
3309
- series.xAxis.setExtremes(val.x, val.x + val.width, false);
3310
- series.yAxis.setExtremes(val.y, val.y + val.height, false);
3311
- series.xAxis.setScale();
3312
- series.yAxis.setScale();
3531
+ if (rootNode.pointValues) {
3532
+ val = rootNode.pointValues;
3533
+ series.xAxis.setExtremes(val.x, val.x + val.width, false);
3534
+ series.yAxis.setExtremes(val.y, val.y + val.height, false);
3535
+ series.xAxis.setScale();
3536
+ series.yAxis.setScale();
3537
+ }
3313
3538
  }
3314
3539
  // Assign values to points.
3315
3540
  series.setPointValues();
3541
+ if (applyGrouping) {
3542
+ series.applyTreeGrouping();
3543
+ }
3316
3544
  }
3317
3545
  }
3318
3546
  /* *
@@ -4340,7 +4568,7 @@ const { getColor: SunburstSeries_getColor, getLevelOptions: SunburstSeries_getLe
4340
4568
 
4341
4569
 
4342
4570
 
4343
- const { defined: SunburstSeries_defined, error: SunburstSeries_error, extend: SunburstSeries_extend, fireEvent: SunburstSeries_fireEvent, isNumber: SunburstSeries_isNumber, isObject: SunburstSeries_isObject, isString: SunburstSeries_isString, merge: SunburstSeries_merge, splat } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
4571
+ const { defined: SunburstSeries_defined, error: SunburstSeries_error, extend: SunburstSeries_extend, fireEvent: SunburstSeries_fireEvent, isNumber: SunburstSeries_isNumber, isObject: SunburstSeries_isObject, isString: SunburstSeries_isString, merge: SunburstSeries_merge, splat: SunburstSeries_splat } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
4344
4572
 
4345
4573
 
4346
4574
  Extensions_TextPath.compose((highcharts_SVGElement_commonjs_highcharts_SVGElement_commonjs2_highcharts_SVGElement_root_Highcharts_SVGElement_default()));
@@ -4395,7 +4623,7 @@ function getDlOptions(params) {
4395
4623
  {}),
4396
4624
  // The splat was used because levels dataLabels
4397
4625
  // options doesn't work as an array
4398
- optionsLevel = splat(SunburstSeries_isObject(params.level) ?
4626
+ optionsLevel = SunburstSeries_splat(SunburstSeries_isObject(params.level) ?
4399
4627
  params.level.dataLabels :
4400
4628
  {})[0], options = SunburstSeries_merge({
4401
4629
  style: {}
@@ -1,9 +1,9 @@
1
1
  !/**
2
- * Highcharts JS v12.0.2 (2024-12-04)
2
+ * Highcharts JS v12.1.0 (2024-12-17)
3
3
  * @module highcharts/modules/textpath-support
4
4
  * @requires highcharts
5
5
  *
6
6
  * (c) 2009-2024 Torstein Honsi
7
7
  *
8
8
  * License: www.highcharts.com/license
9
- */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts):"function"==typeof define&&define.amd?define("highcharts/modules/textpath",["highcharts/highcharts"],function(t){return e(t)}):"object"==typeof exports?exports["highcharts/modules/textpath"]=e(t._Highcharts):t.Highcharts=e(t.Highcharts)}("undefined"==typeof window?this:window,t=>(()=>{"use strict";var e={944:e=>{e.exports=t}},r={};function a(t){var h=r[t];if(void 0!==h)return h.exports;var s=r[t]={exports:{}};return e[t](s,s.exports,a),s.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var h={};a.d(h,{default:()=>g});var s=a(944),o=/*#__PURE__*/a.n(s);let{deg2rad:n}=o(),{addEvent:i,merge:d,uniqueKey:l,defined:f,extend:c}=o();function x(t,e){e=d(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e);let r=this.renderer.url,a=this.text||this,h=a.textPath,{attributes:s,enabled:o}=e;if(t=t||h&&h.path,h&&h.undo(),t&&o){let e=i(a,"afterModifyTree",e=>{if(t&&o){let h=t.attr("id");h||t.attr("id",h=l());let o={x:0,y:0};f(s.dx)&&(o.dx=s.dx,delete s.dx),f(s.dy)&&(o.dy=s.dy,delete s.dy),a.attr(o),this.attr({transform:""}),this.box&&(this.box=this.box.destroy());let n=e.nodes.slice(0);e.nodes.length=0,e.nodes[0]={tagName:"textPath",attributes:c(s,{"text-anchor":s.textAnchor,href:`${r}#${h}`}),children:n}}});a.textPath={path:t,undo:e}}else a.attr({dx:0,dy:0}),delete a.textPath;return this.added&&(a.textCache="",this.renderer.buildText(a)),this}function u(t){let e=t.bBox,r=this.element?.querySelector("textPath");if(r){let t=[],{b:a,h}=this.renderer.fontMetrics(this.element),s=h-a,o=RegExp('(<tspan>|<tspan(?!\\sclass="highcharts-br")[^>]*>|<\\/tspan>)',"g"),i=r.innerHTML.replace(o,"").split(/<tspan class="highcharts-br"[^>]*>/),d=i.length,l=(t,e)=>{let{x:h,y:o}=e,i=(r.getRotationOfChar(t)-90)*n,d=Math.cos(i),l=Math.sin(i);return[[h-s*d,o-s*l],[h+a*d,o+a*l]]};for(let e=0,a=0;a<d;a++){let h=i[a].length;for(let s=0;s<h;s+=5)try{let h=e+s+a,[o,n]=l(h,r.getStartPositionOfChar(h));0===s?(t.push(n),t.push(o)):(0===a&&t.unshift(n),a===d-1&&t.push(o))}catch(t){break}e+=h-1;try{let h=e+a,s=r.getEndPositionOfChar(h),[o,n]=l(h,s);t.unshift(n),t.unshift(o)}catch(t){break}}t.length&&t.push(t[0].slice()),e.polygon=t}return e}function p(t){let e=t.labelOptions,r=t.point,a=e[r.formatPrefix+"TextPath"]||e.textPath;a&&!e.useHTML&&(this.setTextPath(r.getDataLabelPath?.(this)||r.graphic,a),r.dataLabelPath&&!a.enabled&&(r.dataLabelPath=r.dataLabelPath.destroy()))}let b=o();b.TextPath={compose:function(t){i(t,"afterGetBBox",u),i(t,"beforeAddingDataLabel",p);let e=t.prototype;e.setTextPath||(e.setTextPath=x)}},b.TextPath.compose(b.SVGElement);let g=o();return h.default})());
9
+ */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts):"function"==typeof define&&define.amd?define("highcharts/modules/textpath",["highcharts/highcharts"],function(t){return e(t)}):"object"==typeof exports?exports["highcharts/modules/textpath"]=e(t._Highcharts):t.Highcharts=e(t.Highcharts)}("undefined"==typeof window?this:window,t=>(()=>{"use strict";var e={944:e=>{e.exports=t}},r={};function a(t){var h=r[t];if(void 0!==h)return h.exports;var s=r[t]={exports:{}};return e[t](s,s.exports,a),s.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var h={};a.d(h,{default:()=>g});var s=a(944),o=a.n(s);let{deg2rad:n}=o(),{addEvent:i,merge:d,uniqueKey:l,defined:f,extend:c}=o();function x(t,e){e=d(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e);let r=this.renderer.url,a=this.text||this,h=a.textPath,{attributes:s,enabled:o}=e;if(t=t||h&&h.path,h&&h.undo(),t&&o){let e=i(a,"afterModifyTree",e=>{if(t&&o){let h=t.attr("id");h||t.attr("id",h=l());let o={x:0,y:0};f(s.dx)&&(o.dx=s.dx,delete s.dx),f(s.dy)&&(o.dy=s.dy,delete s.dy),a.attr(o),this.attr({transform:""}),this.box&&(this.box=this.box.destroy());let n=e.nodes.slice(0);e.nodes.length=0,e.nodes[0]={tagName:"textPath",attributes:c(s,{"text-anchor":s.textAnchor,href:`${r}#${h}`}),children:n}}});a.textPath={path:t,undo:e}}else a.attr({dx:0,dy:0}),delete a.textPath;return this.added&&(a.textCache="",this.renderer.buildText(a)),this}function u(t){let e=t.bBox,r=this.element?.querySelector("textPath");if(r){let t=[],{b:a,h}=this.renderer.fontMetrics(this.element),s=h-a,o=RegExp('(<tspan>|<tspan(?!\\sclass="highcharts-br")[^>]*>|<\\/tspan>)',"g"),i=r.innerHTML.replace(o,"").split(/<tspan class="highcharts-br"[^>]*>/),d=i.length,l=(t,e)=>{let{x:h,y:o}=e,i=(r.getRotationOfChar(t)-90)*n,d=Math.cos(i),l=Math.sin(i);return[[h-s*d,o-s*l],[h+a*d,o+a*l]]};for(let e=0,a=0;a<d;a++){let h=i[a].length;for(let s=0;s<h;s+=5)try{let h=e+s+a,[o,n]=l(h,r.getStartPositionOfChar(h));0===s?(t.push(n),t.push(o)):(0===a&&t.unshift(n),a===d-1&&t.push(o))}catch(t){break}e+=h-1;try{let h=e+a,s=r.getEndPositionOfChar(h),[o,n]=l(h,s);t.unshift(n),t.unshift(o)}catch(t){break}}t.length&&t.push(t[0].slice()),e.polygon=t}return e}function p(t){let e=t.labelOptions,r=t.point,a=e[r.formatPrefix+"TextPath"]||e.textPath;a&&!e.useHTML&&(this.setTextPath(r.getDataLabelPath?.(this)||r.graphic,a),r.dataLabelPath&&!a.enabled&&(r.dataLabelPath=r.dataLabelPath.destroy()))}let b=o();b.TextPath={compose:function(t){i(t,"afterGetBBox",u),i(t,"beforeAddingDataLabel",p);let e=t.prototype;e.setTextPath||(e.setTextPath=x)}},b.TextPath.compose(b.SVGElement);let g=o();return h.default})());
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v12.0.2 (2024-12-04)
2
+ * @license Highcharts JS v12.1.0 (2024-12-17)
3
3
  * @module highcharts/modules/textpath-support
4
4
  * @requires highcharts
5
5
  *