highcharts 9.2.0 → 9.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/README.md +13 -6
- package/bower.json +1 -1
- package/css/annotations/popup.css +48 -8
- package/css/annotations/popup.scss +70 -22
- package/css/highcharts.css +45 -0
- package/css/highcharts.scss +40 -0
- package/css/themes/dark-unica.css +45 -0
- package/css/themes/grid-light.css +45 -0
- package/css/themes/sand-signika.css +45 -0
- package/es-modules/Accessibility/A11yI18n.js +273 -224
- package/es-modules/Accessibility/Accessibility.js +237 -128
- package/es-modules/Accessibility/AccessibilityComponent.js +79 -314
- package/es-modules/Accessibility/Components/AnnotationsA11y.js +10 -0
- package/es-modules/Accessibility/Components/ContainerComponent.js +52 -27
- package/es-modules/Accessibility/Components/InfoRegionsComponent.js +173 -104
- package/es-modules/Accessibility/Components/LegendComponent.js +97 -65
- package/es-modules/Accessibility/Components/MenuComponent.js +243 -149
- package/es-modules/Accessibility/Components/RangeSelectorComponent.js +170 -88
- package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +152 -115
- package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +133 -68
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +64 -27
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +38 -21
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +380 -325
- package/es-modules/Accessibility/Components/ZoomComponent.js +28 -20
- package/es-modules/Accessibility/FocusBorder.js +192 -147
- package/es-modules/Accessibility/HighContrastMode.js +78 -66
- package/es-modules/Accessibility/HighContrastTheme.js +10 -0
- package/es-modules/Accessibility/KeyboardNavigation.js +146 -71
- package/es-modules/Accessibility/KeyboardNavigationHandler.js +71 -44
- package/es-modules/Accessibility/Options/DeprecatedOptions.js +11 -1
- package/es-modules/Accessibility/Options/LangOptions.js +1 -2
- package/es-modules/Accessibility/Options/Options.js +32 -17
- package/es-modules/Accessibility/ProxyElement.js +212 -0
- package/es-modules/Accessibility/ProxyProvider.js +305 -0
- package/es-modules/Accessibility/Utils/Announcer.js +15 -8
- package/es-modules/Accessibility/Utils/ChartUtilities.js +41 -16
- package/es-modules/Accessibility/Utils/DOMElementProvider.js +27 -15
- package/es-modules/Accessibility/Utils/EventProvider.js +27 -17
- package/es-modules/Accessibility/Utils/HTMLUtilities.js +125 -30
- package/es-modules/Core/Axis/Axis.js +37 -30
- package/es-modules/Core/Axis/AxisDefaults.js +35 -24
- package/es-modules/Core/Axis/Color/ColorAxisComposition.js +54 -4
- package/es-modules/Core/Axis/Color/ColorAxisDefaults.js +5 -5
- package/es-modules/Core/Axis/OrdinalAxis.js +5 -13
- package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +4 -5
- package/es-modules/Core/Axis/ScrollbarAxis.js +10 -3
- package/es-modules/Core/Axis/TreeGridAxis.js +2 -2
- package/es-modules/Core/Axis/TreeGridTick.js +1 -2
- package/es-modules/Core/Chart/Chart.js +2 -3
- package/es-modules/Core/Chart/ChartDefaults.js +3 -4
- package/es-modules/Core/Chart/ChartNavigationComposition.js +92 -0
- package/es-modules/Core/Chart/MapChart.js +10 -22
- package/es-modules/Core/Chart/StockChart.js +3 -293
- package/es-modules/Core/Color/Palettes.js +22 -0
- package/es-modules/Core/DefaultOptions.js +19 -17
- package/es-modules/Core/Foundation.js +39 -31
- package/es-modules/Core/Globals.js +1 -1
- package/es-modules/Core/HttpUtilities.js +3 -3
- package/es-modules/Core/Legend/Legend.js +7 -3
- package/es-modules/Core/Navigator.js +7 -8
- package/es-modules/Core/Pointer.js +39 -36
- package/es-modules/Core/Renderer/HTML/AST.js +3 -6
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +23 -18
- package/es-modules/Core/Renderer/SVG/SVGElement.js +3 -4
- package/es-modules/Core/Renderer/SVG/SVGRenderer.js +21 -18
- package/es-modules/Core/Renderer/SVG/TextBuilder.js +17 -13
- package/es-modules/Core/ScrollbarDefaults.js +10 -9
- package/es-modules/Core/Series/DataLabel.js +2 -3
- package/es-modules/Core/Series/Point.js +5 -3
- package/es-modules/Core/Series/Series.js +156 -162
- package/es-modules/Core/Series/SeriesDefaults.js +3 -4
- package/es-modules/Core/Series/SeriesRegistry.js +1 -2
- package/es-modules/Core/Tooltip.js +44 -17
- package/es-modules/Core/Utilities.js +15 -7
- package/es-modules/Data/DataConverter.js +489 -0
- package/es-modules/Data/DataPromise.js +252 -0
- package/es-modules/Data/DataSeriesConverter.js +203 -0
- package/es-modules/Data/DataTable.js +1204 -0
- package/es-modules/Data/Modifiers/ChainModifier.js +299 -0
- package/es-modules/Data/Modifiers/DataModifier.js +303 -0
- package/es-modules/Data/Modifiers/GroupModifier.js +144 -0
- package/es-modules/Data/Modifiers/InvertModifier.js +254 -0
- package/es-modules/Data/Modifiers/RangeModifier.js +143 -0
- package/es-modules/Data/Modifiers/SeriesPointsModifier.js +110 -0
- package/es-modules/Data/Modifiers/SortModifier.js +249 -0
- package/es-modules/Data/Parsers/CSVParser.js +399 -0
- package/es-modules/Data/Parsers/DataParser.js +101 -0
- package/es-modules/Data/Parsers/GoogleSheetsParser.js +220 -0
- package/es-modules/Data/Parsers/HTMLTableParser.js +213 -0
- package/es-modules/Data/Stores/CSVStore.js +317 -0
- package/es-modules/Data/Stores/DataStore.js +276 -0
- package/es-modules/Data/Stores/GoogleSheetsStore.js +167 -0
- package/es-modules/Data/Stores/HTMLTableStore.js +351 -0
- package/es-modules/Extensions/Annotations/Annotations.js +61 -11
- package/es-modules/Extensions/Annotations/ControlPoint.js +1 -1
- package/es-modules/Extensions/Annotations/Controllables/ControllableEllipse.js +199 -0
- package/es-modules/Extensions/Annotations/Mixins/ControllableMixin.js +7 -1
- package/es-modules/Extensions/Annotations/NavigationBindings.js +90 -28
- package/es-modules/Extensions/Annotations/Popup.js +479 -141
- package/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +51 -2
- package/es-modules/Extensions/Annotations/Types/CrookedLine.js +1 -1
- package/es-modules/Extensions/Annotations/Types/Fibonacci.js +2 -3
- package/es-modules/Extensions/Annotations/Types/FibonacciTimeZones.js +219 -0
- package/es-modules/Extensions/Annotations/Types/InfinityLine.js +1 -1
- package/es-modules/Extensions/Annotations/Types/Measure.js +14 -8
- package/es-modules/Extensions/Annotations/Types/Pitchfork.js +5 -5
- package/es-modules/Extensions/Annotations/Types/TimeCycles.js +207 -0
- package/es-modules/Extensions/Annotations/Types/Tunnel.js +3 -5
- package/es-modules/Extensions/Annotations/Types/VerticalLine.js +1 -1
- package/es-modules/Extensions/Boost/BoostOptions.js +2 -2
- package/es-modules/Extensions/Boost/BoostOverrides.js +3 -1
- package/es-modules/Extensions/Boost/WGLShader.js +4 -3
- package/es-modules/Extensions/BoostCanvas.js +1 -2
- package/es-modules/Extensions/CurrentDateIndication.js +2 -3
- package/es-modules/Extensions/Data.js +73 -67
- package/es-modules/Extensions/DataGrouping.js +33 -18
- package/es-modules/Extensions/Debugger/ErrorMessages.js +2 -2
- package/es-modules/Extensions/DownloadURL.js +2 -2
- package/es-modules/Extensions/DragPanes.js +1 -2
- package/es-modules/Extensions/Drilldown.js +2 -3
- package/es-modules/Extensions/Exporting/Exporting.js +12 -11
- package/es-modules/Extensions/Exporting/ExportingDefaults.js +8 -15
- package/es-modules/Extensions/GeoJSON.js +39 -63
- package/es-modules/Extensions/MarkerClusters.js +115 -97
- package/es-modules/Extensions/NoDataToDisplay.js +1 -2
- package/es-modules/Extensions/OfflineExporting/OfflineExporting.js +10 -9
- package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
- package/es-modules/Extensions/Oldie/Oldie.js +2 -3
- package/es-modules/Extensions/Pane.js +5 -6
- package/es-modules/Extensions/Polar.js +1 -1
- package/es-modules/Extensions/RangeSelector.js +3 -4
- package/es-modules/Extensions/Sonification/ChartSonify.js +247 -637
- package/es-modules/Extensions/Sonification/Earcon.js +136 -102
- package/es-modules/Extensions/Sonification/Instrument.js +496 -426
- package/es-modules/Extensions/Sonification/MusicalFrequencies.js +10 -0
- package/es-modules/Extensions/Sonification/Options.js +10 -0
- package/es-modules/Extensions/Sonification/PointSonify.js +203 -152
- package/es-modules/Extensions/Sonification/SeriesSonify.js +459 -0
- package/es-modules/Extensions/Sonification/SignalHandler.js +124 -0
- package/es-modules/Extensions/Sonification/Sonification.js +26 -52
- package/es-modules/Extensions/Sonification/{Utilities.js → SonificationUtilities.js} +62 -84
- package/es-modules/Extensions/Sonification/Timeline.js +255 -567
- package/es-modules/Extensions/Sonification/TimelineEvent.js +158 -0
- package/es-modules/Extensions/Sonification/TimelinePath.js +311 -0
- package/es-modules/Maps/MapNavigation.js +27 -64
- package/es-modules/Maps/MapNavigationOptionsDefault.js +3 -0
- package/es-modules/Maps/MapPointer.js +7 -5
- package/es-modules/Maps/MapView.js +450 -0
- package/es-modules/Maps/MapViewOptionsDefault.js +97 -0
- package/es-modules/Maps/Projection.js +436 -0
- package/es-modules/Maps/ProjectionDefinition.js +9 -0
- package/es-modules/Maps/Projections/EqualEarth.js +42 -0
- package/es-modules/Maps/Projections/LambertConformalConic.js +52 -0
- package/es-modules/Maps/Projections/Miller.js +16 -0
- package/es-modules/Maps/Projections/Orthographic.js +26 -0
- package/es-modules/Maps/Projections/ProjectionRegistry.js +19 -0
- package/es-modules/Maps/Projections/WebMercator.js +24 -0
- package/es-modules/Series/AreaRange/AreaRangeSeries.js +4 -5
- package/es-modules/Series/Bellcurve/BellcurveSeries.js +2 -8
- package/es-modules/Series/BoxPlot/BoxPlotSeries.js +1 -2
- package/es-modules/Series/Bubble/BubbleLegendDefaults.js +1 -2
- package/es-modules/Series/Bubble/BubbleLegendItem.js +3 -3
- package/es-modules/Series/Bubble/BubblePoint.js +5 -0
- package/es-modules/Series/Bubble/BubbleSeries.js +90 -50
- package/es-modules/Series/Candlestick/CandlestickSeries.js +10 -18
- package/es-modules/{Mixins/CenteredSeries.js → Series/CenteredUtilities.js} +45 -23
- package/es-modules/Series/ColorMapComposition.js +109 -0
- package/es-modules/Series/Column/ColumnDataLabel.js +5 -5
- package/es-modules/Series/Column/ColumnSeries.js +3 -4
- package/es-modules/Series/ColumnPyramid/ColumnPyramidSeries.js +6 -6
- package/es-modules/Series/DataModifyComposition.js +539 -0
- package/es-modules/Series/DependencyWheel/DependencyWheelPoint.js +2 -6
- package/es-modules/Series/DerivedComposition.js +137 -0
- package/es-modules/Series/DrawPointComposition.js +111 -0
- package/es-modules/Series/Dumbbell/DumbbellSeries.js +2 -3
- package/es-modules/Series/ErrorBar/ErrorBarSeries.js +1 -2
- package/es-modules/Series/Flags/FlagsSeries.js +18 -25
- package/es-modules/Series/Funnel/FunnelSeries.js +6 -5
- package/es-modules/Series/Gantt/GanttSeries.js +0 -2
- package/es-modules/Series/Gauge/GaugePoint.js +1 -1
- package/es-modules/Series/Gauge/GaugeSeries.js +7 -7
- package/es-modules/Series/HLC/HLCPoint.js +55 -0
- package/es-modules/Series/HLC/HLCSeries.js +383 -0
- package/es-modules/Series/Heatmap/HeatmapPoint.js +3 -4
- package/es-modules/Series/Heatmap/HeatmapSeries.js +19 -6
- package/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +2 -3
- package/es-modules/Series/Histogram/HistogramSeries.js +3 -7
- package/es-modules/Series/HollowCandlestick/HollowCandlestickPoint.js +2 -2
- package/es-modules/Series/HollowCandlestick/HollowCandlestickSeries.js +33 -34
- package/es-modules/Series/Line/LineSeries.js +1 -2
- package/es-modules/Series/Map/MapPoint.js +23 -16
- package/es-modules/Series/Map/MapSeries.js +271 -309
- package/es-modules/Series/MapBubble/MapBubblePoint.js +0 -3
- package/es-modules/Series/MapBubble/MapBubbleSeries.js +10 -1
- package/es-modules/Series/MapLine/MapLineSeries.js +2 -0
- package/es-modules/Series/MapPoint/MapPointPoint.js +5 -1
- package/es-modules/Series/MapPoint/MapPointSeries.js +99 -14
- package/es-modules/Series/Networkgraph/Networkgraph.js +5 -5
- package/es-modules/{Mixins/Nodes.js → Series/NodesComposition.js} +76 -29
- package/es-modules/Series/OHLC/OHLCPoint.js +2 -6
- package/es-modules/Series/OHLC/OHLCSeries.js +55 -183
- package/es-modules/{Mixins/OnSeries.js → Series/OnSeriesComposition.js} +53 -21
- package/es-modules/Series/Organization/OrganizationSeries.js +2 -3
- package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +46 -6
- package/es-modules/Series/ParetoSeries/ParetoSeries.js +3 -7
- package/es-modules/Series/Pie/PieDataLabel.js +1 -2
- package/es-modules/Series/Pie/PieSeries.js +6 -7
- package/es-modules/Series/Sankey/SankeyPoint.js +0 -4
- package/es-modules/Series/Sankey/SankeySeries.js +89 -20
- package/es-modules/Series/Sunburst/SunburstPoint.js +2 -3
- package/es-modules/Series/Sunburst/SunburstSeries.js +4 -4
- package/es-modules/Series/Tilemap/TilemapPoint.js +2 -3
- package/es-modules/Series/Timeline/TimelineSeries.js +3 -4
- package/es-modules/{Mixins/TreeSeries.js → Series/TreeUtilities.js} +86 -76
- package/es-modules/Series/Treemap/TreemapPoint.js +2 -2
- package/es-modules/Series/Treemap/TreemapSeries.js +8 -8
- package/es-modules/Series/Venn/VennPoint.js +16 -7
- package/es-modules/Series/Venn/VennSeries.js +5 -8
- package/es-modules/Series/Venn/VennUtils.js +550 -439
- package/es-modules/Series/Waterfall/WaterfallSeries.js +2 -3
- package/es-modules/Series/Windbarb/WindbarbSeries.js +23 -24
- package/es-modules/Series/Wordcloud/WordcloudPoint.js +8 -6
- package/es-modules/Series/Wordcloud/WordcloudSeries.js +24 -20
- package/es-modules/Series/Wordcloud/WordcloudUtils.js +673 -484
- package/es-modules/Series/XRange/XRangePoint.js +1 -0
- package/es-modules/Stock/Indicators/ABands/ABandsIndicator.js +3 -6
- package/es-modules/Stock/Indicators/AO/AOIndicator.js +2 -3
- package/es-modules/Stock/Indicators/APO/APOIndicator.js +14 -20
- package/es-modules/Stock/Indicators/Aroon/AroonIndicator.js +3 -6
- package/es-modules/Stock/Indicators/AroonOscillator/AroonOscillatorIndicator.js +11 -13
- package/es-modules/Stock/Indicators/ArrayUtilities.js +47 -0
- package/es-modules/Stock/Indicators/BB/BBIndicator.js +27 -11
- package/es-modules/Stock/Indicators/Chaikin/ChaikinIndicator.js +6 -12
- package/es-modules/Stock/Indicators/DEMA/DEMAIndicator.js +1 -11
- package/es-modules/Stock/Indicators/DMI/DMIIndicator.js +19 -11
- package/es-modules/Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js +17 -11
- package/es-modules/Stock/Indicators/EMA/EMAIndicator.js +1 -3
- package/es-modules/Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js +11 -9
- package/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +8 -16
- package/es-modules/Stock/Indicators/LinearRegression/LinearRegression.js +2 -2
- package/es-modules/Stock/Indicators/LinearRegressionAngle/LinearRegressionAngle.js +2 -2
- package/es-modules/Stock/Indicators/LinearRegressionIntercept/LinearRegressionIntercept.js +2 -2
- package/es-modules/Stock/Indicators/LinearRegressionSlopes/LinearRegressionSlopes.js +2 -2
- package/es-modules/Stock/Indicators/MACD/MACDIndicator.js +1 -2
- package/es-modules/{Mixins/MultipleLines.js → Stock/Indicators/MultipleLinesComposition.js} +136 -87
- package/es-modules/Stock/Indicators/NATR/NATRIndicator.js +1 -3
- package/es-modules/Stock/Indicators/PC/PCIndicator.js +14 -13
- package/es-modules/Stock/Indicators/PPO/PPOIndicator.js +1 -11
- package/es-modules/Stock/Indicators/SMA/SMAComposition.js +0 -26
- package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +32 -49
- package/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +0 -8
- package/es-modules/Stock/Indicators/Stochastic/StochasticIndicator.js +15 -8
- package/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +4 -6
- package/es-modules/Stock/Indicators/TEMA/TEMAIndicator.js +26 -11
- package/es-modules/Stock/Indicators/TRIX/TRIXIndicator.js +6 -12
- package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +23 -7
- package/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +2 -3
- package/es-modules/Stock/StockToolsBindings.js +144 -42
- package/es-modules/Stock/StockToolsGui.js +409 -15
- package/es-modules/masters/highcharts-3d.src.js +1 -1
- 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 +1 -1
- 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/ema.src.js +4 -10
- package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/es-modules/masters/indicators/indicators-all.src.js +2 -2
- package/es-modules/masters/indicators/indicators.src.js +2 -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 +16 -2
- package/es-modules/masters/modules/annotations-advanced.src.js +3 -1
- package/es-modules/masters/modules/annotations.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 +6 -3
- package/es-modules/masters/modules/datagrouping.src.js +1 -1
- 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 +1 -1
- package/es-modules/masters/modules/grid-axis.src.js +1 -1
- package/es-modules/masters/modules/heatmap.src.js +1 -2
- package/es-modules/masters/modules/heikinashi.src.js +1 -1
- 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 -3
- 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/solid-gauge.src.js +1 -1
- package/es-modules/masters/modules/sonification.src.js +33 -2
- package/es-modules/masters/modules/static-scale.src.js +1 -1
- package/es-modules/masters/modules/stock-tools.src.js +1 -1
- package/es-modules/masters/modules/stock.src.js +4 -1
- 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/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 +1 -1
- 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/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 +1 -1
- package/highcharts-3d.src.js +1 -1
- package/highcharts-gantt.js +799 -801
- package/highcharts-gantt.js.map +1 -1
- package/highcharts-gantt.src.js +793 -755
- package/highcharts-more.js +194 -193
- package/highcharts-more.js.map +1 -1
- package/highcharts-more.src.js +208 -120
- package/highcharts.d.ts +9814 -4231
- package/highcharts.js +585 -587
- package/highcharts.js.map +1 -1
- package/highcharts.src.d.ts +9814 -4231
- package/highcharts.src.js +626 -603
- package/highmaps.js +728 -707
- package/highmaps.js.map +1 -1
- package/highmaps.src.js +2824 -1613
- package/highstock.js +788 -782
- package/highstock.js.map +1 -1
- package/highstock.src.js +1913 -1284
- package/indicators/acceleration-bands.js +10 -9
- package/indicators/acceleration-bands.js.map +1 -1
- package/indicators/acceleration-bands.src.js +156 -112
- 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 -4
- package/indicators/apo.js +5 -6
- package/indicators/apo.js.map +1 -1
- package/indicators/apo.src.js +16 -84
- package/indicators/aroon-oscillator.js +9 -9
- package/indicators/aroon-oscillator.js.map +1 -1
- package/indicators/aroon-oscillator.src.js +160 -177
- package/indicators/aroon.js +9 -9
- package/indicators/aroon.js.map +1 -1
- package/indicators/aroon.src.js +156 -112
- package/indicators/atr.js +1 -1
- package/indicators/atr.src.js +1 -1
- package/indicators/bollinger-bands.js +10 -9
- package/indicators/bollinger-bands.js.map +1 -1
- package/indicators/bollinger-bands.src.js +180 -117
- package/indicators/cci.js +1 -1
- package/indicators/cci.src.js +1 -1
- package/indicators/chaikin.js +8 -9
- package/indicators/chaikin.js.map +1 -1
- package/indicators/chaikin.src.js +8 -76
- package/indicators/cmf.js +1 -1
- package/indicators/cmf.src.js +1 -1
- package/indicators/cmo.js +1 -1
- package/indicators/cmo.src.js +1 -1
- package/indicators/dema.js +5 -6
- package/indicators/dema.js.map +1 -1
- package/indicators/dema.src.js +3 -75
- package/indicators/disparity-index.js +6 -7
- package/indicators/disparity-index.js.map +1 -1
- package/indicators/disparity-index.src.js +19 -74
- package/indicators/dmi.js +11 -11
- package/indicators/dmi.js.map +1 -1
- package/indicators/dmi.src.js +173 -116
- package/indicators/dpo.js +1 -1
- package/indicators/dpo.src.js +1 -1
- package/indicators/ema.js +1 -13
- package/indicators/ema.js.map +1 -1
- package/indicators/ema.src.js +7 -188
- package/indicators/ichimoku-kinko-hyo.js +1 -1
- package/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/indicators/indicators-all.js +197 -203
- package/indicators/indicators-all.js.map +1 -1
- package/indicators/indicators-all.src.js +677 -743
- package/indicators/indicators.js +12 -12
- package/indicators/indicators.js.map +1 -1
- package/indicators/indicators.src.js +213 -143
- package/indicators/keltner-channels.js +10 -10
- package/indicators/keltner-channels.js.map +1 -1
- package/indicators/keltner-channels.src.js +164 -118
- package/indicators/klinger.js +12 -13
- package/indicators/klinger.js.map +1 -1
- package/indicators/klinger.src.js +161 -184
- package/indicators/macd.js +2 -2
- package/indicators/macd.js.map +1 -1
- package/indicators/macd.src.js +2 -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 +3 -3
- package/indicators/natr.js.map +1 -1
- package/indicators/natr.src.js +2 -4
- package/indicators/obv.js +1 -1
- package/indicators/obv.src.js +1 -1
- package/indicators/pivot-points.js +1 -1
- package/indicators/pivot-points.src.js +1 -1
- package/indicators/ppo.js +5 -6
- package/indicators/ppo.js.map +1 -1
- package/indicators/ppo.src.js +3 -75
- package/indicators/price-channel.js +9 -9
- package/indicators/price-channel.js.map +1 -1
- package/indicators/price-channel.src.js +207 -168
- 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 +9 -9
- 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 -6
- package/indicators/slow-stochastic.js.map +1 -1
- package/indicators/slow-stochastic.src.js +2 -72
- package/indicators/stochastic.js +10 -10
- package/indicators/stochastic.js.map +1 -1
- package/indicators/stochastic.src.js +209 -164
- package/indicators/supertrend.js +10 -10
- package/indicators/supertrend.js.map +1 -1
- package/indicators/supertrend.src.js +6 -7
- package/indicators/tema.js +6 -7
- package/indicators/tema.js.map +1 -1
- package/indicators/tema.src.js +28 -75
- package/indicators/trendline.js +1 -1
- package/indicators/trendline.src.js +1 -1
- package/indicators/trix.js +4 -5
- package/indicators/trix.js.map +1 -1
- package/indicators/trix.src.js +8 -76
- package/indicators/volume-by-price.js +16 -16
- package/indicators/volume-by-price.js.map +1 -1
- package/indicators/volume-by-price.src.js +24 -7
- package/indicators/vwap.js +1 -1
- package/indicators/vwap.src.js +1 -1
- package/indicators/williams-r.js +5 -6
- package/indicators/williams-r.js.map +1 -1
- package/indicators/williams-r.src.js +41 -51
- 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.d.ts +5 -0
- package/modules/accessibility.js +237 -216
- package/modules/accessibility.js.map +1 -1
- package/modules/accessibility.src.d.ts +5 -0
- package/modules/accessibility.src.js +7400 -6078
- package/modules/annotations-advanced.d.ts +30 -0
- package/modules/annotations-advanced.js +192 -165
- package/modules/annotations-advanced.js.map +1 -1
- package/modules/annotations-advanced.src.d.ts +30 -0
- package/modules/annotations-advanced.src.js +1604 -332
- package/modules/annotations.js +121 -106
- package/modules/annotations.js.map +1 -1
- package/modules/annotations.src.js +981 -238
- package/modules/arrow-symbols.js +1 -1
- package/modules/arrow-symbols.src.js +1 -1
- package/modules/boost-canvas.js +15 -15
- package/modules/boost-canvas.js.map +1 -1
- package/modules/boost-canvas.src.js +3 -3
- package/modules/boost.js +79 -79
- package/modules/boost.js.map +1 -1
- package/modules/boost.src.js +10 -9
- 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 +24 -24
- package/modules/coloraxis.js.map +1 -1
- package/modules/coloraxis.src.js +69 -98
- package/modules/current-date-indicator.js +4 -4
- package/modules/current-date-indicator.js.map +1 -1
- package/modules/current-date-indicator.src.js +4 -4
- package/modules/cylinder.js +1 -1
- package/modules/cylinder.src.js +1 -1
- package/modules/data.js +32 -32
- package/modules/data.js.map +1 -1
- package/modules/data.src.js +85 -88
- package/modules/datagrouping.js +20 -20
- package/modules/datagrouping.js.map +1 -1
- package/modules/datagrouping.src.js +35 -19
- package/modules/debugger.js +3 -3
- package/modules/debugger.js.map +1 -1
- package/modules/debugger.src.js +3 -3
- package/modules/dependency-wheel.js +11 -11
- package/modules/dependency-wheel.js.map +1 -1
- package/modules/dependency-wheel.src.js +4 -7
- package/modules/dotplot.js +1 -1
- package/modules/dotplot.src.js +1 -1
- package/modules/drag-panes.js +8 -8
- package/modules/drag-panes.js.map +1 -1
- package/modules/drag-panes.src.js +3 -3
- package/modules/draggable-points.js +1 -1
- package/modules/draggable-points.src.js +1 -1
- package/modules/drilldown.js +24 -24
- package/modules/drilldown.js.map +1 -1
- package/modules/drilldown.src.js +4 -4
- package/modules/dumbbell.js +17 -17
- package/modules/dumbbell.js.map +1 -1
- package/modules/dumbbell.src.js +4 -4
- package/modules/export-data.js +1 -1
- package/modules/export-data.js.map +1 -1
- package/modules/export-data.src.js +3 -3
- package/modules/exporting.js +39 -38
- package/modules/exporting.js.map +1 -1
- package/modules/exporting.src.js +102 -72
- package/modules/full-screen.js +1 -1
- package/modules/full-screen.src.js +1 -1
- package/modules/funnel.js +12 -12
- package/modules/funnel.js.map +1 -1
- package/modules/funnel.src.js +9 -6
- package/modules/funnel3d.js +1 -1
- package/modules/funnel3d.src.js +1 -1
- package/modules/gantt.js +217 -218
- package/modules/gantt.js.map +1 -1
- package/modules/gantt.src.js +167 -152
- package/modules/grid-axis.js +1 -1
- package/modules/grid-axis.src.js +1 -1
- package/modules/heatmap.js +39 -39
- package/modules/heatmap.js.map +1 -1
- package/modules/heatmap.src.js +177 -162
- package/modules/heikinashi.js +1 -1
- package/modules/heikinashi.src.js +4 -4
- package/modules/histogram-bellcurve.js +13 -13
- package/modules/histogram-bellcurve.js.map +1 -1
- package/modules/histogram-bellcurve.src.js +91 -86
- package/modules/hollowcandlestick.js +9 -9
- package/modules/hollowcandlestick.js.map +1 -1
- package/modules/hollowcandlestick.src.js +37 -37
- package/modules/item-series.js +1 -1
- package/modules/item-series.src.js +1 -1
- package/modules/lollipop.js +1 -1
- package/modules/lollipop.src.js +1 -1
- package/modules/map.d.ts +136 -14
- package/modules/map.js +144 -122
- package/modules/map.js.map +1 -1
- package/modules/map.src.d.ts +136 -14
- package/modules/map.src.js +2227 -1039
- package/modules/marker-clusters.js +36 -36
- package/modules/marker-clusters.js.map +1 -1
- package/modules/marker-clusters.src.js +173 -142
- package/modules/networkgraph.d.ts +12 -1
- package/modules/networkgraph.js +49 -49
- package/modules/networkgraph.js.map +1 -1
- package/modules/networkgraph.src.d.ts +12 -1
- package/modules/networkgraph.src.js +91 -43
- package/modules/no-data-to-display.js +5 -5
- package/modules/no-data-to-display.js.map +1 -1
- package/modules/no-data-to-display.src.js +3 -3
- package/modules/offline-exporting.js +18 -17
- package/modules/offline-exporting.js.map +1 -1
- package/modules/offline-exporting.src.js +14 -14
- package/modules/oldie-polyfills.js +1 -1
- package/modules/oldie-polyfills.src.js +1 -1
- package/modules/oldie.js +26 -26
- package/modules/oldie.js.map +1 -1
- package/modules/oldie.src.js +4 -4
- package/modules/organization.js +13 -13
- package/modules/organization.js.map +1 -1
- package/modules/organization.src.js +4 -4
- package/modules/overlapping-datalabels.js +1 -1
- package/modules/overlapping-datalabels.src.js +1 -1
- package/modules/parallel-coordinates.js +1 -1
- package/modules/parallel-coordinates.src.js +1 -1
- package/modules/pareto.js +7 -7
- package/modules/pareto.js.map +1 -1
- package/modules/pareto.src.js +89 -78
- package/modules/pathfinder.js +1 -1
- package/modules/pathfinder.src.js +1 -1
- package/modules/pattern-fill.js +1 -1
- package/modules/pattern-fill.src.js +1 -1
- 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.d.ts +12 -1
- package/modules/sankey.js +29 -29
- package/modules/sankey.js.map +1 -1
- package/modules/sankey.src.d.ts +12 -1
- package/modules/sankey.src.js +300 -176
- package/modules/series-label.js +1 -1
- package/modules/series-label.src.js +1 -1
- package/modules/solid-gauge.js +1 -1
- package/modules/solid-gauge.src.js +1 -1
- package/modules/sonification.js +59 -55
- package/modules/sonification.js.map +1 -1
- package/modules/sonification.src.js +3034 -2553
- package/modules/static-scale.js +1 -1
- package/modules/static-scale.src.js +1 -1
- package/modules/stock-tools.js +178 -163
- package/modules/stock-tools.js.map +1 -1
- package/modules/stock-tools.src.js +1028 -144
- package/modules/stock.d.ts +39 -6
- package/modules/stock.js +204 -196
- package/modules/stock.js.map +1 -1
- package/modules/stock.src.d.ts +39 -6
- package/modules/stock.src.js +1667 -1061
- package/modules/streamgraph.js +1 -1
- package/modules/streamgraph.src.js +1 -1
- package/modules/sunburst.js +61 -60
- package/modules/sunburst.js.map +1 -1
- package/modules/sunburst.src.js +329 -266
- package/modules/tilemap.js +17 -17
- package/modules/tilemap.js.map +1 -1
- package/modules/tilemap.src.js +3 -4
- package/modules/timeline.js +18 -18
- package/modules/timeline.js.map +1 -1
- package/modules/timeline.src.js +5 -5
- package/modules/treegrid.js +56 -57
- package/modules/treegrid.js.map +1 -1
- package/modules/treegrid.src.js +126 -120
- package/modules/treemap.js +41 -41
- package/modules/treemap.js.map +1 -1
- package/modules/treemap.src.js +319 -254
- package/modules/variable-pie.js +1 -1
- package/modules/variable-pie.src.js +1 -1
- package/modules/variwide.js +1 -1
- package/modules/variwide.src.js +1 -1
- package/modules/vector.js +1 -1
- package/modules/vector.src.js +1 -1
- package/modules/venn.js +31 -31
- package/modules/venn.js.map +1 -1
- package/modules/venn.src.js +731 -721
- package/modules/windbarb.js +15 -15
- package/modules/windbarb.js.map +1 -1
- package/modules/windbarb.src.js +90 -62
- package/modules/wordcloud.js +23 -24
- package/modules/wordcloud.js.map +1 -1
- package/modules/wordcloud.src.js +897 -949
- package/modules/xrange.js +2 -2
- package/modules/xrange.js.map +1 -1
- package/modules/xrange.src.js +2 -1
- package/package.json +1 -1
- package/themes/avocado.js +1 -1
- package/themes/avocado.src.js +1 -1
- package/themes/dark-blue.js +1 -1
- package/themes/dark-blue.src.js +1 -1
- package/themes/dark-green.js +1 -1
- package/themes/dark-green.src.js +1 -1
- package/themes/dark-unica.js +1 -1
- package/themes/dark-unica.src.js +1 -1
- package/themes/gray.js +1 -1
- package/themes/gray.src.js +1 -1
- package/themes/grid-light.js +1 -1
- package/themes/grid-light.src.js +1 -1
- package/themes/grid.js +1 -1
- package/themes/grid.src.js +1 -1
- package/themes/high-contrast-dark.js +1 -1
- package/themes/high-contrast-dark.src.js +1 -1
- package/themes/high-contrast-light.js +1 -1
- package/themes/high-contrast-light.src.js +1 -1
- package/themes/sand-signika.js +1 -1
- package/themes/sand-signika.src.js +1 -1
- package/themes/skies.js +1 -1
- package/themes/skies.src.js +1 -1
- package/themes/sunset.js +1 -1
- package/themes/sunset.src.js +1 -1
- package/es-modules/Core/Axis/MapAxis.js +0 -157
- package/es-modules/Core/Color/Palette.js +0 -82
- package/es-modules/Extensions/Sonification/InstrumentDefinitions.js +0 -32
- package/es-modules/Mixins/ColorMapSeries.js +0 -82
- package/es-modules/Mixins/ColorSeries.js +0 -77
- package/es-modules/Mixins/DerivedSeries.js +0 -118
- package/es-modules/Mixins/DrawPoint.js +0 -81
- package/es-modules/Mixins/IndicatorRequired.js +0 -56
- package/es-modules/Mixins/Navigation.js +0 -54
- package/es-modules/Mixins/NelderMead.js +0 -132
- package/es-modules/Mixins/Polygon.js +0 -259
- package/es-modules/Mixins/ReduceArray.js +0 -54
package/modules/stock.src.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Highstock JS v9.
|
|
2
|
+
* @license Highstock JS v9.3.1 (2021-11-05)
|
|
3
3
|
*
|
|
4
4
|
* Highcharts Stock as a plugin for Highcharts
|
|
5
5
|
*
|
|
@@ -366,7 +366,7 @@
|
|
|
366
366
|
mantissa = correctFloat(index % 1);
|
|
367
367
|
// Check if the index is inside position array.
|
|
368
368
|
// If true, read/approximate value for that exact index.
|
|
369
|
-
if (index >= 0 && index < positions.length) {
|
|
369
|
+
if (index >= 0 && index < positions.length - 1) {
|
|
370
370
|
var leftNeighbour = positions[Math.floor(index)],
|
|
371
371
|
rightNeighbour = positions[Math.ceil(index)],
|
|
372
372
|
distance = rightNeighbour - leftNeighbour;
|
|
@@ -460,9 +460,8 @@
|
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
/**
|
|
463
|
-
* @private
|
|
464
|
-
*
|
|
465
463
|
* Extending the Chart.pan method for ordinal axes
|
|
464
|
+
* @private
|
|
466
465
|
*/
|
|
467
466
|
function onChartPan(e) {
|
|
468
467
|
var chart = this,
|
|
@@ -706,7 +705,6 @@
|
|
|
706
705
|
maxIndex,
|
|
707
706
|
slope,
|
|
708
707
|
i,
|
|
709
|
-
hasBoostedSeries,
|
|
710
708
|
ordinalPositions = [],
|
|
711
709
|
overscrollPointsRange = Number.MAX_VALUE,
|
|
712
710
|
useOrdinal = false;
|
|
@@ -743,13 +741,7 @@
|
|
|
743
741
|
ordinalPositions = uniqueOrdinalPositions;
|
|
744
742
|
}
|
|
745
743
|
}
|
|
746
|
-
if (series.isSeriesBoosting) {
|
|
747
|
-
hasBoostedSeries = true;
|
|
748
|
-
}
|
|
749
744
|
});
|
|
750
|
-
if (hasBoostedSeries) {
|
|
751
|
-
ordinalPositions.length = 0;
|
|
752
|
-
}
|
|
753
745
|
// cache the length
|
|
754
746
|
len = ordinalPositions.length;
|
|
755
747
|
// Check if we really need the overhead of mapping axis data
|
|
@@ -947,8 +939,6 @@
|
|
|
947
939
|
fakeAxis.series.push(fakeSeries);
|
|
948
940
|
series.processData.apply(fakeSeries);
|
|
949
941
|
});
|
|
950
|
-
// Apply grouping if needed.
|
|
951
|
-
axis.applyGrouping.call(fakeAxis);
|
|
952
942
|
// Force to use the ordinal when points are evenly spaced
|
|
953
943
|
// (e.g. weeks), #3825.
|
|
954
944
|
if (fakeSeries.closestPointRange !== fakeSeries.basePointRange &&
|
|
@@ -1043,7 +1033,8 @@
|
|
|
1043
1033
|
// When more series assign to axis, find the smallest one, #15987.
|
|
1044
1034
|
if (axis.series.length > 1) {
|
|
1045
1035
|
axis.series.forEach(function (series) {
|
|
1046
|
-
if (
|
|
1036
|
+
if (series.points &&
|
|
1037
|
+
defined(series.points[0]) &&
|
|
1047
1038
|
defined(series.points[0].plotX) &&
|
|
1048
1039
|
series.points[0].plotX < firstPointX) {
|
|
1049
1040
|
firstPointX = series.points[0].plotX;
|
|
@@ -1124,33 +1115,33 @@
|
|
|
1124
1115
|
|
|
1125
1116
|
return OrdinalAxis;
|
|
1126
1117
|
});
|
|
1127
|
-
_registerModule(_modules, 'Core/Axis/
|
|
1118
|
+
_registerModule(_modules, 'Series/DataModifyComposition.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Series/Point.js'], _modules['Core/Series/Series.js'], _modules['Core/Utilities.js']], function (Axis, Point, Series, U) {
|
|
1128
1119
|
/* *
|
|
1129
1120
|
*
|
|
1130
|
-
* (c)
|
|
1121
|
+
* (c) 2010-2021 Torstein Honsi
|
|
1131
1122
|
*
|
|
1132
1123
|
* License: www.highcharts.com/license
|
|
1133
1124
|
*
|
|
1134
1125
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
1135
1126
|
*
|
|
1136
1127
|
* */
|
|
1128
|
+
var pointTooltipFormatter = Point.prototype.tooltipFormatter;
|
|
1137
1129
|
var addEvent = U.addEvent,
|
|
1138
|
-
|
|
1139
|
-
|
|
1130
|
+
arrayMax = U.arrayMax,
|
|
1131
|
+
arrayMin = U.arrayMin,
|
|
1132
|
+
correctFloat = U.correctFloat,
|
|
1133
|
+
defined = U.defined,
|
|
1140
1134
|
isArray = U.isArray,
|
|
1141
1135
|
isNumber = U.isNumber,
|
|
1136
|
+
isString = U.isString,
|
|
1142
1137
|
pick = U.pick;
|
|
1143
1138
|
/* *
|
|
1144
1139
|
*
|
|
1145
1140
|
* Composition
|
|
1146
1141
|
*
|
|
1147
1142
|
* */
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
* @private
|
|
1151
|
-
*/
|
|
1152
|
-
var BrokenAxis;
|
|
1153
|
-
(function (BrokenAxis) {
|
|
1143
|
+
var DataModifyComposition;
|
|
1144
|
+
(function (DataModifyComposition) {
|
|
1154
1145
|
/* *
|
|
1155
1146
|
*
|
|
1156
1147
|
* Declarations
|
|
@@ -1169,405 +1160,956 @@
|
|
|
1169
1160
|
* */
|
|
1170
1161
|
/* eslint-disable valid-jsdoc */
|
|
1171
1162
|
/**
|
|
1172
|
-
*
|
|
1163
|
+
* Extends the series, axis and point classes with
|
|
1164
|
+
* compare and cumulative support.
|
|
1165
|
+
*
|
|
1173
1166
|
* @private
|
|
1167
|
+
*
|
|
1168
|
+
* @param SeriesClass
|
|
1169
|
+
* Series class to use.
|
|
1170
|
+
*
|
|
1171
|
+
* @param AxisClass
|
|
1172
|
+
* Axis class to extend.
|
|
1173
|
+
*
|
|
1174
|
+
* @param PointClass
|
|
1175
|
+
* Point class to use.
|
|
1174
1176
|
*/
|
|
1175
|
-
function compose(AxisClass,
|
|
1176
|
-
if (composedClasses.indexOf(AxisClass) === -1) {
|
|
1177
|
-
composedClasses.push(AxisClass);
|
|
1178
|
-
AxisClass.keepProps.push('brokenAxis');
|
|
1179
|
-
addEvent(AxisClass, 'init', onAxisInit);
|
|
1180
|
-
addEvent(AxisClass, 'afterInit', onAxisAfterInit);
|
|
1181
|
-
addEvent(AxisClass, 'afterSetTickPositions', onAxisAfterSetTickPositions);
|
|
1182
|
-
addEvent(AxisClass, 'afterSetOptions', onAxisAfterSetOptions);
|
|
1183
|
-
}
|
|
1177
|
+
function compose(SeriesClass, AxisClass, PointClass) {
|
|
1184
1178
|
if (composedClasses.indexOf(SeriesClass) === -1) {
|
|
1185
1179
|
composedClasses.push(SeriesClass);
|
|
1186
1180
|
var seriesProto = SeriesClass.prototype;
|
|
1187
|
-
seriesProto.
|
|
1188
|
-
seriesProto.
|
|
1189
|
-
addEvent(SeriesClass, '
|
|
1190
|
-
addEvent(SeriesClass, '
|
|
1181
|
+
seriesProto.setCompare = seriesSetCompare;
|
|
1182
|
+
seriesProto.setCumulative = seriesSetCumulative;
|
|
1183
|
+
addEvent(SeriesClass, 'afterInit', afterInit);
|
|
1184
|
+
addEvent(SeriesClass, 'afterGetExtremes', afterGetExtremes);
|
|
1185
|
+
addEvent(SeriesClass, 'afterProcessData', afterProcessData);
|
|
1191
1186
|
}
|
|
1192
|
-
|
|
1187
|
+
if (composedClasses.indexOf(AxisClass) === -1) {
|
|
1188
|
+
composedClasses.push(AxisClass);
|
|
1189
|
+
var axisProto = AxisClass.prototype;
|
|
1190
|
+
axisProto.setCompare = axisSetCompare;
|
|
1191
|
+
axisProto.setModifier = setModifier;
|
|
1192
|
+
axisProto.setCumulative = axisSetCumulative;
|
|
1193
|
+
}
|
|
1194
|
+
if (composedClasses.indexOf(PointClass) === -1) {
|
|
1195
|
+
composedClasses.push(PointClass);
|
|
1196
|
+
var pointProto = PointClass.prototype;
|
|
1197
|
+
pointProto.tooltipFormatter = tooltipFormatter;
|
|
1198
|
+
}
|
|
1199
|
+
return SeriesClass;
|
|
1193
1200
|
}
|
|
1194
|
-
|
|
1201
|
+
DataModifyComposition.compose = compose;
|
|
1202
|
+
/* ********************************************************************** *
|
|
1203
|
+
* Start shared compare and cumulative logic *
|
|
1204
|
+
* ********************************************************************** */
|
|
1195
1205
|
/**
|
|
1206
|
+
* Shared code for the axis.setCompare() and the axis.setCumulative()
|
|
1207
|
+
* methods. Inits the 'compare' or the 'cumulative' mode.
|
|
1196
1208
|
* @private
|
|
1197
1209
|
*/
|
|
1198
|
-
function
|
|
1199
|
-
if (
|
|
1200
|
-
this.
|
|
1210
|
+
function setModifier(mode, modeState, redraw) {
|
|
1211
|
+
if (!this.isXAxis) {
|
|
1212
|
+
this.series.forEach(function (series) {
|
|
1213
|
+
if (mode === 'compare' &&
|
|
1214
|
+
typeof modeState !== 'boolean') {
|
|
1215
|
+
series.setCompare(modeState, false);
|
|
1216
|
+
}
|
|
1217
|
+
else if (mode === 'cumulative' &&
|
|
1218
|
+
!isString(modeState)) {
|
|
1219
|
+
series.setCumulative(modeState, false);
|
|
1220
|
+
}
|
|
1221
|
+
});
|
|
1222
|
+
if (pick(redraw, true)) {
|
|
1223
|
+
this.chart.redraw();
|
|
1224
|
+
}
|
|
1201
1225
|
}
|
|
1202
1226
|
}
|
|
1203
1227
|
/**
|
|
1204
|
-
*
|
|
1205
|
-
*
|
|
1228
|
+
* Extend the tooltip formatter by adding support for the point.change
|
|
1229
|
+
* variable as well as the changeDecimals option.
|
|
1230
|
+
*
|
|
1231
|
+
* @ignore
|
|
1232
|
+
* @function Highcharts.Point#tooltipFormatter
|
|
1233
|
+
*
|
|
1234
|
+
* @param {string} pointFormat
|
|
1206
1235
|
*/
|
|
1207
|
-
function
|
|
1208
|
-
var
|
|
1209
|
-
|
|
1210
|
-
|
|
1236
|
+
function tooltipFormatter(pointFormat) {
|
|
1237
|
+
var point = this, numberFormatter = point.series.chart.numberFormatter, replace = function (value) {
|
|
1238
|
+
pointFormat = pointFormat.replace('{point.' + value + '}', (point[value] > 0 && value === 'change' ? '+' : '') +
|
|
1239
|
+
numberFormatter(point[value], pick(point.series.tooltipOptions.changeDecimals, 2)));
|
|
1240
|
+
};
|
|
1241
|
+
if (defined(point.change)) {
|
|
1242
|
+
replace('change');
|
|
1211
1243
|
}
|
|
1244
|
+
if (defined(point.cumulativeSum)) {
|
|
1245
|
+
replace('cumulativeSum');
|
|
1246
|
+
}
|
|
1247
|
+
return pointTooltipFormatter.apply(this, [pointFormat]);
|
|
1212
1248
|
}
|
|
1213
1249
|
/**
|
|
1214
|
-
*
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1250
|
+
* Extend series.init by adding a methods to modify the y values used
|
|
1251
|
+
* for plotting on the y axis. For compare mode, this method is called both
|
|
1252
|
+
* from the axis when finding dataMin and dataMax,
|
|
1253
|
+
* and from the series.translate method.
|
|
1254
|
+
*
|
|
1255
|
+
* @ignore
|
|
1256
|
+
* @function Highcharts.Series#init
|
|
1257
|
+
*/
|
|
1258
|
+
function afterInit() {
|
|
1259
|
+
var compare = this.options.compare;
|
|
1260
|
+
var dataModify;
|
|
1261
|
+
if (compare === 'percent' ||
|
|
1262
|
+
compare === 'value' ||
|
|
1263
|
+
this.options.cumulative) {
|
|
1264
|
+
dataModify = new Additions(this);
|
|
1265
|
+
if (compare === 'percent' || compare === 'value') {
|
|
1266
|
+
// Set comparison mode
|
|
1267
|
+
dataModify.initCompare(compare);
|
|
1268
|
+
}
|
|
1269
|
+
else {
|
|
1270
|
+
// Set Cumulative Sum mode
|
|
1271
|
+
dataModify.initCumulative();
|
|
1228
1272
|
}
|
|
1229
|
-
axis.tickPositions = newPositions;
|
|
1230
|
-
axis.tickPositions.info = info;
|
|
1231
1273
|
}
|
|
1274
|
+
this.dataModify = dataModify;
|
|
1232
1275
|
}
|
|
1233
1276
|
/**
|
|
1277
|
+
* Adjust the extremes (compare and cumulative modify the data).
|
|
1234
1278
|
* @private
|
|
1235
1279
|
*/
|
|
1236
|
-
function
|
|
1237
|
-
var
|
|
1238
|
-
|
|
1239
|
-
|
|
1280
|
+
function afterGetExtremes(e) {
|
|
1281
|
+
var dataExtremes = e.dataExtremes,
|
|
1282
|
+
activeYData = dataExtremes.activeYData;
|
|
1283
|
+
if (this.dataModify && dataExtremes) {
|
|
1284
|
+
var extremes = void 0;
|
|
1285
|
+
if (this.options.compare) {
|
|
1286
|
+
extremes = [
|
|
1287
|
+
this.dataModify.modifyValue(dataExtremes.dataMin),
|
|
1288
|
+
this.dataModify.modifyValue(dataExtremes.dataMax)
|
|
1289
|
+
];
|
|
1290
|
+
}
|
|
1291
|
+
else if (this.options.cumulative &&
|
|
1292
|
+
isArray(activeYData) &&
|
|
1293
|
+
// If only one y visible, sum doesn't change
|
|
1294
|
+
// so no need to change extremes
|
|
1295
|
+
activeYData.length >= 2) {
|
|
1296
|
+
extremes = Additions.getCumulativeExtremes(activeYData);
|
|
1297
|
+
}
|
|
1298
|
+
if (extremes) {
|
|
1299
|
+
dataExtremes.dataMin = arrayMin(extremes);
|
|
1300
|
+
dataExtremes.dataMax = arrayMax(extremes);
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
/* ********************************************************************** *
|
|
1305
|
+
* End shared compare and cumulative logic *
|
|
1306
|
+
* ********************************************************************** */
|
|
1307
|
+
/* ********************************************************************** *
|
|
1308
|
+
* Start value compare logic *
|
|
1309
|
+
* ********************************************************************** */
|
|
1310
|
+
/**
|
|
1311
|
+
* Highcharts Stock only. Set the
|
|
1312
|
+
* [compare](https://api.highcharts.com/highstock/plotOptions.series.compare)
|
|
1313
|
+
* mode of the series after render time.
|
|
1314
|
+
* In most cases it is more useful running
|
|
1315
|
+
* {@link Axis#setCompare} on the X axis to update all its series.
|
|
1316
|
+
*
|
|
1317
|
+
* @function Highcharts.Series#setCompare
|
|
1318
|
+
*
|
|
1319
|
+
* @param {string|null} [compare]
|
|
1320
|
+
* Can be one of `undefined` (default), `null`, `"percent"`
|
|
1321
|
+
* or `"value"`.
|
|
1322
|
+
*
|
|
1323
|
+
* @param {boolean} [redraw=true]
|
|
1324
|
+
* Whether to redraw the chart or to wait for a later call to
|
|
1325
|
+
* {@link Chart#redraw}.
|
|
1326
|
+
*/
|
|
1327
|
+
function seriesSetCompare(compare, redraw) {
|
|
1328
|
+
// Survive to export, #5485 (and for options generally)
|
|
1329
|
+
this.options.compare = this.userOptions.compare = compare;
|
|
1330
|
+
// Fire series.init() that will set or delete series.dataModify
|
|
1331
|
+
this.update({}, pick(redraw, true));
|
|
1332
|
+
if (this.dataModify && (compare === 'value' || compare === 'percent')) {
|
|
1333
|
+
this.dataModify.initCompare(compare);
|
|
1334
|
+
}
|
|
1335
|
+
else {
|
|
1336
|
+
// When disabling, clear the points
|
|
1337
|
+
this.points.forEach(function (point) {
|
|
1338
|
+
delete point.change;
|
|
1339
|
+
});
|
|
1240
1340
|
}
|
|
1241
1341
|
}
|
|
1242
1342
|
/**
|
|
1243
|
-
*
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1343
|
+
* Extend series.processData by finding the first y value in the plot area,
|
|
1344
|
+
* used for comparing the following values
|
|
1345
|
+
*
|
|
1346
|
+
* @ignore
|
|
1347
|
+
* @function Highcharts.Series#processData
|
|
1348
|
+
*/
|
|
1349
|
+
function afterProcessData() {
|
|
1350
|
+
var series = this;
|
|
1351
|
+
if (series.xAxis && // not pies
|
|
1352
|
+
series.processedYData &&
|
|
1353
|
+
series.dataModify) {
|
|
1354
|
+
var processedXData = series.processedXData,
|
|
1355
|
+
processedYData = series.processedYData,
|
|
1356
|
+
length_1 = processedYData.length,
|
|
1357
|
+
compareStart = series.options.compareStart === true ? 0 : 1;
|
|
1358
|
+
var keyIndex = -1,
|
|
1359
|
+
i = void 0;
|
|
1360
|
+
// For series with more than one value (range, OHLC etc), compare
|
|
1361
|
+
// against close or the pointValKey (#4922, #3112, #9854)
|
|
1362
|
+
if (series.pointArrayMap) {
|
|
1363
|
+
keyIndex = series.pointArrayMap.indexOf(series.options.pointValKey || series.pointValKey || 'y');
|
|
1364
|
+
}
|
|
1365
|
+
// find the first value for comparison
|
|
1366
|
+
for (i = 0; i < length_1 - compareStart; i++) {
|
|
1367
|
+
var compareValue = processedYData[i] && keyIndex > -1 ?
|
|
1368
|
+
processedYData[i][keyIndex] : processedYData[i];
|
|
1369
|
+
if (isNumber(compareValue) &&
|
|
1370
|
+
compareValue !== 0 &&
|
|
1371
|
+
processedXData[i + compareStart] >= (series.xAxis.min || 0)) {
|
|
1372
|
+
series.dataModify.compareValue = compareValue;
|
|
1373
|
+
break;
|
|
1374
|
+
}
|
|
1272
1375
|
}
|
|
1273
1376
|
}
|
|
1274
1377
|
}
|
|
1275
1378
|
/**
|
|
1276
|
-
*
|
|
1379
|
+
* Highcharts Stock only. Set the compare mode on all series
|
|
1380
|
+
* belonging to a Y axis.
|
|
1381
|
+
*
|
|
1382
|
+
* @see [plotOptions.series.compare](https://api.highcharts.com/highstock/plotOptions.series.compare)
|
|
1383
|
+
*
|
|
1384
|
+
* @sample stock/members/axis-setcompare/
|
|
1385
|
+
* Set compare
|
|
1386
|
+
*
|
|
1387
|
+
* @function Highcharts.Axis#setCompare
|
|
1388
|
+
*
|
|
1389
|
+
* @param {string|null} [compare]
|
|
1390
|
+
* The compare mode. Can be one of `undefined` (default), `null`,
|
|
1391
|
+
* `"value"` or `"percent"`.
|
|
1392
|
+
*
|
|
1393
|
+
* @param {boolean} [redraw=true]
|
|
1394
|
+
* Whether to redraw the chart or to wait for a later call to
|
|
1395
|
+
* {@link Chart#redraw}.
|
|
1277
1396
|
*/
|
|
1278
|
-
function
|
|
1279
|
-
this.
|
|
1280
|
-
this.drawBreaks(this.yAxis, pick(this.pointArrayMap, ['y']));
|
|
1397
|
+
function axisSetCompare(compare, redraw) {
|
|
1398
|
+
this.setModifier('compare', compare, redraw);
|
|
1281
1399
|
}
|
|
1282
|
-
|
|
1283
|
-
*
|
|
1284
|
-
*/
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1400
|
+
/* ********************************************************************** *
|
|
1401
|
+
* End value compare logic *
|
|
1402
|
+
* ********************************************************************** */
|
|
1403
|
+
/* ********************************************************************** *
|
|
1404
|
+
* Start Cumulative Sum logic, author: Rafal Sebestjanski *
|
|
1405
|
+
* ********************************************************************** */
|
|
1406
|
+
/**
|
|
1407
|
+
* Highcharts Stock only. Set the
|
|
1408
|
+
* [cumulative](https://api.highcharts.com/highstock/plotOptions.series.cumulative)
|
|
1409
|
+
* mode of the series after render time.
|
|
1410
|
+
* In most cases it is more useful running
|
|
1411
|
+
* {@link Axis#setCumulative} on the Y axis to update all its series.
|
|
1412
|
+
*
|
|
1413
|
+
* @function Highcharts.Series#setCumulative
|
|
1414
|
+
*
|
|
1415
|
+
* @param {boolean} [cumulative=false]
|
|
1416
|
+
* Either enable or disable Cumulative Sum mode.
|
|
1417
|
+
* Can be one of `false` (default) or `true`.
|
|
1418
|
+
*
|
|
1419
|
+
* @param {boolean} [redraw=true]
|
|
1420
|
+
* Whether to redraw the chart or to wait for a later call to
|
|
1421
|
+
* {@link Chart#redraw}.
|
|
1422
|
+
*/
|
|
1423
|
+
function seriesSetCumulative(cumulative, redraw) {
|
|
1424
|
+
// Set default value to false
|
|
1425
|
+
cumulative = pick(cumulative, false);
|
|
1426
|
+
// Survive to export, #5485 (and for options generally)
|
|
1427
|
+
this.options.cumulative = this.userOptions.cumulative = cumulative;
|
|
1428
|
+
// Fire series.init() that will set or delete series.dataModify
|
|
1429
|
+
this.update({}, pick(redraw, true));
|
|
1430
|
+
// If should, turn on the Cumulative Sum mode
|
|
1431
|
+
if (this.dataModify) {
|
|
1432
|
+
this.dataModify.initCumulative();
|
|
1433
|
+
}
|
|
1434
|
+
else {
|
|
1435
|
+
// When disabling, clear the points
|
|
1436
|
+
this.points.forEach(function (point) {
|
|
1437
|
+
delete point.cumulativeSum;
|
|
1320
1438
|
});
|
|
1321
1439
|
}
|
|
1322
1440
|
}
|
|
1323
1441
|
/**
|
|
1324
|
-
*
|
|
1325
|
-
*
|
|
1326
|
-
* axis module to broken axis module as of #5045.
|
|
1442
|
+
* Highcharts Stock only. Set the cumulative mode on all series
|
|
1443
|
+
* belonging to a Y axis.
|
|
1327
1444
|
*
|
|
1328
|
-
* @
|
|
1329
|
-
* @function Highcharts.Series#gappedPath
|
|
1445
|
+
* @see [plotOptions.series.cumulative](https://api.highcharts.com/highstock/plotOptions.series.cumulative)
|
|
1330
1446
|
*
|
|
1331
|
-
* @
|
|
1332
|
-
*
|
|
1447
|
+
* @sample stock/members/axis-setcumulative/
|
|
1448
|
+
* Set cumulative
|
|
1449
|
+
*
|
|
1450
|
+
* @function Highcharts.Axis#setCumulative
|
|
1451
|
+
*
|
|
1452
|
+
* @param {boolean} [cumulative]
|
|
1453
|
+
* Whether to disable or enable the cumulative mode.
|
|
1454
|
+
* Can be one of `undefined` (default, treated as `false`),
|
|
1455
|
+
* `false` or `true`.
|
|
1456
|
+
*
|
|
1457
|
+
* @param {boolean} [redraw=true]
|
|
1458
|
+
* Whether to redraw the chart or to wait for a later call to
|
|
1459
|
+
* {@link Chart#redraw}.
|
|
1333
1460
|
*/
|
|
1334
|
-
function
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1461
|
+
function axisSetCumulative(cumulative, redraw) {
|
|
1462
|
+
this.setModifier('cumulative', cumulative, redraw);
|
|
1463
|
+
}
|
|
1464
|
+
/* *
|
|
1465
|
+
*
|
|
1466
|
+
* Classes
|
|
1467
|
+
*
|
|
1468
|
+
* */
|
|
1469
|
+
/**
|
|
1470
|
+
* @private
|
|
1471
|
+
*/
|
|
1472
|
+
var Additions = /** @class */ (function () {
|
|
1473
|
+
/* *
|
|
1474
|
+
*
|
|
1475
|
+
* Constructors
|
|
1476
|
+
*
|
|
1477
|
+
* */
|
|
1478
|
+
/**
|
|
1479
|
+
* @private
|
|
1480
|
+
*/
|
|
1481
|
+
function Additions(series) {
|
|
1482
|
+
this.series = series;
|
|
1483
|
+
}
|
|
1484
|
+
/* *
|
|
1485
|
+
*
|
|
1486
|
+
* Functions
|
|
1487
|
+
*
|
|
1488
|
+
* */
|
|
1342
1489
|
/**
|
|
1343
|
-
*
|
|
1344
|
-
* [gapUnit](plotOptions.series.gapUnit) option.
|
|
1345
|
-
*
|
|
1346
|
-
* In case when `dataGrouping` is enabled, points can be grouped
|
|
1347
|
-
* into a larger time span. This can make the grouped points to
|
|
1348
|
-
* have a greater distance than the absolute value of `gapSize`
|
|
1349
|
-
* property, which will result in disappearing graph completely.
|
|
1350
|
-
* To prevent this situation the mentioned distance between
|
|
1351
|
-
* grouped points is used instead of previously defined
|
|
1352
|
-
* `gapSize`.
|
|
1353
|
-
*
|
|
1354
|
-
* In practice, this option is most often used to visualize gaps
|
|
1355
|
-
* in time series. In a stock chart, intraday data is available
|
|
1356
|
-
* for daytime hours, while gaps will appear in nights and
|
|
1357
|
-
* weekends.
|
|
1358
|
-
*
|
|
1359
|
-
* @see [gapUnit](plotOptions.series.gapUnit)
|
|
1360
|
-
* @see [xAxis.breaks](#xAxis.breaks)
|
|
1361
|
-
*
|
|
1362
|
-
* @sample {highstock} stock/plotoptions/series-gapsize/
|
|
1363
|
-
* Setting the gap size to 2 introduces gaps for weekends in
|
|
1364
|
-
* daily datasets.
|
|
1365
|
-
*
|
|
1366
|
-
* @type {number}
|
|
1367
|
-
* @default 0
|
|
1368
|
-
* @product highstock
|
|
1369
|
-
* @requires modules/broken-axis
|
|
1370
|
-
* @apioption plotOptions.series.gapSize
|
|
1490
|
+
* @private
|
|
1371
1491
|
*/
|
|
1492
|
+
Additions.prototype.modifyValue = function () {
|
|
1493
|
+
return 0;
|
|
1494
|
+
};
|
|
1372
1495
|
/**
|
|
1373
|
-
*
|
|
1374
|
-
*
|
|
1496
|
+
* @ignore
|
|
1497
|
+
* @function Highcharts.Series#getCumulativeExtremes
|
|
1375
1498
|
*
|
|
1376
|
-
*
|
|
1377
|
-
*
|
|
1378
|
-
*
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1499
|
+
* @param {Array} [activeYData]
|
|
1500
|
+
* An array cointaining all the points' y values
|
|
1501
|
+
* in a visible range.
|
|
1502
|
+
*/
|
|
1503
|
+
Additions.getCumulativeExtremes = function (activeYData) {
|
|
1504
|
+
var cumulativeDataMin = Infinity,
|
|
1505
|
+
cumulativeDataMax = -Infinity;
|
|
1506
|
+
activeYData.reduce(function (prev, cur) {
|
|
1507
|
+
var sum = prev + cur;
|
|
1508
|
+
cumulativeDataMin = Math.min(cumulativeDataMin, sum, prev);
|
|
1509
|
+
cumulativeDataMax = Math.max(cumulativeDataMax, sum, prev);
|
|
1510
|
+
return sum;
|
|
1511
|
+
});
|
|
1512
|
+
return [cumulativeDataMin, cumulativeDataMax];
|
|
1513
|
+
};
|
|
1514
|
+
/**
|
|
1515
|
+
* @ignore
|
|
1516
|
+
* @function Highcharts.Series#initCompare
|
|
1387
1517
|
*
|
|
1388
|
-
* @
|
|
1389
|
-
*
|
|
1390
|
-
* @since 5.0.13
|
|
1391
|
-
* @product highstock
|
|
1392
|
-
* @validvalue ["relative", "value"]
|
|
1393
|
-
* @requires modules/broken-axis
|
|
1394
|
-
* @apioption plotOptions.series.gapUnit
|
|
1518
|
+
* @param {string} [compare]
|
|
1519
|
+
* Can be one of `"percent"` or `"value"`.
|
|
1395
1520
|
*/
|
|
1396
|
-
|
|
1397
|
-
//
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1521
|
+
Additions.prototype.initCompare = function (compare) {
|
|
1522
|
+
// Set the modifyValue method
|
|
1523
|
+
this.modifyValue = function (value, index) {
|
|
1524
|
+
if (value === null) {
|
|
1525
|
+
value = 0;
|
|
1526
|
+
}
|
|
1527
|
+
var compareValue = this.compareValue;
|
|
1528
|
+
if (typeof value !== 'undefined' &&
|
|
1529
|
+
typeof compareValue !== 'undefined') { // #2601, #5814
|
|
1530
|
+
// Get the modified value
|
|
1531
|
+
if (compare === 'value') {
|
|
1532
|
+
value -= compareValue;
|
|
1533
|
+
// Compare percent
|
|
1534
|
+
}
|
|
1535
|
+
else {
|
|
1536
|
+
var compareBase = this.series.options.compareBase;
|
|
1537
|
+
value = 100 * (value / compareValue) -
|
|
1538
|
+
(compareBase === 100 ? 0 : 100);
|
|
1539
|
+
}
|
|
1540
|
+
// record for tooltip etc.
|
|
1541
|
+
if (typeof index !== 'undefined') {
|
|
1542
|
+
var point = this.series.points[index];
|
|
1543
|
+
if (point) {
|
|
1544
|
+
point.change = value;
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
return value;
|
|
1422
1548
|
}
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1549
|
+
return 0;
|
|
1550
|
+
};
|
|
1551
|
+
};
|
|
1552
|
+
/**
|
|
1553
|
+
* @ignore
|
|
1554
|
+
* @function Highcharts.Series#initCumulative
|
|
1555
|
+
*/
|
|
1556
|
+
Additions.prototype.initCumulative = function () {
|
|
1557
|
+
// Set the modifyValue method
|
|
1558
|
+
this.modifyValue = function (value, index) {
|
|
1559
|
+
if (value === null) {
|
|
1560
|
+
value = 0;
|
|
1561
|
+
}
|
|
1562
|
+
if (value !== void 0 && index !== void 0) {
|
|
1563
|
+
var prevPoint = index > 0 ?
|
|
1564
|
+
this.series.points[index - 1] : null;
|
|
1565
|
+
// Get the modified value
|
|
1566
|
+
if (prevPoint && prevPoint.cumulativeSum) {
|
|
1567
|
+
value = correctFloat(prevPoint.cumulativeSum + value);
|
|
1437
1568
|
}
|
|
1569
|
+
// Record for tooltip etc.
|
|
1570
|
+
var point = this.series.points[index];
|
|
1571
|
+
if (point) {
|
|
1572
|
+
point.cumulativeSum = value;
|
|
1573
|
+
}
|
|
1574
|
+
return value;
|
|
1438
1575
|
}
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1576
|
+
return 0;
|
|
1577
|
+
};
|
|
1578
|
+
};
|
|
1579
|
+
return Additions;
|
|
1580
|
+
}());
|
|
1581
|
+
DataModifyComposition.Additions = Additions;
|
|
1582
|
+
})(DataModifyComposition || (DataModifyComposition = {}));
|
|
1583
|
+
/* *
|
|
1584
|
+
*
|
|
1585
|
+
* Default Export
|
|
1586
|
+
*
|
|
1587
|
+
* */
|
|
1588
|
+
/* *
|
|
1589
|
+
*
|
|
1590
|
+
* API Options
|
|
1591
|
+
*
|
|
1592
|
+
* */
|
|
1593
|
+
/**
|
|
1594
|
+
* Compare the values of the series against the first non-null, non-
|
|
1595
|
+
* zero value in the visible range. The y axis will show percentage
|
|
1596
|
+
* or absolute change depending on whether `compare` is set to `"percent"`
|
|
1597
|
+
* or `"value"`. When this is applied to multiple series, it allows
|
|
1598
|
+
* comparing the development of the series against each other. Adds
|
|
1599
|
+
* a `change` field to every point object.
|
|
1600
|
+
*
|
|
1601
|
+
* @see [compareBase](#plotOptions.series.compareBase)
|
|
1602
|
+
* @see [Axis.setCompare()](/class-reference/Highcharts.Axis#setCompare)
|
|
1603
|
+
* @see [Series.setCompare()](/class-reference/Highcharts.Series#setCompare)
|
|
1604
|
+
*
|
|
1605
|
+
* @sample {highstock} stock/plotoptions/series-compare-percent/
|
|
1606
|
+
* Percent
|
|
1607
|
+
* @sample {highstock} stock/plotoptions/series-compare-value/
|
|
1608
|
+
* Value
|
|
1609
|
+
*
|
|
1610
|
+
* @type {string}
|
|
1611
|
+
* @since 1.0.1
|
|
1612
|
+
* @product highstock
|
|
1613
|
+
* @apioption plotOptions.series.compare
|
|
1614
|
+
*/
|
|
1615
|
+
/**
|
|
1616
|
+
* Defines if comparison should start from the first point within the visible
|
|
1617
|
+
* range or should start from the first point **before** the range.
|
|
1618
|
+
*
|
|
1619
|
+
* In other words, this flag determines if first point within the visible range
|
|
1620
|
+
* will have 0% (`compareStart=true`) or should have been already calculated
|
|
1621
|
+
* according to the previous point (`compareStart=false`).
|
|
1622
|
+
*
|
|
1623
|
+
* @sample {highstock} stock/plotoptions/series-comparestart/
|
|
1624
|
+
* Calculate compare within visible range
|
|
1625
|
+
*
|
|
1626
|
+
* @type {boolean}
|
|
1627
|
+
* @default false
|
|
1628
|
+
* @since 6.0.0
|
|
1629
|
+
* @product highstock
|
|
1630
|
+
* @apioption plotOptions.series.compareStart
|
|
1631
|
+
*/
|
|
1632
|
+
/**
|
|
1633
|
+
* When [compare](#plotOptions.series.compare) is `percent`, this option
|
|
1634
|
+
* dictates whether to use 0 or 100 as the base of comparison.
|
|
1635
|
+
*
|
|
1636
|
+
* @sample {highstock} stock/plotoptions/series-comparebase/
|
|
1637
|
+
* Compare base is 100
|
|
1638
|
+
*
|
|
1639
|
+
* @type {number}
|
|
1640
|
+
* @default 0
|
|
1641
|
+
* @since 5.0.6
|
|
1642
|
+
* @product highstock
|
|
1643
|
+
* @validvalue [0, 100]
|
|
1644
|
+
* @apioption plotOptions.series.compareBase
|
|
1645
|
+
*/
|
|
1646
|
+
/**
|
|
1647
|
+
* Cumulative Sum feature replaces points' values with the following formula:
|
|
1648
|
+
* `sum of all previous points' values + current point's value`.
|
|
1649
|
+
* Works only for points in a visible range.
|
|
1650
|
+
* Adds the `cumulativeSum` field to each point object that can be accessed
|
|
1651
|
+
* e.g. in the [tooltip.pointFormat](https://api.highcharts.com/highstock/tooltip.pointFormat).
|
|
1652
|
+
*
|
|
1653
|
+
* @see [Axis.setCumulative()](/class-reference/Highcharts.Axis#setCumulative)
|
|
1654
|
+
* @see [Series.setCumulative()](/class-reference/Highcharts.Series#setCumulative)
|
|
1655
|
+
*
|
|
1656
|
+
* @sample {highstock} stock/plotoptions/series-cumulative-sum/
|
|
1657
|
+
* Cumulative Sum
|
|
1658
|
+
*
|
|
1659
|
+
* @type {boolean}
|
|
1660
|
+
* @default false
|
|
1661
|
+
* @since 9.3.0
|
|
1662
|
+
* @product highstock
|
|
1663
|
+
* @apioption plotOptions.series.cumulative
|
|
1664
|
+
*/
|
|
1665
|
+
''; // keeps doclets above in transpiled file
|
|
1666
|
+
|
|
1667
|
+
return DataModifyComposition;
|
|
1668
|
+
});
|
|
1669
|
+
_registerModule(_modules, 'Core/Axis/BrokenAxis.js', [_modules['Extensions/Stacking.js'], _modules['Core/Utilities.js']], function (StackItem, U) {
|
|
1670
|
+
/* *
|
|
1671
|
+
*
|
|
1672
|
+
* (c) 2009-2021 Torstein Honsi
|
|
1673
|
+
*
|
|
1674
|
+
* License: www.highcharts.com/license
|
|
1675
|
+
*
|
|
1676
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
1677
|
+
*
|
|
1678
|
+
* */
|
|
1679
|
+
var addEvent = U.addEvent,
|
|
1680
|
+
find = U.find,
|
|
1681
|
+
fireEvent = U.fireEvent,
|
|
1682
|
+
isArray = U.isArray,
|
|
1683
|
+
isNumber = U.isNumber,
|
|
1684
|
+
pick = U.pick;
|
|
1685
|
+
/* *
|
|
1686
|
+
*
|
|
1687
|
+
* Composition
|
|
1688
|
+
*
|
|
1689
|
+
* */
|
|
1690
|
+
/**
|
|
1691
|
+
* Axis with support of broken data rows.
|
|
1692
|
+
* @private
|
|
1693
|
+
*/
|
|
1694
|
+
var BrokenAxis;
|
|
1695
|
+
(function (BrokenAxis) {
|
|
1446
1696
|
/* *
|
|
1447
1697
|
*
|
|
1448
|
-
*
|
|
1698
|
+
* Declarations
|
|
1699
|
+
*
|
|
1700
|
+
* */
|
|
1701
|
+
/* *
|
|
1702
|
+
*
|
|
1703
|
+
* Constants
|
|
1704
|
+
*
|
|
1705
|
+
* */
|
|
1706
|
+
var composedClasses = [];
|
|
1707
|
+
/* *
|
|
1708
|
+
*
|
|
1709
|
+
* Functions
|
|
1449
1710
|
*
|
|
1450
1711
|
* */
|
|
1712
|
+
/* eslint-disable valid-jsdoc */
|
|
1451
1713
|
/**
|
|
1452
|
-
*
|
|
1714
|
+
* Adds support for broken axes.
|
|
1453
1715
|
* @private
|
|
1454
|
-
* @class
|
|
1455
1716
|
*/
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
this.axis = axis;
|
|
1717
|
+
function compose(AxisClass, SeriesClass) {
|
|
1718
|
+
if (composedClasses.indexOf(AxisClass) === -1) {
|
|
1719
|
+
composedClasses.push(AxisClass);
|
|
1720
|
+
AxisClass.keepProps.push('brokenAxis');
|
|
1721
|
+
addEvent(AxisClass, 'init', onAxisInit);
|
|
1722
|
+
addEvent(AxisClass, 'afterInit', onAxisAfterInit);
|
|
1723
|
+
addEvent(AxisClass, 'afterSetTickPositions', onAxisAfterSetTickPositions);
|
|
1724
|
+
addEvent(AxisClass, 'afterSetOptions', onAxisAfterSetOptions);
|
|
1465
1725
|
}
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
nval += brk.len;
|
|
1510
|
-
}
|
|
1511
|
-
else if (Additions.isInBreak(brk, nval)) {
|
|
1512
|
-
nval += brk.len;
|
|
1726
|
+
if (composedClasses.indexOf(SeriesClass) === -1) {
|
|
1727
|
+
composedClasses.push(SeriesClass);
|
|
1728
|
+
var seriesProto = SeriesClass.prototype;
|
|
1729
|
+
seriesProto.drawBreaks = seriesDrawBreaks;
|
|
1730
|
+
seriesProto.gappedPath = seriesGappedPath;
|
|
1731
|
+
addEvent(SeriesClass, 'afterGeneratePoints', onSeriesAfterGeneratePoints);
|
|
1732
|
+
addEvent(SeriesClass, 'afterRender', onSeriesAfterRender);
|
|
1733
|
+
}
|
|
1734
|
+
return AxisClass;
|
|
1735
|
+
}
|
|
1736
|
+
BrokenAxis.compose = compose;
|
|
1737
|
+
/**
|
|
1738
|
+
* @private
|
|
1739
|
+
*/
|
|
1740
|
+
function onAxisAfterInit() {
|
|
1741
|
+
if (typeof this.brokenAxis !== 'undefined') {
|
|
1742
|
+
this.brokenAxis.setBreaks(this.options.breaks, false);
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
/**
|
|
1746
|
+
* Force Axis to be not-ordinal when breaks are defined.
|
|
1747
|
+
* @private
|
|
1748
|
+
*/
|
|
1749
|
+
function onAxisAfterSetOptions() {
|
|
1750
|
+
var axis = this;
|
|
1751
|
+
if (axis.brokenAxis && axis.brokenAxis.hasBreaks) {
|
|
1752
|
+
axis.options.ordinal = false;
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
/**
|
|
1756
|
+
* @private
|
|
1757
|
+
*/
|
|
1758
|
+
function onAxisAfterSetTickPositions() {
|
|
1759
|
+
var axis = this,
|
|
1760
|
+
brokenAxis = axis.brokenAxis;
|
|
1761
|
+
if (brokenAxis &&
|
|
1762
|
+
brokenAxis.hasBreaks) {
|
|
1763
|
+
var tickPositions = axis.tickPositions,
|
|
1764
|
+
info = axis.tickPositions.info,
|
|
1765
|
+
newPositions = [];
|
|
1766
|
+
for (var i = 0; i < tickPositions.length; i++) {
|
|
1767
|
+
if (!brokenAxis.isInAnyBreak(tickPositions[i])) {
|
|
1768
|
+
newPositions.push(tickPositions[i]);
|
|
1513
1769
|
}
|
|
1514
1770
|
}
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1771
|
+
axis.tickPositions = newPositions;
|
|
1772
|
+
axis.tickPositions.info = info;
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
/**
|
|
1776
|
+
* @private
|
|
1777
|
+
*/
|
|
1778
|
+
function onAxisInit() {
|
|
1779
|
+
var axis = this;
|
|
1780
|
+
if (!axis.brokenAxis) {
|
|
1781
|
+
axis.brokenAxis = new Additions(axis);
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
/**
|
|
1785
|
+
* @private
|
|
1786
|
+
*/
|
|
1787
|
+
function onSeriesAfterGeneratePoints() {
|
|
1788
|
+
var _a = this,
|
|
1789
|
+
isDirty = _a.isDirty,
|
|
1790
|
+
connectNulls = _a.options.connectNulls,
|
|
1791
|
+
points = _a.points,
|
|
1792
|
+
xAxis = _a.xAxis,
|
|
1793
|
+
yAxis = _a.yAxis;
|
|
1794
|
+
// Set, or reset visibility of the points. Axis.setBreaks marks
|
|
1795
|
+
// the series as isDirty
|
|
1796
|
+
if (isDirty) {
|
|
1797
|
+
var i = points.length;
|
|
1798
|
+
while (i--) {
|
|
1799
|
+
var point = points[i];
|
|
1800
|
+
// Respect nulls inside the break (#4275)
|
|
1801
|
+
var nullGap = point.y === null && connectNulls === false;
|
|
1802
|
+
var isPointInBreak = (!nullGap && ((xAxis &&
|
|
1803
|
+
xAxis.brokenAxis &&
|
|
1804
|
+
xAxis.brokenAxis.isInAnyBreak(point.x,
|
|
1805
|
+
true)) || (yAxis &&
|
|
1806
|
+
yAxis.brokenAxis &&
|
|
1807
|
+
yAxis.brokenAxis.isInAnyBreak(point.y,
|
|
1808
|
+
true))));
|
|
1809
|
+
// Set point.visible if in any break.
|
|
1810
|
+
// If not in break, reset visible to original value.
|
|
1811
|
+
point.visible = isPointInBreak ?
|
|
1812
|
+
false :
|
|
1813
|
+
point.options.visible !== false;
|
|
1542
1814
|
}
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
/**
|
|
1818
|
+
* @private
|
|
1819
|
+
*/
|
|
1820
|
+
function onSeriesAfterRender() {
|
|
1821
|
+
this.drawBreaks(this.xAxis, ['x']);
|
|
1822
|
+
this.drawBreaks(this.yAxis, pick(this.pointArrayMap, ['y']));
|
|
1823
|
+
}
|
|
1824
|
+
/**
|
|
1825
|
+
* @private
|
|
1826
|
+
*/
|
|
1827
|
+
function seriesDrawBreaks(axis, keys) {
|
|
1828
|
+
var series = this,
|
|
1829
|
+
points = series.points;
|
|
1830
|
+
var breaks,
|
|
1831
|
+
threshold,
|
|
1832
|
+
eventName,
|
|
1833
|
+
y;
|
|
1834
|
+
if (axis && // #5950
|
|
1835
|
+
axis.brokenAxis &&
|
|
1836
|
+
axis.brokenAxis.hasBreaks) {
|
|
1837
|
+
var brokenAxis_1 = axis.brokenAxis;
|
|
1838
|
+
keys.forEach(function (key) {
|
|
1839
|
+
breaks = brokenAxis_1 && brokenAxis_1.breakArray || [];
|
|
1840
|
+
threshold = axis.isXAxis ?
|
|
1841
|
+
axis.min :
|
|
1842
|
+
pick(series.options.threshold, axis.min);
|
|
1843
|
+
points.forEach(function (point) {
|
|
1844
|
+
y = pick(point['stack' + key.toUpperCase()], point[key]);
|
|
1845
|
+
breaks.forEach(function (brk) {
|
|
1846
|
+
if (isNumber(threshold) && isNumber(y)) {
|
|
1847
|
+
eventName = false;
|
|
1848
|
+
if ((threshold < brk.from && y > brk.to) ||
|
|
1849
|
+
(threshold > brk.from && y < brk.from)) {
|
|
1850
|
+
eventName = 'pointBreak';
|
|
1851
|
+
}
|
|
1852
|
+
else if ((threshold < brk.from && y > brk.from && y < brk.to) ||
|
|
1853
|
+
(threshold > brk.from && y > brk.to && y < brk.from)) {
|
|
1854
|
+
eventName = 'pointInBreak';
|
|
1855
|
+
}
|
|
1856
|
+
if (eventName) {
|
|
1857
|
+
fireEvent(axis, eventName, { point: point, brk: brk });
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
});
|
|
1861
|
+
});
|
|
1862
|
+
});
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
/**
|
|
1866
|
+
* Extend getGraphPath by identifying gaps in the data so that we
|
|
1867
|
+
* can draw a gap in the line or area. This was moved from ordinal
|
|
1868
|
+
* axis module to broken axis module as of #5045.
|
|
1869
|
+
*
|
|
1870
|
+
* @private
|
|
1871
|
+
* @function Highcharts.Series#gappedPath
|
|
1872
|
+
*
|
|
1873
|
+
* @return {Highcharts.SVGPathArray}
|
|
1874
|
+
* Gapped path
|
|
1875
|
+
*/
|
|
1876
|
+
function seriesGappedPath() {
|
|
1877
|
+
var currentDataGrouping = this.currentDataGrouping,
|
|
1878
|
+
groupingSize = currentDataGrouping && currentDataGrouping.gapSize,
|
|
1879
|
+
points = this.points.slice(),
|
|
1880
|
+
yAxis = this.yAxis;
|
|
1881
|
+
var gapSize = this.options.gapSize,
|
|
1882
|
+
i = points.length - 1,
|
|
1883
|
+
stack;
|
|
1884
|
+
/**
|
|
1885
|
+
* Defines when to display a gap in the graph, together with the
|
|
1886
|
+
* [gapUnit](plotOptions.series.gapUnit) option.
|
|
1546
1887
|
*
|
|
1547
|
-
*
|
|
1888
|
+
* In case when `dataGrouping` is enabled, points can be grouped
|
|
1889
|
+
* into a larger time span. This can make the grouped points to
|
|
1890
|
+
* have a greater distance than the absolute value of `gapSize`
|
|
1891
|
+
* property, which will result in disappearing graph completely.
|
|
1892
|
+
* To prevent this situation the mentioned distance between
|
|
1893
|
+
* grouped points is used instead of previously defined
|
|
1894
|
+
* `gapSize`.
|
|
1548
1895
|
*
|
|
1549
|
-
*
|
|
1550
|
-
|
|
1551
|
-
*
|
|
1552
|
-
*
|
|
1896
|
+
* In practice, this option is most often used to visualize gaps
|
|
1897
|
+
* in time series. In a stock chart, intraday data is available
|
|
1898
|
+
* for daytime hours, while gaps will appear in nights and
|
|
1899
|
+
* weekends.
|
|
1553
1900
|
*
|
|
1554
|
-
* @
|
|
1555
|
-
*
|
|
1901
|
+
* @see [gapUnit](plotOptions.series.gapUnit)
|
|
1902
|
+
* @see [xAxis.breaks](#xAxis.breaks)
|
|
1556
1903
|
*
|
|
1557
|
-
* @
|
|
1558
|
-
*
|
|
1904
|
+
* @sample {highstock} stock/plotoptions/series-gapsize/
|
|
1905
|
+
* Setting the gap size to 2 introduces gaps for weekends in
|
|
1906
|
+
* daily datasets.
|
|
1559
1907
|
*
|
|
1560
|
-
* @
|
|
1561
|
-
*
|
|
1562
|
-
*
|
|
1908
|
+
* @type {number}
|
|
1909
|
+
* @default 0
|
|
1910
|
+
* @product highstock
|
|
1911
|
+
* @requires modules/broken-axis
|
|
1912
|
+
* @apioption plotOptions.series.gapSize
|
|
1563
1913
|
*/
|
|
1564
|
-
Additions.prototype.findBreakAt = function (x, breaks) {
|
|
1565
|
-
return find(breaks, function (b) {
|
|
1566
|
-
return b.from < x && x < b.to;
|
|
1567
|
-
});
|
|
1568
|
-
};
|
|
1569
1914
|
/**
|
|
1570
|
-
*
|
|
1915
|
+
* Together with [gapSize](plotOptions.series.gapSize), this
|
|
1916
|
+
* option defines where to draw gaps in the graph.
|
|
1917
|
+
*
|
|
1918
|
+
* When the `gapUnit` is `"relative"` (default), a gap size of 5
|
|
1919
|
+
* means that if the distance between two points is greater than
|
|
1920
|
+
* 5 times that of the two closest points, the graph will be
|
|
1921
|
+
* broken.
|
|
1922
|
+
*
|
|
1923
|
+
* When the `gapUnit` is `"value"`, the gap is based on absolute
|
|
1924
|
+
* axis values, which on a datetime axis is milliseconds. This
|
|
1925
|
+
* also applies to the navigator series that inherits gap
|
|
1926
|
+
* options from the base series.
|
|
1927
|
+
*
|
|
1928
|
+
* @see [gapSize](plotOptions.series.gapSize)
|
|
1929
|
+
*
|
|
1930
|
+
* @type {string}
|
|
1931
|
+
* @default relative
|
|
1932
|
+
* @since 5.0.13
|
|
1933
|
+
* @product highstock
|
|
1934
|
+
* @validvalue ["relative", "value"]
|
|
1935
|
+
* @requires modules/broken-axis
|
|
1936
|
+
* @apioption plotOptions.series.gapUnit
|
|
1937
|
+
*/
|
|
1938
|
+
if (gapSize && i > 0) { // #5008
|
|
1939
|
+
// Gap unit is relative
|
|
1940
|
+
if (this.options.gapUnit !== 'value') {
|
|
1941
|
+
gapSize *= this.basePointRange;
|
|
1942
|
+
}
|
|
1943
|
+
// Setting a new gapSize in case dataGrouping is enabled
|
|
1944
|
+
// (#7686)
|
|
1945
|
+
if (groupingSize &&
|
|
1946
|
+
groupingSize > gapSize &&
|
|
1947
|
+
// Except when DG is forced (e.g. from other series)
|
|
1948
|
+
// and has lower granularity than actual points (#11351)
|
|
1949
|
+
groupingSize >= this.basePointRange) {
|
|
1950
|
+
gapSize = groupingSize;
|
|
1951
|
+
}
|
|
1952
|
+
// extension for ordinal breaks
|
|
1953
|
+
var current = void 0,
|
|
1954
|
+
next = void 0;
|
|
1955
|
+
while (i--) {
|
|
1956
|
+
// Reassign next if it is not visible
|
|
1957
|
+
if (!(next && next.visible !== false)) {
|
|
1958
|
+
next = points[i + 1];
|
|
1959
|
+
}
|
|
1960
|
+
current = points[i];
|
|
1961
|
+
// Skip iteration if one of the points is not visible
|
|
1962
|
+
if (next.visible === false || current.visible === false) {
|
|
1963
|
+
continue;
|
|
1964
|
+
}
|
|
1965
|
+
if (next.x - current.x > gapSize) {
|
|
1966
|
+
var xRange = (current.x + next.x) / 2;
|
|
1967
|
+
points.splice(// insert after this one
|
|
1968
|
+
i + 1, 0, {
|
|
1969
|
+
isNull: true,
|
|
1970
|
+
x: xRange
|
|
1971
|
+
});
|
|
1972
|
+
// For stacked chart generate empty stack items,
|
|
1973
|
+
// #6546
|
|
1974
|
+
if (yAxis.stacking && this.options.stacking) {
|
|
1975
|
+
stack = yAxis.stacking.stacks[this.stackKey][xRange] =
|
|
1976
|
+
new StackItem(yAxis, yAxis.options
|
|
1977
|
+
.stackLabels, false, xRange, this.stack);
|
|
1978
|
+
stack.total = 0;
|
|
1979
|
+
}
|
|
1980
|
+
}
|
|
1981
|
+
// Assign current to next for the upcoming iteration
|
|
1982
|
+
next = current;
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
// Call base method
|
|
1986
|
+
return this.getGraphPath(points);
|
|
1987
|
+
}
|
|
1988
|
+
/* *
|
|
1989
|
+
*
|
|
1990
|
+
* Class
|
|
1991
|
+
*
|
|
1992
|
+
* */
|
|
1993
|
+
/**
|
|
1994
|
+
* Provides support for broken axes.
|
|
1995
|
+
* @private
|
|
1996
|
+
* @class
|
|
1997
|
+
*/
|
|
1998
|
+
var Additions = /** @class */ (function () {
|
|
1999
|
+
/* *
|
|
2000
|
+
*
|
|
2001
|
+
* Constructors
|
|
2002
|
+
*
|
|
2003
|
+
* */
|
|
2004
|
+
function Additions(axis) {
|
|
2005
|
+
this.hasBreaks = false;
|
|
2006
|
+
this.axis = axis;
|
|
2007
|
+
}
|
|
2008
|
+
/* *
|
|
2009
|
+
*
|
|
2010
|
+
* Static Functions
|
|
2011
|
+
*
|
|
2012
|
+
* */
|
|
2013
|
+
/**
|
|
2014
|
+
* @private
|
|
2015
|
+
*/
|
|
2016
|
+
Additions.isInBreak = function (brk, val) {
|
|
2017
|
+
var repeat = brk.repeat || Infinity,
|
|
2018
|
+
from = brk.from,
|
|
2019
|
+
length = brk.to - brk.from,
|
|
2020
|
+
test = (val >= from ?
|
|
2021
|
+
(val - from) % repeat :
|
|
2022
|
+
repeat - ((from - val) % repeat));
|
|
2023
|
+
var ret;
|
|
2024
|
+
if (!brk.inclusive) {
|
|
2025
|
+
ret = test < length && test !== 0;
|
|
2026
|
+
}
|
|
2027
|
+
else {
|
|
2028
|
+
ret = test <= length;
|
|
2029
|
+
}
|
|
2030
|
+
return ret;
|
|
2031
|
+
};
|
|
2032
|
+
/**
|
|
2033
|
+
* @private
|
|
2034
|
+
*/
|
|
2035
|
+
Additions.lin2Val = function (val) {
|
|
2036
|
+
var axis = this;
|
|
2037
|
+
var brokenAxis = axis.brokenAxis;
|
|
2038
|
+
var breakArray = brokenAxis && brokenAxis.breakArray;
|
|
2039
|
+
if (!breakArray || !isNumber(val)) {
|
|
2040
|
+
return val;
|
|
2041
|
+
}
|
|
2042
|
+
var nval = val,
|
|
2043
|
+
brk,
|
|
2044
|
+
i;
|
|
2045
|
+
for (i = 0; i < breakArray.length; i++) {
|
|
2046
|
+
brk = breakArray[i];
|
|
2047
|
+
if (brk.from >= nval) {
|
|
2048
|
+
break;
|
|
2049
|
+
}
|
|
2050
|
+
else if (brk.to < nval) {
|
|
2051
|
+
nval += brk.len;
|
|
2052
|
+
}
|
|
2053
|
+
else if (Additions.isInBreak(brk, nval)) {
|
|
2054
|
+
nval += brk.len;
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2057
|
+
return nval;
|
|
2058
|
+
};
|
|
2059
|
+
/**
|
|
2060
|
+
* @private
|
|
2061
|
+
*/
|
|
2062
|
+
Additions.val2Lin = function (val) {
|
|
2063
|
+
var axis = this;
|
|
2064
|
+
var brokenAxis = axis.brokenAxis;
|
|
2065
|
+
var breakArray = brokenAxis && brokenAxis.breakArray;
|
|
2066
|
+
if (!breakArray || !isNumber(val)) {
|
|
2067
|
+
return val;
|
|
2068
|
+
}
|
|
2069
|
+
var nval = val,
|
|
2070
|
+
brk,
|
|
2071
|
+
i;
|
|
2072
|
+
for (i = 0; i < breakArray.length; i++) {
|
|
2073
|
+
brk = breakArray[i];
|
|
2074
|
+
if (brk.to <= val) {
|
|
2075
|
+
nval -= brk.len;
|
|
2076
|
+
}
|
|
2077
|
+
else if (brk.from >= val) {
|
|
2078
|
+
break;
|
|
2079
|
+
}
|
|
2080
|
+
else if (Additions.isInBreak(brk, val)) {
|
|
2081
|
+
nval -= (val - brk.from);
|
|
2082
|
+
break;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
return nval;
|
|
2086
|
+
};
|
|
2087
|
+
/* *
|
|
2088
|
+
*
|
|
2089
|
+
* Functions
|
|
2090
|
+
*
|
|
2091
|
+
* */
|
|
2092
|
+
/**
|
|
2093
|
+
* Returns the first break found where the x is larger then break.from
|
|
2094
|
+
* and smaller then break.to.
|
|
2095
|
+
*
|
|
2096
|
+
* @param {number} x
|
|
2097
|
+
* The number which should be within a break.
|
|
2098
|
+
*
|
|
2099
|
+
* @param {Array<Highcharts.XAxisBreaksOptions>} breaks
|
|
2100
|
+
* The array of breaks to search within.
|
|
2101
|
+
*
|
|
2102
|
+
* @return {Highcharts.XAxisBreaksOptions|undefined}
|
|
2103
|
+
* Returns the first break found that matches, returns false if no break
|
|
2104
|
+
* is found.
|
|
2105
|
+
*/
|
|
2106
|
+
Additions.prototype.findBreakAt = function (x, breaks) {
|
|
2107
|
+
return find(breaks, function (b) {
|
|
2108
|
+
return b.from < x && x < b.to;
|
|
2109
|
+
});
|
|
2110
|
+
};
|
|
2111
|
+
/**
|
|
2112
|
+
* @private
|
|
1571
2113
|
*/
|
|
1572
2114
|
Additions.prototype.isInAnyBreak = function (val, testKeep) {
|
|
1573
2115
|
var brokenAxis = this,
|
|
@@ -1894,8 +2436,18 @@
|
|
|
1894
2436
|
arr[arr.length - 1] :
|
|
1895
2437
|
(arr.hasNulls ? null : void 0);
|
|
1896
2438
|
},
|
|
1897
|
-
//
|
|
1898
|
-
// input and an array is output
|
|
2439
|
+
// HLC, OHLC and range are special cases where a multidimensional array is
|
|
2440
|
+
// input and an array is output.
|
|
2441
|
+
hlc: function (high, low, close) {
|
|
2442
|
+
high = approximations.high(high);
|
|
2443
|
+
low = approximations.low(low);
|
|
2444
|
+
close = approximations.close(close);
|
|
2445
|
+
if (isNumber(high) ||
|
|
2446
|
+
isNumber(low) ||
|
|
2447
|
+
isNumber(close)) {
|
|
2448
|
+
return [high, low, close];
|
|
2449
|
+
}
|
|
2450
|
+
},
|
|
1899
2451
|
ohlc: function (open, high, low, close) {
|
|
1900
2452
|
open = approximations.open(open);
|
|
1901
2453
|
high = approximations.high(high);
|
|
@@ -1907,7 +2459,6 @@
|
|
|
1907
2459
|
isNumber(close)) {
|
|
1908
2460
|
return [open, high, low, close];
|
|
1909
2461
|
}
|
|
1910
|
-
// else, return is undefined
|
|
1911
2462
|
},
|
|
1912
2463
|
range: function (low, high) {
|
|
1913
2464
|
low = approximations.low(low);
|
|
@@ -1921,7 +2472,7 @@
|
|
|
1921
2472
|
// else, return is undefined
|
|
1922
2473
|
}
|
|
1923
2474
|
};
|
|
1924
|
-
var applyGrouping = function () {
|
|
2475
|
+
var applyGrouping = function (hasExtemesChanged) {
|
|
1925
2476
|
var series = this,
|
|
1926
2477
|
chart = series.chart,
|
|
1927
2478
|
options = series.options,
|
|
@@ -1940,9 +2491,9 @@
|
|
|
1940
2491
|
if (groupingEnabled && !series.requireSorting) {
|
|
1941
2492
|
series.requireSorting = revertRequireSorting = true;
|
|
1942
2493
|
}
|
|
1943
|
-
// Skip if
|
|
1944
|
-
// order)
|
|
1945
|
-
skip = skipDataGrouping(series) || !groupingEnabled;
|
|
2494
|
+
// Skip if skipDataGrouping method returns false or if grouping is disabled
|
|
2495
|
+
// (in that order).
|
|
2496
|
+
skip = skipDataGrouping(series, hasExtemesChanged) === false || !groupingEnabled;
|
|
1946
2497
|
// Revert original requireSorting value if changed
|
|
1947
2498
|
if (revertRequireSorting) {
|
|
1948
2499
|
series.requireSorting = false;
|
|
@@ -2053,13 +2604,13 @@
|
|
|
2053
2604
|
(currentDataGrouping && currentDataGrouping.totalRange);
|
|
2054
2605
|
}
|
|
2055
2606
|
};
|
|
2056
|
-
var skipDataGrouping = function (series
|
|
2057
|
-
|
|
2607
|
+
var skipDataGrouping = function (series,
|
|
2608
|
+
force) {
|
|
2609
|
+
return !(series.isCartesian &&
|
|
2058
2610
|
!series.isDirty &&
|
|
2059
2611
|
!series.xAxis.isDirty &&
|
|
2060
|
-
!series.yAxis.isDirty
|
|
2061
|
-
|
|
2062
|
-
}
|
|
2612
|
+
!series.yAxis.isDirty &&
|
|
2613
|
+
!force);
|
|
2063
2614
|
};
|
|
2064
2615
|
var groupData = function (xData,
|
|
2065
2616
|
yData,
|
|
@@ -2373,7 +2924,10 @@
|
|
|
2373
2924
|
ohlc: {
|
|
2374
2925
|
groupPixelWidth: 5
|
|
2375
2926
|
},
|
|
2376
|
-
|
|
2927
|
+
hlc: {
|
|
2928
|
+
groupPixelWidth: 5
|
|
2929
|
+
// Move to HeikinAshiSeries.ts aftre refactoring data grouping.
|
|
2930
|
+
},
|
|
2377
2931
|
heikinashi: {
|
|
2378
2932
|
groupPixelWidth: 10
|
|
2379
2933
|
}
|
|
@@ -2416,6 +2970,9 @@
|
|
|
2416
2970
|
if (this.is('ohlc')) {
|
|
2417
2971
|
return 'ohlc';
|
|
2418
2972
|
}
|
|
2973
|
+
if (this.is('hlc')) {
|
|
2974
|
+
return 'hlc';
|
|
2975
|
+
}
|
|
2419
2976
|
if (this.is('column')) {
|
|
2420
2977
|
return 'sum';
|
|
2421
2978
|
}
|
|
@@ -2481,7 +3038,7 @@
|
|
|
2481
3038
|
*
|
|
2482
3039
|
* @function Highcharts.Axis#applyGrouping
|
|
2483
3040
|
*/
|
|
2484
|
-
Axis.prototype.applyGrouping = function () {
|
|
3041
|
+
Axis.prototype.applyGrouping = function (e) {
|
|
2485
3042
|
var axis = this,
|
|
2486
3043
|
series = axis.series;
|
|
2487
3044
|
series.forEach(function (series) {
|
|
@@ -2490,8 +3047,10 @@
|
|
|
2490
3047
|
series.groupPixelWidth = axis.getGroupPixelWidth && axis.getGroupPixelWidth();
|
|
2491
3048
|
if (series.groupPixelWidth) {
|
|
2492
3049
|
series.hasProcessed = true; // #2692
|
|
2493
|
-
series.applyGrouping();
|
|
2494
3050
|
}
|
|
3051
|
+
// Fire independing on series.groupPixelWidth to always set a proper
|
|
3052
|
+
// dataGrouping state, (#16238)
|
|
3053
|
+
series.applyGrouping(!!e.hasExtemesChanged);
|
|
2495
3054
|
});
|
|
2496
3055
|
};
|
|
2497
3056
|
// Get the data grouping pixel width based on the greatest defined individual
|
|
@@ -2524,8 +3083,7 @@
|
|
|
2524
3083
|
// Execute grouping if the amount of points is greater than the
|
|
2525
3084
|
// limit defined in groupPixelWidth
|
|
2526
3085
|
if (series[i].groupPixelWidth ||
|
|
2527
|
-
dataLength >
|
|
2528
|
-
(this.chart.plotSizeX / groupPixelWidth) ||
|
|
3086
|
+
dataLength > (this.chart.plotSizeX / groupPixelWidth) ||
|
|
2529
3087
|
(dataLength && dgOptions.forced)) {
|
|
2530
3088
|
doGrouping = true;
|
|
2531
3089
|
}
|
|
@@ -2763,7 +3321,7 @@
|
|
|
2763
3321
|
* from the raw data.
|
|
2764
3322
|
*
|
|
2765
3323
|
* Defaults to `average` for line-type series, `sum` for columns, `range`
|
|
2766
|
-
* for range series and `ohlc` for OHLC and candlestick.
|
|
3324
|
+
* for range series, `hlc` for HLC, and `ohlc` for OHLC and candlestick.
|
|
2767
3325
|
*
|
|
2768
3326
|
* @sample {highstock} stock/plotoptions/series-datagrouping-approximation
|
|
2769
3327
|
* Approximation callback with custom data
|
|
@@ -2905,87 +3463,546 @@
|
|
|
2905
3463
|
* -`lastPoint` the last point in the group
|
|
2906
3464
|
* (e.g. points at 00:13, 00:35, 00:59 -> 00:59)
|
|
2907
3465
|
*
|
|
2908
|
-
* @sample {highstock} stock/plotoptions/series-datagrouping-first-anchor
|
|
2909
|
-
* Applying first and last anchor.
|
|
3466
|
+
* @sample {highstock} stock/plotoptions/series-datagrouping-first-anchor
|
|
3467
|
+
* Applying first and last anchor.
|
|
3468
|
+
*
|
|
3469
|
+
* @sample {highstock} stock/plotoptions/series-datagrouping-last-anchor
|
|
3470
|
+
* Applying the last anchor in the chart with live data.
|
|
3471
|
+
*
|
|
3472
|
+
* @see [dataGrouping.anchor](#plotOptions.series.dataGrouping.anchor)
|
|
3473
|
+
*
|
|
3474
|
+
* @type {Highcharts.DataGroupingAnchorExtremes}
|
|
3475
|
+
* @since 9.1.0
|
|
3476
|
+
* @default start
|
|
3477
|
+
* @apioption plotOptions.series.dataGrouping.lastAnchor
|
|
3478
|
+
*/
|
|
3479
|
+
/**
|
|
3480
|
+
* Normally, a group is indexed by the start of that group, so for example
|
|
3481
|
+
* when 30 daily values are grouped into one month, that month's x value
|
|
3482
|
+
* will be the 1st of the month. This apparently shifts the data to
|
|
3483
|
+
* the left. When the smoothed option is true, this is compensated for.
|
|
3484
|
+
* The data is shifted to the middle of the group, and min and max
|
|
3485
|
+
* values are preserved. Internally, this is used in the Navigator series.
|
|
3486
|
+
*
|
|
3487
|
+
* @type {boolean}
|
|
3488
|
+
* @default false
|
|
3489
|
+
* @deprecated
|
|
3490
|
+
* @apioption plotOptions.series.dataGrouping.smoothed
|
|
3491
|
+
*/
|
|
3492
|
+
/**
|
|
3493
|
+
* An array determining what time intervals the data is allowed to be
|
|
3494
|
+
* grouped to. Each array item is an array where the first value is
|
|
3495
|
+
* the time unit and the second value another array of allowed multiples.
|
|
3496
|
+
*
|
|
3497
|
+
* Defaults to:
|
|
3498
|
+
* ```js
|
|
3499
|
+
* units: [[
|
|
3500
|
+
* 'millisecond', // unit name
|
|
3501
|
+
* [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
|
|
3502
|
+
* ], [
|
|
3503
|
+
* 'second',
|
|
3504
|
+
* [1, 2, 5, 10, 15, 30]
|
|
3505
|
+
* ], [
|
|
3506
|
+
* 'minute',
|
|
3507
|
+
* [1, 2, 5, 10, 15, 30]
|
|
3508
|
+
* ], [
|
|
3509
|
+
* 'hour',
|
|
3510
|
+
* [1, 2, 3, 4, 6, 8, 12]
|
|
3511
|
+
* ], [
|
|
3512
|
+
* 'day',
|
|
3513
|
+
* [1]
|
|
3514
|
+
* ], [
|
|
3515
|
+
* 'week',
|
|
3516
|
+
* [1]
|
|
3517
|
+
* ], [
|
|
3518
|
+
* 'month',
|
|
3519
|
+
* [1, 3, 6]
|
|
3520
|
+
* ], [
|
|
3521
|
+
* 'year',
|
|
3522
|
+
* null
|
|
3523
|
+
* ]]
|
|
3524
|
+
* ```
|
|
3525
|
+
*
|
|
3526
|
+
* @type {Array<Array<string,(Array<number>|null)>>}
|
|
3527
|
+
* @apioption plotOptions.series.dataGrouping.units
|
|
3528
|
+
*/
|
|
3529
|
+
/**
|
|
3530
|
+
* The approximate pixel width of each group. If for example a series
|
|
3531
|
+
* with 30 points is displayed over a 600 pixel wide plot area, no grouping
|
|
3532
|
+
* is performed. If however the series contains so many points that
|
|
3533
|
+
* the spacing is less than the groupPixelWidth, Highcharts will try
|
|
3534
|
+
* to group it into appropriate groups so that each is more or less
|
|
3535
|
+
* two pixels wide. Defaults to `10`.
|
|
3536
|
+
*
|
|
3537
|
+
* @sample {highstock} stock/plotoptions/series-datagrouping-grouppixelwidth/
|
|
3538
|
+
* Two series with the same data density but different groupPixelWidth
|
|
3539
|
+
*
|
|
3540
|
+
* @type {number}
|
|
3541
|
+
* @default 10
|
|
3542
|
+
* @apioption plotOptions.column.dataGrouping.groupPixelWidth
|
|
3543
|
+
*/
|
|
3544
|
+
''; // required by JSDoc parsing
|
|
3545
|
+
|
|
3546
|
+
return dataGrouping;
|
|
3547
|
+
});
|
|
3548
|
+
_registerModule(_modules, 'Series/HLC/HLCPoint.js', [_modules['Core/Series/SeriesRegistry.js']], function (SeriesRegistry) {
|
|
3549
|
+
/* *
|
|
3550
|
+
*
|
|
3551
|
+
* (c) 2010-2021 Pawel Lysy
|
|
3552
|
+
*
|
|
3553
|
+
* License: www.highcharts.com/license
|
|
3554
|
+
*
|
|
3555
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
3556
|
+
*
|
|
3557
|
+
* */
|
|
3558
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3559
|
+
var extendStatics = function (d,
|
|
3560
|
+
b) {
|
|
3561
|
+
extendStatics = Object.setPrototypeOf ||
|
|
3562
|
+
({ __proto__: [] } instanceof Array && function (d,
|
|
3563
|
+
b) { d.__proto__ = b; }) ||
|
|
3564
|
+
function (d,
|
|
3565
|
+
b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
3566
|
+
return extendStatics(d, b);
|
|
3567
|
+
};
|
|
3568
|
+
return function (d, b) {
|
|
3569
|
+
extendStatics(d, b);
|
|
3570
|
+
function __() { this.constructor = d; }
|
|
3571
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3572
|
+
};
|
|
3573
|
+
})();
|
|
3574
|
+
var ColumnSeries = SeriesRegistry.seriesTypes.column;
|
|
3575
|
+
/* *
|
|
3576
|
+
*
|
|
3577
|
+
* Class
|
|
3578
|
+
*
|
|
3579
|
+
* */
|
|
3580
|
+
var HLCPoint = /** @class */ (function (_super) {
|
|
3581
|
+
__extends(HLCPoint, _super);
|
|
3582
|
+
function HLCPoint() {
|
|
3583
|
+
/* *
|
|
3584
|
+
*
|
|
3585
|
+
* Properties
|
|
3586
|
+
*
|
|
3587
|
+
* */
|
|
3588
|
+
var _this = _super !== null && _super.apply(this,
|
|
3589
|
+
arguments) || this;
|
|
3590
|
+
_this.close = void 0;
|
|
3591
|
+
_this.high = void 0;
|
|
3592
|
+
_this.low = void 0;
|
|
3593
|
+
_this.options = void 0;
|
|
3594
|
+
_this.plotClose = void 0;
|
|
3595
|
+
_this.series = void 0;
|
|
3596
|
+
return _this;
|
|
3597
|
+
}
|
|
3598
|
+
return HLCPoint;
|
|
3599
|
+
}(ColumnSeries.prototype.pointClass));
|
|
3600
|
+
/* *
|
|
3601
|
+
*
|
|
3602
|
+
* Default Export
|
|
3603
|
+
*
|
|
3604
|
+
* */
|
|
3605
|
+
|
|
3606
|
+
return HLCPoint;
|
|
3607
|
+
});
|
|
3608
|
+
_registerModule(_modules, 'Series/HLC/HLCSeries.js', [_modules['Series/HLC/HLCPoint.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (HLCPoint, SeriesRegistry, U) {
|
|
3609
|
+
/* *
|
|
3610
|
+
*
|
|
3611
|
+
* (c) 2010-2021 Pawel Lysy
|
|
3612
|
+
*
|
|
3613
|
+
* License: www.highcharts.com/license
|
|
3614
|
+
*
|
|
3615
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
3616
|
+
*
|
|
3617
|
+
* */
|
|
3618
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3619
|
+
var extendStatics = function (d,
|
|
3620
|
+
b) {
|
|
3621
|
+
extendStatics = Object.setPrototypeOf ||
|
|
3622
|
+
({ __proto__: [] } instanceof Array && function (d,
|
|
3623
|
+
b) { d.__proto__ = b; }) ||
|
|
3624
|
+
function (d,
|
|
3625
|
+
b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
3626
|
+
return extendStatics(d, b);
|
|
3627
|
+
};
|
|
3628
|
+
return function (d, b) {
|
|
3629
|
+
extendStatics(d, b);
|
|
3630
|
+
function __() { this.constructor = d; }
|
|
3631
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3632
|
+
};
|
|
3633
|
+
})();
|
|
3634
|
+
var ColumnSeries = SeriesRegistry.seriesTypes.column;
|
|
3635
|
+
var extend = U.extend,
|
|
3636
|
+
merge = U.merge;
|
|
3637
|
+
/* *
|
|
3638
|
+
*
|
|
3639
|
+
* Class
|
|
3640
|
+
*
|
|
3641
|
+
* */
|
|
3642
|
+
/**
|
|
3643
|
+
* The hlc series type.
|
|
3644
|
+
*
|
|
3645
|
+
* @private
|
|
3646
|
+
* @class
|
|
3647
|
+
* @name Highcharts.seriesTypes.hlc
|
|
3648
|
+
*
|
|
3649
|
+
* @augments Highcharts.Series
|
|
3650
|
+
*/
|
|
3651
|
+
var HLCSeries = /** @class */ (function (_super) {
|
|
3652
|
+
__extends(HLCSeries, _super);
|
|
3653
|
+
function HLCSeries() {
|
|
3654
|
+
/* *
|
|
3655
|
+
*
|
|
3656
|
+
* Static Properties
|
|
3657
|
+
*
|
|
3658
|
+
* */
|
|
3659
|
+
var _this = _super !== null && _super.apply(this,
|
|
3660
|
+
arguments) || this;
|
|
3661
|
+
/* *
|
|
3662
|
+
*
|
|
3663
|
+
* Properties
|
|
3664
|
+
*
|
|
3665
|
+
* */
|
|
3666
|
+
_this.data = void 0;
|
|
3667
|
+
_this.options = void 0;
|
|
3668
|
+
_this.points = void 0;
|
|
3669
|
+
_this.yData = void 0;
|
|
3670
|
+
return _this;
|
|
3671
|
+
/* eslint-enable valid-jsdoc */
|
|
3672
|
+
}
|
|
3673
|
+
/* *
|
|
3674
|
+
*
|
|
3675
|
+
* Functions
|
|
3676
|
+
*
|
|
3677
|
+
* */
|
|
3678
|
+
/* eslint-disable valid-jsdoc */
|
|
3679
|
+
/**
|
|
3680
|
+
* Extend the path if close is not between high and low.
|
|
3681
|
+
*
|
|
3682
|
+
* @param {SVGPath} path the path array of the point
|
|
3683
|
+
* @param {number} halfStrokeWidth
|
|
3684
|
+
* @param {number} value value of the point to which the stem should be extended
|
|
3685
|
+
*/
|
|
3686
|
+
HLCSeries.prototype.extendStem = function (path, halfStrokeWidth, value) {
|
|
3687
|
+
var start = path[0];
|
|
3688
|
+
var end = path[1];
|
|
3689
|
+
// We don't need to worry about crisp - close value
|
|
3690
|
+
// is already crisped and halfStrokeWidth should remove it.
|
|
3691
|
+
if (typeof start[2] === 'number') {
|
|
3692
|
+
start[2] = Math.max(value + halfStrokeWidth, start[2]);
|
|
3693
|
+
}
|
|
3694
|
+
if (typeof end[2] === 'number') {
|
|
3695
|
+
end[2] = Math.min(value - halfStrokeWidth, end[2]);
|
|
3696
|
+
}
|
|
3697
|
+
};
|
|
3698
|
+
/**
|
|
3699
|
+
* Function to create SVGPath of the point based on the
|
|
3700
|
+
* plot positions of this point.
|
|
3701
|
+
*
|
|
3702
|
+
* @param {SVGPath} point
|
|
3703
|
+
* @param {SVGElement} graphic
|
|
3704
|
+
* @returns {SVGPath}
|
|
3705
|
+
*/
|
|
3706
|
+
HLCSeries.prototype.getPointPath = function (point, graphic) {
|
|
3707
|
+
// crisp vector coordinates
|
|
3708
|
+
var strokeWidth = graphic.strokeWidth(),
|
|
3709
|
+
series = point.series,
|
|
3710
|
+
crispCorr = (strokeWidth % 2) / 2,
|
|
3711
|
+
// #2596:
|
|
3712
|
+
crispX = Math.round(point.plotX) - crispCorr,
|
|
3713
|
+
halfWidth = Math.round(point.shapeArgs.width / 2);
|
|
3714
|
+
var path,
|
|
3715
|
+
plotClose = point.plotClose;
|
|
3716
|
+
// the vertical stem
|
|
3717
|
+
path = [
|
|
3718
|
+
['M', crispX, Math.round(point.yBottom)],
|
|
3719
|
+
['L', crispX, Math.round(point.plotHigh)]
|
|
3720
|
+
];
|
|
3721
|
+
// close
|
|
3722
|
+
if (point.close !== null) {
|
|
3723
|
+
plotClose = Math.round(point.plotClose) + crispCorr;
|
|
3724
|
+
path.push(['M', crispX, plotClose], ['L', crispX + halfWidth, plotClose]);
|
|
3725
|
+
series.extendStem(path, strokeWidth / 2, plotClose);
|
|
3726
|
+
}
|
|
3727
|
+
return path;
|
|
3728
|
+
};
|
|
3729
|
+
/**
|
|
3730
|
+
* Draw single point
|
|
3731
|
+
* @private
|
|
3732
|
+
*/
|
|
3733
|
+
HLCSeries.prototype.drawSinglePoint = function (point) {
|
|
3734
|
+
var series = point.series,
|
|
3735
|
+
chart = series.chart;
|
|
3736
|
+
var path,
|
|
3737
|
+
graphic = point.graphic,
|
|
3738
|
+
isNew = !graphic;
|
|
3739
|
+
if (typeof point.plotY !== 'undefined') {
|
|
3740
|
+
// Create and/or update the graphic
|
|
3741
|
+
if (!graphic) {
|
|
3742
|
+
point.graphic = graphic = chart.renderer.path()
|
|
3743
|
+
.add(series.group);
|
|
3744
|
+
}
|
|
3745
|
+
if (!chart.styledMode) {
|
|
3746
|
+
graphic.attr(series.pointAttribs(point, (point.selected && 'select'))); // #3897
|
|
3747
|
+
}
|
|
3748
|
+
// crisp vector coordinates
|
|
3749
|
+
path = series.getPointPath(point, graphic);
|
|
3750
|
+
graphic[isNew ? 'attr' : 'animate']({ d: path })
|
|
3751
|
+
.addClass(point.getClassName(), true);
|
|
3752
|
+
}
|
|
3753
|
+
};
|
|
3754
|
+
/**
|
|
3755
|
+
* Draw the data points
|
|
3756
|
+
* @private
|
|
3757
|
+
*/
|
|
3758
|
+
HLCSeries.prototype.drawPoints = function () {
|
|
3759
|
+
this.points.forEach(this.drawSinglePoint);
|
|
3760
|
+
};
|
|
3761
|
+
/**
|
|
3762
|
+
* @private
|
|
3763
|
+
* @function Highcharts.seriesTypes.hlc#init
|
|
3764
|
+
* @return {void}
|
|
3765
|
+
*/
|
|
3766
|
+
HLCSeries.prototype.init = function () {
|
|
3767
|
+
_super.prototype.init.apply(this, arguments);
|
|
3768
|
+
this.options.stacking = void 0; // #8817
|
|
3769
|
+
};
|
|
3770
|
+
/**
|
|
3771
|
+
* Postprocess mapping between options and SVG attributes
|
|
3772
|
+
* @private
|
|
3773
|
+
*/
|
|
3774
|
+
HLCSeries.prototype.pointAttribs = function (point, state) {
|
|
3775
|
+
var attribs = _super.prototype.pointAttribs.call(this,
|
|
3776
|
+
point,
|
|
3777
|
+
state);
|
|
3778
|
+
delete attribs.fill;
|
|
3779
|
+
return attribs;
|
|
3780
|
+
};
|
|
3781
|
+
HLCSeries.prototype.toYData = function (point) {
|
|
3782
|
+
// return a plain array for speedy calculation
|
|
3783
|
+
return [point.high, point.low, point.close];
|
|
3784
|
+
};
|
|
3785
|
+
/**
|
|
3786
|
+
* Translate data points from raw values x and y to plotX and plotY
|
|
3787
|
+
*
|
|
3788
|
+
* @private
|
|
3789
|
+
* @function Highcharts.seriesTypes.hlc#translate
|
|
3790
|
+
* @return {void}
|
|
3791
|
+
*/
|
|
3792
|
+
HLCSeries.prototype.translate = function () {
|
|
3793
|
+
var series = this,
|
|
3794
|
+
yAxis = series.yAxis,
|
|
3795
|
+
names = (this.pointArrayMap && this.pointArrayMap.slice()) || [],
|
|
3796
|
+
translated = names.map(function (name) {
|
|
3797
|
+
return "plot" + (name.charAt(0).toUpperCase() + name.slice(1));
|
|
3798
|
+
});
|
|
3799
|
+
translated.push('yBottom');
|
|
3800
|
+
names.push('low');
|
|
3801
|
+
_super.prototype.translate.apply(series);
|
|
3802
|
+
// Do the translation
|
|
3803
|
+
series.points.forEach(function (point) {
|
|
3804
|
+
names.forEach(function (name, i) {
|
|
3805
|
+
var value = point[name];
|
|
3806
|
+
if (value !== null) {
|
|
3807
|
+
if (series.dataModify) {
|
|
3808
|
+
value = series.dataModify.modifyValue(value);
|
|
3809
|
+
}
|
|
3810
|
+
point[translated[i]] =
|
|
3811
|
+
yAxis.toPixels(value, true);
|
|
3812
|
+
}
|
|
3813
|
+
});
|
|
3814
|
+
// Align the tooltip to the high value to avoid covering the
|
|
3815
|
+
// point
|
|
3816
|
+
point.tooltipPos[1] =
|
|
3817
|
+
point.plotHigh + yAxis.pos - series.chart.plotTop;
|
|
3818
|
+
});
|
|
3819
|
+
};
|
|
3820
|
+
/**
|
|
3821
|
+
* An HLC chart is a style of financial chart used to describe price
|
|
3822
|
+
* movements over time. It displays high, low and close values per
|
|
3823
|
+
* data point.
|
|
3824
|
+
*
|
|
3825
|
+
* @sample stock/demo/hlc/
|
|
3826
|
+
* HLC chart
|
|
3827
|
+
*
|
|
3828
|
+
* @extends plotOptions.column
|
|
3829
|
+
* @excluding borderColor, borderRadius, borderWidth, crisp, stacking,
|
|
3830
|
+
* stack
|
|
3831
|
+
* @product highstock
|
|
3832
|
+
* @optionparent plotOptions.hlc
|
|
3833
|
+
*/
|
|
3834
|
+
HLCSeries.defaultOptions = merge(ColumnSeries.defaultOptions, {
|
|
3835
|
+
/**
|
|
3836
|
+
* The approximate pixel width of each group. If for example a series
|
|
3837
|
+
* with 30 points is displayed over a 600 pixel wide plot area, no
|
|
3838
|
+
* grouping is performed. If however the series contains so many points
|
|
3839
|
+
* that the spacing is less than the groupPixelWidth, Highcharts will
|
|
3840
|
+
* try to group it into appropriate groups so that each is more or less
|
|
3841
|
+
* two pixels wide. Defaults to `5`.
|
|
3842
|
+
*
|
|
3843
|
+
* @type {number}
|
|
3844
|
+
* @default 5
|
|
3845
|
+
* @product highstock
|
|
3846
|
+
* @apioption plotOptions.hlc.dataGrouping.groupPixelWidth
|
|
3847
|
+
*/
|
|
3848
|
+
/**
|
|
3849
|
+
* @type {Highcharts.DataGroupingApproximationValue|Function}
|
|
3850
|
+
* @default hlc
|
|
3851
|
+
* @product highstock
|
|
3852
|
+
* @apioption plotOptions.hlc.dataGrouping.approximation
|
|
3853
|
+
*/
|
|
3854
|
+
/**
|
|
3855
|
+
* @default close
|
|
3856
|
+
* @apioption plotOptions.hlc.colorKey
|
|
3857
|
+
*/
|
|
3858
|
+
/**
|
|
3859
|
+
* The pixel width of the line/border. Defaults to `1`.
|
|
3860
|
+
*
|
|
3861
|
+
* @sample {highstock} stock/plotoptions/hlc-linewidth/
|
|
3862
|
+
* A greater line width
|
|
3863
|
+
*
|
|
3864
|
+
* @type {number}
|
|
3865
|
+
* @default 1
|
|
3866
|
+
* @product highstock
|
|
3867
|
+
*
|
|
3868
|
+
* @public
|
|
3869
|
+
*/
|
|
3870
|
+
lineWidth: 1,
|
|
3871
|
+
tooltip: {
|
|
3872
|
+
pointFormat: '<span style="color:{point.color}">\u25CF</span> ' +
|
|
3873
|
+
'<b> {series.name}</b><br/>' +
|
|
3874
|
+
'High: {point.high}<br/>' +
|
|
3875
|
+
'Low: {point.low}<br/>' +
|
|
3876
|
+
'Close: {point.close}<br/>'
|
|
3877
|
+
},
|
|
3878
|
+
threshold: null,
|
|
3879
|
+
states: {
|
|
3880
|
+
/**
|
|
3881
|
+
* @extends plotOptions.column.states.hover
|
|
3882
|
+
* @product highstock
|
|
3883
|
+
*/
|
|
3884
|
+
hover: {
|
|
3885
|
+
/**
|
|
3886
|
+
* The pixel width of the line representing the HLC point.
|
|
3887
|
+
*
|
|
3888
|
+
* @type {number}
|
|
3889
|
+
* @default 3
|
|
3890
|
+
* @product highstock
|
|
3891
|
+
*/
|
|
3892
|
+
lineWidth: 3
|
|
3893
|
+
}
|
|
3894
|
+
},
|
|
3895
|
+
/**
|
|
3896
|
+
* Determines which one of `high`, `low`, `close` values should
|
|
3897
|
+
* be represented as `point.y`, which is later used to set dataLabel
|
|
3898
|
+
* position and [compare](#plotOptions.series.compare).
|
|
3899
|
+
*
|
|
3900
|
+
* @sample {highstock} stock/plotoptions/hlc-pointvalkey/
|
|
3901
|
+
* Possible values
|
|
3902
|
+
*
|
|
3903
|
+
* @type {string}
|
|
3904
|
+
* @default close
|
|
3905
|
+
* @validvalue ["high", "low", "close"]
|
|
3906
|
+
* @product highstock
|
|
3907
|
+
* @apioption plotOptions.hlc.pointValKey
|
|
3908
|
+
*/
|
|
3909
|
+
/**
|
|
3910
|
+
* @default close
|
|
3911
|
+
* @apioption plotOptions.hlc.colorKey
|
|
3912
|
+
*/
|
|
3913
|
+
stickyTracking: true
|
|
3914
|
+
});
|
|
3915
|
+
return HLCSeries;
|
|
3916
|
+
}(ColumnSeries));
|
|
3917
|
+
extend(HLCSeries.prototype, {
|
|
3918
|
+
animate: null,
|
|
3919
|
+
directTouch: false,
|
|
3920
|
+
pointArrayMap: ['high', 'low', 'close'],
|
|
3921
|
+
pointAttrToOptions: {
|
|
3922
|
+
stroke: 'color',
|
|
3923
|
+
'stroke-width': 'lineWidth'
|
|
3924
|
+
},
|
|
3925
|
+
pointValKey: 'close'
|
|
3926
|
+
});
|
|
3927
|
+
HLCSeries.prototype.pointClass = HLCPoint;
|
|
3928
|
+
SeriesRegistry.registerSeriesType('hlc', HLCSeries);
|
|
3929
|
+
/* *
|
|
3930
|
+
*
|
|
3931
|
+
* Default Export
|
|
2910
3932
|
*
|
|
2911
|
-
*
|
|
2912
|
-
|
|
3933
|
+
* */
|
|
3934
|
+
/* *
|
|
2913
3935
|
*
|
|
2914
|
-
*
|
|
3936
|
+
* API Options
|
|
2915
3937
|
*
|
|
2916
|
-
*
|
|
2917
|
-
* @since 9.1.0
|
|
2918
|
-
* @default start
|
|
2919
|
-
* @apioption plotOptions.series.dataGrouping.lastAnchor
|
|
2920
|
-
*/
|
|
3938
|
+
* */
|
|
2921
3939
|
/**
|
|
2922
|
-
*
|
|
2923
|
-
*
|
|
2924
|
-
* will be the 1st of the month. This apparently shifts the data to
|
|
2925
|
-
* the left. When the smoothed option is true, this is compensated for.
|
|
2926
|
-
* The data is shifted to the middle of the group, and min and max
|
|
2927
|
-
* values are preserved. Internally, this is used in the Navigator series.
|
|
3940
|
+
* A `hlc` series. If the [type](#series.hlc.type) option is not
|
|
3941
|
+
* specified, it is inherited from [chart.type](#chart.type).
|
|
2928
3942
|
*
|
|
2929
|
-
* @
|
|
2930
|
-
* @
|
|
2931
|
-
* @
|
|
2932
|
-
* @apioption
|
|
3943
|
+
* @extends series,plotOptions.hlc
|
|
3944
|
+
* @excluding dataParser, dataURL
|
|
3945
|
+
* @product highstock
|
|
3946
|
+
* @apioption series.hlc
|
|
2933
3947
|
*/
|
|
2934
3948
|
/**
|
|
2935
|
-
* An array
|
|
2936
|
-
*
|
|
2937
|
-
* the time unit and the second value another array of allowed multiples.
|
|
3949
|
+
* An array of data points for the series. For the `hlc` series type,
|
|
3950
|
+
* points can be given in the following ways:
|
|
2938
3951
|
*
|
|
2939
|
-
*
|
|
2940
|
-
*
|
|
2941
|
-
*
|
|
2942
|
-
*
|
|
2943
|
-
*
|
|
2944
|
-
*
|
|
2945
|
-
*
|
|
2946
|
-
*
|
|
2947
|
-
*
|
|
2948
|
-
*
|
|
2949
|
-
*
|
|
2950
|
-
*
|
|
2951
|
-
*
|
|
2952
|
-
*
|
|
2953
|
-
* ], [
|
|
2954
|
-
* 'day',
|
|
2955
|
-
* [1]
|
|
2956
|
-
* ], [
|
|
2957
|
-
* 'week',
|
|
2958
|
-
* [1]
|
|
2959
|
-
* ], [
|
|
2960
|
-
* 'month',
|
|
2961
|
-
* [1, 3, 6]
|
|
2962
|
-
* ], [
|
|
2963
|
-
* 'year',
|
|
2964
|
-
* null
|
|
2965
|
-
* ]]
|
|
2966
|
-
* ```
|
|
3952
|
+
* 1. An array of arrays with 4 or 3 values. In this case, the values correspond
|
|
3953
|
+
* to `x,high,low,close`. If the first value is a string, it is applied
|
|
3954
|
+
* as the name of the point, and the `x` value is inferred. The `x` value can
|
|
3955
|
+
* also be omitted, in which case the inner arrays should be of length of 3\.
|
|
3956
|
+
* Then the `x` value is automatically calculated, either starting at 0 and
|
|
3957
|
+
* incremented by 1, or from `pointStart` and `pointInterval` given in the
|
|
3958
|
+
* series options.
|
|
3959
|
+
* ```js
|
|
3960
|
+
* data: [
|
|
3961
|
+
* [0, 5, 6, 7],
|
|
3962
|
+
* [1, 4, 8, 2],
|
|
3963
|
+
* [2, 3, 4, 10]
|
|
3964
|
+
* ]
|
|
3965
|
+
* ```
|
|
2967
3966
|
*
|
|
2968
|
-
*
|
|
2969
|
-
*
|
|
3967
|
+
* 2. An array of objects with named values. The following snippet shows only a
|
|
3968
|
+
* few settings, see the complete options set below. If the total number of
|
|
3969
|
+
* data points exceeds the series'
|
|
3970
|
+
* [turboThreshold](#series.hlc.turboThreshold), this option is not
|
|
3971
|
+
* available.
|
|
3972
|
+
* ```js
|
|
3973
|
+
* data: [{
|
|
3974
|
+
* x: 1,
|
|
3975
|
+
* high: 4,
|
|
3976
|
+
* low: 5,
|
|
3977
|
+
* close: 2,
|
|
3978
|
+
* name: "Point2",
|
|
3979
|
+
* color: "#00FF00"
|
|
3980
|
+
* }, {
|
|
3981
|
+
* x: 1,
|
|
3982
|
+
* high: 3,
|
|
3983
|
+
* low: 6,
|
|
3984
|
+
* close: 7,
|
|
3985
|
+
* name: "Point1",
|
|
3986
|
+
* color: "#FF00FF"
|
|
3987
|
+
* }]
|
|
3988
|
+
* ```
|
|
3989
|
+
*
|
|
3990
|
+
* @type {Array<Array<(number|string),number,number>|Array<(number|string),number,number,number>|*>}
|
|
3991
|
+
* @extends series.arearange.data
|
|
3992
|
+
* @excluding y, marker
|
|
3993
|
+
* @product highstock
|
|
3994
|
+
* @apioption series.hlc.data
|
|
2970
3995
|
*/
|
|
2971
3996
|
/**
|
|
2972
|
-
* The
|
|
2973
|
-
* with 30 points is displayed over a 600 pixel wide plot area, no grouping
|
|
2974
|
-
* is performed. If however the series contains so many points that
|
|
2975
|
-
* the spacing is less than the groupPixelWidth, Highcharts will try
|
|
2976
|
-
* to group it into appropriate groups so that each is more or less
|
|
2977
|
-
* two pixels wide. Defaults to `10`.
|
|
2978
|
-
*
|
|
2979
|
-
* @sample {highstock} stock/plotoptions/series-datagrouping-grouppixelwidth/
|
|
2980
|
-
* Two series with the same data density but different groupPixelWidth
|
|
3997
|
+
* The closing value of each data point.
|
|
2981
3998
|
*
|
|
2982
3999
|
* @type {number}
|
|
2983
|
-
* @
|
|
2984
|
-
* @apioption
|
|
4000
|
+
* @product highstock
|
|
4001
|
+
* @apioption series.hlc.data.close
|
|
2985
4002
|
*/
|
|
2986
|
-
''; //
|
|
4003
|
+
''; // adds doclets above to transpilat
|
|
2987
4004
|
|
|
2988
|
-
return
|
|
4005
|
+
return HLCSeries;
|
|
2989
4006
|
});
|
|
2990
4007
|
_registerModule(_modules, 'Series/OHLC/OHLCPoint.js', [_modules['Core/Series/SeriesRegistry.js']], function (SeriesRegistry) {
|
|
2991
4008
|
/* *
|
|
@@ -3013,7 +4030,7 @@
|
|
|
3013
4030
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3014
4031
|
};
|
|
3015
4032
|
})();
|
|
3016
|
-
var
|
|
4033
|
+
var HLCSeries = SeriesRegistry.seriesTypes.hlc;
|
|
3017
4034
|
/* *
|
|
3018
4035
|
*
|
|
3019
4036
|
* Class
|
|
@@ -3029,12 +4046,8 @@
|
|
|
3029
4046
|
* */
|
|
3030
4047
|
var _this = _super !== null && _super.apply(this,
|
|
3031
4048
|
arguments) || this;
|
|
3032
|
-
_this.close = void 0;
|
|
3033
|
-
_this.high = void 0;
|
|
3034
|
-
_this.low = void 0;
|
|
3035
4049
|
_this.open = void 0;
|
|
3036
4050
|
_this.options = void 0;
|
|
3037
|
-
_this.plotClose = void 0;
|
|
3038
4051
|
_this.plotOpen = void 0;
|
|
3039
4052
|
_this.series = void 0;
|
|
3040
4053
|
return _this;
|
|
@@ -3104,7 +4117,7 @@
|
|
|
3104
4117
|
return this;
|
|
3105
4118
|
};
|
|
3106
4119
|
return OHLCPoint;
|
|
3107
|
-
}(
|
|
4120
|
+
}(HLCSeries.prototype.pointClass));
|
|
3108
4121
|
/* *
|
|
3109
4122
|
*
|
|
3110
4123
|
* Default Export
|
|
@@ -3139,14 +4152,11 @@
|
|
|
3139
4152
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3140
4153
|
};
|
|
3141
4154
|
})();
|
|
3142
|
-
var
|
|
3143
|
-
|
|
4155
|
+
var Series = SeriesRegistry.series,
|
|
4156
|
+
HLCSeries = SeriesRegistry.seriesTypes.hlc;
|
|
4157
|
+
var addEvent = U.addEvent,
|
|
4158
|
+
extend = U.extend,
|
|
3144
4159
|
merge = U.merge;
|
|
3145
|
-
/* *
|
|
3146
|
-
*
|
|
3147
|
-
* Class
|
|
3148
|
-
*
|
|
3149
|
-
* */
|
|
3150
4160
|
/**
|
|
3151
4161
|
* The ohlc series type.
|
|
3152
4162
|
*
|
|
@@ -3174,97 +4184,31 @@
|
|
|
3174
4184
|
_this.data = void 0;
|
|
3175
4185
|
_this.options = void 0;
|
|
3176
4186
|
_this.points = void 0;
|
|
3177
|
-
_this.yData = void 0;
|
|
3178
4187
|
return _this;
|
|
3179
|
-
/* eslint-enable valid-jsdoc */
|
|
3180
4188
|
}
|
|
3181
4189
|
/* *
|
|
3182
4190
|
*
|
|
3183
4191
|
* Functions
|
|
3184
4192
|
*
|
|
3185
4193
|
* */
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
var end = path[1];
|
|
3203
|
-
// We don't need to worry about crisp - openOrClose value
|
|
3204
|
-
// is already crisped and halfStrokeWidth should remove it.
|
|
3205
|
-
if (typeof start[2] === 'number') {
|
|
3206
|
-
start[2] = Math.max(openOrClose + halfStrokeWidth, start[2]);
|
|
3207
|
-
}
|
|
3208
|
-
if (typeof end[2] === 'number') {
|
|
3209
|
-
end[2] = Math.min(openOrClose - halfStrokeWidth, end[2]);
|
|
3210
|
-
}
|
|
3211
|
-
};
|
|
3212
|
-
points.forEach(function (point) {
|
|
3213
|
-
var plotOpen,
|
|
3214
|
-
plotClose,
|
|
3215
|
-
crispCorr,
|
|
3216
|
-
halfWidth,
|
|
3217
|
-
path,
|
|
3218
|
-
graphic = point.graphic,
|
|
3219
|
-
crispX,
|
|
3220
|
-
isNew = !graphic,
|
|
3221
|
-
strokeWidth;
|
|
3222
|
-
if (typeof point.plotY !== 'undefined') {
|
|
3223
|
-
// Create and/or update the graphic
|
|
3224
|
-
if (!graphic) {
|
|
3225
|
-
point.graphic = graphic = chart.renderer.path()
|
|
3226
|
-
.add(series.group);
|
|
3227
|
-
}
|
|
3228
|
-
if (!chart.styledMode) {
|
|
3229
|
-
graphic.attr(series.pointAttribs(point, (point.selected && 'select'))); // #3897
|
|
3230
|
-
}
|
|
3231
|
-
// crisp vector coordinates
|
|
3232
|
-
strokeWidth = graphic.strokeWidth();
|
|
3233
|
-
crispCorr = (strokeWidth % 2) / 2;
|
|
3234
|
-
// #2596:
|
|
3235
|
-
crispX = Math.round(point.plotX) - crispCorr;
|
|
3236
|
-
halfWidth = Math.round(point.shapeArgs.width / 2);
|
|
3237
|
-
// the vertical stem
|
|
3238
|
-
path = [
|
|
3239
|
-
['M', crispX, Math.round(point.yBottom)],
|
|
3240
|
-
['L', crispX, Math.round(point.plotHigh)]
|
|
3241
|
-
];
|
|
3242
|
-
// open
|
|
3243
|
-
if (point.open !== null) {
|
|
3244
|
-
plotOpen = Math.round(point.plotOpen) + crispCorr;
|
|
3245
|
-
path.push(['M', crispX, plotOpen], ['L', crispX - halfWidth, plotOpen]);
|
|
3246
|
-
extendStem(path, strokeWidth / 2, plotOpen);
|
|
3247
|
-
}
|
|
3248
|
-
// close
|
|
3249
|
-
if (point.close !== null) {
|
|
3250
|
-
plotClose = Math.round(point.plotClose) + crispCorr;
|
|
3251
|
-
path.push(['M', crispX, plotClose], ['L', crispX + halfWidth, plotClose]);
|
|
3252
|
-
extendStem(path, strokeWidth / 2, plotClose);
|
|
3253
|
-
}
|
|
3254
|
-
graphic[isNew ? 'attr' : 'animate']({ d: path })
|
|
3255
|
-
.addClass(point.getClassName(), true);
|
|
3256
|
-
}
|
|
3257
|
-
});
|
|
3258
|
-
};
|
|
3259
|
-
/**
|
|
3260
|
-
* @private
|
|
3261
|
-
* @function Highcarts.seriesTypes.ohlc#init
|
|
3262
|
-
* @return {void}
|
|
3263
|
-
*/
|
|
3264
|
-
OHLCSeries.prototype.init = function () {
|
|
3265
|
-
_super.prototype.init.apply(this, arguments);
|
|
3266
|
-
this.options.stacking = void 0; // #8817
|
|
4194
|
+
OHLCSeries.prototype.getPointPath = function (point, graphic) {
|
|
4195
|
+
var path = _super.prototype.getPointPath.call(this,
|
|
4196
|
+
point,
|
|
4197
|
+
graphic),
|
|
4198
|
+
strokeWidth = graphic.strokeWidth(),
|
|
4199
|
+
crispCorr = (strokeWidth % 2) / 2,
|
|
4200
|
+
crispX = Math.round(point.plotX) - crispCorr,
|
|
4201
|
+
halfWidth = Math.round(point.shapeArgs.width / 2);
|
|
4202
|
+
var plotOpen = point.plotOpen;
|
|
4203
|
+
// crisp vector coordinates
|
|
4204
|
+
if (point.open !== null) {
|
|
4205
|
+
plotOpen = Math.round(point.plotOpen) + crispCorr;
|
|
4206
|
+
path.push(['M', crispX, plotOpen], ['L', crispX - halfWidth, plotOpen]);
|
|
4207
|
+
_super.prototype.extendStem.call(this, path, strokeWidth / 2, plotOpen);
|
|
4208
|
+
}
|
|
4209
|
+
return path;
|
|
3267
4210
|
};
|
|
4211
|
+
/* eslint-disable valid-jsdoc */
|
|
3268
4212
|
/**
|
|
3269
4213
|
* Postprocess mapping between options and SVG attributes
|
|
3270
4214
|
* @private
|
|
@@ -3286,43 +4230,6 @@
|
|
|
3286
4230
|
// return a plain array for speedy calculation
|
|
3287
4231
|
return [point.open, point.high, point.low, point.close];
|
|
3288
4232
|
};
|
|
3289
|
-
/**
|
|
3290
|
-
* Translate data points from raw values x and y to plotX and plotY
|
|
3291
|
-
*
|
|
3292
|
-
* @private
|
|
3293
|
-
* @function Highcharts.seriesTypes.ohlc#translate
|
|
3294
|
-
* @return {void}
|
|
3295
|
-
*/
|
|
3296
|
-
OHLCSeries.prototype.translate = function () {
|
|
3297
|
-
var series = this,
|
|
3298
|
-
yAxis = series.yAxis,
|
|
3299
|
-
hasModifyValue = !!series.modifyValue,
|
|
3300
|
-
translated = [
|
|
3301
|
-
'plotOpen',
|
|
3302
|
-
'plotHigh',
|
|
3303
|
-
'plotLow',
|
|
3304
|
-
'plotClose',
|
|
3305
|
-
'yBottom'
|
|
3306
|
-
]; // translate OHLC for
|
|
3307
|
-
_super.prototype.translate.apply(series);
|
|
3308
|
-
// Do the translation
|
|
3309
|
-
series.points.forEach(function (point) {
|
|
3310
|
-
[point.open, point.high, point.low, point.close, point.low]
|
|
3311
|
-
.forEach(function (value, i) {
|
|
3312
|
-
if (value !== null) {
|
|
3313
|
-
if (hasModifyValue) {
|
|
3314
|
-
value = series.modifyValue(value);
|
|
3315
|
-
}
|
|
3316
|
-
point[translated[i]] =
|
|
3317
|
-
yAxis.toPixels(value, true);
|
|
3318
|
-
}
|
|
3319
|
-
});
|
|
3320
|
-
// Align the tooltip to the high value to avoid covering the
|
|
3321
|
-
// point
|
|
3322
|
-
point.tooltipPos[1] =
|
|
3323
|
-
point.plotHigh + yAxis.pos - series.chart.plotTop;
|
|
3324
|
-
});
|
|
3325
|
-
};
|
|
3326
4233
|
/**
|
|
3327
4234
|
* An OHLC chart is a style of financial chart used to describe price
|
|
3328
4235
|
* movements over time. It displays open, high, low and close values per
|
|
@@ -3331,82 +4238,46 @@
|
|
|
3331
4238
|
* @sample stock/demo/ohlc/
|
|
3332
4239
|
* OHLC chart
|
|
3333
4240
|
*
|
|
3334
|
-
* @extends plotOptions.
|
|
3335
|
-
* @excluding borderColor, borderRadius, borderWidth, crisp, stacking,
|
|
3336
|
-
* stack
|
|
4241
|
+
* @extends plotOptions.ohlc
|
|
3337
4242
|
* @product highstock
|
|
3338
4243
|
* @optionparent plotOptions.ohlc
|
|
3339
4244
|
*/
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
* @apioption plotOptions.ohlc.dataGrouping.groupPixelWidth
|
|
3353
|
-
*/
|
|
4245
|
+
/**
|
|
4246
|
+
* The parameter allows setting line series type and use OHLC indicators.
|
|
4247
|
+
* Data in OHLC format is required.
|
|
4248
|
+
*
|
|
4249
|
+
* @sample {highstock} stock/indicators/use-ohlc-data
|
|
4250
|
+
* Use OHLC data format to plot line chart
|
|
4251
|
+
*
|
|
4252
|
+
* @type {boolean}
|
|
4253
|
+
* @product highstock
|
|
4254
|
+
* @apioption plotOptions.line.useOhlcData
|
|
4255
|
+
*/
|
|
4256
|
+
OHLCSeries.defaultOptions = merge(HLCSeries.defaultOptions, {
|
|
3354
4257
|
/**
|
|
3355
|
-
*
|
|
3356
|
-
*
|
|
3357
|
-
* @
|
|
3358
|
-
*
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
pointFormat: '<span style="color:{point.color}">\u25CF</span> ' +
|
|
3369
|
-
'<b> {series.name}</b><br/>' +
|
|
3370
|
-
'Open: {point.open}<br/>' +
|
|
3371
|
-
'High: {point.high}<br/>' +
|
|
3372
|
-
'Low: {point.low}<br/>' +
|
|
3373
|
-
'Close: {point.close}<br/>'
|
|
3374
|
-
},
|
|
3375
|
-
threshold: null,
|
|
3376
|
-
states: {
|
|
3377
|
-
/**
|
|
3378
|
-
* @extends plotOptions.column.states.hover
|
|
3379
|
-
* @product highstock
|
|
3380
|
-
*/
|
|
3381
|
-
hover: {
|
|
3382
|
-
/**
|
|
3383
|
-
* The pixel width of the line representing the OHLC point.
|
|
3384
|
-
*
|
|
3385
|
-
* @type {number}
|
|
3386
|
-
* @default 3
|
|
3387
|
-
* @product highstock
|
|
3388
|
-
*/
|
|
3389
|
-
lineWidth: 3
|
|
3390
|
-
}
|
|
3391
|
-
},
|
|
4258
|
+
* @type {Highcharts.DataGroupingApproximationValue|Function}
|
|
4259
|
+
* @default ohlc
|
|
4260
|
+
* @product highstock
|
|
4261
|
+
* @apioption plotOptions.ohlc.dataGrouping.approximation
|
|
4262
|
+
*/
|
|
4263
|
+
tooltip: {
|
|
4264
|
+
pointFormat: '<span style="color:{point.color}">\u25CF</span> ' +
|
|
4265
|
+
'<b> {series.name}</b><br/>' +
|
|
4266
|
+
'Open: {point.open}<br/>' +
|
|
4267
|
+
'High: {point.high}<br/>' +
|
|
4268
|
+
'Low: {point.low}<br/>' +
|
|
4269
|
+
'Close: {point.close}<br/>'
|
|
4270
|
+
}
|
|
3392
4271
|
/**
|
|
3393
|
-
* Determines which one of
|
|
4272
|
+
* Determines which one of `open`, `high`, `low`, `close` values should
|
|
3394
4273
|
* be represented as `point.y`, which is later used to set dataLabel
|
|
3395
4274
|
* position and [compare](#plotOptions.series.compare).
|
|
3396
4275
|
*
|
|
3397
|
-
* @sample {highstock} stock/plotoptions/ohlc-pointvalkey/
|
|
3398
|
-
* Possible values
|
|
3399
|
-
*
|
|
3400
|
-
* @type {string}
|
|
3401
4276
|
* @default close
|
|
3402
4277
|
* @validvalue ["open", "high", "low", "close"]
|
|
3403
4278
|
* @product highstock
|
|
3404
4279
|
* @apioption plotOptions.ohlc.pointValKey
|
|
3405
4280
|
*/
|
|
3406
|
-
/**
|
|
3407
|
-
* @default close
|
|
3408
|
-
* @apioption plotOptions.ohlc.colorKey
|
|
3409
|
-
*/
|
|
3410
4281
|
/**
|
|
3411
4282
|
* Line color for up points.
|
|
3412
4283
|
*
|
|
@@ -3414,19 +4285,11 @@
|
|
|
3414
4285
|
* @product highstock
|
|
3415
4286
|
* @apioption plotOptions.ohlc.upColor
|
|
3416
4287
|
*/
|
|
3417
|
-
stickyTracking: true
|
|
3418
4288
|
});
|
|
3419
4289
|
return OHLCSeries;
|
|
3420
|
-
}(
|
|
4290
|
+
}(HLCSeries));
|
|
3421
4291
|
extend(OHLCSeries.prototype, {
|
|
3422
|
-
|
|
3423
|
-
directTouch: false,
|
|
3424
|
-
pointArrayMap: ['open', 'high', 'low', 'close'],
|
|
3425
|
-
pointAttrToOptions: {
|
|
3426
|
-
stroke: 'color',
|
|
3427
|
-
'stroke-width': 'lineWidth'
|
|
3428
|
-
},
|
|
3429
|
-
pointValKey: 'close'
|
|
4292
|
+
pointArrayMap: ['open', 'high', 'low', 'close']
|
|
3430
4293
|
});
|
|
3431
4294
|
OHLCSeries.prototype.pointClass = OHLCPoint;
|
|
3432
4295
|
SeriesRegistry.registerSeriesType('ohlc', OHLCSeries);
|
|
@@ -3435,6 +4298,30 @@
|
|
|
3435
4298
|
* Default Export
|
|
3436
4299
|
*
|
|
3437
4300
|
* */
|
|
4301
|
+
// Add useOhlcData option
|
|
4302
|
+
addEvent(Series, 'init', function (eventOptions) {
|
|
4303
|
+
// eslint-disable-next-line no-invalid-this
|
|
4304
|
+
var series = this,
|
|
4305
|
+
options = eventOptions.options;
|
|
4306
|
+
if (options.useOhlcData &&
|
|
4307
|
+
options.id !== 'highcharts-navigator-series') {
|
|
4308
|
+
extend(series, {
|
|
4309
|
+
pointValKey: OHLCSeries.prototype.pointValKey,
|
|
4310
|
+
// keys: ohlcProto.keys, // @todo potentially nonsense
|
|
4311
|
+
pointArrayMap: OHLCSeries.prototype.pointArrayMap,
|
|
4312
|
+
toYData: OHLCSeries.prototype.toYData
|
|
4313
|
+
});
|
|
4314
|
+
}
|
|
4315
|
+
});
|
|
4316
|
+
addEvent(Series, 'afterSetOptions', function (e) {
|
|
4317
|
+
var options = e.options,
|
|
4318
|
+
dataGrouping = options.dataGrouping;
|
|
4319
|
+
if (dataGrouping &&
|
|
4320
|
+
options.useOhlcData &&
|
|
4321
|
+
options.id !== 'highcharts-navigator-series') {
|
|
4322
|
+
dataGrouping.approximation = 'ohlc';
|
|
4323
|
+
}
|
|
4324
|
+
});
|
|
3438
4325
|
/* *
|
|
3439
4326
|
*
|
|
3440
4327
|
* API Options
|
|
@@ -3499,13 +4386,6 @@
|
|
|
3499
4386
|
* @product highstock
|
|
3500
4387
|
* @apioption series.ohlc.data
|
|
3501
4388
|
*/
|
|
3502
|
-
/**
|
|
3503
|
-
* The closing value of each data point.
|
|
3504
|
-
*
|
|
3505
|
-
* @type {number}
|
|
3506
|
-
* @product highstock
|
|
3507
|
-
* @apioption series.ohlc.data.close
|
|
3508
|
-
*/
|
|
3509
4389
|
/**
|
|
3510
4390
|
* The opening value of each data point.
|
|
3511
4391
|
*
|
|
@@ -3517,7 +4397,7 @@
|
|
|
3517
4397
|
|
|
3518
4398
|
return OHLCSeries;
|
|
3519
4399
|
});
|
|
3520
|
-
_registerModule(_modules, 'Series/Candlestick/CandlestickSeries.js', [_modules['Core/DefaultOptions.js'], _modules['Core/
|
|
4400
|
+
_registerModule(_modules, 'Series/Candlestick/CandlestickSeries.js', [_modules['Core/DefaultOptions.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (D, SeriesRegistry, U) {
|
|
3521
4401
|
/* *
|
|
3522
4402
|
*
|
|
3523
4403
|
* (c) 2010-2021 Torstein Honsi
|
|
@@ -3567,7 +4447,7 @@
|
|
|
3567
4447
|
function CandlestickSeries() {
|
|
3568
4448
|
/* *
|
|
3569
4449
|
*
|
|
3570
|
-
* Static
|
|
4450
|
+
* Static Properties
|
|
3571
4451
|
*
|
|
3572
4452
|
* */
|
|
3573
4453
|
var _this = _super !== null && _super.apply(this,
|
|
@@ -3704,9 +4584,10 @@
|
|
|
3704
4584
|
});
|
|
3705
4585
|
/* eslint-enable valid-jsdoc */
|
|
3706
4586
|
};
|
|
4587
|
+
CandlestickSeries.defaultOptions = merge(OHLCSeries.defaultOptions, defaultOptions.plotOptions,
|
|
3707
4588
|
/**
|
|
3708
|
-
* A candlestick chart is a style of financial chart used to describe
|
|
3709
|
-
* movements over time.
|
|
4589
|
+
* A candlestick chart is a style of financial chart used to describe
|
|
4590
|
+
* price movements over time.
|
|
3710
4591
|
*
|
|
3711
4592
|
* @sample stock/demo/candlestick/
|
|
3712
4593
|
* Candlestick chart
|
|
@@ -3716,7 +4597,7 @@
|
|
|
3716
4597
|
* @product highstock
|
|
3717
4598
|
* @optionparent plotOptions.candlestick
|
|
3718
4599
|
*/
|
|
3719
|
-
|
|
4600
|
+
{
|
|
3720
4601
|
/**
|
|
3721
4602
|
* The specific line color for up candle sticks. The default is to
|
|
3722
4603
|
* inherit the general `lineColor` setting.
|
|
@@ -3729,12 +4610,6 @@
|
|
|
3729
4610
|
* @product highstock
|
|
3730
4611
|
* @apioption plotOptions.candlestick.upLineColor
|
|
3731
4612
|
*/
|
|
3732
|
-
/**
|
|
3733
|
-
* @type {Highcharts.DataGroupingApproximationValue|Function}
|
|
3734
|
-
* @default ohlc
|
|
3735
|
-
* @product highstock
|
|
3736
|
-
* @apioption plotOptions.candlestick.dataGrouping.approximation
|
|
3737
|
-
*/
|
|
3738
4613
|
states: {
|
|
3739
4614
|
/**
|
|
3740
4615
|
* @extends plotOptions.column.states.hover
|
|
@@ -3742,16 +4617,14 @@
|
|
|
3742
4617
|
*/
|
|
3743
4618
|
hover: {
|
|
3744
4619
|
/**
|
|
3745
|
-
* The pixel width of the line/border around the
|
|
4620
|
+
* The pixel width of the line/border around the
|
|
4621
|
+
* candlestick.
|
|
3746
4622
|
*
|
|
3747
4623
|
* @product highstock
|
|
3748
4624
|
*/
|
|
3749
4625
|
lineWidth: 2
|
|
3750
4626
|
}
|
|
3751
4627
|
},
|
|
3752
|
-
/**
|
|
3753
|
-
* @extends plotOptions.ohlc.tooltip
|
|
3754
|
-
*/
|
|
3755
4628
|
tooltip: defaultOptions.plotOptions.ohlc.tooltip,
|
|
3756
4629
|
/**
|
|
3757
4630
|
* @type {number|null}
|
|
@@ -3773,7 +4646,7 @@
|
|
|
3773
4646
|
* @default #000000
|
|
3774
4647
|
* @product highstock
|
|
3775
4648
|
*/
|
|
3776
|
-
lineColor:
|
|
4649
|
+
lineColor: "#000000" /* neutralColor100 */,
|
|
3777
4650
|
/**
|
|
3778
4651
|
* The pixel width of the candlestick line/border. Defaults to `1`.
|
|
3779
4652
|
*
|
|
@@ -3798,8 +4671,8 @@
|
|
|
3798
4671
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
3799
4672
|
* @default #ffffff
|
|
3800
4673
|
* @product highstock
|
|
3801
|
-
|
|
3802
|
-
upColor:
|
|
4674
|
+
*/
|
|
4675
|
+
upColor: "#ffffff" /* backgroundColor */,
|
|
3803
4676
|
/**
|
|
3804
4677
|
* @product highstock
|
|
3805
4678
|
*/
|
|
@@ -3961,7 +4834,7 @@
|
|
|
3961
4834
|
|
|
3962
4835
|
return FlagsPoint;
|
|
3963
4836
|
});
|
|
3964
|
-
_registerModule(_modules, '
|
|
4837
|
+
_registerModule(_modules, 'Series/OnSeriesComposition.js', [_modules['Series/Column/ColumnSeries.js'], _modules['Core/Series/Series.js'], _modules['Core/Utilities.js']], function (ColumnSeries, Series, U) {
|
|
3965
4838
|
/* *
|
|
3966
4839
|
*
|
|
3967
4840
|
* (c) 2010-2021 Torstein Honsi
|
|
@@ -3975,52 +4848,78 @@
|
|
|
3975
4848
|
var seriesProto = Series.prototype;
|
|
3976
4849
|
var defined = U.defined,
|
|
3977
4850
|
stableSort = U.stableSort;
|
|
3978
|
-
|
|
3979
|
-
*
|
|
3980
|
-
*
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
4851
|
+
/* *
|
|
4852
|
+
*
|
|
4853
|
+
* Composition
|
|
4854
|
+
*
|
|
4855
|
+
* */
|
|
4856
|
+
var OnSeriesComposition;
|
|
4857
|
+
(function (OnSeriesComposition) {
|
|
4858
|
+
/* *
|
|
4859
|
+
*
|
|
4860
|
+
* Declarations
|
|
4861
|
+
*
|
|
4862
|
+
* */
|
|
4863
|
+
/* *
|
|
4864
|
+
*
|
|
4865
|
+
* Properties
|
|
4866
|
+
*
|
|
4867
|
+
* */
|
|
4868
|
+
var composedClasses = [];
|
|
4869
|
+
/* *
|
|
4870
|
+
*
|
|
4871
|
+
* Functions
|
|
4872
|
+
*
|
|
4873
|
+
* */
|
|
4874
|
+
/* eslint-disable valid-jsdoc */
|
|
4875
|
+
/**
|
|
4876
|
+
* @private
|
|
4877
|
+
*/
|
|
4878
|
+
function compose(SeriesClass) {
|
|
4879
|
+
if (composedClasses.indexOf(SeriesClass) === -1) {
|
|
4880
|
+
composedClasses.push(SeriesClass);
|
|
4881
|
+
var seriesProto_1 = SeriesClass.prototype;
|
|
4882
|
+
seriesProto_1.getPlotBox = getPlotBox;
|
|
4883
|
+
seriesProto_1.translate = translate;
|
|
4884
|
+
}
|
|
4885
|
+
return SeriesClass;
|
|
4886
|
+
}
|
|
4887
|
+
OnSeriesComposition.compose = compose;
|
|
4888
|
+
/**
|
|
4889
|
+
* Override getPlotBox. If the onSeries option is valid, return the plot box
|
|
4890
|
+
* of the onSeries, otherwise proceed as usual.
|
|
4891
|
+
*
|
|
4892
|
+
* @private
|
|
4893
|
+
*/
|
|
4894
|
+
function getPlotBox() {
|
|
4895
|
+
return seriesProto.getPlotBox.call((this.options.onSeries &&
|
|
4896
|
+
this.chart.get(this.options.onSeries)) || this);
|
|
4897
|
+
}
|
|
4898
|
+
OnSeriesComposition.getPlotBox = getPlotBox;
|
|
3998
4899
|
/**
|
|
3999
4900
|
* Extend the translate method by placing the point on the related series
|
|
4000
4901
|
*
|
|
4001
4902
|
* @private
|
|
4002
|
-
* @function onSeriesMixin.translate
|
|
4003
|
-
* @return {void}
|
|
4004
4903
|
*/
|
|
4005
|
-
|
|
4904
|
+
function translate() {
|
|
4006
4905
|
columnProto.translate.apply(this);
|
|
4007
4906
|
var series = this,
|
|
4008
4907
|
options = series.options,
|
|
4009
4908
|
chart = series.chart,
|
|
4010
4909
|
points = series.points,
|
|
4011
|
-
cursor = points.length - 1,
|
|
4012
|
-
point,
|
|
4013
|
-
lastPoint,
|
|
4014
4910
|
optionsOnSeries = options.onSeries,
|
|
4015
4911
|
onSeries = (optionsOnSeries &&
|
|
4016
4912
|
chart.get(optionsOnSeries)),
|
|
4017
|
-
onKey = options.onKey || 'y',
|
|
4018
4913
|
step = onSeries && onSeries.options.step,
|
|
4019
4914
|
onData = (onSeries && onSeries.points),
|
|
4020
|
-
i = onData && onData.length,
|
|
4021
4915
|
inverted = chart.inverted,
|
|
4022
4916
|
xAxis = series.xAxis,
|
|
4023
|
-
yAxis = series.yAxis
|
|
4917
|
+
yAxis = series.yAxis;
|
|
4918
|
+
var cursor = points.length - 1,
|
|
4919
|
+
point,
|
|
4920
|
+
lastPoint,
|
|
4921
|
+
onKey = options.onKey || 'y',
|
|
4922
|
+
i = onData && onData.length,
|
|
4024
4923
|
xOffset = 0,
|
|
4025
4924
|
leftPoint,
|
|
4026
4925
|
lastX,
|
|
@@ -4034,9 +4933,7 @@
|
|
|
4034
4933
|
lastX = (onData[i - 1].x +
|
|
4035
4934
|
(currentDataGrouping ? currentDataGrouping.totalRange : 0)); // #2374
|
|
4036
4935
|
// sort the data points
|
|
4037
|
-
stableSort(points, function (a, b) {
|
|
4038
|
-
return (a.x - b.x);
|
|
4039
|
-
});
|
|
4936
|
+
stableSort(points, function (a, b) { return (a.x - b.x); });
|
|
4040
4937
|
onKey = 'plot' + onKey[0].toUpperCase() + onKey.substr(1);
|
|
4041
4938
|
while (i-- && points[cursor]) {
|
|
4042
4939
|
leftPoint = onData[i];
|
|
@@ -4115,10 +5012,15 @@
|
|
|
4115
5012
|
});
|
|
4116
5013
|
this.onSeries = onSeries;
|
|
4117
5014
|
}
|
|
4118
|
-
|
|
4119
|
-
};
|
|
5015
|
+
OnSeriesComposition.translate = translate;
|
|
5016
|
+
})(OnSeriesComposition || (OnSeriesComposition = {}));
|
|
5017
|
+
/* *
|
|
5018
|
+
*
|
|
5019
|
+
* Default Export
|
|
5020
|
+
*
|
|
5021
|
+
* */
|
|
4120
5022
|
|
|
4121
|
-
return
|
|
5023
|
+
return OnSeriesComposition;
|
|
4122
5024
|
});
|
|
4123
5025
|
_registerModule(_modules, 'Series/Flags/FlagsSymbols.js', [_modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Renderer/SVG/SVGRenderer.js']], function (RendererRegistry, SVGRenderer) {
|
|
4124
5026
|
/* *
|
|
@@ -4214,7 +5116,7 @@
|
|
|
4214
5116
|
|
|
4215
5117
|
return symbols;
|
|
4216
5118
|
});
|
|
4217
|
-
_registerModule(_modules, 'Series/Flags/FlagsSeries.js', [_modules['Series/Flags/FlagsPoint.js'], _modules['Core/Globals.js'], _modules['
|
|
5119
|
+
_registerModule(_modules, 'Series/Flags/FlagsSeries.js', [_modules['Series/Flags/FlagsPoint.js'], _modules['Core/Globals.js'], _modules['Series/OnSeriesComposition.js'], _modules['Core/Renderer/RendererUtilities.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (FlagsPoint, H, OnSeriesComposition, R, SeriesRegistry, SVGElement, U) {
|
|
4218
5120
|
/* *
|
|
4219
5121
|
*
|
|
4220
5122
|
* (c) 2010-2021 Torstein Honsi
|
|
@@ -4419,11 +5321,15 @@
|
|
|
4419
5321
|
}
|
|
4420
5322
|
// Handle X-dimension overlapping
|
|
4421
5323
|
if (!options.allowOverlapX) {
|
|
5324
|
+
var maxDistance_1 = 100;
|
|
4422
5325
|
objectEach(boxesMap, function (box) {
|
|
4423
5326
|
box.plotX = box.anchorX;
|
|
4424
5327
|
boxes.push(box);
|
|
5328
|
+
maxDistance_1 = Math.max(box.size, maxDistance_1);
|
|
4425
5329
|
});
|
|
4426
|
-
|
|
5330
|
+
// If necessary (for overlapping or long labels) distribute it
|
|
5331
|
+
// depending on the label width or a hardcoded value, #16041.
|
|
5332
|
+
distribute(boxes, inverted ? yAxis.len : this.xAxis.len, maxDistance_1);
|
|
4427
5333
|
points.forEach(function (point) {
|
|
4428
5334
|
var box = point.graphic && boxesMap[point.plotX];
|
|
4429
5335
|
if (box) {
|
|
@@ -4687,7 +5593,7 @@
|
|
|
4687
5593
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
4688
5594
|
* @product highstock
|
|
4689
5595
|
*/
|
|
4690
|
-
fillColor:
|
|
5596
|
+
fillColor: "#ffffff" /* backgroundColor */,
|
|
4691
5597
|
/**
|
|
4692
5598
|
* The color of the line/border of the flag.
|
|
4693
5599
|
*
|
|
@@ -4717,14 +5623,14 @@
|
|
|
4717
5623
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
4718
5624
|
* @product highstock
|
|
4719
5625
|
*/
|
|
4720
|
-
lineColor:
|
|
5626
|
+
lineColor: "#000000" /* neutralColor100 */,
|
|
4721
5627
|
/**
|
|
4722
5628
|
* The fill or background color of the flag.
|
|
4723
5629
|
*
|
|
4724
5630
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
4725
5631
|
* @product highstock
|
|
4726
5632
|
*/
|
|
4727
|
-
fillColor:
|
|
5633
|
+
fillColor: "#ccd6eb" /* highlightColor20 */
|
|
4728
5634
|
}
|
|
4729
5635
|
},
|
|
4730
5636
|
/**
|
|
@@ -4746,37 +5652,27 @@
|
|
|
4746
5652
|
});
|
|
4747
5653
|
return FlagsSeries;
|
|
4748
5654
|
}(ColumnSeries));
|
|
5655
|
+
OnSeriesComposition.compose(FlagsSeries);
|
|
4749
5656
|
extend(FlagsSeries.prototype, {
|
|
4750
5657
|
allowDG: false,
|
|
4751
|
-
/**
|
|
4752
|
-
* @private
|
|
4753
|
-
* @function Highcharts.seriesTypes.flags#buildKDTree
|
|
4754
|
-
*/
|
|
4755
|
-
buildKDTree: noop,
|
|
4756
5658
|
forceCrop: true,
|
|
4757
|
-
|
|
5659
|
+
invertible: false,
|
|
5660
|
+
noSharedTooltip: true,
|
|
5661
|
+
pointClass: FlagsPoint,
|
|
5662
|
+
sorted: false,
|
|
5663
|
+
takeOrdinalPosition: false,
|
|
5664
|
+
trackerGroups: ['markerGroup'],
|
|
5665
|
+
buildKDTree: noop,
|
|
4758
5666
|
/**
|
|
4759
5667
|
* Inherit the initialization from base Series.
|
|
4760
|
-
*
|
|
4761
5668
|
* @private
|
|
4762
|
-
* @borrows Highcharts.Series#init as Highcharts.seriesTypes.flags#init
|
|
4763
5669
|
*/
|
|
4764
5670
|
init: Series.prototype.init,
|
|
4765
5671
|
/**
|
|
4766
5672
|
* Don't invert the flag marker group (#4960).
|
|
4767
|
-
*
|
|
4768
5673
|
* @private
|
|
4769
|
-
* @function Highcharts.seriesTypes.flags#invertGroups
|
|
4770
5674
|
*/
|
|
4771
|
-
invertGroups: noop
|
|
4772
|
-
// Flags series group should not be invertible (#14063).
|
|
4773
|
-
invertible: false,
|
|
4774
|
-
noSharedTooltip: true,
|
|
4775
|
-
pointClass: FlagsPoint,
|
|
4776
|
-
sorted: false,
|
|
4777
|
-
takeOrdinalPosition: false,
|
|
4778
|
-
trackerGroups: ['markerGroup'],
|
|
4779
|
-
translate: OnSeriesMixin.translate
|
|
5675
|
+
invertGroups: noop
|
|
4780
5676
|
});
|
|
4781
5677
|
SeriesRegistry.registerSeriesType('flags', FlagsSeries);
|
|
4782
5678
|
/* *
|
|
@@ -4998,8 +5894,15 @@
|
|
|
4998
5894
|
if (axis.opposite) {
|
|
4999
5895
|
scrollbarsOffsets[0] += offset;
|
|
5000
5896
|
}
|
|
5001
|
-
|
|
5002
|
-
|
|
5897
|
+
var xPosition = void 0;
|
|
5898
|
+
if (!scrollbar.options.opposite) {
|
|
5899
|
+
xPosition = axis.opposite ? 0 : axisMargin;
|
|
5900
|
+
}
|
|
5901
|
+
else {
|
|
5902
|
+
xPosition = axis.left + axis.width + 2 + scrollbarsOffsets[0] -
|
|
5903
|
+
(axis.opposite ? 0 : axisMargin);
|
|
5904
|
+
}
|
|
5905
|
+
scrollbar.position(xPosition, axis.top, axis.width, axis.height);
|
|
5003
5906
|
// Next scrollbar should reserve space for margin (if set)
|
|
5004
5907
|
if (axis.opposite) {
|
|
5005
5908
|
scrollbarsOffsets[0] += axisMargin;
|
|
@@ -5038,7 +5941,8 @@
|
|
|
5038
5941
|
// Make space for a scrollbar:
|
|
5039
5942
|
addEvent(AxisClass, 'afterGetOffset', function () {
|
|
5040
5943
|
var axis = this,
|
|
5041
|
-
|
|
5944
|
+
opposite = axis.scrollbar && !axis.scrollbar.options.opposite,
|
|
5945
|
+
index = axis.horiz ? 2 : opposite ? 3 : 1,
|
|
5042
5946
|
scrollbar = axis.scrollbar;
|
|
5043
5947
|
if (scrollbar) {
|
|
5044
5948
|
axis.chart.scrollbarsOffsets = [0, 0]; // reset scrollbars offsets
|
|
@@ -5054,7 +5958,7 @@
|
|
|
5054
5958
|
|
|
5055
5959
|
return ScrollbarAxis;
|
|
5056
5960
|
});
|
|
5057
|
-
_registerModule(_modules, 'Core/ScrollbarDefaults.js', [_modules['Core/Globals.js']
|
|
5961
|
+
_registerModule(_modules, 'Core/ScrollbarDefaults.js', [_modules['Core/Globals.js']], function (H) {
|
|
5058
5962
|
/* *
|
|
5059
5963
|
*
|
|
5060
5964
|
* (c) 2010-2021 Torstein Honsi
|
|
@@ -5153,6 +6057,8 @@
|
|
|
5153
6057
|
* @since 1.2.5
|
|
5154
6058
|
*/
|
|
5155
6059
|
minWidth: 6,
|
|
6060
|
+
/** @ignore-option */
|
|
6061
|
+
opposite: true,
|
|
5156
6062
|
/**
|
|
5157
6063
|
* Whether to show or hide the scrollbar when the scrolled content is
|
|
5158
6064
|
* zoomed out to it full extent.
|
|
@@ -5174,7 +6080,7 @@
|
|
|
5174
6080
|
*
|
|
5175
6081
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5176
6082
|
*/
|
|
5177
|
-
barBackgroundColor:
|
|
6083
|
+
barBackgroundColor: "#cccccc" /* neutralColor20 */,
|
|
5178
6084
|
/**
|
|
5179
6085
|
* The width of the bar's border.
|
|
5180
6086
|
*
|
|
@@ -5187,7 +6093,7 @@
|
|
|
5187
6093
|
*
|
|
5188
6094
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5189
6095
|
*/
|
|
5190
|
-
barBorderColor:
|
|
6096
|
+
barBorderColor: "#cccccc" /* neutralColor20 */,
|
|
5191
6097
|
/**
|
|
5192
6098
|
* The color of the small arrow inside the scrollbar buttons.
|
|
5193
6099
|
*
|
|
@@ -5196,7 +6102,7 @@
|
|
|
5196
6102
|
*
|
|
5197
6103
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5198
6104
|
*/
|
|
5199
|
-
buttonArrowColor:
|
|
6105
|
+
buttonArrowColor: "#333333" /* neutralColor80 */,
|
|
5200
6106
|
/**
|
|
5201
6107
|
* The color of scrollbar buttons.
|
|
5202
6108
|
*
|
|
@@ -5205,7 +6111,7 @@
|
|
|
5205
6111
|
*
|
|
5206
6112
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5207
6113
|
*/
|
|
5208
|
-
buttonBackgroundColor:
|
|
6114
|
+
buttonBackgroundColor: "#e6e6e6" /* neutralColor10 */,
|
|
5209
6115
|
/**
|
|
5210
6116
|
* The color of the border of the scrollbar buttons.
|
|
5211
6117
|
*
|
|
@@ -5214,7 +6120,7 @@
|
|
|
5214
6120
|
*
|
|
5215
6121
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5216
6122
|
*/
|
|
5217
|
-
buttonBorderColor:
|
|
6123
|
+
buttonBorderColor: "#cccccc" /* neutralColor20 */,
|
|
5218
6124
|
/**
|
|
5219
6125
|
* The border width of the scrollbar buttons.
|
|
5220
6126
|
*
|
|
@@ -5227,7 +6133,7 @@
|
|
|
5227
6133
|
*
|
|
5228
6134
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5229
6135
|
*/
|
|
5230
|
-
rifleColor:
|
|
6136
|
+
rifleColor: "#333333" /* neutralColor80 */,
|
|
5231
6137
|
/**
|
|
5232
6138
|
* The color of the track background.
|
|
5233
6139
|
*
|
|
@@ -5236,7 +6142,7 @@
|
|
|
5236
6142
|
*
|
|
5237
6143
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5238
6144
|
*/
|
|
5239
|
-
trackBackgroundColor:
|
|
6145
|
+
trackBackgroundColor: "#f2f2f2" /* neutralColor5 */,
|
|
5240
6146
|
/**
|
|
5241
6147
|
* The color of the border of the scrollbar track.
|
|
5242
6148
|
*
|
|
@@ -5245,7 +6151,7 @@
|
|
|
5245
6151
|
*
|
|
5246
6152
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5247
6153
|
*/
|
|
5248
|
-
trackBorderColor:
|
|
6154
|
+
trackBorderColor: "#f2f2f2" /* neutralColor5 */,
|
|
5249
6155
|
/**
|
|
5250
6156
|
* The corner radius of the border of the scrollbar track.
|
|
5251
6157
|
*
|
|
@@ -6154,7 +7060,7 @@
|
|
|
6154
7060
|
|
|
6155
7061
|
return NavigatorAxis;
|
|
6156
7062
|
});
|
|
6157
|
-
_registerModule(_modules, 'Core/Navigator.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Axis/NavigatorAxis.js'], _modules['Core/DefaultOptions.js'], _modules['Core/
|
|
7063
|
+
_registerModule(_modules, 'Core/Navigator.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Axis/NavigatorAxis.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Scrollbar.js'], _modules['Core/Series/Series.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (Axis, Chart, Color, H, NavigatorAxis, D, RendererRegistry, Scrollbar, Series, SeriesRegistry, U) {
|
|
6158
7064
|
/* *
|
|
6159
7065
|
*
|
|
6160
7066
|
* (c) 2010-2021 Torstein Honsi
|
|
@@ -6362,13 +7268,13 @@
|
|
|
6362
7268
|
*
|
|
6363
7269
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
6364
7270
|
*/
|
|
6365
|
-
backgroundColor:
|
|
7271
|
+
backgroundColor: "#f2f2f2" /* neutralColor5 */,
|
|
6366
7272
|
/**
|
|
6367
7273
|
* The stroke for the handle border and the stripes inside.
|
|
6368
7274
|
*
|
|
6369
7275
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
6370
7276
|
*/
|
|
6371
|
-
borderColor:
|
|
7277
|
+
borderColor: "#999999" /* neutralColor40 */
|
|
6372
7278
|
},
|
|
6373
7279
|
/**
|
|
6374
7280
|
* The color of the mask covering the areas of the navigator series
|
|
@@ -6385,7 +7291,7 @@
|
|
|
6385
7291
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
6386
7292
|
* @default rgba(102,133,194,0.3)
|
|
6387
7293
|
*/
|
|
6388
|
-
maskFill: color(
|
|
7294
|
+
maskFill: color("#6685c2" /* highlightColor60 */).setOpacity(0.3).get(),
|
|
6389
7295
|
/**
|
|
6390
7296
|
* The color of the line marking the currently zoomed area in the
|
|
6391
7297
|
* navigator.
|
|
@@ -6396,7 +7302,7 @@
|
|
|
6396
7302
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
6397
7303
|
* @default #cccccc
|
|
6398
7304
|
*/
|
|
6399
|
-
outlineColor:
|
|
7305
|
+
outlineColor: "#cccccc" /* neutralColor20 */,
|
|
6400
7306
|
/**
|
|
6401
7307
|
* The width of the line marking the currently zoomed area in the
|
|
6402
7308
|
* navigator.
|
|
@@ -6587,7 +7493,7 @@
|
|
|
6587
7493
|
className: 'highcharts-navigator-xaxis',
|
|
6588
7494
|
tickLength: 0,
|
|
6589
7495
|
lineWidth: 0,
|
|
6590
|
-
gridLineColor:
|
|
7496
|
+
gridLineColor: "#e6e6e6" /* neutralColor10 */,
|
|
6591
7497
|
gridLineWidth: 1,
|
|
6592
7498
|
tickPixelInterval: 200,
|
|
6593
7499
|
labels: {
|
|
@@ -6597,7 +7503,7 @@
|
|
|
6597
7503
|
*/
|
|
6598
7504
|
style: {
|
|
6599
7505
|
/** @ignore */
|
|
6600
|
-
color:
|
|
7506
|
+
color: "#999999" /* neutralColor40 */
|
|
6601
7507
|
},
|
|
6602
7508
|
x: 3,
|
|
6603
7509
|
y: -4
|
|
@@ -8024,7 +8930,7 @@
|
|
|
8024
8930
|
// If range declared, stick to the minimum only if the range
|
|
8025
8931
|
// is smaller than the data set range.
|
|
8026
8932
|
if (range && max - xDataMin > 0) {
|
|
8027
|
-
stickToMin = max - xDataMin < range
|
|
8933
|
+
stickToMin = max - xDataMin < range;
|
|
8028
8934
|
}
|
|
8029
8935
|
else {
|
|
8030
8936
|
// If the current axis minimum falls outside the new
|
|
@@ -8251,7 +9157,7 @@
|
|
|
8251
9157
|
|
|
8252
9158
|
return H.Navigator;
|
|
8253
9159
|
});
|
|
8254
|
-
_registerModule(_modules, 'Extensions/RangeSelector.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/DefaultOptions.js'], _modules['Core/
|
|
9160
|
+
_registerModule(_modules, 'Extensions/RangeSelector.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (Axis, Chart, H, D, SVGElement, U) {
|
|
8255
9161
|
/* *
|
|
8256
9162
|
*
|
|
8257
9163
|
* (c) 2010-2021 Torstein Honsi
|
|
@@ -8741,7 +9647,7 @@
|
|
|
8741
9647
|
*/
|
|
8742
9648
|
inputStyle: {
|
|
8743
9649
|
/** @ignore */
|
|
8744
|
-
color:
|
|
9650
|
+
color: "#335cad" /* highlightColor80 */,
|
|
8745
9651
|
/** @ignore */
|
|
8746
9652
|
cursor: 'pointer'
|
|
8747
9653
|
},
|
|
@@ -8758,7 +9664,7 @@
|
|
|
8758
9664
|
*/
|
|
8759
9665
|
labelStyle: {
|
|
8760
9666
|
/** @ignore */
|
|
8761
|
-
color:
|
|
9667
|
+
color: "#666666" /* neutralColor60 */
|
|
8762
9668
|
}
|
|
8763
9669
|
}
|
|
8764
9670
|
});
|
|
@@ -9461,7 +10367,7 @@
|
|
|
9461
10367
|
// Styles
|
|
9462
10368
|
label.css(merge(chartStyle, options.labelStyle));
|
|
9463
10369
|
dateBox.css(merge({
|
|
9464
|
-
color:
|
|
10370
|
+
color: "#333333" /* neutralColor80 */
|
|
9465
10371
|
}, chartStyle, options.inputStyle));
|
|
9466
10372
|
css(input, extend({
|
|
9467
10373
|
position: 'absolute',
|
|
@@ -10644,7 +11550,7 @@
|
|
|
10644
11550
|
|
|
10645
11551
|
return RangeSelector;
|
|
10646
11552
|
});
|
|
10647
|
-
_registerModule(_modules, 'Core/Chart/StockChart.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/FormatUtilities.js'], _modules['Core/DefaultOptions.js'], _modules['Core/
|
|
11553
|
+
_registerModule(_modules, 'Core/Chart/StockChart.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/FormatUtilities.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Series/Series.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js']], function (A, Axis, Chart, F, D, Series, SVGRenderer, U) {
|
|
10648
11554
|
/* *
|
|
10649
11555
|
*
|
|
10650
11556
|
* (c) 2010-2021 Torstein Honsi
|
|
@@ -10673,13 +11579,7 @@
|
|
|
10673
11579
|
var animObject = A.animObject;
|
|
10674
11580
|
var format = F.format;
|
|
10675
11581
|
var getOptions = D.getOptions;
|
|
10676
|
-
var pointTooltipFormatter = Point.prototype.tooltipFormatter;
|
|
10677
|
-
var _a = Series.prototype,
|
|
10678
|
-
seriesInit = _a.init,
|
|
10679
|
-
seriesProcessData = _a.processData;
|
|
10680
11582
|
var addEvent = U.addEvent,
|
|
10681
|
-
arrayMax = U.arrayMax,
|
|
10682
|
-
arrayMin = U.arrayMin,
|
|
10683
11583
|
clamp = U.clamp,
|
|
10684
11584
|
defined = U.defined,
|
|
10685
11585
|
extend = U.extend,
|
|
@@ -11213,12 +12113,12 @@
|
|
|
11213
12113
|
.attr({
|
|
11214
12114
|
fill: options.backgroundColor ||
|
|
11215
12115
|
point && point.series && point.series.color || // #14888
|
|
11216
|
-
|
|
12116
|
+
"#666666" /* neutralColor60 */,
|
|
11217
12117
|
stroke: options.borderColor || '',
|
|
11218
12118
|
'stroke-width': options.borderWidth || 0
|
|
11219
12119
|
})
|
|
11220
12120
|
.css(extend({
|
|
11221
|
-
color:
|
|
12121
|
+
color: "#ffffff" /* backgroundColor */,
|
|
11222
12122
|
fontWeight: 'normal',
|
|
11223
12123
|
fontSize: '11px',
|
|
11224
12124
|
textAlign: 'center'
|
|
@@ -11311,76 +12211,6 @@
|
|
|
11311
12211
|
posy + crossBox.height / 2
|
|
11312
12212
|
});
|
|
11313
12213
|
});
|
|
11314
|
-
/* ************************************************************************** *
|
|
11315
|
-
* Start value compare logic *
|
|
11316
|
-
* ************************************************************************** */
|
|
11317
|
-
/**
|
|
11318
|
-
* Extend series.init by adding a method to modify the y value used for plotting
|
|
11319
|
-
* on the y axis. This method is called both from the axis when finding dataMin
|
|
11320
|
-
* and dataMax, and from the series.translate method.
|
|
11321
|
-
*
|
|
11322
|
-
* @ignore
|
|
11323
|
-
* @function Highcharts.Series#init
|
|
11324
|
-
*/
|
|
11325
|
-
Series.prototype.init = function () {
|
|
11326
|
-
// Call base method
|
|
11327
|
-
seriesInit.apply(this, arguments);
|
|
11328
|
-
// Set comparison mode
|
|
11329
|
-
this.initCompare(this.options.compare);
|
|
11330
|
-
};
|
|
11331
|
-
/**
|
|
11332
|
-
* Highcharts Stock only. Set the
|
|
11333
|
-
* [compare](https://api.highcharts.com/highstock/plotOptions.series.compare)
|
|
11334
|
-
* mode of the series after render time. In most cases it is more useful running
|
|
11335
|
-
* {@link Axis#setCompare} on the X axis to update all its series.
|
|
11336
|
-
*
|
|
11337
|
-
* @function Highcharts.Series#setCompare
|
|
11338
|
-
*
|
|
11339
|
-
* @param {string} [compare]
|
|
11340
|
-
* Can be one of `null` (default), `"percent"` or `"value"`.
|
|
11341
|
-
*/
|
|
11342
|
-
Series.prototype.setCompare = function (compare) {
|
|
11343
|
-
this.initCompare(compare);
|
|
11344
|
-
// Survive to export, #5485
|
|
11345
|
-
this.userOptions.compare = compare;
|
|
11346
|
-
};
|
|
11347
|
-
/**
|
|
11348
|
-
* @ignore
|
|
11349
|
-
* @function Highcharts.Series#initCompare
|
|
11350
|
-
*
|
|
11351
|
-
* @param {string} [compare]
|
|
11352
|
-
* Can be one of `null` (default), `"percent"` or `"value"`.
|
|
11353
|
-
*/
|
|
11354
|
-
Series.prototype.initCompare = function (compare) {
|
|
11355
|
-
// Set or unset the modifyValue method
|
|
11356
|
-
this.modifyValue = (compare === 'value' || compare === 'percent') ?
|
|
11357
|
-
function (value, point) {
|
|
11358
|
-
var compareValue = this.compareValue;
|
|
11359
|
-
if (typeof value !== 'undefined' &&
|
|
11360
|
-
typeof compareValue !== 'undefined') { // #2601, #5814
|
|
11361
|
-
// Get the modified value
|
|
11362
|
-
if (compare === 'value') {
|
|
11363
|
-
value -= compareValue;
|
|
11364
|
-
// Compare percent
|
|
11365
|
-
}
|
|
11366
|
-
else {
|
|
11367
|
-
value = 100 * (value / compareValue) -
|
|
11368
|
-
(this.options.compareBase === 100 ? 0 : 100);
|
|
11369
|
-
}
|
|
11370
|
-
// record for tooltip etc.
|
|
11371
|
-
if (point) {
|
|
11372
|
-
point.change = value;
|
|
11373
|
-
}
|
|
11374
|
-
return value;
|
|
11375
|
-
}
|
|
11376
|
-
return 0;
|
|
11377
|
-
} :
|
|
11378
|
-
null;
|
|
11379
|
-
// Mark dirty
|
|
11380
|
-
if (this.chart.hasRendered) {
|
|
11381
|
-
this.isDirty = true;
|
|
11382
|
-
}
|
|
11383
|
-
};
|
|
11384
12214
|
/**
|
|
11385
12215
|
* Based on the data grouping options decides whether
|
|
11386
12216
|
* the data should be cropped while processing.
|
|
@@ -11397,173 +12227,6 @@
|
|
|
11397
12227
|
chart.options.isStock);
|
|
11398
12228
|
return groupingEnabled;
|
|
11399
12229
|
};
|
|
11400
|
-
/**
|
|
11401
|
-
* Extend series.processData by finding the first y value in the plot area,
|
|
11402
|
-
* used for comparing the following values
|
|
11403
|
-
*
|
|
11404
|
-
* @ignore
|
|
11405
|
-
* @function Highcharts.Series#processData
|
|
11406
|
-
*/
|
|
11407
|
-
Series.prototype.processData = function (force) {
|
|
11408
|
-
var series = this,
|
|
11409
|
-
i,
|
|
11410
|
-
keyIndex = -1,
|
|
11411
|
-
processedXData,
|
|
11412
|
-
processedYData,
|
|
11413
|
-
compareStart = series.options.compareStart === true ? 0 : 1,
|
|
11414
|
-
length,
|
|
11415
|
-
compareValue;
|
|
11416
|
-
// call base method
|
|
11417
|
-
seriesProcessData.apply(this, arguments);
|
|
11418
|
-
if (series.xAxis && series.processedYData) { // not pies
|
|
11419
|
-
// local variables
|
|
11420
|
-
processedXData = series.processedXData;
|
|
11421
|
-
processedYData = series.processedYData;
|
|
11422
|
-
length = processedYData.length;
|
|
11423
|
-
// For series with more than one value (range, OHLC etc), compare
|
|
11424
|
-
// against close or the pointValKey (#4922, #3112, #9854)
|
|
11425
|
-
if (series.pointArrayMap) {
|
|
11426
|
-
keyIndex = series.pointArrayMap.indexOf(series.options.pointValKey || series.pointValKey || 'y');
|
|
11427
|
-
}
|
|
11428
|
-
// find the first value for comparison
|
|
11429
|
-
for (i = 0; i < length - compareStart; i++) {
|
|
11430
|
-
compareValue = processedYData[i] && keyIndex > -1 ?
|
|
11431
|
-
processedYData[i][keyIndex] :
|
|
11432
|
-
processedYData[i];
|
|
11433
|
-
if (isNumber(compareValue) &&
|
|
11434
|
-
processedXData[i + compareStart] >=
|
|
11435
|
-
series.xAxis.min &&
|
|
11436
|
-
compareValue !== 0) {
|
|
11437
|
-
series.compareValue = compareValue;
|
|
11438
|
-
break;
|
|
11439
|
-
}
|
|
11440
|
-
}
|
|
11441
|
-
}
|
|
11442
|
-
return;
|
|
11443
|
-
};
|
|
11444
|
-
// Modify series extremes
|
|
11445
|
-
addEvent(Series, 'afterGetExtremes', function (e) {
|
|
11446
|
-
var dataExtremes = e.dataExtremes;
|
|
11447
|
-
if (this.modifyValue && dataExtremes) {
|
|
11448
|
-
var extremes = [
|
|
11449
|
-
this.modifyValue(dataExtremes.dataMin),
|
|
11450
|
-
this.modifyValue(dataExtremes.dataMax)
|
|
11451
|
-
];
|
|
11452
|
-
dataExtremes.dataMin = arrayMin(extremes);
|
|
11453
|
-
dataExtremes.dataMax = arrayMax(extremes);
|
|
11454
|
-
}
|
|
11455
|
-
});
|
|
11456
|
-
/**
|
|
11457
|
-
* Highcharts Stock only. Set the compare mode on all series
|
|
11458
|
-
* belonging to an Y axis after render time.
|
|
11459
|
-
*
|
|
11460
|
-
* @see [series.plotOptions.compare](https://api.highcharts.com/highstock/series.plotOptions.compare)
|
|
11461
|
-
*
|
|
11462
|
-
* @sample stock/members/axis-setcompare/
|
|
11463
|
-
* Set compoare
|
|
11464
|
-
*
|
|
11465
|
-
* @function Highcharts.Axis#setCompare
|
|
11466
|
-
*
|
|
11467
|
-
* @param {string} [compare]
|
|
11468
|
-
* The compare mode. Can be one of `null` (default), `"value"` or
|
|
11469
|
-
* `"percent"`.
|
|
11470
|
-
*
|
|
11471
|
-
* @param {boolean} [redraw=true]
|
|
11472
|
-
* Whether to redraw the chart or to wait for a later call to
|
|
11473
|
-
* {@link Chart#redraw}.
|
|
11474
|
-
*/
|
|
11475
|
-
Axis.prototype.setCompare = function (compare, redraw) {
|
|
11476
|
-
if (!this.isXAxis) {
|
|
11477
|
-
this.series.forEach(function (series) {
|
|
11478
|
-
series.setCompare(compare);
|
|
11479
|
-
});
|
|
11480
|
-
if (pick(redraw, true)) {
|
|
11481
|
-
this.chart.redraw();
|
|
11482
|
-
}
|
|
11483
|
-
}
|
|
11484
|
-
};
|
|
11485
|
-
/**
|
|
11486
|
-
* Extend the tooltip formatter by adding support for the point.change variable
|
|
11487
|
-
* as well as the changeDecimals option.
|
|
11488
|
-
*
|
|
11489
|
-
* @ignore
|
|
11490
|
-
* @function Highcharts.Point#tooltipFormatter
|
|
11491
|
-
*
|
|
11492
|
-
* @param {string} pointFormat
|
|
11493
|
-
*/
|
|
11494
|
-
Point.prototype.tooltipFormatter = function (pointFormat) {
|
|
11495
|
-
var point = this;
|
|
11496
|
-
var numberFormatter = point.series.chart.numberFormatter;
|
|
11497
|
-
pointFormat = pointFormat.replace('{point.change}', (point.change > 0 ? '+' : '') + numberFormatter(point.change, pick(point.series.tooltipOptions.changeDecimals, 2)));
|
|
11498
|
-
return pointTooltipFormatter.apply(this, [pointFormat]);
|
|
11499
|
-
};
|
|
11500
|
-
/* ************************************************************************** *
|
|
11501
|
-
* End value compare logic *
|
|
11502
|
-
* ************************************************************************** */
|
|
11503
|
-
// Extend the Series prototype to create a separate series clip box. This is
|
|
11504
|
-
// related to using multiple panes, and a future pane logic should incorporate
|
|
11505
|
-
// this feature (#2754).
|
|
11506
|
-
addEvent(Series, 'render', function () {
|
|
11507
|
-
var chart = this.chart,
|
|
11508
|
-
clipHeight;
|
|
11509
|
-
// Only do this on not 3d (#2939, #5904) nor polar (#6057) charts, and only
|
|
11510
|
-
// if the series type handles clipping in the animate method (#2975).
|
|
11511
|
-
if (!(chart.is3d && chart.is3d()) &&
|
|
11512
|
-
!chart.polar &&
|
|
11513
|
-
this.xAxis &&
|
|
11514
|
-
!this.xAxis.isRadial && // Gauge, #6192
|
|
11515
|
-
this.options.clip !== false // #15128
|
|
11516
|
-
) {
|
|
11517
|
-
clipHeight = this.yAxis.len;
|
|
11518
|
-
// Include xAxis line width (#8031) but only if the Y axis ends on the
|
|
11519
|
-
// edge of the X axis (#11005).
|
|
11520
|
-
if (this.xAxis.axisLine) {
|
|
11521
|
-
var dist = chart.plotTop + chart.plotHeight -
|
|
11522
|
-
this.yAxis.pos - this.yAxis.len,
|
|
11523
|
-
lineHeightCorrection = Math.floor(this.xAxis.axisLine.strokeWidth() / 2);
|
|
11524
|
-
if (dist >= 0) {
|
|
11525
|
-
clipHeight -= Math.max(lineHeightCorrection - dist, 0);
|
|
11526
|
-
}
|
|
11527
|
-
}
|
|
11528
|
-
// First render, initial clip box. clipBox also needs to be updated if
|
|
11529
|
-
// the series is rendered again before starting animating, in
|
|
11530
|
-
// compliance with a responsive rule (#13858).
|
|
11531
|
-
if (!chart.hasLoaded || (!this.clipBox && this.isDirty && !this.isDirtyData)) {
|
|
11532
|
-
this.clipBox = this.clipBox || merge(chart.clipBox);
|
|
11533
|
-
this.clipBox.width = this.xAxis.len;
|
|
11534
|
-
this.clipBox.height = clipHeight;
|
|
11535
|
-
}
|
|
11536
|
-
if (chart.hasRendered) {
|
|
11537
|
-
var animation = animObject(this.options.animation);
|
|
11538
|
-
// #15435: this.sharedClipKey might not have been set yet, for
|
|
11539
|
-
// example when updating the series, so we need to use this
|
|
11540
|
-
// function instead
|
|
11541
|
-
var sharedClipKey = this.getSharedClipKey(animation);
|
|
11542
|
-
var clipRect = chart.sharedClips[sharedClipKey];
|
|
11543
|
-
// On redrawing, resizing etc, update the clip rectangle.
|
|
11544
|
-
//
|
|
11545
|
-
// #15435: Update it even when we are creating/updating clipBox,
|
|
11546
|
-
// since there could be series updating and pane size changes
|
|
11547
|
-
// happening at the same time and we dont destroy shared clips in
|
|
11548
|
-
// stock.
|
|
11549
|
-
if (clipRect) {
|
|
11550
|
-
// animate in case resize is done during initial animation
|
|
11551
|
-
clipRect.animate({
|
|
11552
|
-
width: this.xAxis.len,
|
|
11553
|
-
height: clipHeight
|
|
11554
|
-
});
|
|
11555
|
-
var markerClipRect = chart.sharedClips[sharedClipKey + 'm'];
|
|
11556
|
-
// also change markers clip animation for consistency
|
|
11557
|
-
// (marker clip rects should exist only on chart init)
|
|
11558
|
-
if (markerClipRect) {
|
|
11559
|
-
markerClipRect.animate({
|
|
11560
|
-
width: this.xAxis.len
|
|
11561
|
-
});
|
|
11562
|
-
}
|
|
11563
|
-
}
|
|
11564
|
-
}
|
|
11565
|
-
}
|
|
11566
|
-
});
|
|
11567
12230
|
addEvent(Chart, 'update', function (e) {
|
|
11568
12231
|
var options = e.options;
|
|
11569
12232
|
// Use case: enabling scrollbar from a disabled state.
|
|
@@ -11580,68 +12243,10 @@
|
|
|
11580
12243
|
* Default Export
|
|
11581
12244
|
*
|
|
11582
12245
|
* */
|
|
11583
|
-
/* *
|
|
11584
|
-
*
|
|
11585
|
-
* API Options
|
|
11586
|
-
*
|
|
11587
|
-
* */
|
|
11588
|
-
/**
|
|
11589
|
-
* Compare the values of the series against the first non-null, non-
|
|
11590
|
-
* zero value in the visible range. The y axis will show percentage
|
|
11591
|
-
* or absolute change depending on whether `compare` is set to `"percent"`
|
|
11592
|
-
* or `"value"`. When this is applied to multiple series, it allows
|
|
11593
|
-
* comparing the development of the series against each other. Adds
|
|
11594
|
-
* a `change` field to every point object.
|
|
11595
|
-
*
|
|
11596
|
-
* @see [compareBase](#plotOptions.series.compareBase)
|
|
11597
|
-
* @see [Axis.setCompare()](/class-reference/Highcharts.Axis#setCompare)
|
|
11598
|
-
*
|
|
11599
|
-
* @sample {highstock} stock/plotoptions/series-compare-percent/
|
|
11600
|
-
* Percent
|
|
11601
|
-
* @sample {highstock} stock/plotoptions/series-compare-value/
|
|
11602
|
-
* Value
|
|
11603
|
-
*
|
|
11604
|
-
* @type {string}
|
|
11605
|
-
* @since 1.0.1
|
|
11606
|
-
* @product highstock
|
|
11607
|
-
* @apioption plotOptions.series.compare
|
|
11608
|
-
*/
|
|
11609
|
-
/**
|
|
11610
|
-
* Defines if comparison should start from the first point within the visible
|
|
11611
|
-
* range or should start from the first point **before** the range.
|
|
11612
|
-
*
|
|
11613
|
-
* In other words, this flag determines if first point within the visible range
|
|
11614
|
-
* will have 0% (`compareStart=true`) or should have been already calculated
|
|
11615
|
-
* according to the previous point (`compareStart=false`).
|
|
11616
|
-
*
|
|
11617
|
-
* @sample {highstock} stock/plotoptions/series-comparestart/
|
|
11618
|
-
* Calculate compare within visible range
|
|
11619
|
-
*
|
|
11620
|
-
* @type {boolean}
|
|
11621
|
-
* @default false
|
|
11622
|
-
* @since 6.0.0
|
|
11623
|
-
* @product highstock
|
|
11624
|
-
* @apioption plotOptions.series.compareStart
|
|
11625
|
-
*/
|
|
11626
|
-
/**
|
|
11627
|
-
* When [compare](#plotOptions.series.compare) is `percent`, this option
|
|
11628
|
-
* dictates whether to use 0 or 100 as the base of comparison.
|
|
11629
|
-
*
|
|
11630
|
-
* @sample {highstock} stock/plotoptions/series-comparebase/
|
|
11631
|
-
* Compare base is 100
|
|
11632
|
-
*
|
|
11633
|
-
* @type {number}
|
|
11634
|
-
* @default 0
|
|
11635
|
-
* @since 5.0.6
|
|
11636
|
-
* @product highstock
|
|
11637
|
-
* @validvalue [0, 100]
|
|
11638
|
-
* @apioption plotOptions.series.compareBase
|
|
11639
|
-
*/
|
|
11640
|
-
''; // keeps doclets above in transpiled file
|
|
11641
12246
|
|
|
11642
12247
|
return StockChart;
|
|
11643
12248
|
});
|
|
11644
|
-
_registerModule(_modules, 'masters/modules/stock.src.js', [_modules['Core/Globals.js'], _modules['Core/Axis/OrdinalAxis.js'], _modules['Core/Scrollbar.js'], _modules['Core/Chart/StockChart.js']], function (Highcharts, OrdinalAxis, Scrollbar, StockChart) {
|
|
12249
|
+
_registerModule(_modules, 'masters/modules/stock.src.js', [_modules['Core/Globals.js'], _modules['Core/Axis/OrdinalAxis.js'], _modules['Series/DataModifyComposition.js'], _modules['Core/Scrollbar.js'], _modules['Core/Chart/StockChart.js']], function (Highcharts, OrdinalAxis, DataModifyComposition, Scrollbar, StockChart) {
|
|
11645
12250
|
|
|
11646
12251
|
var G = Highcharts;
|
|
11647
12252
|
// Classes
|
|
@@ -11650,6 +12255,7 @@
|
|
|
11650
12255
|
// Compositions
|
|
11651
12256
|
Scrollbar.compose(G.Axis);
|
|
11652
12257
|
OrdinalAxis.compose(G.Axis, G.Series, G.Chart);
|
|
12258
|
+
DataModifyComposition.compose(G.Series, G.Axis, G.Point);
|
|
11653
12259
|
|
|
11654
12260
|
});
|
|
11655
12261
|
}));
|