@ntlab/ntjs-assets 2.73.0 → 2.74.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/assets/js/cdn.json +1 -1
- package/assets/js/exif-js/exif.min.js +1 -8
- package/assets/js/highcharts/css/annotations/popup.css +86 -45
- package/assets/js/highcharts/css/highcharts.css +40 -30
- package/assets/js/highcharts/css/stocktools/gui.css +28 -11
- package/assets/js/highcharts/es-modules/Accessibility/Components/InfoRegionsComponent.js +3 -3
- package/assets/js/highcharts/es-modules/Accessibility/Components/LegendComponent.js +10 -1
- package/assets/js/highcharts/es-modules/Accessibility/Components/MenuComponent.js +23 -22
- package/assets/js/highcharts/es-modules/Accessibility/HighContrastMode.js +0 -5
- package/assets/js/highcharts/es-modules/Core/Axis/AxisDefaults.js +5 -0
- package/assets/js/highcharts/es-modules/Core/Axis/OrdinalAxis.js +19 -11
- package/assets/js/highcharts/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +14 -1
- package/assets/js/highcharts/es-modules/Core/Axis/RadialAxis.js +3 -4
- package/assets/js/highcharts/es-modules/Core/Axis/Tick.js +1 -1
- package/assets/js/highcharts/es-modules/Core/Axis/WaterfallAxis.js +4 -4
- package/assets/js/highcharts/es-modules/Core/Chart/Chart.js +31 -25
- package/assets/js/highcharts/es-modules/Core/Chart/ChartDefaults.js +13 -0
- package/assets/js/highcharts/es-modules/Core/Chart/GanttChart.js +4 -2
- package/assets/js/highcharts/es-modules/Core/Chart/StockChart.js +1 -1
- package/assets/js/highcharts/es-modules/Core/Color/Color.js +4 -8
- package/assets/js/highcharts/es-modules/Core/Defaults.js +4 -0
- package/assets/js/highcharts/es-modules/Core/Globals.js +1 -1
- package/assets/js/highcharts/es-modules/Core/HttpUtilities.js +45 -38
- package/assets/js/highcharts/es-modules/Core/Pointer.js +3 -4
- package/assets/js/highcharts/es-modules/Core/Renderer/HTML/AST.js +14 -14
- package/assets/js/highcharts/es-modules/Core/Renderer/HTML/HTMLElement.js +6 -2
- package/assets/js/highcharts/es-modules/Core/Renderer/SVG/SVGRenderer.js +4 -1
- package/assets/js/highcharts/es-modules/Core/Series/DataLabel.js +4 -2
- package/assets/js/highcharts/es-modules/Core/Series/Series.js +16 -6
- package/assets/js/highcharts/es-modules/Core/Series/SeriesDefaults.js +1 -3
- package/assets/js/highcharts/es-modules/Core/Templating.js +6 -5
- package/assets/js/highcharts/es-modules/Core/Tooltip.js +3 -1
- package/assets/js/highcharts/es-modules/Data/Connectors/CSVConnector.js +32 -15
- package/assets/js/highcharts/es-modules/Data/Connectors/DataConnector.js +107 -12
- package/assets/js/highcharts/es-modules/Data/Connectors/GoogleSheetsConnector.js +29 -17
- package/assets/js/highcharts/es-modules/Data/Connectors/HTMLTableConnector.js +3 -3
- package/assets/js/highcharts/es-modules/Data/Connectors/JSONConnector.js +37 -16
- package/assets/js/highcharts/es-modules/Data/Converters/HTMLTableConverter.js +1 -1
- package/assets/js/highcharts/es-modules/Data/DataPool.js +15 -4
- package/assets/js/highcharts/es-modules/Extensions/Annotations/Annotation.js +10 -7
- package/assets/js/highcharts/es-modules/Extensions/Annotations/AnnotationChart.js +7 -3
- package/assets/js/highcharts/es-modules/Extensions/Annotations/AnnotationDefaults.js +38 -12
- package/assets/js/highcharts/es-modules/Extensions/Annotations/Controllables/ControllableLabel.js +10 -3
- package/assets/js/highcharts/es-modules/Extensions/Annotations/NavigationBindingsDefaults.js +1 -1
- package/assets/js/highcharts/es-modules/Extensions/Annotations/Popup/PopupAnnotations.js +10 -4
- package/assets/js/highcharts/es-modules/Extensions/Annotations/Popup/PopupComposition.js +1 -1
- package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +0 -3
- package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/CrookedLine.js +97 -94
- package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/ElliottWave.js +43 -36
- package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/Fibonacci.js +86 -82
- package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/FibonacciTimeZones.js +74 -71
- package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/InfinityLine.js +17 -3
- package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/Measure.js +229 -226
- package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/Pitchfork.js +39 -40
- package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/TimeCycles.js +56 -52
- package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/Tunnel.js +80 -76
- package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/VerticalLine.js +57 -53
- package/assets/js/highcharts/es-modules/Extensions/Boost/BoostSeries.js +22 -3
- package/assets/js/highcharts/es-modules/Extensions/DownloadURL.js +41 -8
- package/assets/js/highcharts/es-modules/Extensions/ExportData/ExportData.js +876 -780
- package/assets/js/highcharts/es-modules/Extensions/ExportData/ExportDataDefaults.js +67 -13
- package/assets/js/highcharts/es-modules/Extensions/Exporting/Exporting.js +1091 -546
- package/assets/js/highcharts/es-modules/Extensions/Exporting/ExportingDefaults.js +52 -36
- package/assets/js/highcharts/es-modules/Extensions/Exporting/Fullscreen.js +2 -2
- package/assets/js/highcharts/es-modules/Extensions/NonCartesianSeriesZoom/NonCartesianSeriesZoom.js +311 -0
- package/assets/js/highcharts/es-modules/Extensions/OfflineExporting/OfflineExporting.js +254 -575
- package/assets/js/highcharts/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +9 -38
- package/assets/js/highcharts/es-modules/Extensions/Pane/Pane.js +1 -1
- package/assets/js/highcharts/es-modules/Extensions/Pane/PaneDefaults.js +9 -1
- package/assets/js/highcharts/es-modules/Extensions/Themes/Adaptive.js +1009 -0
- package/assets/js/highcharts/es-modules/Maps/MapNavigation.js +1 -1
- package/assets/js/highcharts/es-modules/Series/Bubble/BubblePoint.js +2 -2
- package/assets/js/highcharts/es-modules/Series/Column/ColumnSeriesDefaults.js +1 -2
- package/assets/js/highcharts/es-modules/Series/DragNodesComposition.js +4 -0
- package/assets/js/highcharts/es-modules/Series/Flags/FlagsSeriesDefaults.js +2 -0
- package/assets/js/highcharts/es-modules/Series/GraphLayoutComposition.js +2 -1
- package/assets/js/highcharts/es-modules/Series/Heatmap/HeatmapSeriesDefaults.js +1 -2
- package/assets/js/highcharts/es-modules/Series/Item/ItemSeries.js +1 -1
- package/assets/js/highcharts/es-modules/Series/PackedBubble/PackedBubblePoint.js +5 -0
- package/assets/js/highcharts/es-modules/Series/Pie/PieSeriesDefaults.js +1 -2
- package/assets/js/highcharts/es-modules/Series/PolarComposition.js +1 -1
- package/assets/js/highcharts/es-modules/Series/SolidGauge/SolidGaugeSeries.js +7 -2
- package/assets/js/highcharts/es-modules/Series/Treegraph/TreegraphSeries.js +3 -1
- package/assets/js/highcharts/es-modules/Series/Variwide/VariwideSeries.js +8 -1
- package/assets/js/highcharts/es-modules/Series/Waterfall/WaterfallSeries.js +6 -8
- package/assets/js/highcharts/es-modules/Series/Wordcloud/WordcloudSeries.js +87 -10
- package/assets/js/highcharts/es-modules/Shared/BaseForm.js +6 -3
- package/assets/js/highcharts/es-modules/Shared/TimeBase.js +5 -1
- package/assets/js/highcharts/es-modules/Stock/Navigator/NavigatorComposition.js +2 -2
- package/assets/js/highcharts/es-modules/Stock/Scrollbar/Scrollbar.js +5 -7
- package/assets/js/highcharts/es-modules/Stock/StockTools/StockToolbar.js +1 -1
- package/assets/js/highcharts/es-modules/Stock/StockTools/StockToolsBindings.js +34 -113
- package/assets/js/highcharts/es-modules/masters/highcharts-3d.src.js +3 -1
- package/assets/js/highcharts/es-modules/masters/highcharts-gantt.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/highcharts-more.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/highcharts.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/highmaps.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/highstock.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/i18n/fr-FR.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/i18n/nb-NO.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/i18n/zh-CN.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/ao.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/apo.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/aroon.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/atr.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/cci.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/chaikin.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/cmf.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/cmo.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/dema.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/disparity-index.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/dmi.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/dpo.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/indicators-all.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/indicators.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/keltner-channels.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/klinger.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/macd.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/mfi.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/momentum.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/natr.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/obv.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/pivot-points.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/ppo.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/price-channel.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/price-envelopes.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/psar.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/regressions.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/roc.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/rsi.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/stochastic.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/supertrend.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/tema.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/trendline.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/trix.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/volume-by-price.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/vwap.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/williams-r.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/wma.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/indicators/zigzag.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/accessibility.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/annotations-advanced.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/annotations.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/arc-diagram.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/arrow-symbols.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/boost-canvas.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/boost.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/broken-axis.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/bullet.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/coloraxis.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/current-date-indicator.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/cylinder.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/data-tools.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/data.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/datagrouping.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/debugger.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/dependency-wheel.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/dotplot.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/drag-panes.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/draggable-points.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/drilldown.src.js +3 -1
- package/assets/js/highcharts/es-modules/masters/modules/dumbbell.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/export-data.src.js +3 -3
- package/assets/js/highcharts/es-modules/masters/modules/exporting.src.js +5 -1
- package/assets/js/highcharts/es-modules/masters/modules/flowmap.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/full-screen.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/funnel.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/funnel3d.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/gantt.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/geoheatmap.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/grid-axis.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/heatmap.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/heikinashi.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/item-series.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/lollipop.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/map.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/marker-clusters.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/mouse-wheel-zoom.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/navigator.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/networkgraph.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/no-data-to-display.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/non-cartesian-zoom.src.js +18 -0
- package/assets/js/highcharts/es-modules/masters/modules/offline-exporting.src.js +2 -2
- package/assets/js/highcharts/es-modules/masters/modules/organization.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/pareto.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/pathfinder.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/pattern-fill.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/pictorial.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/pointandfigure.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/price-indicator.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/pyramid3d.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/renko.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/sankey.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/series-label.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/series-on-point.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/solid-gauge.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/sonification.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/static-scale.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/stock-tools.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/stock.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/streamgraph.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/sunburst.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/textpath.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/tiledwebmap.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/tilemap.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/timeline.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/treegraph.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/treegrid.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/treemap.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/variable-pie.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/variwide.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/vector.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/venn.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/windbarb.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/wordcloud.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/modules/xrange.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/themes/adaptive.src.js +15 -0
- package/assets/js/highcharts/es-modules/masters/themes/avocado.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/themes/brand-dark.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/themes/brand-light.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/themes/dark-blue.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/themes/dark-green.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/themes/dark-unica.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/themes/gray.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/themes/grid-light.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/themes/grid.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/themes/high-contrast-light.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/themes/sand-signika.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/themes/skies.src.js +1 -1
- package/assets/js/highcharts/es-modules/masters/themes/sunset.src.js +1 -1
- package/assets/js/highcharts/esm/highcharts-3d.js +11 -1
- package/assets/js/highcharts/esm/highcharts-3d.src.js +3 -1
- package/assets/js/highcharts/esm/highcharts-gantt.js +8 -1
- package/assets/js/highcharts/esm/highcharts-gantt.src.js +1 -1
- package/assets/js/highcharts/esm/highcharts-more.js +9 -1
- package/assets/js/highcharts/esm/highcharts-more.src.js +44 -29
- package/assets/js/highcharts/esm/highcharts.js +9 -2
- package/assets/js/highcharts/esm/highcharts.src.js +138 -80
- package/assets/js/highcharts/esm/highmaps.js +8 -1
- package/assets/js/highcharts/esm/highmaps.src.js +1 -1
- package/assets/js/highcharts/esm/highstock.js +8 -1
- package/assets/js/highcharts/esm/highstock.src.js +1 -1
- package/assets/js/highcharts/esm/i18n/fr-FR.js +13 -1
- package/assets/js/highcharts/esm/i18n/fr-FR.src.js +1 -1
- package/assets/js/highcharts/esm/i18n/nb-NO.js +13 -1
- package/assets/js/highcharts/esm/i18n/nb-NO.src.js +1 -1
- package/assets/js/highcharts/esm/i18n/zh-CN.js +13 -1
- package/assets/js/highcharts/esm/i18n/zh-CN.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/acceleration-bands.js +12 -1
- package/assets/js/highcharts/esm/indicators/acceleration-bands.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/accumulation-distribution.js +12 -1
- package/assets/js/highcharts/esm/indicators/accumulation-distribution.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/ao.js +12 -1
- package/assets/js/highcharts/esm/indicators/ao.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/apo.js +12 -1
- package/assets/js/highcharts/esm/indicators/apo.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/aroon-oscillator.js +12 -1
- package/assets/js/highcharts/esm/indicators/aroon-oscillator.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/aroon.js +12 -1
- package/assets/js/highcharts/esm/indicators/aroon.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/atr.js +12 -1
- package/assets/js/highcharts/esm/indicators/atr.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/bollinger-bands.js +12 -1
- package/assets/js/highcharts/esm/indicators/bollinger-bands.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/cci.js +12 -1
- package/assets/js/highcharts/esm/indicators/cci.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/chaikin.js +12 -1
- package/assets/js/highcharts/esm/indicators/chaikin.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/cmf.js +11 -1
- package/assets/js/highcharts/esm/indicators/cmf.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/cmo.js +12 -1
- package/assets/js/highcharts/esm/indicators/cmo.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/dema.js +12 -1
- package/assets/js/highcharts/esm/indicators/dema.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/disparity-index.js +12 -1
- package/assets/js/highcharts/esm/indicators/disparity-index.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/dmi.js +12 -1
- package/assets/js/highcharts/esm/indicators/dmi.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/dpo.js +12 -1
- package/assets/js/highcharts/esm/indicators/dpo.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/ichimoku-kinko-hyo.js +12 -1
- package/assets/js/highcharts/esm/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/indicators-all.js +12 -1
- package/assets/js/highcharts/esm/indicators/indicators-all.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/indicators.js +12 -1
- package/assets/js/highcharts/esm/indicators/indicators.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/keltner-channels.js +12 -1
- package/assets/js/highcharts/esm/indicators/keltner-channels.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/klinger.js +12 -1
- package/assets/js/highcharts/esm/indicators/klinger.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/macd.js +12 -1
- package/assets/js/highcharts/esm/indicators/macd.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/mfi.js +12 -1
- package/assets/js/highcharts/esm/indicators/mfi.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/momentum.js +12 -1
- package/assets/js/highcharts/esm/indicators/momentum.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/natr.js +12 -1
- package/assets/js/highcharts/esm/indicators/natr.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/obv.js +12 -1
- package/assets/js/highcharts/esm/indicators/obv.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/pivot-points.js +12 -1
- package/assets/js/highcharts/esm/indicators/pivot-points.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/ppo.js +12 -1
- package/assets/js/highcharts/esm/indicators/ppo.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/price-channel.js +12 -1
- package/assets/js/highcharts/esm/indicators/price-channel.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/price-envelopes.js +12 -1
- package/assets/js/highcharts/esm/indicators/price-envelopes.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/psar.js +12 -1
- package/assets/js/highcharts/esm/indicators/psar.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/regressions.js +12 -1
- package/assets/js/highcharts/esm/indicators/regressions.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/roc.js +12 -1
- package/assets/js/highcharts/esm/indicators/roc.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/rsi.js +12 -1
- package/assets/js/highcharts/esm/indicators/rsi.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/slow-stochastic.js +12 -1
- package/assets/js/highcharts/esm/indicators/slow-stochastic.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/stochastic.js +12 -1
- package/assets/js/highcharts/esm/indicators/stochastic.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/supertrend.js +12 -1
- package/assets/js/highcharts/esm/indicators/supertrend.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/tema.js +12 -1
- package/assets/js/highcharts/esm/indicators/tema.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/trendline.js +12 -1
- package/assets/js/highcharts/esm/indicators/trendline.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/trix.js +12 -1
- package/assets/js/highcharts/esm/indicators/trix.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/volume-by-price.js +12 -1
- package/assets/js/highcharts/esm/indicators/volume-by-price.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/vwap.js +12 -1
- package/assets/js/highcharts/esm/indicators/vwap.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/williams-r.js +12 -1
- package/assets/js/highcharts/esm/indicators/williams-r.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/wma.js +12 -1
- package/assets/js/highcharts/esm/indicators/wma.src.js +1 -1
- package/assets/js/highcharts/esm/indicators/zigzag.js +12 -1
- package/assets/js/highcharts/esm/indicators/zigzag.src.js +1 -1
- package/assets/js/highcharts/esm/modules/accessibility.js +12 -1
- package/assets/js/highcharts/esm/modules/accessibility.src.js +46 -43
- package/assets/js/highcharts/esm/modules/annotations-advanced.js +11 -1
- package/assets/js/highcharts/esm/modules/annotations-advanced.src.js +866 -775
- package/assets/js/highcharts/esm/modules/annotations.js +11 -1
- package/assets/js/highcharts/esm/modules/annotations.src.js +89 -40
- package/assets/js/highcharts/esm/modules/arc-diagram.js +11 -1
- package/assets/js/highcharts/esm/modules/arc-diagram.src.js +1 -1
- package/assets/js/highcharts/esm/modules/arrow-symbols.js +11 -1
- package/assets/js/highcharts/esm/modules/arrow-symbols.src.js +1 -1
- package/assets/js/highcharts/esm/modules/boost-canvas.js +12 -1
- package/assets/js/highcharts/esm/modules/boost-canvas.src.js +23 -4
- package/assets/js/highcharts/esm/modules/boost.js +13 -1
- package/assets/js/highcharts/esm/modules/boost.src.js +23 -4
- package/assets/js/highcharts/esm/modules/broken-axis.js +9 -1
- package/assets/js/highcharts/esm/modules/broken-axis.src.js +1 -1
- package/assets/js/highcharts/esm/modules/bullet.js +11 -1
- package/assets/js/highcharts/esm/modules/bullet.src.js +1 -1
- package/assets/js/highcharts/esm/modules/coloraxis.js +11 -1
- package/assets/js/highcharts/esm/modules/coloraxis.src.js +1 -1
- package/assets/js/highcharts/esm/modules/current-date-indicator.js +11 -1
- package/assets/js/highcharts/esm/modules/current-date-indicator.src.js +1 -1
- package/assets/js/highcharts/esm/modules/cylinder.js +12 -1
- package/assets/js/highcharts/esm/modules/cylinder.src.js +1 -1
- package/assets/js/highcharts/esm/modules/data-tools.js +11 -1
- package/assets/js/highcharts/esm/modules/data-tools.src.js +225 -69
- package/assets/js/highcharts/esm/modules/data.js +11 -1
- package/assets/js/highcharts/esm/modules/data.src.js +46 -39
- package/assets/js/highcharts/esm/modules/datagrouping.js +11 -1
- package/assets/js/highcharts/esm/modules/datagrouping.src.js +1 -1
- package/assets/js/highcharts/esm/modules/debugger.js +11 -1
- package/assets/js/highcharts/esm/modules/debugger.src.js +1 -1
- package/assets/js/highcharts/esm/modules/dependency-wheel.js +12 -1
- package/assets/js/highcharts/esm/modules/dependency-wheel.src.js +1 -1
- package/assets/js/highcharts/esm/modules/dotplot.js +11 -1
- package/assets/js/highcharts/esm/modules/dotplot.src.js +1 -1
- package/assets/js/highcharts/esm/modules/drag-panes.js +13 -1
- package/assets/js/highcharts/esm/modules/drag-panes.src.js +1 -1
- package/assets/js/highcharts/esm/modules/draggable-points.js +9 -1
- package/assets/js/highcharts/esm/modules/draggable-points.src.js +1 -1
- package/assets/js/highcharts/esm/modules/drilldown.js +13 -1
- package/assets/js/highcharts/esm/modules/drilldown.src.js +3 -1
- package/assets/js/highcharts/esm/modules/dumbbell.js +9 -1
- package/assets/js/highcharts/esm/modules/dumbbell.src.js +1 -1
- package/assets/js/highcharts/esm/modules/export-data.js +12 -1
- package/assets/js/highcharts/esm/modules/export-data.src.js +984 -798
- package/assets/js/highcharts/esm/modules/exporting.js +11 -1
- package/assets/js/highcharts/esm/modules/exporting.src.js +1373 -642
- package/assets/js/highcharts/esm/modules/flowmap.js +9 -1
- package/assets/js/highcharts/esm/modules/flowmap.src.js +1 -1
- package/assets/js/highcharts/esm/modules/full-screen.js +12 -1
- package/assets/js/highcharts/esm/modules/full-screen.src.js +3 -3
- package/assets/js/highcharts/esm/modules/funnel.js +11 -1
- package/assets/js/highcharts/esm/modules/funnel.src.js +1 -1
- package/assets/js/highcharts/esm/modules/funnel3d.js +13 -1
- package/assets/js/highcharts/esm/modules/funnel3d.src.js +1 -1
- package/assets/js/highcharts/esm/modules/gantt.js +11 -1
- package/assets/js/highcharts/esm/modules/gantt.src.js +33 -25
- package/assets/js/highcharts/esm/modules/geoheatmap.js +9 -1
- package/assets/js/highcharts/esm/modules/geoheatmap.src.js +1 -1
- package/assets/js/highcharts/esm/modules/grid-axis.js +11 -1
- package/assets/js/highcharts/esm/modules/grid-axis.src.js +1 -1
- package/assets/js/highcharts/esm/modules/heatmap.js +9 -1
- package/assets/js/highcharts/esm/modules/heatmap.src.js +2 -3
- package/assets/js/highcharts/esm/modules/heikinashi.js +12 -1
- package/assets/js/highcharts/esm/modules/heikinashi.src.js +1 -1
- package/assets/js/highcharts/esm/modules/histogram-bellcurve.js +10 -1
- package/assets/js/highcharts/esm/modules/histogram-bellcurve.src.js +1 -1
- package/assets/js/highcharts/esm/modules/hollowcandlestick.js +12 -1
- package/assets/js/highcharts/esm/modules/hollowcandlestick.src.js +1 -1
- package/assets/js/highcharts/esm/modules/item-series.js +11 -1
- package/assets/js/highcharts/esm/modules/item-series.src.js +3 -5
- package/assets/js/highcharts/esm/modules/lollipop.js +9 -1
- package/assets/js/highcharts/esm/modules/lollipop.src.js +1 -1
- package/assets/js/highcharts/esm/modules/map.js +11 -1
- package/assets/js/highcharts/esm/modules/map.src.js +5 -6
- package/assets/js/highcharts/esm/modules/marker-clusters.js +11 -1
- package/assets/js/highcharts/esm/modules/marker-clusters.src.js +1 -1
- package/assets/js/highcharts/esm/modules/mouse-wheel-zoom.js +11 -1
- package/assets/js/highcharts/esm/modules/mouse-wheel-zoom.src.js +1 -1
- package/assets/js/highcharts/esm/modules/navigator.js +11 -1
- package/assets/js/highcharts/esm/modules/navigator.src.js +10 -12
- package/assets/js/highcharts/esm/modules/networkgraph.js +11 -1
- package/assets/js/highcharts/esm/modules/networkgraph.src.js +7 -2
- package/assets/js/highcharts/esm/modules/no-data-to-display.js +12 -1
- package/assets/js/highcharts/esm/modules/no-data-to-display.src.js +1 -1
- package/assets/js/highcharts/esm/modules/non-cartesian-zoom.js +11 -0
- package/assets/js/highcharts/esm/modules/non-cartesian-zoom.src.js +374 -0
- package/assets/js/highcharts/esm/modules/offline-exporting.js +12 -1
- package/assets/js/highcharts/esm/modules/offline-exporting.src.js +334 -3360
- package/assets/js/highcharts/esm/modules/organization.js +11 -1
- package/assets/js/highcharts/esm/modules/organization.src.js +1 -1
- package/assets/js/highcharts/esm/modules/parallel-coordinates.js +11 -1
- package/assets/js/highcharts/esm/modules/parallel-coordinates.src.js +1 -1
- package/assets/js/highcharts/esm/modules/pareto.js +11 -1
- package/assets/js/highcharts/esm/modules/pareto.src.js +1 -1
- package/assets/js/highcharts/esm/modules/pathfinder.js +11 -1
- package/assets/js/highcharts/esm/modules/pathfinder.src.js +1 -1
- package/assets/js/highcharts/esm/modules/pattern-fill.js +12 -1
- package/assets/js/highcharts/esm/modules/pattern-fill.src.js +1 -1
- package/assets/js/highcharts/esm/modules/pictorial.js +11 -1
- package/assets/js/highcharts/esm/modules/pictorial.src.js +1 -1
- package/assets/js/highcharts/esm/modules/pointandfigure.js +12 -1
- package/assets/js/highcharts/esm/modules/pointandfigure.src.js +1 -1
- package/assets/js/highcharts/esm/modules/price-indicator.js +13 -1
- package/assets/js/highcharts/esm/modules/price-indicator.src.js +1 -1
- package/assets/js/highcharts/esm/modules/pyramid3d.js +14 -1
- package/assets/js/highcharts/esm/modules/pyramid3d.src.js +1 -1
- package/assets/js/highcharts/esm/modules/renko.js +12 -1
- package/assets/js/highcharts/esm/modules/renko.src.js +1 -1
- package/assets/js/highcharts/esm/modules/sankey.js +11 -1
- package/assets/js/highcharts/esm/modules/sankey.src.js +1 -1
- package/assets/js/highcharts/esm/modules/series-label.js +9 -1
- package/assets/js/highcharts/esm/modules/series-label.src.js +1 -1
- package/assets/js/highcharts/esm/modules/series-on-point.js +12 -1
- package/assets/js/highcharts/esm/modules/series-on-point.src.js +1 -1
- package/assets/js/highcharts/esm/modules/solid-gauge.js +12 -1
- package/assets/js/highcharts/esm/modules/solid-gauge.src.js +8 -3
- package/assets/js/highcharts/esm/modules/sonification.js +12 -1
- package/assets/js/highcharts/esm/modules/sonification.src.js +42 -9
- package/assets/js/highcharts/esm/modules/static-scale.js +11 -1
- package/assets/js/highcharts/esm/modules/static-scale.src.js +1 -1
- package/assets/js/highcharts/esm/modules/stock-tools.js +13 -1
- package/assets/js/highcharts/esm/modules/stock-tools.src.js +37 -116
- package/assets/js/highcharts/esm/modules/stock.js +11 -1
- package/assets/js/highcharts/esm/modules/stock.src.js +32 -24
- package/assets/js/highcharts/esm/modules/streamgraph.js +11 -1
- package/assets/js/highcharts/esm/modules/streamgraph.src.js +1 -1
- package/assets/js/highcharts/esm/modules/sunburst.js +10 -1
- package/assets/js/highcharts/esm/modules/sunburst.src.js +1 -1
- package/assets/js/highcharts/esm/modules/textpath.js +9 -1
- package/assets/js/highcharts/esm/modules/textpath.src.js +1 -1
- package/assets/js/highcharts/esm/modules/tiledwebmap.js +10 -2
- package/assets/js/highcharts/esm/modules/tiledwebmap.src.js +1 -1
- package/assets/js/highcharts/esm/modules/tilemap.js +12 -1
- package/assets/js/highcharts/esm/modules/tilemap.src.js +1 -1
- package/assets/js/highcharts/esm/modules/timeline.js +12 -1
- package/assets/js/highcharts/esm/modules/timeline.src.js +1 -1
- package/assets/js/highcharts/esm/modules/treegraph.js +11 -1
- package/assets/js/highcharts/esm/modules/treegraph.src.js +4 -2
- package/assets/js/highcharts/esm/modules/treegrid.js +11 -1
- package/assets/js/highcharts/esm/modules/treegrid.src.js +1 -1
- package/assets/js/highcharts/esm/modules/treemap.js +10 -1
- package/assets/js/highcharts/esm/modules/treemap.src.js +1 -1
- package/assets/js/highcharts/esm/modules/variable-pie.js +11 -1
- package/assets/js/highcharts/esm/modules/variable-pie.src.js +1 -1
- package/assets/js/highcharts/esm/modules/variwide.js +11 -1
- package/assets/js/highcharts/esm/modules/variwide.src.js +9 -2
- package/assets/js/highcharts/esm/modules/vector.js +11 -1
- package/assets/js/highcharts/esm/modules/vector.src.js +1 -1
- package/assets/js/highcharts/esm/modules/venn.js +10 -1
- package/assets/js/highcharts/esm/modules/venn.src.js +1 -1
- package/assets/js/highcharts/esm/modules/windbarb.js +11 -1
- package/assets/js/highcharts/esm/modules/windbarb.src.js +1 -1
- package/assets/js/highcharts/esm/modules/wordcloud.js +10 -1
- package/assets/js/highcharts/esm/modules/wordcloud.src.js +88 -11
- package/assets/js/highcharts/esm/modules/xrange.js +11 -1
- package/assets/js/highcharts/esm/modules/xrange.src.js +1 -1
- package/assets/js/highcharts/esm/standalone-navigator.js +9 -2
- package/assets/js/highcharts/esm/standalone-navigator.src.js +146 -90
- package/assets/js/highcharts/esm/themes/adaptive.js +130 -0
- package/assets/js/highcharts/esm/themes/adaptive.src.js +1069 -0
- package/assets/js/highcharts/esm/themes/avocado.js +9 -1
- package/assets/js/highcharts/esm/themes/avocado.src.js +1 -1
- package/assets/js/highcharts/esm/themes/brand-dark.js +9 -1
- package/assets/js/highcharts/esm/themes/brand-dark.src.js +1 -1
- package/assets/js/highcharts/esm/themes/brand-light.js +9 -1
- package/assets/js/highcharts/esm/themes/brand-light.src.js +1 -1
- package/assets/js/highcharts/esm/themes/dark-blue.js +9 -1
- package/assets/js/highcharts/esm/themes/dark-blue.src.js +1 -1
- package/assets/js/highcharts/esm/themes/dark-green.js +9 -1
- package/assets/js/highcharts/esm/themes/dark-green.src.js +1 -1
- package/assets/js/highcharts/esm/themes/dark-unica.js +9 -1
- package/assets/js/highcharts/esm/themes/dark-unica.src.js +1 -1
- package/assets/js/highcharts/esm/themes/gray.js +9 -1
- package/assets/js/highcharts/esm/themes/gray.src.js +1 -1
- package/assets/js/highcharts/esm/themes/grid-light.js +9 -1
- package/assets/js/highcharts/esm/themes/grid-light.src.js +1 -1
- package/assets/js/highcharts/esm/themes/grid.js +9 -1
- package/assets/js/highcharts/esm/themes/grid.src.js +1 -1
- package/assets/js/highcharts/esm/themes/high-contrast-dark.js +9 -1
- package/assets/js/highcharts/esm/themes/high-contrast-dark.src.js +1 -1
- package/assets/js/highcharts/esm/themes/high-contrast-light.js +9 -1
- package/assets/js/highcharts/esm/themes/high-contrast-light.src.js +1 -1
- package/assets/js/highcharts/esm/themes/sand-signika.js +9 -1
- package/assets/js/highcharts/esm/themes/sand-signika.src.js +1 -1
- package/assets/js/highcharts/esm/themes/skies.js +9 -1
- package/assets/js/highcharts/esm/themes/skies.src.js +1 -1
- package/assets/js/highcharts/esm/themes/sunset.js +9 -1
- package/assets/js/highcharts/esm/themes/sunset.src.js +1 -1
- package/assets/js/highcharts/highcharts-3d.js +11 -1
- package/assets/js/highcharts/highcharts-3d.src.js +3 -1
- package/assets/js/highcharts/highcharts-gantt.js +16 -2
- package/assets/js/highcharts/highcharts-gantt.src.js +173 -107
- package/assets/js/highcharts/highcharts-more.js +9 -1
- package/assets/js/highcharts/highcharts-more.src.js +44 -29
- package/assets/js/highcharts/highcharts.js +9 -2
- package/assets/js/highcharts/highcharts.src.js +138 -80
- package/assets/js/highcharts/highmaps.js +16 -2
- package/assets/js/highcharts/highmaps.src.js +145 -88
- package/assets/js/highcharts/highstock.js +16 -2
- package/assets/js/highcharts/highstock.src.js +172 -106
- package/assets/js/highcharts/i18n/fr-FR.js +13 -1
- package/assets/js/highcharts/i18n/fr-FR.src.js +8 -8
- package/assets/js/highcharts/i18n/nb-NO.js +13 -1
- package/assets/js/highcharts/i18n/nb-NO.src.js +8 -8
- package/assets/js/highcharts/i18n/zh-CN.js +13 -1
- package/assets/js/highcharts/i18n/zh-CN.src.js +8 -8
- package/assets/js/highcharts/indicators/acceleration-bands.js +12 -1
- package/assets/js/highcharts/indicators/acceleration-bands.src.js +1 -1
- package/assets/js/highcharts/indicators/accumulation-distribution.js +12 -1
- package/assets/js/highcharts/indicators/accumulation-distribution.src.js +1 -1
- package/assets/js/highcharts/indicators/ao.js +12 -1
- package/assets/js/highcharts/indicators/ao.src.js +1 -1
- package/assets/js/highcharts/indicators/apo.js +12 -1
- package/assets/js/highcharts/indicators/apo.src.js +1 -1
- package/assets/js/highcharts/indicators/aroon-oscillator.js +12 -1
- package/assets/js/highcharts/indicators/aroon-oscillator.src.js +1 -1
- package/assets/js/highcharts/indicators/aroon.js +12 -1
- package/assets/js/highcharts/indicators/aroon.src.js +1 -1
- package/assets/js/highcharts/indicators/atr.js +12 -1
- package/assets/js/highcharts/indicators/atr.src.js +1 -1
- package/assets/js/highcharts/indicators/bollinger-bands.js +12 -1
- package/assets/js/highcharts/indicators/bollinger-bands.src.js +1 -1
- package/assets/js/highcharts/indicators/cci.js +12 -1
- package/assets/js/highcharts/indicators/cci.src.js +1 -1
- package/assets/js/highcharts/indicators/chaikin.js +12 -1
- package/assets/js/highcharts/indicators/chaikin.src.js +1 -1
- package/assets/js/highcharts/indicators/cmf.js +11 -1
- package/assets/js/highcharts/indicators/cmf.src.js +1 -1
- package/assets/js/highcharts/indicators/cmo.js +12 -1
- package/assets/js/highcharts/indicators/cmo.src.js +1 -1
- package/assets/js/highcharts/indicators/dema.js +12 -1
- package/assets/js/highcharts/indicators/dema.src.js +1 -1
- package/assets/js/highcharts/indicators/disparity-index.js +12 -1
- package/assets/js/highcharts/indicators/disparity-index.src.js +1 -1
- package/assets/js/highcharts/indicators/dmi.js +12 -1
- package/assets/js/highcharts/indicators/dmi.src.js +1 -1
- package/assets/js/highcharts/indicators/dpo.js +12 -1
- package/assets/js/highcharts/indicators/dpo.src.js +1 -1
- package/assets/js/highcharts/indicators/ema.src.js +3 -3
- package/assets/js/highcharts/indicators/ichimoku-kinko-hyo.js +12 -1
- package/assets/js/highcharts/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/assets/js/highcharts/indicators/indicators-all.js +12 -1
- package/assets/js/highcharts/indicators/indicators-all.src.js +1 -1
- package/assets/js/highcharts/indicators/indicators.js +12 -1
- package/assets/js/highcharts/indicators/indicators.src.js +1 -1
- package/assets/js/highcharts/indicators/keltner-channels.js +12 -1
- package/assets/js/highcharts/indicators/keltner-channels.src.js +1 -1
- package/assets/js/highcharts/indicators/klinger.js +12 -1
- package/assets/js/highcharts/indicators/klinger.src.js +1 -1
- package/assets/js/highcharts/indicators/macd.js +12 -1
- package/assets/js/highcharts/indicators/macd.src.js +1 -1
- package/assets/js/highcharts/indicators/mfi.js +12 -1
- package/assets/js/highcharts/indicators/mfi.src.js +1 -1
- package/assets/js/highcharts/indicators/momentum.js +12 -1
- package/assets/js/highcharts/indicators/momentum.src.js +1 -1
- package/assets/js/highcharts/indicators/natr.js +12 -1
- package/assets/js/highcharts/indicators/natr.src.js +1 -1
- package/assets/js/highcharts/indicators/obv.js +12 -1
- package/assets/js/highcharts/indicators/obv.src.js +1 -1
- package/assets/js/highcharts/indicators/pivot-points.js +12 -1
- package/assets/js/highcharts/indicators/pivot-points.src.js +1 -1
- package/assets/js/highcharts/indicators/ppo.js +12 -1
- package/assets/js/highcharts/indicators/ppo.src.js +1 -1
- package/assets/js/highcharts/indicators/price-channel.js +12 -1
- package/assets/js/highcharts/indicators/price-channel.src.js +1 -1
- package/assets/js/highcharts/indicators/price-envelopes.js +12 -1
- package/assets/js/highcharts/indicators/price-envelopes.src.js +1 -1
- package/assets/js/highcharts/indicators/psar.js +12 -1
- package/assets/js/highcharts/indicators/psar.src.js +1 -1
- package/assets/js/highcharts/indicators/regressions.js +12 -1
- package/assets/js/highcharts/indicators/regressions.src.js +1 -1
- package/assets/js/highcharts/indicators/roc.js +12 -1
- package/assets/js/highcharts/indicators/roc.src.js +1 -1
- package/assets/js/highcharts/indicators/rsi.js +12 -1
- package/assets/js/highcharts/indicators/rsi.src.js +1 -1
- package/assets/js/highcharts/indicators/slow-stochastic.js +12 -1
- package/assets/js/highcharts/indicators/slow-stochastic.src.js +1 -1
- package/assets/js/highcharts/indicators/stochastic.js +12 -1
- package/assets/js/highcharts/indicators/stochastic.src.js +1 -1
- package/assets/js/highcharts/indicators/supertrend.js +12 -1
- package/assets/js/highcharts/indicators/supertrend.src.js +1 -1
- package/assets/js/highcharts/indicators/tema.js +12 -1
- package/assets/js/highcharts/indicators/tema.src.js +1 -1
- package/assets/js/highcharts/indicators/trendline.js +12 -1
- package/assets/js/highcharts/indicators/trendline.src.js +1 -1
- package/assets/js/highcharts/indicators/trix.js +12 -1
- package/assets/js/highcharts/indicators/trix.src.js +1 -1
- package/assets/js/highcharts/indicators/volume-by-price.js +12 -1
- package/assets/js/highcharts/indicators/volume-by-price.src.js +1 -1
- package/assets/js/highcharts/indicators/vwap.js +12 -1
- package/assets/js/highcharts/indicators/vwap.src.js +1 -1
- package/assets/js/highcharts/indicators/williams-r.js +12 -1
- package/assets/js/highcharts/indicators/williams-r.src.js +1 -1
- package/assets/js/highcharts/indicators/wma.js +12 -1
- package/assets/js/highcharts/indicators/wma.src.js +1 -1
- package/assets/js/highcharts/indicators/zigzag.js +12 -1
- package/assets/js/highcharts/indicators/zigzag.src.js +1 -1
- package/assets/js/highcharts/modules/accessibility.js +12 -1
- package/assets/js/highcharts/modules/accessibility.src.js +46 -43
- package/assets/js/highcharts/modules/annotations-advanced.js +21 -1
- package/assets/js/highcharts/modules/annotations-advanced.src.js +879 -788
- package/assets/js/highcharts/modules/annotations.js +11 -1
- package/assets/js/highcharts/modules/annotations.src.js +89 -40
- package/assets/js/highcharts/modules/arc-diagram.js +11 -1
- package/assets/js/highcharts/modules/arc-diagram.src.js +1 -1
- package/assets/js/highcharts/modules/arrow-symbols.js +11 -1
- package/assets/js/highcharts/modules/arrow-symbols.src.js +1 -1
- package/assets/js/highcharts/modules/boost-canvas.js +12 -1
- package/assets/js/highcharts/modules/boost-canvas.src.js +23 -4
- package/assets/js/highcharts/modules/boost.js +13 -1
- package/assets/js/highcharts/modules/boost.src.js +23 -4
- package/assets/js/highcharts/modules/broken-axis.js +9 -1
- package/assets/js/highcharts/modules/broken-axis.src.js +1 -1
- package/assets/js/highcharts/modules/bullet.js +11 -1
- package/assets/js/highcharts/modules/bullet.src.js +1 -1
- package/assets/js/highcharts/modules/coloraxis.js +11 -1
- package/assets/js/highcharts/modules/coloraxis.src.js +1 -1
- package/assets/js/highcharts/modules/current-date-indicator.js +11 -1
- package/assets/js/highcharts/modules/current-date-indicator.src.js +1 -1
- package/assets/js/highcharts/modules/cylinder.js +12 -1
- package/assets/js/highcharts/modules/cylinder.src.js +1 -1
- package/assets/js/highcharts/modules/data-tools.js +11 -1
- package/assets/js/highcharts/modules/data-tools.src.js +225 -69
- package/assets/js/highcharts/modules/data.js +11 -1
- package/assets/js/highcharts/modules/data.src.js +46 -39
- package/assets/js/highcharts/modules/datagrouping.js +11 -1
- package/assets/js/highcharts/modules/datagrouping.src.js +1 -1
- package/assets/js/highcharts/modules/debugger.js +11 -1
- package/assets/js/highcharts/modules/debugger.src.js +1 -1
- package/assets/js/highcharts/modules/dependency-wheel.js +12 -1
- package/assets/js/highcharts/modules/dependency-wheel.src.js +1 -1
- package/assets/js/highcharts/modules/dotplot.js +11 -1
- package/assets/js/highcharts/modules/dotplot.src.js +1 -1
- package/assets/js/highcharts/modules/drag-panes.js +13 -1
- package/assets/js/highcharts/modules/drag-panes.src.js +1 -1
- package/assets/js/highcharts/modules/draggable-points.js +9 -1
- package/assets/js/highcharts/modules/draggable-points.src.js +1 -1
- package/assets/js/highcharts/modules/drilldown.js +13 -1
- package/assets/js/highcharts/modules/drilldown.src.js +3 -1
- package/assets/js/highcharts/modules/dumbbell.js +9 -1
- package/assets/js/highcharts/modules/dumbbell.src.js +1 -1
- package/assets/js/highcharts/modules/export-data.js +12 -1
- package/assets/js/highcharts/modules/export-data.src.js +996 -803
- package/assets/js/highcharts/modules/exporting.js +11 -1
- package/assets/js/highcharts/modules/exporting.src.js +1372 -636
- package/assets/js/highcharts/modules/flowmap.js +9 -1
- package/assets/js/highcharts/modules/flowmap.src.js +1 -1
- package/assets/js/highcharts/modules/full-screen.js +12 -1
- package/assets/js/highcharts/modules/full-screen.src.js +3 -3
- package/assets/js/highcharts/modules/funnel.js +11 -1
- package/assets/js/highcharts/modules/funnel.src.js +1 -1
- package/assets/js/highcharts/modules/funnel3d.js +13 -1
- package/assets/js/highcharts/modules/funnel3d.src.js +1 -1
- package/assets/js/highcharts/modules/gantt.js +31 -1
- package/assets/js/highcharts/modules/gantt.src.js +36 -28
- package/assets/js/highcharts/modules/geoheatmap.js +9 -1
- package/assets/js/highcharts/modules/geoheatmap.src.js +1 -1
- package/assets/js/highcharts/modules/grid-axis.js +11 -1
- package/assets/js/highcharts/modules/grid-axis.src.js +1 -1
- package/assets/js/highcharts/modules/heatmap.js +19 -1
- package/assets/js/highcharts/modules/heatmap.src.js +3 -4
- package/assets/js/highcharts/modules/heikinashi.js +12 -1
- package/assets/js/highcharts/modules/heikinashi.src.js +1 -1
- package/assets/js/highcharts/modules/histogram-bellcurve.js +10 -1
- package/assets/js/highcharts/modules/histogram-bellcurve.src.js +1 -1
- package/assets/js/highcharts/modules/hollowcandlestick.js +12 -1
- package/assets/js/highcharts/modules/hollowcandlestick.src.js +1 -1
- package/assets/js/highcharts/modules/item-series.js +11 -1
- package/assets/js/highcharts/modules/item-series.src.js +3 -5
- package/assets/js/highcharts/modules/lollipop.js +9 -1
- package/assets/js/highcharts/modules/lollipop.src.js +1 -1
- package/assets/js/highcharts/modules/map.js +21 -1
- package/assets/js/highcharts/modules/map.src.js +6 -7
- package/assets/js/highcharts/modules/marker-clusters.js +11 -1
- package/assets/js/highcharts/modules/marker-clusters.src.js +1 -1
- package/assets/js/highcharts/modules/mouse-wheel-zoom.js +11 -1
- package/assets/js/highcharts/modules/mouse-wheel-zoom.src.js +1 -1
- package/assets/js/highcharts/modules/navigator.js +11 -1
- package/assets/js/highcharts/modules/navigator.src.js +10 -12
- package/assets/js/highcharts/modules/networkgraph.js +11 -1
- package/assets/js/highcharts/modules/networkgraph.src.js +7 -2
- package/assets/js/highcharts/modules/no-data-to-display.js +12 -1
- package/assets/js/highcharts/modules/no-data-to-display.src.js +1 -1
- package/assets/js/highcharts/modules/non-cartesian-zoom.js +11 -0
- package/assets/js/highcharts/modules/non-cartesian-zoom.src.js +427 -0
- package/assets/js/highcharts/modules/offline-exporting.js +12 -1
- package/assets/js/highcharts/modules/offline-exporting.src.js +353 -3380
- package/assets/js/highcharts/modules/organization.js +11 -1
- package/assets/js/highcharts/modules/organization.src.js +1 -1
- package/assets/js/highcharts/modules/parallel-coordinates.js +11 -1
- package/assets/js/highcharts/modules/parallel-coordinates.src.js +1 -1
- package/assets/js/highcharts/modules/pareto.js +11 -1
- package/assets/js/highcharts/modules/pareto.src.js +1 -1
- package/assets/js/highcharts/modules/pathfinder.js +11 -1
- package/assets/js/highcharts/modules/pathfinder.src.js +1 -1
- package/assets/js/highcharts/modules/pattern-fill.js +12 -1
- package/assets/js/highcharts/modules/pattern-fill.src.js +1 -1
- package/assets/js/highcharts/modules/pictorial.js +11 -1
- package/assets/js/highcharts/modules/pictorial.src.js +1 -1
- package/assets/js/highcharts/modules/pointandfigure.js +12 -1
- package/assets/js/highcharts/modules/pointandfigure.src.js +1 -1
- package/assets/js/highcharts/modules/price-indicator.js +13 -1
- package/assets/js/highcharts/modules/price-indicator.src.js +1 -1
- package/assets/js/highcharts/modules/pyramid3d.js +14 -1
- package/assets/js/highcharts/modules/pyramid3d.src.js +1 -1
- package/assets/js/highcharts/modules/renko.js +12 -1
- package/assets/js/highcharts/modules/renko.src.js +1 -1
- package/assets/js/highcharts/modules/sankey.js +11 -1
- package/assets/js/highcharts/modules/sankey.src.js +1 -1
- package/assets/js/highcharts/modules/series-label.js +9 -1
- package/assets/js/highcharts/modules/series-label.src.js +1 -1
- package/assets/js/highcharts/modules/series-on-point.js +12 -1
- package/assets/js/highcharts/modules/series-on-point.src.js +1 -1
- package/assets/js/highcharts/modules/solid-gauge.js +12 -1
- package/assets/js/highcharts/modules/solid-gauge.src.js +8 -3
- package/assets/js/highcharts/modules/sonification.js +12 -1
- package/assets/js/highcharts/modules/sonification.src.js +42 -9
- package/assets/js/highcharts/modules/static-scale.js +11 -1
- package/assets/js/highcharts/modules/static-scale.src.js +1 -1
- package/assets/js/highcharts/modules/stock-tools.js +13 -1
- package/assets/js/highcharts/modules/stock-tools.src.js +37 -116
- package/assets/js/highcharts/modules/stock.js +29 -1
- package/assets/js/highcharts/modules/stock.src.js +35 -27
- package/assets/js/highcharts/modules/streamgraph.js +11 -1
- package/assets/js/highcharts/modules/streamgraph.src.js +1 -1
- package/assets/js/highcharts/modules/sunburst.js +10 -1
- package/assets/js/highcharts/modules/sunburst.src.js +1 -1
- package/assets/js/highcharts/modules/textpath.js +9 -1
- package/assets/js/highcharts/modules/textpath.src.js +1 -1
- package/assets/js/highcharts/modules/tiledwebmap.js +10 -2
- package/assets/js/highcharts/modules/tiledwebmap.src.js +1 -1
- package/assets/js/highcharts/modules/tilemap.js +12 -1
- package/assets/js/highcharts/modules/tilemap.src.js +1 -1
- package/assets/js/highcharts/modules/timeline.js +12 -1
- package/assets/js/highcharts/modules/timeline.src.js +1 -1
- package/assets/js/highcharts/modules/treegraph.js +11 -1
- package/assets/js/highcharts/modules/treegraph.src.js +4 -2
- package/assets/js/highcharts/modules/treegrid.js +11 -1
- package/assets/js/highcharts/modules/treegrid.src.js +1 -1
- package/assets/js/highcharts/modules/treemap.js +10 -1
- package/assets/js/highcharts/modules/treemap.src.js +1 -1
- package/assets/js/highcharts/modules/variable-pie.js +11 -1
- package/assets/js/highcharts/modules/variable-pie.src.js +1 -1
- package/assets/js/highcharts/modules/variwide.js +11 -1
- package/assets/js/highcharts/modules/variwide.src.js +9 -2
- package/assets/js/highcharts/modules/vector.js +11 -1
- package/assets/js/highcharts/modules/vector.src.js +1 -1
- package/assets/js/highcharts/modules/venn.js +10 -1
- package/assets/js/highcharts/modules/venn.src.js +1 -1
- package/assets/js/highcharts/modules/windbarb.js +11 -1
- package/assets/js/highcharts/modules/windbarb.src.js +1 -1
- package/assets/js/highcharts/modules/wordcloud.js +10 -1
- package/assets/js/highcharts/modules/wordcloud.src.js +88 -11
- package/assets/js/highcharts/modules/xrange.js +11 -1
- package/assets/js/highcharts/modules/xrange.src.js +1 -1
- package/assets/js/highcharts/standalone-navigator.js +9 -2
- package/assets/js/highcharts/standalone-navigator.src.js +146 -90
- package/assets/js/highcharts/themes/adaptive.js +130 -0
- package/assets/js/highcharts/themes/adaptive.src.js +1122 -0
- package/assets/js/highcharts/themes/avocado.js +9 -1
- package/assets/js/highcharts/themes/avocado.src.js +1 -1
- package/assets/js/highcharts/themes/brand-dark.js +9 -1
- package/assets/js/highcharts/themes/brand-dark.src.js +1 -1
- package/assets/js/highcharts/themes/brand-light.js +9 -1
- package/assets/js/highcharts/themes/brand-light.src.js +1 -1
- package/assets/js/highcharts/themes/dark-blue.js +9 -1
- package/assets/js/highcharts/themes/dark-blue.src.js +1 -1
- package/assets/js/highcharts/themes/dark-green.js +9 -1
- package/assets/js/highcharts/themes/dark-green.src.js +1 -1
- package/assets/js/highcharts/themes/dark-unica.js +9 -1
- package/assets/js/highcharts/themes/dark-unica.src.js +1 -1
- package/assets/js/highcharts/themes/gray.js +9 -1
- package/assets/js/highcharts/themes/gray.src.js +1 -1
- package/assets/js/highcharts/themes/grid-light.js +9 -1
- package/assets/js/highcharts/themes/grid-light.src.js +1 -1
- package/assets/js/highcharts/themes/grid.js +9 -1
- package/assets/js/highcharts/themes/grid.src.js +1 -1
- package/assets/js/highcharts/themes/high-contrast-dark.js +9 -1
- package/assets/js/highcharts/themes/high-contrast-dark.src.js +1 -1
- package/assets/js/highcharts/themes/high-contrast-light.js +9 -1
- package/assets/js/highcharts/themes/high-contrast-light.src.js +1 -1
- package/assets/js/highcharts/themes/sand-signika.js +9 -1
- package/assets/js/highcharts/themes/sand-signika.src.js +1 -1
- package/assets/js/highcharts/themes/skies.js +9 -1
- package/assets/js/highcharts/themes/skies.src.js +1 -1
- package/assets/js/highcharts/themes/sunset.js +9 -1
- package/assets/js/highcharts/themes/sunset.src.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Highcharts JS v12.
|
|
2
|
+
* @license Highcharts JS v12.3.0 (2025-06-21)
|
|
3
3
|
* @module highcharts/modules/offline-exporting
|
|
4
4
|
* @requires highcharts
|
|
5
5
|
* @requires highcharts/modules/exporting
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
* License: www.highcharts.com/license
|
|
12
12
|
*/
|
|
13
13
|
import * as __WEBPACK_EXTERNAL_MODULE__highcharts_src_js_8202131d__ from "../highcharts.src.js";
|
|
14
|
-
import * as __WEBPACK_EXTERNAL_MODULE__data_src_js_55fab5a0__ from "./data.src.js";
|
|
15
14
|
import * as __WEBPACK_EXTERNAL_MODULE__exporting_src_js_3afc400f__ from "./exporting.src.js";
|
|
16
15
|
/******/ // The require scope
|
|
17
16
|
/******/ var __webpack_require__ = {};
|
|
@@ -71,6 +70,8 @@ var external_highcharts_src_js_default_default = /*#__PURE__*/__webpack_require_
|
|
|
71
70
|
* */
|
|
72
71
|
|
|
73
72
|
const { isSafari, win, win: { document: doc } } = (external_highcharts_src_js_default_default());
|
|
73
|
+
|
|
74
|
+
const { error } = (external_highcharts_src_js_default_default());
|
|
74
75
|
/* *
|
|
75
76
|
*
|
|
76
77
|
* Constants
|
|
@@ -84,12 +85,15 @@ const domurl = win.URL || win.webkitURL || win;
|
|
|
84
85
|
* */
|
|
85
86
|
/**
|
|
86
87
|
* Convert base64 dataURL to Blob if supported, otherwise returns undefined.
|
|
88
|
+
*
|
|
87
89
|
* @private
|
|
88
90
|
* @function Highcharts.dataURLtoBlob
|
|
91
|
+
*
|
|
89
92
|
* @param {string} dataURL
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
+
* URL to convert.
|
|
94
|
+
*
|
|
95
|
+
* @return {string | undefined}
|
|
96
|
+
* Blob.
|
|
93
97
|
*/
|
|
94
98
|
function dataURLtoBlob(dataURL) {
|
|
95
99
|
const parts = dataURL
|
|
@@ -116,11 +120,11 @@ function dataURLtoBlob(dataURL) {
|
|
|
116
120
|
*
|
|
117
121
|
* @private
|
|
118
122
|
* @function Highcharts.downloadURL
|
|
119
|
-
*
|
|
120
|
-
*
|
|
123
|
+
*
|
|
124
|
+
* @param {string | global.URL} dataURL
|
|
125
|
+
* The dataURL/Blob to download.
|
|
121
126
|
* @param {string} filename
|
|
122
|
-
*
|
|
123
|
-
* @return {void}
|
|
127
|
+
* The name of the resulting file (w/extension).
|
|
124
128
|
*/
|
|
125
129
|
function downloadURL(dataURL, filename) {
|
|
126
130
|
const nav = win.navigator, a = doc.createElement('a');
|
|
@@ -146,2755 +150,75 @@ function downloadURL(dataURL, filename) {
|
|
|
146
150
|
if (safariBlob || isOldEdgeBrowser || dataURL.length > 2000000) {
|
|
147
151
|
dataURL = dataURLtoBlob(dataURL) || '';
|
|
148
152
|
if (!dataURL) {
|
|
149
|
-
throw new Error('Failed to convert to blob');
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
// Try HTML5 download attr if supported
|
|
153
|
-
if (typeof a.download !== 'undefined') {
|
|
154
|
-
a.href = dataURL;
|
|
155
|
-
a.download = filename; // HTML5 download attribute
|
|
156
|
-
doc.body.appendChild(a);
|
|
157
|
-
a.click();
|
|
158
|
-
doc.body.removeChild(a);
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
// No download attr, just opening data URI
|
|
162
|
-
try {
|
|
163
|
-
if (!win.open(dataURL, 'chart')) {
|
|
164
|
-
throw new Error('Failed to open window');
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
catch {
|
|
168
|
-
// If window.open failed, try location.href
|
|
169
|
-
win.location.href = dataURL;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
/* *
|
|
174
|
-
*
|
|
175
|
-
* Default Export
|
|
176
|
-
*
|
|
177
|
-
* */
|
|
178
|
-
const DownloadURL = {
|
|
179
|
-
dataURLtoBlob,
|
|
180
|
-
downloadURL
|
|
181
|
-
};
|
|
182
|
-
/* harmony default export */ const Extensions_DownloadURL = (DownloadURL);
|
|
183
|
-
|
|
184
|
-
;// external ["../highcharts.src.js","default","AST"]
|
|
185
|
-
const external_highcharts_src_js_default_AST_namespaceObject = __WEBPACK_EXTERNAL_MODULE__highcharts_src_js_8202131d__["default"].AST;
|
|
186
|
-
var external_highcharts_src_js_default_AST_default = /*#__PURE__*/__webpack_require__.n(external_highcharts_src_js_default_AST_namespaceObject);
|
|
187
|
-
;// external ["../highcharts.src.js","default","Chart"]
|
|
188
|
-
var x = (y) => {
|
|
189
|
-
var x = {}; __webpack_require__.d(x,
|
|
190
|
-
y); return x
|
|
191
|
-
}
|
|
192
|
-
var y = (x) => (() => (x))
|
|
193
|
-
const external_highcharts_src_js_default_Chart_namespaceObject = x({ });
|
|
194
|
-
;// ./code/es-modules/Core/Chart/ChartNavigationComposition.js
|
|
195
|
-
/**
|
|
196
|
-
*
|
|
197
|
-
* (c) 2010-2025 Paweł Fus
|
|
198
|
-
*
|
|
199
|
-
* License: www.highcharts.com/license
|
|
200
|
-
*
|
|
201
|
-
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
202
|
-
*
|
|
203
|
-
* */
|
|
204
|
-
|
|
205
|
-
/* *
|
|
206
|
-
*
|
|
207
|
-
* Composition
|
|
208
|
-
*
|
|
209
|
-
* */
|
|
210
|
-
var ChartNavigationComposition;
|
|
211
|
-
(function (ChartNavigationComposition) {
|
|
212
|
-
/* *
|
|
213
|
-
*
|
|
214
|
-
* Declarations
|
|
215
|
-
*
|
|
216
|
-
* */
|
|
217
|
-
/* *
|
|
218
|
-
*
|
|
219
|
-
* Functions
|
|
220
|
-
*
|
|
221
|
-
* */
|
|
222
|
-
/* eslint-disable valid-jsdoc */
|
|
223
|
-
/**
|
|
224
|
-
* @private
|
|
225
|
-
*/
|
|
226
|
-
function compose(chart) {
|
|
227
|
-
if (!chart.navigation) {
|
|
228
|
-
chart.navigation = new Additions(chart);
|
|
229
|
-
}
|
|
230
|
-
return chart;
|
|
231
|
-
}
|
|
232
|
-
ChartNavigationComposition.compose = compose;
|
|
233
|
-
/* *
|
|
234
|
-
*
|
|
235
|
-
* Class
|
|
236
|
-
*
|
|
237
|
-
* */
|
|
238
|
-
/**
|
|
239
|
-
* Initializes `chart.navigation` object which delegates `update()` methods
|
|
240
|
-
* to all other common classes (used in exporting and navigationBindings).
|
|
241
|
-
* @private
|
|
242
|
-
*/
|
|
243
|
-
class Additions {
|
|
244
|
-
/* *
|
|
245
|
-
*
|
|
246
|
-
* Constructor
|
|
247
|
-
*
|
|
248
|
-
* */
|
|
249
|
-
constructor(chart) {
|
|
250
|
-
this.updates = [];
|
|
251
|
-
this.chart = chart;
|
|
252
|
-
}
|
|
253
|
-
/* *
|
|
254
|
-
*
|
|
255
|
-
* Functions
|
|
256
|
-
*
|
|
257
|
-
* */
|
|
258
|
-
/**
|
|
259
|
-
* Registers an `update()` method in the `chart.navigation` object.
|
|
260
|
-
*
|
|
261
|
-
* @private
|
|
262
|
-
* @param {UpdateFunction} updateFn
|
|
263
|
-
* The `update()` method that will be called in `chart.update()`.
|
|
264
|
-
*/
|
|
265
|
-
addUpdate(updateFn) {
|
|
266
|
-
this.chart.navigation.updates.push(updateFn);
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
269
|
-
* @private
|
|
270
|
-
*/
|
|
271
|
-
update(options, redraw) {
|
|
272
|
-
this.updates.forEach((updateFn) => {
|
|
273
|
-
updateFn.call(this.chart, options, redraw);
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
ChartNavigationComposition.Additions = Additions;
|
|
278
|
-
})(ChartNavigationComposition || (ChartNavigationComposition = {}));
|
|
279
|
-
/* *
|
|
280
|
-
*
|
|
281
|
-
* Default Export
|
|
282
|
-
*
|
|
283
|
-
* */
|
|
284
|
-
/* harmony default export */ const Chart_ChartNavigationComposition = (ChartNavigationComposition);
|
|
285
|
-
|
|
286
|
-
;// ./code/es-modules/Extensions/Exporting/ExportingDefaults.js
|
|
287
|
-
/* *
|
|
288
|
-
*
|
|
289
|
-
* (c) 2010-2025 Torstein Honsi
|
|
290
|
-
*
|
|
291
|
-
* License: www.highcharts.com/license
|
|
292
|
-
*
|
|
293
|
-
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
294
|
-
*
|
|
295
|
-
* */
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
const { isTouchDevice } = (external_highcharts_src_js_default_default());
|
|
299
|
-
/* *
|
|
300
|
-
*
|
|
301
|
-
* API Options
|
|
302
|
-
*
|
|
303
|
-
* */
|
|
304
|
-
// Add the export related options
|
|
305
|
-
/**
|
|
306
|
-
* Options for the exporting module. For an overview on the matter, see
|
|
307
|
-
* [the docs](https://www.highcharts.com/docs/export-module/export-module-overview) and
|
|
308
|
-
* read our [Fair Usage Policy](https://www.highcharts.com/docs/export-module/privacy-disclaimer-export).
|
|
309
|
-
*
|
|
310
|
-
* @requires modules/exporting
|
|
311
|
-
* @optionparent exporting
|
|
312
|
-
*/
|
|
313
|
-
const exporting = {
|
|
314
|
-
/**
|
|
315
|
-
* Experimental setting to allow HTML inside the chart (added through
|
|
316
|
-
* the `useHTML` options), directly in the exported image. This allows
|
|
317
|
-
* you to preserve complicated HTML structures like tables or bi-directional
|
|
318
|
-
* text in exported charts.
|
|
319
|
-
*
|
|
320
|
-
* Disclaimer: The HTML is rendered in a `foreignObject` tag in the
|
|
321
|
-
* generated SVG. The official export server is based on PhantomJS,
|
|
322
|
-
* which supports this, but other SVG clients, like Batik, does not
|
|
323
|
-
* support it. This also applies to downloaded SVG that you want to
|
|
324
|
-
* open in a desktop client.
|
|
325
|
-
*
|
|
326
|
-
* @type {boolean}
|
|
327
|
-
* @default false
|
|
328
|
-
* @since 4.1.8
|
|
329
|
-
* @apioption exporting.allowHTML
|
|
330
|
-
*/
|
|
331
|
-
/**
|
|
332
|
-
* Allows the end user to sort the data table by clicking on column headers.
|
|
333
|
-
*
|
|
334
|
-
* @since 10.3.3
|
|
335
|
-
* @apioption exporting.allowTableSorting
|
|
336
|
-
*/
|
|
337
|
-
allowTableSorting: true,
|
|
338
|
-
/**
|
|
339
|
-
* Allow exporting a chart retaining any user-applied CSS.
|
|
340
|
-
*
|
|
341
|
-
* Note that this is is default behavior in [styledMode](#chart.styledMode).
|
|
342
|
-
*
|
|
343
|
-
* @see [styledMode](#chart.styledMode)
|
|
344
|
-
*
|
|
345
|
-
* @sample {highcharts} highcharts/exporting/apply-stylesheets/
|
|
346
|
-
*
|
|
347
|
-
* @type {boolean}
|
|
348
|
-
* @default false
|
|
349
|
-
* @since 12.0.0
|
|
350
|
-
* @apioption exporting.applyStyleSheets
|
|
351
|
-
*/
|
|
352
|
-
/**
|
|
353
|
-
* Additional chart options to be merged into the chart before exporting to
|
|
354
|
-
* an image format. This does not apply to printing the chart via the export
|
|
355
|
-
* menu.
|
|
356
|
-
*
|
|
357
|
-
* For example, a common use case is to add data labels to improve
|
|
358
|
-
* readability of the exported chart, or to add a printer-friendly color
|
|
359
|
-
* scheme to exported PDFs.
|
|
360
|
-
*
|
|
361
|
-
* @sample {highcharts} highcharts/exporting/chartoptions-data-labels/
|
|
362
|
-
* Added data labels
|
|
363
|
-
* @sample {highstock} highcharts/exporting/chartoptions-data-labels/
|
|
364
|
-
* Added data labels
|
|
365
|
-
*
|
|
366
|
-
* @type {Highcharts.Options}
|
|
367
|
-
* @apioption exporting.chartOptions
|
|
368
|
-
*/
|
|
369
|
-
/**
|
|
370
|
-
* Whether to enable the exporting module. Disabling the module will
|
|
371
|
-
* hide the context button, but API methods will still be available.
|
|
372
|
-
*
|
|
373
|
-
* @sample {highcharts} highcharts/exporting/enabled-false/
|
|
374
|
-
* Exporting module is loaded but disabled
|
|
375
|
-
* @sample {highstock} highcharts/exporting/enabled-false/
|
|
376
|
-
* Exporting module is loaded but disabled
|
|
377
|
-
*
|
|
378
|
-
* @type {boolean}
|
|
379
|
-
* @default true
|
|
380
|
-
* @since 2.0
|
|
381
|
-
* @apioption exporting.enabled
|
|
382
|
-
*/
|
|
383
|
-
/**
|
|
384
|
-
* Function to call if the offline-exporting module fails to export
|
|
385
|
-
* a chart on the client side, and [fallbackToExportServer](
|
|
386
|
-
* #exporting.fallbackToExportServer) is disabled. If left undefined, an
|
|
387
|
-
* exception is thrown instead. Receives two parameters, the exporting
|
|
388
|
-
* options, and the error from the module.
|
|
389
|
-
*
|
|
390
|
-
* @see [fallbackToExportServer](#exporting.fallbackToExportServer)
|
|
391
|
-
*
|
|
392
|
-
* @type {Highcharts.ExportingErrorCallbackFunction}
|
|
393
|
-
* @since 5.0.0
|
|
394
|
-
* @requires modules/exporting
|
|
395
|
-
* @requires modules/offline-exporting
|
|
396
|
-
* @apioption exporting.error
|
|
397
|
-
*/
|
|
398
|
-
/**
|
|
399
|
-
* Whether or not to fall back to the export server if the offline-exporting
|
|
400
|
-
* module is unable to export the chart on the client side. This happens for
|
|
401
|
-
* certain browsers, and certain features (e.g.
|
|
402
|
-
* [allowHTML](#exporting.allowHTML)), depending on the image type exporting
|
|
403
|
-
* to. For very complex charts, it is possible that export can fail in
|
|
404
|
-
* browsers that don't support Blob objects, due to data URL length limits.
|
|
405
|
-
* It is recommended to define the [exporting.error](#exporting.error)
|
|
406
|
-
* handler if disabling fallback, in order to notify users in case export
|
|
407
|
-
* fails.
|
|
408
|
-
*
|
|
409
|
-
* @type {boolean}
|
|
410
|
-
* @default true
|
|
411
|
-
* @since 4.1.8
|
|
412
|
-
* @requires modules/exporting
|
|
413
|
-
* @requires modules/offline-exporting
|
|
414
|
-
* @apioption exporting.fallbackToExportServer
|
|
415
|
-
*/
|
|
416
|
-
/**
|
|
417
|
-
* The filename, without extension, to use for the exported chart.
|
|
418
|
-
*
|
|
419
|
-
* @sample {highcharts} highcharts/exporting/filename/
|
|
420
|
-
* Custom file name
|
|
421
|
-
* @sample {highstock} highcharts/exporting/filename/
|
|
422
|
-
* Custom file name
|
|
423
|
-
*
|
|
424
|
-
* @type {string}
|
|
425
|
-
* @default chart
|
|
426
|
-
* @since 2.0
|
|
427
|
-
* @apioption exporting.filename
|
|
428
|
-
*/
|
|
429
|
-
/**
|
|
430
|
-
* Highcharts v11.2.0 and older. An object containing additional key value
|
|
431
|
-
* data for the POST form that sends the SVG to the export server. For
|
|
432
|
-
* example, a `target` can be set to make sure the generated image is
|
|
433
|
-
* received in another frame, or a custom `enctype` or `encoding` can be
|
|
434
|
-
* set.
|
|
435
|
-
*
|
|
436
|
-
* With Highcharts v11.3.0, the `fetch` API replaced the old HTML form. To
|
|
437
|
-
* modify the request, now use [fetchOptions](#exporting.fetchOptions)
|
|
438
|
-
* instead.
|
|
439
|
-
*
|
|
440
|
-
* @deprecated
|
|
441
|
-
* @type {Highcharts.HTMLAttributes}
|
|
442
|
-
* @since 3.0.8
|
|
443
|
-
* @apioption exporting.formAttributes
|
|
444
|
-
*/
|
|
445
|
-
/**
|
|
446
|
-
* Options for the fetch request used when sending the SVG to the export
|
|
447
|
-
* server.
|
|
448
|
-
*
|
|
449
|
-
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/fetch)
|
|
450
|
-
* for more information
|
|
451
|
-
*
|
|
452
|
-
* @type {Object}
|
|
453
|
-
* @since 11.3.0
|
|
454
|
-
* @apioption exporting.fetchOptions
|
|
455
|
-
*/
|
|
456
|
-
/**
|
|
457
|
-
* Path where Highcharts will look for export module dependencies to
|
|
458
|
-
* load on demand if they don't already exist on `window`. Should currently
|
|
459
|
-
* point to location of [CanVG](https://github.com/canvg/canvg) library,
|
|
460
|
-
* [jsPDF](https://github.com/parallax/jsPDF) and
|
|
461
|
-
* [svg2pdf.js](https://github.com/yWorks/svg2pdf.js), required for client
|
|
462
|
-
* side export in certain browsers.
|
|
463
|
-
*
|
|
464
|
-
* @type {string}
|
|
465
|
-
* @default https://code.highcharts.com/{version}/lib
|
|
466
|
-
* @since 5.0.0
|
|
467
|
-
* @apioption exporting.libURL
|
|
468
|
-
*/
|
|
469
|
-
/**
|
|
470
|
-
* Analogous to [sourceWidth](#exporting.sourceWidth).
|
|
471
|
-
*
|
|
472
|
-
* @type {number}
|
|
473
|
-
* @since 3.0
|
|
474
|
-
* @apioption exporting.sourceHeight
|
|
475
|
-
*/
|
|
476
|
-
/**
|
|
477
|
-
* The width of the original chart when exported, unless an explicit
|
|
478
|
-
* [chart.width](#chart.width) is set, or a pixel width is set on the
|
|
479
|
-
* container. The width exported raster image is then multiplied by
|
|
480
|
-
* [scale](#exporting.scale).
|
|
481
|
-
*
|
|
482
|
-
* @sample {highcharts} highcharts/exporting/sourcewidth/
|
|
483
|
-
* Source size demo
|
|
484
|
-
* @sample {highstock} highcharts/exporting/sourcewidth/
|
|
485
|
-
* Source size demo
|
|
486
|
-
* @sample {highmaps} maps/exporting/sourcewidth/
|
|
487
|
-
* Source size demo
|
|
488
|
-
*
|
|
489
|
-
* @type {number}
|
|
490
|
-
* @since 3.0
|
|
491
|
-
* @apioption exporting.sourceWidth
|
|
492
|
-
*/
|
|
493
|
-
/**
|
|
494
|
-
* The pixel width of charts exported to PNG or JPG. As of Highcharts
|
|
495
|
-
* 3.0, the default pixel width is a function of the [chart.width](
|
|
496
|
-
* #chart.width) or [exporting.sourceWidth](#exporting.sourceWidth) and the
|
|
497
|
-
* [exporting.scale](#exporting.scale).
|
|
498
|
-
*
|
|
499
|
-
* @sample {highcharts} highcharts/exporting/width/
|
|
500
|
-
* Export to 200px wide images
|
|
501
|
-
* @sample {highstock} highcharts/exporting/width/
|
|
502
|
-
* Export to 200px wide images
|
|
503
|
-
*
|
|
504
|
-
* @type {number}
|
|
505
|
-
* @since 2.0
|
|
506
|
-
* @apioption exporting.width
|
|
507
|
-
*/
|
|
508
|
-
/**
|
|
509
|
-
* Default MIME type for exporting if `chart.exportChart()` is called
|
|
510
|
-
* without specifying a `type` option. Possible values are `image/png`,
|
|
511
|
-
* `image/jpeg`, `application/pdf` and `image/svg+xml`.
|
|
512
|
-
*
|
|
513
|
-
* @type {Highcharts.ExportingMimeTypeValue}
|
|
514
|
-
* @since 2.0
|
|
515
|
-
*/
|
|
516
|
-
type: 'image/png',
|
|
517
|
-
/**
|
|
518
|
-
* The URL for the server module converting the SVG string to an image
|
|
519
|
-
* format. By default this points to Highchart's free web service.
|
|
520
|
-
*
|
|
521
|
-
* @since 2.0
|
|
522
|
-
*/
|
|
523
|
-
url: `https://export-svg.highcharts.com?v=${(external_highcharts_src_js_default_default()).version}`,
|
|
524
|
-
/**
|
|
525
|
-
* Settings for a custom font for the exported PDF, when using the
|
|
526
|
-
* `offline-exporting` module. This is used for languages containing
|
|
527
|
-
* non-ASCII characters, like Chinese, Russian, Japanese etc.
|
|
528
|
-
*
|
|
529
|
-
* As described in the [jsPDF
|
|
530
|
-
* docs](https://github.com/parallax/jsPDF#use-of-unicode-characters--utf-8),
|
|
531
|
-
* the 14 standard fonts in PDF are limited to the ASCII-codepage.
|
|
532
|
-
* Therefore, in order to support other text in the exported PDF, one or
|
|
533
|
-
* more TTF font files have to be passed on to the exporting module.
|
|
534
|
-
*
|
|
535
|
-
* See more in [the
|
|
536
|
-
* docs](https://www.highcharts.com/docs/export-module/client-side-export).
|
|
537
|
-
*
|
|
538
|
-
* @sample {highcharts} highcharts/exporting/offline-download-pdffont/
|
|
539
|
-
* Download PDF in a language containing non-Latin characters.
|
|
540
|
-
*
|
|
541
|
-
* @since 10.0.0
|
|
542
|
-
* @requires modules/offline-exporting
|
|
543
|
-
*/
|
|
544
|
-
pdfFont: {
|
|
545
|
-
/**
|
|
546
|
-
* The TTF font file for normal `font-style`. If font variations like
|
|
547
|
-
* `bold` or `italic` are not defined, the `normal` font will be used
|
|
548
|
-
* for those too.
|
|
549
|
-
*
|
|
550
|
-
* @type string|undefined
|
|
551
|
-
*/
|
|
552
|
-
normal: void 0,
|
|
553
|
-
/**
|
|
554
|
-
* The TTF font file for bold text.
|
|
555
|
-
*
|
|
556
|
-
* @type string|undefined
|
|
557
|
-
*/
|
|
558
|
-
bold: void 0,
|
|
559
|
-
/**
|
|
560
|
-
* The TTF font file for bold and italic text.
|
|
561
|
-
*
|
|
562
|
-
* @type string|undefined
|
|
563
|
-
*/
|
|
564
|
-
bolditalic: void 0,
|
|
565
|
-
/**
|
|
566
|
-
* The TTF font file for italic text.
|
|
567
|
-
*
|
|
568
|
-
* @type string|undefined
|
|
569
|
-
*/
|
|
570
|
-
italic: void 0
|
|
571
|
-
},
|
|
572
|
-
/**
|
|
573
|
-
* When printing the chart from the menu item in the burger menu, if
|
|
574
|
-
* the on-screen chart exceeds this width, it is resized. After printing
|
|
575
|
-
* or cancelled, it is restored. The default width makes the chart
|
|
576
|
-
* fit into typical paper format. Note that this does not affect the
|
|
577
|
-
* chart when printing the web page as a whole.
|
|
578
|
-
*
|
|
579
|
-
* @since 4.2.5
|
|
580
|
-
*/
|
|
581
|
-
printMaxWidth: 780,
|
|
582
|
-
/**
|
|
583
|
-
* Defines the scale or zoom factor for the exported image compared
|
|
584
|
-
* to the on-screen display. While for instance a 600px wide chart
|
|
585
|
-
* may look good on a website, it will look bad in print. The default
|
|
586
|
-
* scale of 2 makes this chart export to a 1200px PNG or JPG.
|
|
587
|
-
*
|
|
588
|
-
* @see [chart.width](#chart.width)
|
|
589
|
-
* @see [exporting.sourceWidth](#exporting.sourceWidth)
|
|
590
|
-
*
|
|
591
|
-
* @sample {highcharts} highcharts/exporting/scale/
|
|
592
|
-
* Scale demonstrated
|
|
593
|
-
* @sample {highstock} highcharts/exporting/scale/
|
|
594
|
-
* Scale demonstrated
|
|
595
|
-
* @sample {highmaps} maps/exporting/scale/
|
|
596
|
-
* Scale demonstrated
|
|
597
|
-
*
|
|
598
|
-
* @since 3.0
|
|
599
|
-
*/
|
|
600
|
-
scale: 2,
|
|
601
|
-
/**
|
|
602
|
-
* Options for the export related buttons, print and export. In addition
|
|
603
|
-
* to the default buttons listed here, custom buttons can be added.
|
|
604
|
-
* See [navigation.buttonOptions](#navigation.buttonOptions) for general
|
|
605
|
-
* options.
|
|
606
|
-
*
|
|
607
|
-
* @type {Highcharts.Dictionary<*>}
|
|
608
|
-
* @requires modules/exporting
|
|
609
|
-
*/
|
|
610
|
-
buttons: {
|
|
611
|
-
/**
|
|
612
|
-
* Options for the export button.
|
|
613
|
-
*
|
|
614
|
-
* In styled mode, export button styles can be applied with the
|
|
615
|
-
* `.highcharts-contextbutton` class.
|
|
616
|
-
*
|
|
617
|
-
* @declare Highcharts.ExportingButtonsOptionsObject
|
|
618
|
-
* @extends navigation.buttonOptions
|
|
619
|
-
* @requires modules/exporting
|
|
620
|
-
*/
|
|
621
|
-
contextButton: {
|
|
622
|
-
/**
|
|
623
|
-
* A click handler callback to use on the button directly instead of
|
|
624
|
-
* the popup menu.
|
|
625
|
-
*
|
|
626
|
-
* @sample highcharts/exporting/buttons-contextbutton-onclick/
|
|
627
|
-
* Skip the menu and export the chart directly
|
|
628
|
-
*
|
|
629
|
-
* @type {Function}
|
|
630
|
-
* @since 2.0
|
|
631
|
-
* @apioption exporting.buttons.contextButton.onclick
|
|
632
|
-
*/
|
|
633
|
-
/**
|
|
634
|
-
* See [navigation.buttonOptions.symbolFill](
|
|
635
|
-
* #navigation.buttonOptions.symbolFill).
|
|
636
|
-
*
|
|
637
|
-
* @type {Highcharts.ColorString}
|
|
638
|
-
* @default #666666
|
|
639
|
-
* @since 2.0
|
|
640
|
-
* @apioption exporting.buttons.contextButton.symbolFill
|
|
641
|
-
*/
|
|
642
|
-
/**
|
|
643
|
-
* The horizontal position of the button relative to the `align`
|
|
644
|
-
* option.
|
|
645
|
-
*
|
|
646
|
-
* @type {number}
|
|
647
|
-
* @default -10
|
|
648
|
-
* @since 2.0
|
|
649
|
-
* @apioption exporting.buttons.contextButton.x
|
|
650
|
-
*/
|
|
651
|
-
/**
|
|
652
|
-
* The class name of the context button.
|
|
653
|
-
*/
|
|
654
|
-
className: 'highcharts-contextbutton',
|
|
655
|
-
/**
|
|
656
|
-
* The class name of the menu appearing from the button.
|
|
657
|
-
*/
|
|
658
|
-
menuClassName: 'highcharts-contextmenu',
|
|
659
|
-
/**
|
|
660
|
-
* The symbol for the button. Points to a definition function in
|
|
661
|
-
* the `Highcharts.Renderer.symbols` collection. The default
|
|
662
|
-
* `menu` function is part of the exporting module. Possible
|
|
663
|
-
* values are "circle", "square", "diamond", "triangle",
|
|
664
|
-
* "triangle-down", "menu", "menuball" or custom shape.
|
|
665
|
-
*
|
|
666
|
-
* @sample highcharts/exporting/buttons-contextbutton-symbol/
|
|
667
|
-
* Use a circle for symbol
|
|
668
|
-
* @sample highcharts/exporting/buttons-contextbutton-symbol-custom/
|
|
669
|
-
* Custom shape as symbol
|
|
670
|
-
*
|
|
671
|
-
* @type {Highcharts.SymbolKeyValue|"menu"|"menuball"|string}
|
|
672
|
-
* @since 2.0
|
|
673
|
-
*/
|
|
674
|
-
symbol: 'menu',
|
|
675
|
-
/**
|
|
676
|
-
* The key to a [lang](#lang) option setting that is used for the
|
|
677
|
-
* button's title tooltip. When the key is `contextButtonTitle`, it
|
|
678
|
-
* refers to [lang.contextButtonTitle](#lang.contextButtonTitle)
|
|
679
|
-
* that defaults to "Chart context menu".
|
|
680
|
-
*
|
|
681
|
-
* @since 6.1.4
|
|
682
|
-
*/
|
|
683
|
-
titleKey: 'contextButtonTitle',
|
|
684
|
-
/**
|
|
685
|
-
* A collection of strings pointing to config options for the menu
|
|
686
|
-
* items. The config options are defined in the
|
|
687
|
-
* `menuItemDefinitions` option.
|
|
688
|
-
*
|
|
689
|
-
* By default, there is the "View in full screen" and "Print" menu
|
|
690
|
-
* items, plus one menu item for each of the available export types.
|
|
691
|
-
*
|
|
692
|
-
* @sample {highcharts} highcharts/exporting/menuitemdefinitions/
|
|
693
|
-
* Menu item definitions
|
|
694
|
-
* @sample {highstock} highcharts/exporting/menuitemdefinitions/
|
|
695
|
-
* Menu item definitions
|
|
696
|
-
* @sample {highmaps} highcharts/exporting/menuitemdefinitions/
|
|
697
|
-
* Menu item definitions
|
|
698
|
-
*
|
|
699
|
-
* @type {Array<string>}
|
|
700
|
-
* @default ["viewFullscreen", "printChart", "separator", "downloadPNG", "downloadJPEG", "downloadSVG"]
|
|
701
|
-
* @since 2.0
|
|
702
|
-
*/
|
|
703
|
-
menuItems: [
|
|
704
|
-
'viewFullscreen',
|
|
705
|
-
'printChart',
|
|
706
|
-
'separator',
|
|
707
|
-
'downloadPNG',
|
|
708
|
-
'downloadJPEG',
|
|
709
|
-
'downloadSVG'
|
|
710
|
-
]
|
|
711
|
-
}
|
|
712
|
-
},
|
|
713
|
-
/**
|
|
714
|
-
* An object consisting of definitions for the menu items in the context
|
|
715
|
-
* menu. Each key value pair has a `key` that is referenced in the
|
|
716
|
-
* [menuItems](#exporting.buttons.contextButton.menuItems) setting,
|
|
717
|
-
* and a `value`, which is an object with the following properties:
|
|
718
|
-
*
|
|
719
|
-
* - **onclick:** The click handler for the menu item
|
|
720
|
-
*
|
|
721
|
-
* - **text:** The text for the menu item
|
|
722
|
-
*
|
|
723
|
-
* - **textKey:** If internationalization is required, the key to a language
|
|
724
|
-
* string
|
|
725
|
-
*
|
|
726
|
-
* Custom text for the "exitFullScreen" can be set only in lang options
|
|
727
|
-
* (it is not a separate button).
|
|
728
|
-
*
|
|
729
|
-
* @sample {highcharts} highcharts/exporting/menuitemdefinitions/
|
|
730
|
-
* Menu item definitions
|
|
731
|
-
* @sample {highstock} highcharts/exporting/menuitemdefinitions/
|
|
732
|
-
* Menu item definitions
|
|
733
|
-
* @sample {highmaps} highcharts/exporting/menuitemdefinitions/
|
|
734
|
-
* Menu item definitions
|
|
735
|
-
*
|
|
736
|
-
*
|
|
737
|
-
* @type {Highcharts.Dictionary<Highcharts.ExportingMenuObject>}
|
|
738
|
-
* @default {"viewFullscreen": {}, "printChart": {}, "separator": {}, "downloadPNG": {}, "downloadJPEG": {}, "downloadPDF": {}, "downloadSVG": {}}
|
|
739
|
-
* @since 5.0.13
|
|
740
|
-
*/
|
|
741
|
-
menuItemDefinitions: {
|
|
742
|
-
/**
|
|
743
|
-
* @ignore
|
|
744
|
-
*/
|
|
745
|
-
viewFullscreen: {
|
|
746
|
-
textKey: 'viewFullscreen',
|
|
747
|
-
onclick: function () {
|
|
748
|
-
if (this.fullscreen) {
|
|
749
|
-
this.fullscreen.toggle();
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
},
|
|
753
|
-
/**
|
|
754
|
-
* @ignore
|
|
755
|
-
*/
|
|
756
|
-
printChart: {
|
|
757
|
-
textKey: 'printChart',
|
|
758
|
-
onclick: function () {
|
|
759
|
-
this.print();
|
|
760
|
-
}
|
|
761
|
-
},
|
|
762
|
-
/**
|
|
763
|
-
* @ignore
|
|
764
|
-
*/
|
|
765
|
-
separator: {
|
|
766
|
-
separator: true
|
|
767
|
-
},
|
|
768
|
-
/**
|
|
769
|
-
* @ignore
|
|
770
|
-
*/
|
|
771
|
-
downloadPNG: {
|
|
772
|
-
textKey: 'downloadPNG',
|
|
773
|
-
onclick: function () {
|
|
774
|
-
this.exportChart();
|
|
775
|
-
}
|
|
776
|
-
},
|
|
777
|
-
/**
|
|
778
|
-
* @ignore
|
|
779
|
-
*/
|
|
780
|
-
downloadJPEG: {
|
|
781
|
-
textKey: 'downloadJPEG',
|
|
782
|
-
onclick: function () {
|
|
783
|
-
this.exportChart({
|
|
784
|
-
type: 'image/jpeg'
|
|
785
|
-
});
|
|
786
|
-
}
|
|
787
|
-
},
|
|
788
|
-
/**
|
|
789
|
-
* @ignore
|
|
790
|
-
*/
|
|
791
|
-
downloadPDF: {
|
|
792
|
-
textKey: 'downloadPDF',
|
|
793
|
-
onclick: function () {
|
|
794
|
-
this.exportChart({
|
|
795
|
-
type: 'application/pdf'
|
|
796
|
-
});
|
|
797
|
-
}
|
|
798
|
-
},
|
|
799
|
-
/**
|
|
800
|
-
* @ignore
|
|
801
|
-
*/
|
|
802
|
-
downloadSVG: {
|
|
803
|
-
textKey: 'downloadSVG',
|
|
804
|
-
onclick: function () {
|
|
805
|
-
this.exportChart({
|
|
806
|
-
type: 'image/svg+xml'
|
|
807
|
-
});
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
};
|
|
812
|
-
// Add language
|
|
813
|
-
/**
|
|
814
|
-
* @optionparent lang
|
|
815
|
-
*/
|
|
816
|
-
const lang = {
|
|
817
|
-
/**
|
|
818
|
-
* Exporting module only. The text for the menu item to view the chart
|
|
819
|
-
* in full screen.
|
|
820
|
-
*
|
|
821
|
-
* @since 8.0.1
|
|
822
|
-
*/
|
|
823
|
-
viewFullscreen: 'View in full screen',
|
|
824
|
-
/**
|
|
825
|
-
* Exporting module only. The text for the menu item to exit the chart
|
|
826
|
-
* from full screen.
|
|
827
|
-
*
|
|
828
|
-
* @since 8.0.1
|
|
829
|
-
*/
|
|
830
|
-
exitFullscreen: 'Exit from full screen',
|
|
831
|
-
/**
|
|
832
|
-
* Exporting module only. The text for the menu item to print the chart.
|
|
833
|
-
*
|
|
834
|
-
* @since 3.0.1
|
|
835
|
-
* @requires modules/exporting
|
|
836
|
-
*/
|
|
837
|
-
printChart: 'Print chart',
|
|
838
|
-
/**
|
|
839
|
-
* Exporting module only. The text for the PNG download menu item.
|
|
840
|
-
*
|
|
841
|
-
* @since 2.0
|
|
842
|
-
* @requires modules/exporting
|
|
843
|
-
*/
|
|
844
|
-
downloadPNG: 'Download PNG image',
|
|
845
|
-
/**
|
|
846
|
-
* Exporting module only. The text for the JPEG download menu item.
|
|
847
|
-
*
|
|
848
|
-
* @since 2.0
|
|
849
|
-
* @requires modules/exporting
|
|
850
|
-
*/
|
|
851
|
-
downloadJPEG: 'Download JPEG image',
|
|
852
|
-
/**
|
|
853
|
-
* Exporting module only. The text for the PDF download menu item.
|
|
854
|
-
*
|
|
855
|
-
* @since 2.0
|
|
856
|
-
* @requires modules/exporting
|
|
857
|
-
*/
|
|
858
|
-
downloadPDF: 'Download PDF document',
|
|
859
|
-
/**
|
|
860
|
-
* Exporting module only. The text for the SVG download menu item.
|
|
861
|
-
*
|
|
862
|
-
* @since 2.0
|
|
863
|
-
* @requires modules/exporting
|
|
864
|
-
*/
|
|
865
|
-
downloadSVG: 'Download SVG vector image',
|
|
866
|
-
/**
|
|
867
|
-
* Exporting module menu. The tooltip title for the context menu holding
|
|
868
|
-
* print and export menu items.
|
|
869
|
-
*
|
|
870
|
-
* @since 3.0
|
|
871
|
-
* @requires modules/exporting
|
|
872
|
-
*/
|
|
873
|
-
contextButtonTitle: 'Chart context menu'
|
|
874
|
-
};
|
|
875
|
-
/**
|
|
876
|
-
* A collection of options for buttons and menus appearing in the exporting
|
|
877
|
-
* module or in Stock Tools.
|
|
878
|
-
*
|
|
879
|
-
* @requires modules/exporting
|
|
880
|
-
* @optionparent navigation
|
|
881
|
-
*/
|
|
882
|
-
const navigation = {
|
|
883
|
-
/**
|
|
884
|
-
* A collection of options for buttons appearing in the exporting
|
|
885
|
-
* module.
|
|
886
|
-
*
|
|
887
|
-
* In styled mode, the buttons are styled with the
|
|
888
|
-
* `.highcharts-contextbutton` and `.highcharts-button-symbol` classes.
|
|
889
|
-
*
|
|
890
|
-
* @requires modules/exporting
|
|
891
|
-
*/
|
|
892
|
-
buttonOptions: {
|
|
893
|
-
/**
|
|
894
|
-
* Whether to enable buttons.
|
|
895
|
-
*
|
|
896
|
-
* @sample highcharts/navigation/buttonoptions-enabled/
|
|
897
|
-
* Exporting module loaded but buttons disabled
|
|
898
|
-
*
|
|
899
|
-
* @type {boolean}
|
|
900
|
-
* @default true
|
|
901
|
-
* @since 2.0
|
|
902
|
-
* @apioption navigation.buttonOptions.enabled
|
|
903
|
-
*/
|
|
904
|
-
/**
|
|
905
|
-
* The pixel size of the symbol on the button.
|
|
906
|
-
*
|
|
907
|
-
* @sample highcharts/navigation/buttonoptions-height/
|
|
908
|
-
* Bigger buttons
|
|
909
|
-
*
|
|
910
|
-
* @since 2.0
|
|
911
|
-
*/
|
|
912
|
-
symbolSize: 14,
|
|
913
|
-
/**
|
|
914
|
-
* The x position of the center of the symbol inside the button.
|
|
915
|
-
*
|
|
916
|
-
* @sample highcharts/navigation/buttonoptions-height/
|
|
917
|
-
* Bigger buttons
|
|
918
|
-
*
|
|
919
|
-
* @since 2.0
|
|
920
|
-
*/
|
|
921
|
-
symbolX: 14.5,
|
|
922
|
-
/**
|
|
923
|
-
* The y position of the center of the symbol inside the button.
|
|
924
|
-
*
|
|
925
|
-
* @sample highcharts/navigation/buttonoptions-height/
|
|
926
|
-
* Bigger buttons
|
|
927
|
-
*
|
|
928
|
-
* @since 2.0
|
|
929
|
-
*/
|
|
930
|
-
symbolY: 13.5,
|
|
931
|
-
/**
|
|
932
|
-
* Alignment for the buttons.
|
|
933
|
-
*
|
|
934
|
-
* @sample highcharts/navigation/buttonoptions-align/
|
|
935
|
-
* Center aligned
|
|
936
|
-
*
|
|
937
|
-
* @type {Highcharts.AlignValue}
|
|
938
|
-
* @since 2.0
|
|
939
|
-
*/
|
|
940
|
-
align: 'right',
|
|
941
|
-
/**
|
|
942
|
-
* The pixel spacing between buttons, and between the context button and
|
|
943
|
-
* the title.
|
|
944
|
-
*
|
|
945
|
-
* @sample highcharts/title/widthadjust
|
|
946
|
-
* Adjust the spacing when using text button
|
|
947
|
-
* @since 2.0
|
|
948
|
-
*/
|
|
949
|
-
buttonSpacing: 5,
|
|
950
|
-
/**
|
|
951
|
-
* Pixel height of the buttons.
|
|
952
|
-
*
|
|
953
|
-
* @sample highcharts/navigation/buttonoptions-height/
|
|
954
|
-
* Bigger buttons
|
|
955
|
-
*
|
|
956
|
-
* @since 2.0
|
|
957
|
-
*/
|
|
958
|
-
height: 28,
|
|
959
|
-
/**
|
|
960
|
-
* A text string to add to the individual button.
|
|
961
|
-
*
|
|
962
|
-
* @sample highcharts/exporting/buttons-text/
|
|
963
|
-
* Full text button
|
|
964
|
-
* @sample highcharts/exporting/buttons-text-usehtml/
|
|
965
|
-
* Icon using CSS font in text
|
|
966
|
-
* @sample highcharts/exporting/buttons-text-symbol/
|
|
967
|
-
* Combined symbol and text
|
|
968
|
-
*
|
|
969
|
-
* @type {string}
|
|
970
|
-
* @default null
|
|
971
|
-
* @since 3.0
|
|
972
|
-
* @apioption navigation.buttonOptions.text
|
|
973
|
-
*/
|
|
974
|
-
/**
|
|
975
|
-
* Whether to use HTML for rendering the button. HTML allows for things
|
|
976
|
-
* like inline CSS or image-based icons.
|
|
977
|
-
*
|
|
978
|
-
* @sample highcharts/exporting/buttons-text-usehtml/
|
|
979
|
-
* Icon using CSS font in text
|
|
980
|
-
*
|
|
981
|
-
* @type boolean
|
|
982
|
-
* @default false
|
|
983
|
-
* @since 10.3.0
|
|
984
|
-
* @apioption navigation.buttonOptions.useHTML
|
|
985
|
-
*/
|
|
986
|
-
/**
|
|
987
|
-
* The vertical offset of the button's position relative to its
|
|
988
|
-
* `verticalAlign`. By default adjusted for the chart title alignment.
|
|
989
|
-
*
|
|
990
|
-
* @sample highcharts/navigation/buttonoptions-verticalalign/
|
|
991
|
-
* Buttons at lower right
|
|
992
|
-
*
|
|
993
|
-
* @since 2.0
|
|
994
|
-
* @apioption navigation.buttonOptions.y
|
|
995
|
-
*/
|
|
996
|
-
y: -5,
|
|
997
|
-
/**
|
|
998
|
-
* The vertical alignment of the buttons. Can be one of `"top"`,
|
|
999
|
-
* `"middle"` or `"bottom"`.
|
|
1000
|
-
*
|
|
1001
|
-
* @sample highcharts/navigation/buttonoptions-verticalalign/
|
|
1002
|
-
* Buttons at lower right
|
|
1003
|
-
*
|
|
1004
|
-
* @type {Highcharts.VerticalAlignValue}
|
|
1005
|
-
* @since 2.0
|
|
1006
|
-
*/
|
|
1007
|
-
verticalAlign: 'top',
|
|
1008
|
-
/**
|
|
1009
|
-
* The pixel width of the button.
|
|
1010
|
-
*
|
|
1011
|
-
* @sample highcharts/navigation/buttonoptions-height/
|
|
1012
|
-
* Bigger buttons
|
|
1013
|
-
*
|
|
1014
|
-
* @since 2.0
|
|
1015
|
-
*/
|
|
1016
|
-
width: 28,
|
|
1017
|
-
/**
|
|
1018
|
-
* Fill color for the symbol within the button.
|
|
1019
|
-
*
|
|
1020
|
-
* @sample highcharts/navigation/buttonoptions-symbolfill/
|
|
1021
|
-
* Blue symbol stroke for one of the buttons
|
|
1022
|
-
*
|
|
1023
|
-
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
1024
|
-
* @since 2.0
|
|
1025
|
-
*/
|
|
1026
|
-
symbolFill: "#666666" /* Palette.neutralColor60 */,
|
|
1027
|
-
/**
|
|
1028
|
-
* The color of the symbol's stroke or line.
|
|
1029
|
-
*
|
|
1030
|
-
* @sample highcharts/navigation/buttonoptions-symbolstroke/
|
|
1031
|
-
* Blue symbol stroke
|
|
1032
|
-
*
|
|
1033
|
-
* @type {Highcharts.ColorString}
|
|
1034
|
-
* @since 2.0
|
|
1035
|
-
*/
|
|
1036
|
-
symbolStroke: "#666666" /* Palette.neutralColor60 */,
|
|
1037
|
-
/**
|
|
1038
|
-
* The pixel stroke width of the symbol on the button.
|
|
1039
|
-
*
|
|
1040
|
-
* @sample highcharts/navigation/buttonoptions-height/
|
|
1041
|
-
* Bigger buttons
|
|
1042
|
-
*
|
|
1043
|
-
* @since 2.0
|
|
1044
|
-
*/
|
|
1045
|
-
symbolStrokeWidth: 3,
|
|
1046
|
-
/**
|
|
1047
|
-
* A configuration object for the button theme. The object accepts
|
|
1048
|
-
* SVG properties like `stroke-width`, `stroke` and `fill`.
|
|
1049
|
-
* Tri-state button styles are supported by the `states.hover` and
|
|
1050
|
-
* `states.select` objects.
|
|
1051
|
-
*
|
|
1052
|
-
* @sample highcharts/navigation/buttonoptions-theme/
|
|
1053
|
-
* Theming the buttons
|
|
1054
|
-
*
|
|
1055
|
-
* @requires modules/exporting
|
|
1056
|
-
*
|
|
1057
|
-
* @since 3.0
|
|
1058
|
-
*/
|
|
1059
|
-
theme: {
|
|
1060
|
-
/**
|
|
1061
|
-
* The default fill exists only to capture hover events.
|
|
1062
|
-
*
|
|
1063
|
-
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
1064
|
-
*/
|
|
1065
|
-
fill: "#ffffff" /* Palette.backgroundColor */,
|
|
1066
|
-
/**
|
|
1067
|
-
* Padding for the button.
|
|
1068
|
-
*/
|
|
1069
|
-
padding: 5,
|
|
1070
|
-
/**
|
|
1071
|
-
* Default stroke for the buttons.
|
|
1072
|
-
*
|
|
1073
|
-
* @type {Highcharts.ColorString}
|
|
1074
|
-
*/
|
|
1075
|
-
stroke: 'none',
|
|
1076
|
-
/**
|
|
1077
|
-
* Default stroke linecap for the buttons.
|
|
1078
|
-
*/
|
|
1079
|
-
'stroke-linecap': 'round'
|
|
1080
|
-
}
|
|
1081
|
-
},
|
|
1082
|
-
/**
|
|
1083
|
-
* CSS styles for the popup menu appearing by default when the export
|
|
1084
|
-
* icon is clicked. This menu is rendered in HTML.
|
|
1085
|
-
*
|
|
1086
|
-
* @see In styled mode, the menu is styled with the `.highcharts-menu`
|
|
1087
|
-
* class.
|
|
1088
|
-
*
|
|
1089
|
-
* @sample highcharts/navigation/menustyle/
|
|
1090
|
-
* Light gray menu background
|
|
1091
|
-
*
|
|
1092
|
-
* @type {Highcharts.CSSObject}
|
|
1093
|
-
* @default {"background": "#ffffff", "borderRadius": "3px", "padding": "0.5em"}
|
|
1094
|
-
* @since 2.0
|
|
1095
|
-
*/
|
|
1096
|
-
menuStyle: {
|
|
1097
|
-
/** @ignore-option */
|
|
1098
|
-
border: 'none',
|
|
1099
|
-
/** @ignore-option */
|
|
1100
|
-
borderRadius: '3px',
|
|
1101
|
-
/** @ignore-option */
|
|
1102
|
-
background: "#ffffff" /* Palette.backgroundColor */,
|
|
1103
|
-
/** @ignore-option */
|
|
1104
|
-
padding: '0.5em'
|
|
1105
|
-
},
|
|
1106
|
-
/**
|
|
1107
|
-
* CSS styles for the individual items within the popup menu appearing
|
|
1108
|
-
* by default when the export icon is clicked. The menu items are
|
|
1109
|
-
* rendered in HTML. Font size defaults to `11px` on desktop and `14px`
|
|
1110
|
-
* on touch devices.
|
|
1111
|
-
*
|
|
1112
|
-
* @see In styled mode, the menu items are styled with the
|
|
1113
|
-
* `.highcharts-menu-item` class.
|
|
1114
|
-
*
|
|
1115
|
-
* @sample {highcharts} highcharts/navigation/menuitemstyle/
|
|
1116
|
-
* Add a grey stripe to the left
|
|
1117
|
-
*
|
|
1118
|
-
* @type {Highcharts.CSSObject}
|
|
1119
|
-
* @default {"padding": "0.5em", "color": "#333333", "background": "none", "borderRadius": "3px", "fontSize": "0.8em", "transition": "background 250ms, color 250ms"}
|
|
1120
|
-
* @since 2.0
|
|
1121
|
-
*/
|
|
1122
|
-
menuItemStyle: {
|
|
1123
|
-
/** @ignore-option */
|
|
1124
|
-
background: 'none',
|
|
1125
|
-
/** @ignore-option */
|
|
1126
|
-
borderRadius: '3px',
|
|
1127
|
-
/** @ignore-option */
|
|
1128
|
-
color: "#333333" /* Palette.neutralColor80 */,
|
|
1129
|
-
/** @ignore-option */
|
|
1130
|
-
padding: '0.5em',
|
|
1131
|
-
/** @ignore-option */
|
|
1132
|
-
fontSize: isTouchDevice ? '0.9em' : '0.8em',
|
|
1133
|
-
/** @ignore-option */
|
|
1134
|
-
transition: 'background 250ms, color 250ms'
|
|
1135
|
-
},
|
|
1136
|
-
/**
|
|
1137
|
-
* CSS styles for the hover state of the individual items within the
|
|
1138
|
-
* popup menu appearing by default when the export icon is clicked. The
|
|
1139
|
-
* menu items are rendered in HTML.
|
|
1140
|
-
*
|
|
1141
|
-
* @see In styled mode, the menu items are styled with the
|
|
1142
|
-
* `.highcharts-menu-item` class.
|
|
1143
|
-
*
|
|
1144
|
-
* @sample highcharts/navigation/menuitemhoverstyle/
|
|
1145
|
-
* Bold text on hover
|
|
1146
|
-
*
|
|
1147
|
-
* @type {Highcharts.CSSObject}
|
|
1148
|
-
* @default {"background": "#f2f2f2" }
|
|
1149
|
-
* @since 2.0
|
|
1150
|
-
*/
|
|
1151
|
-
menuItemHoverStyle: {
|
|
1152
|
-
/** @ignore-option */
|
|
1153
|
-
background: "#f2f2f2" /* Palette.neutralColor5 */
|
|
1154
|
-
}
|
|
1155
|
-
};
|
|
1156
|
-
/* *
|
|
1157
|
-
*
|
|
1158
|
-
* Default Export
|
|
1159
|
-
*
|
|
1160
|
-
* */
|
|
1161
|
-
const ExportingDefaults = {
|
|
1162
|
-
exporting,
|
|
1163
|
-
lang,
|
|
1164
|
-
navigation
|
|
1165
|
-
};
|
|
1166
|
-
/* harmony default export */ const Exporting_ExportingDefaults = (ExportingDefaults);
|
|
1167
|
-
|
|
1168
|
-
;// ./code/es-modules/Extensions/Exporting/ExportingSymbols.js
|
|
1169
|
-
/* *
|
|
1170
|
-
*
|
|
1171
|
-
* Exporting module
|
|
1172
|
-
*
|
|
1173
|
-
* (c) 2010-2025 Torstein Honsi
|
|
1174
|
-
*
|
|
1175
|
-
* License: www.highcharts.com/license
|
|
1176
|
-
*
|
|
1177
|
-
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
1178
|
-
*
|
|
1179
|
-
* */
|
|
1180
|
-
|
|
1181
|
-
/* *
|
|
1182
|
-
*
|
|
1183
|
-
* Composition
|
|
1184
|
-
*
|
|
1185
|
-
* */
|
|
1186
|
-
var ExportingSymbols;
|
|
1187
|
-
(function (ExportingSymbols) {
|
|
1188
|
-
/* *
|
|
1189
|
-
*
|
|
1190
|
-
* Constants
|
|
1191
|
-
*
|
|
1192
|
-
* */
|
|
1193
|
-
const modifiedClasses = [];
|
|
1194
|
-
/* *
|
|
1195
|
-
*
|
|
1196
|
-
* Functions
|
|
1197
|
-
*
|
|
1198
|
-
* */
|
|
1199
|
-
/* eslint-disable valid-jsdoc */
|
|
1200
|
-
/**
|
|
1201
|
-
* @private
|
|
1202
|
-
*/
|
|
1203
|
-
function compose(SVGRendererClass) {
|
|
1204
|
-
if (modifiedClasses.indexOf(SVGRendererClass) === -1) {
|
|
1205
|
-
modifiedClasses.push(SVGRendererClass);
|
|
1206
|
-
const symbols = SVGRendererClass.prototype.symbols;
|
|
1207
|
-
symbols.menu = menu;
|
|
1208
|
-
symbols.menuball = menuball.bind(symbols);
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
ExportingSymbols.compose = compose;
|
|
1212
|
-
/**
|
|
1213
|
-
* @private
|
|
1214
|
-
*/
|
|
1215
|
-
function menu(x, y, width, height) {
|
|
1216
|
-
const arr = [
|
|
1217
|
-
['M', x, y + 2.5],
|
|
1218
|
-
['L', x + width, y + 2.5],
|
|
1219
|
-
['M', x, y + height / 2 + 0.5],
|
|
1220
|
-
['L', x + width, y + height / 2 + 0.5],
|
|
1221
|
-
['M', x, y + height - 1.5],
|
|
1222
|
-
['L', x + width, y + height - 1.5]
|
|
1223
|
-
];
|
|
1224
|
-
return arr;
|
|
1225
|
-
}
|
|
1226
|
-
/**
|
|
1227
|
-
* @private
|
|
1228
|
-
*/
|
|
1229
|
-
function menuball(x, y, width, height) {
|
|
1230
|
-
const h = (height / 3) - 2;
|
|
1231
|
-
let path = [];
|
|
1232
|
-
path = path.concat(this.circle(width - h, y, h, h), this.circle(width - h, y + h + 4, h, h), this.circle(width - h, y + 2 * (h + 4), h, h));
|
|
1233
|
-
return path;
|
|
1234
|
-
}
|
|
1235
|
-
})(ExportingSymbols || (ExportingSymbols = {}));
|
|
1236
|
-
/* *
|
|
1237
|
-
*
|
|
1238
|
-
* Default Export
|
|
1239
|
-
*
|
|
1240
|
-
* */
|
|
1241
|
-
/* harmony default export */ const Exporting_ExportingSymbols = (ExportingSymbols);
|
|
1242
|
-
|
|
1243
|
-
;// ./code/es-modules/Extensions/Exporting/Fullscreen.js
|
|
1244
|
-
/* *
|
|
1245
|
-
*
|
|
1246
|
-
* (c) 2009-2025 Rafal Sebestjanski
|
|
1247
|
-
*
|
|
1248
|
-
* Full screen for Highcharts
|
|
1249
|
-
*
|
|
1250
|
-
* License: www.highcharts.com/license
|
|
1251
|
-
*
|
|
1252
|
-
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
1253
|
-
*
|
|
1254
|
-
* */
|
|
1255
|
-
/**
|
|
1256
|
-
* The module allows user to enable display chart in full screen mode.
|
|
1257
|
-
* Used in StockTools too.
|
|
1258
|
-
* Based on default solutions in browsers.
|
|
1259
|
-
*/
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
const { composed } = (external_highcharts_src_js_default_default());
|
|
1264
|
-
|
|
1265
|
-
const { addEvent, fireEvent, pushUnique } = (external_highcharts_src_js_default_default());
|
|
1266
|
-
/* *
|
|
1267
|
-
*
|
|
1268
|
-
* Functions
|
|
1269
|
-
*
|
|
1270
|
-
* */
|
|
1271
|
-
/**
|
|
1272
|
-
* @private
|
|
1273
|
-
*/
|
|
1274
|
-
function onChartBeforeRender() {
|
|
1275
|
-
/**
|
|
1276
|
-
* @name Highcharts.Chart#fullscreen
|
|
1277
|
-
* @type {Highcharts.Fullscreen}
|
|
1278
|
-
* @requires modules/full-screen
|
|
1279
|
-
*/
|
|
1280
|
-
this.fullscreen = new Fullscreen(this);
|
|
1281
|
-
}
|
|
1282
|
-
/* *
|
|
1283
|
-
*
|
|
1284
|
-
* Class
|
|
1285
|
-
*
|
|
1286
|
-
* */
|
|
1287
|
-
/**
|
|
1288
|
-
* Handles displaying chart's container in the fullscreen mode.
|
|
1289
|
-
*
|
|
1290
|
-
* **Note**: Fullscreen is not supported on iPhone due to iOS limitations.
|
|
1291
|
-
*
|
|
1292
|
-
* @class
|
|
1293
|
-
* @name Highcharts.Fullscreen
|
|
1294
|
-
*
|
|
1295
|
-
* @requires modules/exporting
|
|
1296
|
-
*/
|
|
1297
|
-
class Fullscreen {
|
|
1298
|
-
/* *
|
|
1299
|
-
*
|
|
1300
|
-
* Static Functions
|
|
1301
|
-
*
|
|
1302
|
-
* */
|
|
1303
|
-
/**
|
|
1304
|
-
* Prepares the chart class to support fullscreen.
|
|
1305
|
-
*
|
|
1306
|
-
* @param {typeof_Highcharts.Chart} ChartClass
|
|
1307
|
-
* The chart class to decorate with fullscreen support.
|
|
1308
|
-
*/
|
|
1309
|
-
static compose(ChartClass) {
|
|
1310
|
-
if (pushUnique(composed, 'Fullscreen')) {
|
|
1311
|
-
// Initialize fullscreen
|
|
1312
|
-
addEvent(ChartClass, 'beforeRender', onChartBeforeRender);
|
|
1313
|
-
}
|
|
1314
|
-
}
|
|
1315
|
-
/* *
|
|
1316
|
-
*
|
|
1317
|
-
* Constructors
|
|
1318
|
-
*
|
|
1319
|
-
* */
|
|
1320
|
-
constructor(chart) {
|
|
1321
|
-
/**
|
|
1322
|
-
* Chart managed by the fullscreen controller.
|
|
1323
|
-
* @name Highcharts.Fullscreen#chart
|
|
1324
|
-
* @type {Highcharts.Chart}
|
|
1325
|
-
*/
|
|
1326
|
-
this.chart = chart;
|
|
1327
|
-
/**
|
|
1328
|
-
* The flag is set to `true` when the chart is displayed in
|
|
1329
|
-
* the fullscreen mode.
|
|
1330
|
-
*
|
|
1331
|
-
* @name Highcharts.Fullscreen#isOpen
|
|
1332
|
-
* @type {boolean|undefined}
|
|
1333
|
-
* @since 8.0.1
|
|
1334
|
-
*/
|
|
1335
|
-
this.isOpen = false;
|
|
1336
|
-
const container = chart.renderTo;
|
|
1337
|
-
// Hold event and methods available only for a current browser.
|
|
1338
|
-
if (!this.browserProps) {
|
|
1339
|
-
if (typeof container.requestFullscreen === 'function') {
|
|
1340
|
-
this.browserProps = {
|
|
1341
|
-
fullscreenChange: 'fullscreenchange',
|
|
1342
|
-
requestFullscreen: 'requestFullscreen',
|
|
1343
|
-
exitFullscreen: 'exitFullscreen'
|
|
1344
|
-
};
|
|
1345
|
-
}
|
|
1346
|
-
else if (container.mozRequestFullScreen) {
|
|
1347
|
-
this.browserProps = {
|
|
1348
|
-
fullscreenChange: 'mozfullscreenchange',
|
|
1349
|
-
requestFullscreen: 'mozRequestFullScreen',
|
|
1350
|
-
exitFullscreen: 'mozCancelFullScreen'
|
|
1351
|
-
};
|
|
1352
|
-
}
|
|
1353
|
-
else if (container.webkitRequestFullScreen) {
|
|
1354
|
-
this.browserProps = {
|
|
1355
|
-
fullscreenChange: 'webkitfullscreenchange',
|
|
1356
|
-
requestFullscreen: 'webkitRequestFullScreen',
|
|
1357
|
-
exitFullscreen: 'webkitExitFullscreen'
|
|
1358
|
-
};
|
|
1359
|
-
}
|
|
1360
|
-
else if (container.msRequestFullscreen) {
|
|
1361
|
-
this.browserProps = {
|
|
1362
|
-
fullscreenChange: 'MSFullscreenChange',
|
|
1363
|
-
requestFullscreen: 'msRequestFullscreen',
|
|
1364
|
-
exitFullscreen: 'msExitFullscreen'
|
|
1365
|
-
};
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
/* *
|
|
1370
|
-
*
|
|
1371
|
-
* Functions
|
|
1372
|
-
*
|
|
1373
|
-
* */
|
|
1374
|
-
/**
|
|
1375
|
-
* Stops displaying the chart in fullscreen mode.
|
|
1376
|
-
* Exporting module required.
|
|
1377
|
-
*
|
|
1378
|
-
* @since 8.0.1
|
|
1379
|
-
*
|
|
1380
|
-
* @function Highcharts.Fullscreen#close
|
|
1381
|
-
* @return {void}
|
|
1382
|
-
* @requires modules/full-screen
|
|
1383
|
-
*/
|
|
1384
|
-
close() {
|
|
1385
|
-
const fullscreen = this, chart = fullscreen.chart, optionsChart = chart.options.chart;
|
|
1386
|
-
fireEvent(chart, 'fullscreenClose', null, function () {
|
|
1387
|
-
// Don't fire exitFullscreen() when user exited
|
|
1388
|
-
// using 'Escape' button.
|
|
1389
|
-
if (fullscreen.isOpen &&
|
|
1390
|
-
fullscreen.browserProps &&
|
|
1391
|
-
chart.container.ownerDocument instanceof Document) {
|
|
1392
|
-
chart.container.ownerDocument[fullscreen.browserProps.exitFullscreen]();
|
|
1393
|
-
}
|
|
1394
|
-
// Unbind event as it's necessary only before exiting
|
|
1395
|
-
// from fullscreen.
|
|
1396
|
-
if (fullscreen.unbindFullscreenEvent) {
|
|
1397
|
-
fullscreen.unbindFullscreenEvent = fullscreen
|
|
1398
|
-
.unbindFullscreenEvent();
|
|
1399
|
-
}
|
|
1400
|
-
chart.setSize(fullscreen.origWidth, fullscreen.origHeight, false);
|
|
1401
|
-
fullscreen.origWidth = void 0;
|
|
1402
|
-
fullscreen.origHeight = void 0;
|
|
1403
|
-
optionsChart.width = fullscreen.origWidthOption;
|
|
1404
|
-
optionsChart.height = fullscreen.origHeightOption;
|
|
1405
|
-
fullscreen.origWidthOption = void 0;
|
|
1406
|
-
fullscreen.origHeightOption = void 0;
|
|
1407
|
-
fullscreen.isOpen = false;
|
|
1408
|
-
fullscreen.setButtonText();
|
|
1409
|
-
});
|
|
1410
|
-
}
|
|
1411
|
-
/**
|
|
1412
|
-
* Displays the chart in fullscreen mode.
|
|
1413
|
-
* When fired customly by user before exporting context button is created,
|
|
1414
|
-
* button's text will not be replaced - it's on the user side.
|
|
1415
|
-
* Exporting module required.
|
|
1416
|
-
*
|
|
1417
|
-
* @since 8.0.1
|
|
1418
|
-
*
|
|
1419
|
-
* @function Highcharts.Fullscreen#open
|
|
1420
|
-
* @return {void}
|
|
1421
|
-
* @requires modules/full-screen
|
|
1422
|
-
*/
|
|
1423
|
-
open() {
|
|
1424
|
-
const fullscreen = this, chart = fullscreen.chart, optionsChart = chart.options.chart;
|
|
1425
|
-
fireEvent(chart, 'fullscreenOpen', null, function () {
|
|
1426
|
-
if (optionsChart) {
|
|
1427
|
-
fullscreen.origWidthOption = optionsChart.width;
|
|
1428
|
-
fullscreen.origHeightOption = optionsChart.height;
|
|
1429
|
-
}
|
|
1430
|
-
fullscreen.origWidth = chart.chartWidth;
|
|
1431
|
-
fullscreen.origHeight = chart.chartHeight;
|
|
1432
|
-
// Handle exitFullscreen() method when user clicks 'Escape' button.
|
|
1433
|
-
if (fullscreen.browserProps) {
|
|
1434
|
-
const unbindChange = addEvent(chart.container.ownerDocument, // Chart's document
|
|
1435
|
-
fullscreen.browserProps.fullscreenChange, function () {
|
|
1436
|
-
// Handle lack of async of browser's
|
|
1437
|
-
// fullScreenChange event.
|
|
1438
|
-
if (fullscreen.isOpen) {
|
|
1439
|
-
fullscreen.isOpen = false;
|
|
1440
|
-
fullscreen.close();
|
|
1441
|
-
}
|
|
1442
|
-
else {
|
|
1443
|
-
chart.setSize(null, null, false);
|
|
1444
|
-
fullscreen.isOpen = true;
|
|
1445
|
-
fullscreen.setButtonText();
|
|
1446
|
-
}
|
|
1447
|
-
});
|
|
1448
|
-
const unbindDestroy = addEvent(chart, 'destroy', unbindChange);
|
|
1449
|
-
fullscreen.unbindFullscreenEvent = () => {
|
|
1450
|
-
unbindChange();
|
|
1451
|
-
unbindDestroy();
|
|
1452
|
-
};
|
|
1453
|
-
const promise = chart.renderTo[fullscreen.browserProps.requestFullscreen]();
|
|
1454
|
-
if (promise) {
|
|
1455
|
-
promise['catch'](function () {
|
|
1456
|
-
alert(// eslint-disable-line no-alert
|
|
1457
|
-
'Full screen is not supported inside a frame.');
|
|
1458
|
-
});
|
|
1459
|
-
}
|
|
1460
|
-
}
|
|
1461
|
-
});
|
|
1462
|
-
}
|
|
1463
|
-
/**
|
|
1464
|
-
* Replaces the exporting context button's text when toogling the
|
|
1465
|
-
* fullscreen mode.
|
|
1466
|
-
*
|
|
1467
|
-
* @private
|
|
1468
|
-
*
|
|
1469
|
-
* @since 8.0.1
|
|
1470
|
-
*
|
|
1471
|
-
* @requires modules/full-screen
|
|
1472
|
-
*/
|
|
1473
|
-
setButtonText() {
|
|
1474
|
-
const chart = this.chart, exportDivElements = chart.exportDivElements, exportingOptions = chart.options.exporting, menuItems = (exportingOptions &&
|
|
1475
|
-
exportingOptions.buttons &&
|
|
1476
|
-
exportingOptions.buttons.contextButton.menuItems), lang = chart.options.lang;
|
|
1477
|
-
if (exportingOptions &&
|
|
1478
|
-
exportingOptions.menuItemDefinitions &&
|
|
1479
|
-
lang &&
|
|
1480
|
-
lang.exitFullscreen &&
|
|
1481
|
-
lang.viewFullscreen &&
|
|
1482
|
-
menuItems &&
|
|
1483
|
-
exportDivElements) {
|
|
1484
|
-
const exportDivElement = exportDivElements[menuItems.indexOf('viewFullscreen')];
|
|
1485
|
-
if (exportDivElement) {
|
|
1486
|
-
external_highcharts_src_js_default_AST_default().setElementHTML(exportDivElement, !this.isOpen ?
|
|
1487
|
-
(exportingOptions.menuItemDefinitions.viewFullscreen
|
|
1488
|
-
.text ||
|
|
1489
|
-
lang.viewFullscreen) : lang.exitFullscreen);
|
|
1490
|
-
}
|
|
1491
|
-
}
|
|
1492
|
-
}
|
|
1493
|
-
/**
|
|
1494
|
-
* Toggles displaying the chart in fullscreen mode.
|
|
1495
|
-
* By default, when the exporting module is enabled, a context button with
|
|
1496
|
-
* a drop down menu in the upper right corner accesses this function.
|
|
1497
|
-
* Exporting module required.
|
|
1498
|
-
*
|
|
1499
|
-
* @since 8.0.1
|
|
1500
|
-
*
|
|
1501
|
-
* @sample highcharts/members/chart-togglefullscreen/
|
|
1502
|
-
* Toggle fullscreen mode from a HTML button
|
|
1503
|
-
*
|
|
1504
|
-
* @function Highcharts.Fullscreen#toggle
|
|
1505
|
-
* @requires modules/full-screen
|
|
1506
|
-
*/
|
|
1507
|
-
toggle() {
|
|
1508
|
-
const fullscreen = this;
|
|
1509
|
-
if (!fullscreen.isOpen) {
|
|
1510
|
-
fullscreen.open();
|
|
1511
|
-
}
|
|
1512
|
-
else {
|
|
1513
|
-
fullscreen.close();
|
|
1514
|
-
}
|
|
1515
|
-
}
|
|
1516
|
-
}
|
|
1517
|
-
/* *
|
|
1518
|
-
*
|
|
1519
|
-
* Default Export
|
|
1520
|
-
*
|
|
1521
|
-
* */
|
|
1522
|
-
/* harmony default export */ const Exporting_Fullscreen = (Fullscreen);
|
|
1523
|
-
/* *
|
|
1524
|
-
*
|
|
1525
|
-
* API Declarations
|
|
1526
|
-
*
|
|
1527
|
-
* */
|
|
1528
|
-
/**
|
|
1529
|
-
* Gets fired when closing the fullscreen
|
|
1530
|
-
*
|
|
1531
|
-
* @callback Highcharts.FullScreenfullscreenCloseCallbackFunction
|
|
1532
|
-
*
|
|
1533
|
-
* @param {Highcharts.Chart} chart
|
|
1534
|
-
* The chart on which the event occurred.
|
|
1535
|
-
*
|
|
1536
|
-
* @param {global.Event} event
|
|
1537
|
-
* The event that occurred.
|
|
1538
|
-
*/
|
|
1539
|
-
/**
|
|
1540
|
-
* Gets fired when opening the fullscreen
|
|
1541
|
-
*
|
|
1542
|
-
* @callback Highcharts.FullScreenfullscreenOpenCallbackFunction
|
|
1543
|
-
*
|
|
1544
|
-
* @param {Highcharts.Chart} chart
|
|
1545
|
-
* The chart on which the event occurred.
|
|
1546
|
-
*
|
|
1547
|
-
* @param {global.Event} event
|
|
1548
|
-
* The event that occurred.
|
|
1549
|
-
*/
|
|
1550
|
-
(''); // Keeps doclets above separated from following code
|
|
1551
|
-
/* *
|
|
1552
|
-
*
|
|
1553
|
-
* API Options
|
|
1554
|
-
*
|
|
1555
|
-
* */
|
|
1556
|
-
/**
|
|
1557
|
-
* Fires when a fullscreen is closed through the context menu item,
|
|
1558
|
-
* or a fullscreen is closed on the `Escape` button click,
|
|
1559
|
-
* or the `Chart.fullscreen.close` method.
|
|
1560
|
-
*
|
|
1561
|
-
* @sample highcharts/chart/events-fullscreen
|
|
1562
|
-
* Title size change on fullscreen open
|
|
1563
|
-
*
|
|
1564
|
-
* @type {Highcharts.FullScreenfullscreenCloseCallbackFunction}
|
|
1565
|
-
* @since 10.1.0
|
|
1566
|
-
* @context Highcharts.Chart
|
|
1567
|
-
* @requires modules/full-screen
|
|
1568
|
-
* @apioption chart.events.fullscreenClose
|
|
1569
|
-
*/
|
|
1570
|
-
/**
|
|
1571
|
-
* Fires when a fullscreen is opened through the context menu item,
|
|
1572
|
-
* or the `Chart.fullscreen.open` method.
|
|
1573
|
-
*
|
|
1574
|
-
* @sample highcharts/chart/events-fullscreen
|
|
1575
|
-
* Title size change on fullscreen open
|
|
1576
|
-
*
|
|
1577
|
-
* @type {Highcharts.FullScreenfullscreenOpenCallbackFunction}
|
|
1578
|
-
* @since 10.1.0
|
|
1579
|
-
* @context Highcharts.Chart
|
|
1580
|
-
* @requires modules/full-screen
|
|
1581
|
-
* @apioption chart.events.fullscreenOpen
|
|
1582
|
-
*/
|
|
1583
|
-
(''); // Keeps doclets above in transpiled file
|
|
1584
|
-
|
|
1585
|
-
;// external ["./data.src.js","default","HttpUtilities"]
|
|
1586
|
-
const external_data_src_js_default_HttpUtilities_namespaceObject = __WEBPACK_EXTERNAL_MODULE__data_src_js_55fab5a0__["default"].HttpUtilities;
|
|
1587
|
-
var external_data_src_js_default_HttpUtilities_default = /*#__PURE__*/__webpack_require__.n(external_data_src_js_default_HttpUtilities_namespaceObject);
|
|
1588
|
-
;// ./code/es-modules/Extensions/Exporting/Exporting.js
|
|
1589
|
-
/* *
|
|
1590
|
-
*
|
|
1591
|
-
* Exporting module
|
|
1592
|
-
*
|
|
1593
|
-
* (c) 2010-2025 Torstein Honsi
|
|
1594
|
-
*
|
|
1595
|
-
* License: www.highcharts.com/license
|
|
1596
|
-
*
|
|
1597
|
-
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
1598
|
-
*
|
|
1599
|
-
* */
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
const { defaultOptions } = (external_highcharts_src_js_default_default());
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
const { doc: Exporting_doc, SVG_NS, win: Exporting_win } = (external_highcharts_src_js_default_default());
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
const { addEvent: Exporting_addEvent, css, createElement, discardElement, extend, find, fireEvent: Exporting_fireEvent, isObject, merge, objectEach, pick, removeEvent, splat, uniqueKey } = (external_highcharts_src_js_default_default());
|
|
1614
|
-
/* *
|
|
1615
|
-
*
|
|
1616
|
-
* Composition
|
|
1617
|
-
*
|
|
1618
|
-
* */
|
|
1619
|
-
var Exporting;
|
|
1620
|
-
(function (Exporting) {
|
|
1621
|
-
/* *
|
|
1622
|
-
*
|
|
1623
|
-
* Declarations
|
|
1624
|
-
*
|
|
1625
|
-
* */
|
|
1626
|
-
/* *
|
|
1627
|
-
*
|
|
1628
|
-
* Constants
|
|
1629
|
-
*
|
|
1630
|
-
* */
|
|
1631
|
-
// These CSS properties are not inlined. Remember camelCase.
|
|
1632
|
-
const inlineDenylist = [
|
|
1633
|
-
/-/, // In Firefox, both hyphened and camelCased names are listed
|
|
1634
|
-
/^(clipPath|cssText|d|height|width)$/, // Full words
|
|
1635
|
-
/^font$/, // More specific props are set
|
|
1636
|
-
/[lL]ogical(Width|Height)$/,
|
|
1637
|
-
/^parentRule$/,
|
|
1638
|
-
/^(cssRules|ownerRules)$/, // #19516 read-only properties
|
|
1639
|
-
/perspective/,
|
|
1640
|
-
/TapHighlightColor/,
|
|
1641
|
-
/^transition/,
|
|
1642
|
-
/^length$/, // #7700
|
|
1643
|
-
/^\d+$/ // #17538
|
|
1644
|
-
];
|
|
1645
|
-
// These ones are translated to attributes rather than styles
|
|
1646
|
-
const inlineToAttributes = [
|
|
1647
|
-
'fill',
|
|
1648
|
-
'stroke',
|
|
1649
|
-
'strokeLinecap',
|
|
1650
|
-
'strokeLinejoin',
|
|
1651
|
-
'strokeWidth',
|
|
1652
|
-
'textAnchor',
|
|
1653
|
-
'x',
|
|
1654
|
-
'y'
|
|
1655
|
-
];
|
|
1656
|
-
Exporting.inlineAllowlist = [];
|
|
1657
|
-
const unstyledElements = [
|
|
1658
|
-
'clipPath',
|
|
1659
|
-
'defs',
|
|
1660
|
-
'desc'
|
|
1661
|
-
];
|
|
1662
|
-
/* *
|
|
1663
|
-
*
|
|
1664
|
-
* Variables
|
|
1665
|
-
*
|
|
1666
|
-
* */
|
|
1667
|
-
let printingChart;
|
|
1668
|
-
/* *
|
|
1669
|
-
*
|
|
1670
|
-
* Functions
|
|
1671
|
-
*
|
|
1672
|
-
* */
|
|
1673
|
-
/**
|
|
1674
|
-
* Add the export button to the chart, with options.
|
|
1675
|
-
*
|
|
1676
|
-
* @private
|
|
1677
|
-
* @function Highcharts.Chart#addButton
|
|
1678
|
-
* @param {Highcharts.NavigationButtonOptions} options
|
|
1679
|
-
* @requires modules/exporting
|
|
1680
|
-
*/
|
|
1681
|
-
function addButton(options) {
|
|
1682
|
-
const chart = this, renderer = chart.renderer, btnOptions = merge(chart.options.navigation.buttonOptions, options), onclick = btnOptions.onclick, menuItems = btnOptions.menuItems, symbolSize = btnOptions.symbolSize || 12;
|
|
1683
|
-
let symbol;
|
|
1684
|
-
if (!chart.btnCount) {
|
|
1685
|
-
chart.btnCount = 0;
|
|
1686
|
-
}
|
|
1687
|
-
// Keeps references to the button elements
|
|
1688
|
-
if (!chart.exportDivElements) {
|
|
1689
|
-
chart.exportDivElements = [];
|
|
1690
|
-
chart.exportSVGElements = [];
|
|
1691
|
-
}
|
|
1692
|
-
if (btnOptions.enabled === false || !btnOptions.theme) {
|
|
1693
|
-
return;
|
|
1694
|
-
}
|
|
1695
|
-
const theme = chart.styledMode ? {} : btnOptions.theme;
|
|
1696
|
-
let callback;
|
|
1697
|
-
if (onclick) {
|
|
1698
|
-
callback = function (e) {
|
|
1699
|
-
if (e) {
|
|
1700
|
-
e.stopPropagation();
|
|
1701
|
-
}
|
|
1702
|
-
onclick.call(chart, e);
|
|
1703
|
-
};
|
|
1704
|
-
}
|
|
1705
|
-
else if (menuItems) {
|
|
1706
|
-
callback = function (e) {
|
|
1707
|
-
// Consistent with onclick call (#3495)
|
|
1708
|
-
if (e) {
|
|
1709
|
-
e.stopPropagation();
|
|
1710
|
-
}
|
|
1711
|
-
chart.contextMenu(button.menuClassName, menuItems, button.translateX || 0, button.translateY || 0, button.width || 0, button.height || 0, button);
|
|
1712
|
-
button.setState(2);
|
|
1713
|
-
};
|
|
1714
|
-
}
|
|
1715
|
-
if (btnOptions.text && btnOptions.symbol) {
|
|
1716
|
-
theme.paddingLeft = pick(theme.paddingLeft, 30);
|
|
1717
|
-
}
|
|
1718
|
-
else if (!btnOptions.text) {
|
|
1719
|
-
extend(theme, {
|
|
1720
|
-
width: btnOptions.width,
|
|
1721
|
-
height: btnOptions.height,
|
|
1722
|
-
padding: 0
|
|
1723
|
-
});
|
|
1724
|
-
}
|
|
1725
|
-
const button = renderer
|
|
1726
|
-
.button(btnOptions.text, 0, 0, callback, theme, void 0, void 0, void 0, void 0, btnOptions.useHTML)
|
|
1727
|
-
.addClass(options.className)
|
|
1728
|
-
.attr({
|
|
1729
|
-
title: pick(chart.options.lang[btnOptions._titleKey || btnOptions.titleKey], '')
|
|
1730
|
-
});
|
|
1731
|
-
button.menuClassName = (options.menuClassName ||
|
|
1732
|
-
'highcharts-menu-' + chart.btnCount++);
|
|
1733
|
-
if (btnOptions.symbol) {
|
|
1734
|
-
symbol = renderer
|
|
1735
|
-
.symbol(btnOptions.symbol, Math.round((btnOptions.symbolX || 0) - (symbolSize / 2)), Math.round((btnOptions.symbolY || 0) - (symbolSize / 2)), symbolSize, symbolSize
|
|
1736
|
-
// If symbol is an image, scale it (#7957)
|
|
1737
|
-
, {
|
|
1738
|
-
width: symbolSize,
|
|
1739
|
-
height: symbolSize
|
|
1740
|
-
})
|
|
1741
|
-
.addClass('highcharts-button-symbol')
|
|
1742
|
-
.attr({
|
|
1743
|
-
zIndex: 1
|
|
1744
|
-
})
|
|
1745
|
-
.add(button);
|
|
1746
|
-
if (!chart.styledMode) {
|
|
1747
|
-
symbol.attr({
|
|
1748
|
-
stroke: btnOptions.symbolStroke,
|
|
1749
|
-
fill: btnOptions.symbolFill,
|
|
1750
|
-
'stroke-width': btnOptions.symbolStrokeWidth || 1
|
|
1751
|
-
});
|
|
1752
|
-
}
|
|
1753
|
-
}
|
|
1754
|
-
button
|
|
1755
|
-
.add(chart.exportingGroup)
|
|
1756
|
-
.align(extend(btnOptions, {
|
|
1757
|
-
width: button.width,
|
|
1758
|
-
x: pick(btnOptions.x, chart.buttonOffset) // #1654
|
|
1759
|
-
}), true, 'spacingBox');
|
|
1760
|
-
chart.buttonOffset += (((button.width || 0) + btnOptions.buttonSpacing) *
|
|
1761
|
-
(btnOptions.align === 'right' ? -1 : 1));
|
|
1762
|
-
chart.exportSVGElements.push(button, symbol);
|
|
1763
|
-
}
|
|
1764
|
-
/**
|
|
1765
|
-
* Clean up after printing a chart.
|
|
1766
|
-
*
|
|
1767
|
-
* @function Highcharts#afterPrint
|
|
1768
|
-
*
|
|
1769
|
-
* @private
|
|
1770
|
-
*
|
|
1771
|
-
* @param {Highcharts.Chart} chart
|
|
1772
|
-
* Chart that was (or suppose to be) printed
|
|
1773
|
-
*
|
|
1774
|
-
* @emits Highcharts.Chart#event:afterPrint
|
|
1775
|
-
*/
|
|
1776
|
-
function afterPrint() {
|
|
1777
|
-
const chart = this;
|
|
1778
|
-
if (!chart.printReverseInfo) {
|
|
1779
|
-
return void 0;
|
|
1780
|
-
}
|
|
1781
|
-
const { childNodes, origDisplay, resetParams } = chart.printReverseInfo;
|
|
1782
|
-
// Put the chart back in
|
|
1783
|
-
chart.moveContainers(chart.renderTo);
|
|
1784
|
-
// Restore all body content
|
|
1785
|
-
[].forEach.call(childNodes, function (node, i) {
|
|
1786
|
-
if (node.nodeType === 1) {
|
|
1787
|
-
node.style.display = (origDisplay[i] || '');
|
|
1788
|
-
}
|
|
1789
|
-
});
|
|
1790
|
-
chart.isPrinting = false;
|
|
1791
|
-
// Reset printMaxWidth
|
|
1792
|
-
if (resetParams) {
|
|
1793
|
-
chart.setSize.apply(chart, resetParams);
|
|
1794
|
-
}
|
|
1795
|
-
delete chart.printReverseInfo;
|
|
1796
|
-
printingChart = void 0;
|
|
1797
|
-
Exporting_fireEvent(chart, 'afterPrint');
|
|
1798
|
-
}
|
|
1799
|
-
/**
|
|
1800
|
-
* Prepare chart and document before printing a chart.
|
|
1801
|
-
*
|
|
1802
|
-
* @function Highcharts#beforePrint
|
|
1803
|
-
*
|
|
1804
|
-
* @private
|
|
1805
|
-
*
|
|
1806
|
-
*
|
|
1807
|
-
* @emits Highcharts.Chart#event:beforePrint
|
|
1808
|
-
*/
|
|
1809
|
-
function beforePrint() {
|
|
1810
|
-
const chart = this, body = Exporting_doc.body, printMaxWidth = chart.options.exporting.printMaxWidth, printReverseInfo = {
|
|
1811
|
-
childNodes: body.childNodes,
|
|
1812
|
-
origDisplay: [],
|
|
1813
|
-
resetParams: void 0
|
|
1814
|
-
};
|
|
1815
|
-
chart.isPrinting = true;
|
|
1816
|
-
chart.pointer?.reset(void 0, 0);
|
|
1817
|
-
Exporting_fireEvent(chart, 'beforePrint');
|
|
1818
|
-
// Handle printMaxWidth
|
|
1819
|
-
const handleMaxWidth = printMaxWidth &&
|
|
1820
|
-
chart.chartWidth > printMaxWidth;
|
|
1821
|
-
if (handleMaxWidth) {
|
|
1822
|
-
printReverseInfo.resetParams = [
|
|
1823
|
-
chart.options.chart.width,
|
|
1824
|
-
void 0,
|
|
1825
|
-
false
|
|
1826
|
-
];
|
|
1827
|
-
chart.setSize(printMaxWidth, void 0, false);
|
|
1828
|
-
}
|
|
1829
|
-
// Hide all body content
|
|
1830
|
-
[].forEach.call(printReverseInfo.childNodes, function (node, i) {
|
|
1831
|
-
if (node.nodeType === 1) {
|
|
1832
|
-
printReverseInfo.origDisplay[i] = node.style.display;
|
|
1833
|
-
node.style.display = 'none';
|
|
1834
|
-
}
|
|
1835
|
-
});
|
|
1836
|
-
// Pull out the chart
|
|
1837
|
-
chart.moveContainers(body);
|
|
1838
|
-
// Storage details for undo action after printing
|
|
1839
|
-
chart.printReverseInfo = printReverseInfo;
|
|
1840
|
-
}
|
|
1841
|
-
/**
|
|
1842
|
-
* @private
|
|
1843
|
-
*/
|
|
1844
|
-
function chartCallback(chart) {
|
|
1845
|
-
const composition = chart;
|
|
1846
|
-
composition.renderExporting();
|
|
1847
|
-
Exporting_addEvent(chart, 'redraw', composition.renderExporting);
|
|
1848
|
-
// Destroy the export elements at chart destroy
|
|
1849
|
-
Exporting_addEvent(chart, 'destroy', composition.destroyExport);
|
|
1850
|
-
// Uncomment this to see a button directly below the chart, for quick
|
|
1851
|
-
// testing of export
|
|
1852
|
-
/*
|
|
1853
|
-
let button, viewImage, viewSource;
|
|
1854
|
-
if (!chart.renderer.forExport) {
|
|
1855
|
-
viewImage = function () {
|
|
1856
|
-
let div = doc.createElement('div');
|
|
1857
|
-
div.innerHTML = chart.getSVGForExport();
|
|
1858
|
-
chart.renderTo.parentNode.appendChild(div);
|
|
1859
|
-
};
|
|
1860
|
-
|
|
1861
|
-
viewSource = function () {
|
|
1862
|
-
let pre = doc.createElement('pre');
|
|
1863
|
-
pre.innerHTML = chart.getSVGForExport()
|
|
1864
|
-
.replace(/</g, '\n<')
|
|
1865
|
-
.replace(/>/g, '>');
|
|
1866
|
-
chart.renderTo.parentNode.appendChild(pre);
|
|
1867
|
-
};
|
|
1868
|
-
|
|
1869
|
-
viewImage();
|
|
1870
|
-
|
|
1871
|
-
// View SVG Image
|
|
1872
|
-
button = doc.createElement('button');
|
|
1873
|
-
button.innerHTML = 'View SVG Image';
|
|
1874
|
-
chart.renderTo.parentNode.appendChild(button);
|
|
1875
|
-
button.onclick = viewImage;
|
|
1876
|
-
|
|
1877
|
-
// View SVG Source
|
|
1878
|
-
button = doc.createElement('button');
|
|
1879
|
-
button.innerHTML = 'View SVG Source';
|
|
1880
|
-
chart.renderTo.parentNode.appendChild(button);
|
|
1881
|
-
button.onclick = viewSource;
|
|
1882
|
-
}
|
|
1883
|
-
//*/
|
|
1884
|
-
}
|
|
1885
|
-
/**
|
|
1886
|
-
* @private
|
|
1887
|
-
*/
|
|
1888
|
-
function compose(ChartClass, SVGRendererClass) {
|
|
1889
|
-
Exporting_ExportingSymbols.compose(SVGRendererClass);
|
|
1890
|
-
Exporting_Fullscreen.compose(ChartClass);
|
|
1891
|
-
const chartProto = ChartClass.prototype;
|
|
1892
|
-
if (!chartProto.exportChart) {
|
|
1893
|
-
chartProto.afterPrint = afterPrint;
|
|
1894
|
-
chartProto.exportChart = exportChart;
|
|
1895
|
-
chartProto.inlineStyles = inlineStyles;
|
|
1896
|
-
chartProto.print = print;
|
|
1897
|
-
chartProto.sanitizeSVG = sanitizeSVG;
|
|
1898
|
-
chartProto.getChartHTML = getChartHTML;
|
|
1899
|
-
chartProto.getSVG = getSVG;
|
|
1900
|
-
chartProto.getSVGForExport = getSVGForExport;
|
|
1901
|
-
chartProto.getFilename = getFilename;
|
|
1902
|
-
chartProto.moveContainers = moveContainers;
|
|
1903
|
-
chartProto.beforePrint = beforePrint;
|
|
1904
|
-
chartProto.contextMenu = contextMenu;
|
|
1905
|
-
chartProto.addButton = addButton;
|
|
1906
|
-
chartProto.destroyExport = destroyExport;
|
|
1907
|
-
chartProto.renderExporting = renderExporting;
|
|
1908
|
-
chartProto.resolveCSSVariables = resolveCSSVariables;
|
|
1909
|
-
chartProto.callbacks.push(chartCallback);
|
|
1910
|
-
Exporting_addEvent(ChartClass, 'init', onChartInit);
|
|
1911
|
-
Exporting_addEvent(ChartClass, 'layOutTitle', onChartLayOutTitle);
|
|
1912
|
-
if ((external_highcharts_src_js_default_default()).isSafari) {
|
|
1913
|
-
Exporting_win.matchMedia('print').addListener(function (mqlEvent) {
|
|
1914
|
-
if (!printingChart) {
|
|
1915
|
-
return void 0;
|
|
1916
|
-
}
|
|
1917
|
-
if (mqlEvent.matches) {
|
|
1918
|
-
printingChart.beforePrint();
|
|
1919
|
-
}
|
|
1920
|
-
else {
|
|
1921
|
-
printingChart.afterPrint();
|
|
1922
|
-
}
|
|
1923
|
-
});
|
|
1924
|
-
}
|
|
1925
|
-
defaultOptions.exporting = merge(Exporting_ExportingDefaults.exporting, defaultOptions.exporting);
|
|
1926
|
-
defaultOptions.lang = merge(Exporting_ExportingDefaults.lang, defaultOptions.lang);
|
|
1927
|
-
// Buttons and menus are collected in a separate config option set
|
|
1928
|
-
// called 'navigation'. This can be extended later to add control
|
|
1929
|
-
// buttons like zoom and pan right click menus.
|
|
1930
|
-
defaultOptions.navigation = merge(Exporting_ExportingDefaults.navigation, defaultOptions.navigation);
|
|
1931
|
-
}
|
|
1932
|
-
}
|
|
1933
|
-
Exporting.compose = compose;
|
|
1934
|
-
/**
|
|
1935
|
-
* Display a popup menu for choosing the export type.
|
|
1936
|
-
*
|
|
1937
|
-
* @private
|
|
1938
|
-
* @function Highcharts.Chart#contextMenu
|
|
1939
|
-
* @param {string} className
|
|
1940
|
-
* An identifier for the menu.
|
|
1941
|
-
* @param {Array<string|Highcharts.ExportingMenuObject>} items
|
|
1942
|
-
* A collection with text and onclicks for the items.
|
|
1943
|
-
* @param {number} x
|
|
1944
|
-
* The x position of the opener button
|
|
1945
|
-
* @param {number} y
|
|
1946
|
-
* The y position of the opener button
|
|
1947
|
-
* @param {number} width
|
|
1948
|
-
* The width of the opener button
|
|
1949
|
-
* @param {number} height
|
|
1950
|
-
* The height of the opener button
|
|
1951
|
-
* @requires modules/exporting
|
|
1952
|
-
*/
|
|
1953
|
-
function contextMenu(className, items, x, y, width, height, button) {
|
|
1954
|
-
const chart = this, navOptions = chart.options.navigation, chartWidth = chart.chartWidth, chartHeight = chart.chartHeight, cacheName = 'cache-' + className,
|
|
1955
|
-
// For mouse leave detection
|
|
1956
|
-
menuPadding = Math.max(width, height);
|
|
1957
|
-
let innerMenu, menu = chart[cacheName];
|
|
1958
|
-
// Create the menu only the first time
|
|
1959
|
-
if (!menu) {
|
|
1960
|
-
// Create a HTML element above the SVG
|
|
1961
|
-
chart.exportContextMenu = chart[cacheName] = menu =
|
|
1962
|
-
createElement('div', {
|
|
1963
|
-
className: className
|
|
1964
|
-
}, {
|
|
1965
|
-
position: 'absolute',
|
|
1966
|
-
zIndex: 1000,
|
|
1967
|
-
padding: menuPadding + 'px',
|
|
1968
|
-
pointerEvents: 'auto',
|
|
1969
|
-
...chart.renderer.style
|
|
1970
|
-
}, chart.scrollablePlotArea?.fixedDiv || chart.container);
|
|
1971
|
-
innerMenu = createElement('ul', { className: 'highcharts-menu' }, chart.styledMode ? {} : {
|
|
1972
|
-
listStyle: 'none',
|
|
1973
|
-
margin: 0,
|
|
1974
|
-
padding: 0
|
|
1975
|
-
}, menu);
|
|
1976
|
-
// Presentational CSS
|
|
1977
|
-
if (!chart.styledMode) {
|
|
1978
|
-
css(innerMenu, extend({
|
|
1979
|
-
MozBoxShadow: '3px 3px 10px #888',
|
|
1980
|
-
WebkitBoxShadow: '3px 3px 10px #888',
|
|
1981
|
-
boxShadow: '3px 3px 10px #888'
|
|
1982
|
-
}, navOptions.menuStyle));
|
|
1983
|
-
}
|
|
1984
|
-
// Hide on mouse out
|
|
1985
|
-
menu.hideMenu = function () {
|
|
1986
|
-
css(menu, { display: 'none' });
|
|
1987
|
-
if (button) {
|
|
1988
|
-
button.setState(0);
|
|
1989
|
-
}
|
|
1990
|
-
chart.openMenu = false;
|
|
1991
|
-
// #10361, #9998
|
|
1992
|
-
css(chart.renderTo, { overflow: 'hidden' });
|
|
1993
|
-
css(chart.container, { overflow: 'hidden' });
|
|
1994
|
-
external_highcharts_src_js_default_default().clearTimeout(menu.hideTimer);
|
|
1995
|
-
Exporting_fireEvent(chart, 'exportMenuHidden');
|
|
1996
|
-
};
|
|
1997
|
-
// Hide the menu some time after mouse leave (#1357)
|
|
1998
|
-
chart.exportEvents.push(Exporting_addEvent(menu, 'mouseleave', function () {
|
|
1999
|
-
menu.hideTimer = Exporting_win.setTimeout(menu.hideMenu, 500);
|
|
2000
|
-
}), Exporting_addEvent(menu, 'mouseenter', function () {
|
|
2001
|
-
external_highcharts_src_js_default_default().clearTimeout(menu.hideTimer);
|
|
2002
|
-
}),
|
|
2003
|
-
// Hide it on clicking or touching outside the menu (#2258,
|
|
2004
|
-
// #2335, #2407)
|
|
2005
|
-
Exporting_addEvent(Exporting_doc, 'mouseup', function (e) {
|
|
2006
|
-
if (!chart.pointer?.inClass(e.target, className)) {
|
|
2007
|
-
menu.hideMenu();
|
|
2008
|
-
}
|
|
2009
|
-
}), Exporting_addEvent(menu, 'click', function () {
|
|
2010
|
-
if (chart.openMenu) {
|
|
2011
|
-
menu.hideMenu();
|
|
2012
|
-
}
|
|
2013
|
-
}));
|
|
2014
|
-
// Create the items
|
|
2015
|
-
items.forEach(function (item) {
|
|
2016
|
-
if (typeof item === 'string') {
|
|
2017
|
-
item = chart.options.exporting
|
|
2018
|
-
.menuItemDefinitions[item];
|
|
2019
|
-
}
|
|
2020
|
-
if (isObject(item, true)) {
|
|
2021
|
-
let element;
|
|
2022
|
-
if (item.separator) {
|
|
2023
|
-
element = createElement('hr', void 0, void 0, innerMenu);
|
|
2024
|
-
}
|
|
2025
|
-
else {
|
|
2026
|
-
// When chart initialized with the table, wrong button
|
|
2027
|
-
// text displayed, #14352.
|
|
2028
|
-
if (item.textKey === 'viewData' &&
|
|
2029
|
-
chart.isDataTableVisible) {
|
|
2030
|
-
item.textKey = 'hideData';
|
|
2031
|
-
}
|
|
2032
|
-
element = createElement('li', {
|
|
2033
|
-
className: 'highcharts-menu-item',
|
|
2034
|
-
onclick: function (e) {
|
|
2035
|
-
if (e) { // IE7
|
|
2036
|
-
e.stopPropagation();
|
|
2037
|
-
}
|
|
2038
|
-
menu.hideMenu();
|
|
2039
|
-
if (typeof item !== 'string' && item.onclick) {
|
|
2040
|
-
item.onclick.apply(chart, arguments);
|
|
2041
|
-
}
|
|
2042
|
-
}
|
|
2043
|
-
}, void 0, innerMenu);
|
|
2044
|
-
external_highcharts_src_js_default_AST_default().setElementHTML(element, item.text ||
|
|
2045
|
-
chart.options.lang[item.textKey]);
|
|
2046
|
-
if (!chart.styledMode) {
|
|
2047
|
-
element.onmouseover = function () {
|
|
2048
|
-
css(this, navOptions.menuItemHoverStyle);
|
|
2049
|
-
};
|
|
2050
|
-
element.onmouseout = function () {
|
|
2051
|
-
css(this, navOptions.menuItemStyle);
|
|
2052
|
-
};
|
|
2053
|
-
css(element, extend({
|
|
2054
|
-
cursor: 'pointer'
|
|
2055
|
-
}, navOptions.menuItemStyle || {}));
|
|
2056
|
-
}
|
|
2057
|
-
}
|
|
2058
|
-
// Keep references to menu divs to be able to destroy them
|
|
2059
|
-
chart.exportDivElements.push(element);
|
|
2060
|
-
}
|
|
2061
|
-
});
|
|
2062
|
-
// Keep references to menu and innerMenu div to be able to destroy
|
|
2063
|
-
// them
|
|
2064
|
-
chart.exportDivElements.push(innerMenu, menu);
|
|
2065
|
-
chart.exportMenuWidth = menu.offsetWidth;
|
|
2066
|
-
chart.exportMenuHeight = menu.offsetHeight;
|
|
2067
|
-
}
|
|
2068
|
-
const menuStyle = { display: 'block' };
|
|
2069
|
-
// If outside right, right align it
|
|
2070
|
-
if (x + (chart.exportMenuWidth || 0) > chartWidth) {
|
|
2071
|
-
menuStyle.right = (chartWidth - x - width - menuPadding) + 'px';
|
|
2072
|
-
}
|
|
2073
|
-
else {
|
|
2074
|
-
menuStyle.left = (x - menuPadding) + 'px';
|
|
2075
|
-
}
|
|
2076
|
-
// If outside bottom, bottom align it
|
|
2077
|
-
if (y + height + (chart.exportMenuHeight || 0) > chartHeight &&
|
|
2078
|
-
button.alignOptions?.verticalAlign !== 'top') {
|
|
2079
|
-
menuStyle.bottom = (chartHeight - y - menuPadding) + 'px';
|
|
2080
|
-
}
|
|
2081
|
-
else {
|
|
2082
|
-
menuStyle.top = (y + height - menuPadding) + 'px';
|
|
2083
|
-
}
|
|
2084
|
-
css(menu, menuStyle);
|
|
2085
|
-
// #10361, #9998
|
|
2086
|
-
css(chart.renderTo, { overflow: '' });
|
|
2087
|
-
css(chart.container, { overflow: '' });
|
|
2088
|
-
chart.openMenu = true;
|
|
2089
|
-
Exporting_fireEvent(chart, 'exportMenuShown');
|
|
2090
|
-
}
|
|
2091
|
-
/**
|
|
2092
|
-
* Destroy the export buttons.
|
|
2093
|
-
* @private
|
|
2094
|
-
* @function Highcharts.Chart#destroyExport
|
|
2095
|
-
* @param {global.Event} [e]
|
|
2096
|
-
* @requires modules/exporting
|
|
2097
|
-
*/
|
|
2098
|
-
function destroyExport(e) {
|
|
2099
|
-
const chart = e ? e.target : this, exportSVGElements = chart.exportSVGElements, exportDivElements = chart.exportDivElements, exportEvents = chart.exportEvents;
|
|
2100
|
-
let cacheName;
|
|
2101
|
-
// Destroy the extra buttons added
|
|
2102
|
-
if (exportSVGElements) {
|
|
2103
|
-
exportSVGElements.forEach((elem, i) => {
|
|
2104
|
-
// Destroy and null the svg elements
|
|
2105
|
-
if (elem) { // #1822
|
|
2106
|
-
elem.onclick = elem.ontouchstart = null;
|
|
2107
|
-
cacheName = 'cache-' + elem.menuClassName;
|
|
2108
|
-
if (chart[cacheName]) {
|
|
2109
|
-
delete chart[cacheName];
|
|
2110
|
-
}
|
|
2111
|
-
exportSVGElements[i] = elem.destroy();
|
|
2112
|
-
}
|
|
2113
|
-
});
|
|
2114
|
-
exportSVGElements.length = 0;
|
|
2115
|
-
}
|
|
2116
|
-
// Destroy the exporting group
|
|
2117
|
-
if (chart.exportingGroup) {
|
|
2118
|
-
chart.exportingGroup.destroy();
|
|
2119
|
-
delete chart.exportingGroup;
|
|
2120
|
-
}
|
|
2121
|
-
// Destroy the divs for the menu
|
|
2122
|
-
if (exportDivElements) {
|
|
2123
|
-
exportDivElements.forEach(function (elem, i) {
|
|
2124
|
-
if (elem) {
|
|
2125
|
-
// Remove the event handler
|
|
2126
|
-
external_highcharts_src_js_default_default().clearTimeout(elem.hideTimer); // #5427
|
|
2127
|
-
removeEvent(elem, 'mouseleave');
|
|
2128
|
-
// Remove inline events
|
|
2129
|
-
// (chart.exportDivElements as any)[i] =
|
|
2130
|
-
exportDivElements[i] =
|
|
2131
|
-
elem.onmouseout =
|
|
2132
|
-
elem.onmouseover =
|
|
2133
|
-
elem.ontouchstart =
|
|
2134
|
-
elem.onclick = null;
|
|
2135
|
-
// Destroy the div by moving to garbage bin
|
|
2136
|
-
discardElement(elem);
|
|
2137
|
-
}
|
|
2138
|
-
});
|
|
2139
|
-
exportDivElements.length = 0;
|
|
2140
|
-
}
|
|
2141
|
-
if (exportEvents) {
|
|
2142
|
-
exportEvents.forEach(function (unbind) {
|
|
2143
|
-
unbind();
|
|
2144
|
-
});
|
|
2145
|
-
exportEvents.length = 0;
|
|
2146
|
-
}
|
|
2147
|
-
}
|
|
2148
|
-
/**
|
|
2149
|
-
* Exporting module required. Submit an SVG version of the chart to a server
|
|
2150
|
-
* along with some parameters for conversion.
|
|
2151
|
-
*
|
|
2152
|
-
* @sample highcharts/members/chart-exportchart/
|
|
2153
|
-
* Export with no options
|
|
2154
|
-
* @sample highcharts/members/chart-exportchart-filename/
|
|
2155
|
-
* PDF type and custom filename
|
|
2156
|
-
* @sample highcharts/members/chart-exportchart-custom-background/
|
|
2157
|
-
* Different chart background in export
|
|
2158
|
-
* @sample stock/members/chart-exportchart/
|
|
2159
|
-
* Export with Highcharts Stock
|
|
2160
|
-
*
|
|
2161
|
-
* @function Highcharts.Chart#exportChart
|
|
2162
|
-
*
|
|
2163
|
-
* @param {Highcharts.ExportingOptions} exportingOptions
|
|
2164
|
-
* Exporting options in addition to those defined in
|
|
2165
|
-
* [exporting](https://api.highcharts.com/highcharts/exporting).
|
|
2166
|
-
*
|
|
2167
|
-
* @param {Highcharts.Options} chartOptions
|
|
2168
|
-
* Additional chart options for the exported chart. For example a
|
|
2169
|
-
* different background color can be added here, or `dataLabels` for
|
|
2170
|
-
* export only.
|
|
2171
|
-
*
|
|
2172
|
-
* @requires modules/exporting
|
|
2173
|
-
*/
|
|
2174
|
-
function exportChart(exportingOptions, chartOptions) {
|
|
2175
|
-
const svg = this.getSVGForExport(exportingOptions, chartOptions);
|
|
2176
|
-
// Merge the options
|
|
2177
|
-
exportingOptions = merge(this.options.exporting, exportingOptions);
|
|
2178
|
-
// Do the post
|
|
2179
|
-
external_data_src_js_default_HttpUtilities_default().post(exportingOptions.url, {
|
|
2180
|
-
filename: exportingOptions.filename ?
|
|
2181
|
-
exportingOptions.filename.replace(/\//g, '-') :
|
|
2182
|
-
this.getFilename(),
|
|
2183
|
-
type: exportingOptions.type,
|
|
2184
|
-
width: exportingOptions.width,
|
|
2185
|
-
scale: exportingOptions.scale,
|
|
2186
|
-
svg: svg
|
|
2187
|
-
}, exportingOptions.fetchOptions);
|
|
2188
|
-
}
|
|
2189
|
-
/**
|
|
2190
|
-
* Return the unfiltered innerHTML of the chart container. Used as hook for
|
|
2191
|
-
* plugins. In styled mode, it also takes care of inlining CSS style rules.
|
|
2192
|
-
*
|
|
2193
|
-
* @see Chart#getSVG
|
|
2194
|
-
*
|
|
2195
|
-
* @function Highcharts.Chart#getChartHTML
|
|
2196
|
-
*
|
|
2197
|
-
* @return {string}
|
|
2198
|
-
* The unfiltered SVG of the chart.
|
|
2199
|
-
*
|
|
2200
|
-
* @requires modules/exporting
|
|
2201
|
-
*/
|
|
2202
|
-
function getChartHTML(applyStyleSheets) {
|
|
2203
|
-
if (applyStyleSheets) {
|
|
2204
|
-
this.inlineStyles();
|
|
2205
|
-
}
|
|
2206
|
-
this.resolveCSSVariables();
|
|
2207
|
-
return this.container.innerHTML;
|
|
2208
|
-
}
|
|
2209
|
-
/**
|
|
2210
|
-
* Get the default file name used for exported charts. By default it creates
|
|
2211
|
-
* a file name based on the chart title.
|
|
2212
|
-
*
|
|
2213
|
-
* @function Highcharts.Chart#getFilename
|
|
2214
|
-
*
|
|
2215
|
-
* @return {string} A file name without extension.
|
|
2216
|
-
*
|
|
2217
|
-
* @requires modules/exporting
|
|
2218
|
-
*/
|
|
2219
|
-
function getFilename() {
|
|
2220
|
-
const s = this.userOptions.title && this.userOptions.title.text;
|
|
2221
|
-
let filename = this.options.exporting.filename;
|
|
2222
|
-
if (filename) {
|
|
2223
|
-
return filename.replace(/\//g, '-');
|
|
2224
|
-
}
|
|
2225
|
-
if (typeof s === 'string') {
|
|
2226
|
-
filename = s
|
|
2227
|
-
.toLowerCase()
|
|
2228
|
-
.replace(/<\/?[^>]+(>|$)/g, '') // Strip HTML tags
|
|
2229
|
-
.replace(/[\s_]+/g, '-')
|
|
2230
|
-
.replace(/[^a-z\d\-]/g, '') // Preserve only latin
|
|
2231
|
-
.replace(/^[\-]+/g, '') // Dashes in the start
|
|
2232
|
-
.replace(/[\-]+/g, '-') // Dashes in a row
|
|
2233
|
-
.substr(0, 24)
|
|
2234
|
-
.replace(/[\-]+$/g, ''); // Dashes in the end;
|
|
2235
|
-
}
|
|
2236
|
-
if (!filename || filename.length < 5) {
|
|
2237
|
-
filename = 'chart';
|
|
2238
|
-
}
|
|
2239
|
-
return filename;
|
|
2240
|
-
}
|
|
2241
|
-
/**
|
|
2242
|
-
* Return an SVG representation of the chart.
|
|
2243
|
-
*
|
|
2244
|
-
* @sample highcharts/members/chart-getsvg/
|
|
2245
|
-
* View the SVG from a button
|
|
2246
|
-
*
|
|
2247
|
-
* @function Highcharts.Chart#getSVG
|
|
2248
|
-
*
|
|
2249
|
-
* @param {Highcharts.Options} [chartOptions]
|
|
2250
|
-
* Additional chart options for the generated SVG representation. For
|
|
2251
|
-
* collections like `xAxis`, `yAxis` or `series`, the additional
|
|
2252
|
-
* options is either merged in to the original item of the same
|
|
2253
|
-
* `id`, or to the first item if a common id is not found.
|
|
2254
|
-
*
|
|
2255
|
-
* @return {string}
|
|
2256
|
-
* The SVG representation of the rendered chart.
|
|
2257
|
-
*
|
|
2258
|
-
* @emits Highcharts.Chart#event:getSVG
|
|
2259
|
-
*
|
|
2260
|
-
* @requires modules/exporting
|
|
2261
|
-
*/
|
|
2262
|
-
function getSVG(chartOptions) {
|
|
2263
|
-
const chart = this;
|
|
2264
|
-
let svg, seriesOptions,
|
|
2265
|
-
// Copy the options and add extra options
|
|
2266
|
-
options = merge(chart.options, chartOptions);
|
|
2267
|
-
// Use userOptions to make the options chain in series right (#3881)
|
|
2268
|
-
options.plotOptions = merge(chart.userOptions.plotOptions, chartOptions && chartOptions.plotOptions);
|
|
2269
|
-
// ... and likewise with time, avoid that undefined time properties are
|
|
2270
|
-
// merged over legacy global time options
|
|
2271
|
-
options.time = merge(chart.userOptions.time, chartOptions && chartOptions.time);
|
|
2272
|
-
// Create a sandbox where a new chart will be generated
|
|
2273
|
-
const sandbox = createElement('div', null, {
|
|
2274
|
-
position: 'absolute',
|
|
2275
|
-
top: '-9999em',
|
|
2276
|
-
width: chart.chartWidth + 'px',
|
|
2277
|
-
height: chart.chartHeight + 'px'
|
|
2278
|
-
}, Exporting_doc.body);
|
|
2279
|
-
// Get the source size
|
|
2280
|
-
const cssWidth = chart.renderTo.style.width, cssHeight = chart.renderTo.style.height, sourceWidth = options.exporting.sourceWidth ||
|
|
2281
|
-
options.chart.width ||
|
|
2282
|
-
(/px$/.test(cssWidth) && parseInt(cssWidth, 10)) ||
|
|
2283
|
-
(options.isGantt ? 800 : 600), sourceHeight = options.exporting.sourceHeight ||
|
|
2284
|
-
options.chart.height ||
|
|
2285
|
-
(/px$/.test(cssHeight) && parseInt(cssHeight, 10)) ||
|
|
2286
|
-
400;
|
|
2287
|
-
// Override some options
|
|
2288
|
-
extend(options.chart, {
|
|
2289
|
-
animation: false,
|
|
2290
|
-
renderTo: sandbox,
|
|
2291
|
-
forExport: true,
|
|
2292
|
-
renderer: 'SVGRenderer',
|
|
2293
|
-
width: sourceWidth,
|
|
2294
|
-
height: sourceHeight
|
|
2295
|
-
});
|
|
2296
|
-
options.exporting.enabled = false; // Hide buttons in print
|
|
2297
|
-
delete options.data; // #3004
|
|
2298
|
-
// prepare for replicating the chart
|
|
2299
|
-
options.series = [];
|
|
2300
|
-
chart.series.forEach(function (serie) {
|
|
2301
|
-
seriesOptions = merge(serie.userOptions, {
|
|
2302
|
-
animation: false, // Turn off animation
|
|
2303
|
-
enableMouseTracking: false,
|
|
2304
|
-
showCheckbox: false,
|
|
2305
|
-
visible: serie.visible
|
|
2306
|
-
});
|
|
2307
|
-
// Used for the navigator series that has its own option set
|
|
2308
|
-
if (!seriesOptions.isInternal) {
|
|
2309
|
-
options.series.push(seriesOptions);
|
|
2310
|
-
}
|
|
2311
|
-
});
|
|
2312
|
-
const colls = {};
|
|
2313
|
-
chart.axes.forEach(function (axis) {
|
|
2314
|
-
// Assign an internal key to ensure a one-to-one mapping (#5924)
|
|
2315
|
-
if (!axis.userOptions.internalKey) { // #6444
|
|
2316
|
-
axis.userOptions.internalKey = uniqueKey();
|
|
2317
|
-
}
|
|
2318
|
-
if (!axis.options.isInternal) {
|
|
2319
|
-
if (!colls[axis.coll]) {
|
|
2320
|
-
colls[axis.coll] = true;
|
|
2321
|
-
options[axis.coll] = [];
|
|
2322
|
-
}
|
|
2323
|
-
options[axis.coll].push(merge(axis.userOptions, {
|
|
2324
|
-
visible: axis.visible,
|
|
2325
|
-
// Force some options that could have be set directly on
|
|
2326
|
-
// the axis while missing in the userOptions or options.
|
|
2327
|
-
type: axis.type,
|
|
2328
|
-
uniqueNames: axis.uniqueNames
|
|
2329
|
-
}));
|
|
2330
|
-
}
|
|
2331
|
-
});
|
|
2332
|
-
// Make sure the `colorAxis` object of the `defaultOptions` isn't used
|
|
2333
|
-
// in the chart copy's user options, because a color axis should only be
|
|
2334
|
-
// added when the user actually applies it.
|
|
2335
|
-
options.colorAxis = chart.userOptions.colorAxis;
|
|
2336
|
-
// Generate the chart copy
|
|
2337
|
-
const chartCopy = new chart.constructor(options, chart.callback);
|
|
2338
|
-
// Axis options and series options (#2022, #3900, #5982)
|
|
2339
|
-
if (chartOptions) {
|
|
2340
|
-
['xAxis', 'yAxis', 'series'].forEach(function (coll) {
|
|
2341
|
-
const collOptions = {};
|
|
2342
|
-
if (chartOptions[coll]) {
|
|
2343
|
-
collOptions[coll] = chartOptions[coll];
|
|
2344
|
-
chartCopy.update(collOptions);
|
|
2345
|
-
}
|
|
2346
|
-
});
|
|
2347
|
-
}
|
|
2348
|
-
// Reflect axis extremes in the export (#5924)
|
|
2349
|
-
chart.axes.forEach(function (axis) {
|
|
2350
|
-
const axisCopy = find(chartCopy.axes, (copy) => copy.options.internalKey === axis.userOptions.internalKey);
|
|
2351
|
-
if (axisCopy) {
|
|
2352
|
-
const extremes = axis.getExtremes(),
|
|
2353
|
-
// Make sure min and max overrides in the
|
|
2354
|
-
// `exporting.chartOptions.xAxis` settings are reflected.
|
|
2355
|
-
// These should override user-set extremes via zooming,
|
|
2356
|
-
// scrollbar etc (#7873).
|
|
2357
|
-
exportOverride = splat(chartOptions?.[axis.coll] || {})[0], userMin = 'min' in exportOverride ?
|
|
2358
|
-
exportOverride.min :
|
|
2359
|
-
extremes.userMin, userMax = 'max' in exportOverride ?
|
|
2360
|
-
exportOverride.max :
|
|
2361
|
-
extremes.userMax;
|
|
2362
|
-
if (((typeof userMin !== 'undefined' &&
|
|
2363
|
-
userMin !== axisCopy.min) || (typeof userMax !== 'undefined' &&
|
|
2364
|
-
userMax !== axisCopy.max))) {
|
|
2365
|
-
axisCopy.setExtremes(userMin ?? void 0, userMax ?? void 0, true, false);
|
|
2366
|
-
}
|
|
2367
|
-
}
|
|
2368
|
-
});
|
|
2369
|
-
// Get the SVG from the container's innerHTML
|
|
2370
|
-
svg = chartCopy.getChartHTML(chart.styledMode ||
|
|
2371
|
-
options.exporting?.applyStyleSheets);
|
|
2372
|
-
Exporting_fireEvent(this, 'getSVG', { chartCopy: chartCopy });
|
|
2373
|
-
svg = chart.sanitizeSVG(svg, options);
|
|
2374
|
-
// Free up memory
|
|
2375
|
-
options = null;
|
|
2376
|
-
chartCopy.destroy();
|
|
2377
|
-
discardElement(sandbox);
|
|
2378
|
-
return svg;
|
|
2379
|
-
}
|
|
2380
|
-
/**
|
|
2381
|
-
* @private
|
|
2382
|
-
* @function Highcharts.Chart#getSVGForExport
|
|
2383
|
-
*/
|
|
2384
|
-
function getSVGForExport(options, chartOptions) {
|
|
2385
|
-
const chartExportingOptions = this.options.exporting;
|
|
2386
|
-
return this.getSVG(merge({ chart: { borderRadius: 0 } }, chartExportingOptions.chartOptions, chartOptions, {
|
|
2387
|
-
exporting: {
|
|
2388
|
-
sourceWidth: ((options && options.sourceWidth) ||
|
|
2389
|
-
chartExportingOptions.sourceWidth),
|
|
2390
|
-
sourceHeight: ((options && options.sourceHeight) ||
|
|
2391
|
-
chartExportingOptions.sourceHeight)
|
|
2392
|
-
}
|
|
2393
|
-
}));
|
|
2394
|
-
}
|
|
2395
|
-
/**
|
|
2396
|
-
* Make hyphenated property names out of camelCase
|
|
2397
|
-
* @private
|
|
2398
|
-
* @param {string} prop
|
|
2399
|
-
* Property name in camelCase
|
|
2400
|
-
* @return {string}
|
|
2401
|
-
* Hyphenated property name
|
|
2402
|
-
*/
|
|
2403
|
-
function hyphenate(prop) {
|
|
2404
|
-
return prop.replace(/[A-Z]/g, function (match) {
|
|
2405
|
-
return '-' + match.toLowerCase();
|
|
2406
|
-
});
|
|
2407
|
-
}
|
|
2408
|
-
/**
|
|
2409
|
-
* Analyze inherited styles from stylesheets and add them inline
|
|
2410
|
-
*
|
|
2411
|
-
* @private
|
|
2412
|
-
* @function Highcharts.Chart#inlineStyles
|
|
2413
|
-
*
|
|
2414
|
-
* @todo What are the border styles for text about? In general, text has a
|
|
2415
|
-
* lot of properties.
|
|
2416
|
-
*
|
|
2417
|
-
* @todo Make it work with IE9 and IE10.
|
|
2418
|
-
*
|
|
2419
|
-
* @requires modules/exporting
|
|
2420
|
-
*/
|
|
2421
|
-
function inlineStyles() {
|
|
2422
|
-
const denylist = inlineDenylist, allowlist = Exporting.inlineAllowlist, // For IE
|
|
2423
|
-
defaultStyles = {};
|
|
2424
|
-
let dummySVG;
|
|
2425
|
-
// Create an iframe where we read default styles without pollution from
|
|
2426
|
-
// this body
|
|
2427
|
-
const iframe = Exporting_doc.createElement('iframe');
|
|
2428
|
-
css(iframe, {
|
|
2429
|
-
width: '1px',
|
|
2430
|
-
height: '1px',
|
|
2431
|
-
visibility: 'hidden'
|
|
2432
|
-
});
|
|
2433
|
-
Exporting_doc.body.appendChild(iframe);
|
|
2434
|
-
const iframeDoc = (iframe.contentWindow && iframe.contentWindow.document);
|
|
2435
|
-
if (iframeDoc) {
|
|
2436
|
-
iframeDoc.body.appendChild(iframeDoc.createElementNS(SVG_NS, 'svg'));
|
|
2437
|
-
}
|
|
2438
|
-
/**
|
|
2439
|
-
* Call this on all elements and recurse to children
|
|
2440
|
-
* @private
|
|
2441
|
-
* @param {Highcharts.HTMLDOMElement} node
|
|
2442
|
-
* Element child
|
|
2443
|
-
*/
|
|
2444
|
-
function recurse(node) {
|
|
2445
|
-
const filteredStyles = {};
|
|
2446
|
-
let styles, parentStyles, dummy, denylisted, allowlisted, i;
|
|
2447
|
-
/**
|
|
2448
|
-
* Check computed styles and whether they are in the allow/denylist
|
|
2449
|
-
* for styles or attributes.
|
|
2450
|
-
* @private
|
|
2451
|
-
* @param {string} val
|
|
2452
|
-
* Style value
|
|
2453
|
-
* @param {string} prop
|
|
2454
|
-
* Style property name
|
|
2455
|
-
*/
|
|
2456
|
-
function filterStyles(val, prop) {
|
|
2457
|
-
// Check against allowlist & denylist
|
|
2458
|
-
denylisted = allowlisted = false;
|
|
2459
|
-
if (allowlist.length) {
|
|
2460
|
-
// Styled mode in IE has a allowlist instead. Exclude all
|
|
2461
|
-
// props not in this list.
|
|
2462
|
-
i = allowlist.length;
|
|
2463
|
-
while (i-- && !allowlisted) {
|
|
2464
|
-
allowlisted = allowlist[i].test(prop);
|
|
2465
|
-
}
|
|
2466
|
-
denylisted = !allowlisted;
|
|
2467
|
-
}
|
|
2468
|
-
// Explicitly remove empty transforms
|
|
2469
|
-
if (prop === 'transform' && val === 'none') {
|
|
2470
|
-
denylisted = true;
|
|
2471
|
-
}
|
|
2472
|
-
i = denylist.length;
|
|
2473
|
-
while (i-- && !denylisted) {
|
|
2474
|
-
if (prop.length > 1000 /* RegexLimits.shortLimit */) {
|
|
2475
|
-
throw new Error('Input too long');
|
|
2476
|
-
}
|
|
2477
|
-
denylisted = (denylist[i].test(prop) ||
|
|
2478
|
-
typeof val === 'function');
|
|
2479
|
-
}
|
|
2480
|
-
if (!denylisted) {
|
|
2481
|
-
// If parent node has the same style, it gets inherited, no
|
|
2482
|
-
// need to inline it. Top-level props should be diffed
|
|
2483
|
-
// against parent (#7687).
|
|
2484
|
-
if ((parentStyles[prop] !== val ||
|
|
2485
|
-
node.nodeName === 'svg') &&
|
|
2486
|
-
defaultStyles[node.nodeName][prop] !== val) {
|
|
2487
|
-
// Attributes
|
|
2488
|
-
if (!inlineToAttributes ||
|
|
2489
|
-
inlineToAttributes.indexOf(prop) !== -1) {
|
|
2490
|
-
if (val) {
|
|
2491
|
-
node.setAttribute(hyphenate(prop), val);
|
|
2492
|
-
}
|
|
2493
|
-
// Styles
|
|
2494
|
-
}
|
|
2495
|
-
else {
|
|
2496
|
-
filteredStyles[prop] = val;
|
|
2497
|
-
}
|
|
2498
|
-
}
|
|
2499
|
-
}
|
|
2500
|
-
}
|
|
2501
|
-
if (iframeDoc &&
|
|
2502
|
-
node.nodeType === 1 &&
|
|
2503
|
-
unstyledElements.indexOf(node.nodeName) === -1) {
|
|
2504
|
-
styles = Exporting_win.getComputedStyle(node, null);
|
|
2505
|
-
parentStyles = node.nodeName === 'svg' ?
|
|
2506
|
-
{} :
|
|
2507
|
-
Exporting_win.getComputedStyle(node.parentNode, null);
|
|
2508
|
-
// Get default styles from the browser so that we don't have to
|
|
2509
|
-
// add these
|
|
2510
|
-
if (!defaultStyles[node.nodeName]) {
|
|
2511
|
-
/*
|
|
2512
|
-
If (!dummySVG) {
|
|
2513
|
-
dummySVG = doc.createElementNS(H.SVG_NS, 'svg');
|
|
2514
|
-
dummySVG.setAttribute('version', '1.1');
|
|
2515
|
-
doc.body.appendChild(dummySVG);
|
|
2516
|
-
}
|
|
2517
|
-
*/
|
|
2518
|
-
dummySVG = iframeDoc.getElementsByTagName('svg')[0];
|
|
2519
|
-
dummy = iframeDoc.createElementNS(node.namespaceURI, node.nodeName);
|
|
2520
|
-
dummySVG.appendChild(dummy);
|
|
2521
|
-
// Get the defaults into a standard object (simple merge
|
|
2522
|
-
// won't do)
|
|
2523
|
-
const s = Exporting_win.getComputedStyle(dummy, null), defaults = {};
|
|
2524
|
-
for (const key in s) {
|
|
2525
|
-
if (key.length < 1000 /* RegexLimits.shortLimit */ &&
|
|
2526
|
-
typeof s[key] === 'string' &&
|
|
2527
|
-
!/^\d+$/.test(key)) {
|
|
2528
|
-
defaults[key] = s[key];
|
|
2529
|
-
}
|
|
2530
|
-
}
|
|
2531
|
-
defaultStyles[node.nodeName] = defaults;
|
|
2532
|
-
// Remove default fill, otherwise text disappears when
|
|
2533
|
-
// exported
|
|
2534
|
-
if (node.nodeName === 'text') {
|
|
2535
|
-
delete defaultStyles.text.fill;
|
|
2536
|
-
}
|
|
2537
|
-
dummySVG.removeChild(dummy);
|
|
2538
|
-
}
|
|
2539
|
-
// Loop through all styles and add them inline if they are ok
|
|
2540
|
-
for (const p in styles) {
|
|
2541
|
-
if (
|
|
2542
|
-
// Some browsers put lots of styles on the prototype...
|
|
2543
|
-
(external_highcharts_src_js_default_default()).isFirefox ||
|
|
2544
|
-
(external_highcharts_src_js_default_default()).isMS ||
|
|
2545
|
-
(external_highcharts_src_js_default_default()).isSafari || // #16902
|
|
2546
|
-
// ... Chrome puts them on the instance
|
|
2547
|
-
Object.hasOwnProperty.call(styles, p)) {
|
|
2548
|
-
filterStyles(styles[p], p);
|
|
2549
|
-
}
|
|
2550
|
-
}
|
|
2551
|
-
// Apply styles
|
|
2552
|
-
css(node, filteredStyles);
|
|
2553
|
-
// Set default stroke width (needed at least for IE)
|
|
2554
|
-
if (node.nodeName === 'svg') {
|
|
2555
|
-
node.setAttribute('stroke-width', '1px');
|
|
2556
|
-
}
|
|
2557
|
-
if (node.nodeName === 'text') {
|
|
2558
|
-
return;
|
|
2559
|
-
}
|
|
2560
|
-
// Recurse
|
|
2561
|
-
[].forEach.call(node.children || node.childNodes, recurse);
|
|
2562
|
-
}
|
|
2563
|
-
}
|
|
2564
|
-
/**
|
|
2565
|
-
* Remove the dummy objects used to get defaults
|
|
2566
|
-
* @private
|
|
2567
|
-
*/
|
|
2568
|
-
function tearDown() {
|
|
2569
|
-
dummySVG.parentNode.removeChild(dummySVG);
|
|
2570
|
-
// Remove trash from DOM that stayed after each exporting
|
|
2571
|
-
iframe.parentNode.removeChild(iframe);
|
|
2572
|
-
}
|
|
2573
|
-
recurse(this.container.querySelector('svg'));
|
|
2574
|
-
tearDown();
|
|
2575
|
-
}
|
|
2576
|
-
/**
|
|
2577
|
-
* Resolve CSS variables into hex colors
|
|
2578
|
-
*/
|
|
2579
|
-
function resolveCSSVariables() {
|
|
2580
|
-
const svgElements = this.container.querySelectorAll('*'), colorAttributes = ['color', 'fill', 'stop-color', 'stroke'];
|
|
2581
|
-
Array.from(svgElements).forEach((element) => {
|
|
2582
|
-
colorAttributes.forEach((attr) => {
|
|
2583
|
-
const attrValue = element.getAttribute(attr);
|
|
2584
|
-
if (attrValue?.includes('var(')) {
|
|
2585
|
-
element.setAttribute(attr, getComputedStyle(element).getPropertyValue(attr));
|
|
2586
|
-
}
|
|
2587
|
-
});
|
|
2588
|
-
});
|
|
2589
|
-
}
|
|
2590
|
-
/**
|
|
2591
|
-
* Move the chart container(s) to another div.
|
|
2592
|
-
*
|
|
2593
|
-
* @function Highcharts#moveContainers
|
|
2594
|
-
*
|
|
2595
|
-
* @private
|
|
2596
|
-
*
|
|
2597
|
-
* @param {Highcharts.HTMLDOMElement} moveTo
|
|
2598
|
-
* Move target
|
|
2599
|
-
*/
|
|
2600
|
-
function moveContainers(moveTo) {
|
|
2601
|
-
const { scrollablePlotArea } = this;
|
|
2602
|
-
(
|
|
2603
|
-
// When scrollablePlotArea is active (#9533)
|
|
2604
|
-
scrollablePlotArea ?
|
|
2605
|
-
[
|
|
2606
|
-
scrollablePlotArea.fixedDiv,
|
|
2607
|
-
scrollablePlotArea.scrollingContainer
|
|
2608
|
-
] :
|
|
2609
|
-
[this.container]).forEach(function (div) {
|
|
2610
|
-
moveTo.appendChild(div);
|
|
2611
|
-
});
|
|
2612
|
-
}
|
|
2613
|
-
/**
|
|
2614
|
-
* Add update methods to handle chart.update and chart.exporting.update and
|
|
2615
|
-
* chart.navigation.update. These must be added to the chart instance rather
|
|
2616
|
-
* than the Chart prototype in order to use the chart instance inside the
|
|
2617
|
-
* update function.
|
|
2618
|
-
* @private
|
|
2619
|
-
*/
|
|
2620
|
-
function onChartInit() {
|
|
2621
|
-
const chart = this,
|
|
2622
|
-
/**
|
|
2623
|
-
* @private
|
|
2624
|
-
* @param {"exporting"|"navigation"} prop
|
|
2625
|
-
* Property name in option root
|
|
2626
|
-
* @param {Highcharts.ExportingOptions|Highcharts.NavigationOptions} options
|
|
2627
|
-
* Options to update
|
|
2628
|
-
* @param {boolean} [redraw=true]
|
|
2629
|
-
* Whether to redraw
|
|
2630
|
-
*/
|
|
2631
|
-
update = (prop, options, redraw) => {
|
|
2632
|
-
chart.isDirtyExporting = true;
|
|
2633
|
-
merge(true, chart.options[prop], options);
|
|
2634
|
-
if (pick(redraw, true)) {
|
|
2635
|
-
chart.redraw();
|
|
2636
|
-
}
|
|
2637
|
-
};
|
|
2638
|
-
chart.exporting = {
|
|
2639
|
-
update: function (options, redraw) {
|
|
2640
|
-
update('exporting', options, redraw);
|
|
2641
|
-
}
|
|
2642
|
-
};
|
|
2643
|
-
// Register update() method for navigation. Cannot be set the same way
|
|
2644
|
-
// as for exporting, because navigation options are shared with bindings
|
|
2645
|
-
// which has separate update() logic.
|
|
2646
|
-
Chart_ChartNavigationComposition
|
|
2647
|
-
.compose(chart).navigation
|
|
2648
|
-
.addUpdate((options, redraw) => {
|
|
2649
|
-
update('navigation', options, redraw);
|
|
2650
|
-
});
|
|
2651
|
-
}
|
|
2652
|
-
/**
|
|
2653
|
-
* On layout of titles (title, subtitle and caption), adjust the `alignTo``
|
|
2654
|
-
* box to avoid the context menu button.
|
|
2655
|
-
* @private
|
|
2656
|
-
*/
|
|
2657
|
-
function onChartLayOutTitle({ alignTo, key, textPxLength }) {
|
|
2658
|
-
const exportingOptions = this.options.exporting, { align, buttonSpacing = 0, verticalAlign, width = 0 } = merge(this.options.navigation?.buttonOptions, exportingOptions?.buttons?.contextButton), space = alignTo.width - textPxLength, widthAdjust = width + buttonSpacing;
|
|
2659
|
-
if ((exportingOptions?.enabled ?? true) &&
|
|
2660
|
-
key === 'title' &&
|
|
2661
|
-
align === 'right' &&
|
|
2662
|
-
verticalAlign === 'top') {
|
|
2663
|
-
if (space < 2 * widthAdjust) {
|
|
2664
|
-
if (space < widthAdjust) {
|
|
2665
|
-
alignTo.width -= widthAdjust;
|
|
2666
|
-
}
|
|
2667
|
-
else if (this.title?.alignValue !== 'left') {
|
|
2668
|
-
alignTo.x -= widthAdjust - space / 2;
|
|
2669
|
-
}
|
|
2670
|
-
}
|
|
2671
|
-
}
|
|
2672
|
-
}
|
|
2673
|
-
/**
|
|
2674
|
-
* Exporting module required. Clears away other elements in the page and
|
|
2675
|
-
* prints the chart as it is displayed. By default, when the exporting
|
|
2676
|
-
* module is enabled, a context button with a drop down menu in the upper
|
|
2677
|
-
* right corner accesses this function.
|
|
2678
|
-
*
|
|
2679
|
-
* @sample highcharts/members/chart-print/
|
|
2680
|
-
* Print from a HTML button
|
|
2681
|
-
*
|
|
2682
|
-
* @function Highcharts.Chart#print
|
|
2683
|
-
*
|
|
2684
|
-
*
|
|
2685
|
-
* @emits Highcharts.Chart#event:beforePrint
|
|
2686
|
-
* @emits Highcharts.Chart#event:afterPrint
|
|
2687
|
-
*
|
|
2688
|
-
* @requires modules/exporting
|
|
2689
|
-
*/
|
|
2690
|
-
function print() {
|
|
2691
|
-
const chart = this;
|
|
2692
|
-
if (chart.isPrinting) { // Block the button while in printing mode
|
|
2693
|
-
return;
|
|
2694
|
-
}
|
|
2695
|
-
printingChart = chart;
|
|
2696
|
-
if (!(external_highcharts_src_js_default_default()).isSafari) {
|
|
2697
|
-
chart.beforePrint();
|
|
2698
|
-
}
|
|
2699
|
-
// Give the browser time to draw WebGL content, an issue that randomly
|
|
2700
|
-
// appears (at least) in Chrome ~67 on the Mac (#8708).
|
|
2701
|
-
setTimeout(() => {
|
|
2702
|
-
Exporting_win.focus(); // #1510
|
|
2703
|
-
Exporting_win.print();
|
|
2704
|
-
// Allow the browser to prepare before reverting
|
|
2705
|
-
if (!(external_highcharts_src_js_default_default()).isSafari) {
|
|
2706
|
-
setTimeout(() => {
|
|
2707
|
-
chart.afterPrint();
|
|
2708
|
-
}, 1000);
|
|
2709
|
-
}
|
|
2710
|
-
}, 1);
|
|
2711
|
-
}
|
|
2712
|
-
/**
|
|
2713
|
-
* Add the buttons on chart load
|
|
2714
|
-
* @private
|
|
2715
|
-
* @function Highcharts.Chart#renderExporting
|
|
2716
|
-
* @requires modules/exporting
|
|
2717
|
-
*/
|
|
2718
|
-
function renderExporting() {
|
|
2719
|
-
const chart = this, exportingOptions = chart.options.exporting, buttons = exportingOptions.buttons, isDirty = chart.isDirtyExporting || !chart.exportSVGElements;
|
|
2720
|
-
chart.buttonOffset = 0;
|
|
2721
|
-
if (chart.isDirtyExporting) {
|
|
2722
|
-
chart.destroyExport();
|
|
2723
|
-
}
|
|
2724
|
-
if (isDirty && exportingOptions.enabled !== false) {
|
|
2725
|
-
chart.exportEvents = [];
|
|
2726
|
-
chart.exportingGroup = chart.exportingGroup ||
|
|
2727
|
-
chart.renderer.g('exporting-group').attr({
|
|
2728
|
-
zIndex: 3 // #4955, // #8392
|
|
2729
|
-
}).add();
|
|
2730
|
-
objectEach(buttons, function (button) {
|
|
2731
|
-
chart.addButton(button);
|
|
2732
|
-
});
|
|
2733
|
-
chart.isDirtyExporting = false;
|
|
153
|
+
throw new Error('Failed to convert to blob');
|
|
2734
154
|
}
|
|
2735
155
|
}
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
*/
|
|
2751
|
-
function sanitizeSVG(svg, options) {
|
|
2752
|
-
const split = svg.indexOf('</svg>') + 6, useForeignObject = svg.indexOf('<foreignObject') > -1;
|
|
2753
|
-
let html = svg.substr(split);
|
|
2754
|
-
// Remove any HTML added to the container after the SVG (#894, #9087)
|
|
2755
|
-
svg = svg.substr(0, split);
|
|
2756
|
-
if (useForeignObject) {
|
|
2757
|
-
// Some tags needs to be closed in xhtml (#13726)
|
|
2758
|
-
svg = svg.replace(/(<(?:img|br).*?(?=\>))>/g, '$1 />');
|
|
2759
|
-
// Move HTML into a foreignObject
|
|
156
|
+
// Try HTML5 download attr if supported
|
|
157
|
+
if (typeof a.download !== 'undefined') {
|
|
158
|
+
a.href = dataURL;
|
|
159
|
+
a.download = filename; // HTML5 download attribute
|
|
160
|
+
doc.body.appendChild(a);
|
|
161
|
+
a.click();
|
|
162
|
+
doc.body.removeChild(a);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
// No download attr, just opening data URI
|
|
166
|
+
try {
|
|
167
|
+
if (!win.open(dataURL, 'chart')) {
|
|
168
|
+
throw new Error('Failed to open window');
|
|
169
|
+
}
|
|
2760
170
|
}
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
'height="' + options.chart.height + '">' +
|
|
2765
|
-
'<body xmlns="http://www.w3.org/1999/xhtml">' +
|
|
2766
|
-
// Some tags needs to be closed in xhtml (#13726)
|
|
2767
|
-
html.replace(/(<(?:img|br).*?(?=\>))>/g, '$1 />') +
|
|
2768
|
-
'</body>' +
|
|
2769
|
-
'</foreignObject>';
|
|
2770
|
-
svg = svg.replace('</svg>', html + '</svg>');
|
|
171
|
+
catch {
|
|
172
|
+
// If window.open failed, try location.href
|
|
173
|
+
win.location.href = dataURL;
|
|
2771
174
|
}
|
|
2772
|
-
svg = svg
|
|
2773
|
-
.replace(/zIndex="[^"]+"/g, '')
|
|
2774
|
-
.replace(/symbolName="[^"]+"/g, '')
|
|
2775
|
-
.replace(/jQuery\d+="[^"]+"/g, '')
|
|
2776
|
-
.replace(/url\(("|")(.*?)("|")\;?\)/g, 'url($2)')
|
|
2777
|
-
.replace(/url\([^#]+#/g, 'url(#')
|
|
2778
|
-
.replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
|
|
2779
|
-
.replace(/ (NS\d+\:)?href=/g, ' xlink:href=') // #3567
|
|
2780
|
-
.replace(/\n+/g, ' ')
|
|
2781
|
-
// Replace HTML entities, issue #347
|
|
2782
|
-
.replace(/ /g, '\u00A0') // No-break space
|
|
2783
|
-
.replace(/­/g, '\u00AD'); // Soft hyphen
|
|
2784
|
-
return svg;
|
|
2785
175
|
}
|
|
2786
|
-
}
|
|
2787
|
-
/* *
|
|
2788
|
-
*
|
|
2789
|
-
* Default Export
|
|
2790
|
-
*
|
|
2791
|
-
* */
|
|
2792
|
-
/* harmony default export */ const Exporting_Exporting = (Exporting);
|
|
2793
|
-
/* *
|
|
2794
|
-
*
|
|
2795
|
-
* API Declarations
|
|
2796
|
-
*
|
|
2797
|
-
* */
|
|
2798
|
-
/**
|
|
2799
|
-
* Gets fired after a chart is printed through the context menu item or the
|
|
2800
|
-
* Chart.print method.
|
|
2801
|
-
*
|
|
2802
|
-
* @callback Highcharts.ExportingAfterPrintCallbackFunction
|
|
2803
|
-
*
|
|
2804
|
-
* @param {Highcharts.Chart} this
|
|
2805
|
-
* The chart on which the event occurred.
|
|
2806
|
-
*
|
|
2807
|
-
* @param {global.Event} event
|
|
2808
|
-
* The event that occurred.
|
|
2809
|
-
*/
|
|
2810
|
-
/**
|
|
2811
|
-
* Gets fired before a chart is printed through the context menu item or the
|
|
2812
|
-
* Chart.print method.
|
|
2813
|
-
*
|
|
2814
|
-
* @callback Highcharts.ExportingBeforePrintCallbackFunction
|
|
2815
|
-
*
|
|
2816
|
-
* @param {Highcharts.Chart} this
|
|
2817
|
-
* The chart on which the event occurred.
|
|
2818
|
-
*
|
|
2819
|
-
* @param {global.Event} event
|
|
2820
|
-
* The event that occurred.
|
|
2821
|
-
*/
|
|
2822
|
-
/**
|
|
2823
|
-
* Function to call if the offline-exporting module fails to export a chart on
|
|
2824
|
-
* the client side.
|
|
2825
|
-
*
|
|
2826
|
-
* @callback Highcharts.ExportingErrorCallbackFunction
|
|
2827
|
-
*
|
|
2828
|
-
* @param {Highcharts.ExportingOptions} options
|
|
2829
|
-
* The exporting options.
|
|
2830
|
-
*
|
|
2831
|
-
* @param {global.Error} err
|
|
2832
|
-
* The error from the module.
|
|
2833
|
-
*/
|
|
176
|
+
}
|
|
2834
177
|
/**
|
|
2835
|
-
*
|
|
178
|
+
* Asynchronously downloads a script from a provided location.
|
|
2836
179
|
*
|
|
2837
|
-
* @
|
|
2838
|
-
|
|
2839
|
-
* The text for the menu item.
|
|
2840
|
-
*
|
|
2841
|
-
* @name Highcharts.ExportingMenuObject#text
|
|
2842
|
-
* @type {string|undefined}
|
|
2843
|
-
*/ /**
|
|
2844
|
-
* If internationalization is required, the key to a language string.
|
|
2845
|
-
*
|
|
2846
|
-
* @name Highcharts.ExportingMenuObject#textKey
|
|
2847
|
-
* @type {string|undefined}
|
|
2848
|
-
*/ /**
|
|
2849
|
-
* The click handler for the menu item.
|
|
2850
|
-
*
|
|
2851
|
-
* @name Highcharts.ExportingMenuObject#onclick
|
|
2852
|
-
* @type {Highcharts.EventCallbackFunction<Highcharts.Chart>|undefined}
|
|
2853
|
-
*/ /**
|
|
2854
|
-
* Indicates a separator line instead of an item.
|
|
2855
|
-
*
|
|
2856
|
-
* @name Highcharts.ExportingMenuObject#separator
|
|
2857
|
-
* @type {boolean|undefined}
|
|
2858
|
-
*/
|
|
2859
|
-
/**
|
|
2860
|
-
* Possible MIME types for exporting.
|
|
180
|
+
* @private
|
|
181
|
+
* @function Highcharts.getScript
|
|
2861
182
|
*
|
|
2862
|
-
* @
|
|
183
|
+
* @param {string} scriptLocation
|
|
184
|
+
* The location for the script to fetch.
|
|
2863
185
|
*/
|
|
2864
|
-
(
|
|
186
|
+
function getScript(scriptLocation) {
|
|
187
|
+
return new Promise((resolve, reject) => {
|
|
188
|
+
const head = doc.getElementsByTagName('head')[0], script = doc.createElement('script');
|
|
189
|
+
// Set type and location for the script
|
|
190
|
+
script.type = 'text/javascript';
|
|
191
|
+
script.src = scriptLocation;
|
|
192
|
+
// Resolve in case of a succesful script fetching
|
|
193
|
+
script.onload = () => {
|
|
194
|
+
resolve();
|
|
195
|
+
};
|
|
196
|
+
// Reject in case of fail
|
|
197
|
+
script.onerror = () => {
|
|
198
|
+
reject(error(`Error loading script ${scriptLocation}`));
|
|
199
|
+
};
|
|
200
|
+
// Append the newly created script
|
|
201
|
+
head.appendChild(script);
|
|
202
|
+
});
|
|
203
|
+
}
|
|
2865
204
|
/* *
|
|
2866
205
|
*
|
|
2867
|
-
*
|
|
206
|
+
* Default Export
|
|
2868
207
|
*
|
|
2869
208
|
* */
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
*
|
|
2877
|
-
* @type {Highcharts.ExportingAfterPrintCallbackFunction}
|
|
2878
|
-
* @since 4.1.0
|
|
2879
|
-
* @context Highcharts.Chart
|
|
2880
|
-
* @requires modules/exporting
|
|
2881
|
-
* @apioption chart.events.afterPrint
|
|
2882
|
-
*/
|
|
2883
|
-
/**
|
|
2884
|
-
* Fires before a chart is printed through the context menu item or
|
|
2885
|
-
* the `Chart.print` method.
|
|
2886
|
-
*
|
|
2887
|
-
* @sample highcharts/chart/events-beforeprint-afterprint/
|
|
2888
|
-
* Rescale the chart to print
|
|
2889
|
-
*
|
|
2890
|
-
* @type {Highcharts.ExportingBeforePrintCallbackFunction}
|
|
2891
|
-
* @since 4.1.0
|
|
2892
|
-
* @context Highcharts.Chart
|
|
2893
|
-
* @requires modules/exporting
|
|
2894
|
-
* @apioption chart.events.beforePrint
|
|
2895
|
-
*/
|
|
2896
|
-
(''); // Keeps doclets above in transpiled file
|
|
209
|
+
const DownloadURL = {
|
|
210
|
+
dataURLtoBlob,
|
|
211
|
+
downloadURL,
|
|
212
|
+
getScript
|
|
213
|
+
};
|
|
214
|
+
/* harmony default export */ const Extensions_DownloadURL = (DownloadURL);
|
|
2897
215
|
|
|
216
|
+
;// external ["../highcharts.src.js","default","AST"]
|
|
217
|
+
const external_highcharts_src_js_default_AST_namespaceObject = __WEBPACK_EXTERNAL_MODULE__highcharts_src_js_8202131d__["default"].AST;
|
|
218
|
+
var external_highcharts_src_js_default_AST_default = /*#__PURE__*/__webpack_require__.n(external_highcharts_src_js_default_AST_namespaceObject);
|
|
219
|
+
;// external ["../highcharts.src.js","default","Chart"]
|
|
220
|
+
const external_highcharts_src_js_default_Chart_namespaceObject = __WEBPACK_EXTERNAL_MODULE__highcharts_src_js_8202131d__["default"].Chart;
|
|
221
|
+
var external_highcharts_src_js_default_Chart_default = /*#__PURE__*/__webpack_require__.n(external_highcharts_src_js_default_Chart_namespaceObject);
|
|
2898
222
|
;// ./code/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js
|
|
2899
223
|
/* *
|
|
2900
224
|
*
|
|
@@ -2908,51 +232,22 @@ var Exporting;
|
|
|
2908
232
|
|
|
2909
233
|
/* *
|
|
2910
234
|
*
|
|
2911
|
-
*
|
|
235
|
+
* API Options
|
|
2912
236
|
*
|
|
2913
237
|
* */
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
downloadPNG: {
|
|
2920
|
-
textKey: 'downloadPNG',
|
|
2921
|
-
onclick: function () {
|
|
2922
|
-
this.exportChartLocal();
|
|
2923
|
-
}
|
|
2924
|
-
},
|
|
2925
|
-
downloadJPEG: {
|
|
2926
|
-
textKey: 'downloadJPEG',
|
|
2927
|
-
onclick: function () {
|
|
2928
|
-
this.exportChartLocal({
|
|
2929
|
-
type: 'image/jpeg'
|
|
2930
|
-
});
|
|
2931
|
-
}
|
|
2932
|
-
},
|
|
2933
|
-
downloadSVG: {
|
|
2934
|
-
textKey: 'downloadSVG',
|
|
2935
|
-
onclick: function () {
|
|
2936
|
-
this.exportChartLocal({
|
|
2937
|
-
type: 'image/svg+xml'
|
|
2938
|
-
});
|
|
2939
|
-
}
|
|
2940
|
-
},
|
|
2941
|
-
downloadPDF: {
|
|
2942
|
-
textKey: 'downloadPDF',
|
|
2943
|
-
onclick: function () {
|
|
2944
|
-
this.exportChartLocal({
|
|
2945
|
-
type: 'application/pdf'
|
|
2946
|
-
});
|
|
2947
|
-
}
|
|
2948
|
-
}
|
|
2949
|
-
}
|
|
2950
|
-
};
|
|
238
|
+
/**
|
|
239
|
+
* @optionparent exporting
|
|
240
|
+
* @private
|
|
241
|
+
*/
|
|
242
|
+
const exporting = {};
|
|
2951
243
|
/* *
|
|
2952
244
|
*
|
|
2953
245
|
* Default Export
|
|
2954
246
|
*
|
|
2955
247
|
* */
|
|
248
|
+
const OfflineExportingDefaults = {
|
|
249
|
+
exporting
|
|
250
|
+
};
|
|
2956
251
|
/* harmony default export */ const OfflineExporting_OfflineExportingDefaults = (OfflineExportingDefaults);
|
|
2957
252
|
|
|
2958
253
|
;// ./code/es-modules/Extensions/OfflineExporting/OfflineExporting.js
|
|
@@ -2971,19 +266,14 @@ const OfflineExportingDefaults = {
|
|
|
2971
266
|
|
|
2972
267
|
|
|
2973
268
|
|
|
2974
|
-
const {
|
|
2975
|
-
|
|
2976
|
-
const { downloadURL: OfflineExporting_downloadURL } = Extensions_DownloadURL;
|
|
2977
|
-
|
|
269
|
+
const { getOptions, setOptions } = (external_highcharts_src_js_default_default());
|
|
2978
270
|
|
|
2979
|
-
const {
|
|
271
|
+
const { downloadURL: OfflineExporting_downloadURL, getScript: OfflineExporting_getScript } = Extensions_DownloadURL;
|
|
2980
272
|
|
|
2981
|
-
const {
|
|
273
|
+
const { composed, doc: OfflineExporting_doc, win: OfflineExporting_win } = (external_highcharts_src_js_default_default());
|
|
2982
274
|
|
|
2983
275
|
|
|
2984
|
-
const { addEvent
|
|
2985
|
-
external_highcharts_src_js_default_AST_default().allowedAttributes.push('data-z-index', 'fill-opacity', 'filter', 'rx', 'ry', 'stroke-dasharray', 'stroke-linejoin', 'stroke-opacity', 'text-anchor', 'transform', 'version', 'viewBox', 'visibility', 'xmlns', 'xmlns:xlink');
|
|
2986
|
-
external_highcharts_src_js_default_AST_default().allowedTags.push('desc', 'clippath', 'g');
|
|
276
|
+
const { addEvent, extend, pushUnique } = (external_highcharts_src_js_default_default());
|
|
2987
277
|
/* *
|
|
2988
278
|
*
|
|
2989
279
|
* Composition
|
|
@@ -2991,39 +281,72 @@ external_highcharts_src_js_default_AST_default().allowedTags.push('desc', 'clipp
|
|
|
2991
281
|
* */
|
|
2992
282
|
var OfflineExporting;
|
|
2993
283
|
(function (OfflineExporting) {
|
|
2994
|
-
/* *
|
|
2995
|
-
*
|
|
2996
|
-
* Declarations
|
|
2997
|
-
*
|
|
2998
|
-
* */
|
|
2999
|
-
/* *
|
|
3000
|
-
*
|
|
3001
|
-
* Constants
|
|
3002
|
-
*
|
|
3003
|
-
* */
|
|
3004
|
-
// Dummy object so we can reuse our canvas-tools.js without errors
|
|
3005
|
-
OfflineExporting.CanVGRenderer = {}, OfflineExporting.domurl = OfflineExporting_win.URL || OfflineExporting_win.webkitURL || OfflineExporting_win,
|
|
3006
|
-
// Milliseconds to defer image load event handlers to offset IE bug
|
|
3007
|
-
OfflineExporting.loadEventDeferDelay = (external_highcharts_src_js_default_default()).isMS ? 150 : 0;
|
|
3008
284
|
/* *
|
|
3009
285
|
*
|
|
3010
286
|
* Functions
|
|
3011
287
|
*
|
|
3012
288
|
* */
|
|
3013
|
-
/* eslint-disable valid-jsdoc */
|
|
3014
289
|
/**
|
|
3015
|
-
*
|
|
290
|
+
* Composition function.
|
|
291
|
+
*
|
|
3016
292
|
* @private
|
|
293
|
+
* @function compose
|
|
294
|
+
*
|
|
295
|
+
* @param {ExportingClass} ExportingClass
|
|
296
|
+
* Exporting class.
|
|
297
|
+
*
|
|
298
|
+
* @requires modules/exporting
|
|
299
|
+
* @requires modules/offline-exporting
|
|
3017
300
|
*/
|
|
3018
|
-
function compose(
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
301
|
+
function compose(ExportingClass) {
|
|
302
|
+
// Add the downloadSVG event to the Exporting class for local PDF export
|
|
303
|
+
addEvent(ExportingClass, 'downloadSVG', async function (e) {
|
|
304
|
+
const { svg, exportingOptions, exporting, preventDefault } = e;
|
|
305
|
+
// Check if PDF export is requested
|
|
306
|
+
if (exportingOptions?.type === 'application/pdf') {
|
|
307
|
+
// Prevent the default export behavior
|
|
308
|
+
preventDefault?.();
|
|
309
|
+
// Run the PDF local export
|
|
310
|
+
try {
|
|
311
|
+
// Get the final image options
|
|
312
|
+
const { type, filename, scale, libURL } = external_highcharts_src_js_default_default().Exporting.prepareImageOptions(exportingOptions);
|
|
313
|
+
// Local PDF download
|
|
314
|
+
if (type === 'application/pdf') {
|
|
315
|
+
// Must load pdf libraries first if not found. Don't
|
|
316
|
+
// destroy the object URL yet since we are doing
|
|
317
|
+
// things asynchronously
|
|
318
|
+
if (!OfflineExporting_win.jspdf?.jsPDF) {
|
|
319
|
+
// Get jspdf
|
|
320
|
+
await OfflineExporting_getScript(`${libURL}jspdf.js`);
|
|
321
|
+
// Get svg2pdf
|
|
322
|
+
await OfflineExporting_getScript(`${libURL}svg2pdf.js`);
|
|
323
|
+
}
|
|
324
|
+
// Call the PDF download if SVG element found
|
|
325
|
+
await downloadPDF(svg, scale, filename, exportingOptions?.pdfFont);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
catch (error) {
|
|
329
|
+
// Try to fallback to the server
|
|
330
|
+
await exporting?.fallbackToServer(exportingOptions, error);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
// Check the composition registry for the OfflineExporting
|
|
335
|
+
if (!pushUnique(composed, 'OfflineExporting')) {
|
|
336
|
+
return;
|
|
3025
337
|
}
|
|
3026
|
-
|
|
338
|
+
// Adding wrappers for the deprecated functions
|
|
339
|
+
extend((external_highcharts_src_js_default_Chart_default()).prototype, {
|
|
340
|
+
exportChartLocal: async function (exportingOptions, chartOptions) {
|
|
341
|
+
await this.exporting?.exportChart(exportingOptions, chartOptions);
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
// Update with defaults of the offline exporting module
|
|
346
|
+
setOptions(OfflineExporting_OfflineExportingDefaults);
|
|
347
|
+
// Additionaly, extend the menuItems with the offline exporting variants
|
|
348
|
+
const menuItems = getOptions().exporting?.buttons?.contextButton?.menuItems;
|
|
349
|
+
menuItems && menuItems.push('downloadPDF');
|
|
3027
350
|
}
|
|
3028
351
|
OfflineExporting.compose = compose;
|
|
3029
352
|
/**
|
|
@@ -3041,6 +364,7 @@ var OfflineExporting;
|
|
|
3041
364
|
* Highcharts options pointing to our server.
|
|
3042
365
|
*
|
|
3043
366
|
* @function Highcharts.downloadSVGLocal
|
|
367
|
+
* @deprecated
|
|
3044
368
|
*
|
|
3045
369
|
* @param {string} svg
|
|
3046
370
|
* The generated SVG
|
|
@@ -3048,586 +372,234 @@ var OfflineExporting;
|
|
|
3048
372
|
* @param {Highcharts.ExportingOptions} options
|
|
3049
373
|
* The exporting options
|
|
3050
374
|
*
|
|
3051
|
-
* @param {Function} failCallback
|
|
3052
|
-
* The callback function in case of errors
|
|
3053
|
-
*
|
|
3054
|
-
* @param {Function} [successCallback]
|
|
3055
|
-
* The callback function in case of success
|
|
3056
|
-
*
|
|
3057
375
|
*/
|
|
3058
|
-
function downloadSVGLocal(svg, options
|
|
3059
|
-
|
|
3060
|
-
'.' +
|
|
3061
|
-
(imageType === 'image/svg+xml' ?
|
|
3062
|
-
'svg' : imageType.split('/')[1])), scale = options.scale || 1;
|
|
3063
|
-
let svgurl, blob, finallyHandler, libURL = (options.libURL || OfflineExporting_defaultOptions.exporting.libURL), objectURLRevoke = true, pdfFont = options.pdfFont;
|
|
3064
|
-
// Allow libURL to end with or without fordward slash
|
|
3065
|
-
libURL = libURL.slice(-1) !== '/' ? libURL + '/' : libURL;
|
|
3066
|
-
/*
|
|
3067
|
-
* Detect if we need to load TTF fonts for the PDF, then load them and
|
|
3068
|
-
* proceed.
|
|
3069
|
-
*
|
|
3070
|
-
* @private
|
|
3071
|
-
*/
|
|
3072
|
-
const loadPdfFonts = (svgElement, callback) => {
|
|
3073
|
-
const hasNonASCII = (s) => (
|
|
3074
|
-
// eslint-disable-next-line no-control-regex
|
|
3075
|
-
/[^\u0000-\u007F\u200B]+/.test(s));
|
|
3076
|
-
// Register an event in order to add the font once jsPDF is
|
|
3077
|
-
// initialized
|
|
3078
|
-
const addFont = (variant, base64) => {
|
|
3079
|
-
OfflineExporting_win.jspdf.jsPDF.API.events.push([
|
|
3080
|
-
'initialized',
|
|
3081
|
-
function () {
|
|
3082
|
-
this.addFileToVFS(variant, base64);
|
|
3083
|
-
this.addFont(variant, 'HighchartsFont', variant);
|
|
3084
|
-
if (!this.getFontList().HighchartsFont) {
|
|
3085
|
-
this.setFont('HighchartsFont');
|
|
3086
|
-
}
|
|
3087
|
-
}
|
|
3088
|
-
]);
|
|
3089
|
-
};
|
|
3090
|
-
// If there are no non-ASCII characters in the SVG, do not use
|
|
3091
|
-
// bother downloading the font files
|
|
3092
|
-
if (pdfFont && !hasNonASCII(svgElement.textContent || '')) {
|
|
3093
|
-
pdfFont = void 0;
|
|
3094
|
-
}
|
|
3095
|
-
// Add new font if the URL is declared, #6417.
|
|
3096
|
-
const variants = ['normal', 'italic', 'bold', 'bolditalic'];
|
|
3097
|
-
// Shift the first element off the variants and add as a font.
|
|
3098
|
-
// Then asynchronously trigger the next variant until calling the
|
|
3099
|
-
// callback when the variants are empty.
|
|
3100
|
-
let normalBase64;
|
|
3101
|
-
const shiftAndLoadVariant = () => {
|
|
3102
|
-
const variant = variants.shift();
|
|
3103
|
-
// All variants shifted and possibly loaded, proceed
|
|
3104
|
-
if (!variant) {
|
|
3105
|
-
return callback();
|
|
3106
|
-
}
|
|
3107
|
-
const url = pdfFont && pdfFont[variant];
|
|
3108
|
-
if (url) {
|
|
3109
|
-
ajax({
|
|
3110
|
-
url,
|
|
3111
|
-
responseType: 'blob',
|
|
3112
|
-
success: (data, xhr) => {
|
|
3113
|
-
const reader = new FileReader();
|
|
3114
|
-
reader.onloadend = function () {
|
|
3115
|
-
if (typeof this.result === 'string') {
|
|
3116
|
-
const base64 = this.result.split(',')[1];
|
|
3117
|
-
addFont(variant, base64);
|
|
3118
|
-
if (variant === 'normal') {
|
|
3119
|
-
normalBase64 = base64;
|
|
3120
|
-
}
|
|
3121
|
-
}
|
|
3122
|
-
shiftAndLoadVariant();
|
|
3123
|
-
};
|
|
3124
|
-
reader.readAsDataURL(xhr.response);
|
|
3125
|
-
},
|
|
3126
|
-
error: shiftAndLoadVariant
|
|
3127
|
-
});
|
|
3128
|
-
}
|
|
3129
|
-
else {
|
|
3130
|
-
// For other variants, fall back to normal text weight/style
|
|
3131
|
-
if (normalBase64) {
|
|
3132
|
-
addFont(variant, normalBase64);
|
|
3133
|
-
}
|
|
3134
|
-
shiftAndLoadVariant();
|
|
3135
|
-
}
|
|
3136
|
-
};
|
|
3137
|
-
shiftAndLoadVariant();
|
|
3138
|
-
};
|
|
3139
|
-
/*
|
|
3140
|
-
* @private
|
|
3141
|
-
*/
|
|
3142
|
-
const downloadPDF = () => {
|
|
3143
|
-
external_highcharts_src_js_default_AST_default().setElementHTML(dummySVGContainer, svg);
|
|
3144
|
-
const textElements = dummySVGContainer.getElementsByTagName('text'),
|
|
3145
|
-
// Copy style property to element from parents if it's not
|
|
3146
|
-
// there. Searches up hierarchy until it finds prop, or hits the
|
|
3147
|
-
// chart container.
|
|
3148
|
-
setStylePropertyFromParents = function (el, propName) {
|
|
3149
|
-
let curParent = el;
|
|
3150
|
-
while (curParent && curParent !== dummySVGContainer) {
|
|
3151
|
-
if (curParent.style[propName]) {
|
|
3152
|
-
let value = curParent.style[propName];
|
|
3153
|
-
if (propName === 'fontSize' && /em$/.test(value)) {
|
|
3154
|
-
value = Math.round(parseFloat(value) * 16) + 'px';
|
|
3155
|
-
}
|
|
3156
|
-
el.style[propName] = value;
|
|
3157
|
-
break;
|
|
3158
|
-
}
|
|
3159
|
-
curParent = curParent.parentNode;
|
|
3160
|
-
}
|
|
3161
|
-
};
|
|
3162
|
-
let titleElements, outlineElements;
|
|
3163
|
-
// Workaround for the text styling. Making sure it does pick up
|
|
3164
|
-
// settings for parent elements.
|
|
3165
|
-
[].forEach.call(textElements, function (el) {
|
|
3166
|
-
// Workaround for the text styling. making sure it does pick up
|
|
3167
|
-
// the root element
|
|
3168
|
-
['fontFamily', 'fontSize']
|
|
3169
|
-
.forEach((property) => {
|
|
3170
|
-
setStylePropertyFromParents(el, property);
|
|
3171
|
-
});
|
|
3172
|
-
el.style.fontFamily = pdfFont && pdfFont.normal ?
|
|
3173
|
-
// Custom PDF font
|
|
3174
|
-
'HighchartsFont' :
|
|
3175
|
-
// Generic font (serif, sans-serif etc)
|
|
3176
|
-
String(el.style.fontFamily &&
|
|
3177
|
-
el.style.fontFamily.split(' ').splice(-1));
|
|
3178
|
-
// Workaround for plotband with width, removing title from text
|
|
3179
|
-
// nodes
|
|
3180
|
-
titleElements = el.getElementsByTagName('title');
|
|
3181
|
-
[].forEach.call(titleElements, function (titleElement) {
|
|
3182
|
-
el.removeChild(titleElement);
|
|
3183
|
-
});
|
|
3184
|
-
// Remove all .highcharts-text-outline elements, #17170
|
|
3185
|
-
outlineElements =
|
|
3186
|
-
el.getElementsByClassName('highcharts-text-outline');
|
|
3187
|
-
while (outlineElements.length > 0) {
|
|
3188
|
-
const outline = outlineElements[0];
|
|
3189
|
-
if (outline.parentNode) {
|
|
3190
|
-
outline.parentNode.removeChild(outline);
|
|
3191
|
-
}
|
|
3192
|
-
}
|
|
3193
|
-
});
|
|
3194
|
-
const svgNode = dummySVGContainer.querySelector('svg');
|
|
3195
|
-
if (svgNode) {
|
|
3196
|
-
loadPdfFonts(svgNode, () => {
|
|
3197
|
-
svgToPdf(svgNode, 0, scale, (pdfData) => {
|
|
3198
|
-
try {
|
|
3199
|
-
OfflineExporting_downloadURL(pdfData, filename);
|
|
3200
|
-
if (successCallback) {
|
|
3201
|
-
successCallback();
|
|
3202
|
-
}
|
|
3203
|
-
}
|
|
3204
|
-
catch (e) {
|
|
3205
|
-
failCallback(e);
|
|
3206
|
-
}
|
|
3207
|
-
});
|
|
3208
|
-
});
|
|
3209
|
-
}
|
|
3210
|
-
};
|
|
3211
|
-
// Initiate download depending on file type
|
|
3212
|
-
if (imageType === 'image/svg+xml') {
|
|
3213
|
-
// SVG download. In this case, we want to use Microsoft specific
|
|
3214
|
-
// Blob if available
|
|
3215
|
-
try {
|
|
3216
|
-
if (typeof OfflineExporting_win.MSBlobBuilder !== 'undefined') {
|
|
3217
|
-
blob = new OfflineExporting_win.MSBlobBuilder();
|
|
3218
|
-
blob.append(svg);
|
|
3219
|
-
svgurl = blob.getBlob('image/svg+xml');
|
|
3220
|
-
}
|
|
3221
|
-
else {
|
|
3222
|
-
svgurl = svgToDataUrl(svg);
|
|
3223
|
-
}
|
|
3224
|
-
OfflineExporting_downloadURL(svgurl, filename);
|
|
3225
|
-
if (successCallback) {
|
|
3226
|
-
successCallback();
|
|
3227
|
-
}
|
|
3228
|
-
}
|
|
3229
|
-
catch (e) {
|
|
3230
|
-
failCallback(e);
|
|
3231
|
-
}
|
|
3232
|
-
}
|
|
3233
|
-
else if (imageType === 'application/pdf') {
|
|
3234
|
-
if (OfflineExporting_win.jspdf && OfflineExporting_win.jspdf.jsPDF) {
|
|
3235
|
-
downloadPDF();
|
|
3236
|
-
}
|
|
3237
|
-
else {
|
|
3238
|
-
// Must load pdf libraries first. // Don't destroy the object
|
|
3239
|
-
// URL yet since we are doing things asynchronously. A cleaner
|
|
3240
|
-
// solution would be nice, but this will do for now.
|
|
3241
|
-
objectURLRevoke = true;
|
|
3242
|
-
getScript(libURL + 'jspdf.js', function () {
|
|
3243
|
-
getScript(libURL + 'svg2pdf.js', downloadPDF);
|
|
3244
|
-
});
|
|
3245
|
-
}
|
|
3246
|
-
}
|
|
3247
|
-
else {
|
|
3248
|
-
// PNG/JPEG download - create bitmap from SVG
|
|
3249
|
-
svgurl = svgToDataUrl(svg);
|
|
3250
|
-
finallyHandler = function () {
|
|
3251
|
-
try {
|
|
3252
|
-
OfflineExporting.domurl.revokeObjectURL(svgurl);
|
|
3253
|
-
}
|
|
3254
|
-
catch (e) {
|
|
3255
|
-
// Ignore
|
|
3256
|
-
}
|
|
3257
|
-
};
|
|
3258
|
-
// First, try to get PNG by rendering on canvas
|
|
3259
|
-
imageToDataUrl(svgurl, imageType, {}, scale, function (imageURL) {
|
|
3260
|
-
// Success
|
|
3261
|
-
try {
|
|
3262
|
-
OfflineExporting_downloadURL(imageURL, filename);
|
|
3263
|
-
if (successCallback) {
|
|
3264
|
-
successCallback();
|
|
3265
|
-
}
|
|
3266
|
-
}
|
|
3267
|
-
catch (e) {
|
|
3268
|
-
failCallback(e);
|
|
3269
|
-
}
|
|
3270
|
-
}, function () {
|
|
3271
|
-
if (svg.length > 100000000 /* RegexLimits.svgLimit */) {
|
|
3272
|
-
throw new Error('Input too long');
|
|
3273
|
-
}
|
|
3274
|
-
// Failed due to tainted canvas
|
|
3275
|
-
// Create new and untainted canvas
|
|
3276
|
-
const canvas = OfflineExporting_doc.createElement('canvas'), ctx = canvas.getContext('2d'), matchedImageWidth = svg.match(
|
|
3277
|
-
// eslint-disable-next-line max-len
|
|
3278
|
-
/^<svg[^>]*\s{,1000}width\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/), matchedImageHeight = svg.match(
|
|
3279
|
-
// eslint-disable-next-line max-len
|
|
3280
|
-
/^<svg[^>]*\s{0,1000}height\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/);
|
|
3281
|
-
if (ctx && matchedImageWidth && matchedImageHeight) {
|
|
3282
|
-
const imageWidth = +matchedImageWidth[1] * scale, imageHeight = +matchedImageHeight[1] * scale, downloadWithCanVG = () => {
|
|
3283
|
-
const v = OfflineExporting_win.canvg.Canvg.fromString(ctx, svg);
|
|
3284
|
-
v.start();
|
|
3285
|
-
try {
|
|
3286
|
-
OfflineExporting_downloadURL(OfflineExporting_win.navigator.msSaveOrOpenBlob ?
|
|
3287
|
-
canvas.msToBlob() :
|
|
3288
|
-
canvas.toDataURL(imageType), filename);
|
|
3289
|
-
if (successCallback) {
|
|
3290
|
-
successCallback();
|
|
3291
|
-
}
|
|
3292
|
-
}
|
|
3293
|
-
catch (e) {
|
|
3294
|
-
failCallback(e);
|
|
3295
|
-
}
|
|
3296
|
-
finally {
|
|
3297
|
-
finallyHandler();
|
|
3298
|
-
}
|
|
3299
|
-
};
|
|
3300
|
-
canvas.width = imageWidth;
|
|
3301
|
-
canvas.height = imageHeight;
|
|
3302
|
-
if (OfflineExporting_win.canvg) {
|
|
3303
|
-
// Use preloaded canvg
|
|
3304
|
-
downloadWithCanVG();
|
|
3305
|
-
}
|
|
3306
|
-
else {
|
|
3307
|
-
// Must load canVG first.
|
|
3308
|
-
// Don't destroy the object URL yet since we are
|
|
3309
|
-
// doing things asynchronously. A cleaner solution
|
|
3310
|
-
// would be nice, but this will do for now.
|
|
3311
|
-
objectURLRevoke = true;
|
|
3312
|
-
getScript(libURL + 'canvg.js', downloadWithCanVG);
|
|
3313
|
-
}
|
|
3314
|
-
}
|
|
3315
|
-
},
|
|
3316
|
-
// No canvas support
|
|
3317
|
-
failCallback,
|
|
3318
|
-
// Failed to load image
|
|
3319
|
-
failCallback,
|
|
3320
|
-
// Finally
|
|
3321
|
-
function () {
|
|
3322
|
-
if (objectURLRevoke) {
|
|
3323
|
-
finallyHandler();
|
|
3324
|
-
}
|
|
3325
|
-
});
|
|
3326
|
-
}
|
|
376
|
+
async function downloadSVGLocal(svg, options) {
|
|
377
|
+
await external_highcharts_src_js_default_default().Exporting.prototype.downloadSVG.call(void 0, svg, options);
|
|
3327
378
|
}
|
|
3328
379
|
OfflineExporting.downloadSVGLocal = downloadSVGLocal;
|
|
3329
|
-
/* eslint-disable valid-jsdoc */
|
|
3330
380
|
/**
|
|
3331
|
-
*
|
|
3332
|
-
*
|
|
381
|
+
* Converts an SVG string into a PDF file and triggers its download. This
|
|
382
|
+
* function processes the SVG, applies necessary font adjustments, converts
|
|
383
|
+
* it to a PDF, and initiates the file download.
|
|
3333
384
|
*
|
|
3334
|
-
* @
|
|
3335
|
-
*
|
|
3336
|
-
* @
|
|
3337
|
-
* Exporting options, the same as in
|
|
3338
|
-
* {@link Highcharts.Chart#exportChart}.
|
|
385
|
+
* @private
|
|
386
|
+
* @async
|
|
387
|
+
* @function downloadPDF
|
|
3339
388
|
*
|
|
3340
|
-
* @param
|
|
3341
|
-
*
|
|
3342
|
-
*
|
|
3343
|
-
*
|
|
389
|
+
* @param {string} svg
|
|
390
|
+
* A string representation of the SVG markup to be converted into a PDF.
|
|
391
|
+
* @param {number} scale
|
|
392
|
+
* The scaling factor for the PDF output.
|
|
393
|
+
* @param {string} filename
|
|
394
|
+
* The name of the downloaded PDF file.
|
|
395
|
+
* @param {Highcharts.PdfFontOptions} [pdfFont]
|
|
396
|
+
* An optional object specifying URLs for different font variants (normal,
|
|
397
|
+
* bold, italic, bolditalic).
|
|
3344
398
|
*
|
|
399
|
+
* @return {Promise<void>}
|
|
400
|
+
* A promise that resolves when the PDF has been successfully generated and
|
|
401
|
+
* downloaded.
|
|
3345
402
|
*
|
|
3346
403
|
* @requires modules/exporting
|
|
3347
404
|
* @requires modules/offline-exporting
|
|
3348
405
|
*/
|
|
3349
|
-
function
|
|
3350
|
-
const
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
}
|
|
3359
|
-
else {
|
|
3360
|
-
chart.exportChart(options);
|
|
3361
|
-
}
|
|
3362
|
-
}, svgSuccess = function (svg) {
|
|
3363
|
-
// If SVG contains foreignObjects PDF fails in all browsers
|
|
3364
|
-
// and all exports except SVG will fail in IE, as both CanVG
|
|
3365
|
-
// and svg2pdf choke on this. Gracefully fall back.
|
|
3366
|
-
if (svg.indexOf('<foreignObject') > -1 &&
|
|
3367
|
-
options.type !== 'image/svg+xml' &&
|
|
3368
|
-
((external_highcharts_src_js_default_default()).isMS || options.type === 'application/pdf')) {
|
|
3369
|
-
fallbackToExportServer(new Error('Image type not supported for charts with embedded HTML'));
|
|
3370
|
-
}
|
|
3371
|
-
else {
|
|
3372
|
-
OfflineExporting.downloadSVGLocal(svg, OfflineExporting_extend({ filename: chart.getFilename() }, options), fallbackToExportServer, () => OfflineExporting_fireEvent(chart, 'exportChartLocalSuccess'));
|
|
3373
|
-
}
|
|
3374
|
-
},
|
|
3375
|
-
// Return true if the SVG contains images with external data. With
|
|
3376
|
-
// the boost module there are `image` elements with encoded PNGs,
|
|
3377
|
-
// these are supported by svg2pdf and should pass (#10243).
|
|
3378
|
-
hasExternalImages = function () {
|
|
3379
|
-
return [].some.call(chart.container.getElementsByTagName('image'), function (image) {
|
|
3380
|
-
const href = image.getAttribute('href');
|
|
3381
|
-
return (href !== '' &&
|
|
3382
|
-
typeof href === 'string' &&
|
|
3383
|
-
href.indexOf('data:') !== 0);
|
|
3384
|
-
});
|
|
3385
|
-
};
|
|
3386
|
-
// If we are on IE and in styled mode, add an allowlist to the renderer
|
|
3387
|
-
// for inline styles that we want to pass through. There are so many
|
|
3388
|
-
// styles by default in IE that we don't want to denylist them all.
|
|
3389
|
-
if ((external_highcharts_src_js_default_default()).isMS && chart.styledMode && !Exporting_Exporting.inlineAllowlist.length) {
|
|
3390
|
-
Exporting_Exporting.inlineAllowlist.push(/^blockSize/, /^border/, /^caretColor/, /^color/, /^columnRule/, /^columnRuleColor/, /^cssFloat/, /^cursor/, /^fill$/, /^fillOpacity/, /^font/, /^inlineSize/, /^length/, /^lineHeight/, /^opacity/, /^outline/, /^parentRule/, /^rx$/, /^ry$/, /^stroke/, /^textAlign/, /^textAnchor/, /^textDecoration/, /^transform/, /^vectorEffect/, /^visibility/, /^x$/, /^y$/);
|
|
406
|
+
async function downloadPDF(svg, scale, filename, pdfFont) {
|
|
407
|
+
const svgNode = preparePDF(svg, pdfFont);
|
|
408
|
+
if (svgNode) {
|
|
409
|
+
// Loads all required fonts
|
|
410
|
+
await loadPdfFonts(svgNode, pdfFont);
|
|
411
|
+
// Transform SVG to PDF
|
|
412
|
+
const pdfData = await svgToPdf(svgNode, 0, scale);
|
|
413
|
+
// Download the PDF
|
|
414
|
+
OfflineExporting_downloadURL(pdfData, filename);
|
|
3391
415
|
}
|
|
3392
|
-
// Always fall back on:
|
|
3393
|
-
// - MS browsers: Embedded images JPEG/PNG, or any PDF
|
|
3394
|
-
// - Embedded images and PDF
|
|
3395
|
-
if (((external_highcharts_src_js_default_default()).isMS &&
|
|
3396
|
-
(options.type === 'application/pdf' ||
|
|
3397
|
-
chart.container.getElementsByTagName('image').length &&
|
|
3398
|
-
options.type !== 'image/svg+xml')) || (options.type === 'application/pdf' &&
|
|
3399
|
-
hasExternalImages())) {
|
|
3400
|
-
fallbackToExportServer(new Error('Image type not supported for this chart/browser.'));
|
|
3401
|
-
return;
|
|
3402
|
-
}
|
|
3403
|
-
chart.getSVGForLocalExport(options, chartOptions || {}, fallbackToExportServer, svgSuccess);
|
|
3404
416
|
}
|
|
3405
417
|
/**
|
|
3406
|
-
*
|
|
418
|
+
* Loads and registers custom fonts for PDF export if non-ASCII characters
|
|
419
|
+
* are detected in the given SVG element. This function ensures that text
|
|
420
|
+
* content with special characters is properly rendered in the exported PDF.
|
|
3407
421
|
*
|
|
3408
|
-
*
|
|
3409
|
-
*
|
|
3410
|
-
* @param {string} scriptLocation
|
|
3411
|
-
* @param {Function} callback
|
|
3412
|
-
*/
|
|
3413
|
-
function getScript(scriptLocation, callback) {
|
|
3414
|
-
const head = OfflineExporting_doc.getElementsByTagName('head')[0], script = OfflineExporting_doc.createElement('script');
|
|
3415
|
-
script.type = 'text/javascript';
|
|
3416
|
-
script.src = scriptLocation;
|
|
3417
|
-
script.onload = callback;
|
|
3418
|
-
script.onerror = function () {
|
|
3419
|
-
error('Error loading script ' + scriptLocation);
|
|
3420
|
-
};
|
|
3421
|
-
head.appendChild(script);
|
|
3422
|
-
}
|
|
3423
|
-
OfflineExporting.getScript = getScript;
|
|
3424
|
-
/**
|
|
3425
|
-
* Get SVG of chart prepared for client side export. This converts
|
|
3426
|
-
* embedded images in the SVG to data URIs. It requires the regular
|
|
3427
|
-
* exporting module. The options and chartOptions arguments are passed
|
|
3428
|
-
* to the getSVGForExport function.
|
|
422
|
+
* It fetches font files (if provided in `pdfFont`), converts them to
|
|
423
|
+
* base64, and registers them with jsPDF.
|
|
3429
424
|
*
|
|
3430
425
|
* @private
|
|
3431
|
-
* @function
|
|
3432
|
-
*
|
|
3433
|
-
* @param {
|
|
3434
|
-
*
|
|
3435
|
-
* @param {
|
|
426
|
+
* @function loadPdfFonts
|
|
427
|
+
*
|
|
428
|
+
* @param {SVGElement} svgElement
|
|
429
|
+
* The generated SVG element containing the text content to be exported.
|
|
430
|
+
* @param {Highcharts.PdfFontOptions} [pdfFont]
|
|
431
|
+
* An optional object specifying URLs for different font variants (normal,
|
|
432
|
+
* bold, italic, bolditalic). If non-ASCII characters are not detected,
|
|
433
|
+
* fonts are not loaded.
|
|
434
|
+
*
|
|
435
|
+
* @requires modules/exporting
|
|
436
|
+
* @requires modules/offline-exporting
|
|
3436
437
|
*/
|
|
3437
|
-
function
|
|
3438
|
-
const
|
|
3439
|
-
//
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
checkDone();
|
|
438
|
+
async function loadPdfFonts(svgElement, pdfFont) {
|
|
439
|
+
const hasNonASCII = (s) => (
|
|
440
|
+
// eslint-disable-next-line no-control-regex
|
|
441
|
+
/[^\u0000-\u007F\u200B]+/.test(s));
|
|
442
|
+
// Register an event in order to add the font once jsPDF is initialized
|
|
443
|
+
const addFont = (variant, base64) => {
|
|
444
|
+
OfflineExporting_win.jspdf.jsPDF.API.events.push([
|
|
445
|
+
'initialized',
|
|
446
|
+
function () {
|
|
447
|
+
this.addFileToVFS(variant, base64);
|
|
448
|
+
this.addFont(variant, 'HighchartsFont', variant);
|
|
449
|
+
if (!this.getFontList()?.HighchartsFont) {
|
|
450
|
+
this.setFont('HighchartsFont');
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
]);
|
|
3454
454
|
};
|
|
3455
|
-
|
|
3456
|
-
//
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
455
|
+
// If there are no non-ASCII characters in the SVG, do not use bother
|
|
456
|
+
// downloading the font files
|
|
457
|
+
if (pdfFont && !hasNonASCII(svgElement.textContent || '')) {
|
|
458
|
+
pdfFont = void 0;
|
|
459
|
+
}
|
|
460
|
+
// Add new font if the URL is declared, #6417
|
|
461
|
+
const variants = ['normal', 'italic', 'bold', 'bolditalic'];
|
|
462
|
+
// Shift the first element off the variants and add as a font.
|
|
463
|
+
// Then asynchronously trigger the next variant until variants are empty
|
|
464
|
+
let normalBase64;
|
|
465
|
+
for (const variant of variants) {
|
|
466
|
+
const url = pdfFont?.[variant];
|
|
467
|
+
if (url) {
|
|
468
|
+
try {
|
|
469
|
+
const response = await OfflineExporting_win.fetch(url);
|
|
470
|
+
if (!response.ok) {
|
|
471
|
+
throw new Error(`Failed to fetch font: ${url}`);
|
|
472
|
+
}
|
|
473
|
+
const blob = await response.blob(), reader = new FileReader();
|
|
474
|
+
const base64 = await new Promise((resolve, reject) => {
|
|
475
|
+
reader.onloadend = () => {
|
|
476
|
+
if (typeof reader.result === 'string') {
|
|
477
|
+
resolve(reader.result.split(',')[1]);
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
reject(new Error('Failed to read font as base64'));
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
reader.onerror = reject;
|
|
484
|
+
reader.readAsDataURL(blob);
|
|
485
|
+
});
|
|
486
|
+
addFont(variant, base64);
|
|
487
|
+
if (variant === 'normal') {
|
|
488
|
+
normalBase64 = base64;
|
|
489
|
+
}
|
|
3487
490
|
}
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
491
|
+
catch (e) {
|
|
492
|
+
// If fetch or reading fails, fallback to next variant
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
else {
|
|
496
|
+
// For other variants, fall back to normal text weight/style
|
|
497
|
+
if (normalBase64) {
|
|
498
|
+
addFont(variant, normalBase64);
|
|
3493
499
|
}
|
|
3494
500
|
}
|
|
3495
501
|
}
|
|
3496
|
-
catch (e) {
|
|
3497
|
-
failCallback(e);
|
|
3498
|
-
}
|
|
3499
|
-
// Clean up
|
|
3500
|
-
chart.unbindGetSVG();
|
|
3501
502
|
}
|
|
3502
503
|
/**
|
|
3503
|
-
*
|
|
504
|
+
* Prepares an SVG for PDF export by ensuring proper text styling and
|
|
505
|
+
* removing unnecessary elements. This function extracts an SVG element from
|
|
506
|
+
* a given SVG string, applies font styles inherited from parent elements,
|
|
507
|
+
* and removes text outlines and title elements to improve PDF rendering.
|
|
3504
508
|
*
|
|
3505
509
|
* @private
|
|
3506
|
-
* @function
|
|
3507
|
-
*
|
|
3508
|
-
* @param {string} imageURL
|
|
3509
|
-
*
|
|
3510
|
-
* @param {string} imageType
|
|
3511
|
-
*
|
|
3512
|
-
* @param {*} callbackArgs
|
|
3513
|
-
* callbackArgs is used only by callbacks.
|
|
3514
|
-
*
|
|
3515
|
-
* @param {number} scale
|
|
3516
|
-
*
|
|
3517
|
-
* @param {Function} successCallback
|
|
3518
|
-
* Receives four arguments: imageURL, imageType, callbackArgs,
|
|
3519
|
-
* and scale.
|
|
3520
|
-
*
|
|
3521
|
-
* @param {Function} taintedCallback
|
|
3522
|
-
* Receives four arguments: imageURL, imageType, callbackArgs,
|
|
3523
|
-
* and scale.
|
|
510
|
+
* @function preparePDF
|
|
3524
511
|
*
|
|
3525
|
-
* @param {
|
|
3526
|
-
*
|
|
3527
|
-
*
|
|
512
|
+
* @param {string} svg
|
|
513
|
+
* A string representation of the SVG markup.
|
|
514
|
+
* @param {Highcharts.PdfFontOptions} [pdfFont]
|
|
515
|
+
* An optional object specifying URLs for different font variants (normal,
|
|
516
|
+
* bold, italic, bolditalic). If provided, the text elements are assigned a
|
|
517
|
+
* custom PDF font.
|
|
3528
518
|
*
|
|
3529
|
-
* @
|
|
3530
|
-
*
|
|
3531
|
-
*
|
|
519
|
+
* @return {SVGSVGElement | null}
|
|
520
|
+
* Returns the parsed SVG element from the container or `null` if the SVG is
|
|
521
|
+
* not found.
|
|
3532
522
|
*
|
|
3533
|
-
* @
|
|
3534
|
-
*
|
|
3535
|
-
* callbacks receive four arguments: imageURL, imageType,
|
|
3536
|
-
* callbackArgs, and scale.
|
|
523
|
+
* @requires modules/exporting
|
|
524
|
+
* @requires modules/offline-exporting
|
|
3537
525
|
*/
|
|
3538
|
-
function
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
// Now we try to get the contents of the canvas.
|
|
3553
|
-
try {
|
|
3554
|
-
dataURL = canvas.toDataURL(imageType);
|
|
3555
|
-
successCallback(dataURL, imageType, callbackArgs, scale);
|
|
3556
|
-
}
|
|
3557
|
-
catch (e) {
|
|
3558
|
-
taintedHandler(imageURL, imageType, callbackArgs, scale);
|
|
3559
|
-
}
|
|
3560
|
-
}
|
|
3561
|
-
}
|
|
3562
|
-
finally {
|
|
3563
|
-
if (finallyCallback) {
|
|
3564
|
-
finallyCallback(imageURL, imageType, callbackArgs, scale);
|
|
526
|
+
function preparePDF(svg, pdfFont) {
|
|
527
|
+
const dummySVGContainer = OfflineExporting_doc.createElement('div');
|
|
528
|
+
external_highcharts_src_js_default_AST_default().setElementHTML(dummySVGContainer, svg);
|
|
529
|
+
const textElements = dummySVGContainer.getElementsByTagName('text'),
|
|
530
|
+
// Copy style property to element from parents if it's not there.
|
|
531
|
+
// Searches up hierarchy until it finds prop, or hits the chart
|
|
532
|
+
// container
|
|
533
|
+
setStylePropertyFromParents = function (el, propName) {
|
|
534
|
+
let curParent = el;
|
|
535
|
+
while (curParent && curParent !== dummySVGContainer) {
|
|
536
|
+
if (curParent.style[propName]) {
|
|
537
|
+
let value = curParent.style[propName];
|
|
538
|
+
if (propName === 'fontSize' && /em$/.test(value)) {
|
|
539
|
+
value = Math.round(parseFloat(value) * 16) + 'px';
|
|
3565
540
|
}
|
|
541
|
+
el.style[propName] = value;
|
|
542
|
+
break;
|
|
3566
543
|
}
|
|
3567
|
-
|
|
3568
|
-
// event.
|
|
3569
|
-
}, OfflineExporting.loadEventDeferDelay);
|
|
3570
|
-
},
|
|
3571
|
-
// Image load failed (e.g. invalid URL)
|
|
3572
|
-
errorHandler = () => {
|
|
3573
|
-
failedLoadCallback(imageURL, imageType, callbackArgs, scale);
|
|
3574
|
-
if (finallyCallback) {
|
|
3575
|
-
finallyCallback(imageURL, imageType, callbackArgs, scale);
|
|
544
|
+
curParent = curParent.parentNode;
|
|
3576
545
|
}
|
|
3577
546
|
};
|
|
3578
|
-
|
|
3579
|
-
//
|
|
3580
|
-
//
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
// blob URLs. ForeignObjects also don't work well in Blobs in Chrome
|
|
3609
|
-
// (#14780).
|
|
3610
|
-
if (!webKit && svg.indexOf('<foreignObject') === -1) {
|
|
3611
|
-
return OfflineExporting.domurl.createObjectURL(new OfflineExporting_win.Blob([svg], {
|
|
3612
|
-
type: 'image/svg+xml;charset-utf-16'
|
|
3613
|
-
}));
|
|
547
|
+
let titleElements, outlineElements;
|
|
548
|
+
// Workaround for the text styling. Making sure it does pick up
|
|
549
|
+
// settings for parent elements.
|
|
550
|
+
[].forEach.call(textElements, function (el) {
|
|
551
|
+
// Workaround for the text styling. making sure it does pick up
|
|
552
|
+
// the root element
|
|
553
|
+
['fontFamily', 'fontSize']
|
|
554
|
+
.forEach((property) => {
|
|
555
|
+
setStylePropertyFromParents(el, property);
|
|
556
|
+
});
|
|
557
|
+
el.style.fontFamily = pdfFont?.normal ?
|
|
558
|
+
// Custom PDF font
|
|
559
|
+
'HighchartsFont' :
|
|
560
|
+
// Generic font (serif, sans-serif etc)
|
|
561
|
+
String(el.style.fontFamily &&
|
|
562
|
+
el.style.fontFamily.split(' ').splice(-1));
|
|
563
|
+
// Workaround for plotband with width, removing title from text
|
|
564
|
+
// nodes
|
|
565
|
+
titleElements = el.getElementsByTagName('title');
|
|
566
|
+
[].forEach.call(titleElements, function (titleElement) {
|
|
567
|
+
el.removeChild(titleElement);
|
|
568
|
+
});
|
|
569
|
+
// Remove all .highcharts-text-outline elements, #17170
|
|
570
|
+
outlineElements =
|
|
571
|
+
el.getElementsByClassName('highcharts-text-outline');
|
|
572
|
+
while (outlineElements.length > 0) {
|
|
573
|
+
const outline = outlineElements[0];
|
|
574
|
+
if (outline.parentNode) {
|
|
575
|
+
outline.parentNode.removeChild(outline);
|
|
576
|
+
}
|
|
3614
577
|
}
|
|
3615
|
-
}
|
|
3616
|
-
|
|
3617
|
-
// Ignore
|
|
3618
|
-
}
|
|
3619
|
-
return 'data:image/svg+xml;charset=UTF-8,' + encodeURIComponent(svg);
|
|
578
|
+
});
|
|
579
|
+
return dummySVGContainer.querySelector('svg');
|
|
3620
580
|
}
|
|
3621
|
-
OfflineExporting.svgToDataUrl = svgToDataUrl;
|
|
3622
|
-
/* eslint-disable valid-jsdoc */
|
|
3623
581
|
/**
|
|
582
|
+
* Transform from PDF to SVG.
|
|
583
|
+
*
|
|
584
|
+
* @async
|
|
3624
585
|
* @private
|
|
586
|
+
* @function svgToPdf
|
|
587
|
+
*
|
|
588
|
+
* @param {Highcharts.SVGElement} svgElement
|
|
589
|
+
* The SVG element to convert.
|
|
590
|
+
* @param {number} margin
|
|
591
|
+
* The margin to apply.
|
|
592
|
+
* @param {number} scale
|
|
593
|
+
* The scale of the SVG.
|
|
594
|
+
*
|
|
595
|
+
* @requires modules/exporting
|
|
596
|
+
* @requires modules/offline-exporting
|
|
3625
597
|
*/
|
|
3626
|
-
function svgToPdf(svgElement, margin, scale
|
|
598
|
+
async function svgToPdf(svgElement, margin, scale) {
|
|
3627
599
|
const width = (Number(svgElement.getAttribute('width')) + 2 * margin) *
|
|
3628
600
|
scale, height = (Number(svgElement.getAttribute('height')) + 2 * margin) *
|
|
3629
601
|
scale, pdfDoc = new OfflineExporting_win.jspdf.jsPDF(// eslint-disable-line new-cap
|
|
3630
|
-
//
|
|
602
|
+
// Setting orientation to portrait if height exceeds width
|
|
3631
603
|
height > width ? 'p' : 'l', 'pt', [width, height]);
|
|
3632
604
|
// Workaround for #7090, hidden elements were drawn anyway. It comes
|
|
3633
605
|
// down to https://github.com/yWorks/svg2pdf.js/issues/28. Check this
|
|
@@ -3658,30 +630,32 @@ var OfflineExporting;
|
|
|
3658
630
|
tspan.setAttribute('dx', -5);
|
|
3659
631
|
}
|
|
3660
632
|
});
|
|
3661
|
-
|
|
633
|
+
// Transform from PDF to SVG
|
|
634
|
+
await pdfDoc.svg(svgElement, {
|
|
3662
635
|
x: 0,
|
|
3663
636
|
y: 0,
|
|
3664
637
|
width,
|
|
3665
638
|
height,
|
|
3666
639
|
removeInvalid: true
|
|
3667
|
-
})
|
|
640
|
+
});
|
|
641
|
+
// Return the output
|
|
642
|
+
return pdfDoc.output('datauristring');
|
|
3668
643
|
}
|
|
3669
|
-
OfflineExporting.svgToPdf = svgToPdf;
|
|
3670
644
|
})(OfflineExporting || (OfflineExporting = {}));
|
|
3671
645
|
/* *
|
|
3672
646
|
*
|
|
3673
|
-
*
|
|
647
|
+
* Default Export
|
|
3674
648
|
*
|
|
3675
649
|
* */
|
|
3676
650
|
/* harmony default export */ const OfflineExporting_OfflineExporting = (OfflineExporting);
|
|
3677
651
|
|
|
3678
652
|
;// external "./exporting.src.js"
|
|
3679
|
-
var
|
|
653
|
+
var x = (y) => {
|
|
3680
654
|
var x = {}; __webpack_require__.d(x,
|
|
3681
655
|
y); return x
|
|
3682
656
|
}
|
|
3683
|
-
var
|
|
3684
|
-
const external_exporting_src_js_namespaceObject =
|
|
657
|
+
var y = (x) => (() => (x))
|
|
658
|
+
const external_exporting_src_js_namespaceObject = x({ });
|
|
3685
659
|
;// ./code/es-modules/masters/modules/offline-exporting.src.js
|
|
3686
660
|
|
|
3687
661
|
|
|
@@ -3695,7 +669,7 @@ G.dataURLtoBlob = G.dataURLtoBlob || Extensions_DownloadURL.dataURLtoBlob;
|
|
|
3695
669
|
G.downloadSVGLocal = OfflineExporting_OfflineExporting.downloadSVGLocal;
|
|
3696
670
|
G.downloadURL = G.downloadURL || Extensions_DownloadURL.downloadURL;
|
|
3697
671
|
// Compose
|
|
3698
|
-
OfflineExporting_OfflineExporting.compose(G.
|
|
672
|
+
OfflineExporting_OfflineExporting.compose(G.Exporting);
|
|
3699
673
|
/* harmony default export */ const offline_exporting_src = ((external_highcharts_src_js_default_default()));
|
|
3700
674
|
|
|
3701
675
|
export { offline_exporting_src as default };
|