highcharts 13.0.2 → 13.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bower.json +1 -1
- package/css/highcharts.css +6 -2
- package/es-modules/Accessibility/Components/InfoRegionsComponent.js +10 -6
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +2 -1
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +25 -1
- package/es-modules/Accessibility/KeyboardNavigation.js +1 -1
- package/es-modules/Accessibility/Utils/HTMLUtilities.js +13 -3
- package/es-modules/Core/Animation/AnimationUtilities.js +7 -2
- package/es-modules/Core/Animation/Fx.js +1 -0
- package/es-modules/Core/Axis/Axis.js +181 -211
- package/es-modules/Core/Axis/Axis3DComposition.js +13 -15
- package/es-modules/Core/Axis/AxisDefaults.js +9 -8
- package/es-modules/Core/Axis/BrokenAxis.js +5 -4
- package/es-modules/Core/Axis/Color/ColorAxis.js +66 -54
- package/es-modules/Core/Axis/Color/ColorAxisComposition.js +3 -0
- package/es-modules/Core/Axis/Color/ColorAxisDefaults.js +6 -4
- package/es-modules/Core/Axis/DateTimeAxis.js +4 -3
- package/es-modules/Core/Axis/GridAxis.js +17 -13
- package/es-modules/Core/Axis/LogarithmicAxis.js +4 -3
- package/es-modules/Core/Axis/NavigatorAxisComposition.js +3 -4
- package/es-modules/Core/Axis/OrdinalAxis.js +0 -15
- package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +135 -72
- package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js +72 -124
- package/es-modules/Core/Axis/RadialAxis.js +50 -7
- package/es-modules/Core/Axis/ScrollbarAxis.js +3 -0
- package/es-modules/Core/Axis/Stacking/StackItem.js +49 -75
- package/es-modules/Core/Axis/Stacking/StackingAxis.js +34 -22
- package/es-modules/Core/Axis/Tick.js +95 -92
- package/es-modules/Core/Axis/TreeGrid/TreeGridAxis.js +9 -13
- package/es-modules/Core/Axis/WaterfallAxis.js +1 -1
- package/es-modules/Core/Chart/Chart.js +13 -4
- package/es-modules/Core/Chart/StockChart.js +20 -26
- package/es-modules/Core/Defaults.js +18 -0
- package/es-modules/Core/Globals.js +9 -7
- package/es-modules/Core/Pointer.js +7 -8
- package/es-modules/Core/Renderer/HTML/AST.js +18 -11
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +5 -1
- package/es-modules/Core/Renderer/SVG/SVGElement.js +1 -0
- package/es-modules/Core/Renderer/SVG/SVGRenderer.js +1 -1
- package/es-modules/Core/Renderer/SVG/Symbols.js +1 -1
- package/es-modules/Core/Renderer/SVG/TextBuilder.js +6 -2
- package/es-modules/Core/Series/OverlappingDataLabels.js +41 -32
- package/es-modules/Core/Series/Point.js +14 -11
- package/es-modules/Core/Series/Series.js +21 -10
- package/es-modules/Core/Tooltip.js +35 -40
- package/es-modules/Data/DataCursor.js +3 -2
- package/es-modules/Data/DataTable.js +21 -2
- package/es-modules/Data/DataTableCore.js +28 -4
- package/es-modules/Data/Formula/FormulaParser.js +30 -10
- package/es-modules/Extensions/Annotations/Annotation.js +5 -7
- package/es-modules/Extensions/Annotations/AnnotationChart.js +2 -1
- package/es-modules/Extensions/Boost/BoostSeries.js +4 -13
- package/es-modules/Extensions/Breadcrumbs/Breadcrumbs.js +6 -4
- package/es-modules/Extensions/Breadcrumbs/BreadcrumbsDefaults.js +1 -1
- package/es-modules/Extensions/Data.js +4 -2
- package/es-modules/Extensions/DragPanes/DragPanes.js +6 -9
- package/es-modules/Extensions/Drilldown/Drilldown.js +9 -4
- package/es-modules/Extensions/ExportData/ExportData.js +24 -4
- package/es-modules/Extensions/Pane/Pane.js +1 -1
- package/es-modules/Extensions/ParallelCoordinates/ParallelAxis.js +5 -4
- package/es-modules/Extensions/StaticScale.js +13 -11
- package/es-modules/Series/Area/AreaSeriesDefaults.js +1 -1
- package/es-modules/Series/AreaRange/AreaRangeSeriesDefaults.js +1 -1
- package/es-modules/Series/AreaSpline/AreaSplineSeries.js +1 -1
- package/es-modules/Series/AreaSplineRange/AreaSplineRangeSeries.js +1 -1
- package/es-modules/Series/Bar/BarSeries.js +1 -1
- package/es-modules/Series/Bellcurve/BellcurveSeriesDefaults.js +1 -1
- package/es-modules/Series/BoxPlot/BoxPlotSeriesDefaults.js +1 -1
- package/es-modules/Series/Bubble/BubbleSeries.js +1 -1
- package/es-modules/Series/Bullet/BulletSeriesDefaults.js +1 -1
- package/es-modules/Series/Candlestick/CandlestickSeriesDefaults.js +1 -1
- package/es-modules/Series/Column/ColumnSeriesDefaults.js +6 -3
- package/es-modules/Series/ColumnPyramid/ColumnPyramidSeriesDefaults.js +2 -3
- package/es-modules/Series/ColumnRange/ColumnRangeSeriesDefaults.js +1 -1
- package/es-modules/Series/Contour/ContourSeriesDefaults.js +12 -14
- package/es-modules/Series/ErrorBar/ErrorBarSeriesDefaults.js +1 -1
- package/es-modules/Series/Flags/FlagsPoint.js +4 -2
- package/es-modules/Series/Flags/FlagsPointOptions.js +12 -0
- package/es-modules/Series/Flags/FlagsSeries.js +8 -7
- package/es-modules/Series/Flags/FlagsSeriesDefaults.js +7 -7
- package/es-modules/Series/Flags/FlagsSeriesOptions.js +12 -0
- package/es-modules/Series/Flags/FlagsSymbols.js +5 -3
- package/es-modules/Series/Funnel/FunnelSeriesDefaults.js +1 -1
- package/es-modules/Series/Gauge/GaugeSeries.js +1 -1
- package/es-modules/Series/GeoHeatmap/GeoHeatmapSeries.js +1 -1
- package/es-modules/Series/HLC/HLCSeriesDefaults.js +1 -7
- package/es-modules/Series/Heatmap/HeatmapSeriesDefaults.js +1 -1
- package/es-modules/Series/HeikinAshi/HeikinAshiSeriesDefaults.js +1 -1
- package/es-modules/Series/Histogram/HistogramSeriesDefaults.js +1 -1
- package/es-modules/Series/HollowCandlestick/HollowCandlestickSeries.js +1 -1
- package/es-modules/Series/Item/ItemSeriesDefaults.js +1 -1
- package/es-modules/Series/Line/LineSeries.js +0 -1
- package/es-modules/Series/Map/MapSeriesDefaults.js +1 -1
- package/es-modules/Series/MapBubble/MapBubbleSeries.js +0 -1
- package/es-modules/Series/MapLine/MapLineSeriesDefaults.js +1 -1
- package/es-modules/Series/MapPoint/MapPointSeriesDefaults.js +0 -1
- package/es-modules/Series/Networkgraph/ReingoldFruchtermanLayout.js +5 -5
- package/es-modules/Series/OHLC/OHLCSeriesDefaults.js +0 -1
- package/es-modules/Series/PackedBubble/PackedBubbleChart.js +18 -0
- package/es-modules/Series/PackedBubble/PackedBubbleDataLabelOptions.js +12 -0
- package/es-modules/Series/PackedBubble/PackedBubbleIntegration.js +3 -3
- package/es-modules/Series/PackedBubble/PackedBubbleLayout.js +2 -2
- package/es-modules/Series/PackedBubble/PackedBubblePoint.js +1 -1
- package/es-modules/Series/PackedBubble/PackedBubblePointOptions.js +12 -0
- package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +20 -20
- package/es-modules/Series/PackedBubble/PackedBubbleSeriesDefaults.js +2 -2
- package/es-modules/Series/PackedBubble/PackedBubbleSeriesOptions.js +12 -0
- package/es-modules/Series/ParetoSeries/ParetoPoint.js +17 -0
- package/es-modules/Series/ParetoSeries/ParetoPointOptions.js +12 -0
- package/es-modules/Series/ParetoSeries/ParetoSeries.js +3 -3
- package/es-modules/Series/ParetoSeries/ParetoSeriesDefaults.js +1 -1
- package/es-modules/Series/ParetoSeries/ParetoSeriesOptions.js +12 -0
- package/es-modules/Series/PathUtilities.js +3 -1
- package/es-modules/Series/Pictorial/PictorialPointOptions.js +12 -0
- package/es-modules/Series/Pictorial/PictorialSeries.js +5 -25
- package/es-modules/Series/Pictorial/PictorialSeriesDefaults.js +45 -0
- package/es-modules/Series/Pictorial/PictorialSeriesOptions.js +12 -0
- package/es-modules/Series/Pie/PieSeriesDefaults.js +1 -1
- package/es-modules/Series/Pie3D/Pie3DPoint.js +1 -1
- package/es-modules/Series/Pie3D/Pie3DSeries.js +6 -6
- package/es-modules/Series/PolarComposition.js +22 -21
- package/es-modules/Series/Polygon/PolygonPoint.js +17 -0
- package/es-modules/Series/Polygon/PolygonPointOptions.js +12 -0
- package/es-modules/Series/Polygon/PolygonSeriesDefaults.js +1 -1
- package/es-modules/Series/Polygon/PolygonSeriesOptions.js +12 -0
- package/es-modules/Series/Pyramid/PyramidPoint.js +19 -0
- package/es-modules/Series/Pyramid/PyramidPointOptions.js +14 -0
- package/es-modules/Series/Pyramid/PyramidSeries.js +1 -1
- package/es-modules/Series/Pyramid/PyramidSeriesDefaults.js +1 -1
- package/es-modules/Series/Pyramid/PyramidSeriesOptions.js +14 -0
- package/es-modules/Series/Pyramid3D/Pyramid3DPoint.js +19 -0
- package/es-modules/Series/Pyramid3D/Pyramid3DPointOptions.js +14 -0
- package/es-modules/Series/Pyramid3D/Pyramid3DSeries.js +1 -1
- package/es-modules/Series/Pyramid3D/Pyramid3DSeriesOptions.js +14 -0
- package/es-modules/Series/Renko/RenkoSeriesDefaults.js +1 -2
- package/es-modules/Series/Sankey/SankeySeriesDefaults.js +6 -7
- package/es-modules/Series/Scatter/ScatterSeriesDefaults.js +1 -1
- package/es-modules/Series/SolidGauge/SolidGaugeSeriesDefaults.js +1 -1
- package/es-modules/Series/Spline/SplineSeries.js +1 -1
- package/es-modules/Series/Streamgraph/StreamgraphSeriesDefaults.js +1 -1
- package/es-modules/Series/Sunburst/SunburstSeriesDefaults.js +1 -1
- package/es-modules/Series/TiledWebMap/TiledWebMapSeriesDefaults.js +2 -2
- package/es-modules/Series/Tilemap/TilemapSeriesDefaults.js +1 -1
- package/es-modules/Series/Timeline/TimelineSeriesDefaults.js +1 -1
- package/es-modules/Series/Treemap/TreemapSeriesDefaults.js +1 -1
- package/es-modules/Series/VariablePie/VariablePieSeriesDefaults.js +1 -1
- package/es-modules/Series/Variwide/VariwideComposition.js +11 -8
- package/es-modules/Series/Vector/VectorSeriesDefaults.js +1 -1
- package/es-modules/Series/Venn/VennSeriesDefaults.js +1 -1
- package/es-modules/Series/Waterfall/WaterfallSeriesDefaults.js +1 -1
- package/es-modules/Series/Windbarb/WindbarbSeriesDefaults.js +1 -1
- package/es-modules/Shared/Utilities.js +7 -0
- package/es-modules/Stock/Indicators/ABands/ABandsIndicator.js +1 -1
- package/es-modules/Stock/Indicators/AD/ADIndicator.js +0 -1
- package/es-modules/Stock/Indicators/AO/AOIndicator.js +1 -1
- package/es-modules/Stock/Indicators/APO/APOIndicator.js +1 -1
- package/es-modules/Stock/Indicators/ATR/ATRIndicator.js +0 -1
- package/es-modules/Stock/Indicators/Aroon/AroonIndicator.js +1 -1
- package/es-modules/Stock/Indicators/AroonOscillator/AroonOscillatorIndicator.js +2 -2
- package/es-modules/Stock/Indicators/BB/BBIndicator.js +0 -1
- package/es-modules/Stock/Indicators/CCI/CCIIndicator.js +0 -1
- package/es-modules/Stock/Indicators/CMF/CMFIndicator.js +0 -1
- package/es-modules/Stock/Indicators/CMO/CMOIndicator.js +0 -1
- package/es-modules/Stock/Indicators/Chaikin/ChaikinIndicator.js +1 -1
- package/es-modules/Stock/Indicators/DEMA/DEMAIndicator.js +1 -1
- package/es-modules/Stock/Indicators/DMI/DMIIndicator.js +3 -3
- package/es-modules/Stock/Indicators/DPO/DPOIndicator.js +1 -1
- package/es-modules/Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js +3 -3
- package/es-modules/Stock/Indicators/EMA/EMAIndicator.js +0 -1
- package/es-modules/Stock/Indicators/IKH/IKHIndicator.js +0 -1
- package/es-modules/Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js +1 -1
- package/es-modules/Stock/Indicators/LinearRegression/LinearRegressionIndicator.js +0 -1
- package/es-modules/Stock/Indicators/LinearRegressionAngle/LinearRegressionAngleIndicator.js +0 -1
- package/es-modules/Stock/Indicators/LinearRegressionIntercept/LinearRegressionInterceptIndicator.js +0 -1
- package/es-modules/Stock/Indicators/LinearRegressionSlopes/LinearRegressionSlopesIndicator.js +0 -1
- package/es-modules/Stock/Indicators/MACD/MACDIndicator.js +0 -1
- package/es-modules/Stock/Indicators/MFI/MFIIndicator.js +0 -1
- package/es-modules/Stock/Indicators/Momentum/MomentumIndicator.js +0 -1
- package/es-modules/Stock/Indicators/NATR/NATRIndicator.js +0 -1
- package/es-modules/Stock/Indicators/OBV/OBVIndicator.js +0 -1
- package/es-modules/Stock/Indicators/PC/PCIndicator.js +1 -1
- package/es-modules/Stock/Indicators/PPO/PPOIndicator.js +1 -1
- package/es-modules/Stock/Indicators/PSAR/PSARIndicator.js +0 -1
- package/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +0 -1
- package/es-modules/Stock/Indicators/PriceEnvelopes/PriceEnvelopesIndicator.js +0 -1
- package/es-modules/Stock/Indicators/ROC/ROCIndicator.js +0 -1
- package/es-modules/Stock/Indicators/RSI/RSIIndicator.js +0 -1
- package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +1 -1
- package/es-modules/Stock/Indicators/Stochastic/StochasticIndicator.js +3 -3
- package/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +1 -1
- package/es-modules/Stock/Indicators/TEMA/TEMAIndicator.js +1 -1
- package/es-modules/Stock/Indicators/TRIX/TRIXIndicator.js +1 -1
- package/es-modules/Stock/Indicators/TrendLine/TrendLineIndicator.js +0 -1
- package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +1 -1
- package/es-modules/Stock/Indicators/VWAP/VWAPIndicator.js +0 -1
- package/es-modules/Stock/Indicators/WMA/WMAIndicator.js +0 -1
- package/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +1 -1
- package/es-modules/Stock/Indicators/Zigzag/ZigzagIndicator.js +0 -1
- package/es-modules/Stock/Navigator/ChartNavigatorComposition.js +5 -5
- package/es-modules/Stock/Navigator/Navigator.js +1 -5
- package/es-modules/Stock/Navigator/StandaloneNavigator.js +38 -8
- package/es-modules/Stock/RangeSelector/RangeSelectorComposition.js +2 -2
- package/es-modules/Stock/Scrollbar/ScrollbarDefaults.js +1 -3
- package/es-modules/masters/highcharts-3d.src.js +1 -1
- package/es-modules/masters/highcharts-autoload.src.js +1 -1
- package/es-modules/masters/highcharts-gantt.src.js +1 -1
- package/es-modules/masters/highcharts-more.src.js +1 -1
- package/es-modules/masters/highcharts.src.js +1 -1
- package/es-modules/masters/highmaps.src.js +1 -1
- package/es-modules/masters/highstock.src.js +1 -1
- package/es-modules/masters/i18n/fr-FR.src.d.ts +1 -1
- package/es-modules/masters/i18n/fr-FR.src.js +1 -1
- package/es-modules/masters/i18n/nb-NO.src.d.ts +1 -1
- package/es-modules/masters/i18n/nb-NO.src.js +1 -1
- package/es-modules/masters/i18n/zh-CN.src.d.ts +1 -1
- package/es-modules/masters/i18n/zh-CN.src.js +1 -1
- package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
- package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
- package/es-modules/masters/indicators/ao.src.js +1 -1
- package/es-modules/masters/indicators/apo.src.js +1 -1
- package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
- package/es-modules/masters/indicators/aroon.src.js +1 -1
- package/es-modules/masters/indicators/atr.src.js +1 -1
- package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
- package/es-modules/masters/indicators/cci.src.js +1 -1
- package/es-modules/masters/indicators/chaikin.src.js +1 -1
- package/es-modules/masters/indicators/cmf.src.js +1 -1
- package/es-modules/masters/indicators/cmo.src.js +1 -1
- package/es-modules/masters/indicators/dema.src.js +1 -1
- package/es-modules/masters/indicators/disparity-index.src.js +1 -1
- package/es-modules/masters/indicators/dmi.src.js +1 -1
- package/es-modules/masters/indicators/dpo.src.js +1 -1
- package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/es-modules/masters/indicators/indicators-all.src.js +1 -1
- package/es-modules/masters/indicators/indicators.src.js +1 -1
- package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
- package/es-modules/masters/indicators/klinger.src.js +1 -1
- package/es-modules/masters/indicators/macd.src.js +1 -1
- package/es-modules/masters/indicators/mfi.src.js +1 -1
- package/es-modules/masters/indicators/momentum.src.js +1 -1
- package/es-modules/masters/indicators/natr.src.js +1 -1
- package/es-modules/masters/indicators/obv.src.js +1 -1
- package/es-modules/masters/indicators/pivot-points.src.js +1 -1
- package/es-modules/masters/indicators/ppo.src.js +1 -1
- package/es-modules/masters/indicators/price-channel.src.js +1 -1
- package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
- package/es-modules/masters/indicators/psar.src.js +1 -1
- package/es-modules/masters/indicators/regressions.src.js +1 -1
- package/es-modules/masters/indicators/roc.src.js +1 -1
- package/es-modules/masters/indicators/rsi.src.js +1 -1
- package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
- package/es-modules/masters/indicators/stochastic.src.js +1 -1
- package/es-modules/masters/indicators/supertrend.src.js +1 -1
- package/es-modules/masters/indicators/tema.src.js +1 -1
- package/es-modules/masters/indicators/trendline.src.js +1 -1
- package/es-modules/masters/indicators/trix.src.js +1 -1
- package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
- package/es-modules/masters/indicators/vwap.src.js +1 -1
- package/es-modules/masters/indicators/williams-r.src.js +1 -1
- package/es-modules/masters/indicators/wma.src.js +1 -1
- package/es-modules/masters/indicators/zigzag.src.js +1 -1
- package/es-modules/masters/modules/accessibility.src.js +1 -1
- package/es-modules/masters/modules/annotations-advanced.src.js +1 -1
- package/es-modules/masters/modules/annotations.src.js +1 -1
- package/es-modules/masters/modules/arc-diagram.src.js +1 -1
- package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
- package/es-modules/masters/modules/boost-canvas.src.js +1 -1
- package/es-modules/masters/modules/boost.src.js +1 -1
- package/es-modules/masters/modules/broken-axis.src.js +1 -1
- package/es-modules/masters/modules/bullet.src.js +1 -1
- package/es-modules/masters/modules/coloraxis.src.js +1 -1
- package/es-modules/masters/modules/contour.src.js +1 -1
- package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
- package/es-modules/masters/modules/cylinder.src.js +1 -1
- package/es-modules/masters/modules/data-sorting.src.js +1 -1
- package/es-modules/masters/modules/data-tools.src.js +1 -1
- package/es-modules/masters/modules/data.src.js +1 -1
- package/es-modules/masters/modules/datagrouping.src.js +1 -1
- package/es-modules/masters/modules/debugger.src.js +1 -1
- package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
- package/es-modules/masters/modules/dotplot.src.js +1 -1
- package/es-modules/masters/modules/drag-panes.src.js +1 -1
- package/es-modules/masters/modules/draggable-points.src.js +1 -1
- package/es-modules/masters/modules/drilldown.src.js +1 -1
- package/es-modules/masters/modules/dumbbell.src.js +1 -1
- package/es-modules/masters/modules/export-data.src.js +1 -1
- package/es-modules/masters/modules/exporting.src.js +1 -1
- package/es-modules/masters/modules/flowmap.src.js +1 -1
- package/es-modules/masters/modules/full-screen.src.js +1 -1
- package/es-modules/masters/modules/funnel.src.js +1 -1
- package/es-modules/masters/modules/funnel3d.src.js +1 -1
- package/es-modules/masters/modules/gantt.src.js +1 -1
- package/es-modules/masters/modules/geoheatmap.src.js +1 -1
- package/es-modules/masters/modules/grid-axis.src.js +1 -1
- package/es-modules/masters/modules/heatmap.src.js +1 -1
- package/es-modules/masters/modules/heikinashi.src.js +1 -1
- package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
- package/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
- package/es-modules/masters/modules/item-series.src.js +1 -1
- package/es-modules/masters/modules/lollipop.src.js +1 -1
- package/es-modules/masters/modules/map.src.js +1 -1
- package/es-modules/masters/modules/marker-clusters.src.js +1 -1
- package/es-modules/masters/modules/mouse-wheel-zoom.src.js +1 -1
- package/es-modules/masters/modules/navigator.src.js +1 -1
- package/es-modules/masters/modules/networkgraph.src.js +1 -1
- package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
- package/es-modules/masters/modules/non-cartesian-zoom.src.js +1 -1
- package/es-modules/masters/modules/offline-exporting.src.js +1 -1
- package/es-modules/masters/modules/organization.src.js +1 -1
- package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
- package/es-modules/masters/modules/pareto.src.js +1 -1
- package/es-modules/masters/modules/pathfinder.src.js +1 -1
- package/es-modules/masters/modules/pattern-fill.src.js +1 -1
- package/es-modules/masters/modules/pictorial.src.js +1 -1
- package/es-modules/masters/modules/pointandfigure.src.js +1 -1
- package/es-modules/masters/modules/price-indicator.src.js +1 -1
- package/es-modules/masters/modules/pyramid3d.src.js +1 -1
- package/es-modules/masters/modules/renko.src.js +1 -1
- package/es-modules/masters/modules/sankey.src.js +1 -1
- package/es-modules/masters/modules/series-label.src.js +1 -1
- package/es-modules/masters/modules/series-on-point.src.js +1 -1
- package/es-modules/masters/modules/solid-gauge.src.js +1 -1
- package/es-modules/masters/modules/sonification.src.js +1 -1
- package/es-modules/masters/modules/static-scale.src.js +1 -1
- package/es-modules/masters/modules/stock-tools.src.js +1 -1
- package/es-modules/masters/modules/stock.src.js +1 -1
- package/es-modules/masters/modules/streamgraph.src.js +1 -1
- package/es-modules/masters/modules/sunburst.src.js +1 -1
- package/es-modules/masters/modules/textpath.src.js +1 -1
- package/es-modules/masters/modules/tiledwebmap.src.js +1 -1
- package/es-modules/masters/modules/tilemap.src.js +1 -1
- package/es-modules/masters/modules/timeline.src.js +1 -1
- package/es-modules/masters/modules/treegraph.src.js +1 -1
- package/es-modules/masters/modules/treegrid.src.js +1 -1
- package/es-modules/masters/modules/treemap.src.js +1 -1
- package/es-modules/masters/modules/variable-pie.src.js +1 -1
- package/es-modules/masters/modules/variwide.src.js +1 -1
- package/es-modules/masters/modules/vector.src.js +1 -1
- package/es-modules/masters/modules/venn.src.js +1 -1
- package/es-modules/masters/modules/windbarb.src.js +1 -1
- package/es-modules/masters/modules/wordcloud.src.js +1 -1
- package/es-modules/masters/modules/xrange.src.js +1 -1
- package/es-modules/masters/standalone-navigator.src.js +1 -1
- package/es-modules/masters/themes/adaptive.src.js +1 -1
- package/es-modules/masters/themes/avocado.src.js +1 -1
- package/es-modules/masters/themes/dark-unica.src.js +1 -1
- package/es-modules/masters/themes/grid-light.src.js +1 -1
- package/es-modules/masters/themes/high-contrast.src.js +1 -1
- package/es-modules/masters/themes/sand-signika.src.js +1 -1
- package/es-modules/masters/themes/sunset.src.js +1 -1
- package/es-modules/tsconfig.tsbuildinfo +1 -1
- package/esm/highcharts-3d.js +2 -2
- package/esm/highcharts-3d.src.js +38 -61
- package/esm/highcharts-autoload.js +2 -2
- package/esm/highcharts-autoload.src.js +18 -39
- package/esm/highcharts-gantt.js +1 -1
- package/esm/highcharts-gantt.src.js +1 -1
- package/esm/highcharts-more.js +2 -2
- package/esm/highcharts-more.src.js +142 -120
- package/esm/highcharts.js +4 -4
- package/esm/highcharts.src.js +824 -750
- package/esm/highmaps.js +1 -1
- package/esm/highmaps.src.js +1 -1
- package/esm/highstock.js +1 -1
- package/esm/highstock.src.js +1 -1
- package/esm/i18n/fr-FR.js +2 -2
- package/esm/i18n/fr-FR.src.js +17 -38
- package/esm/i18n/nb-NO.js +2 -2
- package/esm/i18n/nb-NO.src.js +17 -38
- package/esm/i18n/zh-CN.js +2 -2
- package/esm/i18n/zh-CN.src.js +17 -38
- package/esm/indicators/acceleration-bands.js +2 -2
- package/esm/indicators/acceleration-bands.src.js +18 -39
- package/esm/indicators/accumulation-distribution.js +2 -2
- package/esm/indicators/accumulation-distribution.src.js +17 -39
- package/esm/indicators/ao.js +2 -2
- package/esm/indicators/ao.src.js +18 -39
- package/esm/indicators/apo.js +2 -2
- package/esm/indicators/apo.src.js +18 -39
- package/esm/indicators/aroon-oscillator.js +2 -2
- package/esm/indicators/aroon-oscillator.src.js +19 -40
- package/esm/indicators/aroon.js +2 -2
- package/esm/indicators/aroon.src.js +18 -39
- package/esm/indicators/atr.js +2 -2
- package/esm/indicators/atr.src.js +17 -39
- package/esm/indicators/bollinger-bands.js +2 -2
- package/esm/indicators/bollinger-bands.src.js +17 -39
- package/esm/indicators/cci.js +2 -2
- package/esm/indicators/cci.src.js +17 -39
- package/esm/indicators/chaikin.js +2 -2
- package/esm/indicators/chaikin.src.js +18 -40
- package/esm/indicators/cmf.js +2 -2
- package/esm/indicators/cmf.src.js +17 -39
- package/esm/indicators/cmo.js +2 -2
- package/esm/indicators/cmo.src.js +17 -39
- package/esm/indicators/dema.js +2 -2
- package/esm/indicators/dema.src.js +18 -39
- package/esm/indicators/disparity-index.js +2 -2
- package/esm/indicators/disparity-index.src.js +20 -41
- package/esm/indicators/dmi.js +2 -2
- package/esm/indicators/dmi.src.js +20 -41
- package/esm/indicators/dpo.js +2 -2
- package/esm/indicators/dpo.src.js +18 -39
- package/esm/indicators/ichimoku-kinko-hyo.js +2 -2
- package/esm/indicators/ichimoku-kinko-hyo.src.js +18 -40
- package/esm/indicators/indicators-all.js +2 -2
- package/esm/indicators/indicators-all.src.js +76 -99
- package/esm/indicators/indicators.js +2 -2
- package/esm/indicators/indicators.src.js +48 -46
- package/esm/indicators/keltner-channels.js +2 -2
- package/esm/indicators/keltner-channels.src.js +18 -39
- package/esm/indicators/klinger.js +2 -2
- package/esm/indicators/klinger.src.js +17 -38
- package/esm/indicators/macd.js +2 -2
- package/esm/indicators/macd.src.js +17 -39
- package/esm/indicators/mfi.js +2 -2
- package/esm/indicators/mfi.src.js +17 -39
- package/esm/indicators/momentum.js +2 -2
- package/esm/indicators/momentum.src.js +17 -39
- package/esm/indicators/natr.js +2 -2
- package/esm/indicators/natr.src.js +17 -39
- package/esm/indicators/obv.js +2 -2
- package/esm/indicators/obv.src.js +17 -39
- package/esm/indicators/pivot-points.js +2 -2
- package/esm/indicators/pivot-points.src.js +17 -39
- package/esm/indicators/ppo.js +2 -2
- package/esm/indicators/ppo.src.js +18 -39
- package/esm/indicators/price-channel.js +2 -2
- package/esm/indicators/price-channel.src.js +18 -39
- package/esm/indicators/price-envelopes.js +2 -2
- package/esm/indicators/price-envelopes.src.js +17 -39
- package/esm/indicators/psar.js +2 -2
- package/esm/indicators/psar.src.js +17 -39
- package/esm/indicators/regressions.js +2 -2
- package/esm/indicators/regressions.src.js +17 -42
- package/esm/indicators/roc.js +2 -2
- package/esm/indicators/roc.src.js +17 -39
- package/esm/indicators/rsi.js +2 -2
- package/esm/indicators/rsi.src.js +17 -39
- package/esm/indicators/slow-stochastic.js +2 -2
- package/esm/indicators/slow-stochastic.src.js +17 -38
- package/esm/indicators/stochastic.js +2 -2
- package/esm/indicators/stochastic.src.js +20 -41
- package/esm/indicators/supertrend.js +2 -2
- package/esm/indicators/supertrend.src.js +19 -40
- package/esm/indicators/tema.js +2 -2
- package/esm/indicators/tema.src.js +18 -39
- package/esm/indicators/trendline.js +2 -2
- package/esm/indicators/trendline.src.js +17 -39
- package/esm/indicators/trix.js +2 -2
- package/esm/indicators/trix.src.js +18 -39
- package/esm/indicators/volume-by-price.js +2 -2
- package/esm/indicators/volume-by-price.src.js +18 -39
- package/esm/indicators/vwap.js +2 -2
- package/esm/indicators/vwap.src.js +17 -39
- package/esm/indicators/williams-r.js +2 -2
- package/esm/indicators/williams-r.src.js +18 -39
- package/esm/indicators/wma.js +2 -2
- package/esm/indicators/wma.src.js +17 -39
- package/esm/indicators/zigzag.js +2 -2
- package/esm/indicators/zigzag.src.js +17 -39
- package/esm/modules/accessibility.js +2 -2
- package/esm/modules/accessibility.src.js +90 -76
- package/esm/modules/annotations-advanced.js +3 -3
- package/esm/modules/annotations-advanced.src.js +36 -58
- package/esm/modules/annotations.js +3 -3
- package/esm/modules/annotations.src.js +36 -58
- package/esm/modules/arc-diagram.js +2 -2
- package/esm/modules/arc-diagram.src.js +18 -39
- package/esm/modules/arrow-symbols.js +3 -3
- package/esm/modules/arrow-symbols.src.js +17 -38
- package/esm/modules/boost-canvas.js +2 -2
- package/esm/modules/boost-canvas.src.js +57 -63
- package/esm/modules/boost.js +2 -2
- package/esm/modules/boost.src.js +56 -62
- package/esm/modules/broken-axis.js +2 -2
- package/esm/modules/broken-axis.src.js +21 -41
- package/esm/modules/bullet.js +2 -2
- package/esm/modules/bullet.src.js +18 -39
- package/esm/modules/coloraxis.js +2 -2
- package/esm/modules/coloraxis.src.js +92 -96
- package/esm/modules/contour.js +3 -3
- package/esm/modules/contour.src.js +29 -52
- package/esm/modules/current-date-indicator.js +2 -2
- package/esm/modules/current-date-indicator.src.js +17 -38
- package/esm/modules/cylinder.js +2 -2
- package/esm/modules/cylinder.src.js +18 -39
- package/esm/modules/data-sorting.js +2 -2
- package/esm/modules/data-sorting.src.js +18 -39
- package/esm/modules/data-tools.js +2 -2
- package/esm/modules/data-tools.src.js +110 -67
- package/esm/modules/data.js +4 -4
- package/esm/modules/data.src.js +53 -48
- package/esm/modules/datagrouping.js +2 -2
- package/esm/modules/datagrouping.src.js +52 -48
- package/esm/modules/debugger.js +2 -2
- package/esm/modules/debugger.src.js +17 -38
- package/esm/modules/dependency-wheel.js +2 -2
- package/esm/modules/dependency-wheel.src.js +17 -38
- package/esm/modules/dotplot.js +2 -2
- package/esm/modules/dotplot.src.js +17 -38
- package/esm/modules/drag-panes.js +2 -2
- package/esm/modules/drag-panes.src.js +22 -46
- package/esm/modules/draggable-points.js +2 -2
- package/esm/modules/draggable-points.src.js +17 -38
- package/esm/modules/drilldown.js +2 -2
- package/esm/modules/drilldown.src.js +40 -54
- package/esm/modules/dumbbell.js +2 -2
- package/esm/modules/dumbbell.src.js +18 -39
- package/esm/modules/export-data.js +2 -2
- package/esm/modules/export-data.src.js +42 -43
- package/esm/modules/exporting.js +2 -2
- package/esm/modules/exporting.src.js +26 -47
- package/esm/modules/flowmap.js +2 -2
- package/esm/modules/flowmap.src.js +17 -38
- package/esm/modules/full-screen.js +2 -2
- package/esm/modules/full-screen.src.js +17 -38
- package/esm/modules/funnel.js +2 -2
- package/esm/modules/funnel.src.js +21 -42
- package/esm/modules/funnel3d.js +2 -2
- package/esm/modules/funnel3d.src.js +18 -39
- package/esm/modules/gantt.js +2 -2
- package/esm/modules/gantt.src.js +84 -104
- package/esm/modules/geoheatmap.js +2 -2
- package/esm/modules/geoheatmap.src.js +18 -39
- package/esm/modules/grid-axis.js +2 -2
- package/esm/modules/grid-axis.src.js +34 -51
- package/esm/modules/heatmap.js +2 -2
- package/esm/modules/heatmap.src.js +20 -41
- package/esm/modules/heikinashi.js +2 -2
- package/esm/modules/heikinashi.src.js +18 -39
- package/esm/modules/histogram-bellcurve.js +2 -2
- package/esm/modules/histogram-bellcurve.src.js +19 -40
- package/esm/modules/hollowcandlestick.js +2 -2
- package/esm/modules/hollowcandlestick.src.js +18 -39
- package/esm/modules/item-series.js +2 -2
- package/esm/modules/item-series.src.js +19 -40
- package/esm/modules/lollipop.js +2 -2
- package/esm/modules/lollipop.src.js +18 -39
- package/esm/modules/map.js +2 -2
- package/esm/modules/map.src.js +64 -63
- package/esm/modules/marker-clusters.js +2 -2
- package/esm/modules/marker-clusters.src.js +49 -46
- package/esm/modules/mouse-wheel-zoom.js +2 -2
- package/esm/modules/mouse-wheel-zoom.src.js +17 -38
- package/esm/modules/navigator.js +2 -2
- package/esm/modules/navigator.src.js +72 -67
- package/esm/modules/networkgraph.js +2 -2
- package/esm/modules/networkgraph.src.js +24 -45
- package/esm/modules/no-data-to-display.js +2 -2
- package/esm/modules/no-data-to-display.src.js +17 -38
- package/esm/modules/non-cartesian-zoom.js +2 -2
- package/esm/modules/non-cartesian-zoom.src.js +17 -38
- package/esm/modules/offline-exporting.js +2 -2
- package/esm/modules/offline-exporting.src.js +19 -40
- package/esm/modules/organization.js +2 -2
- package/esm/modules/organization.src.js +20 -39
- package/esm/modules/parallel-coordinates.js +2 -2
- package/esm/modules/parallel-coordinates.src.js +24 -44
- package/esm/modules/pareto.js +2 -2
- package/esm/modules/pareto.src.js +21 -42
- package/esm/modules/pathfinder.js +2 -2
- package/esm/modules/pathfinder.src.js +20 -39
- package/esm/modules/pattern-fill.js +2 -2
- package/esm/modules/pattern-fill.src.js +17 -38
- package/esm/modules/pictorial.js +2 -2
- package/esm/modules/pictorial.src.js +71 -65
- package/esm/modules/pointandfigure.js +2 -2
- package/esm/modules/pointandfigure.src.js +47 -44
- package/esm/modules/price-indicator.js +2 -2
- package/esm/modules/price-indicator.src.js +17 -38
- package/esm/modules/pyramid3d.js +2 -2
- package/esm/modules/pyramid3d.src.js +18 -39
- package/esm/modules/renko.js +2 -2
- package/esm/modules/renko.src.js +18 -40
- package/esm/modules/sankey.js +2 -2
- package/esm/modules/sankey.src.js +24 -46
- package/esm/modules/series-label.js +2 -2
- package/esm/modules/series-label.src.js +17 -38
- package/esm/modules/series-on-point.js +2 -2
- package/esm/modules/series-on-point.src.js +47 -44
- package/esm/modules/solid-gauge.js +2 -2
- package/esm/modules/solid-gauge.src.js +18 -39
- package/esm/modules/sonification.js +2 -2
- package/esm/modules/sonification.src.js +18 -39
- package/esm/modules/static-scale.js +2 -2
- package/esm/modules/static-scale.src.js +30 -49
- package/esm/modules/stock-tools.js +2 -2
- package/esm/modules/stock-tools.src.js +29 -50
- package/esm/modules/stock.js +2 -2
- package/esm/modules/stock.src.js +117 -141
- package/esm/modules/streamgraph.js +2 -2
- package/esm/modules/streamgraph.src.js +18 -39
- package/esm/modules/sunburst.js +2 -2
- package/esm/modules/sunburst.src.js +38 -57
- package/esm/modules/textpath.js +2 -2
- package/esm/modules/textpath.src.js +17 -38
- package/esm/modules/tiledwebmap.js +3 -3
- package/esm/modules/tiledwebmap.src.js +19 -40
- package/esm/modules/tilemap.js +2 -2
- package/esm/modules/tilemap.src.js +22 -40
- package/esm/modules/timeline.js +2 -2
- package/esm/modules/timeline.src.js +19 -40
- package/esm/modules/treegraph.js +2 -2
- package/esm/modules/treegraph.src.js +23 -42
- package/esm/modules/treegrid.js +2 -2
- package/esm/modules/treegrid.src.js +47 -67
- package/esm/modules/treemap.js +2 -2
- package/esm/modules/treemap.src.js +34 -53
- package/esm/modules/variable-pie.js +2 -2
- package/esm/modules/variable-pie.src.js +19 -40
- package/esm/modules/variwide.js +2 -2
- package/esm/modules/variwide.src.js +28 -46
- package/esm/modules/vector.js +2 -2
- package/esm/modules/vector.src.js +18 -39
- package/esm/modules/venn.js +2 -2
- package/esm/modules/venn.src.js +18 -39
- package/esm/modules/windbarb.js +2 -2
- package/esm/modules/windbarb.src.js +18 -39
- package/esm/modules/wordcloud.js +2 -2
- package/esm/modules/wordcloud.src.js +18 -39
- package/esm/modules/xrange.js +2 -2
- package/esm/modules/xrange.src.js +18 -39
- package/esm/standalone-navigator.js +4 -4
- package/esm/standalone-navigator.src.js +876 -776
- package/esm/themes/adaptive.js +2 -2
- package/esm/themes/adaptive.src.js +17 -38
- package/esm/themes/avocado.js +2 -2
- package/esm/themes/avocado.src.js +17 -38
- package/esm/themes/dark-unica.js +2 -2
- package/esm/themes/dark-unica.src.js +17 -38
- package/esm/themes/grid-light.js +2 -2
- package/esm/themes/grid-light.src.js +17 -38
- package/esm/themes/high-contrast.js +2 -2
- package/esm/themes/high-contrast.src.js +17 -38
- package/esm/themes/sand-signika.js +2 -2
- package/esm/themes/sand-signika.src.js +17 -38
- package/esm/themes/sunset.js +2 -2
- package/esm/themes/sunset.src.js +17 -38
- package/highcharts-3d.js +2 -2
- package/highcharts-3d.src.js +43 -66
- package/highcharts-autoload.d.ts +0 -1
- package/highcharts-autoload.js +4 -4
- package/highcharts-autoload.src.d.ts +0 -1
- package/highcharts-autoload.src.js +833 -778
- package/highcharts-gantt.js +4 -4
- package/highcharts-gantt.src.js +895 -839
- package/highcharts-more.d.ts +10 -0
- package/highcharts-more.js +2 -2
- package/highcharts-more.src.d.ts +10 -0
- package/highcharts-more.src.js +147 -125
- package/highcharts.d.ts +2785 -80144
- package/highcharts.js +4 -4
- package/highcharts.src.d.ts +2785 -80144
- package/highcharts.src.js +832 -777
- package/highmaps.js +4 -4
- package/highmaps.src.js +915 -845
- package/highstock.js +4 -4
- package/highstock.src.js +903 -874
- package/i18n/fr-FR.js +2 -2
- package/i18n/fr-FR.src.js +26 -37
- package/i18n/nb-NO.js +2 -2
- package/i18n/nb-NO.src.js +26 -37
- package/i18n/zh-CN.js +2 -2
- package/i18n/zh-CN.src.js +26 -37
- package/indicators/acceleration-bands.js +2 -2
- package/indicators/acceleration-bands.src.js +23 -44
- package/indicators/accumulation-distribution.js +2 -2
- package/indicators/accumulation-distribution.src.js +22 -44
- package/indicators/ao.js +2 -2
- package/indicators/ao.src.js +23 -44
- package/indicators/apo.js +2 -2
- package/indicators/apo.src.js +23 -44
- package/indicators/aroon-oscillator.js +2 -2
- package/indicators/aroon-oscillator.src.js +24 -45
- package/indicators/aroon.js +2 -2
- package/indicators/aroon.src.js +23 -44
- package/indicators/atr.js +2 -2
- package/indicators/atr.src.js +22 -44
- package/indicators/bollinger-bands.js +2 -2
- package/indicators/bollinger-bands.src.js +22 -44
- package/indicators/cci.js +2 -2
- package/indicators/cci.src.js +22 -44
- package/indicators/chaikin.js +2 -2
- package/indicators/chaikin.src.js +23 -45
- package/indicators/cmf.js +2 -2
- package/indicators/cmf.src.js +22 -44
- package/indicators/cmo.js +2 -2
- package/indicators/cmo.src.js +22 -44
- package/indicators/dema.js +2 -2
- package/indicators/dema.src.js +23 -44
- package/indicators/disparity-index.js +2 -2
- package/indicators/disparity-index.src.js +25 -46
- package/indicators/dmi.js +2 -2
- package/indicators/dmi.src.js +25 -46
- package/indicators/dpo.js +2 -2
- package/indicators/dpo.src.js +23 -44
- package/indicators/ichimoku-kinko-hyo.js +2 -2
- package/indicators/ichimoku-kinko-hyo.src.js +23 -45
- package/indicators/indicators-all.js +2 -2
- package/indicators/indicators-all.src.js +81 -104
- package/indicators/indicators.js +2 -2
- package/indicators/indicators.src.js +53 -51
- package/indicators/keltner-channels.js +2 -2
- package/indicators/keltner-channels.src.js +23 -44
- package/indicators/klinger.js +2 -2
- package/indicators/klinger.src.js +22 -43
- package/indicators/macd.js +2 -2
- package/indicators/macd.src.js +22 -44
- package/indicators/mfi.js +2 -2
- package/indicators/mfi.src.js +22 -44
- package/indicators/momentum.js +2 -2
- package/indicators/momentum.src.js +22 -44
- package/indicators/natr.js +2 -2
- package/indicators/natr.src.js +22 -44
- package/indicators/obv.js +2 -2
- package/indicators/obv.src.js +22 -44
- package/indicators/pivot-points.js +2 -2
- package/indicators/pivot-points.src.js +22 -44
- package/indicators/ppo.js +2 -2
- package/indicators/ppo.src.js +23 -44
- package/indicators/price-channel.js +2 -2
- package/indicators/price-channel.src.js +23 -44
- package/indicators/price-envelopes.js +2 -2
- package/indicators/price-envelopes.src.js +22 -44
- package/indicators/psar.js +2 -2
- package/indicators/psar.src.js +22 -44
- package/indicators/regressions.js +2 -2
- package/indicators/regressions.src.js +22 -47
- package/indicators/roc.js +2 -2
- package/indicators/roc.src.js +22 -44
- package/indicators/rsi.js +2 -2
- package/indicators/rsi.src.js +22 -44
- package/indicators/slow-stochastic.js +2 -2
- package/indicators/slow-stochastic.src.js +22 -43
- package/indicators/stochastic.js +2 -2
- package/indicators/stochastic.src.js +25 -46
- package/indicators/supertrend.js +2 -2
- package/indicators/supertrend.src.js +24 -45
- package/indicators/tema.js +2 -2
- package/indicators/tema.src.js +23 -44
- package/indicators/trendline.js +2 -2
- package/indicators/trendline.src.js +22 -44
- package/indicators/trix.js +2 -2
- package/indicators/trix.src.js +23 -44
- package/indicators/volume-by-price.js +2 -2
- package/indicators/volume-by-price.src.js +23 -44
- package/indicators/vwap.js +2 -2
- package/indicators/vwap.src.js +22 -44
- package/indicators/williams-r.js +2 -2
- package/indicators/williams-r.src.js +23 -44
- package/indicators/wma.js +2 -2
- package/indicators/wma.src.js +22 -44
- package/indicators/zigzag.js +2 -2
- package/indicators/zigzag.src.js +22 -44
- package/modules/accessibility.js +2 -2
- package/modules/accessibility.src.js +95 -81
- package/modules/annotations-advanced.js +9 -9
- package/modules/annotations-advanced.src.js +41 -63
- package/modules/annotations.js +3 -3
- package/modules/annotations.src.js +41 -63
- package/modules/arc-diagram.js +2 -2
- package/modules/arc-diagram.src.js +23 -44
- package/modules/arrow-symbols.js +2 -2
- package/modules/arrow-symbols.src.js +17 -38
- package/modules/boost-canvas.js +2 -2
- package/modules/boost-canvas.src.js +62 -68
- package/modules/boost.js +2 -2
- package/modules/boost.src.js +61 -67
- package/modules/broken-axis.js +2 -2
- package/modules/broken-axis.src.js +26 -46
- package/modules/bullet.js +2 -2
- package/modules/bullet.src.js +23 -44
- package/modules/coloraxis.js +2 -2
- package/modules/coloraxis.src.js +97 -101
- package/modules/contour.js +5 -5
- package/modules/contour.src.js +111 -117
- package/modules/current-date-indicator.js +2 -2
- package/modules/current-date-indicator.src.js +17 -38
- package/modules/cylinder.js +2 -2
- package/modules/cylinder.src.js +23 -44
- package/modules/data-sorting.js +2 -2
- package/modules/data-sorting.src.js +18 -39
- package/modules/data-tools.js +2 -2
- package/modules/data-tools.src.js +110 -67
- package/modules/data.js +4 -4
- package/modules/data.src.js +58 -53
- package/modules/datagrouping.js +2 -2
- package/modules/datagrouping.src.js +57 -53
- package/modules/debugger.js +2 -2
- package/modules/debugger.src.js +17 -38
- package/modules/dependency-wheel.js +2 -2
- package/modules/dependency-wheel.src.js +22 -43
- package/modules/dotplot.js +2 -2
- package/modules/dotplot.src.js +22 -43
- package/modules/drag-panes.js +2 -2
- package/modules/drag-panes.src.js +22 -46
- package/modules/draggable-points.js +2 -2
- package/modules/draggable-points.src.js +17 -38
- package/modules/drilldown.js +2 -2
- package/modules/drilldown.src.js +45 -59
- package/modules/dumbbell.js +2 -2
- package/modules/dumbbell.src.js +23 -44
- package/modules/export-data.js +2 -2
- package/modules/export-data.src.js +47 -48
- package/modules/exporting.js +2 -2
- package/modules/exporting.src.js +31 -52
- package/modules/flowmap.js +2 -2
- package/modules/flowmap.src.js +22 -43
- package/modules/full-screen.js +2 -2
- package/modules/full-screen.src.js +22 -43
- package/modules/funnel.js +2 -2
- package/modules/funnel.src.js +26 -47
- package/modules/funnel3d.js +2 -2
- package/modules/funnel3d.src.js +23 -44
- package/modules/gantt.js +8 -8
- package/modules/gantt.src.js +93 -113
- package/modules/geoheatmap.js +2 -2
- package/modules/geoheatmap.src.js +23 -44
- package/modules/grid-axis.js +2 -2
- package/modules/grid-axis.src.js +39 -56
- package/modules/heatmap.js +4 -4
- package/modules/heatmap.src.js +101 -105
- package/modules/heikinashi.js +2 -2
- package/modules/heikinashi.src.js +23 -44
- package/modules/histogram-bellcurve.js +2 -2
- package/modules/histogram-bellcurve.src.js +24 -45
- package/modules/hollowcandlestick.js +2 -2
- package/modules/hollowcandlestick.src.js +23 -44
- package/modules/item-series.js +2 -2
- package/modules/item-series.src.js +24 -45
- package/modules/lollipop.js +2 -2
- package/modules/lollipop.src.js +23 -44
- package/modules/map.js +4 -4
- package/modules/map.src.js +146 -128
- package/modules/marker-clusters.js +2 -2
- package/modules/marker-clusters.src.js +49 -46
- package/modules/mouse-wheel-zoom.js +2 -2
- package/modules/mouse-wheel-zoom.src.js +17 -38
- package/modules/navigator.js +2 -2
- package/modules/navigator.src.js +77 -72
- package/modules/networkgraph.js +2 -2
- package/modules/networkgraph.src.js +29 -50
- package/modules/no-data-to-display.js +2 -2
- package/modules/no-data-to-display.src.js +22 -43
- package/modules/non-cartesian-zoom.js +2 -2
- package/modules/non-cartesian-zoom.src.js +17 -38
- package/modules/offline-exporting.js +2 -2
- package/modules/offline-exporting.src.js +24 -45
- package/modules/organization.js +3 -3
- package/modules/organization.src.js +25 -44
- package/modules/parallel-coordinates.js +2 -2
- package/modules/parallel-coordinates.src.js +29 -49
- package/modules/pareto.js +2 -2
- package/modules/pareto.src.js +26 -47
- package/modules/pathfinder.js +2 -2
- package/modules/pathfinder.src.js +25 -44
- package/modules/pattern-fill.js +2 -2
- package/modules/pattern-fill.src.js +17 -38
- package/modules/pictorial.js +2 -2
- package/modules/pictorial.src.js +76 -70
- package/modules/pointandfigure.js +2 -2
- package/modules/pointandfigure.src.js +52 -49
- package/modules/price-indicator.js +2 -2
- package/modules/price-indicator.src.js +17 -38
- package/modules/pyramid3d.js +2 -2
- package/modules/pyramid3d.src.js +23 -44
- package/modules/renko.js +2 -2
- package/modules/renko.src.js +23 -45
- package/modules/sankey.js +2 -2
- package/modules/sankey.src.js +29 -51
- package/modules/series-label.js +2 -2
- package/modules/series-label.src.js +22 -43
- package/modules/series-on-point.js +2 -2
- package/modules/series-on-point.src.js +52 -49
- package/modules/solid-gauge.js +2 -2
- package/modules/solid-gauge.src.js +23 -44
- package/modules/sonification.js +2 -2
- package/modules/sonification.src.js +23 -44
- package/modules/static-scale.js +2 -2
- package/modules/static-scale.src.js +30 -49
- package/modules/stock-tools.js +2 -2
- package/modules/stock-tools.src.js +34 -55
- package/modules/stock.js +6 -6
- package/modules/stock.src.js +132 -154
- package/modules/streamgraph.js +2 -2
- package/modules/streamgraph.src.js +23 -44
- package/modules/sunburst.js +2 -2
- package/modules/sunburst.src.js +43 -62
- package/modules/textpath.js +2 -2
- package/modules/textpath.src.js +17 -38
- package/modules/tiledwebmap.js +3 -3
- package/modules/tiledwebmap.src.js +24 -45
- package/modules/tilemap.js +2 -2
- package/modules/tilemap.src.js +27 -45
- package/modules/timeline.js +2 -2
- package/modules/timeline.src.js +24 -45
- package/modules/treegraph.js +2 -2
- package/modules/treegraph.src.js +28 -47
- package/modules/treegrid.js +2 -2
- package/modules/treegrid.src.js +52 -72
- package/modules/treemap.js +2 -2
- package/modules/treemap.src.js +39 -58
- package/modules/variable-pie.js +2 -2
- package/modules/variable-pie.src.js +24 -45
- package/modules/variwide.js +2 -2
- package/modules/variwide.src.js +33 -51
- package/modules/vector.js +2 -2
- package/modules/vector.src.js +23 -44
- package/modules/venn.js +2 -2
- package/modules/venn.src.js +23 -44
- package/modules/windbarb.js +2 -2
- package/modules/windbarb.src.js +23 -44
- package/modules/wordcloud.js +2 -2
- package/modules/wordcloud.src.js +23 -44
- package/modules/xrange.js +2 -2
- package/modules/xrange.src.js +23 -44
- package/options/abands.d.ts +183 -8
- package/options/abands.src.d.ts +183 -8
- package/options/ad.d.ts +176 -5
- package/options/ad.src.d.ts +176 -5
- package/options/ao.d.ts +202 -0
- package/options/ao.src.d.ts +202 -0
- package/options/apo.d.ts +178 -8
- package/options/apo.src.d.ts +178 -8
- package/options/arcdiagram.d.ts +785 -0
- package/options/arcdiagram.src.d.ts +785 -0
- package/options/area.d.ts +226 -0
- package/options/area.src.d.ts +226 -0
- package/options/arearange.d.ts +229 -8
- package/options/arearange.src.d.ts +229 -8
- package/options/areaspline.d.ts +1344 -8
- package/options/areaspline.src.d.ts +1344 -8
- package/options/areasplinerange.d.ts +972 -8
- package/options/areasplinerange.src.d.ts +972 -8
- package/options/aroon.d.ts +219 -0
- package/options/aroon.src.d.ts +219 -0
- package/options/aroonoscillator.d.ts +1140 -8
- package/options/aroonoscillator.src.d.ts +1140 -8
- package/options/atr.d.ts +210 -0
- package/options/atr.src.d.ts +210 -0
- package/options/bar.d.ts +183 -10
- package/options/bar.src.d.ts +183 -10
- package/options/bb.d.ts +1232 -0
- package/options/bb.src.d.ts +1232 -0
- package/options/bellcurve.d.ts +1167 -8
- package/options/bellcurve.src.d.ts +1167 -8
- package/options/boxplot.d.ts +163 -10
- package/options/boxplot.src.d.ts +163 -10
- package/options/bubble.d.ts +1005 -8
- package/options/bubble.src.d.ts +1005 -8
- package/options/bullet.d.ts +953 -8
- package/options/bullet.src.d.ts +953 -8
- package/options/candlestick.d.ts +1309 -8
- package/options/candlestick.src.d.ts +1309 -8
- package/options/cci.d.ts +210 -0
- package/options/cci.src.d.ts +210 -0
- package/options/chaikin.d.ts +180 -8
- package/options/chaikin.src.d.ts +180 -8
- package/options/cmf.d.ts +211 -0
- package/options/cmf.src.d.ts +211 -0
- package/options/cmo.d.ts +175 -5
- package/options/cmo.src.d.ts +175 -5
- package/options/column.d.ts +252 -2
- package/options/column.src.d.ts +252 -2
- package/options/columnpyramid.d.ts +1296 -0
- package/options/columnpyramid.src.d.ts +1296 -0
- package/options/columnrange.d.ts +216 -2
- package/options/columnrange.src.d.ts +216 -2
- package/options/contour.d.ts +1148 -0
- package/options/contour.src.d.ts +1148 -0
- package/options/cylinder.d.ts +183 -2
- package/options/cylinder.src.d.ts +183 -2
- package/options/dema.d.ts +1181 -0
- package/options/dema.src.d.ts +1181 -0
- package/options/dependencywheel.d.ts +315 -0
- package/options/dependencywheel.src.d.ts +315 -0
- package/options/disparityindex.d.ts +1157 -8
- package/options/disparityindex.src.d.ts +1157 -8
- package/options/dmi.d.ts +1227 -0
- package/options/dmi.src.d.ts +1227 -0
- package/options/dpo.d.ts +1140 -8
- package/options/dpo.src.d.ts +1140 -8
- package/options/dumbbell.d.ts +286 -0
- package/options/dumbbell.src.d.ts +286 -0
- package/options/ema.d.ts +1156 -5
- package/options/ema.src.d.ts +1156 -5
- package/options/errorbar.d.ts +1286 -0
- package/options/errorbar.src.d.ts +1286 -0
- package/options/flags.d.ts +1269 -8
- package/options/flags.src.d.ts +1269 -8
- package/options/flowmap.d.ts +551 -0
- package/options/flowmap.src.d.ts +551 -0
- package/options/funnel.d.ts +728 -10
- package/options/funnel.src.d.ts +728 -10
- package/options/gantt.d.ts +1011 -0
- package/options/gantt.src.d.ts +1011 -0
- package/options/gauge.d.ts +675 -0
- package/options/gauge.src.d.ts +675 -0
- package/options/geoheatmap.d.ts +585 -8
- package/options/geoheatmap.src.d.ts +585 -8
- package/options/heatmap.d.ts +1054 -8
- package/options/heatmap.src.d.ts +1054 -8
- package/options/heikinashi.d.ts +178 -10
- package/options/heikinashi.src.d.ts +178 -10
- package/options/histogram.d.ts +1226 -0
- package/options/histogram.src.d.ts +1226 -0
- package/options/hlc.d.ts +223 -2
- package/options/hlc.src.d.ts +223 -2
- package/options/hollowcandlestick.d.ts +1335 -0
- package/options/hollowcandlestick.src.d.ts +1335 -0
- package/options/ikh.d.ts +228 -5
- package/options/ikh.src.d.ts +228 -5
- package/options/item.d.ts +217 -8
- package/options/item.src.d.ts +217 -8
- package/options/keltnerchannels.d.ts +1220 -0
- package/options/keltnerchannels.src.d.ts +1220 -0
- package/options/klinger.d.ts +1162 -0
- package/options/klinger.src.d.ts +1162 -0
- package/options/line.d.ts +1377 -8
- package/options/line.src.d.ts +1377 -8
- package/options/linearregression.d.ts +199 -5
- package/options/linearregression.src.d.ts +199 -5
- package/options/linearregressionangle.d.ts +1157 -5
- package/options/linearregressionangle.src.d.ts +1157 -5
- package/options/linearregressionintercept.d.ts +240 -0
- package/options/linearregressionintercept.src.d.ts +240 -0
- package/options/linearregressionslope.d.ts +240 -0
- package/options/linearregressionslope.src.d.ts +240 -0
- package/options/lollipop.d.ts +949 -0
- package/options/lollipop.src.d.ts +949 -0
- package/options/macd.d.ts +254 -0
- package/options/macd.src.d.ts +254 -0
- package/options/map.d.ts +150 -8
- package/options/map.src.d.ts +150 -8
- package/options/mapbubble.d.ts +1016 -8
- package/options/mapbubble.src.d.ts +1016 -8
- package/options/mapline.d.ts +994 -0
- package/options/mapline.src.d.ts +994 -0
- package/options/mappoint.d.ts +1105 -1
- package/options/mappoint.src.d.ts +1105 -1
- package/options/mfi.d.ts +181 -5
- package/options/mfi.src.d.ts +181 -5
- package/options/momentum.d.ts +215 -0
- package/options/momentum.src.d.ts +215 -0
- package/options/natr.d.ts +170 -5
- package/options/natr.src.d.ts +170 -5
- package/options/networkgraph.d.ts +365 -0
- package/options/networkgraph.src.d.ts +365 -0
- package/options/obv.d.ts +170 -5
- package/options/obv.src.d.ts +170 -5
- package/options/ohlc.d.ts +183 -7
- package/options/ohlc.src.d.ts +183 -7
- package/options/organization.d.ts +808 -0
- package/options/organization.src.d.ts +808 -0
- package/options/packedbubble.d.ts +877 -8
- package/options/packedbubble.src.d.ts +877 -8
- package/options/pareto.d.ts +1028 -0
- package/options/pareto.src.d.ts +1028 -0
- package/options/pc.d.ts +183 -8
- package/options/pc.src.d.ts +183 -8
- package/options/pictorial.d.ts +202 -2
- package/options/pictorial.src.d.ts +202 -2
- package/options/pie.d.ts +196 -8
- package/options/pie.src.d.ts +196 -8
- package/options/pivotpoints.d.ts +1199 -0
- package/options/pivotpoints.src.d.ts +1199 -0
- package/options/pointandfigure.d.ts +980 -0
- package/options/pointandfigure.src.d.ts +980 -0
- package/options/polygon.d.ts +234 -0
- package/options/polygon.src.d.ts +234 -0
- package/options/ppo.d.ts +1156 -8
- package/options/ppo.src.d.ts +1156 -8
- package/options/priceenvelopes.d.ts +1229 -0
- package/options/priceenvelopes.src.d.ts +1229 -0
- package/options/psar.d.ts +1156 -5
- package/options/psar.src.d.ts +1156 -5
- package/options/pyramid.d.ts +837 -2
- package/options/pyramid.src.d.ts +837 -2
- package/options/renko.d.ts +247 -10
- package/options/renko.src.d.ts +247 -10
- package/options/roc.d.ts +1215 -0
- package/options/roc.src.d.ts +1215 -0
- package/options/rsi.d.ts +1157 -5
- package/options/rsi.src.d.ts +1157 -5
- package/options/sankey.d.ts +276 -8
- package/options/sankey.src.d.ts +276 -8
- package/options/scatter.d.ts +3043 -1018
- package/options/scatter.src.d.ts +3043 -1018
- package/options/series.d.ts +175 -0
- package/options/series.src.d.ts +175 -0
- package/options/slowstochastic.d.ts +183 -0
- package/options/slowstochastic.src.d.ts +183 -0
- package/options/sma.d.ts +211 -0
- package/options/sma.src.d.ts +211 -0
- package/options/solidgauge.d.ts +218 -0
- package/options/solidgauge.src.d.ts +218 -0
- package/options/spline.d.ts +230 -0
- package/options/spline.src.d.ts +230 -0
- package/options/stochastic.d.ts +1170 -8
- package/options/stochastic.src.d.ts +1170 -8
- package/options/streamgraph.d.ts +1345 -8
- package/options/streamgraph.src.d.ts +1345 -8
- package/options/sunburst.d.ts +286 -9
- package/options/sunburst.src.d.ts +286 -9
- package/options/supertrend.d.ts +1208 -0
- package/options/supertrend.src.d.ts +1208 -0
- package/options/tema.d.ts +1140 -8
- package/options/tema.src.d.ts +1140 -8
- package/options/tiledwebmap.d.ts +164 -0
- package/options/tiledwebmap.src.d.ts +164 -0
- package/options/tilemap.d.ts +687 -0
- package/options/tilemap.src.d.ts +687 -0
- package/options/timeline.d.ts +282 -0
- package/options/timeline.src.d.ts +282 -0
- package/options/treegraph.d.ts +982 -0
- package/options/treegraph.src.d.ts +982 -0
- package/options/treemap.d.ts +1396 -22
- package/options/treemap.src.d.ts +1396 -22
- package/options/trendline.d.ts +211 -0
- package/options/trendline.src.d.ts +211 -0
- package/options/trix.d.ts +178 -8
- package/options/trix.src.d.ts +178 -8
- package/options/variablepie.d.ts +686 -8
- package/options/variablepie.src.d.ts +686 -8
- package/options/variwide.d.ts +178 -2
- package/options/variwide.src.d.ts +178 -2
- package/options/vbp.d.ts +576 -0
- package/options/vbp.src.d.ts +576 -0
- package/options/vector.d.ts +660 -0
- package/options/vector.src.d.ts +660 -0
- package/options/venn.d.ts +654 -0
- package/options/venn.src.d.ts +654 -0
- package/options/vwap.d.ts +1157 -5
- package/options/vwap.src.d.ts +1157 -5
- package/options/waterfall.d.ts +1254 -8
- package/options/waterfall.src.d.ts +1254 -8
- package/options/williamsr.d.ts +209 -0
- package/options/williamsr.src.d.ts +209 -0
- package/options/windbarb.d.ts +222 -2
- package/options/windbarb.src.d.ts +222 -2
- package/options/wma.d.ts +1156 -5
- package/options/wma.src.d.ts +1156 -5
- package/options/wordcloud.d.ts +682 -0
- package/options/wordcloud.src.d.ts +682 -0
- package/options/xrange.d.ts +1168 -0
- package/options/xrange.src.d.ts +1168 -0
- package/options/zigzag.d.ts +1197 -0
- package/options/zigzag.src.d.ts +1197 -0
- package/package.json +1 -1
- package/standalone-navigator.js +4 -4
- package/standalone-navigator.src.js +884 -803
- package/themes/adaptive.js +2 -2
- package/themes/adaptive.src.js +22 -43
- package/themes/avocado.js +2 -2
- package/themes/avocado.src.js +17 -38
- package/themes/dark-unica.js +2 -2
- package/themes/dark-unica.src.js +17 -38
- package/themes/grid-light.js +2 -2
- package/themes/grid-light.src.js +17 -38
- package/themes/high-contrast.js +2 -2
- package/themes/high-contrast.src.js +17 -38
- package/themes/sand-signika.js +2 -2
- package/themes/sand-signika.src.js +17 -38
- package/themes/sunset.js +2 -2
- package/themes/sunset.src.js +17 -38
package/esm/highcharts.src.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: LicenseRef-Highcharts
|
|
2
2
|
/**
|
|
3
|
-
* @license Highcharts JS v13.0
|
|
3
|
+
* @license Highcharts JS v13.1.0 (2026-09-18)
|
|
4
4
|
* @module highcharts/highcharts
|
|
5
5
|
*
|
|
6
6
|
* (c) 2009-2026 Highsoft AS
|
|
@@ -38,7 +38,7 @@ var Globals;
|
|
|
38
38
|
* Constants
|
|
39
39
|
*
|
|
40
40
|
* */
|
|
41
|
-
Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '13.0
|
|
41
|
+
Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '13.1.0', Globals.win = (typeof window !== 'undefined' ?
|
|
42
42
|
window :
|
|
43
43
|
{}), // eslint-disable-line node/no-unsupported-features/es-builtins
|
|
44
44
|
Globals.doc = Globals.win.document, Globals.svg = !!Globals.doc?.createElementNS?.(Globals.SVG_NS, 'svg')?.createSVGRect, Globals.pageLang = Globals.doc?.documentElement?.closest('[lang]')?.lang, Globals.userAgent = Globals.win.navigator?.userAgent || '', Globals.isChrome = Globals.win.chrome, Globals.isFirefox = Globals.userAgent.indexOf('Firefox') !== -1, Globals.isMS = /(edge|msie|trident)/i.test(Globals.userAgent) && !Globals.win.opera, Globals.isSafari = !Globals.isChrome && Globals.userAgent.indexOf('Safari') !== -1, Globals.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(Globals.userAgent), Globals.isWebKit = Globals.userAgent.indexOf('AppleWebKit') !== -1, Globals.deg2rad = Math.PI * 2 / 360, Globals.marginNames = [
|
|
@@ -49,14 +49,16 @@ var Globals;
|
|
|
49
49
|
], Globals.noop = function () { }, Globals.supportsPassiveEvents = (function () {
|
|
50
50
|
// Checks whether the browser supports passive events, (#11353).
|
|
51
51
|
let supportsPassive = false;
|
|
52
|
-
//
|
|
53
|
-
//
|
|
52
|
+
// Accessors don't work on IE as well as passive events - instead
|
|
53
|
+
// of using polyfill, we can exclude IE totally. The getter has to
|
|
54
|
+
// be enumerable, or wrappers that shallow-copy the options never
|
|
55
|
+
// read it (#25092).
|
|
54
56
|
if (!Globals.isMS) {
|
|
55
|
-
const opts =
|
|
56
|
-
get
|
|
57
|
-
supportsPassive = true;
|
|
57
|
+
const opts = {
|
|
58
|
+
get passive() {
|
|
59
|
+
return (supportsPassive = true);
|
|
58
60
|
}
|
|
59
|
-
}
|
|
61
|
+
};
|
|
60
62
|
if (Globals.win.addEventListener && Globals.win.removeEventListener) {
|
|
61
63
|
Globals.win.addEventListener('testPassive', Globals.noop, opts);
|
|
62
64
|
Globals.win.removeEventListener('testPassive', Globals.noop, opts);
|
|
@@ -2132,6 +2134,13 @@ function extend(a, b) {
|
|
|
2132
2134
|
a = {};
|
|
2133
2135
|
}
|
|
2134
2136
|
for (n in b) { // eslint-disable-line guard-for-in
|
|
2137
|
+
// Prototype pollution (#14883). Keys like `__proto__` may arrive as
|
|
2138
|
+
// own, enumerable properties through `JSON.parse`, in which case
|
|
2139
|
+
// assigning them would mutate the prototype of the target instead of
|
|
2140
|
+
// adding a property.
|
|
2141
|
+
if (n === '__proto__' || n === 'constructor') {
|
|
2142
|
+
continue;
|
|
2143
|
+
}
|
|
2135
2144
|
a[n] = b[n];
|
|
2136
2145
|
}
|
|
2137
2146
|
return a;
|
|
@@ -5393,6 +5402,13 @@ const defaultOptions = {
|
|
|
5393
5402
|
* @since 2.0
|
|
5394
5403
|
* @apioption title.align
|
|
5395
5404
|
*/
|
|
5405
|
+
/**
|
|
5406
|
+
* A CSS class name to apply to the title's container div,
|
|
5407
|
+
* allowing unique CSS styling for each chart.
|
|
5408
|
+
*
|
|
5409
|
+
* @type {string}
|
|
5410
|
+
* @apioption title.className
|
|
5411
|
+
*/
|
|
5396
5412
|
/**
|
|
5397
5413
|
* The margin between the title and the plot area, or if a subtitle
|
|
5398
5414
|
* is present, the margin between the subtitle and the plot area.
|
|
@@ -5455,6 +5471,13 @@ const defaultOptions = {
|
|
|
5455
5471
|
* @since 2.0
|
|
5456
5472
|
* @apioption subtitle.align
|
|
5457
5473
|
*/
|
|
5474
|
+
/**
|
|
5475
|
+
* A CSS class name to apply to the subtitle's container div,
|
|
5476
|
+
* allowing unique CSS styling for each chart.
|
|
5477
|
+
*
|
|
5478
|
+
* @type {string}
|
|
5479
|
+
* @apioption subtitle.className
|
|
5480
|
+
*/
|
|
5458
5481
|
/**
|
|
5459
5482
|
* When the subtitle is floating, the plot area will not move to make
|
|
5460
5483
|
* space for it.
|
|
@@ -7587,6 +7610,10 @@ const defaultOptions = {
|
|
|
7587
7610
|
/**
|
|
7588
7611
|
* The URL for the credits label.
|
|
7589
7612
|
*
|
|
7613
|
+
* URLs that do not start with one of the
|
|
7614
|
+
* [AST.allowedReferences](https://api.highcharts.com/class-reference/Highcharts.AST#.allowedReferences),
|
|
7615
|
+
* for example `javascript:` URLs, are ignored.
|
|
7616
|
+
*
|
|
7590
7617
|
* @sample {highcharts} highcharts/credits/href/
|
|
7591
7618
|
* Custom URL and text
|
|
7592
7619
|
* @sample {highmaps} maps/credits/customized/
|
|
@@ -8560,6 +8587,7 @@ class Fx {
|
|
|
8560
8587
|
* Prepare start and end values so that the path can be animated one to one.
|
|
8561
8588
|
*
|
|
8562
8589
|
* @function Highcharts.Fx#initPath
|
|
8590
|
+
* @internal
|
|
8563
8591
|
*
|
|
8564
8592
|
* @param {Highcharts.SVGElement} elem
|
|
8565
8593
|
* The SVGElement item.
|
|
@@ -8859,7 +8887,9 @@ function animate(el, params = { pos: 1 }, opt) {
|
|
|
8859
8887
|
if (el) {
|
|
8860
8888
|
stop(el, prop);
|
|
8861
8889
|
}
|
|
8862
|
-
const fx = new Animation_Fx(el, opt, prop), d = params.d
|
|
8890
|
+
const fx = new Animation_Fx(el, opt, prop), d = params.d,
|
|
8891
|
+
// Discrete value that doesn't animate, apply at once
|
|
8892
|
+
applyImmediately = prop === 'dashstyle';
|
|
8863
8893
|
let start = 0, end = void 0, unit = '';
|
|
8864
8894
|
if (prop === 'd' && isArray(d)) {
|
|
8865
8895
|
fx.paths = fx.initPath(el, el.pathArray, d);
|
|
@@ -8868,6 +8898,9 @@ function animate(el, params = { pos: 1 }, opt) {
|
|
|
8868
8898
|
}
|
|
8869
8899
|
else if (el?.attr) {
|
|
8870
8900
|
start = el.attr(prop);
|
|
8901
|
+
if (applyImmediately) {
|
|
8902
|
+
el.attr(prop, val);
|
|
8903
|
+
}
|
|
8871
8904
|
}
|
|
8872
8905
|
else if (el) {
|
|
8873
8906
|
start = +(getStyle(el, prop) || 0);
|
|
@@ -8882,7 +8915,7 @@ function animate(el, params = { pos: 1 }, opt) {
|
|
|
8882
8915
|
end = end.replace(/px/g, ''); // #4351
|
|
8883
8916
|
}
|
|
8884
8917
|
// Empty dashstyle animation crashes treemap on hover
|
|
8885
|
-
if (defined(end)) {
|
|
8918
|
+
if (defined(end) && !applyImmediately) {
|
|
8886
8919
|
fx.run(start, end, unit);
|
|
8887
8920
|
}
|
|
8888
8921
|
});
|
|
@@ -9204,17 +9237,25 @@ class AST {
|
|
|
9204
9237
|
markup, 'text/html');
|
|
9205
9238
|
}
|
|
9206
9239
|
catch {
|
|
9207
|
-
//
|
|
9208
|
-
//
|
|
9209
|
-
//
|
|
9210
|
-
//
|
|
9211
|
-
//
|
|
9212
|
-
//
|
|
9240
|
+
// Due to a Chromium issue where chart redraws are triggered by a
|
|
9241
|
+
// `beforeprint` event (#16931),
|
|
9242
|
+
// https://issues.chromium.org/issues/40222135, the Trusted
|
|
9243
|
+
// Types `createHTML` callback can throw "The provided callback
|
|
9244
|
+
// is no longer runnable" while the browser is mid-print. Retry
|
|
9245
|
+
// with the raw string - `DOMParser` itself is not a Trusted
|
|
9246
|
+
// Types sink, so parsing it directly is safe.
|
|
9247
|
+
try {
|
|
9248
|
+
doc = new DOMParser().parseFromString(markup, 'text/html');
|
|
9249
|
+
}
|
|
9250
|
+
catch {
|
|
9251
|
+
// Ignore, fall through to the inert-document fallback below.
|
|
9252
|
+
}
|
|
9213
9253
|
}
|
|
9214
9254
|
if (!doc) {
|
|
9215
|
-
|
|
9216
|
-
|
|
9217
|
-
doc =
|
|
9255
|
+
// Never assign untrusted markup to a live document's innerHTML.
|
|
9256
|
+
// Parse into a detached, inert document instead.
|
|
9257
|
+
doc = Core_Globals.doc.implementation.createHTMLDocument('');
|
|
9258
|
+
doc.body.innerHTML = markup;
|
|
9218
9259
|
}
|
|
9219
9260
|
const appendChildNodes = (node, addTo) => {
|
|
9220
9261
|
// Preserve the camelCase of SVG tags via localName (#24702).
|
|
@@ -9451,7 +9492,6 @@ AST.allowedTags = [
|
|
|
9451
9492
|
'span',
|
|
9452
9493
|
'stop',
|
|
9453
9494
|
'strong',
|
|
9454
|
-
'style',
|
|
9455
9495
|
'sub',
|
|
9456
9496
|
'sup',
|
|
9457
9497
|
'svg',
|
|
@@ -10231,6 +10271,7 @@ class SVGElement {
|
|
|
10231
10271
|
let ret = (this[key + 'Value'] ??
|
|
10232
10272
|
this[key] ??
|
|
10233
10273
|
(this.element ? this.element.getAttribute(key) : null) ??
|
|
10274
|
+
this.box?.[key] ?? // For labels, when animating border radius
|
|
10234
10275
|
0);
|
|
10235
10276
|
if (/^-?[\d\.]+$/.test(ret)) { // Is numerical
|
|
10236
10277
|
ret = parseFloat(ret);
|
|
@@ -12825,7 +12866,7 @@ function arc(cx, cy, w, h, options) {
|
|
|
12825
12866
|
* Path
|
|
12826
12867
|
*/
|
|
12827
12868
|
function callout(x, y, w, h, options) {
|
|
12828
|
-
const arrowLength = 6, halfDistance = 6, r = Math.min((options?.r) || 0, w, h), safeDistance = r + halfDistance, anchorX = options?.anchorX, anchorY = options?.anchorY || 0;
|
|
12869
|
+
const arrowLength = options?.arrowLength ?? 6, halfDistance = 6, r = Math.min((options?.r) || 0, w, h), safeDistance = r + halfDistance, anchorX = options?.anchorX, anchorY = options?.anchorY || 0;
|
|
12829
12870
|
const path = roundedRect(x, y, w, h, { r });
|
|
12830
12871
|
if (!isNumber(anchorX)) {
|
|
12831
12872
|
return path;
|
|
@@ -13449,8 +13490,12 @@ class TextBuilder {
|
|
|
13449
13490
|
this.truncate(textNode, textNode.textContent || '', void 0, 0,
|
|
13450
13491
|
// Target width
|
|
13451
13492
|
width, ellipsisWidth, stringWithEllipsis);
|
|
13452
|
-
|
|
13453
|
-
|
|
13493
|
+
// If there is still text left, add an ellipsis to
|
|
13494
|
+
// the end of the line
|
|
13495
|
+
if (textNode.textContent) {
|
|
13496
|
+
textNode.textContent = textNode.textContent
|
|
13497
|
+
?.replace('\u2026', '') + '\u2026';
|
|
13498
|
+
}
|
|
13454
13499
|
}
|
|
13455
13500
|
break;
|
|
13456
13501
|
}
|
|
@@ -13876,7 +13921,7 @@ class SVGRenderer {
|
|
|
13876
13921
|
this.url = this.getReferenceURL();
|
|
13877
13922
|
// Add description
|
|
13878
13923
|
const desc = this.createElement('desc').add();
|
|
13879
|
-
desc.element.appendChild(SVGRenderer_doc.createTextNode('Created with Highcharts 13.0
|
|
13924
|
+
desc.element.appendChild(SVGRenderer_doc.createTextNode('Created with Highcharts 13.1.0'));
|
|
13880
13925
|
this.defs = this.createElement('defs').add();
|
|
13881
13926
|
this.allowHTML = allowHTML;
|
|
13882
13927
|
this.forExport = forExport;
|
|
@@ -15715,7 +15760,11 @@ class HTMLElement extends SVG_SVGElement {
|
|
|
15715
15760
|
// Some properties require other properties to be set
|
|
15716
15761
|
if (styles?.textOverflow === 'ellipsis') {
|
|
15717
15762
|
styles.overflow = 'hidden';
|
|
15718
|
-
|
|
15763
|
+
// With a line clamp, the text should wrap and ellipsis at the
|
|
15764
|
+
// clamped line instead of staying on one line (#24724)
|
|
15765
|
+
if (!(styles.lineClamp ?? this.styles.lineClamp)) {
|
|
15766
|
+
styles.whiteSpace = 'nowrap';
|
|
15767
|
+
}
|
|
15719
15768
|
}
|
|
15720
15769
|
// Apply line clamp
|
|
15721
15770
|
if (styles?.lineClamp) {
|
|
@@ -16904,15 +16953,16 @@ var AxisDefaults;
|
|
|
16904
16953
|
/**
|
|
16905
16954
|
* The label's pixel distance from the perimeter of the plot area.
|
|
16906
16955
|
* On cartesian charts, this is overridden if the `labels.y` setting
|
|
16907
|
-
* is set.
|
|
16956
|
+
* is set. Defaults to 15 unless the labels are aligned inside the
|
|
16957
|
+
* plot area, in which case it defaults to 0.
|
|
16908
16958
|
*
|
|
16909
16959
|
* @sample {highcharts} highcharts/yaxis/labels-distance/
|
|
16910
16960
|
* Polar chart, labels centered under the arc
|
|
16911
16961
|
*
|
|
16912
16962
|
* @type {number}
|
|
16913
16963
|
* @product highcharts gantt
|
|
16964
|
+
* @apioption xAxis.labels.distance
|
|
16914
16965
|
*/
|
|
16915
|
-
distance: 15,
|
|
16916
16966
|
/**
|
|
16917
16967
|
* Enable or disable the axis labels.
|
|
16918
16968
|
*
|
|
@@ -17170,18 +17220,18 @@ var AxisDefaults;
|
|
|
17170
17220
|
* @apioption xAxis.top
|
|
17171
17221
|
*/
|
|
17172
17222
|
/**
|
|
17173
|
-
* Index of another axis that this axis is linked to.
|
|
17174
|
-
* linked to a master axis, it will take the same
|
|
17175
|
-
* the master, but as assigned by min or max or by
|
|
17176
|
-
* It can be used to show additional info, or to ease
|
|
17177
|
-
* chart by duplicating the scales.
|
|
17223
|
+
* Index or [id](#xAxis.id) of another axis that this axis is linked to.
|
|
17224
|
+
* When an axis is linked to a master axis, it will take the same
|
|
17225
|
+
* extremes as the master, but as assigned by min or max or by
|
|
17226
|
+
* `setExtremes`. It can be used to show additional info, or to ease
|
|
17227
|
+
* reading the chart by duplicating the scales.
|
|
17178
17228
|
*
|
|
17179
17229
|
* @sample {highcharts} highcharts/xaxis/linkedto/
|
|
17180
17230
|
* Different string formats of the same date
|
|
17181
17231
|
* @sample {highcharts} highcharts/yaxis/linkedto/
|
|
17182
17232
|
* Y values on both sides
|
|
17183
17233
|
*
|
|
17184
|
-
* @type {number}
|
|
17234
|
+
* @type {number|string}
|
|
17185
17235
|
* @since 2.0.2
|
|
17186
17236
|
* @product highcharts highstock gantt
|
|
17187
17237
|
* @apioption xAxis.linkedTo
|
|
@@ -19301,7 +19351,7 @@ class Tick {
|
|
|
19301
19351
|
*/
|
|
19302
19352
|
addLabel() {
|
|
19303
19353
|
const tick = this, axis = tick.axis, options = axis.options, chart = axis.chart, categories = axis.categories, log = axis.logarithmic, names = axis.names, pos = tick.pos, labelOptions = (tick.options?.labels ?? options.labels), tickPositions = axis.tickPositions, isFirst = pos === tickPositions[0], isLast = pos === tickPositions[tickPositions.length - 1], tickPositionInfo = tickPositions.info, boundary = tickPositionInfo?.boundaryTicks[pos], DTLFormats = options.dateTimeLabelFormats;
|
|
19304
|
-
let
|
|
19354
|
+
let dateTimeLabelFormat, dateTimeLabelFormats, i;
|
|
19305
19355
|
// The context value
|
|
19306
19356
|
let value = this.parameters.category || (categories ?
|
|
19307
19357
|
(categories[pos] ?? names[pos] ?? pos) :
|
|
@@ -19387,10 +19437,15 @@ class Tick {
|
|
|
19387
19437
|
}
|
|
19388
19438
|
return axis.defaultLabelFormatter.call(ctx);
|
|
19389
19439
|
};
|
|
19390
|
-
|
|
19440
|
+
/**
|
|
19441
|
+
* The rendered text label of the tick.
|
|
19442
|
+
* @name Highcharts.Tick#label
|
|
19443
|
+
* @type {Highcharts.SVGElement|undefined}
|
|
19444
|
+
*/
|
|
19445
|
+
tick.label = tick.createLabel(labelFormatter.call(ctx, ctx), labelOptions);
|
|
19391
19446
|
// Set up conditional formatting based on the format list if existing.
|
|
19392
|
-
const list = dateTimeLabelFormats?.list;
|
|
19393
|
-
if (list) {
|
|
19447
|
+
const list = dateTimeLabelFormats?.list, label = tick.label;
|
|
19448
|
+
if (list && label) {
|
|
19394
19449
|
tick.shortenLabel = function () {
|
|
19395
19450
|
for (i = 0; i < list.length; i++) {
|
|
19396
19451
|
extend(ctx, { dateTimeLabelFormat: list[i] });
|
|
@@ -19398,43 +19453,17 @@ class Tick {
|
|
|
19398
19453
|
text: labelFormatter.call(ctx, ctx)
|
|
19399
19454
|
});
|
|
19400
19455
|
if (label.getBBox().width <
|
|
19401
|
-
axis.getSlotWidth(tick) - 2 *
|
|
19402
|
-
(labelOptions.padding || 0)) {
|
|
19456
|
+
axis.getSlotWidth(tick) - 2 * (labelOptions.padding || 0)) {
|
|
19403
19457
|
return;
|
|
19404
19458
|
}
|
|
19405
19459
|
}
|
|
19406
|
-
label.attr({
|
|
19407
|
-
text: ''
|
|
19408
|
-
});
|
|
19460
|
+
label.attr({ text: '' });
|
|
19409
19461
|
};
|
|
19410
19462
|
}
|
|
19411
19463
|
else {
|
|
19412
19464
|
// #15692
|
|
19413
19465
|
tick.shortenLabel = void 0;
|
|
19414
19466
|
}
|
|
19415
|
-
// First call
|
|
19416
|
-
if (!label) {
|
|
19417
|
-
/**
|
|
19418
|
-
* The rendered text label of the tick.
|
|
19419
|
-
* @name Highcharts.Tick#label
|
|
19420
|
-
* @type {Highcharts.SVGElement|undefined}
|
|
19421
|
-
*/
|
|
19422
|
-
tick.label = label = tick.createLabel(text, labelOptions);
|
|
19423
|
-
// Base value to detect change for new calls to getBBox
|
|
19424
|
-
tick.rotation = 0;
|
|
19425
|
-
// Update
|
|
19426
|
-
}
|
|
19427
|
-
else if (label.textStr !== text) {
|
|
19428
|
-
// When resetting text, also reset the width if dynamically set
|
|
19429
|
-
// (#8809)
|
|
19430
|
-
if (label.textWidth &&
|
|
19431
|
-
!labelOptions.style.width &&
|
|
19432
|
-
!label.styles.width) {
|
|
19433
|
-
label.css({ width: void 0 });
|
|
19434
|
-
}
|
|
19435
|
-
label.attr({ text });
|
|
19436
|
-
label.textPxLength = label.getBBox().width;
|
|
19437
|
-
}
|
|
19438
19467
|
}
|
|
19439
19468
|
/**
|
|
19440
19469
|
* Render and return the label of the tick.
|
|
@@ -19442,18 +19471,33 @@ class Tick {
|
|
|
19442
19471
|
* @internal
|
|
19443
19472
|
* @function Highcharts.Tick#createLabel
|
|
19444
19473
|
*/
|
|
19445
|
-
createLabel(
|
|
19446
|
-
const axis = this.axis, { renderer, styledMode } = axis.chart,
|
|
19447
|
-
|
|
19448
|
-
|
|
19449
|
-
|
|
19450
|
-
|
|
19474
|
+
createLabel(text, labelOptions, xy) {
|
|
19475
|
+
const axis = this.axis, { renderer, styledMode } = axis.chart, style = labelOptions.style, whiteSpace = style.whiteSpace;
|
|
19476
|
+
let label = this.label;
|
|
19477
|
+
if (defined(text) && labelOptions.enabled) {
|
|
19478
|
+
label || (label = renderer
|
|
19479
|
+
.text(text, xy?.x, xy?.y, labelOptions.useHTML)
|
|
19480
|
+
.add(axis.labelGroup));
|
|
19481
|
+
}
|
|
19482
|
+
else if (label) {
|
|
19483
|
+
label = label.destroy();
|
|
19484
|
+
// Reset so it doesn't animate when re-enabled
|
|
19485
|
+
this.isNewLabel = true;
|
|
19486
|
+
}
|
|
19451
19487
|
// Un-rotated length
|
|
19452
|
-
if (label) {
|
|
19488
|
+
if (label && (label.labelStyle !== style || text !== label.textStr)) {
|
|
19489
|
+
// Store a reference to the current style object to avoid running
|
|
19490
|
+
// this block on every render call unless something actually
|
|
19491
|
+
// changes.
|
|
19492
|
+
label.labelStyle = style;
|
|
19493
|
+
if (text !== label.textStr) {
|
|
19494
|
+
label.attr({ text });
|
|
19495
|
+
delete label.textPxLength;
|
|
19496
|
+
}
|
|
19453
19497
|
if (!styledMode) {
|
|
19454
|
-
label.css(merge(
|
|
19498
|
+
label.css(merge(style));
|
|
19455
19499
|
}
|
|
19456
|
-
label.textPxLength = label.getBBox().width;
|
|
19500
|
+
label.textPxLength ?? (label.textPxLength = label.getBBox().width);
|
|
19457
19501
|
// Apply the white-space setting after we read the full text width
|
|
19458
19502
|
if (!styledMode && whiteSpace) {
|
|
19459
19503
|
label.css({ whiteSpace });
|
|
@@ -19525,19 +19569,27 @@ class Tick {
|
|
|
19525
19569
|
* @internal
|
|
19526
19570
|
*/
|
|
19527
19571
|
getLabelPosition(x, y, label, horiz, labelOptions, tickmarkOffset, index, step) {
|
|
19528
|
-
const axis = this.axis, transA = axis
|
|
19529
|
-
axis.
|
|
19572
|
+
const axis = this.axis, { labelAlign, side, staggerLines, transA } = axis, reversed = ( // #7911
|
|
19573
|
+
axis.linkedParent ?
|
|
19530
19574
|
axis.linkedParent.reversed :
|
|
19531
|
-
axis.reversed),
|
|
19575
|
+
axis.reversed), rotCorr = axis.tickRotCorr || { x: 0, y: 0 },
|
|
19532
19576
|
// Adjust for label alignment if we use reserveSpace: true (#5286)
|
|
19533
19577
|
labelOffsetCorrection = (!horiz && !axis.reserveSpaceDefault ?
|
|
19534
|
-
-axis.labelOffset * (axis.labelAlign === 'center' ? 0.5 : 1) :
|
|
19535
|
-
0), distance = labelOptions.distance
|
|
19578
|
+
-(axis.labelOffset || 0) * (axis.labelAlign === 'center' ? 0.5 : 1) :
|
|
19579
|
+
0), distance = labelOptions.distance ?? (
|
|
19580
|
+
// If the label is aligned inside the plot area, default to 0.
|
|
19581
|
+
// This is default behavior or Stock y-axis labels.
|
|
19582
|
+
(side === 1 &&
|
|
19583
|
+
labelAlign === 'right' &&
|
|
19584
|
+
!labelOptions.reserveSpace) ? 0 :
|
|
19585
|
+
(side === 3 &&
|
|
19586
|
+
labelAlign === 'left' &&
|
|
19587
|
+
!labelOptions.reserveSpace) ? 0 : 15), pos = {};
|
|
19536
19588
|
let yOffset, line;
|
|
19537
|
-
if (
|
|
19589
|
+
if (side === 0) {
|
|
19538
19590
|
yOffset = label.rotation ? -distance : -label.getBBox().height;
|
|
19539
19591
|
}
|
|
19540
|
-
else if (
|
|
19592
|
+
else if (side === 2) {
|
|
19541
19593
|
yOffset = rotCorr.y + distance;
|
|
19542
19594
|
}
|
|
19543
19595
|
else {
|
|
@@ -19546,12 +19598,12 @@ class Tick {
|
|
|
19546
19598
|
(rotCorr.y - label.getBBox(false, 0).height / 2);
|
|
19547
19599
|
}
|
|
19548
19600
|
if (defined(labelOptions.y)) {
|
|
19549
|
-
yOffset =
|
|
19601
|
+
yOffset = side === 0 && axis.horiz ?
|
|
19550
19602
|
labelOptions.y + yOffset :
|
|
19551
19603
|
labelOptions.y;
|
|
19552
19604
|
}
|
|
19553
19605
|
x = x +
|
|
19554
|
-
(labelOptions.x ?? [0, 1, 0, -1][
|
|
19606
|
+
(labelOptions.x ?? [0, 1, 0, -1][side] * distance) +
|
|
19555
19607
|
labelOffsetCorrection +
|
|
19556
19608
|
rotCorr.x -
|
|
19557
19609
|
(tickmarkOffset && horiz ?
|
|
@@ -19606,7 +19658,7 @@ class Tick {
|
|
|
19606
19658
|
* @function Highcharts.Tick#handleOverflow
|
|
19607
19659
|
*/
|
|
19608
19660
|
handleOverflow(xy) {
|
|
19609
|
-
const tick = this, axis = this
|
|
19661
|
+
const tick = this, { axis, label } = this, labelOptions = axis.options.labels, pxPos = xy.x, { chartWidth, spacing } = axis.chart, leftBound = axis.labelLeft ?? Math.min(axis.pos, spacing[3]), rightBound = (axis.labelRight ?? Math.max(!axis.isRadial ? axis.pos + axis.len : 0, chartWidth - spacing[1])), rotation = label?.rotation || 0, factor = getAlignFactor(axis.labelAlign || label?.attr('align')), labelWidth = label?.getBBox().width || 0, slotWidth = axis.getSlotWidth(tick), xCorrection = factor;
|
|
19610
19662
|
let modifiedSlotWidth = slotWidth, goRight = 1, leftPos, rightPos, textWidth;
|
|
19611
19663
|
// Check if the label overshoots the chart spacing box. If it does, move
|
|
19612
19664
|
// it. If it now overshoots the slotWidth, add ellipsis.
|
|
@@ -19654,10 +19706,10 @@ class Tick {
|
|
|
19654
19706
|
tick.shortenLabel();
|
|
19655
19707
|
}
|
|
19656
19708
|
else {
|
|
19657
|
-
label.css(
|
|
19709
|
+
label.css({
|
|
19658
19710
|
width: Math.floor(textWidth) + 'px',
|
|
19659
19711
|
lineClamp: axis.isRadial ? 0 : 1
|
|
19660
|
-
})
|
|
19712
|
+
});
|
|
19661
19713
|
}
|
|
19662
19714
|
}
|
|
19663
19715
|
}
|
|
@@ -19673,8 +19725,11 @@ class Tick {
|
|
|
19673
19725
|
* @param {number} [opacity]
|
|
19674
19726
|
*/
|
|
19675
19727
|
render(index, old, opacity) {
|
|
19676
|
-
const tick = this, axis = tick.axis, horiz = axis.horiz, pos = tick.pos, tickmarkOffset = (tick.tickmarkOffset ?? axis.tickmarkOffset), xy = tick.getPosition(horiz, pos, tickmarkOffset, old), x = xy.x, y = xy.y, axisStart = axis.pos, axisEnd = axisStart + axis.len, pxPos = horiz ? x : y;
|
|
19677
|
-
|
|
19728
|
+
const tick = this, axis = tick.axis, horiz = (old ? axis.old?.horiz : void 0) ?? axis.horiz, pos = tick.pos, tickmarkOffset = (tick.tickmarkOffset ?? axis.tickmarkOffset), xy = tick.getPosition(horiz, pos, tickmarkOffset, old), x = xy.x, y = xy.y, axisStart = axis.pos, axisEnd = axisStart + axis.len, pxPos = horiz ? x : y;
|
|
19729
|
+
if (!axis.visible) {
|
|
19730
|
+
opacity = 0;
|
|
19731
|
+
}
|
|
19732
|
+
const labelOpacity = opacity ?? 1;
|
|
19678
19733
|
// Anything that is not between `axis.pos` and `axis.pos + axis.length`
|
|
19679
19734
|
// should not be visible (#20166). The `correctFloat` is for reversed
|
|
19680
19735
|
// axes in Safari.
|
|
@@ -19702,25 +19757,21 @@ class Tick {
|
|
|
19702
19757
|
* @param {number} opacity The opacity of the grid line
|
|
19703
19758
|
*/
|
|
19704
19759
|
renderGridLine(old, opacity) {
|
|
19705
|
-
const tick = this, axis = tick.axis, options = axis.options, attribs = {}, pos = tick.pos, type = tick.type, tickmarkOffset = (tick.tickmarkOffset ?? axis.tickmarkOffset), renderer = axis.chart
|
|
19706
|
-
let gridLine = tick.gridLine,
|
|
19760
|
+
const tick = this, axis = tick.axis, options = axis.options, attribs = {}, pos = tick.pos, type = tick.type, tickmarkOffset = (tick.tickmarkOffset ?? axis.tickmarkOffset), { renderer, styledMode } = axis.chart;
|
|
19761
|
+
let gridLine = tick.gridLine, gridLineWidth = options.gridLineWidth, gridLineColor = options.gridLineColor, dashStyle = options.gridLineDashStyle;
|
|
19707
19762
|
if (tick.type === 'minor') {
|
|
19708
19763
|
gridLineWidth = options.minorGridLineWidth;
|
|
19709
19764
|
gridLineColor = options.minorGridLineColor;
|
|
19710
19765
|
dashStyle = options.minorGridLineDashStyle;
|
|
19711
19766
|
}
|
|
19767
|
+
// Apply the stroke width initially so the crisping works
|
|
19768
|
+
if (!styledMode) {
|
|
19769
|
+
attribs['stroke-width'] = gridLineWidth || 0;
|
|
19770
|
+
}
|
|
19712
19771
|
if (!gridLine) {
|
|
19713
|
-
if (!axis.chart.styledMode) {
|
|
19714
|
-
attribs.stroke = gridLineColor;
|
|
19715
|
-
attribs['stroke-width'] = gridLineWidth || 0;
|
|
19716
|
-
attribs.dashstyle = dashStyle;
|
|
19717
|
-
}
|
|
19718
19772
|
if (!type) {
|
|
19719
19773
|
attribs.zIndex = 1;
|
|
19720
19774
|
}
|
|
19721
|
-
if (old) {
|
|
19722
|
-
opacity = 0;
|
|
19723
|
-
}
|
|
19724
19775
|
/**
|
|
19725
19776
|
* The rendered grid line of the tick.
|
|
19726
19777
|
* @name Highcharts.Tick#gridLine
|
|
@@ -19731,22 +19782,24 @@ class Tick {
|
|
|
19731
19782
|
.addClass('highcharts-' + (type ? type + '-' : '') + 'grid-line')
|
|
19732
19783
|
.add(axis.gridGroup);
|
|
19733
19784
|
}
|
|
19734
|
-
|
|
19735
|
-
|
|
19736
|
-
|
|
19737
|
-
|
|
19738
|
-
|
|
19739
|
-
|
|
19740
|
-
|
|
19741
|
-
|
|
19785
|
+
// Grid line path
|
|
19786
|
+
const d = axis.getPlotLinePath({
|
|
19787
|
+
value: pos + tickmarkOffset,
|
|
19788
|
+
lineWidth: gridLine.strokeWidth(),
|
|
19789
|
+
force: 'pass',
|
|
19790
|
+
old: old,
|
|
19791
|
+
acrossPanes: false // #18025
|
|
19792
|
+
});
|
|
19793
|
+
if (d) {
|
|
19794
|
+
attribs.d = d;
|
|
19795
|
+
attribs.opacity = old ? 0 : opacity;
|
|
19796
|
+
if (!styledMode) {
|
|
19797
|
+
attribs.stroke = gridLineColor;
|
|
19798
|
+
attribs.dashstyle = dashStyle;
|
|
19799
|
+
}
|
|
19742
19800
|
// If the parameter 'old' is set, the current call will be followed
|
|
19743
19801
|
// by another call, therefore do not do any animations this time
|
|
19744
|
-
|
|
19745
|
-
gridLine[old || tick.isNew ? 'attr' : 'animate']({
|
|
19746
|
-
d: gridLinePath,
|
|
19747
|
-
opacity: opacity
|
|
19748
|
-
});
|
|
19749
|
-
}
|
|
19802
|
+
gridLine[old || tick.isNew ? 'attr' : 'animate'](attribs);
|
|
19750
19803
|
}
|
|
19751
19804
|
}
|
|
19752
19805
|
/**
|
|
@@ -19758,13 +19811,13 @@ class Tick {
|
|
|
19758
19811
|
* @param {number} opacity The opacity of the mark
|
|
19759
19812
|
*/
|
|
19760
19813
|
renderMark(xy, opacity) {
|
|
19761
|
-
const tick = this, axis = tick.axis, options = axis
|
|
19814
|
+
const tick = this, axis = tick.axis, { chart, options } = axis, renderer = chart.renderer, type = tick.type, tickSize = axis.tickSize(type ? type + 'Tick' : 'tick'), x = xy.x, y = xy.y, tickWidth = options[type !== 'minor' ? 'tickWidth' : 'minorTickWidth'] ?? (!type && axis.isXAxis ? 1 : 0), // X axis defaults to 1
|
|
19762
19815
|
tickColor = options[type !== 'minor' ? 'tickColor' : 'minorTickColor'];
|
|
19763
19816
|
let mark = tick.mark;
|
|
19764
|
-
const
|
|
19765
|
-
if (tickSize) {
|
|
19817
|
+
const verb = mark ? 'animate' : 'attr';
|
|
19818
|
+
if (tickSize || mark) {
|
|
19766
19819
|
// Negate the length
|
|
19767
|
-
if (axis.opposite) {
|
|
19820
|
+
if (axis.opposite && tickSize) {
|
|
19768
19821
|
tickSize[0] = -tickSize[0];
|
|
19769
19822
|
}
|
|
19770
19823
|
// First time, create it
|
|
@@ -19777,16 +19830,16 @@ class Tick {
|
|
|
19777
19830
|
tick.mark = mark = renderer.path()
|
|
19778
19831
|
.addClass('highcharts-' + (type ? type + '-' : '') + 'tick')
|
|
19779
19832
|
.add(axis.axisGroup);
|
|
19780
|
-
if (!axis.chart.styledMode) {
|
|
19781
|
-
mark.attr({
|
|
19782
|
-
stroke: tickColor,
|
|
19783
|
-
'stroke-width': tickWidth
|
|
19784
|
-
});
|
|
19785
|
-
}
|
|
19786
19833
|
}
|
|
19787
|
-
|
|
19788
|
-
|
|
19789
|
-
|
|
19834
|
+
if (!chart.styledMode) {
|
|
19835
|
+
mark[verb]({
|
|
19836
|
+
stroke: tickColor,
|
|
19837
|
+
'stroke-width': tickWidth
|
|
19838
|
+
});
|
|
19839
|
+
}
|
|
19840
|
+
mark[verb]({
|
|
19841
|
+
d: tick.getMarkPath(x, y, tickSize?.[0] || 0, mark.strokeWidth(), axis.horiz, renderer),
|
|
19842
|
+
opacity: tickSize ? opacity : 0
|
|
19790
19843
|
});
|
|
19791
19844
|
}
|
|
19792
19845
|
}
|
|
@@ -19948,6 +20001,11 @@ extend(Axis_defaultOptions, { xAxis, yAxis: merge(xAxis, yAxis) });
|
|
|
19948
20001
|
* Axis options
|
|
19949
20002
|
*/
|
|
19950
20003
|
class Axis {
|
|
20004
|
+
/* *
|
|
20005
|
+
*
|
|
20006
|
+
* Static Properties
|
|
20007
|
+
*
|
|
20008
|
+
* */
|
|
19951
20009
|
/* *
|
|
19952
20010
|
*
|
|
19953
20011
|
* Constructors
|
|
@@ -20024,9 +20082,11 @@ class Axis {
|
|
|
20024
20082
|
* @name Highcharts.Axis#side
|
|
20025
20083
|
* @type {number}
|
|
20026
20084
|
*/
|
|
20027
|
-
axis.side =
|
|
20028
|
-
(
|
|
20029
|
-
|
|
20085
|
+
axis.side = userOptions.side ??
|
|
20086
|
+
(horiz ?
|
|
20087
|
+
(axis.opposite ? 0 : 2) : // Top : bottom
|
|
20088
|
+
(axis.opposite ? 1 : 3) // Right : left
|
|
20089
|
+
);
|
|
20030
20090
|
/**
|
|
20031
20091
|
* Current options for the axis after merge of defaults and user's
|
|
20032
20092
|
* options.
|
|
@@ -20037,8 +20097,8 @@ class Axis {
|
|
|
20037
20097
|
axis.setOptions(userOptions);
|
|
20038
20098
|
const options = axis.options, labelsOptions = options.labels;
|
|
20039
20099
|
// Set the type and fire an event
|
|
20040
|
-
axis.type
|
|
20041
|
-
axis.uniqueNames
|
|
20100
|
+
axis.type = options.type || 'linear';
|
|
20101
|
+
axis.uniqueNames = options.uniqueNames ?? true;
|
|
20042
20102
|
fireEvent(axis, 'afterSetType');
|
|
20043
20103
|
/**
|
|
20044
20104
|
* User's options for this axis without defaults.
|
|
@@ -20055,7 +20115,7 @@ class Axis {
|
|
|
20055
20115
|
* @name Highcharts.Axis#reversed
|
|
20056
20116
|
* @type {boolean}
|
|
20057
20117
|
*/
|
|
20058
|
-
axis.reversed =
|
|
20118
|
+
axis.reversed = options.reversed;
|
|
20059
20119
|
axis.visible = options.visible;
|
|
20060
20120
|
axis.zoomEnabled = options.zoomEnabled;
|
|
20061
20121
|
// Initial categories
|
|
@@ -20077,16 +20137,12 @@ class Axis {
|
|
|
20077
20137
|
*/
|
|
20078
20138
|
axis.categories = (isArray(options.categories) && options.categories) ||
|
|
20079
20139
|
(axis.hasNames ? [] : void 0);
|
|
20080
|
-
|
|
20081
|
-
// faster than array searching (#7725). Preserve on update (#3830)
|
|
20082
|
-
axis.names || (axis.names = []);
|
|
20140
|
+
axis.names || (axis.names = []); // Preserve on update (#3830)
|
|
20083
20141
|
axis.namesMap || (axis.namesMap = {});
|
|
20084
20142
|
// Placeholder for plotLines and plotBands groups
|
|
20085
|
-
axis.plotLinesAndBandsGroups = {};
|
|
20143
|
+
axis.plotLinesAndBandsGroups || (axis.plotLinesAndBandsGroups = {});
|
|
20086
20144
|
// Shorthand types
|
|
20087
20145
|
axis.positiveValuesOnly = !!axis.logarithmic;
|
|
20088
|
-
// Flag, if axis is linked to another axis
|
|
20089
|
-
axis.isLinked = defined(options.linkedTo);
|
|
20090
20146
|
/**
|
|
20091
20147
|
* List of major ticks mapped by position on axis.
|
|
20092
20148
|
*
|
|
@@ -20095,8 +20151,8 @@ class Axis {
|
|
|
20095
20151
|
* @name Highcharts.Axis#ticks
|
|
20096
20152
|
* @type {Highcharts.Dictionary<Highcharts.Tick>}
|
|
20097
20153
|
*/
|
|
20098
|
-
axis.ticks = {};
|
|
20099
|
-
axis.labelEdge = [];
|
|
20154
|
+
axis.ticks || (axis.ticks = {});
|
|
20155
|
+
axis.labelEdge || (axis.labelEdge = []);
|
|
20100
20156
|
/**
|
|
20101
20157
|
* List of minor ticks mapped by position on the axis.
|
|
20102
20158
|
*
|
|
@@ -20105,11 +20161,9 @@ class Axis {
|
|
|
20105
20161
|
* @name Highcharts.Axis#minorTicks
|
|
20106
20162
|
* @type {Highcharts.Dictionary<Highcharts.Tick>}
|
|
20107
20163
|
*/
|
|
20108
|
-
axis.minorTicks = {};
|
|
20109
|
-
// List of plotLines/Bands
|
|
20110
|
-
axis.plotLinesAndBands = [];
|
|
20164
|
+
axis.minorTicks || (axis.minorTicks = {});
|
|
20111
20165
|
// Alternate bands
|
|
20112
|
-
axis.alternateBands = {};
|
|
20166
|
+
axis.alternateBands || (axis.alternateBands = {});
|
|
20113
20167
|
/**
|
|
20114
20168
|
* The length of the axis in terms of pixels.
|
|
20115
20169
|
*
|
|
@@ -20143,7 +20197,7 @@ class Axis {
|
|
|
20143
20197
|
* @name Highcharts.Axis#crosshair
|
|
20144
20198
|
* @type {boolean|Highcharts.AxisCrosshairOptions}
|
|
20145
20199
|
*/
|
|
20146
|
-
const crosshair = options.crosshair ?? splat(chart.options.tooltip
|
|
20200
|
+
const crosshair = options.crosshair ?? splat(chart.options.tooltip?.crosshairs)[isXAxis ? 0 : 1];
|
|
20147
20201
|
axis.crosshair = crosshair === true ? {} : crosshair;
|
|
20148
20202
|
// Register. Don't add it again on Axis.update().
|
|
20149
20203
|
if (chart.axes.indexOf(axis) === -1) { //
|
|
@@ -20198,14 +20252,14 @@ class Axis {
|
|
|
20198
20252
|
},
|
|
20199
20253
|
margin: 15
|
|
20200
20254
|
} :
|
|
20201
|
-
// Left and right axis, title rotated 90 or
|
|
20255
|
+
// Left and right axis, title rotated -90 or 90 degrees
|
|
20202
20256
|
// respectively
|
|
20203
20257
|
{
|
|
20204
20258
|
labels: {
|
|
20205
20259
|
padding: 1
|
|
20206
20260
|
},
|
|
20207
20261
|
title: {
|
|
20208
|
-
rotation: 90
|
|
20262
|
+
rotation: this.side === 1 ? 90 : -90
|
|
20209
20263
|
}
|
|
20210
20264
|
};
|
|
20211
20265
|
this.options = merge(sideSpecific,
|
|
@@ -20419,6 +20473,9 @@ class Axis {
|
|
|
20419
20473
|
if (!axis.isRadial) {
|
|
20420
20474
|
returnValue = correctFloat(returnValue);
|
|
20421
20475
|
}
|
|
20476
|
+
if (Math.abs(returnValue) < 1e-9) {
|
|
20477
|
+
returnValue = 0;
|
|
20478
|
+
}
|
|
20422
20479
|
}
|
|
20423
20480
|
return returnValue;
|
|
20424
20481
|
}
|
|
@@ -20474,7 +20531,7 @@ class Axis {
|
|
|
20474
20531
|
* The SVG path definition for the plot line.
|
|
20475
20532
|
*/
|
|
20476
20533
|
getPlotLinePath(options) {
|
|
20477
|
-
const axis = this,
|
|
20534
|
+
const axis = this, { chart, left, top, transB } = axis, { lineWidth, old, value } = options, horiz = (old ? axis.old?.horiz : void 0) ?? axis.horiz, cHeight = (old && chart.oldChartHeight) || chart.chartHeight, cWidth = (old && chart.oldChartWidth) || chart.chartWidth;
|
|
20478
20535
|
let translatedValue = options.translatedValue, force = options.force, x1, y1, x2, y2, skip;
|
|
20479
20536
|
// eslint-disable-next-line valid-jsdoc
|
|
20480
20537
|
/**
|
|
@@ -20512,17 +20569,17 @@ class Axis {
|
|
|
20512
20569
|
skip = true;
|
|
20513
20570
|
force = false; // #7175, don't force it when path is invalid
|
|
20514
20571
|
}
|
|
20515
|
-
else if (
|
|
20516
|
-
y1 =
|
|
20572
|
+
else if (horiz) {
|
|
20573
|
+
y1 = top;
|
|
20517
20574
|
y2 = cHeight - axis.bottom + (axis.options.isInternal ?
|
|
20518
20575
|
0 :
|
|
20519
20576
|
(chart.scrollablePixelsY || 0)); // #20354, scrollablePixelsY shouldn't be used for navigator
|
|
20520
|
-
x1 = x2 = between(x1,
|
|
20577
|
+
x1 = x2 = between(x1, left, left + axis.width);
|
|
20521
20578
|
}
|
|
20522
20579
|
else {
|
|
20523
|
-
x1 =
|
|
20580
|
+
x1 = left;
|
|
20524
20581
|
x2 = cWidth - axis.right + (chart.scrollablePixelsX || 0);
|
|
20525
|
-
y1 = y2 = between(y1,
|
|
20582
|
+
y1 = y2 = between(y1, top, top + axis.height);
|
|
20526
20583
|
}
|
|
20527
20584
|
e.path = skip && !force ?
|
|
20528
20585
|
void 0 :
|
|
@@ -20951,7 +21008,7 @@ class Axis {
|
|
|
20951
21008
|
* @emits Highcharts.Axis#event:foundExtremes
|
|
20952
21009
|
*/
|
|
20953
21010
|
setTickInterval(secondPass) {
|
|
20954
|
-
const axis = this, { categories, chart, dataMax, dataMin, dateTime, isXAxis, logarithmic, options, softThreshold } = axis, time = chart.time, threshold = isNumber(axis.threshold) ? axis.threshold : void 0, minRange = axis.minRange || 0, { ceiling, floor,
|
|
21011
|
+
const axis = this, { categories, chart, dataMax, dataMin, dateTime, isXAxis, logarithmic, options, softThreshold } = axis, time = chart.time, threshold = isNumber(axis.threshold) ? axis.threshold : void 0, minRange = axis.minRange || 0, { ceiling, floor, softMax, softMin } = options, linkedParent = axis.linkedParent, tickPixelIntervalOption = options.tickPixelInterval;
|
|
20955
21012
|
let maxPadding = options.maxPadding, minPadding = options.minPadding, range = 0, linkedParentExtremes,
|
|
20956
21013
|
// Only non-negative tickInterval is valid, #12961
|
|
20957
21014
|
tickIntervalOption = isNumber(options.tickInterval) && options.tickInterval >= 0 ?
|
|
@@ -20964,7 +21021,6 @@ class Axis {
|
|
|
20964
21021
|
hardMax = (axis.userMax ?? time.parse(options.max));
|
|
20965
21022
|
// Linked axis gets the extremes from the parent axis
|
|
20966
21023
|
if (linkedParent) {
|
|
20967
|
-
axis.linkedParent = linkedParent;
|
|
20968
21024
|
linkedParentExtremes = linkedParent.getExtremes();
|
|
20969
21025
|
axis.min =
|
|
20970
21026
|
linkedParentExtremes.min ?? linkedParentExtremes.dataMin;
|
|
@@ -21274,7 +21330,7 @@ class Axis {
|
|
|
21274
21330
|
// Reset min/max or remove extremes based on start/end on tick
|
|
21275
21331
|
this.paddedTicks = tickPositions.slice(0); // Used for logarithmic minor
|
|
21276
21332
|
this.trimTicks(tickPositions, startOnTick, endOnTick);
|
|
21277
|
-
if (!this.
|
|
21333
|
+
if (!this.linkedParent && isNumber(this.min) && isNumber(this.max)) {
|
|
21278
21334
|
// Subtract half a unit (#2619, #2846, #2515, #3390), but not in
|
|
21279
21335
|
// case of multiple ticks (#6897)
|
|
21280
21336
|
if (this.single &&
|
|
@@ -21309,7 +21365,7 @@ class Axis {
|
|
|
21309
21365
|
trimTicks(tickPositions, startOnTick, endOnTick) {
|
|
21310
21366
|
const roundedMin = tickPositions[0], roundedMax = tickPositions[tickPositions.length - 1], minPointOffset = (!this.isOrdinal && this.minPointOffset) || 0; // (#12716)
|
|
21311
21367
|
fireEvent(this, 'trimTicks');
|
|
21312
|
-
if (!this.
|
|
21368
|
+
if (!this.linkedParent ||
|
|
21313
21369
|
// Linked non-grid axes should trim ticks, #21743.
|
|
21314
21370
|
// Grid axis has custom handling of ticks.
|
|
21315
21371
|
!this.grid) {
|
|
@@ -21583,7 +21639,15 @@ class Axis {
|
|
|
21583
21639
|
* @emits Highcharts.Axis#event:afterSetScale
|
|
21584
21640
|
*/
|
|
21585
21641
|
setScale() {
|
|
21586
|
-
const axis = this, { coll, stacking } = axis
|
|
21642
|
+
const axis = this, { chart, coll, options, stacking } = axis, { linkedTo } = options, axes = chart[coll] || [], index = axes.indexOf(axis), parent = isString(linkedTo) ?
|
|
21643
|
+
find(axes, (a) => a.options.id === linkedTo) :
|
|
21644
|
+
(isNumber(linkedTo) ? axes[linkedTo] : void 0), linkedParent = axis.linkedParent =
|
|
21645
|
+
parent === axis ? void 0 : parent;
|
|
21646
|
+
// Scale a later-ordered parent first so its extremes are ready. Skip
|
|
21647
|
+
// grid column axes, which live outside the collection (#24658).
|
|
21648
|
+
if (linkedParent && index > -1 && axes.indexOf(linkedParent) > index) {
|
|
21649
|
+
linkedParent.setScale();
|
|
21650
|
+
}
|
|
21587
21651
|
let isDirtyData = false, isXAxisDirty = false;
|
|
21588
21652
|
axis.series.forEach((series) => {
|
|
21589
21653
|
isDirtyData = isDirtyData || series.isDirtyData || series.isDirty;
|
|
@@ -21600,7 +21664,7 @@ class Axis {
|
|
|
21600
21664
|
if (isDirtyAxisLength ||
|
|
21601
21665
|
isDirtyData ||
|
|
21602
21666
|
isXAxisDirty ||
|
|
21603
|
-
axis.
|
|
21667
|
+
axis.linkedParent ||
|
|
21604
21668
|
axis.forceRedraw ||
|
|
21605
21669
|
axis.userMin !== axis.old?.userMin ||
|
|
21606
21670
|
axis.userMax !== axis.old?.userMax ||
|
|
@@ -21962,7 +22026,7 @@ class Axis {
|
|
|
21962
22026
|
renderUnsquish() {
|
|
21963
22027
|
const chart = this.chart, renderer = chart.renderer, tickPositions = this.tickPositions, ticks = this.ticks, labelOptions = this.options.labels, labelStyleOptions = labelOptions.style, horiz = this.horiz, slotWidth = this.getSlotWidth(), innerWidth = Math.max(1, Math.round(slotWidth - (horiz ?
|
|
21964
22028
|
2 * (labelOptions.padding || 0) :
|
|
21965
|
-
labelOptions.distance
|
|
22029
|
+
labelOptions.distance ?? 15 // #21172
|
|
21966
22030
|
))), attr = {}, labelMetrics = this.labelMetrics(), lineClampOption = labelStyleOptions.lineClamp;
|
|
21967
22031
|
let commonWidth, lineClamp = lineClampOption ?? (Math.floor(this.len / (tickPositions.length * labelMetrics.h)) || 1), maxLabelLength = 0;
|
|
21968
22032
|
// Set rotation option unless it is "auto", like in gauges
|
|
@@ -22042,7 +22106,6 @@ class Axis {
|
|
|
22042
22106
|
});
|
|
22043
22107
|
}
|
|
22044
22108
|
}
|
|
22045
|
-
tick.rotation = attr.rotation;
|
|
22046
22109
|
}
|
|
22047
22110
|
}, this);
|
|
22048
22111
|
// Note: Why is this not part of getLabelPosition?
|
|
@@ -22074,46 +22137,50 @@ class Axis {
|
|
|
22074
22137
|
* Whether or not to display the title.
|
|
22075
22138
|
*/
|
|
22076
22139
|
addTitle(display) {
|
|
22077
|
-
const axis = this, renderer = axis.chart.renderer, horiz = axis.horiz, opposite = axis.opposite, options = axis.options, axisTitleOptions = options.title, styledMode = axis.chart.styledMode
|
|
22078
|
-
|
|
22079
|
-
|
|
22080
|
-
|
|
22081
|
-
|
|
22082
|
-
|
|
22083
|
-
|
|
22084
|
-
|
|
22085
|
-
|
|
22086
|
-
|
|
22087
|
-
|
|
22088
|
-
|
|
22089
|
-
|
|
22090
|
-
|
|
22091
|
-
|
|
22092
|
-
|
|
22093
|
-
|
|
22094
|
-
|
|
22095
|
-
|
|
22096
|
-
|
|
22097
|
-
|
|
22098
|
-
})
|
|
22140
|
+
const axis = this, renderer = axis.chart.renderer, horiz = axis.horiz, opposite = axis.opposite, options = axis.options, axisTitleOptions = options.title, styledMode = axis.chart.styledMode, textAlign = axisTitleOptions.textAlign ||
|
|
22141
|
+
(horiz ? {
|
|
22142
|
+
low: 'left',
|
|
22143
|
+
middle: 'center',
|
|
22144
|
+
high: 'right'
|
|
22145
|
+
} : {
|
|
22146
|
+
low: opposite ? 'right' : 'left',
|
|
22147
|
+
middle: 'center',
|
|
22148
|
+
high: opposite ? 'left' : 'right'
|
|
22149
|
+
})[axisTitleOptions.align], attr = {
|
|
22150
|
+
text: axisTitleOptions.text || '',
|
|
22151
|
+
zIndex: 7,
|
|
22152
|
+
align: textAlign
|
|
22153
|
+
}, animatable = {
|
|
22154
|
+
rotation: axisTitleOptions.rotation || 0
|
|
22155
|
+
};
|
|
22156
|
+
let axisTitle = axis.axisTitle;
|
|
22157
|
+
if (!axisTitle) {
|
|
22158
|
+
axisTitle = renderer
|
|
22159
|
+
.text('', 0, 0, axisTitleOptions.useHTML)
|
|
22160
|
+
.attr(extend(attr, animatable))
|
|
22099
22161
|
.addClass('highcharts-axis-title');
|
|
22100
|
-
|
|
22101
|
-
|
|
22102
|
-
axis.axisTitle.css(merge(axisTitleOptions.style));
|
|
22103
|
-
}
|
|
22104
|
-
axis.axisTitle.add(axis.axisGroup);
|
|
22105
|
-
axis.axisTitle.isNew = true;
|
|
22162
|
+
axisTitle.add(axis.axisGroup);
|
|
22163
|
+
axisTitle.isNew = true;
|
|
22106
22164
|
}
|
|
22107
|
-
|
|
22108
|
-
|
|
22109
|
-
|
|
22110
|
-
|
|
22111
|
-
|
|
22112
|
-
|
|
22113
|
-
|
|
22165
|
+
else {
|
|
22166
|
+
axisTitle
|
|
22167
|
+
.attr(attr)
|
|
22168
|
+
.animate(animatable);
|
|
22169
|
+
}
|
|
22170
|
+
if (!styledMode) {
|
|
22171
|
+
// #7814, don't mutate the style option
|
|
22172
|
+
const css = merge(axisTitleOptions.style);
|
|
22173
|
+
// Max width defaults to the length of the axis
|
|
22174
|
+
if (!axisTitleOptions.style.width &&
|
|
22175
|
+
!axis.isRadial) {
|
|
22176
|
+
css.width = axis.len + 'px';
|
|
22177
|
+
}
|
|
22178
|
+
axisTitle.css(css);
|
|
22114
22179
|
}
|
|
22115
22180
|
// Hide or show the title depending on whether showEmpty is set
|
|
22116
|
-
|
|
22181
|
+
axisTitle[display ? 'show' : 'hide'](display);
|
|
22182
|
+
// Register
|
|
22183
|
+
axis.axisTitle = axisTitle;
|
|
22117
22184
|
}
|
|
22118
22185
|
/**
|
|
22119
22186
|
* Generates a tick for initial positioning.
|
|
@@ -22141,17 +22208,18 @@ class Axis {
|
|
|
22141
22208
|
createGroups() {
|
|
22142
22209
|
const { axisParent, // Used in color axis
|
|
22143
22210
|
chart, coll, options } = this, renderer = chart.renderer;
|
|
22144
|
-
const createGroup = (name, suffix
|
|
22145
|
-
.attr({ zIndex })
|
|
22211
|
+
const createGroup = (name, suffix) => renderer.g(name)
|
|
22146
22212
|
.addClass(`highcharts-${coll.toLowerCase()}${suffix} ` +
|
|
22147
22213
|
(this.isRadial ? `highcharts-radial-axis${suffix} ` : '') +
|
|
22148
22214
|
(options.className || ''))
|
|
22149
22215
|
.add(axisParent);
|
|
22150
|
-
|
|
22151
|
-
|
|
22152
|
-
|
|
22153
|
-
this.
|
|
22154
|
-
|
|
22216
|
+
(this.axisGroup || (this.axisGroup = createGroup('axis', '')))
|
|
22217
|
+
.attr({ zIndex: options.zIndex });
|
|
22218
|
+
(this.gridGroup || (this.gridGroup = createGroup('grid', '-grid')))
|
|
22219
|
+
.clip(this.clippable ? chart.plotClipInner : void 0)
|
|
22220
|
+
.attr({ zIndex: options.gridZIndex });
|
|
22221
|
+
(this.labelGroup || (this.labelGroup = createGroup('axis-labels', '-labels')))
|
|
22222
|
+
.attr({ zIndex: options.labels.zIndex });
|
|
22155
22223
|
}
|
|
22156
22224
|
/**
|
|
22157
22225
|
* Shuffle existing category ticks, like in bar race chart
|
|
@@ -22159,8 +22227,11 @@ class Axis {
|
|
|
22159
22227
|
* @internal
|
|
22160
22228
|
*/
|
|
22161
22229
|
shuffleTicks() {
|
|
22162
|
-
const ticks = this.ticks, oldNames = this.old?.names;
|
|
22163
|
-
if (this.type === 'category' &&
|
|
22230
|
+
const ticks = this.ticks, oldNames = this.old?.names, hasDuplicates = (arr) => new Set(arr).size !== arr.length;
|
|
22231
|
+
if (this.type === 'category' &&
|
|
22232
|
+
oldNames &&
|
|
22233
|
+
!hasDuplicates(oldNames) &&
|
|
22234
|
+
!hasDuplicates(this.names)) {
|
|
22164
22235
|
oldNames.forEach((name, oldPos) => {
|
|
22165
22236
|
const pos = this.namesMap[name];
|
|
22166
22237
|
if (defined(pos) && oldPos !== pos) {
|
|
@@ -22202,7 +22273,7 @@ class Axis {
|
|
|
22202
22273
|
* @emits Highcharts.Axis#event:afterGetOffset
|
|
22203
22274
|
*/
|
|
22204
22275
|
getOffset() {
|
|
22205
|
-
const axis = this, { chart, horiz, options, side, ticks, tickPositions, coll } = axis, hasData = axis.hasData(), axisTitleOptions = options.title, labelOptions = options.labels, hasCrossing = isNumber(options.crossing), axisOffset = chart.axisOffset, clipOffset = chart.clipOffset, directionFactor = [-1, 1, 1, -1][side];
|
|
22276
|
+
const axis = this, { chart, horiz, options, side, ticks, tickPositions, coll } = axis, hasData = axis.hasData(), axisTitleOptions = options.title, labelOptions = options.labels, hasCrossing = isNumber(options.crossing), axisOffset = chart.axisOffset, clipOffset = chart.clipOffset, directionFactor = [-1, 1, 1, -1][side], distance = labelOptions.distance ?? 15;
|
|
22206
22277
|
let tickRotCorr = axis.tickRotCorr || { x: 0, y: 0 }, absTickRotCorrX = 0, showAxis, titleOffset = 0, titleOffsetOption, titleMargin = 0, labelOffset = 0, // Reset
|
|
22207
22278
|
labelOffsetPadded, lineHeightCorrection, reserveSpaceDefault;
|
|
22208
22279
|
// For reuse in Axis.render
|
|
@@ -22210,7 +22281,7 @@ class Axis {
|
|
|
22210
22281
|
// Set/reset staggerLines
|
|
22211
22282
|
axis.staggerLines = (axis.horiz && labelOptions.staggerLines) || void 0;
|
|
22212
22283
|
axis.createGroups();
|
|
22213
|
-
if (hasData || axis.
|
|
22284
|
+
if (hasData || axis.linkedParent) {
|
|
22214
22285
|
// Shuffle existing category ticks
|
|
22215
22286
|
axis.shuffleTicks();
|
|
22216
22287
|
// Generate new ticks
|
|
@@ -22262,6 +22333,9 @@ class Axis {
|
|
|
22262
22333
|
axisTitleOptions.margin ?? (horiz ? 5 : 10);
|
|
22263
22334
|
}
|
|
22264
22335
|
}
|
|
22336
|
+
else {
|
|
22337
|
+
axis.axisTitle = axis.axisTitle?.destroy();
|
|
22338
|
+
}
|
|
22265
22339
|
// Render the axis line
|
|
22266
22340
|
axis.renderLine();
|
|
22267
22341
|
// Handle automatic or user set offset
|
|
@@ -22285,12 +22359,10 @@ class Axis {
|
|
|
22285
22359
|
labelOffsetPadded -= lineHeightCorrection;
|
|
22286
22360
|
labelOffsetPadded += directionFactor * (horiz ?
|
|
22287
22361
|
(labelOptions.y ??
|
|
22288
|
-
(tickRotCorr.y +
|
|
22289
|
-
directionFactor * labelOptions.distance)) :
|
|
22362
|
+
(tickRotCorr.y + directionFactor * distance)) :
|
|
22290
22363
|
(labelOptions.x ?? (reserveSpaceDefault ?
|
|
22291
|
-
directionFactor * (
|
|
22292
|
-
tickRotCorr.x +
|
|
22293
|
-
directionFactor * labelOptions.distance)));
|
|
22364
|
+
directionFactor * (distance - absTickRotCorrX) :
|
|
22365
|
+
tickRotCorr.x + directionFactor * distance)));
|
|
22294
22366
|
if (!horiz &&
|
|
22295
22367
|
!reserveSpaceDefault &&
|
|
22296
22368
|
axis.labelAlign === 'center' &&
|
|
@@ -22304,8 +22376,8 @@ class Axis {
|
|
|
22304
22376
|
// has rendered.
|
|
22305
22377
|
if (coll !== 'colorAxis' && clipOffset) {
|
|
22306
22378
|
const tickSize = this.tickSize('tick');
|
|
22307
|
-
axisOffset[side] = Math.max(axisOffset[side], (axis.axisTitleMargin || 0) + titleOffset +
|
|
22308
|
-
|
|
22379
|
+
axisOffset[side] = Math.max(axisOffset[side], Math.max((axis.axisTitleMargin || 0) + titleOffset, labelOffsetPadded) + directionFactor * axis.offset, // #6967
|
|
22380
|
+
labelOffsetPadded, // #3027
|
|
22309
22381
|
tickPositions?.length && tickSize ?
|
|
22310
22382
|
tickSize[0] + directionFactor * axis.offset :
|
|
22311
22383
|
0 // #4866
|
|
@@ -22367,18 +22439,20 @@ class Axis {
|
|
|
22367
22439
|
* @function Highcharts.Axis#renderLine
|
|
22368
22440
|
*/
|
|
22369
22441
|
renderLine() {
|
|
22370
|
-
const { chart, offset = 0, options } = this;
|
|
22442
|
+
const { chart, offset = 0, options } = this, verb = this.axisLine ? 'animate' : 'attr';
|
|
22371
22443
|
this.axisLine || (this.axisLine = chart.renderer.path()
|
|
22372
22444
|
.addClass('highcharts-axis-line')
|
|
22373
|
-
.attr(
|
|
22374
|
-
stroke: options.lineColor,
|
|
22375
|
-
'stroke-width': options.lineWidth,
|
|
22376
|
-
zIndex: 7
|
|
22377
|
-
})
|
|
22445
|
+
.attr({ zIndex: 7 })
|
|
22378
22446
|
.clip(this.clippable && offset <= 0 ?
|
|
22379
22447
|
chart.plotClipOuter :
|
|
22380
22448
|
void 0)
|
|
22381
22449
|
.add(this.axisGroup));
|
|
22450
|
+
if (!chart.styledMode) {
|
|
22451
|
+
this.axisLine[verb]({
|
|
22452
|
+
stroke: options.lineColor,
|
|
22453
|
+
'stroke-width': options.lineWidth
|
|
22454
|
+
});
|
|
22455
|
+
}
|
|
22382
22456
|
}
|
|
22383
22457
|
/**
|
|
22384
22458
|
* Position the axis title.
|
|
@@ -22463,9 +22537,9 @@ class Axis {
|
|
|
22463
22537
|
* Whether the tick should animate in from last computed position
|
|
22464
22538
|
*/
|
|
22465
22539
|
renderTick(pos, i, slideIn) {
|
|
22466
|
-
const axis = this,
|
|
22540
|
+
const axis = this, ticks = axis.ticks;
|
|
22467
22541
|
// Linked axes need an extra check to find out if
|
|
22468
|
-
if (!
|
|
22542
|
+
if (!axis.linkedParent ||
|
|
22469
22543
|
(pos >= axis.min && pos <= axis.max) ||
|
|
22470
22544
|
axis.grid?.isColumn) {
|
|
22471
22545
|
if (!ticks[pos]) {
|
|
@@ -22491,11 +22565,13 @@ class Axis {
|
|
|
22491
22565
|
* @emits Highcharts.Axis#event:afterRender
|
|
22492
22566
|
*/
|
|
22493
22567
|
render() {
|
|
22494
|
-
const axis = this, chart = axis.chart, log = axis.logarithmic, renderer = chart.renderer, options = axis.options,
|
|
22568
|
+
const axis = this, chart = axis.chart, log = axis.logarithmic, renderer = chart.renderer, options = axis.options, tickPositions = axis.tickPositions, axisTitle = axis.axisTitle, ticks = axis.ticks, minorTicks = axis.minorTicks, alternateBands = axis.alternateBands, alternateGridColor = options.alternateGridColor, crossing = options.crossing, tickmarkOffset = axis.tickmarkOffset, axisLine = axis.axisLine, showAxis = axis.showAxis, opacity = +axis.visible, animation = animObject(renderer.globalAnimation);
|
|
22495
22569
|
let from, to;
|
|
22496
22570
|
// Reset
|
|
22497
22571
|
axis.labelEdge.length = 0;
|
|
22498
22572
|
axis.overlap = false;
|
|
22573
|
+
// Update z-indices
|
|
22574
|
+
this.createGroups();
|
|
22499
22575
|
// Mark all elements inActive before we go over and mark the active ones
|
|
22500
22576
|
[ticks, minorTicks, alternateBands].forEach(function (coll) {
|
|
22501
22577
|
objectEach(coll, function (tick) {
|
|
@@ -22514,7 +22590,7 @@ class Axis {
|
|
|
22514
22590
|
}
|
|
22515
22591
|
}
|
|
22516
22592
|
// If the series has data draw the ticks. Else only the line and title
|
|
22517
|
-
if (axis.hasData() ||
|
|
22593
|
+
if (axis.hasData() || axis.linkedParent) {
|
|
22518
22594
|
const slideInTicks = axis.chart.hasRendered &&
|
|
22519
22595
|
axis.old && isNumber(axis.old.min);
|
|
22520
22596
|
// Minor ticks
|
|
@@ -22552,8 +22628,10 @@ class Axis {
|
|
|
22552
22628
|
tickmarkOffset)) { // #2248, #4660
|
|
22553
22629
|
if (!alternateBands[pos]) {
|
|
22554
22630
|
// Should be imported from PlotLineOrBand.js, but
|
|
22555
|
-
// the dependency cycle with axis is a problem
|
|
22556
|
-
|
|
22631
|
+
// the dependency cycle with axis is a problem. Try
|
|
22632
|
+
// moving it to the PlotLineOrBand axis composition
|
|
22633
|
+
// later.
|
|
22634
|
+
alternateBands[pos] = new Core_Globals.PlotLineOrBand(axis, {}, 'plotBands');
|
|
22557
22635
|
}
|
|
22558
22636
|
from = pos + tickmarkOffset; // #949
|
|
22559
22637
|
alternateBands[pos].options = {
|
|
@@ -22567,17 +22645,13 @@ class Axis {
|
|
|
22567
22645
|
}
|
|
22568
22646
|
});
|
|
22569
22647
|
}
|
|
22570
|
-
// Custom plot lines and bands
|
|
22571
|
-
if (!axis._addedPlotLB) { // Only first time
|
|
22572
|
-
axis._addedPlotLB = true;
|
|
22573
|
-
(options.plotLines || [])
|
|
22574
|
-
.concat(options.plotBands || [])
|
|
22575
|
-
.forEach(function (plotLineOptions) {
|
|
22576
|
-
axis
|
|
22577
|
-
.addPlotBandOrLine(plotLineOptions);
|
|
22578
|
-
});
|
|
22579
|
-
}
|
|
22580
22648
|
} // End if hasData
|
|
22649
|
+
// Render or update rendering of plot lines and bands
|
|
22650
|
+
for (const coll of ['plotBands', 'plotLines']) {
|
|
22651
|
+
for (const plotItem of this[coll]) {
|
|
22652
|
+
plotItem.render();
|
|
22653
|
+
}
|
|
22654
|
+
}
|
|
22581
22655
|
// Remove inactive ticks
|
|
22582
22656
|
[ticks, minorTicks, alternateBands].forEach(function (coll) {
|
|
22583
22657
|
const forDestruction = [], delay = animation.duration, destroyInactiveItems = function () {
|
|
@@ -22611,20 +22685,22 @@ class Axis {
|
|
|
22611
22685
|
// Set the axis line path
|
|
22612
22686
|
if (axisLine) {
|
|
22613
22687
|
axisLine[axisLine.isPlaced ? 'animate' : 'attr']({
|
|
22614
|
-
d: this.getLinePath(axisLine.strokeWidth())
|
|
22688
|
+
d: this.getLinePath(axisLine.strokeWidth()),
|
|
22689
|
+
opacity
|
|
22615
22690
|
});
|
|
22616
22691
|
axisLine.isPlaced = true;
|
|
22617
22692
|
// Show or hide the line depending on options.showEmpty
|
|
22618
22693
|
axisLine[showAxis ? 'show' : 'hide'](showAxis);
|
|
22619
22694
|
}
|
|
22620
22695
|
if (axisTitle && showAxis) {
|
|
22621
|
-
axisTitle[axisTitle.isNew ? 'attr' : 'animate'](
|
|
22696
|
+
axisTitle[axisTitle.isNew ? 'attr' : 'animate']({
|
|
22697
|
+
opacity,
|
|
22698
|
+
...axis.getTitlePosition(axisTitle)
|
|
22699
|
+
});
|
|
22622
22700
|
axisTitle.isNew = false;
|
|
22623
22701
|
}
|
|
22624
22702
|
// Stacked totals
|
|
22625
|
-
|
|
22626
|
-
axis.stacking.renderStackTotals();
|
|
22627
|
-
}
|
|
22703
|
+
axis.stacking?.renderStackTotals();
|
|
22628
22704
|
// First time, save the existing state
|
|
22629
22705
|
if (!this.old) {
|
|
22630
22706
|
this.saveOld();
|
|
@@ -22640,13 +22716,11 @@ class Axis {
|
|
|
22640
22716
|
* @function Highcharts.Axis#redraw
|
|
22641
22717
|
*/
|
|
22642
22718
|
redraw() {
|
|
22643
|
-
|
|
22719
|
+
// If it was initially visible, but dynamically hidden, `this.axisGroup`
|
|
22720
|
+
// exists. Then render with opacity 0.
|
|
22721
|
+
if (this.visible || this.axisGroup) {
|
|
22644
22722
|
// Render the axis
|
|
22645
22723
|
this.render();
|
|
22646
|
-
// Move plot lines and bands
|
|
22647
|
-
this.plotLinesAndBands.forEach(function (plotLine) {
|
|
22648
|
-
plotLine.render();
|
|
22649
|
-
});
|
|
22650
22724
|
}
|
|
22651
22725
|
// Mark associated series as dirty and ready for redraw
|
|
22652
22726
|
this.series.forEach(function (series) {
|
|
@@ -22660,6 +22734,7 @@ class Axis {
|
|
|
22660
22734
|
*/
|
|
22661
22735
|
saveOld() {
|
|
22662
22736
|
this.old = isNumber(this.min) ? {
|
|
22737
|
+
horiz: this.horiz,
|
|
22663
22738
|
len: this.len,
|
|
22664
22739
|
max: this.max,
|
|
22665
22740
|
min: this.min,
|
|
@@ -22669,64 +22744,37 @@ class Axis {
|
|
|
22669
22744
|
userMin: this.userMin
|
|
22670
22745
|
} : void 0;
|
|
22671
22746
|
}
|
|
22672
|
-
/**
|
|
22673
|
-
* Returns an array of axis properties, that should be untouched during
|
|
22674
|
-
* reinitialization.
|
|
22675
|
-
*
|
|
22676
|
-
* @internal
|
|
22677
|
-
* @function Highcharts.Axis#getKeepProps
|
|
22678
|
-
*/
|
|
22679
|
-
getKeepProps() {
|
|
22680
|
-
return (this.keepProps || Axis.keepProps);
|
|
22681
|
-
}
|
|
22682
22747
|
/**
|
|
22683
22748
|
* Destroys an Axis instance. See {@link Axis#remove} for the API endpoint
|
|
22684
22749
|
* to fully remove the axis.
|
|
22685
22750
|
*
|
|
22686
22751
|
* @internal
|
|
22687
22752
|
* @function Highcharts.Axis#destroy
|
|
22688
|
-
*
|
|
22689
|
-
* @param {boolean} [keepEvents]
|
|
22690
|
-
* Whether to preserve events, used internally in Axis.update.
|
|
22691
22753
|
*/
|
|
22692
|
-
destroy(
|
|
22693
|
-
|
|
22694
|
-
fireEvent(this, 'destroy', { keepEvents: keepEvents });
|
|
22754
|
+
destroy() {
|
|
22755
|
+
fireEvent(this, 'destroy');
|
|
22695
22756
|
// Remove the events
|
|
22696
|
-
|
|
22697
|
-
removeEvent(axis);
|
|
22698
|
-
}
|
|
22757
|
+
removeEvent(this);
|
|
22699
22758
|
// Destroy collections
|
|
22700
|
-
[
|
|
22701
|
-
|
|
22702
|
-
|
|
22703
|
-
|
|
22704
|
-
|
|
22705
|
-
|
|
22706
|
-
|
|
22707
|
-
|
|
22708
|
-
|
|
22709
|
-
// Destroy elements
|
|
22759
|
+
[
|
|
22760
|
+
this.ticks,
|
|
22761
|
+
this.minorTicks,
|
|
22762
|
+
this.alternateBands,
|
|
22763
|
+
this.plotBands,
|
|
22764
|
+
this.plotLines,
|
|
22765
|
+
this.plotLinesAndBandsGroups
|
|
22766
|
+
].forEach(destroyObjectProperties);
|
|
22767
|
+
// Destroy elements and clear reference
|
|
22710
22768
|
[
|
|
22711
22769
|
'axisLine', 'axisTitle', 'axisGroup',
|
|
22712
22770
|
'gridGroup', 'labelGroup', 'cross', 'scrollbar'
|
|
22713
|
-
].forEach(
|
|
22714
|
-
|
|
22715
|
-
axis[prop] = axis[prop].destroy();
|
|
22716
|
-
}
|
|
22771
|
+
].forEach((prop) => {
|
|
22772
|
+
this[prop] = this[prop]?.destroy();
|
|
22717
22773
|
});
|
|
22718
|
-
// Destroy each generated group for plotLines and plotBands
|
|
22719
|
-
for (const plotGroup in axis.plotLinesAndBandsGroups) { // eslint-disable-line guard-for-in
|
|
22720
|
-
axis.plotLinesAndBandsGroups[plotGroup] =
|
|
22721
|
-
axis.plotLinesAndBandsGroups[plotGroup].destroy();
|
|
22722
|
-
}
|
|
22723
22774
|
// Delete all properties and fall back to the prototype.
|
|
22724
|
-
objectEach(
|
|
22725
|
-
|
|
22726
|
-
delete axis[key];
|
|
22727
|
-
}
|
|
22775
|
+
objectEach(this, (_val, key) => {
|
|
22776
|
+
delete this[key];
|
|
22728
22777
|
});
|
|
22729
|
-
this.eventOptions = eventOptions;
|
|
22730
22778
|
}
|
|
22731
22779
|
/**
|
|
22732
22780
|
* Internal function to draw a crosshair.
|
|
@@ -22820,25 +22868,21 @@ class Axis {
|
|
|
22820
22868
|
void 0 :
|
|
22821
22869
|
chart.plotClipInner)
|
|
22822
22870
|
.add();
|
|
22823
|
-
|
|
22824
|
-
|
|
22825
|
-
|
|
22826
|
-
|
|
22827
|
-
|
|
22828
|
-
|
|
22829
|
-
|
|
22830
|
-
|
|
22831
|
-
|
|
22832
|
-
|
|
22833
|
-
|
|
22834
|
-
|
|
22835
|
-
|
|
22836
|
-
|
|
22837
|
-
|
|
22838
|
-
dashstyle: options.dashStyle
|
|
22839
|
-
});
|
|
22840
|
-
}
|
|
22841
|
-
}
|
|
22871
|
+
}
|
|
22872
|
+
// Presentational attributes
|
|
22873
|
+
if (!chart.styledMode) {
|
|
22874
|
+
cross
|
|
22875
|
+
.attr({
|
|
22876
|
+
stroke: options.color || (categorized ?
|
|
22877
|
+
Axis_color('var(--highcharts-highlight-color-20)').setOpacity(0.25).get() :
|
|
22878
|
+
'var(--highcharts-neutral-color-20)'),
|
|
22879
|
+
'stroke-width': options.width ?? 1,
|
|
22880
|
+
// Dash style must be after stroke-width
|
|
22881
|
+
dashstyle: options.dashStyle || 'Solid'
|
|
22882
|
+
})
|
|
22883
|
+
.css({
|
|
22884
|
+
'pointer-events': 'none'
|
|
22885
|
+
});
|
|
22842
22886
|
}
|
|
22843
22887
|
cross
|
|
22844
22888
|
.show()
|
|
@@ -22848,9 +22892,7 @@ class Axis {
|
|
|
22848
22892
|
'stroke-width': this.transA
|
|
22849
22893
|
});
|
|
22850
22894
|
}
|
|
22851
|
-
|
|
22852
|
-
this.cross.e = e;
|
|
22853
|
-
}
|
|
22895
|
+
cross.e = e;
|
|
22854
22896
|
},
|
|
22855
22897
|
// Only use delay if the crosshair is currently hidden
|
|
22856
22898
|
(!graphic || graphic.attr('visibility') === 'hidden') ?
|
|
@@ -22889,13 +22931,14 @@ class Axis {
|
|
|
22889
22931
|
* operations on the chart, it is a good idea to set redraw to false and
|
|
22890
22932
|
* call {@link Chart#redraw} after.
|
|
22891
22933
|
*/
|
|
22892
|
-
update(options, redraw) {
|
|
22934
|
+
update(options = {}, redraw = true) {
|
|
22893
22935
|
const chart = this.chart;
|
|
22936
|
+
fireEvent(this, 'update', { options });
|
|
22894
22937
|
options = merge(this.userOptions, options);
|
|
22895
|
-
this.
|
|
22938
|
+
this.isDirty = this.forceRedraw = true;
|
|
22896
22939
|
this.init(chart, options);
|
|
22897
22940
|
chart.isDirtyBox = true;
|
|
22898
|
-
if (redraw
|
|
22941
|
+
if (redraw) {
|
|
22899
22942
|
chart.redraw();
|
|
22900
22943
|
}
|
|
22901
22944
|
}
|
|
@@ -22964,26 +23007,6 @@ class Axis {
|
|
|
22964
23007
|
this.update({ categories: categories }, redraw);
|
|
22965
23008
|
}
|
|
22966
23009
|
}
|
|
22967
|
-
/* *
|
|
22968
|
-
*
|
|
22969
|
-
* Static Properties
|
|
22970
|
-
*
|
|
22971
|
-
* */
|
|
22972
|
-
/**
|
|
22973
|
-
* Properties to survive after destroy, needed for Axis.update (#4317,
|
|
22974
|
-
* #5773, #5881).
|
|
22975
|
-
* @internal
|
|
22976
|
-
*/
|
|
22977
|
-
Axis.keepProps = [
|
|
22978
|
-
'coll',
|
|
22979
|
-
'extKey',
|
|
22980
|
-
'hcEvents',
|
|
22981
|
-
'len',
|
|
22982
|
-
'names',
|
|
22983
|
-
'series',
|
|
22984
|
-
'userMax',
|
|
22985
|
-
'userMin'
|
|
22986
|
-
];
|
|
22987
23010
|
/* *
|
|
22988
23011
|
*
|
|
22989
23012
|
* Default Export
|
|
@@ -23254,6 +23277,8 @@ Axis.keepProps = [
|
|
|
23254
23277
|
* */
|
|
23255
23278
|
|
|
23256
23279
|
|
|
23280
|
+
const { composed: DateTimeAxis_composed } = Core_Globals;
|
|
23281
|
+
|
|
23257
23282
|
|
|
23258
23283
|
/* *
|
|
23259
23284
|
*
|
|
@@ -23277,8 +23302,7 @@ var DateTimeAxis;
|
|
|
23277
23302
|
* @internal
|
|
23278
23303
|
*/
|
|
23279
23304
|
function compose(AxisClass) {
|
|
23280
|
-
if (
|
|
23281
|
-
AxisClass.keepProps.push('dateTime');
|
|
23305
|
+
if (pushUnique(DateTimeAxis_composed, 'Axis.DateTime')) {
|
|
23282
23306
|
const axisProto = AxisClass.prototype;
|
|
23283
23307
|
axisProto.getTimeTicks = getTimeTicks;
|
|
23284
23308
|
addEvent(AxisClass, 'afterSetType', onAfterSetType);
|
|
@@ -23440,6 +23464,8 @@ var DateTimeAxis;
|
|
|
23440
23464
|
* */
|
|
23441
23465
|
|
|
23442
23466
|
|
|
23467
|
+
const { composed: LogarithmicAxis_composed } = Core_Globals;
|
|
23468
|
+
|
|
23443
23469
|
/* *
|
|
23444
23470
|
*
|
|
23445
23471
|
* Class
|
|
@@ -23463,8 +23489,7 @@ var LogarithmicAxis;
|
|
|
23463
23489
|
* @internal
|
|
23464
23490
|
*/
|
|
23465
23491
|
function compose(AxisClass) {
|
|
23466
|
-
if (
|
|
23467
|
-
AxisClass.keepProps.push('logarithmic');
|
|
23492
|
+
if (pushUnique(LogarithmicAxis_composed, 'Axis.Logarithmic')) {
|
|
23468
23493
|
addEvent(AxisClass, 'afterSetType', onAfterSetType);
|
|
23469
23494
|
addEvent(AxisClass, 'afterInit', onAfterInit);
|
|
23470
23495
|
}
|
|
@@ -23673,24 +23698,7 @@ var PlotLineOrBandAxis;
|
|
|
23673
23698
|
* Functions
|
|
23674
23699
|
*
|
|
23675
23700
|
* */
|
|
23676
|
-
|
|
23677
|
-
* Add a plot band after render time.
|
|
23678
|
-
*
|
|
23679
|
-
* @sample highcharts/members/axis-addplotband/
|
|
23680
|
-
* Toggle the plot band from a button
|
|
23681
|
-
*
|
|
23682
|
-
* @function Highcharts.Axis#addPlotBand
|
|
23683
|
-
*
|
|
23684
|
-
* @param {Highcharts.AxisPlotBandsOptions} options
|
|
23685
|
-
* A configuration object for the plot band, as defined in
|
|
23686
|
-
* [xAxis.plotBands](https://api.highcharts.com/highcharts/xAxis.plotBands).
|
|
23687
|
-
*
|
|
23688
|
-
* @return {Highcharts.PlotLineOrBand|undefined}
|
|
23689
|
-
* The added plot band, or `undefined` if the options are not valid.
|
|
23690
|
-
*/
|
|
23691
|
-
function addPlotBand(options) {
|
|
23692
|
-
return this.addPlotBandOrLine(options, 'plotBands');
|
|
23693
|
-
}
|
|
23701
|
+
const getAdderFunction = (coll) =>
|
|
23694
23702
|
/**
|
|
23695
23703
|
* Add a plot band or plot line after render time. Called from
|
|
23696
23704
|
* addPlotBand and addPlotLine internally.
|
|
@@ -23698,65 +23706,85 @@ var PlotLineOrBandAxis;
|
|
|
23698
23706
|
* @internal
|
|
23699
23707
|
* @function Highcharts.Axis#addPlotBandOrLine
|
|
23700
23708
|
* @param {Highcharts.AxisPlotBandsOptions|Highcharts.AxisPlotLinesOptions} options
|
|
23701
|
-
*
|
|
23709
|
+
* The `plotBand` or `plotLine` configuration object.
|
|
23702
23710
|
*/
|
|
23703
|
-
function
|
|
23704
|
-
|
|
23705
|
-
|
|
23711
|
+
function addPlotLineOrBand(options) {
|
|
23712
|
+
var _a;
|
|
23713
|
+
const plotItem = new PlotLineOrBandClass(this, options, coll);
|
|
23706
23714
|
if (this.visible) {
|
|
23707
|
-
|
|
23708
|
-
}
|
|
23709
|
-
if (obj) { // #2189
|
|
23710
|
-
if (!this._addedPlotLB) {
|
|
23711
|
-
this._addedPlotLB = true;
|
|
23712
|
-
(userOptions.plotLines || [])
|
|
23713
|
-
.concat(userOptions.plotBands || [])
|
|
23714
|
-
.forEach((plotLineOptions) => {
|
|
23715
|
-
this.addPlotBandOrLine(plotLineOptions);
|
|
23716
|
-
});
|
|
23717
|
-
}
|
|
23718
|
-
// Add it to the user options for exporting and Axis.update
|
|
23719
|
-
if (coll) {
|
|
23720
|
-
// Workaround Microsoft/TypeScript issue #32693
|
|
23721
|
-
const updatedOptions = (userOptions[coll] || []);
|
|
23722
|
-
updatedOptions.push(options);
|
|
23723
|
-
userOptions[coll] = updatedOptions;
|
|
23724
|
-
}
|
|
23725
|
-
this.plotLinesAndBands.push(obj);
|
|
23715
|
+
plotItem.render();
|
|
23726
23716
|
}
|
|
23727
|
-
|
|
23728
|
-
|
|
23729
|
-
|
|
23730
|
-
|
|
23731
|
-
|
|
23732
|
-
* @sample highcharts/members/axis-addplotline/
|
|
23733
|
-
* Toggle the plot line from a button
|
|
23734
|
-
*
|
|
23735
|
-
* @function Highcharts.Axis#addPlotLine
|
|
23736
|
-
*
|
|
23737
|
-
* @param {Highcharts.AxisPlotLinesOptions} options
|
|
23738
|
-
* A configuration object for the plot line, as defined in
|
|
23739
|
-
* [xAxis.plotLines](https://api.highcharts.com/highcharts/xAxis.plotLines).
|
|
23740
|
-
*
|
|
23741
|
-
* @return {Highcharts.PlotLineOrBand|undefined}
|
|
23742
|
-
* The added plot line, or `undefined` if the options are not valid.
|
|
23743
|
-
*/
|
|
23744
|
-
function addPlotLine(options) {
|
|
23745
|
-
return this.addPlotBandOrLine(options, 'plotLines');
|
|
23746
|
-
}
|
|
23717
|
+
(_a = this.options)[coll] || (_a[coll] = this.userOptions[coll] = []);
|
|
23718
|
+
this.options[coll].push(options);
|
|
23719
|
+
this[coll].push(plotItem);
|
|
23720
|
+
return plotItem;
|
|
23721
|
+
};
|
|
23747
23722
|
/** @internal */
|
|
23748
23723
|
function compose(PlotLineOrBandType, AxisClass) {
|
|
23749
23724
|
const axisProto = AxisClass.prototype;
|
|
23750
23725
|
if (!axisProto.addPlotBand) {
|
|
23751
23726
|
PlotLineOrBandClass = PlotLineOrBandType;
|
|
23752
23727
|
extend(axisProto, {
|
|
23753
|
-
addPlotBand,
|
|
23754
|
-
addPlotLine,
|
|
23755
|
-
addPlotBandOrLine,
|
|
23728
|
+
addPlotBand: getAdderFunction('plotBands'),
|
|
23729
|
+
addPlotLine: getAdderFunction('plotLines'),
|
|
23756
23730
|
getPlotBandPath,
|
|
23757
|
-
removePlotBand,
|
|
23758
|
-
removePlotLine
|
|
23759
|
-
|
|
23731
|
+
removePlotBand: removePlotBandOrLine,
|
|
23732
|
+
removePlotLine: removePlotBandOrLine
|
|
23733
|
+
});
|
|
23734
|
+
addEvent(AxisClass, 'afterInit', function () {
|
|
23735
|
+
// First time only, not on Axis.update()
|
|
23736
|
+
if (!this.plotBands) {
|
|
23737
|
+
// Placeholder for plotlines and plotbands groups
|
|
23738
|
+
this.plotLinesAndBandsGroups = {};
|
|
23739
|
+
// Plot lines and bands from options
|
|
23740
|
+
for (const coll of ['plotBands', 'plotLines']) {
|
|
23741
|
+
this[coll] = [];
|
|
23742
|
+
for (const pOptions of splat(this.options[coll] || [])) {
|
|
23743
|
+
this[coll].push(new PlotLineOrBandClass(this, pOptions, coll));
|
|
23744
|
+
}
|
|
23745
|
+
}
|
|
23746
|
+
}
|
|
23747
|
+
});
|
|
23748
|
+
// Update plot bands and lines one to one
|
|
23749
|
+
addEvent(AxisClass, 'update', function ({ options }) {
|
|
23750
|
+
for (const coll of ['plotBands', 'plotLines']) {
|
|
23751
|
+
// Check if we have new options to process, otherwise do
|
|
23752
|
+
// nothing with existing plot lines and bands
|
|
23753
|
+
if (options[coll]) {
|
|
23754
|
+
const plotItems = this[coll];
|
|
23755
|
+
splat(options[coll]).forEach((pOptions = {}, i) => {
|
|
23756
|
+
// Match by id
|
|
23757
|
+
let pItem;
|
|
23758
|
+
if (pOptions?.id) {
|
|
23759
|
+
pItem = plotItems.find((p) => p.id === pOptions.id);
|
|
23760
|
+
}
|
|
23761
|
+
// Match by index
|
|
23762
|
+
pItem || (pItem = plotItems[i]);
|
|
23763
|
+
// Update
|
|
23764
|
+
if (pItem) {
|
|
23765
|
+
pItem.update(pOptions, false);
|
|
23766
|
+
options[coll][i] = pItem.options;
|
|
23767
|
+
// Add
|
|
23768
|
+
}
|
|
23769
|
+
else {
|
|
23770
|
+
pItem = this[coll === 'plotBands' ?
|
|
23771
|
+
'addPlotBand' :
|
|
23772
|
+
'addPlotLine'](pOptions);
|
|
23773
|
+
}
|
|
23774
|
+
pItem.isActive = true;
|
|
23775
|
+
});
|
|
23776
|
+
// Remove inactive items from end to start
|
|
23777
|
+
let i = plotItems.length;
|
|
23778
|
+
while (i--) {
|
|
23779
|
+
if (!plotItems[i].isActive) {
|
|
23780
|
+
plotItems[i].remove();
|
|
23781
|
+
}
|
|
23782
|
+
else {
|
|
23783
|
+
delete plotItems[i].isActive;
|
|
23784
|
+
}
|
|
23785
|
+
}
|
|
23786
|
+
}
|
|
23787
|
+
}
|
|
23760
23788
|
});
|
|
23761
23789
|
}
|
|
23762
23790
|
return AxisClass;
|
|
@@ -23827,23 +23855,6 @@ var PlotLineOrBandAxis;
|
|
|
23827
23855
|
}
|
|
23828
23856
|
return result;
|
|
23829
23857
|
}
|
|
23830
|
-
/**
|
|
23831
|
-
* Remove a plot band by its id.
|
|
23832
|
-
*
|
|
23833
|
-
* @sample highcharts/members/axis-removeplotband/
|
|
23834
|
-
* Remove plot band by id
|
|
23835
|
-
* @sample highcharts/members/axis-addplotband/
|
|
23836
|
-
* Toggle the plot band from a button
|
|
23837
|
-
*
|
|
23838
|
-
* @function Highcharts.Axis#removePlotBand
|
|
23839
|
-
*
|
|
23840
|
-
* @param {string} id
|
|
23841
|
-
* The plot band's `id` as given in the original configuration
|
|
23842
|
-
* object or in the `addPlotBand` option.
|
|
23843
|
-
*/
|
|
23844
|
-
function removePlotBand(id) {
|
|
23845
|
-
this.removePlotBandOrLine(id);
|
|
23846
|
-
}
|
|
23847
23858
|
/**
|
|
23848
23859
|
* Remove a plot band or plot line from the chart by id. Called
|
|
23849
23860
|
* internally from `removePlotBand` and `removePlotLine`.
|
|
@@ -23851,45 +23862,7 @@ var PlotLineOrBandAxis;
|
|
|
23851
23862
|
* @function Highcharts.Axis#removePlotBandOrLine
|
|
23852
23863
|
*/
|
|
23853
23864
|
function removePlotBandOrLine(id) {
|
|
23854
|
-
|
|
23855
|
-
if (plotLinesAndBands) { // #15639
|
|
23856
|
-
let i = plotLinesAndBands.length;
|
|
23857
|
-
while (i--) {
|
|
23858
|
-
if (plotLinesAndBands[i].id === id) {
|
|
23859
|
-
plotLinesAndBands[i].destroy();
|
|
23860
|
-
}
|
|
23861
|
-
}
|
|
23862
|
-
([
|
|
23863
|
-
options.plotLines || [],
|
|
23864
|
-
userOptions.plotLines || [],
|
|
23865
|
-
options.plotBands || [],
|
|
23866
|
-
userOptions.plotBands || []
|
|
23867
|
-
]).forEach(function (arr) {
|
|
23868
|
-
i = arr.length;
|
|
23869
|
-
while (i--) {
|
|
23870
|
-
if (arr[i]?.id === id) {
|
|
23871
|
-
erase(arr, arr[i]);
|
|
23872
|
-
}
|
|
23873
|
-
}
|
|
23874
|
-
});
|
|
23875
|
-
}
|
|
23876
|
-
}
|
|
23877
|
-
/**
|
|
23878
|
-
* Remove a plot line by its id.
|
|
23879
|
-
*
|
|
23880
|
-
* @sample highcharts/xaxis/plotlines-id/
|
|
23881
|
-
* Remove plot line by id
|
|
23882
|
-
* @sample highcharts/members/axis-addplotline/
|
|
23883
|
-
* Toggle the plot line from a button
|
|
23884
|
-
*
|
|
23885
|
-
* @function Highcharts.Axis#removePlotLine
|
|
23886
|
-
*
|
|
23887
|
-
* @param {string} id
|
|
23888
|
-
* The plot line's `id` as given in the original configuration
|
|
23889
|
-
* object or in the `addPlotLine` option.
|
|
23890
|
-
*/
|
|
23891
|
-
function removePlotLine(id) {
|
|
23892
|
-
this.removePlotBandOrLine(id);
|
|
23865
|
+
[...this.plotBands || [], ...this.plotLines || []].find((plotItem) => plotItem.id === id)?.remove();
|
|
23893
23866
|
}
|
|
23894
23867
|
})(PlotLineOrBandAxis || (PlotLineOrBandAxis = {}));
|
|
23895
23868
|
/* *
|
|
@@ -23953,9 +23926,11 @@ class PlotLineOrBand {
|
|
|
23953
23926
|
this.labelCollectors.push(() => {
|
|
23954
23927
|
const labels = [];
|
|
23955
23928
|
for (const axis of this.axes) {
|
|
23956
|
-
for (const
|
|
23957
|
-
|
|
23958
|
-
|
|
23929
|
+
for (const coll of ['plotBands', 'plotLines']) {
|
|
23930
|
+
for (const { label, options } of axis[coll]) {
|
|
23931
|
+
if (label && !options?.label?.allowOverlap) {
|
|
23932
|
+
labels.push(label);
|
|
23933
|
+
}
|
|
23959
23934
|
}
|
|
23960
23935
|
}
|
|
23961
23936
|
}
|
|
@@ -23969,7 +23944,7 @@ class PlotLineOrBand {
|
|
|
23969
23944
|
* Constructor
|
|
23970
23945
|
*
|
|
23971
23946
|
* */
|
|
23972
|
-
constructor(axis, options) {
|
|
23947
|
+
constructor(axis, options, coll) {
|
|
23973
23948
|
/**
|
|
23974
23949
|
* Related axis.
|
|
23975
23950
|
*
|
|
@@ -23985,6 +23960,7 @@ class PlotLineOrBand {
|
|
|
23985
23960
|
*/
|
|
23986
23961
|
this.options = options;
|
|
23987
23962
|
this.id = options.id;
|
|
23963
|
+
this.coll = coll;
|
|
23988
23964
|
}
|
|
23989
23965
|
/* *
|
|
23990
23966
|
*
|
|
@@ -24000,43 +23976,28 @@ class PlotLineOrBand {
|
|
|
24000
23976
|
*/
|
|
24001
23977
|
render() {
|
|
24002
23978
|
fireEvent(this, 'render');
|
|
24003
|
-
const { axis, options } = this, { chart, horiz, logarithmic } = axis, { color, events, zIndex = 0 } = options, { renderer, time } = axis.chart,
|
|
23979
|
+
const { axis, options } = this, { chart, horiz, logarithmic } = axis, { color, events, zIndex = 0 } = options, { renderer, styledMode, time } = axis.chart,
|
|
24004
23980
|
// These properties only exist on either band or line
|
|
24005
23981
|
to = time.parse(options.to), from = time.parse(options.from), value = time.parse(options.value), borderWidth = options.borderWidth;
|
|
24006
|
-
let optionsLabel = options.label, { label, svgElem } = this,
|
|
24007
|
-
const isBand =
|
|
24008
|
-
'class':
|
|
24009
|
-
|
|
24010
|
-
|
|
24011
|
-
|
|
24012
|
-
// Set the
|
|
24013
|
-
if (!
|
|
24014
|
-
|
|
24015
|
-
attribs.stroke = color || 'var(--highcharts-neutral-color-40)';
|
|
24016
|
-
attribs['stroke-width'] =
|
|
24017
|
-
options.width ?? 1;
|
|
24018
|
-
if (options.dashStyle) {
|
|
24019
|
-
attribs.dashstyle = options.dashStyle;
|
|
24020
|
-
}
|
|
24021
|
-
}
|
|
24022
|
-
else if (isBand) { // Plot band
|
|
24023
|
-
attribs.fill = color || 'var(--highcharts-highlight-color-10)';
|
|
24024
|
-
if (borderWidth) {
|
|
24025
|
-
attribs.stroke = options.borderColor;
|
|
24026
|
-
attribs['stroke-width'] = borderWidth;
|
|
24027
|
-
}
|
|
24028
|
-
}
|
|
23982
|
+
let optionsLabel = options.label, { label, svgElem } = this, group;
|
|
23983
|
+
const isBand = this.coll === 'plotBands', shortKey = isBand ? 'band' : 'line', groupName = `${shortKey}s-${zIndex}`, isNew = !svgElem, attribs = {
|
|
23984
|
+
'class': `highcharts-plot-${shortKey} ${options.className || ''}`
|
|
23985
|
+
}, strokeWidth = isBand ?
|
|
23986
|
+
(borderWidth || 0) :
|
|
23987
|
+
(options.width ?? 1);
|
|
23988
|
+
// Set the stroke width before the path is calculated
|
|
23989
|
+
if (!styledMode) {
|
|
23990
|
+
attribs['stroke-width'] = strokeWidth;
|
|
24029
23991
|
}
|
|
24030
23992
|
// Grouping and zIndex
|
|
24031
|
-
groupAttribs.zIndex = zIndex;
|
|
24032
|
-
groupName += '-' + zIndex;
|
|
24033
23993
|
group = axis.plotLinesAndBandsGroups[groupName];
|
|
24034
23994
|
if (!group) {
|
|
24035
23995
|
axis.plotLinesAndBandsGroups[groupName] = group =
|
|
24036
23996
|
renderer.g('plot-' + groupName)
|
|
24037
23997
|
.clip(chart.plotClipOuter)
|
|
24038
|
-
.attr(
|
|
23998
|
+
.attr({ zIndex }).add();
|
|
24039
23999
|
}
|
|
24000
|
+
group[isNew ? 'attr' : 'animate']({ opacity: +axis.visible });
|
|
24040
24001
|
// Create the path
|
|
24041
24002
|
if (!svgElem) {
|
|
24042
24003
|
/**
|
|
@@ -24047,40 +24008,58 @@ class PlotLineOrBand {
|
|
|
24047
24008
|
*/
|
|
24048
24009
|
this.svgElem = svgElem = renderer
|
|
24049
24010
|
.path()
|
|
24050
|
-
.attr(attribs)
|
|
24051
|
-
|
|
24011
|
+
.attr(attribs);
|
|
24012
|
+
}
|
|
24013
|
+
// Add it to the correct index while allowing dynamic z-index update
|
|
24014
|
+
if (svgElem.parentGroup !== group) {
|
|
24015
|
+
svgElem.add(group);
|
|
24052
24016
|
}
|
|
24053
24017
|
// Set the path or return
|
|
24054
|
-
|
|
24018
|
+
let path;
|
|
24019
|
+
if (!isBand && defined(value)) { // Plot line
|
|
24055
24020
|
path = axis.getPlotLinePath({
|
|
24056
24021
|
value: logarithmic?.log2lin(value) ?? value,
|
|
24057
24022
|
lineWidth: svgElem.strokeWidth(),
|
|
24058
24023
|
acrossPanes: options.acrossPanes
|
|
24059
24024
|
});
|
|
24060
24025
|
}
|
|
24061
|
-
else if (defined(from) && defined(to)) { // Plot band
|
|
24026
|
+
else if (isBand && defined(from) && defined(to)) { // Plot band
|
|
24062
24027
|
path = axis.getPlotBandPath(logarithmic?.log2lin(from) ?? from, logarithmic?.log2lin(to) ?? to, options);
|
|
24063
24028
|
}
|
|
24064
|
-
|
|
24065
|
-
|
|
24029
|
+
if (path) {
|
|
24030
|
+
attribs.d = path;
|
|
24031
|
+
}
|
|
24032
|
+
// Apply the styling
|
|
24033
|
+
if (!styledMode) {
|
|
24034
|
+
if (isBand) { // Plot band
|
|
24035
|
+
attribs.fill = color || 'var(--highcharts-highlight-color-10)';
|
|
24036
|
+
if (borderWidth) {
|
|
24037
|
+
attribs.stroke = options.borderColor;
|
|
24038
|
+
}
|
|
24039
|
+
}
|
|
24040
|
+
else {
|
|
24041
|
+
attribs.stroke = color || 'var(--highcharts-neutral-color-40)';
|
|
24042
|
+
if (options.dashStyle) {
|
|
24043
|
+
attribs.dashstyle = options.dashStyle;
|
|
24044
|
+
}
|
|
24045
|
+
}
|
|
24066
24046
|
}
|
|
24067
24047
|
// Common for lines and bands. Add events only if they were not added
|
|
24068
24048
|
// before.
|
|
24069
|
-
if (
|
|
24049
|
+
if (isNew && events) {
|
|
24070
24050
|
objectEach(events, (_event, eventType) => {
|
|
24071
24051
|
svgElem?.on(eventType, (e) => {
|
|
24072
24052
|
events[eventType].apply(this, [e, this]);
|
|
24073
24053
|
});
|
|
24074
24054
|
});
|
|
24075
|
-
this.eventsAdded = true;
|
|
24076
24055
|
}
|
|
24077
24056
|
if ((isNew || !svgElem.d) && path?.length) {
|
|
24078
|
-
svgElem.attr(
|
|
24057
|
+
svgElem.attr(attribs);
|
|
24079
24058
|
}
|
|
24080
24059
|
else if (svgElem) {
|
|
24081
24060
|
if (path) {
|
|
24082
24061
|
svgElem.show();
|
|
24083
|
-
svgElem.animate(
|
|
24062
|
+
svgElem.animate(attribs);
|
|
24084
24063
|
}
|
|
24085
24064
|
else if (svgElem.d) {
|
|
24086
24065
|
svgElem.hide();
|
|
@@ -24120,7 +24099,7 @@ class PlotLineOrBand {
|
|
|
24120
24099
|
* @function Highcharts.PlotLineOrBand#renderLabel
|
|
24121
24100
|
*/
|
|
24122
24101
|
renderLabel(optionsLabel, path, isBand, zIndex) {
|
|
24123
|
-
const plotLine = this, axis = plotLine.axis,
|
|
24102
|
+
const plotLine = this, axis = plotLine.axis, chart = axis.chart, renderer = chart.renderer, inside = optionsLabel.inside;
|
|
24124
24103
|
let label = plotLine.label;
|
|
24125
24104
|
// Add the SVG element
|
|
24126
24105
|
if (!label) {
|
|
@@ -24131,25 +24110,31 @@ class PlotLineOrBand {
|
|
|
24131
24110
|
* @type {Highcharts.SVGElement}
|
|
24132
24111
|
*/
|
|
24133
24112
|
plotLine.label = label = renderer
|
|
24134
|
-
.text(
|
|
24135
|
-
.attr({
|
|
24136
|
-
|
|
24137
|
-
|
|
24138
|
-
|
|
24139
|
-
|
|
24140
|
-
|
|
24141
|
-
|
|
24142
|
-
|
|
24143
|
-
|
|
24144
|
-
|
|
24145
|
-
|
|
24146
|
-
|
|
24147
|
-
|
|
24148
|
-
|
|
24149
|
-
|
|
24150
|
-
|
|
24151
|
-
|
|
24152
|
-
|
|
24113
|
+
.text('', 0, 0, optionsLabel.useHTML)
|
|
24114
|
+
.attr({ zIndex });
|
|
24115
|
+
}
|
|
24116
|
+
label
|
|
24117
|
+
.attr({
|
|
24118
|
+
text: this.getLabelText(optionsLabel),
|
|
24119
|
+
align: optionsLabel.textAlign || optionsLabel.align,
|
|
24120
|
+
'class': 'highcharts-plot-' + (isBand ? 'band' : 'line') +
|
|
24121
|
+
'-label ' + (optionsLabel.className || '')
|
|
24122
|
+
})[label.placed ? 'animate' : 'attr']({
|
|
24123
|
+
opacity: 1,
|
|
24124
|
+
rotation: optionsLabel.rotation
|
|
24125
|
+
});
|
|
24126
|
+
if (!chart.styledMode) {
|
|
24127
|
+
label.css(merge({
|
|
24128
|
+
// To allow theming, and in lack of a general place to set
|
|
24129
|
+
// default options for plot lines and bands, default to the
|
|
24130
|
+
// title color. If we expose the palette, we should use that
|
|
24131
|
+
// instead.
|
|
24132
|
+
color: chart.options.title?.style?.color,
|
|
24133
|
+
fontSize: '0.8em',
|
|
24134
|
+
textOverflow: (isBand && !inside) ? '' : 'ellipsis'
|
|
24135
|
+
}, optionsLabel.style));
|
|
24136
|
+
}
|
|
24137
|
+
if (!label.added) {
|
|
24153
24138
|
label.add();
|
|
24154
24139
|
}
|
|
24155
24140
|
// Get the bounding box and align the label
|
|
@@ -24173,12 +24158,31 @@ class PlotLineOrBand {
|
|
|
24173
24158
|
axis.height - (label.alignAttr.y -
|
|
24174
24159
|
axis.top) : (optionsLabel.clip ?
|
|
24175
24160
|
(axis.width + axis.left) :
|
|
24176
|
-
|
|
24161
|
+
chart.chartWidth) - label.alignAttr.x) :
|
|
24177
24162
|
bBoxWidth)) + 'px'
|
|
24178
24163
|
});
|
|
24179
24164
|
}
|
|
24165
|
+
else if (label.textWidth) {
|
|
24166
|
+
label.css({ width: 'auto' });
|
|
24167
|
+
}
|
|
24180
24168
|
label.show(true);
|
|
24181
24169
|
}
|
|
24170
|
+
/**
|
|
24171
|
+
* Update the plot line or band with new options.
|
|
24172
|
+
*
|
|
24173
|
+
* @param {Highcharts.AxisPlotLinesOptions|Highcharts.AxisPlotBandsOptions} options
|
|
24174
|
+
* The new options to apply
|
|
24175
|
+
* @param {boolean} [redraw=true]
|
|
24176
|
+
* Whether to redraw the plot guide immediately
|
|
24177
|
+
*
|
|
24178
|
+
* @function Highcharts.PlotLineOrBand#update
|
|
24179
|
+
*/
|
|
24180
|
+
update(options, redraw = true) {
|
|
24181
|
+
merge(true, this.options, options);
|
|
24182
|
+
if (redraw) {
|
|
24183
|
+
this.render();
|
|
24184
|
+
}
|
|
24185
|
+
}
|
|
24182
24186
|
/**
|
|
24183
24187
|
* Get label's text content.
|
|
24184
24188
|
* @internal
|
|
@@ -24190,15 +24194,22 @@ class PlotLineOrBand {
|
|
|
24190
24194
|
optionsLabel.text;
|
|
24191
24195
|
}
|
|
24192
24196
|
/**
|
|
24193
|
-
*
|
|
24194
|
-
*
|
|
24195
|
-
* @function Highcharts.PlotLineOrBand#destroy
|
|
24197
|
+
* Destroy the item's elements
|
|
24196
24198
|
*/
|
|
24197
24199
|
destroy() {
|
|
24200
|
+
destroyObjectProperties(this, this.axis);
|
|
24201
|
+
}
|
|
24202
|
+
/**
|
|
24203
|
+
* Remove the plot line or band and destroy its elements.
|
|
24204
|
+
*
|
|
24205
|
+
* @function Highcharts.PlotLineOrBand#remove
|
|
24206
|
+
*/
|
|
24207
|
+
remove() {
|
|
24198
24208
|
// Remove it from the lookup
|
|
24199
|
-
erase(this.axis.
|
|
24200
|
-
|
|
24201
|
-
|
|
24209
|
+
erase(this.axis[this.coll], this);
|
|
24210
|
+
// Remove from options
|
|
24211
|
+
erase(this.axis.options[this.coll] || [], this.options);
|
|
24212
|
+
this.destroy();
|
|
24202
24213
|
}
|
|
24203
24214
|
}
|
|
24204
24215
|
/* *
|
|
@@ -24245,10 +24256,24 @@ class PlotLineOrBand {
|
|
|
24245
24256
|
* In styled mode, the plot bands are styled by the `.highcharts-plot-band`
|
|
24246
24257
|
* class in addition to the `className` option.
|
|
24247
24258
|
*
|
|
24259
|
+
* When doing `Chart.update()` or `Axis.update()`, the plot bands are updated
|
|
24260
|
+
* by index or id. The following merging rules apply:
|
|
24261
|
+
* - If `plotBands` are not defined in the new options, all existing plot bands
|
|
24262
|
+
* are kept.
|
|
24263
|
+
* - If `plotBands` are defined without ids, the existing plot bands are updated
|
|
24264
|
+
* by index. If the new array has fewer plot bands, the remaining existing
|
|
24265
|
+
* plot bands are removed. If the new array has more plot bands, the extra
|
|
24266
|
+
* ones are added. An empty array removes all existing plot bands.
|
|
24267
|
+
* - If `plotBands` are defined with ids, the existing plot bands are matched
|
|
24268
|
+
* by id, and remaining unmatched existing plot bands are removed.
|
|
24269
|
+
*
|
|
24248
24270
|
* @productdesc {highcharts}
|
|
24249
24271
|
* In a gauge, a plot band on the Y axis (value axis) will stretch along the
|
|
24250
24272
|
* perimeter of the gauge.
|
|
24251
24273
|
*
|
|
24274
|
+
* @sample {highcharts} highcharts/xaxis/plotbands-color/
|
|
24275
|
+
* Basic plot band
|
|
24276
|
+
*
|
|
24252
24277
|
* @type {Array<*>}
|
|
24253
24278
|
* @product highcharts highstock gantt
|
|
24254
24279
|
* @apioption xAxis.plotBands
|
|
@@ -24540,12 +24565,23 @@ class PlotLineOrBand {
|
|
|
24540
24565
|
* In styled mode, the plot lines are styled by the
|
|
24541
24566
|
* `.highcharts-plot-line` class in addition to the `className` option.
|
|
24542
24567
|
*
|
|
24568
|
+
* When doing `Chart.update()` or `Axis.update()`, the plot lines are updated
|
|
24569
|
+
* by index or id. The following merging rules apply:
|
|
24570
|
+
* - If `plotLines` are not defined in the new options, all existing plot lines
|
|
24571
|
+
* are kept.
|
|
24572
|
+
* - If `plotLines` are defined without ids, the existing plot lines are updated
|
|
24573
|
+
* by index. If the new array has fewer plot lines, the remaining existing
|
|
24574
|
+
* plot lines are removed. If the new array has more plot lines, the extra
|
|
24575
|
+
* ones are added. An empty array removes all existing plot lines.
|
|
24576
|
+
* - If `plotLines` are defined with ids, the existing plot lines are matched
|
|
24577
|
+
* by id, and remaining unmatched existing plot lines are removed.
|
|
24578
|
+
*
|
|
24543
24579
|
* @type {Array<*>}
|
|
24544
24580
|
* @product highcharts highstock gantt
|
|
24545
|
-
* @sample
|
|
24546
|
-
*
|
|
24547
|
-
* @sample
|
|
24548
|
-
*
|
|
24581
|
+
* @sample {highcharts} highcharts/xaxis/plotlines-color/
|
|
24582
|
+
* Basic plot line
|
|
24583
|
+
* @sample {highcharts} highcharts/series-solidgauge/labels-auto-aligned/
|
|
24584
|
+
* Solid gauge plot line
|
|
24549
24585
|
* @apioption xAxis.plotLines
|
|
24550
24586
|
*/
|
|
24551
24587
|
/**
|
|
@@ -25054,14 +25090,11 @@ class Tooltip {
|
|
|
25054
25090
|
*/
|
|
25055
25091
|
destroy() {
|
|
25056
25092
|
// Destroy and clear local variables
|
|
25057
|
-
|
|
25058
|
-
|
|
25059
|
-
}
|
|
25093
|
+
this.tracker = this.tracker?.destroy();
|
|
25094
|
+
this.label = this.label?.destroy();
|
|
25060
25095
|
if (this.split) {
|
|
25061
25096
|
this.cleanSplit(true);
|
|
25062
|
-
|
|
25063
|
-
this.tt = this.tt.destroy();
|
|
25064
|
-
}
|
|
25097
|
+
this.tt = this.tt?.destroy();
|
|
25065
25098
|
}
|
|
25066
25099
|
if (this.renderer) {
|
|
25067
25100
|
this.renderer = this.renderer.destroy();
|
|
@@ -25591,6 +25624,8 @@ class Tooltip {
|
|
|
25591
25624
|
!this.isHidden &&
|
|
25592
25625
|
!options.fixed &&
|
|
25593
25626
|
options.animation), skipAnchor = followPointer || (this.len || 0) > 1, attr = { x, y };
|
|
25627
|
+
this.anchorX = anchorX;
|
|
25628
|
+
this.anchorY = anchorY;
|
|
25594
25629
|
if (!skipAnchor) {
|
|
25595
25630
|
attr.anchorX = anchorX;
|
|
25596
25631
|
attr.anchorY = anchorY;
|
|
@@ -26037,45 +26072,37 @@ class Tooltip {
|
|
|
26037
26072
|
*/
|
|
26038
26073
|
drawTracker() {
|
|
26039
26074
|
const tooltip = this;
|
|
26040
|
-
if (!
|
|
26041
|
-
|
|
26042
|
-
tooltip.tracker = tooltip.tracker.destroy();
|
|
26043
|
-
}
|
|
26075
|
+
if (!tooltip.shouldStickOnContact()) {
|
|
26076
|
+
tooltip.tracker = tooltip.tracker?.destroy();
|
|
26044
26077
|
return;
|
|
26045
26078
|
}
|
|
26046
|
-
const chart = tooltip.chart
|
|
26047
|
-
|
|
26048
|
-
|
|
26049
|
-
if (!
|
|
26079
|
+
const { chart, label } = tooltip, points = tooltip.shared ? chart.hoverPoints : chart.hoverPoint,
|
|
26080
|
+
// Split tooltips render into a plain group, with no box to trace
|
|
26081
|
+
box = label?.box;
|
|
26082
|
+
if (!box || !points) {
|
|
26050
26083
|
return;
|
|
26051
26084
|
}
|
|
26052
|
-
const
|
|
26053
|
-
|
|
26054
|
-
|
|
26055
|
-
|
|
26056
|
-
|
|
26057
|
-
|
|
26058
|
-
|
|
26059
|
-
|
|
26060
|
-
|
|
26061
|
-
|
|
26062
|
-
|
|
26063
|
-
//
|
|
26064
|
-
|
|
26065
|
-
|
|
26066
|
-
|
|
26067
|
-
|
|
26068
|
-
|
|
26069
|
-
|
|
26070
|
-
|
|
26071
|
-
Math.max(Math.abs(anchorPos[1]), labelBBox.height - Math.abs(anchorPos[1])) :
|
|
26072
|
-
Math.max(Math.abs(anchorPos[1]), labelBBox.height));
|
|
26073
|
-
if (tooltip.tracker) {
|
|
26074
|
-
tooltip.tracker.attr(box);
|
|
26075
|
-
}
|
|
26076
|
-
else {
|
|
26085
|
+
const { height, r, width, x, y } = box;
|
|
26086
|
+
let { anchorX, anchorY } = box;
|
|
26087
|
+
// Shared tooltips clear the label anchor (#22295), so fall back to the
|
|
26088
|
+
// anchor the position was calculated from
|
|
26089
|
+
if (!isNumber(anchorX)) {
|
|
26090
|
+
anchorX = (tooltip.anchorX || 0) - (label.translateX || 0);
|
|
26091
|
+
anchorY = (tooltip.anchorY || 0) - (label.translateY || 0);
|
|
26092
|
+
}
|
|
26093
|
+
// Match the tooltip shape, but stretch the connector all the way to the
|
|
26094
|
+
// point, so that the pointer can travel between the two without losing
|
|
26095
|
+
// contact. Only the side facing the anchor overshoots the box, so the
|
|
26096
|
+
// largest of the four distances is the one to cover. (#24255)
|
|
26097
|
+
const d = label.renderer.symbols.callout(x, y, width, height, {
|
|
26098
|
+
anchorX,
|
|
26099
|
+
anchorY,
|
|
26100
|
+
arrowLength: Math.max(anchorX - width, -anchorX, anchorY - height, -anchorY, 0),
|
|
26101
|
+
r
|
|
26102
|
+
});
|
|
26103
|
+
if (!tooltip.tracker) {
|
|
26077
26104
|
tooltip.tracker = label.renderer
|
|
26078
|
-
.
|
|
26105
|
+
.path()
|
|
26079
26106
|
.addClass('highcharts-tracker')
|
|
26080
26107
|
.add(label);
|
|
26081
26108
|
// For a rapid move going outside of the elements keeping the
|
|
@@ -26083,10 +26110,14 @@ class Tooltip {
|
|
|
26083
26110
|
addEvent(tooltip.tracker.element, 'mouseenter', () => clearTimeouts(tooltip));
|
|
26084
26111
|
if (!chart.styledMode) {
|
|
26085
26112
|
tooltip.tracker.attr({
|
|
26086
|
-
fill: 'rgba(0,0,0,0)'
|
|
26113
|
+
fill: 'rgba(0,0,0,0)',
|
|
26114
|
+
stroke: 'rgba(0,0,0,0)',
|
|
26115
|
+
'stroke-linejoin': 'round',
|
|
26116
|
+
'stroke-width': 10
|
|
26087
26117
|
});
|
|
26088
26118
|
}
|
|
26089
26119
|
}
|
|
26120
|
+
tooltip.tracker.attr({ d });
|
|
26090
26121
|
}
|
|
26091
26122
|
/** @internal */
|
|
26092
26123
|
styledModeFormat(formatString) {
|
|
@@ -27033,7 +27064,8 @@ class Point {
|
|
|
27033
27064
|
/**
|
|
27034
27065
|
* Set a value in an object, on the property defined by key. The key
|
|
27035
27066
|
* supports nested properties using dot notation. The function modifies the
|
|
27036
|
-
* input object and does not make a copy.
|
|
27067
|
+
* input object and does not make a copy. Paths containing `__proto__` or
|
|
27068
|
+
* `constructor` are ignored.
|
|
27037
27069
|
*
|
|
27038
27070
|
* @function Highcharts.Point#setNestedProperty<T>
|
|
27039
27071
|
*
|
|
@@ -27051,11 +27083,18 @@ class Point {
|
|
|
27051
27083
|
*/
|
|
27052
27084
|
setNestedProperty(object, value, key) {
|
|
27053
27085
|
const nestedKeys = key.split('.');
|
|
27086
|
+
// Reject nested keys that would allow prototype pollution
|
|
27087
|
+
if (nestedKeys.some((nestedKey) => (nestedKey === '__proto__' || nestedKey === 'constructor'))) {
|
|
27088
|
+
return object;
|
|
27089
|
+
}
|
|
27054
27090
|
nestedKeys.reduce(function (result, key, i, arr) {
|
|
27055
27091
|
const isLastKey = arr.length - 1 === i;
|
|
27056
27092
|
result[key] = (isLastKey ?
|
|
27057
27093
|
value :
|
|
27058
|
-
|
|
27094
|
+
// Inherited objects are shared with everything else on
|
|
27095
|
+
// that prototype, so start a fresh one instead
|
|
27096
|
+
isObject(result[key], true) &&
|
|
27097
|
+
Object.hasOwnProperty.call(result, key) ?
|
|
27059
27098
|
result[key] :
|
|
27060
27099
|
{});
|
|
27061
27100
|
return result[key];
|
|
@@ -27137,15 +27176,10 @@ class Point {
|
|
|
27137
27176
|
*/
|
|
27138
27177
|
function update() {
|
|
27139
27178
|
point.applyOptions(options);
|
|
27140
|
-
// Update visuals, #4146
|
|
27141
|
-
//
|
|
27142
|
-
|
|
27143
|
-
const shouldDestroyGraphic = point.y === null ?
|
|
27144
|
-
!hasMockGraphic :
|
|
27145
|
-
hasMockGraphic;
|
|
27146
|
-
if (graphic && shouldDestroyGraphic) {
|
|
27179
|
+
// Update visuals, #4146. The a11y mock graphic is exempt, it is
|
|
27180
|
+
// maintained by the accessibility module, #12718.
|
|
27181
|
+
if (graphic && point.y === null && !point.hasMockGraphic) {
|
|
27147
27182
|
point.graphic = graphic.destroy();
|
|
27148
|
-
delete point.hasMockGraphic;
|
|
27149
27183
|
}
|
|
27150
27184
|
if (isObject(options, true)) {
|
|
27151
27185
|
// Destroy so we can get new elements
|
|
@@ -27160,7 +27194,7 @@ class Point {
|
|
|
27160
27194
|
point.dataLabel = point.dataLabel.destroy(); // #2468
|
|
27161
27195
|
}
|
|
27162
27196
|
}
|
|
27163
|
-
const pointOptions = point.optionsToObject(options);
|
|
27197
|
+
const index = point.index, pointOptions = point.optionsToObject(options);
|
|
27164
27198
|
if (!series.hasProcessedDataTable) {
|
|
27165
27199
|
// Record changes in the data table (#24451)
|
|
27166
27200
|
series.dataTable.setRow(pointOptions, index);
|
|
@@ -29164,19 +29198,18 @@ class Pointer {
|
|
|
29164
29198
|
if (hasMoved ?? true) {
|
|
29165
29199
|
this.pinch(e);
|
|
29166
29200
|
}
|
|
29201
|
+
// If inside, capture touch-drag and display tooltip. If not
|
|
29202
|
+
// inside, allow dragging the finger to scroll the page
|
|
29203
|
+
if (this.hasPointerCapture && // #25095
|
|
29204
|
+
e.type === 'touchmove' &&
|
|
29205
|
+
!(chart.scrollablePixelsX || chart.scrollablePixelsY)) {
|
|
29206
|
+
e.preventDefault();
|
|
29207
|
+
}
|
|
29167
29208
|
}
|
|
29168
29209
|
else if (start) {
|
|
29169
29210
|
// Hide the tooltip on touching outside the plot area (#1203)
|
|
29170
29211
|
this.reset();
|
|
29171
29212
|
}
|
|
29172
|
-
// If inside, capture touch-drag and display tooltip. If not inside,
|
|
29173
|
-
// allow dragging the finger to scroll the page
|
|
29174
|
-
if ((chart.tooltip?.options.followTouchMove ?? true) &&
|
|
29175
|
-
isInside &&
|
|
29176
|
-
e.type === 'touchmove' &&
|
|
29177
|
-
!(chart.scrollablePixelsX || chart.scrollablePixelsY)) {
|
|
29178
|
-
e.preventDefault();
|
|
29179
|
-
}
|
|
29180
29213
|
}
|
|
29181
29214
|
else if (e.touches.length === 2) {
|
|
29182
29215
|
this.pinch(e);
|
|
@@ -29576,13 +29609,19 @@ const { setLength: DataTableCore_setLength, splice: DataTableCore_splice } = Dat
|
|
|
29576
29609
|
class DataTableCore {
|
|
29577
29610
|
constructor(options = {}) {
|
|
29578
29611
|
this.isDataTable = true;
|
|
29579
|
-
|
|
29612
|
+
// Reject IDs that would pollute the prototype of ID-keyed maps.
|
|
29613
|
+
const id = this.isPollutingKey(options.id) ? void 0 : options.id;
|
|
29614
|
+
this.autoId = !id;
|
|
29580
29615
|
this.columns = {};
|
|
29581
|
-
this.id = (
|
|
29616
|
+
this.id = (id || uniqueKey());
|
|
29582
29617
|
this.rowCount = 0;
|
|
29583
29618
|
this.versionTag = uniqueKey();
|
|
29584
29619
|
let rowCount = 0;
|
|
29585
29620
|
objectEach(options.columns || {}, (column, columnId) => {
|
|
29621
|
+
if (columnId === '__proto__' ||
|
|
29622
|
+
columnId === 'constructor') {
|
|
29623
|
+
return;
|
|
29624
|
+
}
|
|
29586
29625
|
this.columns[columnId] = column.slice();
|
|
29587
29626
|
rowCount = Math.max(rowCount, column.length);
|
|
29588
29627
|
});
|
|
@@ -29593,6 +29632,17 @@ class DataTableCore {
|
|
|
29593
29632
|
* Functions
|
|
29594
29633
|
*
|
|
29595
29634
|
* */
|
|
29635
|
+
/**
|
|
29636
|
+
* Checks whether a key would pollute the prototype if used to index a
|
|
29637
|
+
* plain object (e.g. as a column ID or table ID).
|
|
29638
|
+
*
|
|
29639
|
+
* @private
|
|
29640
|
+
* @param {string|undefined} key The key to check.
|
|
29641
|
+
* @return {boolean} True if the key is unsafe to use.
|
|
29642
|
+
*/
|
|
29643
|
+
isPollutingKey(key) {
|
|
29644
|
+
return key === '__proto__' || key === 'constructor';
|
|
29645
|
+
}
|
|
29596
29646
|
/**
|
|
29597
29647
|
* Applies a row count to the table by setting the `rowCount` property and
|
|
29598
29648
|
* adjusting the length of all columns.
|
|
@@ -29751,6 +29801,10 @@ class DataTableCore {
|
|
|
29751
29801
|
setColumns(columns, rowIndex, eventDetail) {
|
|
29752
29802
|
let rowCount = this.rowCount;
|
|
29753
29803
|
objectEach(columns, (column, columnId) => {
|
|
29804
|
+
if (columnId === '__proto__' ||
|
|
29805
|
+
columnId === 'constructor') {
|
|
29806
|
+
return;
|
|
29807
|
+
}
|
|
29754
29808
|
this.columns[columnId] = column.slice();
|
|
29755
29809
|
rowCount = column.length;
|
|
29756
29810
|
});
|
|
@@ -29789,11 +29843,14 @@ class DataTableCore {
|
|
|
29789
29843
|
* @emits #afterSetRows
|
|
29790
29844
|
*/
|
|
29791
29845
|
setRow(row, rowIndex = this.rowCount, insert, eventDetail) {
|
|
29792
|
-
var _a;
|
|
29793
29846
|
const { columns } = this, indexRowCount = insert ? this.rowCount + 1 : rowIndex + 1, rowKeys = Object.keys(row);
|
|
29794
29847
|
if (eventDetail?.addColumns !== false) {
|
|
29795
29848
|
for (let i = 0, iEnd = rowKeys.length; i < iEnd; i++) {
|
|
29796
|
-
|
|
29849
|
+
const rowKey = rowKeys[i];
|
|
29850
|
+
if (!this.isPollutingKey(rowKey) &&
|
|
29851
|
+
!Object.hasOwnProperty.call(columns, rowKey)) {
|
|
29852
|
+
columns[rowKey] = new Array(this.rowCount);
|
|
29853
|
+
}
|
|
29797
29854
|
}
|
|
29798
29855
|
}
|
|
29799
29856
|
objectEach(columns, (column, columnId) => {
|
|
@@ -33773,7 +33830,19 @@ class Series {
|
|
|
33773
33830
|
.optionsToObject
|
|
33774
33831
|
.call({ series: this }, data[i]);
|
|
33775
33832
|
for (const key of Object.keys(ptOptions)) {
|
|
33776
|
-
|
|
33833
|
+
// Assigning these would write through to
|
|
33834
|
+
// `Object.prototype` or the `Object` constructor instead
|
|
33835
|
+
// of creating a column, and thereby affect unrelated
|
|
33836
|
+
// objects on the page
|
|
33837
|
+
if (key === '__proto__' || key === 'constructor') {
|
|
33838
|
+
continue;
|
|
33839
|
+
}
|
|
33840
|
+
// Inherited keys like `toString` are truthy without being
|
|
33841
|
+
// columns of ours, so test for an own property rather
|
|
33842
|
+
// than for a value (#25321)
|
|
33843
|
+
if (!Object.hasOwnProperty.call(columns, key)) {
|
|
33844
|
+
columns[key] = new Array(dataLength);
|
|
33845
|
+
}
|
|
33777
33846
|
columns[key][i] = ptOptions[key];
|
|
33778
33847
|
}
|
|
33779
33848
|
}
|
|
@@ -34426,7 +34495,7 @@ class Series {
|
|
|
34426
34495
|
// Apply plotBorderRadius clipping
|
|
34427
34496
|
plotClipGroup?.clip(
|
|
34428
34497
|
// Navigator y-axis is not clippable
|
|
34429
|
-
clip && this.yAxis
|
|
34498
|
+
clip && this.yAxis?.clippable ?
|
|
34430
34499
|
chart.plotClipInner :
|
|
34431
34500
|
void 0);
|
|
34432
34501
|
}
|
|
@@ -34729,28 +34798,27 @@ class Series {
|
|
|
34729
34798
|
* @emits Highcharts.Series#event:destroy
|
|
34730
34799
|
*/
|
|
34731
34800
|
destroy(keepEventsForUpdate) {
|
|
34732
|
-
const series = this, chart = series.chart, issue134 = /AppleWebKit\/533/.test(Series_win.navigator.userAgent)
|
|
34733
|
-
let destroy,
|
|
34801
|
+
const series = this, chart = series.chart, issue134 = /AppleWebKit\/533/.test(Series_win.navigator.userAgent);
|
|
34802
|
+
let destroy, axis;
|
|
34734
34803
|
// Add event hook
|
|
34735
34804
|
fireEvent(series, 'destroy', { keepEventsForUpdate });
|
|
34736
34805
|
// Remove events
|
|
34737
34806
|
this.removeEvents(keepEventsForUpdate);
|
|
34738
34807
|
// Erase from axes
|
|
34739
|
-
(series.axisTypes || [])
|
|
34740
|
-
axis = series[
|
|
34808
|
+
for (const coll of (series.axisTypes || [])) {
|
|
34809
|
+
axis = series[coll];
|
|
34741
34810
|
if (axis?.series) {
|
|
34742
34811
|
erase(axis.series, series);
|
|
34743
34812
|
axis.isDirty = axis.forceRedraw = true;
|
|
34744
34813
|
}
|
|
34745
|
-
}
|
|
34814
|
+
}
|
|
34746
34815
|
// Remove legend items
|
|
34747
34816
|
if (series.legendItem) {
|
|
34748
34817
|
series.chart.legend.destroyItem(series);
|
|
34749
34818
|
}
|
|
34750
34819
|
// Destroy all points with their elements
|
|
34751
|
-
|
|
34752
|
-
|
|
34753
|
-
data[i]?.destroy?.(true);
|
|
34820
|
+
for (const point of series.points || []) {
|
|
34821
|
+
point?.destroy?.(true);
|
|
34754
34822
|
}
|
|
34755
34823
|
for (const zone of series.zones || []) {
|
|
34756
34824
|
// Destroy SVGElement's but preserve primitive props (#20426)
|
|
@@ -38889,7 +38957,10 @@ class Chart {
|
|
|
38889
38957
|
elem = this.renderer.text(options.text, 0, 0, options.useHTML)
|
|
38890
38958
|
.attr({
|
|
38891
38959
|
align: options.align,
|
|
38892
|
-
'class':
|
|
38960
|
+
'class': [
|
|
38961
|
+
options.className,
|
|
38962
|
+
'highcharts-' + key
|
|
38963
|
+
].filter(isString).join(' '),
|
|
38893
38964
|
zIndex: options.zIndex || 4
|
|
38894
38965
|
})
|
|
38895
38966
|
.css({
|
|
@@ -39894,7 +39965,7 @@ class Chart {
|
|
|
39894
39965
|
if (label &&
|
|
39895
39966
|
(labels.reserveSpace ?? !isNumber(options.crossing))) {
|
|
39896
39967
|
expectedSpace = label.getBBox().height +
|
|
39897
|
-
labels.distance +
|
|
39968
|
+
(labels.distance ?? 15) +
|
|
39898
39969
|
Math.max(isNumber(offset) ? offset : 0, 0);
|
|
39899
39970
|
}
|
|
39900
39971
|
if (expectedSpace) {
|
|
@@ -39982,6 +40053,12 @@ class Chart {
|
|
|
39982
40053
|
addCredits(credits) {
|
|
39983
40054
|
const chart = this, creds = merge(true, this.options.credits, credits);
|
|
39984
40055
|
if (creds.enabled && !this.credits) {
|
|
40056
|
+
// Run the user-supplied URL through the allow list, so that
|
|
40057
|
+
// references like `javascript:` can't be executed from the
|
|
40058
|
+
// credits label
|
|
40059
|
+
const href = creds.href ?
|
|
40060
|
+
HTML_AST.filterUserAttributes({ href: creds.href }).href :
|
|
40061
|
+
void 0;
|
|
39985
40062
|
/**
|
|
39986
40063
|
* The chart's credits label. The label has an `update` method that
|
|
39987
40064
|
* allows setting new options as per the
|
|
@@ -39995,8 +40072,8 @@ class Chart {
|
|
|
39995
40072
|
.on('click', function (e) {
|
|
39996
40073
|
// Fire the event with browser redirect as default function
|
|
39997
40074
|
fireEvent(chart, 'creditsClick', e, () => {
|
|
39998
|
-
if (
|
|
39999
|
-
Chart_win.location.href =
|
|
40075
|
+
if (href) {
|
|
40076
|
+
Chart_win.location.href = href;
|
|
40000
40077
|
}
|
|
40001
40078
|
});
|
|
40002
40079
|
})
|
|
@@ -41613,14 +41690,11 @@ class StackItem {
|
|
|
41613
41690
|
*
|
|
41614
41691
|
* */
|
|
41615
41692
|
/** @internal */
|
|
41616
|
-
constructor(axis,
|
|
41617
|
-
const inverted = axis.chart.inverted, reversed = axis.reversed;
|
|
41693
|
+
constructor(axis, negativeValue, x, stackOption) {
|
|
41618
41694
|
this.axis = axis;
|
|
41619
41695
|
// The stack goes to the left either if the stack has negative value
|
|
41620
41696
|
// or when axis is reversed. XOR operator.
|
|
41621
|
-
|
|
41622
|
-
// Save the options to be able to style the label
|
|
41623
|
-
this.options = options = options || {};
|
|
41697
|
+
this.negativeValue = negativeValue;
|
|
41624
41698
|
// Save the x value to be able to position the label later
|
|
41625
41699
|
this.x = x;
|
|
41626
41700
|
// Initialize total value
|
|
@@ -41635,20 +41709,6 @@ class StackItem {
|
|
|
41635
41709
|
this.stack = stackOption;
|
|
41636
41710
|
this.leftCliff = 0;
|
|
41637
41711
|
this.rightCliff = 0;
|
|
41638
|
-
// The align options and text align varies on whether the stack is
|
|
41639
|
-
// negative and if the chart is inverted or not.
|
|
41640
|
-
// First test the user supplied value, then use the dynamic.
|
|
41641
|
-
this.alignOptions = {
|
|
41642
|
-
align: options.align ||
|
|
41643
|
-
(inverted ? (isNegative ? 'left' : 'right') : 'center'),
|
|
41644
|
-
verticalAlign: options.verticalAlign ||
|
|
41645
|
-
(inverted ? 'middle' : isNegative ? 'bottom' : 'top'),
|
|
41646
|
-
y: options.y,
|
|
41647
|
-
x: options.x
|
|
41648
|
-
};
|
|
41649
|
-
this.textAlign =
|
|
41650
|
-
options.textAlign ||
|
|
41651
|
-
(inverted ? (!isNegative ? 'left' : 'right') : 'center');
|
|
41652
41712
|
}
|
|
41653
41713
|
/* *
|
|
41654
41714
|
*
|
|
@@ -41664,39 +41724,34 @@ class StackItem {
|
|
|
41664
41724
|
* @internal
|
|
41665
41725
|
*/
|
|
41666
41726
|
render(group) {
|
|
41667
|
-
const
|
|
41727
|
+
const axis = this.axis, chart = axis.chart, options = axis.options.stackLabels || {}, formatOption = options.format,
|
|
41668
41728
|
// Format the text in the label.
|
|
41669
|
-
|
|
41729
|
+
text = (formatOption ?
|
|
41670
41730
|
StackItem_format(formatOption, this, chart) :
|
|
41671
|
-
options.formatter?.call(this, this)) || '';
|
|
41672
|
-
//
|
|
41673
|
-
|
|
41674
|
-
|
|
41675
|
-
|
|
41731
|
+
options.formatter?.call(this, this)) || '', verb = this.label ? 'animate' : 'attr';
|
|
41732
|
+
// Create new label
|
|
41733
|
+
this.label || (this.label = chart.renderer.label(text, 0, void 0, options.shape, void 0, void 0, options.useHTML, false, 'stack-labels'));
|
|
41734
|
+
const label = this.label, animatableAttribs = {
|
|
41735
|
+
r: options.borderRadius || 0,
|
|
41736
|
+
// Set default padding to 5 as it is in dataLabels #12308
|
|
41737
|
+
padding: (options.padding ?? 5)
|
|
41738
|
+
};
|
|
41739
|
+
if (!chart.styledMode) {
|
|
41740
|
+
animatableAttribs.fill = options.backgroundColor;
|
|
41741
|
+
animatableAttribs.stroke = options.borderColor;
|
|
41742
|
+
animatableAttribs['stroke-width'] = options.borderWidth;
|
|
41743
|
+
label.css(options.style || {});
|
|
41676
41744
|
}
|
|
41677
|
-
|
|
41678
|
-
|
|
41679
|
-
|
|
41680
|
-
|
|
41681
|
-
|
|
41682
|
-
|
|
41683
|
-
|
|
41684
|
-
padding: (options.padding ?? 5),
|
|
41685
|
-
visibility: 'hidden' // Hidden until setOffset is called
|
|
41686
|
-
};
|
|
41687
|
-
if (!chart.styledMode) {
|
|
41688
|
-
attr.fill = options.backgroundColor;
|
|
41689
|
-
attr.stroke = options.borderColor;
|
|
41690
|
-
attr['stroke-width'] = options.borderWidth;
|
|
41691
|
-
this.label.css(options.style || {});
|
|
41692
|
-
}
|
|
41693
|
-
this.label.attr(attr);
|
|
41694
|
-
if (!this.label.added) {
|
|
41695
|
-
this.label.add(group); // Add to the labels-group
|
|
41696
|
-
}
|
|
41745
|
+
label
|
|
41746
|
+
.attr({
|
|
41747
|
+
text,
|
|
41748
|
+
visibility: 'hidden' // Hidden until setOffset is called
|
|
41749
|
+
})[verb](animatableAttribs);
|
|
41750
|
+
if (!label.added) {
|
|
41751
|
+
label.add(group); // Add to the labels-group
|
|
41697
41752
|
}
|
|
41698
41753
|
// Rank it higher than data labels (#8742)
|
|
41699
|
-
|
|
41754
|
+
label.labelrank = chart.plotSizeY;
|
|
41700
41755
|
fireEvent(this, 'afterRender');
|
|
41701
41756
|
}
|
|
41702
41757
|
/**
|
|
@@ -41705,35 +41760,38 @@ class StackItem {
|
|
|
41705
41760
|
* @internal
|
|
41706
41761
|
*/
|
|
41707
41762
|
setOffset(xOffset, width, boxBottom, boxTop, defaultX, xAxis) {
|
|
41708
|
-
const {
|
|
41709
|
-
xOffset,
|
|
41710
|
-
width,
|
|
41763
|
+
const { axis, label } = this, chart = axis.chart, options = axis.options.stackLabels || {}, inverted = chart.inverted, isNegative = this.negativeValue !== !!axis.reversed, stackBox = this.getStackBox({
|
|
41711
41764
|
boxBottom,
|
|
41712
41765
|
boxTop,
|
|
41713
41766
|
defaultX,
|
|
41714
|
-
|
|
41715
|
-
|
|
41767
|
+
isNegative,
|
|
41768
|
+
width,
|
|
41769
|
+
xAxis,
|
|
41770
|
+
xOffset
|
|
41771
|
+
}), { align = (inverted ? (isNegative ? 'left' : 'right') : 'center'), verticalAlign = (inverted ? 'middle' : isNegative ? 'bottom' : 'top'), textAlign = (inverted ? (!isNegative ? 'left' : 'right') : 'center'), x = 0, y = 0 } = options, alignOptions = {
|
|
41772
|
+
align,
|
|
41773
|
+
verticalAlign,
|
|
41774
|
+
x,
|
|
41775
|
+
y
|
|
41776
|
+
};
|
|
41716
41777
|
if (label && stackBox) {
|
|
41717
41778
|
const labelBox = label.getBBox(void 0, 0), padding = label.padding;
|
|
41718
41779
|
let isJustify = (options.overflow ?? 'justify') === 'justify', visible;
|
|
41719
|
-
// Reset alignOptions property after justify #12337
|
|
41720
|
-
alignOptions.x = options.x || 0;
|
|
41721
|
-
alignOptions.y = options.y || 0;
|
|
41722
41780
|
// Calculate the adjusted Stack position, to take into consideration
|
|
41723
|
-
//
|
|
41724
|
-
//
|
|
41725
|
-
//
|
|
41726
|
-
const { x, y } = this.adjustStackPosition({
|
|
41781
|
+
// the size if the labelBox and vertical alignment as well as the
|
|
41782
|
+
// text alignment. It needs to be done to work with default
|
|
41783
|
+
// SVGLabel.align/justify methods.
|
|
41784
|
+
const { x: adjustX, y: adjustY } = this.adjustStackPosition({
|
|
41727
41785
|
labelBox,
|
|
41728
41786
|
verticalAlign,
|
|
41729
41787
|
textAlign
|
|
41730
41788
|
});
|
|
41731
|
-
stackBox.x -=
|
|
41732
|
-
stackBox.y -=
|
|
41789
|
+
stackBox.x -= adjustX;
|
|
41790
|
+
stackBox.y -= adjustY;
|
|
41733
41791
|
// Align the label to the adjusted box.
|
|
41734
41792
|
label.align(alignOptions, false, stackBox);
|
|
41735
|
-
// Check if label is inside the plotArea #12294
|
|
41736
|
-
visible = chart.isInsidePlot(label.alignAttr.x +
|
|
41793
|
+
// Check if the label is inside the plotArea #12294
|
|
41794
|
+
visible = chart.isInsidePlot(label.alignAttr.x + x + adjustX, label.alignAttr.y + y + adjustY);
|
|
41737
41795
|
if (!visible) {
|
|
41738
41796
|
isJustify = false;
|
|
41739
41797
|
}
|
|
@@ -41741,11 +41799,8 @@ class StackItem {
|
|
|
41741
41799
|
// Justify stackLabel into the alignBox
|
|
41742
41800
|
StackItem_Series.prototype.justifyDataLabel.call(axis, label, alignOptions, label.alignAttr, labelBox, stackBox);
|
|
41743
41801
|
}
|
|
41744
|
-
// Add
|
|
41745
|
-
// Also add correct rotation with its rotation origin. #15129
|
|
41802
|
+
// Add correct rotation with its rotation origin (#15129)
|
|
41746
41803
|
label.attr({
|
|
41747
|
-
x: label.alignAttr.x,
|
|
41748
|
-
y: label.alignAttr.y,
|
|
41749
41804
|
rotation: options.rotation,
|
|
41750
41805
|
rotationOriginX: labelBox.width *
|
|
41751
41806
|
getAlignFactor(options.textAlign || 'center'),
|
|
@@ -41784,22 +41839,22 @@ class StackItem {
|
|
|
41784
41839
|
* The x, y, height, width of the stack.
|
|
41785
41840
|
*/
|
|
41786
41841
|
getStackBox(stackBoxProps) {
|
|
41787
|
-
const
|
|
41842
|
+
const axis = this.axis, chart = axis.chart, { boxBottom, boxTop, defaultX, isNegative, width, xOffset } = stackBoxProps, totalStackValue = axis.stacking.usePercentage ?
|
|
41788
41843
|
100 :
|
|
41789
41844
|
(boxTop ?? this.total ?? 0), y = axis.toPixels(totalStackValue), xAxis = stackBoxProps.xAxis || chart.xAxis[0], x = (defaultX ?? xAxis.translate(this.x)) + xOffset, yZero = axis.toPixels(boxBottom ||
|
|
41790
41845
|
(isNumber(axis.min) &&
|
|
41791
41846
|
axis.logarithmic &&
|
|
41792
41847
|
axis.logarithmic.lin2log(axis.min)) ||
|
|
41793
|
-
0), height = Math.abs(y - yZero), inverted = chart.inverted
|
|
41848
|
+
0), height = Math.abs(y - yZero), inverted = chart.inverted;
|
|
41794
41849
|
return inverted ?
|
|
41795
41850
|
{
|
|
41796
|
-
x: (
|
|
41851
|
+
x: (isNegative ? y : y - height) - chart.plotLeft,
|
|
41797
41852
|
y: xAxis.height - x - width + xAxis.top - chart.plotTop,
|
|
41798
41853
|
width: height,
|
|
41799
41854
|
height: width
|
|
41800
41855
|
} : {
|
|
41801
41856
|
x: x + xAxis.transB - chart.plotLeft,
|
|
41802
|
-
y: (
|
|
41857
|
+
y: (isNegative ? y - height : y) - chart.plotTop,
|
|
41803
41858
|
width: width,
|
|
41804
41859
|
height: height
|
|
41805
41860
|
};
|
|
@@ -41835,10 +41890,6 @@ class StackItem {
|
|
|
41835
41890
|
* @name Highcharts.StackItemObject#cumulative
|
|
41836
41891
|
* @type {number}
|
|
41837
41892
|
*/ /**
|
|
41838
|
-
* True if on the negative side
|
|
41839
|
-
* @name Highcharts.StackItemObject#isNegative
|
|
41840
|
-
* @type {boolean}
|
|
41841
|
-
*/ /**
|
|
41842
41893
|
* Related SVG element
|
|
41843
41894
|
* @name Highcharts.StackItemObject#label
|
|
41844
41895
|
* @type {Highcharts.SVGElement}
|
|
@@ -42055,7 +42106,7 @@ function seriesSetStackedPoints(axis, stackingParam) {
|
|
|
42055
42106
|
stacks[key][x].total = null;
|
|
42056
42107
|
}
|
|
42057
42108
|
else {
|
|
42058
|
-
stacks[key][x] = new Stacking_StackItem(axis,
|
|
42109
|
+
stacks[key][x] = new Stacking_StackItem(axis, !!isNegative, x, stackOption);
|
|
42059
42110
|
}
|
|
42060
42111
|
}
|
|
42061
42112
|
// If the StackItem doesn't exist, create it first
|
|
@@ -42212,29 +42263,41 @@ class AxisAdditions {
|
|
|
42212
42263
|
});
|
|
42213
42264
|
});
|
|
42214
42265
|
}
|
|
42215
|
-
/**
|
|
42266
|
+
/**
|
|
42267
|
+
* Create the stack totals group and render the individual labels into it
|
|
42268
|
+
* @internal
|
|
42269
|
+
*/
|
|
42216
42270
|
renderStackTotals() {
|
|
42217
|
-
const stacking = this, axis = stacking.axis, chart = axis.chart, renderer = chart.renderer, stacks = stacking.stacks,
|
|
42218
|
-
|
|
42219
|
-
|
|
42220
|
-
|
|
42221
|
-
|
|
42222
|
-
|
|
42223
|
-
|
|
42224
|
-
|
|
42225
|
-
|
|
42226
|
-
|
|
42227
|
-
|
|
42228
|
-
|
|
42229
|
-
|
|
42230
|
-
|
|
42231
|
-
|
|
42232
|
-
|
|
42271
|
+
const stacking = this, axis = stacking.axis, chart = axis.chart, renderer = chart.renderer, stacks = stacking.stacks, { animation, enabled } = axis.options.stackLabels || {}, animationConfig = getDeferredAnimation(chart, animation || false), stackTotalGroup = stacking.stackTotalGroup = (stacking.stackTotalGroup ||
|
|
42272
|
+
(enabled ?
|
|
42273
|
+
renderer
|
|
42274
|
+
.g('stack-labels')
|
|
42275
|
+
.attr({
|
|
42276
|
+
zIndex: 6,
|
|
42277
|
+
opacity: 0
|
|
42278
|
+
})
|
|
42279
|
+
.add() :
|
|
42280
|
+
void 0));
|
|
42281
|
+
if (stackTotalGroup) {
|
|
42282
|
+
// The plotLeft/Top will change when y axis gets wider so we need to
|
|
42283
|
+
// translate the stackTotalGroup at every render call. See bug #506
|
|
42284
|
+
// and #516
|
|
42285
|
+
stackTotalGroup.translate(chart.plotLeft, chart.plotTop);
|
|
42286
|
+
// Render each stack total
|
|
42287
|
+
objectEach(stacks, (type) => {
|
|
42288
|
+
objectEach(type, (stack) => {
|
|
42289
|
+
if (enabled) {
|
|
42290
|
+
stack.render(stackTotalGroup);
|
|
42291
|
+
}
|
|
42292
|
+
else {
|
|
42293
|
+
stack.label = stack.label?.destroy();
|
|
42294
|
+
}
|
|
42295
|
+
});
|
|
42233
42296
|
});
|
|
42234
|
-
|
|
42235
|
-
|
|
42236
|
-
|
|
42237
|
-
}
|
|
42297
|
+
stackTotalGroup.animate({
|
|
42298
|
+
opacity: 1
|
|
42299
|
+
}, animationConfig);
|
|
42300
|
+
}
|
|
42238
42301
|
}
|
|
42239
42302
|
}
|
|
42240
42303
|
/* *
|
|
@@ -42556,7 +42619,6 @@ Series_SeriesRegistry.registerSeriesType('line', LineSeries);
|
|
|
42556
42619
|
* specified, it is inherited from [chart.type](#chart.type).
|
|
42557
42620
|
*
|
|
42558
42621
|
* @extends series,plotOptions.line
|
|
42559
|
-
* @excluding dataParser,dataURL
|
|
42560
42622
|
* @product highcharts highstock
|
|
42561
42623
|
* @apioption series.line
|
|
42562
42624
|
*/
|
|
@@ -42930,7 +42992,7 @@ const AreaSeriesDefaults = {
|
|
|
42930
42992
|
* specified, it is inherited from [chart.type](#chart.type).
|
|
42931
42993
|
*
|
|
42932
42994
|
* @extends series,plotOptions.area
|
|
42933
|
-
* @excluding
|
|
42995
|
+
* @excluding useOhlcData
|
|
42934
42996
|
* @product highcharts highstock
|
|
42935
42997
|
* @apioption series.area
|
|
42936
42998
|
*/
|
|
@@ -43567,7 +43629,7 @@ Series_SeriesRegistry.registerSeriesType('spline', SplineSeries);
|
|
|
43567
43629
|
* not specified, it is inherited from [chart.type](#chart.type).
|
|
43568
43630
|
*
|
|
43569
43631
|
* @extends series,plotOptions.spline
|
|
43570
|
-
* @excluding
|
|
43632
|
+
* @excluding step, boostThreshold, boostBlending
|
|
43571
43633
|
* @product highcharts highstock
|
|
43572
43634
|
* @apioption series.spline
|
|
43573
43635
|
*/
|
|
@@ -43729,7 +43791,7 @@ Series_SeriesRegistry.registerSeriesType('areaspline', AreaSplineSeries);
|
|
|
43729
43791
|
*
|
|
43730
43792
|
*
|
|
43731
43793
|
* @extends series,plotOptions.areaspline
|
|
43732
|
-
* @excluding
|
|
43794
|
+
* @excluding step, boostThreshold, boostBlending
|
|
43733
43795
|
* @product highcharts highstock
|
|
43734
43796
|
* @apioption series.areaspline
|
|
43735
43797
|
*/
|
|
@@ -44006,13 +44068,16 @@ const ColumnSeriesDefaults = {
|
|
|
44006
44068
|
* The minimal height for a column or width for a bar. By default,
|
|
44007
44069
|
* 0 values are not shown. To visualize a 0 (or close to zero) point,
|
|
44008
44070
|
* set the minimal point length to a pixel value like 3\. In stacked
|
|
44009
|
-
* column charts,
|
|
44010
|
-
* packed values.
|
|
44071
|
+
* column charts, the length is applied to each point in isolation, so
|
|
44072
|
+
* tightly packed values may overlap. See the stacked sample below for a
|
|
44073
|
+
* plugin that lays out the stack as a whole instead.
|
|
44011
44074
|
*
|
|
44012
44075
|
* @sample {highcharts} highcharts/plotoptions/column-minpointlength/
|
|
44013
44076
|
* Zero base value
|
|
44014
44077
|
* @sample {highcharts} highcharts/plotoptions/column-minpointlength-pos-and-neg/
|
|
44015
44078
|
* Positive and negative close to zero values
|
|
44079
|
+
* @sample {highcharts} highcharts/plotoptions/column-minpointlength-stacked/
|
|
44080
|
+
* Stack-aware minimum length
|
|
44016
44081
|
*
|
|
44017
44082
|
* @product highcharts highstock gantt
|
|
44018
44083
|
*/
|
|
@@ -44183,7 +44248,7 @@ const ColumnSeriesDefaults = {
|
|
|
44183
44248
|
* not specified, it is inherited from [chart.type](#chart.type).
|
|
44184
44249
|
*
|
|
44185
44250
|
* @extends series,plotOptions.column
|
|
44186
|
-
* @excluding connectNulls,
|
|
44251
|
+
* @excluding connectNulls, gapSize, gapUnit, linecap,
|
|
44187
44252
|
* lineWidth, marker, connectEnds, step
|
|
44188
44253
|
* @product highcharts highstock
|
|
44189
44254
|
* @apioption series.column
|
|
@@ -45827,7 +45892,7 @@ Series_SeriesRegistry.registerSeriesType('bar', BarSeries);
|
|
|
45827
45892
|
* it is inherited from [chart.type](#chart.type).
|
|
45828
45893
|
*
|
|
45829
45894
|
* @extends series,plotOptions.bar
|
|
45830
|
-
* @excluding connectNulls, dashStyle,
|
|
45895
|
+
* @excluding connectNulls, dashStyle, gapSize, gapUnit,
|
|
45831
45896
|
* linecap, lineWidth, marker, connectEnds, step
|
|
45832
45897
|
* @product highcharts
|
|
45833
45898
|
* @apioption series.bar
|
|
@@ -46028,7 +46093,7 @@ const ScatterSeriesDefaults = {
|
|
|
46028
46093
|
* not specified, it is inherited from [chart.type](#chart.type).
|
|
46029
46094
|
*
|
|
46030
46095
|
* @extends series,plotOptions.scatter
|
|
46031
|
-
* @excluding cropThreshold,
|
|
46096
|
+
* @excluding cropThreshold, useOhlcData
|
|
46032
46097
|
* @product highcharts highstock
|
|
46033
46098
|
* @apioption series.scatter
|
|
46034
46099
|
*/
|
|
@@ -47130,7 +47195,7 @@ const PieSeriesDefaults = {
|
|
|
47130
47195
|
* it is inherited from [chart.type](#chart.type).
|
|
47131
47196
|
*
|
|
47132
47197
|
* @extends series,plotOptions.pie
|
|
47133
|
-
* @excluding cropThreshold,
|
|
47198
|
+
* @excluding cropThreshold, linkedTo, stack, xAxis, yAxis,
|
|
47134
47199
|
* dataSorting, step, boostThreshold, boostBlending
|
|
47135
47200
|
* @product highcharts highmaps
|
|
47136
47201
|
* @apioption series.pie
|
|
@@ -48231,6 +48296,7 @@ var GeometryUtilities;
|
|
|
48231
48296
|
* */
|
|
48232
48297
|
|
|
48233
48298
|
|
|
48299
|
+
|
|
48234
48300
|
const { pointInPolygon } = Geometry_GeometryUtilities;
|
|
48235
48301
|
|
|
48236
48302
|
/* *
|
|
@@ -48371,30 +48437,34 @@ function composeOverlappingDataLabels(ChartClass) {
|
|
|
48371
48437
|
* Whether label is affected
|
|
48372
48438
|
*/
|
|
48373
48439
|
function hideOrShow(label, chart) {
|
|
48374
|
-
let
|
|
48440
|
+
let isLabelAffected = false;
|
|
48375
48441
|
if (label) {
|
|
48376
|
-
newOpacity = label.newOpacity;
|
|
48442
|
+
const newOpacity = label.newOpacity, isDataLabel = label.hasClass('highcharts-data-label');
|
|
48443
|
+
// For tick labels, we need to stop running animations otherwise they
|
|
48444
|
+
// may continue to run after we set the new opacity
|
|
48445
|
+
if (!isDataLabel) {
|
|
48446
|
+
stop(label, 'opacity');
|
|
48447
|
+
}
|
|
48377
48448
|
if (label.oldOpacity !== newOpacity) {
|
|
48378
48449
|
// Toggle data labels
|
|
48379
|
-
if (
|
|
48450
|
+
if (isDataLabel) {
|
|
48380
48451
|
// Make sure the label is completely hidden to avoid catching
|
|
48381
48452
|
// clicks (#4362)
|
|
48382
48453
|
label[newOpacity ? 'removeClass' : 'addClass']('highcharts-data-label-hidden');
|
|
48383
|
-
|
|
48454
|
+
isLabelAffected = true;
|
|
48455
|
+
// Animate or set the opacity
|
|
48456
|
+
label[label.isOld || label.placed ? 'animate' : 'attr']({ opacity: newOpacity }, void 0, () => {
|
|
48384
48457
|
if (!chart.styledMode) {
|
|
48385
48458
|
label.css({
|
|
48386
48459
|
pointerEvents: newOpacity ? 'auto' : 'none'
|
|
48387
48460
|
});
|
|
48388
48461
|
}
|
|
48389
|
-
};
|
|
48390
|
-
isLabelAffected = true;
|
|
48391
|
-
// Animate or set the opacity
|
|
48392
|
-
label[label.isOld || label.placed ? 'animate' : 'attr']({ opacity: newOpacity }, void 0, complete);
|
|
48462
|
+
});
|
|
48393
48463
|
fireEvent(chart, 'afterHideOverlappingLabel');
|
|
48394
|
-
// Toggle other labels
|
|
48464
|
+
// Toggle other labels - tick labels, stack labels
|
|
48395
48465
|
}
|
|
48396
48466
|
else {
|
|
48397
|
-
label.attr({
|
|
48467
|
+
label[label.placed ? 'animate' : 'attr']({
|
|
48398
48468
|
opacity: newOpacity
|
|
48399
48469
|
});
|
|
48400
48470
|
}
|
|
@@ -48410,25 +48480,37 @@ function hideOrShow(label, chart) {
|
|
|
48410
48480
|
* @internal
|
|
48411
48481
|
*/
|
|
48412
48482
|
function OverlappingDataLabels_onChartRender() {
|
|
48413
|
-
const chart = this
|
|
48483
|
+
const chart = this,
|
|
48484
|
+
// Helper function for data labels and stack labels when dynamicly
|
|
48485
|
+
// toggling the allowOverlap option
|
|
48486
|
+
toggle = (label, allowOverlap) => {
|
|
48487
|
+
// Allow overlap, reset opacity and show
|
|
48488
|
+
if (allowOverlap) {
|
|
48489
|
+
label.oldOpacity = label.opacity;
|
|
48490
|
+
label.newOpacity = 1;
|
|
48491
|
+
hideOrShow(label, chart);
|
|
48492
|
+
// Do not allow overlap
|
|
48493
|
+
}
|
|
48494
|
+
else {
|
|
48495
|
+
labels.push(label);
|
|
48496
|
+
}
|
|
48497
|
+
};
|
|
48414
48498
|
let labels = [];
|
|
48415
48499
|
// Consider external label collectors
|
|
48416
48500
|
for (const collector of (chart.labelCollectors || [])) {
|
|
48417
48501
|
labels = labels.concat(collector());
|
|
48418
48502
|
}
|
|
48419
|
-
|
|
48420
|
-
|
|
48421
|
-
|
|
48422
|
-
|
|
48423
|
-
|
|
48424
|
-
|
|
48425
|
-
|
|
48426
|
-
labels.push(stackItem.label);
|
|
48427
|
-
}
|
|
48428
|
-
});
|
|
48503
|
+
// Stack labels
|
|
48504
|
+
for (const { options, stacking } of (chart.yAxis || [])) {
|
|
48505
|
+
objectEach(stacking?.stacks, (stack) => {
|
|
48506
|
+
objectEach(stack, ({ label }) => {
|
|
48507
|
+
if (label) {
|
|
48508
|
+
toggle(label, options.stackLabels?.allowOverlap);
|
|
48509
|
+
}
|
|
48429
48510
|
});
|
|
48430
|
-
}
|
|
48511
|
+
});
|
|
48431
48512
|
}
|
|
48513
|
+
// Series data labels
|
|
48432
48514
|
for (const series of (chart.series || [])) {
|
|
48433
48515
|
if (series.visible && series.hasDataLabels?.()) { // #3866
|
|
48434
48516
|
const push = (points) => {
|
|
@@ -48457,21 +48539,13 @@ function OverlappingDataLabels_onChartRender() {
|
|
|
48457
48539
|
}
|
|
48458
48540
|
*/
|
|
48459
48541
|
// Allow overlap if the option is explicitly true
|
|
48460
|
-
|
|
48542
|
+
toggle(label, (
|
|
48461
48543
|
// #13449
|
|
48462
48544
|
options.allowOverlap ??
|
|
48463
48545
|
// Pie labels outside have a separate placement
|
|
48464
48546
|
// logic, skip the overlap logic
|
|
48465
48547
|
(series.is('pie') &&
|
|
48466
|
-
Number(options.distance) > 0))
|
|
48467
|
-
label.oldOpacity = label.opacity;
|
|
48468
|
-
label.newOpacity = 1;
|
|
48469
|
-
hideOrShow(label, chart);
|
|
48470
|
-
// Do not allow overlap
|
|
48471
|
-
}
|
|
48472
|
-
else {
|
|
48473
|
-
labels.push(label);
|
|
48474
|
-
}
|
|
48548
|
+
Number(options.distance) > 0)));
|
|
48475
48549
|
});
|
|
48476
48550
|
}
|
|
48477
48551
|
}
|