highcharts 9.3.2 → 10.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 +19 -2
- package/css/highcharts.scss +17 -2
- package/css/themes/dark-unica.css +19 -2
- package/css/themes/grid-light.css +19 -2
- package/css/themes/sand-signika.css +19 -2
- package/es-modules/Accessibility/A11yI18n.js +4 -4
- package/es-modules/Accessibility/Accessibility.js +1 -1
- package/es-modules/Accessibility/Components/ContainerComponent.js +8 -9
- package/es-modules/Accessibility/Components/InfoRegionsComponent.js +14 -9
- package/es-modules/Accessibility/Components/LegendComponent.js +31 -23
- package/es-modules/Accessibility/Components/MenuComponent.js +15 -5
- package/es-modules/Accessibility/Components/RangeSelectorComponent.js +2 -2
- package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +7 -6
- package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +1 -1
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +0 -1
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +34 -18
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +84 -33
- package/es-modules/Accessibility/Components/ZoomComponent.js +13 -10
- package/es-modules/Accessibility/FocusBorder.js +6 -5
- package/es-modules/Accessibility/HighContrastMode.js +2 -2
- package/es-modules/Accessibility/KeyboardNavigation.js +113 -98
- package/es-modules/Accessibility/Options/LangOptions.js +36 -31
- package/es-modules/Accessibility/Options/Options.js +66 -3
- package/es-modules/Accessibility/ProxyElement.js +14 -6
- package/es-modules/Accessibility/ProxyProvider.js +10 -2
- package/es-modules/Accessibility/Utils/ChartUtilities.js +9 -4
- package/es-modules/Core/Axis/Axis.js +180 -73
- package/es-modules/Core/Axis/Color/ColorAxis.js +22 -5
- package/es-modules/Core/Axis/GridAxis.js +15 -11
- package/es-modules/Core/Axis/LogarithmicAxis.js +1 -1
- package/es-modules/Core/Axis/OrdinalAxis.js +3 -2
- package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +1 -1
- package/es-modules/Core/Axis/StackingAxis.js +0 -1
- package/es-modules/Core/Axis/Tick.js +2 -2
- package/es-modules/Core/Axis/TreeGridTick.js +11 -0
- package/es-modules/Core/Chart/Chart.js +21 -3
- package/es-modules/Core/Chart/Chart3D.js +1 -11
- package/es-modules/Core/Chart/ChartDefaults.js +43 -11
- package/es-modules/Core/Chart/MapChart.js +1 -6
- package/es-modules/Core/Chart/StockChart.js +1 -1
- package/es-modules/Core/DefaultOptions.js +8 -4
- package/es-modules/Core/Geometry/PolygonClip.js +84 -0
- package/es-modules/Core/Globals.js +4 -18
- package/es-modules/Core/HttpUtilities.js +13 -8
- package/es-modules/Core/Legend/Legend.js +11 -9
- package/es-modules/Core/Navigator.js +10 -7
- package/es-modules/Core/Pointer.js +15 -11
- package/es-modules/Core/Renderer/HTML/AST.js +68 -8
- package/es-modules/Core/Renderer/SVG/SVGElement.js +47 -63
- package/es-modules/Core/Renderer/SVG/SVGElement3D.js +17 -5
- package/es-modules/Core/Renderer/SVG/SVGRenderer.js +31 -28
- package/es-modules/Core/Renderer/SVG/SVGRenderer3D.js +1 -1
- package/es-modules/Core/Renderer/SVG/TextBuilder.js +12 -10
- package/es-modules/Core/Scrollbar.js +9 -5
- package/es-modules/Core/Series/DataLabel.js +65 -36
- package/es-modules/Core/Series/Point.js +2 -2
- package/es-modules/Core/Series/Series.js +52 -22
- package/es-modules/Core/Series/SeriesDefaults.js +4 -1
- package/es-modules/Core/Tooltip.js +14 -31
- package/es-modules/Core/Utilities.js +29 -29
- package/es-modules/Extensions/Annotations/Annotations.js +9 -2
- package/es-modules/Extensions/Annotations/ControlPoint.js +1 -1
- package/es-modules/Extensions/Annotations/MockPoint.js +1 -1
- package/es-modules/Extensions/Annotations/NavigationBindings.js +9 -1
- package/es-modules/Extensions/Annotations/Popup.js +1 -1
- package/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +5 -3
- package/es-modules/Extensions/Boost/BoostInit.js +6 -1
- package/es-modules/Extensions/Boost/BoostOptions.js +26 -0
- package/es-modules/Extensions/Boost/Boostables.js +1 -0
- package/es-modules/Extensions/Boost/WGLRenderer.js +48 -37
- package/es-modules/Extensions/Boost/WGLShader.js +4 -3
- package/es-modules/Extensions/Breadcrumbs.js +873 -0
- package/es-modules/Extensions/Data.js +26 -14
- package/es-modules/Extensions/DataGrouping.js +8 -3
- package/es-modules/Extensions/Debugger/ErrorMessages.js +4 -0
- package/es-modules/Extensions/DraggablePoints.js +9 -7
- package/es-modules/Extensions/Drilldown.js +150 -95
- package/es-modules/Extensions/ExportData.js +1 -2
- package/es-modules/Extensions/Exporting/Exporting.js +31 -20
- package/es-modules/Extensions/Exporting/ExportingDefaults.js +49 -1
- package/es-modules/Extensions/FullScreen.js +121 -54
- package/es-modules/Extensions/GeoJSON.js +151 -125
- package/es-modules/Extensions/MarkerClusters.js +34 -20
- package/es-modules/Extensions/OfflineExporting/OfflineExporting.js +110 -22
- package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
- package/es-modules/Extensions/Oldie/Oldie.js +1 -1
- package/es-modules/Extensions/OverlappingDataLabels.js +5 -4
- package/es-modules/Extensions/Polar.js +4 -1
- package/es-modules/Extensions/ScrollablePlotArea.js +5 -1
- package/es-modules/Extensions/Stacking.js +4 -3
- package/es-modules/Extensions/Themes/HighContrastDark.js +10 -10
- package/es-modules/Extensions/Themes/HighContrastLight.js +10 -10
- package/es-modules/Maps/MapNavigation.js +50 -13
- package/es-modules/Maps/MapPointer.js +16 -0
- package/es-modules/Maps/MapUtilities.js +56 -0
- package/es-modules/Maps/MapView.js +611 -136
- package/es-modules/Maps/MapViewInsetsOptionsDefault.js +148 -0
- package/es-modules/Maps/MapViewOptionsDefault.js +60 -20
- package/es-modules/Maps/Projection.js +169 -77
- package/es-modules/Maps/Projections/EqualEarth.js +15 -6
- package/es-modules/Maps/Projections/LambertConformalConic.js +27 -19
- package/es-modules/Maps/Projections/Miller.js +23 -10
- package/es-modules/Maps/Projections/Orthographic.js +21 -10
- package/es-modules/Maps/Projections/WebMercator.js +25 -13
- package/es-modules/Series/ArcDiagram/ArcDiagramPoint.js +77 -0
- package/es-modules/Series/ArcDiagram/ArcDiagramSeries.js +589 -0
- package/es-modules/Series/CenteredUtilities.js +6 -1
- package/es-modules/Series/Column/ColumnSeries.js +4 -3
- package/es-modules/Series/DataModifyComposition.js +1 -0
- package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +2 -2
- package/es-modules/Series/DrawPointComposition.js +7 -4
- package/es-modules/Series/Flags/FlagsSeries.js +7 -12
- package/es-modules/Series/Gauge/GaugeSeries.js +1 -1
- package/es-modules/Series/Heatmap/HeatmapSeries.js +13 -20
- package/es-modules/Series/Lollipop/LollipopSeries.js +1 -1
- package/es-modules/Series/Map/MapPoint.js +24 -1
- package/es-modules/Series/Map/MapSeries.js +206 -169
- package/es-modules/Series/MapBubble/MapBubblePoint.js +16 -24
- package/es-modules/Series/MapBubble/MapBubbleSeries.js +58 -1
- package/es-modules/Series/MapPoint/MapPointPoint.js +2 -8
- package/es-modules/Series/MapPoint/MapPointSeries.js +40 -14
- package/es-modules/Series/NodesComposition.js +60 -13
- package/es-modules/Series/OHLC/OHLCSeries.js +7 -0
- package/es-modules/Series/Organization/OrganizationPoint.js +68 -2
- package/es-modules/Series/Organization/OrganizationSeries.js +79 -25
- package/es-modules/Series/Pie/PieDataLabel.js +3 -1
- package/es-modules/Series/Pie/PiePoint.js +12 -5
- package/es-modules/Series/Pie/PieSeries.js +12 -1
- package/es-modules/Series/Pie3D/Pie3DSeries.js +19 -0
- package/es-modules/Series/Sankey/SankeyColumnComposition.js +193 -0
- package/es-modules/Series/Sankey/SankeyPoint.js +37 -1
- package/es-modules/Series/Sankey/SankeySeries.js +13 -128
- package/es-modules/Series/Scatter/ScatterSeries.js +1 -1
- package/es-modules/Series/Sunburst/SunburstSeries.js +14 -3
- package/es-modules/Series/Treemap/TreemapSeries.js +88 -80
- package/es-modules/Series/Waterfall/WaterfallSeries.js +2 -0
- package/es-modules/Series/Wordcloud/WordcloudSeries.js +4 -4
- package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +9 -2
- package/es-modules/Stock/StockToolsBindings.js +31 -24
- package/es-modules/Stock/StockToolsGui.js +1 -1
- package/es-modules/masters/highcharts-3d.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/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 +14 -0
- package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
- package/es-modules/masters/modules/boost-canvas.src.js +1 -1
- package/es-modules/masters/modules/boost.src.js +1 -1
- package/es-modules/masters/modules/broken-axis.src.js +1 -1
- package/es-modules/masters/modules/bullet.src.js +1 -1
- package/es-modules/masters/modules/coloraxis.src.js +1 -1
- package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
- package/es-modules/masters/modules/cylinder.src.js +1 -1
- package/es-modules/masters/modules/data.src.js +1 -1
- package/es-modules/masters/modules/datagrouping.src.js +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 +2 -1
- package/es-modules/masters/modules/dumbbell.src.js +1 -1
- package/es-modules/masters/modules/export-data.src.js +1 -1
- package/es-modules/masters/modules/exporting.src.js +1 -1
- package/es-modules/masters/modules/full-screen.src.js +1 -1
- package/es-modules/masters/modules/funnel.src.js +1 -1
- package/es-modules/masters/modules/funnel3d.src.js +1 -1
- package/es-modules/masters/modules/gantt.src.js +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 +5 -1
- package/es-modules/masters/modules/marker-clusters.src.js +1 -1
- package/es-modules/masters/modules/networkgraph.src.js +1 -1
- package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
- package/es-modules/masters/modules/offline-exporting.src.js +1 -1
- package/es-modules/masters/modules/oldie-polyfills.src.js +1 -1
- package/es-modules/masters/modules/oldie.src.js +1 -1
- package/es-modules/masters/modules/organization.src.js +1 -1
- package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
- package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
- package/es-modules/masters/modules/pareto.src.js +1 -1
- package/es-modules/masters/modules/pathfinder.src.js +1 -1
- package/es-modules/masters/modules/pattern-fill.src.js +1 -1
- package/es-modules/masters/modules/price-indicator.src.js +1 -1
- package/es-modules/masters/modules/pyramid3d.src.js +1 -1
- package/es-modules/masters/modules/sankey.src.js +1 -1
- package/es-modules/masters/modules/series-label.src.js +1 -1
- package/es-modules/masters/modules/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/tilemap.src.js +1 -1
- package/es-modules/masters/modules/timeline.src.js +1 -1
- package/es-modules/masters/modules/treegrid.src.js +1 -1
- package/es-modules/masters/modules/treemap.src.js +5 -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/themes/avocado.src.js +1 -1
- package/es-modules/masters/themes/brand-dark.src.js +1 -1
- package/es-modules/masters/themes/brand-light.src.js +1 -1
- package/es-modules/masters/themes/dark-blue.src.js +1 -1
- package/es-modules/masters/themes/dark-green.src.js +1 -1
- package/es-modules/masters/themes/dark-unica.src.js +1 -1
- package/es-modules/masters/themes/gray.src.js +1 -1
- package/es-modules/masters/themes/grid-light.src.js +1 -1
- package/es-modules/masters/themes/grid.src.js +1 -1
- package/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
- package/es-modules/masters/themes/high-contrast-light.src.js +1 -1
- package/es-modules/masters/themes/sand-signika.src.js +1 -1
- package/es-modules/masters/themes/skies.src.js +1 -1
- package/es-modules/masters/themes/sunset.src.js +1 -1
- package/highcharts-3d.js +99 -98
- package/highcharts-3d.js.map +1 -1
- package/highcharts-3d.src.js +51 -21
- package/highcharts-gantt.js +808 -800
- package/highcharts-gantt.js.map +1 -1
- package/highcharts-gantt.src.js +781 -426
- package/highcharts-more.js +195 -194
- package/highcharts-more.js.map +1 -1
- package/highcharts-more.src.js +18 -4
- package/highcharts.d.ts +3224 -542
- package/highcharts.js +592 -584
- package/highcharts.js.map +1 -1
- package/highcharts.src.d.ts +3224 -542
- package/highcharts.src.js +732 -400
- package/highmaps.js +760 -728
- package/highmaps.js.map +1 -1
- package/highmaps.src.js +3840 -2189
- package/highstock.js +793 -786
- package/highstock.js.map +1 -1
- package/highstock.src.js +783 -432
- package/indicators/acceleration-bands.js +12 -11
- package/indicators/acceleration-bands.js.map +1 -1
- package/indicators/acceleration-bands.src.js +11 -2
- package/indicators/accumulation-distribution.js +5 -5
- package/indicators/accumulation-distribution.js.map +1 -1
- package/indicators/accumulation-distribution.src.js +11 -2
- package/indicators/ao.js +6 -6
- package/indicators/ao.js.map +1 -1
- package/indicators/ao.src.js +11 -2
- package/indicators/apo.js +5 -5
- package/indicators/apo.js.map +1 -1
- package/indicators/apo.src.js +11 -2
- package/indicators/aroon-oscillator.js +10 -10
- package/indicators/aroon-oscillator.js.map +1 -1
- package/indicators/aroon-oscillator.src.js +11 -2
- package/indicators/aroon.js +11 -11
- package/indicators/aroon.js.map +1 -1
- package/indicators/aroon.src.js +11 -2
- package/indicators/atr.js +5 -5
- package/indicators/atr.js.map +1 -1
- package/indicators/atr.src.js +11 -2
- package/indicators/bollinger-bands.js +12 -12
- package/indicators/bollinger-bands.js.map +1 -1
- package/indicators/bollinger-bands.src.js +11 -2
- package/indicators/cci.js +5 -5
- package/indicators/cci.js.map +1 -1
- package/indicators/cci.src.js +11 -2
- package/indicators/chaikin.js +8 -8
- package/indicators/chaikin.js.map +1 -1
- package/indicators/chaikin.src.js +11 -2
- package/indicators/cmf.js +6 -6
- package/indicators/cmf.js.map +1 -1
- package/indicators/cmf.src.js +11 -2
- package/indicators/cmo.js +5 -5
- package/indicators/cmo.js.map +1 -1
- package/indicators/cmo.src.js +11 -2
- package/indicators/dema.js +5 -5
- package/indicators/dema.js.map +1 -1
- package/indicators/dema.src.js +11 -2
- package/indicators/disparity-index.js +6 -6
- package/indicators/disparity-index.js.map +1 -1
- package/indicators/disparity-index.src.js +11 -2
- package/indicators/dmi.js +12 -12
- package/indicators/dmi.js.map +1 -1
- package/indicators/dmi.src.js +11 -2
- package/indicators/dpo.js +5 -5
- package/indicators/dpo.js.map +1 -1
- package/indicators/dpo.src.js +11 -2
- package/indicators/ema.js +2 -1
- package/indicators/ema.js.map +1 -1
- package/indicators/ema.src.js +10 -1
- package/indicators/ichimoku-kinko-hyo.js +16 -16
- package/indicators/ichimoku-kinko-hyo.js.map +1 -1
- package/indicators/ichimoku-kinko-hyo.src.js +11 -2
- package/indicators/indicators-all.js +195 -194
- package/indicators/indicators-all.js.map +1 -1
- package/indicators/indicators-all.src.js +21 -5
- package/indicators/indicators.js +13 -12
- package/indicators/indicators.js.map +1 -1
- package/indicators/indicators.src.js +21 -5
- package/indicators/keltner-channels.js +12 -11
- package/indicators/keltner-channels.js.map +1 -1
- package/indicators/keltner-channels.src.js +11 -2
- package/indicators/klinger.js +13 -13
- package/indicators/klinger.js.map +1 -1
- package/indicators/klinger.src.js +11 -2
- package/indicators/macd.js +12 -11
- package/indicators/macd.js.map +1 -1
- package/indicators/macd.src.js +11 -2
- package/indicators/mfi.js +6 -6
- package/indicators/mfi.js.map +1 -1
- package/indicators/mfi.src.js +11 -2
- package/indicators/momentum.js +5 -5
- package/indicators/momentum.js.map +1 -1
- package/indicators/momentum.src.js +11 -2
- package/indicators/natr.js +5 -4
- package/indicators/natr.js.map +1 -1
- package/indicators/natr.src.js +11 -2
- package/indicators/obv.js +5 -5
- package/indicators/obv.js.map +1 -1
- package/indicators/obv.src.js +11 -2
- package/indicators/pivot-points.js +11 -11
- package/indicators/pivot-points.js.map +1 -1
- package/indicators/pivot-points.src.js +11 -2
- package/indicators/ppo.js +5 -5
- package/indicators/ppo.js.map +1 -1
- package/indicators/ppo.src.js +11 -2
- package/indicators/price-channel.js +11 -11
- package/indicators/price-channel.js.map +1 -1
- package/indicators/price-channel.src.js +11 -2
- package/indicators/price-envelopes.js +8 -8
- package/indicators/price-envelopes.js.map +1 -1
- package/indicators/price-envelopes.src.js +11 -2
- package/indicators/psar.js +7 -6
- package/indicators/psar.js.map +1 -1
- package/indicators/psar.src.js +11 -2
- package/indicators/regressions.js +12 -12
- package/indicators/regressions.js.map +1 -1
- package/indicators/regressions.src.js +11 -2
- package/indicators/roc.js +5 -5
- package/indicators/roc.js.map +1 -1
- package/indicators/roc.src.js +11 -2
- package/indicators/rsi.js +6 -5
- package/indicators/rsi.js.map +1 -1
- package/indicators/rsi.src.js +11 -2
- package/indicators/slow-stochastic.js +5 -5
- package/indicators/slow-stochastic.js.map +1 -1
- package/indicators/slow-stochastic.src.js +11 -2
- package/indicators/stochastic.js +12 -12
- package/indicators/stochastic.js.map +1 -1
- package/indicators/stochastic.src.js +11 -2
- package/indicators/supertrend.js +10 -10
- package/indicators/supertrend.js.map +1 -1
- package/indicators/supertrend.src.js +11 -2
- package/indicators/tema.js +6 -6
- package/indicators/tema.js.map +1 -1
- package/indicators/tema.src.js +11 -2
- package/indicators/trendline.js +5 -5
- package/indicators/trendline.js.map +1 -1
- package/indicators/trendline.src.js +11 -2
- package/indicators/trix.js +4 -4
- package/indicators/trix.js.map +1 -1
- package/indicators/trix.src.js +11 -2
- package/indicators/volume-by-price.js +17 -17
- package/indicators/volume-by-price.js.map +1 -1
- package/indicators/volume-by-price.src.js +11 -2
- package/indicators/vwap.js +5 -5
- package/indicators/vwap.js.map +1 -1
- package/indicators/vwap.src.js +11 -2
- package/indicators/williams-r.js +6 -5
- package/indicators/williams-r.js.map +1 -1
- package/indicators/williams-r.src.js +11 -2
- package/indicators/wma.js +5 -5
- package/indicators/wma.js.map +1 -1
- package/indicators/wma.src.js +11 -2
- package/indicators/zigzag.js +6 -6
- package/indicators/zigzag.js.map +1 -1
- package/indicators/zigzag.src.js +11 -2
- package/lib/jspdf.js +299 -184
- package/lib/jspdf.src.js +25266 -18067
- package/lib/svg2pdf.js +35 -31
- package/lib/svg2pdf.src.js +5721 -4179
- package/modules/accessibility.js +245 -240
- package/modules/accessibility.js.map +1 -1
- package/modules/accessibility.src.js +510 -283
- package/modules/annotations-advanced.js +144 -144
- package/modules/annotations-advanced.js.map +1 -1
- package/modules/annotations-advanced.src.js +37 -11
- package/modules/annotations.js +79 -79
- package/modules/annotations.js.map +1 -1
- package/modules/annotations.src.js +32 -8
- package/modules/arc-diagram.js +25 -0
- package/modules/arc-diagram.js.map +1 -0
- package/modules/arc-diagram.src.js +778 -0
- package/modules/arrow-symbols.js +4 -3
- package/modules/arrow-symbols.js.map +1 -1
- package/modules/arrow-symbols.src.js +11 -2
- package/modules/boost-canvas.js +15 -15
- package/modules/boost-canvas.js.map +1 -1
- package/modules/boost-canvas.src.js +11 -2
- package/modules/boost.js +80 -79
- package/modules/boost.js.map +1 -1
- package/modules/boost.src.js +71 -43
- package/modules/broken-axis.js +13 -13
- package/modules/broken-axis.js.map +1 -1
- package/modules/broken-axis.src.js +11 -2
- package/modules/bullet.js +9 -9
- package/modules/bullet.js.map +1 -1
- package/modules/bullet.src.js +11 -2
- package/modules/coloraxis.js +24 -24
- package/modules/coloraxis.js.map +1 -1
- package/modules/coloraxis.src.js +33 -7
- package/modules/current-date-indicator.js +5 -4
- package/modules/current-date-indicator.js.map +1 -1
- package/modules/current-date-indicator.src.js +11 -2
- package/modules/cylinder.js +11 -11
- package/modules/cylinder.js.map +1 -1
- package/modules/cylinder.src.js +11 -2
- package/modules/data.js +34 -33
- package/modules/data.js.map +1 -1
- package/modules/data.src.js +59 -32
- package/modules/datagrouping.js +21 -20
- package/modules/datagrouping.js.map +1 -1
- package/modules/datagrouping.src.js +19 -5
- package/modules/debugger.js +8 -7
- package/modules/debugger.js.map +1 -1
- package/modules/debugger.src.js +15 -2
- package/modules/dependency-wheel.js +12 -11
- package/modules/dependency-wheel.js.map +1 -1
- package/modules/dependency-wheel.src.js +14 -5
- package/modules/dotplot.js +6 -6
- package/modules/dotplot.js.map +1 -1
- package/modules/dotplot.src.js +11 -2
- package/modules/drag-panes.js +10 -10
- package/modules/drag-panes.js.map +1 -1
- package/modules/drag-panes.src.js +11 -2
- package/modules/draggable-points.js +35 -34
- package/modules/draggable-points.js.map +1 -1
- package/modules/draggable-points.src.js +20 -9
- package/modules/drilldown.d.ts +19 -0
- package/modules/drilldown.js +36 -25
- package/modules/drilldown.js.map +1 -1
- package/modules/drilldown.src.d.ts +19 -0
- package/modules/drilldown.src.js +1091 -106
- package/modules/dumbbell.js +17 -17
- package/modules/dumbbell.js.map +1 -1
- package/modules/dumbbell.src.js +11 -2
- package/modules/export-data.js +21 -20
- package/modules/export-data.js.map +1 -1
- package/modules/export-data.src.js +12 -4
- package/modules/exporting.js +39 -39
- package/modules/exporting.js.map +1 -1
- package/modules/exporting.src.js +227 -92
- package/modules/full-screen.js +8 -7
- package/modules/full-screen.js.map +1 -1
- package/modules/full-screen.src.js +135 -58
- package/modules/funnel.js +12 -12
- package/modules/funnel.js.map +1 -1
- package/modules/funnel.src.js +11 -2
- package/modules/funnel3d.js +21 -21
- package/modules/funnel3d.js.map +1 -1
- package/modules/funnel3d.src.js +11 -2
- package/modules/gantt.js +216 -215
- package/modules/gantt.js.map +1 -1
- package/modules/gantt.src.js +60 -28
- package/modules/grid-axis.js +23 -23
- package/modules/grid-axis.js.map +1 -1
- package/modules/grid-axis.src.js +27 -13
- package/modules/heatmap.js +40 -39
- package/modules/heatmap.js.map +1 -1
- package/modules/heatmap.src.js +46 -27
- package/modules/heikinashi.js +8 -8
- package/modules/heikinashi.js.map +1 -1
- package/modules/heikinashi.src.js +11 -2
- package/modules/histogram-bellcurve.js +13 -13
- package/modules/histogram-bellcurve.js.map +1 -1
- package/modules/histogram-bellcurve.src.js +11 -2
- package/modules/hollowcandlestick.js +9 -9
- package/modules/hollowcandlestick.js.map +1 -1
- package/modules/hollowcandlestick.src.js +11 -2
- package/modules/item-series.js +12 -12
- package/modules/item-series.js.map +1 -1
- package/modules/item-series.src.js +11 -2
- package/modules/lollipop.js +7 -7
- package/modules/lollipop.js.map +1 -1
- package/modules/lollipop.src.js +12 -3
- package/modules/map.d.ts +80 -43
- package/modules/map.js +169 -144
- package/modules/map.js.map +1 -1
- package/modules/map.src.d.ts +80 -43
- package/modules/map.src.js +8024 -6696
- package/modules/marker-clusters.js +36 -36
- package/modules/marker-clusters.js.map +1 -1
- package/modules/marker-clusters.src.js +47 -23
- package/modules/networkgraph.d.ts +5 -0
- package/modules/networkgraph.js +49 -48
- package/modules/networkgraph.js.map +1 -1
- package/modules/networkgraph.src.d.ts +5 -0
- package/modules/networkgraph.src.js +77 -15
- package/modules/no-data-to-display.js +5 -5
- package/modules/no-data-to-display.js.map +1 -1
- package/modules/no-data-to-display.src.js +11 -2
- package/modules/offline-exporting.js +20 -18
- package/modules/offline-exporting.js.map +1 -1
- package/modules/offline-exporting.src.js +126 -25
- package/modules/oldie-polyfills.js +7 -7
- package/modules/oldie-polyfills.js.map +1 -1
- package/modules/oldie-polyfills.src.js +11 -2
- package/modules/oldie.js +30 -30
- package/modules/oldie.js.map +1 -1
- package/modules/oldie.src.js +12 -3
- package/modules/organization.js +16 -14
- package/modules/organization.js.map +1 -1
- package/modules/organization.src.js +166 -32
- package/modules/overlapping-datalabels.js +3 -2
- package/modules/overlapping-datalabels.js.map +1 -1
- package/modules/overlapping-datalabels.src.js +11 -2
- package/modules/parallel-coordinates.js +11 -11
- package/modules/parallel-coordinates.js.map +1 -1
- package/modules/parallel-coordinates.src.js +11 -2
- package/modules/pareto.js +7 -7
- package/modules/pareto.js.map +1 -1
- package/modules/pareto.src.js +11 -2
- package/modules/pathfinder.js +31 -31
- package/modules/pathfinder.js.map +1 -1
- package/modules/pathfinder.src.js +11 -2
- package/modules/pattern-fill.js +14 -14
- package/modules/pattern-fill.js.map +1 -1
- package/modules/pattern-fill.src.js +11 -2
- package/modules/price-indicator.js +5 -5
- package/modules/price-indicator.js.map +1 -1
- package/modules/price-indicator.src.js +11 -2
- package/modules/pyramid3d.js +4 -4
- package/modules/pyramid3d.js.map +1 -1
- package/modules/pyramid3d.src.js +11 -2
- package/modules/sankey.d.ts +5 -0
- package/modules/sankey.js +32 -29
- package/modules/sankey.js.map +1 -1
- package/modules/sankey.src.d.ts +5 -0
- package/modules/sankey.src.js +341 -157
- package/modules/series-label.js +18 -17
- package/modules/series-label.js.map +1 -1
- package/modules/series-label.src.js +11 -2
- package/modules/solid-gauge.js +10 -10
- package/modules/solid-gauge.js.map +1 -1
- package/modules/solid-gauge.src.js +11 -2
- package/modules/sonification.js +59 -59
- package/modules/sonification.js.map +1 -1
- package/modules/sonification.src.js +11 -2
- package/modules/static-scale.js +5 -4
- package/modules/static-scale.js.map +1 -1
- package/modules/static-scale.src.js +11 -2
- package/modules/stock-tools.js +145 -145
- package/modules/stock-tools.js.map +1 -1
- package/modules/stock-tools.src.js +64 -32
- package/modules/stock.js +204 -204
- package/modules/stock.js.map +1 -1
- package/modules/stock.src.js +62 -34
- package/modules/streamgraph.js +5 -4
- package/modules/streamgraph.js.map +1 -1
- package/modules/streamgraph.src.js +11 -2
- package/modules/sunburst.d.ts +3 -0
- package/modules/sunburst.js +73 -60
- package/modules/sunburst.js.map +1 -1
- package/modules/sunburst.src.d.ts +3 -0
- package/modules/sunburst.src.js +1048 -97
- package/modules/tilemap.js +17 -17
- package/modules/tilemap.js.map +1 -1
- package/modules/tilemap.src.js +11 -2
- package/modules/timeline.js +18 -18
- package/modules/timeline.js.map +1 -1
- package/modules/timeline.src.js +11 -2
- package/modules/treegrid.js +57 -56
- package/modules/treegrid.js.map +1 -1
- package/modules/treegrid.src.js +38 -13
- package/modules/treemap.d.ts +3 -0
- package/modules/treemap.js +53 -41
- package/modules/treemap.js.map +1 -1
- package/modules/treemap.src.d.ts +3 -0
- package/modules/treemap.src.js +1037 -95
- package/modules/variable-pie.js +9 -9
- package/modules/variable-pie.js.map +1 -1
- package/modules/variable-pie.src.js +11 -2
- package/modules/variwide.js +12 -12
- package/modules/variwide.js.map +1 -1
- package/modules/variwide.src.js +11 -2
- package/modules/vector.js +8 -7
- package/modules/vector.js.map +1 -1
- package/modules/vector.src.js +11 -2
- package/modules/venn.js +31 -31
- package/modules/venn.js.map +1 -1
- package/modules/venn.src.js +18 -6
- package/modules/windbarb.js +15 -15
- package/modules/windbarb.js.map +1 -1
- package/modules/windbarb.src.js +11 -2
- package/modules/wordcloud.js +24 -23
- package/modules/wordcloud.js.map +1 -1
- package/modules/wordcloud.src.js +22 -10
- package/modules/xrange.js +16 -16
- package/modules/xrange.js.map +1 -1
- package/modules/xrange.src.js +11 -2
- package/package.json +1 -1
- package/themes/avocado.js +4 -3
- package/themes/avocado.js.map +1 -1
- package/themes/avocado.src.js +11 -2
- package/themes/brand-dark.js +9 -8
- package/themes/brand-dark.js.map +1 -1
- package/themes/brand-dark.src.js +11 -2
- package/themes/brand-light.js +8 -8
- package/themes/brand-light.js.map +1 -1
- package/themes/brand-light.src.js +11 -2
- package/themes/dark-blue.js +9 -8
- package/themes/dark-blue.js.map +1 -1
- package/themes/dark-blue.src.js +11 -2
- package/themes/dark-green.js +9 -8
- package/themes/dark-green.js.map +1 -1
- package/themes/dark-green.src.js +11 -2
- package/themes/dark-unica.js +8 -7
- package/themes/dark-unica.js.map +1 -1
- package/themes/dark-unica.src.js +11 -2
- package/themes/gray.js +9 -8
- package/themes/gray.js.map +1 -1
- package/themes/gray.src.js +11 -2
- package/themes/grid-light.js +5 -4
- package/themes/grid-light.js.map +1 -1
- package/themes/grid-light.src.js +11 -2
- package/themes/grid.js +5 -5
- package/themes/grid.js.map +1 -1
- package/themes/grid.src.js +11 -2
- package/themes/high-contrast-dark.js +7 -7
- package/themes/high-contrast-dark.js.map +1 -1
- package/themes/high-contrast-dark.src.js +21 -12
- package/themes/high-contrast-light.js +3 -3
- package/themes/high-contrast-light.js.map +1 -1
- package/themes/high-contrast-light.src.js +21 -12
- package/themes/sand-signika.js +5 -5
- package/themes/sand-signika.js.map +1 -1
- package/themes/sand-signika.src.js +11 -2
- package/themes/skies.js +5 -5
- package/themes/skies.js.map +1 -1
- package/themes/skies.src.js +11 -2
- package/themes/sunset.js +3 -3
- package/themes/sunset.js.map +1 -1
- package/themes/sunset.src.js +11 -2
- package/es-modules/Maps/ProjectionDefinition.js +0 -9
package/modules/sunburst.src.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Highcharts JS
|
|
2
|
+
* @license Highcharts JS v10.1.0 (2022-04-29)
|
|
3
3
|
*
|
|
4
4
|
* (c) 2016-2021 Highsoft AS
|
|
5
5
|
* Authors: Jon Arild Nygard
|
|
6
6
|
*
|
|
7
7
|
* License: www.highcharts.com/license
|
|
8
8
|
*/
|
|
9
|
-
'use strict';
|
|
10
9
|
(function (factory) {
|
|
11
10
|
if (typeof module === 'object' && module.exports) {
|
|
12
11
|
factory['default'] = factory;
|
|
@@ -21,10 +20,20 @@
|
|
|
21
20
|
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
|
22
21
|
}
|
|
23
22
|
}(function (Highcharts) {
|
|
23
|
+
'use strict';
|
|
24
24
|
var _modules = Highcharts ? Highcharts._modules : {};
|
|
25
25
|
function _registerModule(obj, path, args, fn) {
|
|
26
26
|
if (!obj.hasOwnProperty(path)) {
|
|
27
27
|
obj[path] = fn.apply(null, args);
|
|
28
|
+
|
|
29
|
+
if (typeof CustomEvent === 'function') {
|
|
30
|
+
window.dispatchEvent(
|
|
31
|
+
new CustomEvent(
|
|
32
|
+
'HighchartsModuleLoaded',
|
|
33
|
+
{ detail: { path: path, module: obj[path] }
|
|
34
|
+
})
|
|
35
|
+
);
|
|
36
|
+
}
|
|
28
37
|
}
|
|
29
38
|
}
|
|
30
39
|
_registerModule(_modules, 'Series/ColorMapMixin.js', [_modules['Core/Globals.js'], _modules['Core/Series/Point.js'], _modules['Core/Utilities.js']], function (H, Point, U) {
|
|
@@ -281,12 +290,15 @@
|
|
|
281
290
|
params.attribs['class'] = this.getClassName();
|
|
282
291
|
if (this.shouldDraw()) {
|
|
283
292
|
if (!graphic) {
|
|
284
|
-
this.graphic = graphic =
|
|
285
|
-
renderer
|
|
286
|
-
|
|
293
|
+
this.graphic = graphic = params.shapeType === 'text' ?
|
|
294
|
+
renderer.text() :
|
|
295
|
+
renderer[params.shapeType](params.shapeArgs || {});
|
|
296
|
+
graphic.add(params.group);
|
|
297
|
+
}
|
|
298
|
+
if (css) {
|
|
299
|
+
graphic.css(css);
|
|
287
300
|
}
|
|
288
301
|
graphic
|
|
289
|
-
.css(css)
|
|
290
302
|
.attr(params.attribs)
|
|
291
303
|
.animate(animatableAttribs, params.isNew ? false : animation, onComplete);
|
|
292
304
|
}
|
|
@@ -736,6 +748,931 @@
|
|
|
736
748
|
|
|
737
749
|
return TreeUtilities;
|
|
738
750
|
});
|
|
751
|
+
_registerModule(_modules, 'Extensions/Breadcrumbs.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Utilities.js'], _modules['Core/FormatUtilities.js']], function (Chart, H, D, U, F) {
|
|
752
|
+
/* *
|
|
753
|
+
*
|
|
754
|
+
* Highcharts Breadcrumbs module
|
|
755
|
+
*
|
|
756
|
+
* Authors: Grzegorz Blachlinski, Karol Kolodziej
|
|
757
|
+
*
|
|
758
|
+
* License: www.highcharts.com/license
|
|
759
|
+
*
|
|
760
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
761
|
+
*
|
|
762
|
+
* */
|
|
763
|
+
var defaultOptions = D.defaultOptions;
|
|
764
|
+
var format = F.format;
|
|
765
|
+
var addEvent = U.addEvent,
|
|
766
|
+
objectEach = U.objectEach,
|
|
767
|
+
extend = U.extend,
|
|
768
|
+
fireEvent = U.fireEvent,
|
|
769
|
+
merge = U.merge,
|
|
770
|
+
pick = U.pick,
|
|
771
|
+
defined = U.defined,
|
|
772
|
+
isString = U.isString;
|
|
773
|
+
// Add language support.
|
|
774
|
+
extend(defaultOptions.lang,
|
|
775
|
+
/**
|
|
776
|
+
* @optionparent lang
|
|
777
|
+
*/
|
|
778
|
+
{
|
|
779
|
+
/**
|
|
780
|
+
* @since 10.0.0
|
|
781
|
+
* @product highcharts
|
|
782
|
+
*/
|
|
783
|
+
mainBreadcrumb: 'Main'
|
|
784
|
+
});
|
|
785
|
+
/**
|
|
786
|
+
* The Breadcrumbs class
|
|
787
|
+
*
|
|
788
|
+
* @private
|
|
789
|
+
* @class
|
|
790
|
+
* @name Highcharts.Breadcrumbs
|
|
791
|
+
*
|
|
792
|
+
* @param {Highcharts.Chart} chart
|
|
793
|
+
* Chart object
|
|
794
|
+
* @param {Highcharts.Options} userOptions
|
|
795
|
+
* User options
|
|
796
|
+
*/
|
|
797
|
+
var Breadcrumbs = /** @class */ (function () {
|
|
798
|
+
function Breadcrumbs(chart, userOptions) {
|
|
799
|
+
/* *
|
|
800
|
+
*
|
|
801
|
+
* Properties
|
|
802
|
+
*
|
|
803
|
+
* */
|
|
804
|
+
this.group = void 0;
|
|
805
|
+
this.list = [];
|
|
806
|
+
this.elementList = {};
|
|
807
|
+
this.isDirty = true;
|
|
808
|
+
this.level = 0;
|
|
809
|
+
this.options = void 0;
|
|
810
|
+
var chartOptions = merge(chart.options.drilldown &&
|
|
811
|
+
chart.options.drilldown.drillUpButton,
|
|
812
|
+
Breadcrumbs.defaultBreadcrumbsOptions,
|
|
813
|
+
chart.options.navigation && chart.options.navigation.breadcrumbs,
|
|
814
|
+
userOptions);
|
|
815
|
+
this.chart = chart;
|
|
816
|
+
this.options = chartOptions || {};
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* Update Breadcrumbs properties, like level and list.
|
|
820
|
+
*
|
|
821
|
+
* @requires modules/breadcrumbs
|
|
822
|
+
*
|
|
823
|
+
* @function Highcharts.Breadcrumbs#updateProperties
|
|
824
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
825
|
+
* Breadcrumbs class.
|
|
826
|
+
*/
|
|
827
|
+
Breadcrumbs.prototype.updateProperties = function (list) {
|
|
828
|
+
this.setList(list);
|
|
829
|
+
this.setLevel();
|
|
830
|
+
this.isDirty = true;
|
|
831
|
+
};
|
|
832
|
+
/**
|
|
833
|
+
* Set breadcrumbs list.
|
|
834
|
+
* @function Highcharts.Breadcrumbs#setList
|
|
835
|
+
*
|
|
836
|
+
* @requires modules/breadcrumbs
|
|
837
|
+
*
|
|
838
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
839
|
+
* Breadcrumbs class.
|
|
840
|
+
* @param {Highcharts.BreadcrumbsOptions} list
|
|
841
|
+
* Breadcrumbs list.
|
|
842
|
+
*/
|
|
843
|
+
Breadcrumbs.prototype.setList = function (list) {
|
|
844
|
+
this.list = list;
|
|
845
|
+
};
|
|
846
|
+
/**
|
|
847
|
+
* Calcule level on which chart currently is.
|
|
848
|
+
*
|
|
849
|
+
* @requires modules/breadcrumbs
|
|
850
|
+
*
|
|
851
|
+
* @function Highcharts.Breadcrumbs#setLevel
|
|
852
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
853
|
+
* Breadcrumbs class.
|
|
854
|
+
*/
|
|
855
|
+
Breadcrumbs.prototype.setLevel = function () {
|
|
856
|
+
this.level = this.list.length && this.list.length - 1;
|
|
857
|
+
};
|
|
858
|
+
/**
|
|
859
|
+
* Get Breadcrumbs level
|
|
860
|
+
*
|
|
861
|
+
* @requires modules/breadcrumbs
|
|
862
|
+
*
|
|
863
|
+
* @function Highcharts.Breadcrumbs#getLevel
|
|
864
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
865
|
+
* Breadcrumbs class.
|
|
866
|
+
*/
|
|
867
|
+
Breadcrumbs.prototype.getLevel = function () {
|
|
868
|
+
return this.level;
|
|
869
|
+
};
|
|
870
|
+
/**
|
|
871
|
+
* Default button text formatter.
|
|
872
|
+
*
|
|
873
|
+
* @requires modules/breadcrumbs
|
|
874
|
+
*
|
|
875
|
+
* @function Highcharts.Breadcrumbs#getButtonText
|
|
876
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
877
|
+
* Breadcrumbs class.
|
|
878
|
+
* @param {Highcharts.Breadcrumbs} breadcrumb
|
|
879
|
+
* Breadcrumb.
|
|
880
|
+
* @return {string}
|
|
881
|
+
* Formatted text.
|
|
882
|
+
*/
|
|
883
|
+
Breadcrumbs.prototype.getButtonText = function (breadcrumb) {
|
|
884
|
+
var breadcrumbs = this,
|
|
885
|
+
chart = breadcrumbs.chart,
|
|
886
|
+
breadcrumbsOptions = breadcrumbs.options,
|
|
887
|
+
lang = chart.options.lang,
|
|
888
|
+
textFormat = pick(breadcrumbsOptions.format,
|
|
889
|
+
breadcrumbsOptions.showFullPath ?
|
|
890
|
+
'{level.name}' : '← {level.name}'),
|
|
891
|
+
defaultText = lang && pick(lang.drillUpText,
|
|
892
|
+
lang.mainBreadcrumb);
|
|
893
|
+
var returnText = breadcrumbsOptions.formatter &&
|
|
894
|
+
breadcrumbsOptions.formatter(breadcrumb) ||
|
|
895
|
+
format(textFormat, { level: breadcrumb.levelOptions },
|
|
896
|
+
chart) || '';
|
|
897
|
+
if (((isString(returnText) &&
|
|
898
|
+
!returnText.length) ||
|
|
899
|
+
returnText === '← ') &&
|
|
900
|
+
defined(defaultText)) {
|
|
901
|
+
returnText = !breadcrumbsOptions.showFullPath ?
|
|
902
|
+
'← ' + defaultText :
|
|
903
|
+
defaultText;
|
|
904
|
+
}
|
|
905
|
+
return returnText;
|
|
906
|
+
};
|
|
907
|
+
/**
|
|
908
|
+
* Redraw.
|
|
909
|
+
*
|
|
910
|
+
* @requires modules/breadcrums
|
|
911
|
+
*
|
|
912
|
+
* @function Highcharts.Breadcrumbs#redraw
|
|
913
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
914
|
+
* Breadcrumbs class.
|
|
915
|
+
*/
|
|
916
|
+
Breadcrumbs.prototype.redraw = function () {
|
|
917
|
+
if (this.isDirty) {
|
|
918
|
+
this.render();
|
|
919
|
+
}
|
|
920
|
+
if (this.group) {
|
|
921
|
+
this.group.align();
|
|
922
|
+
}
|
|
923
|
+
this.isDirty = false;
|
|
924
|
+
};
|
|
925
|
+
/**
|
|
926
|
+
* Create a group, then draw breadcrumbs together with the separators.
|
|
927
|
+
*
|
|
928
|
+
* @requires modules/breadcrumbs
|
|
929
|
+
*
|
|
930
|
+
* @function Highcharts.Breadcrumbs#render
|
|
931
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
932
|
+
* Breadcrumbs class.
|
|
933
|
+
*/
|
|
934
|
+
Breadcrumbs.prototype.render = function () {
|
|
935
|
+
var breadcrumbs = this,
|
|
936
|
+
chart = breadcrumbs.chart,
|
|
937
|
+
breadcrumbsOptions = breadcrumbs.options;
|
|
938
|
+
// A main group for the breadcrumbs.
|
|
939
|
+
if (!breadcrumbs.group && breadcrumbsOptions) {
|
|
940
|
+
breadcrumbs.group = chart.renderer
|
|
941
|
+
.g('breadcrumbs-group')
|
|
942
|
+
.addClass('highcharts-no-tooltip highcharts-breadcrumbs')
|
|
943
|
+
.attr({
|
|
944
|
+
zIndex: breadcrumbsOptions.zIndex
|
|
945
|
+
})
|
|
946
|
+
.add();
|
|
947
|
+
}
|
|
948
|
+
// Draw breadcrumbs.
|
|
949
|
+
if (breadcrumbsOptions.showFullPath) {
|
|
950
|
+
this.renderFullPathButtons();
|
|
951
|
+
}
|
|
952
|
+
else {
|
|
953
|
+
this.renderSingleButton();
|
|
954
|
+
}
|
|
955
|
+
this.alignBreadcrumbsGroup();
|
|
956
|
+
};
|
|
957
|
+
/**
|
|
958
|
+
* Draw breadcrumbs together with the separators.
|
|
959
|
+
*
|
|
960
|
+
* @requires modules/breadcrumbs
|
|
961
|
+
*
|
|
962
|
+
* @function Highcharts.Breadcrumbs#renderFullPathButtons
|
|
963
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
964
|
+
* Breadcrumbs class.
|
|
965
|
+
*/
|
|
966
|
+
Breadcrumbs.prototype.renderFullPathButtons = function () {
|
|
967
|
+
// Make sure that only one type of button is visible.
|
|
968
|
+
this.destroySingleButton();
|
|
969
|
+
this.resetElementListState();
|
|
970
|
+
this.updateListElements();
|
|
971
|
+
this.destroyListElements();
|
|
972
|
+
};
|
|
973
|
+
/**
|
|
974
|
+
* Render Single button - when showFullPath is not used. The button is
|
|
975
|
+
* similar to the old drillUpButton
|
|
976
|
+
*
|
|
977
|
+
* @requires modules/breadcrumbs
|
|
978
|
+
*
|
|
979
|
+
* @function Highcharts.Breadcrumbs#renderSingleButton
|
|
980
|
+
* @param {Highcharts.Breadcrumbs} this Breadcrumbs class.
|
|
981
|
+
*/
|
|
982
|
+
Breadcrumbs.prototype.renderSingleButton = function () {
|
|
983
|
+
var breadcrumbs = this,
|
|
984
|
+
chart = breadcrumbs.chart,
|
|
985
|
+
list = breadcrumbs.list,
|
|
986
|
+
breadcrumbsOptions = breadcrumbs.options,
|
|
987
|
+
buttonSpacing = breadcrumbsOptions.buttonSpacing;
|
|
988
|
+
// Make sure that only one type of button is visible.
|
|
989
|
+
this.destroyListElements();
|
|
990
|
+
// Draw breadcrumbs. Inital position for calculating the breadcrumbs
|
|
991
|
+
// group.
|
|
992
|
+
var posX = breadcrumbs.group ?
|
|
993
|
+
breadcrumbs.group.getBBox().width :
|
|
994
|
+
buttonSpacing,
|
|
995
|
+
posY = buttonSpacing;
|
|
996
|
+
var previousBreadcrumb = list[list.length - 2];
|
|
997
|
+
if (!chart.drillUpButton && (this.level > 0)) {
|
|
998
|
+
chart.drillUpButton = breadcrumbs.renderButton(previousBreadcrumb, posX, posY);
|
|
999
|
+
}
|
|
1000
|
+
else if (chart.drillUpButton) {
|
|
1001
|
+
if (this.level > 0) {
|
|
1002
|
+
// Update button.
|
|
1003
|
+
this.updateSingleButton();
|
|
1004
|
+
}
|
|
1005
|
+
else {
|
|
1006
|
+
this.destroySingleButton();
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
};
|
|
1010
|
+
/**
|
|
1011
|
+
* Update group position based on align and it's width.
|
|
1012
|
+
*
|
|
1013
|
+
* @requires modules/breadcrumbs
|
|
1014
|
+
*
|
|
1015
|
+
* @function Highcharts.Breadcrumbs#renderSingleButton
|
|
1016
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1017
|
+
* Breadcrumbs class.
|
|
1018
|
+
*/
|
|
1019
|
+
Breadcrumbs.prototype.alignBreadcrumbsGroup = function (xOffset) {
|
|
1020
|
+
var breadcrumbs = this;
|
|
1021
|
+
if (breadcrumbs.group) {
|
|
1022
|
+
var breadcrumbsOptions = breadcrumbs.options,
|
|
1023
|
+
buttonTheme = breadcrumbsOptions.buttonTheme,
|
|
1024
|
+
positionOptions = breadcrumbsOptions.position,
|
|
1025
|
+
alignTo = (breadcrumbsOptions.relativeTo === 'chart' ||
|
|
1026
|
+
breadcrumbsOptions.relativeTo === 'spacingBox' ?
|
|
1027
|
+
void 0 :
|
|
1028
|
+
'scrollablePlotBox'),
|
|
1029
|
+
bBox = breadcrumbs.group.getBBox(),
|
|
1030
|
+
additionalSpace = 2 * (buttonTheme.padding || 0) +
|
|
1031
|
+
breadcrumbsOptions.buttonSpacing;
|
|
1032
|
+
// Store positionOptions
|
|
1033
|
+
positionOptions.width = bBox.width + additionalSpace;
|
|
1034
|
+
positionOptions.height = bBox.height + additionalSpace;
|
|
1035
|
+
var newPositions = merge(positionOptions);
|
|
1036
|
+
// Add x offset if specified.
|
|
1037
|
+
if (xOffset) {
|
|
1038
|
+
newPositions.x += xOffset;
|
|
1039
|
+
}
|
|
1040
|
+
newPositions.y = pick(newPositions.y, this.yOffset, 0);
|
|
1041
|
+
breadcrumbs.group.align(newPositions, true, alignTo);
|
|
1042
|
+
}
|
|
1043
|
+
};
|
|
1044
|
+
/**
|
|
1045
|
+
* Render a button.
|
|
1046
|
+
*
|
|
1047
|
+
* @requires modules/breadcrums
|
|
1048
|
+
*
|
|
1049
|
+
* @function Highcharts.Breadcrumbs#renderButton
|
|
1050
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1051
|
+
* Breadcrumbs class.
|
|
1052
|
+
* @param {Highcharts.Breadcrumbs} breadcrumb
|
|
1053
|
+
* Current breadcrumb
|
|
1054
|
+
* @param {Highcharts.Breadcrumbs} posX
|
|
1055
|
+
* Initial horizontal position
|
|
1056
|
+
* @param {Highcharts.Breadcrumbs} posY
|
|
1057
|
+
* Initial vertical position
|
|
1058
|
+
* @return {SVGElement|void}
|
|
1059
|
+
* Returns the SVG button
|
|
1060
|
+
*/
|
|
1061
|
+
Breadcrumbs.prototype.renderButton = function (breadcrumb, posX, posY) {
|
|
1062
|
+
var breadcrumbs = this,
|
|
1063
|
+
chart = this.chart,
|
|
1064
|
+
breadcrumbsOptions = breadcrumbs.options,
|
|
1065
|
+
buttonTheme = merge(breadcrumbsOptions.buttonTheme);
|
|
1066
|
+
var button = chart.renderer
|
|
1067
|
+
.button(breadcrumbs.getButtonText(breadcrumb),
|
|
1068
|
+
posX,
|
|
1069
|
+
posY,
|
|
1070
|
+
function (e) {
|
|
1071
|
+
// Extract events from button object and call
|
|
1072
|
+
var buttonEvents = breadcrumbsOptions.events &&
|
|
1073
|
+
breadcrumbsOptions.events.click;
|
|
1074
|
+
var callDefaultEvent;
|
|
1075
|
+
if (buttonEvents) {
|
|
1076
|
+
callDefaultEvent = buttonEvents.call(breadcrumbs, e, breadcrumb);
|
|
1077
|
+
}
|
|
1078
|
+
// (difference in behaviour of showFullPath and drillUp)
|
|
1079
|
+
if (callDefaultEvent !== false) {
|
|
1080
|
+
// For single button we are not going to the button
|
|
1081
|
+
// level, but the one level up
|
|
1082
|
+
if (!breadcrumbsOptions.showFullPath) {
|
|
1083
|
+
e.newLevel = breadcrumbs.level - 1;
|
|
1084
|
+
}
|
|
1085
|
+
else {
|
|
1086
|
+
e.newLevel = breadcrumb.level;
|
|
1087
|
+
}
|
|
1088
|
+
fireEvent(breadcrumbs, 'up', e);
|
|
1089
|
+
}
|
|
1090
|
+
}, buttonTheme)
|
|
1091
|
+
.addClass('highcharts-breadcrumbs-button')
|
|
1092
|
+
.add(breadcrumbs.group);
|
|
1093
|
+
if (!chart.styledMode) {
|
|
1094
|
+
button.attr(breadcrumbsOptions.style);
|
|
1095
|
+
}
|
|
1096
|
+
return button;
|
|
1097
|
+
};
|
|
1098
|
+
/**
|
|
1099
|
+
* Render a separator.
|
|
1100
|
+
*
|
|
1101
|
+
* @requires modules/breadcrums
|
|
1102
|
+
*
|
|
1103
|
+
* @function Highcharts.Breadcrumbs#renderSeparator
|
|
1104
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1105
|
+
* Breadcrumbs class.
|
|
1106
|
+
* @param {Highcharts.Breadcrumbs} posX
|
|
1107
|
+
* Initial horizontal position
|
|
1108
|
+
* @param {Highcharts.Breadcrumbs} posY
|
|
1109
|
+
* Initial vertical position
|
|
1110
|
+
* @return {Highcharts.SVGElement}
|
|
1111
|
+
* Returns the SVG button
|
|
1112
|
+
*/
|
|
1113
|
+
Breadcrumbs.prototype.renderSeparator = function (posX, posY) {
|
|
1114
|
+
var breadcrumbs = this,
|
|
1115
|
+
chart = this.chart,
|
|
1116
|
+
breadcrumbsOptions = breadcrumbs.options,
|
|
1117
|
+
separatorOptions = breadcrumbsOptions.separator;
|
|
1118
|
+
var separator = chart.renderer
|
|
1119
|
+
.label(separatorOptions.text,
|
|
1120
|
+
posX,
|
|
1121
|
+
posY,
|
|
1122
|
+
void 0,
|
|
1123
|
+
void 0,
|
|
1124
|
+
void 0,
|
|
1125
|
+
false)
|
|
1126
|
+
.addClass('highcharts-breadcrumbs-separator')
|
|
1127
|
+
.add(breadcrumbs.group);
|
|
1128
|
+
if (!chart.styledMode) {
|
|
1129
|
+
separator.css(separatorOptions.style);
|
|
1130
|
+
}
|
|
1131
|
+
return separator;
|
|
1132
|
+
};
|
|
1133
|
+
/**
|
|
1134
|
+
* Update.
|
|
1135
|
+
* @function Highcharts.Breadcrumbs#update
|
|
1136
|
+
*
|
|
1137
|
+
* @requires modules/breadcrumbs
|
|
1138
|
+
*
|
|
1139
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1140
|
+
* Breadcrumbs class.
|
|
1141
|
+
* @param {Highcharts.BreadcrumbsOptions} options
|
|
1142
|
+
* Breadcrumbs class.
|
|
1143
|
+
* @param {boolean} redraw
|
|
1144
|
+
* Redraw flag
|
|
1145
|
+
*/
|
|
1146
|
+
Breadcrumbs.prototype.update = function (options) {
|
|
1147
|
+
merge(true, this.options, options);
|
|
1148
|
+
this.destroy();
|
|
1149
|
+
this.isDirty = true;
|
|
1150
|
+
};
|
|
1151
|
+
/**
|
|
1152
|
+
* Update button text when the showFullPath set to false.
|
|
1153
|
+
* @function Highcharts.Breadcrumbs#updateSingleButton
|
|
1154
|
+
*
|
|
1155
|
+
* @requires modules/breadcrumbs
|
|
1156
|
+
*
|
|
1157
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1158
|
+
* Breadcrumbs class.
|
|
1159
|
+
*/
|
|
1160
|
+
Breadcrumbs.prototype.updateSingleButton = function () {
|
|
1161
|
+
var chart = this.chart,
|
|
1162
|
+
currentBreadcrumb = this.list[this.level - 1];
|
|
1163
|
+
if (chart.drillUpButton) {
|
|
1164
|
+
chart.drillUpButton.attr({
|
|
1165
|
+
text: this.getButtonText(currentBreadcrumb)
|
|
1166
|
+
});
|
|
1167
|
+
}
|
|
1168
|
+
};
|
|
1169
|
+
/**
|
|
1170
|
+
* Destroy the chosen breadcrumbs group
|
|
1171
|
+
*
|
|
1172
|
+
* @requires modules/breadcrumbs
|
|
1173
|
+
*
|
|
1174
|
+
* @function Highcharts.Breadcrumbs#destroy
|
|
1175
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1176
|
+
* Breadcrumbs class.
|
|
1177
|
+
*/
|
|
1178
|
+
Breadcrumbs.prototype.destroy = function () {
|
|
1179
|
+
this.destroySingleButton();
|
|
1180
|
+
// Destroy elements one by one. It's necessary beacause
|
|
1181
|
+
// g().destroy() does not remove added HTML
|
|
1182
|
+
this.destroyListElements(true);
|
|
1183
|
+
// Then, destroy the group itself.
|
|
1184
|
+
if (this.group) {
|
|
1185
|
+
this.group.destroy();
|
|
1186
|
+
}
|
|
1187
|
+
this.group = void 0;
|
|
1188
|
+
};
|
|
1189
|
+
/**
|
|
1190
|
+
* Destroy the elements' buttons and separators.
|
|
1191
|
+
*
|
|
1192
|
+
* @requires modules/breadcrumbs
|
|
1193
|
+
*
|
|
1194
|
+
* @function Highcharts.Breadcrumbs#destroyListElements
|
|
1195
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1196
|
+
* Breadcrumbs class.
|
|
1197
|
+
*/
|
|
1198
|
+
Breadcrumbs.prototype.destroyListElements = function (force) {
|
|
1199
|
+
var elementList = this.elementList;
|
|
1200
|
+
objectEach(elementList, function (element, level) {
|
|
1201
|
+
if (force ||
|
|
1202
|
+
!elementList[level].updated) {
|
|
1203
|
+
element = elementList[level];
|
|
1204
|
+
element.button && element.button.destroy();
|
|
1205
|
+
element.separator && element.separator.destroy();
|
|
1206
|
+
delete element.button;
|
|
1207
|
+
delete element.separator;
|
|
1208
|
+
delete elementList[level];
|
|
1209
|
+
}
|
|
1210
|
+
});
|
|
1211
|
+
if (force) {
|
|
1212
|
+
this.elementList = {};
|
|
1213
|
+
}
|
|
1214
|
+
};
|
|
1215
|
+
/**
|
|
1216
|
+
* Destroy the single button if exists.
|
|
1217
|
+
*
|
|
1218
|
+
* @requires modules/breadcrumbs
|
|
1219
|
+
*
|
|
1220
|
+
* @function Highcharts.Breadcrumbs#destroySingleButton
|
|
1221
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1222
|
+
* Breadcrumbs class.
|
|
1223
|
+
*/
|
|
1224
|
+
Breadcrumbs.prototype.destroySingleButton = function () {
|
|
1225
|
+
if (this.chart.drillUpButton) {
|
|
1226
|
+
this.chart.drillUpButton.destroy();
|
|
1227
|
+
this.chart.drillUpButton = void 0;
|
|
1228
|
+
}
|
|
1229
|
+
};
|
|
1230
|
+
/**
|
|
1231
|
+
* Reset state for all buttons in elementList.
|
|
1232
|
+
*
|
|
1233
|
+
* @requires modules/breadcrumbs
|
|
1234
|
+
*
|
|
1235
|
+
* @function Highcharts.Breadcrumbs#resetElementListState
|
|
1236
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1237
|
+
* Breadcrumbs class.
|
|
1238
|
+
*/
|
|
1239
|
+
Breadcrumbs.prototype.resetElementListState = function () {
|
|
1240
|
+
objectEach(this.elementList, function (element) {
|
|
1241
|
+
element.updated = false;
|
|
1242
|
+
});
|
|
1243
|
+
};
|
|
1244
|
+
/**
|
|
1245
|
+
* Update rendered elements inside the elementList.
|
|
1246
|
+
*
|
|
1247
|
+
* @requires modules/breadcrumbs
|
|
1248
|
+
*
|
|
1249
|
+
* @function Highcharts.Breadcrumbs#updateListElements
|
|
1250
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1251
|
+
* Breadcrumbs class.
|
|
1252
|
+
*/
|
|
1253
|
+
Breadcrumbs.prototype.updateListElements = function () {
|
|
1254
|
+
var updateXPosition = function (element,
|
|
1255
|
+
spacing) {
|
|
1256
|
+
return element.getBBox().width + spacing;
|
|
1257
|
+
}, breadcrumbs = this, elementList = breadcrumbs.elementList, buttonSpacing = breadcrumbs.options.buttonSpacing, list = breadcrumbs.list;
|
|
1258
|
+
// Inital position for calculating the breadcrumbs group.
|
|
1259
|
+
var posX = breadcrumbs.group ?
|
|
1260
|
+
updateXPosition(breadcrumbs.group,
|
|
1261
|
+
buttonSpacing) :
|
|
1262
|
+
buttonSpacing,
|
|
1263
|
+
posY = buttonSpacing,
|
|
1264
|
+
currentBreadcrumb;
|
|
1265
|
+
list.forEach(function (breadcrumb, index) {
|
|
1266
|
+
var isLast = index === list.length - 1;
|
|
1267
|
+
var button,
|
|
1268
|
+
separator;
|
|
1269
|
+
if (elementList[breadcrumb.level]) {
|
|
1270
|
+
currentBreadcrumb = elementList[breadcrumb.level];
|
|
1271
|
+
button = currentBreadcrumb.button;
|
|
1272
|
+
// Render a separator if it was not created before.
|
|
1273
|
+
if (!currentBreadcrumb.separator &&
|
|
1274
|
+
!isLast) {
|
|
1275
|
+
// Add spacing for the next separator
|
|
1276
|
+
posX += buttonSpacing;
|
|
1277
|
+
currentBreadcrumb.separator =
|
|
1278
|
+
breadcrumbs.renderSeparator(posX, posY);
|
|
1279
|
+
posX += updateXPosition(currentBreadcrumb.separator, buttonSpacing);
|
|
1280
|
+
}
|
|
1281
|
+
else if (currentBreadcrumb.separator &&
|
|
1282
|
+
isLast) {
|
|
1283
|
+
currentBreadcrumb.separator.destroy();
|
|
1284
|
+
delete currentBreadcrumb.separator;
|
|
1285
|
+
}
|
|
1286
|
+
elementList[breadcrumb.level].updated = true;
|
|
1287
|
+
}
|
|
1288
|
+
else {
|
|
1289
|
+
// Render a button.
|
|
1290
|
+
button = breadcrumbs.renderButton(breadcrumb, posX, posY);
|
|
1291
|
+
posX += updateXPosition(button, buttonSpacing);
|
|
1292
|
+
// Render a separator.
|
|
1293
|
+
if (!isLast) {
|
|
1294
|
+
separator = breadcrumbs.renderSeparator(posX, posY);
|
|
1295
|
+
posX += updateXPosition(separator, buttonSpacing);
|
|
1296
|
+
}
|
|
1297
|
+
elementList[breadcrumb.level] = {
|
|
1298
|
+
button: button,
|
|
1299
|
+
separator: separator,
|
|
1300
|
+
updated: true
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
if (button) {
|
|
1304
|
+
button.setState(isLast ? 2 : 0);
|
|
1305
|
+
}
|
|
1306
|
+
});
|
|
1307
|
+
};
|
|
1308
|
+
/**
|
|
1309
|
+
* Options for breadcrumbs. Breadcrumbs general options are defined in
|
|
1310
|
+
* `navigation.breadcrumbs`. Specific options for drilldown are set in
|
|
1311
|
+
* `drilldown.breadcrumbs` and for tree-like series traversing, in
|
|
1312
|
+
* `plotOptions[series].breadcrumbs`.
|
|
1313
|
+
*
|
|
1314
|
+
* @since 10.0.0
|
|
1315
|
+
* @product highcharts
|
|
1316
|
+
* @optionparent navigation.breadcrumbs
|
|
1317
|
+
*/
|
|
1318
|
+
Breadcrumbs.defaultBreadcrumbsOptions = {
|
|
1319
|
+
/**
|
|
1320
|
+
* A collection of attributes for the buttons. The object takes SVG
|
|
1321
|
+
* attributes like `fill`, `stroke`, `stroke-width`, as well as `style`,
|
|
1322
|
+
* a collection of CSS properties for the text.
|
|
1323
|
+
*
|
|
1324
|
+
* The object can also be extended with states, so you can set
|
|
1325
|
+
* presentational options for `hover`, `select` or `disabled` button
|
|
1326
|
+
* states.
|
|
1327
|
+
*
|
|
1328
|
+
* @sample {highcharts} highcharts/breadcrumbs/single-button
|
|
1329
|
+
* Themed, single button
|
|
1330
|
+
*
|
|
1331
|
+
* @type {Highcharts.SVGAttributes}
|
|
1332
|
+
* @since 10.0.0
|
|
1333
|
+
* @product highcharts
|
|
1334
|
+
*/
|
|
1335
|
+
buttonTheme: {
|
|
1336
|
+
/** @ignore */
|
|
1337
|
+
fill: 'none',
|
|
1338
|
+
/** @ignore */
|
|
1339
|
+
height: 18,
|
|
1340
|
+
/** @ignore */
|
|
1341
|
+
padding: 2,
|
|
1342
|
+
/** @ignore */
|
|
1343
|
+
'stroke-width': 0,
|
|
1344
|
+
/** @ignore */
|
|
1345
|
+
zIndex: 7,
|
|
1346
|
+
/** @ignore */
|
|
1347
|
+
states: {
|
|
1348
|
+
select: {
|
|
1349
|
+
fill: 'none'
|
|
1350
|
+
}
|
|
1351
|
+
},
|
|
1352
|
+
style: {
|
|
1353
|
+
color: "#335cad" /* highlightColor80 */
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
/**
|
|
1357
|
+
* The default padding for each button and separator in each direction.
|
|
1358
|
+
*
|
|
1359
|
+
* @type {number}
|
|
1360
|
+
* @since 10.0.0
|
|
1361
|
+
*/
|
|
1362
|
+
buttonSpacing: 5,
|
|
1363
|
+
/**
|
|
1364
|
+
* Fires when clicking on the breadcrumbs button. Two arguments are
|
|
1365
|
+
* passed to the function. First breadcrumb button as an SVG element.
|
|
1366
|
+
* Second is the breadcrumbs class, containing reference to the chart,
|
|
1367
|
+
* series etc.
|
|
1368
|
+
*
|
|
1369
|
+
* ```js
|
|
1370
|
+
* click: function(button, breadcrumbs) {
|
|
1371
|
+
* console.log(button);
|
|
1372
|
+
* }
|
|
1373
|
+
* ```
|
|
1374
|
+
*
|
|
1375
|
+
* Return false to stop default buttons click action.
|
|
1376
|
+
*
|
|
1377
|
+
* @type {Highcharts.BreadcrumbsClickCallbackFunction}
|
|
1378
|
+
* @since 10.0.0
|
|
1379
|
+
* @apioption navigation.breadcrumbs.events.click
|
|
1380
|
+
*/
|
|
1381
|
+
/**
|
|
1382
|
+
* When the breadcrumbs are floating, the plot area will not move to
|
|
1383
|
+
* make space for it. By default, the chart will not make space for the
|
|
1384
|
+
* buttons. This property won't work when positioned in the middle.
|
|
1385
|
+
*
|
|
1386
|
+
* @sample highcharts/breadcrumbs/single-button
|
|
1387
|
+
* Floating button
|
|
1388
|
+
* @type {boolean}
|
|
1389
|
+
* @since 10.0.0
|
|
1390
|
+
*/
|
|
1391
|
+
floating: false,
|
|
1392
|
+
/**
|
|
1393
|
+
* A format string for the breadcrumbs button. Variables are enclosed by
|
|
1394
|
+
* curly brackets. Available values are passed in the declared point
|
|
1395
|
+
* options.
|
|
1396
|
+
*
|
|
1397
|
+
* @type {string|undefined}
|
|
1398
|
+
* @since 10.0.0
|
|
1399
|
+
* @default undefined
|
|
1400
|
+
* @sample {highcharts} highcharts/breadcrumbs/format Display custom
|
|
1401
|
+
* values in breadcrumb button.
|
|
1402
|
+
*/
|
|
1403
|
+
format: void 0,
|
|
1404
|
+
/**
|
|
1405
|
+
* Callback function to format the breadcrumb text from scratch.
|
|
1406
|
+
*
|
|
1407
|
+
* @type {Highcharts.BreadcrumbsFormatterCallbackFunction}
|
|
1408
|
+
* @since 10.0.0
|
|
1409
|
+
* @default undefined
|
|
1410
|
+
* @apioption navigation.breadcrumbs.formatter
|
|
1411
|
+
*/
|
|
1412
|
+
/**
|
|
1413
|
+
* What box to align the button to. Can be either `plotBox` or
|
|
1414
|
+
* `spacingBox`.
|
|
1415
|
+
*
|
|
1416
|
+
* @type {Highcharts.ButtonRelativeToValue}
|
|
1417
|
+
* @default plotBox
|
|
1418
|
+
* @since 10.0.0
|
|
1419
|
+
* @product highcharts highmaps
|
|
1420
|
+
*/
|
|
1421
|
+
relativeTo: 'plotBox',
|
|
1422
|
+
/**
|
|
1423
|
+
* Positioning for the button row. The breadcrumbs buttons will be
|
|
1424
|
+
* aligned properly for the default chart layout (title, subtitle,
|
|
1425
|
+
* legend, range selector) for the custom chart layout set the position
|
|
1426
|
+
* properties.
|
|
1427
|
+
* @type {Highcharts.BreadcrumbsAlignOptions}
|
|
1428
|
+
* @since 10.0.0
|
|
1429
|
+
* @product highcharts highmaps
|
|
1430
|
+
* @sample {highcharts} highcharts/breadcrumbs/single-button
|
|
1431
|
+
* Single, right aligned button
|
|
1432
|
+
*/
|
|
1433
|
+
position: {
|
|
1434
|
+
/**
|
|
1435
|
+
* Horizontal alignment of the breadcrumbs buttons.
|
|
1436
|
+
*
|
|
1437
|
+
* @type {Highcharts.AlignValue}
|
|
1438
|
+
*/
|
|
1439
|
+
align: 'left',
|
|
1440
|
+
/**
|
|
1441
|
+
* Vertical alignment of the breadcrumbs buttons.
|
|
1442
|
+
*
|
|
1443
|
+
* @type {Highcharts.VerticalAlignValue}
|
|
1444
|
+
*/
|
|
1445
|
+
verticalAlign: 'top',
|
|
1446
|
+
/**
|
|
1447
|
+
* The X offset of the breadcrumbs button group.
|
|
1448
|
+
*
|
|
1449
|
+
* @type {number}
|
|
1450
|
+
*/
|
|
1451
|
+
x: 0,
|
|
1452
|
+
/**
|
|
1453
|
+
* The Y offset of the breadcrumbs button group. When `undefined`,
|
|
1454
|
+
* and `floating` is `false`, the `y` position is adapted so that
|
|
1455
|
+
* the breadcrumbs are rendered outside the target area.
|
|
1456
|
+
*
|
|
1457
|
+
* @type {number|undefined}
|
|
1458
|
+
*/
|
|
1459
|
+
y: void 0
|
|
1460
|
+
},
|
|
1461
|
+
/**
|
|
1462
|
+
* Options object for Breadcrumbs separator.
|
|
1463
|
+
*
|
|
1464
|
+
* @since 10.0.0
|
|
1465
|
+
*/
|
|
1466
|
+
separator: {
|
|
1467
|
+
/**
|
|
1468
|
+
* @type {string}
|
|
1469
|
+
* @since 10.0.0
|
|
1470
|
+
* @product highcharts
|
|
1471
|
+
*/
|
|
1472
|
+
text: '/',
|
|
1473
|
+
/**
|
|
1474
|
+
* CSS styles for the breadcrumbs separator.
|
|
1475
|
+
*
|
|
1476
|
+
* In styled mode, the breadcrumbs separators are styled by the
|
|
1477
|
+
* `.highcharts-separator` rule with its different states.
|
|
1478
|
+
* @type {Highcharts.CSSObject}
|
|
1479
|
+
* @since 10.0.0
|
|
1480
|
+
*/
|
|
1481
|
+
style: {
|
|
1482
|
+
color: "#666666" /* neutralColor60 */
|
|
1483
|
+
}
|
|
1484
|
+
},
|
|
1485
|
+
/**
|
|
1486
|
+
* Show full path or only a single button.
|
|
1487
|
+
*
|
|
1488
|
+
* @type {boolean}
|
|
1489
|
+
* @since 10.0.0
|
|
1490
|
+
* @sample {highcharts} highcharts/breadcrumbs/single-button
|
|
1491
|
+
* Single, styled button
|
|
1492
|
+
*/
|
|
1493
|
+
showFullPath: true,
|
|
1494
|
+
/**
|
|
1495
|
+
* CSS styles for all breadcrumbs.
|
|
1496
|
+
*
|
|
1497
|
+
* In styled mode, the breadcrumbs buttons are styled by the
|
|
1498
|
+
* `.highcharts-breadcrumbs-buttons .highcharts-button` rule with its
|
|
1499
|
+
* different states.
|
|
1500
|
+
* @type {Highcharts.SVGAttributes}
|
|
1501
|
+
* @since 10.0.0
|
|
1502
|
+
*/
|
|
1503
|
+
style: {},
|
|
1504
|
+
/**
|
|
1505
|
+
* Whether to use HTML to render the breadcrumbs items texts.
|
|
1506
|
+
*
|
|
1507
|
+
* @type {boolean}
|
|
1508
|
+
* @since 10.0.0
|
|
1509
|
+
*/
|
|
1510
|
+
useHTML: false,
|
|
1511
|
+
/**
|
|
1512
|
+
* The z index of the breadcrumbs group.
|
|
1513
|
+
*
|
|
1514
|
+
* @type {number}
|
|
1515
|
+
* @since 10.0.0
|
|
1516
|
+
*/
|
|
1517
|
+
zIndex: 7
|
|
1518
|
+
};
|
|
1519
|
+
return Breadcrumbs;
|
|
1520
|
+
}());
|
|
1521
|
+
/* eslint-disable no-invalid-this */
|
|
1522
|
+
if (!H.Breadcrumbs) {
|
|
1523
|
+
H.Breadcrumbs = Breadcrumbs;
|
|
1524
|
+
// Logic for making space for the buttons above the plot area
|
|
1525
|
+
addEvent(Chart, 'getMargins', function () {
|
|
1526
|
+
var breadcrumbs = this.breadcrumbs;
|
|
1527
|
+
if (breadcrumbs &&
|
|
1528
|
+
!breadcrumbs.options.floating &&
|
|
1529
|
+
breadcrumbs.level) {
|
|
1530
|
+
var breadcrumbsOptions = breadcrumbs.options,
|
|
1531
|
+
buttonTheme = breadcrumbsOptions.buttonTheme,
|
|
1532
|
+
breadcrumbsHeight = ((buttonTheme.height || 0) +
|
|
1533
|
+
2 * (buttonTheme.padding || 0) +
|
|
1534
|
+
breadcrumbsOptions.buttonSpacing),
|
|
1535
|
+
verticalAlign = breadcrumbsOptions.position.verticalAlign;
|
|
1536
|
+
if (verticalAlign === 'bottom') {
|
|
1537
|
+
this.marginBottom = (this.marginBottom || 0) + breadcrumbsHeight;
|
|
1538
|
+
breadcrumbs.yOffset = breadcrumbsHeight;
|
|
1539
|
+
}
|
|
1540
|
+
else if (verticalAlign !== 'middle') {
|
|
1541
|
+
this.plotTop += breadcrumbsHeight;
|
|
1542
|
+
breadcrumbs.yOffset = -breadcrumbsHeight;
|
|
1543
|
+
}
|
|
1544
|
+
else {
|
|
1545
|
+
breadcrumbs.yOffset = void 0;
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
});
|
|
1549
|
+
addEvent(Chart, 'redraw', function () {
|
|
1550
|
+
this.breadcrumbs && this.breadcrumbs.redraw();
|
|
1551
|
+
});
|
|
1552
|
+
// Remove resize/afterSetExtremes at chart destroy
|
|
1553
|
+
addEvent(Chart, 'destroy', function destroyEvents() {
|
|
1554
|
+
if (this.breadcrumbs) {
|
|
1555
|
+
this.breadcrumbs.destroy();
|
|
1556
|
+
this.breadcrumbs = void 0;
|
|
1557
|
+
}
|
|
1558
|
+
});
|
|
1559
|
+
// Shift the drillUpButton to make the space for resetZoomButton, #8095.
|
|
1560
|
+
addEvent(Chart, 'afterShowResetZoom', function () {
|
|
1561
|
+
var chart = this;
|
|
1562
|
+
if (chart.breadcrumbs) {
|
|
1563
|
+
var bbox = chart.resetZoomButton &&
|
|
1564
|
+
chart.resetZoomButton.getBBox(),
|
|
1565
|
+
breadcrumbsOptions = chart.breadcrumbs.options;
|
|
1566
|
+
if (bbox &&
|
|
1567
|
+
breadcrumbsOptions.position.align === 'right' &&
|
|
1568
|
+
breadcrumbsOptions.relativeTo === 'plotBox') {
|
|
1569
|
+
chart.breadcrumbs.alignBreadcrumbsGroup(-bbox.width - breadcrumbsOptions.buttonSpacing);
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
});
|
|
1573
|
+
// After zooming out, shift the drillUpButton
|
|
1574
|
+
// to the previous position, #8095.
|
|
1575
|
+
addEvent(Chart, 'selection', function (event) {
|
|
1576
|
+
if (event.resetSelection === true &&
|
|
1577
|
+
this.breadcrumbs) {
|
|
1578
|
+
this.breadcrumbs.alignBreadcrumbsGroup();
|
|
1579
|
+
}
|
|
1580
|
+
});
|
|
1581
|
+
}
|
|
1582
|
+
/* *
|
|
1583
|
+
*
|
|
1584
|
+
* Default Export
|
|
1585
|
+
*
|
|
1586
|
+
* */
|
|
1587
|
+
/* *
|
|
1588
|
+
*
|
|
1589
|
+
* API Declarations
|
|
1590
|
+
*
|
|
1591
|
+
* */
|
|
1592
|
+
/**
|
|
1593
|
+
* Callback function to react on button clicks.
|
|
1594
|
+
*
|
|
1595
|
+
* @callback Highcharts.BreadcrumbsClickCallbackFunction
|
|
1596
|
+
*
|
|
1597
|
+
* @param {Highcharts.Event} event
|
|
1598
|
+
* Event.
|
|
1599
|
+
*
|
|
1600
|
+
* @param {Highcharts.BreadcrumbOptions} options
|
|
1601
|
+
* Breadcrumb options.
|
|
1602
|
+
*
|
|
1603
|
+
* @param {global.Event} e
|
|
1604
|
+
* Event arguments.
|
|
1605
|
+
*/
|
|
1606
|
+
/**
|
|
1607
|
+
* Callback function to format the breadcrumb text from scratch.
|
|
1608
|
+
*
|
|
1609
|
+
* @callback Highcharts.BreadcrumbsFormatterCallbackFunction
|
|
1610
|
+
*
|
|
1611
|
+
* @param {Highcharts.Event} event
|
|
1612
|
+
* Event.
|
|
1613
|
+
*
|
|
1614
|
+
* @param {Highcharts.BreadcrumbOptions} options
|
|
1615
|
+
* Breadcrumb options.
|
|
1616
|
+
*
|
|
1617
|
+
* @return {string}
|
|
1618
|
+
* Formatted text or false
|
|
1619
|
+
*/
|
|
1620
|
+
/**
|
|
1621
|
+
* Options for the one breadcrumb.
|
|
1622
|
+
*
|
|
1623
|
+
* @interface Highcharts.BreadcrumbOptions
|
|
1624
|
+
*/
|
|
1625
|
+
/**
|
|
1626
|
+
* Level connected to a specific breadcrumb.
|
|
1627
|
+
* @name Highcharts.BreadcrumbOptions#level
|
|
1628
|
+
* @type {number}
|
|
1629
|
+
*/
|
|
1630
|
+
/**
|
|
1631
|
+
* Options for series or point connected to a specific breadcrumb.
|
|
1632
|
+
* @name Highcharts.BreadcrumbOptions#levelOptions
|
|
1633
|
+
* @type {SeriesOptions|PointOptionsObject}
|
|
1634
|
+
*/
|
|
1635
|
+
/**
|
|
1636
|
+
* Options for aligning breadcrumbs group.
|
|
1637
|
+
*
|
|
1638
|
+
* @interface Highcharts.BreadcrumbsAlignOptions
|
|
1639
|
+
*/
|
|
1640
|
+
/**
|
|
1641
|
+
* Align of a Breadcrumb group.
|
|
1642
|
+
* @default right
|
|
1643
|
+
* @name Highcharts.BreadcrumbsAlignOptions#align
|
|
1644
|
+
* @type {AlignValue}
|
|
1645
|
+
*/
|
|
1646
|
+
/**
|
|
1647
|
+
* Vertical align of a Breadcrumb group.
|
|
1648
|
+
* @default top
|
|
1649
|
+
* @name Highcharts.BreadcrumbsAlignOptions#verticalAlign
|
|
1650
|
+
* @type {VerticalAlignValue}
|
|
1651
|
+
*/
|
|
1652
|
+
/**
|
|
1653
|
+
* X offset of a Breadcrumbs group.
|
|
1654
|
+
* @name Highcharts.BreadcrumbsAlignOptions#x
|
|
1655
|
+
* @type {number}
|
|
1656
|
+
*/
|
|
1657
|
+
/**
|
|
1658
|
+
* Y offset of a Breadcrumbs group.
|
|
1659
|
+
* @name Highcharts.BreadcrumbsAlignOptions#y
|
|
1660
|
+
* @type {number}
|
|
1661
|
+
*/
|
|
1662
|
+
/**
|
|
1663
|
+
* Options for all breadcrumbs.
|
|
1664
|
+
*
|
|
1665
|
+
* @interface Highcharts.BreadcrumbsOptions
|
|
1666
|
+
*/
|
|
1667
|
+
/**
|
|
1668
|
+
* Button theme.
|
|
1669
|
+
* @name Highcharts.BreadcrumbsOptions#buttonTheme
|
|
1670
|
+
* @type { SVGAttributes | undefined }
|
|
1671
|
+
*/
|
|
1672
|
+
(''); // Keeps doclets above in JS file
|
|
1673
|
+
|
|
1674
|
+
return Breadcrumbs;
|
|
1675
|
+
});
|
|
739
1676
|
_registerModule(_modules, 'Series/Treemap/TreemapComposition.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Series/Treemap/TreemapUtilities.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, TreemapUtilities, U) {
|
|
740
1677
|
/* *
|
|
741
1678
|
*
|
|
@@ -797,7 +1734,7 @@
|
|
|
797
1734
|
});
|
|
798
1735
|
|
|
799
1736
|
});
|
|
800
|
-
_registerModule(_modules, 'Series/Treemap/TreemapSeries.js', [_modules['Core/Color/Color.js'], _modules['Series/ColorMapMixin.js'], _modules['Core/Globals.js'], _modules['Core/Legend/LegendSymbol.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Series/Treemap/TreemapAlgorithmGroup.js'], _modules['Series/Treemap/TreemapPoint.js'], _modules['Series/Treemap/TreemapUtilities.js'], _modules['Series/TreeUtilities.js'], _modules['Core/Utilities.js']], function (Color, ColorMapMixin, H, LegendSymbol, SeriesRegistry, TreemapAlgorithmGroup, TreemapPoint, TreemapUtilities, TU, U) {
|
|
1737
|
+
_registerModule(_modules, 'Series/Treemap/TreemapSeries.js', [_modules['Core/Color/Color.js'], _modules['Series/ColorMapMixin.js'], _modules['Core/Globals.js'], _modules['Core/Legend/LegendSymbol.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Series/Treemap/TreemapAlgorithmGroup.js'], _modules['Series/Treemap/TreemapPoint.js'], _modules['Series/Treemap/TreemapUtilities.js'], _modules['Series/TreeUtilities.js'], _modules['Extensions/Breadcrumbs.js'], _modules['Core/Utilities.js']], function (Color, ColorMapMixin, H, LegendSymbol, SeriesRegistry, TreemapAlgorithmGroup, TreemapPoint, TreemapUtilities, TU, Breadcrumbs, U) {
|
|
801
1738
|
/* *
|
|
802
1739
|
*
|
|
803
1740
|
* (c) 2014-2021 Highsoft AS
|
|
@@ -842,6 +1779,7 @@
|
|
|
842
1779
|
extend = U.extend,
|
|
843
1780
|
fireEvent = U.fireEvent,
|
|
844
1781
|
isArray = U.isArray,
|
|
1782
|
+
isNumber = U.isNumber,
|
|
845
1783
|
isObject = U.isObject,
|
|
846
1784
|
isString = U.isString,
|
|
847
1785
|
merge = U.merge,
|
|
@@ -882,6 +1820,7 @@
|
|
|
882
1820
|
_this.points = void 0;
|
|
883
1821
|
_this.rootNode = void 0;
|
|
884
1822
|
_this.tree = void 0;
|
|
1823
|
+
_this.level = void 0;
|
|
885
1824
|
return _this;
|
|
886
1825
|
/* eslint-enable valid-jsdoc */
|
|
887
1826
|
}
|
|
@@ -1138,6 +2077,46 @@
|
|
|
1138
2077
|
}
|
|
1139
2078
|
});
|
|
1140
2079
|
};
|
|
2080
|
+
/**
|
|
2081
|
+
* Create level list.
|
|
2082
|
+
*
|
|
2083
|
+
* @requires modules/breadcrumbs
|
|
2084
|
+
*
|
|
2085
|
+
* @function TreemapSeries#createList
|
|
2086
|
+
* @param {TreemapSeries} this
|
|
2087
|
+
* Treemap Series class.
|
|
2088
|
+
*/
|
|
2089
|
+
TreemapSeries.prototype.createList = function (e) {
|
|
2090
|
+
var chart = this.chart,
|
|
2091
|
+
breadcrumbs = chart.breadcrumbs,
|
|
2092
|
+
list = [];
|
|
2093
|
+
if (breadcrumbs) {
|
|
2094
|
+
var currentLevelNumber_1 = 0;
|
|
2095
|
+
list.push({
|
|
2096
|
+
level: currentLevelNumber_1,
|
|
2097
|
+
levelOptions: chart.series[0]
|
|
2098
|
+
});
|
|
2099
|
+
var node = e.target.nodeMap[e.newRootId];
|
|
2100
|
+
var extraNodes = [];
|
|
2101
|
+
// When the root node is set and has parent,
|
|
2102
|
+
// recreate the path from the node tree.
|
|
2103
|
+
while (node.parent || node.parent === '') {
|
|
2104
|
+
extraNodes.push(node);
|
|
2105
|
+
node = e.target.nodeMap[node.parent];
|
|
2106
|
+
}
|
|
2107
|
+
extraNodes.reverse().forEach(function (node) {
|
|
2108
|
+
list.push({
|
|
2109
|
+
level: ++currentLevelNumber_1,
|
|
2110
|
+
levelOptions: node
|
|
2111
|
+
});
|
|
2112
|
+
});
|
|
2113
|
+
// If the list has only first element, we should clear it
|
|
2114
|
+
if (list.length <= 1) {
|
|
2115
|
+
list.length = 0;
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
return list;
|
|
2119
|
+
};
|
|
1141
2120
|
/**
|
|
1142
2121
|
* Extend drawDataLabels with logic to handle custom options related to
|
|
1143
2122
|
* the treemap series:
|
|
@@ -1388,7 +2367,9 @@
|
|
|
1388
2367
|
};
|
|
1389
2368
|
TreemapSeries.prototype.init = function (chart, options) {
|
|
1390
2369
|
var series = this,
|
|
1391
|
-
|
|
2370
|
+
breadcrumbsOptions = merge(options.drillUpButton,
|
|
2371
|
+
options.breadcrumbs);
|
|
2372
|
+
var setOptionsEvent;
|
|
1392
2373
|
// If color series logic is loaded, add some properties
|
|
1393
2374
|
this.colorAttribs = ColorMapMixin.SeriesMixin.colorAttribs;
|
|
1394
2375
|
setOptionsEvent = addEvent(series, 'setOptions', function (event) {
|
|
@@ -1411,7 +2392,38 @@
|
|
|
1411
2392
|
series.eventsToUnbind.push(setOptionsEvent);
|
|
1412
2393
|
if (series.options.allowTraversingTree) {
|
|
1413
2394
|
series.eventsToUnbind.push(addEvent(series, 'click', series.onClickDrillToNode));
|
|
2395
|
+
series.eventsToUnbind.push(addEvent(series, 'setRootNode', function (e) {
|
|
2396
|
+
var chart = series.chart;
|
|
2397
|
+
if (chart.breadcrumbs) {
|
|
2398
|
+
// Create a list using the event after drilldown.
|
|
2399
|
+
chart.breadcrumbs.updateProperties(series.createList(e));
|
|
2400
|
+
}
|
|
2401
|
+
}));
|
|
2402
|
+
series.eventsToUnbind.push(addEvent(series, 'update', function (e, redraw) {
|
|
2403
|
+
var breadcrumbs = this.chart.breadcrumbs;
|
|
2404
|
+
if (breadcrumbs && e.options.breadcrumbs) {
|
|
2405
|
+
breadcrumbs.update(e.options.breadcrumbs);
|
|
2406
|
+
}
|
|
2407
|
+
}));
|
|
2408
|
+
series.eventsToUnbind.push(addEvent(series, 'destroy', function destroyEvents(e) {
|
|
2409
|
+
var chart = this.chart;
|
|
2410
|
+
if (chart.breadcrumbs) {
|
|
2411
|
+
chart.breadcrumbs.destroy();
|
|
2412
|
+
if (!e.keepEventsForUpdate) {
|
|
2413
|
+
chart.breadcrumbs = void 0;
|
|
2414
|
+
}
|
|
2415
|
+
}
|
|
2416
|
+
}));
|
|
2417
|
+
}
|
|
2418
|
+
if (!chart.breadcrumbs) {
|
|
2419
|
+
chart.breadcrumbs = new Breadcrumbs(chart, breadcrumbsOptions);
|
|
1414
2420
|
}
|
|
2421
|
+
series.eventsToUnbind.push(addEvent(chart.breadcrumbs, 'up', function (e) {
|
|
2422
|
+
var drillUpsNumber = this.level - e.newLevel;
|
|
2423
|
+
for (var i = 0; i < drillUpsNumber; i++) {
|
|
2424
|
+
series.drillUp();
|
|
2425
|
+
}
|
|
2426
|
+
}));
|
|
1415
2427
|
};
|
|
1416
2428
|
/**
|
|
1417
2429
|
* Add drilling on the suitable points.
|
|
@@ -1479,47 +2491,6 @@
|
|
|
1479
2491
|
}
|
|
1480
2492
|
return attr;
|
|
1481
2493
|
};
|
|
1482
|
-
TreemapSeries.prototype.renderTraverseUpButton = function (rootId) {
|
|
1483
|
-
var series = this,
|
|
1484
|
-
nodeMap = series.nodeMap,
|
|
1485
|
-
node = nodeMap[rootId],
|
|
1486
|
-
name = node.name,
|
|
1487
|
-
buttonOptions = series.options
|
|
1488
|
-
.traverseUpButton,
|
|
1489
|
-
backText = pick(buttonOptions.text,
|
|
1490
|
-
name, '◁ Back'),
|
|
1491
|
-
attr,
|
|
1492
|
-
states;
|
|
1493
|
-
if (rootId === '' || (series.is('sunburst') &&
|
|
1494
|
-
series.tree.children.length === 1 &&
|
|
1495
|
-
rootId === series.tree.children[0].id)) {
|
|
1496
|
-
if (series.drillUpButton) {
|
|
1497
|
-
series.drillUpButton = series.drillUpButton.destroy();
|
|
1498
|
-
}
|
|
1499
|
-
}
|
|
1500
|
-
else if (!this.drillUpButton) {
|
|
1501
|
-
attr = buttonOptions.theme;
|
|
1502
|
-
states = attr && attr.states;
|
|
1503
|
-
this.drillUpButton = this.chart.renderer
|
|
1504
|
-
.button(backText, 0, 0, function () {
|
|
1505
|
-
series.drillUp();
|
|
1506
|
-
}, attr, states && states.hover, states && states.select)
|
|
1507
|
-
.addClass('highcharts-drillup-button')
|
|
1508
|
-
.attr({
|
|
1509
|
-
align: buttonOptions.position.align,
|
|
1510
|
-
zIndex: 7
|
|
1511
|
-
})
|
|
1512
|
-
.add()
|
|
1513
|
-
.align(buttonOptions.position, false, buttonOptions.relativeTo || 'plotBox');
|
|
1514
|
-
}
|
|
1515
|
-
else {
|
|
1516
|
-
this.drillUpButton.placed = false;
|
|
1517
|
-
this.drillUpButton.attr({
|
|
1518
|
-
text: backText
|
|
1519
|
-
})
|
|
1520
|
-
.align();
|
|
1521
|
-
}
|
|
1522
|
-
};
|
|
1523
2494
|
/**
|
|
1524
2495
|
* Set the node's color recursively, from the parent down.
|
|
1525
2496
|
* @private
|
|
@@ -1762,7 +2733,6 @@
|
|
|
1762
2733
|
rootId = series.rootNode;
|
|
1763
2734
|
rootNode = series.nodeMap[rootId];
|
|
1764
2735
|
}
|
|
1765
|
-
series.renderTraverseUpButton(rootId);
|
|
1766
2736
|
series.mapOptionsToLevel = getLevelOptions({
|
|
1767
2737
|
from: rootNode.level + 1,
|
|
1768
2738
|
levels: options.levels,
|
|
@@ -1832,7 +2802,7 @@
|
|
|
1832
2802
|
* Treemap
|
|
1833
2803
|
*
|
|
1834
2804
|
* @extends plotOptions.scatter
|
|
1835
|
-
* @excluding
|
|
2805
|
+
* @excluding cluster, connectEnds, connectNulls, dataSorting, dragDrop, jitter, marker
|
|
1836
2806
|
* @product highcharts
|
|
1837
2807
|
* @requires modules/treemap
|
|
1838
2808
|
* @optionparent plotOptions.treemap
|
|
@@ -1869,6 +2839,16 @@
|
|
|
1869
2839
|
* The border radius for each treemap item.
|
|
1870
2840
|
*/
|
|
1871
2841
|
borderRadius: 0,
|
|
2842
|
+
/**
|
|
2843
|
+
* Options for the breadcrumbs, the navigation at the top leading the
|
|
2844
|
+
* way up through the traversed levels.
|
|
2845
|
+
*
|
|
2846
|
+
*
|
|
2847
|
+
* @since 10.0.0
|
|
2848
|
+
* @product highcharts
|
|
2849
|
+
* @extends navigation.breadcrumbs
|
|
2850
|
+
* @optionparent plotOptions.treemap.breadcrumbs
|
|
2851
|
+
*/
|
|
1872
2852
|
/**
|
|
1873
2853
|
* When the series contains less points than the crop threshold, all
|
|
1874
2854
|
* points are drawn, event if the points fall outside the visible plot
|
|
@@ -2032,52 +3012,12 @@
|
|
|
2032
3012
|
*/
|
|
2033
3013
|
levelIsConstant: true,
|
|
2034
3014
|
/**
|
|
2035
|
-
* Options for the button appearing when
|
|
2036
|
-
*
|
|
2037
|
-
*
|
|
3015
|
+
* Options for the button appearing when traversing down in a treemap.
|
|
3016
|
+
*
|
|
3017
|
+
* Since v9.3.3 the `traverseUpButton` is replaced by `breadcrumbs`.
|
|
2038
3018
|
*
|
|
2039
3019
|
* @deprecated
|
|
2040
3020
|
*/
|
|
2041
|
-
drillUpButton: {
|
|
2042
|
-
/**
|
|
2043
|
-
* The position of the button.
|
|
2044
|
-
*
|
|
2045
|
-
* @deprecated
|
|
2046
|
-
*/
|
|
2047
|
-
position: {
|
|
2048
|
-
/**
|
|
2049
|
-
* Vertical alignment of the button.
|
|
2050
|
-
*
|
|
2051
|
-
* @deprecated
|
|
2052
|
-
* @type {Highcharts.VerticalAlignValue}
|
|
2053
|
-
* @default top
|
|
2054
|
-
* @product highcharts
|
|
2055
|
-
* @apioption plotOptions.treemap.drillUpButton.position.verticalAlign
|
|
2056
|
-
*/
|
|
2057
|
-
/**
|
|
2058
|
-
* Horizontal alignment of the button.
|
|
2059
|
-
*
|
|
2060
|
-
* @deprecated
|
|
2061
|
-
* @type {Highcharts.AlignValue}
|
|
2062
|
-
*/
|
|
2063
|
-
align: 'right',
|
|
2064
|
-
/**
|
|
2065
|
-
* Horizontal offset of the button.
|
|
2066
|
-
*
|
|
2067
|
-
* @deprecated
|
|
2068
|
-
*/
|
|
2069
|
-
x: -10,
|
|
2070
|
-
/**
|
|
2071
|
-
* Vertical offset of the button.
|
|
2072
|
-
*
|
|
2073
|
-
* @deprecated
|
|
2074
|
-
*/
|
|
2075
|
-
y: 10
|
|
2076
|
-
}
|
|
2077
|
-
},
|
|
2078
|
-
/**
|
|
2079
|
-
* Options for the button appearing when traversing down in a treemap.
|
|
2080
|
-
*/
|
|
2081
3021
|
traverseUpButton: {
|
|
2082
3022
|
/**
|
|
2083
3023
|
* The position of the button.
|
|
@@ -3146,7 +4086,7 @@
|
|
|
3146
4086
|
if (s.dataLabelsGroup) {
|
|
3147
4087
|
s.dataLabelsGroup.animate({
|
|
3148
4088
|
opacity: 1,
|
|
3149
|
-
visibility: '
|
|
4089
|
+
visibility: 'inherit'
|
|
3150
4090
|
});
|
|
3151
4091
|
}
|
|
3152
4092
|
};
|
|
@@ -3344,7 +4284,6 @@
|
|
|
3344
4284
|
// @todo Only if series.isDirtyData is true
|
|
3345
4285
|
tree = series.tree = series.getTree();
|
|
3346
4286
|
// Render traverseUpButton, after series.nodeMap i calculated.
|
|
3347
|
-
series.renderTraverseUpButton(rootId);
|
|
3348
4287
|
mapIdToNode = series.nodeMap;
|
|
3349
4288
|
nodeRoot = mapIdToNode[rootId];
|
|
3350
4289
|
idTop = isString(nodeRoot.parent) ? nodeRoot.parent : '';
|
|
@@ -3423,6 +4362,15 @@
|
|
|
3423
4362
|
* @private
|
|
3424
4363
|
*/
|
|
3425
4364
|
SunburstSeries.defaultOptions = merge(TreemapSeries.defaultOptions, {
|
|
4365
|
+
/**
|
|
4366
|
+
* Options for the breadcrumbs, the navigation at the top leading the
|
|
4367
|
+
* way up through the traversed levels.
|
|
4368
|
+
*
|
|
4369
|
+
* @since 10.0.0
|
|
4370
|
+
* @product highcharts
|
|
4371
|
+
* @extends navigation.breadcrumbs
|
|
4372
|
+
* @optionparent plotOptions.sunburst.breadcrumbs
|
|
4373
|
+
*/
|
|
3426
4374
|
/**
|
|
3427
4375
|
* Set options on specific levels. Takes precedence over series options,
|
|
3428
4376
|
* but not point options.
|
|
@@ -3619,11 +4567,14 @@
|
|
|
3619
4567
|
unit: 'weight'
|
|
3620
4568
|
},
|
|
3621
4569
|
/**
|
|
3622
|
-
* Options for the button appearing when traversing down in a
|
|
4570
|
+
* Options for the button appearing when traversing down in a sunburst.
|
|
4571
|
+
* Since v9.3.3 the `traverseUpButton` is replaced by `breadcrumbs`.
|
|
3623
4572
|
*
|
|
3624
4573
|
* @extends plotOptions.treemap.traverseUpButton
|
|
3625
4574
|
* @since 6.0.0
|
|
4575
|
+
* @deprecated
|
|
3626
4576
|
* @apioption plotOptions.sunburst.traverseUpButton
|
|
4577
|
+
*
|
|
3627
4578
|
*/
|
|
3628
4579
|
/**
|
|
3629
4580
|
* If a point is sliced, moved out from the center, how many pixels
|