highcharts 11.4.3 → 11.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bower.json +1 -1
- package/es-modules/Accessibility/Accessibility.js +1 -1
- package/es-modules/Accessibility/AccessibilityComponent.js +1 -1
- package/es-modules/Accessibility/Components/NavigatorComponent.js +2 -2
- package/es-modules/Accessibility/KeyboardNavigation.js +1 -1
- package/es-modules/Accessibility/KeyboardNavigationHandler.js +5 -5
- package/es-modules/Accessibility/Options/A11yDefaults.js +1 -1
- package/es-modules/Accessibility/Options/LangDefaults.js +3 -3
- package/es-modules/Accessibility/Utils/EventProvider.js +1 -1
- package/es-modules/Accessibility/Utils/HTMLUtilities.js +1 -1
- package/es-modules/Core/Animation/Fx.js +4 -2
- package/es-modules/Core/Axis/Axis.js +6 -4
- package/es-modules/Core/Axis/AxisDefaults.js +1 -0
- package/es-modules/Core/Axis/Color/ColorAxisComposition.js +2 -1
- package/es-modules/Core/Axis/Color/ColorAxisDefaults.js +7 -3
- package/es-modules/Core/Axis/GridAxis.js +1 -1
- package/es-modules/Core/Axis/OrdinalAxis.js +5 -2
- package/es-modules/Core/Axis/RadialAxisDefaults.js +3 -3
- package/es-modules/Core/Axis/Stacking/StackItem.js +1 -1
- package/es-modules/Core/Chart/Chart.js +16 -7
- package/es-modules/Core/Chart/MapChart.js +3 -3
- package/es-modules/Core/Chart/StockChart.js +1 -1
- package/es-modules/Core/Color/Color.js +2 -2
- package/es-modules/Core/Defaults.js +27 -1
- package/es-modules/Core/Geometry/GeometryUtilities.js +22 -0
- package/es-modules/Core/Globals.js +1 -1
- package/es-modules/Core/Legend/Legend.js +82 -14
- package/es-modules/Core/MSPointer.js +42 -1
- package/es-modules/Core/Pointer.js +10 -6
- package/es-modules/Core/Renderer/HTML/AST.js +6 -0
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +2 -2
- package/es-modules/Core/Renderer/SVG/SVGElement.js +31 -98
- package/es-modules/Core/Renderer/SVG/SVGLabel.js +20 -0
- package/es-modules/Core/Renderer/SVG/SVGRenderer.js +29 -14
- package/es-modules/Core/Renderer/SVG/Symbols.js +18 -18
- package/es-modules/Core/Responsive.js +6 -1
- package/es-modules/Core/Series/DataLabel.js +1 -10
- package/es-modules/Core/Series/DataSeriesComposition.js +0 -2
- package/es-modules/Core/Series/Point.js +7 -10
- package/es-modules/Core/Series/Series.js +40 -24
- package/es-modules/Core/Series/SeriesDefaults.js +18 -12
- package/es-modules/Core/Templating.js +2 -2
- package/es-modules/Core/Tooltip.js +6 -3
- package/es-modules/Data/Connectors/JSONConnector.js +1 -0
- package/es-modules/Data/Converters/CSVConverter.js +1 -1
- package/es-modules/Data/Converters/DataConverter.js +7 -7
- package/es-modules/Data/Converters/GoogleSheetsConverter.js +8 -3
- package/es-modules/Data/DataTable.js +106 -5
- package/es-modules/Data/Formula/FormulaParser.js +2 -2
- package/es-modules/Extensions/Annotations/Controllables/ControllableDefaults.js +1 -1
- package/es-modules/Extensions/Annotations/Controllables/ControllablePath.js +1 -1
- package/es-modules/Extensions/Annotations/NavigationBindings.js +1 -2
- package/es-modules/Extensions/Boost/Boost.js +1 -1
- package/es-modules/Extensions/Boost/BoostChart.js +8 -2
- package/es-modules/Extensions/Boost/BoostSeries.js +41 -10
- package/es-modules/Extensions/Boost/WGLShader.js +1 -1
- package/es-modules/Extensions/BorderRadius.js +3 -3
- package/es-modules/Extensions/Breadcrumbs/Breadcrumbs.js +0 -38
- package/es-modules/Extensions/Data.js +11 -11
- package/es-modules/Extensions/DataGrouping/DataGrouping.js +1 -2
- package/es-modules/Extensions/DataGrouping/DataGroupingDefaults.js +1 -1
- package/es-modules/Extensions/DownloadURL.js +1 -1
- package/es-modules/Extensions/Drilldown/Drilldown.js +0 -2
- package/es-modules/Extensions/Exporting/Exporting.js +14 -14
- package/es-modules/Extensions/OverlappingDataLabels.js +36 -5
- package/es-modules/Extensions/Pane/PaneDefaults.js +3 -2
- package/es-modules/Extensions/ParallelCoordinates/ParallelCoordinates.js +1 -1
- package/es-modules/Extensions/Sonification/MIDI.js +7 -7
- package/es-modules/Extensions/Sonification/SonificationInstrument.js +0 -1
- package/es-modules/Extensions/Sonification/TimelineFromChart.js +1 -3
- package/es-modules/Extensions/TextPath.js +227 -0
- package/es-modules/Maps/MapUtilities.js +1 -20
- package/es-modules/Maps/MapView.js +3 -1
- package/es-modules/Series/ArcDiagram/ArcDiagramSeries.js +3 -0
- package/es-modules/Series/Area/AreaSeries.js +5 -0
- package/es-modules/Series/Area/AreaSeriesDefaults.js +1 -1
- package/es-modules/Series/Bar/BarSeries.js +1 -1
- package/es-modules/Series/Bellcurve/BellcurveSeriesDefaults.js +2 -2
- package/es-modules/Series/BoxPlot/BoxPlotSeries.js +2 -1
- package/es-modules/Series/Bubble/BubbleLegendComposition.js +4 -7
- package/es-modules/Series/Bubble/BubbleLegendDefaults.js +3 -3
- package/es-modules/Series/Bubble/BubbleSeries.js +4 -4
- package/es-modules/Series/Column/ColumnSeriesDefaults.js +1 -1
- package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +5 -2
- package/es-modules/Series/Dumbbell/DumbbellSeriesDefaults.js +2 -2
- package/es-modules/Series/ErrorBar/ErrorBarSeries.js +2 -2
- package/es-modules/Series/Flags/FlagsSeries.js +2 -2
- package/es-modules/Series/Flags/FlagsSeriesDefaults.js +1 -1
- package/es-modules/Series/Gantt/GanttSeriesDefaults.js +1 -1
- package/es-modules/Series/Gauge/GaugeSeries.js +1 -1
- package/es-modules/Series/HLC/HLCSeries.js +1 -1
- package/es-modules/Series/Heatmap/HeatmapSeriesDefaults.js +2 -2
- package/es-modules/Series/Item/ItemSeries.js +1 -1
- package/es-modules/Series/Map/MapSeries.js +1 -1
- package/es-modules/Series/Map/MapSeriesDefaults.js +2 -2
- package/es-modules/Series/Networkgraph/NetworkgraphSeries.js +4 -1
- package/es-modules/Series/Organization/OrganizationSeries.js +3 -0
- package/es-modules/Series/PackedBubble/PackedBubblePoint.js +1 -1
- package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +8 -5
- package/es-modules/Series/Pie/PieDataLabel.js +7 -6
- package/es-modules/Series/Pie/PiePoint.js +6 -6
- package/es-modules/Series/Pie/PieSeriesDefaults.js +11 -10
- package/es-modules/Series/Pie3D/Pie3DSeries.js +1 -1
- package/es-modules/Series/Sankey/SankeySeries.js +7 -4
- package/es-modules/Series/Sankey/SankeySeriesDefaults.js +1 -1
- package/es-modules/Series/Sunburst/SunburstSeries.js +8 -5
- package/es-modules/Series/Sunburst/SunburstSeriesDefaults.js +2 -2
- package/es-modules/Series/Tilemap/TilemapSeriesDefaults.js +2 -2
- package/es-modules/Series/Treegraph/TreegraphSeries.js +23 -2
- package/es-modules/Series/Treegraph/TreegraphSeriesDefaults.js +2 -2
- package/es-modules/Series/Treemap/TreemapPoint.js +2 -1
- package/es-modules/Series/Treemap/TreemapSeries.js +15 -7
- package/es-modules/Series/Treemap/TreemapSeriesDefaults.js +15 -1
- package/es-modules/Series/VariablePie/VariablePieSeriesDefaults.js +2 -2
- package/es-modules/Series/Variwide/VariwideComposition.js +1 -1
- package/es-modules/Series/Vector/VectorSeries.js +1 -1
- package/es-modules/Series/Windbarb/WindbarbSeries.js +2 -2
- package/es-modules/Series/Wordcloud/WordcloudSeries.js +2 -2
- package/es-modules/Series/Wordcloud/WordcloudSeriesDefaults.js +1 -1
- package/es-modules/Stock/Indicators/AD/ADIndicator.js +1 -1
- package/es-modules/Stock/Indicators/APO/APOIndicator.js +1 -1
- package/es-modules/Stock/Indicators/Aroon/AroonIndicator.js +1 -1
- package/es-modules/Stock/Indicators/CMF/CMFIndicator.js +1 -1
- package/es-modules/Stock/Indicators/Chaikin/ChaikinIndicator.js +1 -1
- package/es-modules/Stock/Indicators/IKH/IKHIndicator.js +3 -3
- package/es-modules/Stock/Indicators/LinearRegression/LinearRegressionIndicator.js +1 -1
- package/es-modules/Stock/Indicators/MFI/MFIIndicator.js +1 -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 +1 -1
- package/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +3 -3
- package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +1 -1
- package/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +2 -2
- package/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +3 -3
- package/es-modules/Stock/Indicators/TrendLine/TrendLineIndicator.js +1 -1
- package/es-modules/Stock/Indicators/VWAP/VWAPIndicator.js +1 -1
- package/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +1 -1
- package/es-modules/Stock/Navigator/Navigator.js +141 -55
- package/es-modules/Stock/Navigator/NavigatorDefaults.js +1 -1
- package/es-modules/Stock/RangeSelector/RangeSelector.js +1 -1
- package/es-modules/Stock/RangeSelector/RangeSelectorDefaults.js +1 -1
- package/es-modules/Stock/Scrollbar/ScrollbarDefaults.js +1 -1
- package/es-modules/Stock/StockTools/StockToolbar.js +115 -37
- package/es-modules/Stock/StockTools/StockToolsDefaults.js +7 -1
- package/es-modules/Stock/StockTools/StockToolsGui.js +24 -23
- package/es-modules/Stock/StockTools/StockToolsUtilities.js +26 -0
- package/es-modules/masters/highcharts-more.src.js +2 -2
- package/es-modules/masters/modules/arc-diagram.src.js +1 -2
- package/es-modules/masters/modules/cylinder.src.js +1 -1
- package/es-modules/masters/modules/funnel3d.src.js +1 -1
- package/es-modules/masters/modules/map.src.js +1 -1
- package/es-modules/masters/modules/pyramid3d.src.js +1 -1
- package/es-modules/masters/modules/solid-gauge.src.js +1 -1
- package/es-modules/masters/modules/textpath.src.d.ts +1 -0
- package/es-modules/masters/modules/textpath.src.js +16 -0
- package/es-modules/tsconfig.tsbuildinfo +1 -1
- package/highcharts-3d.js +2 -2
- package/highcharts-3d.src.js +4 -4
- package/highcharts-gantt.js +3 -3
- package/highcharts-gantt.src.js +3376 -3042
- package/highcharts-more.d.ts +42 -2
- package/highcharts-more.js +2 -2
- package/highcharts-more.src.d.ts +42 -2
- package/highcharts-more.src.js +262 -35
- package/highcharts.d.ts +840 -407
- package/highcharts.js +3 -3
- package/highcharts.src.d.ts +840 -407
- package/highcharts.src.js +6064 -5818
- package/highmaps.js +3 -3
- package/highmaps.src.js +3276 -3046
- package/highstock.js +3 -3
- package/highstock.src.js +3395 -3062
- package/indicators/acceleration-bands.js +2 -2
- package/indicators/acceleration-bands.src.js +3 -3
- package/indicators/accumulation-distribution.js +2 -2
- package/indicators/accumulation-distribution.src.js +4 -4
- package/indicators/ao.js +2 -2
- package/indicators/ao.src.js +3 -3
- package/indicators/apo.js +2 -2
- package/indicators/apo.src.js +4 -4
- package/indicators/aroon-oscillator.js +2 -2
- package/indicators/aroon-oscillator.src.js +3 -3
- package/indicators/aroon.js +2 -2
- package/indicators/aroon.src.js +4 -4
- package/indicators/atr.js +2 -2
- package/indicators/atr.src.js +3 -3
- package/indicators/bollinger-bands.js +2 -2
- package/indicators/bollinger-bands.src.js +3 -3
- package/indicators/cci.js +2 -2
- package/indicators/cci.src.js +3 -3
- package/indicators/chaikin.js +2 -2
- package/indicators/chaikin.src.js +5 -5
- package/indicators/cmf.js +2 -2
- package/indicators/cmf.src.js +4 -4
- package/indicators/cmo.js +2 -2
- package/indicators/cmo.src.js +3 -3
- package/indicators/dema.js +2 -2
- package/indicators/dema.src.js +3 -3
- package/indicators/disparity-index.js +2 -2
- package/indicators/disparity-index.src.js +3 -3
- package/indicators/dmi.js +2 -2
- package/indicators/dmi.src.js +3 -3
- package/indicators/dpo.js +2 -2
- package/indicators/dpo.src.js +3 -3
- package/indicators/ema.js +1 -1
- package/indicators/ema.src.js +2 -2
- package/indicators/ichimoku-kinko-hyo.js +2 -2
- package/indicators/ichimoku-kinko-hyo.src.js +6 -6
- package/indicators/indicators-all.js +2 -2
- package/indicators/indicators-all.src.js +28 -28
- package/indicators/indicators.js +2 -2
- package/indicators/indicators.src.js +4 -4
- package/indicators/keltner-channels.js +2 -2
- package/indicators/keltner-channels.src.js +3 -3
- package/indicators/klinger.js +2 -2
- package/indicators/klinger.src.js +3 -3
- package/indicators/macd.js +2 -2
- package/indicators/macd.src.js +3 -3
- package/indicators/mfi.js +2 -2
- package/indicators/mfi.src.js +4 -4
- package/indicators/momentum.js +2 -2
- package/indicators/momentum.src.js +3 -3
- package/indicators/natr.js +2 -2
- package/indicators/natr.src.js +3 -3
- package/indicators/obv.js +2 -2
- package/indicators/obv.src.js +3 -3
- package/indicators/pivot-points.js +2 -2
- package/indicators/pivot-points.src.js +6 -6
- package/indicators/ppo.js +2 -2
- package/indicators/ppo.src.js +4 -4
- package/indicators/price-channel.js +2 -2
- package/indicators/price-channel.src.js +4 -4
- package/indicators/price-envelopes.js +2 -2
- package/indicators/price-envelopes.src.js +3 -3
- package/indicators/psar.js +2 -2
- package/indicators/psar.src.js +4 -4
- package/indicators/regressions.js +2 -2
- package/indicators/regressions.src.js +4 -4
- package/indicators/roc.js +2 -2
- package/indicators/roc.src.js +3 -3
- package/indicators/rsi.js +2 -2
- package/indicators/rsi.src.js +3 -3
- package/indicators/slow-stochastic.js +2 -2
- package/indicators/slow-stochastic.src.js +5 -5
- package/indicators/stochastic.js +2 -2
- package/indicators/stochastic.src.js +3 -3
- package/indicators/supertrend.js +2 -2
- package/indicators/supertrend.src.js +6 -6
- package/indicators/tema.js +2 -2
- package/indicators/tema.src.js +3 -3
- package/indicators/trendline.js +2 -2
- package/indicators/trendline.src.js +4 -4
- package/indicators/trix.js +2 -2
- package/indicators/trix.src.js +3 -3
- package/indicators/volume-by-price.js +2 -2
- package/indicators/volume-by-price.src.js +3 -3
- package/indicators/vwap.js +2 -2
- package/indicators/vwap.src.js +4 -4
- package/indicators/williams-r.js +2 -2
- package/indicators/williams-r.src.js +4 -4
- package/indicators/wma.js +2 -2
- package/indicators/wma.src.js +3 -3
- package/indicators/zigzag.js +2 -2
- package/indicators/zigzag.src.js +3 -3
- package/modules/accessibility.js +2 -2
- package/modules/accessibility.src.js +162 -77
- package/modules/annotations-advanced.js +2 -2
- package/modules/annotations-advanced.src.js +8 -9
- package/modules/annotations.js +2 -2
- package/modules/annotations.src.js +8 -9
- package/modules/arc-diagram.d.ts +120 -1
- package/modules/arc-diagram.js +2 -2
- package/modules/arc-diagram.src.d.ts +120 -1
- package/modules/arc-diagram.src.js +9363 -5
- package/modules/arrow-symbols.js +2 -2
- package/modules/arrow-symbols.src.js +3 -3
- package/modules/boost-canvas.js +2 -2
- package/modules/boost-canvas.src.js +53 -16
- package/modules/boost.js +2 -2
- package/modules/boost.src.js +54 -17
- package/modules/broken-axis.js +2 -2
- package/modules/broken-axis.src.js +3 -3
- package/modules/bullet.js +2 -2
- package/modules/bullet.src.js +3 -3
- package/modules/coloraxis.js +2 -2
- package/modules/coloraxis.src.js +12 -7
- package/modules/current-date-indicator.js +2 -2
- package/modules/current-date-indicator.src.js +3 -3
- package/modules/cylinder.js +2 -2
- package/modules/cylinder.src.js +4 -4
- package/modules/data-tools.js +2 -2
- package/modules/data-tools.src.js +128 -21
- package/modules/data.js +2 -2
- package/modules/data.src.js +14 -14
- package/modules/datagrouping.js +2 -2
- package/modules/datagrouping.src.js +5 -6
- package/modules/debugger.js +2 -2
- package/modules/debugger.src.js +3 -3
- package/modules/dependency-wheel.js +2 -2
- package/modules/dependency-wheel.src.js +7 -6
- package/modules/dotplot.js +2 -2
- package/modules/dotplot.src.js +3 -3
- package/modules/drag-panes.js +2 -2
- package/modules/drag-panes.src.js +3 -3
- package/modules/draggable-points.js +2 -2
- package/modules/draggable-points.src.js +3 -3
- package/modules/drilldown.js +2 -2
- package/modules/drilldown.src.js +3 -43
- package/modules/dumbbell.js +2 -2
- package/modules/dumbbell.src.js +5 -5
- package/modules/export-data.js +2 -2
- package/modules/export-data.src.js +4 -4
- package/modules/exporting.js +2 -2
- package/modules/exporting.src.js +17 -17
- package/modules/flowmap.js +2 -2
- package/modules/flowmap.src.js +3 -3
- package/modules/full-screen.js +2 -2
- package/modules/full-screen.src.js +3 -3
- package/modules/funnel.js +2 -2
- package/modules/funnel.src.js +3 -3
- package/modules/funnel3d.js +2 -2
- package/modules/funnel3d.src.js +4 -4
- package/modules/gantt.js +2 -2
- package/modules/gantt.src.js +155 -67
- package/modules/geoheatmap.js +2 -2
- package/modules/geoheatmap.src.js +3 -3
- package/modules/grid-axis.js +2 -2
- package/modules/grid-axis.src.js +4 -4
- package/modules/heatmap.js +2 -2
- package/modules/heatmap.src.js +14 -9
- package/modules/heikinashi.js +2 -2
- package/modules/heikinashi.src.js +3 -3
- package/modules/histogram-bellcurve.js +2 -2
- package/modules/histogram-bellcurve.src.js +5 -5
- package/modules/hollowcandlestick.js +2 -2
- package/modules/hollowcandlestick.src.js +3 -3
- package/modules/item-series.js +2 -2
- package/modules/item-series.src.js +4 -4
- package/modules/lollipop.js +2 -2
- package/modules/lollipop.src.js +3 -3
- package/modules/map.d.ts +1 -1
- package/modules/map.js +2 -2
- package/modules/map.src.d.ts +1 -1
- package/modules/map.src.js +36 -52
- package/modules/marker-clusters.js +2 -2
- package/modules/marker-clusters.src.js +3 -3
- package/modules/mouse-wheel-zoom.js +2 -2
- package/modules/mouse-wheel-zoom.src.js +3 -3
- package/modules/navigator.js +2 -2
- package/modules/navigator.src.js +146 -61
- package/modules/networkgraph.d.ts +40 -0
- package/modules/networkgraph.js +2 -2
- package/modules/networkgraph.src.d.ts +40 -0
- package/modules/networkgraph.src.js +233 -5
- package/modules/no-data-to-display.js +2 -2
- package/modules/no-data-to-display.src.js +3 -3
- package/modules/offline-exporting.js +2 -2
- package/modules/offline-exporting.src.js +5 -5
- package/modules/organization.js +2 -2
- package/modules/organization.src.js +5 -4
- package/modules/overlapping-datalabels.js +2 -2
- package/modules/overlapping-datalabels.src.js +3 -3
- package/modules/parallel-coordinates.js +2 -2
- package/modules/parallel-coordinates.src.js +4 -4
- package/modules/pareto.js +2 -2
- package/modules/pareto.src.js +3 -3
- package/modules/pathfinder.js +2 -2
- package/modules/pathfinder.src.js +3 -3
- package/modules/pattern-fill.js +2 -2
- package/modules/pattern-fill.src.js +3 -3
- package/modules/pictorial.js +2 -2
- package/modules/pictorial.src.js +3 -3
- package/modules/price-indicator.js +2 -2
- package/modules/price-indicator.src.js +3 -3
- package/modules/pyramid3d.js +2 -2
- package/modules/pyramid3d.src.js +4 -4
- package/modules/sankey.d.ts +42 -1
- package/modules/sankey.js +2 -2
- package/modules/sankey.src.d.ts +42 -1
- package/modules/sankey.src.js +237 -9
- package/modules/series-label.js +2 -2
- package/modules/series-label.src.js +3 -3
- package/modules/series-on-point.js +2 -2
- package/modules/series-on-point.src.js +3 -3
- package/modules/solid-gauge.js +2 -2
- package/modules/solid-gauge.src.js +4 -4
- package/modules/sonification.js +2 -2
- package/modules/sonification.src.js +12 -15
- package/modules/static-scale.js +2 -2
- package/modules/static-scale.src.js +3 -3
- package/modules/stock-tools.d.ts +15 -1
- package/modules/stock-tools.js +2 -2
- package/modules/stock-tools.src.d.ts +15 -1
- package/modules/stock-tools.src.js +177 -69
- package/modules/stock.js +2 -2
- package/modules/stock.src.js +160 -73
- package/modules/streamgraph.js +2 -2
- package/modules/streamgraph.src.js +3 -3
- package/modules/sunburst.d.ts +40 -0
- package/modules/sunburst.js +2 -2
- package/modules/sunburst.src.d.ts +40 -0
- package/modules/sunburst.src.js +271 -58
- package/modules/textpath.d.ts +58 -0
- package/modules/textpath.js +7 -0
- package/modules/textpath.src.d.ts +58 -0
- package/modules/textpath.src.js +271 -0
- package/modules/tiledwebmap.js +3 -3
- package/modules/tiledwebmap.src.js +3 -3
- package/modules/tilemap.js +2 -2
- package/modules/tilemap.src.js +5 -5
- package/modules/timeline.js +2 -2
- package/modules/timeline.src.js +3 -3
- package/modules/treegraph.d.ts +40 -0
- package/modules/treegraph.js +2 -2
- package/modules/treegraph.src.d.ts +40 -0
- package/modules/treegraph.src.js +254 -8
- package/modules/treegrid.js +2 -2
- package/modules/treegrid.src.js +4 -4
- package/modules/treemap.js +2 -2
- package/modules/treemap.src.js +35 -50
- package/modules/variable-pie.js +2 -2
- package/modules/variable-pie.src.js +5 -5
- package/modules/variwide.js +2 -2
- package/modules/variwide.src.js +4 -4
- package/modules/vector.js +2 -2
- package/modules/vector.src.js +4 -4
- package/modules/venn.js +2 -2
- package/modules/venn.src.js +3 -88
- package/modules/windbarb.js +2 -2
- package/modules/windbarb.src.js +5 -5
- package/modules/wordcloud.js +2 -2
- package/modules/wordcloud.src.js +6 -6
- package/modules/xrange.js +2 -2
- package/modules/xrange.src.js +3 -3
- package/options/ad.d.ts +17 -9
- package/options/ad.src.d.ts +17 -9
- package/options/apo.d.ts +17 -9
- package/options/apo.src.d.ts +17 -9
- package/options/arearange.d.ts +17 -9
- package/options/arearange.src.d.ts +17 -9
- package/options/areaspline.d.ts +17 -9
- package/options/areaspline.src.d.ts +17 -9
- package/options/bar.d.ts +17 -9
- package/options/bar.src.d.ts +17 -9
- package/options/bb.d.ts +17 -9
- package/options/bb.src.d.ts +17 -9
- package/options/bubble.d.ts +17 -9
- package/options/bubble.src.d.ts +17 -9
- package/options/candlestick.d.ts +17 -9
- package/options/candlestick.src.d.ts +17 -9
- package/options/cci.d.ts +17 -9
- package/options/cci.src.d.ts +17 -9
- package/options/cmf.d.ts +17 -9
- package/options/cmf.src.d.ts +17 -9
- package/options/column.d.ts +17 -9
- package/options/column.src.d.ts +17 -9
- package/options/columnpyramid.d.ts +17 -9
- package/options/columnpyramid.src.d.ts +17 -9
- package/options/columnrange.d.ts +17 -9
- package/options/columnrange.src.d.ts +17 -9
- package/options/cylinder.d.ts +17 -9
- package/options/cylinder.src.d.ts +17 -9
- package/options/dema.d.ts +17 -9
- package/options/dema.src.d.ts +17 -9
- package/options/dependencywheel.d.ts +17 -9
- package/options/dependencywheel.src.d.ts +17 -9
- package/options/disparityindex.d.ts +17 -9
- package/options/disparityindex.src.d.ts +17 -9
- package/options/dpo.d.ts +17 -9
- package/options/dpo.src.d.ts +17 -9
- package/options/dumbbell.d.ts +17 -9
- package/options/dumbbell.src.d.ts +17 -9
- package/options/ema.d.ts +17 -9
- package/options/ema.src.d.ts +17 -9
- package/options/funnel.d.ts +17 -9
- package/options/funnel.src.d.ts +17 -9
- package/options/gantt.d.ts +16 -8
- package/options/gantt.src.d.ts +16 -8
- package/options/klinger.d.ts +17 -9
- package/options/klinger.src.d.ts +17 -9
- package/options/linearregression.d.ts +17 -9
- package/options/linearregression.src.d.ts +17 -9
- package/options/lollipop.d.ts +17 -9
- package/options/lollipop.src.d.ts +17 -9
- package/options/macd.d.ts +17 -9
- package/options/macd.src.d.ts +17 -9
- package/options/momentum.d.ts +17 -9
- package/options/momentum.src.d.ts +17 -9
- package/options/ohlc.d.ts +17 -9
- package/options/ohlc.src.d.ts +17 -9
- package/options/organization.d.ts +17 -9
- package/options/organization.src.d.ts +17 -9
- package/options/pareto.d.ts +16 -8
- package/options/pareto.src.d.ts +16 -8
- package/options/pc.d.ts +17 -9
- package/options/pc.src.d.ts +17 -9
- package/options/polygon.d.ts +17 -9
- package/options/polygon.src.d.ts +17 -9
- package/options/ppo.d.ts +17 -9
- package/options/ppo.src.d.ts +17 -9
- package/options/psar.d.ts +17 -9
- package/options/psar.src.d.ts +17 -9
- package/options/pyramid.d.ts +17 -9
- package/options/pyramid.src.d.ts +17 -9
- package/options/roc.d.ts +17 -9
- package/options/roc.src.d.ts +17 -9
- package/options/sankey.d.ts +17 -9
- package/options/sankey.src.d.ts +17 -9
- package/options/scatter.d.ts +17 -9
- package/options/scatter.src.d.ts +17 -9
- package/options/series.d.ts +17 -9
- package/options/series.src.d.ts +17 -9
- package/options/sma.d.ts +17 -9
- package/options/sma.src.d.ts +17 -9
- package/options/spline.d.ts +17 -9
- package/options/spline.src.d.ts +17 -9
- package/options/stochastic.d.ts +17 -9
- package/options/stochastic.src.d.ts +17 -9
- package/options/supertrend.d.ts +17 -9
- package/options/supertrend.src.d.ts +17 -9
- package/options/tilemap.d.ts +17 -9
- package/options/tilemap.src.d.ts +17 -9
- package/options/treegraph.d.ts +24 -9
- package/options/treegraph.src.d.ts +24 -9
- package/options/treemap.d.ts +23 -8
- package/options/treemap.src.d.ts +23 -8
- package/options/trendline.d.ts +17 -9
- package/options/trendline.src.d.ts +17 -9
- package/options/variwide.d.ts +17 -9
- package/options/variwide.src.d.ts +17 -9
- package/options/vbp.d.ts +17 -9
- package/options/vbp.src.d.ts +17 -9
- package/options/vector.d.ts +17 -9
- package/options/vector.src.d.ts +17 -9
- package/options/waterfall.d.ts +17 -9
- package/options/waterfall.src.d.ts +17 -9
- package/options/williamsr.d.ts +17 -9
- package/options/williamsr.src.d.ts +17 -9
- package/options/xrange.d.ts +17 -9
- package/options/xrange.src.d.ts +17 -9
- package/package.json +1 -1
- package/standalone-navigator.js +2 -2
- package/standalone-navigator.src.js +3380 -3049
- package/themes/avocado.js +2 -2
- package/themes/avocado.src.js +3 -3
- package/themes/brand-dark.js +2 -2
- package/themes/brand-dark.src.js +3 -3
- package/themes/brand-light.js +2 -2
- package/themes/brand-light.src.js +3 -3
- package/themes/dark-blue.js +2 -2
- package/themes/dark-blue.src.js +3 -3
- package/themes/dark-green.js +2 -2
- package/themes/dark-green.src.js +3 -3
- package/themes/dark-unica.js +2 -2
- package/themes/dark-unica.src.js +3 -3
- package/themes/gray.js +2 -2
- package/themes/gray.src.js +3 -3
- package/themes/grid-light.js +2 -2
- package/themes/grid-light.src.js +3 -3
- package/themes/grid.js +2 -2
- package/themes/grid.src.js +3 -3
- package/themes/high-contrast-dark.js +2 -2
- package/themes/high-contrast-dark.src.js +3 -3
- package/themes/high-contrast-light.js +2 -2
- package/themes/high-contrast-light.src.js +3 -3
- package/themes/sand-signika.js +2 -2
- package/themes/sand-signika.src.js +3 -3
- package/themes/skies.js +2 -2
- package/themes/skies.src.js +3 -3
- package/themes/sunset.js +2 -2
- package/themes/sunset.src.js +3 -3
|
@@ -10,13 +10,16 @@
|
|
|
10
10
|
'use strict';
|
|
11
11
|
import A from '../Animation/AnimationUtilities.js';
|
|
12
12
|
const { animObject, setAnimation } = A;
|
|
13
|
-
import F from '../
|
|
14
|
-
const {
|
|
13
|
+
import F from '../Foundation.js';
|
|
14
|
+
const { registerEventOptions } = F;
|
|
15
15
|
import H from '../Globals.js';
|
|
16
16
|
const { composed, marginNames } = H;
|
|
17
|
+
import Series from '../Series/Series.js';
|
|
17
18
|
import Point from '../Series/Point.js';
|
|
18
19
|
import R from '../Renderer/RendererUtilities.js';
|
|
19
20
|
const { distribute } = R;
|
|
21
|
+
import T from '../Templating.js';
|
|
22
|
+
const { format } = T;
|
|
20
23
|
import U from '../Utilities.js';
|
|
21
24
|
const { addEvent, createElement, css, defined, discardElement, find, fireEvent, isNumber, merge, pick, pushUnique, relativeLength, stableSort, syncTimeout } = U;
|
|
22
25
|
/* *
|
|
@@ -95,6 +98,7 @@ class Legend {
|
|
|
95
98
|
if (options.enabled) {
|
|
96
99
|
// Render it
|
|
97
100
|
this.render();
|
|
101
|
+
registerEventOptions(this, options);
|
|
98
102
|
// Move checkboxes
|
|
99
103
|
addEvent(this.chart, 'endResize', function () {
|
|
100
104
|
this.legend.positionCheckboxes();
|
|
@@ -160,6 +164,10 @@ class Legend {
|
|
|
160
164
|
update(options, redraw) {
|
|
161
165
|
const chart = this.chart;
|
|
162
166
|
this.setOptions(merge(true, this.options, options));
|
|
167
|
+
if ('events' in this.options) {
|
|
168
|
+
// Legend event handlers
|
|
169
|
+
registerEventOptions(this, this.options);
|
|
170
|
+
}
|
|
163
171
|
this.destroy();
|
|
164
172
|
chart.isDirtyLegend = chart.isDirtyBox = true;
|
|
165
173
|
if (pick(redraw, true)) {
|
|
@@ -1045,11 +1053,10 @@ class Legend {
|
|
|
1045
1053
|
* @param {Highcharts.BubbleLegendItem|Point|Highcharts.Series} item
|
|
1046
1054
|
* @param {Highcharts.SVGElement} legendLabel
|
|
1047
1055
|
* @param {boolean} [useHTML=false]
|
|
1048
|
-
* @emits Highcharts.
|
|
1049
|
-
* @emits Highcharts.Series#event:legendItemClick
|
|
1056
|
+
* @emits Highcharts.Legend#event:itemClick
|
|
1050
1057
|
*/
|
|
1051
1058
|
setItemEvents(item, legendLabel, useHTML) {
|
|
1052
|
-
const legend = this, legendItem = item.legendItem || {}, boxWrapper = legend.chart.renderer.boxWrapper, isPoint = item instanceof Point, activeClass = 'highcharts-legend-' +
|
|
1059
|
+
const legend = this, legendItem = item.legendItem || {}, boxWrapper = legend.chart.renderer.boxWrapper, isPoint = item instanceof Point, isSeries = item instanceof Series, activeClass = 'highcharts-legend-' +
|
|
1053
1060
|
(isPoint ? 'point' : 'series') + '-active', styledMode = legend.chart.styledMode,
|
|
1054
1061
|
// When `useHTML`, the symbol is rendered in other group, so
|
|
1055
1062
|
// we need to apply events listeners to both places
|
|
@@ -1100,7 +1107,7 @@ class Legend {
|
|
|
1100
1107
|
item.setState();
|
|
1101
1108
|
})
|
|
1102
1109
|
.on('click', function (event) {
|
|
1103
|
-
const
|
|
1110
|
+
const defaultItemClick = function () {
|
|
1104
1111
|
if (item.setVisible) {
|
|
1105
1112
|
item.setVisible();
|
|
1106
1113
|
}
|
|
@@ -1111,16 +1118,22 @@ class Legend {
|
|
|
1111
1118
|
// series. Event handling in iOS causes the activeClass
|
|
1112
1119
|
// to be added prior to click in some cases (#7418).
|
|
1113
1120
|
boxWrapper.removeClass(activeClass);
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
browserEvent: event
|
|
1117
|
-
|
|
1121
|
+
fireEvent(legend, 'itemClick', {
|
|
1122
|
+
// Pass over the click/touch event. #4.
|
|
1123
|
+
browserEvent: event,
|
|
1124
|
+
legendItem: item
|
|
1125
|
+
}, defaultItemClick);
|
|
1126
|
+
// Deprecated logic
|
|
1118
1127
|
// Click the name or symbol
|
|
1119
|
-
if (
|
|
1120
|
-
item.firePointEvent(
|
|
1128
|
+
if (isPoint) {
|
|
1129
|
+
item.firePointEvent('legendItemClick', {
|
|
1130
|
+
browserEvent: event
|
|
1131
|
+
});
|
|
1121
1132
|
}
|
|
1122
|
-
else {
|
|
1123
|
-
fireEvent(item,
|
|
1133
|
+
else if (isSeries) {
|
|
1134
|
+
fireEvent(item, 'legendItemClick', {
|
|
1135
|
+
browserEvent: event
|
|
1136
|
+
});
|
|
1124
1137
|
}
|
|
1125
1138
|
});
|
|
1126
1139
|
}
|
|
@@ -1211,11 +1224,54 @@ export default Legend;
|
|
|
1211
1224
|
* @name Highcharts.LegendItemObject#symbol
|
|
1212
1225
|
* @type {Highcharts.SVGElement|undefined}
|
|
1213
1226
|
*/
|
|
1227
|
+
/**
|
|
1228
|
+
* Gets fired when the legend item is clicked. The default
|
|
1229
|
+
* action is to toggle the visibility of the series or point. This can be
|
|
1230
|
+
* prevented by returning `false` or calling `event.preventDefault()`.
|
|
1231
|
+
*
|
|
1232
|
+
* @callback Highcharts.LegendItemClickCallbackFunction
|
|
1233
|
+
*
|
|
1234
|
+
* @param {Highcharts.Legend} this
|
|
1235
|
+
* The legend on which the event occurred.
|
|
1236
|
+
*
|
|
1237
|
+
* @param {Highcharts.LegendItemClickEventObject} event
|
|
1238
|
+
* The event that occurred.
|
|
1239
|
+
*/
|
|
1240
|
+
/**
|
|
1241
|
+
* Information about the legend click event.
|
|
1242
|
+
*
|
|
1243
|
+
* @interface Highcharts.LegendItemClickEventObject
|
|
1244
|
+
*/ /**
|
|
1245
|
+
* Related browser event.
|
|
1246
|
+
* @name Highcharts.LegendItemClickEventObject#browserEvent
|
|
1247
|
+
* @type {Highcharts.PointerEvent}
|
|
1248
|
+
*/ /**
|
|
1249
|
+
* Prevent the default action of toggle the visibility of the series or point.
|
|
1250
|
+
* @name Highcharts.LegendItemClickEventObject#preventDefault
|
|
1251
|
+
* @type {Function}
|
|
1252
|
+
* */ /**
|
|
1253
|
+
* Related legend item, it can be series, point, color axis or data class from
|
|
1254
|
+
* color axis.
|
|
1255
|
+
* @name Highcharts.LegendItemClickEventObject#legendItem
|
|
1256
|
+
* @type {Highcharts.Series|Highcharts.Point|Highcharts.LegendItemObject}
|
|
1257
|
+
* */ /**
|
|
1258
|
+
* Related legend.
|
|
1259
|
+
* @name Highcharts.LegendItemClickEventObject#target
|
|
1260
|
+
* @type {Highcharts.Legend}
|
|
1261
|
+
*/ /**
|
|
1262
|
+
* Event type.
|
|
1263
|
+
* @name Highcharts.LegendItemClickEventObject#type
|
|
1264
|
+
* @type {"itemClick"}
|
|
1265
|
+
*/
|
|
1214
1266
|
/**
|
|
1215
1267
|
* Gets fired when the legend item belonging to a point is clicked. The default
|
|
1216
1268
|
* action is to toggle the visibility of the point. This can be prevented by
|
|
1217
1269
|
* returning `false` or calling `event.preventDefault()`.
|
|
1218
1270
|
*
|
|
1271
|
+
* **Note:** This option is deprecated in favor of
|
|
1272
|
+
* Highcharts.LegendItemClickCallbackFunction.
|
|
1273
|
+
*
|
|
1274
|
+
* @deprecated 11.4.4
|
|
1219
1275
|
* @callback Highcharts.PointLegendItemClickCallbackFunction
|
|
1220
1276
|
*
|
|
1221
1277
|
* @param {Highcharts.Point} this
|
|
@@ -1227,6 +1283,10 @@ export default Legend;
|
|
|
1227
1283
|
/**
|
|
1228
1284
|
* Information about the legend click event.
|
|
1229
1285
|
*
|
|
1286
|
+
* **Note:** This option is deprecated in favor of
|
|
1287
|
+
* Highcharts.LegendItemClickEventObject.
|
|
1288
|
+
*
|
|
1289
|
+
* @deprecated 11.4.4
|
|
1230
1290
|
* @interface Highcharts.PointLegendItemClickEventObject
|
|
1231
1291
|
*/ /**
|
|
1232
1292
|
* Related browser event.
|
|
@@ -1260,6 +1320,10 @@ export default Legend;
|
|
|
1260
1320
|
* action is to toggle the visibility of the series. This can be prevented by
|
|
1261
1321
|
* returning `false` or calling `event.preventDefault()`.
|
|
1262
1322
|
*
|
|
1323
|
+
* **Note:** This option is deprecated in favor of
|
|
1324
|
+
* Highcharts.LegendItemClickCallbackFunction.
|
|
1325
|
+
*
|
|
1326
|
+
* @deprecated 11.4.4
|
|
1263
1327
|
* @callback Highcharts.SeriesLegendItemClickCallbackFunction
|
|
1264
1328
|
*
|
|
1265
1329
|
* @param {Highcharts.Series} this
|
|
@@ -1271,6 +1335,10 @@ export default Legend;
|
|
|
1271
1335
|
/**
|
|
1272
1336
|
* Information about the legend click event.
|
|
1273
1337
|
*
|
|
1338
|
+
* **Note:** This option is deprecated in favor of
|
|
1339
|
+
* Highcharts.LegendItemClickEventObject.
|
|
1340
|
+
*
|
|
1341
|
+
* @deprecated 11.4.4
|
|
1274
1342
|
* @interface Highcharts.SeriesLegendItemClickEventObject
|
|
1275
1343
|
*/ /**
|
|
1276
1344
|
* Related browser event.
|
|
@@ -12,7 +12,7 @@ import H from './Globals.js';
|
|
|
12
12
|
const { charts, composed, doc, noop, win } = H;
|
|
13
13
|
import Pointer from './Pointer.js';
|
|
14
14
|
import U from './Utilities.js';
|
|
15
|
-
const { addEvent, css, objectEach, pick, pushUnique, removeEvent } = U;
|
|
15
|
+
const { addEvent, attr, css, defined, objectEach, pick, pushUnique, removeEvent } = U;
|
|
16
16
|
/* *
|
|
17
17
|
*
|
|
18
18
|
* Constants
|
|
@@ -102,6 +102,47 @@ class MSPointer extends Pointer {
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Utility to detect whether an element has, or has a parent with, a
|
|
107
|
+
* specific class name. Used on detection of tracker objects and on deciding
|
|
108
|
+
* whether hovering the tooltip should cause the active series to mouse out.
|
|
109
|
+
*
|
|
110
|
+
* @function Highcharts.Pointer#inClass
|
|
111
|
+
*
|
|
112
|
+
* @param {Highcharts.SVGDOMElement|Highcharts.HTMLDOMElement} element
|
|
113
|
+
* The element to investigate.
|
|
114
|
+
*
|
|
115
|
+
* @param {string} className
|
|
116
|
+
* The class name to look for.
|
|
117
|
+
*
|
|
118
|
+
* @return {boolean|undefined}
|
|
119
|
+
* True if either the element or one of its parents has the given class
|
|
120
|
+
* name.
|
|
121
|
+
*/
|
|
122
|
+
inClass(element, className) {
|
|
123
|
+
let elem = element, elemClassName;
|
|
124
|
+
while (elem) {
|
|
125
|
+
elemClassName = attr(elem, 'class');
|
|
126
|
+
if (elemClassName) {
|
|
127
|
+
if (elemClassName.indexOf(className) !== -1) {
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
if (elemClassName.indexOf('highcharts-container') !== -1) {
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// #21098 IE11 compatibility
|
|
135
|
+
elem = elem.parentNode;
|
|
136
|
+
if (elem && (
|
|
137
|
+
// HTMLElement
|
|
138
|
+
elem === document.documentElement ||
|
|
139
|
+
// Document
|
|
140
|
+
defined(elem.nodeType) &&
|
|
141
|
+
elem.nodeType === document.nodeType)) {
|
|
142
|
+
elem = null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
105
146
|
/**
|
|
106
147
|
* @private
|
|
107
148
|
* @function Highcharts.Pointer#onContainerPointerDown
|
|
@@ -276,7 +276,7 @@ class Pointer {
|
|
|
276
276
|
((a.coll === 'xAxis' && this.zoomX) ||
|
|
277
277
|
(a.coll === 'yAxis' && this.zoomY))),
|
|
278
278
|
selection: {
|
|
279
|
-
originalEvent: e,
|
|
279
|
+
originalEvent: e, // #4890
|
|
280
280
|
xAxis: [],
|
|
281
281
|
yAxis: [],
|
|
282
282
|
...from
|
|
@@ -741,7 +741,6 @@ class Pointer {
|
|
|
741
741
|
this.onContainerMouseMove(e);
|
|
742
742
|
// #4886, MS Touch end fires mouseleave but with no related target
|
|
743
743
|
if (pointer &&
|
|
744
|
-
e.relatedTarget &&
|
|
745
744
|
!this.inClass(e.relatedTarget, 'highcharts-tooltip')) {
|
|
746
745
|
pointer.reset();
|
|
747
746
|
// Also reset the chart position, used in #149 fix
|
|
@@ -836,8 +835,8 @@ class Pointer {
|
|
|
836
835
|
visiblePlotOnly: true
|
|
837
836
|
}) &&
|
|
838
837
|
!(tooltip &&
|
|
839
|
-
tooltip.shouldStickOnContact(pEvt)) &&
|
|
840
|
-
!this.inClass(pEvt.target, 'highcharts-tracker')) {
|
|
838
|
+
tooltip.shouldStickOnContact(pEvt)) && (pEvt.target === chart.container.ownerDocument ||
|
|
839
|
+
!this.inClass(pEvt.target, 'highcharts-tracker'))) {
|
|
841
840
|
this.reset();
|
|
842
841
|
}
|
|
843
842
|
}
|
|
@@ -885,6 +884,7 @@ class Pointer {
|
|
|
885
884
|
if (e.type === 'touchstart') {
|
|
886
885
|
pointer.pinchDown = touches;
|
|
887
886
|
pointer.res = true; // Reset on next move
|
|
887
|
+
chart.mouseDownX = e.chartX;
|
|
888
888
|
// Optionally move the tooltip on touchmove
|
|
889
889
|
}
|
|
890
890
|
else if (followTouchMove) {
|
|
@@ -1359,7 +1359,11 @@ class Pointer {
|
|
|
1359
1359
|
const hoverChart = H.charts[pick(Pointer.hoverChartIndex, -1)];
|
|
1360
1360
|
if (hoverChart &&
|
|
1361
1361
|
hoverChart !== chart) {
|
|
1362
|
-
|
|
1362
|
+
const relatedTargetObj = { relatedTarget: chart.container };
|
|
1363
|
+
if (e && !e?.relatedTarget) {
|
|
1364
|
+
e = { ...relatedTargetObj, ...e };
|
|
1365
|
+
}
|
|
1366
|
+
hoverChart.pointer?.onContainerMouseLeave(e || relatedTargetObj);
|
|
1363
1367
|
}
|
|
1364
1368
|
if (!hoverChart ||
|
|
1365
1369
|
!hoverChart.mouseIsDown) {
|
|
@@ -1375,8 +1379,8 @@ class Pointer {
|
|
|
1375
1379
|
const { chart, pinchDown = [] } = this;
|
|
1376
1380
|
let hasMoved, isInside;
|
|
1377
1381
|
this.setHoverChartIndex();
|
|
1382
|
+
e = this.normalize(e);
|
|
1378
1383
|
if (e.touches.length === 1) {
|
|
1379
|
-
e = this.normalize(e);
|
|
1380
1384
|
isInside = chart.isInsidePlot(e.chartX - chart.plotLeft, e.chartY - chart.plotTop, {
|
|
1381
1385
|
visiblePlotOnly: true
|
|
1382
1386
|
});
|
|
@@ -347,16 +347,19 @@ AST.allowedAttributes = [
|
|
|
347
347
|
'href',
|
|
348
348
|
'id',
|
|
349
349
|
'in',
|
|
350
|
+
'in2',
|
|
350
351
|
'markerHeight',
|
|
351
352
|
'markerWidth',
|
|
352
353
|
'offset',
|
|
353
354
|
'opacity',
|
|
355
|
+
'operator',
|
|
354
356
|
'orient',
|
|
355
357
|
'padding',
|
|
356
358
|
'paddingLeft',
|
|
357
359
|
'paddingRight',
|
|
358
360
|
'patternUnits',
|
|
359
361
|
'r',
|
|
362
|
+
'radius',
|
|
360
363
|
'refX',
|
|
361
364
|
'refY',
|
|
362
365
|
'role',
|
|
@@ -447,12 +450,15 @@ AST.allowedTags = [
|
|
|
447
450
|
'dt',
|
|
448
451
|
'em',
|
|
449
452
|
'feComponentTransfer',
|
|
453
|
+
'feComposite',
|
|
450
454
|
'feDropShadow',
|
|
455
|
+
'feFlood',
|
|
451
456
|
'feFuncA',
|
|
452
457
|
'feFuncB',
|
|
453
458
|
'feFuncG',
|
|
454
459
|
'feFuncR',
|
|
455
460
|
'feGaussianBlur',
|
|
461
|
+
'feMorphology',
|
|
456
462
|
'feOffset',
|
|
457
463
|
'feMerge',
|
|
458
464
|
'feMergeNode',
|
|
@@ -49,7 +49,7 @@ const decorateSVGGroup = (g, container) => {
|
|
|
49
49
|
...g.styles,
|
|
50
50
|
// Add g attributes that correspond to CSS
|
|
51
51
|
display: g.display,
|
|
52
|
-
opacity: g.opacity,
|
|
52
|
+
opacity: g.opacity, // #5075
|
|
53
53
|
visibility: g.visibility
|
|
54
54
|
},
|
|
55
55
|
// The top group is appended to container
|
|
@@ -260,7 +260,7 @@ class HTMLElement extends SVGElement {
|
|
|
260
260
|
css(element, {
|
|
261
261
|
width: (textPxLength > textWidthNum) || rotation ?
|
|
262
262
|
textWidth + 'px' :
|
|
263
|
-
'auto',
|
|
263
|
+
'auto', // #16261
|
|
264
264
|
display: 'block',
|
|
265
265
|
whiteSpace: whiteSpace || 'normal' // #3331
|
|
266
266
|
});
|
|
@@ -71,7 +71,7 @@ class SVGElement {
|
|
|
71
71
|
_defaultGetter(key) {
|
|
72
72
|
let ret = pick(this[key + 'Value'], // Align getter
|
|
73
73
|
this[key], this.element ? this.element.getAttribute(key) : null, 0);
|
|
74
|
-
if (
|
|
74
|
+
if (/^-?[\d\.]+$/.test(ret)) { // Is numerical
|
|
75
75
|
ret = parseFloat(ret);
|
|
76
76
|
}
|
|
77
77
|
return ret;
|
|
@@ -970,7 +970,7 @@ class SVGElement {
|
|
|
970
970
|
// bounding box as others of the same length. Unless there is inner
|
|
971
971
|
// HTML in the label. In that case, leave the numbers as is (#5899).
|
|
972
972
|
if (cacheKey.indexOf('<') === -1) {
|
|
973
|
-
cacheKey = cacheKey.replace(/
|
|
973
|
+
cacheKey = cacheKey.replace(/\d/g, '0');
|
|
974
974
|
}
|
|
975
975
|
// Properties that affect bounding box
|
|
976
976
|
cacheKey += [
|
|
@@ -978,9 +978,9 @@ class SVGElement {
|
|
|
978
978
|
renderer.rootFontSize,
|
|
979
979
|
fontSize,
|
|
980
980
|
rotation,
|
|
981
|
-
wrapper.textWidth,
|
|
981
|
+
wrapper.textWidth, // #7874, also useHTML
|
|
982
982
|
alignValue,
|
|
983
|
-
styles.textOverflow,
|
|
983
|
+
styles.textOverflow, // #5968
|
|
984
984
|
styles.fontWeight // #12163
|
|
985
985
|
].join(',');
|
|
986
986
|
}
|
|
@@ -988,7 +988,7 @@ class SVGElement {
|
|
|
988
988
|
bBox = cache[cacheKey];
|
|
989
989
|
}
|
|
990
990
|
// No cache found
|
|
991
|
-
if (!bBox) {
|
|
991
|
+
if (!bBox || bBox.polygon) {
|
|
992
992
|
// SVG elements
|
|
993
993
|
if (isSVG || renderer.forExport) {
|
|
994
994
|
try { // Fails in Firefox if the container has display: none.
|
|
@@ -1057,6 +1057,11 @@ class SVGElement {
|
|
|
1057
1057
|
if (rotation) {
|
|
1058
1058
|
bBox = this.getRotatedBox(bBox, rotation);
|
|
1059
1059
|
}
|
|
1060
|
+
// Create a reference to catch changes to bBox
|
|
1061
|
+
const e = { bBox };
|
|
1062
|
+
fireEvent(this, 'afterGetBBox', e);
|
|
1063
|
+
// Pick up any changes after the fired event
|
|
1064
|
+
bBox = e.bBox;
|
|
1060
1065
|
}
|
|
1061
1066
|
// Cache it. When loading a chart in a hidden iframe in Firefox and
|
|
1062
1067
|
// IE/Edge, the bounding box height is 0, so don't cache it (#5620).
|
|
@@ -1097,11 +1102,31 @@ class SVGElement {
|
|
|
1097
1102
|
aX = pX + baseline * cosRad90, bX = aX + wCosRad, cX = bX - height * cosRad90, dX = cX - wCosRad, aY = pY + baseline * sinRad90, bY = aY + wSinRad, cY = bY - height * sinRad90, dY = cY - wSinRad;
|
|
1098
1103
|
// Deduct the bounding box from the corners
|
|
1099
1104
|
const x = Math.min(aX, bX, cX, dX), y = Math.min(aY, bY, cY, dY), boxWidth = Math.max(aX, bX, cX, dX) - x, boxHeight = Math.max(aY, bY, cY, dY) - y;
|
|
1105
|
+
/* Uncomment to debug boxes
|
|
1106
|
+
this.renderer.path([
|
|
1107
|
+
['M', aX, aY],
|
|
1108
|
+
['L', bX, bY],
|
|
1109
|
+
['L', cX, cY],
|
|
1110
|
+
['L', dX, dY],
|
|
1111
|
+
['Z']
|
|
1112
|
+
])
|
|
1113
|
+
.attr({
|
|
1114
|
+
stroke: 'red',
|
|
1115
|
+
'stroke-width': 1
|
|
1116
|
+
})
|
|
1117
|
+
.add();
|
|
1118
|
+
// */
|
|
1100
1119
|
return {
|
|
1101
1120
|
x,
|
|
1102
1121
|
y,
|
|
1103
1122
|
width: boxWidth,
|
|
1104
|
-
height: boxHeight
|
|
1123
|
+
height: boxHeight,
|
|
1124
|
+
polygon: [
|
|
1125
|
+
[aX, aY],
|
|
1126
|
+
[bX, bY],
|
|
1127
|
+
[cX, cY],
|
|
1128
|
+
[dX, dY]
|
|
1129
|
+
]
|
|
1105
1130
|
};
|
|
1106
1131
|
}
|
|
1107
1132
|
/**
|
|
@@ -1318,98 +1343,6 @@ class SVGElement {
|
|
|
1318
1343
|
}
|
|
1319
1344
|
return this;
|
|
1320
1345
|
}
|
|
1321
|
-
/**
|
|
1322
|
-
* Set a text path for a `text` or `label` element, allowing the text to
|
|
1323
|
-
* flow along a path.
|
|
1324
|
-
*
|
|
1325
|
-
* In order to unset the path for an existing element, call `setTextPath`
|
|
1326
|
-
* with `{ enabled: false }` as the second argument.
|
|
1327
|
-
*
|
|
1328
|
-
* @sample highcharts/members/renderer-textpath/ Text path demonstrated
|
|
1329
|
-
*
|
|
1330
|
-
* @function Highcharts.SVGElement#setTextPath
|
|
1331
|
-
*
|
|
1332
|
-
* @param {Highcharts.SVGElement|undefined} path
|
|
1333
|
-
* Path to follow. If undefined, it allows changing options for the
|
|
1334
|
-
* existing path.
|
|
1335
|
-
*
|
|
1336
|
-
* @param {Highcharts.DataLabelsTextPathOptionsObject} textPathOptions
|
|
1337
|
-
* Options.
|
|
1338
|
-
*
|
|
1339
|
-
* @return {Highcharts.SVGElement} Returns the SVGElement for chaining.
|
|
1340
|
-
*/
|
|
1341
|
-
setTextPath(path, textPathOptions) {
|
|
1342
|
-
// Defaults
|
|
1343
|
-
textPathOptions = merge(true, {
|
|
1344
|
-
enabled: true,
|
|
1345
|
-
attributes: {
|
|
1346
|
-
dy: -5,
|
|
1347
|
-
startOffset: '50%',
|
|
1348
|
-
textAnchor: 'middle'
|
|
1349
|
-
}
|
|
1350
|
-
}, textPathOptions);
|
|
1351
|
-
const url = this.renderer.url, textWrapper = this.text || this, textPath = textWrapper.textPath, { attributes, enabled } = textPathOptions;
|
|
1352
|
-
path = path || (textPath && textPath.path);
|
|
1353
|
-
// Remove previously added event
|
|
1354
|
-
if (textPath) {
|
|
1355
|
-
textPath.undo();
|
|
1356
|
-
}
|
|
1357
|
-
if (path && enabled) {
|
|
1358
|
-
const undo = addEvent(textWrapper, 'afterModifyTree', (e) => {
|
|
1359
|
-
if (path && enabled) {
|
|
1360
|
-
// Set ID for the path
|
|
1361
|
-
let textPathId = path.attr('id');
|
|
1362
|
-
if (!textPathId) {
|
|
1363
|
-
path.attr('id', textPathId = uniqueKey());
|
|
1364
|
-
}
|
|
1365
|
-
// Set attributes for the <text>
|
|
1366
|
-
const textAttribs = {
|
|
1367
|
-
// `dx`/`dy` options must by set on <text> (parent), the
|
|
1368
|
-
// rest should be set on <textPath>
|
|
1369
|
-
x: 0,
|
|
1370
|
-
y: 0
|
|
1371
|
-
};
|
|
1372
|
-
if (defined(attributes.dx)) {
|
|
1373
|
-
textAttribs.dx = attributes.dx;
|
|
1374
|
-
delete attributes.dx;
|
|
1375
|
-
}
|
|
1376
|
-
if (defined(attributes.dy)) {
|
|
1377
|
-
textAttribs.dy = attributes.dy;
|
|
1378
|
-
delete attributes.dy;
|
|
1379
|
-
}
|
|
1380
|
-
textWrapper.attr(textAttribs);
|
|
1381
|
-
// Handle label properties
|
|
1382
|
-
this.attr({ transform: '' });
|
|
1383
|
-
if (this.box) {
|
|
1384
|
-
this.box = this.box.destroy();
|
|
1385
|
-
}
|
|
1386
|
-
// Wrap the nodes in a textPath
|
|
1387
|
-
const children = e.nodes.slice(0);
|
|
1388
|
-
e.nodes.length = 0;
|
|
1389
|
-
e.nodes[0] = {
|
|
1390
|
-
tagName: 'textPath',
|
|
1391
|
-
attributes: extend(attributes, {
|
|
1392
|
-
'text-anchor': attributes.textAnchor,
|
|
1393
|
-
href: `${url}#${textPathId}`
|
|
1394
|
-
}),
|
|
1395
|
-
children
|
|
1396
|
-
};
|
|
1397
|
-
}
|
|
1398
|
-
});
|
|
1399
|
-
// Set the reference
|
|
1400
|
-
textWrapper.textPath = { path, undo };
|
|
1401
|
-
}
|
|
1402
|
-
else {
|
|
1403
|
-
textWrapper.attr({ dx: 0, dy: 0 });
|
|
1404
|
-
delete textWrapper.textPath;
|
|
1405
|
-
}
|
|
1406
|
-
if (this.added) {
|
|
1407
|
-
// Rebuild text after added
|
|
1408
|
-
textWrapper.textCache = '';
|
|
1409
|
-
this.renderer.buildText(textWrapper);
|
|
1410
|
-
}
|
|
1411
|
-
return this;
|
|
1412
|
-
}
|
|
1413
1346
|
/**
|
|
1414
1347
|
* Add a shadow to the element. In styled mode, this method is not used,
|
|
1415
1348
|
* instead use `defs` and filters.
|
|
@@ -32,6 +32,7 @@ class SVGLabel extends SVGElement {
|
|
|
32
32
|
super(renderer, 'g');
|
|
33
33
|
this.paddingLeftSetter = this.paddingSetter;
|
|
34
34
|
this.paddingRightSetter = this.paddingSetter;
|
|
35
|
+
this.doUpdate = false;
|
|
35
36
|
this.textStr = str;
|
|
36
37
|
this.x = x;
|
|
37
38
|
this.y = y;
|
|
@@ -184,6 +185,24 @@ class SVGLabel extends SVGElement {
|
|
|
184
185
|
}
|
|
185
186
|
heightSetter(value) {
|
|
186
187
|
this.heightSetting = value;
|
|
188
|
+
this.doUpdate = true;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* This method is executed in the end of `attr()`, after setting all
|
|
192
|
+
* attributes in the hash. In can be used to efficiently consolidate
|
|
193
|
+
* multiple attributes in one SVG property -- e.g., translate, rotate and
|
|
194
|
+
* scale are merged in one "transform" attribute in the SVG node.
|
|
195
|
+
* Also updating height or width should trigger update of the box size.
|
|
196
|
+
*
|
|
197
|
+
* @private
|
|
198
|
+
* @function Highcharts.SVGLabel#afterSetters
|
|
199
|
+
*/
|
|
200
|
+
afterSetters() {
|
|
201
|
+
super.afterSetters();
|
|
202
|
+
if (this.doUpdate) {
|
|
203
|
+
this.updateBoxSize();
|
|
204
|
+
this.doUpdate = false;
|
|
205
|
+
}
|
|
187
206
|
}
|
|
188
207
|
/*
|
|
189
208
|
* After the text element is added, get the desired size of the border
|
|
@@ -332,6 +351,7 @@ class SVGLabel extends SVGElement {
|
|
|
332
351
|
widthSetter(value) {
|
|
333
352
|
// `width:auto` => null
|
|
334
353
|
this.widthSetting = isNumber(value) ? value : void 0;
|
|
354
|
+
this.doUpdate = true;
|
|
335
355
|
}
|
|
336
356
|
getPaddedWidth() {
|
|
337
357
|
const padding = this.padding;
|
|
@@ -429,7 +429,7 @@ class SVGRenderer {
|
|
|
429
429
|
`highcharts-drop-shadow-${this.chartIndex}`,
|
|
430
430
|
...Object.keys(shadowOptions)
|
|
431
431
|
.map((key) => `${key}-${shadowOptions[key]}`)
|
|
432
|
-
].join('-').toLowerCase().replace(/[^a-
|
|
432
|
+
].join('-').toLowerCase().replace(/[^a-z\d\-]/g, ''), options = merge({
|
|
433
433
|
color: '#000000',
|
|
434
434
|
offsetX: 1,
|
|
435
435
|
offsetY: 1,
|
|
@@ -443,22 +443,37 @@ class SVGRenderer {
|
|
|
443
443
|
id,
|
|
444
444
|
filterUnits: options.filterUnits
|
|
445
445
|
},
|
|
446
|
-
children:
|
|
447
|
-
tagName: 'feDropShadow',
|
|
448
|
-
attributes: {
|
|
449
|
-
dx: options.offsetX,
|
|
450
|
-
dy: options.offsetY,
|
|
451
|
-
'flood-color': options.color,
|
|
452
|
-
// Tuned and modified to keep a preserve compatibility
|
|
453
|
-
// with the old settings
|
|
454
|
-
'flood-opacity': Math.min(options.opacity * 5, 1),
|
|
455
|
-
stdDeviation: options.width / 2
|
|
456
|
-
}
|
|
457
|
-
}]
|
|
446
|
+
children: this.getShadowFilterContent(options)
|
|
458
447
|
});
|
|
459
448
|
}
|
|
460
449
|
return id;
|
|
461
450
|
}
|
|
451
|
+
/**
|
|
452
|
+
* Get shadow filter content.
|
|
453
|
+
* NOTE! Overridden in es5 module for IE11 compatibility.
|
|
454
|
+
*
|
|
455
|
+
* @private
|
|
456
|
+
* @function Highcharts.SVGRenderer#getShadowFilterContent
|
|
457
|
+
*
|
|
458
|
+
* @param {ShadowOptionsObject} options
|
|
459
|
+
* The shadow options.
|
|
460
|
+
* @return {Array<AST.Node>}
|
|
461
|
+
* The shadow filter content.
|
|
462
|
+
*/
|
|
463
|
+
getShadowFilterContent(options) {
|
|
464
|
+
return [{
|
|
465
|
+
tagName: 'feDropShadow',
|
|
466
|
+
attributes: {
|
|
467
|
+
dx: options.offsetX,
|
|
468
|
+
dy: options.offsetY,
|
|
469
|
+
'flood-color': options.color,
|
|
470
|
+
// Tuned and modified to keep a preserve compatibility
|
|
471
|
+
// with the old settings
|
|
472
|
+
'flood-opacity': Math.min(options.opacity * 5, 1),
|
|
473
|
+
stdDeviation: options.width / 2
|
|
474
|
+
}
|
|
475
|
+
}];
|
|
476
|
+
}
|
|
462
477
|
/**
|
|
463
478
|
* Parse a simple HTML string into SVG tspans. Called internally when text
|
|
464
479
|
* is set on an SVGElement. The function supports a subset of HTML tags, CSS
|
|
@@ -1629,7 +1644,7 @@ extend(SVGRenderer.prototype, {
|
|
|
1629
1644
|
'&': '&',
|
|
1630
1645
|
'<': '<',
|
|
1631
1646
|
'>': '>',
|
|
1632
|
-
"'": ''',
|
|
1647
|
+
"'": ''', // eslint-disable-line quotes
|
|
1633
1648
|
'"': '"'
|
|
1634
1649
|
},
|
|
1635
1650
|
/**
|