highcharts 11.3.0 → 11.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bower.json +1 -1
- package/css/annotations/popup.css +27 -19
- package/css/stocktools/gui.css +19 -7
- package/es-modules/Accessibility/A11yI18n.js +4 -6
- package/es-modules/Accessibility/Accessibility.js +8 -6
- package/es-modules/Accessibility/Components/InfoRegionsComponent.js +11 -6
- package/es-modules/Accessibility/Components/LegendComponent.js +4 -4
- package/es-modules/Accessibility/Components/MenuComponent.js +3 -6
- package/es-modules/Accessibility/Components/NavigatorComponent.js +6 -3
- package/es-modules/Accessibility/Components/RangeSelectorComponent.js +4 -7
- package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +18 -3
- package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +5 -3
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +4 -4
- package/es-modules/Accessibility/FocusBorder.js +5 -5
- package/es-modules/Accessibility/HighContrastMode.js +22 -13
- package/es-modules/Accessibility/HighContrastTheme.js +2 -6
- package/es-modules/Accessibility/KeyboardNavigation.js +17 -8
- package/es-modules/Accessibility/Options/A11yDefaults.js +11 -1
- package/es-modules/Accessibility/ProxyElement.js +4 -4
- package/es-modules/Accessibility/ProxyProvider.js +8 -2
- package/es-modules/Accessibility/Utils/DOMElementProvider.js +8 -0
- package/es-modules/Accessibility/Utils/EventProvider.js +9 -0
- package/es-modules/Core/Animation/Fx.js +3 -3
- package/es-modules/Core/Axis/Axis.js +43 -97
- package/es-modules/Core/Axis/Axis3DComposition.js +5 -5
- package/es-modules/Core/Axis/Axis3DDefaults.js +1 -1
- package/es-modules/Core/Axis/AxisDefaults.js +18 -7
- package/es-modules/Core/Axis/BrokenAxis.js +4 -6
- package/es-modules/Core/Axis/Color/ColorAxis.js +2 -1
- package/es-modules/Core/Axis/Color/ColorAxisComposition.js +3 -5
- package/es-modules/Core/Axis/DateTimeAxis.js +3 -5
- package/es-modules/Core/Axis/GridAxis.js +7 -7
- package/es-modules/Core/Axis/LogarithmicAxis.js +2 -4
- package/es-modules/Core/Axis/NavigatorAxisComposition.js +26 -22
- package/es-modules/Core/Axis/OrdinalAxis.js +97 -53
- package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +3 -3
- package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js +4 -5
- package/es-modules/Core/Axis/RadialAxis.js +5 -5
- package/es-modules/Core/Axis/ScrollbarAxis.js +2 -2
- package/es-modules/Core/Axis/Stacking/StackItem.js +8 -4
- package/es-modules/Core/Axis/Stacking/StackingAxis.js +3 -5
- package/es-modules/Core/Axis/Tick.js +16 -7
- package/es-modules/Core/Axis/Tick3DComposition.js +2 -2
- package/es-modules/Core/Axis/TreeGrid/TreeGridAxis.js +4 -8
- package/es-modules/Core/Axis/TreeGrid/TreeGridTick.js +3 -6
- package/es-modules/Core/Axis/WaterfallAxis.js +3 -3
- package/es-modules/Core/Axis/ZAxis.js +6 -11
- package/es-modules/Core/Chart/Chart.js +201 -176
- package/es-modules/Core/Chart/Chart3D.js +1 -1
- package/es-modules/Core/Chart/ChartDefaults.js +7 -0
- package/es-modules/Core/Chart/GanttChart.js +2 -2
- package/es-modules/Core/Chart/MapChart.js +12 -2
- package/es-modules/Core/Chart/StockChart.js +12 -11
- package/es-modules/Core/Color/Color.js +3 -3
- package/es-modules/Core/Color/Palettes.js +2 -2
- package/es-modules/Core/Defaults.js +18 -15
- package/es-modules/Core/Geometry/CircleUtilities.js +3 -3
- package/es-modules/Core/Globals.js +2 -2
- package/es-modules/Core/HttpUtilities.js +4 -4
- package/es-modules/Core/Legend/Legend.js +6 -6
- package/es-modules/Core/MSPointer.js +7 -7
- package/es-modules/Core/Pointer.js +230 -245
- package/es-modules/Core/Renderer/HTML/AST.js +1 -1
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +213 -26
- package/es-modules/Core/Renderer/RendererUtilities.js +1 -1
- package/es-modules/Core/Renderer/SVG/SVGElement.js +85 -52
- package/es-modules/Core/Renderer/SVG/SVGLabel.js +14 -11
- package/es-modules/Core/Renderer/SVG/SVGRenderer.js +17 -14
- package/es-modules/Core/Renderer/SVG/SVGRenderer3D.js +8 -7
- package/es-modules/Core/Renderer/SVG/Symbols.js +1 -1
- package/es-modules/Core/Renderer/SVG/TextBuilder.js +2 -2
- package/es-modules/Core/Responsive.js +5 -6
- package/es-modules/Core/Series/DataLabel.js +70 -90
- package/es-modules/Core/Series/DataSeriesComposition.js +1 -1
- package/es-modules/Core/Series/DataSeriesConverter.js +2 -2
- package/es-modules/Core/Series/Point.js +48 -40
- package/es-modules/Core/Series/Series.js +61 -51
- package/es-modules/Core/Series/Series3D.js +2 -2
- package/es-modules/Core/Series/SeriesRegistry.js +10 -2
- package/es-modules/Core/Templating.js +1 -1
- package/es-modules/Core/Time.js +12 -7
- package/es-modules/Core/Tooltip.js +19 -17
- package/es-modules/Core/Utilities.js +54 -26
- package/es-modules/Data/Connectors/CSVConnector.js +2 -2
- package/es-modules/Data/Connectors/DataConnector.js +4 -2
- package/es-modules/Data/Connectors/GoogleSheetsConnector.js +2 -2
- package/es-modules/Data/Connectors/HTMLTableConnector.js +2 -2
- package/es-modules/Data/Connectors/JSONConnector.js +3 -5
- package/es-modules/Data/Converters/CSVConverter.js +1 -3
- package/es-modules/Data/Converters/DataConverter.js +8 -2
- package/es-modules/Data/Converters/HTMLTableConverter.js +1 -3
- package/es-modules/Data/Converters/JSONConverter.js +1 -0
- package/es-modules/Data/DataTable.js +1 -2
- package/es-modules/Data/Formula/FormulaProcessor.js +4 -2
- package/es-modules/Data/Modifiers/DataModifier.js +15 -3
- package/es-modules/Extensions/Annotations/Annotation.js +6 -7
- package/es-modules/Extensions/Annotations/AnnotationChart.js +4 -5
- package/es-modules/Extensions/Annotations/AnnotationDefaults.js +4 -4
- package/es-modules/Extensions/Annotations/ControlPoint.js +2 -2
- package/es-modules/Extensions/Annotations/ControlTarget.js +1 -1
- package/es-modules/Extensions/Annotations/Controllables/Controllable.js +7 -3
- package/es-modules/Extensions/Annotations/Controllables/ControllableEllipse.js +3 -3
- package/es-modules/Extensions/Annotations/Controllables/ControllableLabel.js +8 -9
- package/es-modules/Extensions/Annotations/Controllables/ControllablePath.js +3 -4
- package/es-modules/Extensions/Annotations/EventEmitter.js +6 -6
- package/es-modules/Extensions/Annotations/NavigationBindings.js +29 -18
- package/es-modules/Extensions/Annotations/NavigationBindingsDefaults.js +6 -6
- package/es-modules/Extensions/Annotations/Popup/Popup.js +1 -1
- package/es-modules/Extensions/Annotations/Popup/PopupAnnotations.js +10 -6
- package/es-modules/Extensions/Annotations/Popup/PopupComposition.js +2 -2
- package/es-modules/Extensions/Annotations/Popup/PopupIndicators.js +31 -31
- package/es-modules/Extensions/Annotations/Popup/PopupTabs.js +1 -1
- package/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +14 -11
- package/es-modules/Extensions/Annotations/Types/FibonacciTimeZones.js +1 -1
- package/es-modules/Extensions/Annotations/Types/Measure.js +1 -1
- package/es-modules/Extensions/ArrowSymbols.js +7 -13
- package/es-modules/Extensions/Boost/Boost.js +39 -7
- package/es-modules/Extensions/Boost/BoostChart.js +4 -4
- package/es-modules/Extensions/Boost/BoostSeries.js +58 -13
- package/es-modules/Extensions/Boost/WGLRenderer.js +3 -3
- package/es-modules/Extensions/Boost/WGLVertexBuffer.js +1 -1
- package/es-modules/Extensions/BoostCanvas.js +5 -4
- package/es-modules/Extensions/BorderRadius.js +5 -4
- package/es-modules/Extensions/Breadcrumbs/Breadcrumbs.js +9 -9
- package/es-modules/Extensions/CurrentDateIndication.js +1 -1
- package/es-modules/Extensions/Data.js +11 -11
- package/es-modules/Extensions/DataGrouping/DataGrouping.js +1 -1
- package/es-modules/Extensions/DataGrouping/DataGroupingAxisComposition.js +8 -9
- package/es-modules/Extensions/DataGrouping/DataGroupingDefaults.js +1 -1
- package/es-modules/Extensions/DataGrouping/DataGroupingSeriesComposition.js +6 -7
- package/es-modules/Extensions/Debugger/Debugger.js +1 -1
- package/es-modules/Extensions/Debugger/ErrorMessages.js +2 -2
- package/es-modules/Extensions/DragPanes/AxisResizer.js +13 -16
- package/es-modules/Extensions/DragPanes/DragPanes.js +2 -4
- package/es-modules/Extensions/DraggablePoints/DragDropDefaults.js +2 -1
- package/es-modules/Extensions/DraggablePoints/DragDropUtilities.js +1 -1
- package/es-modules/Extensions/DraggablePoints/DraggableChart.js +4 -4
- package/es-modules/Extensions/DraggablePoints/DraggablePoints.js +8 -9
- package/es-modules/Extensions/Drilldown/Drilldown.js +11 -9
- package/es-modules/Extensions/Drilldown/DrilldownSeries.js +5 -6
- package/es-modules/Extensions/ExportData/ExportData.js +27 -18
- package/es-modules/Extensions/Exporting/Exporting.js +25 -20
- package/es-modules/Extensions/Exporting/ExportingDefaults.js +1 -1
- package/es-modules/Extensions/Exporting/Fullscreen.js +5 -10
- package/es-modules/Extensions/MarkerClusters/MarkerClusterScatter.js +26 -21
- package/es-modules/Extensions/MarkerClusters/MarkerClusterSymbols.js +2 -12
- package/es-modules/Extensions/MarkerClusters/MarkerClusters.js +3 -3
- package/es-modules/Extensions/MouseWheelZoom/MouseWheelZoom.js +51 -161
- package/es-modules/Extensions/NoDataToDisplay/NoDataToDisplay.js +3 -5
- package/es-modules/Extensions/OfflineExporting/OfflineExporting.js +5 -6
- package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
- package/es-modules/Extensions/OverlappingDataLabels.js +21 -49
- package/es-modules/Extensions/Pane/PaneComposition.js +3 -5
- package/es-modules/Extensions/ParallelCoordinates/ParallelAxis.js +2 -4
- package/es-modules/Extensions/ParallelCoordinates/ParallelCoordinates.js +5 -6
- package/es-modules/Extensions/ParallelCoordinates/ParallelSeries.js +1 -1
- package/es-modules/Extensions/PatternFill.js +19 -22
- package/es-modules/Extensions/PriceIndication.js +1 -1
- package/es-modules/Extensions/ScrollablePlotArea.js +218 -292
- package/es-modules/Extensions/SeriesLabel/SeriesLabel.js +26 -18
- package/es-modules/Extensions/Sonification/Options.js +1 -0
- package/es-modules/Extensions/Sonification/SonificationSpeaker.js +2 -2
- package/es-modules/Extensions/Sonification/SynthPatch.js +3 -3
- package/es-modules/Extensions/StaticScale.js +3 -5
- package/es-modules/Gantt/Legacy.js +1 -1
- package/es-modules/Gantt/Pathfinder.js +2 -2
- package/es-modules/Gantt/PathfinderComposition.js +3 -5
- package/es-modules/Gantt/Tree.js +3 -3
- package/es-modules/Maps/GeoJSONComposition.js +20 -13
- package/es-modules/Maps/MapNavigation.js +2 -2
- package/es-modules/Maps/MapPointer.js +3 -19
- package/es-modules/Maps/MapSymbols.js +3 -9
- package/es-modules/Maps/MapView.js +134 -74
- package/es-modules/Series/ArcDiagram/ArcDiagramSeries.js +5 -4
- package/es-modules/Series/Area/AreaSeries.js +2 -4
- package/es-modules/Series/Area3D/Area3DSeries.js +1 -1
- package/es-modules/Series/AreaRange/AreaRangePoint.js +2 -2
- package/es-modules/Series/AreaRange/AreaRangeSeries.js +2 -3
- package/es-modules/Series/AreaSpline/AreaSplineSeries.js +1 -1
- package/es-modules/Series/Bar/BarSeries.js +1 -1
- package/es-modules/Series/Bellcurve/BellcurveSeries.js +1 -1
- package/es-modules/Series/BoxPlot/BoxPlotSeriesDefaults.js +4 -0
- package/es-modules/Series/Bubble/BubbleLegendComposition.js +1 -1
- package/es-modules/Series/Bubble/BubbleLegendDefaults.js +2 -2
- package/es-modules/Series/Bubble/BubbleLegendItem.js +3 -3
- package/es-modules/Series/Bubble/BubbleSeries.js +1 -1
- package/es-modules/Series/Bullet/BulletSeriesDefaults.js +2 -2
- package/es-modules/Series/Candlestick/CandlestickSeries.js +2 -2
- package/es-modules/Series/Candlestick/CandlestickSeriesDefaults.js +1 -5
- package/es-modules/Series/ColorMapComposition.js +1 -1
- package/es-modules/Series/Column/ColumnDataLabel.js +2 -2
- package/es-modules/Series/Column/ColumnSeries.js +20 -22
- package/es-modules/Series/Column/ColumnSeriesDefaults.js +1 -1
- package/es-modules/Series/Column3D/Column3DComposition.js +1 -1
- package/es-modules/Series/ColumnRange/ColumnRangeSeries.js +2 -1
- package/es-modules/Series/Cylinder/CylinderComposition.js +9 -9
- package/es-modules/Series/DataModifyComposition.js +5 -5
- package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +3 -2
- package/es-modules/Series/DependencyWheel/DependencyWheelSeriesDefaults.js +1 -1
- package/es-modules/Series/DragNodesComposition.js +7 -7
- package/es-modules/Series/DrawPointUtilities.js +0 -2
- package/es-modules/Series/Dumbbell/DumbbellSeriesDefaults.js +1 -1
- package/es-modules/Series/Funnel/FunnelSeries.js +1 -1
- package/es-modules/Series/Funnel3D/Funnel3DComposition.js +6 -6
- package/es-modules/Series/Funnel3D/Funnel3DSeriesDefaults.js +2 -2
- package/es-modules/Series/Funnel3D/SVGElement3DFunnel.js +1 -1
- package/es-modules/Series/Gantt/GanttSeries.js +0 -1
- package/es-modules/Series/GeoHeatmap/GeoHeatmapSeries.js +5 -5
- package/es-modules/Series/GraphLayoutComposition.js +1 -1
- package/es-modules/Series/Heatmap/HeatmapSeries.js +2 -2
- package/es-modules/Series/Heatmap/HeatmapSeriesDefaults.js +1 -1
- package/es-modules/Series/HeikinAshi/HeikinAshiPoint.js +3 -1
- package/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +3 -3
- package/es-modules/Series/HeikinAshi/HeikinAshiSeriesDefaults.js +1 -1
- package/es-modules/Series/HollowCandlestick/HollowCandlestickSeries.js +2 -2
- package/es-modules/Series/Item/ItemSeries.js +1 -1
- package/es-modules/Series/Line/LineSeries.js +1 -1
- package/es-modules/Series/Lollipop/LollipopSeries.js +3 -1
- package/es-modules/Series/Map/MapPoint.js +5 -1
- package/es-modules/Series/Map/MapSeries.js +32 -7
- package/es-modules/Series/Map/MapSeriesDefaults.js +5 -3
- package/es-modules/Series/Networkgraph/EulerIntegration.js +5 -5
- package/es-modules/Series/Networkgraph/NetworkgraphSeries.js +4 -4
- package/es-modules/Series/Networkgraph/NetworkgraphSeriesDefaults.js +5 -5
- package/es-modules/Series/Networkgraph/QuadTree.js +1 -1
- package/es-modules/Series/Networkgraph/QuadTreeNode.js +1 -1
- package/es-modules/Series/Networkgraph/VerletIntegration.js +9 -9
- package/es-modules/Series/NodesComposition.js +1 -1
- package/es-modules/Series/OHLC/OHLCSeries.js +1 -1
- package/es-modules/Series/OHLC/OHLCSeriesDefaults.js +1 -1
- package/es-modules/Series/OnSeriesComposition.js +1 -1
- package/es-modules/Series/Organization/OrganizationPoint.js +1 -1
- package/es-modules/Series/Organization/OrganizationSeries.js +22 -10
- package/es-modules/Series/Organization/OrganizationSeriesDefaults.js +15 -2
- package/es-modules/Series/PackedBubble/PackedBubbleLayout.js +3 -5
- package/es-modules/Series/PackedBubble/PackedBubblePoint.js +1 -1
- package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +6 -10
- package/es-modules/Series/Pictorial/PictorialSeries.js +2 -2
- package/es-modules/Series/Pie/PieDataLabel.js +2 -2
- package/es-modules/Series/Pie/PiePoint.js +1 -1
- package/es-modules/Series/Pie/PieSeries.js +10 -1
- package/es-modules/Series/Pie/PieSeriesDefaults.js +1 -1
- package/es-modules/Series/Pie3D/Pie3DSeries.js +2 -2
- package/es-modules/Series/PolarComposition.js +22 -20
- package/es-modules/Series/Sankey/SankeyColumnComposition.js +1 -1
- package/es-modules/Series/Sankey/SankeySeries.js +8 -8
- package/es-modules/Series/Sankey/SankeySeriesDefaults.js +57 -13
- package/es-modules/Series/SeriesOnPointComposition.js +3 -3
- package/es-modules/Series/Spline/SplineSeries.js +1 -1
- package/es-modules/Series/Sunburst/SunburstPoint.js +1 -1
- package/es-modules/Series/Sunburst/SunburstSeries.js +2 -7
- package/es-modules/Series/Sunburst/SunburstSeriesDefaults.js +3 -3
- package/es-modules/Series/Sunburst/SunburstUtilities.js +1 -1
- package/es-modules/Series/TiledWebMap/TiledWebMapSeries.js +23 -25
- package/es-modules/Series/Tilemap/TilemapSeries.js +2 -2
- package/es-modules/Series/Timeline/TimelineSeries.js +2 -2
- package/es-modules/Series/TreeUtilities.js +23 -1
- package/es-modules/Series/Treegraph/TreegraphLayout.js +7 -11
- package/es-modules/Series/Treegraph/TreegraphPoint.js +1 -0
- package/es-modules/Series/Treegraph/TreegraphSeries.js +8 -8
- package/es-modules/Series/Treegraph/TreegraphSeriesDefaults.js +39 -2
- package/es-modules/Series/Treemap/TreemapSeries.js +4 -2
- package/es-modules/Series/Treemap/TreemapUtilities.js +0 -7
- package/es-modules/Series/Variwide/VariwideComposition.js +6 -2
- package/es-modules/Series/Variwide/VariwideSeries.js +1 -1
- package/es-modules/Series/Venn/VennSeries.js +4 -4
- package/es-modules/Series/Venn/VennUtils.js +5 -6
- package/es-modules/Series/Waterfall/WaterfallSeriesDefaults.js +1 -1
- package/es-modules/Series/Windbarb/WindbarbSeries.js +1 -1
- package/es-modules/Series/Wordcloud/WordcloudUtils.js +6 -4
- package/es-modules/Series/XRange/XRangePoint.js +2 -2
- package/es-modules/Series/XRange/XRangeSeries.js +1 -1
- package/es-modules/Shared/BaseForm.js +1 -1
- package/es-modules/Stock/Indicators/AD/ADIndicator.js +3 -1
- package/es-modules/Stock/Indicators/APO/APOIndicator.js +1 -1
- package/es-modules/Stock/Indicators/Aroon/AroonIndicator.js +1 -1
- package/es-modules/Stock/Indicators/CMF/CMFIndicator.js +1 -1
- package/es-modules/Stock/Indicators/CMO/CMOIndicator.js +2 -2
- package/es-modules/Stock/Indicators/Chaikin/ChaikinIndicator.js +1 -1
- package/es-modules/Stock/Indicators/DPO/DPOIndicator.js +1 -1
- package/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +1 -1
- package/es-modules/Stock/Indicators/LinearRegression/LinearRegressionIndicator.js +7 -7
- package/es-modules/Stock/Indicators/MultipleLinesComposition.js +9 -9
- package/es-modules/Stock/Indicators/OBV/OBVIndicator.js +1 -1
- package/es-modules/Stock/Indicators/PPO/PPOIndicator.js +1 -1
- package/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +2 -2
- package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +1 -1
- package/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +16 -17
- package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +4 -5
- package/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +1 -1
- package/es-modules/Stock/Indicators/Zigzag/ZigzagIndicator.js +5 -5
- package/es-modules/Stock/Navigator/ChartNavigatorComposition.js +188 -0
- package/es-modules/Stock/Navigator/Navigator.js +42 -27
- package/es-modules/Stock/Navigator/NavigatorComposition.js +10 -149
- package/es-modules/Stock/Navigator/NavigatorDefaults.js +16 -2
- package/es-modules/Stock/Navigator/StandaloneNavigator.js +334 -0
- package/es-modules/Stock/Navigator/StandaloneNavigatorDefaults.js +64 -0
- package/es-modules/Stock/RangeSelector/RangeSelector.js +28 -16
- package/es-modules/Stock/RangeSelector/RangeSelectorComposition.js +2 -2
- package/es-modules/Stock/Scrollbar/Scrollbar.js +10 -10
- package/es-modules/Stock/Scrollbar/ScrollbarDefaults.js +1 -3
- package/es-modules/Stock/StockTools/StockToolbar.js +6 -5
- package/es-modules/Stock/StockTools/StockTools.js +10 -13
- package/es-modules/Stock/StockTools/StockToolsBindings.js +35 -35
- package/es-modules/Stock/StockTools/StockToolsDefaults.js +2 -1
- package/es-modules/Stock/StockTools/StockToolsGui.js +7 -8
- package/es-modules/Stock/StockTools/StockToolsUtilities.js +8 -9
- package/es-modules/Stock/Utilities/StockUtilities.js +41 -0
- package/es-modules/masters/highcharts-3d.src.js +2 -1
- package/es-modules/masters/highcharts-gantt.src.js +1 -1
- package/es-modules/masters/highcharts-more.src.js +2 -1
- package/es-modules/masters/highcharts.src.js +41 -40
- 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 +3 -1
- package/es-modules/masters/indicators/accumulation-distribution.src.js +3 -1
- package/es-modules/masters/indicators/ao.src.js +3 -1
- package/es-modules/masters/indicators/apo.src.js +3 -1
- package/es-modules/masters/indicators/aroon-oscillator.src.js +3 -1
- package/es-modules/masters/indicators/aroon.src.js +3 -1
- package/es-modules/masters/indicators/atr.src.js +3 -1
- package/es-modules/masters/indicators/bollinger-bands.src.js +3 -1
- package/es-modules/masters/indicators/cci.src.js +3 -1
- package/es-modules/masters/indicators/chaikin.src.js +3 -1
- package/es-modules/masters/indicators/cmf.src.js +3 -1
- package/es-modules/masters/indicators/cmo.src.js +3 -1
- package/es-modules/masters/indicators/dema.src.js +3 -1
- package/es-modules/masters/indicators/disparity-index.src.js +3 -1
- package/es-modules/masters/indicators/dmi.src.js +3 -1
- package/es-modules/masters/indicators/dpo.src.js +3 -1
- package/es-modules/masters/indicators/ema.src.js +2 -0
- package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +3 -1
- package/es-modules/masters/indicators/indicators-all.src.js +3 -1
- package/es-modules/masters/indicators/indicators.src.js +7 -1
- package/es-modules/masters/indicators/keltner-channels.src.js +3 -1
- package/es-modules/masters/indicators/klinger.src.js +3 -1
- package/es-modules/masters/indicators/macd.src.js +3 -1
- package/es-modules/masters/indicators/mfi.src.js +3 -1
- package/es-modules/masters/indicators/momentum.src.js +3 -1
- package/es-modules/masters/indicators/natr.src.js +3 -1
- package/es-modules/masters/indicators/obv.src.js +3 -1
- package/es-modules/masters/indicators/pivot-points.src.js +3 -1
- package/es-modules/masters/indicators/ppo.src.js +3 -1
- package/es-modules/masters/indicators/price-channel.src.js +3 -1
- package/es-modules/masters/indicators/price-envelopes.src.js +3 -1
- package/es-modules/masters/indicators/psar.src.js +3 -1
- package/es-modules/masters/indicators/regressions.src.js +3 -1
- package/es-modules/masters/indicators/roc.src.js +3 -1
- package/es-modules/masters/indicators/rsi.src.js +3 -1
- package/es-modules/masters/indicators/slow-stochastic.src.js +3 -1
- package/es-modules/masters/indicators/stochastic.src.js +3 -1
- package/es-modules/masters/indicators/supertrend.src.js +3 -1
- package/es-modules/masters/indicators/tema.src.js +3 -1
- package/es-modules/masters/indicators/trendline.src.js +3 -1
- package/es-modules/masters/indicators/trix.src.js +3 -1
- package/es-modules/masters/indicators/volume-by-price.src.js +3 -1
- package/es-modules/masters/indicators/vwap.src.js +3 -1
- package/es-modules/masters/indicators/williams-r.src.js +3 -1
- package/es-modules/masters/indicators/wma.src.js +3 -1
- package/es-modules/masters/indicators/zigzag.src.js +3 -1
- package/es-modules/masters/modules/accessibility.src.js +4 -1
- package/es-modules/masters/modules/annotations-advanced.src.js +3 -5
- package/es-modules/masters/modules/annotations.src.js +6 -3
- package/es-modules/masters/modules/arc-diagram.src.js +3 -1
- package/es-modules/masters/modules/arrow-symbols.src.js +2 -1
- package/es-modules/masters/modules/boost-canvas.src.js +2 -1
- package/es-modules/masters/modules/boost.src.js +3 -2
- package/es-modules/masters/modules/broken-axis.src.js +4 -3
- package/es-modules/masters/modules/bullet.src.js +3 -1
- package/es-modules/masters/modules/coloraxis.src.js +4 -3
- package/es-modules/masters/modules/current-date-indicator.src.js +2 -1
- package/es-modules/masters/modules/cylinder.src.js +3 -1
- package/es-modules/masters/modules/data-tools.src.js +9 -8
- package/es-modules/masters/modules/data.src.js +9 -8
- package/es-modules/masters/modules/datagrouping.src.js +7 -5
- package/es-modules/masters/modules/debugger.src.js +3 -2
- package/es-modules/masters/modules/dependency-wheel.src.js +3 -1
- package/es-modules/masters/modules/dotplot.src.js +3 -1
- package/es-modules/masters/modules/drag-panes.src.js +2 -1
- package/es-modules/masters/modules/draggable-points.src.js +2 -1
- package/es-modules/masters/modules/drilldown.src.js +3 -2
- package/es-modules/masters/modules/dumbbell.src.js +3 -1
- package/es-modules/masters/modules/export-data.src.js +5 -4
- package/es-modules/masters/modules/exporting.src.js +6 -5
- package/es-modules/masters/modules/flowmap.src.js +3 -1
- package/es-modules/masters/modules/full-screen.src.js +4 -3
- package/es-modules/masters/modules/funnel.src.js +2 -1
- package/es-modules/masters/modules/funnel3d.src.js +4 -3
- package/es-modules/masters/modules/gantt.src.js +15 -17
- package/es-modules/masters/modules/geoheatmap.src.js +3 -1
- package/es-modules/masters/modules/grid-axis.src.js +2 -1
- package/es-modules/masters/modules/heatmap.src.js +3 -5
- package/es-modules/masters/modules/heikinashi.src.js +2 -1
- package/es-modules/masters/modules/histogram-bellcurve.src.js +3 -1
- package/es-modules/masters/modules/hollowcandlestick.src.js +3 -1
- package/es-modules/masters/modules/item-series.src.js +3 -1
- package/es-modules/masters/modules/lollipop.src.js +3 -1
- package/es-modules/masters/modules/map.src.js +15 -10
- package/es-modules/masters/modules/marker-clusters.src.js +2 -1
- package/es-modules/masters/modules/mouse-wheel-zoom.src.js +4 -2
- package/es-modules/masters/modules/navigator.src.d.ts +1 -0
- package/es-modules/masters/modules/navigator.src.js +19 -0
- package/es-modules/masters/modules/networkgraph.src.js +2 -1
- package/es-modules/masters/modules/no-data-to-display.src.js +2 -1
- package/es-modules/masters/modules/offline-exporting.src.js +4 -3
- package/es-modules/masters/modules/organization.src.js +3 -1
- package/es-modules/masters/modules/overlapping-datalabels.src.js +4 -2
- package/es-modules/masters/modules/parallel-coordinates.src.js +2 -1
- package/es-modules/masters/modules/pareto.src.js +3 -1
- package/es-modules/masters/modules/pathfinder.src.js +4 -3
- package/es-modules/masters/modules/pattern-fill.src.js +2 -1
- package/es-modules/masters/modules/pictorial.src.js +3 -1
- package/es-modules/masters/modules/price-indicator.src.js +2 -1
- package/es-modules/masters/modules/pyramid3d.src.js +3 -1
- package/es-modules/masters/modules/sankey.src.js +3 -1
- package/es-modules/masters/modules/series-label.src.js +2 -1
- package/es-modules/masters/modules/series-on-point.src.js +2 -1
- package/es-modules/masters/modules/solid-gauge.src.js +3 -1
- package/es-modules/masters/modules/sonification.src.js +2 -1
- package/es-modules/masters/modules/static-scale.src.js +2 -1
- package/es-modules/masters/modules/stock-tools.src.js +5 -3
- package/es-modules/masters/modules/stock.src.js +20 -15
- package/es-modules/masters/modules/streamgraph.src.js +3 -1
- package/es-modules/masters/modules/sunburst.src.js +4 -3
- package/es-modules/masters/modules/tiledwebmap.src.js +5 -4
- package/es-modules/masters/modules/tilemap.src.js +2 -1
- package/es-modules/masters/modules/timeline.src.js +3 -1
- package/es-modules/masters/modules/treegraph.src.js +3 -1
- package/es-modules/masters/modules/treegrid.src.js +2 -2
- package/es-modules/masters/modules/treemap.src.js +5 -4
- package/es-modules/masters/modules/variable-pie.src.js +3 -1
- package/es-modules/masters/modules/variwide.src.js +2 -1
- package/es-modules/masters/modules/vector.src.js +3 -1
- package/es-modules/masters/modules/venn.src.js +3 -1
- package/es-modules/masters/modules/windbarb.src.js +3 -1
- package/es-modules/masters/modules/wordcloud.src.js +3 -1
- package/es-modules/masters/modules/xrange.src.js +2 -1
- package/es-modules/masters/standalone-navigator.src.js +13 -0
- package/es-modules/masters/themes/avocado.src.js +2 -1
- package/es-modules/masters/themes/brand-dark.src.js +2 -1
- package/es-modules/masters/themes/brand-light.src.js +2 -1
- package/es-modules/masters/themes/dark-blue.src.js +2 -1
- package/es-modules/masters/themes/dark-green.src.js +2 -1
- package/es-modules/masters/themes/dark-unica.src.js +2 -1
- package/es-modules/masters/themes/gray.src.js +2 -1
- package/es-modules/masters/themes/grid-light.src.js +2 -1
- package/es-modules/masters/themes/grid.src.js +2 -1
- package/es-modules/masters/themes/high-contrast-dark.src.js +2 -1
- package/es-modules/masters/themes/high-contrast-light.src.js +2 -1
- package/es-modules/masters/themes/sand-signika.src.js +2 -1
- package/es-modules/masters/themes/skies.src.js +2 -1
- package/es-modules/masters/themes/sunset.src.js +2 -1
- package/es-modules/tsconfig.tsbuildinfo +1 -0
- package/globals.d.ts +9 -0
- package/globals.src.d.ts +9 -0
- package/highcharts-3d.js +3 -3
- package/highcharts-3d.src.js +32 -33
- package/highcharts-gantt.js +4 -4
- package/highcharts-gantt.src.js +5703 -5639
- package/highcharts-more.d.ts +4 -0
- package/highcharts-more.js +3 -3
- package/highcharts-more.src.d.ts +4 -0
- package/highcharts-more.src.js +88 -87
- package/highcharts.d.ts +834 -5365
- package/highcharts.js +4 -4
- package/highcharts.src.d.ts +834 -5365
- package/highcharts.src.js +1583 -1682
- package/highmaps.js +4 -4
- package/highmaps.src.js +1837 -1835
- package/highstock.js +4 -4
- package/highstock.src.js +12488 -12510
- package/indicators/acceleration-bands.js +3 -3
- package/indicators/acceleration-bands.src.js +12 -11
- package/indicators/accumulation-distribution.js +3 -3
- package/indicators/accumulation-distribution.src.js +6 -3
- package/indicators/ao.js +3 -3
- package/indicators/ao.src.js +3 -2
- package/indicators/apo.js +3 -3
- package/indicators/apo.src.js +4 -3
- package/indicators/aroon-oscillator.js +3 -3
- package/indicators/aroon-oscillator.src.js +12 -11
- package/indicators/aroon.js +3 -3
- package/indicators/aroon.src.js +13 -12
- package/indicators/atr.js +3 -3
- package/indicators/atr.src.js +3 -2
- package/indicators/bollinger-bands.js +3 -3
- package/indicators/bollinger-bands.src.js +12 -11
- package/indicators/cci.js +3 -3
- package/indicators/cci.src.js +3 -2
- package/indicators/chaikin.js +3 -3
- package/indicators/chaikin.src.js +7 -4
- package/indicators/cmf.js +3 -3
- package/indicators/cmf.src.js +4 -3
- package/indicators/cmo.js +3 -3
- package/indicators/cmo.src.js +5 -4
- package/indicators/dema.js +3 -3
- package/indicators/dema.src.js +3 -2
- package/indicators/disparity-index.js +3 -3
- package/indicators/disparity-index.src.js +3 -2
- package/indicators/dmi.js +3 -3
- package/indicators/dmi.src.js +12 -11
- package/indicators/dpo.js +3 -3
- package/indicators/dpo.src.js +4 -3
- package/indicators/ema.js +1 -1
- package/indicators/ema.src.js +2 -1
- package/indicators/ichimoku-kinko-hyo.js +3 -3
- package/indicators/ichimoku-kinko-hyo.src.js +3 -2
- package/indicators/indicators-all.js +3 -3
- package/indicators/indicators-all.src.js +63 -60
- package/indicators/indicators.js +3 -3
- package/indicators/indicators.src.js +286 -3
- package/indicators/keltner-channels.js +3 -3
- package/indicators/keltner-channels.src.js +12 -11
- package/indicators/klinger.js +3 -3
- package/indicators/klinger.src.js +13 -12
- package/indicators/macd.js +3 -3
- package/indicators/macd.src.js +3 -2
- package/indicators/mfi.js +3 -3
- package/indicators/mfi.src.js +3 -2
- package/indicators/momentum.js +3 -3
- package/indicators/momentum.src.js +3 -2
- package/indicators/natr.js +3 -3
- package/indicators/natr.src.js +3 -2
- package/indicators/obv.js +3 -3
- package/indicators/obv.src.js +4 -3
- package/indicators/pivot-points.js +3 -3
- package/indicators/pivot-points.src.js +5 -4
- package/indicators/ppo.js +3 -3
- package/indicators/ppo.src.js +4 -3
- package/indicators/price-channel.js +3 -3
- package/indicators/price-channel.src.js +12 -11
- package/indicators/price-envelopes.js +3 -3
- package/indicators/price-envelopes.src.js +12 -11
- package/indicators/psar.js +3 -3
- package/indicators/psar.src.js +3 -2
- package/indicators/regressions.js +3 -3
- package/indicators/regressions.src.js +10 -9
- package/indicators/roc.js +3 -3
- package/indicators/roc.src.js +3 -2
- package/indicators/rsi.js +3 -3
- package/indicators/rsi.src.js +3 -2
- package/indicators/slow-stochastic.js +3 -3
- package/indicators/slow-stochastic.src.js +3 -2
- package/indicators/stochastic.js +3 -3
- package/indicators/stochastic.src.js +12 -11
- package/indicators/supertrend.js +3 -3
- package/indicators/supertrend.src.js +20 -19
- package/indicators/tema.js +3 -3
- package/indicators/tema.src.js +3 -2
- package/indicators/trendline.js +3 -3
- package/indicators/trendline.src.js +3 -2
- package/indicators/trix.js +3 -3
- package/indicators/trix.src.js +3 -2
- package/indicators/volume-by-price.js +3 -3
- package/indicators/volume-by-price.src.js +8 -7
- package/indicators/vwap.js +3 -3
- package/indicators/vwap.src.js +3 -2
- package/indicators/williams-r.js +3 -3
- package/indicators/williams-r.src.js +4 -3
- package/indicators/wma.js +3 -3
- package/indicators/wma.src.js +3 -2
- package/indicators/zigzag.js +3 -3
- package/indicators/zigzag.src.js +8 -7
- package/lib/svg2pdf.js +7 -7
- package/lib/svg2pdf.src.js +185 -150
- package/modules/accessibility.js +3 -3
- package/modules/accessibility.src.js +664 -2793
- package/modules/annotations-advanced.d.ts +3 -0
- package/modules/annotations-advanced.js +3 -3
- package/modules/annotations-advanced.src.d.ts +3 -0
- package/modules/annotations-advanced.src.js +2949 -2920
- package/modules/annotations.d.ts +0 -3
- package/modules/annotations.js +3 -3
- package/modules/annotations.src.d.ts +0 -3
- package/modules/annotations.src.js +2926 -2905
- package/modules/arc-diagram.js +3 -3
- package/modules/arc-diagram.src.js +8 -6
- package/modules/arrow-symbols.js +3 -3
- package/modules/arrow-symbols.src.js +10 -13
- package/modules/boost-canvas.js +3 -3
- package/modules/boost-canvas.src.js +73 -26
- package/modules/boost.js +3 -3
- package/modules/boost.src.js +108 -30
- package/modules/broken-axis.js +3 -3
- package/modules/broken-axis.src.js +9 -9
- package/modules/bullet.js +3 -3
- package/modules/bullet.src.js +5 -4
- package/modules/coloraxis.js +3 -3
- package/modules/coloraxis.src.js +10 -9
- package/modules/current-date-indicator.js +3 -3
- package/modules/current-date-indicator.src.js +3 -2
- package/modules/cylinder.js +3 -3
- package/modules/cylinder.src.js +12 -11
- package/modules/data-tools.js +3 -3
- package/modules/data-tools.src.js +53 -36
- package/modules/data.d.ts +2 -2
- package/modules/data.js +3 -3
- package/modules/data.src.d.ts +2 -2
- package/modules/data.src.js +24 -23
- package/modules/datagrouping.js +3 -3
- package/modules/datagrouping.src.js +25 -23
- package/modules/debugger.js +3 -3
- package/modules/debugger.src.js +6 -5
- package/modules/dependency-wheel.js +3 -3
- package/modules/dependency-wheel.src.js +7 -5
- package/modules/dotplot.js +3 -3
- package/modules/dotplot.src.js +3 -2
- package/modules/drag-panes.js +3 -3
- package/modules/drag-panes.src.js +19 -21
- package/modules/draggable-points.js +3 -3
- package/modules/draggable-points.src.js +18 -16
- package/modules/drilldown.js +3 -3
- package/modules/drilldown.src.js +29 -26
- package/modules/dumbbell.js +3 -3
- package/modules/dumbbell.src.js +5 -4
- package/modules/export-data.js +3 -3
- package/modules/export-data.src.js +33 -22
- package/modules/exporting.d.ts +1 -1
- package/modules/exporting.js +3 -3
- package/modules/exporting.src.d.ts +1 -1
- package/modules/exporting.src.js +40 -39
- package/modules/flowmap.js +3 -3
- package/modules/flowmap.src.js +3 -2
- package/modules/full-screen.js +3 -3
- package/modules/full-screen.src.js +9 -13
- package/modules/funnel.js +3 -3
- package/modules/funnel.src.js +3 -2
- package/modules/funnel3d.js +3 -3
- package/modules/funnel3d.src.js +12 -12
- package/modules/gantt.d.ts +3 -4
- package/modules/gantt.js +3 -3
- package/modules/gantt.src.d.ts +3 -4
- package/modules/gantt.src.js +4165 -4002
- package/modules/geoheatmap.js +3 -3
- package/modules/geoheatmap.src.js +8 -7
- package/modules/grid-axis.js +3 -3
- package/modules/grid-axis.src.js +9 -8
- package/modules/heatmap.d.ts +2 -2
- package/modules/heatmap.js +3 -3
- package/modules/heatmap.src.d.ts +2 -2
- package/modules/heatmap.src.js +21 -15
- package/modules/heikinashi.js +3 -3
- package/modules/heikinashi.src.js +9 -6
- package/modules/histogram-bellcurve.js +3 -3
- package/modules/histogram-bellcurve.src.js +4 -3
- package/modules/hollowcandlestick.js +3 -3
- package/modules/hollowcandlestick.src.js +5 -4
- package/modules/item-series.js +3 -3
- package/modules/item-series.src.js +4 -3
- package/modules/lollipop.js +3 -3
- package/modules/lollipop.src.js +6 -3
- package/modules/map.d.ts +22 -1
- package/modules/map.js +3 -3
- package/modules/map.src.d.ts +22 -1
- package/modules/map.src.js +256 -155
- package/modules/marker-clusters.js +3 -3
- package/modules/marker-clusters.src.js +35 -37
- package/modules/mouse-wheel-zoom.js +3 -3
- package/modules/mouse-wheel-zoom.src.js +55 -163
- package/modules/navigator.d.ts +148 -0
- package/modules/navigator.js +9 -0
- package/modules/navigator.src.d.ts +148 -0
- package/modules/navigator.src.js +3921 -0
- package/modules/networkgraph.d.ts +2 -2
- package/modules/networkgraph.js +3 -3
- package/modules/networkgraph.src.d.ts +2 -2
- package/modules/networkgraph.src.js +36 -35
- package/modules/no-data-to-display.js +3 -3
- package/modules/no-data-to-display.src.js +6 -6
- package/modules/offline-exporting.js +3 -3
- package/modules/offline-exporting.src.js +10 -10
- package/modules/organization.js +3 -3
- package/modules/organization.src.js +41 -15
- package/modules/overlapping-datalabels.js +3 -3
- package/modules/overlapping-datalabels.src.js +4 -2
- package/modules/parallel-coordinates.js +3 -3
- package/modules/parallel-coordinates.src.js +12 -12
- package/modules/pareto.js +3 -3
- package/modules/pareto.src.js +3 -2
- package/modules/pathfinder.js +3 -3
- package/modules/pathfinder.src.js +18 -22
- package/modules/pattern-fill.js +3 -3
- package/modules/pattern-fill.src.js +22 -23
- package/modules/pictorial.js +3 -3
- package/modules/pictorial.src.js +25 -26
- package/modules/price-indicator.js +3 -3
- package/modules/price-indicator.src.js +3 -2
- package/modules/pyramid3d.js +3 -3
- package/modules/pyramid3d.src.js +3 -2
- package/modules/sankey.js +3 -3
- package/modules/sankey.src.js +93 -26
- package/modules/series-label.js +3 -3
- package/modules/series-label.src.js +28 -19
- package/modules/series-on-point.js +3 -3
- package/modules/series-on-point.src.js +5 -4
- package/modules/solid-gauge.js +3 -3
- package/modules/solid-gauge.src.js +3 -2
- package/modules/sonification.d.ts +2 -2
- package/modules/sonification.js +3 -3
- package/modules/sonification.src.d.ts +2 -2
- package/modules/sonification.src.js +8 -6
- package/modules/static-scale.js +3 -3
- package/modules/static-scale.src.js +6 -6
- package/modules/stock-tools.js +3 -3
- package/modules/stock-tools.src.js +109 -96
- package/modules/stock.d.ts +1 -1
- package/modules/stock.js +3 -3
- package/modules/stock.src.d.ts +1 -1
- package/modules/stock.src.js +10762 -10685
- package/modules/streamgraph.js +3 -3
- package/modules/streamgraph.src.js +3 -2
- package/modules/sunburst.js +3 -3
- package/modules/sunburst.src.js +50 -37
- package/modules/tiledwebmap.js +4 -4
- package/modules/tiledwebmap.src.js +28 -29
- package/modules/tilemap.js +3 -3
- package/modules/tilemap.src.js +4 -3
- package/modules/timeline.js +3 -3
- package/modules/timeline.src.js +5 -4
- package/modules/treegraph.js +3 -3
- package/modules/treegraph.src.js +58 -23
- package/modules/treegrid.js +3 -3
- package/modules/treegrid.src.js +49 -33
- package/modules/treemap.js +3 -3
- package/modules/treemap.src.js +44 -26
- package/modules/variable-pie.js +3 -3
- package/modules/variable-pie.src.js +3 -2
- package/modules/variwide.js +3 -3
- package/modules/variwide.src.js +9 -4
- package/modules/vector.js +3 -3
- package/modules/vector.src.js +3 -2
- package/modules/venn.js +3 -3
- package/modules/venn.src.js +16 -17
- package/modules/windbarb.js +3 -3
- package/modules/windbarb.src.js +5 -4
- package/modules/wordcloud.js +3 -3
- package/modules/wordcloud.src.js +10 -8
- package/modules/xrange.js +3 -3
- package/modules/xrange.src.js +5 -4
- package/package.json +1 -1
- package/standalone-navigator.js +2 -0
- package/standalone-navigator.src.js +49402 -0
- package/themes/avocado.js +3 -3
- package/themes/avocado.src.js +2 -1
- package/themes/brand-dark.js +3 -3
- package/themes/brand-dark.src.js +2 -1
- package/themes/brand-light.js +3 -3
- package/themes/brand-light.src.js +2 -1
- package/themes/dark-blue.js +3 -3
- package/themes/dark-blue.src.js +2 -1
- package/themes/dark-green.js +3 -3
- package/themes/dark-green.src.js +2 -1
- package/themes/dark-unica.js +3 -3
- package/themes/dark-unica.src.js +2 -1
- package/themes/gray.js +3 -3
- package/themes/gray.src.js +2 -1
- package/themes/grid-light.js +3 -3
- package/themes/grid-light.src.js +2 -1
- package/themes/grid.js +3 -3
- package/themes/grid.src.js +2 -1
- package/themes/high-contrast-dark.js +3 -3
- package/themes/high-contrast-dark.src.js +2 -1
- package/themes/high-contrast-light.js +3 -3
- package/themes/high-contrast-light.src.js +2 -1
- package/themes/sand-signika.js +3 -3
- package/themes/sand-signika.src.js +2 -1
- package/themes/skies.js +3 -3
- package/themes/skies.src.js +2 -1
- package/themes/sunset.js +3 -3
- package/themes/sunset.src.js +2 -1
- package/es-modules/Core/Renderer/HTML/HTMLRenderer.js +0 -259
- package/lib/canvg.js +0 -8
package/modules/sankey.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
* Highcharts JS v11.
|
|
1
|
+
!/**
|
|
2
|
+
* Highcharts JS v11.4.0 (2024-03-04)
|
|
3
3
|
*
|
|
4
4
|
* Sankey diagram module
|
|
5
5
|
*
|
|
6
6
|
* (c) 2010-2024 Torstein Honsi
|
|
7
7
|
*
|
|
8
8
|
* License: www.highcharts.com/license
|
|
9
|
-
*/!function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/sankey",["highcharts"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function o(t,e,o,i){t.hasOwnProperty(e)||(t[e]=i.apply(null,o),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}o(e,"Series/NodesComposition.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){var o;let{series:{prototype:i,prototype:{pointClass:{prototype:s}}}}=t,{defined:n,extend:r,find:l,merge:a,pick:d}=e;return function(t){function e(){return this.data=[].concat(this.points||[],this.nodes),i.destroy.apply(this,arguments)}function o(){this.nodes&&(this.nodes.forEach(t=>{t.destroy()}),this.nodes.length=0),i.setData.apply(this,arguments)}function h(t){let e=arguments,o=this.isNode?this.linksTo.concat(this.linksFrom):[this.fromNode,this.toNode];"select"!==t&&o.forEach(t=>{t&&t.series&&(s.setState.apply(t,e),!t.isNode&&(t.fromNode.graphic&&s.setState.apply(t.fromNode,e),t.toNode&&t.toNode.graphic&&s.setState.apply(t.toNode,e)))}),s.setState.apply(this,e)}function p(t,e,o,i){let n=this.series.options.nodes,r=this.series.options.data,l=r&&r.length||0,h=r&&r[this.index];if(s.update.call(this,t,!this.isNode&&e,o,i),this.isNode){let t=(n||[]).reduce((t,e,o)=>this.id===e.id?o:t,-1),i=a(n&&n[t]||{},r&&r[this.index]||{});r&&(h?r[this.index]=h:r.length=l),n?t>=0?n[t]=i:n.push(i):this.series.options.nodes=[i],d(e,!0)&&this.series.chart.redraw(o)}}t.compose=function(t,i){let s=t.prototype,n=i.prototype;return s.setNodeState=h,s.setState=h,s.update=p,n.destroy=e,n.setData=o,i},t.createNode=function(t){let e=this.pointClass,o=(t,e)=>l(t,t=>t.id===e),i=o(this.nodes,t),s;if(!i){s=this.options.nodes&&o(this.options.nodes,t);let n=new e(this,r({className:"highcharts-node",isNode:!0,id:t,y:1},s));n.linksTo=[],n.linksFrom=[],n.getSum=function(){let t=0,e=0;return n.linksTo.forEach(e=>{t+=e.weight||0}),n.linksFrom.forEach(t=>{e+=t.weight||0}),Math.max(t,e)},n.offset=function(t,e){let o=0;for(let i=0;i<n[e].length;i++){if(n[e][i]===t)return o;o+=n[e][i].weight}},n.hasShape=function(){let t=0;return n.linksTo.forEach(e=>{e.outgoing&&t++}),!n.linksTo.length||t!==n.linksTo.length},n.index=this.nodes.push(n)-1,i=n}return i.formatPrefix="node",i.name=i.name||i.options.id||"",i.mass=d(i.options.mass,i.options.marker&&i.options.marker.radius,this.options.marker&&this.options.marker.radius,4),i},t.destroy=e,t.generatePoints=function(){let t=this.chart,e={};i.generatePoints.call(this),this.nodes||(this.nodes=[]),this.colorCounter=0,this.nodes.forEach(t=>{t.linksFrom.length=0,t.linksTo.length=0,t.level=t.options.level}),this.points.forEach(o=>{n(o.from)&&(e[o.from]||(e[o.from]=this.createNode(o.from)),e[o.from].linksFrom.push(o),o.fromNode=e[o.from],t.styledMode?o.colorIndex=d(o.options.colorIndex,e[o.from].colorIndex):o.color=o.options.color||e[o.from].color),n(o.to)&&(e[o.to]||(e[o.to]=this.createNode(o.to)),e[o.to].linksTo.push(o),o.toNode=e[o.to]),o.name=o.name||o.id},this),this.nodeLookup=e},t.setNodeState=h,t.updateNode=p}(o||(o={})),o}),o(e,"Series/Sankey/SankeyPoint.js",[e["Core/Series/Point.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,o){let{column:i}=e.seriesTypes,{defined:s}=o;class n extends i.prototype.pointClass{applyOptions(e,o){return t.prototype.applyOptions.call(this,e,o),s(this.options.level)&&(this.options.column=this.column=this.options.level),this}getClassName(){return(this.isNode?"highcharts-node ":"highcharts-link ")+t.prototype.getClassName.call(this)}getFromNode(){let t=-1,e;for(let o=0;o<this.linksTo.length;o++){let i=this.linksTo[o];i.fromNode.column>t&&i.fromNode!==this&&(t=(e=i.fromNode).column)}return{fromNode:e,fromColumn:t}}setNodeColumn(){s(this.options.column)||(0===this.linksTo.length?this.column=0:this.column=this.getFromNode().fromColumn+1)}isValid(){return this.isNode||"number"==typeof this.weight}}return n}),o(e,"Series/Sankey/SankeySeriesDefaults.js",[],function(){return{borderWidth:0,colorByPoint:!0,curveFactor:.33,dataLabels:{enabled:!0,backgroundColor:"none",crop:!1,nodeFormat:void 0,nodeFormatter:function(){return this.point.name},format:void 0,formatter:function(){},inside:!0},inactiveOtherPoints:!0,linkColorMode:"from",linkOpacity:.5,opacity:1,minLinkWidth:0,nodeAlignment:"center",nodeWidth:20,nodePadding:10,showInLegend:!1,states:{hover:{linkOpacity:1,opacity:1},inactive:{linkOpacity:.1,opacity:.1,animation:{duration:50}}},tooltip:{followPointer:!0,headerFormat:'<span style="font-size: 0.8em">{series.name}</span><br/>',pointFormat:"{point.fromNode.name} → {point.toNode.name}: <b>{point.weight}</b><br/>",nodeFormat:"{point.name}: <b>{point.sum}</b><br/>"}}}),o(e,"Series/Sankey/SankeyColumnComposition.js",[e["Core/Utilities.js"]],function(t){var e;let{defined:o,pushUnique:i,relativeLength:s}=t;return function(t){t.compose=function(t,o){return t.sankeyColumn=new e(t,o),t};class e{constructor(t,e){this.points=t,this.series=e}getTranslationFactor(t){let e=this.points,o=e.slice(),i=t.chart,s=t.options.minLinkWidth||0,n,r=0,l,a=(i.plotSizeY||0)-(t.options.borderWidth||0)-(e.length-1)*t.nodePadding;for(;e.length;){for(r=a/e.sankeyColumn.sum(),n=!1,l=e.length;l--;)e[l].getSum()*r<s&&(e.splice(l,1),a=Math.max(0,a-s),n=!0);if(!n)break}for(let t of(e.length=0,o))e.push(t);return r}top(t){let e=this.series,o=e.nodePadding,i=this.points.reduce((i,s)=>{i>0&&(i+=o);let n=Math.max(s.getSum()*t,e.options.minLinkWidth||0);return i+n},0);return({top:0,center:.5,bottom:1})[e.options.nodeAlignment||"center"]*((e.chart.plotSizeY||0)-i)}left(t){let e=this.series,o=e.chart,i=e.options.equalNodes,s=o.inverted?o.plotHeight:o.plotWidth,n=e.nodePadding,r=this.points.reduce((o,r)=>{o>0&&(o+=n);let l=i?s/r.series.nodes.length-n:Math.max(r.getSum()*t,e.options.minLinkWidth||0);return o+l},0);return((o.plotSizeX||0)-Math.round(r))/2}sum(){return this.points.reduce((t,e)=>t+e.getSum(),0)}offset(t,e){let i=this.points,n=this.series,r=n.nodePadding,l=0,a;if(n.is("organization")&&t.hangsFrom)return{absoluteTop:t.hangsFrom.nodeY};for(let d=0;d<i.length;d++){let h=i[d].getSum(),p=Math.max(h*e,n.options.minLinkWidth||0),c=t.options[n.chart.inverted?"offsetHorizontal":"offsetVertical"],u=t.options.offset||0;if(a=h?p+r:0,i[d]===t)return{relativeTop:l+(o(c)?s(c,p):s(u,a))};l+=a}}}t.SankeyColumnAdditions=e}(e||(e={})),e}),o(e,"Series/TreeUtilities.js",[e["Core/Color/Color.js"],e["Core/Utilities.js"]],function(t,e){let{extend:o,isArray:i,isNumber:s,isObject:n,merge:r,pick:l}=e;return{getColor:function(e,o){let i,s,n,r,a,d;let h=o.index,p=o.mapOptionsToLevel,c=o.parentColor,u=o.parentColorIndex,f=o.series,m=o.colors,g=o.siblings,y=f.points,k=f.chart.options.chart;return e&&(i=y[e.i],s=p[e.level]||{},i&&s.colorByPoint&&(r=i.index%(m?m.length:k.colorCount),n=m&&m[r]),f.chart.styledMode||(a=l(i&&i.options.color,s&&s.color,n,c&&(e=>{let o=s&&s.colorVariation;return o&&"brightness"===o.key&&h&&g?t.parse(e).brighten(o.to*(h/g)).get():e})(c),f.color)),d=l(i&&i.options.colorIndex,s&&s.colorIndex,r,u,o.colorIndex)),{color:a,colorIndex:d}},getLevelOptions:function(t){let e={},o,a,d,h,p,c;if(n(t))for(h=s(t.from)?t.from:1,c=t.levels,a={},o=n(t.defaults)?t.defaults:{},i(c)&&(a=c.reduce((t,e)=>{let i,a,d;return n(e)&&s(e.level)&&(a=l((d=r({},e)).levelIsConstant,o.levelIsConstant),delete d.levelIsConstant,delete d.level,n(t[i=e.level+(a?0:h-1)])?r(!0,t[i],d):t[i]=d),t},{})),p=s(t.to)?t.to:1,d=0;d<=p;d++)e[d]=r({},o,n(a[d])?a[d]:{});return e},setTreeValues:function t(e,i){let s=i.before,n=i.idRoot,r=i.mapIdToNode,a=r[n],d=!1!==i.levelIsConstant,h=i.points,p=h[e.i],c=p&&p.options||{},u=[],f=0;e.levelDynamic=e.level-(d?0:a.level),e.name=l(p&&p.name,""),e.visible=n===e.id||!0===i.visible,"function"==typeof s&&(e=s(e,i)),e.children.forEach((s,n)=>{let r=o({},i);o(r,{index:n,siblings:e.children.length,visible:e.visible}),s=t(s,r),u.push(s),s.visible&&(f+=s.val)});let m=l(c.value,f);return e.visible=m>=0&&(f>0||e.visible),e.children=u,e.childrenTotal=f,e.isLeaf=e.visible&&!f,e.val=m,e},updateRootId:function(t){let e,o;return n(t)&&(o=n(t.options)?t.options:{},e=l(t.rootNode,o.rootId,""),n(t.userOptions)&&(t.userOptions.rootId=e),t.rootNode=e),e}}}),o(e,"Series/Sankey/SankeySeries.js",[e["Core/Globals.js"],e["Series/NodesComposition.js"],e["Series/Sankey/SankeyPoint.js"],e["Series/Sankey/SankeySeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Series/Sankey/SankeyColumnComposition.js"],e["Core/Color/Color.js"],e["Series/TreeUtilities.js"],e["Core/Utilities.js"]],function(t,e,o,i,s,n,r,l,a){let{column:d,line:h}=s.seriesTypes,{parse:p}=r,{getLevelOptions:c}=l,{clamp:u,extend:f,isObject:m,merge:g,pick:y,relativeLength:k,stableSort:C}=a;class v extends d{static getDLOptions(t){let e=m(t.optionsPoint)?t.optionsPoint.dataLabels:{},o=m(t.level)?t.level.dataLabels:{},i=g({style:{}},o,e);return i}createNodeColumns(){let t=[];for(let e of this.nodes)e.setNodeColumn(),t[e.column]||(t[e.column]=n.compose([],this)),t[e.column].push(e);for(let e=0;e<t.length;e++)void 0===t[e]&&(t[e]=n.compose([],this));return t}order(t,e){if(void 0===t.level)for(let o of(t.level=e,t.linksFrom))o.toNode&&this.order(o.toNode,e+1)}generatePoints(){if(e.generatePoints.apply(this,arguments),this.orderNodes){for(let t of this.nodes)0===t.linksTo.length&&this.order(t,0);C(this.nodes,(t,e)=>t.level-e.level)}}getNodePadding(){let t=this.options.nodePadding||0;if(this.nodeColumns){let e=this.nodeColumns.reduce((t,e)=>Math.max(t,e.length),0);e*t>this.chart.plotSizeY&&(t=this.chart.plotSizeY/e)}return t}hasData(){return!!this.processedXData.length}pointAttribs(t,e){if(!t)return{};let o=this,i=t.isNode?t.level:t.fromNode.level,s=o.mapOptionsToLevel[i||0]||{},n=t.options,l=s.states&&s.states[e||""]||{},a=["colorByPoint","borderColor","borderWidth","linkOpacity","opacity"].reduce((t,e)=>(t[e]=y(l[e],n[e],s[e],o.options[e]),t),{}),d=y(l.color,n.color,a.colorByPoint?t.color:s.color);return t.isNode?{fill:d,stroke:a.borderColor,"stroke-width":a.borderWidth,opacity:a.opacity}:{fill:r.parse(d).setOpacity(a.linkOpacity).get()}}drawTracker(){d.prototype.drawTracker.call(this,this.points),d.prototype.drawTracker.call(this,this.nodes)}drawPoints(){d.prototype.drawPoints.call(this,this.points),d.prototype.drawPoints.call(this,this.nodes)}drawDataLabels(){d.prototype.drawDataLabels.call(this,this.points),d.prototype.drawDataLabels.call(this,this.nodes)}translate(){this.processedXData||this.processData(),this.generatePoints(),this.nodeColumns=this.createNodeColumns(),this.nodeWidth=k(this.options.nodeWidth,this.chart.plotSizeX);let t=this,e=this.chart,o=this.options,i=this.nodeWidth,s=this.nodeColumns;for(let n of(this.nodePadding=this.getNodePadding(),this.translationFactor=s.reduce((e,o)=>Math.min(e,o.sankeyColumn.getTranslationFactor(t)),1/0),this.colDistance=(e.plotSizeX-i-o.borderWidth)/Math.max(1,s.length-1),t.mapOptionsToLevel=c({from:1,levels:o.levels,to:s.length-1,defaults:{borderColor:o.borderColor,borderRadius:o.borderRadius,borderWidth:o.borderWidth,color:t.color,colorByPoint:o.colorByPoint,levelIsConstant:!0,linkColor:o.linkColor,linkLineWidth:o.linkLineWidth,linkOpacity:o.linkOpacity,states:o.states}}),s))for(let e of n)t.translateNode(e,n);for(let e of this.nodes)for(let o of e.linksFrom)(o.weight||o.isNull)&&o.to&&(t.translateLink(o),o.allowShadow=!1)}translateLink(t){let e=(e,o)=>{let i=e.offset(t,o)*r,s=Math.min(e.nodeY+i,e.nodeY+(e.shapeArgs&&e.shapeArgs.height||0)-f);return s},o=t.fromNode,i=t.toNode,s=this.chart,{inverted:n}=s,r=this.translationFactor,l=this.options,a=y(t.linkColorMode,l.linkColorMode),d=(s.inverted?-this.colDistance:this.colDistance)*l.curveFactor,h=o.nodeX,c=i.nodeX,u=t.outgoing,f=Math.max(t.weight*r,this.options.minLinkWidth),m=e(o,"linksFrom"),g=e(i,"linksTo"),k=this.nodeWidth,C=c>h+k;if(s.inverted&&(m=s.plotSizeY-m,g=(s.plotSizeY||0)-g,k=-k,f=-f,C=h>c),t.shapeType="path",t.linkBase=[m,m+f,g,g+f],C&&"number"==typeof g)t.shapeArgs={d:[["M",h+k,m],["C",h+k+d,m,c-d,g,c,g],["L",c+(u?k:0),g+f/2],["L",c,g+f],["C",c-d,g+f,h+k+d,m+f,h+k,m+f],["Z"]]};else if("number"==typeof g){let e=s.plotHeight-m-f,o=c-20-f,i=c-20,n=h+k,r=n+20,l=r+f,a=m,d=m+f,p=d+20,u=p+e,y=u+20,C=y+f,v=g,S=v+f,N=S+20,b=d-.7*f,x=y+.7*f,L=S-.7*f,T=c-.7*f,P=n+.7*f;t.shapeArgs={d:[["M",n,a],["C",P,a,l,b,l,p],["L",l,u],["C",l,x,P,C,n,C],["L",c,C],["C",T,C,o,x,o,u],["L",o,N],["C",o,L,T,v,c,v],["L",c,S],["C",i,S,i,S,i,N],["L",i,u],["C",i,y,i,y,c,y],["L",n,y],["C",r,y,r,y,r,u],["L",r,p],["C",r,d,r,d,n,d],["Z"]]}}if(t.dlBox={x:h+(c-h+k)/2,y:m+(g-m)/2,height:f,width:0},t.tooltipPos=s.inverted?[s.plotSizeY-t.dlBox.y-f/2,s.plotSizeX-t.dlBox.x]:[t.dlBox.x,t.dlBox.y+f/2],t.y=t.plotY=1,t.x=t.plotX=1,!t.options.color){if("from"===a)t.color=o.color;else if("to"===a)t.color=i.color;else if("gradient"===a){let e=p(o.color).get(),s=p(i.color).get();t.color={linearGradient:{x1:1,x2:0,y1:0,y2:0},stops:[[0,n?e:s],[1,n?s:e]]}}}}translateNode(t,e){let o=this.translationFactor,i=this.chart,s=this.options,{borderRadius:n,borderWidth:r=0}=s,l=t.getSum(),a=Math.max(Math.round(l*o),this.options.minLinkWidth),d=Math.round(this.nodeWidth),h=Math.round(r)%2/2,p=e.sankeyColumn.offset(t,o),c=Math.floor(y(p.absoluteTop,e.sankeyColumn.top(o)+p.relativeTop))+h,f=Math.floor(this.colDistance*t.column+r/2)+k(t.options[i.inverted?"offsetVertical":"offsetHorizontal"]||0,d)+h,m=i.inverted?i.plotSizeX-f:f;if(t.sum=l,l){t.shapeType="roundedRect",t.nodeX=m,t.nodeY=c;let e=m,o=c,r=t.options.width||s.width||d,l=t.options.height||s.height||a,h=u(k("object"==typeof n?n.radius:n||0,r),0,a/2);i.inverted&&(e=m-d,o=i.plotSizeY-c-a,r=t.options.height||s.height||d,l=t.options.width||s.width||a),t.dlOptions=v.getDLOptions({level:this.mapOptionsToLevel[t.level],optionsPoint:t.options}),t.plotX=1,t.plotY=1,t.tooltipPos=i.inverted?[i.plotSizeY-o-l/2,i.plotSizeX-e-r/2]:[e+r/2,o+l/2],t.shapeArgs={x:e,y:o,width:r,height:l,r:h,display:t.hasShape()?"":"none"}}else t.dlOptions={enabled:!1}}}return v.defaultOptions=g(d.defaultOptions,i),e.compose(o,v),f(v.prototype,{animate:h.prototype.animate,createNode:e.createNode,forceDL:!0,invertible:!0,isCartesian:!1,orderNodes:!0,noSharedTooltip:!0,pointArrayMap:["from","to","weight"],pointClass:o,searchPoint:t.noop}),s.registerSeriesType("sankey",v),v}),o(e,"masters/modules/sankey.src.js",[],function(){})});
|
|
9
|
+
*/function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/sankey",["highcharts"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function o(t,e,o,i){t.hasOwnProperty(e)||(t[e]=i.apply(null,o),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}o(e,"Series/NodesComposition.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){var o;let{series:{prototype:i,prototype:{pointClass:{prototype:s}}}}=t,{defined:n,extend:r,find:l,merge:a,pick:d}=e;return function(t){function e(){return this.data=[].concat(this.points||[],this.nodes),i.destroy.apply(this,arguments)}function o(){this.nodes&&(this.nodes.forEach(t=>{t.destroy()}),this.nodes.length=0),i.setData.apply(this,arguments)}function h(t){let e=arguments,o=this.isNode?this.linksTo.concat(this.linksFrom):[this.fromNode,this.toNode];"select"!==t&&o.forEach(t=>{t&&t.series&&(s.setState.apply(t,e),!t.isNode&&(t.fromNode.graphic&&s.setState.apply(t.fromNode,e),t.toNode&&t.toNode.graphic&&s.setState.apply(t.toNode,e)))}),s.setState.apply(this,e)}function p(t,e,o,i){let n=this.series.options.nodes,r=this.series.options.data,l=r&&r.length||0,h=r&&r[this.index];if(s.update.call(this,t,!this.isNode&&e,o,i),this.isNode){let t=(n||[]).reduce((t,e,o)=>this.id===e.id?o:t,-1),i=a(n&&n[t]||{},r&&r[this.index]||{});r&&(h?r[this.index]=h:r.length=l),n?t>=0?n[t]=i:n.push(i):this.series.options.nodes=[i],d(e,!0)&&this.series.chart.redraw(o)}}t.compose=function(t,i){let s=t.prototype,n=i.prototype;return s.setNodeState=h,s.setState=h,s.update=p,n.destroy=e,n.setData=o,i},t.createNode=function(t){let e=this.pointClass,o=(t,e)=>l(t,t=>t.id===e),i=o(this.nodes,t),s;if(!i){s=this.options.nodes&&o(this.options.nodes,t);let n=new e(this,r({className:"highcharts-node",isNode:!0,id:t,y:1},s));n.linksTo=[],n.linksFrom=[],n.getSum=function(){let t=0,e=0;return n.linksTo.forEach(e=>{t+=e.weight||0}),n.linksFrom.forEach(t=>{e+=t.weight||0}),Math.max(t,e)},n.offset=function(t,e){let o=0;for(let i=0;i<n[e].length;i++){if(n[e][i]===t)return o;o+=n[e][i].weight}},n.hasShape=function(){let t=0;return n.linksTo.forEach(e=>{e.outgoing&&t++}),!n.linksTo.length||t!==n.linksTo.length},n.index=this.nodes.push(n)-1,i=n}return i.formatPrefix="node",i.name=i.name||i.options.id||"",i.mass=d(i.options.mass,i.options.marker&&i.options.marker.radius,this.options.marker&&this.options.marker.radius,4),i},t.destroy=e,t.generatePoints=function(){let t=this.chart,e={};i.generatePoints.call(this),this.nodes||(this.nodes=[]),this.colorCounter=0,this.nodes.forEach(t=>{t.linksFrom.length=0,t.linksTo.length=0,t.level=t.options.level}),this.points.forEach(o=>{n(o.from)&&(e[o.from]||(e[o.from]=this.createNode(o.from)),e[o.from].linksFrom.push(o),o.fromNode=e[o.from],t.styledMode?o.colorIndex=d(o.options.colorIndex,e[o.from].colorIndex):o.color=o.options.color||e[o.from].color),n(o.to)&&(e[o.to]||(e[o.to]=this.createNode(o.to)),e[o.to].linksTo.push(o),o.toNode=e[o.to]),o.name=o.name||o.id},this),this.nodeLookup=e},t.setNodeState=h,t.updateNode=p}(o||(o={})),o}),o(e,"Series/Sankey/SankeyPoint.js",[e["Core/Series/Point.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,o){let{column:i}=e.seriesTypes,{defined:s}=o;class n extends i.prototype.pointClass{applyOptions(e,o){return t.prototype.applyOptions.call(this,e,o),s(this.options.level)&&(this.options.column=this.column=this.options.level),this}getClassName(){return(this.isNode?"highcharts-node ":"highcharts-link ")+t.prototype.getClassName.call(this)}getFromNode(){let t=-1,e;for(let o=0;o<this.linksTo.length;o++){let i=this.linksTo[o];i.fromNode.column>t&&i.fromNode!==this&&(t=(e=i.fromNode).column)}return{fromNode:e,fromColumn:t}}setNodeColumn(){s(this.options.column)||(0===this.linksTo.length?this.column=0:this.column=this.getFromNode().fromColumn+1)}isValid(){return this.isNode||"number"==typeof this.weight}}return n}),o(e,"Series/Sankey/SankeySeriesDefaults.js",[],function(){return{borderWidth:0,colorByPoint:!0,curveFactor:.33,dataLabels:{enabled:!0,backgroundColor:"none",crop:!1,nodeFormat:void 0,nodeFormatter:function(){return this.point.name},format:void 0,formatter:function(){},inside:!0},inactiveOtherPoints:!0,linkColorMode:"from",linkOpacity:.5,opacity:1,minLinkWidth:0,nodeAlignment:"center",nodeWidth:20,nodePadding:10,nodeDistance:30,showInLegend:!1,states:{hover:{linkOpacity:1,opacity:1},inactive:{linkOpacity:.1,opacity:.1,animation:{duration:50}}},tooltip:{followPointer:!0,headerFormat:'<span style="font-size: 0.8em">{series.name}</span><br/>',pointFormat:"{point.fromNode.name} → {point.toNode.name}: <b>{point.weight}</b><br/>",nodeFormat:"{point.name}: <b>{point.sum}</b><br/>"}}}),o(e,"Series/Sankey/SankeyColumnComposition.js",[e["Core/Utilities.js"]],function(t){var e;let{defined:o,relativeLength:i}=t;return function(t){t.compose=function(t,o){return t.sankeyColumn=new e(t,o),t};class e{constructor(t,e){this.points=t,this.series=e}getTranslationFactor(t){let e=this.points,o=e.slice(),i=t.chart,s=t.options.minLinkWidth||0,n,r=0,l,a=(i.plotSizeY||0)-(t.options.borderWidth||0)-(e.length-1)*t.nodePadding;for(;e.length;){for(r=a/e.sankeyColumn.sum(),n=!1,l=e.length;l--;)e[l].getSum()*r<s&&(e.splice(l,1),a=Math.max(0,a-s),n=!0);if(!n)break}for(let t of(e.length=0,o))e.push(t);return r}top(t){let e=this.series,o=e.nodePadding,i=this.points.reduce((i,s)=>(i>0&&(i+=o),i+=Math.max(s.getSum()*t,e.options.minLinkWidth||0)),0);return({top:0,center:.5,bottom:1})[e.options.nodeAlignment||"center"]*((e.chart.plotSizeY||0)-i)}left(t){let e=this.series,o=e.chart,i=e.options.equalNodes,s=o.inverted?o.plotHeight:o.plotWidth,n=e.nodePadding,r=this.points.reduce((o,r)=>(o>0&&(o+=n),o+=i?s/r.series.nodes.length-n:Math.max(r.getSum()*t,e.options.minLinkWidth||0)),0);return((o.plotSizeX||0)-Math.round(r))/2}sum(){return this.points.reduce((t,e)=>t+e.getSum(),0)}offset(t,e){let s=this.points,n=this.series,r=n.nodePadding,l=0,a;if(n.is("organization")&&t.hangsFrom)return{absoluteTop:t.hangsFrom.nodeY};for(let d=0;d<s.length;d++){let h=s[d].getSum(),p=Math.max(h*e,n.options.minLinkWidth||0),c=t.options[n.chart.inverted?"offsetHorizontal":"offsetVertical"],u=t.options.offset||0;if(a=h?p+r:0,s[d]===t)return{relativeTop:l+(o(c)?i(c,p):i(u,a))};l+=a}}}t.SankeyColumnAdditions=e}(e||(e={})),e}),o(e,"Series/TreeUtilities.js",[e["Core/Color/Color.js"],e["Core/Utilities.js"]],function(t,e){let{extend:o,isArray:i,isNumber:s,isObject:n,merge:r,pick:l,relativeLength:a}=e;return{getColor:function(e,o){let i,s,n,r,a,d;let h=o.index,p=o.mapOptionsToLevel,c=o.parentColor,u=o.parentColorIndex,f=o.series,m=o.colors,g=o.siblings,y=f.points,k=f.chart.options.chart;return e&&(i=y[e.i],s=p[e.level]||{},i&&s.colorByPoint&&(r=i.index%(m?m.length:k.colorCount),n=m&&m[r]),f.chart.styledMode||(a=l(i&&i.options.color,s&&s.color,n,c&&(e=>{let o=s&&s.colorVariation;return o&&"brightness"===o.key&&h&&g?t.parse(e).brighten(o.to*(h/g)).get():e})(c),f.color)),d=l(i&&i.options.colorIndex,s&&s.colorIndex,r,u,o.colorIndex)),{color:a,colorIndex:d}},getLevelOptions:function(t){let e={},o,a,d,h,p,c;if(n(t))for(h=s(t.from)?t.from:1,c=t.levels,a={},o=n(t.defaults)?t.defaults:{},i(c)&&(a=c.reduce((t,e)=>{let i,a,d;return n(e)&&s(e.level)&&(a=l((d=r({},e)).levelIsConstant,o.levelIsConstant),delete d.levelIsConstant,delete d.level,n(t[i=e.level+(a?0:h-1)])?r(!0,t[i],d):t[i]=d),t},{})),p=s(t.to)?t.to:1,d=0;d<=p;d++)e[d]=r({},o,n(a[d])?a[d]:{});return e},getNodeWidth:function(t,e){let{chart:o,options:i}=t,{nodeDistance:s=0,nodeWidth:n=0}=i,{plotSizeX:r=1}=o;if("auto"===n){if("string"==typeof s&&/%$/.test(s))return r/(e+parseFloat(s)/100*(e-1));let t=Number(s);return(r+t)/(e||1)-t}return a(n,r)},setTreeValues:function t(e,i){let s=i.before,n=i.idRoot,r=i.mapIdToNode[n],a=!1!==i.levelIsConstant,d=i.points[e.i],h=d&&d.options||{},p=[],c=0;e.levelDynamic=e.level-(a?0:r.level),e.name=l(d&&d.name,""),e.visible=n===e.id||!0===i.visible,"function"==typeof s&&(e=s(e,i)),e.children.forEach((s,n)=>{let r=o({},i);o(r,{index:n,siblings:e.children.length,visible:e.visible}),s=t(s,r),p.push(s),s.visible&&(c+=s.val)});let u=l(h.value,c);return e.visible=u>=0&&(c>0||e.visible),e.children=p,e.childrenTotal=c,e.isLeaf=e.visible&&!c,e.val=u,e},updateRootId:function(t){let e,o;return n(t)&&(o=n(t.options)?t.options:{},e=l(t.rootNode,o.rootId,""),n(t.userOptions)&&(t.userOptions.rootId=e),t.rootNode=e),e}}}),o(e,"Series/Sankey/SankeySeries.js",[e["Core/Globals.js"],e["Series/NodesComposition.js"],e["Series/Sankey/SankeyPoint.js"],e["Series/Sankey/SankeySeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Series/Sankey/SankeyColumnComposition.js"],e["Core/Color/Color.js"],e["Series/TreeUtilities.js"],e["Core/Utilities.js"]],function(t,e,o,i,s,n,r,l,a){let{column:d,line:h}=s.seriesTypes,{parse:p}=r,{getLevelOptions:c,getNodeWidth:u}=l,{clamp:f,extend:m,isObject:g,merge:y,pick:k,relativeLength:C,stableSort:v}=a;class S extends d{static getDLOptions(t){let e=g(t.optionsPoint)?t.optionsPoint.dataLabels:{};return y({style:{}},g(t.level)?t.level.dataLabels:{},e)}createNodeColumns(){let t=[];for(let e of this.nodes)e.setNodeColumn(),t[e.column]||(t[e.column]=n.compose([],this)),t[e.column].push(e);for(let e=0;e<t.length;e++)void 0===t[e]&&(t[e]=n.compose([],this));return t}order(t,e){if(void 0===t.level)for(let o of(t.level=e,t.linksFrom))o.toNode&&this.order(o.toNode,e+1)}generatePoints(){if(e.generatePoints.apply(this,arguments),this.orderNodes){for(let t of this.nodes)0===t.linksTo.length&&this.order(t,0);v(this.nodes,(t,e)=>t.level-e.level)}}getNodePadding(){let t=this.options.nodePadding||0;if(this.nodeColumns){let e=this.nodeColumns.reduce((t,e)=>Math.max(t,e.length),0);e*t>this.chart.plotSizeY&&(t=this.chart.plotSizeY/e)}return t}hasData(){return!!this.processedXData.length}pointAttribs(t,e){if(!t)return{};let o=this,i=t.isNode?t.level:t.fromNode.level,s=o.mapOptionsToLevel[i||0]||{},n=t.options,l=s.states&&s.states[e||""]||{},a=["colorByPoint","borderColor","borderWidth","linkOpacity","opacity"].reduce((t,e)=>(t[e]=k(l[e],n[e],s[e],o.options[e]),t),{}),d=k(l.color,n.color,a.colorByPoint?t.color:s.color);return t.isNode?{fill:d,stroke:a.borderColor,"stroke-width":a.borderWidth,opacity:a.opacity}:{fill:r.parse(d).setOpacity(a.linkOpacity).get()}}drawTracker(){d.prototype.drawTracker.call(this,this.points),d.prototype.drawTracker.call(this,this.nodes)}drawPoints(){d.prototype.drawPoints.call(this,this.points),d.prototype.drawPoints.call(this,this.nodes)}drawDataLabels(){d.prototype.drawDataLabels.call(this,this.points),d.prototype.drawDataLabels.call(this,this.nodes)}translate(){this.processedXData||this.processData(),this.generatePoints(),this.nodeColumns=this.createNodeColumns();let t=this,e=this.chart,o=this.options,i=this.nodeColumns,s=i.length;for(let n of(this.nodeWidth=u(this,s),this.nodePadding=this.getNodePadding(),this.translationFactor=i.reduce((e,o)=>Math.min(e,o.sankeyColumn.getTranslationFactor(t)),1/0),this.colDistance=(e.plotSizeX-this.nodeWidth-o.borderWidth)/Math.max(1,i.length-1),t.mapOptionsToLevel=c({from:1,levels:o.levels,to:i.length-1,defaults:{borderColor:o.borderColor,borderRadius:o.borderRadius,borderWidth:o.borderWidth,color:t.color,colorByPoint:o.colorByPoint,levelIsConstant:!0,linkColor:o.linkColor,linkLineWidth:o.linkLineWidth,linkOpacity:o.linkOpacity,states:o.states}}),i))for(let e of n)t.translateNode(e,n);for(let e of this.nodes)for(let o of e.linksFrom)(o.weight||o.isNull)&&o.to&&(t.translateLink(o),o.allowShadow=!1)}translateLink(t){let e=(e,o)=>{let i=e.offset(t,o)*r;return Math.min(e.nodeY+i,e.nodeY+(e.shapeArgs&&e.shapeArgs.height||0)-f)},o=t.fromNode,i=t.toNode,s=this.chart,{inverted:n}=s,r=this.translationFactor,l=this.options,a=k(t.linkColorMode,l.linkColorMode),d=(s.inverted?-this.colDistance:this.colDistance)*l.curveFactor,h=o.nodeX,c=i.nodeX,u=t.outgoing,f=Math.max(t.weight*r,this.options.minLinkWidth),m=e(o,"linksFrom"),g=e(i,"linksTo"),y=this.nodeWidth,C=c>h+y;if(s.inverted&&(m=s.plotSizeY-m,g=(s.plotSizeY||0)-g,y=-y,f=-f,C=h>c),t.shapeType="path",t.linkBase=[m,m+f,g,g+f],C&&"number"==typeof g)t.shapeArgs={d:[["M",h+y,m],["C",h+y+d,m,c-d,g,c,g],["L",c+(u?y:0),g+f/2],["L",c,g+f],["C",c-d,g+f,h+y+d,m+f,h+y,m+f],["Z"]]};else if("number"==typeof g){let e=s.plotHeight-m-f,o=c-20-f,i=c-20,n=h+y,r=n+20,l=r+f,a=m,d=m+f,p=d+20,u=p+e,k=u+20,C=k+f,v=g,S=v+f,N=S+20,b=d-.7*f,x=k+.7*f,L=S-.7*f,T=c-.7*f,P=n+.7*f;t.shapeArgs={d:[["M",n,a],["C",P,a,l,b,l,p],["L",l,u],["C",l,x,P,C,n,C],["L",c,C],["C",T,C,o,x,o,u],["L",o,N],["C",o,L,T,v,c,v],["L",c,S],["C",i,S,i,S,i,N],["L",i,u],["C",i,k,i,k,c,k],["L",n,k],["C",r,k,r,k,r,u],["L",r,p],["C",r,d,r,d,n,d],["Z"]]}}if(t.dlBox={x:h+(c-h+y)/2,y:m+(g-m)/2,height:f,width:0},t.tooltipPos=s.inverted?[s.plotSizeY-t.dlBox.y-f/2,s.plotSizeX-t.dlBox.x]:[t.dlBox.x,t.dlBox.y+f/2],t.y=t.plotY=1,t.x=t.plotX=1,!t.options.color){if("from"===a)t.color=o.color;else if("to"===a)t.color=i.color;else if("gradient"===a){let e=p(o.color).get(),s=p(i.color).get();t.color={linearGradient:{x1:1,x2:0,y1:0,y2:0},stops:[[0,n?e:s],[1,n?s:e]]}}}}translateNode(t,e){let o=this.translationFactor,i=this.chart,s=this.options,{borderRadius:n,borderWidth:r=0}=s,l=t.getSum(),a=Math.max(Math.round(l*o),this.options.minLinkWidth),d=Math.round(this.nodeWidth),h=Math.round(r)%2/2,p=e.sankeyColumn.offset(t,o),c=Math.floor(k(p.absoluteTop,e.sankeyColumn.top(o)+p.relativeTop))+h,u=Math.floor(this.colDistance*t.column+r/2)+C(t.options[i.inverted?"offsetVertical":"offsetHorizontal"]||0,d)+h,m=i.inverted?i.plotSizeX-u:u;if(t.sum=l,l){t.shapeType="roundedRect",t.nodeX=m,t.nodeY=c;let e=m,o=c,r=t.options.width||s.width||d,l=t.options.height||s.height||a,h=f(C("object"==typeof n?n.radius:n||0,r),0,a/2);i.inverted&&(e=m-d,o=i.plotSizeY-c-a,r=t.options.height||s.height||d,l=t.options.width||s.width||a),t.dlOptions=S.getDLOptions({level:this.mapOptionsToLevel[t.level],optionsPoint:t.options}),t.plotX=1,t.plotY=1,t.tooltipPos=i.inverted?[i.plotSizeY-o-l/2,i.plotSizeX-e-r/2]:[e+r/2,o+l/2],t.shapeArgs={x:e,y:o,width:r,height:l,r:h,display:t.hasShape()?"":"none"}}else t.dlOptions={enabled:!1}}}return S.defaultOptions=y(d.defaultOptions,i),e.compose(o,S),m(S.prototype,{animate:h.prototype.animate,createNode:e.createNode,forceDL:!0,invertible:!0,isCartesian:!1,orderNodes:!0,noSharedTooltip:!0,pointArrayMap:["from","to","weight"],pointClass:o,searchPoint:t.noop}),s.registerSeriesType("sankey",S),S}),o(e,"masters/modules/sankey.src.js",[e["Core/Globals.js"]],function(t){return t})});
|
package/modules/sankey.src.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Highcharts JS v11.
|
|
2
|
+
* @license Highcharts JS v11.4.0 (2024-03-05)
|
|
3
3
|
*
|
|
4
4
|
* Sankey diagram module
|
|
5
5
|
*
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
}
|
|
149
149
|
NodesComposition.createNode = createNode;
|
|
150
150
|
/**
|
|
151
|
-
* Destroy
|
|
151
|
+
* Destroy all nodes and links.
|
|
152
152
|
* @private
|
|
153
153
|
*/
|
|
154
154
|
function destroy() {
|
|
@@ -622,23 +622,57 @@
|
|
|
622
622
|
*/
|
|
623
623
|
nodeAlignment: 'center',
|
|
624
624
|
/**
|
|
625
|
-
* The pixel width of each node in a sankey diagram or dependency wheel,
|
|
626
|
-
*
|
|
625
|
+
* The pixel width of each node in a sankey diagram or dependency wheel, or
|
|
626
|
+
* the height in case the chart is inverted.
|
|
627
627
|
*
|
|
628
|
-
*
|
|
628
|
+
* Can be a number or a percentage string.
|
|
629
|
+
*
|
|
630
|
+
* Sankey series also support setting it to `auto`. With this setting, the
|
|
631
|
+
* nodes are sized to fill up the plot area in the longitudinal direction,
|
|
632
|
+
* regardless of the number of levels.
|
|
633
|
+
*
|
|
634
|
+
* @see [sankey.nodeDistance](#nodeDistance)
|
|
635
|
+
* @sample highcharts/series-sankey/node-distance
|
|
636
|
+
* Sankey with auto node width combined with node distance
|
|
637
|
+
* @sample highcharts/series-organization/node-distance
|
|
638
|
+
* Organization chart with node distance of 50%
|
|
639
|
+
*
|
|
640
|
+
* @type {number|string}
|
|
629
641
|
*/
|
|
630
642
|
nodeWidth: 20,
|
|
631
643
|
/**
|
|
632
644
|
* The padding between nodes in a sankey diagram or dependency wheel, in
|
|
633
|
-
* pixels.
|
|
634
|
-
*
|
|
635
|
-
*
|
|
636
|
-
* out within the plot area with the given `nodePadding`, they will be
|
|
637
|
-
* rendered with a smaller padding as a strategy to avoid overflow.
|
|
645
|
+
* pixels. For sankey charts, this applies to the nodes of the same column,
|
|
646
|
+
* so vertical distance by default, or horizontal distance in an inverted
|
|
647
|
+
* (vertical) sankey.
|
|
638
648
|
*
|
|
639
|
-
*
|
|
649
|
+
* If the number of nodes is so great that it is impossible to lay them out
|
|
650
|
+
* within the plot area with the given `nodePadding`, they will be rendered
|
|
651
|
+
* with a smaller padding as a strategy to avoid overflow.
|
|
640
652
|
*/
|
|
641
653
|
nodePadding: 10,
|
|
654
|
+
/**
|
|
655
|
+
* The distance between nodes in a sankey diagram in the longitudinal
|
|
656
|
+
* direction. The longitudinal direction means the direction that the chart
|
|
657
|
+
* flows - in a horizontal chart the distance is horizontal, in an inverted
|
|
658
|
+
* chart (vertical), the distance is vertical.
|
|
659
|
+
*
|
|
660
|
+
* If a number is given, it denotes pixels. If a percentage string is given,
|
|
661
|
+
* the distance is a percentage of the rendered node width. A `nodeDistance`
|
|
662
|
+
* of `100%` will render equal widths for the nodes and the gaps between
|
|
663
|
+
* them.
|
|
664
|
+
*
|
|
665
|
+
* This option applies only when the `nodeWidth` option is `auto`, making
|
|
666
|
+
* the node width respond to the number of columns.
|
|
667
|
+
*
|
|
668
|
+
* @since 11.4.0
|
|
669
|
+
* @sample highcharts/series-sankey/node-distance
|
|
670
|
+
* Sankey with dnode distance of 100% means equal to node width
|
|
671
|
+
* @sample highcharts/series-organization/node-distance
|
|
672
|
+
* Organization chart with node distance of 50%
|
|
673
|
+
* @type {number|string}
|
|
674
|
+
*/
|
|
675
|
+
nodeDistance: 30,
|
|
642
676
|
showInLegend: false,
|
|
643
677
|
states: {
|
|
644
678
|
hover: {
|
|
@@ -735,7 +769,7 @@
|
|
|
735
769
|
* @apioption series.sankey.nodes
|
|
736
770
|
*/
|
|
737
771
|
/**
|
|
738
|
-
* The id of the auto-generated node,
|
|
772
|
+
* The id of the auto-generated node, referring to the `from` or `to` setting of
|
|
739
773
|
* the link.
|
|
740
774
|
*
|
|
741
775
|
* @type {string}
|
|
@@ -778,6 +812,16 @@
|
|
|
778
812
|
* @extends plotOptions.sankey.dataLabels
|
|
779
813
|
* @apioption series.sankey.nodes.dataLabels
|
|
780
814
|
*/
|
|
815
|
+
/**
|
|
816
|
+
* The height of the node.
|
|
817
|
+
*
|
|
818
|
+
* @sample highcharts/series-sankey/height/
|
|
819
|
+
* Sankey diagram with height options
|
|
820
|
+
*
|
|
821
|
+
* @type {number}
|
|
822
|
+
* @since 11.3.0
|
|
823
|
+
* @apioption series.sankey.nodes.height
|
|
824
|
+
*/
|
|
781
825
|
/**
|
|
782
826
|
* An optional level index of where to place the node. The default behaviour is
|
|
783
827
|
* to place it next to the preceding node. Alias of `nodes.column`, but in
|
|
@@ -809,7 +853,7 @@
|
|
|
809
853
|
* Positive values shift the node downwards, negative shift it upwards. In a
|
|
810
854
|
* vertical layout, like organization chart, the offset is horizontal.
|
|
811
855
|
*
|
|
812
|
-
* If a
|
|
856
|
+
* If a percentage string is given, the node is offset by the percentage of the
|
|
813
857
|
* node size plus `nodePadding`.
|
|
814
858
|
*
|
|
815
859
|
* @deprecated
|
|
@@ -823,7 +867,7 @@
|
|
|
823
867
|
* The horizontal offset of a node. Positive values shift the node right,
|
|
824
868
|
* negative shift it left.
|
|
825
869
|
*
|
|
826
|
-
* If a
|
|
870
|
+
* If a percentage string is given, the node is offset by the percentage of the
|
|
827
871
|
* node size.
|
|
828
872
|
*
|
|
829
873
|
* @sample highcharts/plotoptions/sankey-node-column/
|
|
@@ -838,7 +882,7 @@
|
|
|
838
882
|
* The vertical offset of a node. Positive values shift the node down,
|
|
839
883
|
* negative shift it up.
|
|
840
884
|
*
|
|
841
|
-
* If a
|
|
885
|
+
* If a percentage string is given, the node is offset by the percentage of the
|
|
842
886
|
* node size.
|
|
843
887
|
*
|
|
844
888
|
* @sample highcharts/plotoptions/sankey-node-column/
|
|
@@ -958,7 +1002,7 @@
|
|
|
958
1002
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
959
1003
|
*
|
|
960
1004
|
* */
|
|
961
|
-
const { defined,
|
|
1005
|
+
const { defined, relativeLength } = U;
|
|
962
1006
|
/* *
|
|
963
1007
|
*
|
|
964
1008
|
* Composition
|
|
@@ -1188,7 +1232,7 @@
|
|
|
1188
1232
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
1189
1233
|
*
|
|
1190
1234
|
* */
|
|
1191
|
-
const { extend, isArray, isNumber, isObject, merge, pick } = U;
|
|
1235
|
+
const { extend, isArray, isNumber, isObject, merge, pick, relativeLength } = U;
|
|
1192
1236
|
/* *
|
|
1193
1237
|
*
|
|
1194
1238
|
* Functions
|
|
@@ -1353,6 +1397,27 @@
|
|
|
1353
1397
|
}
|
|
1354
1398
|
return rootId;
|
|
1355
1399
|
}
|
|
1400
|
+
/**
|
|
1401
|
+
* Get the node width, which relies on the plot width and the nodeDistance
|
|
1402
|
+
* option.
|
|
1403
|
+
*
|
|
1404
|
+
* @private
|
|
1405
|
+
*/
|
|
1406
|
+
function getNodeWidth(series, columnCount) {
|
|
1407
|
+
const { chart, options } = series, { nodeDistance = 0, nodeWidth = 0 } = options, { plotSizeX = 1 } = chart;
|
|
1408
|
+
// Node width auto means they are evenly distributed along the width of
|
|
1409
|
+
// the plot area
|
|
1410
|
+
if (nodeWidth === 'auto') {
|
|
1411
|
+
if (typeof nodeDistance === 'string' && /%$/.test(nodeDistance)) {
|
|
1412
|
+
const fraction = parseFloat(nodeDistance) / 100, total = columnCount + fraction * (columnCount - 1);
|
|
1413
|
+
return plotSizeX / total;
|
|
1414
|
+
}
|
|
1415
|
+
const nDistance = Number(nodeDistance);
|
|
1416
|
+
return ((plotSizeX + nDistance) /
|
|
1417
|
+
(columnCount || 1)) - nDistance;
|
|
1418
|
+
}
|
|
1419
|
+
return relativeLength(nodeWidth, plotSizeX);
|
|
1420
|
+
}
|
|
1356
1421
|
/* *
|
|
1357
1422
|
*
|
|
1358
1423
|
* Default Export
|
|
@@ -1361,6 +1426,7 @@
|
|
|
1361
1426
|
const TreeUtilities = {
|
|
1362
1427
|
getColor,
|
|
1363
1428
|
getLevelOptions,
|
|
1429
|
+
getNodeWidth,
|
|
1364
1430
|
setTreeValues,
|
|
1365
1431
|
updateRootId
|
|
1366
1432
|
};
|
|
@@ -1381,7 +1447,7 @@
|
|
|
1381
1447
|
* */
|
|
1382
1448
|
const { column: ColumnSeries, line: LineSeries } = SeriesRegistry.seriesTypes;
|
|
1383
1449
|
const { parse: color } = Color;
|
|
1384
|
-
const { getLevelOptions } = TU;
|
|
1450
|
+
const { getLevelOptions, getNodeWidth } = TU;
|
|
1385
1451
|
const { clamp, extend, isObject, merge, pick, relativeLength, stableSort } = U;
|
|
1386
1452
|
/* *
|
|
1387
1453
|
*
|
|
@@ -1559,14 +1625,14 @@
|
|
|
1559
1625
|
}
|
|
1560
1626
|
this.generatePoints();
|
|
1561
1627
|
this.nodeColumns = this.createNodeColumns();
|
|
1562
|
-
this.
|
|
1563
|
-
|
|
1628
|
+
const series = this, chart = this.chart, options = this.options, nodeColumns = this.nodeColumns, columnCount = nodeColumns.length;
|
|
1629
|
+
this.nodeWidth = getNodeWidth(this, columnCount);
|
|
1564
1630
|
this.nodePadding = this.getNodePadding();
|
|
1565
1631
|
// Find out how much space is needed. Base it on the translation
|
|
1566
|
-
// factor of the most
|
|
1632
|
+
// factor of the most spacious column.
|
|
1567
1633
|
this.translationFactor = nodeColumns.reduce((translationFactor, column) => Math.min(translationFactor, column.sankeyColumn.getTranslationFactor(series)), Infinity);
|
|
1568
1634
|
this.colDistance =
|
|
1569
|
-
(chart.plotSizeX - nodeWidth -
|
|
1635
|
+
(chart.plotSizeX - this.nodeWidth -
|
|
1570
1636
|
options.borderWidth) / Math.max(1, nodeColumns.length - 1);
|
|
1571
1637
|
// Calculate level options used in sankey and organization
|
|
1572
1638
|
series.mapOptionsToLevel = getLevelOptions({
|
|
@@ -1889,7 +1955,7 @@
|
|
|
1889
1955
|
* The vertical offset of a node in terms of weight. Positive values shift the
|
|
1890
1956
|
* node downwards, negative shift it upwards.
|
|
1891
1957
|
*
|
|
1892
|
-
* If a
|
|
1958
|
+
* If a percentage string is given, the node is offset by the percentage of the
|
|
1893
1959
|
* node size plus `nodePadding`.
|
|
1894
1960
|
*
|
|
1895
1961
|
* @see {@link https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/sankey-node-column/|Highcharts-Demo:}
|
|
@@ -1904,7 +1970,7 @@
|
|
|
1904
1970
|
* The horizontal offset of a node. Positive values shift the node right,
|
|
1905
1971
|
* negative shift it left.
|
|
1906
1972
|
*
|
|
1907
|
-
* If a
|
|
1973
|
+
* If a percentage string is given, the node is offset by the percentage of the
|
|
1908
1974
|
* node size.
|
|
1909
1975
|
*
|
|
1910
1976
|
* @see {@link https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/sankey-node-column/|Highcharts-Demo:}
|
|
@@ -1917,7 +1983,7 @@
|
|
|
1917
1983
|
* The vertical offset of a node. Positive values shift the node down,
|
|
1918
1984
|
* negative shift it up.
|
|
1919
1985
|
*
|
|
1920
|
-
* If a
|
|
1986
|
+
* If a percentage string is given, the node is offset by the percentage of the
|
|
1921
1987
|
* node size.
|
|
1922
1988
|
*
|
|
1923
1989
|
* @see {@link https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/sankey-node-column/|Highcharts-Demo:}
|
|
@@ -1953,8 +2019,9 @@
|
|
|
1953
2019
|
|
|
1954
2020
|
return SankeySeries;
|
|
1955
2021
|
});
|
|
1956
|
-
_registerModule(_modules, 'masters/modules/sankey.src.js', [], function () {
|
|
2022
|
+
_registerModule(_modules, 'masters/modules/sankey.src.js', [_modules['Core/Globals.js']], function (Highcharts) {
|
|
1957
2023
|
|
|
1958
2024
|
|
|
2025
|
+
return Highcharts;
|
|
1959
2026
|
});
|
|
1960
2027
|
}));
|
package/modules/series-label.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
* Highcharts JS v11.
|
|
1
|
+
!/**
|
|
2
|
+
* Highcharts JS v11.4.0 (2024-03-04)
|
|
3
3
|
*
|
|
4
4
|
* (c) 2009-2024 Torstein Honsi
|
|
5
5
|
*
|
|
6
6
|
* License: www.highcharts.com/license
|
|
7
|
-
|
|
7
|
+
*/function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/series-label",["highcharts"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function o(t,e,o,r){t.hasOwnProperty(e)||(t[e]=r.apply(null,o),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}o(e,"Extensions/SeriesLabel/SeriesLabelDefaults.js",[],function(){return{enabled:!0,connectorAllowed:!1,connectorNeighbourDistance:24,format:void 0,formatter:void 0,minFontSize:null,maxFontSize:null,onArea:null,style:{fontSize:"0.8em",fontWeight:"bold"},useHTML:!1,boxesToAvoid:[]}}),o(e,"Extensions/SeriesLabel/SeriesLabelUtilities.js",[],function(){function t(t,e,o,r,i,a){let n=(a-e)*(o-t)-(r-e)*(i-t);return n>0||!(n<0)}function e(e,o,r,i,a,n,s,l){return t(e,o,a,n,s,l)!==t(r,i,a,n,s,l)&&t(e,o,r,i,a,n)!==t(e,o,r,i,s,l)}return{boxIntersectLine:function(t,o,r,i,a,n,s,l){return e(t,o,t+r,o,a,n,s,l)||e(t+r,o,t+r,o+i,a,n,s,l)||e(t,o+i,t+r,o+i,a,n,s,l)||e(t,o,t,o+i,a,n,s,l)},intersectRect:function(t,e){return!(e.left>t.right||e.right<t.left||e.top>t.bottom||e.bottom<t.top)}}}),o(e,"Extensions/SeriesLabel/SeriesLabel.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Templating.js"],e["Core/Defaults.js"],e["Core/Globals.js"],e["Extensions/SeriesLabel/SeriesLabelDefaults.js"],e["Extensions/SeriesLabel/SeriesLabelUtilities.js"],e["Core/Utilities.js"]],function(t,e,o,r,i,a,n){let{animObject:s}=t,{format:l}=e,{setOptions:h}=o,{composed:c}=r,{boxIntersectLine:p,intersectRect:d}=a,{addEvent:u,extend:f,fireEvent:x,isNumber:b,pick:m,pushUnique:g,syncTimeout:y}=n;function X(t,e,o,r,i){let a=t.chart,n=t.options.label||{},s=m(n.onArea,!!t.area),l=s||n.connectorAllowed,h=a.boxesToAvoid,c=Number.MAX_VALUE,u=Number.MAX_VALUE,f,x,b,g,y,X,S;for(X=0;h&&X<h.length;X+=1)if(d(h[X],{left:e,right:e+r.width,top:o,bottom:o+r.height}))return!1;for(X=0;X<a.series.length;X+=1){let h=a.series[X],d=h.interpolatedPoints&&[...h.interpolatedPoints];if(h.visible&&d){let m=a.plotHeight/10;for(let t=a.plotTop;t<=a.plotTop+a.plotHeight;t+=m)d.unshift({chartX:a.plotLeft,chartY:t}),d.push({chartX:a.plotLeft+a.plotWidth,chartY:t});for(S=1;S<d.length;S+=1){if(d[S].chartX>=e-16&&d[S-1].chartX<=e+r.width+16){if(p(e,o,r.width,r.height,d[S-1].chartX,d[S-1].chartY,d[S].chartX,d[S].chartY))return!1;t===h&&!b&&i&&(b=p(e-16,o-16,r.width+32,r.height+32,d[S-1].chartX,d[S-1].chartY,d[S].chartX,d[S].chartY))}(l||b)&&(t!==h||s)&&(c=Math.min(c,(g=e+r.width/2-d[S].chartX)*g+(y=o+r.height/2-d[S].chartY)*y))}if(!s&&l&&t===h&&(i&&!b||c<Math.pow(n.connectorNeighbourDistance||1,2))){for(S=1;S<d.length;S+=1)(f=Math.min(Math.pow(e+r.width/2-d[S].chartX,2)+Math.pow(o+r.height/2-d[S].chartY,2),Math.pow(e-d[S].chartX,2)+Math.pow(o-d[S].chartY,2),Math.pow(e+r.width-d[S].chartX,2)+Math.pow(o-d[S].chartY,2),Math.pow(e+r.width-d[S].chartX,2)+Math.pow(o+r.height-d[S].chartY,2),Math.pow(e-d[S].chartX,2)+Math.pow(o+r.height-d[S].chartY,2)))<u&&(u=f,x=d[S]);b=!0}}}return(!i||!!b)&&{x:e,y:o,weight:c-(x?u:0),connectorPoint:x}}function S(t){if(this.renderer){let e=this,o=s(e.renderer.globalAnimation).duration;e.labelSeries=[],e.labelSeriesMaxSum=0,e.seriesLabelTimer&&n.clearTimeout(e.seriesLabelTimer),e.series.forEach(function(r){let i=r.options.label||{},a=r.labelBySeries,n=a&&a.closest;i.enabled&&r.visible&&(r.graph||r.area)&&!r.boosted&&e.labelSeries&&(e.labelSeries.push(r),i.minFontSize&&i.maxFontSize&&r.yData&&(r.sum=r.yData.reduce((t,e)=>(t||0)+(e||0),0),e.labelSeriesMaxSum=Math.max(e.labelSeriesMaxSum||0,r.sum||0)),"load"===t.type&&(o=Math.max(o,s(r.options.animation).duration)),n&&(void 0!==n[0].plotX?a.animate({x:n[0].plotX+n[1],y:n[0].plotY+n[2]}):a.attr({opacity:0})))}),e.seriesLabelTimer=y(function(){e.series&&e.labelSeries&&function(t){t.boxesToAvoid=[];let e=t.labelSeries||[],o=t.boxesToAvoid;t.series.forEach(t=>(t.points||[]).forEach(e=>(e.dataLabels||[]).forEach(e=>{let{width:r,height:i}=e.getBBox(),a=(e.translateX||0)+(t.xAxis?t.xAxis.pos:t.chart.plotLeft),n=(e.translateY||0)+(t.yAxis?t.yAxis.pos:t.chart.plotTop);o.push({left:a,top:n,right:a+r,bottom:n+i})}))),e.forEach(function(t){let e=t.options.label||{};t.interpolatedPoints=function(t){let e,o,r,i,a;if(!t.xAxis&&!t.yAxis)return;let n=t.points,s=[],l=t.graph||t.area,h=l&&l.element,c=t.chart.inverted,p=t.xAxis,d=t.yAxis,u=c?d.pos:p.pos,f=c?p.pos:d.pos,x=c?p.len:d.len,g=c?d.len:p.len,y=m((t.options.label||{}).onArea,!!t.area),X=d.getThreshold(t.options.threshold),S={},M=c?"chartCenterX":"chartCenterY";function w(t){let e=Math.round((t.plotX||0)/8)+","+Math.round((t.plotY||0)/8);S[e]||(S[e]=1,s.push(t))}if(t.getPointSpline&&h&&h.getPointAtLength&&!y&&n.length<(t.chart.plotSizeX||0)/16){let t=l.toD&&l.attr("d");for(l.toD&&l.attr({d:l.toD}),r=h.getTotalLength(),e=0;e<r;e+=16){let t=h.getPointAtLength(e),o=c?g-t.y:t.x,r=c?x-t.x:t.y;w({chartX:u+o,chartY:f+r,plotX:o,plotY:r})}t&&l.attr({d:t});let o=n[n.length-1].pos();w({chartX:u+(o?.[0]||0),chartY:f+(o?.[1]||0)})}else{let t;for(e=0,r=n.length;e<r;e+=1){let r=n[e],[s,l]=r.pos()||[],{plotHigh:h}=r;if(b(s)&&b(l)){let e={plotX:s,plotY:l,chartX:u+s,chartY:f+l};if(y&&(h&&(e.plotY=h,e.chartY=f+h),c?e.chartCenterX=u+g-((h||r.plotY||0)+m(r.yBottom,X))/2:e.chartCenterY=f+((h||l)+m(r.yBottom,X))/2),t&&(o=Math.max(Math.abs(e.chartX-t.chartX),Math.abs(e.chartY-t.chartY)))>16)for(a=1,i=Math.ceil(o/16);a<i;a+=1)w({chartX:t.chartX+(e.chartX-t.chartX)*(a/i),chartY:t.chartY+(e.chartY-t.chartY)*(a/i),[M]:(t[M]||0)+((e[M]||0)-(t[M]||0))*(a/i),plotX:(t.plotX||0)+(s-(t.plotX||0))*(a/i),plotY:(t.plotY||0)+(l-(t.plotY||0))*(a/i)});w(e),t=e}}}return s}(t),o.push(...e.boxesToAvoid||[])}),t.series.forEach(function(e){let o=e.options.label;if(!o||!e.xAxis&&!e.yAxis)return;let r="highcharts-color-"+m(e.colorIndex,"none"),i=!e.labelBySeries,a=o.minFontSize,n=o.maxFontSize,h=t.inverted,c=h?e.yAxis.pos:e.xAxis.pos,p=h?e.xAxis.pos:e.yAxis.pos,d=t.inverted?e.yAxis.len:e.xAxis.len,u=t.inverted?e.xAxis.len:e.yAxis.len,x=e.interpolatedPoints,b=m(o.onArea,!!e.area),g=[],y=e.xData||[],S,M,w,A,Y,L,v=e.labelBySeries,E,T,C;function P(t,e,o){let r=Math.max(c,m(T,-1/0)),i=Math.min(c+d,m(C,1/0));return t>r&&t<=i-o.width&&e>=p&&e<=p+u-o.height}function j(){v&&(e.labelBySeries=v.destroy())}if(b&&!h&&(E=[e.xAxis.toPixels(y[0]),e.xAxis.toPixels(y[y.length-1])],T=Math.min.apply(Math,E),C=Math.max.apply(Math,E)),e.visible&&!e.boosted&&x){if(!v){let i=e.name;if("string"==typeof o.format?i=l(o.format,e,t):o.formatter&&(i=o.formatter.call(e)),e.labelBySeries=v=t.renderer.label(i,0,0,"connector",0,0,o.useHTML).addClass("highcharts-series-label highcharts-series-label-"+e.index+" "+(e.options.className||"")+" "+r),!t.renderer.styledMode){let r="string"==typeof e.color?e.color:"#666666";v.css(f({color:b?t.renderer.getContrast(r):r},o.style||{})),v.attr({opacity:t.renderer.forExport?1:0,stroke:e.color,"stroke-width":1})}a&&n&&v.css({fontSize:a+(e.sum||0)/(e.chart.labelSeriesMaxSum||0)*(n-a)+"px"}),v.attr({padding:0,zIndex:3}).add()}for((S=v.getBBox()).width=Math.round(S.width),Y=x.length-1;Y>0;Y-=1)b?P(M=(x[Y].chartCenterX??x[Y].chartX)-S.width/2,w=(x[Y].chartCenterY??x[Y].chartY)-S.height/2,S)&&(L=X(e,M,w,S)):(P(M=x[Y].chartX+3,w=x[Y].chartY-S.height-3,S)&&(L=X(e,M,w,S,!0)),L&&g.push(L),P(M=x[Y].chartX+3,w=x[Y].chartY+3,S)&&(L=X(e,M,w,S,!0)),L&&g.push(L),P(M=x[Y].chartX-S.width-3,w=x[Y].chartY+3,S)&&(L=X(e,M,w,S,!0)),L&&g.push(L),P(M=x[Y].chartX-S.width-3,w=x[Y].chartY-S.height-3,S)&&(L=X(e,M,w,S,!0))),L&&g.push(L);if(o.connectorAllowed&&!g.length&&!b)for(M=c+d-S.width;M>=c;M-=16)for(w=p;w<p+u-S.height;w+=16)(A=X(e,M,w,S,!0))&&g.push(A);if(g.length){g.sort((t,e)=>e.weight-t.weight),L=g[0],(t.boxesToAvoid||[]).push({left:L.x,right:L.x+S.width,top:L.y,bottom:L.y+S.height});let o=Math.sqrt(Math.pow(Math.abs(L.x-(v.x||0)),2)+Math.pow(Math.abs(L.y-(v.y||0)),2));if(o&&e.labelBySeries){let r,a={opacity:t.renderer.forExport?1:0,x:L.x,y:L.y},n={opacity:1};o<=10&&(n={x:a.x,y:a.y},a={}),i&&(r=s(e.options.animation),r.duration*=.2),e.labelBySeries.attr(f(a,{anchorX:L.connectorPoint&&(L.connectorPoint.plotX||0)+c,anchorY:L.connectorPoint&&(L.connectorPoint.plotY||0)+p})).animate(n,r),e.options.kdNow=!0,e.buildKDTree();let l=e.searchPoint({chartX:L.x,chartY:L.y},!0);l&&(v.closest=[l,L.x-(l.plotX||0),L.y-(l.plotY||0)])}}else j()}else j()}),x(t,"afterDrawSeriesLabels")}(e)},e.renderer.forExport||!o?0:o)}}function M(t,e,o,r,i){let a=i&&i.anchorX,n=i&&i.anchorY,s,l,h=o/2;return b(a)&&b(n)&&(s=[["M",a,n]],(l=e-n)<0&&(l=-r-l),l<o&&(h=a<t+o/2?l:o-l),n>e+r?s.push(["L",t+h,e+r]):n<e?s.push(["L",t+h,e]):a<t?s.push(["L",t,e+r/2]):a>t+o&&s.push(["L",t+o,e+r/2])),s||[]}return{compose:function(t,e){g(c,"SeriesLabel")&&(u(t,"load",S),u(t,"redraw",S),e.prototype.symbols.connector=M,h({plotOptions:{series:{label:i}}}))}}}),o(e,"masters/modules/series-label.src.js",[e["Core/Globals.js"],e["Extensions/SeriesLabel/SeriesLabel.js"]],function(t,e){return e.compose(t.Chart,t.SVGRenderer),t})});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Highcharts JS v11.
|
|
2
|
+
* @license Highcharts JS v11.4.0 (2024-03-05)
|
|
3
3
|
*
|
|
4
4
|
* (c) 2009-2024 Torstein Honsi
|
|
5
5
|
*
|
|
@@ -386,7 +386,7 @@
|
|
|
386
386
|
* @private
|
|
387
387
|
*/
|
|
388
388
|
function compose(ChartClass, SVGRendererClass) {
|
|
389
|
-
if (pushUnique(composed,
|
|
389
|
+
if (pushUnique(composed, 'SeriesLabel')) {
|
|
390
390
|
// Leave both events, we handle animation differently (#9815)
|
|
391
391
|
addEvent(ChartClass, 'load', onChartRedraw);
|
|
392
392
|
addEvent(ChartClass, 'redraw', onChartRedraw);
|
|
@@ -505,8 +505,10 @@
|
|
|
505
505
|
for (i = points.length - 1; i > 0; i -= 1) {
|
|
506
506
|
if (onArea) {
|
|
507
507
|
// Centered
|
|
508
|
-
x = points[i].
|
|
509
|
-
|
|
508
|
+
x = (points[i].chartCenterX ?? points[i].chartX) -
|
|
509
|
+
bBox.width / 2;
|
|
510
|
+
y = (points[i].chartCenterY ?? points[i].chartY) -
|
|
511
|
+
bBox.height / 2;
|
|
510
512
|
if (insidePane(x, y, bBox)) {
|
|
511
513
|
best = checkClearPoint(series, x, y, bBox);
|
|
512
514
|
}
|
|
@@ -647,7 +649,7 @@
|
|
|
647
649
|
if (!series.xAxis && !series.yAxis) {
|
|
648
650
|
return;
|
|
649
651
|
}
|
|
650
|
-
const distance = 16, points = series.points, interpolated = [], graph = series.graph || series.area, node = graph && graph.element, inverted = series.chart.inverted, xAxis = series.xAxis, yAxis = series.yAxis, paneLeft = inverted ? yAxis.pos : xAxis.pos, paneTop = inverted ? xAxis.pos : yAxis.pos, seriesLabelOptions = series.options.label || {}, onArea = pick(seriesLabelOptions.onArea, !!series.area), translatedThreshold = yAxis.getThreshold(series.options.threshold), grid = {};
|
|
652
|
+
const distance = 16, points = series.points, interpolated = [], graph = series.graph || series.area, node = graph && graph.element, inverted = series.chart.inverted, xAxis = series.xAxis, yAxis = series.yAxis, paneLeft = inverted ? yAxis.pos : xAxis.pos, paneTop = inverted ? xAxis.pos : yAxis.pos, paneHeight = inverted ? xAxis.len : yAxis.len, paneWidth = inverted ? yAxis.len : xAxis.len, seriesLabelOptions = series.options.label || {}, onArea = pick(seriesLabelOptions.onArea, !!series.area), translatedThreshold = yAxis.getThreshold(series.options.threshold), grid = {}, chartCenterKey = inverted ? 'chartCenterX' : 'chartCenterY';
|
|
651
653
|
let i, deltaX, deltaY, delta, len, n, j;
|
|
652
654
|
/**
|
|
653
655
|
* Push the point to the interpolated points, but only if that position in
|
|
@@ -680,22 +682,22 @@
|
|
|
680
682
|
}
|
|
681
683
|
len = node.getTotalLength();
|
|
682
684
|
for (i = 0; i < len; i += distance) {
|
|
683
|
-
const domPoint = node.getPointAtLength(i);
|
|
685
|
+
const domPoint = node.getPointAtLength(i), plotX = inverted ? paneWidth - domPoint.y : domPoint.x, plotY = inverted ? paneHeight - domPoint.x : domPoint.y;
|
|
684
686
|
pushDiscrete({
|
|
685
|
-
chartX: paneLeft +
|
|
686
|
-
chartY: paneTop +
|
|
687
|
-
plotX
|
|
688
|
-
plotY
|
|
687
|
+
chartX: paneLeft + plotX,
|
|
688
|
+
chartY: paneTop + plotY,
|
|
689
|
+
plotX,
|
|
690
|
+
plotY
|
|
689
691
|
});
|
|
690
692
|
}
|
|
691
693
|
if (d) {
|
|
692
694
|
graph.attr({ d });
|
|
693
695
|
}
|
|
694
696
|
// Last point
|
|
695
|
-
const point = points[points.length - 1];
|
|
697
|
+
const point = points[points.length - 1], pos = point.pos();
|
|
696
698
|
pushDiscrete({
|
|
697
|
-
chartX: paneLeft + (
|
|
698
|
-
chartY: paneTop + (
|
|
699
|
+
chartX: paneLeft + (pos?.[0] || 0),
|
|
700
|
+
chartY: paneTop + (pos?.[1] || 0)
|
|
699
701
|
});
|
|
700
702
|
// Interpolate
|
|
701
703
|
}
|
|
@@ -703,7 +705,7 @@
|
|
|
703
705
|
len = points.length;
|
|
704
706
|
let last;
|
|
705
707
|
for (i = 0; i < len; i += 1) {
|
|
706
|
-
const point = points[i],
|
|
708
|
+
const point = points[i], [plotX, plotY] = point.pos() || [], { plotHigh } = point;
|
|
707
709
|
if (isNumber(plotX) && isNumber(plotY)) {
|
|
708
710
|
const ctlPoint = {
|
|
709
711
|
plotX,
|
|
@@ -718,8 +720,14 @@
|
|
|
718
720
|
ctlPoint.plotY = plotHigh;
|
|
719
721
|
ctlPoint.chartY = paneTop + plotHigh;
|
|
720
722
|
}
|
|
721
|
-
|
|
722
|
-
|
|
723
|
+
if (inverted) {
|
|
724
|
+
ctlPoint.chartCenterX = paneLeft + paneWidth - ((plotHigh ? plotHigh : point.plotY || 0) +
|
|
725
|
+
pick(point.yBottom, translatedThreshold)) / 2;
|
|
726
|
+
}
|
|
727
|
+
else {
|
|
728
|
+
ctlPoint.chartCenterY = paneTop + ((plotHigh ? plotHigh : plotY) +
|
|
729
|
+
pick(point.yBottom, translatedThreshold)) / 2;
|
|
730
|
+
}
|
|
723
731
|
}
|
|
724
732
|
// Add interpolated points
|
|
725
733
|
if (last) {
|
|
@@ -734,9 +742,9 @@
|
|
|
734
742
|
(ctlPoint.chartX - last.chartX) * (j / n),
|
|
735
743
|
chartY: last.chartY +
|
|
736
744
|
(ctlPoint.chartY - last.chartY) * (j / n),
|
|
737
|
-
|
|
738
|
-
((ctlPoint
|
|
739
|
-
(last
|
|
745
|
+
[chartCenterKey]: (last[chartCenterKey] || 0) +
|
|
746
|
+
((ctlPoint[chartCenterKey] || 0) -
|
|
747
|
+
(last[chartCenterKey] || 0)) * (j / n),
|
|
740
748
|
plotX: (last.plotX || 0) +
|
|
741
749
|
(plotX - (last.plotX || 0)) * (j / n),
|
|
742
750
|
plotY: (last.plotY || 0) +
|
|
@@ -900,5 +908,6 @@
|
|
|
900
908
|
const G = Highcharts;
|
|
901
909
|
SeriesLabel.compose(G.Chart, G.SVGRenderer);
|
|
902
910
|
|
|
911
|
+
return Highcharts;
|
|
903
912
|
});
|
|
904
913
|
}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
* Highcharts JS v11.
|
|
1
|
+
!/**
|
|
2
|
+
* Highcharts JS v11.4.0 (2024-03-04)
|
|
3
3
|
*
|
|
4
4
|
* Series on point module
|
|
5
5
|
*
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* Author: Rafal Sebestjanski and Piotr Madej
|
|
8
8
|
*
|
|
9
9
|
* License: www.highcharts.com/license
|
|
10
|
-
|
|
10
|
+
*/function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/series-on-point",["highcharts"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function i(t,e,i,o){t.hasOwnProperty(e)||(t[e]=o.apply(null,i),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}i(e,"Series/SeriesOnPointComposition.js",[e["Core/Globals.js"],e["Core/Series/Point.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Utilities.js"]],function(t,e,i,o,s,r){var n;let{composed:h}=t,{bubble:a}=o.seriesTypes,{addEvent:d,defined:p,find:l,isNumber:c,pushUnique:f}=r;return function(t){t.compose=function(t,e){if(f(h,"SeriesOnPoint")){let{chartGetZData:o,seriesAfterInit:s,seriesAfterRender:r,seriesGetCenter:n,seriesShowOrHide:h,seriesTranslate:a}=i.prototype;t.types.pie.prototype.onPointSupported=!0,d(t,"afterInit",s),d(t,"afterRender",r),d(t,"afterGetCenter",n),d(t,"hide",h),d(t,"show",h),d(t,"translate",a),d(e,"beforeRender",o),d(e,"beforeRedraw",o)}return t};class i{constructor(t){this.getRadii=a.prototype.getRadii,this.getRadius=a.prototype.getRadius,this.getPxExtremes=a.prototype.getPxExtremes,this.getZExtremes=a.prototype.getZExtremes,this.chart=t.chart,this.series=t,this.options=t.options.onPoint}drawConnector(){this.connector||(this.connector=this.series.chart.renderer.path().addClass("highcharts-connector-seriesonpoint").attr({zIndex:-1}).add(this.series.markerGroup));let t=this.getConnectorAttributes();t&&this.connector.animate(t)}getConnectorAttributes(){let t=this.series.chart,i=this.options;if(!i)return;let o=i.connectorOptions||{},r=i.position,n=t.get(i.id);if(!(n instanceof e)||!r||!p(n.plotX)||!p(n.plotY))return;let h=p(r.x)?r.x:n.plotX,a=p(r.y)?r.y:n.plotY,d=h+(r.offsetX||0),l=a+(r.offsetY||0),c=o.width||1,f=o.stroke||this.series.color,u=o.dashstyle,y={d:s.prototype.crispLine([["M",h,a],["L",d,l]],c,"ceil"),"stroke-width":c};return t.styledMode||(y.stroke=f,y.dashstyle=u),y}seriesAfterInit(){this.onPointSupported&&this.options.onPoint&&(this.bubblePadding=!0,this.useMapGeometry=!0,this.onPoint=new i(this))}seriesAfterRender(){delete this.chart.bubbleZExtremes,this.onPoint&&this.onPoint.drawConnector()}seriesGetCenter(t){let i=this.options.onPoint,o=t.positions;if(i){let t=this.chart.get(i.id);t instanceof e&&p(t.plotX)&&p(t.plotY)&&(o[0]=t.plotX,o[1]=t.plotY);let s=i.position;s&&(p(s.x)&&(o[0]=s.x),p(s.y)&&(o[1]=s.y),s.offsetX&&(o[0]+=s.offsetX),s.offsetY&&(o[1]+=s.offsetY))}let s=this.radii&&this.radii[this.index];c(s)&&(o[2]=2*s),t.positions=o}seriesShowOrHide(){let t=this.chart.series;this.points.forEach(e=>{let i=l(t,t=>{let i=((t.onPoint||{}).options||{}).id;return!!i&&i===e.id});i&&i.setVisible(!i.visible,!1)})}seriesTranslate(){this.onPoint&&(this.onPoint.getRadii(),this.radii=this.onPoint.radii)}chartGetZData(){let t=[];this.series.forEach(e=>{let i=e.options.onPoint;t.push(i&&i.z?i.z:null)}),this.series.forEach(e=>{e.onPoint&&(e.onPoint.zData=e.zData=t)})}}t.Additions=i}(n||(n={})),n}),i(e,"masters/modules/series-on-point.src.js",[e["Core/Globals.js"],e["Series/SeriesOnPointComposition.js"]],function(t,e){return e.compose(t.Series,t.Chart),t})});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Highcharts JS v11.
|
|
2
|
+
* @license Highcharts JS v11.4.0 (2024-03-05)
|
|
3
3
|
*
|
|
4
4
|
* Series on point module
|
|
5
5
|
*
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
*
|
|
48
48
|
* */
|
|
49
49
|
const { composed } = H;
|
|
50
|
-
const { bubble
|
|
50
|
+
const { bubble } = SeriesRegistry.seriesTypes;
|
|
51
51
|
const { addEvent, defined, find, isNumber, pushUnique } = U;
|
|
52
52
|
/* *
|
|
53
53
|
*
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
* Chart class to use.
|
|
79
79
|
*/
|
|
80
80
|
function compose(SeriesClass, ChartClass) {
|
|
81
|
-
if (pushUnique(composed,
|
|
81
|
+
if (pushUnique(composed, 'SeriesOnPoint')) {
|
|
82
82
|
const { chartGetZData, seriesAfterInit, seriesAfterRender, seriesGetCenter, seriesShowOrHide, seriesTranslate } = Additions.prototype;
|
|
83
83
|
// We can mark support for pie series here because it's in the core.
|
|
84
84
|
// But all other series outside the core should be marked in its
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
return id === point.id;
|
|
266
266
|
});
|
|
267
267
|
// And also toggle series that are on toggled points. Redraw is
|
|
268
|
-
// not needed because it's fired later after
|
|
268
|
+
// not needed because it's fired later after showOrHide event
|
|
269
269
|
series && series.setVisible(!series.visible, false);
|
|
270
270
|
});
|
|
271
271
|
}
|
|
@@ -422,5 +422,6 @@
|
|
|
422
422
|
const G = Highcharts;
|
|
423
423
|
SeriesOnPointComposition.compose(G.Series, G.Chart);
|
|
424
424
|
|
|
425
|
+
return Highcharts;
|
|
425
426
|
});
|
|
426
427
|
}));
|
package/modules/solid-gauge.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
* Highcharts JS v11.
|
|
1
|
+
!/**
|
|
2
|
+
* Highcharts JS v11.4.0 (2024-03-04)
|
|
3
3
|
*
|
|
4
4
|
* Solid angular gauge module
|
|
5
5
|
*
|
|
6
6
|
* (c) 2010-2024 Torstein Honsi
|
|
7
7
|
*
|
|
8
8
|
* License: www.highcharts.com/license
|
|
9
|
-
|
|
9
|
+
*/function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/solid-gauge",["highcharts","highcharts/highcharts-more"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function o(t,e,o,s){t.hasOwnProperty(e)||(t[e]=s.apply(null,o),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}o(e,"Core/Axis/Color/ColorAxisLike.js",[e["Core/Color/Color.js"],e["Core/Utilities.js"]],function(t,e){var o,s;let{parse:i}=t,{merge:r}=e;return(s=o||(o={})).initDataClasses=function(t){let e=this.chart,o=this.legendItem=this.legendItem||{},s=this.options,a=t.dataClasses||[],l,n,d=e.options.chart.colorCount,h=0,u;this.dataClasses=n=[],o.labels=[];for(let t=0,o=a.length;t<o;++t)l=r(l=a[t]),n.push(l),(e.styledMode||!l.color)&&("category"===s.dataClassColor?(e.styledMode||(d=(u=e.options.colors||[]).length,l.color=u[h]),l.colorIndex=h,++h===d&&(h=0)):l.color=i(s.minColor).tweenTo(i(s.maxColor),o<2?.5:t/(o-1)))},s.initStops=function(){let t=this.options,e=this.stops=t.stops||[[0,t.minColor||""],[1,t.maxColor||""]];for(let t=0,o=e.length;t<o;++t)e[t].color=i(e[t][1])},s.normalizedValue=function(t){let e=this.max||0,o=this.min||0;return this.logarithmic&&(t=this.logarithmic.log2lin(t)),1-(e-t)/(e-o||1)},s.toColor=function(t,e){let o,s,i,r,a,l;let n=this.dataClasses,d=this.stops;if(n){for(l=n.length;l--;)if(s=(a=n[l]).from,i=a.to,(void 0===s||t>=s)&&(void 0===i||t<=i)){r=a.color,e&&(e.dataClass=l,e.colorIndex=a.colorIndex);break}}else{for(o=this.normalizedValue(t),l=d.length;l--&&!(o>d[l][0]););s=d[l]||d[l+1],o=1-((i=d[l+1]||s)[0]-o)/(i[0]-s[0]||1),r=s.color.tweenTo(i.color,o)}return r},o}),o(e,"Core/Axis/SolidGaugeAxis.js",[e["Core/Axis/Color/ColorAxisLike.js"],e["Core/Utilities.js"]],function(t,e){let{extend:o}=e;return{init:function(e){o(e,t)}}}),o(e,"Series/SolidGauge/SolidGaugeSeriesDefaults.js",[],function(){return{colorByPoint:!0,dataLabels:{y:0}}}),o(e,"Series/SolidGauge/SolidGaugeSeries.js",[e["Extensions/BorderRadius.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Axis/SolidGaugeAxis.js"],e["Series/SolidGauge/SolidGaugeSeriesDefaults.js"],e["Core/Utilities.js"]],function(t,e,o,s,i){let{gauge:r,pie:a}=e.seriesTypes,{clamp:l,extend:n,isNumber:d,merge:h,pick:u,pInt:c}=i;class g extends r{translate(){let t=this.yAxis;o.init(t),!t.dataClasses&&t.options.dataClasses&&t.initDataClasses(t.options),t.initStops(),r.prototype.translate.call(this)}drawPoints(){let e;let o=this.yAxis,s=o.center,i=this.options,r=this.chart.renderer,a=i.overshoot,h=i.rounded&&void 0===i.borderRadius,g=d(a)?a/180*Math.PI:0;for(let a of(d(i.threshold)&&(e=o.startAngleRad+o.translate(i.threshold,void 0,void 0,void 0,!0)),this.thresholdAngleRad=u(e,o.startAngleRad),this.points))if(!a.isNull){let e=c(u(a.options.radius,i.radius,100))*s[2]/200,d=c(u(a.options.innerRadius,i.innerRadius,60))*s[2]/200,p=Math.min(o.startAngleRad,o.endAngleRad),f=Math.max(o.startAngleRad,o.endAngleRad),C=a.graphic,m=o.startAngleRad+o.translate(a.y,void 0,void 0,void 0,!0),x,A,y=o.toColor(a.y,a);"none"===y&&(y=a.color||this.color||"none"),"none"!==y&&(a.color=y),m=l(m,p-g,f+g),!1===i.wrap&&(m=l(m,p,f));let R=h?(e-d)/2/e:0,S=Math.min(m,this.thresholdAngleRad)-R,j=Math.max(m,this.thresholdAngleRad)+R;j-S>2*Math.PI&&(j=S+2*Math.PI);let v=h?"50%":0;i.borderRadius&&(v=t.optionsToObject(i.borderRadius).radius),a.shapeArgs=x={x:s[0],y:s[1],r:e,innerR:d,start:S,end:j,borderRadius:v},a.startR=e,C?(A=x.d,C.animate(n({fill:y},x)),A&&(x.d=A)):a.graphic=C=r.arc(x).attr({fill:y,"sweep-flag":0}).add(this.group),this.chart.styledMode||("square"!==i.linecap&&C.attr({"stroke-linecap":"round","stroke-linejoin":"round"}),C.attr({stroke:i.borderColor||"none","stroke-width":i.borderWidth||0})),C&&C.addClass(a.getClassName(),!0)}}animate(t){t||(this.startAngleRad=this.thresholdAngleRad,a.prototype.animate.call(this,t))}}return g.defaultOptions=h(r.defaultOptions,s),e.registerSeriesType("solidgauge",g),g}),o(e,"masters/modules/solid-gauge.src.js",[e["Core/Globals.js"]],function(t){return t})});
|