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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Highstock JS v10.
|
|
2
|
+
* @license Highstock JS v10.3.1 (2022-10-31)
|
|
3
3
|
*
|
|
4
4
|
* Data grouping module
|
|
5
5
|
*
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
_registerModule(_modules, 'Extensions/DataGrouping
|
|
40
|
+
_registerModule(_modules, 'Extensions/DataGrouping/ApproximationRegistry.js', [], function () {
|
|
41
41
|
/* *
|
|
42
42
|
*
|
|
43
43
|
* (c) 2010-2021 Torstein Honsi
|
|
@@ -47,22 +47,11 @@
|
|
|
47
47
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
48
48
|
*
|
|
49
49
|
* */
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
correctFloat = U.correctFloat,
|
|
56
|
-
defined = U.defined,
|
|
57
|
-
error = U.error,
|
|
58
|
-
extend = U.extend,
|
|
59
|
-
isNumber = U.isNumber,
|
|
60
|
-
merge = U.merge,
|
|
61
|
-
pick = U.pick;
|
|
62
|
-
/* ************************************************************************** *
|
|
63
|
-
* Start data grouping module *
|
|
64
|
-
* ************************************************************************** */
|
|
65
|
-
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
50
|
+
/* *
|
|
51
|
+
*
|
|
52
|
+
* Constants
|
|
53
|
+
*
|
|
54
|
+
* */
|
|
66
55
|
/**
|
|
67
56
|
* Define the available approximation types. The data grouping
|
|
68
57
|
* approximations takes an array or numbers as the first parameter. In case
|
|
@@ -73,133 +62,669 @@
|
|
|
73
62
|
* @product highstock
|
|
74
63
|
*
|
|
75
64
|
* @private
|
|
76
|
-
* @name Highcharts.approximations
|
|
77
|
-
* @type {Highcharts.Dictionary<Function>}
|
|
78
65
|
*/
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
66
|
+
var ApproximationRegistry = {
|
|
67
|
+
// approximations added programmatically
|
|
68
|
+
};
|
|
69
|
+
/* *
|
|
70
|
+
*
|
|
71
|
+
* Default Export
|
|
72
|
+
*
|
|
73
|
+
* */
|
|
74
|
+
|
|
75
|
+
return ApproximationRegistry;
|
|
76
|
+
});
|
|
77
|
+
_registerModule(_modules, 'Extensions/DataGrouping/ApproximationDefaults.js', [_modules['Extensions/DataGrouping/ApproximationRegistry.js'], _modules['Core/Utilities.js']], function (ApproximationRegistry, U) {
|
|
78
|
+
/* *
|
|
79
|
+
*
|
|
80
|
+
* (c) 2010-2021 Torstein Honsi
|
|
81
|
+
*
|
|
82
|
+
* License: www.highcharts.com/license
|
|
83
|
+
*
|
|
84
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
85
|
+
*
|
|
86
|
+
* */
|
|
87
|
+
var arrayMax = U.arrayMax,
|
|
88
|
+
arrayMin = U.arrayMin,
|
|
89
|
+
correctFloat = U.correctFloat,
|
|
90
|
+
extend = U.extend,
|
|
91
|
+
isNumber = U.isNumber;
|
|
92
|
+
/* *
|
|
93
|
+
*
|
|
94
|
+
* Functions
|
|
95
|
+
*
|
|
96
|
+
* */
|
|
97
|
+
/**
|
|
98
|
+
* @private
|
|
99
|
+
*/
|
|
100
|
+
function average(arr) {
|
|
101
|
+
var len = arr.length;
|
|
102
|
+
var ret = sum(arr);
|
|
103
|
+
// If we have a number, return it divided by the length. If not,
|
|
104
|
+
// return null or undefined based on what the sum method finds.
|
|
105
|
+
if (isNumber(ret) && len) {
|
|
106
|
+
ret = correctFloat(ret / len);
|
|
107
|
+
}
|
|
108
|
+
return ret;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The same as average, but for series with multiple values, like area ranges.
|
|
112
|
+
* @private
|
|
113
|
+
*/
|
|
114
|
+
function averages() {
|
|
115
|
+
var ret = [];
|
|
116
|
+
[].forEach.call(arguments, function (arr) {
|
|
117
|
+
ret.push(average(arr));
|
|
118
|
+
});
|
|
119
|
+
// Return undefined when first elem. is undefined and let
|
|
120
|
+
// sum method handle null (#7377)
|
|
121
|
+
return typeof ret[0] === 'undefined' ? void 0 : ret;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* @private
|
|
125
|
+
*/
|
|
126
|
+
function close(arr) {
|
|
127
|
+
return arr.length ?
|
|
128
|
+
arr[arr.length - 1] :
|
|
129
|
+
(arr.hasNulls ? null : void 0);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* @private
|
|
133
|
+
*/
|
|
134
|
+
function high(arr) {
|
|
135
|
+
return arr.length ?
|
|
136
|
+
arrayMax(arr) :
|
|
137
|
+
(arr.hasNulls ? null : void 0);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* HLC, OHLC and range are special cases where a multidimensional array is input
|
|
141
|
+
* and an array is output.
|
|
142
|
+
* @private
|
|
143
|
+
*/
|
|
144
|
+
function hlc(high, low, close) {
|
|
145
|
+
high = ApproximationRegistry.high(high);
|
|
146
|
+
low = ApproximationRegistry.low(low);
|
|
147
|
+
close = ApproximationRegistry.close(close);
|
|
148
|
+
if (isNumber(high) ||
|
|
149
|
+
isNumber(low) ||
|
|
150
|
+
isNumber(close)) {
|
|
151
|
+
return [high, low, close];
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* @private
|
|
156
|
+
*/
|
|
157
|
+
function low(arr) {
|
|
158
|
+
return arr.length ?
|
|
159
|
+
arrayMin(arr) :
|
|
160
|
+
(arr.hasNulls ? null : void 0);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* @private
|
|
164
|
+
*/
|
|
165
|
+
function ohlc(open, high, low, close) {
|
|
166
|
+
open = ApproximationRegistry.open(open);
|
|
167
|
+
high = ApproximationRegistry.high(high);
|
|
168
|
+
low = ApproximationRegistry.low(low);
|
|
169
|
+
close = ApproximationRegistry.close(close);
|
|
170
|
+
if (isNumber(open) ||
|
|
171
|
+
isNumber(high) ||
|
|
172
|
+
isNumber(low) ||
|
|
173
|
+
isNumber(close)) {
|
|
174
|
+
return [open, high, low, close];
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* @private
|
|
179
|
+
*/
|
|
180
|
+
function open(arr) {
|
|
181
|
+
return arr.length ? arr[0] : (arr.hasNulls ? null : void 0);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* @private
|
|
185
|
+
*/
|
|
186
|
+
function range(low, high) {
|
|
187
|
+
low = ApproximationRegistry.low(low);
|
|
188
|
+
high = ApproximationRegistry.high(high);
|
|
189
|
+
if (isNumber(low) || isNumber(high)) {
|
|
190
|
+
return [low, high];
|
|
191
|
+
}
|
|
192
|
+
if (low === null && high === null) {
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
// else, return is undefined
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* @private
|
|
199
|
+
*/
|
|
200
|
+
function sum(arr) {
|
|
201
|
+
var len = arr.length,
|
|
202
|
+
ret;
|
|
203
|
+
// 1. it consists of nulls exclusive
|
|
204
|
+
if (!len && arr.hasNulls) {
|
|
205
|
+
ret = null;
|
|
206
|
+
// 2. it has a length and real values
|
|
207
|
+
}
|
|
208
|
+
else if (len) {
|
|
209
|
+
ret = 0;
|
|
210
|
+
while (len--) {
|
|
211
|
+
ret += arr[len];
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
// 3. it has zero length, so just return undefined
|
|
215
|
+
// => doNothing()
|
|
216
|
+
return ret;
|
|
217
|
+
}
|
|
218
|
+
/* *
|
|
219
|
+
*
|
|
220
|
+
* Default Export
|
|
221
|
+
*
|
|
222
|
+
* */
|
|
223
|
+
var ApproximationDefaults = {
|
|
224
|
+
average: average,
|
|
225
|
+
averages: averages,
|
|
226
|
+
close: close,
|
|
227
|
+
high: high,
|
|
228
|
+
hlc: hlc,
|
|
229
|
+
low: low,
|
|
230
|
+
ohlc: ohlc,
|
|
231
|
+
open: open,
|
|
232
|
+
range: range,
|
|
233
|
+
sum: sum
|
|
234
|
+
};
|
|
235
|
+
extend(ApproximationRegistry, ApproximationDefaults);
|
|
236
|
+
|
|
237
|
+
return ApproximationDefaults;
|
|
238
|
+
});
|
|
239
|
+
_registerModule(_modules, 'Extensions/DataGrouping/DataGroupingDefaults.js', [], function () {
|
|
240
|
+
/* *
|
|
241
|
+
*
|
|
242
|
+
* (c) 2010-2021 Torstein Honsi
|
|
243
|
+
*
|
|
244
|
+
* License: www.highcharts.com/license
|
|
245
|
+
*
|
|
246
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
247
|
+
*
|
|
248
|
+
* */
|
|
249
|
+
/* *
|
|
250
|
+
*
|
|
251
|
+
* Constants
|
|
252
|
+
*
|
|
253
|
+
* */
|
|
254
|
+
/**
|
|
255
|
+
* Common options
|
|
256
|
+
* @private
|
|
257
|
+
*/
|
|
258
|
+
var common = {
|
|
259
|
+
// enabled: null, // (true for stock charts, false for basic),
|
|
260
|
+
// forced: undefined,
|
|
261
|
+
groupPixelWidth: 2,
|
|
262
|
+
// the first one is the point or start value, the second is the start
|
|
263
|
+
// value if we're dealing with range, the third one is the end value if
|
|
264
|
+
// dealing with a range
|
|
265
|
+
dateTimeLabelFormats: {
|
|
266
|
+
millisecond: [
|
|
267
|
+
'%A, %b %e, %H:%M:%S.%L',
|
|
268
|
+
'%A, %b %e, %H:%M:%S.%L',
|
|
269
|
+
'-%H:%M:%S.%L'
|
|
270
|
+
],
|
|
271
|
+
second: [
|
|
272
|
+
'%A, %b %e, %H:%M:%S',
|
|
273
|
+
'%A, %b %e, %H:%M:%S',
|
|
274
|
+
'-%H:%M:%S'
|
|
275
|
+
],
|
|
276
|
+
minute: [
|
|
277
|
+
'%A, %b %e, %H:%M',
|
|
278
|
+
'%A, %b %e, %H:%M',
|
|
279
|
+
'-%H:%M'
|
|
280
|
+
],
|
|
281
|
+
hour: [
|
|
282
|
+
'%A, %b %e, %H:%M',
|
|
283
|
+
'%A, %b %e, %H:%M',
|
|
284
|
+
'-%H:%M'
|
|
285
|
+
],
|
|
286
|
+
day: [
|
|
287
|
+
'%A, %b %e, %Y',
|
|
288
|
+
'%A, %b %e',
|
|
289
|
+
'-%A, %b %e, %Y'
|
|
290
|
+
],
|
|
291
|
+
week: [
|
|
292
|
+
'Week from %A, %b %e, %Y',
|
|
293
|
+
'%A, %b %e',
|
|
294
|
+
'-%A, %b %e, %Y'
|
|
295
|
+
],
|
|
296
|
+
month: [
|
|
297
|
+
'%B %Y',
|
|
298
|
+
'%B',
|
|
299
|
+
'-%B %Y'
|
|
300
|
+
],
|
|
301
|
+
year: [
|
|
302
|
+
'%Y',
|
|
303
|
+
'%Y',
|
|
304
|
+
'-%Y'
|
|
305
|
+
]
|
|
306
|
+
}
|
|
307
|
+
// smoothed = false, // enable this for navigator series only
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* Extends common options
|
|
311
|
+
* @private
|
|
312
|
+
*/
|
|
313
|
+
var seriesSpecific = {
|
|
314
|
+
line: {},
|
|
315
|
+
spline: {},
|
|
316
|
+
area: {},
|
|
317
|
+
areaspline: {},
|
|
318
|
+
arearange: {},
|
|
319
|
+
column: {
|
|
320
|
+
groupPixelWidth: 10
|
|
321
|
+
},
|
|
322
|
+
columnrange: {
|
|
323
|
+
groupPixelWidth: 10
|
|
324
|
+
},
|
|
325
|
+
candlestick: {
|
|
326
|
+
groupPixelWidth: 10
|
|
327
|
+
},
|
|
328
|
+
ohlc: {
|
|
329
|
+
groupPixelWidth: 5
|
|
330
|
+
},
|
|
331
|
+
hlc: {
|
|
332
|
+
groupPixelWidth: 5
|
|
333
|
+
// Move to HeikinAshiSeries.ts aftre refactoring data grouping.
|
|
334
|
+
},
|
|
335
|
+
heikinashi: {
|
|
336
|
+
groupPixelWidth: 10
|
|
87
337
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
338
|
+
};
|
|
339
|
+
/**
|
|
340
|
+
* Units are defined in a separate array to allow complete overriding in
|
|
341
|
+
* case of a user option.
|
|
342
|
+
* @private
|
|
343
|
+
*/
|
|
344
|
+
var units = [
|
|
345
|
+
[
|
|
346
|
+
'millisecond',
|
|
347
|
+
[1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
|
|
348
|
+
],
|
|
349
|
+
[
|
|
350
|
+
'second',
|
|
351
|
+
[1, 2, 5, 10, 15, 30]
|
|
352
|
+
],
|
|
353
|
+
[
|
|
354
|
+
'minute',
|
|
355
|
+
[1, 2, 5, 10, 15, 30]
|
|
356
|
+
],
|
|
357
|
+
[
|
|
358
|
+
'hour',
|
|
359
|
+
[1, 2, 3, 4, 6, 8, 12]
|
|
360
|
+
],
|
|
361
|
+
[
|
|
362
|
+
'day',
|
|
363
|
+
[1]
|
|
364
|
+
],
|
|
365
|
+
[
|
|
366
|
+
'week',
|
|
367
|
+
[1]
|
|
368
|
+
],
|
|
369
|
+
[
|
|
370
|
+
'month',
|
|
371
|
+
[1, 3, 6]
|
|
372
|
+
],
|
|
373
|
+
[
|
|
374
|
+
'year',
|
|
375
|
+
null
|
|
376
|
+
]
|
|
377
|
+
];
|
|
378
|
+
/* *
|
|
379
|
+
*
|
|
380
|
+
* Default Export
|
|
381
|
+
*
|
|
382
|
+
* */
|
|
383
|
+
var DataGroupingDefaults = {
|
|
384
|
+
common: common,
|
|
385
|
+
seriesSpecific: seriesSpecific,
|
|
386
|
+
units: units
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
return DataGroupingDefaults;
|
|
390
|
+
});
|
|
391
|
+
_registerModule(_modules, 'Extensions/DataGrouping/DataGroupingAxisComposition.js', [_modules['Extensions/DataGrouping/DataGroupingDefaults.js'], _modules['Core/Utilities.js']], function (DataGroupingDefaults, U) {
|
|
392
|
+
/* *
|
|
393
|
+
*
|
|
394
|
+
* (c) 2010-2021 Torstein Honsi
|
|
395
|
+
*
|
|
396
|
+
* License: www.highcharts.com/license
|
|
397
|
+
*
|
|
398
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
399
|
+
*
|
|
400
|
+
* */
|
|
401
|
+
var addEvent = U.addEvent,
|
|
402
|
+
extend = U.extend,
|
|
403
|
+
merge = U.merge,
|
|
404
|
+
pick = U.pick;
|
|
405
|
+
/* *
|
|
406
|
+
*
|
|
407
|
+
* Constants
|
|
408
|
+
*
|
|
409
|
+
* */
|
|
410
|
+
var composedMembers = [];
|
|
411
|
+
/* *
|
|
412
|
+
*
|
|
413
|
+
* Variables
|
|
414
|
+
*
|
|
415
|
+
* */
|
|
416
|
+
var AxisConstructor;
|
|
417
|
+
/* *
|
|
418
|
+
*
|
|
419
|
+
* Functions
|
|
420
|
+
*
|
|
421
|
+
* */
|
|
422
|
+
/**
|
|
423
|
+
* Check the groupPixelWidth and apply the grouping if needed.
|
|
424
|
+
* Fired only after processing the data.
|
|
425
|
+
*
|
|
426
|
+
* @product highstock
|
|
427
|
+
*
|
|
428
|
+
* @function Highcharts.Axis#applyGrouping
|
|
429
|
+
*/
|
|
430
|
+
function applyGrouping(e) {
|
|
431
|
+
var axis = this,
|
|
432
|
+
series = axis.series;
|
|
433
|
+
// Reset the groupPixelWidth for all series, #17141.
|
|
434
|
+
series.forEach(function (series) {
|
|
435
|
+
series.groupPixelWidth = void 0; // #2110
|
|
436
|
+
});
|
|
437
|
+
series.forEach(function (series) {
|
|
438
|
+
series.groupPixelWidth = (axis.getGroupPixelWidth &&
|
|
439
|
+
axis.getGroupPixelWidth());
|
|
440
|
+
if (series.groupPixelWidth) {
|
|
441
|
+
series.hasProcessed = true; // #2692
|
|
442
|
+
}
|
|
443
|
+
// Fire independing on series.groupPixelWidth to always set a proper
|
|
444
|
+
// dataGrouping state, (#16238)
|
|
445
|
+
series.applyGrouping(!!e.hasExtremesChanged);
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* @private
|
|
450
|
+
*/
|
|
451
|
+
function compose(AxisClass) {
|
|
452
|
+
AxisConstructor = AxisClass;
|
|
453
|
+
if (composedMembers.indexOf(AxisClass) === -1) {
|
|
454
|
+
composedMembers.push(AxisClass);
|
|
455
|
+
addEvent(AxisClass, 'afterSetScale', onAfterSetScale);
|
|
456
|
+
// When all series are processed, calculate the group pixel width and
|
|
457
|
+
// then if this value is different than zero apply groupings.
|
|
458
|
+
addEvent(AxisClass, 'postProcessData', applyGrouping);
|
|
459
|
+
extend(AxisClass.prototype, {
|
|
460
|
+
applyGrouping: applyGrouping,
|
|
461
|
+
getGroupPixelWidth: getGroupPixelWidth,
|
|
462
|
+
setDataGrouping: setDataGrouping
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Get the data grouping pixel width based on the greatest defined individual
|
|
468
|
+
* width of the axis' series, and if whether one of the axes need grouping.
|
|
469
|
+
* @private
|
|
470
|
+
*/
|
|
471
|
+
function getGroupPixelWidth() {
|
|
472
|
+
var series = this.series;
|
|
473
|
+
var i = series.length,
|
|
474
|
+
groupPixelWidth = 0,
|
|
475
|
+
doGrouping = false,
|
|
476
|
+
dataLength,
|
|
477
|
+
dgOptions;
|
|
478
|
+
// If one of the series needs grouping, apply it to all (#1634)
|
|
479
|
+
while (i--) {
|
|
480
|
+
dgOptions = series[i].options.dataGrouping;
|
|
481
|
+
if (dgOptions) { // #2692
|
|
482
|
+
// If multiple series are compared on the same x axis, give them the
|
|
483
|
+
// same group pixel width (#334)
|
|
484
|
+
groupPixelWidth = Math.max(groupPixelWidth,
|
|
485
|
+
// Fallback to commonOptions (#9693)
|
|
486
|
+
pick(dgOptions.groupPixelWidth, DataGroupingDefaults.common.groupPixelWidth));
|
|
487
|
+
dataLength = (series[i].processedXData || series[i].data).length;
|
|
488
|
+
// Execute grouping if the amount of points is greater than the
|
|
489
|
+
// limit defined in groupPixelWidth
|
|
490
|
+
if (series[i].groupPixelWidth ||
|
|
491
|
+
(dataLength >
|
|
492
|
+
(this.chart.plotSizeX / groupPixelWidth)) ||
|
|
493
|
+
(dataLength && dgOptions.forced)) {
|
|
494
|
+
doGrouping = true;
|
|
92
495
|
}
|
|
93
496
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
497
|
+
}
|
|
498
|
+
return doGrouping ? groupPixelWidth : 0;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* When resetting the scale reset the hasProccessed flag to avoid taking
|
|
502
|
+
* previous data grouping of neighbour series into accound when determining
|
|
503
|
+
* group pixel width (#2692).
|
|
504
|
+
* @private
|
|
505
|
+
*/
|
|
506
|
+
function onAfterSetScale() {
|
|
507
|
+
this.series.forEach(function (series) {
|
|
508
|
+
series.hasProcessed = false;
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Highcharts Stock only. Force data grouping on all the axis' series.
|
|
513
|
+
*
|
|
514
|
+
* @product highstock
|
|
515
|
+
*
|
|
516
|
+
* @function Highcharts.Axis#setDataGrouping
|
|
517
|
+
*
|
|
518
|
+
* @param {boolean|Highcharts.DataGroupingOptionsObject} [dataGrouping]
|
|
519
|
+
* A `dataGrouping` configuration. Use `false` to disable data grouping
|
|
520
|
+
* dynamically.
|
|
521
|
+
*
|
|
522
|
+
* @param {boolean} [redraw=true]
|
|
523
|
+
* Whether to redraw the chart or wait for a later call to
|
|
524
|
+
* {@link Chart#redraw}.
|
|
525
|
+
*/
|
|
526
|
+
function setDataGrouping(dataGrouping, redraw) {
|
|
527
|
+
var axis = this;
|
|
528
|
+
var i;
|
|
529
|
+
redraw = pick(redraw, true);
|
|
530
|
+
if (!dataGrouping) {
|
|
531
|
+
dataGrouping = {
|
|
532
|
+
forced: false,
|
|
533
|
+
units: null
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
// Axis is instantiated, update all series
|
|
537
|
+
if (this instanceof AxisConstructor) {
|
|
538
|
+
i = this.series.length;
|
|
539
|
+
while (i--) {
|
|
540
|
+
this.series[i].update({
|
|
541
|
+
dataGrouping: dataGrouping
|
|
542
|
+
}, false);
|
|
105
543
|
}
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
544
|
+
// Axis not yet instanciated, alter series options
|
|
545
|
+
}
|
|
546
|
+
else {
|
|
547
|
+
this.chart.options.series.forEach(function (seriesOptions) {
|
|
548
|
+
// Merging dataGrouping options with already defined options #16759
|
|
549
|
+
seriesOptions.dataGrouping = typeof dataGrouping === 'boolean' ?
|
|
550
|
+
dataGrouping :
|
|
551
|
+
merge(dataGrouping, seriesOptions.dataGrouping);
|
|
114
552
|
});
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
553
|
+
}
|
|
554
|
+
// Clear ordinal slope, so we won't accidentaly use the old one (#7827)
|
|
555
|
+
if (axis.ordinal) {
|
|
556
|
+
axis.ordinal.slope = void 0;
|
|
557
|
+
}
|
|
558
|
+
if (redraw) {
|
|
559
|
+
this.chart.redraw();
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
/* *
|
|
563
|
+
*
|
|
564
|
+
* Default Export
|
|
565
|
+
*
|
|
566
|
+
* */
|
|
567
|
+
var DataGroupingAxisComposition = {
|
|
568
|
+
compose: compose
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
return DataGroupingAxisComposition;
|
|
572
|
+
});
|
|
573
|
+
_registerModule(_modules, 'Extensions/DataGrouping/DataGroupingSeriesComposition.js', [_modules['Extensions/DataGrouping/ApproximationRegistry.js'], _modules['Extensions/DataGrouping/DataGroupingDefaults.js'], _modules['Core/Axis/DateTimeAxis.js'], _modules['Core/Defaults.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (ApproximationRegistry, DataGroupingDefaults, DateTimeAxis, D, SeriesRegistry, U) {
|
|
574
|
+
/* *
|
|
575
|
+
*
|
|
576
|
+
* (c) 2010-2021 Torstein Honsi
|
|
577
|
+
*
|
|
578
|
+
* License: www.highcharts.com/license
|
|
579
|
+
*
|
|
580
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
581
|
+
*
|
|
582
|
+
* */
|
|
583
|
+
var seriesProto = SeriesRegistry.series.prototype;
|
|
584
|
+
var addEvent = U.addEvent,
|
|
585
|
+
defined = U.defined,
|
|
586
|
+
error = U.error,
|
|
587
|
+
extend = U.extend,
|
|
588
|
+
isNumber = U.isNumber,
|
|
589
|
+
merge = U.merge,
|
|
590
|
+
pick = U.pick;
|
|
591
|
+
/* *
|
|
592
|
+
*
|
|
593
|
+
* Constants
|
|
594
|
+
*
|
|
595
|
+
* */
|
|
596
|
+
var baseGeneratePoints = seriesProto.generatePoints;
|
|
597
|
+
var composedMembers = [];
|
|
598
|
+
/* *
|
|
599
|
+
*
|
|
600
|
+
* Functions
|
|
601
|
+
*
|
|
602
|
+
* */
|
|
603
|
+
/**
|
|
604
|
+
* @private
|
|
605
|
+
*/
|
|
606
|
+
function adjustExtremes(xAxis, groupedXData) {
|
|
607
|
+
// Make sure the X axis extends to show the first group (#2533)
|
|
608
|
+
// But only for visible series (#5493, #6393)
|
|
609
|
+
if (defined(groupedXData[0]) &&
|
|
610
|
+
isNumber(xAxis.min) &&
|
|
611
|
+
isNumber(xAxis.dataMin) &&
|
|
612
|
+
groupedXData[0] < xAxis.min) {
|
|
613
|
+
if ((!defined(xAxis.options.min) &&
|
|
614
|
+
xAxis.min <= xAxis.dataMin) ||
|
|
615
|
+
xAxis.min === xAxis.dataMin) {
|
|
616
|
+
xAxis.min = Math.min(groupedXData[0], xAxis.min);
|
|
617
|
+
}
|
|
618
|
+
xAxis.dataMin = Math.min(groupedXData[0], xAxis.dataMin);
|
|
619
|
+
}
|
|
620
|
+
// When the last anchor set, change the extremes that
|
|
621
|
+
// the last point is visible (#12455).
|
|
622
|
+
if (defined(groupedXData[groupedXData.length - 1]) &&
|
|
623
|
+
isNumber(xAxis.max) &&
|
|
624
|
+
isNumber(xAxis.dataMax) &&
|
|
625
|
+
groupedXData[groupedXData.length - 1] > xAxis.max) {
|
|
626
|
+
if ((!defined(xAxis.options.max) &&
|
|
627
|
+
isNumber(xAxis.dataMax) &&
|
|
628
|
+
xAxis.max >= xAxis.dataMax) || xAxis.max === xAxis.dataMax) {
|
|
629
|
+
xAxis.max = Math.max(groupedXData[groupedXData.length - 1], xAxis.max);
|
|
147
630
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
631
|
+
xAxis.dataMax = Math.max(groupedXData[groupedXData.length - 1], xAxis.dataMax);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* @private
|
|
636
|
+
*/
|
|
637
|
+
function anchorPoints(series, groupedXData, xMax) {
|
|
638
|
+
var options = series.options,
|
|
639
|
+
dataGroupingOptions = options.dataGrouping,
|
|
640
|
+
totalRange = (series.currentDataGrouping && series.currentDataGrouping.gapSize);
|
|
641
|
+
var i;
|
|
642
|
+
// DataGrouping x-coordinates.
|
|
643
|
+
if (dataGroupingOptions && series.xData && totalRange && series.groupMap) {
|
|
644
|
+
var groupedDataLength = groupedXData.length - 1,
|
|
645
|
+
anchor = dataGroupingOptions.anchor,
|
|
646
|
+
firstAnchor = pick(dataGroupingOptions.firstAnchor,
|
|
647
|
+
anchor),
|
|
648
|
+
lastAnchor = pick(dataGroupingOptions.lastAnchor,
|
|
649
|
+
anchor);
|
|
650
|
+
// Anchor points that are not extremes.
|
|
651
|
+
if (anchor && anchor !== 'start') {
|
|
652
|
+
var shiftInterval = (totalRange *
|
|
653
|
+
{ middle: 0.5,
|
|
654
|
+
end: 1 }[anchor]);
|
|
655
|
+
i = groupedXData.length - 1;
|
|
656
|
+
while (i-- && i > 0) {
|
|
657
|
+
groupedXData[i] += shiftInterval;
|
|
658
|
+
}
|
|
159
659
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
660
|
+
// Change the first point position, but only when it is
|
|
661
|
+
// the first point in the data set not in the current zoom.
|
|
662
|
+
if (firstAnchor &&
|
|
663
|
+
firstAnchor !== 'start' &&
|
|
664
|
+
series.xData[0] >= groupedXData[0]) {
|
|
665
|
+
var groupStart = series.groupMap[0].start,
|
|
666
|
+
groupLength = series.groupMap[0].length;
|
|
667
|
+
var firstGroupstEnd = void 0;
|
|
668
|
+
if (isNumber(groupStart) && isNumber(groupLength)) {
|
|
669
|
+
firstGroupstEnd = groupStart + (groupLength - 1);
|
|
670
|
+
}
|
|
671
|
+
groupedXData[0] = {
|
|
672
|
+
middle: groupedXData[0] + 0.5 * totalRange,
|
|
673
|
+
end: groupedXData[0] + totalRange,
|
|
674
|
+
firstPoint: series.xData[0],
|
|
675
|
+
lastPoint: firstGroupstEnd && series.xData[firstGroupstEnd]
|
|
676
|
+
}[firstAnchor];
|
|
166
677
|
}
|
|
167
|
-
|
|
168
|
-
|
|
678
|
+
// Change the last point position but only when it is
|
|
679
|
+
// the last point in the data set not in the current zoom.
|
|
680
|
+
if (lastAnchor &&
|
|
681
|
+
lastAnchor !== 'start' &&
|
|
682
|
+
totalRange &&
|
|
683
|
+
groupedXData[groupedDataLength] >= xMax - totalRange) {
|
|
684
|
+
var lastGroupStart = series.groupMap[series.groupMap.length - 1].start;
|
|
685
|
+
groupedXData[groupedDataLength] = {
|
|
686
|
+
middle: groupedXData[groupedDataLength] + 0.5 * totalRange,
|
|
687
|
+
end: groupedXData[groupedDataLength] + totalRange,
|
|
688
|
+
firstPoint: lastGroupStart && series.xData[lastGroupStart],
|
|
689
|
+
lastPoint: series.xData[series.xData.length - 1]
|
|
690
|
+
}[lastAnchor];
|
|
169
691
|
}
|
|
170
|
-
// else, return is undefined
|
|
171
692
|
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* For the processed data, calculate the grouped data if needed.
|
|
696
|
+
*
|
|
697
|
+
* @private
|
|
698
|
+
* @function Highcharts.Series#applyGrouping
|
|
699
|
+
*/
|
|
700
|
+
function applyGrouping(hasExtremesChanged) {
|
|
701
|
+
var series = this,
|
|
702
|
+
chart = series.chart,
|
|
703
|
+
options = series.options,
|
|
704
|
+
dataGroupingOptions = options.dataGrouping,
|
|
705
|
+
groupingEnabled = series.allowDG !== false && dataGroupingOptions &&
|
|
179
706
|
pick(dataGroupingOptions.enabled,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
croppedData,
|
|
187
|
-
revertRequireSorting = false;
|
|
707
|
+
chart.options.isStock),
|
|
708
|
+
visible = (series.visible || !chart.options.chart.ignoreHiddenSeries),
|
|
709
|
+
lastDataGrouping = this.currentDataGrouping;
|
|
710
|
+
var currentDataGrouping,
|
|
711
|
+
croppedData,
|
|
712
|
+
revertRequireSorting = false;
|
|
188
713
|
// Data needs to be sorted for dataGrouping
|
|
189
714
|
if (groupingEnabled && !series.requireSorting) {
|
|
190
715
|
series.requireSorting = revertRequireSorting = true;
|
|
191
716
|
}
|
|
192
717
|
// Skip if skipDataGrouping method returns false or if grouping is disabled
|
|
193
718
|
// (in that order).
|
|
194
|
-
skip = skipDataGrouping(series,
|
|
719
|
+
var skip = skipDataGrouping(series,
|
|
720
|
+
hasExtremesChanged) === false || !groupingEnabled;
|
|
195
721
|
// Revert original requireSorting value if changed
|
|
196
722
|
if (revertRequireSorting) {
|
|
197
723
|
series.requireSorting = false;
|
|
198
724
|
}
|
|
199
725
|
if (!skip) {
|
|
200
726
|
series.destroyGroupedData();
|
|
201
|
-
var
|
|
202
|
-
processedXData = dataGroupingOptions.groupAll ?
|
|
727
|
+
var processedXData = dataGroupingOptions.groupAll ?
|
|
203
728
|
series.xData :
|
|
204
729
|
series.processedXData,
|
|
205
730
|
processedYData = dataGroupingOptions.groupAll ?
|
|
@@ -209,6 +734,8 @@
|
|
|
209
734
|
xAxis = series.xAxis,
|
|
210
735
|
ordinal = xAxis.options.ordinal,
|
|
211
736
|
groupPixelWidth = series.groupPixelWidth;
|
|
737
|
+
var i = void 0,
|
|
738
|
+
hasGroupedData = void 0;
|
|
212
739
|
// Execute grouping if the amount of points is greater than the limit
|
|
213
740
|
// defined in groupPixelWidth
|
|
214
741
|
if (groupPixelWidth &&
|
|
@@ -230,7 +757,7 @@
|
|
|
230
757
|
groupIntervalFactor,
|
|
231
758
|
groupPositions = xAxis.getTimeTicks(DateTimeAxis.Additions.prototype.normalizeTimeTickInterval(interval,
|
|
232
759
|
dataGroupingOptions.units ||
|
|
233
|
-
|
|
760
|
+
DataGroupingDefaults.units),
|
|
234
761
|
// Processed data may extend beyond axis (#4907)
|
|
235
762
|
Math.min(xMin,
|
|
236
763
|
processedXData[0]),
|
|
@@ -245,8 +772,8 @@
|
|
|
245
772
|
processedYData,
|
|
246
773
|
groupPositions,
|
|
247
774
|
dataGroupingOptions.approximation
|
|
248
|
-
])
|
|
249
|
-
|
|
775
|
+
]);
|
|
776
|
+
var groupedXData = groupedData.groupedXData,
|
|
250
777
|
groupedYData = groupedData.groupedYData,
|
|
251
778
|
gapSize = 0;
|
|
252
779
|
// The smoothed option is deprecated, instead, there is a fallback
|
|
@@ -305,75 +832,150 @@
|
|
|
305
832
|
(lastDataGrouping && lastDataGrouping.totalRange) !==
|
|
306
833
|
(currentDataGrouping && currentDataGrouping.totalRange);
|
|
307
834
|
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* @private
|
|
838
|
+
*/
|
|
839
|
+
function compose(SeriesClass) {
|
|
840
|
+
var PointClass = SeriesClass.prototype.pointClass;
|
|
841
|
+
if (composedMembers.indexOf(PointClass) === -1) {
|
|
842
|
+
composedMembers.push(PointClass);
|
|
843
|
+
// Override point prototype to throw a warning when trying to update
|
|
844
|
+
// grouped points.
|
|
845
|
+
addEvent(PointClass, 'update', function () {
|
|
846
|
+
if (this.dataGroup) {
|
|
847
|
+
error(24, false, this.series.chart);
|
|
848
|
+
return false;
|
|
849
|
+
}
|
|
850
|
+
});
|
|
851
|
+
}
|
|
852
|
+
if (composedMembers.indexOf(SeriesClass) === -1) {
|
|
853
|
+
composedMembers.push(SeriesClass);
|
|
854
|
+
addEvent(SeriesClass, 'afterSetOptions', onAfterSetOptions);
|
|
855
|
+
addEvent(SeriesClass, 'destroy', destroyGroupedData);
|
|
856
|
+
extend(SeriesClass.prototype, {
|
|
857
|
+
applyGrouping: applyGrouping,
|
|
858
|
+
destroyGroupedData: destroyGroupedData,
|
|
859
|
+
generatePoints: generatePoints,
|
|
860
|
+
getDGApproximation: getDGApproximation,
|
|
861
|
+
groupData: groupData
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
/**
|
|
866
|
+
* Destroy the grouped data points. #622, #740
|
|
867
|
+
* @private
|
|
868
|
+
*/
|
|
869
|
+
function destroyGroupedData() {
|
|
870
|
+
// Clear previous groups
|
|
871
|
+
if (this.groupedData) {
|
|
872
|
+
this.groupedData.forEach(function (point, i) {
|
|
873
|
+
if (point) {
|
|
874
|
+
this.groupedData[i] = point.destroy ?
|
|
875
|
+
point.destroy() : null;
|
|
876
|
+
}
|
|
877
|
+
}, this);
|
|
878
|
+
// Clears all:
|
|
879
|
+
// - `this.groupedData`
|
|
880
|
+
// - `this.points`
|
|
881
|
+
// - `preserve` object in series.update()
|
|
882
|
+
this.groupedData.length = 0;
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
/**
|
|
886
|
+
* Override the generatePoints method by adding a reference to grouped data
|
|
887
|
+
* @private
|
|
888
|
+
*/
|
|
889
|
+
function generatePoints() {
|
|
890
|
+
baseGeneratePoints.apply(this);
|
|
891
|
+
// Record grouped data in order to let it be destroyed the next time
|
|
892
|
+
// processData runs
|
|
893
|
+
this.destroyGroupedData(); // #622
|
|
894
|
+
this.groupedData = this.hasGroupedData ? this.points : null;
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Set default approximations to the prototypes if present. Properties are
|
|
898
|
+
* inherited down. Can be overridden for individual series types.
|
|
899
|
+
* @private
|
|
900
|
+
*/
|
|
901
|
+
function getDGApproximation() {
|
|
902
|
+
if (this.is('arearange')) {
|
|
903
|
+
return 'range';
|
|
904
|
+
}
|
|
905
|
+
if (this.is('ohlc')) {
|
|
906
|
+
return 'ohlc';
|
|
907
|
+
}
|
|
908
|
+
if (this.is('hlc')) {
|
|
909
|
+
return 'hlc';
|
|
910
|
+
}
|
|
911
|
+
if (this.is('column')) {
|
|
912
|
+
return 'sum';
|
|
913
|
+
}
|
|
914
|
+
return 'average';
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* Highcharts Stock only. Takes parallel arrays of x and y data and groups the
|
|
918
|
+
* data into intervals defined by groupPositions, a collection of starting x
|
|
919
|
+
* values for each group.
|
|
920
|
+
*
|
|
921
|
+
* @product highstock
|
|
922
|
+
*
|
|
923
|
+
* @function Highcharts.Series#groupData
|
|
924
|
+
* @param {Array<number>} xData
|
|
925
|
+
* Parallel array of x data.
|
|
926
|
+
* @param {Array<(number|null|undefined)>|Array<Array<(number|null|undefined)>>} yData
|
|
927
|
+
* Parallel array of y data.
|
|
928
|
+
* @param {Array<number>} groupPositions
|
|
929
|
+
* Group positions.
|
|
930
|
+
* @param {string|Function} [approximation]
|
|
931
|
+
* Approximation to use.
|
|
932
|
+
* @return {Highcharts.DataGroupingResultObject}
|
|
933
|
+
* Mapped groups.
|
|
934
|
+
*/
|
|
935
|
+
function groupData(xData, yData, groupPositions, approximation) {
|
|
936
|
+
var series = this,
|
|
937
|
+
data = series.data,
|
|
938
|
+
dataOptions = series.options && series.options.data,
|
|
939
|
+
groupedXData = [],
|
|
940
|
+
groupedYData = [],
|
|
941
|
+
groupMap = [],
|
|
942
|
+
dataLength = xData.length,
|
|
331
943
|
// when grouping the fake extended axis for panning,
|
|
332
944
|
// we don't need to consider y
|
|
333
945
|
handleYData = !!yData,
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
return approx;
|
|
352
|
-
}
|
|
353
|
-
if (approximations[approx]) {
|
|
354
|
-
return approximations[approx];
|
|
355
|
-
}
|
|
356
|
-
return approximations[(series.getDGApproximation && series.getDGApproximation()) ||
|
|
357
|
-
'average'];
|
|
358
|
-
}
|
|
359
|
-
approximationFn = getApproximation(approximation);
|
|
946
|
+
values = [],
|
|
947
|
+
pointArrayMap = series.pointArrayMap,
|
|
948
|
+
pointArrayMapLength = pointArrayMap && pointArrayMap.length,
|
|
949
|
+
extendedPointArrayMap = ['x'].concat(pointArrayMap || ['y']),
|
|
950
|
+
groupAll = (this.options.dataGrouping &&
|
|
951
|
+
this.options.dataGrouping.groupAll);
|
|
952
|
+
var pointX,
|
|
953
|
+
pointY,
|
|
954
|
+
groupedY,
|
|
955
|
+
pos = 0,
|
|
956
|
+
start = 0;
|
|
957
|
+
var approximationFn = (typeof approximation === 'function' ?
|
|
958
|
+
approximation :
|
|
959
|
+
approximation && ApproximationRegistry[approximation] ?
|
|
960
|
+
ApproximationRegistry[approximation] :
|
|
961
|
+
ApproximationRegistry[(series.getDGApproximation && series.getDGApproximation() ||
|
|
962
|
+
'average')]);
|
|
360
963
|
// Calculate values array size from pointArrayMap length
|
|
361
964
|
if (pointArrayMapLength) {
|
|
362
|
-
pointArrayMap.
|
|
965
|
+
var len = pointArrayMap.length;
|
|
966
|
+
while (len--) {
|
|
363
967
|
values.push([]);
|
|
364
|
-
}
|
|
968
|
+
}
|
|
365
969
|
}
|
|
366
970
|
else {
|
|
367
971
|
values.push([]);
|
|
368
972
|
}
|
|
369
|
-
valuesLen = pointArrayMapLength || 1;
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
if (xData[i]
|
|
373
|
-
|
|
973
|
+
var valuesLen = pointArrayMapLength || 1;
|
|
974
|
+
for (var i = 0; i <= dataLength; i++) {
|
|
975
|
+
// Start with the first point within the X axis range (#2696)
|
|
976
|
+
if (xData[i] < groupPositions[0]) {
|
|
977
|
+
continue; // with next point
|
|
374
978
|
}
|
|
375
|
-
}
|
|
376
|
-
for (i; i <= dataLength; i++) {
|
|
377
979
|
// when a new group is entered, summarize and initialize
|
|
378
980
|
// the previous group
|
|
379
981
|
while ((typeof groupPositions[pos + 1] !== 'undefined' &&
|
|
@@ -409,7 +1011,7 @@
|
|
|
409
1011
|
}
|
|
410
1012
|
// reset the aggregate arrays
|
|
411
1013
|
start = i;
|
|
412
|
-
for (j = 0; j < valuesLen; j++) {
|
|
1014
|
+
for (var j = 0; j < valuesLen; j++) {
|
|
413
1015
|
values[j].length = 0; // faster than values[j] = []
|
|
414
1016
|
values[j].hasNulls = false;
|
|
415
1017
|
}
|
|
@@ -432,448 +1034,138 @@
|
|
|
432
1034
|
i : series.cropStart + i),
|
|
433
1035
|
point = (data && data[index]) ||
|
|
434
1036
|
series.pointClass.prototype.applyOptions.apply({
|
|
435
|
-
series: series
|
|
436
|
-
},
|
|
437
|
-
[dataOptions[index]])
|
|
438
|
-
|
|
439
|
-
for (j = 0; j < pointArrayMapLength; j++) {
|
|
440
|
-
val = point[pointArrayMap[j]];
|
|
441
|
-
if (isNumber(val)) {
|
|
442
|
-
values[j].push(val);
|
|
443
|
-
}
|
|
444
|
-
else if (val === null) {
|
|
445
|
-
values[j].hasNulls = true;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
else {
|
|
450
|
-
pointY = handleYData ? yData[i] : null;
|
|
451
|
-
if (isNumber(pointY)) {
|
|
452
|
-
values[0].push(pointY);
|
|
453
|
-
}
|
|
454
|
-
else if (pointY === null) {
|
|
455
|
-
values[0].hasNulls = true;
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
return {
|
|
460
|
-
groupedXData: groupedXData,
|
|
461
|
-
groupedYData: groupedYData,
|
|
462
|
-
groupMap: groupMap
|
|
463
|
-
};
|
|
464
|
-
};
|
|
465
|
-
var anchorPoints = function (series,
|
|
466
|
-
groupedXData,
|
|
467
|
-
xMax) {
|
|
468
|
-
var options = series.options,
|
|
469
|
-
dataGroupingOptions = options.dataGrouping,
|
|
470
|
-
totalRange = (series.currentDataGrouping && series.currentDataGrouping.gapSize);
|
|
471
|
-
var i;
|
|
472
|
-
// DataGrouping x-coordinates.
|
|
473
|
-
if (dataGroupingOptions && series.xData && totalRange && series.groupMap) {
|
|
474
|
-
var groupedDataLength = groupedXData.length - 1,
|
|
475
|
-
anchor = dataGroupingOptions.anchor,
|
|
476
|
-
firstAnchor = pick(dataGroupingOptions.firstAnchor,
|
|
477
|
-
anchor),
|
|
478
|
-
lastAnchor = pick(dataGroupingOptions.lastAnchor,
|
|
479
|
-
anchor);
|
|
480
|
-
// Anchor points that are not extremes.
|
|
481
|
-
if (anchor && anchor !== 'start') {
|
|
482
|
-
var shiftInterval = (totalRange *
|
|
483
|
-
{ middle: 0.5,
|
|
484
|
-
end: 1 }[anchor]);
|
|
485
|
-
i = groupedXData.length - 1;
|
|
486
|
-
while (i-- && i > 0) {
|
|
487
|
-
groupedXData[i] += shiftInterval;
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
// Change the first point position, but only when it is
|
|
491
|
-
// the first point in the data set not in the current zoom.
|
|
492
|
-
if (firstAnchor &&
|
|
493
|
-
firstAnchor !== 'start' &&
|
|
494
|
-
series.xData[0] >= groupedXData[0]) {
|
|
495
|
-
var groupStart = series.groupMap[0].start,
|
|
496
|
-
groupLength = series.groupMap[0].length;
|
|
497
|
-
var firstGroupstEnd = void 0;
|
|
498
|
-
if (isNumber(groupStart) && isNumber(groupLength)) {
|
|
499
|
-
firstGroupstEnd = groupStart + (groupLength - 1);
|
|
500
|
-
}
|
|
501
|
-
groupedXData[0] = {
|
|
502
|
-
middle: groupedXData[0] + 0.5 * totalRange,
|
|
503
|
-
end: groupedXData[0] + totalRange,
|
|
504
|
-
firstPoint: series.xData[0],
|
|
505
|
-
lastPoint: firstGroupstEnd && series.xData[firstGroupstEnd]
|
|
506
|
-
}[firstAnchor];
|
|
507
|
-
}
|
|
508
|
-
// Change the last point position but only when it is
|
|
509
|
-
// the last point in the data set not in the current zoom.
|
|
510
|
-
if (lastAnchor &&
|
|
511
|
-
lastAnchor !== 'start' &&
|
|
512
|
-
totalRange &&
|
|
513
|
-
groupedXData[groupedDataLength] >= xMax - totalRange) {
|
|
514
|
-
var lastGroupStart = series.groupMap[series.groupMap.length - 1].start;
|
|
515
|
-
groupedXData[groupedDataLength] = {
|
|
516
|
-
middle: groupedXData[groupedDataLength] + 0.5 * totalRange,
|
|
517
|
-
end: groupedXData[groupedDataLength] + totalRange,
|
|
518
|
-
firstPoint: lastGroupStart && series.xData[lastGroupStart],
|
|
519
|
-
lastPoint: series.xData[series.xData.length - 1]
|
|
520
|
-
}[lastAnchor];
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
};
|
|
524
|
-
var adjustExtremes = function (xAxis,
|
|
525
|
-
groupedXData) {
|
|
526
|
-
// Make sure the X axis extends to show the first group (#2533)
|
|
527
|
-
// But only for visible series (#5493, #6393)
|
|
528
|
-
if (defined(groupedXData[0]) &&
|
|
529
|
-
isNumber(xAxis.min) &&
|
|
530
|
-
isNumber(xAxis.dataMin) &&
|
|
531
|
-
groupedXData[0] < xAxis.min) {
|
|
532
|
-
if ((!defined(xAxis.options.min) &&
|
|
533
|
-
xAxis.min <= xAxis.dataMin) ||
|
|
534
|
-
xAxis.min === xAxis.dataMin) {
|
|
535
|
-
xAxis.min = Math.min(groupedXData[0],
|
|
536
|
-
xAxis.min);
|
|
537
|
-
}
|
|
538
|
-
xAxis.dataMin = Math.min(groupedXData[0], xAxis.dataMin);
|
|
539
|
-
}
|
|
540
|
-
// When the last anchor set, change the extremes that
|
|
541
|
-
// the last point is visible (#12455).
|
|
542
|
-
if (defined(groupedXData[groupedXData.length - 1]) &&
|
|
543
|
-
isNumber(xAxis.max) &&
|
|
544
|
-
isNumber(xAxis.dataMax) &&
|
|
545
|
-
groupedXData[groupedXData.length - 1] > xAxis.max) {
|
|
546
|
-
if ((!defined(xAxis.options.max) &&
|
|
547
|
-
isNumber(xAxis.dataMax) &&
|
|
548
|
-
xAxis.max >= xAxis.dataMax) || xAxis.max === xAxis.dataMax) {
|
|
549
|
-
xAxis.max = Math.max(groupedXData[groupedXData.length - 1], xAxis.max);
|
|
550
|
-
}
|
|
551
|
-
xAxis.dataMax = Math.max(groupedXData[groupedXData.length - 1], xAxis.dataMax);
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
var dataGrouping = {
|
|
555
|
-
approximations: approximations,
|
|
556
|
-
groupData: groupData
|
|
557
|
-
};
|
|
558
|
-
// -----------------------------------------------------------------------------
|
|
559
|
-
// The following code applies to implementation of data grouping on a Series
|
|
560
|
-
var baseProcessData = seriesProto.processData, baseGeneratePoints = seriesProto.generatePoints,
|
|
561
|
-
/** @ignore */
|
|
562
|
-
commonOptions = {
|
|
563
|
-
// enabled: null, // (true for stock charts, false for basic),
|
|
564
|
-
// forced: undefined,
|
|
565
|
-
groupPixelWidth: 2,
|
|
566
|
-
// the first one is the point or start value, the second is the start
|
|
567
|
-
// value if we're dealing with range, the third one is the end value if
|
|
568
|
-
// dealing with a range
|
|
569
|
-
dateTimeLabelFormats: {
|
|
570
|
-
millisecond: [
|
|
571
|
-
'%A, %b %e, %H:%M:%S.%L',
|
|
572
|
-
'%A, %b %e, %H:%M:%S.%L',
|
|
573
|
-
'-%H:%M:%S.%L'
|
|
574
|
-
],
|
|
575
|
-
second: [
|
|
576
|
-
'%A, %b %e, %H:%M:%S',
|
|
577
|
-
'%A, %b %e, %H:%M:%S',
|
|
578
|
-
'-%H:%M:%S'
|
|
579
|
-
],
|
|
580
|
-
minute: [
|
|
581
|
-
'%A, %b %e, %H:%M',
|
|
582
|
-
'%A, %b %e, %H:%M',
|
|
583
|
-
'-%H:%M'
|
|
584
|
-
],
|
|
585
|
-
hour: [
|
|
586
|
-
'%A, %b %e, %H:%M',
|
|
587
|
-
'%A, %b %e, %H:%M',
|
|
588
|
-
'-%H:%M'
|
|
589
|
-
],
|
|
590
|
-
day: [
|
|
591
|
-
'%A, %b %e, %Y',
|
|
592
|
-
'%A, %b %e',
|
|
593
|
-
'-%A, %b %e, %Y'
|
|
594
|
-
],
|
|
595
|
-
week: [
|
|
596
|
-
'Week from %A, %b %e, %Y',
|
|
597
|
-
'%A, %b %e',
|
|
598
|
-
'-%A, %b %e, %Y'
|
|
599
|
-
],
|
|
600
|
-
month: [
|
|
601
|
-
'%B %Y',
|
|
602
|
-
'%B',
|
|
603
|
-
'-%B %Y'
|
|
604
|
-
],
|
|
605
|
-
year: [
|
|
606
|
-
'%Y',
|
|
607
|
-
'%Y',
|
|
608
|
-
'-%Y'
|
|
609
|
-
]
|
|
610
|
-
}
|
|
611
|
-
// smoothed = false, // enable this for navigator series only
|
|
612
|
-
}, specificOptions = {
|
|
613
|
-
line: {},
|
|
614
|
-
spline: {},
|
|
615
|
-
area: {},
|
|
616
|
-
areaspline: {},
|
|
617
|
-
arearange: {},
|
|
618
|
-
column: {
|
|
619
|
-
groupPixelWidth: 10
|
|
620
|
-
},
|
|
621
|
-
columnrange: {
|
|
622
|
-
groupPixelWidth: 10
|
|
623
|
-
},
|
|
624
|
-
candlestick: {
|
|
625
|
-
groupPixelWidth: 10
|
|
626
|
-
},
|
|
627
|
-
ohlc: {
|
|
628
|
-
groupPixelWidth: 5
|
|
629
|
-
},
|
|
630
|
-
hlc: {
|
|
631
|
-
groupPixelWidth: 5
|
|
632
|
-
// Move to HeikinAshiSeries.ts aftre refactoring data grouping.
|
|
633
|
-
},
|
|
634
|
-
heikinashi: {
|
|
635
|
-
groupPixelWidth: 10
|
|
1037
|
+
series: series
|
|
1038
|
+
},
|
|
1039
|
+
[dataOptions[index]]);
|
|
1040
|
+
var val = void 0;
|
|
1041
|
+
for (var j = 0; j < pointArrayMapLength; j++) {
|
|
1042
|
+
val = point[pointArrayMap[j]];
|
|
1043
|
+
if (isNumber(val)) {
|
|
1044
|
+
values[j].push(val);
|
|
1045
|
+
}
|
|
1046
|
+
else if (val === null) {
|
|
1047
|
+
values[j].hasNulls = true;
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
else {
|
|
1052
|
+
pointY = handleYData ? yData[i] : null;
|
|
1053
|
+
if (isNumber(pointY)) {
|
|
1054
|
+
values[0].push(pointY);
|
|
1055
|
+
}
|
|
1056
|
+
else if (pointY === null) {
|
|
1057
|
+
values[0].hasNulls = true;
|
|
1058
|
+
}
|
|
636
1059
|
}
|
|
637
|
-
},
|
|
638
|
-
// units are defined in a separate array to allow complete overriding in
|
|
639
|
-
// case of a user option
|
|
640
|
-
defaultDataGroupingUnits = H.defaultDataGroupingUnits = [
|
|
641
|
-
[
|
|
642
|
-
'millisecond',
|
|
643
|
-
[1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
|
|
644
|
-
], [
|
|
645
|
-
'second',
|
|
646
|
-
[1, 2, 5, 10, 15, 30]
|
|
647
|
-
], [
|
|
648
|
-
'minute',
|
|
649
|
-
[1, 2, 5, 10, 15, 30]
|
|
650
|
-
], [
|
|
651
|
-
'hour',
|
|
652
|
-
[1, 2, 3, 4, 6, 8, 12]
|
|
653
|
-
], [
|
|
654
|
-
'day',
|
|
655
|
-
[1]
|
|
656
|
-
], [
|
|
657
|
-
'week',
|
|
658
|
-
[1]
|
|
659
|
-
], [
|
|
660
|
-
'month',
|
|
661
|
-
[1, 3, 6]
|
|
662
|
-
], [
|
|
663
|
-
'year',
|
|
664
|
-
null
|
|
665
|
-
]
|
|
666
|
-
];
|
|
667
|
-
// Set default approximations to the prototypes if present. Properties are
|
|
668
|
-
// inherited down. Can be overridden for individual series types.
|
|
669
|
-
seriesProto.getDGApproximation = function () {
|
|
670
|
-
if (this.is('arearange')) {
|
|
671
|
-
return 'range';
|
|
672
|
-
}
|
|
673
|
-
if (this.is('ohlc')) {
|
|
674
|
-
return 'ohlc';
|
|
675
|
-
}
|
|
676
|
-
if (this.is('hlc')) {
|
|
677
|
-
return 'hlc';
|
|
678
1060
|
}
|
|
679
|
-
|
|
680
|
-
|
|
1061
|
+
return {
|
|
1062
|
+
groupedXData: groupedXData,
|
|
1063
|
+
groupedYData: groupedYData,
|
|
1064
|
+
groupMap: groupMap
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* Handle default options for data grouping. This must be set at runtime because
|
|
1069
|
+
* some series types are defined after this.
|
|
1070
|
+
* @private
|
|
1071
|
+
*/
|
|
1072
|
+
function onAfterSetOptions(e) {
|
|
1073
|
+
var options = e.options,
|
|
1074
|
+
type = this.type,
|
|
1075
|
+
plotOptions = this.chart.options.plotOptions,
|
|
1076
|
+
// External series, for example technical indicators should also inherit
|
|
1077
|
+
// commonOptions which are not available outside this module
|
|
1078
|
+
baseOptions = (this.useCommonDataGrouping &&
|
|
1079
|
+
DataGroupingDefaults.common),
|
|
1080
|
+
seriesSpecific = DataGroupingDefaults.seriesSpecific;
|
|
1081
|
+
var defaultOptions = D.defaultOptions.plotOptions[type].dataGrouping;
|
|
1082
|
+
if (plotOptions && (seriesSpecific[type] || baseOptions)) { // #1284
|
|
1083
|
+
var rangeSelector = this.chart.rangeSelector;
|
|
1084
|
+
if (!defaultOptions) {
|
|
1085
|
+
defaultOptions = merge(DataGroupingDefaults.common, seriesSpecific[type]);
|
|
1086
|
+
}
|
|
1087
|
+
options.dataGrouping = merge(baseOptions, defaultOptions, plotOptions.series && plotOptions.series.dataGrouping, // #1228
|
|
1088
|
+
// Set by the StockChart constructor:
|
|
1089
|
+
plotOptions[type].dataGrouping, this.userOptions.dataGrouping, !options.isInternal &&
|
|
1090
|
+
rangeSelector &&
|
|
1091
|
+
isNumber(rangeSelector.selected) &&
|
|
1092
|
+
rangeSelector.buttonOptions[rangeSelector.selected].dataGrouping);
|
|
681
1093
|
}
|
|
682
|
-
|
|
683
|
-
};
|
|
1094
|
+
}
|
|
684
1095
|
/**
|
|
685
|
-
* Takes parallel arrays of x and y data and groups the data into intervals
|
|
686
|
-
* defined by groupPositions, a collection of starting x values for each group.
|
|
687
|
-
*
|
|
688
1096
|
* @private
|
|
689
|
-
|
|
1097
|
+
*/
|
|
1098
|
+
function skipDataGrouping(series, force) {
|
|
1099
|
+
return !(series.isCartesian &&
|
|
1100
|
+
!series.isDirty &&
|
|
1101
|
+
!series.xAxis.isDirty &&
|
|
1102
|
+
!series.yAxis.isDirty &&
|
|
1103
|
+
!force);
|
|
1104
|
+
}
|
|
1105
|
+
/* *
|
|
690
1106
|
*
|
|
691
|
-
*
|
|
1107
|
+
* Default Export
|
|
692
1108
|
*
|
|
693
|
-
*
|
|
1109
|
+
* */
|
|
1110
|
+
var DataGroupingSeriesComposition = {
|
|
1111
|
+
compose: compose,
|
|
1112
|
+
groupData: groupData
|
|
1113
|
+
};
|
|
1114
|
+
|
|
1115
|
+
return DataGroupingSeriesComposition;
|
|
1116
|
+
});
|
|
1117
|
+
_registerModule(_modules, 'Extensions/DataGrouping/DataGrouping.js', [_modules['Extensions/DataGrouping/DataGroupingAxisComposition.js'], _modules['Extensions/DataGrouping/DataGroupingDefaults.js'], _modules['Extensions/DataGrouping/DataGroupingSeriesComposition.js'], _modules['Core/FormatUtilities.js'], _modules['Core/Utilities.js']], function (DataGroupingAxisComposition, DataGroupingDefaults, DataGroupingSeriesComposition, F, U) {
|
|
1118
|
+
/* *
|
|
694
1119
|
*
|
|
695
|
-
*
|
|
1120
|
+
* (c) 2010-2021 Torstein Honsi
|
|
696
1121
|
*
|
|
697
|
-
*
|
|
1122
|
+
* License: www.highcharts.com/license
|
|
698
1123
|
*
|
|
699
|
-
*
|
|
700
|
-
*/
|
|
701
|
-
seriesProto.groupData = groupData;
|
|
702
|
-
/**
|
|
703
|
-
* For the processed data, calculate the grouped data if needed.
|
|
1124
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
704
1125
|
*
|
|
705
|
-
*
|
|
706
|
-
|
|
1126
|
+
* */
|
|
1127
|
+
var format = F.format;
|
|
1128
|
+
var addEvent = U.addEvent,
|
|
1129
|
+
extend = U.extend,
|
|
1130
|
+
isNumber = U.isNumber;
|
|
1131
|
+
/* *
|
|
707
1132
|
*
|
|
708
|
-
*
|
|
709
|
-
*/
|
|
710
|
-
seriesProto.applyGrouping = applyGrouping;
|
|
711
|
-
// Destroy the grouped data points. #622, #740
|
|
712
|
-
seriesProto.destroyGroupedData = function () {
|
|
713
|
-
// Clear previous groups
|
|
714
|
-
if (this.groupedData) {
|
|
715
|
-
this.groupedData.forEach(function (point, i) {
|
|
716
|
-
if (point) {
|
|
717
|
-
this.groupedData[i] = point.destroy ?
|
|
718
|
-
point.destroy() : null;
|
|
719
|
-
}
|
|
720
|
-
}, this);
|
|
721
|
-
// Clears all:
|
|
722
|
-
// - `this.groupedData`
|
|
723
|
-
// - `this.points`
|
|
724
|
-
// - `preserve` object in series.update()
|
|
725
|
-
this.groupedData.length = 0;
|
|
726
|
-
}
|
|
727
|
-
};
|
|
728
|
-
// Override the generatePoints method by adding a reference to grouped data
|
|
729
|
-
seriesProto.generatePoints = function () {
|
|
730
|
-
baseGeneratePoints.apply(this);
|
|
731
|
-
// Record grouped data in order to let it be destroyed the next time
|
|
732
|
-
// processData runs
|
|
733
|
-
this.destroyGroupedData(); // #622
|
|
734
|
-
this.groupedData = this.hasGroupedData ? this.points : null;
|
|
735
|
-
};
|
|
736
|
-
/**
|
|
737
|
-
* Check the groupPixelWidth and apply the grouping if needed.
|
|
738
|
-
* Fired only after processing the data.
|
|
1133
|
+
* Constants
|
|
739
1134
|
*
|
|
740
|
-
*
|
|
1135
|
+
* */
|
|
1136
|
+
var composedMembers = [];
|
|
1137
|
+
/* *
|
|
741
1138
|
*
|
|
742
|
-
*
|
|
1139
|
+
* Functions
|
|
1140
|
+
*
|
|
1141
|
+
* */
|
|
1142
|
+
/**
|
|
1143
|
+
* @private
|
|
743
1144
|
*/
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
});
|
|
751
|
-
series.forEach(function (series) {
|
|
752
|
-
series.groupPixelWidth = (axis.getGroupPixelWidth &&
|
|
753
|
-
axis.getGroupPixelWidth());
|
|
754
|
-
if (series.groupPixelWidth) {
|
|
755
|
-
series.hasProcessed = true; // #2692
|
|
756
|
-
}
|
|
757
|
-
// Fire independing on series.groupPixelWidth to always set a proper
|
|
758
|
-
// dataGrouping state, (#16238)
|
|
759
|
-
series.applyGrouping(!!e.hasExtemesChanged);
|
|
760
|
-
});
|
|
761
|
-
};
|
|
762
|
-
// Get the data grouping pixel width based on the greatest defined individual
|
|
763
|
-
// width of the axis' series, and if whether one of the axes need grouping.
|
|
764
|
-
Axis.prototype.getGroupPixelWidth = function () {
|
|
765
|
-
var series = this.series,
|
|
766
|
-
len = series.length,
|
|
767
|
-
i,
|
|
768
|
-
groupPixelWidth = 0,
|
|
769
|
-
doGrouping = false,
|
|
770
|
-
dataLength,
|
|
771
|
-
dgOptions;
|
|
772
|
-
// If multiple series are compared on the same x axis, give them the same
|
|
773
|
-
// group pixel width (#334)
|
|
774
|
-
i = len;
|
|
775
|
-
while (i--) {
|
|
776
|
-
dgOptions = series[i].options.dataGrouping;
|
|
777
|
-
if (dgOptions) {
|
|
778
|
-
groupPixelWidth = Math.max(groupPixelWidth,
|
|
779
|
-
// Fallback to commonOptions (#9693)
|
|
780
|
-
pick(dgOptions.groupPixelWidth, commonOptions.groupPixelWidth));
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
// If one of the series needs grouping, apply it to all (#1634)
|
|
784
|
-
i = len;
|
|
785
|
-
while (i--) {
|
|
786
|
-
dgOptions = series[i].options.dataGrouping;
|
|
787
|
-
if (dgOptions) { // #2692
|
|
788
|
-
dataLength = (series[i].processedXData || series[i].data).length;
|
|
789
|
-
// Execute grouping if the amount of points is greater than the
|
|
790
|
-
// limit defined in groupPixelWidth
|
|
791
|
-
if (series[i].groupPixelWidth ||
|
|
792
|
-
(dataLength >
|
|
793
|
-
(this.chart.plotSizeX / groupPixelWidth)) ||
|
|
794
|
-
(dataLength && dgOptions.forced)) {
|
|
795
|
-
doGrouping = true;
|
|
796
|
-
}
|
|
797
|
-
}
|
|
1145
|
+
function compose(AxisClass, SeriesClass, TooltipClass) {
|
|
1146
|
+
DataGroupingAxisComposition.compose(AxisClass);
|
|
1147
|
+
DataGroupingSeriesComposition.compose(SeriesClass);
|
|
1148
|
+
if (composedMembers.indexOf(TooltipClass) === -1) {
|
|
1149
|
+
composedMembers.push(TooltipClass);
|
|
1150
|
+
addEvent(TooltipClass, 'headerFormatter', onTooltipHeaderFormatter);
|
|
798
1151
|
}
|
|
799
|
-
|
|
800
|
-
};
|
|
1152
|
+
}
|
|
801
1153
|
/**
|
|
802
|
-
*
|
|
803
|
-
*
|
|
804
|
-
* @
|
|
805
|
-
*
|
|
806
|
-
* @function Highcharts.Axis#setDataGrouping
|
|
807
|
-
*
|
|
808
|
-
* @param {boolean|Highcharts.DataGroupingOptionsObject} [dataGrouping]
|
|
809
|
-
* A `dataGrouping` configuration. Use `false` to disable data grouping
|
|
810
|
-
* dynamically.
|
|
811
|
-
*
|
|
812
|
-
* @param {boolean} [redraw=true]
|
|
813
|
-
* Whether to redraw the chart or wait for a later call to
|
|
814
|
-
* {@link Chart#redraw}.
|
|
1154
|
+
* Extend the original method, make the tooltip's header reflect the grouped
|
|
1155
|
+
* range.
|
|
1156
|
+
* @private
|
|
815
1157
|
*/
|
|
816
|
-
|
|
817
|
-
var
|
|
818
|
-
var i;
|
|
819
|
-
redraw = pick(redraw, true);
|
|
820
|
-
if (!dataGrouping) {
|
|
821
|
-
dataGrouping = {
|
|
822
|
-
forced: false,
|
|
823
|
-
units: null
|
|
824
|
-
};
|
|
825
|
-
}
|
|
826
|
-
// Axis is instantiated, update all series
|
|
827
|
-
if (this instanceof Axis) {
|
|
828
|
-
i = this.series.length;
|
|
829
|
-
while (i--) {
|
|
830
|
-
this.series[i].update({
|
|
831
|
-
dataGrouping: dataGrouping
|
|
832
|
-
}, false);
|
|
833
|
-
}
|
|
834
|
-
// Axis not yet instanciated, alter series options
|
|
835
|
-
}
|
|
836
|
-
else {
|
|
837
|
-
this.chart.options.series.forEach(function (seriesOptions) {
|
|
838
|
-
// Merging dataGrouping options with already defined options #16759
|
|
839
|
-
seriesOptions.dataGrouping = typeof dataGrouping === 'boolean' ?
|
|
840
|
-
dataGrouping :
|
|
841
|
-
merge(dataGrouping, seriesOptions.dataGrouping);
|
|
842
|
-
});
|
|
843
|
-
}
|
|
844
|
-
// Clear ordinal slope, so we won't accidentaly use the old one (#7827)
|
|
845
|
-
if (axis.ordinal) {
|
|
846
|
-
axis.ordinal.slope = void 0;
|
|
847
|
-
}
|
|
848
|
-
if (redraw) {
|
|
849
|
-
this.chart.redraw();
|
|
850
|
-
}
|
|
851
|
-
};
|
|
852
|
-
// When all series are processed, calculate the group pixel width and then
|
|
853
|
-
// if this value is different than zero apply groupings.
|
|
854
|
-
addEvent(Axis, 'postProcessData', Axis.prototype.applyGrouping);
|
|
855
|
-
// Override point prototype to throw a warning when trying to update grouped
|
|
856
|
-
// points.
|
|
857
|
-
addEvent(Point, 'update', function () {
|
|
858
|
-
if (this.dataGroup) {
|
|
859
|
-
error(24, false, this.series.chart);
|
|
860
|
-
return false;
|
|
861
|
-
}
|
|
862
|
-
});
|
|
863
|
-
// Extend the original method, make the tooltip's header reflect the grouped
|
|
864
|
-
// range.
|
|
865
|
-
addEvent(Tooltip, 'headerFormatter', function (e) {
|
|
866
|
-
var tooltip = this,
|
|
867
|
-
chart = this.chart,
|
|
1158
|
+
function onTooltipHeaderFormatter(e) {
|
|
1159
|
+
var chart = this.chart,
|
|
868
1160
|
time = chart.time,
|
|
869
1161
|
labelConfig = e.labelConfig,
|
|
870
1162
|
series = labelConfig.series,
|
|
871
1163
|
options = series.options,
|
|
872
1164
|
tooltipOptions = series.tooltipOptions,
|
|
873
1165
|
dataGroupingOptions = options.dataGrouping,
|
|
874
|
-
|
|
1166
|
+
xAxis = series.xAxis;
|
|
1167
|
+
var xDateFormat = tooltipOptions.xDateFormat,
|
|
875
1168
|
xDateFormatEnd,
|
|
876
|
-
xAxis = series.xAxis,
|
|
877
1169
|
currentDataGrouping,
|
|
878
1170
|
dateTimeLabelFormats,
|
|
879
1171
|
labelFormats,
|
|
@@ -888,7 +1180,7 @@
|
|
|
888
1180
|
currentDataGrouping = series.currentDataGrouping;
|
|
889
1181
|
dateTimeLabelFormats = dataGroupingOptions.dateTimeLabelFormats ||
|
|
890
1182
|
// Fallback to commonOptions (#9693)
|
|
891
|
-
|
|
1183
|
+
DataGroupingDefaults.common.dateTimeLabelFormats;
|
|
892
1184
|
// if we have grouped data, use the grouping information to get the
|
|
893
1185
|
// right format
|
|
894
1186
|
if (currentDataGrouping) {
|
|
@@ -924,47 +1216,16 @@
|
|
|
924
1216
|
}, chart);
|
|
925
1217
|
e.preventDefault();
|
|
926
1218
|
}
|
|
927
|
-
}
|
|
928
|
-
// Destroy grouped data on series destroy
|
|
929
|
-
addEvent(Series, 'destroy', seriesProto.destroyGroupedData);
|
|
930
|
-
// Handle default options for data grouping. This must be set at runtime because
|
|
931
|
-
// some series types are defined after this.
|
|
932
|
-
addEvent(Series, 'afterSetOptions', function (e) {
|
|
933
|
-
var options = e.options,
|
|
934
|
-
type = this.type,
|
|
935
|
-
plotOptions = this.chart.options.plotOptions,
|
|
936
|
-
defaultOptions = D.defaultOptions.plotOptions[type].dataGrouping,
|
|
937
|
-
// External series, for example technical indicators should also inherit
|
|
938
|
-
// commonOptions which are not available outside this module
|
|
939
|
-
baseOptions = (this.useCommonDataGrouping && commonOptions);
|
|
940
|
-
if (plotOptions && (specificOptions[type] || baseOptions)) { // #1284
|
|
941
|
-
if (!defaultOptions) {
|
|
942
|
-
defaultOptions = merge(commonOptions, specificOptions[type]);
|
|
943
|
-
}
|
|
944
|
-
var rangeSelector = this.chart.rangeSelector;
|
|
945
|
-
options.dataGrouping = merge(baseOptions, defaultOptions, plotOptions.series && plotOptions.series.dataGrouping, // #1228
|
|
946
|
-
// Set by the StockChart constructor:
|
|
947
|
-
plotOptions[type].dataGrouping, this.userOptions.dataGrouping, !options.isInternal &&
|
|
948
|
-
rangeSelector &&
|
|
949
|
-
isNumber(rangeSelector.selected) &&
|
|
950
|
-
rangeSelector.buttonOptions[rangeSelector.selected].dataGrouping);
|
|
951
|
-
}
|
|
952
|
-
});
|
|
953
|
-
// When resetting the scale reset the hasProccessed flag to avoid taking
|
|
954
|
-
// previous data grouping of neighbour series into accound when determining
|
|
955
|
-
// group pixel width (#2692).
|
|
956
|
-
addEvent(Axis, 'afterSetScale', function () {
|
|
957
|
-
this.series.forEach(function (series) {
|
|
958
|
-
series.hasProcessed = false;
|
|
959
|
-
});
|
|
960
|
-
});
|
|
1219
|
+
}
|
|
961
1220
|
/* *
|
|
962
1221
|
*
|
|
963
1222
|
* Default Export
|
|
964
1223
|
*
|
|
965
1224
|
* */
|
|
966
|
-
|
|
967
|
-
|
|
1225
|
+
var DataGroupingComposition = {
|
|
1226
|
+
compose: compose,
|
|
1227
|
+
groupData: DataGroupingSeriesComposition.groupData
|
|
1228
|
+
};
|
|
968
1229
|
/* *
|
|
969
1230
|
*
|
|
970
1231
|
* API Declarations
|
|
@@ -998,6 +1259,21 @@
|
|
|
998
1259
|
* @name Highcharts.DataGroupingInfoObject#start
|
|
999
1260
|
* @type {number}
|
|
1000
1261
|
*/
|
|
1262
|
+
/**
|
|
1263
|
+
* Highcharts Stock only.
|
|
1264
|
+
*
|
|
1265
|
+
* @product highstock
|
|
1266
|
+
* @interface Highcharts.DataGroupingResultObject
|
|
1267
|
+
*/ /**
|
|
1268
|
+
* @name Highcharts.DataGroupingResultObject#groupedXData
|
|
1269
|
+
* @type {Array<number>}
|
|
1270
|
+
*/ /**
|
|
1271
|
+
* @name Highcharts.DataGroupingResultObject#groupedYData
|
|
1272
|
+
* @type {Array<(number|null|undefined)>|Array<Array<(number|null|undefined)>>}
|
|
1273
|
+
*/ /**
|
|
1274
|
+
* @name Highcharts.DataGroupingResultObject#groupMap
|
|
1275
|
+
* @type {Array<DataGroupingInfoObject>}
|
|
1276
|
+
*/
|
|
1001
1277
|
/**
|
|
1002
1278
|
* Highcharts Stock only. If a point object is created by data
|
|
1003
1279
|
* grouping, it doesn't reflect actual points in the raw
|
|
@@ -1317,11 +1593,16 @@
|
|
|
1317
1593
|
*/
|
|
1318
1594
|
''; // required by JSDoc parsing
|
|
1319
1595
|
|
|
1320
|
-
return
|
|
1596
|
+
return DataGroupingComposition;
|
|
1321
1597
|
});
|
|
1322
|
-
_registerModule(_modules, 'masters/modules/datagrouping.src.js', [_modules['Extensions/DataGrouping.js']], function (
|
|
1598
|
+
_registerModule(_modules, 'masters/modules/datagrouping.src.js', [_modules['Core/Globals.js'], _modules['Extensions/DataGrouping/ApproximationDefaults.js'], _modules['Extensions/DataGrouping/ApproximationRegistry.js'], _modules['Extensions/DataGrouping/DataGrouping.js']], function (Highcharts, ApproximationDefaults, ApproximationRegistry, DataGrouping) {
|
|
1323
1599
|
|
|
1600
|
+
var G = Highcharts;
|
|
1601
|
+
G.dataGrouping = {
|
|
1602
|
+
approximationDefaults: ApproximationDefaults,
|
|
1603
|
+
approximations: ApproximationRegistry
|
|
1604
|
+
};
|
|
1605
|
+
DataGrouping.compose(G.Axis, G.Series, G.Tooltip);
|
|
1324
1606
|
|
|
1325
|
-
return dataGrouping;
|
|
1326
1607
|
});
|
|
1327
1608
|
}));
|