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,1177 +0,0 @@
|
|
|
1
|
-
/* *
|
|
2
|
-
*
|
|
3
|
-
* (c) 2010-2021 Torstein Honsi
|
|
4
|
-
*
|
|
5
|
-
* License: www.highcharts.com/license
|
|
6
|
-
*
|
|
7
|
-
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
8
|
-
*
|
|
9
|
-
* */
|
|
10
|
-
'use strict';
|
|
11
|
-
import Axis from '../Core/Axis/Axis.js';
|
|
12
|
-
import DateTimeAxis from '../Core/Axis/DateTimeAxis.js';
|
|
13
|
-
import F from '../Core/FormatUtilities.js';
|
|
14
|
-
var format = F.format;
|
|
15
|
-
import H from '../Core/Globals.js';
|
|
16
|
-
import Point from '../Core/Series/Point.js';
|
|
17
|
-
import Series from '../Core/Series/Series.js';
|
|
18
|
-
var seriesProto = Series.prototype;
|
|
19
|
-
import Tooltip from '../Core/Tooltip.js';
|
|
20
|
-
import D from '../Core/DefaultOptions.js';
|
|
21
|
-
import U from '../Core/Utilities.js';
|
|
22
|
-
var addEvent = U.addEvent, arrayMax = U.arrayMax, arrayMin = U.arrayMin, correctFloat = U.correctFloat, defined = U.defined, error = U.error, extend = U.extend, isNumber = U.isNumber, merge = U.merge, pick = U.pick;
|
|
23
|
-
import '../Core/Axis/Axis.js';
|
|
24
|
-
/* ************************************************************************** *
|
|
25
|
-
* Start data grouping module *
|
|
26
|
-
* ************************************************************************** */
|
|
27
|
-
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
28
|
-
/**
|
|
29
|
-
* Define the available approximation types. The data grouping
|
|
30
|
-
* approximations takes an array or numbers as the first parameter. In case
|
|
31
|
-
* of ohlc, four arrays are sent in as four parameters. Each array consists
|
|
32
|
-
* only of numbers. In case null values belong to the group, the property
|
|
33
|
-
* .hasNulls will be set to true on the array.
|
|
34
|
-
*
|
|
35
|
-
* @product highstock
|
|
36
|
-
*
|
|
37
|
-
* @private
|
|
38
|
-
* @name Highcharts.approximations
|
|
39
|
-
* @type {Highcharts.Dictionary<Function>}
|
|
40
|
-
*/
|
|
41
|
-
var approximations = H.approximations = {
|
|
42
|
-
sum: function (arr) {
|
|
43
|
-
var len = arr.length, ret;
|
|
44
|
-
// 1. it consists of nulls exclusive
|
|
45
|
-
if (!len && arr.hasNulls) {
|
|
46
|
-
ret = null;
|
|
47
|
-
// 2. it has a length and real values
|
|
48
|
-
}
|
|
49
|
-
else if (len) {
|
|
50
|
-
ret = 0;
|
|
51
|
-
while (len--) {
|
|
52
|
-
ret += arr[len];
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
// 3. it has zero length, so just return undefined
|
|
56
|
-
// => doNothing()
|
|
57
|
-
return ret;
|
|
58
|
-
},
|
|
59
|
-
average: function (arr) {
|
|
60
|
-
var len = arr.length, ret = approximations.sum(arr);
|
|
61
|
-
// If we have a number, return it divided by the length. If not,
|
|
62
|
-
// return null or undefined based on what the sum method finds.
|
|
63
|
-
if (isNumber(ret) && len) {
|
|
64
|
-
ret = correctFloat(ret / len);
|
|
65
|
-
}
|
|
66
|
-
return ret;
|
|
67
|
-
},
|
|
68
|
-
// The same as average, but for series with multiple values, like area
|
|
69
|
-
// ranges.
|
|
70
|
-
averages: function () {
|
|
71
|
-
var ret = [];
|
|
72
|
-
[].forEach.call(arguments, function (arr) {
|
|
73
|
-
ret.push(approximations.average(arr));
|
|
74
|
-
});
|
|
75
|
-
// Return undefined when first elem. is undefined and let
|
|
76
|
-
// sum method handle null (#7377)
|
|
77
|
-
return typeof ret[0] === 'undefined' ? void 0 : ret;
|
|
78
|
-
},
|
|
79
|
-
open: function (arr) {
|
|
80
|
-
return arr.length ? arr[0] : (arr.hasNulls ? null : void 0);
|
|
81
|
-
},
|
|
82
|
-
high: function (arr) {
|
|
83
|
-
return arr.length ?
|
|
84
|
-
arrayMax(arr) :
|
|
85
|
-
(arr.hasNulls ? null : void 0);
|
|
86
|
-
},
|
|
87
|
-
low: function (arr) {
|
|
88
|
-
return arr.length ?
|
|
89
|
-
arrayMin(arr) :
|
|
90
|
-
(arr.hasNulls ? null : void 0);
|
|
91
|
-
},
|
|
92
|
-
close: function (arr) {
|
|
93
|
-
return arr.length ?
|
|
94
|
-
arr[arr.length - 1] :
|
|
95
|
-
(arr.hasNulls ? null : void 0);
|
|
96
|
-
},
|
|
97
|
-
// HLC, OHLC and range are special cases where a multidimensional array is
|
|
98
|
-
// input and an array is output.
|
|
99
|
-
hlc: function (high, low, close) {
|
|
100
|
-
high = approximations.high(high);
|
|
101
|
-
low = approximations.low(low);
|
|
102
|
-
close = approximations.close(close);
|
|
103
|
-
if (isNumber(high) ||
|
|
104
|
-
isNumber(low) ||
|
|
105
|
-
isNumber(close)) {
|
|
106
|
-
return [high, low, close];
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
ohlc: function (open, high, low, close) {
|
|
110
|
-
open = approximations.open(open);
|
|
111
|
-
high = approximations.high(high);
|
|
112
|
-
low = approximations.low(low);
|
|
113
|
-
close = approximations.close(close);
|
|
114
|
-
if (isNumber(open) ||
|
|
115
|
-
isNumber(high) ||
|
|
116
|
-
isNumber(low) ||
|
|
117
|
-
isNumber(close)) {
|
|
118
|
-
return [open, high, low, close];
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
range: function (low, high) {
|
|
122
|
-
low = approximations.low(low);
|
|
123
|
-
high = approximations.high(high);
|
|
124
|
-
if (isNumber(low) || isNumber(high)) {
|
|
125
|
-
return [low, high];
|
|
126
|
-
}
|
|
127
|
-
if (low === null && high === null) {
|
|
128
|
-
return null;
|
|
129
|
-
}
|
|
130
|
-
// else, return is undefined
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
var applyGrouping = function (hasExtemesChanged) {
|
|
134
|
-
var series = this, chart = series.chart, options = series.options, dataGroupingOptions = options.dataGrouping, groupingEnabled = series.allowDG !== false && dataGroupingOptions &&
|
|
135
|
-
pick(dataGroupingOptions.enabled, chart.options.isStock), visible = (series.visible || !chart.options.chart.ignoreHiddenSeries), hasGroupedData, skip, lastDataGrouping = this.currentDataGrouping, currentDataGrouping, croppedData, revertRequireSorting = false;
|
|
136
|
-
// Data needs to be sorted for dataGrouping
|
|
137
|
-
if (groupingEnabled && !series.requireSorting) {
|
|
138
|
-
series.requireSorting = revertRequireSorting = true;
|
|
139
|
-
}
|
|
140
|
-
// Skip if skipDataGrouping method returns false or if grouping is disabled
|
|
141
|
-
// (in that order).
|
|
142
|
-
skip = skipDataGrouping(series, hasExtemesChanged) === false || !groupingEnabled;
|
|
143
|
-
// Revert original requireSorting value if changed
|
|
144
|
-
if (revertRequireSorting) {
|
|
145
|
-
series.requireSorting = false;
|
|
146
|
-
}
|
|
147
|
-
if (!skip) {
|
|
148
|
-
series.destroyGroupedData();
|
|
149
|
-
var i = void 0, processedXData = dataGroupingOptions.groupAll ?
|
|
150
|
-
series.xData :
|
|
151
|
-
series.processedXData, processedYData = dataGroupingOptions.groupAll ?
|
|
152
|
-
series.yData :
|
|
153
|
-
series.processedYData, plotSizeX = chart.plotSizeX, xAxis = series.xAxis, ordinal = xAxis.options.ordinal, groupPixelWidth = series.groupPixelWidth;
|
|
154
|
-
// Execute grouping if the amount of points is greater than the limit
|
|
155
|
-
// defined in groupPixelWidth
|
|
156
|
-
if (groupPixelWidth &&
|
|
157
|
-
processedXData &&
|
|
158
|
-
processedXData.length) {
|
|
159
|
-
hasGroupedData = true;
|
|
160
|
-
// Force recreation of point instances in series.translate, #5699
|
|
161
|
-
series.isDirty = true;
|
|
162
|
-
series.points = null; // #6709
|
|
163
|
-
var extremes = xAxis.getExtremes(), xMin = extremes.min, xMax = extremes.max, groupIntervalFactor = (ordinal &&
|
|
164
|
-
xAxis.ordinal &&
|
|
165
|
-
xAxis.ordinal.getGroupIntervalFactor(xMin, xMax, series)) || 1, interval = (groupPixelWidth * (xMax - xMin) / plotSizeX) *
|
|
166
|
-
groupIntervalFactor, groupPositions = xAxis.getTimeTicks(DateTimeAxis.Additions.prototype.normalizeTimeTickInterval(interval, dataGroupingOptions.units ||
|
|
167
|
-
defaultDataGroupingUnits),
|
|
168
|
-
// Processed data may extend beyond axis (#4907)
|
|
169
|
-
Math.min(xMin, processedXData[0]), Math.max(xMax, processedXData[processedXData.length - 1]), xAxis.options.startOfWeek, processedXData, series.closestPointRange), groupedData = seriesProto.groupData.apply(series, [
|
|
170
|
-
processedXData,
|
|
171
|
-
processedYData,
|
|
172
|
-
groupPositions,
|
|
173
|
-
dataGroupingOptions.approximation
|
|
174
|
-
]), groupedXData = groupedData.groupedXData, groupedYData = groupedData.groupedYData, gapSize = 0;
|
|
175
|
-
// The smoothed option is deprecated, instead, there is a fallback
|
|
176
|
-
// to the new anchoring mechanism. #12455.
|
|
177
|
-
if (dataGroupingOptions &&
|
|
178
|
-
dataGroupingOptions.smoothed &&
|
|
179
|
-
groupedXData.length) {
|
|
180
|
-
dataGroupingOptions.firstAnchor = 'firstPoint';
|
|
181
|
-
dataGroupingOptions.anchor = 'middle';
|
|
182
|
-
dataGroupingOptions.lastAnchor = 'lastPoint';
|
|
183
|
-
error(32, false, chart, {
|
|
184
|
-
'dataGrouping.smoothed': 'use dataGrouping.anchor'
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
anchorPoints(series, groupedXData, xMax);
|
|
188
|
-
// Record what data grouping values were used
|
|
189
|
-
for (i = 1; i < groupPositions.length; i++) {
|
|
190
|
-
// The grouped gapSize needs to be the largest distance between
|
|
191
|
-
// the group to capture varying group sizes like months or DST
|
|
192
|
-
// crossing (#10000). Also check that the gap is not at the
|
|
193
|
-
// start of a segment.
|
|
194
|
-
if (!groupPositions.info.segmentStarts ||
|
|
195
|
-
groupPositions.info.segmentStarts.indexOf(i) === -1) {
|
|
196
|
-
gapSize = Math.max(groupPositions[i] - groupPositions[i - 1], gapSize);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
currentDataGrouping = groupPositions.info;
|
|
200
|
-
currentDataGrouping.gapSize = gapSize;
|
|
201
|
-
series.closestPointRange = groupPositions.info.totalRange;
|
|
202
|
-
series.groupMap = groupedData.groupMap;
|
|
203
|
-
if (visible) {
|
|
204
|
-
adjustExtremes(xAxis, groupedXData);
|
|
205
|
-
}
|
|
206
|
-
// We calculated all group positions but we should render
|
|
207
|
-
// only the ones within the visible range
|
|
208
|
-
if (dataGroupingOptions.groupAll) {
|
|
209
|
-
// Keep the reference to all grouped points
|
|
210
|
-
// for further calculation (eg. heikinashi).
|
|
211
|
-
series.allGroupedData = groupedYData;
|
|
212
|
-
croppedData = series.cropData(groupedXData, groupedYData, xAxis.min, xAxis.max, 1 // Ordinal xAxis will remove left-most points otherwise
|
|
213
|
-
);
|
|
214
|
-
groupedXData = croppedData.xData;
|
|
215
|
-
groupedYData = croppedData.yData;
|
|
216
|
-
series.cropStart = croppedData.start; // #15005
|
|
217
|
-
}
|
|
218
|
-
// Set series props
|
|
219
|
-
series.processedXData = groupedXData;
|
|
220
|
-
series.processedYData = groupedYData;
|
|
221
|
-
}
|
|
222
|
-
else {
|
|
223
|
-
series.groupMap = null;
|
|
224
|
-
}
|
|
225
|
-
series.hasGroupedData = hasGroupedData;
|
|
226
|
-
series.currentDataGrouping = currentDataGrouping;
|
|
227
|
-
series.preventGraphAnimation =
|
|
228
|
-
(lastDataGrouping && lastDataGrouping.totalRange) !==
|
|
229
|
-
(currentDataGrouping && currentDataGrouping.totalRange);
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
var skipDataGrouping = function (series, force) {
|
|
233
|
-
return !(series.isCartesian &&
|
|
234
|
-
!series.isDirty &&
|
|
235
|
-
!series.xAxis.isDirty &&
|
|
236
|
-
!series.yAxis.isDirty &&
|
|
237
|
-
!force);
|
|
238
|
-
};
|
|
239
|
-
var groupData = function (xData, yData, groupPositions, approximation) {
|
|
240
|
-
var series = this, data = series.data, dataOptions = series.options && series.options.data, groupedXData = [], groupedYData = [], groupMap = [], dataLength = xData.length, pointX, pointY, groupedY,
|
|
241
|
-
// when grouping the fake extended axis for panning,
|
|
242
|
-
// we don't need to consider y
|
|
243
|
-
handleYData = !!yData, values = [], approximationFn, pointArrayMap = series.pointArrayMap, pointArrayMapLength = pointArrayMap && pointArrayMap.length, extendedPointArrayMap = ['x'].concat(pointArrayMap || ['y']), groupAll = (this.options.dataGrouping &&
|
|
244
|
-
this.options.dataGrouping.groupAll), pos = 0, start = 0, valuesLen, i, j;
|
|
245
|
-
/**
|
|
246
|
-
* @private
|
|
247
|
-
*/
|
|
248
|
-
function getApproximation(approx) {
|
|
249
|
-
if (typeof approx === 'function') {
|
|
250
|
-
return approx;
|
|
251
|
-
}
|
|
252
|
-
if (approximations[approx]) {
|
|
253
|
-
return approximations[approx];
|
|
254
|
-
}
|
|
255
|
-
return approximations[(series.getDGApproximation && series.getDGApproximation()) ||
|
|
256
|
-
'average'];
|
|
257
|
-
}
|
|
258
|
-
approximationFn = getApproximation(approximation);
|
|
259
|
-
// Calculate values array size from pointArrayMap length
|
|
260
|
-
if (pointArrayMapLength) {
|
|
261
|
-
pointArrayMap.forEach(function () {
|
|
262
|
-
values.push([]);
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
else {
|
|
266
|
-
values.push([]);
|
|
267
|
-
}
|
|
268
|
-
valuesLen = pointArrayMapLength || 1;
|
|
269
|
-
// Start with the first point within the X axis range (#2696)
|
|
270
|
-
for (i = 0; i <= dataLength; i++) {
|
|
271
|
-
if (xData[i] >= groupPositions[0]) {
|
|
272
|
-
break;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
for (i; i <= dataLength; i++) {
|
|
276
|
-
// when a new group is entered, summarize and initialize
|
|
277
|
-
// the previous group
|
|
278
|
-
while ((typeof groupPositions[pos + 1] !== 'undefined' &&
|
|
279
|
-
xData[i] >= groupPositions[pos + 1]) ||
|
|
280
|
-
i === dataLength) { // get the last group
|
|
281
|
-
// get group x and y
|
|
282
|
-
pointX = groupPositions[pos];
|
|
283
|
-
series.dataGroupInfo = {
|
|
284
|
-
start: groupAll ? start : (series.cropStart + start),
|
|
285
|
-
length: values[0].length
|
|
286
|
-
};
|
|
287
|
-
groupedY = approximationFn.apply(series, values);
|
|
288
|
-
// By default, let options of the first grouped point be passed over
|
|
289
|
-
// to the grouped point. This allows preserving properties like
|
|
290
|
-
// `name` and `color` or custom properties. Implementers can
|
|
291
|
-
// override this from the approximation function, where they can
|
|
292
|
-
// write custom options to `this.dataGroupInfo.options`.
|
|
293
|
-
if (series.pointClass && !defined(series.dataGroupInfo.options)) {
|
|
294
|
-
// Convert numbers and arrays into objects
|
|
295
|
-
series.dataGroupInfo.options = merge(series.pointClass.prototype
|
|
296
|
-
.optionsToObject.call({ series: series }, series.options.data[series.cropStart + start]));
|
|
297
|
-
// Make sure the raw data (x, y, open, high etc) is not copied
|
|
298
|
-
// over and overwriting approximated data.
|
|
299
|
-
extendedPointArrayMap.forEach(function (key) {
|
|
300
|
-
delete series.dataGroupInfo.options[key];
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
// push the grouped data
|
|
304
|
-
if (typeof groupedY !== 'undefined') {
|
|
305
|
-
groupedXData.push(pointX);
|
|
306
|
-
groupedYData.push(groupedY);
|
|
307
|
-
groupMap.push(series.dataGroupInfo);
|
|
308
|
-
}
|
|
309
|
-
// reset the aggregate arrays
|
|
310
|
-
start = i;
|
|
311
|
-
for (j = 0; j < valuesLen; j++) {
|
|
312
|
-
values[j].length = 0; // faster than values[j] = []
|
|
313
|
-
values[j].hasNulls = false;
|
|
314
|
-
}
|
|
315
|
-
// Advance on the group positions
|
|
316
|
-
pos += 1;
|
|
317
|
-
// don't loop beyond the last group
|
|
318
|
-
if (i === dataLength) {
|
|
319
|
-
break;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
// break out
|
|
323
|
-
if (i === dataLength) {
|
|
324
|
-
break;
|
|
325
|
-
}
|
|
326
|
-
// for each raw data point, push it to an array that contains all values
|
|
327
|
-
// for this specific group
|
|
328
|
-
if (pointArrayMap) {
|
|
329
|
-
var index = (series.options.dataGrouping &&
|
|
330
|
-
series.options.dataGrouping.groupAll ?
|
|
331
|
-
i : series.cropStart + i), point = (data && data[index]) ||
|
|
332
|
-
series.pointClass.prototype.applyOptions.apply({
|
|
333
|
-
series: series
|
|
334
|
-
}, [dataOptions[index]]), val = void 0;
|
|
335
|
-
for (j = 0; j < pointArrayMapLength; j++) {
|
|
336
|
-
val = point[pointArrayMap[j]];
|
|
337
|
-
if (isNumber(val)) {
|
|
338
|
-
values[j].push(val);
|
|
339
|
-
}
|
|
340
|
-
else if (val === null) {
|
|
341
|
-
values[j].hasNulls = true;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
else {
|
|
346
|
-
pointY = handleYData ? yData[i] : null;
|
|
347
|
-
if (isNumber(pointY)) {
|
|
348
|
-
values[0].push(pointY);
|
|
349
|
-
}
|
|
350
|
-
else if (pointY === null) {
|
|
351
|
-
values[0].hasNulls = true;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
return {
|
|
356
|
-
groupedXData: groupedXData,
|
|
357
|
-
groupedYData: groupedYData,
|
|
358
|
-
groupMap: groupMap
|
|
359
|
-
};
|
|
360
|
-
};
|
|
361
|
-
var anchorPoints = function (series, groupedXData, xMax) {
|
|
362
|
-
var options = series.options, dataGroupingOptions = options.dataGrouping, totalRange = (series.currentDataGrouping && series.currentDataGrouping.gapSize);
|
|
363
|
-
var i;
|
|
364
|
-
// DataGrouping x-coordinates.
|
|
365
|
-
if (dataGroupingOptions && series.xData && totalRange && series.groupMap) {
|
|
366
|
-
var groupedDataLength = groupedXData.length - 1, anchor = dataGroupingOptions.anchor, firstAnchor = pick(dataGroupingOptions.firstAnchor, anchor), lastAnchor = pick(dataGroupingOptions.lastAnchor, anchor);
|
|
367
|
-
// Anchor points that are not extremes.
|
|
368
|
-
if (anchor && anchor !== 'start') {
|
|
369
|
-
var shiftInterval = (totalRange *
|
|
370
|
-
{ middle: 0.5, end: 1 }[anchor]);
|
|
371
|
-
i = groupedXData.length - 1;
|
|
372
|
-
while (i-- && i > 0) {
|
|
373
|
-
groupedXData[i] += shiftInterval;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
// Change the first point position, but only when it is
|
|
377
|
-
// the first point in the data set not in the current zoom.
|
|
378
|
-
if (firstAnchor &&
|
|
379
|
-
firstAnchor !== 'start' &&
|
|
380
|
-
series.xData[0] >= groupedXData[0]) {
|
|
381
|
-
var groupStart = series.groupMap[0].start, groupLength = series.groupMap[0].length;
|
|
382
|
-
var firstGroupstEnd = void 0;
|
|
383
|
-
if (isNumber(groupStart) && isNumber(groupLength)) {
|
|
384
|
-
firstGroupstEnd = groupStart + (groupLength - 1);
|
|
385
|
-
}
|
|
386
|
-
groupedXData[0] = {
|
|
387
|
-
middle: groupedXData[0] + 0.5 * totalRange,
|
|
388
|
-
end: groupedXData[0] + totalRange,
|
|
389
|
-
firstPoint: series.xData[0],
|
|
390
|
-
lastPoint: firstGroupstEnd && series.xData[firstGroupstEnd]
|
|
391
|
-
}[firstAnchor];
|
|
392
|
-
}
|
|
393
|
-
// Change the last point position but only when it is
|
|
394
|
-
// the last point in the data set not in the current zoom.
|
|
395
|
-
if (lastAnchor &&
|
|
396
|
-
lastAnchor !== 'start' &&
|
|
397
|
-
totalRange &&
|
|
398
|
-
groupedXData[groupedDataLength] >= xMax - totalRange) {
|
|
399
|
-
var lastGroupStart = series.groupMap[series.groupMap.length - 1].start;
|
|
400
|
-
groupedXData[groupedDataLength] = {
|
|
401
|
-
middle: groupedXData[groupedDataLength] + 0.5 * totalRange,
|
|
402
|
-
end: groupedXData[groupedDataLength] + totalRange,
|
|
403
|
-
firstPoint: lastGroupStart && series.xData[lastGroupStart],
|
|
404
|
-
lastPoint: series.xData[series.xData.length - 1]
|
|
405
|
-
}[lastAnchor];
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
var adjustExtremes = function (xAxis, groupedXData) {
|
|
410
|
-
// Make sure the X axis extends to show the first group (#2533)
|
|
411
|
-
// But only for visible series (#5493, #6393)
|
|
412
|
-
if (defined(groupedXData[0]) &&
|
|
413
|
-
isNumber(xAxis.min) &&
|
|
414
|
-
isNumber(xAxis.dataMin) &&
|
|
415
|
-
groupedXData[0] < xAxis.min) {
|
|
416
|
-
if ((!defined(xAxis.options.min) &&
|
|
417
|
-
xAxis.min <= xAxis.dataMin) ||
|
|
418
|
-
xAxis.min === xAxis.dataMin) {
|
|
419
|
-
xAxis.min = Math.min(groupedXData[0], xAxis.min);
|
|
420
|
-
}
|
|
421
|
-
xAxis.dataMin = Math.min(groupedXData[0], xAxis.dataMin);
|
|
422
|
-
}
|
|
423
|
-
// When the last anchor set, change the extremes that
|
|
424
|
-
// the last point is visible (#12455).
|
|
425
|
-
if (defined(groupedXData[groupedXData.length - 1]) &&
|
|
426
|
-
isNumber(xAxis.max) &&
|
|
427
|
-
isNumber(xAxis.dataMax) &&
|
|
428
|
-
groupedXData[groupedXData.length - 1] > xAxis.max) {
|
|
429
|
-
if ((!defined(xAxis.options.max) &&
|
|
430
|
-
isNumber(xAxis.dataMax) &&
|
|
431
|
-
xAxis.max >= xAxis.dataMax) || xAxis.max === xAxis.dataMax) {
|
|
432
|
-
xAxis.max = Math.max(groupedXData[groupedXData.length - 1], xAxis.max);
|
|
433
|
-
}
|
|
434
|
-
xAxis.dataMax = Math.max(groupedXData[groupedXData.length - 1], xAxis.dataMax);
|
|
435
|
-
}
|
|
436
|
-
};
|
|
437
|
-
var dataGrouping = {
|
|
438
|
-
approximations: approximations,
|
|
439
|
-
groupData: groupData
|
|
440
|
-
};
|
|
441
|
-
// -----------------------------------------------------------------------------
|
|
442
|
-
// The following code applies to implementation of data grouping on a Series
|
|
443
|
-
var baseProcessData = seriesProto.processData, baseGeneratePoints = seriesProto.generatePoints,
|
|
444
|
-
/** @ignore */
|
|
445
|
-
commonOptions = {
|
|
446
|
-
// enabled: null, // (true for stock charts, false for basic),
|
|
447
|
-
// forced: undefined,
|
|
448
|
-
groupPixelWidth: 2,
|
|
449
|
-
// the first one is the point or start value, the second is the start
|
|
450
|
-
// value if we're dealing with range, the third one is the end value if
|
|
451
|
-
// dealing with a range
|
|
452
|
-
dateTimeLabelFormats: {
|
|
453
|
-
millisecond: [
|
|
454
|
-
'%A, %b %e, %H:%M:%S.%L',
|
|
455
|
-
'%A, %b %e, %H:%M:%S.%L',
|
|
456
|
-
'-%H:%M:%S.%L'
|
|
457
|
-
],
|
|
458
|
-
second: [
|
|
459
|
-
'%A, %b %e, %H:%M:%S',
|
|
460
|
-
'%A, %b %e, %H:%M:%S',
|
|
461
|
-
'-%H:%M:%S'
|
|
462
|
-
],
|
|
463
|
-
minute: [
|
|
464
|
-
'%A, %b %e, %H:%M',
|
|
465
|
-
'%A, %b %e, %H:%M',
|
|
466
|
-
'-%H:%M'
|
|
467
|
-
],
|
|
468
|
-
hour: [
|
|
469
|
-
'%A, %b %e, %H:%M',
|
|
470
|
-
'%A, %b %e, %H:%M',
|
|
471
|
-
'-%H:%M'
|
|
472
|
-
],
|
|
473
|
-
day: [
|
|
474
|
-
'%A, %b %e, %Y',
|
|
475
|
-
'%A, %b %e',
|
|
476
|
-
'-%A, %b %e, %Y'
|
|
477
|
-
],
|
|
478
|
-
week: [
|
|
479
|
-
'Week from %A, %b %e, %Y',
|
|
480
|
-
'%A, %b %e',
|
|
481
|
-
'-%A, %b %e, %Y'
|
|
482
|
-
],
|
|
483
|
-
month: [
|
|
484
|
-
'%B %Y',
|
|
485
|
-
'%B',
|
|
486
|
-
'-%B %Y'
|
|
487
|
-
],
|
|
488
|
-
year: [
|
|
489
|
-
'%Y',
|
|
490
|
-
'%Y',
|
|
491
|
-
'-%Y'
|
|
492
|
-
]
|
|
493
|
-
}
|
|
494
|
-
// smoothed = false, // enable this for navigator series only
|
|
495
|
-
}, specificOptions = {
|
|
496
|
-
line: {},
|
|
497
|
-
spline: {},
|
|
498
|
-
area: {},
|
|
499
|
-
areaspline: {},
|
|
500
|
-
arearange: {},
|
|
501
|
-
column: {
|
|
502
|
-
groupPixelWidth: 10
|
|
503
|
-
},
|
|
504
|
-
columnrange: {
|
|
505
|
-
groupPixelWidth: 10
|
|
506
|
-
},
|
|
507
|
-
candlestick: {
|
|
508
|
-
groupPixelWidth: 10
|
|
509
|
-
},
|
|
510
|
-
ohlc: {
|
|
511
|
-
groupPixelWidth: 5
|
|
512
|
-
},
|
|
513
|
-
hlc: {
|
|
514
|
-
groupPixelWidth: 5
|
|
515
|
-
// Move to HeikinAshiSeries.ts aftre refactoring data grouping.
|
|
516
|
-
},
|
|
517
|
-
heikinashi: {
|
|
518
|
-
groupPixelWidth: 10
|
|
519
|
-
}
|
|
520
|
-
},
|
|
521
|
-
// units are defined in a separate array to allow complete overriding in
|
|
522
|
-
// case of a user option
|
|
523
|
-
defaultDataGroupingUnits = H.defaultDataGroupingUnits = [
|
|
524
|
-
[
|
|
525
|
-
'millisecond',
|
|
526
|
-
[1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
|
|
527
|
-
], [
|
|
528
|
-
'second',
|
|
529
|
-
[1, 2, 5, 10, 15, 30]
|
|
530
|
-
], [
|
|
531
|
-
'minute',
|
|
532
|
-
[1, 2, 5, 10, 15, 30]
|
|
533
|
-
], [
|
|
534
|
-
'hour',
|
|
535
|
-
[1, 2, 3, 4, 6, 8, 12]
|
|
536
|
-
], [
|
|
537
|
-
'day',
|
|
538
|
-
[1]
|
|
539
|
-
], [
|
|
540
|
-
'week',
|
|
541
|
-
[1]
|
|
542
|
-
], [
|
|
543
|
-
'month',
|
|
544
|
-
[1, 3, 6]
|
|
545
|
-
], [
|
|
546
|
-
'year',
|
|
547
|
-
null
|
|
548
|
-
]
|
|
549
|
-
];
|
|
550
|
-
// Set default approximations to the prototypes if present. Properties are
|
|
551
|
-
// inherited down. Can be overridden for individual series types.
|
|
552
|
-
seriesProto.getDGApproximation = function () {
|
|
553
|
-
if (this.is('arearange')) {
|
|
554
|
-
return 'range';
|
|
555
|
-
}
|
|
556
|
-
if (this.is('ohlc')) {
|
|
557
|
-
return 'ohlc';
|
|
558
|
-
}
|
|
559
|
-
if (this.is('hlc')) {
|
|
560
|
-
return 'hlc';
|
|
561
|
-
}
|
|
562
|
-
if (this.is('column')) {
|
|
563
|
-
return 'sum';
|
|
564
|
-
}
|
|
565
|
-
return 'average';
|
|
566
|
-
};
|
|
567
|
-
/**
|
|
568
|
-
* Takes parallel arrays of x and y data and groups the data into intervals
|
|
569
|
-
* defined by groupPositions, a collection of starting x values for each group.
|
|
570
|
-
*
|
|
571
|
-
* @private
|
|
572
|
-
* @function Highcharts.Series#groupData
|
|
573
|
-
*
|
|
574
|
-
* @param {Array<number>} xData
|
|
575
|
-
*
|
|
576
|
-
* @param {Array<number>|Array<Array<number>>} yData
|
|
577
|
-
*
|
|
578
|
-
* @param {boolean} groupPositions
|
|
579
|
-
*
|
|
580
|
-
* @param {string|Function} approximation
|
|
581
|
-
*
|
|
582
|
-
* @return {void}
|
|
583
|
-
*/
|
|
584
|
-
seriesProto.groupData = groupData;
|
|
585
|
-
/**
|
|
586
|
-
* For the processed data, calculate the grouped data if needed.
|
|
587
|
-
*
|
|
588
|
-
* @private
|
|
589
|
-
* @function Highcharts.Series#applyGrouping
|
|
590
|
-
*
|
|
591
|
-
* @return {void}
|
|
592
|
-
*/
|
|
593
|
-
seriesProto.applyGrouping = applyGrouping;
|
|
594
|
-
// Destroy the grouped data points. #622, #740
|
|
595
|
-
seriesProto.destroyGroupedData = function () {
|
|
596
|
-
// Clear previous groups
|
|
597
|
-
if (this.groupedData) {
|
|
598
|
-
this.groupedData.forEach(function (point, i) {
|
|
599
|
-
if (point) {
|
|
600
|
-
this.groupedData[i] = point.destroy ?
|
|
601
|
-
point.destroy() : null;
|
|
602
|
-
}
|
|
603
|
-
}, this);
|
|
604
|
-
// Clears all:
|
|
605
|
-
// - `this.groupedData`
|
|
606
|
-
// - `this.points`
|
|
607
|
-
// - `preserve` object in series.update()
|
|
608
|
-
this.groupedData.length = 0;
|
|
609
|
-
}
|
|
610
|
-
};
|
|
611
|
-
// Override the generatePoints method by adding a reference to grouped data
|
|
612
|
-
seriesProto.generatePoints = function () {
|
|
613
|
-
baseGeneratePoints.apply(this);
|
|
614
|
-
// Record grouped data in order to let it be destroyed the next time
|
|
615
|
-
// processData runs
|
|
616
|
-
this.destroyGroupedData(); // #622
|
|
617
|
-
this.groupedData = this.hasGroupedData ? this.points : null;
|
|
618
|
-
};
|
|
619
|
-
/**
|
|
620
|
-
* Check the groupPixelWidth and apply the grouping if needed.
|
|
621
|
-
* Fired only after processing the data.
|
|
622
|
-
*
|
|
623
|
-
* @product highstock
|
|
624
|
-
*
|
|
625
|
-
* @function Highcharts.Axis#applyGrouping
|
|
626
|
-
*/
|
|
627
|
-
Axis.prototype.applyGrouping = function (e) {
|
|
628
|
-
var axis = this, series = axis.series;
|
|
629
|
-
// Reset the groupPixelWidth for all series, #17141.
|
|
630
|
-
series.forEach(function (series) {
|
|
631
|
-
series.groupPixelWidth = void 0; // #2110
|
|
632
|
-
});
|
|
633
|
-
series.forEach(function (series) {
|
|
634
|
-
series.groupPixelWidth = (axis.getGroupPixelWidth &&
|
|
635
|
-
axis.getGroupPixelWidth());
|
|
636
|
-
if (series.groupPixelWidth) {
|
|
637
|
-
series.hasProcessed = true; // #2692
|
|
638
|
-
}
|
|
639
|
-
// Fire independing on series.groupPixelWidth to always set a proper
|
|
640
|
-
// dataGrouping state, (#16238)
|
|
641
|
-
series.applyGrouping(!!e.hasExtemesChanged);
|
|
642
|
-
});
|
|
643
|
-
};
|
|
644
|
-
// Get the data grouping pixel width based on the greatest defined individual
|
|
645
|
-
// width of the axis' series, and if whether one of the axes need grouping.
|
|
646
|
-
Axis.prototype.getGroupPixelWidth = function () {
|
|
647
|
-
var series = this.series, len = series.length, i, groupPixelWidth = 0, doGrouping = false, dataLength, dgOptions;
|
|
648
|
-
// If multiple series are compared on the same x axis, give them the same
|
|
649
|
-
// group pixel width (#334)
|
|
650
|
-
i = len;
|
|
651
|
-
while (i--) {
|
|
652
|
-
dgOptions = series[i].options.dataGrouping;
|
|
653
|
-
if (dgOptions) {
|
|
654
|
-
groupPixelWidth = Math.max(groupPixelWidth,
|
|
655
|
-
// Fallback to commonOptions (#9693)
|
|
656
|
-
pick(dgOptions.groupPixelWidth, commonOptions.groupPixelWidth));
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
// If one of the series needs grouping, apply it to all (#1634)
|
|
660
|
-
i = len;
|
|
661
|
-
while (i--) {
|
|
662
|
-
dgOptions = series[i].options.dataGrouping;
|
|
663
|
-
if (dgOptions) { // #2692
|
|
664
|
-
dataLength = (series[i].processedXData || series[i].data).length;
|
|
665
|
-
// Execute grouping if the amount of points is greater than the
|
|
666
|
-
// limit defined in groupPixelWidth
|
|
667
|
-
if (series[i].groupPixelWidth ||
|
|
668
|
-
(dataLength >
|
|
669
|
-
(this.chart.plotSizeX / groupPixelWidth)) ||
|
|
670
|
-
(dataLength && dgOptions.forced)) {
|
|
671
|
-
doGrouping = true;
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
return doGrouping ? groupPixelWidth : 0;
|
|
676
|
-
};
|
|
677
|
-
/**
|
|
678
|
-
* Highcharts Stock only. Force data grouping on all the axis' series.
|
|
679
|
-
*
|
|
680
|
-
* @product highstock
|
|
681
|
-
*
|
|
682
|
-
* @function Highcharts.Axis#setDataGrouping
|
|
683
|
-
*
|
|
684
|
-
* @param {boolean|Highcharts.DataGroupingOptionsObject} [dataGrouping]
|
|
685
|
-
* A `dataGrouping` configuration. Use `false` to disable data grouping
|
|
686
|
-
* dynamically.
|
|
687
|
-
*
|
|
688
|
-
* @param {boolean} [redraw=true]
|
|
689
|
-
* Whether to redraw the chart or wait for a later call to
|
|
690
|
-
* {@link Chart#redraw}.
|
|
691
|
-
*/
|
|
692
|
-
Axis.prototype.setDataGrouping = function (dataGrouping, redraw) {
|
|
693
|
-
var axis = this;
|
|
694
|
-
var i;
|
|
695
|
-
redraw = pick(redraw, true);
|
|
696
|
-
if (!dataGrouping) {
|
|
697
|
-
dataGrouping = {
|
|
698
|
-
forced: false,
|
|
699
|
-
units: null
|
|
700
|
-
};
|
|
701
|
-
}
|
|
702
|
-
// Axis is instantiated, update all series
|
|
703
|
-
if (this instanceof Axis) {
|
|
704
|
-
i = this.series.length;
|
|
705
|
-
while (i--) {
|
|
706
|
-
this.series[i].update({
|
|
707
|
-
dataGrouping: dataGrouping
|
|
708
|
-
}, false);
|
|
709
|
-
}
|
|
710
|
-
// Axis not yet instanciated, alter series options
|
|
711
|
-
}
|
|
712
|
-
else {
|
|
713
|
-
this.chart.options.series.forEach(function (seriesOptions) {
|
|
714
|
-
// Merging dataGrouping options with already defined options #16759
|
|
715
|
-
seriesOptions.dataGrouping = typeof dataGrouping === 'boolean' ?
|
|
716
|
-
dataGrouping :
|
|
717
|
-
merge(dataGrouping, seriesOptions.dataGrouping);
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
|
-
// Clear ordinal slope, so we won't accidentaly use the old one (#7827)
|
|
721
|
-
if (axis.ordinal) {
|
|
722
|
-
axis.ordinal.slope = void 0;
|
|
723
|
-
}
|
|
724
|
-
if (redraw) {
|
|
725
|
-
this.chart.redraw();
|
|
726
|
-
}
|
|
727
|
-
};
|
|
728
|
-
// When all series are processed, calculate the group pixel width and then
|
|
729
|
-
// if this value is different than zero apply groupings.
|
|
730
|
-
addEvent(Axis, 'postProcessData', Axis.prototype.applyGrouping);
|
|
731
|
-
// Override point prototype to throw a warning when trying to update grouped
|
|
732
|
-
// points.
|
|
733
|
-
addEvent(Point, 'update', function () {
|
|
734
|
-
if (this.dataGroup) {
|
|
735
|
-
error(24, false, this.series.chart);
|
|
736
|
-
return false;
|
|
737
|
-
}
|
|
738
|
-
});
|
|
739
|
-
// Extend the original method, make the tooltip's header reflect the grouped
|
|
740
|
-
// range.
|
|
741
|
-
addEvent(Tooltip, 'headerFormatter', function (e) {
|
|
742
|
-
var tooltip = this, chart = this.chart, time = chart.time, labelConfig = e.labelConfig, series = labelConfig.series, options = series.options, tooltipOptions = series.tooltipOptions, dataGroupingOptions = options.dataGrouping, xDateFormat = tooltipOptions.xDateFormat, xDateFormatEnd, xAxis = series.xAxis, currentDataGrouping, dateTimeLabelFormats, labelFormats, formattedKey, formatString = tooltipOptions[e.isFooter ? 'footerFormat' : 'headerFormat'];
|
|
743
|
-
// apply only to grouped series
|
|
744
|
-
if (xAxis &&
|
|
745
|
-
xAxis.options.type === 'datetime' &&
|
|
746
|
-
dataGroupingOptions &&
|
|
747
|
-
isNumber(labelConfig.key)) {
|
|
748
|
-
// set variables
|
|
749
|
-
currentDataGrouping = series.currentDataGrouping;
|
|
750
|
-
dateTimeLabelFormats = dataGroupingOptions.dateTimeLabelFormats ||
|
|
751
|
-
// Fallback to commonOptions (#9693)
|
|
752
|
-
commonOptions.dateTimeLabelFormats;
|
|
753
|
-
// if we have grouped data, use the grouping information to get the
|
|
754
|
-
// right format
|
|
755
|
-
if (currentDataGrouping) {
|
|
756
|
-
labelFormats =
|
|
757
|
-
dateTimeLabelFormats[currentDataGrouping.unitName];
|
|
758
|
-
if (currentDataGrouping.count === 1) {
|
|
759
|
-
xDateFormat = labelFormats[0];
|
|
760
|
-
}
|
|
761
|
-
else {
|
|
762
|
-
xDateFormat = labelFormats[1];
|
|
763
|
-
xDateFormatEnd = labelFormats[2];
|
|
764
|
-
}
|
|
765
|
-
// if not grouped, and we don't have set the xDateFormat option, get the
|
|
766
|
-
// best fit, so if the least distance between points is one minute, show
|
|
767
|
-
// it, but if the least distance is one day, skip hours and minutes etc.
|
|
768
|
-
}
|
|
769
|
-
else if (!xDateFormat && dateTimeLabelFormats && xAxis.dateTime) {
|
|
770
|
-
xDateFormat = xAxis.dateTime.getXDateFormat(labelConfig.x, tooltipOptions.dateTimeLabelFormats);
|
|
771
|
-
}
|
|
772
|
-
// now format the key
|
|
773
|
-
formattedKey = time.dateFormat(xDateFormat, labelConfig.key);
|
|
774
|
-
if (xDateFormatEnd) {
|
|
775
|
-
formattedKey += time.dateFormat(xDateFormatEnd, labelConfig.key + currentDataGrouping.totalRange - 1);
|
|
776
|
-
}
|
|
777
|
-
// Replace default header style with class name
|
|
778
|
-
if (series.chart.styledMode) {
|
|
779
|
-
formatString = this.styledModeFormat(formatString);
|
|
780
|
-
}
|
|
781
|
-
// return the replaced format
|
|
782
|
-
e.text = format(formatString, {
|
|
783
|
-
point: extend(labelConfig.point, { key: formattedKey }),
|
|
784
|
-
series: series
|
|
785
|
-
}, chart);
|
|
786
|
-
e.preventDefault();
|
|
787
|
-
}
|
|
788
|
-
});
|
|
789
|
-
// Destroy grouped data on series destroy
|
|
790
|
-
addEvent(Series, 'destroy', seriesProto.destroyGroupedData);
|
|
791
|
-
// Handle default options for data grouping. This must be set at runtime because
|
|
792
|
-
// some series types are defined after this.
|
|
793
|
-
addEvent(Series, 'afterSetOptions', function (e) {
|
|
794
|
-
var options = e.options, type = this.type, plotOptions = this.chart.options.plotOptions, defaultOptions = D.defaultOptions.plotOptions[type].dataGrouping,
|
|
795
|
-
// External series, for example technical indicators should also inherit
|
|
796
|
-
// commonOptions which are not available outside this module
|
|
797
|
-
baseOptions = (this.useCommonDataGrouping && commonOptions);
|
|
798
|
-
if (plotOptions && (specificOptions[type] || baseOptions)) { // #1284
|
|
799
|
-
if (!defaultOptions) {
|
|
800
|
-
defaultOptions = merge(commonOptions, specificOptions[type]);
|
|
801
|
-
}
|
|
802
|
-
var rangeSelector = this.chart.rangeSelector;
|
|
803
|
-
options.dataGrouping = merge(baseOptions, defaultOptions, plotOptions.series && plotOptions.series.dataGrouping, // #1228
|
|
804
|
-
// Set by the StockChart constructor:
|
|
805
|
-
plotOptions[type].dataGrouping, this.userOptions.dataGrouping, !options.isInternal &&
|
|
806
|
-
rangeSelector &&
|
|
807
|
-
isNumber(rangeSelector.selected) &&
|
|
808
|
-
rangeSelector.buttonOptions[rangeSelector.selected].dataGrouping);
|
|
809
|
-
}
|
|
810
|
-
});
|
|
811
|
-
// When resetting the scale reset the hasProccessed flag to avoid taking
|
|
812
|
-
// previous data grouping of neighbour series into accound when determining
|
|
813
|
-
// group pixel width (#2692).
|
|
814
|
-
addEvent(Axis, 'afterSetScale', function () {
|
|
815
|
-
this.series.forEach(function (series) {
|
|
816
|
-
series.hasProcessed = false;
|
|
817
|
-
});
|
|
818
|
-
});
|
|
819
|
-
/* *
|
|
820
|
-
*
|
|
821
|
-
* Default Export
|
|
822
|
-
*
|
|
823
|
-
* */
|
|
824
|
-
// @todo move to master
|
|
825
|
-
H.dataGrouping = dataGrouping;
|
|
826
|
-
export default dataGrouping;
|
|
827
|
-
/* *
|
|
828
|
-
*
|
|
829
|
-
* API Declarations
|
|
830
|
-
*
|
|
831
|
-
* */
|
|
832
|
-
/**
|
|
833
|
-
* @typedef {"average"|"averages"|"open"|"high"|"low"|"close"|"sum"} Highcharts.DataGroupingApproximationValue
|
|
834
|
-
*/
|
|
835
|
-
/**
|
|
836
|
-
* The position of the point inside the group.
|
|
837
|
-
*
|
|
838
|
-
* @typedef {"start"|"middle"|"end"} Highcharts.DataGroupingAnchor
|
|
839
|
-
*/
|
|
840
|
-
/**
|
|
841
|
-
* The position of the first or last point in the series inside the group.
|
|
842
|
-
*
|
|
843
|
-
* @typedef {"start"|"middle"|"end"|"firstPoint"|"lastPoint"} Highcharts.DataGroupingAnchorExtremes
|
|
844
|
-
*/
|
|
845
|
-
/**
|
|
846
|
-
* Highcharts Stock only.
|
|
847
|
-
*
|
|
848
|
-
* @product highstock
|
|
849
|
-
* @interface Highcharts.DataGroupingInfoObject
|
|
850
|
-
*/ /**
|
|
851
|
-
* @name Highcharts.DataGroupingInfoObject#length
|
|
852
|
-
* @type {number}
|
|
853
|
-
*/ /**
|
|
854
|
-
* @name Highcharts.DataGroupingInfoObject#options
|
|
855
|
-
* @type {Highcharts.SeriesOptionsType|undefined}
|
|
856
|
-
*/ /**
|
|
857
|
-
* @name Highcharts.DataGroupingInfoObject#start
|
|
858
|
-
* @type {number}
|
|
859
|
-
*/
|
|
860
|
-
/**
|
|
861
|
-
* Highcharts Stock only. If a point object is created by data
|
|
862
|
-
* grouping, it doesn't reflect actual points in the raw
|
|
863
|
-
* data. In this case, the `dataGroup` property holds
|
|
864
|
-
* information that points back to the raw data.
|
|
865
|
-
*
|
|
866
|
-
* - `dataGroup.start` is the index of the first raw data
|
|
867
|
-
* point in the group.
|
|
868
|
-
*
|
|
869
|
-
* - `dataGroup.length` is the amount of points in the
|
|
870
|
-
* group.
|
|
871
|
-
*
|
|
872
|
-
* @sample stock/members/point-datagroup
|
|
873
|
-
* Click to inspect raw data points
|
|
874
|
-
*
|
|
875
|
-
* @product highstock
|
|
876
|
-
*
|
|
877
|
-
* @name Highcharts.Point#dataGroup
|
|
878
|
-
* @type {Highcharts.DataGroupingInfoObject|undefined}
|
|
879
|
-
*/
|
|
880
|
-
(''); // detach doclets above
|
|
881
|
-
/* *
|
|
882
|
-
*
|
|
883
|
-
* API Options
|
|
884
|
-
*
|
|
885
|
-
* */
|
|
886
|
-
/**
|
|
887
|
-
* Data grouping is the concept of sampling the data values into larger
|
|
888
|
-
* blocks in order to ease readability and increase performance of the
|
|
889
|
-
* JavaScript charts. Highcharts Stock by default applies data grouping when
|
|
890
|
-
* the points become closer than a certain pixel value, determined by
|
|
891
|
-
* the `groupPixelWidth` option.
|
|
892
|
-
*
|
|
893
|
-
* If data grouping is applied, the grouping information of grouped
|
|
894
|
-
* points can be read from the [Point.dataGroup](
|
|
895
|
-
* /class-reference/Highcharts.Point#dataGroup). If point options other than
|
|
896
|
-
* the data itself are set, for example `name` or `color` or custom properties,
|
|
897
|
-
* the grouping logic doesn't know how to group it. In this case the options of
|
|
898
|
-
* the first point instance are copied over to the group point. This can be
|
|
899
|
-
* altered through a custom `approximation` callback function.
|
|
900
|
-
*
|
|
901
|
-
* @declare Highcharts.DataGroupingOptionsObject
|
|
902
|
-
* @product highstock
|
|
903
|
-
* @requires product:highstock
|
|
904
|
-
* @requires module:modules/datagrouping
|
|
905
|
-
* @apioption plotOptions.series.dataGrouping
|
|
906
|
-
*/
|
|
907
|
-
/**
|
|
908
|
-
* Specifies how the points should be located on the X axis inside the group.
|
|
909
|
-
* Points that are extremes can be set separately. Available options:
|
|
910
|
-
*
|
|
911
|
-
* - `start` places the point at the beginning of the group
|
|
912
|
-
* (e.g. range 00:00:00 - 23:59:59 -> 00:00:00)
|
|
913
|
-
*
|
|
914
|
-
* - `middle` places the point in the middle of the group
|
|
915
|
-
* (e.g. range 00:00:00 - 23:59:59 -> 12:00:00)
|
|
916
|
-
*
|
|
917
|
-
* - `end` places the point at the end of the group
|
|
918
|
-
* (e.g. range 00:00:00 - 23:59:59 -> 23:59:59)
|
|
919
|
-
*
|
|
920
|
-
* @sample {highstock} stock/plotoptions/series-datagrouping-anchor
|
|
921
|
-
* Changing the point x-coordinate inside the group.
|
|
922
|
-
*
|
|
923
|
-
* @see [dataGrouping.firstAnchor](#plotOptions.series.dataGrouping.firstAnchor)
|
|
924
|
-
* @see [dataGrouping.lastAnchor](#plotOptions.series.dataGrouping.lastAnchor)
|
|
925
|
-
*
|
|
926
|
-
* @type {Highcharts.DataGroupingAnchor}
|
|
927
|
-
* @since 9.1.0
|
|
928
|
-
* @default start
|
|
929
|
-
* @apioption plotOptions.series.dataGrouping.anchor
|
|
930
|
-
*/
|
|
931
|
-
/**
|
|
932
|
-
* The method of approximation inside a group. When for example 30 days
|
|
933
|
-
* are grouped into one month, this determines what value should represent
|
|
934
|
-
* the group. Possible values are "average", "averages", "open", "high",
|
|
935
|
-
* "low", "close" and "sum". For OHLC and candlestick series the approximation
|
|
936
|
-
* is "ohlc" by default, which finds the open, high, low and close values
|
|
937
|
-
* within all the grouped data. For ranges, the approximation is "range",
|
|
938
|
-
* which finds the low and high values. For multi-dimensional data,
|
|
939
|
-
* like ranges and OHLC, "averages" will compute the average for each
|
|
940
|
-
* dimension.
|
|
941
|
-
*
|
|
942
|
-
* Custom aggregate methods can be added by assigning a callback function
|
|
943
|
-
* as the approximation. This function takes a numeric array as the
|
|
944
|
-
* argument and should return a single numeric value or `null`. Note
|
|
945
|
-
* that the numeric array will never contain null values, only true
|
|
946
|
-
* numbers. Instead, if null values are present in the raw data, the
|
|
947
|
-
* numeric array will have an `.hasNulls` property set to `true`. For
|
|
948
|
-
* single-value data sets the data is available in the first argument
|
|
949
|
-
* of the callback function. For OHLC data sets, all the open values
|
|
950
|
-
* are in the first argument, all high values in the second etc.
|
|
951
|
-
*
|
|
952
|
-
* Since v4.2.7, grouping meta data is available in the approximation
|
|
953
|
-
* callback from `this.dataGroupInfo`. It can be used to extract information
|
|
954
|
-
* from the raw data.
|
|
955
|
-
*
|
|
956
|
-
* Defaults to `average` for line-type series, `sum` for columns, `range`
|
|
957
|
-
* for range series, `hlc` for HLC, and `ohlc` for OHLC and candlestick.
|
|
958
|
-
*
|
|
959
|
-
* @sample {highstock} stock/plotoptions/series-datagrouping-approximation
|
|
960
|
-
* Approximation callback with custom data
|
|
961
|
-
* @sample {highstock} stock/plotoptions/series-datagrouping-simple-approximation
|
|
962
|
-
* Simple approximation demo
|
|
963
|
-
*
|
|
964
|
-
* @type {Highcharts.DataGroupingApproximationValue|Function}
|
|
965
|
-
* @apioption plotOptions.series.dataGrouping.approximation
|
|
966
|
-
*/
|
|
967
|
-
/**
|
|
968
|
-
* Datetime formats for the header of the tooltip in a stock chart.
|
|
969
|
-
* The format can vary within a chart depending on the currently selected
|
|
970
|
-
* time range and the current data grouping.
|
|
971
|
-
*
|
|
972
|
-
* The default formats are:
|
|
973
|
-
* ```js
|
|
974
|
-
* {
|
|
975
|
-
* millisecond: [
|
|
976
|
-
* '%A, %b %e, %H:%M:%S.%L', '%A, %b %e, %H:%M:%S.%L', '-%H:%M:%S.%L'
|
|
977
|
-
* ],
|
|
978
|
-
* second: ['%A, %b %e, %H:%M:%S', '%A, %b %e, %H:%M:%S', '-%H:%M:%S'],
|
|
979
|
-
* minute: ['%A, %b %e, %H:%M', '%A, %b %e, %H:%M', '-%H:%M'],
|
|
980
|
-
* hour: ['%A, %b %e, %H:%M', '%A, %b %e, %H:%M', '-%H:%M'],
|
|
981
|
-
* day: ['%A, %b %e, %Y', '%A, %b %e', '-%A, %b %e, %Y'],
|
|
982
|
-
* week: ['Week from %A, %b %e, %Y', '%A, %b %e', '-%A, %b %e, %Y'],
|
|
983
|
-
* month: ['%B %Y', '%B', '-%B %Y'],
|
|
984
|
-
* year: ['%Y', '%Y', '-%Y']
|
|
985
|
-
* }
|
|
986
|
-
* ```
|
|
987
|
-
*
|
|
988
|
-
* For each of these array definitions, the first item is the format
|
|
989
|
-
* used when the active time span is one unit. For instance, if the
|
|
990
|
-
* current data applies to one week, the first item of the week array
|
|
991
|
-
* is used. The second and third items are used when the active time
|
|
992
|
-
* span is more than two units. For instance, if the current data applies
|
|
993
|
-
* to two weeks, the second and third item of the week array are used,
|
|
994
|
-
* and applied to the start and end date of the time span.
|
|
995
|
-
*
|
|
996
|
-
* @type {Object}
|
|
997
|
-
* @apioption plotOptions.series.dataGrouping.dateTimeLabelFormats
|
|
998
|
-
*/
|
|
999
|
-
/**
|
|
1000
|
-
* Enable or disable data grouping.
|
|
1001
|
-
*
|
|
1002
|
-
* @type {boolean}
|
|
1003
|
-
* @default true
|
|
1004
|
-
* @apioption plotOptions.series.dataGrouping.enabled
|
|
1005
|
-
*/
|
|
1006
|
-
/**
|
|
1007
|
-
* Specifies how the first grouped point is positioned on the xAxis.
|
|
1008
|
-
* If firstAnchor and/or lastAnchor are defined, then those options take
|
|
1009
|
-
* precedence over anchor for the first and/or last grouped points.
|
|
1010
|
-
* Available options:
|
|
1011
|
-
*
|
|
1012
|
-
* -`start` places the point at the beginning of the group
|
|
1013
|
-
* (e.g. range 00:00:00 - 23:59:59 -> 00:00:00)
|
|
1014
|
-
*
|
|
1015
|
-
* -`middle` places the point in the middle of the group
|
|
1016
|
-
* (e.g. range 00:00:00 - 23:59:59 -> 12:00:00)
|
|
1017
|
-
*
|
|
1018
|
-
* -`end` places the point at the end of the group
|
|
1019
|
-
* (e.g. range 00:00:00 - 23:59:59 -> 23:59:59)
|
|
1020
|
-
*
|
|
1021
|
-
* -`firstPoint` the first point in the group
|
|
1022
|
-
* (e.g. points at 00:13, 00:35, 00:59 -> 00:13)
|
|
1023
|
-
*
|
|
1024
|
-
* -`lastPoint` the last point in the group
|
|
1025
|
-
* (e.g. points at 00:13, 00:35, 00:59 -> 00:59)
|
|
1026
|
-
*
|
|
1027
|
-
* @sample {highstock} stock/plotoptions/series-datagrouping-first-anchor
|
|
1028
|
-
* Applying first and last anchor.
|
|
1029
|
-
*
|
|
1030
|
-
* @see [dataGrouping.anchor](#plotOptions.series.dataGrouping.anchor)
|
|
1031
|
-
*
|
|
1032
|
-
* @type {Highcharts.DataGroupingAnchorExtremes}
|
|
1033
|
-
* @since 9.1.0
|
|
1034
|
-
* @default start
|
|
1035
|
-
* @apioption plotOptions.series.dataGrouping.firstAnchor
|
|
1036
|
-
*/
|
|
1037
|
-
/**
|
|
1038
|
-
* When data grouping is forced, it runs no matter how small the intervals
|
|
1039
|
-
* are. This can be handy for example when the sum should be calculated
|
|
1040
|
-
* for values appearing at random times within each hour.
|
|
1041
|
-
*
|
|
1042
|
-
* @type {boolean}
|
|
1043
|
-
* @default false
|
|
1044
|
-
* @apioption plotOptions.series.dataGrouping.forced
|
|
1045
|
-
*/
|
|
1046
|
-
/**
|
|
1047
|
-
* The approximate pixel width of each group. If for example a series
|
|
1048
|
-
* with 30 points is displayed over a 600 pixel wide plot area, no grouping
|
|
1049
|
-
* is performed. If however the series contains so many points that
|
|
1050
|
-
* the spacing is less than the groupPixelWidth, Highcharts will try
|
|
1051
|
-
* to group it into appropriate groups so that each is more or less
|
|
1052
|
-
* two pixels wide. If multiple series with different group pixel widths
|
|
1053
|
-
* are drawn on the same x axis, all series will take the greatest width.
|
|
1054
|
-
* For example, line series have 2px default group width, while column
|
|
1055
|
-
* series have 10px. If combined, both the line and the column will
|
|
1056
|
-
* have 10px by default.
|
|
1057
|
-
*
|
|
1058
|
-
* @type {number}
|
|
1059
|
-
* @default 2
|
|
1060
|
-
* @apioption plotOptions.series.dataGrouping.groupPixelWidth
|
|
1061
|
-
*/
|
|
1062
|
-
/**
|
|
1063
|
-
* By default only points within the visible range are grouped. Enabling this
|
|
1064
|
-
* option will force data grouping to calculate all grouped points for a given
|
|
1065
|
-
* dataset. That option prevents for example a column series from calculating
|
|
1066
|
-
* a grouped point partially. The effect is similar to
|
|
1067
|
-
* [Series.getExtremesFromAll](#plotOptions.series.getExtremesFromAll) but does
|
|
1068
|
-
* not affect yAxis extremes.
|
|
1069
|
-
*
|
|
1070
|
-
* @sample {highstock} stock/plotoptions/series-datagrouping-groupall/
|
|
1071
|
-
* Two series with the same data but different groupAll setting
|
|
1072
|
-
*
|
|
1073
|
-
* @type {boolean}
|
|
1074
|
-
* @default false
|
|
1075
|
-
* @since 6.1.0
|
|
1076
|
-
* @apioption plotOptions.series.dataGrouping.groupAll
|
|
1077
|
-
*/
|
|
1078
|
-
/**
|
|
1079
|
-
* Specifies how the last grouped point is positioned on the xAxis.
|
|
1080
|
-
* If firstAnchor and/or lastAnchor are defined, then those options take
|
|
1081
|
-
* precedence over anchor for the first and/or last grouped points.
|
|
1082
|
-
* Available options:
|
|
1083
|
-
*
|
|
1084
|
-
* -`start` places the point at the beginning of the group
|
|
1085
|
-
* (e.g. range 00:00:00 - 23:59:59 -> 00:00:00)
|
|
1086
|
-
*
|
|
1087
|
-
* -`middle` places the point in the middle of the group
|
|
1088
|
-
* (e.g. range 00:00:00 - 23:59:59 -> 12:00:00)
|
|
1089
|
-
*
|
|
1090
|
-
* -`end` places the point at the end of the group
|
|
1091
|
-
* (e.g. range 00:00:00 - 23:59:59 -> 23:59:59)
|
|
1092
|
-
*
|
|
1093
|
-
* -`firstPoint` the first point in the group
|
|
1094
|
-
* (e.g. points at 00:13, 00:35, 00:59 -> 00:13)
|
|
1095
|
-
*
|
|
1096
|
-
* -`lastPoint` the last point in the group
|
|
1097
|
-
* (e.g. points at 00:13, 00:35, 00:59 -> 00:59)
|
|
1098
|
-
*
|
|
1099
|
-
* @sample {highstock} stock/plotoptions/series-datagrouping-first-anchor
|
|
1100
|
-
* Applying first and last anchor.
|
|
1101
|
-
*
|
|
1102
|
-
* @sample {highstock} stock/plotoptions/series-datagrouping-last-anchor
|
|
1103
|
-
* Applying the last anchor in the chart with live data.
|
|
1104
|
-
*
|
|
1105
|
-
* @see [dataGrouping.anchor](#plotOptions.series.dataGrouping.anchor)
|
|
1106
|
-
*
|
|
1107
|
-
* @type {Highcharts.DataGroupingAnchorExtremes}
|
|
1108
|
-
* @since 9.1.0
|
|
1109
|
-
* @default start
|
|
1110
|
-
* @apioption plotOptions.series.dataGrouping.lastAnchor
|
|
1111
|
-
*/
|
|
1112
|
-
/**
|
|
1113
|
-
* Normally, a group is indexed by the start of that group, so for example
|
|
1114
|
-
* when 30 daily values are grouped into one month, that month's x value
|
|
1115
|
-
* will be the 1st of the month. This apparently shifts the data to
|
|
1116
|
-
* the left. When the smoothed option is true, this is compensated for.
|
|
1117
|
-
* The data is shifted to the middle of the group, and min and max
|
|
1118
|
-
* values are preserved. Internally, this is used in the Navigator series.
|
|
1119
|
-
*
|
|
1120
|
-
* @type {boolean}
|
|
1121
|
-
* @default false
|
|
1122
|
-
* @deprecated
|
|
1123
|
-
* @apioption plotOptions.series.dataGrouping.smoothed
|
|
1124
|
-
*/
|
|
1125
|
-
/**
|
|
1126
|
-
* An array determining what time intervals the data is allowed to be
|
|
1127
|
-
* grouped to. Each array item is an array where the first value is
|
|
1128
|
-
* the time unit and the second value another array of allowed multiples.
|
|
1129
|
-
*
|
|
1130
|
-
* Defaults to:
|
|
1131
|
-
* ```js
|
|
1132
|
-
* units: [[
|
|
1133
|
-
* 'millisecond', // unit name
|
|
1134
|
-
* [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
|
|
1135
|
-
* ], [
|
|
1136
|
-
* 'second',
|
|
1137
|
-
* [1, 2, 5, 10, 15, 30]
|
|
1138
|
-
* ], [
|
|
1139
|
-
* 'minute',
|
|
1140
|
-
* [1, 2, 5, 10, 15, 30]
|
|
1141
|
-
* ], [
|
|
1142
|
-
* 'hour',
|
|
1143
|
-
* [1, 2, 3, 4, 6, 8, 12]
|
|
1144
|
-
* ], [
|
|
1145
|
-
* 'day',
|
|
1146
|
-
* [1]
|
|
1147
|
-
* ], [
|
|
1148
|
-
* 'week',
|
|
1149
|
-
* [1]
|
|
1150
|
-
* ], [
|
|
1151
|
-
* 'month',
|
|
1152
|
-
* [1, 3, 6]
|
|
1153
|
-
* ], [
|
|
1154
|
-
* 'year',
|
|
1155
|
-
* null
|
|
1156
|
-
* ]]
|
|
1157
|
-
* ```
|
|
1158
|
-
*
|
|
1159
|
-
* @type {Array<Array<string,(Array<number>|null)>>}
|
|
1160
|
-
* @apioption plotOptions.series.dataGrouping.units
|
|
1161
|
-
*/
|
|
1162
|
-
/**
|
|
1163
|
-
* The approximate pixel width of each group. If for example a series
|
|
1164
|
-
* with 30 points is displayed over a 600 pixel wide plot area, no grouping
|
|
1165
|
-
* is performed. If however the series contains so many points that
|
|
1166
|
-
* the spacing is less than the groupPixelWidth, Highcharts will try
|
|
1167
|
-
* to group it into appropriate groups so that each is more or less
|
|
1168
|
-
* two pixels wide. Defaults to `10`.
|
|
1169
|
-
*
|
|
1170
|
-
* @sample {highstock} stock/plotoptions/series-datagrouping-grouppixelwidth/
|
|
1171
|
-
* Two series with the same data density but different groupPixelWidth
|
|
1172
|
-
*
|
|
1173
|
-
* @type {number}
|
|
1174
|
-
* @default 10
|
|
1175
|
-
* @apioption plotOptions.column.dataGrouping.groupPixelWidth
|
|
1176
|
-
*/
|
|
1177
|
-
''; // required by JSDoc parsing
|