highcharts 10.2.1 → 10.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bower.json +1 -1
- package/es-modules/Accessibility/Accessibility.js +1 -1
- package/es-modules/Accessibility/Components/InfoRegionsComponent.js +9 -6
- package/es-modules/Accessibility/Components/LegendComponent.js +36 -32
- package/es-modules/Accessibility/Components/RangeSelectorComponent.js +1 -1
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +16 -16
- package/es-modules/Accessibility/Options/LangDefaults.js +4 -0
- package/es-modules/Core/Axis/Axis.js +42 -32
- package/es-modules/Core/Axis/Axis3DComposition.js +501 -0
- package/es-modules/Core/Axis/Axis3DDefaults.js +130 -0
- package/es-modules/Core/Axis/AxisDefaults.js +20 -7
- package/es-modules/Core/Axis/Color/ColorAxis.js +46 -52
- package/es-modules/Core/Axis/Color/ColorAxisComposition.js +4 -2
- package/es-modules/Core/Axis/NavigatorAxisComposition.js +161 -0
- package/es-modules/Core/Axis/OrdinalAxis.js +2 -1
- package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +1 -1
- package/es-modules/Core/Axis/RadialAxis.js +19 -5
- package/es-modules/Core/Axis/Tick.js +1 -1
- package/es-modules/Core/Axis/Tick3DComposition.js +71 -0
- package/es-modules/Core/Chart/Chart.js +16 -20
- package/es-modules/Core/Chart/Chart3D.js +4 -4
- package/es-modules/Core/Chart/ChartDefaults.js +33 -43
- package/es-modules/Core/Chart/GanttChart.js +1 -1
- package/es-modules/Core/Chart/MapChart.js +1 -1
- package/es-modules/Core/Chart/StockChart.js +11 -28
- package/es-modules/Core/{DefaultOptions.js → Defaults.js} +21 -37
- package/es-modules/Core/FormatUtilities.js +1 -1
- package/es-modules/Core/Globals.js +1 -1
- package/es-modules/Core/Legend/Legend.js +114 -110
- package/es-modules/Core/Legend/LegendSymbol.js +9 -6
- package/es-modules/Core/MSPointer.js +4 -2
- package/es-modules/Core/Pointer.js +125 -75
- package/es-modules/Core/Renderer/SVG/SVGElement.js +0 -3
- package/es-modules/Core/Renderer/SVG/SVGRenderer.js +28 -14
- package/es-modules/Core/Series/DataLabel.js +8 -5
- package/es-modules/Core/Series/Point.js +38 -22
- package/es-modules/Core/Series/Series.js +12 -9
- package/es-modules/Core/Series/SeriesDefaults.js +36 -24
- package/es-modules/Core/Series/SeriesRegistry.js +2 -2
- package/es-modules/Core/Time.js +6 -5
- package/es-modules/Core/Tooltip.js +6 -28
- package/es-modules/Core/Utilities.js +6 -8
- package/es-modules/Extensions/Annotations/Annotation.js +1 -1
- package/es-modules/Extensions/Annotations/AnnotationDefaults.js +13 -8
- package/es-modules/Extensions/Annotations/MockPoint.js +2 -1
- package/es-modules/Extensions/Annotations/NavigationBindings.js +4 -5
- package/es-modules/Extensions/Annotations/NavigationBindingsDefaults.js +1 -1
- package/es-modules/Extensions/Annotations/Popup/Popup.js +2 -2
- package/es-modules/Extensions/Annotations/Popup/PopupAnnotations.js +4 -4
- package/es-modules/Extensions/Annotations/Popup/PopupComposition.js +1 -1
- package/es-modules/Extensions/Boost/BoostSeries.js +11 -8
- package/es-modules/Extensions/Breadcrumbs.js +2 -2
- package/es-modules/Extensions/Data.js +2 -2
- package/es-modules/Extensions/DataGrouping/ApproximationDefaults.js +157 -0
- package/es-modules/Extensions/DataGrouping/ApproximationRegistry.js +35 -0
- package/es-modules/Extensions/DataGrouping/DataGrouping.js +469 -0
- package/es-modules/Extensions/DataGrouping/DataGroupingAxisComposition.js +174 -0
- package/es-modules/Extensions/DataGrouping/DataGroupingDefaults.js +143 -0
- package/es-modules/Extensions/DataGrouping/DataGroupingSeriesComposition.js +479 -0
- package/es-modules/Extensions/Debugger/Debugger.js +1 -1
- package/es-modules/Extensions/DraggablePoints.js +6 -2
- package/es-modules/Extensions/Drilldown.js +3 -5
- package/es-modules/Extensions/ExportData/ExportData.js +31 -5
- package/es-modules/Extensions/Exporting/Exporting.js +47 -60
- package/es-modules/Extensions/Exporting/ExportingDefaults.js +22 -24
- package/es-modules/Extensions/GeoJSON.js +3 -1
- package/es-modules/Extensions/MarkerClusters.js +1 -1
- package/es-modules/Extensions/NoDataToDisplay.js +1 -1
- package/es-modules/Extensions/OfflineExporting/OfflineExporting.js +5 -5
- package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
- package/es-modules/Extensions/Oldie/Oldie.js +3 -3
- package/es-modules/Extensions/Oldie/VMLRenderer3D.js +1 -1
- package/es-modules/Extensions/OldiePolyfills.js +3 -1
- package/es-modules/Extensions/Pane.js +42 -5
- package/es-modules/Extensions/ParallelCoordinates.js +5 -1
- package/es-modules/Extensions/PatternFill.js +10 -10
- package/es-modules/Extensions/SeriesLabel/SeriesLabel.js +2 -2
- package/es-modules/Extensions/SeriesLabel/SeriesLabelDefaults.js +4 -0
- package/es-modules/Extensions/Sonification/Sonification.js +1 -1
- package/es-modules/Extensions/Themes/Avocado.js +1 -1
- package/es-modules/Extensions/Themes/BrandDark.js +1 -1
- package/es-modules/Extensions/Themes/BrandLight.js +1 -1
- package/es-modules/Extensions/Themes/DarkBlue.js +1 -1
- package/es-modules/Extensions/Themes/DarkGreen.js +1 -1
- package/es-modules/Extensions/Themes/DarkUnica.js +1 -1
- package/es-modules/Extensions/Themes/Gray.js +1 -1
- package/es-modules/Extensions/Themes/Grid.js +1 -1
- package/es-modules/Extensions/Themes/GridLight.js +1 -1
- package/es-modules/Extensions/Themes/HighContrastDark.js +1 -1
- package/es-modules/Extensions/Themes/HighContrastLight.js +1 -1
- package/es-modules/Extensions/Themes/SandSignika.js +1 -1
- package/es-modules/Extensions/Themes/Skies.js +1 -1
- package/es-modules/Extensions/Themes/Sunset.js +1 -1
- package/es-modules/Gantt/Connection.js +5 -5
- package/es-modules/Gantt/Pathfinder.js +6 -6
- package/es-modules/Maps/MapNavigation.js +1 -1
- package/es-modules/Maps/{MapNavigationOptionsDefault.js → MapNavigationDefaults.js} +4 -4
- package/es-modules/Maps/MapViewOptionsDefault.js +4 -4
- package/es-modules/Series/ArcDiagram/ArcDiagramSeries.js +3 -5
- package/es-modules/Series/AreaRange/AreaRangePoint.js +6 -10
- package/es-modules/Series/AreaRange/AreaRangeSeries.js +59 -48
- package/es-modules/Series/BoxPlot/BoxPlotSeries.js +4 -1
- package/es-modules/Series/Bubble/BubbleLegendComposition.js +22 -16
- package/es-modules/Series/Bubble/BubbleLegendItem.js +17 -21
- package/es-modules/Series/Candlestick/CandlestickSeries.js +15 -175
- package/es-modules/Series/Candlestick/CandlestickSeriesDefaults.js +179 -0
- package/es-modules/Series/Column/ColumnSeries.js +25 -506
- package/es-modules/Series/Column/ColumnSeriesDefaults.js +487 -0
- package/es-modules/Series/ColumnRange/ColumnRangeSeries.js +40 -36
- package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +2 -106
- package/es-modules/Series/DependencyWheel/DependencyWheelSeriesDefaults.js +183 -0
- package/es-modules/Series/DotPlot/DotPlotSeries.js +11 -12
- package/es-modules/Series/DrawPointUtilities.js +2 -14
- package/es-modules/Series/Dumbbell/DumbbellPoint.js +5 -4
- package/es-modules/Series/Dumbbell/DumbbellSeries.js +11 -7
- package/es-modules/Series/ErrorBar/ErrorBarSeries.js +19 -136
- package/es-modules/Series/ErrorBar/ErrorBarSeriesDefaults.js +147 -0
- package/es-modules/Series/Flags/FlagsPoint.js +2 -3
- package/es-modules/Series/Flags/FlagsSeries.js +31 -298
- package/es-modules/Series/Flags/FlagsSeriesDefaults.js +295 -0
- package/es-modules/Series/Flags/FlagsSymbols.js +96 -71
- package/es-modules/Series/HLC/HLCPoint.js +2 -2
- package/es-modules/Series/HLC/HLCSeries.js +7 -172
- package/es-modules/Series/HLC/HLCSeriesDefaults.js +184 -0
- package/es-modules/Series/Heatmap/HeatmapSeries.js +3 -0
- package/es-modules/Series/HeikinAshi/HeikinAshiPoint.js +3 -20
- package/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +78 -139
- package/es-modules/Series/HeikinAshi/HeikinAshiSeriesDefaults.js +102 -0
- package/es-modules/Series/Item/ItemPoint.js +0 -1
- package/es-modules/Series/Item/ItemSeries.js +13 -8
- package/es-modules/Series/Line/LineSeries.js +8 -4
- package/es-modules/Series/Map/MapPoint.js +19 -1
- package/es-modules/Series/Map/MapSeries.js +7 -3
- package/es-modules/Series/MapBubble/MapBubbleSeries.js +4 -0
- package/es-modules/Series/MapPoint/MapPointPoint.js +0 -5
- package/es-modules/Series/MapPoint/MapPointSeries.js +24 -9
- package/es-modules/Series/Networkgraph/NetworkgraphSeries.js +2 -5
- package/es-modules/Series/Networkgraph/NetworkgraphSeriesDefaults.js +2 -0
- package/es-modules/Series/OHLC/OHLCPoint.js +0 -2
- package/es-modules/Series/OHLC/OHLCSeries.js +64 -160
- package/es-modules/Series/OHLC/OHLCSeriesDefaults.js +151 -0
- package/es-modules/Series/Organization/OrganizationPoint.js +0 -2
- package/es-modules/Series/Organization/OrganizationSeries.js +96 -469
- package/es-modules/Series/Organization/OrganizationSeriesDefaults.js +415 -0
- package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +3 -10
- package/es-modules/Series/PackedBubble/PackedBubbleSeriesDefaults.js +2 -0
- package/es-modules/Series/PathUtilities.js +74 -0
- package/es-modules/Series/Pie/PieSeries.js +2 -644
- package/es-modules/Series/Pie/PieSeriesDefaults.js +660 -0
- package/es-modules/Series/PolarComposition.js +233 -15
- package/es-modules/Series/Sankey/SankeySeries.js +27 -530
- package/es-modules/Series/Sankey/SankeySeriesDefaults.js +522 -0
- package/es-modules/Series/Scatter/ScatterSeries.js +2 -172
- package/es-modules/Series/Scatter/ScatterSeriesDefaults.js +188 -0
- package/es-modules/Series/SolidGauge/SolidGaugeSeries.js +12 -182
- package/es-modules/Series/SolidGauge/SolidGaugeSeriesDefaults.js +199 -0
- package/es-modules/Series/Sunburst/SunburstNode.js +34 -0
- package/es-modules/Series/Sunburst/SunburstPoint.js +2 -1
- package/es-modules/Series/Sunburst/SunburstSeries.js +3 -1
- package/es-modules/Series/Timeline/TimelineSeries.js +2 -231
- package/es-modules/Series/Timeline/TimelineSeriesDefaults.js +248 -0
- package/es-modules/Series/TreeUtilities.js +1 -2
- package/es-modules/Series/Treegraph/TreegraphLayout.js +338 -0
- package/es-modules/Series/Treegraph/TreegraphLink.js +92 -0
- package/es-modules/Series/Treegraph/TreegraphNode.js +206 -0
- package/es-modules/Series/Treegraph/TreegraphPoint.js +175 -0
- package/es-modules/Series/Treegraph/TreegraphSeries.js +510 -0
- package/es-modules/Series/Treegraph/TreegraphSeriesDefaults.js +231 -0
- package/es-modules/Series/Treemap/TreemapNode.js +48 -0
- package/es-modules/Series/Treemap/TreemapPoint.js +2 -1
- package/es-modules/Series/Treemap/TreemapSeries.js +29 -27
- package/es-modules/Series/Variwide/VariwideComposition.js +70 -26
- package/es-modules/Series/Variwide/VariwidePoint.js +8 -7
- package/es-modules/Series/Variwide/VariwideSeries.js +19 -14
- package/es-modules/Series/Vector/VectorSeries.js +2 -2
- package/es-modules/Series/Venn/VennSeries.js +14 -0
- package/es-modules/Series/Waterfall/WaterfallSeries.js +0 -1
- package/es-modules/Series/Windbarb/WindbarbSeries.js +3 -2
- package/es-modules/Series/Wordcloud/WordcloudSeries.js +3 -0
- package/es-modules/Stock/Indicators/AO/AOIndicator.js +1 -2
- package/es-modules/Stock/Indicators/BB/BBIndicator.js +15 -4
- package/es-modules/Stock/Indicators/IKH/IKHIndicator.js +21 -18
- package/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +1 -2
- package/es-modules/Stock/Indicators/MACD/MACDIndicator.js +1 -2
- package/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +1 -1
- package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +0 -1
- package/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +3 -4
- package/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +1 -2
- package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +6 -7
- package/es-modules/{Core → Stock/Navigator}/Navigator.js +112 -686
- package/es-modules/Stock/Navigator/NavigatorComposition.js +218 -0
- package/es-modules/Stock/Navigator/NavigatorDefaults.js +490 -0
- package/es-modules/Stock/Navigator/NavigatorSymbols.js +44 -0
- package/es-modules/{Extensions → Stock/RangeSelector}/RangeSelector.js +154 -818
- package/es-modules/Stock/RangeSelector/RangeSelectorComposition.js +286 -0
- package/es-modules/Stock/RangeSelector/RangeSelectorDefaults.js +521 -0
- package/es-modules/{Core → Stock/Scrollbar}/Scrollbar.js +4 -4
- package/es-modules/{Core → Stock/Scrollbar}/ScrollbarDefaults.js +1 -1
- package/es-modules/Stock/{StockToolbar.js → StockTools/StockToolbar.js} +2 -2
- package/es-modules/Stock/{StockTools.js → StockTools/StockTools.js} +3 -3
- package/es-modules/Stock/{StockToolsBindings.js → StockTools/StockToolsBindings.js} +3 -3
- package/es-modules/Stock/{StockToolsDefaults.js → StockTools/StockToolsDefaults.js} +4 -4
- package/es-modules/Stock/{StockToolsGui.js → StockTools/StockToolsGui.js} +4 -4
- package/es-modules/Stock/{StockToolsUtilities.js → StockTools/StockToolsUtilities.js} +4 -4
- package/es-modules/masters/highcharts-3d.src.js +3 -5
- package/es-modules/masters/highcharts-gantt.src.js +1 -1
- package/es-modules/masters/highcharts-more.src.js +1 -1
- package/es-modules/masters/highcharts.src.js +6 -6
- package/es-modules/masters/highmaps.src.js +1 -1
- package/es-modules/masters/highstock.src.js +1 -1
- package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
- package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
- package/es-modules/masters/indicators/ao.src.js +1 -1
- package/es-modules/masters/indicators/apo.src.js +1 -1
- package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
- package/es-modules/masters/indicators/aroon.src.js +1 -1
- package/es-modules/masters/indicators/atr.src.js +1 -1
- package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
- package/es-modules/masters/indicators/cci.src.js +1 -1
- package/es-modules/masters/indicators/chaikin.src.js +1 -1
- package/es-modules/masters/indicators/cmf.src.js +1 -1
- package/es-modules/masters/indicators/cmo.src.js +1 -1
- package/es-modules/masters/indicators/dema.src.js +1 -1
- package/es-modules/masters/indicators/disparity-index.src.js +1 -1
- package/es-modules/masters/indicators/dmi.src.js +1 -1
- package/es-modules/masters/indicators/dpo.src.js +1 -1
- package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/es-modules/masters/indicators/indicators-all.src.js +1 -1
- package/es-modules/masters/indicators/indicators.src.js +1 -1
- package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
- package/es-modules/masters/indicators/klinger.src.js +1 -1
- package/es-modules/masters/indicators/macd.src.js +1 -1
- package/es-modules/masters/indicators/mfi.src.js +1 -1
- package/es-modules/masters/indicators/momentum.src.js +1 -1
- package/es-modules/masters/indicators/natr.src.js +1 -1
- package/es-modules/masters/indicators/obv.src.js +1 -1
- package/es-modules/masters/indicators/pivot-points.src.js +1 -1
- package/es-modules/masters/indicators/ppo.src.js +1 -1
- package/es-modules/masters/indicators/price-channel.src.js +1 -1
- package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
- package/es-modules/masters/indicators/psar.src.js +1 -1
- package/es-modules/masters/indicators/regressions.src.js +1 -1
- package/es-modules/masters/indicators/roc.src.js +1 -1
- package/es-modules/masters/indicators/rsi.src.js +1 -1
- package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
- package/es-modules/masters/indicators/stochastic.src.js +1 -1
- package/es-modules/masters/indicators/supertrend.src.js +1 -1
- package/es-modules/masters/indicators/tema.src.js +1 -1
- package/es-modules/masters/indicators/trendline.src.js +1 -1
- package/es-modules/masters/indicators/trix.src.js +1 -1
- package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
- package/es-modules/masters/indicators/vwap.src.js +1 -1
- package/es-modules/masters/indicators/williams-r.src.js +1 -1
- package/es-modules/masters/indicators/wma.src.js +1 -1
- package/es-modules/masters/indicators/zigzag.src.js +1 -1
- package/es-modules/masters/modules/accessibility.src.js +1 -1
- package/es-modules/masters/modules/annotations-advanced.src.js +1 -1
- package/es-modules/masters/modules/annotations.src.js +1 -1
- package/es-modules/masters/modules/arc-diagram.src.js +1 -1
- package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
- package/es-modules/masters/modules/boost-canvas.src.js +1 -1
- package/es-modules/masters/modules/boost.src.js +1 -1
- package/es-modules/masters/modules/broken-axis.src.js +1 -1
- package/es-modules/masters/modules/bullet.src.js +1 -1
- package/es-modules/masters/modules/coloraxis.src.js +1 -1
- package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
- package/es-modules/masters/modules/cylinder.src.js +1 -1
- package/es-modules/masters/modules/data.src.js +1 -1
- package/es-modules/masters/modules/datagrouping.src.js +11 -3
- package/es-modules/masters/modules/debugger.src.js +1 -1
- package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
- package/es-modules/masters/modules/dotplot.src.js +1 -1
- package/es-modules/masters/modules/drag-panes.src.js +1 -1
- package/es-modules/masters/modules/draggable-points.src.js +1 -1
- package/es-modules/masters/modules/drilldown.src.js +1 -1
- package/es-modules/masters/modules/dumbbell.src.js +1 -1
- package/es-modules/masters/modules/export-data.src.js +1 -1
- package/es-modules/masters/modules/exporting.src.js +1 -1
- package/es-modules/masters/modules/full-screen.src.js +1 -1
- package/es-modules/masters/modules/funnel.src.js +1 -1
- package/es-modules/masters/modules/funnel3d.src.js +1 -1
- package/es-modules/masters/modules/gantt.src.js +9 -5
- package/es-modules/masters/modules/grid-axis.src.js +1 -1
- package/es-modules/masters/modules/heatmap.src.js +1 -1
- package/es-modules/masters/modules/heikinashi.src.js +5 -2
- package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
- package/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
- package/es-modules/masters/modules/item-series.src.js +1 -1
- package/es-modules/masters/modules/lollipop.src.js +1 -1
- package/es-modules/masters/modules/map.src.js +1 -1
- package/es-modules/masters/modules/marker-clusters.src.js +1 -1
- package/es-modules/masters/modules/networkgraph.src.js +1 -1
- package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
- package/es-modules/masters/modules/offline-exporting.src.js +1 -1
- package/es-modules/masters/modules/oldie-polyfills.src.js +1 -1
- package/es-modules/masters/modules/oldie.src.js +1 -1
- package/es-modules/masters/modules/organization.src.js +1 -1
- package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
- package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
- package/es-modules/masters/modules/pareto.src.js +1 -1
- package/es-modules/masters/modules/pathfinder.src.js +1 -1
- package/es-modules/masters/modules/pattern-fill.src.js +1 -1
- package/es-modules/masters/modules/price-indicator.src.js +1 -1
- package/es-modules/masters/modules/pyramid3d.src.js +1 -1
- package/es-modules/masters/modules/sankey.src.js +1 -1
- package/es-modules/masters/modules/series-label.src.js +1 -1
- package/es-modules/masters/modules/series-on-point.src.js +1 -1
- package/es-modules/masters/modules/solid-gauge.src.js +1 -1
- package/es-modules/masters/modules/sonification.src.js +1 -1
- package/es-modules/masters/modules/static-scale.src.js +1 -1
- package/es-modules/masters/modules/stock-tools.src.js +4 -4
- package/es-modules/masters/modules/stock.src.js +17 -11
- package/es-modules/masters/modules/streamgraph.src.js +1 -1
- package/es-modules/masters/modules/sunburst.src.js +1 -1
- package/es-modules/masters/modules/tilemap.src.js +1 -1
- package/es-modules/masters/modules/timeline.src.js +1 -1
- package/es-modules/masters/modules/treegraph.src.js +13 -0
- package/es-modules/masters/modules/treegrid.src.js +1 -1
- package/es-modules/masters/modules/treemap.src.js +1 -1
- package/es-modules/masters/modules/variable-pie.src.js +1 -1
- package/es-modules/masters/modules/variwide.src.js +5 -2
- package/es-modules/masters/modules/vector.src.js +1 -1
- package/es-modules/masters/modules/venn.src.js +1 -1
- package/es-modules/masters/modules/windbarb.src.js +1 -1
- package/es-modules/masters/modules/wordcloud.src.js +1 -1
- package/es-modules/masters/modules/xrange.src.js +1 -1
- package/es-modules/masters/themes/avocado.src.js +1 -1
- package/es-modules/masters/themes/brand-dark.src.js +1 -1
- package/es-modules/masters/themes/brand-light.src.js +1 -1
- package/es-modules/masters/themes/dark-blue.src.js +1 -1
- package/es-modules/masters/themes/dark-green.src.js +1 -1
- package/es-modules/masters/themes/dark-unica.src.js +1 -1
- package/es-modules/masters/themes/gray.src.js +1 -1
- package/es-modules/masters/themes/grid-light.src.js +1 -1
- package/es-modules/masters/themes/grid.src.js +1 -1
- package/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
- package/es-modules/masters/themes/high-contrast-light.src.js +1 -1
- package/es-modules/masters/themes/sand-signika.src.js +1 -1
- package/es-modules/masters/themes/skies.src.js +1 -1
- package/es-modules/masters/themes/sunset.src.js +1 -1
- package/highcharts-3d.js +97 -98
- package/highcharts-3d.js.map +1 -1
- package/highcharts-3d.src.js +476 -449
- package/highcharts-gantt.js +811 -808
- package/highcharts-gantt.js.map +1 -1
- package/highcharts-gantt.src.js +14619 -14112
- package/highcharts-more.d.ts +0 -8
- package/highcharts-more.js +208 -201
- package/highcharts-more.js.map +1 -1
- package/highcharts-more.src.d.ts +0 -8
- package/highcharts-more.src.js +679 -289
- package/highcharts.d.ts +30739 -6156
- package/highcharts.js +590 -589
- package/highcharts.js.map +1 -1
- package/highcharts.src.d.ts +30739 -6156
- package/highcharts.src.js +1988 -1799
- package/highmaps.js +759 -757
- package/highmaps.js.map +1 -1
- package/highmaps.src.js +2339 -2077
- package/highstock.js +802 -794
- package/highstock.js.map +1 -1
- package/highstock.src.js +12349 -11416
- package/indicators/acceleration-bands.js +1 -1
- package/indicators/acceleration-bands.src.js +1 -1
- package/indicators/accumulation-distribution.js +1 -1
- package/indicators/accumulation-distribution.src.js +1 -1
- package/indicators/ao.js +6 -6
- package/indicators/ao.js.map +1 -1
- package/indicators/ao.src.js +4 -3
- package/indicators/apo.js +1 -1
- package/indicators/apo.src.js +1 -1
- package/indicators/aroon-oscillator.js +1 -1
- package/indicators/aroon-oscillator.src.js +1 -1
- package/indicators/aroon.js +1 -1
- package/indicators/aroon.src.js +1 -1
- package/indicators/atr.js +1 -1
- package/indicators/atr.src.js +1 -1
- package/indicators/bollinger-bands.js +1 -1
- package/indicators/bollinger-bands.js.map +1 -1
- package/indicators/bollinger-bands.src.js +16 -5
- package/indicators/cci.js +1 -1
- package/indicators/cci.src.js +1 -1
- package/indicators/chaikin.js +1 -1
- package/indicators/chaikin.src.js +1 -1
- package/indicators/cmf.js +1 -1
- package/indicators/cmf.src.js +1 -1
- package/indicators/cmo.d.ts +17 -0
- package/indicators/cmo.js +1 -1
- package/indicators/cmo.src.d.ts +17 -0
- package/indicators/cmo.src.js +1 -1
- package/indicators/dema.js +1 -1
- package/indicators/dema.src.js +1 -1
- package/indicators/disparity-index.d.ts +17 -0
- package/indicators/disparity-index.js +1 -1
- package/indicators/disparity-index.src.d.ts +17 -0
- package/indicators/disparity-index.src.js +1 -1
- package/indicators/dmi.d.ts +17 -0
- package/indicators/dmi.js +1 -1
- package/indicators/dmi.src.d.ts +17 -0
- package/indicators/dmi.src.js +1 -1
- package/indicators/dpo.js +1 -1
- package/indicators/dpo.src.js +1 -1
- package/indicators/ichimoku-kinko-hyo.js +14 -14
- package/indicators/ichimoku-kinko-hyo.js.map +1 -1
- package/indicators/ichimoku-kinko-hyo.src.js +22 -19
- package/indicators/indicators-all.js +198 -199
- package/indicators/indicators-all.js.map +1 -1
- package/indicators/indicators-all.src.js +63 -57
- package/indicators/indicators.js +13 -13
- package/indicators/indicators.js.map +1 -1
- package/indicators/indicators.src.js +1 -15
- package/indicators/keltner-channels.js +1 -1
- package/indicators/keltner-channels.src.js +1 -1
- package/indicators/klinger.d.ts +17 -0
- package/indicators/klinger.js +12 -12
- package/indicators/klinger.js.map +1 -1
- package/indicators/klinger.src.d.ts +17 -0
- package/indicators/klinger.src.js +4 -3
- package/indicators/macd.js +1 -1
- package/indicators/macd.js.map +1 -1
- package/indicators/macd.src.js +4 -3
- package/indicators/mfi.js +1 -1
- package/indicators/mfi.src.js +1 -1
- package/indicators/momentum.js +1 -1
- package/indicators/momentum.src.js +1 -1
- package/indicators/natr.js +1 -1
- package/indicators/natr.src.js +1 -1
- package/indicators/obv.d.ts +17 -0
- package/indicators/obv.js +1 -1
- package/indicators/obv.src.d.ts +17 -0
- package/indicators/obv.src.js +1 -1
- package/indicators/pivot-points.js +2 -2
- package/indicators/pivot-points.js.map +1 -1
- package/indicators/pivot-points.src.js +2 -2
- package/indicators/ppo.js +1 -1
- package/indicators/ppo.src.js +1 -1
- package/indicators/price-channel.js +1 -1
- package/indicators/price-channel.src.js +1 -1
- package/indicators/price-envelopes.js +1 -1
- package/indicators/price-envelopes.src.js +1 -1
- package/indicators/psar.js +1 -1
- package/indicators/psar.src.js +1 -1
- package/indicators/regressions.js +1 -1
- package/indicators/regressions.src.js +1 -1
- package/indicators/roc.js +1 -1
- package/indicators/roc.src.js +1 -1
- package/indicators/rsi.js +1 -1
- package/indicators/rsi.src.js +1 -1
- package/indicators/slow-stochastic.js +5 -5
- package/indicators/slow-stochastic.js.map +1 -1
- package/indicators/slow-stochastic.src.js +6 -5
- package/indicators/stochastic.js +1 -1
- package/indicators/stochastic.src.js +1 -1
- package/indicators/supertrend.js +7 -7
- package/indicators/supertrend.js.map +1 -1
- package/indicators/supertrend.src.js +4 -3
- package/indicators/tema.js +1 -1
- package/indicators/tema.src.js +1 -1
- package/indicators/trendline.js +1 -1
- package/indicators/trendline.src.js +1 -1
- package/indicators/trix.js +1 -1
- package/indicators/trix.src.js +1 -1
- package/indicators/volume-by-price.js +17 -17
- package/indicators/volume-by-price.js.map +1 -1
- package/indicators/volume-by-price.src.js +9 -8
- package/indicators/vwap.js +1 -1
- package/indicators/vwap.src.js +1 -1
- package/indicators/williams-r.js +1 -1
- package/indicators/williams-r.src.js +1 -1
- package/indicators/wma.js +1 -1
- package/indicators/wma.src.js +1 -1
- package/indicators/zigzag.js +1 -1
- package/indicators/zigzag.src.js +1 -1
- package/modules/accessibility.js +214 -213
- package/modules/accessibility.js.map +1 -1
- package/modules/accessibility.src.js +991 -835
- package/modules/annotations-advanced.js +16 -16
- package/modules/annotations-advanced.js.map +1 -1
- package/modules/annotations-advanced.src.js +29 -24
- package/modules/annotations.js +91 -91
- package/modules/annotations.js.map +1 -1
- package/modules/annotations.src.js +29 -24
- package/modules/arc-diagram.d.ts +17 -0
- package/modules/arc-diagram.js +15 -15
- package/modules/arc-diagram.js.map +1 -1
- package/modules/arc-diagram.src.d.ts +17 -0
- package/modules/arc-diagram.src.js +6 -6
- package/modules/arrow-symbols.js +1 -1
- package/modules/arrow-symbols.src.js +1 -1
- package/modules/boost-canvas.js +19 -19
- package/modules/boost-canvas.js.map +1 -1
- package/modules/boost-canvas.src.js +13 -8
- package/modules/boost.js +37 -37
- package/modules/boost.js.map +1 -1
- package/modules/boost.src.js +13 -8
- package/modules/broken-axis.js +1 -1
- package/modules/broken-axis.src.js +1 -1
- package/modules/bullet.js +1 -1
- package/modules/bullet.src.js +1 -1
- package/modules/coloraxis.js +25 -24
- package/modules/coloraxis.js.map +1 -1
- package/modules/coloraxis.src.js +77 -58
- package/modules/current-date-indicator.js +1 -1
- package/modules/current-date-indicator.src.js +1 -1
- package/modules/cylinder.js +1 -1
- package/modules/cylinder.src.js +1 -1
- package/modules/data.js +27 -27
- package/modules/data.js.map +1 -1
- package/modules/data.src.js +3 -3
- package/modules/datagrouping.d.ts +31 -0
- package/modules/datagrouping.js +23 -21
- package/modules/datagrouping.js.map +1 -1
- package/modules/datagrouping.src.d.ts +31 -0
- package/modules/datagrouping.src.js +921 -640
- package/modules/debugger.js +3 -3
- package/modules/debugger.js.map +1 -1
- package/modules/debugger.src.js +2 -2
- package/modules/dependency-wheel.js +12 -12
- package/modules/dependency-wheel.js.map +1 -1
- package/modules/dependency-wheel.src.js +191 -108
- package/modules/dotplot.js +6 -6
- package/modules/dotplot.js.map +1 -1
- package/modules/dotplot.src.js +10 -13
- package/modules/drag-panes.js +1 -1
- package/modules/drag-panes.src.js +1 -1
- package/modules/draggable-points.js +5 -5
- package/modules/draggable-points.js.map +1 -1
- package/modules/draggable-points.src.js +7 -3
- package/modules/drilldown.js +37 -37
- package/modules/drilldown.js.map +1 -1
- package/modules/drilldown.src.js +5 -6
- package/modules/dumbbell.js +17 -17
- package/modules/dumbbell.js.map +1 -1
- package/modules/dumbbell.src.js +27 -22
- package/modules/export-data.js +26 -25
- package/modules/export-data.js.map +1 -1
- package/modules/export-data.src.js +33 -6
- package/modules/exporting.js +36 -35
- package/modules/exporting.js.map +1 -1
- package/modules/exporting.src.js +81 -88
- package/modules/full-screen.js +1 -1
- package/modules/full-screen.src.js +1 -1
- package/modules/funnel.js +1 -1
- package/modules/funnel.src.js +1 -1
- package/modules/funnel3d.js +1 -1
- package/modules/funnel3d.src.js +1 -1
- package/modules/gantt.js +221 -219
- package/modules/gantt.js.map +1 -1
- package/modules/gantt.src.js +12842 -12524
- package/modules/grid-axis.js +1 -1
- package/modules/grid-axis.src.js +1 -1
- package/modules/heatmap.js +40 -40
- package/modules/heatmap.js.map +1 -1
- package/modules/heatmap.src.js +80 -58
- package/modules/heikinashi.d.ts +17 -0
- package/modules/heikinashi.js +9 -8
- package/modules/heikinashi.js.map +1 -1
- package/modules/heikinashi.src.d.ts +17 -0
- package/modules/heikinashi.src.js +192 -165
- package/modules/histogram-bellcurve.js +1 -1
- package/modules/histogram-bellcurve.src.js +1 -1
- package/modules/hollowcandlestick.d.ts +17 -0
- package/modules/hollowcandlestick.js +1 -1
- package/modules/hollowcandlestick.src.d.ts +17 -0
- package/modules/hollowcandlestick.src.js +1 -1
- package/modules/item-series.js +12 -12
- package/modules/item-series.js.map +1 -1
- package/modules/item-series.src.js +14 -10
- package/modules/lollipop.js +1 -1
- package/modules/lollipop.src.js +1 -1
- package/modules/map.js +172 -171
- package/modules/map.js.map +1 -1
- package/modules/map.src.js +194 -121
- package/modules/marker-clusters.js +2 -2
- package/modules/marker-clusters.js.map +1 -1
- package/modules/marker-clusters.src.js +2 -2
- package/modules/networkgraph.js +8 -8
- package/modules/networkgraph.js.map +1 -1
- package/modules/networkgraph.src.js +5 -6
- package/modules/no-data-to-display.js +4 -4
- package/modules/no-data-to-display.js.map +1 -1
- package/modules/no-data-to-display.src.js +2 -2
- package/modules/offline-exporting.js +4 -4
- package/modules/offline-exporting.js.map +1 -1
- package/modules/offline-exporting.src.js +7 -7
- package/modules/oldie-polyfills.js +7 -7
- package/modules/oldie-polyfills.js.map +1 -1
- package/modules/oldie-polyfills.src.js +9 -7
- package/modules/oldie.js +30 -30
- package/modules/oldie.js.map +1 -1
- package/modules/oldie.src.js +5 -5
- package/modules/organization.js +18 -16
- package/modules/organization.js.map +1 -1
- package/modules/organization.src.js +659 -495
- package/modules/overlapping-datalabels.js +1 -1
- package/modules/overlapping-datalabels.src.js +1 -1
- package/modules/parallel-coordinates.js +10 -10
- package/modules/parallel-coordinates.js.map +1 -1
- package/modules/parallel-coordinates.src.js +6 -2
- package/modules/pareto.js +1 -1
- package/modules/pareto.src.js +1 -1
- package/modules/pathfinder.js +31 -31
- package/modules/pathfinder.js.map +1 -1
- package/modules/pathfinder.src.js +19 -23
- package/modules/pattern-fill.js +2 -2
- package/modules/pattern-fill.js.map +1 -1
- package/modules/pattern-fill.src.js +11 -11
- package/modules/price-indicator.js +1 -1
- package/modules/price-indicator.src.js +1 -1
- package/modules/pyramid3d.js +1 -1
- package/modules/pyramid3d.src.js +1 -1
- package/modules/sankey.js +33 -32
- package/modules/sankey.js.map +1 -1
- package/modules/sankey.src.js +571 -550
- package/modules/series-label.js +17 -17
- package/modules/series-label.js.map +1 -1
- package/modules/series-label.src.js +7 -3
- package/modules/series-on-point.d.ts +17 -0
- package/modules/series-on-point.js +1 -1
- package/modules/series-on-point.src.d.ts +17 -0
- package/modules/series-on-point.src.js +1 -1
- package/modules/solid-gauge.js +11 -10
- package/modules/solid-gauge.js.map +1 -1
- package/modules/solid-gauge.src.js +220 -192
- package/modules/sonification.js +2 -2
- package/modules/sonification.js.map +1 -1
- package/modules/sonification.src.js +2 -2
- package/modules/static-scale.js +1 -1
- package/modules/static-scale.src.js +1 -1
- package/modules/stock-tools.js +59 -59
- package/modules/stock-tools.js.map +1 -1
- package/modules/stock-tools.src.js +19 -21
- package/modules/stock.d.ts +26 -6
- package/modules/stock.js +212 -205
- package/modules/stock.js.map +1 -1
- package/modules/stock.src.d.ts +26 -6
- package/modules/stock.src.js +11361 -10617
- package/modules/streamgraph.js +1 -1
- package/modules/streamgraph.src.js +1 -1
- package/modules/sunburst.js +75 -73
- package/modules/sunburst.js.map +1 -1
- package/modules/sunburst.src.js +133 -57
- package/modules/tilemap.js +1 -1
- package/modules/tilemap.src.js +1 -1
- package/modules/timeline.js +18 -18
- package/modules/timeline.js.map +1 -1
- package/modules/timeline.src.js +257 -233
- package/modules/treegraph.d.ts +17 -0
- package/modules/treegraph.js +44 -0
- package/modules/treegraph.js.map +1 -0
- package/modules/treegraph.src.d.ts +17 -0
- package/modules/treegraph.src.js +1829 -0
- package/modules/treegrid.js +2 -2
- package/modules/treegrid.js.map +1 -1
- package/modules/treegrid.src.js +2 -3
- package/modules/treemap.js +54 -53
- package/modules/treemap.js.map +1 -1
- package/modules/treemap.src.js +90 -52
- package/modules/variable-pie.js +1 -1
- package/modules/variable-pie.src.js +1 -1
- package/modules/variwide.js +12 -12
- package/modules/variwide.js.map +1 -1
- package/modules/variwide.src.js +158 -106
- package/modules/vector.js +1 -1
- package/modules/vector.src.js +3 -3
- package/modules/venn.js +31 -31
- package/modules/venn.js.map +1 -1
- package/modules/venn.src.js +17 -16
- package/modules/windbarb.js +15 -15
- package/modules/windbarb.js.map +1 -1
- package/modules/windbarb.src.js +41 -4
- package/modules/wordcloud.js +23 -23
- package/modules/wordcloud.js.map +1 -1
- package/modules/wordcloud.src.js +6 -15
- package/modules/xrange.js +1 -1
- package/modules/xrange.src.js +1 -1
- package/package.json +1 -1
- package/themes/avocado.js +2 -3
- package/themes/avocado.js.map +1 -1
- package/themes/avocado.src.js +2 -2
- package/themes/brand-dark.d.ts +22 -0
- package/themes/brand-dark.js +3 -3
- package/themes/brand-dark.js.map +1 -1
- package/themes/brand-dark.src.d.ts +22 -0
- package/themes/brand-dark.src.js +2 -2
- package/themes/brand-light.d.ts +22 -0
- package/themes/brand-light.js +2 -2
- package/themes/brand-light.js.map +1 -1
- package/themes/brand-light.src.d.ts +22 -0
- package/themes/brand-light.src.js +2 -2
- package/themes/dark-blue.js +2 -2
- package/themes/dark-blue.js.map +1 -1
- package/themes/dark-blue.src.js +2 -2
- package/themes/dark-green.js +2 -2
- package/themes/dark-green.js.map +1 -1
- package/themes/dark-green.src.js +2 -2
- package/themes/dark-unica.js +2 -2
- package/themes/dark-unica.js.map +1 -1
- package/themes/dark-unica.src.js +2 -2
- package/themes/gray.js +2 -2
- package/themes/gray.js.map +1 -1
- package/themes/gray.src.js +2 -2
- package/themes/grid-light.js +2 -2
- package/themes/grid-light.js.map +1 -1
- package/themes/grid-light.src.js +2 -2
- package/themes/grid.js +2 -2
- package/themes/grid.js.map +1 -1
- package/themes/grid.src.js +2 -2
- package/themes/high-contrast-dark.d.ts +22 -0
- package/themes/high-contrast-dark.js +2 -2
- package/themes/high-contrast-dark.js.map +1 -1
- package/themes/high-contrast-dark.src.d.ts +22 -0
- package/themes/high-contrast-dark.src.js +2 -2
- package/themes/high-contrast-light.d.ts +22 -0
- package/themes/high-contrast-light.js +2 -2
- package/themes/high-contrast-light.js.map +1 -1
- package/themes/high-contrast-light.src.d.ts +22 -0
- package/themes/high-contrast-light.src.js +2 -2
- package/themes/sand-signika.js +2 -2
- package/themes/sand-signika.js.map +1 -1
- package/themes/sand-signika.src.js +2 -2
- package/themes/skies.js +2 -2
- package/themes/skies.js.map +1 -1
- package/themes/skies.src.js +2 -2
- package/themes/sunset.js +2 -2
- package/themes/sunset.js.map +1 -1
- package/themes/sunset.src.js +2 -2
- package/es-modules/Core/Axis/Axis3D.js +0 -612
- package/es-modules/Core/Axis/NavigatorAxis.js +0 -159
- package/es-modules/Core/Axis/Tick3D.js +0 -68
- package/es-modules/Extensions/DataGrouping.js +0 -1177
- package/es-modules/Stock/Indicators/SMA/SMAComposition.js +0 -12
|
@@ -8,545 +8,50 @@
|
|
|
8
8
|
*
|
|
9
9
|
* */
|
|
10
10
|
'use strict';
|
|
11
|
-
import Axis from '
|
|
12
|
-
import
|
|
13
|
-
import H from '../Core/Globals.js';
|
|
14
|
-
import D from '../Core/DefaultOptions.js';
|
|
11
|
+
import Axis from '../../Core/Axis/Axis.js';
|
|
12
|
+
import D from '../../Core/Defaults.js';
|
|
15
13
|
var defaultOptions = D.defaultOptions;
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
* @typedef {"all"|"day"|"hour"|"millisecond"|"minute"|"month"|"second"|"week"|"year"|"ytd"} Highcharts.RangeSelectorButtonTypeValue
|
|
23
|
-
*/
|
|
24
|
-
/**
|
|
25
|
-
* Callback function to react on button clicks.
|
|
26
|
-
*
|
|
27
|
-
* @callback Highcharts.RangeSelectorClickCallbackFunction
|
|
14
|
+
import H from '../../Core/Globals.js';
|
|
15
|
+
import RangeSelectorComposition from './RangeSelectorComposition.js';
|
|
16
|
+
import SVGElement from '../../Core/Renderer/SVG/SVGElement.js';
|
|
17
|
+
import U from '../../Core/Utilities.js';
|
|
18
|
+
var addEvent = U.addEvent, createElement = U.createElement, css = U.css, defined = U.defined, destroyObjectProperties = U.destroyObjectProperties, discardElement = U.discardElement, extend = U.extend, fireEvent = U.fireEvent, isNumber = U.isNumber, merge = U.merge, objectEach = U.objectEach, pad = U.pad, pick = U.pick, pInt = U.pInt, splat = U.splat;
|
|
19
|
+
/* *
|
|
28
20
|
*
|
|
29
|
-
*
|
|
30
|
-
* Event arguments.
|
|
21
|
+
* Functions
|
|
31
22
|
*
|
|
32
|
-
*
|
|
33
|
-
* Return false to cancel the default button event.
|
|
34
|
-
*/
|
|
23
|
+
* */
|
|
35
24
|
/**
|
|
36
|
-
*
|
|
37
|
-
* valid JavaScript time as milliseconds since 1970.
|
|
38
|
-
*
|
|
39
|
-
* @callback Highcharts.RangeSelectorParseCallbackFunction
|
|
40
|
-
*
|
|
41
|
-
* @param {string} value
|
|
42
|
-
* Input value to parse.
|
|
25
|
+
* Get the preferred input type based on a date format string.
|
|
43
26
|
*
|
|
44
|
-
* @
|
|
45
|
-
*
|
|
27
|
+
* @private
|
|
28
|
+
* @function preferredInputType
|
|
46
29
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* The range selector is a tool for selecting ranges to display within
|
|
53
|
-
* the chart. It provides buttons to select preconfigured ranges in
|
|
54
|
-
* the chart, like 1 day, 1 week, 1 month etc. It also provides input
|
|
55
|
-
* boxes where min and max dates can be manually input.
|
|
56
|
-
*
|
|
57
|
-
* @product highstock gantt
|
|
58
|
-
* @optionparent rangeSelector
|
|
59
|
-
*/
|
|
60
|
-
rangeSelector: {
|
|
61
|
-
/**
|
|
62
|
-
* Whether to enable all buttons from the start. By default buttons are
|
|
63
|
-
* only enabled if the corresponding time range exists on the X axis,
|
|
64
|
-
* but enabling all buttons allows for dynamically loading different
|
|
65
|
-
* time ranges.
|
|
66
|
-
*
|
|
67
|
-
* @sample {highstock} stock/rangeselector/allbuttonsenabled-true/
|
|
68
|
-
* All buttons enabled
|
|
69
|
-
*
|
|
70
|
-
* @since 2.0.3
|
|
71
|
-
*/
|
|
72
|
-
allButtonsEnabled: false,
|
|
73
|
-
/**
|
|
74
|
-
* An array of configuration objects for the buttons.
|
|
75
|
-
*
|
|
76
|
-
* Defaults to:
|
|
77
|
-
* ```js
|
|
78
|
-
* buttons: [{
|
|
79
|
-
* type: 'month',
|
|
80
|
-
* count: 1,
|
|
81
|
-
* text: '1m',
|
|
82
|
-
* title: 'View 1 month'
|
|
83
|
-
* }, {
|
|
84
|
-
* type: 'month',
|
|
85
|
-
* count: 3,
|
|
86
|
-
* text: '3m',
|
|
87
|
-
* title: 'View 3 months'
|
|
88
|
-
* }, {
|
|
89
|
-
* type: 'month',
|
|
90
|
-
* count: 6,
|
|
91
|
-
* text: '6m',
|
|
92
|
-
* title: 'View 6 months'
|
|
93
|
-
* }, {
|
|
94
|
-
* type: 'ytd',
|
|
95
|
-
* text: 'YTD',
|
|
96
|
-
* title: 'View year to date'
|
|
97
|
-
* }, {
|
|
98
|
-
* type: 'year',
|
|
99
|
-
* count: 1,
|
|
100
|
-
* text: '1y',
|
|
101
|
-
* title: 'View 1 year'
|
|
102
|
-
* }, {
|
|
103
|
-
* type: 'all',
|
|
104
|
-
* text: 'All',
|
|
105
|
-
* title: 'View all'
|
|
106
|
-
* }]
|
|
107
|
-
* ```
|
|
108
|
-
*
|
|
109
|
-
* @sample {highstock} stock/rangeselector/datagrouping/
|
|
110
|
-
* Data grouping by buttons
|
|
111
|
-
*
|
|
112
|
-
* @type {Array<*>}
|
|
113
|
-
*/
|
|
114
|
-
buttons: void 0,
|
|
115
|
-
/**
|
|
116
|
-
* How many units of the defined type the button should span. If `type`
|
|
117
|
-
* is "month" and `count` is 3, the button spans three months.
|
|
118
|
-
*
|
|
119
|
-
* @type {number}
|
|
120
|
-
* @default 1
|
|
121
|
-
* @apioption rangeSelector.buttons.count
|
|
122
|
-
*/
|
|
123
|
-
/**
|
|
124
|
-
* Fires when clicking on the rangeSelector button. One parameter,
|
|
125
|
-
* event, is passed to the function, containing common event
|
|
126
|
-
* information.
|
|
127
|
-
*
|
|
128
|
-
* ```js
|
|
129
|
-
* click: function(e) {
|
|
130
|
-
* console.log(this);
|
|
131
|
-
* }
|
|
132
|
-
* ```
|
|
133
|
-
*
|
|
134
|
-
* Return false to stop default button's click action.
|
|
135
|
-
*
|
|
136
|
-
* @sample {highstock} stock/rangeselector/button-click/
|
|
137
|
-
* Click event on the button
|
|
138
|
-
*
|
|
139
|
-
* @type {Highcharts.RangeSelectorClickCallbackFunction}
|
|
140
|
-
* @apioption rangeSelector.buttons.events.click
|
|
141
|
-
*/
|
|
142
|
-
/**
|
|
143
|
-
* Additional range (in milliseconds) added to the end of the calculated
|
|
144
|
-
* time span.
|
|
145
|
-
*
|
|
146
|
-
* @sample {highstock} stock/rangeselector/min-max-offsets/
|
|
147
|
-
* Button offsets
|
|
148
|
-
*
|
|
149
|
-
* @type {number}
|
|
150
|
-
* @default 0
|
|
151
|
-
* @since 6.0.0
|
|
152
|
-
* @apioption rangeSelector.buttons.offsetMax
|
|
153
|
-
*/
|
|
154
|
-
/**
|
|
155
|
-
* Additional range (in milliseconds) added to the start of the
|
|
156
|
-
* calculated time span.
|
|
157
|
-
*
|
|
158
|
-
* @sample {highstock} stock/rangeselector/min-max-offsets/
|
|
159
|
-
* Button offsets
|
|
160
|
-
*
|
|
161
|
-
* @type {number}
|
|
162
|
-
* @default 0
|
|
163
|
-
* @since 6.0.0
|
|
164
|
-
* @apioption rangeSelector.buttons.offsetMin
|
|
165
|
-
*/
|
|
166
|
-
/**
|
|
167
|
-
* When buttons apply dataGrouping on a series, by default zooming
|
|
168
|
-
* in/out will deselect buttons and unset dataGrouping. Enable this
|
|
169
|
-
* option to keep buttons selected when extremes change.
|
|
170
|
-
*
|
|
171
|
-
* @sample {highstock} stock/rangeselector/preserve-datagrouping/
|
|
172
|
-
* Different preserveDataGrouping settings
|
|
173
|
-
*
|
|
174
|
-
* @type {boolean}
|
|
175
|
-
* @default false
|
|
176
|
-
* @since 6.1.2
|
|
177
|
-
* @apioption rangeSelector.buttons.preserveDataGrouping
|
|
178
|
-
*/
|
|
179
|
-
/**
|
|
180
|
-
* A custom data grouping object for each button.
|
|
181
|
-
*
|
|
182
|
-
* @see [series.dataGrouping](#plotOptions.series.dataGrouping)
|
|
183
|
-
*
|
|
184
|
-
* @sample {highstock} stock/rangeselector/datagrouping/
|
|
185
|
-
* Data grouping by range selector buttons
|
|
186
|
-
*
|
|
187
|
-
* @type {*}
|
|
188
|
-
* @extends plotOptions.series.dataGrouping
|
|
189
|
-
* @apioption rangeSelector.buttons.dataGrouping
|
|
190
|
-
*/
|
|
191
|
-
/**
|
|
192
|
-
* The text for the button itself.
|
|
193
|
-
*
|
|
194
|
-
* @type {string}
|
|
195
|
-
* @apioption rangeSelector.buttons.text
|
|
196
|
-
*/
|
|
197
|
-
/**
|
|
198
|
-
* Explanation for the button, shown as a tooltip on hover, and used by
|
|
199
|
-
* assistive technology.
|
|
200
|
-
*
|
|
201
|
-
* @type {string}
|
|
202
|
-
* @apioption rangeSelector.buttons.title
|
|
203
|
-
*/
|
|
204
|
-
/**
|
|
205
|
-
* Defined the time span for the button. Can be one of `millisecond`,
|
|
206
|
-
* `second`, `minute`, `hour`, `day`, `week`, `month`, `year`, `ytd`,
|
|
207
|
-
* and `all`.
|
|
208
|
-
*
|
|
209
|
-
* @type {Highcharts.RangeSelectorButtonTypeValue}
|
|
210
|
-
* @apioption rangeSelector.buttons.type
|
|
211
|
-
*/
|
|
212
|
-
/**
|
|
213
|
-
* The space in pixels between the buttons in the range selector.
|
|
214
|
-
*/
|
|
215
|
-
buttonSpacing: 5,
|
|
216
|
-
/**
|
|
217
|
-
* Whether to collapse the range selector buttons into a dropdown when
|
|
218
|
-
* there is not enough room to show everything in a single row, instead
|
|
219
|
-
* of dividing the range selector into multiple rows.
|
|
220
|
-
* Can be one of the following:
|
|
221
|
-
* - `always`: Always collapse
|
|
222
|
-
* - `responsive`: Only collapse when there is not enough room
|
|
223
|
-
* - `never`: Never collapse
|
|
224
|
-
*
|
|
225
|
-
* @sample {highstock} stock/rangeselector/dropdown/
|
|
226
|
-
* Dropdown option
|
|
227
|
-
*
|
|
228
|
-
* @validvalue ["always", "responsive", "never"]
|
|
229
|
-
* @since 9.0.0
|
|
230
|
-
*/
|
|
231
|
-
dropdown: 'responsive',
|
|
232
|
-
/**
|
|
233
|
-
* Enable or disable the range selector. Default to `true` for stock
|
|
234
|
-
* charts, using the `stockChart` factory.
|
|
235
|
-
*
|
|
236
|
-
* @sample {highstock} stock/rangeselector/enabled/
|
|
237
|
-
* Disable the range selector
|
|
238
|
-
*
|
|
239
|
-
* @type {boolean|undefined}
|
|
240
|
-
* @default {highstock} true
|
|
241
|
-
*/
|
|
242
|
-
enabled: void 0,
|
|
243
|
-
/**
|
|
244
|
-
* The vertical alignment of the rangeselector box. Allowed properties
|
|
245
|
-
* are `top`, `middle`, `bottom`.
|
|
246
|
-
*
|
|
247
|
-
* @sample {highstock} stock/rangeselector/vertical-align-middle/
|
|
248
|
-
* Middle
|
|
249
|
-
* @sample {highstock} stock/rangeselector/vertical-align-bottom/
|
|
250
|
-
* Bottom
|
|
251
|
-
*
|
|
252
|
-
* @type {Highcharts.VerticalAlignValue}
|
|
253
|
-
* @since 6.0.0
|
|
254
|
-
*/
|
|
255
|
-
verticalAlign: 'top',
|
|
256
|
-
/**
|
|
257
|
-
* A collection of attributes for the buttons. The object takes SVG
|
|
258
|
-
* attributes like `fill`, `stroke`, `stroke-width`, as well as `style`,
|
|
259
|
-
* a collection of CSS properties for the text.
|
|
260
|
-
*
|
|
261
|
-
* The object can also be extended with states, so you can set
|
|
262
|
-
* presentational options for `hover`, `select` or `disabled` button
|
|
263
|
-
* states.
|
|
264
|
-
*
|
|
265
|
-
* CSS styles for the text label.
|
|
266
|
-
*
|
|
267
|
-
* In styled mode, the buttons are styled by the
|
|
268
|
-
* `.highcharts-range-selector-buttons .highcharts-button` rule with its
|
|
269
|
-
* different states.
|
|
270
|
-
*
|
|
271
|
-
* @sample {highstock} stock/rangeselector/styling/
|
|
272
|
-
* Styling the buttons and inputs
|
|
273
|
-
*
|
|
274
|
-
* @type {Highcharts.SVGAttributes}
|
|
275
|
-
*/
|
|
276
|
-
buttonTheme: {
|
|
277
|
-
/** @ignore */
|
|
278
|
-
width: 28,
|
|
279
|
-
/** @ignore */
|
|
280
|
-
height: 18,
|
|
281
|
-
/** @ignore */
|
|
282
|
-
padding: 2,
|
|
283
|
-
/** @ignore */
|
|
284
|
-
zIndex: 7 // #484, #852
|
|
285
|
-
},
|
|
286
|
-
/**
|
|
287
|
-
* When the rangeselector is floating, the plot area does not reserve
|
|
288
|
-
* space for it. This opens for positioning anywhere on the chart.
|
|
289
|
-
*
|
|
290
|
-
* @sample {highstock} stock/rangeselector/floating/
|
|
291
|
-
* Placing the range selector between the plot area and the
|
|
292
|
-
* navigator
|
|
293
|
-
*
|
|
294
|
-
* @since 6.0.0
|
|
295
|
-
*/
|
|
296
|
-
floating: false,
|
|
297
|
-
/**
|
|
298
|
-
* The x offset of the range selector relative to its horizontal
|
|
299
|
-
* alignment within `chart.spacingLeft` and `chart.spacingRight`.
|
|
300
|
-
*
|
|
301
|
-
* @since 6.0.0
|
|
302
|
-
*/
|
|
303
|
-
x: 0,
|
|
304
|
-
/**
|
|
305
|
-
* The y offset of the range selector relative to its horizontal
|
|
306
|
-
* alignment within `chart.spacingLeft` and `chart.spacingRight`.
|
|
307
|
-
*
|
|
308
|
-
* @since 6.0.0
|
|
309
|
-
*/
|
|
310
|
-
y: 0,
|
|
311
|
-
/**
|
|
312
|
-
* Deprecated. The height of the range selector. Currently it is
|
|
313
|
-
* calculated dynamically.
|
|
314
|
-
*
|
|
315
|
-
* @deprecated
|
|
316
|
-
* @type {number|undefined}
|
|
317
|
-
* @since 2.1.9
|
|
318
|
-
*/
|
|
319
|
-
height: void 0,
|
|
320
|
-
/**
|
|
321
|
-
* The border color of the date input boxes.
|
|
322
|
-
*
|
|
323
|
-
* @sample {highstock} stock/rangeselector/styling/
|
|
324
|
-
* Styling the buttons and inputs
|
|
325
|
-
*
|
|
326
|
-
* @type {Highcharts.ColorString}
|
|
327
|
-
* @since 1.3.7
|
|
328
|
-
*/
|
|
329
|
-
inputBoxBorderColor: 'none',
|
|
330
|
-
/**
|
|
331
|
-
* The pixel height of the date input boxes.
|
|
332
|
-
*
|
|
333
|
-
* @sample {highstock} stock/rangeselector/styling/
|
|
334
|
-
* Styling the buttons and inputs
|
|
335
|
-
*
|
|
336
|
-
* @since 1.3.7
|
|
337
|
-
*/
|
|
338
|
-
inputBoxHeight: 17,
|
|
339
|
-
/**
|
|
340
|
-
* The pixel width of the date input boxes. When `undefined`, the width
|
|
341
|
-
* is fitted to the rendered content.
|
|
342
|
-
*
|
|
343
|
-
* @sample {highstock} stock/rangeselector/styling/
|
|
344
|
-
* Styling the buttons and inputs
|
|
345
|
-
*
|
|
346
|
-
* @type {number|undefined}
|
|
347
|
-
* @since 1.3.7
|
|
348
|
-
*/
|
|
349
|
-
inputBoxWidth: void 0,
|
|
350
|
-
/**
|
|
351
|
-
* The date format in the input boxes when not selected for editing.
|
|
352
|
-
* Defaults to `%b %e, %Y`.
|
|
353
|
-
*
|
|
354
|
-
* This is used to determine which type of input to show,
|
|
355
|
-
* `datetime-local`, `date` or `time` and falling back to `text` when
|
|
356
|
-
* the browser does not support the input type or the format contains
|
|
357
|
-
* milliseconds.
|
|
358
|
-
*
|
|
359
|
-
* @sample {highstock} stock/rangeselector/input-type/
|
|
360
|
-
* Input types
|
|
361
|
-
* @sample {highstock} stock/rangeselector/input-format/
|
|
362
|
-
* Milliseconds in the range selector
|
|
363
|
-
*
|
|
364
|
-
*/
|
|
365
|
-
inputDateFormat: '%b %e, %Y',
|
|
366
|
-
/**
|
|
367
|
-
* A custom callback function to parse values entered in the input boxes
|
|
368
|
-
* and return a valid JavaScript time as milliseconds since 1970.
|
|
369
|
-
* The first argument passed is a value to parse,
|
|
370
|
-
* second is a boolean indicating use of the UTC time.
|
|
371
|
-
*
|
|
372
|
-
* This will only get called for inputs of type `text`. Since v8.2.3,
|
|
373
|
-
* the input type is dynamically determined based on the granularity
|
|
374
|
-
* of the `inputDateFormat` and the browser support.
|
|
375
|
-
*
|
|
376
|
-
* @sample {highstock} stock/rangeselector/input-format/
|
|
377
|
-
* Milliseconds in the range selector
|
|
378
|
-
*
|
|
379
|
-
* @type {Highcharts.RangeSelectorParseCallbackFunction}
|
|
380
|
-
* @since 1.3.3
|
|
381
|
-
*/
|
|
382
|
-
inputDateParser: void 0,
|
|
383
|
-
/**
|
|
384
|
-
* The date format in the input boxes when they are selected for
|
|
385
|
-
* editing. This must be a format that is recognized by JavaScript
|
|
386
|
-
* Date.parse.
|
|
387
|
-
*
|
|
388
|
-
* This will only be used for inputs of type `text`. Since v8.2.3,
|
|
389
|
-
* the input type is dynamically determined based on the granularity
|
|
390
|
-
* of the `inputDateFormat` and the browser support.
|
|
391
|
-
*
|
|
392
|
-
* @sample {highstock} stock/rangeselector/input-format/
|
|
393
|
-
* Milliseconds in the range selector
|
|
394
|
-
*
|
|
395
|
-
*/
|
|
396
|
-
inputEditDateFormat: '%Y-%m-%d',
|
|
397
|
-
/**
|
|
398
|
-
* Enable or disable the date input boxes.
|
|
399
|
-
*/
|
|
400
|
-
inputEnabled: true,
|
|
401
|
-
/**
|
|
402
|
-
* Positioning for the input boxes. Allowed properties are `align`,
|
|
403
|
-
* `x` and `y`.
|
|
404
|
-
*
|
|
405
|
-
* @since 1.2.4
|
|
406
|
-
*/
|
|
407
|
-
inputPosition: {
|
|
408
|
-
/**
|
|
409
|
-
* The alignment of the input box. Allowed properties are `left`,
|
|
410
|
-
* `center`, `right`.
|
|
411
|
-
*
|
|
412
|
-
* @sample {highstock} stock/rangeselector/input-button-position/
|
|
413
|
-
* Alignment
|
|
414
|
-
*
|
|
415
|
-
* @type {Highcharts.AlignValue}
|
|
416
|
-
* @since 6.0.0
|
|
417
|
-
*/
|
|
418
|
-
align: 'right',
|
|
419
|
-
/**
|
|
420
|
-
* X offset of the input row.
|
|
421
|
-
*/
|
|
422
|
-
x: 0,
|
|
423
|
-
/**
|
|
424
|
-
* Y offset of the input row.
|
|
425
|
-
*/
|
|
426
|
-
y: 0
|
|
427
|
-
},
|
|
428
|
-
/**
|
|
429
|
-
* The space in pixels between the labels and the date input boxes in
|
|
430
|
-
* the range selector.
|
|
431
|
-
*
|
|
432
|
-
* @since 9.0.0
|
|
433
|
-
*/
|
|
434
|
-
inputSpacing: 5,
|
|
435
|
-
/**
|
|
436
|
-
* The index of the button to appear pre-selected.
|
|
437
|
-
*
|
|
438
|
-
* @type {number}
|
|
439
|
-
*/
|
|
440
|
-
selected: void 0,
|
|
441
|
-
/**
|
|
442
|
-
* Positioning for the button row.
|
|
443
|
-
*
|
|
444
|
-
* @since 1.2.4
|
|
445
|
-
*/
|
|
446
|
-
buttonPosition: {
|
|
447
|
-
/**
|
|
448
|
-
* The alignment of the input box. Allowed properties are `left`,
|
|
449
|
-
* `center`, `right`.
|
|
450
|
-
*
|
|
451
|
-
* @sample {highstock} stock/rangeselector/input-button-position/
|
|
452
|
-
* Alignment
|
|
453
|
-
*
|
|
454
|
-
* @type {Highcharts.AlignValue}
|
|
455
|
-
* @since 6.0.0
|
|
456
|
-
*/
|
|
457
|
-
align: 'left',
|
|
458
|
-
/**
|
|
459
|
-
* X offset of the button row.
|
|
460
|
-
*/
|
|
461
|
-
x: 0,
|
|
462
|
-
/**
|
|
463
|
-
* Y offset of the button row.
|
|
464
|
-
*/
|
|
465
|
-
y: 0
|
|
466
|
-
},
|
|
467
|
-
/**
|
|
468
|
-
* CSS for the HTML inputs in the range selector.
|
|
469
|
-
*
|
|
470
|
-
* In styled mode, the inputs are styled by the
|
|
471
|
-
* `.highcharts-range-input text` rule in SVG mode, and
|
|
472
|
-
* `input.highcharts-range-selector` when active.
|
|
473
|
-
*
|
|
474
|
-
* @sample {highstock} stock/rangeselector/styling/
|
|
475
|
-
* Styling the buttons and inputs
|
|
476
|
-
*
|
|
477
|
-
* @type {Highcharts.CSSObject}
|
|
478
|
-
* @apioption rangeSelector.inputStyle
|
|
479
|
-
*/
|
|
480
|
-
inputStyle: {
|
|
481
|
-
/** @ignore */
|
|
482
|
-
color: "#335cad" /* Palette.highlightColor80 */,
|
|
483
|
-
/** @ignore */
|
|
484
|
-
cursor: 'pointer'
|
|
485
|
-
},
|
|
486
|
-
/**
|
|
487
|
-
* CSS styles for the labels - the Zoom, From and To texts.
|
|
488
|
-
*
|
|
489
|
-
* In styled mode, the labels are styled by the
|
|
490
|
-
* `.highcharts-range-label` class.
|
|
491
|
-
*
|
|
492
|
-
* @sample {highstock} stock/rangeselector/styling/
|
|
493
|
-
* Styling the buttons and inputs
|
|
494
|
-
*
|
|
495
|
-
* @type {Highcharts.CSSObject}
|
|
496
|
-
*/
|
|
497
|
-
labelStyle: {
|
|
498
|
-
/** @ignore */
|
|
499
|
-
color: "#666666" /* Palette.neutralColor60 */
|
|
500
|
-
}
|
|
30
|
+
function preferredInputType(format) {
|
|
31
|
+
var ms = format.indexOf('%L') !== -1;
|
|
32
|
+
if (ms) {
|
|
33
|
+
return 'text';
|
|
501
34
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
35
|
+
var date = ['a', 'A', 'd', 'e', 'w', 'b', 'B', 'm', 'o', 'y', 'Y']
|
|
36
|
+
.some(function (char) { return format.indexOf('%' + char) !== -1; });
|
|
37
|
+
var time = ['H', 'k', 'I', 'l', 'M', 'S']
|
|
38
|
+
.some(function (char) { return format.indexOf('%' + char) !== -1; });
|
|
39
|
+
if (date && time) {
|
|
40
|
+
return 'datetime-local';
|
|
41
|
+
}
|
|
42
|
+
if (date) {
|
|
43
|
+
return 'date';
|
|
44
|
+
}
|
|
45
|
+
if (time) {
|
|
46
|
+
return 'time';
|
|
47
|
+
}
|
|
48
|
+
return 'text';
|
|
49
|
+
}
|
|
50
|
+
/* *
|
|
508
51
|
*
|
|
509
|
-
*
|
|
510
|
-
* Highcharts.setOptions({
|
|
511
|
-
* lang: {
|
|
512
|
-
* months: [
|
|
513
|
-
* 'Janvier', 'Février', 'Mars', 'Avril',
|
|
514
|
-
* 'Mai', 'Juin', 'Juillet', 'Août',
|
|
515
|
-
* 'Septembre', 'Octobre', 'Novembre', 'Décembre'
|
|
516
|
-
* ],
|
|
517
|
-
* weekdays: [
|
|
518
|
-
* 'Dimanche', 'Lundi', 'Mardi', 'Mercredi',
|
|
519
|
-
* 'Jeudi', 'Vendredi', 'Samedi'
|
|
520
|
-
* ]
|
|
521
|
-
* }
|
|
522
|
-
* });
|
|
523
|
-
* ```
|
|
52
|
+
* Class
|
|
524
53
|
*
|
|
525
|
-
*
|
|
526
|
-
*/
|
|
527
|
-
{
|
|
528
|
-
/**
|
|
529
|
-
* The text for the label for the range selector buttons.
|
|
530
|
-
*
|
|
531
|
-
* @product highstock gantt
|
|
532
|
-
*/
|
|
533
|
-
rangeSelectorZoom: 'Zoom',
|
|
534
|
-
/**
|
|
535
|
-
* The text for the label for the "from" input box in the range
|
|
536
|
-
* selector. Since v9.0, this string is empty as the label is not
|
|
537
|
-
* rendered by default.
|
|
538
|
-
*
|
|
539
|
-
* @product highstock gantt
|
|
540
|
-
*/
|
|
541
|
-
rangeSelectorFrom: '',
|
|
542
|
-
/**
|
|
543
|
-
* The text for the label for the "to" input box in the range selector.
|
|
544
|
-
*
|
|
545
|
-
* @product highstock gantt
|
|
546
|
-
*/
|
|
547
|
-
rangeSelectorTo: '→'
|
|
548
|
-
});
|
|
549
|
-
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
54
|
+
* */
|
|
550
55
|
/**
|
|
551
56
|
* The range selector.
|
|
552
57
|
*
|
|
@@ -556,10 +61,15 @@ extend(defaultOptions.lang,
|
|
|
556
61
|
* @param {Highcharts.Chart} chart
|
|
557
62
|
*/
|
|
558
63
|
var RangeSelector = /** @class */ (function () {
|
|
64
|
+
/* *
|
|
65
|
+
*
|
|
66
|
+
* Constructor
|
|
67
|
+
*
|
|
68
|
+
* */
|
|
559
69
|
function RangeSelector(chart) {
|
|
560
70
|
/* *
|
|
561
71
|
*
|
|
562
|
-
*
|
|
72
|
+
* Properties
|
|
563
73
|
*
|
|
564
74
|
* */
|
|
565
75
|
this.buttons = void 0;
|
|
@@ -567,9 +77,24 @@ var RangeSelector = /** @class */ (function () {
|
|
|
567
77
|
this.initialButtonGroupWidth = 0;
|
|
568
78
|
this.options = void 0;
|
|
569
79
|
this.chart = chart;
|
|
570
|
-
// Run RangeSelector
|
|
571
80
|
this.init(chart);
|
|
572
81
|
}
|
|
82
|
+
/* *
|
|
83
|
+
*
|
|
84
|
+
* Static Functions
|
|
85
|
+
*
|
|
86
|
+
* */
|
|
87
|
+
/**
|
|
88
|
+
* @private
|
|
89
|
+
*/
|
|
90
|
+
RangeSelector.compose = function (AxisClass, ChartClass) {
|
|
91
|
+
RangeSelectorComposition.compose(AxisClass, ChartClass, RangeSelector);
|
|
92
|
+
};
|
|
93
|
+
/* *
|
|
94
|
+
*
|
|
95
|
+
* Functions
|
|
96
|
+
*
|
|
97
|
+
* */
|
|
573
98
|
/**
|
|
574
99
|
* The method to run when one of the buttons in the range selectors is
|
|
575
100
|
* clicked
|
|
@@ -581,8 +106,9 @@ var RangeSelector = /** @class */ (function () {
|
|
|
581
106
|
* @param {boolean} [redraw]
|
|
582
107
|
*/
|
|
583
108
|
RangeSelector.prototype.clickButton = function (i, redraw) {
|
|
584
|
-
var rangeSelector = this, chart = rangeSelector.chart, rangeOptions = rangeSelector.buttonOptions[i], baseAxis = chart.xAxis[0], unionExtremes = (chart.scroller && chart.scroller.getUnionExtremes()) || baseAxis || {},
|
|
585
|
-
|
|
109
|
+
var rangeSelector = this, chart = rangeSelector.chart, rangeOptions = rangeSelector.buttonOptions[i], baseAxis = chart.xAxis[0], unionExtremes = (chart.scroller && chart.scroller.getUnionExtremes()) || baseAxis || {}, type = rangeOptions.type, dataGrouping = rangeOptions.dataGrouping;
|
|
110
|
+
var dataMin = unionExtremes.dataMin, dataMax = unionExtremes.dataMax, newMin, newMax = baseAxis && Math.round(Math.min(baseAxis.max, pick(dataMax, baseAxis.max))), // #1568
|
|
111
|
+
baseXAxisOptions, range = rangeOptions._range, rangeMin, minSetting, rangeSetting, ctx, ytdExtremes, addOffsetMin = true;
|
|
586
112
|
// chart has no data, base series is removed
|
|
587
113
|
if (dataMin === null || dataMax === null) {
|
|
588
114
|
return;
|
|
@@ -773,9 +299,10 @@ var RangeSelector = /** @class */ (function () {
|
|
|
773
299
|
RangeSelector.prototype.updateButtonStates = function () {
|
|
774
300
|
var rangeSelector = this, chart = this.chart, dropdown = this.dropdown, baseAxis = chart.xAxis[0], actualRange = Math.round(baseAxis.max - baseAxis.min), hasNoData = !baseAxis.hasVisibleSeries, day = 24 * 36e5, // A single day in milliseconds
|
|
775
301
|
unionExtremes = (chart.scroller &&
|
|
776
|
-
chart.scroller.getUnionExtremes()) || baseAxis, dataMin = unionExtremes.dataMin, dataMax = unionExtremes.dataMax, ytdExtremes = rangeSelector.getYTDExtremes(dataMax, dataMin, chart.time.useUTC), ytdMin = ytdExtremes.min, ytdMax = ytdExtremes.max, selected = rangeSelector.selected,
|
|
302
|
+
chart.scroller.getUnionExtremes()) || baseAxis, dataMin = unionExtremes.dataMin, dataMax = unionExtremes.dataMax, ytdExtremes = rangeSelector.getYTDExtremes(dataMax, dataMin, chart.time.useUTC), ytdMin = ytdExtremes.min, ytdMax = ytdExtremes.max, selected = rangeSelector.selected, allButtonsEnabled = rangeSelector.options.allButtonsEnabled, buttons = rangeSelector.buttons;
|
|
303
|
+
var selectedExists = isNumber(selected);
|
|
777
304
|
rangeSelector.buttonOptions.forEach(function (rangeOptions, i) {
|
|
778
|
-
var range = rangeOptions._range, type = rangeOptions.type, count = rangeOptions.count || 1, button = buttons[i],
|
|
305
|
+
var range = rangeOptions._range, type = rangeOptions.type, count = rangeOptions.count || 1, button = buttons[i], offsetRange = rangeOptions._offsetMax -
|
|
779
306
|
rangeOptions._offsetMin, isSelected = i === selected,
|
|
780
307
|
// Disable buttons where the range exceeds what is allowed in
|
|
781
308
|
// the current view
|
|
@@ -783,7 +310,8 @@ var RangeSelector = /** @class */ (function () {
|
|
|
783
310
|
dataMax - dataMin,
|
|
784
311
|
// Disable buttons where the range is smaller than the minimum
|
|
785
312
|
// range
|
|
786
|
-
isTooSmallRange = range < baseAxis.minRange
|
|
313
|
+
isTooSmallRange = range < baseAxis.minRange;
|
|
314
|
+
var state = 0,
|
|
787
315
|
// Do not select the YTD button if not explicitly told so
|
|
788
316
|
isYTDButNotSelected = false,
|
|
789
317
|
// Disable the All button if we're already showing all
|
|
@@ -811,12 +339,12 @@ var RangeSelector = /** @class */ (function () {
|
|
|
811
339
|
// it selected. This happens when scrolling across an ordinal gap.
|
|
812
340
|
// It can be seen in the intraday demos when selecting 1h and scroll
|
|
813
341
|
// across the night gap.
|
|
814
|
-
disable = (!allButtonsEnabled &&
|
|
342
|
+
var disable = (!allButtonsEnabled &&
|
|
815
343
|
(isTooGreatRange ||
|
|
816
344
|
isTooSmallRange ||
|
|
817
345
|
isAllButAlreadyShowingAll ||
|
|
818
346
|
hasNoData));
|
|
819
|
-
select = ((isSelected && isSameRange) ||
|
|
347
|
+
var select = ((isSelected && isSameRange) ||
|
|
820
348
|
(isSameRange && !selectedExists && !isYTDButNotSelected) ||
|
|
821
349
|
(isSelected && rangeSelector.frozenStates));
|
|
822
350
|
if (disable) {
|
|
@@ -1044,10 +572,10 @@ var RangeSelector = /** @class */ (function () {
|
|
|
1044
572
|
* @private
|
|
1045
573
|
*/
|
|
1046
574
|
function updateExtremes() {
|
|
1047
|
-
var
|
|
575
|
+
var maxInput = rangeSelector.maxInput, minInput = rangeSelector.minInput, chartAxis = chart.xAxis[0], dataAxis = chart.scroller && chart.scroller.xAxis ?
|
|
1048
576
|
chart.scroller.xAxis :
|
|
1049
577
|
chartAxis, dataMin = dataAxis.dataMin, dataMax = dataAxis.dataMax;
|
|
1050
|
-
var
|
|
578
|
+
var value = rangeSelector.getInputValue(name);
|
|
1051
579
|
if (value !== Number(input.getAttribute('data-hc-time-previous')) &&
|
|
1052
580
|
isNumber(value)) {
|
|
1053
581
|
input.setAttribute('data-hc-time-previous', value);
|
|
@@ -1209,11 +737,9 @@ var RangeSelector = /** @class */ (function () {
|
|
|
1209
737
|
* Returns min and max for the YTD
|
|
1210
738
|
*/
|
|
1211
739
|
RangeSelector.prototype.getYTDExtremes = function (dataMax, dataMin, useUTC) {
|
|
1212
|
-
var time = this.chart.time,
|
|
740
|
+
var time = this.chart.time, now = new time.Date(dataMax), year = time.get('FullYear', now), startOfYear = useUTC ?
|
|
1213
741
|
time.Date.UTC(year, 0, 1) : // eslint-disable-line new-cap
|
|
1214
|
-
+new time.Date(year, 0, 1);
|
|
1215
|
-
min = Math.max(dataMin, startOfYear);
|
|
1216
|
-
var ts = now.getTime();
|
|
742
|
+
+new time.Date(year, 0, 1), min = Math.max(dataMin, startOfYear), ts = now.getTime();
|
|
1217
743
|
return {
|
|
1218
744
|
max: Math.min(dataMax || ts, ts),
|
|
1219
745
|
min: min
|
|
@@ -1378,8 +904,8 @@ var RangeSelector = /** @class */ (function () {
|
|
|
1378
904
|
buttons[i] = renderer
|
|
1379
905
|
.button(rangeOptions.text, 0, 0, function (e) {
|
|
1380
906
|
// extract events from button object and call
|
|
1381
|
-
var buttonEvents = (rangeOptions.events &&
|
|
1382
|
-
|
|
907
|
+
var buttonEvents = (rangeOptions.events && rangeOptions.events.click);
|
|
908
|
+
var callDefaultEvent;
|
|
1383
909
|
if (buttonEvents) {
|
|
1384
910
|
callDefaultEvent =
|
|
1385
911
|
buttonEvents.call(rangeOptions, e);
|
|
@@ -1586,7 +1112,7 @@ var RangeSelector = /** @class */ (function () {
|
|
|
1586
1112
|
buttonLeft += buttonPosition.x +
|
|
1587
1113
|
zoomText.getBBox().width + 5;
|
|
1588
1114
|
}
|
|
1589
|
-
this.buttonOptions.
|
|
1115
|
+
for (var i = 0, iEnd = this.buttonOptions.length; i < iEnd; ++i) {
|
|
1590
1116
|
if (buttons[i].visibility !== 'hidden') {
|
|
1591
1117
|
buttons[i][verb]({ x: buttonLeft });
|
|
1592
1118
|
// increase button position for the next button
|
|
@@ -1595,7 +1121,7 @@ var RangeSelector = /** @class */ (function () {
|
|
|
1595
1121
|
else {
|
|
1596
1122
|
buttons[i][verb]({ x: plotLeft });
|
|
1597
1123
|
}
|
|
1598
|
-
}
|
|
1124
|
+
}
|
|
1599
1125
|
};
|
|
1600
1126
|
/**
|
|
1601
1127
|
* Handle collision between the button group and the input group
|
|
@@ -1824,7 +1350,8 @@ var RangeSelector = /** @class */ (function () {
|
|
|
1824
1350
|
* Returns rangeSelector height
|
|
1825
1351
|
*/
|
|
1826
1352
|
RangeSelector.prototype.getHeight = function () {
|
|
1827
|
-
var rangeSelector = this, options = rangeSelector.options, rangeSelectorGroup = rangeSelector.group, inputPosition = options.inputPosition, buttonPosition = options.buttonPosition, yPosition = options.y, buttonPositionY = buttonPosition.y, inputPositionY = inputPosition.y
|
|
1353
|
+
var rangeSelector = this, options = rangeSelector.options, rangeSelectorGroup = rangeSelector.group, inputPosition = options.inputPosition, buttonPosition = options.buttonPosition, yPosition = options.y, buttonPositionY = buttonPosition.y, inputPositionY = inputPosition.y;
|
|
1354
|
+
var rangeSelectorHeight = 0;
|
|
1828
1355
|
if (options.height) {
|
|
1829
1356
|
return options.height;
|
|
1830
1357
|
}
|
|
@@ -1836,7 +1363,7 @@ var RangeSelector = /** @class */ (function () {
|
|
|
1836
1363
|
(rangeSelectorGroup.getBBox(true).height) + 13 +
|
|
1837
1364
|
yPosition :
|
|
1838
1365
|
0;
|
|
1839
|
-
minPosition = Math.min(inputPositionY, buttonPositionY);
|
|
1366
|
+
var minPosition = Math.min(inputPositionY, buttonPositionY);
|
|
1840
1367
|
if ((inputPositionY < 0 && buttonPositionY < 0) ||
|
|
1841
1368
|
(inputPositionY > 0 && buttonPositionY > 0)) {
|
|
1842
1369
|
rangeSelectorHeight += Math.abs(minPosition);
|
|
@@ -1909,278 +1436,87 @@ var RangeSelector = /** @class */ (function () {
|
|
|
1909
1436
|
};
|
|
1910
1437
|
return RangeSelector;
|
|
1911
1438
|
}());
|
|
1439
|
+
extend(RangeSelector.prototype, {
|
|
1440
|
+
/**
|
|
1441
|
+
* The default buttons for pre-selecting time frames.
|
|
1442
|
+
* @private
|
|
1443
|
+
*/
|
|
1444
|
+
defaultButtons: [{
|
|
1445
|
+
type: 'month',
|
|
1446
|
+
count: 1,
|
|
1447
|
+
text: '1m',
|
|
1448
|
+
title: 'View 1 month'
|
|
1449
|
+
}, {
|
|
1450
|
+
type: 'month',
|
|
1451
|
+
count: 3,
|
|
1452
|
+
text: '3m',
|
|
1453
|
+
title: 'View 3 months'
|
|
1454
|
+
}, {
|
|
1455
|
+
type: 'month',
|
|
1456
|
+
count: 6,
|
|
1457
|
+
text: '6m',
|
|
1458
|
+
title: 'View 6 months'
|
|
1459
|
+
}, {
|
|
1460
|
+
type: 'ytd',
|
|
1461
|
+
text: 'YTD',
|
|
1462
|
+
title: 'View year to date'
|
|
1463
|
+
}, {
|
|
1464
|
+
type: 'year',
|
|
1465
|
+
count: 1,
|
|
1466
|
+
text: '1y',
|
|
1467
|
+
title: 'View 1 year'
|
|
1468
|
+
}, {
|
|
1469
|
+
type: 'all',
|
|
1470
|
+
text: 'All',
|
|
1471
|
+
title: 'View all'
|
|
1472
|
+
}],
|
|
1473
|
+
/**
|
|
1474
|
+
* The date formats to use when setting min, max and value on date inputs.
|
|
1475
|
+
* @private
|
|
1476
|
+
*/
|
|
1477
|
+
inputTypeFormats: {
|
|
1478
|
+
'datetime-local': '%Y-%m-%dT%H:%M:%S',
|
|
1479
|
+
'date': '%Y-%m-%d',
|
|
1480
|
+
'time': '%H:%M:%S'
|
|
1481
|
+
}
|
|
1482
|
+
});
|
|
1483
|
+
/* *
|
|
1484
|
+
*
|
|
1485
|
+
* Default Export
|
|
1486
|
+
*
|
|
1487
|
+
* */
|
|
1488
|
+
export default RangeSelector;
|
|
1489
|
+
/* *
|
|
1490
|
+
*
|
|
1491
|
+
* API Options
|
|
1492
|
+
*
|
|
1493
|
+
* */
|
|
1912
1494
|
/**
|
|
1913
|
-
*
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
type: 'month',
|
|
1917
|
-
count: 1,
|
|
1918
|
-
text: '1m',
|
|
1919
|
-
title: 'View 1 month'
|
|
1920
|
-
}, {
|
|
1921
|
-
type: 'month',
|
|
1922
|
-
count: 3,
|
|
1923
|
-
text: '3m',
|
|
1924
|
-
title: 'View 3 months'
|
|
1925
|
-
}, {
|
|
1926
|
-
type: 'month',
|
|
1927
|
-
count: 6,
|
|
1928
|
-
text: '6m',
|
|
1929
|
-
title: 'View 6 months'
|
|
1930
|
-
}, {
|
|
1931
|
-
type: 'ytd',
|
|
1932
|
-
text: 'YTD',
|
|
1933
|
-
title: 'View year to date'
|
|
1934
|
-
}, {
|
|
1935
|
-
type: 'year',
|
|
1936
|
-
count: 1,
|
|
1937
|
-
text: '1y',
|
|
1938
|
-
title: 'View 1 year'
|
|
1939
|
-
}, {
|
|
1940
|
-
type: 'all',
|
|
1941
|
-
text: 'All',
|
|
1942
|
-
title: 'View all'
|
|
1943
|
-
}];
|
|
1944
|
-
/**
|
|
1945
|
-
* The date formats to use when setting min, max and value on date inputs
|
|
1495
|
+
* Define the time span for the button
|
|
1496
|
+
*
|
|
1497
|
+
* @typedef {"all"|"day"|"hour"|"millisecond"|"minute"|"month"|"second"|"week"|"year"|"ytd"} Highcharts.RangeSelectorButtonTypeValue
|
|
1946
1498
|
*/
|
|
1947
|
-
RangeSelector.prototype.inputTypeFormats = {
|
|
1948
|
-
'datetime-local': '%Y-%m-%dT%H:%M:%S',
|
|
1949
|
-
'date': '%Y-%m-%d',
|
|
1950
|
-
'time': '%H:%M:%S'
|
|
1951
|
-
};
|
|
1952
1499
|
/**
|
|
1953
|
-
*
|
|
1500
|
+
* Callback function to react on button clicks.
|
|
1954
1501
|
*
|
|
1955
|
-
* @
|
|
1956
|
-
*
|
|
1502
|
+
* @callback Highcharts.RangeSelectorClickCallbackFunction
|
|
1503
|
+
*
|
|
1504
|
+
* @param {global.Event} e
|
|
1505
|
+
* Event arguments.
|
|
1506
|
+
*
|
|
1507
|
+
* @param {boolean|undefined}
|
|
1508
|
+
* Return false to cancel the default button event.
|
|
1957
1509
|
*/
|
|
1958
|
-
function preferredInputType(format) {
|
|
1959
|
-
var ms = format.indexOf('%L') !== -1;
|
|
1960
|
-
if (ms) {
|
|
1961
|
-
return 'text';
|
|
1962
|
-
}
|
|
1963
|
-
var date = ['a', 'A', 'd', 'e', 'w', 'b', 'B', 'm', 'o', 'y', 'Y']
|
|
1964
|
-
.some(function (char) { return format.indexOf('%' + char) !== -1; });
|
|
1965
|
-
var time = ['H', 'k', 'I', 'l', 'M', 'S'].some(function (char) {
|
|
1966
|
-
return format.indexOf('%' + char) !== -1;
|
|
1967
|
-
});
|
|
1968
|
-
if (date && time) {
|
|
1969
|
-
return 'datetime-local';
|
|
1970
|
-
}
|
|
1971
|
-
if (date) {
|
|
1972
|
-
return 'date';
|
|
1973
|
-
}
|
|
1974
|
-
if (time) {
|
|
1975
|
-
return 'time';
|
|
1976
|
-
}
|
|
1977
|
-
return 'text';
|
|
1978
|
-
}
|
|
1979
1510
|
/**
|
|
1980
|
-
*
|
|
1981
|
-
*
|
|
1982
|
-
* selected range is a multiple of months or years, it is compensated for
|
|
1983
|
-
* various month lengths.
|
|
1511
|
+
* Callback function to parse values entered in the input boxes and return a
|
|
1512
|
+
* valid JavaScript time as milliseconds since 1970.
|
|
1984
1513
|
*
|
|
1985
|
-
* @
|
|
1986
|
-
*
|
|
1987
|
-
* @
|
|
1988
|
-
*
|
|
1514
|
+
* @callback Highcharts.RangeSelectorParseCallbackFunction
|
|
1515
|
+
*
|
|
1516
|
+
* @param {string} value
|
|
1517
|
+
* Input value to parse.
|
|
1518
|
+
*
|
|
1519
|
+
* @return {number}
|
|
1520
|
+
* Parsed JavaScript time value.
|
|
1989
1521
|
*/
|
|
1990
|
-
|
|
1991
|
-
var rangeOptions = this.range, type = rangeOptions.type, min, max = this.max, dataMin, range, time = this.chart.time,
|
|
1992
|
-
// Get the true range from a start date
|
|
1993
|
-
getTrueRange = function (base, count) {
|
|
1994
|
-
var timeName = type === 'year' ?
|
|
1995
|
-
'FullYear' : 'Month';
|
|
1996
|
-
var date = new time.Date(base);
|
|
1997
|
-
var basePeriod = time.get(timeName, date);
|
|
1998
|
-
time.set(timeName, date, basePeriod + count);
|
|
1999
|
-
if (basePeriod === time.get(timeName, date)) {
|
|
2000
|
-
time.set('Date', date, 0); // #6537
|
|
2001
|
-
}
|
|
2002
|
-
return date.getTime() - base;
|
|
2003
|
-
};
|
|
2004
|
-
if (isNumber(rangeOptions)) {
|
|
2005
|
-
min = max - rangeOptions;
|
|
2006
|
-
range = rangeOptions;
|
|
2007
|
-
}
|
|
2008
|
-
else if (rangeOptions) {
|
|
2009
|
-
min = max + getTrueRange(max, -(rangeOptions.count || 1));
|
|
2010
|
-
// Let the fixedRange reflect initial settings (#5930)
|
|
2011
|
-
if (this.chart) {
|
|
2012
|
-
this.chart.fixedRange = max - min;
|
|
2013
|
-
}
|
|
2014
|
-
}
|
|
2015
|
-
dataMin = pick(this.dataMin, Number.MIN_VALUE);
|
|
2016
|
-
if (!isNumber(min)) {
|
|
2017
|
-
min = dataMin;
|
|
2018
|
-
}
|
|
2019
|
-
if (min <= dataMin) {
|
|
2020
|
-
min = dataMin;
|
|
2021
|
-
if (typeof range === 'undefined') { // #4501
|
|
2022
|
-
range = getTrueRange(min, rangeOptions.count);
|
|
2023
|
-
}
|
|
2024
|
-
this.newMax = Math.min(min + range, pick(this.dataMax, Number.MAX_VALUE));
|
|
2025
|
-
}
|
|
2026
|
-
if (!isNumber(max)) {
|
|
2027
|
-
min = void 0;
|
|
2028
|
-
}
|
|
2029
|
-
else if (!isNumber(rangeOptions) &&
|
|
2030
|
-
rangeOptions &&
|
|
2031
|
-
rangeOptions._offsetMin) {
|
|
2032
|
-
min += rangeOptions._offsetMin;
|
|
2033
|
-
}
|
|
2034
|
-
return min;
|
|
2035
|
-
};
|
|
2036
|
-
if (!H.RangeSelector) {
|
|
2037
|
-
var chartDestroyEvents_1 = [];
|
|
2038
|
-
var initRangeSelector_1 = function (chart) {
|
|
2039
|
-
var extremes, rangeSelector = chart.rangeSelector, legend, alignTo, verticalAlign;
|
|
2040
|
-
/**
|
|
2041
|
-
* @private
|
|
2042
|
-
*/
|
|
2043
|
-
function render() {
|
|
2044
|
-
if (rangeSelector) {
|
|
2045
|
-
extremes = chart.xAxis[0].getExtremes();
|
|
2046
|
-
legend = chart.legend;
|
|
2047
|
-
verticalAlign = (rangeSelector &&
|
|
2048
|
-
rangeSelector.options.verticalAlign);
|
|
2049
|
-
if (isNumber(extremes.min)) {
|
|
2050
|
-
rangeSelector.render(extremes.min, extremes.max);
|
|
2051
|
-
}
|
|
2052
|
-
// Re-align the legend so that it's below the rangeselector
|
|
2053
|
-
if (legend.display &&
|
|
2054
|
-
verticalAlign === 'top' &&
|
|
2055
|
-
verticalAlign === legend.options.verticalAlign) {
|
|
2056
|
-
// Create a new alignment box for the legend.
|
|
2057
|
-
alignTo = merge(chart.spacingBox);
|
|
2058
|
-
if (legend.options.layout === 'vertical') {
|
|
2059
|
-
alignTo.y = chart.plotTop;
|
|
2060
|
-
}
|
|
2061
|
-
else {
|
|
2062
|
-
alignTo.y += rangeSelector.getHeight();
|
|
2063
|
-
}
|
|
2064
|
-
legend.group.placed = false; // Don't animate the alignment.
|
|
2065
|
-
legend.align(alignTo);
|
|
2066
|
-
}
|
|
2067
|
-
}
|
|
2068
|
-
}
|
|
2069
|
-
if (rangeSelector) {
|
|
2070
|
-
var events = find(chartDestroyEvents_1, function (e) { return e[0] === chart; });
|
|
2071
|
-
if (!events) {
|
|
2072
|
-
chartDestroyEvents_1.push([chart, [
|
|
2073
|
-
// redraw the scroller on setExtremes
|
|
2074
|
-
addEvent(chart.xAxis[0], 'afterSetExtremes', function (e) {
|
|
2075
|
-
if (rangeSelector) {
|
|
2076
|
-
rangeSelector.render(e.min, e.max);
|
|
2077
|
-
}
|
|
2078
|
-
}),
|
|
2079
|
-
// redraw the scroller chart resize
|
|
2080
|
-
addEvent(chart, 'redraw', render)
|
|
2081
|
-
]]);
|
|
2082
|
-
}
|
|
2083
|
-
// do it now
|
|
2084
|
-
render();
|
|
2085
|
-
}
|
|
2086
|
-
};
|
|
2087
|
-
// Initialize rangeselector for stock charts
|
|
2088
|
-
addEvent(Chart, 'afterGetContainer', function () {
|
|
2089
|
-
if (this.options.rangeSelector &&
|
|
2090
|
-
this.options.rangeSelector.enabled) {
|
|
2091
|
-
this.rangeSelector = new RangeSelector(this);
|
|
2092
|
-
}
|
|
2093
|
-
});
|
|
2094
|
-
addEvent(Chart, 'beforeRender', function () {
|
|
2095
|
-
var chart = this, axes = chart.axes, rangeSelector = chart.rangeSelector, verticalAlign;
|
|
2096
|
-
if (rangeSelector) {
|
|
2097
|
-
if (isNumber(rangeSelector.deferredYTDClick)) {
|
|
2098
|
-
rangeSelector.clickButton(rangeSelector.deferredYTDClick);
|
|
2099
|
-
delete rangeSelector.deferredYTDClick;
|
|
2100
|
-
}
|
|
2101
|
-
axes.forEach(function (axis) {
|
|
2102
|
-
axis.updateNames();
|
|
2103
|
-
axis.setScale();
|
|
2104
|
-
});
|
|
2105
|
-
chart.getAxisMargins();
|
|
2106
|
-
rangeSelector.render();
|
|
2107
|
-
verticalAlign = rangeSelector.options.verticalAlign;
|
|
2108
|
-
if (!rangeSelector.options.floating) {
|
|
2109
|
-
if (verticalAlign === 'bottom') {
|
|
2110
|
-
this.extraBottomMargin = true;
|
|
2111
|
-
}
|
|
2112
|
-
else if (verticalAlign !== 'middle') {
|
|
2113
|
-
this.extraTopMargin = true;
|
|
2114
|
-
}
|
|
2115
|
-
}
|
|
2116
|
-
}
|
|
2117
|
-
});
|
|
2118
|
-
addEvent(Chart, 'update', function (e) {
|
|
2119
|
-
var chart = this, options = e.options, optionsRangeSelector = options.rangeSelector, rangeSelector = chart.rangeSelector, verticalAlign, extraBottomMarginWas = this.extraBottomMargin, extraTopMarginWas = this.extraTopMargin;
|
|
2120
|
-
if (optionsRangeSelector &&
|
|
2121
|
-
optionsRangeSelector.enabled &&
|
|
2122
|
-
!defined(rangeSelector) &&
|
|
2123
|
-
this.options.rangeSelector) {
|
|
2124
|
-
this.options.rangeSelector.enabled = true;
|
|
2125
|
-
this.rangeSelector = rangeSelector = new RangeSelector(this);
|
|
2126
|
-
}
|
|
2127
|
-
this.extraBottomMargin = false;
|
|
2128
|
-
this.extraTopMargin = false;
|
|
2129
|
-
if (rangeSelector) {
|
|
2130
|
-
initRangeSelector_1(this);
|
|
2131
|
-
verticalAlign = (optionsRangeSelector &&
|
|
2132
|
-
optionsRangeSelector.verticalAlign) || (rangeSelector.options && rangeSelector.options.verticalAlign);
|
|
2133
|
-
if (!rangeSelector.options.floating) {
|
|
2134
|
-
if (verticalAlign === 'bottom') {
|
|
2135
|
-
this.extraBottomMargin = true;
|
|
2136
|
-
}
|
|
2137
|
-
else if (verticalAlign !== 'middle') {
|
|
2138
|
-
this.extraTopMargin = true;
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
|
-
if (this.extraBottomMargin !== extraBottomMarginWas ||
|
|
2142
|
-
this.extraTopMargin !== extraTopMarginWas) {
|
|
2143
|
-
this.isDirtyBox = true;
|
|
2144
|
-
}
|
|
2145
|
-
}
|
|
2146
|
-
});
|
|
2147
|
-
addEvent(Chart, 'render', function () {
|
|
2148
|
-
var chart = this, rangeSelector = chart.rangeSelector, verticalAlign;
|
|
2149
|
-
if (rangeSelector && !rangeSelector.options.floating) {
|
|
2150
|
-
rangeSelector.render();
|
|
2151
|
-
verticalAlign = rangeSelector.options.verticalAlign;
|
|
2152
|
-
if (verticalAlign === 'bottom') {
|
|
2153
|
-
this.extraBottomMargin = true;
|
|
2154
|
-
}
|
|
2155
|
-
else if (verticalAlign !== 'middle') {
|
|
2156
|
-
this.extraTopMargin = true;
|
|
2157
|
-
}
|
|
2158
|
-
}
|
|
2159
|
-
});
|
|
2160
|
-
addEvent(Chart, 'getMargins', function () {
|
|
2161
|
-
var rangeSelector = this.rangeSelector, rangeSelectorHeight;
|
|
2162
|
-
if (rangeSelector) {
|
|
2163
|
-
rangeSelectorHeight = rangeSelector.getHeight();
|
|
2164
|
-
if (this.extraTopMargin) {
|
|
2165
|
-
this.plotTop += rangeSelectorHeight;
|
|
2166
|
-
}
|
|
2167
|
-
if (this.extraBottomMargin) {
|
|
2168
|
-
this.marginBottom += rangeSelectorHeight;
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
});
|
|
2172
|
-
Chart.prototype.callbacks.push(initRangeSelector_1);
|
|
2173
|
-
// Remove resize/afterSetExtremes at chart destroy
|
|
2174
|
-
addEvent(Chart, 'destroy', function destroyEvents() {
|
|
2175
|
-
for (var i = 0; i < chartDestroyEvents_1.length; i++) {
|
|
2176
|
-
var events = chartDestroyEvents_1[i];
|
|
2177
|
-
if (events[0] === this) {
|
|
2178
|
-
events[1].forEach(function (unbind) { return unbind(); });
|
|
2179
|
-
chartDestroyEvents_1.splice(i, 1);
|
|
2180
|
-
return;
|
|
2181
|
-
}
|
|
2182
|
-
}
|
|
2183
|
-
});
|
|
2184
|
-
H.RangeSelector = RangeSelector;
|
|
2185
|
-
}
|
|
2186
|
-
export default RangeSelector;
|
|
1522
|
+
(''); // keeps doclets above in JS file
|