highcharts 9.3.3 → 10.0.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/Accessibility.js +1 -1
- package/es-modules/Accessibility/Components/LegendComponent.js +31 -23
- package/es-modules/Accessibility/Components/MenuComponent.js +4 -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 +3 -3
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +61 -29
- package/es-modules/Accessibility/Components/ZoomComponent.js +13 -10
- package/es-modules/Accessibility/HighContrastMode.js +2 -2
- package/es-modules/Accessibility/KeyboardNavigation.js +113 -98
- package/es-modules/Accessibility/ProxyElement.js +14 -6
- package/es-modules/Accessibility/ProxyProvider.js +10 -2
- package/es-modules/Core/Axis/Axis.js +150 -46
- package/es-modules/Core/Axis/Color/ColorAxis.js +22 -5
- package/es-modules/Core/Axis/GridAxis.js +10 -9
- package/es-modules/Core/Axis/TreeGridTick.js +11 -0
- package/es-modules/Core/Chart/Chart3D.js +1 -11
- package/es-modules/Core/Chart/ChartDefaults.js +32 -11
- package/es-modules/Core/Chart/MapChart.js +1 -6
- package/es-modules/Core/DefaultOptions.js +2 -0
- 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 +10 -8
- package/es-modules/Core/Navigator.js +9 -6
- package/es-modules/Core/Pointer.js +15 -11
- package/es-modules/Core/Renderer/HTML/AST.js +62 -5
- package/es-modules/Core/Renderer/SVG/SVGElement.js +25 -41
- package/es-modules/Core/Renderer/SVG/SVGElement3D.js +17 -5
- package/es-modules/Core/Renderer/SVG/SVGRenderer.js +17 -17
- package/es-modules/Core/Renderer/SVG/TextBuilder.js +12 -10
- package/es-modules/Core/Series/DataLabel.js +11 -3
- package/es-modules/Core/Series/Point.js +2 -2
- package/es-modules/Core/Series/Series.js +33 -15
- package/es-modules/Core/Series/SeriesDefaults.js +4 -1
- package/es-modules/Core/Tooltip.js +14 -31
- package/es-modules/Core/Utilities.js +28 -28
- package/es-modules/Extensions/Annotations/Annotations.js +7 -0
- package/es-modules/Extensions/Annotations/MockPoint.js +1 -1
- package/es-modules/Extensions/Annotations/NavigationBindings.js +1 -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 +874 -0
- package/es-modules/Extensions/Data.js +26 -14
- package/es-modules/Extensions/DataGrouping.js +5 -2
- package/es-modules/Extensions/DraggablePoints.js +9 -7
- package/es-modules/Extensions/Drilldown.js +147 -94
- package/es-modules/Extensions/Exporting/Exporting.js +9 -7
- package/es-modules/Extensions/Exporting/ExportingDefaults.js +49 -1
- package/es-modules/Extensions/GeoJSON.js +149 -124
- 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/ScrollablePlotArea.js +5 -1
- package/es-modules/Extensions/Stacking.js +3 -2
- package/es-modules/Extensions/Themes/HighContrastDark.js +10 -10
- package/es-modules/Extensions/Themes/HighContrastLight.js +10 -10
- package/es-modules/Maps/MapNavigation.js +49 -8
- package/es-modules/Maps/MapPointer.js +16 -0
- package/es-modules/Maps/MapUtilities.js +56 -0
- package/es-modules/Maps/MapView.js +606 -135
- package/es-modules/Maps/MapViewInsetsOptionsDefault.js +148 -0
- package/es-modules/Maps/MapViewOptionsDefault.js +58 -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 +581 -0
- 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/Lollipop/LollipopSeries.js +1 -1
- package/es-modules/Series/Map/MapPoint.js +24 -1
- package/es-modules/Series/Map/MapSeries.js +196 -169
- package/es-modules/Series/MapBubble/MapBubblePoint.js +16 -24
- package/es-modules/Series/MapBubble/MapBubbleSeries.js +11 -0
- package/es-modules/Series/MapPoint/MapPointPoint.js +2 -8
- package/es-modules/Series/MapPoint/MapPointSeries.js +36 -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/PiePoint.js +12 -5
- 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 +10 -127
- package/es-modules/Series/Scatter/ScatterSeries.js +1 -1
- package/es-modules/Series/Sunburst/SunburstSeries.js +13 -2
- package/es-modules/Series/Treemap/TreemapSeries.js +88 -80
- package/es-modules/Series/Waterfall/WaterfallSeries.js +2 -0
- package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +9 -2
- 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 +50 -20
- package/highcharts-gantt.js +800 -795
- package/highcharts-gantt.js.map +1 -1
- package/highcharts-gantt.src.js +528 -290
- package/highcharts-more.js +195 -194
- package/highcharts-more.js.map +1 -1
- package/highcharts-more.src.js +13 -2
- package/highcharts.d.ts +2162 -504
- package/highcharts.js +586 -581
- package/highcharts.js.map +1 -1
- package/highcharts.src.d.ts +2162 -504
- package/highcharts.src.js +494 -272
- package/highmaps.js +753 -723
- package/highmaps.js.map +1 -1
- package/highmaps.src.js +3603 -2117
- package/highstock.js +790 -786
- package/highstock.js.map +1 -1
- package/highstock.src.js +519 -283
- 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 +231 -229
- package/modules/accessibility.js.map +1 -1
- package/modules/accessibility.src.js +278 -197
- package/modules/annotations-advanced.js +144 -144
- package/modules/annotations-advanced.js.map +1 -1
- package/modules/annotations-advanced.src.js +26 -8
- package/modules/annotations.js +79 -79
- package/modules/annotations.js.map +1 -1
- package/modules/annotations.src.js +21 -5
- package/modules/arc-diagram.js +25 -0
- package/modules/arc-diagram.js.map +1 -0
- package/modules/arc-diagram.src.js +770 -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 +16 -4
- package/modules/debugger.js +6 -6
- package/modules/debugger.js.map +1 -1
- package/modules/debugger.src.js +11 -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 +37 -25
- package/modules/drilldown.js.map +1 -1
- package/modules/drilldown.src.d.ts +19 -0
- package/modules/drilldown.src.js +1090 -105
- 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 +11 -2
- package/modules/exporting.js +39 -39
- package/modules/exporting.js.map +1 -1
- package/modules/exporting.src.js +82 -18
- package/modules/full-screen.js +8 -7
- package/modules/full-screen.js.map +1 -1
- package/modules/full-screen.src.js +11 -2
- 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 +217 -217
- package/modules/gantt.js.map +1 -1
- package/modules/gantt.src.js +45 -20
- package/modules/grid-axis.js +23 -23
- package/modules/grid-axis.js.map +1 -1
- package/modules/grid-axis.src.js +22 -11
- package/modules/heatmap.js +40 -39
- package/modules/heatmap.js.map +1 -1
- package/modules/heatmap.src.js +33 -7
- 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 +7960 -6687
- 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 +338 -156
- 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 +78 -78
- package/modules/stock-tools.js.map +1 -1
- package/modules/stock-tools.src.js +21 -5
- package/modules/stock.js +162 -162
- package/modules/stock.js.map +1 -1
- package/modules/stock.src.js +36 -13
- 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 +1049 -96
- 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 +33 -11
- 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 +1039 -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 +23 -23
- package/modules/wordcloud.js.map +1 -1
- package/modules/wordcloud.src.js +18 -6
- 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/treemap.src.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Highcharts JS
|
|
2
|
+
* @license Highcharts JS v10.0.0 (2022-03-07)
|
|
3
3
|
*
|
|
4
4
|
* (c) 2014-2021 Highsoft AS
|
|
5
5
|
* Authors: Jon Arild Nygard / Oystein Moseng
|
|
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,933 @@
|
|
|
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
|
+
states = buttonTheme.states;
|
|
1067
|
+
delete buttonTheme.states;
|
|
1068
|
+
var button = chart.renderer
|
|
1069
|
+
.button(breadcrumbs.getButtonText(breadcrumb),
|
|
1070
|
+
posX,
|
|
1071
|
+
posY,
|
|
1072
|
+
function (e) {
|
|
1073
|
+
// Extract events from button object and call
|
|
1074
|
+
var buttonEvents = breadcrumbsOptions.events &&
|
|
1075
|
+
breadcrumbsOptions.events.click;
|
|
1076
|
+
var callDefaultEvent;
|
|
1077
|
+
if (buttonEvents) {
|
|
1078
|
+
callDefaultEvent = buttonEvents.call(breadcrumbs, e, breadcrumb);
|
|
1079
|
+
}
|
|
1080
|
+
// (difference in behaviour of showFullPath and drillUp)
|
|
1081
|
+
if (callDefaultEvent !== false) {
|
|
1082
|
+
// For single button we are not going to the button
|
|
1083
|
+
// level, but the one level up
|
|
1084
|
+
if (!breadcrumbsOptions.showFullPath) {
|
|
1085
|
+
e.newLevel = breadcrumbs.level - 1;
|
|
1086
|
+
}
|
|
1087
|
+
else {
|
|
1088
|
+
e.newLevel = breadcrumb.level;
|
|
1089
|
+
}
|
|
1090
|
+
fireEvent(breadcrumbs, 'up', e);
|
|
1091
|
+
}
|
|
1092
|
+
}, buttonTheme, states && states.hover, states && states.select, states && states.disabled)
|
|
1093
|
+
.addClass('highcharts-breadcrumbs-button')
|
|
1094
|
+
.add(breadcrumbs.group);
|
|
1095
|
+
if (!chart.styledMode) {
|
|
1096
|
+
button.attr(breadcrumbsOptions.style);
|
|
1097
|
+
}
|
|
1098
|
+
return button;
|
|
1099
|
+
};
|
|
1100
|
+
/**
|
|
1101
|
+
* Render a separator.
|
|
1102
|
+
*
|
|
1103
|
+
* @requires modules/breadcrums
|
|
1104
|
+
*
|
|
1105
|
+
* @function Highcharts.Breadcrumbs#renderSeparator
|
|
1106
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1107
|
+
* Breadcrumbs class.
|
|
1108
|
+
* @param {Highcharts.Breadcrumbs} posX
|
|
1109
|
+
* Initial horizontal position
|
|
1110
|
+
* @param {Highcharts.Breadcrumbs} posY
|
|
1111
|
+
* Initial vertical position
|
|
1112
|
+
* @return {Highcharts.SVGElement}
|
|
1113
|
+
* Returns the SVG button
|
|
1114
|
+
*/
|
|
1115
|
+
Breadcrumbs.prototype.renderSeparator = function (posX, posY) {
|
|
1116
|
+
var breadcrumbs = this,
|
|
1117
|
+
chart = this.chart,
|
|
1118
|
+
breadcrumbsOptions = breadcrumbs.options,
|
|
1119
|
+
separatorOptions = breadcrumbsOptions.separator;
|
|
1120
|
+
var separator = chart.renderer
|
|
1121
|
+
.label(separatorOptions.text,
|
|
1122
|
+
posX,
|
|
1123
|
+
posY,
|
|
1124
|
+
void 0,
|
|
1125
|
+
void 0,
|
|
1126
|
+
void 0,
|
|
1127
|
+
false)
|
|
1128
|
+
.addClass('highcharts-breadcrumbs-separator')
|
|
1129
|
+
.add(breadcrumbs.group);
|
|
1130
|
+
if (!chart.styledMode) {
|
|
1131
|
+
separator.css(separatorOptions.style);
|
|
1132
|
+
}
|
|
1133
|
+
return separator;
|
|
1134
|
+
};
|
|
1135
|
+
/**
|
|
1136
|
+
* Update.
|
|
1137
|
+
* @function Highcharts.Breadcrumbs#update
|
|
1138
|
+
*
|
|
1139
|
+
* @requires modules/breadcrumbs
|
|
1140
|
+
*
|
|
1141
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1142
|
+
* Breadcrumbs class.
|
|
1143
|
+
* @param {Highcharts.BreadcrumbsOptions} options
|
|
1144
|
+
* Breadcrumbs class.
|
|
1145
|
+
* @param {boolean} redraw
|
|
1146
|
+
* Redraw flag
|
|
1147
|
+
*/
|
|
1148
|
+
Breadcrumbs.prototype.update = function (options) {
|
|
1149
|
+
merge(true, this.options, options);
|
|
1150
|
+
this.destroy();
|
|
1151
|
+
this.isDirty = true;
|
|
1152
|
+
};
|
|
1153
|
+
/**
|
|
1154
|
+
* Update button text when the showFullPath set to false.
|
|
1155
|
+
* @function Highcharts.Breadcrumbs#updateSingleButton
|
|
1156
|
+
*
|
|
1157
|
+
* @requires modules/breadcrumbs
|
|
1158
|
+
*
|
|
1159
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1160
|
+
* Breadcrumbs class.
|
|
1161
|
+
*/
|
|
1162
|
+
Breadcrumbs.prototype.updateSingleButton = function () {
|
|
1163
|
+
var chart = this.chart,
|
|
1164
|
+
currentBreadcrumb = this.list[this.level - 1];
|
|
1165
|
+
if (chart.drillUpButton) {
|
|
1166
|
+
chart.drillUpButton.attr({
|
|
1167
|
+
text: this.getButtonText(currentBreadcrumb)
|
|
1168
|
+
});
|
|
1169
|
+
}
|
|
1170
|
+
};
|
|
1171
|
+
/**
|
|
1172
|
+
* Destroy the chosen breadcrumbs group
|
|
1173
|
+
*
|
|
1174
|
+
* @requires modules/breadcrumbs
|
|
1175
|
+
*
|
|
1176
|
+
* @function Highcharts.Breadcrumbs#destroy
|
|
1177
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1178
|
+
* Breadcrumbs class.
|
|
1179
|
+
*/
|
|
1180
|
+
Breadcrumbs.prototype.destroy = function () {
|
|
1181
|
+
this.destroySingleButton();
|
|
1182
|
+
// Destroy elements one by one. It's necessary beacause
|
|
1183
|
+
// g().destroy() does not remove added HTML
|
|
1184
|
+
this.destroyListElements(true);
|
|
1185
|
+
// Then, destroy the group itself.
|
|
1186
|
+
if (this.group) {
|
|
1187
|
+
this.group.destroy();
|
|
1188
|
+
}
|
|
1189
|
+
this.group = void 0;
|
|
1190
|
+
};
|
|
1191
|
+
/**
|
|
1192
|
+
* Destroy the elements' buttons and separators.
|
|
1193
|
+
*
|
|
1194
|
+
* @requires modules/breadcrumbs
|
|
1195
|
+
*
|
|
1196
|
+
* @function Highcharts.Breadcrumbs#destroyListElements
|
|
1197
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1198
|
+
* Breadcrumbs class.
|
|
1199
|
+
*/
|
|
1200
|
+
Breadcrumbs.prototype.destroyListElements = function (force) {
|
|
1201
|
+
var elementList = this.elementList;
|
|
1202
|
+
objectEach(elementList, function (element, level) {
|
|
1203
|
+
if (force ||
|
|
1204
|
+
!elementList[level].updated) {
|
|
1205
|
+
element = elementList[level];
|
|
1206
|
+
element.button && element.button.destroy();
|
|
1207
|
+
element.separator && element.separator.destroy();
|
|
1208
|
+
delete element.button;
|
|
1209
|
+
delete element.separator;
|
|
1210
|
+
delete elementList[level];
|
|
1211
|
+
}
|
|
1212
|
+
});
|
|
1213
|
+
if (force) {
|
|
1214
|
+
this.elementList = {};
|
|
1215
|
+
}
|
|
1216
|
+
};
|
|
1217
|
+
/**
|
|
1218
|
+
* Destroy the single button if exists.
|
|
1219
|
+
*
|
|
1220
|
+
* @requires modules/breadcrumbs
|
|
1221
|
+
*
|
|
1222
|
+
* @function Highcharts.Breadcrumbs#destroySingleButton
|
|
1223
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1224
|
+
* Breadcrumbs class.
|
|
1225
|
+
*/
|
|
1226
|
+
Breadcrumbs.prototype.destroySingleButton = function () {
|
|
1227
|
+
if (this.chart.drillUpButton) {
|
|
1228
|
+
this.chart.drillUpButton.destroy();
|
|
1229
|
+
this.chart.drillUpButton = void 0;
|
|
1230
|
+
}
|
|
1231
|
+
};
|
|
1232
|
+
/**
|
|
1233
|
+
* Reset state for all buttons in elementList.
|
|
1234
|
+
*
|
|
1235
|
+
* @requires modules/breadcrumbs
|
|
1236
|
+
*
|
|
1237
|
+
* @function Highcharts.Breadcrumbs#resetElementListState
|
|
1238
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1239
|
+
* Breadcrumbs class.
|
|
1240
|
+
*/
|
|
1241
|
+
Breadcrumbs.prototype.resetElementListState = function () {
|
|
1242
|
+
objectEach(this.elementList, function (element) {
|
|
1243
|
+
element.updated = false;
|
|
1244
|
+
});
|
|
1245
|
+
};
|
|
1246
|
+
/**
|
|
1247
|
+
* Update rendered elements inside the elementList.
|
|
1248
|
+
*
|
|
1249
|
+
* @requires modules/breadcrumbs
|
|
1250
|
+
*
|
|
1251
|
+
* @function Highcharts.Breadcrumbs#updateListElements
|
|
1252
|
+
* @param {Highcharts.Breadcrumbs} this
|
|
1253
|
+
* Breadcrumbs class.
|
|
1254
|
+
*/
|
|
1255
|
+
Breadcrumbs.prototype.updateListElements = function () {
|
|
1256
|
+
var updateXPosition = function (element,
|
|
1257
|
+
spacing) {
|
|
1258
|
+
return element.getBBox().width + spacing;
|
|
1259
|
+
}, breadcrumbs = this, elementList = breadcrumbs.elementList, buttonSpacing = breadcrumbs.options.buttonSpacing, list = breadcrumbs.list;
|
|
1260
|
+
// Inital position for calculating the breadcrumbs group.
|
|
1261
|
+
var posX = breadcrumbs.group ?
|
|
1262
|
+
updateXPosition(breadcrumbs.group,
|
|
1263
|
+
buttonSpacing) :
|
|
1264
|
+
buttonSpacing,
|
|
1265
|
+
posY = buttonSpacing,
|
|
1266
|
+
currentBreadcrumb;
|
|
1267
|
+
list.forEach(function (breadcrumb, index) {
|
|
1268
|
+
var isLast = index === list.length - 1;
|
|
1269
|
+
var button,
|
|
1270
|
+
separator;
|
|
1271
|
+
if (elementList[breadcrumb.level]) {
|
|
1272
|
+
currentBreadcrumb = elementList[breadcrumb.level];
|
|
1273
|
+
button = currentBreadcrumb.button;
|
|
1274
|
+
// Render a separator if it was not created before.
|
|
1275
|
+
if (!currentBreadcrumb.separator &&
|
|
1276
|
+
!isLast) {
|
|
1277
|
+
// Add spacing for the next separator
|
|
1278
|
+
posX += buttonSpacing;
|
|
1279
|
+
currentBreadcrumb.separator =
|
|
1280
|
+
breadcrumbs.renderSeparator(posX, posY);
|
|
1281
|
+
posX += updateXPosition(currentBreadcrumb.separator, buttonSpacing);
|
|
1282
|
+
}
|
|
1283
|
+
else if (currentBreadcrumb.separator &&
|
|
1284
|
+
isLast) {
|
|
1285
|
+
currentBreadcrumb.separator.destroy();
|
|
1286
|
+
delete currentBreadcrumb.separator;
|
|
1287
|
+
}
|
|
1288
|
+
elementList[breadcrumb.level].updated = true;
|
|
1289
|
+
}
|
|
1290
|
+
else {
|
|
1291
|
+
// Render a button.
|
|
1292
|
+
button = breadcrumbs.renderButton(breadcrumb, posX, posY);
|
|
1293
|
+
posX += updateXPosition(button, buttonSpacing);
|
|
1294
|
+
// Render a separator.
|
|
1295
|
+
if (!isLast) {
|
|
1296
|
+
separator = breadcrumbs.renderSeparator(posX, posY);
|
|
1297
|
+
posX += updateXPosition(separator, buttonSpacing);
|
|
1298
|
+
}
|
|
1299
|
+
elementList[breadcrumb.level] = {
|
|
1300
|
+
button: button,
|
|
1301
|
+
separator: separator,
|
|
1302
|
+
updated: true
|
|
1303
|
+
};
|
|
1304
|
+
}
|
|
1305
|
+
if (button) {
|
|
1306
|
+
button.setState(isLast ? 2 : 0);
|
|
1307
|
+
}
|
|
1308
|
+
});
|
|
1309
|
+
};
|
|
1310
|
+
/**
|
|
1311
|
+
* Options for breadcrumbs. Breadcrumbs general options are defined in
|
|
1312
|
+
* `navigation.breadcrumbs`. Specific options for drilldown are set in
|
|
1313
|
+
* `drilldown.breadcrumbs` and for tree-like series traversing, in
|
|
1314
|
+
* `plotOptions[series].breadcrumbs`.
|
|
1315
|
+
*
|
|
1316
|
+
* @since 10.0.0
|
|
1317
|
+
* @product highcharts
|
|
1318
|
+
* @optionparent navigation.breadcrumbs
|
|
1319
|
+
*/
|
|
1320
|
+
Breadcrumbs.defaultBreadcrumbsOptions = {
|
|
1321
|
+
/**
|
|
1322
|
+
* A collection of attributes for the buttons. The object takes SVG
|
|
1323
|
+
* attributes like `fill`, `stroke`, `stroke-width`, as well as `style`,
|
|
1324
|
+
* a collection of CSS properties for the text.
|
|
1325
|
+
*
|
|
1326
|
+
* The object can also be extended with states, so you can set
|
|
1327
|
+
* presentational options for `hover`, `select` or `disabled` button
|
|
1328
|
+
* states.
|
|
1329
|
+
*
|
|
1330
|
+
* @sample {highcharts} highcharts/breadcrumbs/single-button
|
|
1331
|
+
* Themed, single button
|
|
1332
|
+
*
|
|
1333
|
+
* @type {Highcharts.SVGAttributes}
|
|
1334
|
+
* @since 10.0.0
|
|
1335
|
+
* @product highcharts
|
|
1336
|
+
*/
|
|
1337
|
+
buttonTheme: {
|
|
1338
|
+
/** @ignore */
|
|
1339
|
+
fill: 'none',
|
|
1340
|
+
/** @ignore */
|
|
1341
|
+
height: 18,
|
|
1342
|
+
/** @ignore */
|
|
1343
|
+
padding: 2,
|
|
1344
|
+
/** @ignore */
|
|
1345
|
+
'stroke-width': 0,
|
|
1346
|
+
/** @ignore */
|
|
1347
|
+
zIndex: 7,
|
|
1348
|
+
/** @ignore */
|
|
1349
|
+
states: {
|
|
1350
|
+
select: {
|
|
1351
|
+
fill: 'none'
|
|
1352
|
+
}
|
|
1353
|
+
},
|
|
1354
|
+
style: {
|
|
1355
|
+
color: "#335cad" /* highlightColor80 */
|
|
1356
|
+
}
|
|
1357
|
+
},
|
|
1358
|
+
/**
|
|
1359
|
+
* The default padding for each button and separator in each direction.
|
|
1360
|
+
*
|
|
1361
|
+
* @type {number}
|
|
1362
|
+
* @since 10.0.0
|
|
1363
|
+
*/
|
|
1364
|
+
buttonSpacing: 5,
|
|
1365
|
+
/**
|
|
1366
|
+
* Fires when clicking on the breadcrumbs button. Two arguments are
|
|
1367
|
+
* passed to the function. First breadcrumb button as an SVG element.
|
|
1368
|
+
* Second is the breadcrumbs class, containing reference to the chart,
|
|
1369
|
+
* series etc.
|
|
1370
|
+
*
|
|
1371
|
+
* ```js
|
|
1372
|
+
* click: function(button, breadcrumbs) {
|
|
1373
|
+
* console.log(button);
|
|
1374
|
+
* }
|
|
1375
|
+
* ```
|
|
1376
|
+
*
|
|
1377
|
+
* Return false to stop default buttons click action.
|
|
1378
|
+
*
|
|
1379
|
+
* @type {Highcharts.BreadcrumbsClickCallbackFunction}
|
|
1380
|
+
* @since 10.0.0
|
|
1381
|
+
* @apioption navigation.breadcrumbs.events.click
|
|
1382
|
+
*/
|
|
1383
|
+
/**
|
|
1384
|
+
* When the breadcrumbs are floating, the plot area will not move to
|
|
1385
|
+
* make space for it. By default, the chart will not make space for the
|
|
1386
|
+
* buttons. This property won't work when positioned in the middle.
|
|
1387
|
+
*
|
|
1388
|
+
* @sample highcharts/breadcrumbs/single-button
|
|
1389
|
+
* Floating button
|
|
1390
|
+
* @type {boolean}
|
|
1391
|
+
* @since 10.0.0
|
|
1392
|
+
*/
|
|
1393
|
+
floating: false,
|
|
1394
|
+
/**
|
|
1395
|
+
* A format string for the breadcrumbs button. Variables are enclosed by
|
|
1396
|
+
* curly brackets. Available values are passed in the declared point
|
|
1397
|
+
* options.
|
|
1398
|
+
*
|
|
1399
|
+
* @type {string|undefined}
|
|
1400
|
+
* @since 10.0.0
|
|
1401
|
+
* @default undefined
|
|
1402
|
+
* @sample {highcharts} highcharts/breadcrumbs/format Display custom
|
|
1403
|
+
* values in breadcrumb button.
|
|
1404
|
+
*/
|
|
1405
|
+
format: void 0,
|
|
1406
|
+
/**
|
|
1407
|
+
* Callback function to format the breadcrumb text from scratch.
|
|
1408
|
+
*
|
|
1409
|
+
* @type {Highcharts.BreadcrumbsFormatterCallbackFunction}
|
|
1410
|
+
* @since 10.0.0
|
|
1411
|
+
* @default undefined
|
|
1412
|
+
* @apioption navigation.breadcrumbs.formatter
|
|
1413
|
+
*/
|
|
1414
|
+
/**
|
|
1415
|
+
* What box to align the button to. Can be either `plotBox` or
|
|
1416
|
+
* `spacingBox`.
|
|
1417
|
+
*
|
|
1418
|
+
* @type {Highcharts.ButtonRelativeToValue}
|
|
1419
|
+
* @default plotBox
|
|
1420
|
+
* @since 10.0.0
|
|
1421
|
+
* @product highcharts highmaps
|
|
1422
|
+
*/
|
|
1423
|
+
relativeTo: 'plotBox',
|
|
1424
|
+
/**
|
|
1425
|
+
* Positioning for the button row. The breadcrumbs buttons will be
|
|
1426
|
+
* aligned properly for the default chart layout (title, subtitle,
|
|
1427
|
+
* legend, range selector) for the custom chart layout set the position
|
|
1428
|
+
* properties.
|
|
1429
|
+
* @type {Highcharts.BreadcrumbsAlignOptions}
|
|
1430
|
+
* @since 10.0.0
|
|
1431
|
+
* @product highcharts highmaps
|
|
1432
|
+
* @sample {highcharts} highcharts/breadcrumbs/single-button
|
|
1433
|
+
* Single, right aligned button
|
|
1434
|
+
*/
|
|
1435
|
+
position: {
|
|
1436
|
+
/**
|
|
1437
|
+
* Horizontal alignment of the breadcrumbs buttons.
|
|
1438
|
+
*
|
|
1439
|
+
* @type {Highcharts.AlignValue}
|
|
1440
|
+
*/
|
|
1441
|
+
align: 'left',
|
|
1442
|
+
/**
|
|
1443
|
+
* Vertical alignment of the breadcrumbs buttons.
|
|
1444
|
+
*
|
|
1445
|
+
* @type {Highcharts.VerticalAlignValue}
|
|
1446
|
+
*/
|
|
1447
|
+
verticalAlign: 'top',
|
|
1448
|
+
/**
|
|
1449
|
+
* The X offset of the breadcrumbs button group.
|
|
1450
|
+
*
|
|
1451
|
+
* @type {number}
|
|
1452
|
+
*/
|
|
1453
|
+
x: 0,
|
|
1454
|
+
/**
|
|
1455
|
+
* The Y offset of the breadcrumbs button group. When `undefined`,
|
|
1456
|
+
* and `floating` is `false`, the `y` position is adapted so that
|
|
1457
|
+
* the breadcrumbs are rendered outside the target area.
|
|
1458
|
+
*
|
|
1459
|
+
* @type {number|undefined}
|
|
1460
|
+
*/
|
|
1461
|
+
y: void 0
|
|
1462
|
+
},
|
|
1463
|
+
/**
|
|
1464
|
+
* Options object for Breadcrumbs separator.
|
|
1465
|
+
*
|
|
1466
|
+
* @since 10.0.0
|
|
1467
|
+
*/
|
|
1468
|
+
separator: {
|
|
1469
|
+
/**
|
|
1470
|
+
* @type {string}
|
|
1471
|
+
* @since 10.0.0
|
|
1472
|
+
* @product highcharts
|
|
1473
|
+
*/
|
|
1474
|
+
text: '/',
|
|
1475
|
+
/**
|
|
1476
|
+
* CSS styles for the breadcrumbs separator.
|
|
1477
|
+
*
|
|
1478
|
+
* In styled mode, the breadcrumbs separators are styled by the
|
|
1479
|
+
* `.highcharts-separator` rule with its different states.
|
|
1480
|
+
* @type {Highcharts.CSSObject}
|
|
1481
|
+
* @since 10.0.0
|
|
1482
|
+
*/
|
|
1483
|
+
style: {
|
|
1484
|
+
color: "#666666" /* neutralColor60 */
|
|
1485
|
+
}
|
|
1486
|
+
},
|
|
1487
|
+
/**
|
|
1488
|
+
* Show full path or only a single button.
|
|
1489
|
+
*
|
|
1490
|
+
* @type {boolean}
|
|
1491
|
+
* @since 10.0.0
|
|
1492
|
+
* @sample {highcharts} highcharts/breadcrumbs/single-button
|
|
1493
|
+
* Single, styled button
|
|
1494
|
+
*/
|
|
1495
|
+
showFullPath: true,
|
|
1496
|
+
/**
|
|
1497
|
+
* CSS styles for all breadcrumbs.
|
|
1498
|
+
*
|
|
1499
|
+
* In styled mode, the breadcrumbs buttons are styled by the
|
|
1500
|
+
* `.highcharts-breadcrumbs-buttons .highcharts-button` rule with its
|
|
1501
|
+
* different states.
|
|
1502
|
+
* @type {Highcharts.SVGAttributes}
|
|
1503
|
+
* @since 10.0.0
|
|
1504
|
+
*/
|
|
1505
|
+
style: {},
|
|
1506
|
+
/**
|
|
1507
|
+
* Whether to use HTML to render the breadcrumbs items texts.
|
|
1508
|
+
*
|
|
1509
|
+
* @type {boolean}
|
|
1510
|
+
* @since 10.0.0
|
|
1511
|
+
*/
|
|
1512
|
+
useHTML: false,
|
|
1513
|
+
/**
|
|
1514
|
+
* The z index of the breadcrumbs group.
|
|
1515
|
+
*
|
|
1516
|
+
* @type {number}
|
|
1517
|
+
* @since 10.0.0
|
|
1518
|
+
*/
|
|
1519
|
+
zIndex: 7
|
|
1520
|
+
};
|
|
1521
|
+
return Breadcrumbs;
|
|
1522
|
+
}());
|
|
1523
|
+
/* eslint-disable no-invalid-this */
|
|
1524
|
+
if (!H.Breadcrumbs) {
|
|
1525
|
+
H.Breadcrumbs = Breadcrumbs;
|
|
1526
|
+
// Logic for making space for the buttons above the plot area
|
|
1527
|
+
addEvent(Chart, 'getMargins', function () {
|
|
1528
|
+
var breadcrumbs = this.breadcrumbs;
|
|
1529
|
+
if (breadcrumbs &&
|
|
1530
|
+
!breadcrumbs.options.floating &&
|
|
1531
|
+
breadcrumbs.level) {
|
|
1532
|
+
var breadcrumbsOptions = breadcrumbs.options,
|
|
1533
|
+
buttonTheme = breadcrumbsOptions.buttonTheme,
|
|
1534
|
+
breadcrumbsHeight = ((buttonTheme.height || 0) +
|
|
1535
|
+
2 * (buttonTheme.padding || 0) +
|
|
1536
|
+
breadcrumbsOptions.buttonSpacing),
|
|
1537
|
+
verticalAlign = breadcrumbsOptions.position.verticalAlign;
|
|
1538
|
+
if (verticalAlign === 'bottom') {
|
|
1539
|
+
this.marginBottom = (this.marginBottom || 0) + breadcrumbsHeight;
|
|
1540
|
+
breadcrumbs.yOffset = breadcrumbsHeight;
|
|
1541
|
+
}
|
|
1542
|
+
else if (verticalAlign !== 'middle') {
|
|
1543
|
+
this.plotTop += breadcrumbsHeight;
|
|
1544
|
+
breadcrumbs.yOffset = -breadcrumbsHeight;
|
|
1545
|
+
}
|
|
1546
|
+
else {
|
|
1547
|
+
breadcrumbs.yOffset = void 0;
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
});
|
|
1551
|
+
addEvent(Chart, 'redraw', function () {
|
|
1552
|
+
this.breadcrumbs && this.breadcrumbs.redraw();
|
|
1553
|
+
});
|
|
1554
|
+
// Remove resize/afterSetExtremes at chart destroy
|
|
1555
|
+
addEvent(Chart, 'destroy', function destroyEvents() {
|
|
1556
|
+
if (this.breadcrumbs) {
|
|
1557
|
+
this.breadcrumbs.destroy();
|
|
1558
|
+
this.breadcrumbs = void 0;
|
|
1559
|
+
}
|
|
1560
|
+
});
|
|
1561
|
+
// Shift the drillUpButton to make the space for resetZoomButton, #8095.
|
|
1562
|
+
addEvent(Chart, 'afterShowResetZoom', function () {
|
|
1563
|
+
var chart = this;
|
|
1564
|
+
if (chart.breadcrumbs) {
|
|
1565
|
+
var bbox = chart.resetZoomButton &&
|
|
1566
|
+
chart.resetZoomButton.getBBox(),
|
|
1567
|
+
breadcrumbsOptions = chart.breadcrumbs.options;
|
|
1568
|
+
if (bbox &&
|
|
1569
|
+
breadcrumbsOptions.position.align === 'right' &&
|
|
1570
|
+
breadcrumbsOptions.relativeTo === 'plotBox') {
|
|
1571
|
+
chart.breadcrumbs.alignBreadcrumbsGroup(-bbox.width - breadcrumbsOptions.buttonSpacing);
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
});
|
|
1575
|
+
// After zooming out, shift the drillUpButton
|
|
1576
|
+
// to the previous position, #8095.
|
|
1577
|
+
addEvent(Chart, 'selection', function (event) {
|
|
1578
|
+
if (event.resetSelection === true &&
|
|
1579
|
+
this.breadcrumbs) {
|
|
1580
|
+
this.breadcrumbs.alignBreadcrumbsGroup();
|
|
1581
|
+
}
|
|
1582
|
+
});
|
|
1583
|
+
}
|
|
1584
|
+
/* *
|
|
1585
|
+
*
|
|
1586
|
+
* Default Export
|
|
1587
|
+
*
|
|
1588
|
+
* */
|
|
1589
|
+
/* *
|
|
1590
|
+
*
|
|
1591
|
+
* API Declarations
|
|
1592
|
+
*
|
|
1593
|
+
* */
|
|
1594
|
+
/**
|
|
1595
|
+
* Callback function to react on button clicks.
|
|
1596
|
+
*
|
|
1597
|
+
* @callback Highcharts.BreadcrumbsClickCallbackFunction
|
|
1598
|
+
*
|
|
1599
|
+
* @param {Highcharts.Event} event
|
|
1600
|
+
* Event.
|
|
1601
|
+
*
|
|
1602
|
+
* @param {Highcharts.BreadcrumbOptions} options
|
|
1603
|
+
* Breadcrumb options.
|
|
1604
|
+
*
|
|
1605
|
+
* @param {global.Event} e
|
|
1606
|
+
* Event arguments.
|
|
1607
|
+
*/
|
|
1608
|
+
/**
|
|
1609
|
+
* Callback function to format the breadcrumb text from scratch.
|
|
1610
|
+
*
|
|
1611
|
+
* @callback Highcharts.BreadcrumbsFormatterCallbackFunction
|
|
1612
|
+
*
|
|
1613
|
+
* @param {Highcharts.Event} event
|
|
1614
|
+
* Event.
|
|
1615
|
+
*
|
|
1616
|
+
* @param {Highcharts.BreadcrumbOptions} options
|
|
1617
|
+
* Breadcrumb options.
|
|
1618
|
+
*
|
|
1619
|
+
* @return {string}
|
|
1620
|
+
* Formatted text or false
|
|
1621
|
+
*/
|
|
1622
|
+
/**
|
|
1623
|
+
* Options for the one breadcrumb.
|
|
1624
|
+
*
|
|
1625
|
+
* @interface Highcharts.BreadcrumbOptions
|
|
1626
|
+
*/
|
|
1627
|
+
/**
|
|
1628
|
+
* Level connected to a specific breadcrumb.
|
|
1629
|
+
* @name Highcharts.BreadcrumbOptions#level
|
|
1630
|
+
* @type {number}
|
|
1631
|
+
*/
|
|
1632
|
+
/**
|
|
1633
|
+
* Options for series or point connected to a specific breadcrumb.
|
|
1634
|
+
* @name Highcharts.BreadcrumbOptions#levelOptions
|
|
1635
|
+
* @type {SeriesOptions|PointOptionsObject}
|
|
1636
|
+
*/
|
|
1637
|
+
/**
|
|
1638
|
+
* Options for aligning breadcrumbs group.
|
|
1639
|
+
*
|
|
1640
|
+
* @interface Highcharts.BreadcrumbsAlignOptions
|
|
1641
|
+
*/
|
|
1642
|
+
/**
|
|
1643
|
+
* Align of a Breadcrumb group.
|
|
1644
|
+
* @default right
|
|
1645
|
+
* @name Highcharts.BreadcrumbsAlignOptions#align
|
|
1646
|
+
* @type {AlignValue}
|
|
1647
|
+
*/
|
|
1648
|
+
/**
|
|
1649
|
+
* Vertical align of a Breadcrumb group.
|
|
1650
|
+
* @default top
|
|
1651
|
+
* @name Highcharts.BreadcrumbsAlignOptions#verticalAlign
|
|
1652
|
+
* @type {VerticalAlignValue}
|
|
1653
|
+
*/
|
|
1654
|
+
/**
|
|
1655
|
+
* X offset of a Breadcrumbs group.
|
|
1656
|
+
* @name Highcharts.BreadcrumbsAlignOptions#x
|
|
1657
|
+
* @type {number}
|
|
1658
|
+
*/
|
|
1659
|
+
/**
|
|
1660
|
+
* Y offset of a Breadcrumbs group.
|
|
1661
|
+
* @name Highcharts.BreadcrumbsAlignOptions#y
|
|
1662
|
+
* @type {number}
|
|
1663
|
+
*/
|
|
1664
|
+
/**
|
|
1665
|
+
* Options for all breadcrumbs.
|
|
1666
|
+
*
|
|
1667
|
+
* @interface Highcharts.BreadcrumbsOptions
|
|
1668
|
+
*/
|
|
1669
|
+
/**
|
|
1670
|
+
* Button theme.
|
|
1671
|
+
* @name Highcharts.BreadcrumbsOptions#buttonTheme
|
|
1672
|
+
* @type { SVGAttributes | undefined }
|
|
1673
|
+
*/
|
|
1674
|
+
(''); // Keeps doclets above in JS file
|
|
1675
|
+
|
|
1676
|
+
return Breadcrumbs;
|
|
1677
|
+
});
|
|
739
1678
|
_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
1679
|
/* *
|
|
741
1680
|
*
|
|
@@ -797,7 +1736,7 @@
|
|
|
797
1736
|
});
|
|
798
1737
|
|
|
799
1738
|
});
|
|
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) {
|
|
1739
|
+
_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
1740
|
/* *
|
|
802
1741
|
*
|
|
803
1742
|
* (c) 2014-2021 Highsoft AS
|
|
@@ -842,6 +1781,7 @@
|
|
|
842
1781
|
extend = U.extend,
|
|
843
1782
|
fireEvent = U.fireEvent,
|
|
844
1783
|
isArray = U.isArray,
|
|
1784
|
+
isNumber = U.isNumber,
|
|
845
1785
|
isObject = U.isObject,
|
|
846
1786
|
isString = U.isString,
|
|
847
1787
|
merge = U.merge,
|
|
@@ -882,6 +1822,7 @@
|
|
|
882
1822
|
_this.points = void 0;
|
|
883
1823
|
_this.rootNode = void 0;
|
|
884
1824
|
_this.tree = void 0;
|
|
1825
|
+
_this.level = void 0;
|
|
885
1826
|
return _this;
|
|
886
1827
|
/* eslint-enable valid-jsdoc */
|
|
887
1828
|
}
|
|
@@ -1138,6 +2079,46 @@
|
|
|
1138
2079
|
}
|
|
1139
2080
|
});
|
|
1140
2081
|
};
|
|
2082
|
+
/**
|
|
2083
|
+
* Create level list.
|
|
2084
|
+
*
|
|
2085
|
+
* @requires modules/breadcrumbs
|
|
2086
|
+
*
|
|
2087
|
+
* @function TreemapSeries#createList
|
|
2088
|
+
* @param {TreemapSeries} this
|
|
2089
|
+
* Treemap Series class.
|
|
2090
|
+
*/
|
|
2091
|
+
TreemapSeries.prototype.createList = function (e) {
|
|
2092
|
+
var chart = this.chart,
|
|
2093
|
+
breadcrumbs = chart.breadcrumbs,
|
|
2094
|
+
list = [];
|
|
2095
|
+
if (breadcrumbs) {
|
|
2096
|
+
var currentLevelNumber_1 = 0;
|
|
2097
|
+
list.push({
|
|
2098
|
+
level: currentLevelNumber_1,
|
|
2099
|
+
levelOptions: chart.series[0]
|
|
2100
|
+
});
|
|
2101
|
+
var node = e.target.nodeMap[e.newRootId];
|
|
2102
|
+
var extraNodes = [];
|
|
2103
|
+
// When the root node is set and has parent,
|
|
2104
|
+
// recreate the path from the node tree.
|
|
2105
|
+
while (node.parent || node.parent === '') {
|
|
2106
|
+
extraNodes.push(node);
|
|
2107
|
+
node = e.target.nodeMap[node.parent];
|
|
2108
|
+
}
|
|
2109
|
+
extraNodes.reverse().forEach(function (node) {
|
|
2110
|
+
list.push({
|
|
2111
|
+
level: ++currentLevelNumber_1,
|
|
2112
|
+
levelOptions: node
|
|
2113
|
+
});
|
|
2114
|
+
});
|
|
2115
|
+
// If the list has only first element, we should clear it
|
|
2116
|
+
if (list.length <= 1) {
|
|
2117
|
+
list.length = 0;
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
return list;
|
|
2121
|
+
};
|
|
1141
2122
|
/**
|
|
1142
2123
|
* Extend drawDataLabels with logic to handle custom options related to
|
|
1143
2124
|
* the treemap series:
|
|
@@ -1388,7 +2369,9 @@
|
|
|
1388
2369
|
};
|
|
1389
2370
|
TreemapSeries.prototype.init = function (chart, options) {
|
|
1390
2371
|
var series = this,
|
|
1391
|
-
|
|
2372
|
+
breadcrumbsOptions = merge(options.drillUpButton,
|
|
2373
|
+
options.breadcrumbs);
|
|
2374
|
+
var setOptionsEvent;
|
|
1392
2375
|
// If color series logic is loaded, add some properties
|
|
1393
2376
|
this.colorAttribs = ColorMapMixin.SeriesMixin.colorAttribs;
|
|
1394
2377
|
setOptionsEvent = addEvent(series, 'setOptions', function (event) {
|
|
@@ -1411,7 +2394,38 @@
|
|
|
1411
2394
|
series.eventsToUnbind.push(setOptionsEvent);
|
|
1412
2395
|
if (series.options.allowTraversingTree) {
|
|
1413
2396
|
series.eventsToUnbind.push(addEvent(series, 'click', series.onClickDrillToNode));
|
|
2397
|
+
series.eventsToUnbind.push(addEvent(series, 'setRootNode', function (e) {
|
|
2398
|
+
var chart = series.chart;
|
|
2399
|
+
if (chart.breadcrumbs) {
|
|
2400
|
+
// Create a list using the event after drilldown.
|
|
2401
|
+
chart.breadcrumbs.updateProperties(series.createList(e));
|
|
2402
|
+
}
|
|
2403
|
+
}));
|
|
2404
|
+
series.eventsToUnbind.push(addEvent(series, 'update', function (e, redraw) {
|
|
2405
|
+
var breadcrumbs = this.chart.breadcrumbs;
|
|
2406
|
+
if (breadcrumbs && e.options.breadcrumbs) {
|
|
2407
|
+
breadcrumbs.update(e.options.breadcrumbs);
|
|
2408
|
+
}
|
|
2409
|
+
}));
|
|
2410
|
+
series.eventsToUnbind.push(addEvent(series, 'destroy', function destroyEvents(e) {
|
|
2411
|
+
var chart = this.chart;
|
|
2412
|
+
if (chart.breadcrumbs) {
|
|
2413
|
+
chart.breadcrumbs.destroy();
|
|
2414
|
+
if (!e.keepEventsForUpdate) {
|
|
2415
|
+
chart.breadcrumbs = void 0;
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
}));
|
|
2419
|
+
}
|
|
2420
|
+
if (!chart.breadcrumbs) {
|
|
2421
|
+
chart.breadcrumbs = new Breadcrumbs(chart, breadcrumbsOptions);
|
|
1414
2422
|
}
|
|
2423
|
+
series.eventsToUnbind.push(addEvent(chart.breadcrumbs, 'up', function (e) {
|
|
2424
|
+
var drillUpsNumber = this.level - e.newLevel;
|
|
2425
|
+
for (var i = 0; i < drillUpsNumber; i++) {
|
|
2426
|
+
series.drillUp();
|
|
2427
|
+
}
|
|
2428
|
+
}));
|
|
1415
2429
|
};
|
|
1416
2430
|
/**
|
|
1417
2431
|
* Add drilling on the suitable points.
|
|
@@ -1479,47 +2493,6 @@
|
|
|
1479
2493
|
}
|
|
1480
2494
|
return attr;
|
|
1481
2495
|
};
|
|
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
2496
|
/**
|
|
1524
2497
|
* Set the node's color recursively, from the parent down.
|
|
1525
2498
|
* @private
|
|
@@ -1762,7 +2735,6 @@
|
|
|
1762
2735
|
rootId = series.rootNode;
|
|
1763
2736
|
rootNode = series.nodeMap[rootId];
|
|
1764
2737
|
}
|
|
1765
|
-
series.renderTraverseUpButton(rootId);
|
|
1766
2738
|
series.mapOptionsToLevel = getLevelOptions({
|
|
1767
2739
|
from: rootNode.level + 1,
|
|
1768
2740
|
levels: options.levels,
|
|
@@ -1832,7 +2804,7 @@
|
|
|
1832
2804
|
* Treemap
|
|
1833
2805
|
*
|
|
1834
2806
|
* @extends plotOptions.scatter
|
|
1835
|
-
* @excluding
|
|
2807
|
+
* @excluding cluster, connectEnds, connectNulls, dataSorting, dragDrop, jitter, marker
|
|
1836
2808
|
* @product highcharts
|
|
1837
2809
|
* @requires modules/treemap
|
|
1838
2810
|
* @optionparent plotOptions.treemap
|
|
@@ -1869,6 +2841,16 @@
|
|
|
1869
2841
|
* The border radius for each treemap item.
|
|
1870
2842
|
*/
|
|
1871
2843
|
borderRadius: 0,
|
|
2844
|
+
/**
|
|
2845
|
+
* Options for the breadcrumbs, the navigation at the top leading the
|
|
2846
|
+
* way up through the traversed levels.
|
|
2847
|
+
*
|
|
2848
|
+
*
|
|
2849
|
+
* @since 10.0.0
|
|
2850
|
+
* @product highcharts
|
|
2851
|
+
* @extends navigation.breadcrumbs
|
|
2852
|
+
* @optionparent plotOptions.treemap.breadcrumbs
|
|
2853
|
+
*/
|
|
1872
2854
|
/**
|
|
1873
2855
|
* When the series contains less points than the crop threshold, all
|
|
1874
2856
|
* points are drawn, event if the points fall outside the visible plot
|
|
@@ -2032,52 +3014,12 @@
|
|
|
2032
3014
|
*/
|
|
2033
3015
|
levelIsConstant: true,
|
|
2034
3016
|
/**
|
|
2035
|
-
* Options for the button appearing when
|
|
2036
|
-
*
|
|
2037
|
-
*
|
|
3017
|
+
* Options for the button appearing when traversing down in a treemap.
|
|
3018
|
+
*
|
|
3019
|
+
* Since v9.3.3 the `traverseUpButton` is replaced by `breadcrumbs`.
|
|
2038
3020
|
*
|
|
2039
3021
|
* @deprecated
|
|
2040
3022
|
*/
|
|
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
3023
|
traverseUpButton: {
|
|
2082
3024
|
/**
|
|
2083
3025
|
* The position of the button.
|
|
@@ -2409,8 +3351,10 @@
|
|
|
2409
3351
|
|
|
2410
3352
|
return TreemapSeries;
|
|
2411
3353
|
});
|
|
2412
|
-
_registerModule(_modules, 'masters/modules/treemap.src.js', [], function () {
|
|
3354
|
+
_registerModule(_modules, 'masters/modules/treemap.src.js', [_modules['Core/Globals.js'], _modules['Extensions/Breadcrumbs.js']], function (Highcharts, Breadcrumbs) {
|
|
2413
3355
|
|
|
3356
|
+
var G = Highcharts;
|
|
3357
|
+
G.Breadcrumbs = Breadcrumbs;
|
|
2414
3358
|
|
|
2415
3359
|
});
|
|
2416
3360
|
}));
|