highcharts 6.1.1 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bower.json +1 -1
- package/css/highcharts.css +29 -0
- package/css/highcharts.scss +25 -1
- package/css/themes/dark-unica.css +29 -0
- package/css/themes/grid-light.css +29 -0
- package/css/themes/sand-signika.css +29 -0
- package/es-modules/indicators/accumulation-distribution.src.js +1 -1
- package/es-modules/indicators/atr.src.js +1 -1
- package/es-modules/indicators/bollinger-bands.src.js +2 -2
- package/es-modules/indicators/cci.src.js +1 -1
- package/es-modules/indicators/cmf.src.js +1 -1
- package/es-modules/indicators/ema.src.js +1 -1
- package/es-modules/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/es-modules/indicators/indicators.src.js +29 -14
- package/es-modules/indicators/macd.src.js +4 -4
- package/es-modules/indicators/mfi.src.js +1 -1
- package/es-modules/indicators/momentum.src.js +2 -2
- package/es-modules/indicators/pivot-points.src.js +7 -2
- package/es-modules/indicators/price-envelopes.src.js +2 -2
- package/es-modules/indicators/psar.src.js +1 -1
- package/es-modules/indicators/roc.src.js +1 -1
- package/es-modules/indicators/rsi.src.js +1 -1
- package/es-modules/indicators/stochastic.src.js +9 -7
- package/es-modules/indicators/volume-by-price.src.js +1 -1
- package/es-modules/indicators/vwap.src.js +1 -1
- package/es-modules/indicators/wma.src.js +1 -1
- package/es-modules/indicators/zigzag.src.js +1 -1
- package/es-modules/masters/highcharts-gantt.src.js +11 -0
- package/es-modules/masters/modules/annotations.src.js +1 -1
- package/es-modules/masters/modules/arrow-symbols.src.js +12 -0
- package/es-modules/masters/modules/broken-axis.src.js +1 -1
- package/es-modules/masters/modules/current-date-indicator.src.js +12 -0
- package/es-modules/masters/modules/data.src.js +1 -1
- package/es-modules/masters/modules/draggable-points.src.js +9 -0
- package/es-modules/masters/modules/export-data.src.js +1 -1
- package/es-modules/masters/modules/exporting.src.js +1 -1
- package/es-modules/masters/modules/funnel.src.js +1 -1
- package/es-modules/masters/modules/gantt.src.js +2 -1
- package/es-modules/masters/modules/grid-axis.src.js +1 -1
- package/es-modules/masters/modules/heatmap.src.js +1 -1
- package/es-modules/masters/modules/item-series.src.js +1 -1
- package/es-modules/masters/modules/map.src.js +1 -1
- package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
- package/es-modules/masters/modules/pathfinder.src.js +12 -0
- package/es-modules/masters/modules/sankey.src.js +1 -1
- package/es-modules/masters/modules/series-label.src.js +1 -1
- package/es-modules/masters/modules/solid-gauge.src.js +1 -1
- package/es-modules/masters/modules/stock.src.js +1 -1
- package/es-modules/masters/modules/streamgraph.src.js +1 -1
- package/es-modules/masters/modules/treegrid.src.js +12 -0
- package/es-modules/masters/modules/variwide.src.js +1 -1
- package/es-modules/masters/modules/vector.src.js +1 -1
- package/es-modules/masters/modules/windbarb.src.js +1 -1
- package/es-modules/masters/modules/xrange.src.js +1 -1
- package/es-modules/masters/themes/dark-blue.src.js +1 -1
- package/es-modules/masters/themes/dark-green.src.js +1 -1
- package/es-modules/masters/themes/dark-unica.src.js +1 -1
- package/es-modules/masters/themes/gray.src.js +1 -1
- package/es-modules/masters/themes/grid-light.src.js +1 -1
- package/es-modules/masters/themes/grid.src.js +1 -1
- package/es-modules/masters/themes/sand-signika.src.js +1 -1
- package/es-modules/masters/themes/skies.src.js +1 -1
- package/es-modules/mixins/centered-series.js +36 -5
- package/es-modules/mixins/on-series.js +1 -1
- package/es-modules/mixins/polygon.js +4 -4
- package/es-modules/modules/annotations.src.js +2 -2
- package/es-modules/modules/boost-canvas.src.js +19 -8
- package/es-modules/modules/boost.src.js +300 -137
- package/es-modules/modules/broken-axis.src.js +169 -134
- package/es-modules/modules/bullet.src.js +2 -2
- package/es-modules/modules/data.src.js +8 -6
- package/es-modules/modules/draggable-points.src.js +2257 -0
- package/es-modules/modules/drilldown.src.js +4 -2
- package/es-modules/modules/export-data.src.js +11 -1
- package/es-modules/modules/exporting.src.js +62 -36
- package/es-modules/modules/funnel.src.js +5 -5
- package/es-modules/modules/histogram.src.js +30 -28
- package/es-modules/modules/item-series.src.js +36 -11
- package/es-modules/modules/keyboard-navigation.src.js +81 -44
- package/es-modules/modules/no-data-to-display.src.js +5 -5
- package/es-modules/modules/oldie.src.js +14 -9
- package/es-modules/modules/overlapping-datalabels.src.js +45 -21
- package/es-modules/modules/parallel-coordinates.src.js +4 -3
- package/es-modules/modules/pareto.src.js +1 -1
- package/es-modules/modules/sankey.src.js +28 -10
- package/es-modules/modules/series-label.src.js +6 -6
- package/es-modules/modules/solid-gauge.src.js +10 -7
- package/es-modules/modules/static-scale.src.js +67 -28
- package/es-modules/modules/streamgraph.src.js +4 -4
- package/es-modules/modules/sunburst.src.js +4 -4
- package/es-modules/modules/tilemap.src.js +231 -134
- package/es-modules/modules/treemap.src.js +30 -27
- package/es-modules/modules/variable-pie.src.js +3 -3
- package/es-modules/modules/variwide.src.js +36 -24
- package/es-modules/modules/vector.src.js +98 -28
- package/es-modules/modules/windbarb.src.js +4 -4
- package/es-modules/modules/wordcloud.src.js +133 -48
- package/es-modules/modules/xrange.src.js +258 -78
- package/es-modules/parts/AreaSeries.js +83 -50
- package/es-modules/parts/AreaSplineSeries.js +66 -29
- package/es-modules/parts/Axis.js +2184 -745
- package/es-modules/parts/BarSeries.js +70 -53
- package/es-modules/parts/CandlestickSeries.js +20 -10
- package/es-modules/parts/Chart.js +349 -157
- package/es-modules/parts/Color.js +74 -25
- package/es-modules/parts/ColumnSeries.js +274 -147
- package/es-modules/parts/DataGrouping.js +36 -3
- package/es-modules/parts/DataLabels.js +318 -144
- package/es-modules/parts/DateTimeAxis.js +27 -5
- package/es-modules/parts/Dynamics.js +236 -144
- package/es-modules/parts/FlagsSeries.js +49 -7
- package/es-modules/parts/Globals.js +4 -3
- package/es-modules/parts/Html.js +82 -16
- package/es-modules/parts/Interaction.js +198 -65
- package/es-modules/parts/Legend.js +181 -31
- package/es-modules/parts/LogarithmicAxis.js +36 -3
- package/es-modules/parts/MSPointer.js +31 -4
- package/es-modules/parts/Navigator.js +479 -187
- package/es-modules/parts/OHLCSeries.js +11 -5
- package/es-modules/parts/Options.js +1052 -686
- package/es-modules/parts/OrdinalAxis.js +20 -6
- package/es-modules/parts/PieSeries.js +258 -142
- package/es-modules/parts/PlotBandSeries.experimental.js +2 -2
- package/es-modules/parts/PlotLineOrBand.js +671 -35
- package/es-modules/parts/Point.js +189 -73
- package/es-modules/parts/Pointer.js +263 -62
- package/es-modules/parts/RangeSelector.js +601 -91
- package/es-modules/parts/Responsive.js +82 -36
- package/es-modules/parts/ScatterSeries.js +59 -27
- package/es-modules/parts/ScrollablePlotArea.js +30 -9
- package/es-modules/parts/Scrollbar.js +284 -113
- package/es-modules/parts/Series.js +1105 -836
- package/es-modules/parts/SplineSeries.js +53 -31
- package/es-modules/parts/Stacking.js +108 -7
- package/es-modules/parts/StockChart.js +26 -8
- package/es-modules/parts/SvgRenderer.js +1251 -613
- package/es-modules/parts/Tick.js +164 -30
- package/es-modules/parts/Time.js +171 -71
- package/es-modules/parts/Tooltip.js +271 -49
- package/es-modules/parts/TouchPointer.js +70 -3
- package/es-modules/parts/Utilities.js +1024 -429
- package/es-modules/parts-3d/Axis.js +4 -3
- package/es-modules/parts-3d/Chart.js +8 -9
- package/es-modules/parts-3d/Column.js +1 -1
- package/es-modules/parts-3d/Math.js +1 -1
- package/es-modules/parts-3d/Pie.js +1 -1
- package/es-modules/parts-3d/SVGRenderer.js +13 -10
- package/es-modules/parts-3d/Scatter.js +4 -4
- package/es-modules/parts-3d/Series.js +1 -1
- package/es-modules/parts-3d/VMLRenderer.js +1 -1
- package/es-modules/parts-gantt/ArrowSymbols.js +110 -0
- package/es-modules/parts-gantt/CurrentDateIndicator.js +92 -0
- package/es-modules/parts-gantt/GanttChart.js +111 -0
- package/es-modules/parts-gantt/GanttSeries.js +376 -0
- package/es-modules/parts-gantt/GridAxis.js +965 -0
- package/es-modules/parts-gantt/Pathfinder.js +1247 -0
- package/es-modules/parts-gantt/PathfinderAlgorithms.js +746 -0
- package/es-modules/parts-gantt/Tree.js +146 -0
- package/es-modules/parts-gantt/TreeGrid.js +917 -0
- package/es-modules/parts-map/ColorAxis.js +4 -5
- package/es-modules/parts-map/ColorSeriesMixin.js +3 -1
- package/es-modules/parts-map/GeoJSON.js +1 -1
- package/es-modules/parts-map/HeatmapSeries.js +126 -55
- package/es-modules/parts-map/Map.js +144 -51
- package/es-modules/parts-map/MapAxis.js +1 -1
- package/es-modules/parts-map/MapBubbleSeries.js +6 -5
- package/es-modules/parts-map/MapLineSeries.js +4 -4
- package/es-modules/parts-map/MapNavigation.js +50 -12
- package/es-modules/parts-map/MapPointSeries.js +3 -3
- package/es-modules/parts-map/MapPointer.js +1 -1
- package/es-modules/parts-map/MapSeries.js +7 -7
- package/es-modules/parts-more/AreaRangeSeries.js +82 -40
- package/es-modules/parts-more/AreaSplineRangeSeries.js +3 -3
- package/es-modules/parts-more/BoxPlotSeries.js +3 -3
- package/es-modules/parts-more/BubbleSeries.js +9 -4
- package/es-modules/parts-more/ColumnRangeSeries.js +3 -3
- package/es-modules/parts-more/ErrorBarSeries.js +6 -4
- package/es-modules/parts-more/GaugeSeries.js +3 -3
- package/es-modules/parts-more/Pane.js +3 -2
- package/es-modules/parts-more/Polar.js +1 -1
- package/es-modules/parts-more/PolygonSeries.js +3 -3
- package/es-modules/parts-more/RadialAxis.js +5 -4
- package/es-modules/parts-more/WaterfallSeries.js +9 -4
- package/es-modules/supplemental.docs.js +0 -1955
- package/es-modules/themes/dark-blue.js +1 -1
- package/es-modules/themes/dark-green.js +1 -1
- package/es-modules/themes/dark-unica.js +1 -1
- package/es-modules/themes/gray.js +1 -1
- package/es-modules/themes/grid-light.js +1 -1
- package/es-modules/themes/grid.js +1 -1
- package/es-modules/themes/sand-signika.js +1 -1
- package/es-modules/themes/skies.js +1 -1
- package/highcharts-3d.js +77 -75
- package/highcharts-3d.js.map +1 -8
- package/highcharts-3d.src.js +39 -32
- package/highcharts-gantt.js +503 -0
- package/highcharts-gantt.js.map +1 -0
- package/highcharts-gantt.src.js +49289 -0
- package/highcharts-more.js +66 -64
- package/highcharts-more.js.map +1 -8
- package/highcharts-more.src.js +135 -75
- package/highcharts.js +413 -403
- package/highcharts.js.map +1 -8
- package/highcharts.src.js +11114 -4781
- package/highmaps.js +442 -433
- package/highmaps.js.map +1 -8
- package/highmaps.src.js +10740 -4598
- package/highstock.js +553 -540
- package/highstock.js.map +1 -8
- package/highstock.src.js +12807 -5343
- package/indicators/accumulation-distribution.js +4 -3
- package/indicators/accumulation-distribution.js.map +1 -8
- package/indicators/accumulation-distribution.src.js +6 -2
- package/indicators/atr.js +4 -3
- package/indicators/atr.js.map +1 -8
- package/indicators/atr.src.js +6 -2
- package/indicators/bollinger-bands.js +7 -6
- package/indicators/bollinger-bands.js.map +1 -8
- package/indicators/bollinger-bands.src.js +7 -3
- package/indicators/cci.js +4 -3
- package/indicators/cci.js.map +1 -8
- package/indicators/cci.src.js +6 -2
- package/indicators/cmf.js +5 -4
- package/indicators/cmf.js.map +1 -8
- package/indicators/cmf.src.js +6 -2
- package/indicators/ema.js +4 -3
- package/indicators/ema.js.map +1 -8
- package/indicators/ema.src.js +6 -2
- package/indicators/ichimoku-kinko-hyo.js +10 -9
- package/indicators/ichimoku-kinko-hyo.js.map +1 -8
- package/indicators/ichimoku-kinko-hyo.src.js +6 -2
- package/indicators/indicators.js +6 -5
- package/indicators/indicators.js.map +1 -8
- package/indicators/indicators.src.js +34 -15
- package/indicators/macd.js +11 -10
- package/indicators/macd.js.map +1 -8
- package/indicators/macd.src.js +10 -6
- package/indicators/mfi.js +5 -3
- package/indicators/mfi.js.map +1 -8
- package/indicators/mfi.src.js +6 -2
- package/indicators/momentum.js +4 -3
- package/indicators/momentum.js.map +1 -8
- package/indicators/momentum.src.js +7 -3
- package/indicators/pivot-points.js +8 -7
- package/indicators/pivot-points.js.map +1 -8
- package/indicators/pivot-points.src.js +12 -3
- package/indicators/price-envelopes.js +7 -6
- package/indicators/price-envelopes.js.map +1 -8
- package/indicators/price-envelopes.src.js +7 -3
- package/indicators/psar.js +5 -4
- package/indicators/psar.js.map +1 -8
- package/indicators/psar.src.js +6 -2
- package/indicators/roc.js +4 -3
- package/indicators/roc.js.map +1 -8
- package/indicators/roc.src.js +6 -2
- package/indicators/rsi.js +4 -3
- package/indicators/rsi.js.map +1 -8
- package/indicators/rsi.src.js +6 -2
- package/indicators/stochastic.js +7 -5
- package/indicators/stochastic.js.map +1 -8
- package/indicators/stochastic.src.js +14 -8
- package/indicators/volume-by-price.js +13 -12
- package/indicators/volume-by-price.js.map +1 -8
- package/indicators/volume-by-price.src.js +6 -2
- package/indicators/vwap.js +4 -3
- package/indicators/vwap.js.map +1 -8
- package/indicators/vwap.src.js +6 -2
- package/indicators/wma.js +4 -3
- package/indicators/wma.js.map +1 -8
- package/indicators/wma.src.js +6 -2
- package/indicators/zigzag.js +5 -3
- package/indicators/zigzag.js.map +1 -8
- package/indicators/zigzag.src.js +6 -2
- package/js/es-modules/indicators/accumulation-distribution.src.js +1 -1
- package/js/es-modules/indicators/atr.src.js +1 -1
- package/js/es-modules/indicators/bollinger-bands.src.js +2 -2
- package/js/es-modules/indicators/cci.src.js +1 -1
- package/js/es-modules/indicators/cmf.src.js +1 -1
- package/js/es-modules/indicators/ema.src.js +1 -1
- package/js/es-modules/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/js/es-modules/indicators/indicators.src.js +29 -14
- package/js/es-modules/indicators/macd.src.js +4 -4
- package/js/es-modules/indicators/mfi.src.js +1 -1
- package/js/es-modules/indicators/momentum.src.js +2 -2
- package/js/es-modules/indicators/pivot-points.src.js +7 -2
- package/js/es-modules/indicators/price-envelopes.src.js +2 -2
- package/js/es-modules/indicators/psar.src.js +1 -1
- package/js/es-modules/indicators/roc.src.js +1 -1
- package/js/es-modules/indicators/rsi.src.js +1 -1
- package/js/es-modules/indicators/stochastic.src.js +9 -7
- package/js/es-modules/indicators/volume-by-price.src.js +1 -1
- package/js/es-modules/indicators/vwap.src.js +1 -1
- package/js/es-modules/indicators/wma.src.js +1 -1
- package/js/es-modules/indicators/zigzag.src.js +1 -1
- package/js/es-modules/masters/highcharts-gantt.src.js +11 -0
- package/js/es-modules/masters/modules/annotations.src.js +1 -1
- package/js/es-modules/masters/modules/arrow-symbols.src.js +12 -0
- package/js/es-modules/masters/modules/broken-axis.src.js +1 -1
- package/js/es-modules/masters/modules/current-date-indicator.src.js +12 -0
- package/js/es-modules/masters/modules/data.src.js +1 -1
- package/js/es-modules/masters/modules/draggable-points.src.js +9 -0
- package/js/es-modules/masters/modules/export-data.src.js +1 -1
- package/js/es-modules/masters/modules/exporting.src.js +1 -1
- package/js/es-modules/masters/modules/funnel.src.js +1 -1
- package/js/es-modules/masters/modules/gantt.src.js +2 -1
- package/js/es-modules/masters/modules/grid-axis.src.js +1 -1
- package/js/es-modules/masters/modules/heatmap.src.js +1 -1
- package/js/es-modules/masters/modules/item-series.src.js +1 -1
- package/js/es-modules/masters/modules/map.src.js +1 -1
- package/js/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
- package/js/es-modules/masters/modules/pathfinder.src.js +12 -0
- package/js/es-modules/masters/modules/sankey.src.js +1 -1
- package/js/es-modules/masters/modules/series-label.src.js +1 -1
- package/js/es-modules/masters/modules/solid-gauge.src.js +1 -1
- package/js/es-modules/masters/modules/stock.src.js +1 -1
- package/js/es-modules/masters/modules/streamgraph.src.js +1 -1
- package/js/es-modules/masters/modules/treegrid.src.js +12 -0
- package/js/es-modules/masters/modules/variwide.src.js +1 -1
- package/js/es-modules/masters/modules/vector.src.js +1 -1
- package/js/es-modules/masters/modules/windbarb.src.js +1 -1
- package/js/es-modules/masters/modules/xrange.src.js +1 -1
- package/js/es-modules/masters/themes/dark-blue.src.js +1 -1
- package/js/es-modules/masters/themes/dark-green.src.js +1 -1
- package/js/es-modules/masters/themes/dark-unica.src.js +1 -1
- package/js/es-modules/masters/themes/gray.src.js +1 -1
- package/js/es-modules/masters/themes/grid-light.src.js +1 -1
- package/js/es-modules/masters/themes/grid.src.js +1 -1
- package/js/es-modules/masters/themes/sand-signika.src.js +1 -1
- package/js/es-modules/masters/themes/skies.src.js +1 -1
- package/js/es-modules/mixins/centered-series.js +36 -5
- package/js/es-modules/mixins/on-series.js +1 -1
- package/js/es-modules/mixins/polygon.js +4 -4
- package/js/es-modules/modules/annotations.src.js +2 -2
- package/js/es-modules/modules/boost-canvas.src.js +19 -8
- package/js/es-modules/modules/boost.src.js +300 -137
- package/js/es-modules/modules/broken-axis.src.js +169 -134
- package/js/es-modules/modules/bullet.src.js +2 -2
- package/js/es-modules/modules/data.src.js +8 -6
- package/js/es-modules/modules/draggable-points.src.js +2257 -0
- package/js/es-modules/modules/drilldown.src.js +4 -2
- package/js/es-modules/modules/export-data.src.js +11 -1
- package/js/es-modules/modules/exporting.src.js +62 -36
- package/js/es-modules/modules/funnel.src.js +5 -5
- package/js/es-modules/modules/histogram.src.js +30 -28
- package/js/es-modules/modules/item-series.src.js +36 -11
- package/js/es-modules/modules/keyboard-navigation.src.js +81 -44
- package/js/es-modules/modules/no-data-to-display.src.js +5 -5
- package/js/es-modules/modules/oldie.src.js +14 -9
- package/js/es-modules/modules/overlapping-datalabels.src.js +45 -21
- package/js/es-modules/modules/parallel-coordinates.src.js +4 -3
- package/js/es-modules/modules/pareto.src.js +1 -1
- package/js/es-modules/modules/sankey.src.js +23 -7
- package/js/es-modules/modules/series-label.src.js +6 -6
- package/js/es-modules/modules/solid-gauge.src.js +8 -5
- package/js/es-modules/modules/static-scale.src.js +67 -28
- package/js/es-modules/modules/streamgraph.src.js +4 -4
- package/js/es-modules/modules/sunburst.src.js +4 -4
- package/js/es-modules/modules/tilemap.src.js +231 -134
- package/js/es-modules/modules/treemap.src.js +29 -26
- package/js/es-modules/modules/variable-pie.src.js +3 -3
- package/js/es-modules/modules/variwide.src.js +36 -24
- package/js/es-modules/modules/vector.src.js +98 -28
- package/js/es-modules/modules/windbarb.src.js +4 -4
- package/js/es-modules/modules/wordcloud.src.js +133 -48
- package/js/es-modules/modules/xrange.src.js +256 -69
- package/js/es-modules/parts/AreaSeries.js +83 -50
- package/js/es-modules/parts/AreaSplineSeries.js +66 -29
- package/js/es-modules/parts/Axis.js +2089 -694
- package/js/es-modules/parts/BarSeries.js +70 -53
- package/js/es-modules/parts/CandlestickSeries.js +20 -10
- package/js/es-modules/parts/Chart.js +349 -157
- package/js/es-modules/parts/Color.js +74 -25
- package/js/es-modules/parts/ColumnSeries.js +241 -128
- package/js/es-modules/parts/DataGrouping.js +36 -3
- package/js/es-modules/parts/DataLabels.js +287 -116
- package/js/es-modules/parts/DateTimeAxis.js +27 -5
- package/js/es-modules/parts/Dynamics.js +236 -144
- package/js/es-modules/parts/FlagsSeries.js +49 -7
- package/js/es-modules/parts/Globals.js +4 -3
- package/js/es-modules/parts/Html.js +82 -16
- package/js/es-modules/parts/Interaction.js +187 -67
- package/js/es-modules/parts/Legend.js +181 -31
- package/js/es-modules/parts/LogarithmicAxis.js +36 -3
- package/js/es-modules/parts/MSPointer.js +31 -4
- package/js/es-modules/parts/Navigator.js +432 -162
- package/js/es-modules/parts/OHLCSeries.js +5 -5
- package/js/es-modules/parts/Options.js +855 -592
- package/js/es-modules/parts/OrdinalAxis.js +20 -6
- package/js/es-modules/parts/PieSeries.js +247 -134
- package/js/es-modules/parts/PlotBandSeries.experimental.js +2 -2
- package/js/es-modules/parts/PlotLineOrBand.js +671 -35
- package/js/es-modules/parts/Point.js +182 -70
- package/js/es-modules/parts/Pointer.js +263 -62
- package/js/es-modules/parts/RangeSelector.js +579 -91
- package/js/es-modules/parts/Responsive.js +82 -36
- package/js/es-modules/parts/ScatterSeries.js +58 -27
- package/js/es-modules/parts/ScrollablePlotArea.js +30 -9
- package/js/es-modules/parts/Scrollbar.js +201 -71
- package/js/es-modules/parts/Series.js +995 -745
- package/js/es-modules/parts/SplineSeries.js +53 -31
- package/js/es-modules/parts/Stacking.js +108 -7
- package/js/es-modules/parts/StockChart.js +26 -8
- package/js/es-modules/parts/SvgRenderer.js +1208 -598
- package/js/es-modules/parts/Tick.js +164 -30
- package/js/es-modules/parts/Time.js +171 -71
- package/js/es-modules/parts/Tooltip.js +276 -49
- package/js/es-modules/parts/TouchPointer.js +70 -3
- package/js/es-modules/parts/Utilities.js +1024 -429
- package/js/es-modules/parts-3d/Axis.js +4 -3
- package/js/es-modules/parts-3d/Chart.js +8 -9
- package/js/es-modules/parts-3d/Column.js +1 -1
- package/js/es-modules/parts-3d/Math.js +1 -1
- package/js/es-modules/parts-3d/Pie.js +1 -1
- package/js/es-modules/parts-3d/SVGRenderer.js +13 -10
- package/js/es-modules/parts-3d/Scatter.js +4 -4
- package/js/es-modules/parts-3d/Series.js +1 -1
- package/js/es-modules/parts-3d/VMLRenderer.js +1 -1
- package/js/es-modules/parts-gantt/ArrowSymbols.js +110 -0
- package/js/es-modules/parts-gantt/CurrentDateIndicator.js +92 -0
- package/js/es-modules/parts-gantt/GanttChart.js +111 -0
- package/js/es-modules/parts-gantt/GanttSeries.js +371 -0
- package/js/es-modules/parts-gantt/GridAxis.js +962 -0
- package/js/es-modules/parts-gantt/Pathfinder.js +1225 -0
- package/js/es-modules/parts-gantt/PathfinderAlgorithms.js +746 -0
- package/js/es-modules/parts-gantt/Tree.js +146 -0
- package/js/es-modules/parts-gantt/TreeGrid.js +891 -0
- package/js/es-modules/parts-map/ColorAxis.js +4 -5
- package/js/es-modules/parts-map/ColorSeriesMixin.js +3 -1
- package/js/es-modules/parts-map/GeoJSON.js +1 -1
- package/js/es-modules/parts-map/HeatmapSeries.js +124 -54
- package/js/es-modules/parts-map/Map.js +136 -47
- package/js/es-modules/parts-map/MapAxis.js +1 -1
- package/js/es-modules/parts-map/MapBubbleSeries.js +6 -5
- package/js/es-modules/parts-map/MapLineSeries.js +4 -4
- package/js/es-modules/parts-map/MapNavigation.js +50 -12
- package/js/es-modules/parts-map/MapPointSeries.js +3 -3
- package/js/es-modules/parts-map/MapPointer.js +1 -1
- package/js/es-modules/parts-map/MapSeries.js +5 -5
- package/js/es-modules/parts-more/AreaRangeSeries.js +82 -40
- package/js/es-modules/parts-more/AreaSplineRangeSeries.js +3 -3
- package/js/es-modules/parts-more/BoxPlotSeries.js +3 -3
- package/js/es-modules/parts-more/BubbleSeries.js +9 -4
- package/js/es-modules/parts-more/ColumnRangeSeries.js +3 -3
- package/js/es-modules/parts-more/ErrorBarSeries.js +6 -4
- package/js/es-modules/parts-more/GaugeSeries.js +3 -3
- package/js/es-modules/parts-more/Pane.js +3 -2
- package/js/es-modules/parts-more/Polar.js +1 -1
- package/js/es-modules/parts-more/PolygonSeries.js +3 -3
- package/js/es-modules/parts-more/RadialAxis.js +5 -4
- package/js/es-modules/parts-more/WaterfallSeries.js +9 -4
- package/js/es-modules/supplemental.docs.js +0 -1955
- package/js/es-modules/themes/dark-blue.js +1 -1
- package/js/es-modules/themes/dark-green.js +1 -1
- package/js/es-modules/themes/dark-unica.js +1 -1
- package/js/es-modules/themes/gray.js +1 -1
- package/js/es-modules/themes/grid-light.js +1 -1
- package/js/es-modules/themes/grid.js +1 -1
- package/js/es-modules/themes/sand-signika.js +1 -1
- package/js/es-modules/themes/skies.js +1 -1
- package/js/highcharts-3d.js +75 -74
- package/js/highcharts-3d.js.map +1 -8
- package/js/highcharts-3d.src.js +39 -32
- package/js/highcharts-gantt.js +480 -0
- package/js/highcharts-gantt.js.map +1 -0
- package/js/highcharts-gantt.src.js +47011 -0
- package/js/highcharts-more.js +63 -61
- package/js/highcharts-more.js.map +1 -8
- package/js/highcharts-more.src.js +135 -75
- package/js/highcharts.js +396 -387
- package/js/highcharts.js.map +1 -8
- package/js/highcharts.src.js +10765 -4659
- package/js/highmaps.js +419 -411
- package/js/highmaps.js.map +1 -8
- package/js/highmaps.src.js +10198 -4285
- package/js/highstock.js +529 -516
- package/js/highstock.js.map +1 -8
- package/js/highstock.src.js +12108 -4962
- package/js/indicators/accumulation-distribution.js +4 -3
- package/js/indicators/accumulation-distribution.js.map +1 -8
- package/js/indicators/accumulation-distribution.src.js +6 -2
- package/js/indicators/atr.js +4 -3
- package/js/indicators/atr.js.map +1 -8
- package/js/indicators/atr.src.js +6 -2
- package/js/indicators/bollinger-bands.js +7 -6
- package/js/indicators/bollinger-bands.js.map +1 -8
- package/js/indicators/bollinger-bands.src.js +7 -3
- package/js/indicators/cci.js +4 -3
- package/js/indicators/cci.js.map +1 -8
- package/js/indicators/cci.src.js +6 -2
- package/js/indicators/cmf.js +5 -4
- package/js/indicators/cmf.js.map +1 -8
- package/js/indicators/cmf.src.js +6 -2
- package/js/indicators/ema.js +4 -3
- package/js/indicators/ema.js.map +1 -8
- package/js/indicators/ema.src.js +6 -2
- package/js/indicators/ichimoku-kinko-hyo.js +10 -9
- package/js/indicators/ichimoku-kinko-hyo.js.map +1 -8
- package/js/indicators/ichimoku-kinko-hyo.src.js +6 -2
- package/js/indicators/indicators.js +6 -5
- package/js/indicators/indicators.js.map +1 -8
- package/js/indicators/indicators.src.js +34 -15
- package/js/indicators/macd.js +11 -10
- package/js/indicators/macd.js.map +1 -8
- package/js/indicators/macd.src.js +10 -6
- package/js/indicators/mfi.js +5 -3
- package/js/indicators/mfi.js.map +1 -8
- package/js/indicators/mfi.src.js +6 -2
- package/js/indicators/momentum.js +4 -3
- package/js/indicators/momentum.js.map +1 -8
- package/js/indicators/momentum.src.js +7 -3
- package/js/indicators/pivot-points.js +8 -7
- package/js/indicators/pivot-points.js.map +1 -8
- package/js/indicators/pivot-points.src.js +12 -3
- package/js/indicators/price-envelopes.js +7 -6
- package/js/indicators/price-envelopes.js.map +1 -8
- package/js/indicators/price-envelopes.src.js +7 -3
- package/js/indicators/psar.js +5 -4
- package/js/indicators/psar.js.map +1 -8
- package/js/indicators/psar.src.js +6 -2
- package/js/indicators/roc.js +4 -3
- package/js/indicators/roc.js.map +1 -8
- package/js/indicators/roc.src.js +6 -2
- package/js/indicators/rsi.js +4 -3
- package/js/indicators/rsi.js.map +1 -8
- package/js/indicators/rsi.src.js +6 -2
- package/js/indicators/stochastic.js +7 -5
- package/js/indicators/stochastic.js.map +1 -8
- package/js/indicators/stochastic.src.js +14 -8
- package/js/indicators/volume-by-price.js +13 -12
- package/js/indicators/volume-by-price.js.map +1 -8
- package/js/indicators/volume-by-price.src.js +6 -2
- package/js/indicators/vwap.js +4 -3
- package/js/indicators/vwap.js.map +1 -8
- package/js/indicators/vwap.src.js +6 -2
- package/js/indicators/wma.js +4 -3
- package/js/indicators/wma.js.map +1 -8
- package/js/indicators/wma.src.js +6 -2
- package/js/indicators/zigzag.js +5 -3
- package/js/indicators/zigzag.js.map +1 -8
- package/js/indicators/zigzag.src.js +6 -2
- package/js/modules/accessibility.js +52 -51
- package/js/modules/accessibility.js.map +1 -8
- package/js/modules/accessibility.src.js +86 -45
- package/js/modules/annotations.js +22 -21
- package/js/modules/annotations.js.map +1 -8
- package/js/modules/annotations.src.js +8 -4
- package/js/modules/arrow-symbols.js +13 -0
- package/js/modules/arrow-symbols.js.map +1 -0
- package/js/modules/arrow-symbols.src.js +138 -0
- package/js/modules/boost-canvas.js +15 -13
- package/js/modules/boost-canvas.js.map +1 -8
- package/js/modules/boost-canvas.src.js +24 -9
- package/js/modules/boost.js +57 -52
- package/js/modules/boost.js.map +1 -8
- package/js/modules/boost.src.js +305 -138
- package/js/modules/broken-axis.js +12 -10
- package/js/modules/broken-axis.js.map +1 -8
- package/js/modules/broken-axis.src.js +175 -136
- package/js/modules/bullet.js +3 -2
- package/js/modules/bullet.js.map +1 -8
- package/js/modules/bullet.src.js +7 -3
- package/js/modules/current-date-indicator.js +13 -0
- package/js/modules/current-date-indicator.js.map +1 -0
- package/js/modules/current-date-indicator.src.js +120 -0
- package/js/modules/data.js +25 -24
- package/js/modules/data.js.map +1 -8
- package/js/modules/data.src.js +14 -8
- package/js/modules/drag-panes.js +9 -8
- package/js/modules/drag-panes.js.map +1 -8
- package/js/modules/drag-panes.src.js +5 -1
- package/js/modules/draggable-points.js +38 -0
- package/js/modules/draggable-points.js.map +1 -0
- package/js/modules/draggable-points.src.js +2281 -0
- package/js/modules/drilldown.js +20 -19
- package/js/modules/drilldown.js.map +1 -8
- package/js/modules/drilldown.src.js +9 -3
- package/js/modules/export-data.js +20 -19
- package/js/modules/export-data.js.map +1 -8
- package/js/modules/export-data.src.js +17 -3
- package/js/modules/exporting.js +24 -23
- package/js/modules/exporting.js.map +1 -8
- package/js/modules/exporting.src.js +68 -38
- package/js/modules/funnel.js +8 -6
- package/js/modules/funnel.js.map +1 -8
- package/js/modules/funnel.src.js +11 -7
- package/js/modules/gantt.js +81 -18
- package/js/modules/gantt.js.map +1 -8
- package/js/modules/gantt.src.js +5494 -372
- package/js/modules/grid-axis.js +16 -10
- package/js/modules/grid-axis.js.map +1 -8
- package/js/modules/grid-axis.src.js +735 -293
- package/js/modules/heatmap.js +22 -21
- package/js/modules/heatmap.js.map +1 -8
- package/js/modules/heatmap.src.js +137 -62
- package/js/modules/histogram-bellcurve.js +9 -8
- package/js/modules/histogram-bellcurve.js.map +1 -8
- package/js/modules/histogram-bellcurve.src.js +35 -29
- package/js/modules/item-series.js +6 -4
- package/js/modules/item-series.js.map +1 -8
- package/js/modules/item-series.src.js +42 -13
- package/js/modules/map.js +63 -62
- package/js/modules/map.js.map +1 -8
- package/js/modules/map.src.js +353 -145
- package/js/modules/no-data-to-display.js +5 -4
- package/js/modules/no-data-to-display.js.map +1 -8
- package/js/modules/no-data-to-display.src.js +10 -6
- package/js/modules/offline-exporting.js +14 -13
- package/js/modules/offline-exporting.js.map +1 -8
- package/js/modules/offline-exporting.src.js +6 -2
- package/js/modules/oldie.js +29 -27
- package/js/modules/oldie.js.map +1 -8
- package/js/modules/oldie.src.js +20 -11
- package/js/modules/overlapping-datalabels.js +4 -3
- package/js/modules/overlapping-datalabels.js.map +1 -8
- package/js/modules/overlapping-datalabels.src.js +6 -2
- package/js/modules/parallel-coordinates.js +10 -9
- package/js/modules/parallel-coordinates.js.map +1 -8
- package/js/modules/parallel-coordinates.src.js +9 -4
- package/js/modules/pareto.js +5 -4
- package/js/modules/pareto.js.map +1 -8
- package/js/modules/pareto.src.js +6 -2
- package/js/modules/pathfinder.js +34 -0
- package/js/modules/pathfinder.js.map +1 -0
- package/js/modules/pathfinder.src.js +2106 -0
- package/js/modules/pattern-fill.js +13 -12
- package/js/modules/pattern-fill.js.map +1 -8
- package/js/modules/pattern-fill.src.js +5 -1
- package/js/modules/sankey.js +13 -12
- package/js/modules/sankey.js.map +1 -8
- package/js/modules/sankey.src.js +29 -9
- package/js/modules/series-label.js +17 -15
- package/js/modules/series-label.js.map +1 -8
- package/js/modules/series-label.src.js +12 -8
- package/js/modules/solid-gauge.js +9 -8
- package/js/modules/solid-gauge.js.map +1 -8
- package/js/modules/solid-gauge.src.js +14 -7
- package/js/modules/static-scale.js +4 -3
- package/js/modules/static-scale.js.map +1 -8
- package/js/modules/static-scale.src.js +69 -26
- package/js/modules/stock.js +136 -132
- package/js/modules/stock.js.map +1 -8
- package/js/modules/stock.src.js +1543 -499
- package/js/modules/streamgraph.js +4 -3
- package/js/modules/streamgraph.js.map +1 -8
- package/js/modules/streamgraph.src.js +10 -6
- package/js/modules/sunburst.js +40 -39
- package/js/modules/sunburst.js.map +1 -8
- package/js/modules/sunburst.src.js +38 -31
- package/js/modules/tilemap.js +19 -18
- package/js/modules/tilemap.js.map +1 -8
- package/js/modules/tilemap.src.js +363 -190
- package/js/modules/treegrid.js +51 -0
- package/js/modules/treegrid.js.map +1 -0
- package/js/modules/treegrid.src.js +2759 -0
- package/js/modules/treemap.js +27 -26
- package/js/modules/treemap.js.map +1 -8
- package/js/modules/treemap.src.js +34 -27
- package/js/modules/variable-pie.js +8 -7
- package/js/modules/variable-pie.js.map +1 -8
- package/js/modules/variable-pie.src.js +8 -4
- package/js/modules/variwide.js +8 -7
- package/js/modules/variwide.js.map +1 -8
- package/js/modules/variwide.src.js +42 -26
- package/js/modules/vector.js +7 -6
- package/js/modules/vector.js.map +1 -8
- package/js/modules/vector.src.js +104 -30
- package/js/modules/windbarb.js +11 -10
- package/js/modules/windbarb.js.map +1 -8
- package/js/modules/windbarb.src.js +11 -7
- package/js/modules/wordcloud.js +18 -15
- package/js/modules/wordcloud.js.map +1 -8
- package/js/modules/wordcloud.src.js +142 -53
- package/js/modules/xrange.js +12 -10
- package/js/modules/xrange.js.map +1 -8
- package/js/modules/xrange.src.js +262 -71
- package/js/themes/avocado.js +3 -2
- package/js/themes/avocado.js.map +1 -8
- package/js/themes/avocado.src.js +5 -1
- package/js/themes/dark-blue.js +9 -8
- package/js/themes/dark-blue.js.map +1 -8
- package/js/themes/dark-blue.src.js +7 -3
- package/js/themes/dark-green.js +9 -8
- package/js/themes/dark-green.js.map +1 -8
- package/js/themes/dark-green.src.js +7 -3
- package/js/themes/dark-unica.js +9 -7
- package/js/themes/dark-unica.js.map +1 -8
- package/js/themes/dark-unica.src.js +7 -3
- package/js/themes/gray.js +10 -8
- package/js/themes/gray.js.map +1 -8
- package/js/themes/gray.src.js +7 -3
- package/js/themes/grid-light.js +5 -4
- package/js/themes/grid-light.js.map +1 -8
- package/js/themes/grid-light.src.js +7 -3
- package/js/themes/grid.js +6 -5
- package/js/themes/grid.js.map +1 -8
- package/js/themes/grid.src.js +7 -3
- package/js/themes/sand-signika.js +6 -5
- package/js/themes/sand-signika.js.map +1 -8
- package/js/themes/sand-signika.src.js +7 -3
- package/js/themes/skies.js +6 -5
- package/js/themes/skies.js.map +1 -8
- package/js/themes/skies.src.js +7 -3
- package/js/themes/sunset.js +3 -2
- package/js/themes/sunset.js.map +1 -8
- package/js/themes/sunset.src.js +5 -1
- package/modules/accessibility.js +53 -51
- package/modules/accessibility.js.map +1 -8
- package/modules/accessibility.src.js +86 -45
- package/modules/annotations.js +24 -22
- package/modules/annotations.js.map +1 -8
- package/modules/annotations.src.js +8 -4
- package/modules/arrow-symbols.js +13 -0
- package/modules/arrow-symbols.js.map +1 -0
- package/modules/arrow-symbols.src.js +138 -0
- package/modules/boost-canvas.js +15 -13
- package/modules/boost-canvas.js.map +1 -8
- package/modules/boost-canvas.src.js +24 -9
- package/modules/boost.js +57 -52
- package/modules/boost.js.map +1 -8
- package/modules/boost.src.js +305 -138
- package/modules/broken-axis.js +12 -10
- package/modules/broken-axis.js.map +1 -8
- package/modules/broken-axis.src.js +175 -136
- package/modules/bullet.js +6 -5
- package/modules/bullet.js.map +1 -8
- package/modules/bullet.src.js +7 -3
- package/modules/current-date-indicator.js +13 -0
- package/modules/current-date-indicator.js.map +1 -0
- package/modules/current-date-indicator.src.js +120 -0
- package/modules/data.js +25 -24
- package/modules/data.js.map +1 -8
- package/modules/data.src.js +14 -8
- package/modules/drag-panes.js +9 -8
- package/modules/drag-panes.js.map +1 -8
- package/modules/drag-panes.src.js +5 -1
- package/modules/draggable-points.js +38 -0
- package/modules/draggable-points.js.map +1 -0
- package/modules/draggable-points.src.js +2281 -0
- package/modules/drilldown.js +16 -15
- package/modules/drilldown.js.map +1 -8
- package/modules/drilldown.src.js +9 -3
- package/modules/export-data.js +20 -19
- package/modules/export-data.js.map +1 -8
- package/modules/export-data.src.js +17 -3
- package/modules/exporting.js +23 -21
- package/modules/exporting.js.map +1 -8
- package/modules/exporting.src.js +68 -38
- package/modules/funnel.js +8 -7
- package/modules/funnel.js.map +1 -8
- package/modules/funnel.src.js +11 -7
- package/modules/gantt.js +84 -19
- package/modules/gantt.js.map +1 -8
- package/modules/gantt.src.js +5557 -379
- package/modules/grid-axis.js +17 -10
- package/modules/grid-axis.js.map +1 -8
- package/modules/grid-axis.src.js +736 -293
- package/modules/heatmap.js +22 -21
- package/modules/heatmap.js.map +1 -8
- package/modules/heatmap.src.js +139 -63
- package/modules/histogram-bellcurve.js +9 -8
- package/modules/histogram-bellcurve.js.map +1 -8
- package/modules/histogram-bellcurve.src.js +35 -29
- package/modules/item-series.js +6 -4
- package/modules/item-series.js.map +1 -8
- package/modules/item-series.src.js +42 -13
- package/modules/map.js +65 -64
- package/modules/map.js.map +1 -8
- package/modules/map.src.js +365 -152
- package/modules/no-data-to-display.js +5 -4
- package/modules/no-data-to-display.js.map +1 -8
- package/modules/no-data-to-display.src.js +10 -6
- package/modules/offline-exporting.js +14 -12
- package/modules/offline-exporting.js.map +1 -8
- package/modules/offline-exporting.src.js +6 -2
- package/modules/oldie.js +29 -27
- package/modules/oldie.js.map +1 -8
- package/modules/oldie.src.js +20 -11
- package/modules/overlapping-datalabels.js +4 -3
- package/modules/overlapping-datalabels.js.map +1 -8
- package/modules/overlapping-datalabels.src.js +6 -2
- package/modules/parallel-coordinates.js +10 -9
- package/modules/parallel-coordinates.js.map +1 -8
- package/modules/parallel-coordinates.src.js +9 -4
- package/modules/pareto.js +5 -4
- package/modules/pareto.js.map +1 -8
- package/modules/pareto.src.js +6 -2
- package/modules/pathfinder.js +35 -0
- package/modules/pathfinder.js.map +1 -0
- package/modules/pathfinder.src.js +2128 -0
- package/modules/pattern-fill.js +13 -12
- package/modules/pattern-fill.js.map +1 -8
- package/modules/pattern-fill.src.js +5 -1
- package/modules/sankey.js +13 -12
- package/modules/sankey.js.map +1 -8
- package/modules/sankey.src.js +34 -12
- package/modules/series-label.js +17 -15
- package/modules/series-label.js.map +1 -8
- package/modules/series-label.src.js +12 -8
- package/modules/solid-gauge.js +9 -8
- package/modules/solid-gauge.js.map +1 -8
- package/modules/solid-gauge.src.js +16 -9
- package/modules/static-scale.js +4 -3
- package/modules/static-scale.js.map +1 -8
- package/modules/static-scale.src.js +69 -26
- package/modules/stock.js +143 -139
- package/modules/stock.js.map +1 -8
- package/modules/stock.src.js +1701 -566
- package/modules/streamgraph.js +4 -3
- package/modules/streamgraph.js.map +1 -8
- package/modules/streamgraph.src.js +10 -6
- package/modules/sunburst.js +42 -41
- package/modules/sunburst.js.map +1 -8
- package/modules/sunburst.src.js +39 -32
- package/modules/tilemap.js +18 -17
- package/modules/tilemap.js.map +1 -8
- package/modules/tilemap.src.js +365 -191
- package/modules/treegrid.js +52 -0
- package/modules/treegrid.js.map +1 -0
- package/modules/treegrid.src.js +2797 -0
- package/modules/treemap.js +29 -28
- package/modules/treemap.js.map +1 -8
- package/modules/treemap.src.js +35 -28
- package/modules/variable-pie.js +8 -7
- package/modules/variable-pie.js.map +1 -8
- package/modules/variable-pie.src.js +8 -4
- package/modules/variwide.js +8 -7
- package/modules/variwide.js.map +1 -8
- package/modules/variwide.src.js +42 -26
- package/modules/vector.js +7 -6
- package/modules/vector.js.map +1 -8
- package/modules/vector.src.js +104 -30
- package/modules/windbarb.js +11 -10
- package/modules/windbarb.js.map +1 -8
- package/modules/windbarb.src.js +11 -7
- package/modules/wordcloud.js +18 -15
- package/modules/wordcloud.js.map +1 -8
- package/modules/wordcloud.src.js +142 -53
- package/modules/xrange.js +13 -11
- package/modules/xrange.js.map +1 -8
- package/modules/xrange.src.js +264 -80
- package/package.json +1 -1
- package/themes/avocado.js +3 -2
- package/themes/avocado.js.map +1 -8
- package/themes/avocado.src.js +5 -1
- package/themes/dark-blue.js +9 -8
- package/themes/dark-blue.js.map +1 -8
- package/themes/dark-blue.src.js +7 -3
- package/themes/dark-green.js +9 -8
- package/themes/dark-green.js.map +1 -8
- package/themes/dark-green.src.js +7 -3
- package/themes/dark-unica.js +9 -7
- package/themes/dark-unica.js.map +1 -8
- package/themes/dark-unica.src.js +7 -3
- package/themes/gray.js +10 -8
- package/themes/gray.js.map +1 -8
- package/themes/gray.src.js +7 -3
- package/themes/grid-light.js +5 -4
- package/themes/grid-light.js.map +1 -8
- package/themes/grid-light.src.js +7 -3
- package/themes/grid.js +6 -5
- package/themes/grid.js.map +1 -8
- package/themes/grid.src.js +7 -3
- package/themes/sand-signika.js +6 -5
- package/themes/sand-signika.js.map +1 -8
- package/themes/sand-signika.src.js +7 -3
- package/themes/skies.js +6 -5
- package/themes/skies.js.map +1 -8
- package/themes/skies.src.js +7 -3
- package/themes/sunset.js +3 -2
- package/themes/sunset.js.map +1 -8
- package/themes/sunset.src.js +5 -1
|
@@ -1,10 +1,304 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* (c) 2010-
|
|
2
|
+
* (c) 2010-2018 Torstein Honsi
|
|
3
3
|
*
|
|
4
4
|
* License: www.highcharts.com/license
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Reference to the global SVGElement class as a workaround for a name conflict
|
|
9
|
+
* in the Highcharts namespace.
|
|
10
|
+
*
|
|
11
|
+
* @typedef {global.SVGElement} GlobalSVGElement
|
|
12
|
+
*
|
|
13
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/SVGElement
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* An animation configuration. Animation configurations can also be defined as
|
|
18
|
+
* booleans, where `false` turns off animation and `true` defaults to a duration
|
|
19
|
+
* of 500ms.
|
|
20
|
+
*
|
|
21
|
+
* @typedef Highcharts.AnimationOptionsObject
|
|
22
|
+
*
|
|
23
|
+
* @property {number} duration
|
|
24
|
+
* The animation duration in milliseconds.
|
|
25
|
+
*
|
|
26
|
+
* @property {string} [easing]
|
|
27
|
+
* The name of an easing function as defined on the `Math` object.
|
|
28
|
+
*
|
|
29
|
+
* @property {Function} [complete]
|
|
30
|
+
* A callback function to exectute when the animation finishes.
|
|
31
|
+
*
|
|
32
|
+
* @property {Function} [step]
|
|
33
|
+
* A callback function to execute on each step of each attribute or
|
|
34
|
+
* CSS property that's being animated. The first argument contains
|
|
35
|
+
* information about the animation and progress.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* A style object with camel case property names to define visual appearance of
|
|
40
|
+
* a SVG element or HTML element. The properties can be whatever styles are
|
|
41
|
+
* supported on the given SVG or HTML element.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* {
|
|
45
|
+
* fontFamily: 'monospace',
|
|
46
|
+
* fontSize: '1.2em'
|
|
47
|
+
* }
|
|
48
|
+
*
|
|
49
|
+
* @typedef Highcharts.CSSObject
|
|
50
|
+
*
|
|
51
|
+
* @property {boolean|number|string|undefined} [key:string]
|
|
52
|
+
*
|
|
53
|
+
* @property {string} [background]
|
|
54
|
+
* Background style for the element.
|
|
55
|
+
*
|
|
56
|
+
* @property {Highcharts.ColorString} [backgroundColor]
|
|
57
|
+
* Background color of the element.
|
|
58
|
+
*
|
|
59
|
+
* @property {string} [border]
|
|
60
|
+
* Border style for the element.
|
|
61
|
+
*
|
|
62
|
+
* @property {number} [borderRadius]
|
|
63
|
+
* Radius of the element border.
|
|
64
|
+
*
|
|
65
|
+
* @property {"contrast"|Highcharts.ColorString} [color]
|
|
66
|
+
* Color used in the element. The "contrast" option is a Highcharts
|
|
67
|
+
* custom property that results in black or white, depending on the
|
|
68
|
+
* background of the element.
|
|
69
|
+
*
|
|
70
|
+
* @property {string} [cursor]
|
|
71
|
+
* Style of the mouse cursor when resting over the element.
|
|
72
|
+
*
|
|
73
|
+
* @property {string} [fontFamily]
|
|
74
|
+
* Font family of the element text. Multiple values have to be in
|
|
75
|
+
* decreasing preference order and separated by comma.
|
|
76
|
+
*
|
|
77
|
+
* @property {string} [fontSize]
|
|
78
|
+
* Font size of the element text.
|
|
79
|
+
*
|
|
80
|
+
* @property {string} [fontWeight]
|
|
81
|
+
* Font weight of the element text.
|
|
82
|
+
*
|
|
83
|
+
* @property {number} [height]
|
|
84
|
+
* Height of the element.
|
|
85
|
+
*
|
|
86
|
+
* @property {number} [lineWidth]
|
|
87
|
+
* Width of the element border.
|
|
88
|
+
*
|
|
89
|
+
* @property {number} [opacity]
|
|
90
|
+
* Opacity of the element.
|
|
91
|
+
*
|
|
92
|
+
* @property {string} [padding]
|
|
93
|
+
* Space around the element content.
|
|
94
|
+
*
|
|
95
|
+
* @property {string} [pointerEvents]
|
|
96
|
+
* Behaviour of the element when the mouse cursor rests over it.
|
|
97
|
+
*
|
|
98
|
+
* @property {string} [position]
|
|
99
|
+
* Positioning of the element.
|
|
100
|
+
*
|
|
101
|
+
* @property {string} [textAlign]
|
|
102
|
+
* Alignment of the element text.
|
|
103
|
+
*
|
|
104
|
+
* @property {string} [textOutline]
|
|
105
|
+
* Outline style of the element text.
|
|
106
|
+
*
|
|
107
|
+
* @property {string} [textDecoration]
|
|
108
|
+
* Additional decoration of the element text.
|
|
109
|
+
*
|
|
110
|
+
* @property {string} [textOverflow]
|
|
111
|
+
* Line break style of the element text. Highcharts SVG elements
|
|
112
|
+
* support `ellipsis` when a `width` is set.
|
|
113
|
+
*
|
|
114
|
+
* @property {string} [transition]
|
|
115
|
+
* Animated transition of selected element properties.
|
|
116
|
+
*
|
|
117
|
+
* @property {string} [top]
|
|
118
|
+
* Top spacing of the element relative to the parent element.
|
|
119
|
+
*
|
|
120
|
+
* @property {string} [whiteSpace]
|
|
121
|
+
* Line break style of the element text.
|
|
122
|
+
*
|
|
123
|
+
* @property {number} [width]
|
|
124
|
+
* Width of the element.
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Generic dictionary in TypeScript notation.
|
|
129
|
+
*
|
|
130
|
+
* @typedef Highcharts.Dictionary<T>
|
|
131
|
+
*
|
|
132
|
+
* @property {T} [key:string]
|
|
133
|
+
*/
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* An object of key-value pairs for HTML attributes.
|
|
137
|
+
*
|
|
138
|
+
* @typedef {Highcharts.Dictionary<boolean|number|string>} Highcharts.HTMLAttributes
|
|
139
|
+
*/
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The iterator callback.
|
|
143
|
+
*
|
|
144
|
+
* @callback Highcharts.EachCallbackFunction<T>
|
|
145
|
+
*
|
|
146
|
+
* @param {T} item
|
|
147
|
+
* The array item.
|
|
148
|
+
*
|
|
149
|
+
* @param {number} index
|
|
150
|
+
* The item's index in the array.
|
|
151
|
+
*
|
|
152
|
+
* @param {Array<T>} arr
|
|
153
|
+
* The array that each is being applied to.
|
|
154
|
+
*/
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The function callback to execute when the event is fired. The `this` context
|
|
158
|
+
* contains the instance, that fired the event.
|
|
159
|
+
*
|
|
160
|
+
* @callback Highcharts.EventCallbackFunction
|
|
161
|
+
*
|
|
162
|
+
* @param {Highcharts.Dictionary<*>} [eventArguments]
|
|
163
|
+
* Event arguments.
|
|
164
|
+
*/
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Formats data as a string. Usually the data is accessible throught the `this`
|
|
168
|
+
* keyword.
|
|
169
|
+
*
|
|
170
|
+
* @callback Highcharts.FormatterCallbackFunction
|
|
171
|
+
*
|
|
172
|
+
* @return {string}
|
|
173
|
+
*/
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* An HTML DOM element. The type is a reference to the regular SVGElement in the
|
|
177
|
+
* global scope.
|
|
178
|
+
*
|
|
179
|
+
* @typedef {global.HTMLElement} Highcharts.HTMLDOMElement
|
|
180
|
+
*
|
|
181
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
|
|
182
|
+
*/
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The iterator callback.
|
|
186
|
+
*
|
|
187
|
+
* @callback Highcharts.ObjectEachCallbackFunction
|
|
188
|
+
*
|
|
189
|
+
* @param {*} value
|
|
190
|
+
* The property value.
|
|
191
|
+
*
|
|
192
|
+
* @param {string} key
|
|
193
|
+
* The property key.
|
|
194
|
+
*
|
|
195
|
+
* @param {*} obj
|
|
196
|
+
* The object that objectEach is being applied to.
|
|
197
|
+
*/
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* An object containing `left` and `top` properties for the position in the
|
|
201
|
+
* page.
|
|
202
|
+
*
|
|
203
|
+
* @typedef Highcharts.OffsetObject
|
|
204
|
+
*
|
|
205
|
+
* @property {number} left
|
|
206
|
+
* Left distance to the page border.
|
|
207
|
+
*
|
|
208
|
+
* @property {number} top
|
|
209
|
+
* Top distance to the page border.
|
|
210
|
+
*/
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* An object containing `x` and `y` properties for the position of an element.
|
|
214
|
+
*
|
|
215
|
+
* @typedef Highcharts.PositionObject
|
|
216
|
+
*
|
|
217
|
+
* @property {number} x
|
|
218
|
+
* X position of the element.
|
|
219
|
+
*
|
|
220
|
+
* @property {number} y
|
|
221
|
+
* Y position of the element.
|
|
222
|
+
*/
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* If a number is given, it defines the pixel length. If a percentage string is
|
|
226
|
+
* given, like for example `'50%'`, the setting defines a length relative to a
|
|
227
|
+
* base size, for example the size of a container.
|
|
228
|
+
*
|
|
229
|
+
* @typedef {number|string} Highcharts.RelativeSize
|
|
230
|
+
*/
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* An object of key-value pairs for SVG attributes. Attributes in Highcharts
|
|
234
|
+
* elements for the most parts correspond to SVG, but some are specific to
|
|
235
|
+
* Highcharts, like `zIndex`, `rotation`, `rotationOriginX`,
|
|
236
|
+
* `rotationOriginY`, `translateX`, `translateY`, `scaleX` and `scaleY`. SVG
|
|
237
|
+
* attributes containing a hyphen are _not_ camel-cased, they should be
|
|
238
|
+
* quoted to preserve the hyphen.
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* {
|
|
242
|
+
* 'stroke': '#ff0000', // basic
|
|
243
|
+
* 'stroke-width': 2, // hyphenated
|
|
244
|
+
* 'rotation': 45 // custom
|
|
245
|
+
* 'd': ['M', 10, 10, 'L', 30, 30, 'z'] // path definition, note format
|
|
246
|
+
* }
|
|
247
|
+
*
|
|
248
|
+
* @typedef Highcharts.SVGAttributes
|
|
249
|
+
*
|
|
250
|
+
* @property {boolean|number|string|Array<any>|undefined} [key:string]
|
|
251
|
+
*
|
|
252
|
+
* @property {string|Highcharts.SVGPathArray} [d]
|
|
253
|
+
*
|
|
254
|
+
* @property {boolean} [inverted]
|
|
255
|
+
*
|
|
256
|
+
* @property {Array<number>} [matrix]
|
|
257
|
+
*
|
|
258
|
+
* @property {Highcharts.ColorString} [stroke]
|
|
259
|
+
*
|
|
260
|
+
* @property {string} [rotation]
|
|
261
|
+
*
|
|
262
|
+
* @property {number} [rotationOriginX]
|
|
263
|
+
*
|
|
264
|
+
* @property {number} [rotationOriginY]
|
|
265
|
+
*
|
|
266
|
+
* @property {number} [scaleX]
|
|
267
|
+
*
|
|
268
|
+
* @property {number} [scaleY]
|
|
269
|
+
*
|
|
270
|
+
* @property {number} [translateX]
|
|
271
|
+
*
|
|
272
|
+
* @property {number} [translateY]
|
|
273
|
+
*
|
|
274
|
+
* @property {number} [zIndex]
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* An SVG DOM element. The type is a reference to the regular SVGElement in the
|
|
279
|
+
* global scope.
|
|
280
|
+
*
|
|
281
|
+
* @typedef {global.GlobalSVGElement} Highcharts.SVGDOMElement
|
|
282
|
+
*
|
|
283
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/SVGElement
|
|
284
|
+
*/
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Array of path commands, that will go into the `d` attribute of an SVG
|
|
288
|
+
* element.
|
|
289
|
+
*
|
|
290
|
+
* @typedef {Array<number|Highcharts.SVGPathCommand>} Highcharts.SVGPathArray
|
|
291
|
+
*/
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Possible path commands in a SVG path array.
|
|
295
|
+
*
|
|
296
|
+
* @typedef {string} Highcharts.SVGPathCommand
|
|
297
|
+
* @validvalue ["a","c","h","l","m","q","s","t","v","z","A","C","H","L","M","Q","S","T","V","Z"]
|
|
298
|
+
*/
|
|
299
|
+
|
|
7
300
|
'use strict';
|
|
301
|
+
|
|
8
302
|
import H from './Globals.js';
|
|
9
303
|
|
|
10
304
|
/**
|
|
@@ -28,16 +322,19 @@ var charts = H.charts,
|
|
|
28
322
|
* Provide error messages for debugging, with links to online explanation. This
|
|
29
323
|
* function can be overridden to provide custom error handling.
|
|
30
324
|
*
|
|
31
|
-
* @
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* for available codes. If it is a string, the error message is printed
|
|
36
|
-
* directly in the console.
|
|
37
|
-
* @param {Boolean} [stop=false] - Whether to throw an error or just log a
|
|
38
|
-
* warning in the console.
|
|
325
|
+
* @sample highcharts/chart/highcharts-error/
|
|
326
|
+
* Custom error handler
|
|
327
|
+
*
|
|
328
|
+
* @function Highcharts.error
|
|
39
329
|
*
|
|
40
|
-
* @
|
|
330
|
+
* @param {number|string} code
|
|
331
|
+
* The error code. See
|
|
332
|
+
* [errors.xml]{@link https://github.com/highcharts/highcharts/blob/master/errors/errors.xml}
|
|
333
|
+
* for available codes. If it is a string, the error message is printed
|
|
334
|
+
* directly in the console.
|
|
335
|
+
*
|
|
336
|
+
* @param {boolean} [stop=false]
|
|
337
|
+
* Whether to throw an error or just log a warning in the console.
|
|
41
338
|
*/
|
|
42
339
|
H.error = function (code, stop) {
|
|
43
340
|
var msg = H.isNumber(code) ?
|
|
@@ -57,16 +354,21 @@ H.error = function (code, stop) {
|
|
|
57
354
|
* (attribute or style prop) on one element. Animation is always initiated
|
|
58
355
|
* through {@link SVGElement#animate}.
|
|
59
356
|
*
|
|
60
|
-
* @constructor Fx
|
|
61
|
-
* @memberof Highcharts
|
|
62
|
-
* @param {HTMLDOMElement|SVGElement} elem - The element to animate.
|
|
63
|
-
* @param {AnimationOptions} options - Animation options.
|
|
64
|
-
* @param {string} prop - The single attribute or CSS property to animate.
|
|
65
|
-
* @private
|
|
66
|
-
*
|
|
67
357
|
* @example
|
|
68
358
|
* var rect = renderer.rect(0, 0, 10, 10).add();
|
|
69
359
|
* rect.animate({ width: 100 });
|
|
360
|
+
*
|
|
361
|
+
* @private
|
|
362
|
+
* @class Highcharts.Fx
|
|
363
|
+
*
|
|
364
|
+
* @param {Highcharts.HTMLDOMElement|Highcharts.SVGElement} elem
|
|
365
|
+
* The element to animate.
|
|
366
|
+
*
|
|
367
|
+
* @param {Highcharts.AnimationOptionsObject} options
|
|
368
|
+
* Animation options.
|
|
369
|
+
*
|
|
370
|
+
* @param {string} prop
|
|
371
|
+
* The single attribute or CSS property to animate.
|
|
70
372
|
*/
|
|
71
373
|
H.Fx = function (elem, options, prop) {
|
|
72
374
|
this.options = options;
|
|
@@ -78,8 +380,7 @@ H.Fx.prototype = {
|
|
|
78
380
|
/**
|
|
79
381
|
* Set the current step of a path definition on SVGElement.
|
|
80
382
|
*
|
|
81
|
-
* @function #dSetter
|
|
82
|
-
* @memberof Highcharts.Fx
|
|
383
|
+
* @function Highcharts.Fx#dSetter
|
|
83
384
|
*/
|
|
84
385
|
dSetter: function () {
|
|
85
386
|
var start = this.paths[0],
|
|
@@ -112,8 +413,7 @@ H.Fx.prototype = {
|
|
|
112
413
|
/**
|
|
113
414
|
* Update the element with the current animation step.
|
|
114
415
|
*
|
|
115
|
-
* @function #update
|
|
116
|
-
* @memberof Highcharts.Fx
|
|
416
|
+
* @function Highcharts.Fx#update
|
|
117
417
|
*/
|
|
118
418
|
update: function () {
|
|
119
419
|
var elem = this.elem,
|
|
@@ -145,12 +445,16 @@ H.Fx.prototype = {
|
|
|
145
445
|
/**
|
|
146
446
|
* Run an animation.
|
|
147
447
|
*
|
|
148
|
-
* @function #run
|
|
149
|
-
*
|
|
150
|
-
* @param {
|
|
151
|
-
*
|
|
152
|
-
* @param {String} [unit] - The property unit, for example `px`.
|
|
448
|
+
* @function Highcharts.Fx#run
|
|
449
|
+
*
|
|
450
|
+
* @param {number} from
|
|
451
|
+
* The current value, value to start from.
|
|
153
452
|
*
|
|
453
|
+
* @param {number} to
|
|
454
|
+
* The end value, value to land on.
|
|
455
|
+
*
|
|
456
|
+
* @param {string} [unit]
|
|
457
|
+
* The property unit, for example `px`.
|
|
154
458
|
*/
|
|
155
459
|
run: function (from, to, unit) {
|
|
156
460
|
var self = this,
|
|
@@ -200,11 +504,13 @@ H.Fx.prototype = {
|
|
|
200
504
|
/**
|
|
201
505
|
* Run a single step in the animation.
|
|
202
506
|
*
|
|
203
|
-
* @function #step
|
|
204
|
-
*
|
|
205
|
-
* @param
|
|
206
|
-
*
|
|
207
|
-
*
|
|
507
|
+
* @function Highcharts.Fx#step
|
|
508
|
+
*
|
|
509
|
+
* @param {boolean} [gotoEnd]
|
|
510
|
+
* Whether to go to the endpoint of the animation after abort.
|
|
511
|
+
*
|
|
512
|
+
* @return {boolean}
|
|
513
|
+
* Returns `true` if animation continues.
|
|
208
514
|
*/
|
|
209
515
|
step: function (gotoEnd) {
|
|
210
516
|
var t = +new Date(),
|
|
@@ -251,13 +557,20 @@ H.Fx.prototype = {
|
|
|
251
557
|
/**
|
|
252
558
|
* Prepare start and end values so that the path can be animated one to one.
|
|
253
559
|
*
|
|
254
|
-
* @function #initPath
|
|
255
|
-
*
|
|
256
|
-
* @param {SVGElement} elem
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
* @
|
|
260
|
-
*
|
|
560
|
+
* @function Highcharts.Fx#initPath
|
|
561
|
+
*
|
|
562
|
+
* @param {Highcharts.SVGElement} elem
|
|
563
|
+
* The SVGElement item.
|
|
564
|
+
*
|
|
565
|
+
* @param {string} fromD
|
|
566
|
+
* Starting path definition.
|
|
567
|
+
*
|
|
568
|
+
* @param {Highcharts.SVGPathArray} toD
|
|
569
|
+
* Ending path definition.
|
|
570
|
+
*
|
|
571
|
+
* @return {Array<Highcharts.SVGPathArray>}
|
|
572
|
+
* An array containing start and end paths in array form so that
|
|
573
|
+
* they can be animated in parallel.
|
|
261
574
|
*/
|
|
262
575
|
initPath: function (elem, fromD, toD) {
|
|
263
576
|
fromD = fromD || '';
|
|
@@ -335,7 +648,7 @@ H.Fx.prototype = {
|
|
|
335
648
|
}
|
|
336
649
|
|
|
337
650
|
/**
|
|
338
|
-
* Copy and append last point until the length matches the end length
|
|
651
|
+
* Copy and append last point until the length matches the end length.
|
|
339
652
|
*/
|
|
340
653
|
function append(arr, other) {
|
|
341
654
|
var i = (fullLength - arr.length) / numParams;
|
|
@@ -413,38 +726,74 @@ H.Fx.prototype = {
|
|
|
413
726
|
}
|
|
414
727
|
|
|
415
728
|
return [start, end];
|
|
729
|
+
},
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Handle animation of the color attributes directly.
|
|
733
|
+
*
|
|
734
|
+
* @function Highcharts.Fx#fillSetter
|
|
735
|
+
*/
|
|
736
|
+
fillSetter: function () {
|
|
737
|
+
H.Fx.prototype.strokeSetter.apply(this, arguments);
|
|
738
|
+
},
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Handle animation of the color attributes directly.
|
|
742
|
+
*
|
|
743
|
+
* @function Highcharts.Fx#strokeSetter
|
|
744
|
+
*/
|
|
745
|
+
strokeSetter: function () {
|
|
746
|
+
this.elem.attr(
|
|
747
|
+
this.prop,
|
|
748
|
+
H.color(this.start).tweenTo(H.color(this.end), this.pos),
|
|
749
|
+
null,
|
|
750
|
+
true
|
|
751
|
+
);
|
|
416
752
|
}
|
|
753
|
+
|
|
417
754
|
}; // End of Fx prototype
|
|
418
755
|
|
|
419
|
-
/**
|
|
420
|
-
* Handle animation of the color attributes directly.
|
|
421
|
-
*/
|
|
422
|
-
H.Fx.prototype.fillSetter =
|
|
423
|
-
H.Fx.prototype.strokeSetter = function () {
|
|
424
|
-
this.elem.attr(
|
|
425
|
-
this.prop,
|
|
426
|
-
H.color(this.start).tweenTo(H.color(this.end), this.pos),
|
|
427
|
-
null,
|
|
428
|
-
true
|
|
429
|
-
);
|
|
430
|
-
};
|
|
431
756
|
|
|
432
757
|
|
|
433
758
|
/**
|
|
759
|
+
* Utility function to deep merge two or more objects and return a third object.
|
|
760
|
+
* The merge function can also be used with a single object argument to create a
|
|
761
|
+
* deep copy of an object.
|
|
762
|
+
*
|
|
763
|
+
* @function Highcharts.merge
|
|
764
|
+
*
|
|
765
|
+
* @param {*} a
|
|
766
|
+
* The first object to extend. When only this is given, the function
|
|
767
|
+
* returns a deep copy.
|
|
768
|
+
*
|
|
769
|
+
* @param {*} [n]
|
|
770
|
+
* An object to merge into the previous one.
|
|
771
|
+
*
|
|
772
|
+
* @return {*}
|
|
773
|
+
* The merged object. If the first argument is true, the return is the
|
|
774
|
+
* same as the second argument.
|
|
775
|
+
*//**
|
|
434
776
|
* Utility function to deep merge two or more objects and return a third object.
|
|
435
777
|
* If the first argument is true, the contents of the second object is copied
|
|
436
778
|
* into the first object. The merge function can also be used with a single
|
|
437
779
|
* object argument to create a deep copy of an object.
|
|
438
780
|
*
|
|
439
|
-
* @function
|
|
440
|
-
*
|
|
441
|
-
* @param {
|
|
442
|
-
|
|
443
|
-
*
|
|
444
|
-
|
|
445
|
-
* @param {
|
|
446
|
-
*
|
|
447
|
-
*
|
|
781
|
+
* @function Highcharts.merge
|
|
782
|
+
*
|
|
783
|
+
* @param {boolean} extend
|
|
784
|
+
* Whether to extend the left-side object (a) or return a whole new
|
|
785
|
+
* object.
|
|
786
|
+
*
|
|
787
|
+
* @param {*} a
|
|
788
|
+
* The first object to extend. When only this is given, the function
|
|
789
|
+
* returns a deep copy.
|
|
790
|
+
*
|
|
791
|
+
* @param {*} [n]
|
|
792
|
+
* An object to merge into the previous one.
|
|
793
|
+
*
|
|
794
|
+
* @return {*}
|
|
795
|
+
* The merged object. If the first argument is true, the return is the
|
|
796
|
+
* same as the second argument.
|
|
448
797
|
*/
|
|
449
798
|
H.merge = function () {
|
|
450
799
|
var i,
|
|
@@ -493,9 +842,16 @@ H.merge = function () {
|
|
|
493
842
|
|
|
494
843
|
/**
|
|
495
844
|
* Shortcut for parseInt
|
|
496
|
-
*
|
|
497
|
-
* @
|
|
498
|
-
* @
|
|
845
|
+
*
|
|
846
|
+
* @private
|
|
847
|
+
* @function Highcharts.pInt
|
|
848
|
+
*
|
|
849
|
+
* @param {*} s
|
|
850
|
+
*
|
|
851
|
+
* @param {number} mag
|
|
852
|
+
* Magnitude
|
|
853
|
+
*
|
|
854
|
+
* @return {number}
|
|
499
855
|
*/
|
|
500
856
|
H.pInt = function (s, mag) {
|
|
501
857
|
return parseInt(s, mag || 10);
|
|
@@ -504,10 +860,13 @@ H.pInt = function (s, mag) {
|
|
|
504
860
|
/**
|
|
505
861
|
* Utility function to check for string type.
|
|
506
862
|
*
|
|
507
|
-
* @function
|
|
508
|
-
*
|
|
509
|
-
* @param {
|
|
510
|
-
*
|
|
863
|
+
* @function Highcharts.isString
|
|
864
|
+
*
|
|
865
|
+
* @param {*} s
|
|
866
|
+
* The item to check.
|
|
867
|
+
*
|
|
868
|
+
* @return {boolean}
|
|
869
|
+
* True if the argument is a string.
|
|
511
870
|
*/
|
|
512
871
|
H.isString = function (s) {
|
|
513
872
|
return typeof s === 'string';
|
|
@@ -516,10 +875,13 @@ H.isString = function (s) {
|
|
|
516
875
|
/**
|
|
517
876
|
* Utility function to check if an item is an array.
|
|
518
877
|
*
|
|
519
|
-
* @function
|
|
520
|
-
*
|
|
521
|
-
* @param {
|
|
522
|
-
*
|
|
878
|
+
* @function Highcharts.isArray
|
|
879
|
+
*
|
|
880
|
+
* @param {*} obj
|
|
881
|
+
* The item to check.
|
|
882
|
+
*
|
|
883
|
+
* @return {boolean}
|
|
884
|
+
* True if the argument is an array.
|
|
523
885
|
*/
|
|
524
886
|
H.isArray = function (obj) {
|
|
525
887
|
var str = Object.prototype.toString.call(obj);
|
|
@@ -529,12 +891,16 @@ H.isArray = function (obj) {
|
|
|
529
891
|
/**
|
|
530
892
|
* Utility function to check if an item is of type object.
|
|
531
893
|
*
|
|
532
|
-
* @function
|
|
533
|
-
*
|
|
534
|
-
* @param {
|
|
535
|
-
*
|
|
536
|
-
*
|
|
537
|
-
* @
|
|
894
|
+
* @function Highcharts.isObject
|
|
895
|
+
*
|
|
896
|
+
* @param {*} obj
|
|
897
|
+
* The item to check.
|
|
898
|
+
*
|
|
899
|
+
* @param {boolean} [strict=false]
|
|
900
|
+
* Also checks that the object is not an array.
|
|
901
|
+
*
|
|
902
|
+
* @return {boolean}
|
|
903
|
+
* True if the argument is an object.
|
|
538
904
|
*/
|
|
539
905
|
H.isObject = function (obj, strict) {
|
|
540
906
|
return !!obj && typeof obj === 'object' && (!strict || !H.isArray(obj));
|
|
@@ -543,10 +909,13 @@ H.isObject = function (obj, strict) {
|
|
|
543
909
|
/**
|
|
544
910
|
* Utility function to check if an Object is a HTML Element.
|
|
545
911
|
*
|
|
546
|
-
* @function
|
|
547
|
-
*
|
|
548
|
-
* @param {
|
|
549
|
-
*
|
|
912
|
+
* @function Highcharts.isDOMElement
|
|
913
|
+
*
|
|
914
|
+
* @param {*} obj
|
|
915
|
+
* The item to check.
|
|
916
|
+
*
|
|
917
|
+
* @return {boolean}
|
|
918
|
+
* True if the argument is a HTML Element.
|
|
550
919
|
*/
|
|
551
920
|
H.isDOMElement = function (obj) {
|
|
552
921
|
return H.isObject(obj) && typeof obj.nodeType === 'number';
|
|
@@ -555,10 +924,13 @@ H.isDOMElement = function (obj) {
|
|
|
555
924
|
/**
|
|
556
925
|
* Utility function to check if an Object is an class.
|
|
557
926
|
*
|
|
558
|
-
* @function
|
|
559
|
-
*
|
|
560
|
-
* @param {
|
|
561
|
-
*
|
|
927
|
+
* @function Highcharts.isClass
|
|
928
|
+
*
|
|
929
|
+
* @param {*} obj
|
|
930
|
+
* The item to check.
|
|
931
|
+
*
|
|
932
|
+
* @return {boolean}
|
|
933
|
+
* True if the argument is an class.
|
|
562
934
|
*/
|
|
563
935
|
H.isClass = function (obj) {
|
|
564
936
|
var c = obj && obj.constructor;
|
|
@@ -573,11 +945,12 @@ H.isClass = function (obj) {
|
|
|
573
945
|
* Utility function to check if an item is a number and it is finite (not NaN,
|
|
574
946
|
* Infinity or -Infinity).
|
|
575
947
|
*
|
|
576
|
-
* @function
|
|
577
|
-
*
|
|
578
|
-
* @param
|
|
579
|
-
*
|
|
580
|
-
*
|
|
948
|
+
* @function Highcharts.isNumber
|
|
949
|
+
*
|
|
950
|
+
* @param {*} n
|
|
951
|
+
* The item to check.
|
|
952
|
+
*
|
|
953
|
+
* @return {boolean}
|
|
581
954
|
* True if the item is a finite number
|
|
582
955
|
*/
|
|
583
956
|
H.isNumber = function (n) {
|
|
@@ -587,10 +960,13 @@ H.isNumber = function (n) {
|
|
|
587
960
|
/**
|
|
588
961
|
* Remove the last occurence of an item from an array.
|
|
589
962
|
*
|
|
590
|
-
* @function
|
|
591
|
-
*
|
|
592
|
-
* @param {Array} arr
|
|
593
|
-
*
|
|
963
|
+
* @function Highcharts.erase
|
|
964
|
+
*
|
|
965
|
+
* @param {Array} arr
|
|
966
|
+
* The array.
|
|
967
|
+
*
|
|
968
|
+
* @param {*} item
|
|
969
|
+
* The item to remove.
|
|
594
970
|
*/
|
|
595
971
|
H.erase = function (arr, item) {
|
|
596
972
|
var i = arr.length;
|
|
@@ -605,11 +981,13 @@ H.erase = function (arr, item) {
|
|
|
605
981
|
/**
|
|
606
982
|
* Check if an object is null or undefined.
|
|
607
983
|
*
|
|
608
|
-
* @function
|
|
609
|
-
*
|
|
610
|
-
* @param {
|
|
611
|
-
*
|
|
612
|
-
*
|
|
984
|
+
* @function Highcharts.defined
|
|
985
|
+
*
|
|
986
|
+
* @param {*} obj
|
|
987
|
+
* The object to check.
|
|
988
|
+
*
|
|
989
|
+
* @return {boolean}
|
|
990
|
+
* False if the object is null or undefined, otherwise true.
|
|
613
991
|
*/
|
|
614
992
|
H.defined = function (obj) {
|
|
615
993
|
return obj !== undefined && obj !== null;
|
|
@@ -620,12 +998,19 @@ H.defined = function (obj) {
|
|
|
620
998
|
* a key and a value, or let the second argument be a collection of keys and
|
|
621
999
|
* values. To use as a getter, pass only a string as the second argument.
|
|
622
1000
|
*
|
|
623
|
-
* @function
|
|
624
|
-
*
|
|
625
|
-
* @param {
|
|
626
|
-
*
|
|
627
|
-
*
|
|
628
|
-
* @
|
|
1001
|
+
* @function Highcharts.attr
|
|
1002
|
+
*
|
|
1003
|
+
* @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} elem
|
|
1004
|
+
* The DOM element to receive the attribute(s).
|
|
1005
|
+
*
|
|
1006
|
+
* @param {string|Highcharts.HTMLAttributes|Highcharts.SVGAttributes} [prop]
|
|
1007
|
+
* The property or an object of key-value pairs.
|
|
1008
|
+
*
|
|
1009
|
+
* @param {string} [value]
|
|
1010
|
+
* The value if a single property is set.
|
|
1011
|
+
*
|
|
1012
|
+
* @return {*}
|
|
1013
|
+
* When used as a getter, return the value.
|
|
629
1014
|
*/
|
|
630
1015
|
H.attr = function (elem, prop, value) {
|
|
631
1016
|
var ret;
|
|
@@ -658,10 +1043,13 @@ H.attr = function (elem, prop, value) {
|
|
|
658
1043
|
/**
|
|
659
1044
|
* Check if an element is an array, and if not, make it into an array.
|
|
660
1045
|
*
|
|
661
|
-
* @function
|
|
662
|
-
*
|
|
663
|
-
* @param
|
|
664
|
-
*
|
|
1046
|
+
* @function Highcharts.splat
|
|
1047
|
+
*
|
|
1048
|
+
* @param {*} obj
|
|
1049
|
+
* The object to splat.
|
|
1050
|
+
*
|
|
1051
|
+
* @return {Array}
|
|
1052
|
+
* The produced or original array.
|
|
665
1053
|
*/
|
|
666
1054
|
H.splat = function (obj) {
|
|
667
1055
|
return H.isArray(obj) ? obj : [obj];
|
|
@@ -671,13 +1059,20 @@ H.splat = function (obj) {
|
|
|
671
1059
|
* Set a timeout if the delay is given, otherwise perform the function
|
|
672
1060
|
* synchronously.
|
|
673
1061
|
*
|
|
674
|
-
* @function
|
|
675
|
-
*
|
|
676
|
-
* @param
|
|
677
|
-
*
|
|
678
|
-
*
|
|
679
|
-
* @
|
|
680
|
-
*
|
|
1062
|
+
* @function Highcharts.syncTimeout
|
|
1063
|
+
*
|
|
1064
|
+
* @param {Function} fn
|
|
1065
|
+
* The function callback.
|
|
1066
|
+
*
|
|
1067
|
+
* @param {number} delay
|
|
1068
|
+
* Delay in milliseconds.
|
|
1069
|
+
*
|
|
1070
|
+
* @param {*} [context]
|
|
1071
|
+
* The context.
|
|
1072
|
+
*
|
|
1073
|
+
* @return {number}
|
|
1074
|
+
* An identifier for the timeout that can later be cleared with
|
|
1075
|
+
* Highcharts.clearTimeout.
|
|
681
1076
|
*/
|
|
682
1077
|
H.syncTimeout = function (fn, delay, context) {
|
|
683
1078
|
if (delay) {
|
|
@@ -691,9 +1086,10 @@ H.syncTimeout = function (fn, delay, context) {
|
|
|
691
1086
|
* (e.g. by `chart.destroy()`). For the details see
|
|
692
1087
|
* [issue #7901](https://github.com/highcharts/highcharts/issues/7901).
|
|
693
1088
|
*
|
|
694
|
-
* @function
|
|
695
|
-
*
|
|
696
|
-
* @param
|
|
1089
|
+
* @function Highcharts.clearTimeout
|
|
1090
|
+
*
|
|
1091
|
+
* @param {number} id
|
|
1092
|
+
* Id of a timeout.
|
|
697
1093
|
*/
|
|
698
1094
|
H.clearTimeout = function (id) {
|
|
699
1095
|
if (H.defined(id)) {
|
|
@@ -704,11 +1100,16 @@ H.clearTimeout = function (id) {
|
|
|
704
1100
|
/**
|
|
705
1101
|
* Utility function to extend an object with the members of another.
|
|
706
1102
|
*
|
|
707
|
-
* @function
|
|
708
|
-
*
|
|
709
|
-
* @param {
|
|
710
|
-
*
|
|
711
|
-
*
|
|
1103
|
+
* @function Highcharts.extend
|
|
1104
|
+
*
|
|
1105
|
+
* @param {Highcharts.Dictionary<*>} a
|
|
1106
|
+
* The object to be extended.
|
|
1107
|
+
*
|
|
1108
|
+
* @param {Highcharts.Dictionary<*>} b
|
|
1109
|
+
* The object to add to the first one.
|
|
1110
|
+
*
|
|
1111
|
+
* @return {Highcharts.Dictionary<*>}
|
|
1112
|
+
* Object a, the original object.
|
|
712
1113
|
*/
|
|
713
1114
|
H.extend = function (a, b) {
|
|
714
1115
|
var n;
|
|
@@ -725,10 +1126,13 @@ H.extend = function (a, b) {
|
|
|
725
1126
|
/**
|
|
726
1127
|
* Return the first value that is not null or undefined.
|
|
727
1128
|
*
|
|
728
|
-
* @function
|
|
729
|
-
*
|
|
730
|
-
* @param {...*} items
|
|
731
|
-
*
|
|
1129
|
+
* @function Highcharts.pick
|
|
1130
|
+
*
|
|
1131
|
+
* @param {...*} items
|
|
1132
|
+
* Variable number of arguments to inspect.
|
|
1133
|
+
*
|
|
1134
|
+
* @return {*}
|
|
1135
|
+
* The value of the first argument that is not null or undefined.
|
|
732
1136
|
*/
|
|
733
1137
|
H.pick = function () {
|
|
734
1138
|
var args = arguments,
|
|
@@ -743,24 +1147,16 @@ H.pick = function () {
|
|
|
743
1147
|
}
|
|
744
1148
|
};
|
|
745
1149
|
|
|
746
|
-
/**
|
|
747
|
-
* @typedef {Object} CSSObject - A style object with camel case property names.
|
|
748
|
-
* The properties can be whatever styles are supported on the given SVG or HTML
|
|
749
|
-
* element.
|
|
750
|
-
* @example
|
|
751
|
-
* {
|
|
752
|
-
* fontFamily: 'monospace',
|
|
753
|
-
* fontSize: '1.2em'
|
|
754
|
-
* }
|
|
755
|
-
*/
|
|
756
1150
|
/**
|
|
757
1151
|
* Set CSS on a given element.
|
|
758
1152
|
*
|
|
759
|
-
* @function
|
|
760
|
-
* @memberof Highcharts
|
|
761
|
-
* @param {HTMLDOMElement} el - A HTML DOM element.
|
|
762
|
-
* @param {CSSObject} styles - Style object with camel case property names.
|
|
1153
|
+
* @function Highcharts.css
|
|
763
1154
|
*
|
|
1155
|
+
* @param {Highcharts.HTMLDOMElement} el
|
|
1156
|
+
* An HTML DOM element.
|
|
1157
|
+
*
|
|
1158
|
+
* @param {Highcharts.CSSObject} styles
|
|
1159
|
+
* Style object with camel case property names.
|
|
764
1160
|
*/
|
|
765
1161
|
H.css = function (el, styles) {
|
|
766
1162
|
if (H.isMS && !H.svg) { // #2686
|
|
@@ -771,23 +1167,28 @@ H.css = function (el, styles) {
|
|
|
771
1167
|
H.extend(el.style, styles);
|
|
772
1168
|
};
|
|
773
1169
|
|
|
774
|
-
/**
|
|
775
|
-
* A HTML DOM element.
|
|
776
|
-
* @typedef {Object} HTMLDOMElement
|
|
777
|
-
*/
|
|
778
|
-
|
|
779
1170
|
/**
|
|
780
1171
|
* Utility function to create an HTML element with attributes and styles.
|
|
781
1172
|
*
|
|
782
|
-
* @function
|
|
783
|
-
*
|
|
784
|
-
* @param {
|
|
785
|
-
*
|
|
786
|
-
*
|
|
787
|
-
* @param {
|
|
788
|
-
*
|
|
789
|
-
*
|
|
790
|
-
* @
|
|
1173
|
+
* @function Highcharts.createElement
|
|
1174
|
+
*
|
|
1175
|
+
* @param {string} tag
|
|
1176
|
+
* The HTML tag.
|
|
1177
|
+
*
|
|
1178
|
+
* @param {Highcharts.HTMLAttributes} [attribs]
|
|
1179
|
+
* Attributes as an object of key-value pairs.
|
|
1180
|
+
*
|
|
1181
|
+
* @param {Highcharts.CSSObject} [styles]
|
|
1182
|
+
* Styles as an object of key-value pairs.
|
|
1183
|
+
*
|
|
1184
|
+
* @param {Highcharts.HTMLDOMElement} [parent]
|
|
1185
|
+
* The parent HTML object.
|
|
1186
|
+
*
|
|
1187
|
+
* @param {boolean} [nopad=false]
|
|
1188
|
+
* If true, remove all padding, border and margin.
|
|
1189
|
+
*
|
|
1190
|
+
* @return {Highcharts.HTMLDOMElement}
|
|
1191
|
+
* The created DOM element.
|
|
791
1192
|
*/
|
|
792
1193
|
H.createElement = function (tag, attribs, styles, parent, nopad) {
|
|
793
1194
|
var el = doc.createElement(tag),
|
|
@@ -810,12 +1211,17 @@ H.createElement = function (tag, attribs, styles, parent, nopad) {
|
|
|
810
1211
|
/**
|
|
811
1212
|
* Extend a prototyped class by new members.
|
|
812
1213
|
*
|
|
813
|
-
* @function
|
|
814
|
-
*
|
|
815
|
-
* @param {
|
|
816
|
-
*
|
|
817
|
-
*
|
|
818
|
-
* @
|
|
1214
|
+
* @function Highcharts.extendClass
|
|
1215
|
+
*
|
|
1216
|
+
* @param {*} parent
|
|
1217
|
+
* The parent prototype to inherit.
|
|
1218
|
+
*
|
|
1219
|
+
* @param {Highcharts.Dictionary<*>} members
|
|
1220
|
+
* A collection of prototype members to add or override compared to the
|
|
1221
|
+
* parent prototype.
|
|
1222
|
+
*
|
|
1223
|
+
* @return {*}
|
|
1224
|
+
* A new prototype.
|
|
819
1225
|
*/
|
|
820
1226
|
H.extendClass = function (parent, members) {
|
|
821
1227
|
var object = function () {};
|
|
@@ -827,12 +1233,19 @@ H.extendClass = function (parent, members) {
|
|
|
827
1233
|
/**
|
|
828
1234
|
* Left-pad a string to a given length by adding a character repetetively.
|
|
829
1235
|
*
|
|
830
|
-
* @function
|
|
831
|
-
*
|
|
832
|
-
* @param {
|
|
833
|
-
*
|
|
834
|
-
*
|
|
835
|
-
* @
|
|
1236
|
+
* @function Highcharts.pad
|
|
1237
|
+
*
|
|
1238
|
+
* @param {number} number
|
|
1239
|
+
* The input string or number.
|
|
1240
|
+
*
|
|
1241
|
+
* @param {number} length
|
|
1242
|
+
* The desired string length.
|
|
1243
|
+
*
|
|
1244
|
+
* @param {string} [padder=0]
|
|
1245
|
+
* The character to pad with.
|
|
1246
|
+
*
|
|
1247
|
+
* @return {string}
|
|
1248
|
+
* The padded string.
|
|
836
1249
|
*/
|
|
837
1250
|
H.pad = function (number, length, padder) {
|
|
838
1251
|
return new Array(
|
|
@@ -844,24 +1257,21 @@ H.pad = function (number, length, padder) {
|
|
|
844
1257
|
).join(padder || 0) + number;
|
|
845
1258
|
};
|
|
846
1259
|
|
|
847
|
-
/**
|
|
848
|
-
* @typedef {Number|String} RelativeSize - If a number is given, it defines the
|
|
849
|
-
* pixel length. If a percentage string is given, like for example `'50%'`,
|
|
850
|
-
* the setting defines a length relative to a base size, for example the size
|
|
851
|
-
* of a container.
|
|
852
|
-
*/
|
|
853
1260
|
/**
|
|
854
1261
|
* Return a length based on either the integer value, or a percentage of a base.
|
|
855
1262
|
*
|
|
856
|
-
* @function
|
|
857
|
-
*
|
|
858
|
-
* @param
|
|
859
|
-
*
|
|
860
|
-
*
|
|
861
|
-
*
|
|
862
|
-
*
|
|
863
|
-
*
|
|
864
|
-
*
|
|
1263
|
+
* @function Highcharts.relativeLength
|
|
1264
|
+
*
|
|
1265
|
+
* @param {Highcharts.RelativeSize} value
|
|
1266
|
+
* A percentage string or a number.
|
|
1267
|
+
*
|
|
1268
|
+
* @param {number} base
|
|
1269
|
+
* The full length that represents 100%.
|
|
1270
|
+
*
|
|
1271
|
+
* @param {number} [offset=0]
|
|
1272
|
+
* A pixel offset to apply for percentage values. Used internally in
|
|
1273
|
+
* axis positioning.
|
|
1274
|
+
*
|
|
865
1275
|
* @return {number}
|
|
866
1276
|
* The computed length.
|
|
867
1277
|
*/
|
|
@@ -874,15 +1284,19 @@ H.relativeLength = function (value, base, offset) {
|
|
|
874
1284
|
/**
|
|
875
1285
|
* Wrap a method with extended functionality, preserving the original function.
|
|
876
1286
|
*
|
|
877
|
-
* @function
|
|
878
|
-
* @memberof Highcharts
|
|
879
|
-
* @param {Object} obj - The context object that the method belongs to. In real
|
|
880
|
-
* cases, this is often a prototype.
|
|
881
|
-
* @param {String} method - The name of the method to extend.
|
|
882
|
-
* @param {Function} func - A wrapper function callback. This function is called
|
|
883
|
-
* with the same arguments as the original function, except that the
|
|
884
|
-
* original function is unshifted and passed as the first argument.
|
|
1287
|
+
* @function Highcharts.wrap
|
|
885
1288
|
*
|
|
1289
|
+
* @param {*} obj
|
|
1290
|
+
* The context object that the method belongs to. In real cases, this is
|
|
1291
|
+
* often a prototype.
|
|
1292
|
+
*
|
|
1293
|
+
* @param {string} method
|
|
1294
|
+
* The name of the method to extend.
|
|
1295
|
+
*
|
|
1296
|
+
* @param {Function} func
|
|
1297
|
+
* A wrapper function callback. This function is called with the same
|
|
1298
|
+
* arguments as the original function, except that the original function
|
|
1299
|
+
* is unshifted and passed as the first argument.
|
|
886
1300
|
*/
|
|
887
1301
|
H.wrap = function (obj, method, func) {
|
|
888
1302
|
var proceed = obj[method];
|
|
@@ -903,21 +1317,41 @@ H.wrap = function (obj, method, func) {
|
|
|
903
1317
|
|
|
904
1318
|
|
|
905
1319
|
|
|
1320
|
+
/**
|
|
1321
|
+
* Recursively converts all Date properties to timestamps.
|
|
1322
|
+
*
|
|
1323
|
+
* @param {Object} object - any object to convert properties of
|
|
1324
|
+
*/
|
|
1325
|
+
H.datePropsToTimestamps = function (object) {
|
|
1326
|
+
H.objectEach(object, function (val, key) {
|
|
1327
|
+
if (H.isObject(val) && typeof val.getTime === 'function') {
|
|
1328
|
+
object[key] = val.getTime();
|
|
1329
|
+
} else if (H.isObject(val) || H.isArray(val)) {
|
|
1330
|
+
H.datePropsToTimestamps(val);
|
|
1331
|
+
}
|
|
1332
|
+
});
|
|
1333
|
+
};
|
|
1334
|
+
|
|
906
1335
|
/**
|
|
907
1336
|
* Format a single variable. Similar to sprintf, without the % prefix.
|
|
908
1337
|
*
|
|
909
1338
|
* @example
|
|
910
1339
|
* formatSingle('.2f', 5); // => '5.00'.
|
|
911
1340
|
*
|
|
912
|
-
* @function
|
|
913
|
-
*
|
|
914
|
-
* @param {
|
|
915
|
-
*
|
|
916
|
-
*
|
|
917
|
-
*
|
|
918
|
-
*
|
|
919
|
-
|
|
920
|
-
* @
|
|
1341
|
+
* @function Highcharts.formatSingle
|
|
1342
|
+
*
|
|
1343
|
+
* @param {string} format
|
|
1344
|
+
* The format string.
|
|
1345
|
+
*
|
|
1346
|
+
* @param {*} val
|
|
1347
|
+
* The value.
|
|
1348
|
+
*
|
|
1349
|
+
* @param {Highcharts.Time} [time]
|
|
1350
|
+
* A `Time` instance that determines the date formatting, for example
|
|
1351
|
+
* for applying time zone corrections to the formatted date.
|
|
1352
|
+
*
|
|
1353
|
+
* @return {string}
|
|
1354
|
+
* The formatted representation of the value.
|
|
921
1355
|
*/
|
|
922
1356
|
H.formatSingle = function (format, val, time) {
|
|
923
1357
|
var floatRegex = /f$/,
|
|
@@ -946,24 +1380,28 @@ H.formatSingle = function (format, val, time) {
|
|
|
946
1380
|
* Format a string according to a subset of the rules of Python's String.format
|
|
947
1381
|
* method.
|
|
948
1382
|
*
|
|
949
|
-
* @function #format
|
|
950
|
-
* @memberof Highcharts
|
|
951
|
-
* @param {String} str
|
|
952
|
-
* The string to format.
|
|
953
|
-
* @param {Object} ctx
|
|
954
|
-
* The context, a collection of key-value pairs where each key is
|
|
955
|
-
* replaced by its value.
|
|
956
|
-
* @param {Time} [time]
|
|
957
|
-
* A `Time` instance that determines the date formatting, for example for
|
|
958
|
-
* applying time zone corrections to the formatted date.
|
|
959
|
-
* @returns {String} The formatted string.
|
|
960
|
-
*
|
|
961
1383
|
* @example
|
|
962
1384
|
* var s = Highcharts.format(
|
|
963
1385
|
* 'The {color} fox was {len:.2f} feet long',
|
|
964
1386
|
* { color: 'red', len: Math.PI }
|
|
965
1387
|
* );
|
|
966
1388
|
* // => The red fox was 3.14 feet long
|
|
1389
|
+
*
|
|
1390
|
+
* @function Highcharts.format
|
|
1391
|
+
*
|
|
1392
|
+
* @param {string} str
|
|
1393
|
+
* The string to format.
|
|
1394
|
+
*
|
|
1395
|
+
* @param {*} ctx
|
|
1396
|
+
* The context, a collection of key-value pairs where each key is
|
|
1397
|
+
* replaced by its value.
|
|
1398
|
+
*
|
|
1399
|
+
* @param {Highcharts.Time} [time]
|
|
1400
|
+
* A `Time` instance that determines the date formatting, for example
|
|
1401
|
+
* for applying time zone corrections to the formatted date.
|
|
1402
|
+
*
|
|
1403
|
+
* @return {string}
|
|
1404
|
+
* The formatted string.
|
|
967
1405
|
*/
|
|
968
1406
|
H.format = function (str, ctx, time) {
|
|
969
1407
|
var splitter = '{',
|
|
@@ -1021,11 +1459,13 @@ H.format = function (str, ctx, time) {
|
|
|
1021
1459
|
/**
|
|
1022
1460
|
* Get the magnitude of a number.
|
|
1023
1461
|
*
|
|
1024
|
-
* @function
|
|
1025
|
-
*
|
|
1026
|
-
* @param {
|
|
1027
|
-
*
|
|
1028
|
-
*
|
|
1462
|
+
* @function Highcharts.getMagnitude
|
|
1463
|
+
*
|
|
1464
|
+
* @param {number} number
|
|
1465
|
+
* The number.
|
|
1466
|
+
*
|
|
1467
|
+
* @return {number}
|
|
1468
|
+
* The magnitude, where 1-9 are magnitude 1, 10-99 magnitude 2 etc.
|
|
1029
1469
|
*/
|
|
1030
1470
|
H.getMagnitude = function (num) {
|
|
1031
1471
|
return Math.pow(10, Math.floor(Math.log(num) / Math.LN10));
|
|
@@ -1034,17 +1474,31 @@ H.getMagnitude = function (num) {
|
|
|
1034
1474
|
/**
|
|
1035
1475
|
* Take an interval and normalize it to multiples of round numbers.
|
|
1036
1476
|
*
|
|
1037
|
-
* @
|
|
1038
|
-
*
|
|
1039
|
-
*
|
|
1040
|
-
* @
|
|
1041
|
-
*
|
|
1042
|
-
*
|
|
1043
|
-
* @param {
|
|
1044
|
-
*
|
|
1045
|
-
*
|
|
1046
|
-
*
|
|
1047
|
-
*
|
|
1477
|
+
* @deprecated
|
|
1478
|
+
* @function Highcharts.normalizeTickInterval
|
|
1479
|
+
*
|
|
1480
|
+
* @param {number} interval
|
|
1481
|
+
* The raw, un-rounded interval.
|
|
1482
|
+
*
|
|
1483
|
+
* @param {Array} [multiples]
|
|
1484
|
+
* Allowed multiples.
|
|
1485
|
+
*
|
|
1486
|
+
* @param {number} [magnitude]
|
|
1487
|
+
* The magnitude of the number.
|
|
1488
|
+
*
|
|
1489
|
+
* @param {boolean} [allowDecimals]
|
|
1490
|
+
* Whether to allow decimals.
|
|
1491
|
+
*
|
|
1492
|
+
* @param {boolean} [hasTickAmount]
|
|
1493
|
+
* If it has tickAmount, avoid landing on tick intervals lower than
|
|
1494
|
+
* original.
|
|
1495
|
+
*
|
|
1496
|
+
* @return {number}
|
|
1497
|
+
* The normalized interval.
|
|
1498
|
+
*
|
|
1499
|
+
* @todo
|
|
1500
|
+
* Move this function to the Axis prototype. It is here only for historical
|
|
1501
|
+
* reasons.
|
|
1048
1502
|
*/
|
|
1049
1503
|
H.normalizeTickInterval = function (interval, multiples, magnitude,
|
|
1050
1504
|
allowDecimals, hasTickAmount) {
|
|
@@ -1118,12 +1572,13 @@ H.normalizeTickInterval = function (interval, multiples, magnitude,
|
|
|
1118
1572
|
* Sort an object array and keep the order of equal items. The ECMAScript
|
|
1119
1573
|
* standard does not specify the behaviour when items are equal.
|
|
1120
1574
|
*
|
|
1121
|
-
* @function
|
|
1122
|
-
*
|
|
1123
|
-
* @param {Array} arr
|
|
1124
|
-
*
|
|
1125
|
-
* regular Array.prototype.sort.
|
|
1575
|
+
* @function Highcharts.stableSort
|
|
1576
|
+
*
|
|
1577
|
+
* @param {Array} arr
|
|
1578
|
+
* The array to sort.
|
|
1126
1579
|
*
|
|
1580
|
+
* @param {Function} sortFunction
|
|
1581
|
+
* The function to sort it with, like with regular Array.prototype.sort.
|
|
1127
1582
|
*/
|
|
1128
1583
|
H.stableSort = function (arr, sortFunction) {
|
|
1129
1584
|
var length = arr.length,
|
|
@@ -1151,10 +1606,13 @@ H.stableSort = function (arr, sortFunction) {
|
|
|
1151
1606
|
* a maximum call stack size exceeded error in Chrome when trying to apply more
|
|
1152
1607
|
* than 150.000 points. This method is slightly slower, but safe.
|
|
1153
1608
|
*
|
|
1154
|
-
* @function
|
|
1155
|
-
*
|
|
1156
|
-
* @param {Array} data
|
|
1157
|
-
*
|
|
1609
|
+
* @function Highcharts.arrayMin
|
|
1610
|
+
*
|
|
1611
|
+
* @param {Array} data
|
|
1612
|
+
* An array of numbers.
|
|
1613
|
+
*
|
|
1614
|
+
* @return {number}
|
|
1615
|
+
* The lowest number.
|
|
1158
1616
|
*/
|
|
1159
1617
|
H.arrayMin = function (data) {
|
|
1160
1618
|
var i = data.length,
|
|
@@ -1173,10 +1631,13 @@ H.arrayMin = function (data) {
|
|
|
1173
1631
|
* a maximum call stack size exceeded error in Chrome when trying to apply more
|
|
1174
1632
|
* than 150.000 points. This method is slightly slower, but safe.
|
|
1175
1633
|
*
|
|
1176
|
-
* @function
|
|
1177
|
-
*
|
|
1178
|
-
* @param {Array} data
|
|
1179
|
-
*
|
|
1634
|
+
* @function Highcharts.arrayMax
|
|
1635
|
+
*
|
|
1636
|
+
* @param {Array} data
|
|
1637
|
+
* An array of numbers.
|
|
1638
|
+
*
|
|
1639
|
+
* @return {number}
|
|
1640
|
+
* The highest number.
|
|
1180
1641
|
*/
|
|
1181
1642
|
H.arrayMax = function (data) {
|
|
1182
1643
|
var i = data.length,
|
|
@@ -1195,12 +1656,13 @@ H.arrayMax = function (data) {
|
|
|
1195
1656
|
* the given object. It loops all properties and invokes destroy if there is a
|
|
1196
1657
|
* destroy method. The property is then delete.
|
|
1197
1658
|
*
|
|
1198
|
-
* @function
|
|
1199
|
-
*
|
|
1200
|
-
* @param {
|
|
1201
|
-
*
|
|
1202
|
-
* delete it.
|
|
1659
|
+
* @function Highcharts.destroyObjectProperties
|
|
1660
|
+
*
|
|
1661
|
+
* @param {*} obj
|
|
1662
|
+
* The object to destroy properties on.
|
|
1203
1663
|
*
|
|
1664
|
+
* @param {*} [except]
|
|
1665
|
+
* Exception, do not destroy this property, only delete it.
|
|
1204
1666
|
*/
|
|
1205
1667
|
H.destroyObjectProperties = function (obj, except) {
|
|
1206
1668
|
H.objectEach(obj, function (val, n) {
|
|
@@ -1219,10 +1681,10 @@ H.destroyObjectProperties = function (obj, except) {
|
|
|
1219
1681
|
/**
|
|
1220
1682
|
* Discard a HTML element by moving it to the bin and delete.
|
|
1221
1683
|
*
|
|
1222
|
-
* @function
|
|
1223
|
-
* @memberof Highcharts
|
|
1224
|
-
* @param {HTMLDOMElement} element - The HTML node to discard.
|
|
1684
|
+
* @function Highcharts.discardElement
|
|
1225
1685
|
*
|
|
1686
|
+
* @param {Highcharts.HTMLDOMElement} element
|
|
1687
|
+
* The HTML node to discard.
|
|
1226
1688
|
*/
|
|
1227
1689
|
H.discardElement = function (element) {
|
|
1228
1690
|
var garbageBin = H.garbageBin;
|
|
@@ -1241,11 +1703,16 @@ H.discardElement = function (element) {
|
|
|
1241
1703
|
/**
|
|
1242
1704
|
* Fix JS round off float errors.
|
|
1243
1705
|
*
|
|
1244
|
-
* @function
|
|
1245
|
-
*
|
|
1246
|
-
* @param {
|
|
1247
|
-
*
|
|
1248
|
-
*
|
|
1706
|
+
* @function Highcharts.correctFloat
|
|
1707
|
+
*
|
|
1708
|
+
* @param {number} num
|
|
1709
|
+
* A float number to fix.
|
|
1710
|
+
*
|
|
1711
|
+
* @param {number} [prec=14]
|
|
1712
|
+
* The precision.
|
|
1713
|
+
*
|
|
1714
|
+
* @return {number}
|
|
1715
|
+
* The corrected float number.
|
|
1249
1716
|
*/
|
|
1250
1717
|
H.correctFloat = function (num, prec) {
|
|
1251
1718
|
return parseFloat(
|
|
@@ -1257,13 +1724,17 @@ H.correctFloat = function (num, prec) {
|
|
|
1257
1724
|
* Set the global animation to either a given value, or fall back to the given
|
|
1258
1725
|
* chart's animation option.
|
|
1259
1726
|
*
|
|
1260
|
-
* @function
|
|
1261
|
-
*
|
|
1262
|
-
* @param {
|
|
1263
|
-
*
|
|
1727
|
+
* @function Highcharts.setAnimation
|
|
1728
|
+
*
|
|
1729
|
+
* @param {boolean|Highcharts.AnimationOptionsObject} animation
|
|
1730
|
+
* The animation object.
|
|
1731
|
+
*
|
|
1732
|
+
* @param {Highcharts.Chart} chart
|
|
1733
|
+
* The chart instance.
|
|
1264
1734
|
*
|
|
1265
|
-
* @todo
|
|
1266
|
-
*
|
|
1735
|
+
* @todo
|
|
1736
|
+
* This function always relates to a chart, and sets a property on the renderer,
|
|
1737
|
+
* so it should be moved to the SVGRenderer.
|
|
1267
1738
|
*/
|
|
1268
1739
|
H.setAnimation = function (animation, chart) {
|
|
1269
1740
|
chart.renderer.globalAnimation = H.pick(
|
|
@@ -1277,12 +1748,14 @@ H.setAnimation = function (animation, chart) {
|
|
|
1277
1748
|
* Get the animation in object form, where a disabled animation is always
|
|
1278
1749
|
* returned as `{ duration: 0 }`.
|
|
1279
1750
|
*
|
|
1280
|
-
* @function
|
|
1281
|
-
*
|
|
1282
|
-
* @param {
|
|
1283
|
-
* object with duration, complete and
|
|
1284
|
-
* enable or disable.
|
|
1285
|
-
*
|
|
1751
|
+
* @function Highcharts.animObject
|
|
1752
|
+
*
|
|
1753
|
+
* @param {boolean|Highcharts.AnimationOptionsObject} animation
|
|
1754
|
+
* An animation setting. Can be an object with duration, complete and
|
|
1755
|
+
* easing properties, or a boolean to enable or disable.
|
|
1756
|
+
*
|
|
1757
|
+
* @return {Highcharts.AnimationOptionsObject}
|
|
1758
|
+
* An object with at least a duration property.
|
|
1286
1759
|
*/
|
|
1287
1760
|
H.animObject = function (animation) {
|
|
1288
1761
|
return H.isObject(animation) ?
|
|
@@ -1292,6 +1765,8 @@ H.animObject = function (animation) {
|
|
|
1292
1765
|
|
|
1293
1766
|
/**
|
|
1294
1767
|
* The time unit lookup
|
|
1768
|
+
*
|
|
1769
|
+
* @ignore
|
|
1295
1770
|
*/
|
|
1296
1771
|
H.timeUnits = {
|
|
1297
1772
|
millisecond: 1,
|
|
@@ -1307,18 +1782,28 @@ H.timeUnits = {
|
|
|
1307
1782
|
/**
|
|
1308
1783
|
* Format a number and return a string based on input settings.
|
|
1309
1784
|
*
|
|
1310
|
-
* @
|
|
1311
|
-
*
|
|
1312
|
-
*
|
|
1313
|
-
* @
|
|
1314
|
-
*
|
|
1315
|
-
* @param {
|
|
1316
|
-
*
|
|
1317
|
-
*
|
|
1318
|
-
*
|
|
1319
|
-
*
|
|
1785
|
+
* @sample highcharts/members/highcharts-numberformat/
|
|
1786
|
+
* Custom number format
|
|
1787
|
+
*
|
|
1788
|
+
* @function Highcharts.numberFormat
|
|
1789
|
+
*
|
|
1790
|
+
* @param {number} number
|
|
1791
|
+
* The input number to format.
|
|
1792
|
+
*
|
|
1793
|
+
* @param {number} decimals
|
|
1794
|
+
* The amount of decimals. A value of -1 preserves the amount in the
|
|
1795
|
+
* input number.
|
|
1320
1796
|
*
|
|
1321
|
-
* @
|
|
1797
|
+
* @param {string} [decimalPoint]
|
|
1798
|
+
* The decimal point, defaults to the one given in the lang options, or
|
|
1799
|
+
* a dot.
|
|
1800
|
+
*
|
|
1801
|
+
* @param {string} [thousandsSep]
|
|
1802
|
+
* The thousands separator, defaults to the one given in the lang
|
|
1803
|
+
* options, or a space character.
|
|
1804
|
+
*
|
|
1805
|
+
* @return {string}
|
|
1806
|
+
* The formatted number.
|
|
1322
1807
|
*/
|
|
1323
1808
|
H.numberFormat = function (number, decimals, decimalPoint, thousandsSep) {
|
|
1324
1809
|
number = +number || 0;
|
|
@@ -1406,8 +1891,14 @@ H.numberFormat = function (number, decimals, decimalPoint, thousandsSep) {
|
|
|
1406
1891
|
|
|
1407
1892
|
/**
|
|
1408
1893
|
* Easing definition
|
|
1409
|
-
*
|
|
1410
|
-
* @
|
|
1894
|
+
*
|
|
1895
|
+
* @private
|
|
1896
|
+
* @function Math.easeInOutSine
|
|
1897
|
+
*
|
|
1898
|
+
* @param {number} pos
|
|
1899
|
+
* Current position, ranging from 0 to 1.
|
|
1900
|
+
*
|
|
1901
|
+
* @return {number}
|
|
1411
1902
|
*/
|
|
1412
1903
|
Math.easeInOutSine = function (pos) {
|
|
1413
1904
|
return -0.5 * (Math.cos(Math.PI * pos) - 1);
|
|
@@ -1418,12 +1909,19 @@ Math.easeInOutSine = function (pos) {
|
|
|
1418
1909
|
* properties. For width and height, the dimension of the inner box (excluding
|
|
1419
1910
|
* padding) is returned. Used for fitting the chart within the container.
|
|
1420
1911
|
*
|
|
1421
|
-
* @function
|
|
1422
|
-
*
|
|
1423
|
-
* @param {HTMLDOMElement} el
|
|
1424
|
-
*
|
|
1425
|
-
*
|
|
1426
|
-
* @
|
|
1912
|
+
* @function Highcharts.getStyle
|
|
1913
|
+
*
|
|
1914
|
+
* @param {Highcharts.HTMLDOMElement} el
|
|
1915
|
+
* An HTML element.
|
|
1916
|
+
*
|
|
1917
|
+
* @param {string} prop
|
|
1918
|
+
* The property name.
|
|
1919
|
+
*
|
|
1920
|
+
* @param {boolean} [toInt=true]
|
|
1921
|
+
* Parse to integer.
|
|
1922
|
+
*
|
|
1923
|
+
* @return {number}
|
|
1924
|
+
* The numeric value.
|
|
1427
1925
|
*/
|
|
1428
1926
|
H.getStyle = function (el, prop, toInt) {
|
|
1429
1927
|
|
|
@@ -1465,12 +1963,19 @@ H.getStyle = function (el, prop, toInt) {
|
|
|
1465
1963
|
/**
|
|
1466
1964
|
* Search for an item in an array.
|
|
1467
1965
|
*
|
|
1468
|
-
* @function
|
|
1469
|
-
*
|
|
1470
|
-
* @param {*} item
|
|
1471
|
-
*
|
|
1472
|
-
*
|
|
1473
|
-
* @
|
|
1966
|
+
* @function Highcharts.inArray
|
|
1967
|
+
*
|
|
1968
|
+
* @param {*} item
|
|
1969
|
+
* The item to search for.
|
|
1970
|
+
*
|
|
1971
|
+
* @param {Array} arr
|
|
1972
|
+
* The array or node collection to search in.
|
|
1973
|
+
*
|
|
1974
|
+
* @param {number} [fromIndex=0]
|
|
1975
|
+
* The index to start searching from.
|
|
1976
|
+
*
|
|
1977
|
+
* @return {number}
|
|
1978
|
+
* The index within the array, or -1 if not found.
|
|
1474
1979
|
*/
|
|
1475
1980
|
H.inArray = function (item, arr, fromIndex) {
|
|
1476
1981
|
return (
|
|
@@ -1482,13 +1987,17 @@ H.inArray = function (item, arr, fromIndex) {
|
|
|
1482
1987
|
/**
|
|
1483
1988
|
* Filter an array by a callback.
|
|
1484
1989
|
*
|
|
1485
|
-
* @function
|
|
1486
|
-
*
|
|
1487
|
-
* @param {Array} arr
|
|
1488
|
-
*
|
|
1489
|
-
*
|
|
1490
|
-
*
|
|
1491
|
-
*
|
|
1990
|
+
* @function Highcharts.grep
|
|
1991
|
+
*
|
|
1992
|
+
* @param {Array} arr
|
|
1993
|
+
* The array to filter.
|
|
1994
|
+
*
|
|
1995
|
+
* @param {Function} callback
|
|
1996
|
+
* The callback function. The function receives the item as the first
|
|
1997
|
+
* argument. Return `true` if the item is to be preserved.
|
|
1998
|
+
*
|
|
1999
|
+
* @return {Array}
|
|
2000
|
+
* A new, filtered array.
|
|
1492
2001
|
*/
|
|
1493
2002
|
H.grep = function (arr, callback) {
|
|
1494
2003
|
return (H.filterPolyfill || Array.prototype.filter).call(arr, callback);
|
|
@@ -1498,13 +2007,17 @@ H.grep = function (arr, callback) {
|
|
|
1498
2007
|
* Return the value of the first element in the array that satisfies the
|
|
1499
2008
|
* provided testing function.
|
|
1500
2009
|
*
|
|
1501
|
-
* @function
|
|
1502
|
-
*
|
|
1503
|
-
* @param {Array} arr
|
|
1504
|
-
*
|
|
1505
|
-
*
|
|
1506
|
-
*
|
|
1507
|
-
*
|
|
2010
|
+
* @function Highcharts.find
|
|
2011
|
+
*
|
|
2012
|
+
* @param {Array} arr
|
|
2013
|
+
* The array to test.
|
|
2014
|
+
*
|
|
2015
|
+
* @param {Function} callback
|
|
2016
|
+
* The callback function. The function receives the item as the first
|
|
2017
|
+
* argument. Return `true` if this item satisfies the condition.
|
|
2018
|
+
*
|
|
2019
|
+
* @return {*}
|
|
2020
|
+
* The value of the element.
|
|
1508
2021
|
*/
|
|
1509
2022
|
H.find = Array.prototype.find ?
|
|
1510
2023
|
function (arr, callback) {
|
|
@@ -1526,13 +2039,19 @@ H.find = Array.prototype.find ?
|
|
|
1526
2039
|
* Test whether at least one element in the array passes the test implemented by
|
|
1527
2040
|
* the provided function.
|
|
1528
2041
|
*
|
|
1529
|
-
* @function
|
|
1530
|
-
*
|
|
1531
|
-
* @param
|
|
1532
|
-
*
|
|
1533
|
-
*
|
|
1534
|
-
*
|
|
1535
|
-
*
|
|
2042
|
+
* @function Highcharts.some
|
|
2043
|
+
*
|
|
2044
|
+
* @param {Array} arr
|
|
2045
|
+
* The array to test
|
|
2046
|
+
*
|
|
2047
|
+
* @param {Function} fn
|
|
2048
|
+
* The function to run on each item. Return truty to pass the test.
|
|
2049
|
+
* Receives arguments `currentValue`, `index` and `array`.
|
|
2050
|
+
*
|
|
2051
|
+
* @param {*} ctx
|
|
2052
|
+
* The context.
|
|
2053
|
+
*
|
|
2054
|
+
* @return {boolean}
|
|
1536
2055
|
*/
|
|
1537
2056
|
H.some = function (arr, fn, ctx) {
|
|
1538
2057
|
return (H.somePolyfill || Array.prototype.some).call(arr, fn, ctx);
|
|
@@ -1541,12 +2060,16 @@ H.some = function (arr, fn, ctx) {
|
|
|
1541
2060
|
/**
|
|
1542
2061
|
* Map an array by a callback.
|
|
1543
2062
|
*
|
|
1544
|
-
* @function
|
|
1545
|
-
*
|
|
1546
|
-
* @param {Array} arr
|
|
1547
|
-
*
|
|
1548
|
-
*
|
|
1549
|
-
* @
|
|
2063
|
+
* @function Highcharts.map
|
|
2064
|
+
*
|
|
2065
|
+
* @param {Array} arr
|
|
2066
|
+
* The array to map.
|
|
2067
|
+
*
|
|
2068
|
+
* @param {Function} fn
|
|
2069
|
+
* The callback function. Return the new value for the new array.
|
|
2070
|
+
*
|
|
2071
|
+
* @return {Array}
|
|
2072
|
+
* A new array item with modified items.
|
|
1550
2073
|
*/
|
|
1551
2074
|
H.map = function (arr, fn) {
|
|
1552
2075
|
var results = [],
|
|
@@ -1563,10 +2086,13 @@ H.map = function (arr, fn) {
|
|
|
1563
2086
|
/**
|
|
1564
2087
|
* Returns an array of a given object's own properties.
|
|
1565
2088
|
*
|
|
1566
|
-
* @function
|
|
1567
|
-
*
|
|
1568
|
-
* @param {
|
|
1569
|
-
*
|
|
2089
|
+
* @function Highcharts.keys
|
|
2090
|
+
*
|
|
2091
|
+
* @param {*} obj
|
|
2092
|
+
* The object of which the properties are to be returned.
|
|
2093
|
+
*
|
|
2094
|
+
* @return {Array<string>}
|
|
2095
|
+
* An array of strings that represents all the properties.
|
|
1570
2096
|
*/
|
|
1571
2097
|
H.keys = function (obj) {
|
|
1572
2098
|
return (H.keysPolyfill || Object.keys).call(undefined, obj);
|
|
@@ -1575,14 +2101,21 @@ H.keys = function (obj) {
|
|
|
1575
2101
|
/**
|
|
1576
2102
|
* Reduce an array to a single value.
|
|
1577
2103
|
*
|
|
1578
|
-
* @function
|
|
1579
|
-
*
|
|
1580
|
-
* @param {Array} arr
|
|
1581
|
-
*
|
|
1582
|
-
*
|
|
1583
|
-
*
|
|
1584
|
-
*
|
|
1585
|
-
*
|
|
2104
|
+
* @function Highcharts.reduce
|
|
2105
|
+
*
|
|
2106
|
+
* @param {Array<*>} arr
|
|
2107
|
+
* The array to reduce.
|
|
2108
|
+
*
|
|
2109
|
+
* @param {Function} fn
|
|
2110
|
+
* The callback function. Return the reduced value. Receives 4
|
|
2111
|
+
* arguments: Accumulated/reduced value, current value, current array
|
|
2112
|
+
* index, and the array.
|
|
2113
|
+
*
|
|
2114
|
+
* @param {*} initialValue
|
|
2115
|
+
* The initial value of the accumulator.
|
|
2116
|
+
*
|
|
2117
|
+
* @return {*}
|
|
2118
|
+
* The reduced value.
|
|
1586
2119
|
*/
|
|
1587
2120
|
H.reduce = function (arr, func, initialValue) {
|
|
1588
2121
|
var fn = (H.reducePolyfill || Array.prototype.reduce);
|
|
@@ -1595,11 +2128,14 @@ H.reduce = function (arr, func, initialValue) {
|
|
|
1595
2128
|
/**
|
|
1596
2129
|
* Get the element's offset position, corrected for `overflow: auto`.
|
|
1597
2130
|
*
|
|
1598
|
-
* @function
|
|
1599
|
-
*
|
|
1600
|
-
* @param {HTMLDOMElement} el
|
|
1601
|
-
*
|
|
1602
|
-
*
|
|
2131
|
+
* @function Highcharts.offset
|
|
2132
|
+
*
|
|
2133
|
+
* @param {Highcharts.HTMLDOMElement} el
|
|
2134
|
+
* The HTML element.
|
|
2135
|
+
*
|
|
2136
|
+
* @return {Highcharts.OffsetObject}
|
|
2137
|
+
* An object containing `left` and `top` properties for the position in
|
|
2138
|
+
* the page.
|
|
1603
2139
|
*/
|
|
1604
2140
|
H.offset = function (el) {
|
|
1605
2141
|
var docElem = doc.documentElement,
|
|
@@ -1618,18 +2154,21 @@ H.offset = function (el) {
|
|
|
1618
2154
|
/**
|
|
1619
2155
|
* Stop running animation.
|
|
1620
2156
|
*
|
|
1621
|
-
* @
|
|
2157
|
+
* @function Highcharts.stop
|
|
2158
|
+
*
|
|
2159
|
+
* @param {Highcharts.SVGElement} el
|
|
2160
|
+
* The SVGElement to stop animation on.
|
|
2161
|
+
*
|
|
2162
|
+
* @param {string} [prop]
|
|
2163
|
+
* The property to stop animating. If given, the stop method will stop a
|
|
2164
|
+
* single property from animating, while others continue.
|
|
2165
|
+
*
|
|
2166
|
+
* @todo
|
|
2167
|
+
* A possible extension to this would be to stop a single property, when
|
|
1622
2168
|
* we want to continue animating others. Then assign the prop to the timer
|
|
1623
2169
|
* in the Fx.run method, and check for the prop here. This would be an
|
|
1624
2170
|
* improvement in all cases where we stop the animation from .attr. Instead of
|
|
1625
2171
|
* stopping everything, we can just stop the actual attributes we're setting.
|
|
1626
|
-
*
|
|
1627
|
-
* @function #stop
|
|
1628
|
-
* @memberof Highcharts
|
|
1629
|
-
* @param {SVGElement} el - The SVGElement to stop animation on.
|
|
1630
|
-
* @param {string} [prop] - The property to stop animating. If given, the stop
|
|
1631
|
-
* method will stop a single property from animating, while others continue.
|
|
1632
|
-
*
|
|
1633
2172
|
*/
|
|
1634
2173
|
H.stop = function (el, prop) {
|
|
1635
2174
|
|
|
@@ -1646,14 +2185,19 @@ H.stop = function (el, prop) {
|
|
|
1646
2185
|
/**
|
|
1647
2186
|
* Iterate over an array.
|
|
1648
2187
|
*
|
|
1649
|
-
* @function
|
|
1650
|
-
*
|
|
1651
|
-
* @param {Array} arr
|
|
1652
|
-
*
|
|
1653
|
-
*
|
|
1654
|
-
*
|
|
1655
|
-
*
|
|
1656
|
-
*
|
|
2188
|
+
* @function Highcharts.each<T>
|
|
2189
|
+
*
|
|
2190
|
+
* @param {Array<T>} arr
|
|
2191
|
+
* The array to iterate over.
|
|
2192
|
+
*
|
|
2193
|
+
* @param {Highcharts.EachCallbackFunction<T>} fn
|
|
2194
|
+
* The iterator callback. It passes three arguments:
|
|
2195
|
+
* * item - The array item.
|
|
2196
|
+
* * index - The item's index in the array.
|
|
2197
|
+
* * arr - The array that each is being applied to.
|
|
2198
|
+
*
|
|
2199
|
+
* @param {*} [ctx]
|
|
2200
|
+
* The context.
|
|
1657
2201
|
*/
|
|
1658
2202
|
H.each = function (arr, fn, ctx) { // modern browsers
|
|
1659
2203
|
return (H.forEachPolyfill || Array.prototype.forEach).call(arr, fn, ctx);
|
|
@@ -1662,14 +2206,19 @@ H.each = function (arr, fn, ctx) { // modern browsers
|
|
|
1662
2206
|
/**
|
|
1663
2207
|
* Iterate over object key pairs in an object.
|
|
1664
2208
|
*
|
|
1665
|
-
* @function
|
|
1666
|
-
*
|
|
1667
|
-
* @param
|
|
1668
|
-
*
|
|
1669
|
-
*
|
|
1670
|
-
*
|
|
1671
|
-
*
|
|
1672
|
-
*
|
|
2209
|
+
* @function Highcharts.objectEach
|
|
2210
|
+
*
|
|
2211
|
+
* @param {*} obj
|
|
2212
|
+
* The object to iterate over.
|
|
2213
|
+
*
|
|
2214
|
+
* @param {Highcharts.ObjectEachCallbackFunction} fn
|
|
2215
|
+
* The iterator callback. It passes three arguments:
|
|
2216
|
+
* * value - The property value.
|
|
2217
|
+
* * key - The property key.
|
|
2218
|
+
* * obj - The object that objectEach is being applied to.
|
|
2219
|
+
*
|
|
2220
|
+
* @param {*} [ctx]
|
|
2221
|
+
* The context.
|
|
1673
2222
|
*/
|
|
1674
2223
|
H.objectEach = function (obj, fn, ctx) {
|
|
1675
2224
|
for (var key in obj) {
|
|
@@ -1682,20 +2231,28 @@ H.objectEach = function (obj, fn, ctx) {
|
|
|
1682
2231
|
/**
|
|
1683
2232
|
* Add an event listener.
|
|
1684
2233
|
*
|
|
1685
|
-
* @function
|
|
1686
|
-
*
|
|
1687
|
-
* @param {
|
|
2234
|
+
* @function Highcharts.addEvent
|
|
2235
|
+
*
|
|
2236
|
+
* @param {*} el
|
|
2237
|
+
* The element or object to add a listener to. It can be a
|
|
1688
2238
|
* {@link HTMLDOMElement}, an {@link SVGElement} or any other object.
|
|
1689
|
-
*
|
|
1690
|
-
* @param {
|
|
1691
|
-
*
|
|
1692
|
-
*
|
|
2239
|
+
*
|
|
2240
|
+
* @param {string} type
|
|
2241
|
+
* The event type.
|
|
2242
|
+
*
|
|
2243
|
+
* @param {Highcharts.EventCallbackFunction} fn
|
|
2244
|
+
* The function callback to execute when the event is fired.
|
|
2245
|
+
*
|
|
2246
|
+
* @param {Highcharts.Dictionary<*>} options
|
|
1693
2247
|
* Event options
|
|
1694
|
-
*
|
|
2248
|
+
*
|
|
2249
|
+
* @param {number} options.order
|
|
1695
2250
|
* The order the event handler should be called. This opens for having
|
|
1696
2251
|
* one handler be called before another, independent of in which order
|
|
1697
2252
|
* they were added.
|
|
1698
|
-
*
|
|
2253
|
+
*
|
|
2254
|
+
* @return {Function}
|
|
2255
|
+
* A callback function to remove the added event.
|
|
1699
2256
|
*/
|
|
1700
2257
|
H.addEvent = function (el, type, fn, options) {
|
|
1701
2258
|
|
|
@@ -1745,14 +2302,18 @@ H.addEvent = function (el, type, fn, options) {
|
|
|
1745
2302
|
/**
|
|
1746
2303
|
* Remove an event that was added with {@link Highcharts#addEvent}.
|
|
1747
2304
|
*
|
|
1748
|
-
* @function
|
|
1749
|
-
*
|
|
1750
|
-
* @param {
|
|
1751
|
-
*
|
|
1752
|
-
* events are removed from the element.
|
|
1753
|
-
* @param {Function} [fn] - The specific callback to remove. If undefined, all
|
|
1754
|
-
* events that match the element and optionally the type are removed.
|
|
2305
|
+
* @function Highcharts.removeEvent
|
|
2306
|
+
*
|
|
2307
|
+
* @param {*} el
|
|
2308
|
+
* The element to remove events on.
|
|
1755
2309
|
*
|
|
2310
|
+
* @param {string} [type]
|
|
2311
|
+
* The type of events to remove. If undefined, all events are removed
|
|
2312
|
+
* from the element.
|
|
2313
|
+
*
|
|
2314
|
+
* @param {Function} [fn]
|
|
2315
|
+
* The specific callback to remove. If undefined, all events that match
|
|
2316
|
+
* the element and optionally the type are removed.
|
|
1756
2317
|
*/
|
|
1757
2318
|
H.removeEvent = function (el, type, fn) {
|
|
1758
2319
|
|
|
@@ -1821,16 +2382,22 @@ H.removeEvent = function (el, type, fn) {
|
|
|
1821
2382
|
/**
|
|
1822
2383
|
* Fire an event that was registered with {@link Highcharts#addEvent}.
|
|
1823
2384
|
*
|
|
1824
|
-
* @function
|
|
1825
|
-
*
|
|
1826
|
-
* @param {
|
|
1827
|
-
*
|
|
1828
|
-
* @
|
|
1829
|
-
*
|
|
1830
|
-
*
|
|
1831
|
-
*
|
|
1832
|
-
* other listeners haven't returned false.
|
|
2385
|
+
* @function Highcharts.fireEvent
|
|
2386
|
+
*
|
|
2387
|
+
* @param {*} el
|
|
2388
|
+
* The object to fire the event on. It can be a {@link HTMLDOMElement},
|
|
2389
|
+
* an {@link SVGElement} or any other object.
|
|
2390
|
+
*
|
|
2391
|
+
* @param {string} type
|
|
2392
|
+
* The type of event.
|
|
1833
2393
|
*
|
|
2394
|
+
* @param {Highcharts.Dictionary<*>} [eventArguments]
|
|
2395
|
+
* Custom event arguments that are passed on as an argument to the event
|
|
2396
|
+
* handler.
|
|
2397
|
+
*
|
|
2398
|
+
* @param {Function} [defaultFunction]
|
|
2399
|
+
* The default function to execute if the other listeners haven't
|
|
2400
|
+
* returned false.
|
|
1834
2401
|
*/
|
|
1835
2402
|
H.fireEvent = function (el, type, eventArguments, defaultFunction) {
|
|
1836
2403
|
var e,
|
|
@@ -1900,32 +2467,21 @@ H.fireEvent = function (el, type, eventArguments, defaultFunction) {
|
|
|
1900
2467
|
}
|
|
1901
2468
|
};
|
|
1902
2469
|
|
|
1903
|
-
/**
|
|
1904
|
-
* An animation configuration. Animation configurations can also be defined as
|
|
1905
|
-
* booleans, where `false` turns off animation and `true` defaults to a duration
|
|
1906
|
-
* of 500ms.
|
|
1907
|
-
* @typedef {Object} AnimationOptions
|
|
1908
|
-
* @property {Number} duration - The animation duration in milliseconds.
|
|
1909
|
-
* @property {String} [easing] - The name of an easing function as defined on
|
|
1910
|
-
* the `Math` object.
|
|
1911
|
-
* @property {Function} [complete] - A callback function to exectute when the
|
|
1912
|
-
* animation finishes.
|
|
1913
|
-
* @property {Function} [step] - A callback function to execute on each step of
|
|
1914
|
-
* each attribute or CSS property that's being animated. The first argument
|
|
1915
|
-
* contains information about the animation and progress.
|
|
1916
|
-
*/
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
2470
|
/**
|
|
1920
2471
|
* The global animate method, which uses Fx to create individual animators.
|
|
1921
2472
|
*
|
|
1922
|
-
* @function
|
|
1923
|
-
*
|
|
1924
|
-
* @param {HTMLDOMElement|SVGElement} el
|
|
1925
|
-
*
|
|
1926
|
-
*
|
|
1927
|
-
*
|
|
1928
|
-
*
|
|
2473
|
+
* @function Highcharts.animate
|
|
2474
|
+
*
|
|
2475
|
+
* @param {Highcharts.HTMLDOMElement|Highcharts.SVGElement} el
|
|
2476
|
+
* The element to animate.
|
|
2477
|
+
*
|
|
2478
|
+
* @param {Highcharts.HTMLAttributes|Highcharts.SVGAttributes} params
|
|
2479
|
+
* An object containing key-value pairs of the properties to animate.
|
|
2480
|
+
* Supports numeric as pixel-based CSS properties for HTML objects and
|
|
2481
|
+
* attributes for SVGElements.
|
|
2482
|
+
*
|
|
2483
|
+
* @param {Highcharts.AnimationOptionsObject} [opt]
|
|
2484
|
+
* Animation options.
|
|
1929
2485
|
*/
|
|
1930
2486
|
H.animate = function (el, params, opt) {
|
|
1931
2487
|
var start,
|
|
@@ -1988,20 +2544,30 @@ H.animate = function (el, params, opt) {
|
|
|
1988
2544
|
/**
|
|
1989
2545
|
* Factory to create new series prototypes.
|
|
1990
2546
|
*
|
|
1991
|
-
* @function
|
|
1992
|
-
*
|
|
1993
|
-
*
|
|
1994
|
-
*
|
|
1995
|
-
*
|
|
1996
|
-
*
|
|
1997
|
-
*
|
|
1998
|
-
*
|
|
1999
|
-
*
|
|
2000
|
-
*
|
|
2001
|
-
*
|
|
2002
|
-
*
|
|
2003
|
-
*
|
|
2004
|
-
*
|
|
2547
|
+
* @function Highcharts.seriesType
|
|
2548
|
+
*
|
|
2549
|
+
* @param {string} type
|
|
2550
|
+
* The series type name.
|
|
2551
|
+
*
|
|
2552
|
+
* @param {string} parent
|
|
2553
|
+
* The parent series type name. Use `line` to inherit from the basic
|
|
2554
|
+
* {@link Series} object.
|
|
2555
|
+
*
|
|
2556
|
+
* @param {*} options
|
|
2557
|
+
* The additional default options that is merged with the parent's
|
|
2558
|
+
* options.
|
|
2559
|
+
*
|
|
2560
|
+
* @param {*} props
|
|
2561
|
+
* The properties (functions and primitives) to set on the new
|
|
2562
|
+
* prototype.
|
|
2563
|
+
*
|
|
2564
|
+
* @param {*} [pointProps]
|
|
2565
|
+
* Members for a series-specific extension of the {@link Point}
|
|
2566
|
+
* prototype if needed.
|
|
2567
|
+
*
|
|
2568
|
+
* @return {Highcharts.Series}
|
|
2569
|
+
* The newly created prototype as extended from {@link Series} or its
|
|
2570
|
+
* derivatives.
|
|
2005
2571
|
*/
|
|
2006
2572
|
// docs: add to API + extending Highcharts
|
|
2007
2573
|
H.seriesType = function (type, parent, options, props, pointProps) {
|
|
@@ -2029,14 +2595,17 @@ H.seriesType = function (type, parent, options, props, pointProps) {
|
|
|
2029
2595
|
};
|
|
2030
2596
|
|
|
2031
2597
|
/**
|
|
2032
|
-
* Get a unique key for using in internal element id's and pointers. The key
|
|
2033
|
-
*
|
|
2598
|
+
* Get a unique key for using in internal element id's and pointers. The key is
|
|
2599
|
+
* composed of a random hash specific to this Highcharts instance, and a
|
|
2034
2600
|
* counter.
|
|
2035
|
-
*
|
|
2036
|
-
* @memberof Highcharts
|
|
2037
|
-
* @return {string} The key.
|
|
2601
|
+
*
|
|
2038
2602
|
* @example
|
|
2039
2603
|
* var id = H.uniqueKey(); // => 'highcharts-x45f6hp-0'
|
|
2604
|
+
*
|
|
2605
|
+
* @function Highcharts.uniqueKey
|
|
2606
|
+
*
|
|
2607
|
+
* @return {string}
|
|
2608
|
+
* A unique key.
|
|
2040
2609
|
*/
|
|
2041
2610
|
H.uniqueKey = (function () {
|
|
2042
2611
|
|
|
@@ -2048,10 +2617,36 @@ H.uniqueKey = (function () {
|
|
|
2048
2617
|
};
|
|
2049
2618
|
}());
|
|
2050
2619
|
|
|
2051
|
-
|
|
2052
|
-
* Register Highcharts as a plugin in jQuery
|
|
2053
|
-
*/
|
|
2620
|
+
// Register Highcharts as a plugin in jQuery
|
|
2054
2621
|
if (win.jQuery) {
|
|
2622
|
+
|
|
2623
|
+
/**
|
|
2624
|
+
* Highcharts-extended JQuery.
|
|
2625
|
+
*
|
|
2626
|
+
* @external JQuery
|
|
2627
|
+
*/
|
|
2628
|
+
|
|
2629
|
+
/**
|
|
2630
|
+
* Factory function to create a chart in the current JQuery selector
|
|
2631
|
+
* element.
|
|
2632
|
+
*
|
|
2633
|
+
* @function external:JQuery#highcharts
|
|
2634
|
+
*
|
|
2635
|
+
* @param {"Chart"|"Map"|"StockChart"|string} [className]
|
|
2636
|
+
* Name of the factory class in the Highcharts namespace.
|
|
2637
|
+
*
|
|
2638
|
+
* @param {Highcharts.Options} options
|
|
2639
|
+
* The chart options structure.
|
|
2640
|
+
*
|
|
2641
|
+
* @param {Highcharts.ChartCallbackFunction} [callback]
|
|
2642
|
+
* Function to run when the chart has loaded and and all external
|
|
2643
|
+
* images are loaded. Defining a [chart.event.load
|
|
2644
|
+
* ](https://api.highcharts.com/highcharts/chart.events.load) handler
|
|
2645
|
+
* is equivalent.
|
|
2646
|
+
*
|
|
2647
|
+
* @return {JQuery}
|
|
2648
|
+
* The current JQuery selector.
|
|
2649
|
+
*/
|
|
2055
2650
|
win.jQuery.fn.highcharts = function () {
|
|
2056
2651
|
var args = [].slice.call(arguments);
|
|
2057
2652
|
|