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.
- package/bower.json +1 -1
- package/es-modules/Accessibility/Options/A11yDefaults.js +2 -0
- package/es-modules/Core/Color/Color.js +5 -12
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +1 -3
- package/es-modules/Core/Renderer/SVG/SVGElement.js +3 -1
- package/es-modules/Core/Renderer/SVG/SVGLabel.js +8 -11
- package/es-modules/Core/Series/DataLabel.js +3 -1
- package/es-modules/Core/Series/Series.js +13 -15
- package/es-modules/Core/Templating.js +14 -10
- package/es-modules/Core/Time.js +6 -3
- package/es-modules/Core/Utilities.js +1 -1
- package/es-modules/Data/Converters/CSVConverter.js +1 -0
- package/es-modules/Data/Converters/DataConverter.js +31 -0
- package/es-modules/Data/Converters/GoogleSheetsConverter.js +1 -0
- package/es-modules/Data/Converters/HTMLTableConverter.js +1 -0
- package/es-modules/Data/Converters/JSONConverter.js +1 -0
- package/es-modules/Extensions/Boost/BoostSeries.js +13 -7
- package/es-modules/Extensions/DragPanes/AxisResizer.js +1 -1
- package/es-modules/Extensions/SeriesLabel/SeriesLabelDefaults.js +7 -2
- package/es-modules/Series/Bubble/BubbleSeries.js +24 -0
- package/es-modules/Series/Organization/OrganizationSeriesDefaults.js +3 -1
- package/es-modules/Series/Timeline/TimelineSeriesDefaults.js +3 -1
- package/es-modules/Series/Treegraph/TreegraphSeriesDefaults.js +3 -1
- package/es-modules/Series/Treemap/TreemapPoint.js +7 -2
- package/es-modules/Series/Treemap/TreemapSeries.js +154 -53
- package/es-modules/Series/Treemap/TreemapSeriesDefaults.js +126 -4
- package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +1 -0
- package/es-modules/Stock/RangeSelector/RangeSelector.js +68 -72
- package/es-modules/Stock/RangeSelector/RangeSelectorDefaults.js +10 -4
- package/es-modules/masters/indicators/indicators-all.src.js +4 -0
- package/es-modules/tsconfig.tsbuildinfo +1 -1
- package/highcharts-3d.js +2 -2
- package/highcharts-3d.src.js +1 -1
- package/highcharts-gantt.js +5 -5
- package/highcharts-gantt.src.js +140 -141
- package/highcharts-more.js +2 -2
- package/highcharts-more.src.js +25 -1
- package/highcharts.d.ts +281 -762
- package/highcharts.js +3 -3
- package/highcharts.src.d.ts +281 -762
- package/highcharts.src.js +57 -60
- package/highmaps.js +5 -5
- package/highmaps.src.js +84 -63
- package/highstock.js +5 -5
- package/highstock.src.js +140 -141
- package/indicators/acceleration-bands.js +2 -2
- package/indicators/acceleration-bands.src.js +1 -1
- package/indicators/accumulation-distribution.js +2 -2
- package/indicators/accumulation-distribution.src.js +1 -1
- package/indicators/ao.js +2 -2
- package/indicators/ao.src.js +1 -1
- package/indicators/apo.js +2 -2
- package/indicators/apo.src.js +1 -1
- package/indicators/aroon-oscillator.js +2 -2
- package/indicators/aroon-oscillator.src.js +1 -1
- package/indicators/aroon.js +2 -2
- package/indicators/aroon.src.js +1 -1
- package/indicators/atr.js +2 -2
- package/indicators/atr.src.js +1 -1
- package/indicators/bollinger-bands.js +2 -2
- package/indicators/bollinger-bands.src.js +1 -1
- package/indicators/cci.js +2 -2
- package/indicators/cci.src.js +1 -1
- package/indicators/chaikin.js +2 -2
- package/indicators/chaikin.src.js +1 -1
- package/indicators/cmf.js +2 -2
- package/indicators/cmf.src.js +1 -1
- package/indicators/cmo.js +2 -2
- package/indicators/cmo.src.js +1 -1
- package/indicators/dema.js +2 -2
- package/indicators/dema.src.js +1 -1
- package/indicators/disparity-index.js +2 -2
- package/indicators/disparity-index.src.js +1 -1
- package/indicators/dmi.js +2 -2
- package/indicators/dmi.src.js +1 -1
- package/indicators/dpo.js +2 -2
- package/indicators/dpo.src.js +1 -1
- package/indicators/ema.js +1 -1
- package/indicators/ichimoku-kinko-hyo.js +2 -2
- package/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/indicators/indicators-all.js +2 -2
- package/indicators/indicators-all.src.js +6 -1
- package/indicators/indicators.js +2 -2
- package/indicators/indicators.src.js +1 -1
- package/indicators/keltner-channels.js +2 -2
- package/indicators/keltner-channels.src.js +1 -1
- package/indicators/klinger.js +2 -2
- package/indicators/klinger.src.js +1 -1
- package/indicators/macd.js +2 -2
- package/indicators/macd.src.js +1 -1
- package/indicators/mfi.js +2 -2
- package/indicators/mfi.src.js +1 -1
- package/indicators/momentum.js +2 -2
- package/indicators/momentum.src.js +1 -1
- package/indicators/natr.js +2 -2
- package/indicators/natr.src.js +1 -1
- package/indicators/obv.js +2 -2
- package/indicators/obv.src.js +1 -1
- package/indicators/pivot-points.js +2 -2
- package/indicators/pivot-points.src.js +1 -1
- package/indicators/ppo.js +2 -2
- package/indicators/ppo.src.js +1 -1
- package/indicators/price-channel.js +2 -2
- package/indicators/price-channel.src.js +1 -1
- package/indicators/price-envelopes.js +2 -2
- package/indicators/price-envelopes.src.js +1 -1
- package/indicators/psar.js +2 -2
- package/indicators/psar.src.js +1 -1
- package/indicators/regressions.js +2 -2
- package/indicators/regressions.src.js +1 -1
- package/indicators/roc.js +2 -2
- package/indicators/roc.src.js +1 -1
- package/indicators/rsi.js +2 -2
- package/indicators/rsi.src.js +1 -1
- package/indicators/slow-stochastic.js +2 -2
- package/indicators/slow-stochastic.src.js +1 -1
- package/indicators/stochastic.js +2 -2
- package/indicators/stochastic.src.js +1 -1
- package/indicators/supertrend.js +2 -2
- package/indicators/supertrend.src.js +1 -1
- package/indicators/tema.js +2 -2
- package/indicators/tema.src.js +1 -1
- package/indicators/trendline.js +2 -2
- package/indicators/trendline.src.js +1 -1
- package/indicators/trix.js +2 -2
- package/indicators/trix.src.js +1 -1
- package/indicators/volume-by-price.js +2 -2
- package/indicators/volume-by-price.src.js +2 -1
- package/indicators/vwap.js +2 -2
- package/indicators/vwap.src.js +1 -1
- package/indicators/williams-r.js +2 -2
- package/indicators/williams-r.src.js +1 -1
- package/indicators/wma.js +2 -2
- package/indicators/wma.src.js +1 -1
- package/indicators/zigzag.js +2 -2
- package/indicators/zigzag.src.js +1 -1
- package/modules/accessibility.js +2 -2
- package/modules/accessibility.src.js +3 -1
- package/modules/annotations-advanced.js +3 -3
- package/modules/annotations-advanced.src.js +4 -4
- package/modules/annotations.js +2 -2
- package/modules/annotations.src.js +3 -3
- package/modules/arc-diagram.js +2 -2
- package/modules/arc-diagram.src.js +1 -1
- package/modules/arrow-symbols.js +2 -2
- package/modules/arrow-symbols.src.js +1 -1
- package/modules/boost-canvas.js +2 -2
- package/modules/boost-canvas.src.js +14 -11
- package/modules/boost.js +2 -2
- package/modules/boost.src.js +14 -11
- package/modules/broken-axis.js +2 -2
- package/modules/broken-axis.src.js +1 -1
- package/modules/bullet.js +2 -2
- package/modules/bullet.src.js +1 -1
- package/modules/coloraxis.js +2 -2
- package/modules/coloraxis.src.js +1 -1
- package/modules/current-date-indicator.js +2 -2
- package/modules/current-date-indicator.src.js +1 -1
- package/modules/cylinder.js +2 -2
- package/modules/cylinder.src.js +1 -1
- package/modules/data-tools.js +2 -2
- package/modules/data-tools.src.js +36 -1
- package/modules/data.js +2 -2
- package/modules/data.src.js +1 -1
- package/modules/datagrouping.js +2 -2
- package/modules/datagrouping.src.js +1 -1
- package/modules/debugger.js +2 -2
- package/modules/debugger.src.js +1 -1
- package/modules/dependency-wheel.js +2 -2
- package/modules/dependency-wheel.src.js +1 -1
- package/modules/dotplot.js +2 -2
- package/modules/dotplot.src.js +1 -1
- package/modules/drag-panes.js +2 -2
- package/modules/drag-panes.src.js +2 -2
- package/modules/draggable-points.js +2 -2
- package/modules/draggable-points.src.js +1 -1
- package/modules/drilldown.js +2 -2
- package/modules/drilldown.src.js +1 -1
- package/modules/dumbbell.js +2 -2
- package/modules/dumbbell.src.js +1 -1
- package/modules/export-data.js +2 -2
- package/modules/export-data.src.js +1 -1
- package/modules/exporting.js +2 -2
- package/modules/exporting.src.js +1 -1
- package/modules/flowmap.js +2 -2
- package/modules/flowmap.src.js +1 -1
- package/modules/full-screen.js +2 -2
- package/modules/full-screen.src.js +1 -1
- package/modules/funnel.js +2 -2
- package/modules/funnel.src.js +1 -1
- package/modules/funnel3d.js +2 -2
- package/modules/funnel3d.src.js +1 -1
- package/modules/gantt.js +6 -6
- package/modules/gantt.src.js +82 -80
- package/modules/geoheatmap.js +2 -2
- package/modules/geoheatmap.src.js +1 -1
- package/modules/grid-axis.js +2 -2
- package/modules/grid-axis.src.js +1 -1
- package/modules/heatmap.js +3 -3
- package/modules/heatmap.src.js +2 -2
- package/modules/heikinashi.js +2 -2
- package/modules/heikinashi.src.js +1 -1
- package/modules/histogram-bellcurve.js +2 -2
- package/modules/histogram-bellcurve.src.js +1 -1
- package/modules/hollowcandlestick.js +2 -2
- package/modules/hollowcandlestick.src.js +1 -1
- package/modules/item-series.js +2 -2
- package/modules/item-series.src.js +1 -1
- package/modules/lollipop.js +2 -2
- package/modules/lollipop.src.js +1 -1
- package/modules/map.js +4 -4
- package/modules/map.src.js +26 -2
- package/modules/marker-clusters.js +2 -2
- package/modules/marker-clusters.src.js +1 -1
- package/modules/mouse-wheel-zoom.js +2 -2
- package/modules/mouse-wheel-zoom.src.js +1 -1
- package/modules/navigator.js +2 -2
- package/modules/navigator.src.js +1 -1
- package/modules/networkgraph.js +2 -2
- package/modules/networkgraph.src.js +1 -1
- package/modules/no-data-to-display.js +2 -2
- package/modules/no-data-to-display.src.js +1 -1
- package/modules/offline-exporting.js +2 -2
- package/modules/offline-exporting.src.js +2 -2
- package/modules/organization.js +2 -2
- package/modules/organization.src.js +4 -2
- package/modules/overlapping-datalabels.js +2 -2
- package/modules/overlapping-datalabels.src.js +1 -1
- package/modules/parallel-coordinates.js +2 -2
- package/modules/parallel-coordinates.src.js +1 -1
- package/modules/pareto.js +2 -2
- package/modules/pareto.src.js +1 -1
- package/modules/pathfinder.js +2 -2
- package/modules/pathfinder.src.js +1 -1
- package/modules/pattern-fill.js +2 -2
- package/modules/pattern-fill.src.js +1 -1
- package/modules/pictorial.js +2 -2
- package/modules/pictorial.src.js +1 -1
- package/modules/pointandfigure.js +2 -2
- package/modules/pointandfigure.src.js +1 -1
- package/modules/price-indicator.js +2 -2
- package/modules/price-indicator.src.js +1 -1
- package/modules/pyramid3d.js +2 -2
- package/modules/pyramid3d.src.js +1 -1
- package/modules/renko.js +2 -2
- package/modules/renko.src.js +1 -1
- package/modules/sankey.js +2 -2
- package/modules/sankey.src.js +1 -1
- package/modules/series-label.js +2 -2
- package/modules/series-label.src.js +8 -3
- package/modules/series-on-point.js +2 -2
- package/modules/series-on-point.src.js +1 -1
- package/modules/solid-gauge.js +2 -2
- package/modules/solid-gauge.src.js +1 -1
- package/modules/sonification.js +2 -2
- package/modules/sonification.src.js +1 -1
- package/modules/static-scale.js +2 -2
- package/modules/static-scale.src.js +1 -1
- package/modules/stock-tools.js +2 -2
- package/modules/stock-tools.src.js +3 -3
- package/modules/stock.js +6 -6
- package/modules/stock.src.js +82 -80
- package/modules/streamgraph.js +2 -2
- package/modules/streamgraph.src.js +1 -1
- package/modules/sunburst.js +2 -2
- package/modules/sunburst.src.js +290 -62
- package/modules/textpath.js +2 -2
- package/modules/textpath.src.js +1 -1
- package/modules/tiledwebmap.js +3 -3
- package/modules/tiledwebmap.src.js +1 -1
- package/modules/tilemap.js +2 -2
- package/modules/tilemap.src.js +1 -1
- package/modules/timeline.js +2 -2
- package/modules/timeline.src.js +4 -2
- package/modules/treegraph.js +2 -2
- package/modules/treegraph.src.js +4 -2
- package/modules/treegrid.js +2 -2
- package/modules/treegrid.src.js +1 -1
- package/modules/treemap.js +2 -2
- package/modules/treemap.src.js +288 -60
- package/modules/variable-pie.js +2 -2
- package/modules/variable-pie.src.js +1 -1
- package/modules/variwide.js +2 -2
- package/modules/variwide.src.js +1 -1
- package/modules/vector.js +2 -2
- package/modules/vector.src.js +1 -1
- package/modules/venn.js +2 -2
- package/modules/venn.src.js +1 -1
- package/modules/windbarb.js +2 -2
- package/modules/windbarb.src.js +1 -1
- package/modules/wordcloud.js +2 -2
- package/modules/wordcloud.src.js +1 -1
- package/modules/xrange.js +2 -2
- package/modules/xrange.src.js +1 -1
- package/options/treegraph.d.ts +559 -70
- package/options/treegraph.src.d.ts +559 -70
- package/options/treemap.d.ts +314 -160
- package/options/treemap.src.d.ts +314 -160
- package/options/vbp.d.ts +1 -1
- package/options/vbp.src.d.ts +1 -1
- package/package.json +1 -1
- package/standalone-navigator.js +3 -3
- package/standalone-navigator.src.js +58 -61
- package/themes/avocado.js +2 -2
- package/themes/avocado.src.js +1 -1
- package/themes/brand-dark.js +2 -2
- package/themes/brand-dark.src.js +1 -1
- package/themes/brand-light.js +2 -2
- package/themes/brand-light.src.js +1 -1
- package/themes/dark-blue.js +2 -2
- package/themes/dark-blue.src.js +1 -1
- package/themes/dark-green.js +2 -2
- package/themes/dark-green.src.js +1 -1
- package/themes/dark-unica.js +2 -2
- package/themes/dark-unica.src.js +1 -1
- package/themes/gray.js +2 -2
- package/themes/gray.src.js +1 -1
- package/themes/grid-light.js +2 -2
- package/themes/grid-light.src.js +1 -1
- package/themes/grid.js +2 -2
- package/themes/grid.src.js +1 -1
- package/themes/high-contrast-dark.js +2 -2
- package/themes/high-contrast-dark.src.js +1 -1
- package/themes/high-contrast-light.js +2 -2
- package/themes/high-contrast-light.src.js +1 -1
- package/themes/sand-signika.js +2 -2
- package/themes/sand-signika.src.js +1 -1
- package/themes/skies.js +2 -2
- package/themes/skies.src.js +1 -1
- package/themes/sunset.js +2 -2
- package/themes/sunset.src.js +1 -1
package/modules/sunburst.src.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Highcharts JS v12.0
|
|
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.
|
|
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.
|
|
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
|
|
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
|
-
|
|
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,
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
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((
|
|
2626
|
-
level
|
|
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:
|
|
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
|
-
})
|
|
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
|
-
|
|
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
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
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
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
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
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
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 =
|
|
4626
|
+
optionsLevel = SunburstSeries_splat(SunburstSeries_isObject(params.level) ?
|
|
4399
4627
|
params.level.dataLabels :
|
|
4400
4628
|
{})[0], options = SunburstSeries_merge({
|
|
4401
4629
|
style: {}
|
package/modules/textpath.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
!/**
|
|
2
|
-
* Highcharts JS v12.0
|
|
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
|
|
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})());
|
package/modules/textpath.src.js
CHANGED