highcharts 10.2.1 → 10.3.1
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/Accessibility.js +1 -1
- package/es-modules/Accessibility/Components/InfoRegionsComponent.js +9 -6
- package/es-modules/Accessibility/Components/LegendComponent.js +36 -32
- package/es-modules/Accessibility/Components/RangeSelectorComponent.js +1 -1
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +16 -16
- package/es-modules/Accessibility/Options/LangDefaults.js +4 -0
- package/es-modules/Core/Axis/Axis.js +42 -32
- package/es-modules/Core/Axis/Axis3DComposition.js +501 -0
- package/es-modules/Core/Axis/Axis3DDefaults.js +130 -0
- package/es-modules/Core/Axis/AxisDefaults.js +20 -7
- package/es-modules/Core/Axis/Color/ColorAxis.js +46 -52
- package/es-modules/Core/Axis/Color/ColorAxisComposition.js +4 -2
- package/es-modules/Core/Axis/NavigatorAxisComposition.js +161 -0
- package/es-modules/Core/Axis/OrdinalAxis.js +2 -1
- package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +1 -1
- package/es-modules/Core/Axis/RadialAxis.js +19 -5
- package/es-modules/Core/Axis/Tick.js +1 -1
- package/es-modules/Core/Axis/Tick3DComposition.js +71 -0
- package/es-modules/Core/Chart/Chart.js +16 -20
- package/es-modules/Core/Chart/Chart3D.js +4 -4
- package/es-modules/Core/Chart/ChartDefaults.js +33 -43
- package/es-modules/Core/Chart/GanttChart.js +1 -1
- package/es-modules/Core/Chart/MapChart.js +1 -1
- package/es-modules/Core/Chart/StockChart.js +11 -28
- package/es-modules/Core/{DefaultOptions.js → Defaults.js} +21 -37
- package/es-modules/Core/FormatUtilities.js +1 -1
- package/es-modules/Core/Globals.js +1 -1
- package/es-modules/Core/Legend/Legend.js +114 -110
- package/es-modules/Core/Legend/LegendSymbol.js +9 -6
- package/es-modules/Core/MSPointer.js +4 -2
- package/es-modules/Core/Pointer.js +125 -75
- package/es-modules/Core/Renderer/SVG/SVGElement.js +0 -3
- package/es-modules/Core/Renderer/SVG/SVGRenderer.js +28 -14
- package/es-modules/Core/Series/DataLabel.js +8 -5
- package/es-modules/Core/Series/Point.js +38 -22
- package/es-modules/Core/Series/Series.js +12 -9
- package/es-modules/Core/Series/SeriesDefaults.js +36 -24
- package/es-modules/Core/Series/SeriesRegistry.js +2 -2
- package/es-modules/Core/Time.js +6 -5
- package/es-modules/Core/Tooltip.js +6 -28
- package/es-modules/Core/Utilities.js +6 -8
- package/es-modules/Extensions/Annotations/Annotation.js +1 -1
- package/es-modules/Extensions/Annotations/AnnotationDefaults.js +13 -8
- package/es-modules/Extensions/Annotations/MockPoint.js +2 -1
- package/es-modules/Extensions/Annotations/NavigationBindings.js +4 -5
- package/es-modules/Extensions/Annotations/NavigationBindingsDefaults.js +1 -1
- package/es-modules/Extensions/Annotations/Popup/Popup.js +2 -2
- package/es-modules/Extensions/Annotations/Popup/PopupAnnotations.js +4 -4
- package/es-modules/Extensions/Annotations/Popup/PopupComposition.js +1 -1
- package/es-modules/Extensions/Boost/BoostSeries.js +11 -8
- package/es-modules/Extensions/Breadcrumbs.js +2 -2
- package/es-modules/Extensions/Data.js +2 -2
- package/es-modules/Extensions/DataGrouping/ApproximationDefaults.js +157 -0
- package/es-modules/Extensions/DataGrouping/ApproximationRegistry.js +35 -0
- package/es-modules/Extensions/DataGrouping/DataGrouping.js +469 -0
- package/es-modules/Extensions/DataGrouping/DataGroupingAxisComposition.js +174 -0
- package/es-modules/Extensions/DataGrouping/DataGroupingDefaults.js +143 -0
- package/es-modules/Extensions/DataGrouping/DataGroupingSeriesComposition.js +479 -0
- package/es-modules/Extensions/Debugger/Debugger.js +1 -1
- package/es-modules/Extensions/DraggablePoints.js +6 -2
- package/es-modules/Extensions/Drilldown.js +3 -5
- package/es-modules/Extensions/ExportData/ExportData.js +31 -5
- package/es-modules/Extensions/Exporting/Exporting.js +47 -60
- package/es-modules/Extensions/Exporting/ExportingDefaults.js +22 -24
- package/es-modules/Extensions/GeoJSON.js +3 -1
- package/es-modules/Extensions/MarkerClusters.js +1 -1
- package/es-modules/Extensions/NoDataToDisplay.js +1 -1
- package/es-modules/Extensions/OfflineExporting/OfflineExporting.js +5 -5
- package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
- package/es-modules/Extensions/Oldie/Oldie.js +3 -3
- package/es-modules/Extensions/Oldie/VMLRenderer3D.js +1 -1
- package/es-modules/Extensions/OldiePolyfills.js +3 -1
- package/es-modules/Extensions/Pane.js +42 -5
- package/es-modules/Extensions/ParallelCoordinates.js +5 -1
- package/es-modules/Extensions/PatternFill.js +10 -10
- package/es-modules/Extensions/SeriesLabel/SeriesLabel.js +2 -2
- package/es-modules/Extensions/SeriesLabel/SeriesLabelDefaults.js +4 -0
- package/es-modules/Extensions/Sonification/Sonification.js +1 -1
- package/es-modules/Extensions/Themes/Avocado.js +1 -1
- package/es-modules/Extensions/Themes/BrandDark.js +1 -1
- package/es-modules/Extensions/Themes/BrandLight.js +1 -1
- package/es-modules/Extensions/Themes/DarkBlue.js +1 -1
- package/es-modules/Extensions/Themes/DarkGreen.js +1 -1
- package/es-modules/Extensions/Themes/DarkUnica.js +1 -1
- package/es-modules/Extensions/Themes/Gray.js +1 -1
- package/es-modules/Extensions/Themes/Grid.js +1 -1
- package/es-modules/Extensions/Themes/GridLight.js +1 -1
- package/es-modules/Extensions/Themes/HighContrastDark.js +1 -1
- package/es-modules/Extensions/Themes/HighContrastLight.js +1 -1
- package/es-modules/Extensions/Themes/SandSignika.js +1 -1
- package/es-modules/Extensions/Themes/Skies.js +1 -1
- package/es-modules/Extensions/Themes/Sunset.js +1 -1
- package/es-modules/Gantt/Connection.js +5 -5
- package/es-modules/Gantt/Pathfinder.js +6 -6
- package/es-modules/Maps/MapNavigation.js +1 -1
- package/es-modules/Maps/{MapNavigationOptionsDefault.js → MapNavigationDefaults.js} +4 -4
- package/es-modules/Maps/MapViewOptionsDefault.js +4 -4
- package/es-modules/Series/ArcDiagram/ArcDiagramSeries.js +3 -5
- package/es-modules/Series/AreaRange/AreaRangePoint.js +6 -10
- package/es-modules/Series/AreaRange/AreaRangeSeries.js +59 -48
- package/es-modules/Series/BoxPlot/BoxPlotSeries.js +4 -1
- package/es-modules/Series/Bubble/BubbleLegendComposition.js +22 -16
- package/es-modules/Series/Bubble/BubbleLegendItem.js +17 -21
- package/es-modules/Series/Candlestick/CandlestickSeries.js +15 -175
- package/es-modules/Series/Candlestick/CandlestickSeriesDefaults.js +179 -0
- package/es-modules/Series/Column/ColumnSeries.js +25 -506
- package/es-modules/Series/Column/ColumnSeriesDefaults.js +487 -0
- package/es-modules/Series/ColumnRange/ColumnRangeSeries.js +40 -36
- package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +2 -106
- package/es-modules/Series/DependencyWheel/DependencyWheelSeriesDefaults.js +183 -0
- package/es-modules/Series/DotPlot/DotPlotSeries.js +11 -12
- package/es-modules/Series/DrawPointUtilities.js +2 -14
- package/es-modules/Series/Dumbbell/DumbbellPoint.js +5 -4
- package/es-modules/Series/Dumbbell/DumbbellSeries.js +11 -7
- package/es-modules/Series/ErrorBar/ErrorBarSeries.js +19 -136
- package/es-modules/Series/ErrorBar/ErrorBarSeriesDefaults.js +147 -0
- package/es-modules/Series/Flags/FlagsPoint.js +2 -3
- package/es-modules/Series/Flags/FlagsSeries.js +31 -298
- package/es-modules/Series/Flags/FlagsSeriesDefaults.js +295 -0
- package/es-modules/Series/Flags/FlagsSymbols.js +96 -71
- package/es-modules/Series/HLC/HLCPoint.js +2 -2
- package/es-modules/Series/HLC/HLCSeries.js +7 -172
- package/es-modules/Series/HLC/HLCSeriesDefaults.js +184 -0
- package/es-modules/Series/Heatmap/HeatmapSeries.js +3 -0
- package/es-modules/Series/HeikinAshi/HeikinAshiPoint.js +3 -20
- package/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +78 -139
- package/es-modules/Series/HeikinAshi/HeikinAshiSeriesDefaults.js +102 -0
- package/es-modules/Series/Item/ItemPoint.js +0 -1
- package/es-modules/Series/Item/ItemSeries.js +13 -8
- package/es-modules/Series/Line/LineSeries.js +8 -4
- package/es-modules/Series/Map/MapPoint.js +19 -1
- package/es-modules/Series/Map/MapSeries.js +7 -3
- package/es-modules/Series/MapBubble/MapBubbleSeries.js +4 -0
- package/es-modules/Series/MapPoint/MapPointPoint.js +0 -5
- package/es-modules/Series/MapPoint/MapPointSeries.js +24 -9
- package/es-modules/Series/Networkgraph/NetworkgraphSeries.js +2 -5
- package/es-modules/Series/Networkgraph/NetworkgraphSeriesDefaults.js +2 -0
- package/es-modules/Series/OHLC/OHLCPoint.js +0 -2
- package/es-modules/Series/OHLC/OHLCSeries.js +64 -160
- package/es-modules/Series/OHLC/OHLCSeriesDefaults.js +151 -0
- package/es-modules/Series/Organization/OrganizationPoint.js +0 -2
- package/es-modules/Series/Organization/OrganizationSeries.js +96 -469
- package/es-modules/Series/Organization/OrganizationSeriesDefaults.js +415 -0
- package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +3 -10
- package/es-modules/Series/PackedBubble/PackedBubbleSeriesDefaults.js +2 -0
- package/es-modules/Series/PathUtilities.js +74 -0
- package/es-modules/Series/Pie/PieSeries.js +2 -644
- package/es-modules/Series/Pie/PieSeriesDefaults.js +660 -0
- package/es-modules/Series/PolarComposition.js +233 -15
- package/es-modules/Series/Sankey/SankeySeries.js +27 -530
- package/es-modules/Series/Sankey/SankeySeriesDefaults.js +522 -0
- package/es-modules/Series/Scatter/ScatterSeries.js +2 -172
- package/es-modules/Series/Scatter/ScatterSeriesDefaults.js +188 -0
- package/es-modules/Series/SolidGauge/SolidGaugeSeries.js +12 -182
- package/es-modules/Series/SolidGauge/SolidGaugeSeriesDefaults.js +199 -0
- package/es-modules/Series/Sunburst/SunburstNode.js +34 -0
- package/es-modules/Series/Sunburst/SunburstPoint.js +2 -1
- package/es-modules/Series/Sunburst/SunburstSeries.js +3 -1
- package/es-modules/Series/Timeline/TimelineSeries.js +2 -231
- package/es-modules/Series/Timeline/TimelineSeriesDefaults.js +248 -0
- package/es-modules/Series/TreeUtilities.js +1 -2
- package/es-modules/Series/Treegraph/TreegraphLayout.js +338 -0
- package/es-modules/Series/Treegraph/TreegraphLink.js +92 -0
- package/es-modules/Series/Treegraph/TreegraphNode.js +206 -0
- package/es-modules/Series/Treegraph/TreegraphPoint.js +175 -0
- package/es-modules/Series/Treegraph/TreegraphSeries.js +510 -0
- package/es-modules/Series/Treegraph/TreegraphSeriesDefaults.js +231 -0
- package/es-modules/Series/Treemap/TreemapNode.js +48 -0
- package/es-modules/Series/Treemap/TreemapPoint.js +2 -1
- package/es-modules/Series/Treemap/TreemapSeries.js +29 -27
- package/es-modules/Series/Variwide/VariwideComposition.js +70 -26
- package/es-modules/Series/Variwide/VariwidePoint.js +8 -7
- package/es-modules/Series/Variwide/VariwideSeries.js +19 -14
- package/es-modules/Series/Vector/VectorSeries.js +2 -2
- package/es-modules/Series/Venn/VennSeries.js +14 -0
- package/es-modules/Series/Waterfall/WaterfallSeries.js +0 -1
- package/es-modules/Series/Windbarb/WindbarbSeries.js +3 -2
- package/es-modules/Series/Wordcloud/WordcloudSeries.js +3 -0
- package/es-modules/Stock/Indicators/AO/AOIndicator.js +1 -2
- package/es-modules/Stock/Indicators/BB/BBIndicator.js +15 -4
- package/es-modules/Stock/Indicators/IKH/IKHIndicator.js +21 -18
- package/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +1 -2
- package/es-modules/Stock/Indicators/MACD/MACDIndicator.js +1 -2
- package/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +1 -1
- package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +0 -1
- package/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +3 -4
- package/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +1 -2
- package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +6 -7
- package/es-modules/{Core → Stock/Navigator}/Navigator.js +112 -686
- package/es-modules/Stock/Navigator/NavigatorComposition.js +218 -0
- package/es-modules/Stock/Navigator/NavigatorDefaults.js +490 -0
- package/es-modules/Stock/Navigator/NavigatorSymbols.js +44 -0
- package/es-modules/{Extensions → Stock/RangeSelector}/RangeSelector.js +154 -818
- package/es-modules/Stock/RangeSelector/RangeSelectorComposition.js +286 -0
- package/es-modules/Stock/RangeSelector/RangeSelectorDefaults.js +521 -0
- package/es-modules/{Core → Stock/Scrollbar}/Scrollbar.js +4 -4
- package/es-modules/{Core → Stock/Scrollbar}/ScrollbarDefaults.js +1 -1
- package/es-modules/Stock/{StockToolbar.js → StockTools/StockToolbar.js} +2 -2
- package/es-modules/Stock/{StockTools.js → StockTools/StockTools.js} +3 -3
- package/es-modules/Stock/{StockToolsBindings.js → StockTools/StockToolsBindings.js} +3 -3
- package/es-modules/Stock/{StockToolsDefaults.js → StockTools/StockToolsDefaults.js} +4 -4
- package/es-modules/Stock/{StockToolsGui.js → StockTools/StockToolsGui.js} +4 -4
- package/es-modules/Stock/{StockToolsUtilities.js → StockTools/StockToolsUtilities.js} +4 -4
- package/es-modules/masters/highcharts-3d.src.js +3 -5
- package/es-modules/masters/highcharts-gantt.src.js +1 -1
- package/es-modules/masters/highcharts-more.src.js +1 -1
- package/es-modules/masters/highcharts.src.js +6 -6
- package/es-modules/masters/highmaps.src.js +1 -1
- package/es-modules/masters/highstock.src.js +1 -1
- package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
- package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
- package/es-modules/masters/indicators/ao.src.js +1 -1
- package/es-modules/masters/indicators/apo.src.js +1 -1
- package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
- package/es-modules/masters/indicators/aroon.src.js +1 -1
- package/es-modules/masters/indicators/atr.src.js +1 -1
- package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
- package/es-modules/masters/indicators/cci.src.js +1 -1
- package/es-modules/masters/indicators/chaikin.src.js +1 -1
- package/es-modules/masters/indicators/cmf.src.js +1 -1
- package/es-modules/masters/indicators/cmo.src.js +1 -1
- package/es-modules/masters/indicators/dema.src.js +1 -1
- package/es-modules/masters/indicators/disparity-index.src.js +1 -1
- package/es-modules/masters/indicators/dmi.src.js +1 -1
- package/es-modules/masters/indicators/dpo.src.js +1 -1
- package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/es-modules/masters/indicators/indicators-all.src.js +1 -1
- package/es-modules/masters/indicators/indicators.src.js +1 -1
- package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
- package/es-modules/masters/indicators/klinger.src.js +1 -1
- package/es-modules/masters/indicators/macd.src.js +1 -1
- package/es-modules/masters/indicators/mfi.src.js +1 -1
- package/es-modules/masters/indicators/momentum.src.js +1 -1
- package/es-modules/masters/indicators/natr.src.js +1 -1
- package/es-modules/masters/indicators/obv.src.js +1 -1
- package/es-modules/masters/indicators/pivot-points.src.js +1 -1
- package/es-modules/masters/indicators/ppo.src.js +1 -1
- package/es-modules/masters/indicators/price-channel.src.js +1 -1
- package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
- package/es-modules/masters/indicators/psar.src.js +1 -1
- package/es-modules/masters/indicators/regressions.src.js +1 -1
- package/es-modules/masters/indicators/roc.src.js +1 -1
- package/es-modules/masters/indicators/rsi.src.js +1 -1
- package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
- package/es-modules/masters/indicators/stochastic.src.js +1 -1
- package/es-modules/masters/indicators/supertrend.src.js +1 -1
- package/es-modules/masters/indicators/tema.src.js +1 -1
- package/es-modules/masters/indicators/trendline.src.js +1 -1
- package/es-modules/masters/indicators/trix.src.js +1 -1
- package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
- package/es-modules/masters/indicators/vwap.src.js +1 -1
- package/es-modules/masters/indicators/williams-r.src.js +1 -1
- package/es-modules/masters/indicators/wma.src.js +1 -1
- package/es-modules/masters/indicators/zigzag.src.js +1 -1
- package/es-modules/masters/modules/accessibility.src.js +1 -1
- package/es-modules/masters/modules/annotations-advanced.src.js +1 -1
- package/es-modules/masters/modules/annotations.src.js +1 -1
- package/es-modules/masters/modules/arc-diagram.src.js +1 -1
- package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
- package/es-modules/masters/modules/boost-canvas.src.js +1 -1
- package/es-modules/masters/modules/boost.src.js +1 -1
- package/es-modules/masters/modules/broken-axis.src.js +1 -1
- package/es-modules/masters/modules/bullet.src.js +1 -1
- package/es-modules/masters/modules/coloraxis.src.js +1 -1
- package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
- package/es-modules/masters/modules/cylinder.src.js +1 -1
- package/es-modules/masters/modules/data.src.js +1 -1
- package/es-modules/masters/modules/datagrouping.src.js +11 -3
- package/es-modules/masters/modules/debugger.src.js +1 -1
- package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
- package/es-modules/masters/modules/dotplot.src.js +1 -1
- package/es-modules/masters/modules/drag-panes.src.js +1 -1
- package/es-modules/masters/modules/draggable-points.src.js +1 -1
- package/es-modules/masters/modules/drilldown.src.js +1 -1
- package/es-modules/masters/modules/dumbbell.src.js +1 -1
- package/es-modules/masters/modules/export-data.src.js +1 -1
- package/es-modules/masters/modules/exporting.src.js +1 -1
- package/es-modules/masters/modules/full-screen.src.js +1 -1
- package/es-modules/masters/modules/funnel.src.js +1 -1
- package/es-modules/masters/modules/funnel3d.src.js +1 -1
- package/es-modules/masters/modules/gantt.src.js +9 -5
- package/es-modules/masters/modules/grid-axis.src.js +1 -1
- package/es-modules/masters/modules/heatmap.src.js +1 -1
- package/es-modules/masters/modules/heikinashi.src.js +5 -2
- package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
- package/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
- package/es-modules/masters/modules/item-series.src.js +1 -1
- package/es-modules/masters/modules/lollipop.src.js +1 -1
- package/es-modules/masters/modules/map.src.js +1 -1
- package/es-modules/masters/modules/marker-clusters.src.js +1 -1
- package/es-modules/masters/modules/networkgraph.src.js +1 -1
- package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
- package/es-modules/masters/modules/offline-exporting.src.js +1 -1
- package/es-modules/masters/modules/oldie-polyfills.src.js +1 -1
- package/es-modules/masters/modules/oldie.src.js +1 -1
- package/es-modules/masters/modules/organization.src.js +1 -1
- package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
- package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
- package/es-modules/masters/modules/pareto.src.js +1 -1
- package/es-modules/masters/modules/pathfinder.src.js +1 -1
- package/es-modules/masters/modules/pattern-fill.src.js +1 -1
- package/es-modules/masters/modules/price-indicator.src.js +1 -1
- package/es-modules/masters/modules/pyramid3d.src.js +1 -1
- package/es-modules/masters/modules/sankey.src.js +1 -1
- package/es-modules/masters/modules/series-label.src.js +1 -1
- package/es-modules/masters/modules/series-on-point.src.js +1 -1
- package/es-modules/masters/modules/solid-gauge.src.js +1 -1
- package/es-modules/masters/modules/sonification.src.js +1 -1
- package/es-modules/masters/modules/static-scale.src.js +1 -1
- package/es-modules/masters/modules/stock-tools.src.js +4 -4
- package/es-modules/masters/modules/stock.src.js +17 -11
- package/es-modules/masters/modules/streamgraph.src.js +1 -1
- package/es-modules/masters/modules/sunburst.src.js +1 -1
- package/es-modules/masters/modules/tilemap.src.js +1 -1
- package/es-modules/masters/modules/timeline.src.js +1 -1
- package/es-modules/masters/modules/treegraph.src.js +13 -0
- package/es-modules/masters/modules/treegrid.src.js +1 -1
- package/es-modules/masters/modules/treemap.src.js +1 -1
- package/es-modules/masters/modules/variable-pie.src.js +1 -1
- package/es-modules/masters/modules/variwide.src.js +5 -2
- package/es-modules/masters/modules/vector.src.js +1 -1
- package/es-modules/masters/modules/venn.src.js +1 -1
- package/es-modules/masters/modules/windbarb.src.js +1 -1
- package/es-modules/masters/modules/wordcloud.src.js +1 -1
- package/es-modules/masters/modules/xrange.src.js +1 -1
- package/es-modules/masters/themes/avocado.src.js +1 -1
- package/es-modules/masters/themes/brand-dark.src.js +1 -1
- package/es-modules/masters/themes/brand-light.src.js +1 -1
- package/es-modules/masters/themes/dark-blue.src.js +1 -1
- package/es-modules/masters/themes/dark-green.src.js +1 -1
- package/es-modules/masters/themes/dark-unica.src.js +1 -1
- package/es-modules/masters/themes/gray.src.js +1 -1
- package/es-modules/masters/themes/grid-light.src.js +1 -1
- package/es-modules/masters/themes/grid.src.js +1 -1
- package/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
- package/es-modules/masters/themes/high-contrast-light.src.js +1 -1
- package/es-modules/masters/themes/sand-signika.src.js +1 -1
- package/es-modules/masters/themes/skies.src.js +1 -1
- package/es-modules/masters/themes/sunset.src.js +1 -1
- package/highcharts-3d.js +97 -98
- package/highcharts-3d.js.map +1 -1
- package/highcharts-3d.src.js +476 -449
- package/highcharts-gantt.js +811 -808
- package/highcharts-gantt.js.map +1 -1
- package/highcharts-gantt.src.js +14619 -14112
- package/highcharts-more.d.ts +0 -8
- package/highcharts-more.js +208 -201
- package/highcharts-more.js.map +1 -1
- package/highcharts-more.src.d.ts +0 -8
- package/highcharts-more.src.js +679 -289
- package/highcharts.d.ts +30739 -6156
- package/highcharts.js +590 -589
- package/highcharts.js.map +1 -1
- package/highcharts.src.d.ts +30739 -6156
- package/highcharts.src.js +1988 -1799
- package/highmaps.js +759 -757
- package/highmaps.js.map +1 -1
- package/highmaps.src.js +2339 -2077
- package/highstock.js +802 -794
- package/highstock.js.map +1 -1
- package/highstock.src.js +12349 -11416
- package/indicators/acceleration-bands.js +1 -1
- package/indicators/acceleration-bands.src.js +1 -1
- package/indicators/accumulation-distribution.js +1 -1
- package/indicators/accumulation-distribution.src.js +1 -1
- package/indicators/ao.js +6 -6
- package/indicators/ao.js.map +1 -1
- package/indicators/ao.src.js +4 -3
- package/indicators/apo.js +1 -1
- package/indicators/apo.src.js +1 -1
- package/indicators/aroon-oscillator.js +1 -1
- package/indicators/aroon-oscillator.src.js +1 -1
- package/indicators/aroon.js +1 -1
- package/indicators/aroon.src.js +1 -1
- package/indicators/atr.js +1 -1
- package/indicators/atr.src.js +1 -1
- package/indicators/bollinger-bands.js +1 -1
- package/indicators/bollinger-bands.js.map +1 -1
- package/indicators/bollinger-bands.src.js +16 -5
- package/indicators/cci.js +1 -1
- package/indicators/cci.src.js +1 -1
- package/indicators/chaikin.js +1 -1
- package/indicators/chaikin.src.js +1 -1
- package/indicators/cmf.js +1 -1
- package/indicators/cmf.src.js +1 -1
- package/indicators/cmo.d.ts +17 -0
- package/indicators/cmo.js +1 -1
- package/indicators/cmo.src.d.ts +17 -0
- package/indicators/cmo.src.js +1 -1
- package/indicators/dema.js +1 -1
- package/indicators/dema.src.js +1 -1
- package/indicators/disparity-index.d.ts +17 -0
- package/indicators/disparity-index.js +1 -1
- package/indicators/disparity-index.src.d.ts +17 -0
- package/indicators/disparity-index.src.js +1 -1
- package/indicators/dmi.d.ts +17 -0
- package/indicators/dmi.js +1 -1
- package/indicators/dmi.src.d.ts +17 -0
- package/indicators/dmi.src.js +1 -1
- package/indicators/dpo.js +1 -1
- package/indicators/dpo.src.js +1 -1
- package/indicators/ichimoku-kinko-hyo.js +14 -14
- package/indicators/ichimoku-kinko-hyo.js.map +1 -1
- package/indicators/ichimoku-kinko-hyo.src.js +22 -19
- package/indicators/indicators-all.js +198 -199
- package/indicators/indicators-all.js.map +1 -1
- package/indicators/indicators-all.src.js +63 -57
- package/indicators/indicators.js +13 -13
- package/indicators/indicators.js.map +1 -1
- package/indicators/indicators.src.js +1 -15
- package/indicators/keltner-channels.js +1 -1
- package/indicators/keltner-channels.src.js +1 -1
- package/indicators/klinger.d.ts +17 -0
- package/indicators/klinger.js +12 -12
- package/indicators/klinger.js.map +1 -1
- package/indicators/klinger.src.d.ts +17 -0
- package/indicators/klinger.src.js +4 -3
- package/indicators/macd.js +1 -1
- package/indicators/macd.js.map +1 -1
- package/indicators/macd.src.js +4 -3
- package/indicators/mfi.js +1 -1
- package/indicators/mfi.src.js +1 -1
- package/indicators/momentum.js +1 -1
- package/indicators/momentum.src.js +1 -1
- package/indicators/natr.js +1 -1
- package/indicators/natr.src.js +1 -1
- package/indicators/obv.d.ts +17 -0
- package/indicators/obv.js +1 -1
- package/indicators/obv.src.d.ts +17 -0
- package/indicators/obv.src.js +1 -1
- package/indicators/pivot-points.js +2 -2
- package/indicators/pivot-points.js.map +1 -1
- package/indicators/pivot-points.src.js +2 -2
- package/indicators/ppo.js +1 -1
- package/indicators/ppo.src.js +1 -1
- package/indicators/price-channel.js +1 -1
- package/indicators/price-channel.src.js +1 -1
- package/indicators/price-envelopes.js +1 -1
- package/indicators/price-envelopes.src.js +1 -1
- package/indicators/psar.js +1 -1
- package/indicators/psar.src.js +1 -1
- package/indicators/regressions.js +1 -1
- package/indicators/regressions.src.js +1 -1
- package/indicators/roc.js +1 -1
- package/indicators/roc.src.js +1 -1
- package/indicators/rsi.js +1 -1
- package/indicators/rsi.src.js +1 -1
- package/indicators/slow-stochastic.js +5 -5
- package/indicators/slow-stochastic.js.map +1 -1
- package/indicators/slow-stochastic.src.js +6 -5
- package/indicators/stochastic.js +1 -1
- package/indicators/stochastic.src.js +1 -1
- package/indicators/supertrend.js +7 -7
- package/indicators/supertrend.js.map +1 -1
- package/indicators/supertrend.src.js +4 -3
- package/indicators/tema.js +1 -1
- package/indicators/tema.src.js +1 -1
- package/indicators/trendline.js +1 -1
- package/indicators/trendline.src.js +1 -1
- package/indicators/trix.js +1 -1
- package/indicators/trix.src.js +1 -1
- package/indicators/volume-by-price.js +17 -17
- package/indicators/volume-by-price.js.map +1 -1
- package/indicators/volume-by-price.src.js +9 -8
- package/indicators/vwap.js +1 -1
- package/indicators/vwap.src.js +1 -1
- package/indicators/williams-r.js +1 -1
- package/indicators/williams-r.src.js +1 -1
- package/indicators/wma.js +1 -1
- package/indicators/wma.src.js +1 -1
- package/indicators/zigzag.js +1 -1
- package/indicators/zigzag.src.js +1 -1
- package/modules/accessibility.js +214 -213
- package/modules/accessibility.js.map +1 -1
- package/modules/accessibility.src.js +991 -835
- package/modules/annotations-advanced.js +16 -16
- package/modules/annotations-advanced.js.map +1 -1
- package/modules/annotations-advanced.src.js +29 -24
- package/modules/annotations.js +91 -91
- package/modules/annotations.js.map +1 -1
- package/modules/annotations.src.js +29 -24
- package/modules/arc-diagram.d.ts +17 -0
- package/modules/arc-diagram.js +15 -15
- package/modules/arc-diagram.js.map +1 -1
- package/modules/arc-diagram.src.d.ts +17 -0
- package/modules/arc-diagram.src.js +6 -6
- package/modules/arrow-symbols.js +1 -1
- package/modules/arrow-symbols.src.js +1 -1
- package/modules/boost-canvas.js +19 -19
- package/modules/boost-canvas.js.map +1 -1
- package/modules/boost-canvas.src.js +13 -8
- package/modules/boost.js +37 -37
- package/modules/boost.js.map +1 -1
- package/modules/boost.src.js +13 -8
- package/modules/broken-axis.js +1 -1
- package/modules/broken-axis.src.js +1 -1
- package/modules/bullet.js +1 -1
- package/modules/bullet.src.js +1 -1
- package/modules/coloraxis.js +25 -24
- package/modules/coloraxis.js.map +1 -1
- package/modules/coloraxis.src.js +77 -58
- package/modules/current-date-indicator.js +1 -1
- package/modules/current-date-indicator.src.js +1 -1
- package/modules/cylinder.js +1 -1
- package/modules/cylinder.src.js +1 -1
- package/modules/data.js +27 -27
- package/modules/data.js.map +1 -1
- package/modules/data.src.js +3 -3
- package/modules/datagrouping.d.ts +31 -0
- package/modules/datagrouping.js +23 -21
- package/modules/datagrouping.js.map +1 -1
- package/modules/datagrouping.src.d.ts +31 -0
- package/modules/datagrouping.src.js +921 -640
- package/modules/debugger.js +3 -3
- package/modules/debugger.js.map +1 -1
- package/modules/debugger.src.js +2 -2
- package/modules/dependency-wheel.js +12 -12
- package/modules/dependency-wheel.js.map +1 -1
- package/modules/dependency-wheel.src.js +191 -108
- package/modules/dotplot.js +6 -6
- package/modules/dotplot.js.map +1 -1
- package/modules/dotplot.src.js +10 -13
- package/modules/drag-panes.js +1 -1
- package/modules/drag-panes.src.js +1 -1
- package/modules/draggable-points.js +5 -5
- package/modules/draggable-points.js.map +1 -1
- package/modules/draggable-points.src.js +7 -3
- package/modules/drilldown.js +37 -37
- package/modules/drilldown.js.map +1 -1
- package/modules/drilldown.src.js +5 -6
- package/modules/dumbbell.js +17 -17
- package/modules/dumbbell.js.map +1 -1
- package/modules/dumbbell.src.js +27 -22
- package/modules/export-data.js +26 -25
- package/modules/export-data.js.map +1 -1
- package/modules/export-data.src.js +33 -6
- package/modules/exporting.js +36 -35
- package/modules/exporting.js.map +1 -1
- package/modules/exporting.src.js +81 -88
- package/modules/full-screen.js +1 -1
- package/modules/full-screen.src.js +1 -1
- package/modules/funnel.js +1 -1
- package/modules/funnel.src.js +1 -1
- package/modules/funnel3d.js +1 -1
- package/modules/funnel3d.src.js +1 -1
- package/modules/gantt.js +221 -219
- package/modules/gantt.js.map +1 -1
- package/modules/gantt.src.js +12842 -12524
- package/modules/grid-axis.js +1 -1
- package/modules/grid-axis.src.js +1 -1
- package/modules/heatmap.js +40 -40
- package/modules/heatmap.js.map +1 -1
- package/modules/heatmap.src.js +80 -58
- package/modules/heikinashi.d.ts +17 -0
- package/modules/heikinashi.js +9 -8
- package/modules/heikinashi.js.map +1 -1
- package/modules/heikinashi.src.d.ts +17 -0
- package/modules/heikinashi.src.js +192 -165
- package/modules/histogram-bellcurve.js +1 -1
- package/modules/histogram-bellcurve.src.js +1 -1
- package/modules/hollowcandlestick.d.ts +17 -0
- package/modules/hollowcandlestick.js +1 -1
- package/modules/hollowcandlestick.src.d.ts +17 -0
- package/modules/hollowcandlestick.src.js +1 -1
- package/modules/item-series.js +12 -12
- package/modules/item-series.js.map +1 -1
- package/modules/item-series.src.js +14 -10
- package/modules/lollipop.js +1 -1
- package/modules/lollipop.src.js +1 -1
- package/modules/map.js +172 -171
- package/modules/map.js.map +1 -1
- package/modules/map.src.js +194 -121
- package/modules/marker-clusters.js +2 -2
- package/modules/marker-clusters.js.map +1 -1
- package/modules/marker-clusters.src.js +2 -2
- package/modules/networkgraph.js +8 -8
- package/modules/networkgraph.js.map +1 -1
- package/modules/networkgraph.src.js +5 -6
- package/modules/no-data-to-display.js +4 -4
- package/modules/no-data-to-display.js.map +1 -1
- package/modules/no-data-to-display.src.js +2 -2
- package/modules/offline-exporting.js +4 -4
- package/modules/offline-exporting.js.map +1 -1
- package/modules/offline-exporting.src.js +7 -7
- package/modules/oldie-polyfills.js +7 -7
- package/modules/oldie-polyfills.js.map +1 -1
- package/modules/oldie-polyfills.src.js +9 -7
- package/modules/oldie.js +30 -30
- package/modules/oldie.js.map +1 -1
- package/modules/oldie.src.js +5 -5
- package/modules/organization.js +18 -16
- package/modules/organization.js.map +1 -1
- package/modules/organization.src.js +659 -495
- package/modules/overlapping-datalabels.js +1 -1
- package/modules/overlapping-datalabels.src.js +1 -1
- package/modules/parallel-coordinates.js +10 -10
- package/modules/parallel-coordinates.js.map +1 -1
- package/modules/parallel-coordinates.src.js +6 -2
- package/modules/pareto.js +1 -1
- package/modules/pareto.src.js +1 -1
- package/modules/pathfinder.js +31 -31
- package/modules/pathfinder.js.map +1 -1
- package/modules/pathfinder.src.js +19 -23
- package/modules/pattern-fill.js +2 -2
- package/modules/pattern-fill.js.map +1 -1
- package/modules/pattern-fill.src.js +11 -11
- package/modules/price-indicator.js +1 -1
- package/modules/price-indicator.src.js +1 -1
- package/modules/pyramid3d.js +1 -1
- package/modules/pyramid3d.src.js +1 -1
- package/modules/sankey.js +33 -32
- package/modules/sankey.js.map +1 -1
- package/modules/sankey.src.js +571 -550
- package/modules/series-label.js +17 -17
- package/modules/series-label.js.map +1 -1
- package/modules/series-label.src.js +7 -3
- package/modules/series-on-point.d.ts +17 -0
- package/modules/series-on-point.js +1 -1
- package/modules/series-on-point.src.d.ts +17 -0
- package/modules/series-on-point.src.js +1 -1
- package/modules/solid-gauge.js +11 -10
- package/modules/solid-gauge.js.map +1 -1
- package/modules/solid-gauge.src.js +220 -192
- package/modules/sonification.js +2 -2
- package/modules/sonification.js.map +1 -1
- package/modules/sonification.src.js +2 -2
- package/modules/static-scale.js +1 -1
- package/modules/static-scale.src.js +1 -1
- package/modules/stock-tools.js +59 -59
- package/modules/stock-tools.js.map +1 -1
- package/modules/stock-tools.src.js +19 -21
- package/modules/stock.d.ts +26 -6
- package/modules/stock.js +212 -205
- package/modules/stock.js.map +1 -1
- package/modules/stock.src.d.ts +26 -6
- package/modules/stock.src.js +11361 -10617
- package/modules/streamgraph.js +1 -1
- package/modules/streamgraph.src.js +1 -1
- package/modules/sunburst.js +75 -73
- package/modules/sunburst.js.map +1 -1
- package/modules/sunburst.src.js +133 -57
- package/modules/tilemap.js +1 -1
- package/modules/tilemap.src.js +1 -1
- package/modules/timeline.js +18 -18
- package/modules/timeline.js.map +1 -1
- package/modules/timeline.src.js +257 -233
- package/modules/treegraph.d.ts +17 -0
- package/modules/treegraph.js +44 -0
- package/modules/treegraph.js.map +1 -0
- package/modules/treegraph.src.d.ts +17 -0
- package/modules/treegraph.src.js +1829 -0
- package/modules/treegrid.js +2 -2
- package/modules/treegrid.js.map +1 -1
- package/modules/treegrid.src.js +2 -3
- package/modules/treemap.js +54 -53
- package/modules/treemap.js.map +1 -1
- package/modules/treemap.src.js +90 -52
- package/modules/variable-pie.js +1 -1
- package/modules/variable-pie.src.js +1 -1
- package/modules/variwide.js +12 -12
- package/modules/variwide.js.map +1 -1
- package/modules/variwide.src.js +158 -106
- package/modules/vector.js +1 -1
- package/modules/vector.src.js +3 -3
- package/modules/venn.js +31 -31
- package/modules/venn.js.map +1 -1
- package/modules/venn.src.js +17 -16
- package/modules/windbarb.js +15 -15
- package/modules/windbarb.js.map +1 -1
- package/modules/windbarb.src.js +41 -4
- package/modules/wordcloud.js +23 -23
- package/modules/wordcloud.js.map +1 -1
- package/modules/wordcloud.src.js +6 -15
- package/modules/xrange.js +1 -1
- package/modules/xrange.src.js +1 -1
- package/package.json +1 -1
- package/themes/avocado.js +2 -3
- package/themes/avocado.js.map +1 -1
- package/themes/avocado.src.js +2 -2
- package/themes/brand-dark.d.ts +22 -0
- package/themes/brand-dark.js +3 -3
- package/themes/brand-dark.js.map +1 -1
- package/themes/brand-dark.src.d.ts +22 -0
- package/themes/brand-dark.src.js +2 -2
- package/themes/brand-light.d.ts +22 -0
- package/themes/brand-light.js +2 -2
- package/themes/brand-light.js.map +1 -1
- package/themes/brand-light.src.d.ts +22 -0
- package/themes/brand-light.src.js +2 -2
- package/themes/dark-blue.js +2 -2
- package/themes/dark-blue.js.map +1 -1
- package/themes/dark-blue.src.js +2 -2
- package/themes/dark-green.js +2 -2
- package/themes/dark-green.js.map +1 -1
- package/themes/dark-green.src.js +2 -2
- package/themes/dark-unica.js +2 -2
- package/themes/dark-unica.js.map +1 -1
- package/themes/dark-unica.src.js +2 -2
- package/themes/gray.js +2 -2
- package/themes/gray.js.map +1 -1
- package/themes/gray.src.js +2 -2
- package/themes/grid-light.js +2 -2
- package/themes/grid-light.js.map +1 -1
- package/themes/grid-light.src.js +2 -2
- package/themes/grid.js +2 -2
- package/themes/grid.js.map +1 -1
- package/themes/grid.src.js +2 -2
- package/themes/high-contrast-dark.d.ts +22 -0
- package/themes/high-contrast-dark.js +2 -2
- package/themes/high-contrast-dark.js.map +1 -1
- package/themes/high-contrast-dark.src.d.ts +22 -0
- package/themes/high-contrast-dark.src.js +2 -2
- package/themes/high-contrast-light.d.ts +22 -0
- package/themes/high-contrast-light.js +2 -2
- package/themes/high-contrast-light.js.map +1 -1
- package/themes/high-contrast-light.src.d.ts +22 -0
- package/themes/high-contrast-light.src.js +2 -2
- package/themes/sand-signika.js +2 -2
- package/themes/sand-signika.js.map +1 -1
- package/themes/sand-signika.src.js +2 -2
- package/themes/skies.js +2 -2
- package/themes/skies.js.map +1 -1
- package/themes/skies.src.js +2 -2
- package/themes/sunset.js +2 -2
- package/themes/sunset.js.map +1 -1
- package/themes/sunset.src.js +2 -2
- package/es-modules/Core/Axis/Axis3D.js +0 -612
- package/es-modules/Core/Axis/NavigatorAxis.js +0 -159
- package/es-modules/Core/Axis/Tick3D.js +0 -68
- package/es-modules/Extensions/DataGrouping.js +0 -1177
- package/es-modules/Stock/Indicators/SMA/SMAComposition.js +0 -12
|
@@ -0,0 +1,1829 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Highcharts JS v10.3.1 (2022-10-31)
|
|
3
|
+
* Treegraph chart series type
|
|
4
|
+
*
|
|
5
|
+
* (c) 2010-2022 Pawel Lysy Grzegorz Blachlinski
|
|
6
|
+
*
|
|
7
|
+
* License: www.highcharts.com/license
|
|
8
|
+
*/
|
|
9
|
+
(function (factory) {
|
|
10
|
+
if (typeof module === 'object' && module.exports) {
|
|
11
|
+
factory['default'] = factory;
|
|
12
|
+
module.exports = factory;
|
|
13
|
+
} else if (typeof define === 'function' && define.amd) {
|
|
14
|
+
define('highcharts/modules/treegraph', ['highcharts', 'highcharts/modules/treemap'], function (Highcharts) {
|
|
15
|
+
factory(Highcharts);
|
|
16
|
+
factory.Highcharts = Highcharts;
|
|
17
|
+
return factory;
|
|
18
|
+
});
|
|
19
|
+
} else {
|
|
20
|
+
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
|
21
|
+
}
|
|
22
|
+
}(function (Highcharts) {
|
|
23
|
+
'use strict';
|
|
24
|
+
var _modules = Highcharts ? Highcharts._modules : {};
|
|
25
|
+
function _registerModule(obj, path, args, fn) {
|
|
26
|
+
if (!obj.hasOwnProperty(path)) {
|
|
27
|
+
obj[path] = fn.apply(null, args);
|
|
28
|
+
|
|
29
|
+
if (typeof CustomEvent === 'function') {
|
|
30
|
+
window.dispatchEvent(
|
|
31
|
+
new CustomEvent(
|
|
32
|
+
'HighchartsModuleLoaded',
|
|
33
|
+
{ detail: { path: path, module: obj[path] }
|
|
34
|
+
})
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
_registerModule(_modules, 'Series/PathUtilities.js', [], function () {
|
|
40
|
+
/* *
|
|
41
|
+
*
|
|
42
|
+
* (c) 2010-2022 Pawel Lysy
|
|
43
|
+
*
|
|
44
|
+
* License: www.highcharts.com/license
|
|
45
|
+
*
|
|
46
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
47
|
+
*
|
|
48
|
+
* */
|
|
49
|
+
/* *
|
|
50
|
+
*
|
|
51
|
+
* Functions
|
|
52
|
+
*
|
|
53
|
+
* */
|
|
54
|
+
/**
|
|
55
|
+
* General function to apply corner radius to a path
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
function curvedPath(path, r) {
|
|
59
|
+
var d = [];
|
|
60
|
+
for (var i = 0; i < path.length; i++) {
|
|
61
|
+
var x = path[i][1];
|
|
62
|
+
var y = path[i][2];
|
|
63
|
+
if (typeof x === 'number' && typeof y === 'number') {
|
|
64
|
+
// moveTo
|
|
65
|
+
if (i === 0) {
|
|
66
|
+
d.push(['M', x, y]);
|
|
67
|
+
}
|
|
68
|
+
else if (i === path.length - 1) {
|
|
69
|
+
d.push(['L', x, y]);
|
|
70
|
+
// curveTo
|
|
71
|
+
}
|
|
72
|
+
else if (r) {
|
|
73
|
+
var prevSeg = path[i - 1];
|
|
74
|
+
var nextSeg = path[i + 1];
|
|
75
|
+
if (prevSeg && nextSeg) {
|
|
76
|
+
var x1 = prevSeg[1],
|
|
77
|
+
y1 = prevSeg[2],
|
|
78
|
+
x2 = nextSeg[1],
|
|
79
|
+
y2 = nextSeg[2];
|
|
80
|
+
// Only apply to breaks
|
|
81
|
+
if (typeof x1 === 'number' &&
|
|
82
|
+
typeof x2 === 'number' &&
|
|
83
|
+
typeof y1 === 'number' &&
|
|
84
|
+
typeof y2 === 'number' &&
|
|
85
|
+
x1 !== x2 &&
|
|
86
|
+
y1 !== y2) {
|
|
87
|
+
var directionX = x1 < x2 ? 1 : -1,
|
|
88
|
+
directionY = y1 < y2 ? 1 : -1;
|
|
89
|
+
d.push([
|
|
90
|
+
'L',
|
|
91
|
+
x - directionX * Math.min(Math.abs(x - x1), r),
|
|
92
|
+
y - directionY * Math.min(Math.abs(y - y1), r)
|
|
93
|
+
], [
|
|
94
|
+
'C',
|
|
95
|
+
x,
|
|
96
|
+
y,
|
|
97
|
+
x,
|
|
98
|
+
y,
|
|
99
|
+
x + directionX * Math.min(Math.abs(x - x2), r),
|
|
100
|
+
y + directionY * Math.min(Math.abs(y - y2), r)
|
|
101
|
+
]);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
// lineTo
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
d.push(['L', x, y]);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return d;
|
|
112
|
+
}
|
|
113
|
+
var PathUtilities = {
|
|
114
|
+
curvedPath: curvedPath
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
return PathUtilities;
|
|
118
|
+
});
|
|
119
|
+
_registerModule(_modules, 'Series/Treegraph/TreegraphNode.js', [_modules['Core/Series/SeriesRegistry.js']], function (SeriesRegistry) {
|
|
120
|
+
/* *
|
|
121
|
+
*
|
|
122
|
+
* (c) 2010-2022 Pawel Lysy Grzegorz Blachlinski
|
|
123
|
+
*
|
|
124
|
+
* License: www.highcharts.com/license
|
|
125
|
+
*
|
|
126
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
127
|
+
*
|
|
128
|
+
* */
|
|
129
|
+
var __extends = (this && this.__extends) || (function () {
|
|
130
|
+
var extendStatics = function (d,
|
|
131
|
+
b) {
|
|
132
|
+
extendStatics = Object.setPrototypeOf ||
|
|
133
|
+
({ __proto__: [] } instanceof Array && function (d,
|
|
134
|
+
b) { d.__proto__ = b; }) ||
|
|
135
|
+
function (d,
|
|
136
|
+
b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
137
|
+
return extendStatics(d, b);
|
|
138
|
+
};
|
|
139
|
+
return function (d, b) {
|
|
140
|
+
extendStatics(d, b);
|
|
141
|
+
function __() { this.constructor = d; }
|
|
142
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
143
|
+
};
|
|
144
|
+
})();
|
|
145
|
+
var TreemapNode = SeriesRegistry.seriesTypes.treemap.prototype.NodeClass;
|
|
146
|
+
/* *
|
|
147
|
+
*
|
|
148
|
+
* Class
|
|
149
|
+
*
|
|
150
|
+
* */
|
|
151
|
+
/**
|
|
152
|
+
* @private
|
|
153
|
+
* @class
|
|
154
|
+
*/
|
|
155
|
+
var TreegraphNode = /** @class */ (function (_super) {
|
|
156
|
+
__extends(TreegraphNode, _super);
|
|
157
|
+
function TreegraphNode() {
|
|
158
|
+
/* *
|
|
159
|
+
*
|
|
160
|
+
* Properties
|
|
161
|
+
*
|
|
162
|
+
* */
|
|
163
|
+
var _this = _super !== null && _super.apply(this,
|
|
164
|
+
arguments) || this;
|
|
165
|
+
_this.mod = 0;
|
|
166
|
+
_this.shift = 0;
|
|
167
|
+
_this.change = 0;
|
|
168
|
+
_this.children = [];
|
|
169
|
+
_this.preX = 0;
|
|
170
|
+
_this.hidden = false;
|
|
171
|
+
_this.wasVisited = false;
|
|
172
|
+
_this.collapsed = false;
|
|
173
|
+
return _this;
|
|
174
|
+
}
|
|
175
|
+
/* *
|
|
176
|
+
*
|
|
177
|
+
* Functions
|
|
178
|
+
*
|
|
179
|
+
* */
|
|
180
|
+
/**
|
|
181
|
+
* Get the next left node which is either first child or thread.
|
|
182
|
+
*
|
|
183
|
+
* @return {TreegraphNode|undefined}
|
|
184
|
+
* Next left node child or thread.
|
|
185
|
+
*/
|
|
186
|
+
TreegraphNode.prototype.nextLeft = function () {
|
|
187
|
+
return this.getLeftMostChild() || this.thread;
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* Get the next right node which is either last child or thread.
|
|
191
|
+
*
|
|
192
|
+
* @return {TreegraphNode|undefined}
|
|
193
|
+
* Next right node child or thread.
|
|
194
|
+
*/
|
|
195
|
+
TreegraphNode.prototype.nextRight = function () {
|
|
196
|
+
return this.getRightMostChild() || this.thread;
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Return the left one of the greatest uncommon ancestors of a
|
|
200
|
+
* leftInternal node and it's right neighbor.
|
|
201
|
+
*
|
|
202
|
+
* @param {TreegraphNode} leftIntNode
|
|
203
|
+
* @param {TreegraphNode} defaultAncestor
|
|
204
|
+
* @return {TreegraphNode}
|
|
205
|
+
* Left one of the greatest uncommon ancestors of a leftInternal
|
|
206
|
+
* node and it's right neighbor.
|
|
207
|
+
*
|
|
208
|
+
*/
|
|
209
|
+
TreegraphNode.prototype.getAncestor = function (leftIntNode, defaultAncestor) {
|
|
210
|
+
var leftAnc = leftIntNode.ancestor;
|
|
211
|
+
if (leftAnc.children[0] === this.children[0]) {
|
|
212
|
+
return leftIntNode.ancestor;
|
|
213
|
+
}
|
|
214
|
+
return defaultAncestor;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Get node's first sibling, which is not hidden.
|
|
218
|
+
*
|
|
219
|
+
* @return {TreegraphNode|undefined}
|
|
220
|
+
* First sibling of the node which is not hidden or undefined, if it
|
|
221
|
+
* does not exists.
|
|
222
|
+
*/
|
|
223
|
+
TreegraphNode.prototype.getLeftMostSibling = function () {
|
|
224
|
+
var parent = this.getParent();
|
|
225
|
+
if (parent) {
|
|
226
|
+
for (var _i = 0, _a = parent.children; _i < _a.length; _i++) {
|
|
227
|
+
var child = _a[_i];
|
|
228
|
+
if (child && child.point.visible) {
|
|
229
|
+
return child;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* Check if the node is a leaf (if it has any children).
|
|
236
|
+
*
|
|
237
|
+
* @return {boolean}
|
|
238
|
+
* If the node has no visible children return true.
|
|
239
|
+
*/
|
|
240
|
+
TreegraphNode.prototype.hasChildren = function () {
|
|
241
|
+
var children = this.children;
|
|
242
|
+
for (var i = 0; i < children.length; i++) {
|
|
243
|
+
if (children[i].point.visible) {
|
|
244
|
+
return true;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return false;
|
|
248
|
+
};
|
|
249
|
+
/**
|
|
250
|
+
* Get node's left sibling (if it exists).
|
|
251
|
+
*
|
|
252
|
+
* @return {TreegraphNode|undefined}
|
|
253
|
+
* Left sibling of the node
|
|
254
|
+
*/
|
|
255
|
+
TreegraphNode.prototype.getLeftSibling = function () {
|
|
256
|
+
var parent = this.getParent();
|
|
257
|
+
if (parent) {
|
|
258
|
+
var children = parent.children;
|
|
259
|
+
for (var i = this.relativeXPosition - 1; i >= 0; i--) {
|
|
260
|
+
if (children[i] && children[i].point.visible) {
|
|
261
|
+
return children[i];
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* Get the node's first child (if it exists).
|
|
268
|
+
*
|
|
269
|
+
* @return {TreegraphNode|undefined}
|
|
270
|
+
* Node's first child which isn't hidden.
|
|
271
|
+
*/
|
|
272
|
+
TreegraphNode.prototype.getLeftMostChild = function () {
|
|
273
|
+
var children = this.children;
|
|
274
|
+
for (var i = 0; i < children.length; i++) {
|
|
275
|
+
if (children[i].point.visible) {
|
|
276
|
+
return children[i];
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* Get the node's last child (if it exists).
|
|
282
|
+
*
|
|
283
|
+
* @return {TreegraphNode|undefined}
|
|
284
|
+
* Node's last child which isn't hidden.
|
|
285
|
+
*/
|
|
286
|
+
TreegraphNode.prototype.getRightMostChild = function () {
|
|
287
|
+
var children = this.children;
|
|
288
|
+
for (var i = children.length - 1; i >= 0; i--) {
|
|
289
|
+
if (children[i].point.visible) {
|
|
290
|
+
return children[i];
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* Get the parent of current node or return undefined for root of the
|
|
296
|
+
* tree.
|
|
297
|
+
*
|
|
298
|
+
* @return {TreegraphNode|undefined}
|
|
299
|
+
* Node's parent or undefined for root.
|
|
300
|
+
*/
|
|
301
|
+
TreegraphNode.prototype.getParent = function () {
|
|
302
|
+
return this.parentNode;
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* Get node's first child which is not hidden.
|
|
306
|
+
*
|
|
307
|
+
* @return {TreegraphNode|undefined}
|
|
308
|
+
* First child.
|
|
309
|
+
*/
|
|
310
|
+
TreegraphNode.prototype.getFirstChild = function () {
|
|
311
|
+
var children = this.children;
|
|
312
|
+
for (var i = 0; i < children.length; i++) {
|
|
313
|
+
if (children[i].point.visible) {
|
|
314
|
+
return children[i];
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
return TreegraphNode;
|
|
319
|
+
}(TreemapNode));
|
|
320
|
+
/* *
|
|
321
|
+
*
|
|
322
|
+
* Default Export
|
|
323
|
+
*
|
|
324
|
+
* */
|
|
325
|
+
|
|
326
|
+
return TreegraphNode;
|
|
327
|
+
});
|
|
328
|
+
_registerModule(_modules, 'Series/Treegraph/TreegraphPoint.js', [_modules['Core/Series/Point.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (Point, SeriesRegistry, U) {
|
|
329
|
+
/* *
|
|
330
|
+
*
|
|
331
|
+
* (c) 2010-2022 Pawel Lysy Grzegorz Blachlinski
|
|
332
|
+
*
|
|
333
|
+
* License: www.highcharts.com/license
|
|
334
|
+
*
|
|
335
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
336
|
+
*
|
|
337
|
+
* */
|
|
338
|
+
var __extends = (this && this.__extends) || (function () {
|
|
339
|
+
var extendStatics = function (d,
|
|
340
|
+
b) {
|
|
341
|
+
extendStatics = Object.setPrototypeOf ||
|
|
342
|
+
({ __proto__: [] } instanceof Array && function (d,
|
|
343
|
+
b) { d.__proto__ = b; }) ||
|
|
344
|
+
function (d,
|
|
345
|
+
b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
346
|
+
return extendStatics(d, b);
|
|
347
|
+
};
|
|
348
|
+
return function (d, b) {
|
|
349
|
+
extendStatics(d, b);
|
|
350
|
+
function __() { this.constructor = d; }
|
|
351
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
352
|
+
};
|
|
353
|
+
})();
|
|
354
|
+
var TreemapPoint = SeriesRegistry.seriesTypes.treemap.prototype.pointClass;
|
|
355
|
+
var addEvent = U.addEvent,
|
|
356
|
+
fireEvent = U.fireEvent,
|
|
357
|
+
merge = U.merge,
|
|
358
|
+
pick = U.pick;
|
|
359
|
+
/* *
|
|
360
|
+
*
|
|
361
|
+
* Class
|
|
362
|
+
*
|
|
363
|
+
* */
|
|
364
|
+
/**
|
|
365
|
+
* @private
|
|
366
|
+
* @class
|
|
367
|
+
*/
|
|
368
|
+
var TreegraphPoint = /** @class */ (function (_super) {
|
|
369
|
+
__extends(TreegraphPoint, _super);
|
|
370
|
+
function TreegraphPoint() {
|
|
371
|
+
/* *
|
|
372
|
+
*
|
|
373
|
+
* Properties
|
|
374
|
+
*
|
|
375
|
+
* */
|
|
376
|
+
var _this = _super !== null && _super.apply(this,
|
|
377
|
+
arguments) || this;
|
|
378
|
+
_this.options = void 0;
|
|
379
|
+
_this.isLink = false;
|
|
380
|
+
_this.series = void 0;
|
|
381
|
+
_this.node = void 0;
|
|
382
|
+
return _this;
|
|
383
|
+
}
|
|
384
|
+
/* *
|
|
385
|
+
*
|
|
386
|
+
* Functions
|
|
387
|
+
*
|
|
388
|
+
* */
|
|
389
|
+
TreegraphPoint.prototype.draw = function () {
|
|
390
|
+
_super.prototype.draw.apply(this, arguments);
|
|
391
|
+
this.renderCollapseButton();
|
|
392
|
+
};
|
|
393
|
+
TreegraphPoint.prototype.renderCollapseButton = function () {
|
|
394
|
+
var point = this,
|
|
395
|
+
series = point.series,
|
|
396
|
+
parentGroup = point.graphic && point.graphic.parentGroup,
|
|
397
|
+
levelOptions = series.mapOptionsToLevel[point.node.level || 0] || {},
|
|
398
|
+
btnOptions = merge(series.options.collapseButton,
|
|
399
|
+
levelOptions.collapseButton,
|
|
400
|
+
point.series.options.collapseButton),
|
|
401
|
+
width = btnOptions.width,
|
|
402
|
+
height = btnOptions.height,
|
|
403
|
+
shape = btnOptions.shape,
|
|
404
|
+
style = btnOptions.style,
|
|
405
|
+
padding = 2,
|
|
406
|
+
chart = this.series.chart;
|
|
407
|
+
if (!point.shapeArgs) {
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
this.collapseButtonOptions = btnOptions;
|
|
411
|
+
if (!point.collapseButton) {
|
|
412
|
+
if (!point.node.children.length || !btnOptions.enabled) {
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
var _a = this.getCollapseBtnPosition(btnOptions),
|
|
416
|
+
x = _a.x,
|
|
417
|
+
y = _a.y;
|
|
418
|
+
point.collapseButton = chart.renderer
|
|
419
|
+
.label(point.collapsed ? '+' : '-', x, y, shape)
|
|
420
|
+
.attr({
|
|
421
|
+
height: height - 2 * padding,
|
|
422
|
+
width: width - 2 * padding,
|
|
423
|
+
padding: padding,
|
|
424
|
+
fill: "#cccccc" /* Palette.neutralColor20 */,
|
|
425
|
+
rotation: chart.inverted ? 90 : 0,
|
|
426
|
+
rotationOriginX: width / 2,
|
|
427
|
+
rotationOriginY: height / 2,
|
|
428
|
+
stroke: "#333333" /* Palette.neutralColor80 */,
|
|
429
|
+
'stroke-width': 1,
|
|
430
|
+
'text-align': 'center',
|
|
431
|
+
align: 'center',
|
|
432
|
+
zIndex: 1
|
|
433
|
+
})
|
|
434
|
+
.addClass('highcharts-tracker')
|
|
435
|
+
.addClass('highcharts-collapse-button')
|
|
436
|
+
.removeClass('highcharts-no-tooltip')
|
|
437
|
+
.css(style || {})
|
|
438
|
+
.add(parentGroup);
|
|
439
|
+
point.collapseButton.element.point = point;
|
|
440
|
+
if (btnOptions.onlyOnHover && !point.collapsed) {
|
|
441
|
+
point.collapseButton.hide();
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
else {
|
|
445
|
+
if (!point.node.children.length || !btnOptions.enabled) {
|
|
446
|
+
point.collapseButton.destroy();
|
|
447
|
+
delete point.collapseButton;
|
|
448
|
+
}
|
|
449
|
+
else {
|
|
450
|
+
var _b = this.getCollapseBtnPosition(btnOptions),
|
|
451
|
+
x = _b.x,
|
|
452
|
+
y = _b.y;
|
|
453
|
+
point.collapseButton
|
|
454
|
+
.attr({
|
|
455
|
+
text: point.collapsed ? '+' : '-',
|
|
456
|
+
rotation: chart.inverted ? 90 : 0,
|
|
457
|
+
rotationOriginX: width / 2,
|
|
458
|
+
rotationOriginY: height / 2,
|
|
459
|
+
visibility: point.visible &&
|
|
460
|
+
(!btnOptions.onlyOnHover ||
|
|
461
|
+
point.state === 'hover' ||
|
|
462
|
+
point.collapsed) ?
|
|
463
|
+
'inherit' :
|
|
464
|
+
'hidden'
|
|
465
|
+
})
|
|
466
|
+
.animate({ x: x, y: y });
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
TreegraphPoint.prototype.toggleCollapse = function (state) {
|
|
471
|
+
this.collapsed = pick(state, !this.collapsed);
|
|
472
|
+
fireEvent(this.series, 'toggleCollapse');
|
|
473
|
+
this.series.redraw();
|
|
474
|
+
};
|
|
475
|
+
TreegraphPoint.prototype.shouldDraw = function () {
|
|
476
|
+
return _super.prototype.shouldDraw.call(this) && this.visible;
|
|
477
|
+
};
|
|
478
|
+
TreegraphPoint.prototype.destroy = function () {
|
|
479
|
+
if (this.collapseButton) {
|
|
480
|
+
this.collapseButton.destroy();
|
|
481
|
+
delete this.collapseButton;
|
|
482
|
+
this.collapseButton = void 0;
|
|
483
|
+
}
|
|
484
|
+
_super.prototype.destroy.apply(this, arguments);
|
|
485
|
+
};
|
|
486
|
+
TreegraphPoint.prototype.getCollapseBtnPosition = function (btnOptions) {
|
|
487
|
+
var point = this,
|
|
488
|
+
chart = point.series.chart,
|
|
489
|
+
inverted = chart.inverted,
|
|
490
|
+
btnWidth = btnOptions.width,
|
|
491
|
+
btnHeight = btnOptions.height,
|
|
492
|
+
_a = point.shapeArgs || {},
|
|
493
|
+
_b = _a.x,
|
|
494
|
+
x = _b === void 0 ? 0 : _b,
|
|
495
|
+
_c = _a.y,
|
|
496
|
+
y = _c === void 0 ? 0 : _c,
|
|
497
|
+
_d = _a.width,
|
|
498
|
+
width = _d === void 0 ? 0 : _d,
|
|
499
|
+
_e = _a.height,
|
|
500
|
+
height = _e === void 0 ? 0 : _e;
|
|
501
|
+
return {
|
|
502
|
+
x: x +
|
|
503
|
+
btnOptions.x +
|
|
504
|
+
(inverted ? -btnHeight * 0.3 : width + btnWidth * -0.3),
|
|
505
|
+
y: y + height / 2 - btnHeight / 2 + btnOptions.y
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
TreegraphPoint.prototype.setState = function () {
|
|
509
|
+
Point.prototype.setState.apply(this, arguments);
|
|
510
|
+
};
|
|
511
|
+
return TreegraphPoint;
|
|
512
|
+
}(TreemapPoint));
|
|
513
|
+
addEvent(TreegraphPoint, 'mouseOut', function () {
|
|
514
|
+
var btn = this.collapseButton,
|
|
515
|
+
btnOptions = this.collapseButtonOptions;
|
|
516
|
+
if (btn && btnOptions && btnOptions.onlyOnHover && !this.collapsed) {
|
|
517
|
+
btn.hide();
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
addEvent(TreegraphPoint, 'mouseOver', function () {
|
|
521
|
+
if (this.collapseButton) {
|
|
522
|
+
this.collapseButton.show();
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
// Handle showing and hiding of the points
|
|
526
|
+
addEvent(TreegraphPoint, 'click', function () {
|
|
527
|
+
this.toggleCollapse();
|
|
528
|
+
});
|
|
529
|
+
/* *
|
|
530
|
+
*
|
|
531
|
+
* Export Default
|
|
532
|
+
*
|
|
533
|
+
* */
|
|
534
|
+
|
|
535
|
+
return TreegraphPoint;
|
|
536
|
+
});
|
|
537
|
+
_registerModule(_modules, 'Series/Treegraph/TreegraphLink.js', [_modules['Core/Series/Point.js'], _modules['Core/Utilities.js'], _modules['Core/Series/SeriesRegistry.js']], function (Point, U, SeriesRegistry) {
|
|
538
|
+
/* *
|
|
539
|
+
*
|
|
540
|
+
* (c) 2010-2022 Pawel Lysy Grzegorz Blachlinski
|
|
541
|
+
*
|
|
542
|
+
* License: www.highcharts.com/license
|
|
543
|
+
*
|
|
544
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
545
|
+
*
|
|
546
|
+
* */
|
|
547
|
+
var __extends = (this && this.__extends) || (function () {
|
|
548
|
+
var extendStatics = function (d,
|
|
549
|
+
b) {
|
|
550
|
+
extendStatics = Object.setPrototypeOf ||
|
|
551
|
+
({ __proto__: [] } instanceof Array && function (d,
|
|
552
|
+
b) { d.__proto__ = b; }) ||
|
|
553
|
+
function (d,
|
|
554
|
+
b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
555
|
+
return extendStatics(d, b);
|
|
556
|
+
};
|
|
557
|
+
return function (d, b) {
|
|
558
|
+
extendStatics(d, b);
|
|
559
|
+
function __() { this.constructor = d; }
|
|
560
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
561
|
+
};
|
|
562
|
+
})();
|
|
563
|
+
var pick = U.pick,
|
|
564
|
+
extend = U.extend;
|
|
565
|
+
var ColumnPoint = SeriesRegistry.seriesTypes.column.prototype.pointClass;
|
|
566
|
+
/* *
|
|
567
|
+
*
|
|
568
|
+
* Class
|
|
569
|
+
*
|
|
570
|
+
* */
|
|
571
|
+
/**
|
|
572
|
+
* @private
|
|
573
|
+
* @class
|
|
574
|
+
*/
|
|
575
|
+
var LinkPoint = /** @class */ (function (_super) {
|
|
576
|
+
__extends(LinkPoint, _super);
|
|
577
|
+
function LinkPoint() {
|
|
578
|
+
var _this = _super !== null && _super.apply(this,
|
|
579
|
+
arguments) || this;
|
|
580
|
+
/* *
|
|
581
|
+
*
|
|
582
|
+
* Class properties
|
|
583
|
+
*
|
|
584
|
+
* */
|
|
585
|
+
_this.isLink = true;
|
|
586
|
+
_this.node = {};
|
|
587
|
+
_this.formatPrefix = 'link';
|
|
588
|
+
_this.dataLabelOnNull = true;
|
|
589
|
+
return _this;
|
|
590
|
+
}
|
|
591
|
+
/* *
|
|
592
|
+
*
|
|
593
|
+
* Functions
|
|
594
|
+
*
|
|
595
|
+
* */
|
|
596
|
+
LinkPoint.prototype.init = function (series, options, x, point) {
|
|
597
|
+
var link = _super.prototype.init.apply(this,
|
|
598
|
+
arguments);
|
|
599
|
+
this.formatPrefix = 'link';
|
|
600
|
+
this.dataLabelOnNull = true;
|
|
601
|
+
if (point) {
|
|
602
|
+
link.fromNode = point.node.parentNode.point;
|
|
603
|
+
link.visible = point.visible;
|
|
604
|
+
link.toNode = point;
|
|
605
|
+
this.id = link.toNode.id + '-' + link.fromNode.id;
|
|
606
|
+
}
|
|
607
|
+
return link;
|
|
608
|
+
};
|
|
609
|
+
LinkPoint.prototype.update = function (options, redraw, animation, runEvent) {
|
|
610
|
+
var oldOptions = {
|
|
611
|
+
id: this.id,
|
|
612
|
+
formatPrefix: this.formatPrefix
|
|
613
|
+
};
|
|
614
|
+
Point.prototype.update.call(this, options, this.isLink ? false : redraw, // Hold the redraw for nodes
|
|
615
|
+
animation, runEvent);
|
|
616
|
+
this.visible = this.toNode.visible;
|
|
617
|
+
extend(this, oldOptions);
|
|
618
|
+
if (pick(redraw, true)) {
|
|
619
|
+
this.series.chart.redraw(animation);
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
return LinkPoint;
|
|
623
|
+
}(ColumnPoint));
|
|
624
|
+
/* *
|
|
625
|
+
*
|
|
626
|
+
* Export Default
|
|
627
|
+
*
|
|
628
|
+
* */
|
|
629
|
+
|
|
630
|
+
return LinkPoint;
|
|
631
|
+
});
|
|
632
|
+
_registerModule(_modules, 'Series/Treegraph/TreegraphLayout.js', [_modules['Series/Treegraph/TreegraphNode.js']], function (TreegraphNode) {
|
|
633
|
+
/* *
|
|
634
|
+
*
|
|
635
|
+
* (c) 2010-2022 Pawel Lysy Grzegorz Blachlinski
|
|
636
|
+
*
|
|
637
|
+
* License: www.highcharts.com/license
|
|
638
|
+
*
|
|
639
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
640
|
+
*
|
|
641
|
+
* */
|
|
642
|
+
/* *
|
|
643
|
+
*
|
|
644
|
+
* Class
|
|
645
|
+
*
|
|
646
|
+
* */
|
|
647
|
+
/**
|
|
648
|
+
* @private
|
|
649
|
+
* @class
|
|
650
|
+
*/
|
|
651
|
+
var TreegraphLayout = /** @class */ (function () {
|
|
652
|
+
function TreegraphLayout() {
|
|
653
|
+
}
|
|
654
|
+
/* *
|
|
655
|
+
*
|
|
656
|
+
* Functions
|
|
657
|
+
*
|
|
658
|
+
* */
|
|
659
|
+
/**
|
|
660
|
+
* Create dummy node, which allows to manually set the level of the node.
|
|
661
|
+
*
|
|
662
|
+
* @param {TreegraphNode} parent
|
|
663
|
+
* Parent node, to which the dummyNode should be connected.
|
|
664
|
+
* @param {TreegraphNode} child
|
|
665
|
+
* Child node, which should be connected to dummyNode.
|
|
666
|
+
* @param {number} gapSize
|
|
667
|
+
* Remainig gap size.
|
|
668
|
+
* @param {number} index
|
|
669
|
+
* The index of the link.
|
|
670
|
+
*
|
|
671
|
+
* @return {TreegraphNode}
|
|
672
|
+
* DummyNode as a parent of nodes, which column changes.
|
|
673
|
+
*/
|
|
674
|
+
TreegraphLayout.createDummyNode = function (parent, child, gapSize, index) {
|
|
675
|
+
// Initialise dummy node.
|
|
676
|
+
var dummyNode = new TreegraphNode();
|
|
677
|
+
dummyNode.id = parent.id + '-' + gapSize;
|
|
678
|
+
dummyNode.ancestor = parent;
|
|
679
|
+
// Add connection from new node to the previous points.
|
|
680
|
+
// First connection to itself.
|
|
681
|
+
dummyNode.children.push(child);
|
|
682
|
+
dummyNode.parent = parent.id;
|
|
683
|
+
dummyNode.parentNode = parent;
|
|
684
|
+
dummyNode.point = child.point;
|
|
685
|
+
dummyNode.level = child.level - gapSize;
|
|
686
|
+
dummyNode.relativeXPosition = child.relativeXPosition;
|
|
687
|
+
dummyNode.visible = child.visible;
|
|
688
|
+
// Then connection from parent to dummyNode.
|
|
689
|
+
parent.children[child.relativeXPosition] = dummyNode;
|
|
690
|
+
child.oldParentNode = parent;
|
|
691
|
+
child.relativeXPosition = 0;
|
|
692
|
+
// Then connection from child to dummyNode.
|
|
693
|
+
child.parentNode = dummyNode;
|
|
694
|
+
child.parent = dummyNode.id;
|
|
695
|
+
return dummyNode;
|
|
696
|
+
};
|
|
697
|
+
/**
|
|
698
|
+
* Walker algorithm of positioning the nodes in the treegraph improved by
|
|
699
|
+
* Buchheim to run in the linear time. Basic algorithm consists of post
|
|
700
|
+
* order traversal, which starts from going bottom up (first walk), and then
|
|
701
|
+
* pre order traversal top to bottom (second walk) where adding all of the
|
|
702
|
+
* modifiers is performed.
|
|
703
|
+
* link to the paper: http://dirk.jivas.de/papers/buchheim02improving.pdf
|
|
704
|
+
*
|
|
705
|
+
* @param {TreegraphSeries} series the Treegraph series
|
|
706
|
+
*/
|
|
707
|
+
TreegraphLayout.prototype.calculatePositions = function (series) {
|
|
708
|
+
var treeLayout = this;
|
|
709
|
+
var nodes = series.nodeList;
|
|
710
|
+
this.resetValues(nodes);
|
|
711
|
+
var root = series.tree;
|
|
712
|
+
if (root) {
|
|
713
|
+
treeLayout.calculateRelativeX(root, 0);
|
|
714
|
+
treeLayout.beforeLayout(nodes);
|
|
715
|
+
treeLayout.firstWalk(root);
|
|
716
|
+
treeLayout.secondWalk(root, -root.preX);
|
|
717
|
+
treeLayout.afterLayout(nodes);
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
/**
|
|
721
|
+
* Create dummyNodes as parents for nodes, which column is changed.
|
|
722
|
+
*
|
|
723
|
+
* @param {Array<TreegraphNode>} nodes
|
|
724
|
+
* All of the nodes.
|
|
725
|
+
*/
|
|
726
|
+
TreegraphLayout.prototype.beforeLayout = function (nodes) {
|
|
727
|
+
for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {
|
|
728
|
+
var node = nodes_1[_i];
|
|
729
|
+
var index = 0;
|
|
730
|
+
for (var _a = 0, _b = node.children; _a < _b.length; _a++) {
|
|
731
|
+
var child = _b[_a];
|
|
732
|
+
// Support for children placed in distant columns.
|
|
733
|
+
if (child && child.level - node.level > 1) {
|
|
734
|
+
// For further columns treat the nodes as a
|
|
735
|
+
// single parent-child pairs till the column is achieved.
|
|
736
|
+
var gapSize = child.level - node.level - 1;
|
|
737
|
+
// parent -> dummyNode -> child
|
|
738
|
+
while (gapSize > 0) {
|
|
739
|
+
child = TreegraphLayout.createDummyNode(node, child, gapSize, index);
|
|
740
|
+
gapSize--;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
++index;
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
};
|
|
747
|
+
/**
|
|
748
|
+
* Reset the caluclated values from the previous run.
|
|
749
|
+
* @param {TreegraphNode[]} nodes all of the nodes.
|
|
750
|
+
*/
|
|
751
|
+
TreegraphLayout.prototype.resetValues = function (nodes) {
|
|
752
|
+
for (var _i = 0, nodes_2 = nodes; _i < nodes_2.length; _i++) {
|
|
753
|
+
var node = nodes_2[_i];
|
|
754
|
+
node.mod = 0;
|
|
755
|
+
node.ancestor = node;
|
|
756
|
+
node.shift = 0;
|
|
757
|
+
node.thread = void 0;
|
|
758
|
+
node.change = 0;
|
|
759
|
+
node.preX = 0;
|
|
760
|
+
}
|
|
761
|
+
};
|
|
762
|
+
/**
|
|
763
|
+
* Assigns the value to each node, which indicates, what is his sibling
|
|
764
|
+
* number.
|
|
765
|
+
*
|
|
766
|
+
* @param {TreegraphNode} node
|
|
767
|
+
* Root node
|
|
768
|
+
* @param {number} index
|
|
769
|
+
* Index to which the nodes position should be set
|
|
770
|
+
*/
|
|
771
|
+
TreegraphLayout.prototype.calculateRelativeX = function (node, index) {
|
|
772
|
+
var treeLayout = this,
|
|
773
|
+
children = node.children;
|
|
774
|
+
for (var i = 0, iEnd = children.length; i < iEnd; ++i) {
|
|
775
|
+
treeLayout.calculateRelativeX(children[i], i);
|
|
776
|
+
}
|
|
777
|
+
node.relativeXPosition = index;
|
|
778
|
+
};
|
|
779
|
+
/**
|
|
780
|
+
* Recursive post order traversal of the tree, where the initial position
|
|
781
|
+
* of the nodes is calculated.
|
|
782
|
+
*
|
|
783
|
+
* @param {TreegraphNode} node
|
|
784
|
+
* The node for which the position should be calculated.
|
|
785
|
+
*/
|
|
786
|
+
TreegraphLayout.prototype.firstWalk = function (node) {
|
|
787
|
+
var treeLayout = this,
|
|
788
|
+
// Arbitrary value used to position nodes in respect to each other.
|
|
789
|
+
siblingDistance = 1;
|
|
790
|
+
var leftSibling;
|
|
791
|
+
// If the node is a leaf, set it's position based on the left siblings.
|
|
792
|
+
if (!node.hasChildren()) {
|
|
793
|
+
leftSibling = node.getLeftSibling();
|
|
794
|
+
if (leftSibling) {
|
|
795
|
+
node.preX = leftSibling.preX + siblingDistance;
|
|
796
|
+
node.mod = node.preX;
|
|
797
|
+
}
|
|
798
|
+
else {
|
|
799
|
+
node.preX = 0;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
else {
|
|
803
|
+
// If the node has children, perform the recursive first walk for
|
|
804
|
+
// its children, and then calculate its shift in the apportion
|
|
805
|
+
// function (most crucial part part of the algorythm).
|
|
806
|
+
var defaultAncestor = node.getLeftMostChild();
|
|
807
|
+
for (var _i = 0, _a = node.children; _i < _a.length; _i++) {
|
|
808
|
+
var child = _a[_i];
|
|
809
|
+
treeLayout.firstWalk(child);
|
|
810
|
+
defaultAncestor = treeLayout.apportion(child, defaultAncestor);
|
|
811
|
+
}
|
|
812
|
+
treeLayout.executeShifts(node);
|
|
813
|
+
var leftChild = node.getLeftMostChild(),
|
|
814
|
+
rightChild = node.getRightMostChild(),
|
|
815
|
+
// Set the position of the parent as a middle point of its
|
|
816
|
+
// children and move it by the value of the leftSibling (if it
|
|
817
|
+
// exists).
|
|
818
|
+
midPoint = (leftChild.preX + rightChild.preX) / 2;
|
|
819
|
+
leftSibling = node.getLeftSibling();
|
|
820
|
+
if (leftSibling) {
|
|
821
|
+
node.preX = leftSibling.preX + siblingDistance;
|
|
822
|
+
node.mod = node.preX - midPoint;
|
|
823
|
+
}
|
|
824
|
+
else {
|
|
825
|
+
node.preX = midPoint;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
};
|
|
829
|
+
/**
|
|
830
|
+
* Pre order traversal of the tree, which sets the final xPosition of the
|
|
831
|
+
* node as its preX value and sum of all if it's parents' modifiers.
|
|
832
|
+
*
|
|
833
|
+
* @param {TreegraphNode} node
|
|
834
|
+
* The node, for which the final position should be calculated.
|
|
835
|
+
* @param {number} modSum
|
|
836
|
+
* The sum of modifiers of all of the parents.
|
|
837
|
+
*/
|
|
838
|
+
TreegraphLayout.prototype.secondWalk = function (node, modSum) {
|
|
839
|
+
var treeLayout = this;
|
|
840
|
+
// When the chart is not inverted we want the tree to be positioned from
|
|
841
|
+
// left to right with root node close to the chart border, this is why
|
|
842
|
+
// x and y positions are switched.
|
|
843
|
+
node.yPosition = node.preX + modSum;
|
|
844
|
+
node.xPosition = node.level;
|
|
845
|
+
for (var _i = 0, _a = node.children; _i < _a.length; _i++) {
|
|
846
|
+
var child = _a[_i];
|
|
847
|
+
treeLayout.secondWalk(child, modSum + node.mod);
|
|
848
|
+
}
|
|
849
|
+
};
|
|
850
|
+
/**
|
|
851
|
+
* Shift all children of the current node from right to left.
|
|
852
|
+
*
|
|
853
|
+
* @param {TreegraphNode} node
|
|
854
|
+
* The parent node.
|
|
855
|
+
*/
|
|
856
|
+
TreegraphLayout.prototype.executeShifts = function (node) {
|
|
857
|
+
var shift = 0,
|
|
858
|
+
change = 0;
|
|
859
|
+
for (var i = node.children.length - 1; i >= 0; i--) {
|
|
860
|
+
var childNode = node.children[i];
|
|
861
|
+
childNode.preX += shift;
|
|
862
|
+
childNode.mod += shift;
|
|
863
|
+
change += childNode.change;
|
|
864
|
+
shift += childNode.shift + change;
|
|
865
|
+
}
|
|
866
|
+
};
|
|
867
|
+
/**
|
|
868
|
+
* The core of the algorithm. The new subtree is combined with the previous
|
|
869
|
+
* subtrees. Threads are used to traverse the inside and outside contours of
|
|
870
|
+
* the left and right subtree up to the highest common level. The vertecies
|
|
871
|
+
* are left(right)Int(Out)node where Int means internal and Out means
|
|
872
|
+
* outernal. For summing up the modifiers along the contour we use the
|
|
873
|
+
* `left(right)Int(Out)mod` variable. Whenever two nodes of the inside
|
|
874
|
+
* contours are in conflict we comute the left one of the greatest uncommon
|
|
875
|
+
* ancestors using the getAncestor function and we call the moveSubtree
|
|
876
|
+
* method to shift the subtree and prepare the shifts of smaller subrtees.
|
|
877
|
+
* Finally we add a new thread (if necessary) and we adjust ancestor of
|
|
878
|
+
* right outernal node or defaultAncestor.
|
|
879
|
+
*
|
|
880
|
+
* @param {TreegraphNode} node
|
|
881
|
+
* @param {TreegraphNode} defaultAncestor
|
|
882
|
+
* The default ancestor of the passed node.
|
|
883
|
+
*/
|
|
884
|
+
TreegraphLayout.prototype.apportion = function (node, defaultAncestor) {
|
|
885
|
+
var treeLayout = this,
|
|
886
|
+
leftSibling = node.getLeftSibling();
|
|
887
|
+
if (leftSibling) {
|
|
888
|
+
var rightIntNode = node,
|
|
889
|
+
rightOutNode = node,
|
|
890
|
+
leftIntNode = leftSibling,
|
|
891
|
+
leftOutNode = rightIntNode.getLeftMostSibling(),
|
|
892
|
+
rightIntMod = rightIntNode.mod,
|
|
893
|
+
rightOutMod = rightOutNode.mod,
|
|
894
|
+
leftIntMod = leftIntNode.mod,
|
|
895
|
+
leftOutMod = leftOutNode.mod;
|
|
896
|
+
while (leftIntNode &&
|
|
897
|
+
leftIntNode.nextRight() &&
|
|
898
|
+
rightIntNode &&
|
|
899
|
+
rightIntNode.nextLeft()) {
|
|
900
|
+
leftIntNode = leftIntNode.nextRight();
|
|
901
|
+
leftOutNode = leftOutNode.nextLeft();
|
|
902
|
+
rightIntNode = rightIntNode.nextLeft();
|
|
903
|
+
rightOutNode = rightOutNode.nextRight();
|
|
904
|
+
rightOutNode.ancestor = node;
|
|
905
|
+
var siblingDistance = 1,
|
|
906
|
+
shift = leftIntNode.preX +
|
|
907
|
+
leftIntMod -
|
|
908
|
+
(rightIntNode.preX + rightIntMod) +
|
|
909
|
+
siblingDistance;
|
|
910
|
+
if (shift > 0) {
|
|
911
|
+
treeLayout.moveSubtree(node.getAncestor(leftIntNode, defaultAncestor), node, shift);
|
|
912
|
+
rightIntMod += shift;
|
|
913
|
+
rightOutMod += shift;
|
|
914
|
+
}
|
|
915
|
+
leftIntMod += leftIntNode.mod;
|
|
916
|
+
rightIntMod += rightIntNode.mod;
|
|
917
|
+
leftOutMod += leftOutNode.mod;
|
|
918
|
+
rightOutMod += rightOutNode.mod;
|
|
919
|
+
}
|
|
920
|
+
if (leftIntNode &&
|
|
921
|
+
leftIntNode.nextRight() &&
|
|
922
|
+
!rightOutNode.nextRight()) {
|
|
923
|
+
rightOutNode.thread = leftIntNode.nextRight();
|
|
924
|
+
rightOutNode.mod += leftIntMod - rightOutMod;
|
|
925
|
+
}
|
|
926
|
+
if (rightIntNode &&
|
|
927
|
+
rightIntNode.nextLeft() &&
|
|
928
|
+
!leftOutNode.nextLeft()) {
|
|
929
|
+
leftOutNode.thread = rightIntNode.nextLeft();
|
|
930
|
+
leftOutNode.mod += rightIntMod - leftOutMod;
|
|
931
|
+
}
|
|
932
|
+
defaultAncestor = node;
|
|
933
|
+
}
|
|
934
|
+
return defaultAncestor;
|
|
935
|
+
};
|
|
936
|
+
/**
|
|
937
|
+
* Shifts the subtree from leftNode to rightNode.
|
|
938
|
+
*
|
|
939
|
+
* @param {TreegraphNode} leftNode
|
|
940
|
+
* @param {TreegraphNode} rightNode
|
|
941
|
+
* @param {number} shift
|
|
942
|
+
* The value, by which the subtree should be moved.
|
|
943
|
+
*/
|
|
944
|
+
TreegraphLayout.prototype.moveSubtree = function (leftNode, rightNode, shift) {
|
|
945
|
+
var subtrees = rightNode.relativeXPosition - leftNode.relativeXPosition;
|
|
946
|
+
rightNode.change -= shift / subtrees;
|
|
947
|
+
rightNode.shift += shift;
|
|
948
|
+
rightNode.preX += shift;
|
|
949
|
+
rightNode.mod += shift;
|
|
950
|
+
leftNode.change += shift / subtrees;
|
|
951
|
+
};
|
|
952
|
+
/**
|
|
953
|
+
* Clear values created in a beforeLayout.
|
|
954
|
+
*
|
|
955
|
+
* @param {TreegraphNode[]} nodes
|
|
956
|
+
* All of the nodes of the Treegraph Series.
|
|
957
|
+
*/
|
|
958
|
+
TreegraphLayout.prototype.afterLayout = function (nodes) {
|
|
959
|
+
for (var _i = 0, nodes_3 = nodes; _i < nodes_3.length; _i++) {
|
|
960
|
+
var node = nodes_3[_i];
|
|
961
|
+
if (node.oldParentNode) {
|
|
962
|
+
// Restore default connections
|
|
963
|
+
node.relativeXPosition = node.parentNode.relativeXPosition;
|
|
964
|
+
node.parent = node.oldParentNode.parent;
|
|
965
|
+
node.parentNode = node.oldParentNode;
|
|
966
|
+
// Delete dummyNode
|
|
967
|
+
delete node.oldParentNode.children[node.relativeXPosition];
|
|
968
|
+
node.oldParentNode.children[node.relativeXPosition] = node;
|
|
969
|
+
node.oldParentNode = void 0;
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
};
|
|
973
|
+
return TreegraphLayout;
|
|
974
|
+
}());
|
|
975
|
+
/* *
|
|
976
|
+
*
|
|
977
|
+
* Default Export
|
|
978
|
+
*
|
|
979
|
+
* */
|
|
980
|
+
|
|
981
|
+
return TreegraphLayout;
|
|
982
|
+
});
|
|
983
|
+
_registerModule(_modules, 'Series/Treegraph/TreegraphSeriesDefaults.js', [], function () {
|
|
984
|
+
/* *
|
|
985
|
+
*
|
|
986
|
+
* (c) 2010-2022 Pawel Lysy Grzegorz Blachlinski
|
|
987
|
+
*
|
|
988
|
+
* License: www.highcharts.com/license
|
|
989
|
+
*
|
|
990
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
991
|
+
*
|
|
992
|
+
* */
|
|
993
|
+
/* *
|
|
994
|
+
*
|
|
995
|
+
* Constants
|
|
996
|
+
*
|
|
997
|
+
* */
|
|
998
|
+
/**
|
|
999
|
+
* A treegraph series is a diagram, which shows a relation between ancestors
|
|
1000
|
+
* and descendants with a clear parent - child relation.
|
|
1001
|
+
* The best examples of the dataStructures, which best reflect this chart
|
|
1002
|
+
* are e.g. genealogy tree or directory structure.
|
|
1003
|
+
*
|
|
1004
|
+
* TODO change back the demo path
|
|
1005
|
+
* @sample highcharts/demo/treegraph-chart
|
|
1006
|
+
* Treegraph Chart
|
|
1007
|
+
*
|
|
1008
|
+
* @extends plotOptions.treemap
|
|
1009
|
+
* @excluding layoutAlgorithm, dashStyle, linecap, lineWidth,
|
|
1010
|
+
* negativeColor, threshold, zones, zoneAxis, colorAxis,
|
|
1011
|
+
* colorKey, compare, dataGrouping, endAgle, gapSize, gapUnit,
|
|
1012
|
+
* ignoreHiddenPoint, innerSize, joinBy, legendType, linecap,
|
|
1013
|
+
* minSize, navigatorOptions, pointRange, allowTraversingTree,
|
|
1014
|
+
* alternateStartingDirection, borderRadius, breadcrumbs,
|
|
1015
|
+
* interactByLeaf, layoutStartingDirection, levelIsConstant,
|
|
1016
|
+
* lineWidth, negativeColor, nodes, sortIndex, zoneAxis,
|
|
1017
|
+
* zones
|
|
1018
|
+
*
|
|
1019
|
+
* @product highcharts
|
|
1020
|
+
* @since 10.3.0
|
|
1021
|
+
* @requires modules/treemap.js
|
|
1022
|
+
* @requires modules/treegraph.js
|
|
1023
|
+
* @optionparent plotOptions.treegraph
|
|
1024
|
+
*/
|
|
1025
|
+
var TreegraphSeriesDefaults = {
|
|
1026
|
+
/**
|
|
1027
|
+
* Flips the positions of the nodes of a treegraph along the
|
|
1028
|
+
* horizontal axis (vertical if chart is inverted).
|
|
1029
|
+
*
|
|
1030
|
+
* @sample highcharts/series-treegraph/reversed-nodes
|
|
1031
|
+
* Treegraph series with reversed nodes.
|
|
1032
|
+
*
|
|
1033
|
+
* @type {boolean}
|
|
1034
|
+
* @default false
|
|
1035
|
+
* @product highcharts
|
|
1036
|
+
* @since 10.3.0
|
|
1037
|
+
*/
|
|
1038
|
+
reversed: false,
|
|
1039
|
+
/**
|
|
1040
|
+
* @extends plotOptions.series.marker
|
|
1041
|
+
* @excluding enabled,
|
|
1042
|
+
enabledThreshold
|
|
1043
|
+
*/
|
|
1044
|
+
marker: {
|
|
1045
|
+
radius: 10,
|
|
1046
|
+
lineWidth: 0,
|
|
1047
|
+
symbol: 'circle',
|
|
1048
|
+
fillOpacity: 1,
|
|
1049
|
+
states: {}
|
|
1050
|
+
},
|
|
1051
|
+
link: {
|
|
1052
|
+
/**
|
|
1053
|
+
* Modifier of the shape of the curved link. Works best for
|
|
1054
|
+
* values between 0 and 1,
|
|
1055
|
+
where 0 is a straight line,
|
|
1056
|
+
and 1 is
|
|
1057
|
+
* a shape close to the default one.
|
|
1058
|
+
*
|
|
1059
|
+
* @type {number}
|
|
1060
|
+
* @default 0.5
|
|
1061
|
+
* @product highcharts
|
|
1062
|
+
* @since 10.3.0
|
|
1063
|
+
* @apioption series.treegraph.link.curveFactor
|
|
1064
|
+
*/
|
|
1065
|
+
/**
|
|
1066
|
+
* The color of the links between nodes.
|
|
1067
|
+
*
|
|
1068
|
+
* @type {Highcharts.ColorString}
|
|
1069
|
+
* @private
|
|
1070
|
+
*/
|
|
1071
|
+
color: "#666666" /* Palette.neutralColor60 */,
|
|
1072
|
+
/**
|
|
1073
|
+
* The line width of the links connecting nodes,
|
|
1074
|
+
in pixels.
|
|
1075
|
+
* @type {number}
|
|
1076
|
+
*
|
|
1077
|
+
* @private
|
|
1078
|
+
*/
|
|
1079
|
+
lineWidth: 1,
|
|
1080
|
+
/**
|
|
1081
|
+
* Radius for the rounded corners of the links between nodes.
|
|
1082
|
+
* Works for `default` link type.
|
|
1083
|
+
*
|
|
1084
|
+
* @private
|
|
1085
|
+
*/
|
|
1086
|
+
radius: 10,
|
|
1087
|
+
cursor: 'default',
|
|
1088
|
+
/**
|
|
1089
|
+
* Type of the link shape.
|
|
1090
|
+
*
|
|
1091
|
+
* @sample highcharts/series-treegraph/link-types
|
|
1092
|
+
* Different link types
|
|
1093
|
+
*
|
|
1094
|
+
* @type {'default' | 'curved' | 'straight'}
|
|
1095
|
+
* @product highcharts
|
|
1096
|
+
*
|
|
1097
|
+
*/
|
|
1098
|
+
type: 'curved'
|
|
1099
|
+
},
|
|
1100
|
+
/**
|
|
1101
|
+
* Options applied to collapse Button. The collape button is the
|
|
1102
|
+
* small button which indicates,
|
|
1103
|
+
that the node is collapsable.
|
|
1104
|
+
*/
|
|
1105
|
+
collapseButton: {
|
|
1106
|
+
/**
|
|
1107
|
+
* Whether the button should be visible only when the node is
|
|
1108
|
+
* hovered. When set to true,
|
|
1109
|
+
the button is hidden for nodes,
|
|
1110
|
+
* which are not collapsed,
|
|
1111
|
+
and shown for the collapsed ones.
|
|
1112
|
+
*/
|
|
1113
|
+
onlyOnHover: true,
|
|
1114
|
+
/**
|
|
1115
|
+
* Whether the button should be visible.
|
|
1116
|
+
*/
|
|
1117
|
+
enabled: true,
|
|
1118
|
+
/**
|
|
1119
|
+
* Offset of the button in the x direction.
|
|
1120
|
+
*/
|
|
1121
|
+
x: 0,
|
|
1122
|
+
/**
|
|
1123
|
+
* Offset of the button in the y direction.
|
|
1124
|
+
*/
|
|
1125
|
+
y: 0,
|
|
1126
|
+
/**
|
|
1127
|
+
* Height of the button.
|
|
1128
|
+
*/
|
|
1129
|
+
height: 10,
|
|
1130
|
+
/**
|
|
1131
|
+
* Width of the button.
|
|
1132
|
+
*/
|
|
1133
|
+
width: 10,
|
|
1134
|
+
/**
|
|
1135
|
+
* The symbol of the collapse button.
|
|
1136
|
+
*/
|
|
1137
|
+
shape: 'circle'
|
|
1138
|
+
/**
|
|
1139
|
+
* CSS styles for the collapse button.
|
|
1140
|
+
*
|
|
1141
|
+
* In styled mode,
|
|
1142
|
+
the collapse button style is given in the
|
|
1143
|
+
* `.highcharts-collapse-button` class.
|
|
1144
|
+
*
|
|
1145
|
+
*
|
|
1146
|
+
* @type {Highcharts.CSSObject}
|
|
1147
|
+
* @apioption series.treegraph.collapseButton.style
|
|
1148
|
+
*/
|
|
1149
|
+
},
|
|
1150
|
+
/**
|
|
1151
|
+
* @extends plotOptions.series.tooltip
|
|
1152
|
+
*/
|
|
1153
|
+
tooltip: {
|
|
1154
|
+
/**
|
|
1155
|
+
* The HTML of the point's line in the tooltip. Variables are
|
|
1156
|
+
* enclosed by curly brackets. Available variables are
|
|
1157
|
+
* `point.id`,
|
|
1158
|
+
`point.fromNode.id`,
|
|
1159
|
+
`point.toNode.id`,
|
|
1160
|
+
* `series.name`,
|
|
1161
|
+
`series.color` and other properties on the
|
|
1162
|
+
* same form. Furthermore,
|
|
1163
|
+
This can also be overridden for each
|
|
1164
|
+
* series,
|
|
1165
|
+
which makes it a good hook for displaying units. In
|
|
1166
|
+
* styled mode,
|
|
1167
|
+
the dot is colored by a class name rather than
|
|
1168
|
+
* the point color.
|
|
1169
|
+
*
|
|
1170
|
+
* @type {string}
|
|
1171
|
+
* @since 10.3.0
|
|
1172
|
+
* @product highcharts
|
|
1173
|
+
*/
|
|
1174
|
+
linkFormat: '{point.fromNode.id} \u2192 {point.toNode.id}',
|
|
1175
|
+
pointFormat: '{point.id}'
|
|
1176
|
+
/**
|
|
1177
|
+
* A callback function for formatting the HTML output for a
|
|
1178
|
+
* single link in the tooltip. Like the `linkFormat` string,
|
|
1179
|
+
* but with more flexibility.
|
|
1180
|
+
*
|
|
1181
|
+
* @type {Highcharts.FormatterCallbackFunction.<Highcharts.Point>}
|
|
1182
|
+
* @apioption series.treegraph.tooltip.linkFormatter
|
|
1183
|
+
*
|
|
1184
|
+
*/
|
|
1185
|
+
},
|
|
1186
|
+
/**
|
|
1187
|
+
* Options for the data labels appearing on top of the nodes and
|
|
1188
|
+
* links. For treegraph charts,
|
|
1189
|
+
data labels are visible for the
|
|
1190
|
+
* nodes by default,
|
|
1191
|
+
but hidden for links. This is controlled by
|
|
1192
|
+
* modifying the `nodeFormat`,
|
|
1193
|
+
and the `format` that applies to
|
|
1194
|
+
* links and is an empty string by default.
|
|
1195
|
+
*
|
|
1196
|
+
* @declare Highcharts.SeriesTreegraphDataLabelsOptionsObject
|
|
1197
|
+
*/
|
|
1198
|
+
dataLabels: {
|
|
1199
|
+
/**
|
|
1200
|
+
* Options for a _link_ label text which should follow link
|
|
1201
|
+
* connection. Border and background are disabled for a label
|
|
1202
|
+
* that follows a path.
|
|
1203
|
+
*
|
|
1204
|
+
* **Note:** Only SVG-based renderer supports this option.
|
|
1205
|
+
* Setting `useHTML` to true will disable this option.
|
|
1206
|
+
*
|
|
1207
|
+
* @sample highcharts/series-treegraph/link-text-path
|
|
1208
|
+
* Treegraph series with link text path dataLabels.
|
|
1209
|
+
*
|
|
1210
|
+
* @extends plotOptions.treegraph.dataLabels.linkTextPath
|
|
1211
|
+
* @since 10.3.0
|
|
1212
|
+
*/
|
|
1213
|
+
linkTextPath: {
|
|
1214
|
+
attributes: {
|
|
1215
|
+
startOffset: '50%'
|
|
1216
|
+
}
|
|
1217
|
+
},
|
|
1218
|
+
enabled: true,
|
|
1219
|
+
linkFormatter: function () { return ''; },
|
|
1220
|
+
formatter: function () {
|
|
1221
|
+
return this.point.id;
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
};
|
|
1225
|
+
/* *
|
|
1226
|
+
*
|
|
1227
|
+
* Default Export
|
|
1228
|
+
*
|
|
1229
|
+
* */
|
|
1230
|
+
|
|
1231
|
+
return TreegraphSeriesDefaults;
|
|
1232
|
+
});
|
|
1233
|
+
_registerModule(_modules, 'Series/Treegraph/TreegraphSeries.js', [_modules['Series/PathUtilities.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Series/Treegraph/TreegraphNode.js'], _modules['Series/Treegraph/TreegraphPoint.js'], _modules['Series/TreeUtilities.js'], _modules['Core/Utilities.js'], _modules['Series/Treegraph/TreegraphLink.js'], _modules['Series/Treegraph/TreegraphLayout.js'], _modules['Series/Treegraph/TreegraphSeriesDefaults.js']], function (PU, SeriesRegistry, SVGRenderer, TreegraphNode, TreegraphPoint, TU, U, TreegraphLink, TreegraphLayout, TreegraphSeriesDefaults) {
|
|
1234
|
+
/* *
|
|
1235
|
+
*
|
|
1236
|
+
* (c) 2010-2022 Pawel Lysy Grzegorz Blachlinski
|
|
1237
|
+
*
|
|
1238
|
+
* License: www.highcharts.com/license
|
|
1239
|
+
*
|
|
1240
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
1241
|
+
*
|
|
1242
|
+
* */
|
|
1243
|
+
var __extends = (this && this.__extends) || (function () {
|
|
1244
|
+
var extendStatics = function (d,
|
|
1245
|
+
b) {
|
|
1246
|
+
extendStatics = Object.setPrototypeOf ||
|
|
1247
|
+
({ __proto__: [] } instanceof Array && function (d,
|
|
1248
|
+
b) { d.__proto__ = b; }) ||
|
|
1249
|
+
function (d,
|
|
1250
|
+
b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1251
|
+
return extendStatics(d, b);
|
|
1252
|
+
};
|
|
1253
|
+
return function (d, b) {
|
|
1254
|
+
extendStatics(d, b);
|
|
1255
|
+
function __() { this.constructor = d; }
|
|
1256
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1257
|
+
};
|
|
1258
|
+
})();
|
|
1259
|
+
var curvedPath = PU.curvedPath;
|
|
1260
|
+
var seriesProto = SeriesRegistry.series.prototype,
|
|
1261
|
+
_a = SeriesRegistry.seriesTypes,
|
|
1262
|
+
TreemapSeries = _a.treemap,
|
|
1263
|
+
ColumnSeries = _a.column;
|
|
1264
|
+
var symbols = SVGRenderer.prototype.symbols;
|
|
1265
|
+
var getLevelOptions = TU.getLevelOptions;
|
|
1266
|
+
var extend = U.extend,
|
|
1267
|
+
isArray = U.isArray,
|
|
1268
|
+
merge = U.merge,
|
|
1269
|
+
pick = U.pick,
|
|
1270
|
+
relativeLength = U.relativeLength;
|
|
1271
|
+
/* *
|
|
1272
|
+
*
|
|
1273
|
+
* Class
|
|
1274
|
+
*
|
|
1275
|
+
* */
|
|
1276
|
+
/**
|
|
1277
|
+
* The Treegraph series type.
|
|
1278
|
+
*
|
|
1279
|
+
* @private
|
|
1280
|
+
* @class
|
|
1281
|
+
* @name Highcharts.seriesTypes.treegraph
|
|
1282
|
+
*
|
|
1283
|
+
* @augments Highcharts.Series
|
|
1284
|
+
*/
|
|
1285
|
+
var TreegraphSeries = /** @class */ (function (_super) {
|
|
1286
|
+
__extends(TreegraphSeries, _super);
|
|
1287
|
+
function TreegraphSeries() {
|
|
1288
|
+
/* *
|
|
1289
|
+
*
|
|
1290
|
+
* Static Properties
|
|
1291
|
+
*
|
|
1292
|
+
* */
|
|
1293
|
+
var _this = _super !== null && _super.apply(this,
|
|
1294
|
+
arguments) || this;
|
|
1295
|
+
/* *
|
|
1296
|
+
*
|
|
1297
|
+
* Properties
|
|
1298
|
+
*
|
|
1299
|
+
* */
|
|
1300
|
+
_this.data = void 0;
|
|
1301
|
+
_this.options = void 0;
|
|
1302
|
+
_this.points = void 0;
|
|
1303
|
+
_this.layoutModifier = void 0;
|
|
1304
|
+
_this.nodeMap = void 0;
|
|
1305
|
+
_this.tree = void 0;
|
|
1306
|
+
_this.nodeList = [];
|
|
1307
|
+
_this.layoutAlgorythm = void 0;
|
|
1308
|
+
_this.links = [];
|
|
1309
|
+
_this.mapOptionsToLevel = void 0;
|
|
1310
|
+
return _this;
|
|
1311
|
+
}
|
|
1312
|
+
/* *
|
|
1313
|
+
*
|
|
1314
|
+
* Functions
|
|
1315
|
+
*
|
|
1316
|
+
* */
|
|
1317
|
+
TreegraphSeries.prototype.init = function () {
|
|
1318
|
+
_super.prototype.init.apply(this, arguments);
|
|
1319
|
+
this.layoutAlgorythm = new TreegraphLayout();
|
|
1320
|
+
};
|
|
1321
|
+
/**
|
|
1322
|
+
* Calculate `a` and `b` parameters of linear transformation, where
|
|
1323
|
+
* `finalPosition = a * calculatedPosition + b`.
|
|
1324
|
+
*
|
|
1325
|
+
* @return {LayoutModifiers} `a` and `b` parameter for x and y direction.
|
|
1326
|
+
*/
|
|
1327
|
+
TreegraphSeries.prototype.getLayoutModifiers = function () {
|
|
1328
|
+
var _this = this;
|
|
1329
|
+
var chart = this.chart,
|
|
1330
|
+
series = this,
|
|
1331
|
+
plotSizeX = chart.plotSizeX,
|
|
1332
|
+
plotSizeY = chart.plotSizeY;
|
|
1333
|
+
var minX = Infinity,
|
|
1334
|
+
maxX = -Infinity,
|
|
1335
|
+
minY = Infinity,
|
|
1336
|
+
maxY = -Infinity,
|
|
1337
|
+
maxXSize = 0,
|
|
1338
|
+
minXSize = 0,
|
|
1339
|
+
maxYSize = 0,
|
|
1340
|
+
minYSize = 0;
|
|
1341
|
+
this.points.forEach(function (point) {
|
|
1342
|
+
var node = point.node,
|
|
1343
|
+
level = series.mapOptionsToLevel[point.node.level] || {},
|
|
1344
|
+
markerOptions = merge(_this.options.marker,
|
|
1345
|
+
level.marker,
|
|
1346
|
+
point.options.marker),
|
|
1347
|
+
radius = relativeLength(markerOptions.radius || 0,
|
|
1348
|
+
Math.min(plotSizeX,
|
|
1349
|
+
plotSizeY)),
|
|
1350
|
+
symbol = markerOptions.symbol,
|
|
1351
|
+
nodeSizeY = (symbol === 'circle' || !markerOptions.height) ?
|
|
1352
|
+
radius * 2 :
|
|
1353
|
+
relativeLength(markerOptions.height,
|
|
1354
|
+
plotSizeY),
|
|
1355
|
+
nodeSizeX = symbol === 'circle' || !markerOptions.width ?
|
|
1356
|
+
radius * 2 :
|
|
1357
|
+
relativeLength(markerOptions.width,
|
|
1358
|
+
plotSizeX);
|
|
1359
|
+
node.nodeSizeX = nodeSizeX;
|
|
1360
|
+
node.nodeSizeY = nodeSizeY;
|
|
1361
|
+
var lineWidth;
|
|
1362
|
+
if (node.xPosition <= minX) {
|
|
1363
|
+
minX = node.xPosition;
|
|
1364
|
+
lineWidth = markerOptions.lineWidth || 0;
|
|
1365
|
+
minXSize = Math.max(nodeSizeX + lineWidth, minXSize);
|
|
1366
|
+
}
|
|
1367
|
+
if (node.xPosition >= maxX) {
|
|
1368
|
+
maxX = node.xPosition;
|
|
1369
|
+
lineWidth = markerOptions.lineWidth || 0;
|
|
1370
|
+
maxXSize = Math.max(nodeSizeX + lineWidth, maxXSize);
|
|
1371
|
+
}
|
|
1372
|
+
if (node.yPosition <= minY) {
|
|
1373
|
+
minY = node.yPosition;
|
|
1374
|
+
lineWidth = markerOptions.lineWidth || 0;
|
|
1375
|
+
minYSize = Math.max(nodeSizeY + lineWidth, minYSize);
|
|
1376
|
+
}
|
|
1377
|
+
if (node.yPosition >= maxY) {
|
|
1378
|
+
maxY = node.yPosition;
|
|
1379
|
+
lineWidth = markerOptions.lineWidth || 0;
|
|
1380
|
+
maxYSize = Math.max(nodeSizeY + lineWidth, maxYSize);
|
|
1381
|
+
}
|
|
1382
|
+
});
|
|
1383
|
+
// Calculate the values of linear transformation, which will later be
|
|
1384
|
+
// applied as `nodePosition = a * x + b` for each direction.
|
|
1385
|
+
var ay = maxY === minY ?
|
|
1386
|
+
1 :
|
|
1387
|
+
(plotSizeY - (minYSize + maxYSize) / 2) / (maxY - minY),
|
|
1388
|
+
by = maxY === minY ? plotSizeY / 2 : -ay * minY + minYSize / 2,
|
|
1389
|
+
ax = maxX === minX ?
|
|
1390
|
+
1 :
|
|
1391
|
+
(plotSizeX - (maxXSize + maxXSize) / 2) / (maxX - minX),
|
|
1392
|
+
bx = maxX === minX ? plotSizeX / 2 : -ax * minX + minXSize / 2;
|
|
1393
|
+
return { ax: ax, bx: bx, ay: ay, by: by };
|
|
1394
|
+
};
|
|
1395
|
+
TreegraphSeries.prototype.getLinks = function () {
|
|
1396
|
+
var series = this;
|
|
1397
|
+
var links = [];
|
|
1398
|
+
this.data.forEach(function (point, index) {
|
|
1399
|
+
var levelOptions = series.mapOptionsToLevel[point.node.level || 0] || {};
|
|
1400
|
+
if (point.node.parent) {
|
|
1401
|
+
var pointOptions = merge(levelOptions,
|
|
1402
|
+
point.options);
|
|
1403
|
+
if (!point.linkToParent || !point.linkToParent.update) {
|
|
1404
|
+
var link = new series.LinkClass().init(series,
|
|
1405
|
+
pointOptions,
|
|
1406
|
+
void 0,
|
|
1407
|
+
point);
|
|
1408
|
+
point.linkToParent = link;
|
|
1409
|
+
}
|
|
1410
|
+
else {
|
|
1411
|
+
point.linkToParent.update(pointOptions, false);
|
|
1412
|
+
}
|
|
1413
|
+
point.linkToParent.index = links.push(point.linkToParent) - 1;
|
|
1414
|
+
}
|
|
1415
|
+
else {
|
|
1416
|
+
if (point.linkToParent) {
|
|
1417
|
+
series.links.splice(point.linkToParent.index);
|
|
1418
|
+
point.linkToParent.destroy();
|
|
1419
|
+
delete point.linkToParent;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
});
|
|
1423
|
+
return links;
|
|
1424
|
+
};
|
|
1425
|
+
TreegraphSeries.prototype.buildTree = function (id, index, level, list, parent) {
|
|
1426
|
+
var point = this.points[index];
|
|
1427
|
+
level = (point && point.level) || level;
|
|
1428
|
+
return _super.prototype.buildTree.call(this, id, index, level, list, parent);
|
|
1429
|
+
};
|
|
1430
|
+
TreegraphSeries.prototype.setCollapsedStatus = function (node, visibility) {
|
|
1431
|
+
var _this = this;
|
|
1432
|
+
var point = node.point;
|
|
1433
|
+
if (point) {
|
|
1434
|
+
// Take the level options into account.
|
|
1435
|
+
point.collapsed = pick(point.collapsed, (this.mapOptionsToLevel[node.level] || {}).collapsed);
|
|
1436
|
+
point.visible = visibility;
|
|
1437
|
+
visibility = visibility === false ? false : !point.collapsed;
|
|
1438
|
+
}
|
|
1439
|
+
node.children.forEach(function (childNode) {
|
|
1440
|
+
_this.setCollapsedStatus(childNode, visibility);
|
|
1441
|
+
});
|
|
1442
|
+
};
|
|
1443
|
+
/**
|
|
1444
|
+
* Run pre-translation by generating the nodeColumns.
|
|
1445
|
+
* @private
|
|
1446
|
+
*/
|
|
1447
|
+
TreegraphSeries.prototype.translate = function () {
|
|
1448
|
+
var _this = this;
|
|
1449
|
+
var series = this,
|
|
1450
|
+
options = series.options;
|
|
1451
|
+
// NOTE: updateRootId modifies series.
|
|
1452
|
+
var rootId = TU.updateRootId(series),
|
|
1453
|
+
rootNode;
|
|
1454
|
+
// Call prototype function
|
|
1455
|
+
seriesProto.translate.call(series);
|
|
1456
|
+
var tree = series.tree = series.getTree();
|
|
1457
|
+
rootNode = series.nodeMap[rootId];
|
|
1458
|
+
if (rootId !== '' && (!rootNode || !rootNode.children.length)) {
|
|
1459
|
+
series.setRootNode('', false);
|
|
1460
|
+
rootId = series.rootNode;
|
|
1461
|
+
rootNode = series.nodeMap[rootId];
|
|
1462
|
+
}
|
|
1463
|
+
series.mapOptionsToLevel = getLevelOptions({
|
|
1464
|
+
from: rootNode.level + 1,
|
|
1465
|
+
levels: options.levels,
|
|
1466
|
+
to: tree.height,
|
|
1467
|
+
defaults: {
|
|
1468
|
+
levelIsConstant: series.options.levelIsConstant,
|
|
1469
|
+
colorByPoint: options.colorByPoint
|
|
1470
|
+
}
|
|
1471
|
+
});
|
|
1472
|
+
this.setCollapsedStatus(tree, true);
|
|
1473
|
+
series.links = series.getLinks();
|
|
1474
|
+
series.setTreeValues(tree);
|
|
1475
|
+
this.layoutAlgorythm.calculatePositions(series);
|
|
1476
|
+
series.layoutModifier = this.getLayoutModifiers();
|
|
1477
|
+
this.points.forEach(function (point) {
|
|
1478
|
+
_this.translateNode(point);
|
|
1479
|
+
});
|
|
1480
|
+
this.points.forEach(function (point) {
|
|
1481
|
+
if (point.linkToParent) {
|
|
1482
|
+
_this.translateLink(point.linkToParent);
|
|
1483
|
+
}
|
|
1484
|
+
});
|
|
1485
|
+
};
|
|
1486
|
+
TreegraphSeries.prototype.translateLink = function (link) {
|
|
1487
|
+
var fromNode = link.fromNode,
|
|
1488
|
+
toNode = link.toNode,
|
|
1489
|
+
linkWidth = this.options.link.lineWidth,
|
|
1490
|
+
crisp = (Math.round(linkWidth) % 2) / 2,
|
|
1491
|
+
factor = pick(this.options.link.curveFactor, 0.5),
|
|
1492
|
+
type = pick(link.options.link && link.options.link.type,
|
|
1493
|
+
this.options.link.type);
|
|
1494
|
+
if (fromNode.shapeArgs && toNode.shapeArgs) {
|
|
1495
|
+
var fromNodeWidth = (fromNode.shapeArgs.width || 0),
|
|
1496
|
+
inverted = this.chart.inverted,
|
|
1497
|
+
y1 = Math.floor((fromNode.shapeArgs.y || 0) +
|
|
1498
|
+
(fromNode.shapeArgs.height || 0) / 2) + crisp,
|
|
1499
|
+
y2 = Math.floor((toNode.shapeArgs.y || 0) +
|
|
1500
|
+
(toNode.shapeArgs.height || 0) / 2) + crisp;
|
|
1501
|
+
var x1 = Math.floor((fromNode.shapeArgs.x || 0) + fromNodeWidth) +
|
|
1502
|
+
crisp,
|
|
1503
|
+
x2 = Math.floor(toNode.shapeArgs.x || 0) + crisp;
|
|
1504
|
+
if (inverted) {
|
|
1505
|
+
x1 -= fromNodeWidth;
|
|
1506
|
+
x2 += (toNode.shapeArgs.width || 0);
|
|
1507
|
+
}
|
|
1508
|
+
var diff = toNode.node.xPosition - fromNode.node.xPosition;
|
|
1509
|
+
link.shapeType = 'path';
|
|
1510
|
+
var fullWidth = Math.abs(x2 - x1) + fromNodeWidth,
|
|
1511
|
+
width = (fullWidth / diff) - fromNodeWidth,
|
|
1512
|
+
offset = width * factor * (inverted ? -1 : 1);
|
|
1513
|
+
var xMiddle = Math.floor((x2 + x1) / 2) + crisp;
|
|
1514
|
+
link.plotX = xMiddle;
|
|
1515
|
+
link.plotY = y2;
|
|
1516
|
+
if (type === 'straight') {
|
|
1517
|
+
link.shapeArgs = {
|
|
1518
|
+
d: [
|
|
1519
|
+
['M', x1, y1],
|
|
1520
|
+
['L', x1 + width * (inverted ? -1 : 1), y2],
|
|
1521
|
+
['L', x2, y2]
|
|
1522
|
+
]
|
|
1523
|
+
};
|
|
1524
|
+
}
|
|
1525
|
+
else if (type === 'curved') {
|
|
1526
|
+
link.shapeArgs = {
|
|
1527
|
+
d: [
|
|
1528
|
+
['M', x1, y1],
|
|
1529
|
+
[
|
|
1530
|
+
'C',
|
|
1531
|
+
x1 + offset,
|
|
1532
|
+
y1,
|
|
1533
|
+
x1 - offset + width * (inverted ? -1 : 1),
|
|
1534
|
+
y2,
|
|
1535
|
+
x1 + width * (inverted ? -1 : 1),
|
|
1536
|
+
y2
|
|
1537
|
+
],
|
|
1538
|
+
['L', x2, y2]
|
|
1539
|
+
]
|
|
1540
|
+
};
|
|
1541
|
+
}
|
|
1542
|
+
else {
|
|
1543
|
+
link.shapeArgs = {
|
|
1544
|
+
d: curvedPath([
|
|
1545
|
+
['M', x1, y1],
|
|
1546
|
+
['L', x1 + width * (inverted ? -0.5 : 0.5), y1],
|
|
1547
|
+
['L', x1 + width * (inverted ? -0.5 : 0.5), y2],
|
|
1548
|
+
['L', x2, y2]
|
|
1549
|
+
], this.options.link.radius)
|
|
1550
|
+
};
|
|
1551
|
+
}
|
|
1552
|
+
link.dlBox = {
|
|
1553
|
+
x: (x1 + x2) / 2,
|
|
1554
|
+
y: (y1 + y2) / 2,
|
|
1555
|
+
height: linkWidth,
|
|
1556
|
+
width: 0
|
|
1557
|
+
};
|
|
1558
|
+
link.tooltipPos = inverted ? [
|
|
1559
|
+
(this.chart.plotSizeY || 0) - link.dlBox.y,
|
|
1560
|
+
(this.chart.plotSizeX || 0) - link.dlBox.x
|
|
1561
|
+
] : [
|
|
1562
|
+
link.dlBox.x,
|
|
1563
|
+
link.dlBox.y
|
|
1564
|
+
];
|
|
1565
|
+
}
|
|
1566
|
+
};
|
|
1567
|
+
/**
|
|
1568
|
+
* Private method responsible for adjusting the dataLabel options for each
|
|
1569
|
+
* node-point individually.
|
|
1570
|
+
*/
|
|
1571
|
+
TreegraphSeries.prototype.drawNodeLabels = function (points) {
|
|
1572
|
+
var series = this,
|
|
1573
|
+
mapOptionsToLevel = series.mapOptionsToLevel;
|
|
1574
|
+
var options,
|
|
1575
|
+
level;
|
|
1576
|
+
for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {
|
|
1577
|
+
var point = points_1[_i];
|
|
1578
|
+
level = mapOptionsToLevel[point.node.level];
|
|
1579
|
+
// Set options to new object to avoid problems with scope
|
|
1580
|
+
options = { style: {} };
|
|
1581
|
+
// If options for level exists, include them as well
|
|
1582
|
+
if (level && level.dataLabels) {
|
|
1583
|
+
options = merge(options, level.dataLabels);
|
|
1584
|
+
series._hasPointLabels = true;
|
|
1585
|
+
}
|
|
1586
|
+
// Set dataLabel width to the width of the point shape.
|
|
1587
|
+
if (point.shapeArgs) {
|
|
1588
|
+
options.style.width = point.shapeArgs.width;
|
|
1589
|
+
if (point.dataLabel) {
|
|
1590
|
+
point.dataLabel.css({
|
|
1591
|
+
width: point.shapeArgs.width + 'px'
|
|
1592
|
+
});
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
// Merge custom options with point options
|
|
1596
|
+
point.dlOptions = merge(options, point.options.dataLabels);
|
|
1597
|
+
}
|
|
1598
|
+
seriesProto.drawDataLabels.call(this, points);
|
|
1599
|
+
};
|
|
1600
|
+
/**
|
|
1601
|
+
* Treegraph has two separate collecions of nodes and lines,
|
|
1602
|
+
* render dataLabels for both sets.
|
|
1603
|
+
*/
|
|
1604
|
+
TreegraphSeries.prototype.drawDataLabels = function () {
|
|
1605
|
+
if (this.options.dataLabels) {
|
|
1606
|
+
if (!isArray(this.options.dataLabels)) {
|
|
1607
|
+
this.options.dataLabels = [this.options.dataLabels];
|
|
1608
|
+
}
|
|
1609
|
+
// Render node labels.
|
|
1610
|
+
this.drawNodeLabels(this.points);
|
|
1611
|
+
// Render link labels.
|
|
1612
|
+
seriesProto.drawDataLabels.call(this, this.links);
|
|
1613
|
+
}
|
|
1614
|
+
};
|
|
1615
|
+
TreegraphSeries.prototype.destroy = function () {
|
|
1616
|
+
// Links must also be destroyed.
|
|
1617
|
+
for (var _i = 0, _a = this.links; _i < _a.length; _i++) {
|
|
1618
|
+
var link = _a[_i];
|
|
1619
|
+
link.destroy();
|
|
1620
|
+
}
|
|
1621
|
+
return seriesProto.destroy.apply(this, arguments);
|
|
1622
|
+
};
|
|
1623
|
+
/**
|
|
1624
|
+
* Return the presentational attributes.
|
|
1625
|
+
* @private
|
|
1626
|
+
*/
|
|
1627
|
+
TreegraphSeries.prototype.pointAttribs = function (point, state) {
|
|
1628
|
+
var series = this,
|
|
1629
|
+
levelOptions = series.mapOptionsToLevel[point.node.level || 0] || {},
|
|
1630
|
+
options = point.options,
|
|
1631
|
+
stateOptions = (levelOptions.states &&
|
|
1632
|
+
levelOptions.states[state]) ||
|
|
1633
|
+
{};
|
|
1634
|
+
point.options.marker = merge(series.options.marker, levelOptions.marker, point.options.marker);
|
|
1635
|
+
var borderRadius = pick(stateOptions.borderRadius,
|
|
1636
|
+
options.borderRadius,
|
|
1637
|
+
levelOptions.borderRadius,
|
|
1638
|
+
series.options.borderRadius),
|
|
1639
|
+
linkColor = pick(stateOptions.link && stateOptions.link.color,
|
|
1640
|
+
options.link && options.link.color,
|
|
1641
|
+
levelOptions.link && levelOptions.link.color,
|
|
1642
|
+
series.options.link && series.options.link.color),
|
|
1643
|
+
linkLineWidth = pick(stateOptions.link && stateOptions.link.lineWidth,
|
|
1644
|
+
options.link && options.link.lineWidth,
|
|
1645
|
+
levelOptions.link && levelOptions.link.lineWidth,
|
|
1646
|
+
series.options.link && series.options.link.lineWidth),
|
|
1647
|
+
attribs = seriesProto.pointAttribs.call(series,
|
|
1648
|
+
point,
|
|
1649
|
+
state);
|
|
1650
|
+
if (point.isLink) {
|
|
1651
|
+
attribs.stroke = linkColor;
|
|
1652
|
+
attribs['stroke-width'] = linkLineWidth;
|
|
1653
|
+
delete attribs.fill;
|
|
1654
|
+
}
|
|
1655
|
+
else {
|
|
1656
|
+
if (borderRadius) {
|
|
1657
|
+
attribs.r = borderRadius;
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
return attribs;
|
|
1661
|
+
};
|
|
1662
|
+
TreegraphSeries.prototype.drawPoints = function () {
|
|
1663
|
+
_super.prototype.drawPoints.apply(this, arguments);
|
|
1664
|
+
ColumnSeries.prototype.drawPoints.call(this, this.links);
|
|
1665
|
+
};
|
|
1666
|
+
/**
|
|
1667
|
+
* Run translation operations for one node.
|
|
1668
|
+
* @private
|
|
1669
|
+
*/
|
|
1670
|
+
TreegraphSeries.prototype.translateNode = function (point) {
|
|
1671
|
+
var chart = this.chart,
|
|
1672
|
+
node = point.node,
|
|
1673
|
+
plotSizeY = chart.plotSizeY,
|
|
1674
|
+
plotSizeX = chart.plotSizeX,
|
|
1675
|
+
// Get the layout modifiers which are common for all nodes.
|
|
1676
|
+
_a = this.layoutModifier,
|
|
1677
|
+
ax = _a.ax,
|
|
1678
|
+
bx = _a.bx,
|
|
1679
|
+
ay = _a.ay,
|
|
1680
|
+
by = _a.by,
|
|
1681
|
+
x = ax * node.xPosition + bx,
|
|
1682
|
+
y = ay * node.yPosition + by,
|
|
1683
|
+
level = this.mapOptionsToLevel[node.level] || {},
|
|
1684
|
+
markerOptions = merge(this.options.marker,
|
|
1685
|
+
level.marker,
|
|
1686
|
+
point.options.marker),
|
|
1687
|
+
symbol = markerOptions.symbol,
|
|
1688
|
+
height = node.nodeSizeY,
|
|
1689
|
+
width = node.nodeSizeX,
|
|
1690
|
+
reversed = this.options.reversed,
|
|
1691
|
+
nodeX = node.x = (chart.inverted ?
|
|
1692
|
+
plotSizeX - width / 2 - x :
|
|
1693
|
+
x - width / 2),
|
|
1694
|
+
nodeY = node.y = (!reversed ?
|
|
1695
|
+
plotSizeY - y - height / 2 :
|
|
1696
|
+
y - height / 2);
|
|
1697
|
+
point.shapeType = 'path';
|
|
1698
|
+
point.plotX = nodeX;
|
|
1699
|
+
point.plotY = nodeY;
|
|
1700
|
+
point.shapeArgs = {
|
|
1701
|
+
d: symbols[symbol || 'circle'](nodeX, nodeY, width, height),
|
|
1702
|
+
x: nodeX,
|
|
1703
|
+
y: nodeY,
|
|
1704
|
+
width: width,
|
|
1705
|
+
height: height,
|
|
1706
|
+
cursor: !point.node.isLeaf ? 'pointer' : 'default'
|
|
1707
|
+
};
|
|
1708
|
+
// Set the anchor position for tooltip.
|
|
1709
|
+
point.tooltipPos = chart.inverted ?
|
|
1710
|
+
[plotSizeY - nodeY - height / 2, plotSizeX - nodeX - width / 2] :
|
|
1711
|
+
[nodeX + width / 2, nodeY];
|
|
1712
|
+
};
|
|
1713
|
+
TreegraphSeries.defaultOptions = merge(TreemapSeries.defaultOptions, TreegraphSeriesDefaults);
|
|
1714
|
+
return TreegraphSeries;
|
|
1715
|
+
}(TreemapSeries));
|
|
1716
|
+
extend(TreegraphSeries.prototype, {
|
|
1717
|
+
pointClass: TreegraphPoint,
|
|
1718
|
+
NodeClass: TreegraphNode,
|
|
1719
|
+
LinkClass: TreegraphLink
|
|
1720
|
+
});
|
|
1721
|
+
SeriesRegistry.registerSeriesType('treegraph', TreegraphSeries);
|
|
1722
|
+
/* *
|
|
1723
|
+
*
|
|
1724
|
+
* Default Export
|
|
1725
|
+
*
|
|
1726
|
+
* */
|
|
1727
|
+
/* *
|
|
1728
|
+
*
|
|
1729
|
+
* API Options
|
|
1730
|
+
*
|
|
1731
|
+
* */
|
|
1732
|
+
/**
|
|
1733
|
+
* A `treegraph` series. If the [type](#series.treegraph.type)
|
|
1734
|
+
* option is not specified, it is inherited from [chart.type](#chart.type).
|
|
1735
|
+
*
|
|
1736
|
+
* @extends series,plotOptions.treegraph
|
|
1737
|
+
* @exclude allowDrillToNode, boostBlending, boostThreshold, curveFactor,
|
|
1738
|
+
* centerInCategory, connectEnds, connectNulls, colorAxis, colorKey,
|
|
1739
|
+
* dataSorting, dragDrop, findNearestPointBy, getExtremesFromAll, layout,
|
|
1740
|
+
* nodePadding, pointInterval, pointIntervalUnit, pointPlacement, pointStart,
|
|
1741
|
+
* relativeXValue, softThreshold, stack, stacking, step,
|
|
1742
|
+
* traverseUpButton, xAxis, yAxis, zoneAxis, zones
|
|
1743
|
+
* @product highcharts
|
|
1744
|
+
* @requires modules/treemap.js
|
|
1745
|
+
* @requires modules/treegraph.js
|
|
1746
|
+
* @apioption series.treegraph
|
|
1747
|
+
*/
|
|
1748
|
+
/**
|
|
1749
|
+
* @extends plotOptions.series.marker
|
|
1750
|
+
* @excluding enabled, enabledThreshold
|
|
1751
|
+
* @apioption series.treegraph.marker
|
|
1752
|
+
*/
|
|
1753
|
+
/**
|
|
1754
|
+
* @type {Highcharts.SeriesTreegraphDataLabelsOptionsObject|Array<Highcharts.SeriesTreegraphDataLabelsOptionsObject>}
|
|
1755
|
+
* @product highcharts
|
|
1756
|
+
* @apioption series.treegraph.data.dataLabels
|
|
1757
|
+
*/
|
|
1758
|
+
/**
|
|
1759
|
+
* @sample highcharts/series-treegraph/level-options
|
|
1760
|
+
* Treegraph chart with level options applied
|
|
1761
|
+
*
|
|
1762
|
+
* @excluding layoutStartingDirection, layoutAlgorithm, colorVariation
|
|
1763
|
+
* @apioption series.treegraph.levels
|
|
1764
|
+
*/
|
|
1765
|
+
/**
|
|
1766
|
+
* Set collapsed status for nodes level-wise.
|
|
1767
|
+
* @type {boolean}
|
|
1768
|
+
* @apioption series.treegraph.levels.collapsed
|
|
1769
|
+
*/
|
|
1770
|
+
/**
|
|
1771
|
+
* An array of data points for the series. For the `treegraph` series type,
|
|
1772
|
+
* points can be given in the following ways:
|
|
1773
|
+
*
|
|
1774
|
+
* 1. The array of arrays, with `keys` property, which defines how the fields in
|
|
1775
|
+
* array should be interpretated
|
|
1776
|
+
* ```js
|
|
1777
|
+
* keys: ['id', 'parent'],
|
|
1778
|
+
* data: [
|
|
1779
|
+
* ['Category1'],
|
|
1780
|
+
* ['Category1', 'Category2']
|
|
1781
|
+
* ]
|
|
1782
|
+
*
|
|
1783
|
+
* 2. An array of objects with named values. The following snippet shows only a
|
|
1784
|
+
* few settings, see the complete options set below. If the total number of
|
|
1785
|
+
* data points exceeds the
|
|
1786
|
+
* series' [turboThreshold](#series.area.turboThreshold),
|
|
1787
|
+
* this option is not available.
|
|
1788
|
+
* The data of the treegraph series needs to be formatted in such a way, that
|
|
1789
|
+
* there are no circular dependencies on the nodes
|
|
1790
|
+
*
|
|
1791
|
+
* ```js
|
|
1792
|
+
* data: [{
|
|
1793
|
+
* id: 'Category1'
|
|
1794
|
+
* }, {
|
|
1795
|
+
* id: 'Category1',
|
|
1796
|
+
* parent: 'Category2',
|
|
1797
|
+
* }]
|
|
1798
|
+
* ```
|
|
1799
|
+
*
|
|
1800
|
+
* @type {Array<*>}
|
|
1801
|
+
* @extends series.treemap.data
|
|
1802
|
+
* @product highcharts
|
|
1803
|
+
* @excluding outgoing, weight, value
|
|
1804
|
+
* @apioption series.treegraph.data
|
|
1805
|
+
*/
|
|
1806
|
+
/**
|
|
1807
|
+
* Options used for button, which toggles the collapse status of the node.
|
|
1808
|
+
*
|
|
1809
|
+
*
|
|
1810
|
+
* @apioption series.treegraph.data.collapseButton
|
|
1811
|
+
*/
|
|
1812
|
+
/**
|
|
1813
|
+
* If point's children should be initially hidden
|
|
1814
|
+
*
|
|
1815
|
+
* @sample highcharts/series-treegraph/level-options
|
|
1816
|
+
* Treegraph chart with initially hidden children
|
|
1817
|
+
*
|
|
1818
|
+
* @type {boolean}
|
|
1819
|
+
* @apioption series.treegraph.data.collapsed
|
|
1820
|
+
*/
|
|
1821
|
+
''; // gets doclets above into transpiled version
|
|
1822
|
+
|
|
1823
|
+
return TreegraphSeries;
|
|
1824
|
+
});
|
|
1825
|
+
_registerModule(_modules, 'masters/modules/treegraph.src.js', [], function () {
|
|
1826
|
+
|
|
1827
|
+
|
|
1828
|
+
});
|
|
1829
|
+
}));
|