highcharts 9.2.2 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +233 -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 +46 -23
- package/es-modules/Accessibility/Components/LegendComponent.js +97 -65
- package/es-modules/Accessibility/Components/MenuComponent.js +59 -40
- package/es-modules/Accessibility/Components/RangeSelectorComponent.js +5 -8
- 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 +144 -70
- 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 +8 -12
- 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 +2 -0
- 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 +3 -3
- 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 +153 -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 +68 -19
- 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/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/DataGrouping.js +31 -18
- 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 +8 -7
- 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 +9 -8
- 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/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 +95 -0
- package/es-modules/Maps/Projection.js +433 -0
- package/es-modules/Maps/ProjectionDefinition.js +9 -0
- package/es-modules/Maps/Projections/EqualEarth.js +42 -0
- package/es-modules/Maps/Projections/Miller.js +17 -0
- package/es-modules/Maps/Projections/Orthographic.js +26 -0
- package/es-modules/Maps/Projections/ProjectionRegistry.js +17 -0
- package/es-modules/Maps/Projections/WebMercator.js +25 -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/HollowCandlestickSeries.js +9 -10
- 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 +268 -309
- package/es-modules/Series/MapBubble/MapBubblePoint.js +0 -3
- package/es-modules/Series/MapBubble/MapBubbleSeries.js +10 -1
- package/es-modules/Series/MapPoint/MapPointPoint.js +5 -1
- package/es-modules/Series/MapPoint/MapPointSeries.js +87 -4
- 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 +9 -32
- 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 +20 -3
- package/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +2 -3
- package/es-modules/Stock/StockToolsBindings.js +144 -42
- package/es-modules/Stock/StockToolsGui.js +405 -11
- 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 +801 -804
- package/highcharts-gantt.js.map +1 -1
- package/highcharts-gantt.src.js +775 -739
- package/highcharts-more.js +194 -193
- package/highcharts-more.js.map +1 -1
- package/highcharts-more.src.js +207 -119
- package/highcharts.d.ts +9670 -4217
- package/highcharts.js +585 -588
- package/highcharts.js.map +1 -1
- package/highcharts.src.d.ts +9670 -4217
- package/highcharts.src.js +608 -587
- package/highmaps.js +726 -708
- package/highmaps.js.map +1 -1
- package/highmaps.src.js +2708 -1587
- package/highstock.js +788 -783
- package/highstock.js.map +1 -1
- package/highstock.src.js +1896 -1267
- 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 +649 -720
- package/indicators/indicators.js +12 -12
- package/indicators/indicators.js.map +1 -1
- package/indicators/indicators.src.js +188 -124
- 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 +21 -3
- 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 +234 -216
- package/modules/accessibility.js.map +1 -1
- package/modules/accessibility.src.d.ts +5 -0
- package/modules/accessibility.src.js +9709 -8608
- package/modules/annotations-advanced.d.ts +30 -0
- package/modules/annotations-advanced.js +191 -165
- package/modules/annotations-advanced.js.map +1 -1
- package/modules/annotations-advanced.src.d.ts +30 -0
- package/modules/annotations-advanced.src.js +1578 -320
- package/modules/annotations.js +121 -107
- package/modules/annotations.js.map +1 -1
- package/modules/annotations.src.js +958 -229
- 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 +19 -19
- package/modules/data.js.map +1 -1
- package/modules/data.src.js +9 -6
- package/modules/datagrouping.js +20 -20
- package/modules/datagrouping.js.map +1 -1
- package/modules/datagrouping.src.js +33 -19
- package/modules/debugger.js +1 -1
- package/modules/debugger.src.js +1 -1
- 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 +98 -67
- 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 +11 -11
- 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 +142 -122
- package/modules/map.js.map +1 -1
- package/modules/map.src.d.ts +136 -14
- package/modules/map.src.js +2129 -1029
- 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 +17 -17
- package/modules/offline-exporting.js.map +1 -1
- package/modules/offline-exporting.src.js +13 -13
- 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 +177 -164
- package/modules/stock-tools.js.map +1 -1
- package/modules/stock-tools.src.js +1001 -131
- 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 +1689 -1081
- 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.0 (2021-10-21)
|
|
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
|
|
@@ -948,7 +940,9 @@
|
|
|
948
940
|
series.processData.apply(fakeSeries);
|
|
949
941
|
});
|
|
950
942
|
// Apply grouping if needed.
|
|
951
|
-
axis.applyGrouping.call(fakeAxis
|
|
943
|
+
axis.applyGrouping.call(fakeAxis, {
|
|
944
|
+
hasExtemesChanged: false
|
|
945
|
+
});
|
|
952
946
|
// Force to use the ordinal when points are evenly spaced
|
|
953
947
|
// (e.g. weeks), #3825.
|
|
954
948
|
if (fakeSeries.closestPointRange !== fakeSeries.basePointRange &&
|
|
@@ -1043,7 +1037,8 @@
|
|
|
1043
1037
|
// When more series assign to axis, find the smallest one, #15987.
|
|
1044
1038
|
if (axis.series.length > 1) {
|
|
1045
1039
|
axis.series.forEach(function (series) {
|
|
1046
|
-
if (
|
|
1040
|
+
if (series.points &&
|
|
1041
|
+
defined(series.points[0]) &&
|
|
1047
1042
|
defined(series.points[0].plotX) &&
|
|
1048
1043
|
series.points[0].plotX < firstPointX) {
|
|
1049
1044
|
firstPointX = series.points[0].plotX;
|
|
@@ -1124,33 +1119,33 @@
|
|
|
1124
1119
|
|
|
1125
1120
|
return OrdinalAxis;
|
|
1126
1121
|
});
|
|
1127
|
-
_registerModule(_modules, 'Core/Axis/
|
|
1122
|
+
_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
1123
|
/* *
|
|
1129
1124
|
*
|
|
1130
|
-
* (c)
|
|
1125
|
+
* (c) 2010-2021 Torstein Honsi
|
|
1131
1126
|
*
|
|
1132
1127
|
* License: www.highcharts.com/license
|
|
1133
1128
|
*
|
|
1134
1129
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
1135
1130
|
*
|
|
1136
1131
|
* */
|
|
1132
|
+
var pointTooltipFormatter = Point.prototype.tooltipFormatter;
|
|
1137
1133
|
var addEvent = U.addEvent,
|
|
1138
|
-
|
|
1139
|
-
|
|
1134
|
+
arrayMax = U.arrayMax,
|
|
1135
|
+
arrayMin = U.arrayMin,
|
|
1136
|
+
correctFloat = U.correctFloat,
|
|
1137
|
+
defined = U.defined,
|
|
1140
1138
|
isArray = U.isArray,
|
|
1141
1139
|
isNumber = U.isNumber,
|
|
1140
|
+
isString = U.isString,
|
|
1142
1141
|
pick = U.pick;
|
|
1143
1142
|
/* *
|
|
1144
1143
|
*
|
|
1145
1144
|
* Composition
|
|
1146
1145
|
*
|
|
1147
1146
|
* */
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
* @private
|
|
1151
|
-
*/
|
|
1152
|
-
var BrokenAxis;
|
|
1153
|
-
(function (BrokenAxis) {
|
|
1147
|
+
var DataModifyComposition;
|
|
1148
|
+
(function (DataModifyComposition) {
|
|
1154
1149
|
/* *
|
|
1155
1150
|
*
|
|
1156
1151
|
* Declarations
|
|
@@ -1169,426 +1164,977 @@
|
|
|
1169
1164
|
* */
|
|
1170
1165
|
/* eslint-disable valid-jsdoc */
|
|
1171
1166
|
/**
|
|
1172
|
-
*
|
|
1167
|
+
* Extends the series, axis and point classes with
|
|
1168
|
+
* compare and cumulative support.
|
|
1169
|
+
*
|
|
1173
1170
|
* @private
|
|
1171
|
+
*
|
|
1172
|
+
* @param SeriesClass
|
|
1173
|
+
* Series class to use.
|
|
1174
|
+
*
|
|
1175
|
+
* @param AxisClass
|
|
1176
|
+
* Axis class to extend.
|
|
1177
|
+
*
|
|
1178
|
+
* @param PointClass
|
|
1179
|
+
* Point class to use.
|
|
1174
1180
|
*/
|
|
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
|
-
}
|
|
1181
|
+
function compose(SeriesClass, AxisClass, PointClass) {
|
|
1184
1182
|
if (composedClasses.indexOf(SeriesClass) === -1) {
|
|
1185
1183
|
composedClasses.push(SeriesClass);
|
|
1186
1184
|
var seriesProto = SeriesClass.prototype;
|
|
1187
|
-
seriesProto.
|
|
1188
|
-
seriesProto.
|
|
1189
|
-
addEvent(SeriesClass, '
|
|
1190
|
-
addEvent(SeriesClass, '
|
|
1185
|
+
seriesProto.setCompare = seriesSetCompare;
|
|
1186
|
+
seriesProto.setCumulative = seriesSetCumulative;
|
|
1187
|
+
addEvent(SeriesClass, 'afterInit', afterInit);
|
|
1188
|
+
addEvent(SeriesClass, 'afterGetExtremes', afterGetExtremes);
|
|
1189
|
+
addEvent(SeriesClass, 'afterProcessData', afterProcessData);
|
|
1191
1190
|
}
|
|
1192
|
-
|
|
1191
|
+
if (composedClasses.indexOf(AxisClass) === -1) {
|
|
1192
|
+
composedClasses.push(AxisClass);
|
|
1193
|
+
var axisProto = AxisClass.prototype;
|
|
1194
|
+
axisProto.setCompare = axisSetCompare;
|
|
1195
|
+
axisProto.setModifier = setModifier;
|
|
1196
|
+
axisProto.setCumulative = axisSetCumulative;
|
|
1197
|
+
}
|
|
1198
|
+
if (composedClasses.indexOf(PointClass) === -1) {
|
|
1199
|
+
composedClasses.push(PointClass);
|
|
1200
|
+
var pointProto = PointClass.prototype;
|
|
1201
|
+
pointProto.tooltipFormatter = tooltipFormatter;
|
|
1202
|
+
}
|
|
1203
|
+
return SeriesClass;
|
|
1193
1204
|
}
|
|
1194
|
-
|
|
1205
|
+
DataModifyComposition.compose = compose;
|
|
1206
|
+
/* ********************************************************************** *
|
|
1207
|
+
* Start shared compare and cumulative logic *
|
|
1208
|
+
* ********************************************************************** */
|
|
1195
1209
|
/**
|
|
1210
|
+
* Shared code for the axis.setCompare() and the axis.setCumulative()
|
|
1211
|
+
* methods. Inits the 'compare' or the 'cumulative' mode.
|
|
1196
1212
|
* @private
|
|
1197
1213
|
*/
|
|
1198
|
-
function
|
|
1199
|
-
if (
|
|
1200
|
-
this.
|
|
1214
|
+
function setModifier(mode, modeState, redraw) {
|
|
1215
|
+
if (!this.isXAxis) {
|
|
1216
|
+
this.series.forEach(function (series) {
|
|
1217
|
+
if (mode === 'compare' &&
|
|
1218
|
+
typeof modeState !== 'boolean') {
|
|
1219
|
+
series.setCompare(modeState, false);
|
|
1220
|
+
}
|
|
1221
|
+
else if (mode === 'cumulative' &&
|
|
1222
|
+
!isString(modeState)) {
|
|
1223
|
+
series.setCumulative(modeState, false);
|
|
1224
|
+
}
|
|
1225
|
+
});
|
|
1226
|
+
if (pick(redraw, true)) {
|
|
1227
|
+
this.chart.redraw();
|
|
1228
|
+
}
|
|
1201
1229
|
}
|
|
1202
1230
|
}
|
|
1203
1231
|
/**
|
|
1204
|
-
*
|
|
1205
|
-
*
|
|
1232
|
+
* Extend the tooltip formatter by adding support for the point.change
|
|
1233
|
+
* variable as well as the changeDecimals option.
|
|
1234
|
+
*
|
|
1235
|
+
* @ignore
|
|
1236
|
+
* @function Highcharts.Point#tooltipFormatter
|
|
1237
|
+
*
|
|
1238
|
+
* @param {string} pointFormat
|
|
1206
1239
|
*/
|
|
1207
|
-
function
|
|
1208
|
-
var
|
|
1209
|
-
|
|
1210
|
-
|
|
1240
|
+
function tooltipFormatter(pointFormat) {
|
|
1241
|
+
var point = this, numberFormatter = point.series.chart.numberFormatter, replace = function (value) {
|
|
1242
|
+
pointFormat = pointFormat.replace('{point.' + value + '}', (point[value] > 0 && value === 'change' ? '+' : '') +
|
|
1243
|
+
numberFormatter(point[value], pick(point.series.tooltipOptions.changeDecimals, 2)));
|
|
1244
|
+
};
|
|
1245
|
+
if (defined(point.change)) {
|
|
1246
|
+
replace('change');
|
|
1247
|
+
}
|
|
1248
|
+
if (defined(point.cumulativeSum)) {
|
|
1249
|
+
replace('cumulativeSum');
|
|
1211
1250
|
}
|
|
1251
|
+
return pointTooltipFormatter.apply(this, [pointFormat]);
|
|
1212
1252
|
}
|
|
1213
1253
|
/**
|
|
1214
|
-
*
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1254
|
+
* Extend series.init by adding a methods to modify the y values used
|
|
1255
|
+
* for plotting on the y axis. For compare mode, this method is called both
|
|
1256
|
+
* from the axis when finding dataMin and dataMax,
|
|
1257
|
+
* and from the series.translate method.
|
|
1258
|
+
*
|
|
1259
|
+
* @ignore
|
|
1260
|
+
* @function Highcharts.Series#init
|
|
1261
|
+
*/
|
|
1262
|
+
function afterInit() {
|
|
1263
|
+
var compare = this.options.compare;
|
|
1264
|
+
var dataModify;
|
|
1265
|
+
if (compare === 'percent' ||
|
|
1266
|
+
compare === 'value' ||
|
|
1267
|
+
this.options.cumulative) {
|
|
1268
|
+
dataModify = new Additions(this);
|
|
1269
|
+
if (compare === 'percent' || compare === 'value') {
|
|
1270
|
+
// Set comparison mode
|
|
1271
|
+
dataModify.initCompare(compare);
|
|
1272
|
+
}
|
|
1273
|
+
else {
|
|
1274
|
+
// Set Cumulative Sum mode
|
|
1275
|
+
dataModify.initCumulative();
|
|
1228
1276
|
}
|
|
1229
|
-
axis.tickPositions = newPositions;
|
|
1230
|
-
axis.tickPositions.info = info;
|
|
1231
1277
|
}
|
|
1278
|
+
this.dataModify = dataModify;
|
|
1232
1279
|
}
|
|
1233
1280
|
/**
|
|
1281
|
+
* Adjust the extremes (compare and cumulative modify the data).
|
|
1234
1282
|
* @private
|
|
1235
1283
|
*/
|
|
1236
|
-
function
|
|
1237
|
-
var
|
|
1238
|
-
|
|
1239
|
-
|
|
1284
|
+
function afterGetExtremes(e) {
|
|
1285
|
+
var dataExtremes = e.dataExtremes,
|
|
1286
|
+
activeYData = dataExtremes.activeYData;
|
|
1287
|
+
if (this.dataModify && dataExtremes) {
|
|
1288
|
+
var extremes = void 0;
|
|
1289
|
+
if (this.options.compare) {
|
|
1290
|
+
extremes = [
|
|
1291
|
+
this.dataModify.modifyValue(dataExtremes.dataMin),
|
|
1292
|
+
this.dataModify.modifyValue(dataExtremes.dataMax)
|
|
1293
|
+
];
|
|
1294
|
+
}
|
|
1295
|
+
else if (this.options.cumulative &&
|
|
1296
|
+
isArray(activeYData) &&
|
|
1297
|
+
// If only one y visible, sum doesn't change
|
|
1298
|
+
// so no need to change extremes
|
|
1299
|
+
activeYData.length >= 2) {
|
|
1300
|
+
extremes = Additions.getCumulativeExtremes(activeYData);
|
|
1301
|
+
}
|
|
1302
|
+
if (extremes) {
|
|
1303
|
+
dataExtremes.dataMin = arrayMin(extremes);
|
|
1304
|
+
dataExtremes.dataMax = arrayMax(extremes);
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
/* ********************************************************************** *
|
|
1309
|
+
* End shared compare and cumulative logic *
|
|
1310
|
+
* ********************************************************************** */
|
|
1311
|
+
/* ********************************************************************** *
|
|
1312
|
+
* Start value compare logic *
|
|
1313
|
+
* ********************************************************************** */
|
|
1314
|
+
/**
|
|
1315
|
+
* Highcharts Stock only. Set the
|
|
1316
|
+
* [compare](https://api.highcharts.com/highstock/plotOptions.series.compare)
|
|
1317
|
+
* mode of the series after render time.
|
|
1318
|
+
* In most cases it is more useful running
|
|
1319
|
+
* {@link Axis#setCompare} on the X axis to update all its series.
|
|
1320
|
+
*
|
|
1321
|
+
* @function Highcharts.Series#setCompare
|
|
1322
|
+
*
|
|
1323
|
+
* @param {string|null} [compare]
|
|
1324
|
+
* Can be one of `undefined` (default), `null`, `"percent"`
|
|
1325
|
+
* or `"value"`.
|
|
1326
|
+
*
|
|
1327
|
+
* @param {boolean} [redraw=true]
|
|
1328
|
+
* Whether to redraw the chart or to wait for a later call to
|
|
1329
|
+
* {@link Chart#redraw}.
|
|
1330
|
+
*/
|
|
1331
|
+
function seriesSetCompare(compare, redraw) {
|
|
1332
|
+
// Survive to export, #5485 (and for options generally)
|
|
1333
|
+
this.options.compare = this.userOptions.compare = compare;
|
|
1334
|
+
// Fire series.init() that will set or delete series.dataModify
|
|
1335
|
+
this.update({}, pick(redraw, true));
|
|
1336
|
+
if (this.dataModify && (compare === 'value' || compare === 'percent')) {
|
|
1337
|
+
this.dataModify.initCompare(compare);
|
|
1338
|
+
}
|
|
1339
|
+
else {
|
|
1340
|
+
// When disabling, clear the points
|
|
1341
|
+
this.points.forEach(function (point) {
|
|
1342
|
+
delete point.change;
|
|
1343
|
+
});
|
|
1240
1344
|
}
|
|
1241
1345
|
}
|
|
1242
1346
|
/**
|
|
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
|
-
|
|
1347
|
+
* Extend series.processData by finding the first y value in the plot area,
|
|
1348
|
+
* used for comparing the following values
|
|
1349
|
+
*
|
|
1350
|
+
* @ignore
|
|
1351
|
+
* @function Highcharts.Series#processData
|
|
1352
|
+
*/
|
|
1353
|
+
function afterProcessData() {
|
|
1354
|
+
var series = this;
|
|
1355
|
+
if (series.xAxis && // not pies
|
|
1356
|
+
series.processedYData &&
|
|
1357
|
+
series.dataModify) {
|
|
1358
|
+
var processedXData = series.processedXData,
|
|
1359
|
+
processedYData = series.processedYData,
|
|
1360
|
+
length_1 = processedYData.length,
|
|
1361
|
+
compareStart = series.options.compareStart === true ? 0 : 1;
|
|
1362
|
+
var keyIndex = -1,
|
|
1363
|
+
i = void 0;
|
|
1364
|
+
// For series with more than one value (range, OHLC etc), compare
|
|
1365
|
+
// against close or the pointValKey (#4922, #3112, #9854)
|
|
1366
|
+
if (series.pointArrayMap) {
|
|
1367
|
+
keyIndex = series.pointArrayMap.indexOf(series.options.pointValKey || series.pointValKey || 'y');
|
|
1368
|
+
}
|
|
1369
|
+
// find the first value for comparison
|
|
1370
|
+
for (i = 0; i < length_1 - compareStart; i++) {
|
|
1371
|
+
var compareValue = processedYData[i] && keyIndex > -1 ?
|
|
1372
|
+
processedYData[i][keyIndex] : processedYData[i];
|
|
1373
|
+
if (isNumber(compareValue) &&
|
|
1374
|
+
compareValue !== 0 &&
|
|
1375
|
+
processedXData[i + compareStart] >= (series.xAxis.min || 0)) {
|
|
1376
|
+
series.dataModify.compareValue = compareValue;
|
|
1377
|
+
break;
|
|
1378
|
+
}
|
|
1272
1379
|
}
|
|
1273
1380
|
}
|
|
1274
1381
|
}
|
|
1275
1382
|
/**
|
|
1276
|
-
*
|
|
1383
|
+
* Highcharts Stock only. Set the compare mode on all series
|
|
1384
|
+
* belonging to a Y axis.
|
|
1385
|
+
*
|
|
1386
|
+
* @see [plotOptions.series.compare](https://api.highcharts.com/highstock/plotOptions.series.compare)
|
|
1387
|
+
*
|
|
1388
|
+
* @sample stock/members/axis-setcompare/
|
|
1389
|
+
* Set compare
|
|
1390
|
+
*
|
|
1391
|
+
* @function Highcharts.Axis#setCompare
|
|
1392
|
+
*
|
|
1393
|
+
* @param {string|null} [compare]
|
|
1394
|
+
* The compare mode. Can be one of `undefined` (default), `null`,
|
|
1395
|
+
* `"value"` or `"percent"`.
|
|
1396
|
+
*
|
|
1397
|
+
* @param {boolean} [redraw=true]
|
|
1398
|
+
* Whether to redraw the chart or to wait for a later call to
|
|
1399
|
+
* {@link Chart#redraw}.
|
|
1277
1400
|
*/
|
|
1278
|
-
function
|
|
1279
|
-
this.
|
|
1280
|
-
this.drawBreaks(this.yAxis, pick(this.pointArrayMap, ['y']));
|
|
1401
|
+
function axisSetCompare(compare, redraw) {
|
|
1402
|
+
this.setModifier('compare', compare, redraw);
|
|
1281
1403
|
}
|
|
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
|
-
|
|
1404
|
+
/* ********************************************************************** *
|
|
1405
|
+
* End value compare logic *
|
|
1406
|
+
* ********************************************************************** */
|
|
1407
|
+
/* ********************************************************************** *
|
|
1408
|
+
* Start Cumulative Sum logic, author: Rafal Sebestjanski *
|
|
1409
|
+
* ********************************************************************** */
|
|
1410
|
+
/**
|
|
1411
|
+
* Highcharts Stock only. Set the
|
|
1412
|
+
* [cumulative](https://api.highcharts.com/highstock/plotOptions.series.cumulative)
|
|
1413
|
+
* mode of the series after render time.
|
|
1414
|
+
* In most cases it is more useful running
|
|
1415
|
+
* {@link Axis#setCumulative} on the Y axis to update all its series.
|
|
1416
|
+
*
|
|
1417
|
+
* @function Highcharts.Series#setCumulative
|
|
1418
|
+
*
|
|
1419
|
+
* @param {boolean} [cumulative=false]
|
|
1420
|
+
* Either enable or disable Cumulative Sum mode.
|
|
1421
|
+
* Can be one of `false` (default) or `true`.
|
|
1422
|
+
*
|
|
1423
|
+
* @param {boolean} [redraw=true]
|
|
1424
|
+
* Whether to redraw the chart or to wait for a later call to
|
|
1425
|
+
* {@link Chart#redraw}.
|
|
1426
|
+
*/
|
|
1427
|
+
function seriesSetCumulative(cumulative, redraw) {
|
|
1428
|
+
// Set default value to false
|
|
1429
|
+
cumulative = pick(cumulative, false);
|
|
1430
|
+
// Survive to export, #5485 (and for options generally)
|
|
1431
|
+
this.options.cumulative = this.userOptions.cumulative = cumulative;
|
|
1432
|
+
// Fire series.init() that will set or delete series.dataModify
|
|
1433
|
+
this.update({}, pick(redraw, true));
|
|
1434
|
+
// If should, turn on the Cumulative Sum mode
|
|
1435
|
+
if (this.dataModify) {
|
|
1436
|
+
this.dataModify.initCumulative();
|
|
1437
|
+
}
|
|
1438
|
+
else {
|
|
1439
|
+
// When disabling, clear the points
|
|
1440
|
+
this.points.forEach(function (point) {
|
|
1441
|
+
delete point.cumulativeSum;
|
|
1320
1442
|
});
|
|
1321
1443
|
}
|
|
1322
1444
|
}
|
|
1323
1445
|
/**
|
|
1324
|
-
*
|
|
1325
|
-
*
|
|
1326
|
-
* axis module to broken axis module as of #5045.
|
|
1446
|
+
* Highcharts Stock only. Set the cumulative mode on all series
|
|
1447
|
+
* belonging to a Y axis.
|
|
1327
1448
|
*
|
|
1328
|
-
* @
|
|
1329
|
-
* @function Highcharts.Series#gappedPath
|
|
1449
|
+
* @see [plotOptions.series.cumulative](https://api.highcharts.com/highstock/plotOptions.series.cumulative)
|
|
1330
1450
|
*
|
|
1331
|
-
* @
|
|
1332
|
-
*
|
|
1451
|
+
* @sample stock/members/axis-setcumulative/
|
|
1452
|
+
* Set cumulative
|
|
1453
|
+
*
|
|
1454
|
+
* @function Highcharts.Axis#setCumulative
|
|
1455
|
+
*
|
|
1456
|
+
* @param {boolean} [cumulative]
|
|
1457
|
+
* Whether to disable or enable the cumulative mode.
|
|
1458
|
+
* Can be one of `undefined` (default, treated as `false`),
|
|
1459
|
+
* `false` or `true`.
|
|
1460
|
+
*
|
|
1461
|
+
* @param {boolean} [redraw=true]
|
|
1462
|
+
* Whether to redraw the chart or to wait for a later call to
|
|
1463
|
+
* {@link Chart#redraw}.
|
|
1333
1464
|
*/
|
|
1334
|
-
function
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1465
|
+
function axisSetCumulative(cumulative, redraw) {
|
|
1466
|
+
this.setModifier('cumulative', cumulative, redraw);
|
|
1467
|
+
}
|
|
1468
|
+
/* *
|
|
1469
|
+
*
|
|
1470
|
+
* Classes
|
|
1471
|
+
*
|
|
1472
|
+
* */
|
|
1473
|
+
/**
|
|
1474
|
+
* @private
|
|
1475
|
+
*/
|
|
1476
|
+
var Additions = /** @class */ (function () {
|
|
1477
|
+
/* *
|
|
1478
|
+
*
|
|
1479
|
+
* Constructors
|
|
1480
|
+
*
|
|
1481
|
+
* */
|
|
1482
|
+
/**
|
|
1483
|
+
* @private
|
|
1484
|
+
*/
|
|
1485
|
+
function Additions(series) {
|
|
1486
|
+
this.series = series;
|
|
1487
|
+
}
|
|
1488
|
+
/* *
|
|
1489
|
+
*
|
|
1490
|
+
* Functions
|
|
1491
|
+
*
|
|
1492
|
+
* */
|
|
1342
1493
|
/**
|
|
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
|
|
1494
|
+
* @private
|
|
1371
1495
|
*/
|
|
1496
|
+
Additions.prototype.modifyValue = function () {
|
|
1497
|
+
return 0;
|
|
1498
|
+
};
|
|
1372
1499
|
/**
|
|
1373
|
-
*
|
|
1374
|
-
*
|
|
1500
|
+
* @ignore
|
|
1501
|
+
* @function Highcharts.Series#getCumulativeExtremes
|
|
1375
1502
|
*
|
|
1376
|
-
*
|
|
1377
|
-
*
|
|
1378
|
-
*
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1503
|
+
* @param {Array} [activeYData]
|
|
1504
|
+
* An array cointaining all the points' y values
|
|
1505
|
+
* in a visible range.
|
|
1506
|
+
*/
|
|
1507
|
+
Additions.getCumulativeExtremes = function (activeYData) {
|
|
1508
|
+
var cumulativeDataMin = Infinity,
|
|
1509
|
+
cumulativeDataMax = -Infinity;
|
|
1510
|
+
activeYData.reduce(function (prev, cur) {
|
|
1511
|
+
var sum = prev + cur;
|
|
1512
|
+
cumulativeDataMin = Math.min(cumulativeDataMin, sum, prev);
|
|
1513
|
+
cumulativeDataMax = Math.max(cumulativeDataMax, sum, prev);
|
|
1514
|
+
return sum;
|
|
1515
|
+
});
|
|
1516
|
+
return [cumulativeDataMin, cumulativeDataMax];
|
|
1517
|
+
};
|
|
1518
|
+
/**
|
|
1519
|
+
* @ignore
|
|
1520
|
+
* @function Highcharts.Series#initCompare
|
|
1387
1521
|
*
|
|
1388
|
-
* @
|
|
1389
|
-
*
|
|
1390
|
-
* @since 5.0.13
|
|
1391
|
-
* @product highstock
|
|
1392
|
-
* @validvalue ["relative", "value"]
|
|
1393
|
-
* @requires modules/broken-axis
|
|
1394
|
-
* @apioption plotOptions.series.gapUnit
|
|
1522
|
+
* @param {string} [compare]
|
|
1523
|
+
* Can be one of `"percent"` or `"value"`.
|
|
1395
1524
|
*/
|
|
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
|
-
|
|
1525
|
+
Additions.prototype.initCompare = function (compare) {
|
|
1526
|
+
// Set the modifyValue method
|
|
1527
|
+
this.modifyValue = function (value, index) {
|
|
1528
|
+
if (value === null) {
|
|
1529
|
+
value = 0;
|
|
1530
|
+
}
|
|
1531
|
+
var compareValue = this.compareValue;
|
|
1532
|
+
if (typeof value !== 'undefined' &&
|
|
1533
|
+
typeof compareValue !== 'undefined') { // #2601, #5814
|
|
1534
|
+
// Get the modified value
|
|
1535
|
+
if (compare === 'value') {
|
|
1536
|
+
value -= compareValue;
|
|
1537
|
+
// Compare percent
|
|
1538
|
+
}
|
|
1539
|
+
else {
|
|
1540
|
+
var compareBase = this.series.options.compareBase;
|
|
1541
|
+
value = 100 * (value / compareValue) -
|
|
1542
|
+
(compareBase === 100 ? 0 : 100);
|
|
1543
|
+
}
|
|
1544
|
+
// record for tooltip etc.
|
|
1545
|
+
if (typeof index !== 'undefined') {
|
|
1546
|
+
var point = this.series.points[index];
|
|
1547
|
+
if (point) {
|
|
1548
|
+
point.change = value;
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
return value;
|
|
1422
1552
|
}
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1553
|
+
return 0;
|
|
1554
|
+
};
|
|
1555
|
+
};
|
|
1556
|
+
/**
|
|
1557
|
+
* @ignore
|
|
1558
|
+
* @function Highcharts.Series#initCumulative
|
|
1559
|
+
*/
|
|
1560
|
+
Additions.prototype.initCumulative = function () {
|
|
1561
|
+
// Set the modifyValue method
|
|
1562
|
+
this.modifyValue = function (value, index) {
|
|
1563
|
+
if (value === null) {
|
|
1564
|
+
value = 0;
|
|
1565
|
+
}
|
|
1566
|
+
if (value !== void 0 && index !== void 0) {
|
|
1567
|
+
var prevPoint = index > 0 ?
|
|
1568
|
+
this.series.points[index - 1] : null;
|
|
1569
|
+
// Get the modified value
|
|
1570
|
+
if (prevPoint && prevPoint.cumulativeSum) {
|
|
1571
|
+
value = correctFloat(prevPoint.cumulativeSum + value);
|
|
1572
|
+
}
|
|
1573
|
+
// Record for tooltip etc.
|
|
1574
|
+
var point = this.series.points[index];
|
|
1575
|
+
if (point) {
|
|
1576
|
+
point.cumulativeSum = value;
|
|
1437
1577
|
}
|
|
1578
|
+
return value;
|
|
1438
1579
|
}
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1580
|
+
return 0;
|
|
1581
|
+
};
|
|
1582
|
+
};
|
|
1583
|
+
return Additions;
|
|
1584
|
+
}());
|
|
1585
|
+
DataModifyComposition.Additions = Additions;
|
|
1586
|
+
})(DataModifyComposition || (DataModifyComposition = {}));
|
|
1587
|
+
/* *
|
|
1588
|
+
*
|
|
1589
|
+
* Default Export
|
|
1590
|
+
*
|
|
1591
|
+
* */
|
|
1592
|
+
/* *
|
|
1593
|
+
*
|
|
1594
|
+
* API Options
|
|
1595
|
+
*
|
|
1596
|
+
* */
|
|
1597
|
+
/**
|
|
1598
|
+
* Compare the values of the series against the first non-null, non-
|
|
1599
|
+
* zero value in the visible range. The y axis will show percentage
|
|
1600
|
+
* or absolute change depending on whether `compare` is set to `"percent"`
|
|
1601
|
+
* or `"value"`. When this is applied to multiple series, it allows
|
|
1602
|
+
* comparing the development of the series against each other. Adds
|
|
1603
|
+
* a `change` field to every point object.
|
|
1604
|
+
*
|
|
1605
|
+
* @see [compareBase](#plotOptions.series.compareBase)
|
|
1606
|
+
* @see [Axis.setCompare()](/class-reference/Highcharts.Axis#setCompare)
|
|
1607
|
+
* @see [Series.setCompare()](/class-reference/Highcharts.Series#setCompare)
|
|
1608
|
+
*
|
|
1609
|
+
* @sample {highstock} stock/plotoptions/series-compare-percent/
|
|
1610
|
+
* Percent
|
|
1611
|
+
* @sample {highstock} stock/plotoptions/series-compare-value/
|
|
1612
|
+
* Value
|
|
1613
|
+
*
|
|
1614
|
+
* @type {string}
|
|
1615
|
+
* @since 1.0.1
|
|
1616
|
+
* @product highstock
|
|
1617
|
+
* @apioption plotOptions.series.compare
|
|
1618
|
+
*/
|
|
1619
|
+
/**
|
|
1620
|
+
* Defines if comparison should start from the first point within the visible
|
|
1621
|
+
* range or should start from the first point **before** the range.
|
|
1622
|
+
*
|
|
1623
|
+
* In other words, this flag determines if first point within the visible range
|
|
1624
|
+
* will have 0% (`compareStart=true`) or should have been already calculated
|
|
1625
|
+
* according to the previous point (`compareStart=false`).
|
|
1626
|
+
*
|
|
1627
|
+
* @sample {highstock} stock/plotoptions/series-comparestart/
|
|
1628
|
+
* Calculate compare within visible range
|
|
1629
|
+
*
|
|
1630
|
+
* @type {boolean}
|
|
1631
|
+
* @default false
|
|
1632
|
+
* @since 6.0.0
|
|
1633
|
+
* @product highstock
|
|
1634
|
+
* @apioption plotOptions.series.compareStart
|
|
1635
|
+
*/
|
|
1636
|
+
/**
|
|
1637
|
+
* When [compare](#plotOptions.series.compare) is `percent`, this option
|
|
1638
|
+
* dictates whether to use 0 or 100 as the base of comparison.
|
|
1639
|
+
*
|
|
1640
|
+
* @sample {highstock} stock/plotoptions/series-comparebase/
|
|
1641
|
+
* Compare base is 100
|
|
1642
|
+
*
|
|
1643
|
+
* @type {number}
|
|
1644
|
+
* @default 0
|
|
1645
|
+
* @since 5.0.6
|
|
1646
|
+
* @product highstock
|
|
1647
|
+
* @validvalue [0, 100]
|
|
1648
|
+
* @apioption plotOptions.series.compareBase
|
|
1649
|
+
*/
|
|
1650
|
+
/**
|
|
1651
|
+
* Cumulative Sum feature replaces points' values with the following formula:
|
|
1652
|
+
* `sum of all previous points' values + current point's value`.
|
|
1653
|
+
* Works only for points in a visible range.
|
|
1654
|
+
* Adds the `cumulativeSum` field to each point object that can be accessed
|
|
1655
|
+
* e.g. in the [tooltip.pointFormat](https://api.highcharts.com/highstock/tooltip.pointFormat).
|
|
1656
|
+
*
|
|
1657
|
+
* @see [Axis.setCumulative()](/class-reference/Highcharts.Axis#setCumulative)
|
|
1658
|
+
* @see [Series.setCumulative()](/class-reference/Highcharts.Series#setCumulative)
|
|
1659
|
+
*
|
|
1660
|
+
* @sample {highstock} stock/plotoptions/series-cumulative-sum/
|
|
1661
|
+
* Cumulative Sum
|
|
1662
|
+
*
|
|
1663
|
+
* @type {boolean}
|
|
1664
|
+
* @default false
|
|
1665
|
+
* @since 9.3.0
|
|
1666
|
+
* @product highstock
|
|
1667
|
+
* @apioption plotOptions.series.cumulative
|
|
1668
|
+
*/
|
|
1669
|
+
''; // keeps doclets above in transpiled file
|
|
1670
|
+
|
|
1671
|
+
return DataModifyComposition;
|
|
1672
|
+
});
|
|
1673
|
+
_registerModule(_modules, 'Core/Axis/BrokenAxis.js', [_modules['Extensions/Stacking.js'], _modules['Core/Utilities.js']], function (StackItem, U) {
|
|
1674
|
+
/* *
|
|
1675
|
+
*
|
|
1676
|
+
* (c) 2009-2021 Torstein Honsi
|
|
1677
|
+
*
|
|
1678
|
+
* License: www.highcharts.com/license
|
|
1679
|
+
*
|
|
1680
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
1681
|
+
*
|
|
1682
|
+
* */
|
|
1683
|
+
var addEvent = U.addEvent,
|
|
1684
|
+
find = U.find,
|
|
1685
|
+
fireEvent = U.fireEvent,
|
|
1686
|
+
isArray = U.isArray,
|
|
1687
|
+
isNumber = U.isNumber,
|
|
1688
|
+
pick = U.pick;
|
|
1689
|
+
/* *
|
|
1690
|
+
*
|
|
1691
|
+
* Composition
|
|
1692
|
+
*
|
|
1693
|
+
* */
|
|
1694
|
+
/**
|
|
1695
|
+
* Axis with support of broken data rows.
|
|
1696
|
+
* @private
|
|
1697
|
+
*/
|
|
1698
|
+
var BrokenAxis;
|
|
1699
|
+
(function (BrokenAxis) {
|
|
1446
1700
|
/* *
|
|
1447
1701
|
*
|
|
1448
|
-
*
|
|
1702
|
+
* Declarations
|
|
1703
|
+
*
|
|
1704
|
+
* */
|
|
1705
|
+
/* *
|
|
1706
|
+
*
|
|
1707
|
+
* Constants
|
|
1708
|
+
*
|
|
1709
|
+
* */
|
|
1710
|
+
var composedClasses = [];
|
|
1711
|
+
/* *
|
|
1712
|
+
*
|
|
1713
|
+
* Functions
|
|
1449
1714
|
*
|
|
1450
1715
|
* */
|
|
1716
|
+
/* eslint-disable valid-jsdoc */
|
|
1451
1717
|
/**
|
|
1452
|
-
*
|
|
1718
|
+
* Adds support for broken axes.
|
|
1453
1719
|
* @private
|
|
1454
|
-
* @class
|
|
1455
1720
|
*/
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
this.axis = axis;
|
|
1721
|
+
function compose(AxisClass, SeriesClass) {
|
|
1722
|
+
if (composedClasses.indexOf(AxisClass) === -1) {
|
|
1723
|
+
composedClasses.push(AxisClass);
|
|
1724
|
+
AxisClass.keepProps.push('brokenAxis');
|
|
1725
|
+
addEvent(AxisClass, 'init', onAxisInit);
|
|
1726
|
+
addEvent(AxisClass, 'afterInit', onAxisAfterInit);
|
|
1727
|
+
addEvent(AxisClass, 'afterSetTickPositions', onAxisAfterSetTickPositions);
|
|
1728
|
+
addEvent(AxisClass, 'afterSetOptions', onAxisAfterSetOptions);
|
|
1465
1729
|
}
|
|
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;
|
|
1730
|
+
if (composedClasses.indexOf(SeriesClass) === -1) {
|
|
1731
|
+
composedClasses.push(SeriesClass);
|
|
1732
|
+
var seriesProto = SeriesClass.prototype;
|
|
1733
|
+
seriesProto.drawBreaks = seriesDrawBreaks;
|
|
1734
|
+
seriesProto.gappedPath = seriesGappedPath;
|
|
1735
|
+
addEvent(SeriesClass, 'afterGeneratePoints', onSeriesAfterGeneratePoints);
|
|
1736
|
+
addEvent(SeriesClass, 'afterRender', onSeriesAfterRender);
|
|
1737
|
+
}
|
|
1738
|
+
return AxisClass;
|
|
1739
|
+
}
|
|
1740
|
+
BrokenAxis.compose = compose;
|
|
1741
|
+
/**
|
|
1742
|
+
* @private
|
|
1743
|
+
*/
|
|
1744
|
+
function onAxisAfterInit() {
|
|
1745
|
+
if (typeof this.brokenAxis !== 'undefined') {
|
|
1746
|
+
this.brokenAxis.setBreaks(this.options.breaks, false);
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
/**
|
|
1750
|
+
* Force Axis to be not-ordinal when breaks are defined.
|
|
1751
|
+
* @private
|
|
1752
|
+
*/
|
|
1753
|
+
function onAxisAfterSetOptions() {
|
|
1754
|
+
var axis = this;
|
|
1755
|
+
if (axis.brokenAxis && axis.brokenAxis.hasBreaks) {
|
|
1756
|
+
axis.options.ordinal = false;
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
/**
|
|
1760
|
+
* @private
|
|
1761
|
+
*/
|
|
1762
|
+
function onAxisAfterSetTickPositions() {
|
|
1763
|
+
var axis = this,
|
|
1764
|
+
brokenAxis = axis.brokenAxis;
|
|
1765
|
+
if (brokenAxis &&
|
|
1766
|
+
brokenAxis.hasBreaks) {
|
|
1767
|
+
var tickPositions = axis.tickPositions,
|
|
1768
|
+
info = axis.tickPositions.info,
|
|
1769
|
+
newPositions = [];
|
|
1770
|
+
for (var i = 0; i < tickPositions.length; i++) {
|
|
1771
|
+
if (!brokenAxis.isInAnyBreak(tickPositions[i])) {
|
|
1772
|
+
newPositions.push(tickPositions[i]);
|
|
1513
1773
|
}
|
|
1514
1774
|
}
|
|
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
|
-
|
|
1775
|
+
axis.tickPositions = newPositions;
|
|
1776
|
+
axis.tickPositions.info = info;
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
/**
|
|
1780
|
+
* @private
|
|
1781
|
+
*/
|
|
1782
|
+
function onAxisInit() {
|
|
1783
|
+
var axis = this;
|
|
1784
|
+
if (!axis.brokenAxis) {
|
|
1785
|
+
axis.brokenAxis = new Additions(axis);
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
/**
|
|
1789
|
+
* @private
|
|
1790
|
+
*/
|
|
1791
|
+
function onSeriesAfterGeneratePoints() {
|
|
1792
|
+
var _a = this,
|
|
1793
|
+
isDirty = _a.isDirty,
|
|
1794
|
+
connectNulls = _a.options.connectNulls,
|
|
1795
|
+
points = _a.points,
|
|
1796
|
+
xAxis = _a.xAxis,
|
|
1797
|
+
yAxis = _a.yAxis;
|
|
1798
|
+
// Set, or reset visibility of the points. Axis.setBreaks marks
|
|
1799
|
+
// the series as isDirty
|
|
1800
|
+
if (isDirty) {
|
|
1801
|
+
var i = points.length;
|
|
1802
|
+
while (i--) {
|
|
1803
|
+
var point = points[i];
|
|
1804
|
+
// Respect nulls inside the break (#4275)
|
|
1805
|
+
var nullGap = point.y === null && connectNulls === false;
|
|
1806
|
+
var isPointInBreak = (!nullGap && ((xAxis &&
|
|
1807
|
+
xAxis.brokenAxis &&
|
|
1808
|
+
xAxis.brokenAxis.isInAnyBreak(point.x,
|
|
1809
|
+
true)) || (yAxis &&
|
|
1810
|
+
yAxis.brokenAxis &&
|
|
1811
|
+
yAxis.brokenAxis.isInAnyBreak(point.y,
|
|
1812
|
+
true))));
|
|
1813
|
+
// Set point.visible if in any break.
|
|
1814
|
+
// If not in break, reset visible to original value.
|
|
1815
|
+
point.visible = isPointInBreak ?
|
|
1816
|
+
false :
|
|
1817
|
+
point.options.visible !== false;
|
|
1542
1818
|
}
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
/**
|
|
1822
|
+
* @private
|
|
1823
|
+
*/
|
|
1824
|
+
function onSeriesAfterRender() {
|
|
1825
|
+
this.drawBreaks(this.xAxis, ['x']);
|
|
1826
|
+
this.drawBreaks(this.yAxis, pick(this.pointArrayMap, ['y']));
|
|
1827
|
+
}
|
|
1828
|
+
/**
|
|
1829
|
+
* @private
|
|
1830
|
+
*/
|
|
1831
|
+
function seriesDrawBreaks(axis, keys) {
|
|
1832
|
+
var series = this,
|
|
1833
|
+
points = series.points;
|
|
1834
|
+
var breaks,
|
|
1835
|
+
threshold,
|
|
1836
|
+
eventName,
|
|
1837
|
+
y;
|
|
1838
|
+
if (axis && // #5950
|
|
1839
|
+
axis.brokenAxis &&
|
|
1840
|
+
axis.brokenAxis.hasBreaks) {
|
|
1841
|
+
var brokenAxis_1 = axis.brokenAxis;
|
|
1842
|
+
keys.forEach(function (key) {
|
|
1843
|
+
breaks = brokenAxis_1 && brokenAxis_1.breakArray || [];
|
|
1844
|
+
threshold = axis.isXAxis ?
|
|
1845
|
+
axis.min :
|
|
1846
|
+
pick(series.options.threshold, axis.min);
|
|
1847
|
+
points.forEach(function (point) {
|
|
1848
|
+
y = pick(point['stack' + key.toUpperCase()], point[key]);
|
|
1849
|
+
breaks.forEach(function (brk) {
|
|
1850
|
+
if (isNumber(threshold) && isNumber(y)) {
|
|
1851
|
+
eventName = false;
|
|
1852
|
+
if ((threshold < brk.from && y > brk.to) ||
|
|
1853
|
+
(threshold > brk.from && y < brk.from)) {
|
|
1854
|
+
eventName = 'pointBreak';
|
|
1855
|
+
}
|
|
1856
|
+
else if ((threshold < brk.from && y > brk.from && y < brk.to) ||
|
|
1857
|
+
(threshold > brk.from && y > brk.to && y < brk.from)) {
|
|
1858
|
+
eventName = 'pointInBreak';
|
|
1859
|
+
}
|
|
1860
|
+
if (eventName) {
|
|
1861
|
+
fireEvent(axis, eventName, { point: point, brk: brk });
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
});
|
|
1865
|
+
});
|
|
1866
|
+
});
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
/**
|
|
1870
|
+
* Extend getGraphPath by identifying gaps in the data so that we
|
|
1871
|
+
* can draw a gap in the line or area. This was moved from ordinal
|
|
1872
|
+
* axis module to broken axis module as of #5045.
|
|
1873
|
+
*
|
|
1874
|
+
* @private
|
|
1875
|
+
* @function Highcharts.Series#gappedPath
|
|
1876
|
+
*
|
|
1877
|
+
* @return {Highcharts.SVGPathArray}
|
|
1878
|
+
* Gapped path
|
|
1879
|
+
*/
|
|
1880
|
+
function seriesGappedPath() {
|
|
1881
|
+
var currentDataGrouping = this.currentDataGrouping,
|
|
1882
|
+
groupingSize = currentDataGrouping && currentDataGrouping.gapSize,
|
|
1883
|
+
points = this.points.slice(),
|
|
1884
|
+
yAxis = this.yAxis;
|
|
1885
|
+
var gapSize = this.options.gapSize,
|
|
1886
|
+
i = points.length - 1,
|
|
1887
|
+
stack;
|
|
1888
|
+
/**
|
|
1889
|
+
* Defines when to display a gap in the graph, together with the
|
|
1890
|
+
* [gapUnit](plotOptions.series.gapUnit) option.
|
|
1546
1891
|
*
|
|
1547
|
-
*
|
|
1892
|
+
* In case when `dataGrouping` is enabled, points can be grouped
|
|
1893
|
+
* into a larger time span. This can make the grouped points to
|
|
1894
|
+
* have a greater distance than the absolute value of `gapSize`
|
|
1895
|
+
* property, which will result in disappearing graph completely.
|
|
1896
|
+
* To prevent this situation the mentioned distance between
|
|
1897
|
+
* grouped points is used instead of previously defined
|
|
1898
|
+
* `gapSize`.
|
|
1548
1899
|
*
|
|
1549
|
-
*
|
|
1550
|
-
|
|
1551
|
-
*
|
|
1552
|
-
*
|
|
1900
|
+
* In practice, this option is most often used to visualize gaps
|
|
1901
|
+
* in time series. In a stock chart, intraday data is available
|
|
1902
|
+
* for daytime hours, while gaps will appear in nights and
|
|
1903
|
+
* weekends.
|
|
1553
1904
|
*
|
|
1554
|
-
* @
|
|
1555
|
-
*
|
|
1905
|
+
* @see [gapUnit](plotOptions.series.gapUnit)
|
|
1906
|
+
* @see [xAxis.breaks](#xAxis.breaks)
|
|
1556
1907
|
*
|
|
1557
|
-
* @
|
|
1558
|
-
*
|
|
1908
|
+
* @sample {highstock} stock/plotoptions/series-gapsize/
|
|
1909
|
+
* Setting the gap size to 2 introduces gaps for weekends in
|
|
1910
|
+
* daily datasets.
|
|
1559
1911
|
*
|
|
1560
|
-
* @
|
|
1561
|
-
*
|
|
1562
|
-
*
|
|
1912
|
+
* @type {number}
|
|
1913
|
+
* @default 0
|
|
1914
|
+
* @product highstock
|
|
1915
|
+
* @requires modules/broken-axis
|
|
1916
|
+
* @apioption plotOptions.series.gapSize
|
|
1563
1917
|
*/
|
|
1564
|
-
Additions.prototype.findBreakAt = function (x, breaks) {
|
|
1565
|
-
return find(breaks, function (b) {
|
|
1566
|
-
return b.from < x && x < b.to;
|
|
1567
|
-
});
|
|
1568
|
-
};
|
|
1569
1918
|
/**
|
|
1570
|
-
*
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1919
|
+
* Together with [gapSize](plotOptions.series.gapSize), this
|
|
1920
|
+
* option defines where to draw gaps in the graph.
|
|
1921
|
+
*
|
|
1922
|
+
* When the `gapUnit` is `"relative"` (default), a gap size of 5
|
|
1923
|
+
* means that if the distance between two points is greater than
|
|
1924
|
+
* 5 times that of the two closest points, the graph will be
|
|
1925
|
+
* broken.
|
|
1926
|
+
*
|
|
1927
|
+
* When the `gapUnit` is `"value"`, the gap is based on absolute
|
|
1928
|
+
* axis values, which on a datetime axis is milliseconds. This
|
|
1929
|
+
* also applies to the navigator series that inherits gap
|
|
1930
|
+
* options from the base series.
|
|
1931
|
+
*
|
|
1932
|
+
* @see [gapSize](plotOptions.series.gapSize)
|
|
1933
|
+
*
|
|
1934
|
+
* @type {string}
|
|
1935
|
+
* @default relative
|
|
1936
|
+
* @since 5.0.13
|
|
1937
|
+
* @product highstock
|
|
1938
|
+
* @validvalue ["relative", "value"]
|
|
1939
|
+
* @requires modules/broken-axis
|
|
1940
|
+
* @apioption plotOptions.series.gapUnit
|
|
1941
|
+
*/
|
|
1942
|
+
if (gapSize && i > 0) { // #5008
|
|
1943
|
+
// Gap unit is relative
|
|
1944
|
+
if (this.options.gapUnit !== 'value') {
|
|
1945
|
+
gapSize *= this.basePointRange;
|
|
1946
|
+
}
|
|
1947
|
+
// Setting a new gapSize in case dataGrouping is enabled
|
|
1948
|
+
// (#7686)
|
|
1949
|
+
if (groupingSize &&
|
|
1950
|
+
groupingSize > gapSize &&
|
|
1951
|
+
// Except when DG is forced (e.g. from other series)
|
|
1952
|
+
// and has lower granularity than actual points (#11351)
|
|
1953
|
+
groupingSize >= this.basePointRange) {
|
|
1954
|
+
gapSize = groupingSize;
|
|
1955
|
+
}
|
|
1956
|
+
// extension for ordinal breaks
|
|
1957
|
+
var current = void 0,
|
|
1958
|
+
next = void 0;
|
|
1959
|
+
while (i--) {
|
|
1960
|
+
// Reassign next if it is not visible
|
|
1961
|
+
if (!(next && next.visible !== false)) {
|
|
1962
|
+
next = points[i + 1];
|
|
1963
|
+
}
|
|
1964
|
+
current = points[i];
|
|
1965
|
+
// Skip iteration if one of the points is not visible
|
|
1966
|
+
if (next.visible === false || current.visible === false) {
|
|
1967
|
+
continue;
|
|
1968
|
+
}
|
|
1969
|
+
if (next.x - current.x > gapSize) {
|
|
1970
|
+
var xRange = (current.x + next.x) / 2;
|
|
1971
|
+
points.splice(// insert after this one
|
|
1972
|
+
i + 1, 0, {
|
|
1973
|
+
isNull: true,
|
|
1974
|
+
x: xRange
|
|
1975
|
+
});
|
|
1976
|
+
// For stacked chart generate empty stack items,
|
|
1977
|
+
// #6546
|
|
1978
|
+
if (yAxis.stacking && this.options.stacking) {
|
|
1979
|
+
stack = yAxis.stacking.stacks[this.stackKey][xRange] =
|
|
1980
|
+
new StackItem(yAxis, yAxis.options
|
|
1981
|
+
.stackLabels, false, xRange, this.stack);
|
|
1982
|
+
stack.total = 0;
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
// Assign current to next for the upcoming iteration
|
|
1986
|
+
next = current;
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
// Call base method
|
|
1990
|
+
return this.getGraphPath(points);
|
|
1991
|
+
}
|
|
1992
|
+
/* *
|
|
1993
|
+
*
|
|
1994
|
+
* Class
|
|
1995
|
+
*
|
|
1996
|
+
* */
|
|
1997
|
+
/**
|
|
1998
|
+
* Provides support for broken axes.
|
|
1999
|
+
* @private
|
|
2000
|
+
* @class
|
|
2001
|
+
*/
|
|
2002
|
+
var Additions = /** @class */ (function () {
|
|
2003
|
+
/* *
|
|
2004
|
+
*
|
|
2005
|
+
* Constructors
|
|
2006
|
+
*
|
|
2007
|
+
* */
|
|
2008
|
+
function Additions(axis) {
|
|
2009
|
+
this.hasBreaks = false;
|
|
2010
|
+
this.axis = axis;
|
|
2011
|
+
}
|
|
2012
|
+
/* *
|
|
2013
|
+
*
|
|
2014
|
+
* Static Functions
|
|
2015
|
+
*
|
|
2016
|
+
* */
|
|
2017
|
+
/**
|
|
2018
|
+
* @private
|
|
2019
|
+
*/
|
|
2020
|
+
Additions.isInBreak = function (brk, val) {
|
|
2021
|
+
var repeat = brk.repeat || Infinity,
|
|
2022
|
+
from = brk.from,
|
|
2023
|
+
length = brk.to - brk.from,
|
|
2024
|
+
test = (val >= from ?
|
|
2025
|
+
(val - from) % repeat :
|
|
2026
|
+
repeat - ((from - val) % repeat));
|
|
2027
|
+
var ret;
|
|
2028
|
+
if (!brk.inclusive) {
|
|
2029
|
+
ret = test < length && test !== 0;
|
|
2030
|
+
}
|
|
2031
|
+
else {
|
|
2032
|
+
ret = test <= length;
|
|
2033
|
+
}
|
|
2034
|
+
return ret;
|
|
2035
|
+
};
|
|
2036
|
+
/**
|
|
2037
|
+
* @private
|
|
2038
|
+
*/
|
|
2039
|
+
Additions.lin2Val = function (val) {
|
|
2040
|
+
var axis = this;
|
|
2041
|
+
var brokenAxis = axis.brokenAxis;
|
|
2042
|
+
var breakArray = brokenAxis && brokenAxis.breakArray;
|
|
2043
|
+
if (!breakArray || !isNumber(val)) {
|
|
2044
|
+
return val;
|
|
2045
|
+
}
|
|
2046
|
+
var nval = val,
|
|
2047
|
+
brk,
|
|
2048
|
+
i;
|
|
2049
|
+
for (i = 0; i < breakArray.length; i++) {
|
|
2050
|
+
brk = breakArray[i];
|
|
2051
|
+
if (brk.from >= nval) {
|
|
2052
|
+
break;
|
|
2053
|
+
}
|
|
2054
|
+
else if (brk.to < nval) {
|
|
2055
|
+
nval += brk.len;
|
|
2056
|
+
}
|
|
2057
|
+
else if (Additions.isInBreak(brk, nval)) {
|
|
2058
|
+
nval += brk.len;
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
2061
|
+
return nval;
|
|
2062
|
+
};
|
|
2063
|
+
/**
|
|
2064
|
+
* @private
|
|
2065
|
+
*/
|
|
2066
|
+
Additions.val2Lin = function (val) {
|
|
2067
|
+
var axis = this;
|
|
2068
|
+
var brokenAxis = axis.brokenAxis;
|
|
2069
|
+
var breakArray = brokenAxis && brokenAxis.breakArray;
|
|
2070
|
+
if (!breakArray || !isNumber(val)) {
|
|
2071
|
+
return val;
|
|
2072
|
+
}
|
|
2073
|
+
var nval = val,
|
|
2074
|
+
brk,
|
|
2075
|
+
i;
|
|
2076
|
+
for (i = 0; i < breakArray.length; i++) {
|
|
2077
|
+
brk = breakArray[i];
|
|
2078
|
+
if (brk.to <= val) {
|
|
2079
|
+
nval -= brk.len;
|
|
2080
|
+
}
|
|
2081
|
+
else if (brk.from >= val) {
|
|
2082
|
+
break;
|
|
2083
|
+
}
|
|
2084
|
+
else if (Additions.isInBreak(brk, val)) {
|
|
2085
|
+
nval -= (val - brk.from);
|
|
2086
|
+
break;
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
return nval;
|
|
2090
|
+
};
|
|
2091
|
+
/* *
|
|
2092
|
+
*
|
|
2093
|
+
* Functions
|
|
2094
|
+
*
|
|
2095
|
+
* */
|
|
2096
|
+
/**
|
|
2097
|
+
* Returns the first break found where the x is larger then break.from
|
|
2098
|
+
* and smaller then break.to.
|
|
2099
|
+
*
|
|
2100
|
+
* @param {number} x
|
|
2101
|
+
* The number which should be within a break.
|
|
2102
|
+
*
|
|
2103
|
+
* @param {Array<Highcharts.XAxisBreaksOptions>} breaks
|
|
2104
|
+
* The array of breaks to search within.
|
|
2105
|
+
*
|
|
2106
|
+
* @return {Highcharts.XAxisBreaksOptions|undefined}
|
|
2107
|
+
* Returns the first break found that matches, returns false if no break
|
|
2108
|
+
* is found.
|
|
2109
|
+
*/
|
|
2110
|
+
Additions.prototype.findBreakAt = function (x, breaks) {
|
|
2111
|
+
return find(breaks, function (b) {
|
|
2112
|
+
return b.from < x && x < b.to;
|
|
2113
|
+
});
|
|
2114
|
+
};
|
|
2115
|
+
/**
|
|
2116
|
+
* @private
|
|
2117
|
+
*/
|
|
2118
|
+
Additions.prototype.isInAnyBreak = function (val, testKeep) {
|
|
2119
|
+
var brokenAxis = this,
|
|
2120
|
+
axis = brokenAxis.axis,
|
|
2121
|
+
breaks = axis.options.breaks || [];
|
|
2122
|
+
var i = breaks.length,
|
|
2123
|
+
inbrk,
|
|
2124
|
+
keep,
|
|
2125
|
+
ret;
|
|
2126
|
+
if (i && isNumber(val)) {
|
|
2127
|
+
while (i--) {
|
|
2128
|
+
if (Additions.isInBreak(breaks[i], val)) {
|
|
2129
|
+
inbrk = true;
|
|
2130
|
+
if (!keep) {
|
|
2131
|
+
keep = pick(breaks[i].showPoints, !axis.isXAxis);
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
if (inbrk && testKeep) {
|
|
2136
|
+
ret = inbrk && !keep;
|
|
2137
|
+
}
|
|
1592
2138
|
else {
|
|
1593
2139
|
ret = inbrk;
|
|
1594
2140
|
}
|
|
@@ -1894,8 +2440,18 @@
|
|
|
1894
2440
|
arr[arr.length - 1] :
|
|
1895
2441
|
(arr.hasNulls ? null : void 0);
|
|
1896
2442
|
},
|
|
1897
|
-
//
|
|
1898
|
-
// input and an array is output
|
|
2443
|
+
// HLC, OHLC and range are special cases where a multidimensional array is
|
|
2444
|
+
// input and an array is output.
|
|
2445
|
+
hlc: function (high, low, close) {
|
|
2446
|
+
high = approximations.high(high);
|
|
2447
|
+
low = approximations.low(low);
|
|
2448
|
+
close = approximations.close(close);
|
|
2449
|
+
if (isNumber(high) ||
|
|
2450
|
+
isNumber(low) ||
|
|
2451
|
+
isNumber(close)) {
|
|
2452
|
+
return [high, low, close];
|
|
2453
|
+
}
|
|
2454
|
+
},
|
|
1899
2455
|
ohlc: function (open, high, low, close) {
|
|
1900
2456
|
open = approximations.open(open);
|
|
1901
2457
|
high = approximations.high(high);
|
|
@@ -1907,7 +2463,6 @@
|
|
|
1907
2463
|
isNumber(close)) {
|
|
1908
2464
|
return [open, high, low, close];
|
|
1909
2465
|
}
|
|
1910
|
-
// else, return is undefined
|
|
1911
2466
|
},
|
|
1912
2467
|
range: function (low, high) {
|
|
1913
2468
|
low = approximations.low(low);
|
|
@@ -1921,7 +2476,7 @@
|
|
|
1921
2476
|
// else, return is undefined
|
|
1922
2477
|
}
|
|
1923
2478
|
};
|
|
1924
|
-
var applyGrouping = function () {
|
|
2479
|
+
var applyGrouping = function (hasExtemesChanged) {
|
|
1925
2480
|
var series = this,
|
|
1926
2481
|
chart = series.chart,
|
|
1927
2482
|
options = series.options,
|
|
@@ -1940,9 +2495,9 @@
|
|
|
1940
2495
|
if (groupingEnabled && !series.requireSorting) {
|
|
1941
2496
|
series.requireSorting = revertRequireSorting = true;
|
|
1942
2497
|
}
|
|
1943
|
-
// Skip if
|
|
1944
|
-
// order)
|
|
1945
|
-
skip = skipDataGrouping(series) || !groupingEnabled;
|
|
2498
|
+
// Skip if skipDataGrouping method returns false or if grouping is disabled
|
|
2499
|
+
// (in that order).
|
|
2500
|
+
skip = skipDataGrouping(series, hasExtemesChanged) === false || !groupingEnabled;
|
|
1946
2501
|
// Revert original requireSorting value if changed
|
|
1947
2502
|
if (revertRequireSorting) {
|
|
1948
2503
|
series.requireSorting = false;
|
|
@@ -2053,13 +2608,13 @@
|
|
|
2053
2608
|
(currentDataGrouping && currentDataGrouping.totalRange);
|
|
2054
2609
|
}
|
|
2055
2610
|
};
|
|
2056
|
-
var skipDataGrouping = function (series
|
|
2057
|
-
|
|
2611
|
+
var skipDataGrouping = function (series,
|
|
2612
|
+
force) {
|
|
2613
|
+
return !(series.isCartesian &&
|
|
2058
2614
|
!series.isDirty &&
|
|
2059
2615
|
!series.xAxis.isDirty &&
|
|
2060
|
-
!series.yAxis.isDirty
|
|
2061
|
-
|
|
2062
|
-
}
|
|
2616
|
+
!series.yAxis.isDirty &&
|
|
2617
|
+
!force);
|
|
2063
2618
|
};
|
|
2064
2619
|
var groupData = function (xData,
|
|
2065
2620
|
yData,
|
|
@@ -2373,7 +2928,10 @@
|
|
|
2373
2928
|
ohlc: {
|
|
2374
2929
|
groupPixelWidth: 5
|
|
2375
2930
|
},
|
|
2376
|
-
|
|
2931
|
+
hlc: {
|
|
2932
|
+
groupPixelWidth: 5
|
|
2933
|
+
// Move to HeikinAshiSeries.ts aftre refactoring data grouping.
|
|
2934
|
+
},
|
|
2377
2935
|
heikinashi: {
|
|
2378
2936
|
groupPixelWidth: 10
|
|
2379
2937
|
}
|
|
@@ -2416,6 +2974,9 @@
|
|
|
2416
2974
|
if (this.is('ohlc')) {
|
|
2417
2975
|
return 'ohlc';
|
|
2418
2976
|
}
|
|
2977
|
+
if (this.is('hlc')) {
|
|
2978
|
+
return 'hlc';
|
|
2979
|
+
}
|
|
2419
2980
|
if (this.is('column')) {
|
|
2420
2981
|
return 'sum';
|
|
2421
2982
|
}
|
|
@@ -2481,7 +3042,7 @@
|
|
|
2481
3042
|
*
|
|
2482
3043
|
* @function Highcharts.Axis#applyGrouping
|
|
2483
3044
|
*/
|
|
2484
|
-
Axis.prototype.applyGrouping = function () {
|
|
3045
|
+
Axis.prototype.applyGrouping = function (e) {
|
|
2485
3046
|
var axis = this,
|
|
2486
3047
|
series = axis.series;
|
|
2487
3048
|
series.forEach(function (series) {
|
|
@@ -2493,7 +3054,7 @@
|
|
|
2493
3054
|
}
|
|
2494
3055
|
// Fire independing on series.groupPixelWidth to always set a proper
|
|
2495
3056
|
// dataGrouping state, (#16238)
|
|
2496
|
-
series.applyGrouping();
|
|
3057
|
+
series.applyGrouping(!!e.hasExtemesChanged);
|
|
2497
3058
|
});
|
|
2498
3059
|
};
|
|
2499
3060
|
// Get the data grouping pixel width based on the greatest defined individual
|
|
@@ -2526,8 +3087,7 @@
|
|
|
2526
3087
|
// Execute grouping if the amount of points is greater than the
|
|
2527
3088
|
// limit defined in groupPixelWidth
|
|
2528
3089
|
if (series[i].groupPixelWidth ||
|
|
2529
|
-
dataLength >
|
|
2530
|
-
(this.chart.plotSizeX / groupPixelWidth) ||
|
|
3090
|
+
dataLength > (this.chart.plotSizeX / groupPixelWidth) ||
|
|
2531
3091
|
(dataLength && dgOptions.forced)) {
|
|
2532
3092
|
doGrouping = true;
|
|
2533
3093
|
}
|
|
@@ -2765,7 +3325,7 @@
|
|
|
2765
3325
|
* from the raw data.
|
|
2766
3326
|
*
|
|
2767
3327
|
* Defaults to `average` for line-type series, `sum` for columns, `range`
|
|
2768
|
-
* for range series and `ohlc` for OHLC and candlestick.
|
|
3328
|
+
* for range series, `hlc` for HLC, and `ohlc` for OHLC and candlestick.
|
|
2769
3329
|
*
|
|
2770
3330
|
* @sample {highstock} stock/plotoptions/series-datagrouping-approximation
|
|
2771
3331
|
* Approximation callback with custom data
|
|
@@ -2907,87 +3467,546 @@
|
|
|
2907
3467
|
* -`lastPoint` the last point in the group
|
|
2908
3468
|
* (e.g. points at 00:13, 00:35, 00:59 -> 00:59)
|
|
2909
3469
|
*
|
|
2910
|
-
* @sample {highstock} stock/plotoptions/series-datagrouping-first-anchor
|
|
2911
|
-
* Applying first and last anchor.
|
|
3470
|
+
* @sample {highstock} stock/plotoptions/series-datagrouping-first-anchor
|
|
3471
|
+
* Applying first and last anchor.
|
|
3472
|
+
*
|
|
3473
|
+
* @sample {highstock} stock/plotoptions/series-datagrouping-last-anchor
|
|
3474
|
+
* Applying the last anchor in the chart with live data.
|
|
3475
|
+
*
|
|
3476
|
+
* @see [dataGrouping.anchor](#plotOptions.series.dataGrouping.anchor)
|
|
3477
|
+
*
|
|
3478
|
+
* @type {Highcharts.DataGroupingAnchorExtremes}
|
|
3479
|
+
* @since 9.1.0
|
|
3480
|
+
* @default start
|
|
3481
|
+
* @apioption plotOptions.series.dataGrouping.lastAnchor
|
|
3482
|
+
*/
|
|
3483
|
+
/**
|
|
3484
|
+
* Normally, a group is indexed by the start of that group, so for example
|
|
3485
|
+
* when 30 daily values are grouped into one month, that month's x value
|
|
3486
|
+
* will be the 1st of the month. This apparently shifts the data to
|
|
3487
|
+
* the left. When the smoothed option is true, this is compensated for.
|
|
3488
|
+
* The data is shifted to the middle of the group, and min and max
|
|
3489
|
+
* values are preserved. Internally, this is used in the Navigator series.
|
|
3490
|
+
*
|
|
3491
|
+
* @type {boolean}
|
|
3492
|
+
* @default false
|
|
3493
|
+
* @deprecated
|
|
3494
|
+
* @apioption plotOptions.series.dataGrouping.smoothed
|
|
3495
|
+
*/
|
|
3496
|
+
/**
|
|
3497
|
+
* An array determining what time intervals the data is allowed to be
|
|
3498
|
+
* grouped to. Each array item is an array where the first value is
|
|
3499
|
+
* the time unit and the second value another array of allowed multiples.
|
|
3500
|
+
*
|
|
3501
|
+
* Defaults to:
|
|
3502
|
+
* ```js
|
|
3503
|
+
* units: [[
|
|
3504
|
+
* 'millisecond', // unit name
|
|
3505
|
+
* [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
|
|
3506
|
+
* ], [
|
|
3507
|
+
* 'second',
|
|
3508
|
+
* [1, 2, 5, 10, 15, 30]
|
|
3509
|
+
* ], [
|
|
3510
|
+
* 'minute',
|
|
3511
|
+
* [1, 2, 5, 10, 15, 30]
|
|
3512
|
+
* ], [
|
|
3513
|
+
* 'hour',
|
|
3514
|
+
* [1, 2, 3, 4, 6, 8, 12]
|
|
3515
|
+
* ], [
|
|
3516
|
+
* 'day',
|
|
3517
|
+
* [1]
|
|
3518
|
+
* ], [
|
|
3519
|
+
* 'week',
|
|
3520
|
+
* [1]
|
|
3521
|
+
* ], [
|
|
3522
|
+
* 'month',
|
|
3523
|
+
* [1, 3, 6]
|
|
3524
|
+
* ], [
|
|
3525
|
+
* 'year',
|
|
3526
|
+
* null
|
|
3527
|
+
* ]]
|
|
3528
|
+
* ```
|
|
3529
|
+
*
|
|
3530
|
+
* @type {Array<Array<string,(Array<number>|null)>>}
|
|
3531
|
+
* @apioption plotOptions.series.dataGrouping.units
|
|
3532
|
+
*/
|
|
3533
|
+
/**
|
|
3534
|
+
* The approximate pixel width of each group. If for example a series
|
|
3535
|
+
* with 30 points is displayed over a 600 pixel wide plot area, no grouping
|
|
3536
|
+
* is performed. If however the series contains so many points that
|
|
3537
|
+
* the spacing is less than the groupPixelWidth, Highcharts will try
|
|
3538
|
+
* to group it into appropriate groups so that each is more or less
|
|
3539
|
+
* two pixels wide. Defaults to `10`.
|
|
3540
|
+
*
|
|
3541
|
+
* @sample {highstock} stock/plotoptions/series-datagrouping-grouppixelwidth/
|
|
3542
|
+
* Two series with the same data density but different groupPixelWidth
|
|
3543
|
+
*
|
|
3544
|
+
* @type {number}
|
|
3545
|
+
* @default 10
|
|
3546
|
+
* @apioption plotOptions.column.dataGrouping.groupPixelWidth
|
|
3547
|
+
*/
|
|
3548
|
+
''; // required by JSDoc parsing
|
|
3549
|
+
|
|
3550
|
+
return dataGrouping;
|
|
3551
|
+
});
|
|
3552
|
+
_registerModule(_modules, 'Series/HLC/HLCPoint.js', [_modules['Core/Series/SeriesRegistry.js']], function (SeriesRegistry) {
|
|
3553
|
+
/* *
|
|
3554
|
+
*
|
|
3555
|
+
* (c) 2010-2021 Pawel Lysy
|
|
3556
|
+
*
|
|
3557
|
+
* License: www.highcharts.com/license
|
|
3558
|
+
*
|
|
3559
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
3560
|
+
*
|
|
3561
|
+
* */
|
|
3562
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3563
|
+
var extendStatics = function (d,
|
|
3564
|
+
b) {
|
|
3565
|
+
extendStatics = Object.setPrototypeOf ||
|
|
3566
|
+
({ __proto__: [] } instanceof Array && function (d,
|
|
3567
|
+
b) { d.__proto__ = b; }) ||
|
|
3568
|
+
function (d,
|
|
3569
|
+
b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
3570
|
+
return extendStatics(d, b);
|
|
3571
|
+
};
|
|
3572
|
+
return function (d, b) {
|
|
3573
|
+
extendStatics(d, b);
|
|
3574
|
+
function __() { this.constructor = d; }
|
|
3575
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3576
|
+
};
|
|
3577
|
+
})();
|
|
3578
|
+
var ColumnSeries = SeriesRegistry.seriesTypes.column;
|
|
3579
|
+
/* *
|
|
3580
|
+
*
|
|
3581
|
+
* Class
|
|
3582
|
+
*
|
|
3583
|
+
* */
|
|
3584
|
+
var HLCPoint = /** @class */ (function (_super) {
|
|
3585
|
+
__extends(HLCPoint, _super);
|
|
3586
|
+
function HLCPoint() {
|
|
3587
|
+
/* *
|
|
3588
|
+
*
|
|
3589
|
+
* Properties
|
|
3590
|
+
*
|
|
3591
|
+
* */
|
|
3592
|
+
var _this = _super !== null && _super.apply(this,
|
|
3593
|
+
arguments) || this;
|
|
3594
|
+
_this.close = void 0;
|
|
3595
|
+
_this.high = void 0;
|
|
3596
|
+
_this.low = void 0;
|
|
3597
|
+
_this.options = void 0;
|
|
3598
|
+
_this.plotClose = void 0;
|
|
3599
|
+
_this.series = void 0;
|
|
3600
|
+
return _this;
|
|
3601
|
+
}
|
|
3602
|
+
return HLCPoint;
|
|
3603
|
+
}(ColumnSeries.prototype.pointClass));
|
|
3604
|
+
/* *
|
|
3605
|
+
*
|
|
3606
|
+
* Default Export
|
|
3607
|
+
*
|
|
3608
|
+
* */
|
|
3609
|
+
|
|
3610
|
+
return HLCPoint;
|
|
3611
|
+
});
|
|
3612
|
+
_registerModule(_modules, 'Series/HLC/HLCSeries.js', [_modules['Series/HLC/HLCPoint.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (HLCPoint, SeriesRegistry, U) {
|
|
3613
|
+
/* *
|
|
3614
|
+
*
|
|
3615
|
+
* (c) 2010-2021 Pawel Lysy
|
|
3616
|
+
*
|
|
3617
|
+
* License: www.highcharts.com/license
|
|
3618
|
+
*
|
|
3619
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
3620
|
+
*
|
|
3621
|
+
* */
|
|
3622
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3623
|
+
var extendStatics = function (d,
|
|
3624
|
+
b) {
|
|
3625
|
+
extendStatics = Object.setPrototypeOf ||
|
|
3626
|
+
({ __proto__: [] } instanceof Array && function (d,
|
|
3627
|
+
b) { d.__proto__ = b; }) ||
|
|
3628
|
+
function (d,
|
|
3629
|
+
b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
3630
|
+
return extendStatics(d, b);
|
|
3631
|
+
};
|
|
3632
|
+
return function (d, b) {
|
|
3633
|
+
extendStatics(d, b);
|
|
3634
|
+
function __() { this.constructor = d; }
|
|
3635
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3636
|
+
};
|
|
3637
|
+
})();
|
|
3638
|
+
var ColumnSeries = SeriesRegistry.seriesTypes.column;
|
|
3639
|
+
var extend = U.extend,
|
|
3640
|
+
merge = U.merge;
|
|
3641
|
+
/* *
|
|
3642
|
+
*
|
|
3643
|
+
* Class
|
|
3644
|
+
*
|
|
3645
|
+
* */
|
|
3646
|
+
/**
|
|
3647
|
+
* The hlc series type.
|
|
3648
|
+
*
|
|
3649
|
+
* @private
|
|
3650
|
+
* @class
|
|
3651
|
+
* @name Highcharts.seriesTypes.hlc
|
|
3652
|
+
*
|
|
3653
|
+
* @augments Highcharts.Series
|
|
3654
|
+
*/
|
|
3655
|
+
var HLCSeries = /** @class */ (function (_super) {
|
|
3656
|
+
__extends(HLCSeries, _super);
|
|
3657
|
+
function HLCSeries() {
|
|
3658
|
+
/* *
|
|
3659
|
+
*
|
|
3660
|
+
* Static Properties
|
|
3661
|
+
*
|
|
3662
|
+
* */
|
|
3663
|
+
var _this = _super !== null && _super.apply(this,
|
|
3664
|
+
arguments) || this;
|
|
3665
|
+
/* *
|
|
3666
|
+
*
|
|
3667
|
+
* Properties
|
|
3668
|
+
*
|
|
3669
|
+
* */
|
|
3670
|
+
_this.data = void 0;
|
|
3671
|
+
_this.options = void 0;
|
|
3672
|
+
_this.points = void 0;
|
|
3673
|
+
_this.yData = void 0;
|
|
3674
|
+
return _this;
|
|
3675
|
+
/* eslint-enable valid-jsdoc */
|
|
3676
|
+
}
|
|
3677
|
+
/* *
|
|
3678
|
+
*
|
|
3679
|
+
* Functions
|
|
3680
|
+
*
|
|
3681
|
+
* */
|
|
3682
|
+
/* eslint-disable valid-jsdoc */
|
|
3683
|
+
/**
|
|
3684
|
+
* Extend the path if close is not between high and low.
|
|
3685
|
+
*
|
|
3686
|
+
* @param {SVGPath} path the path array of the point
|
|
3687
|
+
* @param {number} halfStrokeWidth
|
|
3688
|
+
* @param {number} value value of the point to which the stem should be extended
|
|
3689
|
+
*/
|
|
3690
|
+
HLCSeries.prototype.extendStem = function (path, halfStrokeWidth, value) {
|
|
3691
|
+
var start = path[0];
|
|
3692
|
+
var end = path[1];
|
|
3693
|
+
// We don't need to worry about crisp - close value
|
|
3694
|
+
// is already crisped and halfStrokeWidth should remove it.
|
|
3695
|
+
if (typeof start[2] === 'number') {
|
|
3696
|
+
start[2] = Math.max(value + halfStrokeWidth, start[2]);
|
|
3697
|
+
}
|
|
3698
|
+
if (typeof end[2] === 'number') {
|
|
3699
|
+
end[2] = Math.min(value - halfStrokeWidth, end[2]);
|
|
3700
|
+
}
|
|
3701
|
+
};
|
|
3702
|
+
/**
|
|
3703
|
+
* Function to create SVGPath of the point based on the
|
|
3704
|
+
* plot positions of this point.
|
|
3705
|
+
*
|
|
3706
|
+
* @param {SVGPath} point
|
|
3707
|
+
* @param {SVGElement} graphic
|
|
3708
|
+
* @returns {SVGPath}
|
|
3709
|
+
*/
|
|
3710
|
+
HLCSeries.prototype.getPointPath = function (point, graphic) {
|
|
3711
|
+
// crisp vector coordinates
|
|
3712
|
+
var strokeWidth = graphic.strokeWidth(),
|
|
3713
|
+
series = point.series,
|
|
3714
|
+
crispCorr = (strokeWidth % 2) / 2,
|
|
3715
|
+
// #2596:
|
|
3716
|
+
crispX = Math.round(point.plotX) - crispCorr,
|
|
3717
|
+
halfWidth = Math.round(point.shapeArgs.width / 2);
|
|
3718
|
+
var path,
|
|
3719
|
+
plotClose = point.plotClose;
|
|
3720
|
+
// the vertical stem
|
|
3721
|
+
path = [
|
|
3722
|
+
['M', crispX, Math.round(point.yBottom)],
|
|
3723
|
+
['L', crispX, Math.round(point.plotHigh)]
|
|
3724
|
+
];
|
|
3725
|
+
// close
|
|
3726
|
+
if (point.close !== null) {
|
|
3727
|
+
plotClose = Math.round(point.plotClose) + crispCorr;
|
|
3728
|
+
path.push(['M', crispX, plotClose], ['L', crispX + halfWidth, plotClose]);
|
|
3729
|
+
series.extendStem(path, strokeWidth / 2, plotClose);
|
|
3730
|
+
}
|
|
3731
|
+
return path;
|
|
3732
|
+
};
|
|
3733
|
+
/**
|
|
3734
|
+
* Draw single point
|
|
3735
|
+
* @private
|
|
3736
|
+
*/
|
|
3737
|
+
HLCSeries.prototype.drawSinglePoint = function (point) {
|
|
3738
|
+
var series = point.series,
|
|
3739
|
+
chart = series.chart;
|
|
3740
|
+
var path,
|
|
3741
|
+
graphic = point.graphic,
|
|
3742
|
+
isNew = !graphic;
|
|
3743
|
+
if (typeof point.plotY !== 'undefined') {
|
|
3744
|
+
// Create and/or update the graphic
|
|
3745
|
+
if (!graphic) {
|
|
3746
|
+
point.graphic = graphic = chart.renderer.path()
|
|
3747
|
+
.add(series.group);
|
|
3748
|
+
}
|
|
3749
|
+
if (!chart.styledMode) {
|
|
3750
|
+
graphic.attr(series.pointAttribs(point, (point.selected && 'select'))); // #3897
|
|
3751
|
+
}
|
|
3752
|
+
// crisp vector coordinates
|
|
3753
|
+
path = series.getPointPath(point, graphic);
|
|
3754
|
+
graphic[isNew ? 'attr' : 'animate']({ d: path })
|
|
3755
|
+
.addClass(point.getClassName(), true);
|
|
3756
|
+
}
|
|
3757
|
+
};
|
|
3758
|
+
/**
|
|
3759
|
+
* Draw the data points
|
|
3760
|
+
* @private
|
|
3761
|
+
*/
|
|
3762
|
+
HLCSeries.prototype.drawPoints = function () {
|
|
3763
|
+
this.points.forEach(this.drawSinglePoint);
|
|
3764
|
+
};
|
|
3765
|
+
/**
|
|
3766
|
+
* @private
|
|
3767
|
+
* @function Highcharts.seriesTypes.hlc#init
|
|
3768
|
+
* @return {void}
|
|
3769
|
+
*/
|
|
3770
|
+
HLCSeries.prototype.init = function () {
|
|
3771
|
+
_super.prototype.init.apply(this, arguments);
|
|
3772
|
+
this.options.stacking = void 0; // #8817
|
|
3773
|
+
};
|
|
3774
|
+
/**
|
|
3775
|
+
* Postprocess mapping between options and SVG attributes
|
|
3776
|
+
* @private
|
|
3777
|
+
*/
|
|
3778
|
+
HLCSeries.prototype.pointAttribs = function (point, state) {
|
|
3779
|
+
var attribs = _super.prototype.pointAttribs.call(this,
|
|
3780
|
+
point,
|
|
3781
|
+
state);
|
|
3782
|
+
delete attribs.fill;
|
|
3783
|
+
return attribs;
|
|
3784
|
+
};
|
|
3785
|
+
HLCSeries.prototype.toYData = function (point) {
|
|
3786
|
+
// return a plain array for speedy calculation
|
|
3787
|
+
return [point.high, point.low, point.close];
|
|
3788
|
+
};
|
|
3789
|
+
/**
|
|
3790
|
+
* Translate data points from raw values x and y to plotX and plotY
|
|
3791
|
+
*
|
|
3792
|
+
* @private
|
|
3793
|
+
* @function Highcharts.seriesTypes.hlc#translate
|
|
3794
|
+
* @return {void}
|
|
3795
|
+
*/
|
|
3796
|
+
HLCSeries.prototype.translate = function () {
|
|
3797
|
+
var series = this,
|
|
3798
|
+
yAxis = series.yAxis,
|
|
3799
|
+
names = (this.pointArrayMap && this.pointArrayMap.slice()) || [],
|
|
3800
|
+
translated = names.map(function (name) {
|
|
3801
|
+
return "plot" + (name.charAt(0).toUpperCase() + name.slice(1));
|
|
3802
|
+
});
|
|
3803
|
+
translated.push('yBottom');
|
|
3804
|
+
names.push('low');
|
|
3805
|
+
_super.prototype.translate.apply(series);
|
|
3806
|
+
// Do the translation
|
|
3807
|
+
series.points.forEach(function (point) {
|
|
3808
|
+
names.forEach(function (name, i) {
|
|
3809
|
+
var value = point[name];
|
|
3810
|
+
if (value !== null) {
|
|
3811
|
+
if (series.dataModify) {
|
|
3812
|
+
value = series.dataModify.modifyValue(value);
|
|
3813
|
+
}
|
|
3814
|
+
point[translated[i]] =
|
|
3815
|
+
yAxis.toPixels(value, true);
|
|
3816
|
+
}
|
|
3817
|
+
});
|
|
3818
|
+
// Align the tooltip to the high value to avoid covering the
|
|
3819
|
+
// point
|
|
3820
|
+
point.tooltipPos[1] =
|
|
3821
|
+
point.plotHigh + yAxis.pos - series.chart.plotTop;
|
|
3822
|
+
});
|
|
3823
|
+
};
|
|
3824
|
+
/**
|
|
3825
|
+
* An HLC chart is a style of financial chart used to describe price
|
|
3826
|
+
* movements over time. It displays high, low and close values per
|
|
3827
|
+
* data point.
|
|
3828
|
+
*
|
|
3829
|
+
* @sample stock/demo/hlc/
|
|
3830
|
+
* HLC chart
|
|
3831
|
+
*
|
|
3832
|
+
* @extends plotOptions.column
|
|
3833
|
+
* @excluding borderColor, borderRadius, borderWidth, crisp, stacking,
|
|
3834
|
+
* stack
|
|
3835
|
+
* @product highstock
|
|
3836
|
+
* @optionparent plotOptions.hlc
|
|
3837
|
+
*/
|
|
3838
|
+
HLCSeries.defaultOptions = merge(ColumnSeries.defaultOptions, {
|
|
3839
|
+
/**
|
|
3840
|
+
* The approximate pixel width of each group. If for example a series
|
|
3841
|
+
* with 30 points is displayed over a 600 pixel wide plot area, no
|
|
3842
|
+
* grouping is performed. If however the series contains so many points
|
|
3843
|
+
* that the spacing is less than the groupPixelWidth, Highcharts will
|
|
3844
|
+
* try to group it into appropriate groups so that each is more or less
|
|
3845
|
+
* two pixels wide. Defaults to `5`.
|
|
3846
|
+
*
|
|
3847
|
+
* @type {number}
|
|
3848
|
+
* @default 5
|
|
3849
|
+
* @product highstock
|
|
3850
|
+
* @apioption plotOptions.hlc.dataGrouping.groupPixelWidth
|
|
3851
|
+
*/
|
|
3852
|
+
/**
|
|
3853
|
+
* @type {Highcharts.DataGroupingApproximationValue|Function}
|
|
3854
|
+
* @default hlc
|
|
3855
|
+
* @product highstock
|
|
3856
|
+
* @apioption plotOptions.hlc.dataGrouping.approximation
|
|
3857
|
+
*/
|
|
3858
|
+
/**
|
|
3859
|
+
* @default close
|
|
3860
|
+
* @apioption plotOptions.hlc.colorKey
|
|
3861
|
+
*/
|
|
3862
|
+
/**
|
|
3863
|
+
* The pixel width of the line/border. Defaults to `1`.
|
|
3864
|
+
*
|
|
3865
|
+
* @sample {highstock} stock/plotoptions/hlc-linewidth/
|
|
3866
|
+
* A greater line width
|
|
3867
|
+
*
|
|
3868
|
+
* @type {number}
|
|
3869
|
+
* @default 1
|
|
3870
|
+
* @product highstock
|
|
3871
|
+
*
|
|
3872
|
+
* @public
|
|
3873
|
+
*/
|
|
3874
|
+
lineWidth: 1,
|
|
3875
|
+
tooltip: {
|
|
3876
|
+
pointFormat: '<span style="color:{point.color}">\u25CF</span> ' +
|
|
3877
|
+
'<b> {series.name}</b><br/>' +
|
|
3878
|
+
'High: {point.high}<br/>' +
|
|
3879
|
+
'Low: {point.low}<br/>' +
|
|
3880
|
+
'Close: {point.close}<br/>'
|
|
3881
|
+
},
|
|
3882
|
+
threshold: null,
|
|
3883
|
+
states: {
|
|
3884
|
+
/**
|
|
3885
|
+
* @extends plotOptions.column.states.hover
|
|
3886
|
+
* @product highstock
|
|
3887
|
+
*/
|
|
3888
|
+
hover: {
|
|
3889
|
+
/**
|
|
3890
|
+
* The pixel width of the line representing the HLC point.
|
|
3891
|
+
*
|
|
3892
|
+
* @type {number}
|
|
3893
|
+
* @default 3
|
|
3894
|
+
* @product highstock
|
|
3895
|
+
*/
|
|
3896
|
+
lineWidth: 3
|
|
3897
|
+
}
|
|
3898
|
+
},
|
|
3899
|
+
/**
|
|
3900
|
+
* Determines which one of `high`, `low`, `close` values should
|
|
3901
|
+
* be represented as `point.y`, which is later used to set dataLabel
|
|
3902
|
+
* position and [compare](#plotOptions.series.compare).
|
|
3903
|
+
*
|
|
3904
|
+
* @sample {highstock} stock/plotoptions/hlc-pointvalkey/
|
|
3905
|
+
* Possible values
|
|
3906
|
+
*
|
|
3907
|
+
* @type {string}
|
|
3908
|
+
* @default close
|
|
3909
|
+
* @validvalue ["high", "low", "close"]
|
|
3910
|
+
* @product highstock
|
|
3911
|
+
* @apioption plotOptions.hlc.pointValKey
|
|
3912
|
+
*/
|
|
3913
|
+
/**
|
|
3914
|
+
* @default close
|
|
3915
|
+
* @apioption plotOptions.hlc.colorKey
|
|
3916
|
+
*/
|
|
3917
|
+
stickyTracking: true
|
|
3918
|
+
});
|
|
3919
|
+
return HLCSeries;
|
|
3920
|
+
}(ColumnSeries));
|
|
3921
|
+
extend(HLCSeries.prototype, {
|
|
3922
|
+
animate: null,
|
|
3923
|
+
directTouch: false,
|
|
3924
|
+
pointArrayMap: ['high', 'low', 'close'],
|
|
3925
|
+
pointAttrToOptions: {
|
|
3926
|
+
stroke: 'color',
|
|
3927
|
+
'stroke-width': 'lineWidth'
|
|
3928
|
+
},
|
|
3929
|
+
pointValKey: 'close'
|
|
3930
|
+
});
|
|
3931
|
+
HLCSeries.prototype.pointClass = HLCPoint;
|
|
3932
|
+
SeriesRegistry.registerSeriesType('hlc', HLCSeries);
|
|
3933
|
+
/* *
|
|
3934
|
+
*
|
|
3935
|
+
* Default Export
|
|
2912
3936
|
*
|
|
2913
|
-
*
|
|
2914
|
-
|
|
3937
|
+
* */
|
|
3938
|
+
/* *
|
|
2915
3939
|
*
|
|
2916
|
-
*
|
|
3940
|
+
* API Options
|
|
2917
3941
|
*
|
|
2918
|
-
*
|
|
2919
|
-
* @since 9.1.0
|
|
2920
|
-
* @default start
|
|
2921
|
-
* @apioption plotOptions.series.dataGrouping.lastAnchor
|
|
2922
|
-
*/
|
|
3942
|
+
* */
|
|
2923
3943
|
/**
|
|
2924
|
-
*
|
|
2925
|
-
*
|
|
2926
|
-
* will be the 1st of the month. This apparently shifts the data to
|
|
2927
|
-
* the left. When the smoothed option is true, this is compensated for.
|
|
2928
|
-
* The data is shifted to the middle of the group, and min and max
|
|
2929
|
-
* values are preserved. Internally, this is used in the Navigator series.
|
|
3944
|
+
* A `hlc` series. If the [type](#series.hlc.type) option is not
|
|
3945
|
+
* specified, it is inherited from [chart.type](#chart.type).
|
|
2930
3946
|
*
|
|
2931
|
-
* @
|
|
2932
|
-
* @
|
|
2933
|
-
* @
|
|
2934
|
-
* @apioption
|
|
3947
|
+
* @extends series,plotOptions.hlc
|
|
3948
|
+
* @excluding dataParser, dataURL
|
|
3949
|
+
* @product highstock
|
|
3950
|
+
* @apioption series.hlc
|
|
2935
3951
|
*/
|
|
2936
3952
|
/**
|
|
2937
|
-
* An array
|
|
2938
|
-
*
|
|
2939
|
-
* the time unit and the second value another array of allowed multiples.
|
|
3953
|
+
* An array of data points for the series. For the `hlc` series type,
|
|
3954
|
+
* points can be given in the following ways:
|
|
2940
3955
|
*
|
|
2941
|
-
*
|
|
2942
|
-
*
|
|
2943
|
-
*
|
|
2944
|
-
*
|
|
2945
|
-
*
|
|
2946
|
-
*
|
|
2947
|
-
*
|
|
2948
|
-
*
|
|
2949
|
-
*
|
|
2950
|
-
*
|
|
2951
|
-
*
|
|
2952
|
-
*
|
|
2953
|
-
*
|
|
2954
|
-
*
|
|
2955
|
-
* ], [
|
|
2956
|
-
* 'day',
|
|
2957
|
-
* [1]
|
|
2958
|
-
* ], [
|
|
2959
|
-
* 'week',
|
|
2960
|
-
* [1]
|
|
2961
|
-
* ], [
|
|
2962
|
-
* 'month',
|
|
2963
|
-
* [1, 3, 6]
|
|
2964
|
-
* ], [
|
|
2965
|
-
* 'year',
|
|
2966
|
-
* null
|
|
2967
|
-
* ]]
|
|
2968
|
-
* ```
|
|
3956
|
+
* 1. An array of arrays with 4 or 3 values. In this case, the values correspond
|
|
3957
|
+
* to `x,high,low,close`. If the first value is a string, it is applied
|
|
3958
|
+
* as the name of the point, and the `x` value is inferred. The `x` value can
|
|
3959
|
+
* also be omitted, in which case the inner arrays should be of length of 3\.
|
|
3960
|
+
* Then the `x` value is automatically calculated, either starting at 0 and
|
|
3961
|
+
* incremented by 1, or from `pointStart` and `pointInterval` given in the
|
|
3962
|
+
* series options.
|
|
3963
|
+
* ```js
|
|
3964
|
+
* data: [
|
|
3965
|
+
* [0, 5, 6, 7],
|
|
3966
|
+
* [1, 4, 8, 2],
|
|
3967
|
+
* [2, 3, 4, 10]
|
|
3968
|
+
* ]
|
|
3969
|
+
* ```
|
|
2969
3970
|
*
|
|
2970
|
-
*
|
|
2971
|
-
*
|
|
3971
|
+
* 2. An array of objects with named values. The following snippet shows only a
|
|
3972
|
+
* few settings, see the complete options set below. If the total number of
|
|
3973
|
+
* data points exceeds the series'
|
|
3974
|
+
* [turboThreshold](#series.hlc.turboThreshold), this option is not
|
|
3975
|
+
* available.
|
|
3976
|
+
* ```js
|
|
3977
|
+
* data: [{
|
|
3978
|
+
* x: 1,
|
|
3979
|
+
* high: 4,
|
|
3980
|
+
* low: 5,
|
|
3981
|
+
* close: 2,
|
|
3982
|
+
* name: "Point2",
|
|
3983
|
+
* color: "#00FF00"
|
|
3984
|
+
* }, {
|
|
3985
|
+
* x: 1,
|
|
3986
|
+
* high: 3,
|
|
3987
|
+
* low: 6,
|
|
3988
|
+
* close: 7,
|
|
3989
|
+
* name: "Point1",
|
|
3990
|
+
* color: "#FF00FF"
|
|
3991
|
+
* }]
|
|
3992
|
+
* ```
|
|
3993
|
+
*
|
|
3994
|
+
* @type {Array<Array<(number|string),number,number>|Array<(number|string),number,number,number>|*>}
|
|
3995
|
+
* @extends series.arearange.data
|
|
3996
|
+
* @excluding y, marker
|
|
3997
|
+
* @product highstock
|
|
3998
|
+
* @apioption series.hlc.data
|
|
2972
3999
|
*/
|
|
2973
4000
|
/**
|
|
2974
|
-
* The
|
|
2975
|
-
* with 30 points is displayed over a 600 pixel wide plot area, no grouping
|
|
2976
|
-
* is performed. If however the series contains so many points that
|
|
2977
|
-
* the spacing is less than the groupPixelWidth, Highcharts will try
|
|
2978
|
-
* to group it into appropriate groups so that each is more or less
|
|
2979
|
-
* two pixels wide. Defaults to `10`.
|
|
2980
|
-
*
|
|
2981
|
-
* @sample {highstock} stock/plotoptions/series-datagrouping-grouppixelwidth/
|
|
2982
|
-
* Two series with the same data density but different groupPixelWidth
|
|
4001
|
+
* The closing value of each data point.
|
|
2983
4002
|
*
|
|
2984
4003
|
* @type {number}
|
|
2985
|
-
* @
|
|
2986
|
-
* @apioption
|
|
4004
|
+
* @product highstock
|
|
4005
|
+
* @apioption series.hlc.data.close
|
|
2987
4006
|
*/
|
|
2988
|
-
''; //
|
|
4007
|
+
''; // adds doclets above to transpilat
|
|
2989
4008
|
|
|
2990
|
-
return
|
|
4009
|
+
return HLCSeries;
|
|
2991
4010
|
});
|
|
2992
4011
|
_registerModule(_modules, 'Series/OHLC/OHLCPoint.js', [_modules['Core/Series/SeriesRegistry.js']], function (SeriesRegistry) {
|
|
2993
4012
|
/* *
|
|
@@ -3015,7 +4034,7 @@
|
|
|
3015
4034
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3016
4035
|
};
|
|
3017
4036
|
})();
|
|
3018
|
-
var
|
|
4037
|
+
var HLCSeries = SeriesRegistry.seriesTypes.hlc;
|
|
3019
4038
|
/* *
|
|
3020
4039
|
*
|
|
3021
4040
|
* Class
|
|
@@ -3031,12 +4050,8 @@
|
|
|
3031
4050
|
* */
|
|
3032
4051
|
var _this = _super !== null && _super.apply(this,
|
|
3033
4052
|
arguments) || this;
|
|
3034
|
-
_this.close = void 0;
|
|
3035
|
-
_this.high = void 0;
|
|
3036
|
-
_this.low = void 0;
|
|
3037
4053
|
_this.open = void 0;
|
|
3038
4054
|
_this.options = void 0;
|
|
3039
|
-
_this.plotClose = void 0;
|
|
3040
4055
|
_this.plotOpen = void 0;
|
|
3041
4056
|
_this.series = void 0;
|
|
3042
4057
|
return _this;
|
|
@@ -3106,7 +4121,7 @@
|
|
|
3106
4121
|
return this;
|
|
3107
4122
|
};
|
|
3108
4123
|
return OHLCPoint;
|
|
3109
|
-
}(
|
|
4124
|
+
}(HLCSeries.prototype.pointClass));
|
|
3110
4125
|
/* *
|
|
3111
4126
|
*
|
|
3112
4127
|
* Default Export
|
|
@@ -3141,14 +4156,11 @@
|
|
|
3141
4156
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3142
4157
|
};
|
|
3143
4158
|
})();
|
|
3144
|
-
var
|
|
3145
|
-
|
|
4159
|
+
var Series = SeriesRegistry.series,
|
|
4160
|
+
HLCSeries = SeriesRegistry.seriesTypes.hlc;
|
|
4161
|
+
var addEvent = U.addEvent,
|
|
4162
|
+
extend = U.extend,
|
|
3146
4163
|
merge = U.merge;
|
|
3147
|
-
/* *
|
|
3148
|
-
*
|
|
3149
|
-
* Class
|
|
3150
|
-
*
|
|
3151
|
-
* */
|
|
3152
4164
|
/**
|
|
3153
4165
|
* The ohlc series type.
|
|
3154
4166
|
*
|
|
@@ -3176,97 +4188,31 @@
|
|
|
3176
4188
|
_this.data = void 0;
|
|
3177
4189
|
_this.options = void 0;
|
|
3178
4190
|
_this.points = void 0;
|
|
3179
|
-
_this.yData = void 0;
|
|
3180
4191
|
return _this;
|
|
3181
|
-
/* eslint-enable valid-jsdoc */
|
|
3182
4192
|
}
|
|
3183
4193
|
/* *
|
|
3184
4194
|
*
|
|
3185
4195
|
* Functions
|
|
3186
4196
|
*
|
|
3187
4197
|
* */
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
var end = path[1];
|
|
3205
|
-
// We don't need to worry about crisp - openOrClose value
|
|
3206
|
-
// is already crisped and halfStrokeWidth should remove it.
|
|
3207
|
-
if (typeof start[2] === 'number') {
|
|
3208
|
-
start[2] = Math.max(openOrClose + halfStrokeWidth, start[2]);
|
|
3209
|
-
}
|
|
3210
|
-
if (typeof end[2] === 'number') {
|
|
3211
|
-
end[2] = Math.min(openOrClose - halfStrokeWidth, end[2]);
|
|
3212
|
-
}
|
|
3213
|
-
};
|
|
3214
|
-
points.forEach(function (point) {
|
|
3215
|
-
var plotOpen,
|
|
3216
|
-
plotClose,
|
|
3217
|
-
crispCorr,
|
|
3218
|
-
halfWidth,
|
|
3219
|
-
path,
|
|
3220
|
-
graphic = point.graphic,
|
|
3221
|
-
crispX,
|
|
3222
|
-
isNew = !graphic,
|
|
3223
|
-
strokeWidth;
|
|
3224
|
-
if (typeof point.plotY !== 'undefined') {
|
|
3225
|
-
// Create and/or update the graphic
|
|
3226
|
-
if (!graphic) {
|
|
3227
|
-
point.graphic = graphic = chart.renderer.path()
|
|
3228
|
-
.add(series.group);
|
|
3229
|
-
}
|
|
3230
|
-
if (!chart.styledMode) {
|
|
3231
|
-
graphic.attr(series.pointAttribs(point, (point.selected && 'select'))); // #3897
|
|
3232
|
-
}
|
|
3233
|
-
// crisp vector coordinates
|
|
3234
|
-
strokeWidth = graphic.strokeWidth();
|
|
3235
|
-
crispCorr = (strokeWidth % 2) / 2;
|
|
3236
|
-
// #2596:
|
|
3237
|
-
crispX = Math.round(point.plotX) - crispCorr;
|
|
3238
|
-
halfWidth = Math.round(point.shapeArgs.width / 2);
|
|
3239
|
-
// the vertical stem
|
|
3240
|
-
path = [
|
|
3241
|
-
['M', crispX, Math.round(point.yBottom)],
|
|
3242
|
-
['L', crispX, Math.round(point.plotHigh)]
|
|
3243
|
-
];
|
|
3244
|
-
// open
|
|
3245
|
-
if (point.open !== null) {
|
|
3246
|
-
plotOpen = Math.round(point.plotOpen) + crispCorr;
|
|
3247
|
-
path.push(['M', crispX, plotOpen], ['L', crispX - halfWidth, plotOpen]);
|
|
3248
|
-
extendStem(path, strokeWidth / 2, plotOpen);
|
|
3249
|
-
}
|
|
3250
|
-
// close
|
|
3251
|
-
if (point.close !== null) {
|
|
3252
|
-
plotClose = Math.round(point.plotClose) + crispCorr;
|
|
3253
|
-
path.push(['M', crispX, plotClose], ['L', crispX + halfWidth, plotClose]);
|
|
3254
|
-
extendStem(path, strokeWidth / 2, plotClose);
|
|
3255
|
-
}
|
|
3256
|
-
graphic[isNew ? 'attr' : 'animate']({ d: path })
|
|
3257
|
-
.addClass(point.getClassName(), true);
|
|
3258
|
-
}
|
|
3259
|
-
});
|
|
3260
|
-
};
|
|
3261
|
-
/**
|
|
3262
|
-
* @private
|
|
3263
|
-
* @function Highcarts.seriesTypes.ohlc#init
|
|
3264
|
-
* @return {void}
|
|
3265
|
-
*/
|
|
3266
|
-
OHLCSeries.prototype.init = function () {
|
|
3267
|
-
_super.prototype.init.apply(this, arguments);
|
|
3268
|
-
this.options.stacking = void 0; // #8817
|
|
4198
|
+
OHLCSeries.prototype.getPointPath = function (point, graphic) {
|
|
4199
|
+
var path = _super.prototype.getPointPath.call(this,
|
|
4200
|
+
point,
|
|
4201
|
+
graphic),
|
|
4202
|
+
strokeWidth = graphic.strokeWidth(),
|
|
4203
|
+
crispCorr = (strokeWidth % 2) / 2,
|
|
4204
|
+
crispX = Math.round(point.plotX) - crispCorr,
|
|
4205
|
+
halfWidth = Math.round(point.shapeArgs.width / 2);
|
|
4206
|
+
var plotOpen = point.plotOpen;
|
|
4207
|
+
// crisp vector coordinates
|
|
4208
|
+
if (point.open !== null) {
|
|
4209
|
+
plotOpen = Math.round(point.plotOpen) + crispCorr;
|
|
4210
|
+
path.push(['M', crispX, plotOpen], ['L', crispX - halfWidth, plotOpen]);
|
|
4211
|
+
_super.prototype.extendStem.call(this, path, strokeWidth / 2, plotOpen);
|
|
4212
|
+
}
|
|
4213
|
+
return path;
|
|
3269
4214
|
};
|
|
4215
|
+
/* eslint-disable valid-jsdoc */
|
|
3270
4216
|
/**
|
|
3271
4217
|
* Postprocess mapping between options and SVG attributes
|
|
3272
4218
|
* @private
|
|
@@ -3288,43 +4234,6 @@
|
|
|
3288
4234
|
// return a plain array for speedy calculation
|
|
3289
4235
|
return [point.open, point.high, point.low, point.close];
|
|
3290
4236
|
};
|
|
3291
|
-
/**
|
|
3292
|
-
* Translate data points from raw values x and y to plotX and plotY
|
|
3293
|
-
*
|
|
3294
|
-
* @private
|
|
3295
|
-
* @function Highcharts.seriesTypes.ohlc#translate
|
|
3296
|
-
* @return {void}
|
|
3297
|
-
*/
|
|
3298
|
-
OHLCSeries.prototype.translate = function () {
|
|
3299
|
-
var series = this,
|
|
3300
|
-
yAxis = series.yAxis,
|
|
3301
|
-
hasModifyValue = !!series.modifyValue,
|
|
3302
|
-
translated = [
|
|
3303
|
-
'plotOpen',
|
|
3304
|
-
'plotHigh',
|
|
3305
|
-
'plotLow',
|
|
3306
|
-
'plotClose',
|
|
3307
|
-
'yBottom'
|
|
3308
|
-
]; // translate OHLC for
|
|
3309
|
-
_super.prototype.translate.apply(series);
|
|
3310
|
-
// Do the translation
|
|
3311
|
-
series.points.forEach(function (point) {
|
|
3312
|
-
[point.open, point.high, point.low, point.close, point.low]
|
|
3313
|
-
.forEach(function (value, i) {
|
|
3314
|
-
if (value !== null) {
|
|
3315
|
-
if (hasModifyValue) {
|
|
3316
|
-
value = series.modifyValue(value);
|
|
3317
|
-
}
|
|
3318
|
-
point[translated[i]] =
|
|
3319
|
-
yAxis.toPixels(value, true);
|
|
3320
|
-
}
|
|
3321
|
-
});
|
|
3322
|
-
// Align the tooltip to the high value to avoid covering the
|
|
3323
|
-
// point
|
|
3324
|
-
point.tooltipPos[1] =
|
|
3325
|
-
point.plotHigh + yAxis.pos - series.chart.plotTop;
|
|
3326
|
-
});
|
|
3327
|
-
};
|
|
3328
4237
|
/**
|
|
3329
4238
|
* An OHLC chart is a style of financial chart used to describe price
|
|
3330
4239
|
* movements over time. It displays open, high, low and close values per
|
|
@@ -3333,82 +4242,46 @@
|
|
|
3333
4242
|
* @sample stock/demo/ohlc/
|
|
3334
4243
|
* OHLC chart
|
|
3335
4244
|
*
|
|
3336
|
-
* @extends plotOptions.
|
|
3337
|
-
* @excluding borderColor, borderRadius, borderWidth, crisp, stacking,
|
|
3338
|
-
* stack
|
|
4245
|
+
* @extends plotOptions.ohlc
|
|
3339
4246
|
* @product highstock
|
|
3340
4247
|
* @optionparent plotOptions.ohlc
|
|
3341
4248
|
*/
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
* @apioption plotOptions.ohlc.dataGrouping.groupPixelWidth
|
|
3355
|
-
*/
|
|
4249
|
+
/**
|
|
4250
|
+
* The parameter allows setting line series type and use OHLC indicators.
|
|
4251
|
+
* Data in OHLC format is required.
|
|
4252
|
+
*
|
|
4253
|
+
* @sample {highstock} stock/indicators/use-ohlc-data
|
|
4254
|
+
* Use OHLC data format to plot line chart
|
|
4255
|
+
*
|
|
4256
|
+
* @type {boolean}
|
|
4257
|
+
* @product highstock
|
|
4258
|
+
* @apioption plotOptions.line.useOhlcData
|
|
4259
|
+
*/
|
|
4260
|
+
OHLCSeries.defaultOptions = merge(HLCSeries.defaultOptions, {
|
|
3356
4261
|
/**
|
|
3357
|
-
*
|
|
3358
|
-
*
|
|
3359
|
-
* @
|
|
3360
|
-
*
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
pointFormat: '<span style="color:{point.color}">\u25CF</span> ' +
|
|
3371
|
-
'<b> {series.name}</b><br/>' +
|
|
3372
|
-
'Open: {point.open}<br/>' +
|
|
3373
|
-
'High: {point.high}<br/>' +
|
|
3374
|
-
'Low: {point.low}<br/>' +
|
|
3375
|
-
'Close: {point.close}<br/>'
|
|
3376
|
-
},
|
|
3377
|
-
threshold: null,
|
|
3378
|
-
states: {
|
|
3379
|
-
/**
|
|
3380
|
-
* @extends plotOptions.column.states.hover
|
|
3381
|
-
* @product highstock
|
|
3382
|
-
*/
|
|
3383
|
-
hover: {
|
|
3384
|
-
/**
|
|
3385
|
-
* The pixel width of the line representing the OHLC point.
|
|
3386
|
-
*
|
|
3387
|
-
* @type {number}
|
|
3388
|
-
* @default 3
|
|
3389
|
-
* @product highstock
|
|
3390
|
-
*/
|
|
3391
|
-
lineWidth: 3
|
|
3392
|
-
}
|
|
3393
|
-
},
|
|
4262
|
+
* @type {Highcharts.DataGroupingApproximationValue|Function}
|
|
4263
|
+
* @default ohlc
|
|
4264
|
+
* @product highstock
|
|
4265
|
+
* @apioption plotOptions.ohlc.dataGrouping.approximation
|
|
4266
|
+
*/
|
|
4267
|
+
tooltip: {
|
|
4268
|
+
pointFormat: '<span style="color:{point.color}">\u25CF</span> ' +
|
|
4269
|
+
'<b> {series.name}</b><br/>' +
|
|
4270
|
+
'Open: {point.open}<br/>' +
|
|
4271
|
+
'High: {point.high}<br/>' +
|
|
4272
|
+
'Low: {point.low}<br/>' +
|
|
4273
|
+
'Close: {point.close}<br/>'
|
|
4274
|
+
}
|
|
3394
4275
|
/**
|
|
3395
|
-
* Determines which one of
|
|
4276
|
+
* Determines which one of `open`, `high`, `low`, `close` values should
|
|
3396
4277
|
* be represented as `point.y`, which is later used to set dataLabel
|
|
3397
4278
|
* position and [compare](#plotOptions.series.compare).
|
|
3398
4279
|
*
|
|
3399
|
-
* @sample {highstock} stock/plotoptions/ohlc-pointvalkey/
|
|
3400
|
-
* Possible values
|
|
3401
|
-
*
|
|
3402
|
-
* @type {string}
|
|
3403
4280
|
* @default close
|
|
3404
4281
|
* @validvalue ["open", "high", "low", "close"]
|
|
3405
4282
|
* @product highstock
|
|
3406
4283
|
* @apioption plotOptions.ohlc.pointValKey
|
|
3407
4284
|
*/
|
|
3408
|
-
/**
|
|
3409
|
-
* @default close
|
|
3410
|
-
* @apioption plotOptions.ohlc.colorKey
|
|
3411
|
-
*/
|
|
3412
4285
|
/**
|
|
3413
4286
|
* Line color for up points.
|
|
3414
4287
|
*
|
|
@@ -3416,19 +4289,11 @@
|
|
|
3416
4289
|
* @product highstock
|
|
3417
4290
|
* @apioption plotOptions.ohlc.upColor
|
|
3418
4291
|
*/
|
|
3419
|
-
stickyTracking: true
|
|
3420
4292
|
});
|
|
3421
4293
|
return OHLCSeries;
|
|
3422
|
-
}(
|
|
4294
|
+
}(HLCSeries));
|
|
3423
4295
|
extend(OHLCSeries.prototype, {
|
|
3424
|
-
|
|
3425
|
-
directTouch: false,
|
|
3426
|
-
pointArrayMap: ['open', 'high', 'low', 'close'],
|
|
3427
|
-
pointAttrToOptions: {
|
|
3428
|
-
stroke: 'color',
|
|
3429
|
-
'stroke-width': 'lineWidth'
|
|
3430
|
-
},
|
|
3431
|
-
pointValKey: 'close'
|
|
4296
|
+
pointArrayMap: ['open', 'high', 'low', 'close']
|
|
3432
4297
|
});
|
|
3433
4298
|
OHLCSeries.prototype.pointClass = OHLCPoint;
|
|
3434
4299
|
SeriesRegistry.registerSeriesType('ohlc', OHLCSeries);
|
|
@@ -3437,6 +4302,30 @@
|
|
|
3437
4302
|
* Default Export
|
|
3438
4303
|
*
|
|
3439
4304
|
* */
|
|
4305
|
+
// Add useOhlcData option
|
|
4306
|
+
addEvent(Series, 'init', function (eventOptions) {
|
|
4307
|
+
// eslint-disable-next-line no-invalid-this
|
|
4308
|
+
var series = this,
|
|
4309
|
+
options = eventOptions.options;
|
|
4310
|
+
if (options.useOhlcData &&
|
|
4311
|
+
options.id !== 'highcharts-navigator-series') {
|
|
4312
|
+
extend(series, {
|
|
4313
|
+
pointValKey: OHLCSeries.prototype.pointValKey,
|
|
4314
|
+
// keys: ohlcProto.keys, // @todo potentially nonsense
|
|
4315
|
+
pointArrayMap: OHLCSeries.prototype.pointArrayMap,
|
|
4316
|
+
toYData: OHLCSeries.prototype.toYData
|
|
4317
|
+
});
|
|
4318
|
+
}
|
|
4319
|
+
});
|
|
4320
|
+
addEvent(Series, 'afterSetOptions', function (e) {
|
|
4321
|
+
var options = e.options,
|
|
4322
|
+
dataGrouping = options.dataGrouping;
|
|
4323
|
+
if (dataGrouping &&
|
|
4324
|
+
options.useOhlcData &&
|
|
4325
|
+
options.id !== 'highcharts-navigator-series') {
|
|
4326
|
+
dataGrouping.approximation = 'ohlc';
|
|
4327
|
+
}
|
|
4328
|
+
});
|
|
3440
4329
|
/* *
|
|
3441
4330
|
*
|
|
3442
4331
|
* API Options
|
|
@@ -3501,13 +4390,6 @@
|
|
|
3501
4390
|
* @product highstock
|
|
3502
4391
|
* @apioption series.ohlc.data
|
|
3503
4392
|
*/
|
|
3504
|
-
/**
|
|
3505
|
-
* The closing value of each data point.
|
|
3506
|
-
*
|
|
3507
|
-
* @type {number}
|
|
3508
|
-
* @product highstock
|
|
3509
|
-
* @apioption series.ohlc.data.close
|
|
3510
|
-
*/
|
|
3511
4393
|
/**
|
|
3512
4394
|
* The opening value of each data point.
|
|
3513
4395
|
*
|
|
@@ -3519,7 +4401,7 @@
|
|
|
3519
4401
|
|
|
3520
4402
|
return OHLCSeries;
|
|
3521
4403
|
});
|
|
3522
|
-
_registerModule(_modules, 'Series/Candlestick/CandlestickSeries.js', [_modules['Core/DefaultOptions.js'], _modules['Core/
|
|
4404
|
+
_registerModule(_modules, 'Series/Candlestick/CandlestickSeries.js', [_modules['Core/DefaultOptions.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (D, SeriesRegistry, U) {
|
|
3523
4405
|
/* *
|
|
3524
4406
|
*
|
|
3525
4407
|
* (c) 2010-2021 Torstein Honsi
|
|
@@ -3569,7 +4451,7 @@
|
|
|
3569
4451
|
function CandlestickSeries() {
|
|
3570
4452
|
/* *
|
|
3571
4453
|
*
|
|
3572
|
-
* Static
|
|
4454
|
+
* Static Properties
|
|
3573
4455
|
*
|
|
3574
4456
|
* */
|
|
3575
4457
|
var _this = _super !== null && _super.apply(this,
|
|
@@ -3706,9 +4588,10 @@
|
|
|
3706
4588
|
});
|
|
3707
4589
|
/* eslint-enable valid-jsdoc */
|
|
3708
4590
|
};
|
|
4591
|
+
CandlestickSeries.defaultOptions = merge(OHLCSeries.defaultOptions, defaultOptions.plotOptions,
|
|
3709
4592
|
/**
|
|
3710
|
-
* A candlestick chart is a style of financial chart used to describe
|
|
3711
|
-
* movements over time.
|
|
4593
|
+
* A candlestick chart is a style of financial chart used to describe
|
|
4594
|
+
* price movements over time.
|
|
3712
4595
|
*
|
|
3713
4596
|
* @sample stock/demo/candlestick/
|
|
3714
4597
|
* Candlestick chart
|
|
@@ -3718,7 +4601,7 @@
|
|
|
3718
4601
|
* @product highstock
|
|
3719
4602
|
* @optionparent plotOptions.candlestick
|
|
3720
4603
|
*/
|
|
3721
|
-
|
|
4604
|
+
{
|
|
3722
4605
|
/**
|
|
3723
4606
|
* The specific line color for up candle sticks. The default is to
|
|
3724
4607
|
* inherit the general `lineColor` setting.
|
|
@@ -3731,12 +4614,6 @@
|
|
|
3731
4614
|
* @product highstock
|
|
3732
4615
|
* @apioption plotOptions.candlestick.upLineColor
|
|
3733
4616
|
*/
|
|
3734
|
-
/**
|
|
3735
|
-
* @type {Highcharts.DataGroupingApproximationValue|Function}
|
|
3736
|
-
* @default ohlc
|
|
3737
|
-
* @product highstock
|
|
3738
|
-
* @apioption plotOptions.candlestick.dataGrouping.approximation
|
|
3739
|
-
*/
|
|
3740
4617
|
states: {
|
|
3741
4618
|
/**
|
|
3742
4619
|
* @extends plotOptions.column.states.hover
|
|
@@ -3744,16 +4621,14 @@
|
|
|
3744
4621
|
*/
|
|
3745
4622
|
hover: {
|
|
3746
4623
|
/**
|
|
3747
|
-
* The pixel width of the line/border around the
|
|
4624
|
+
* The pixel width of the line/border around the
|
|
4625
|
+
* candlestick.
|
|
3748
4626
|
*
|
|
3749
4627
|
* @product highstock
|
|
3750
4628
|
*/
|
|
3751
4629
|
lineWidth: 2
|
|
3752
4630
|
}
|
|
3753
4631
|
},
|
|
3754
|
-
/**
|
|
3755
|
-
* @extends plotOptions.ohlc.tooltip
|
|
3756
|
-
*/
|
|
3757
4632
|
tooltip: defaultOptions.plotOptions.ohlc.tooltip,
|
|
3758
4633
|
/**
|
|
3759
4634
|
* @type {number|null}
|
|
@@ -3775,7 +4650,7 @@
|
|
|
3775
4650
|
* @default #000000
|
|
3776
4651
|
* @product highstock
|
|
3777
4652
|
*/
|
|
3778
|
-
lineColor:
|
|
4653
|
+
lineColor: "#000000" /* neutralColor100 */,
|
|
3779
4654
|
/**
|
|
3780
4655
|
* The pixel width of the candlestick line/border. Defaults to `1`.
|
|
3781
4656
|
*
|
|
@@ -3800,8 +4675,8 @@
|
|
|
3800
4675
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
3801
4676
|
* @default #ffffff
|
|
3802
4677
|
* @product highstock
|
|
3803
|
-
|
|
3804
|
-
upColor:
|
|
4678
|
+
*/
|
|
4679
|
+
upColor: "#ffffff" /* backgroundColor */,
|
|
3805
4680
|
/**
|
|
3806
4681
|
* @product highstock
|
|
3807
4682
|
*/
|
|
@@ -3963,7 +4838,7 @@
|
|
|
3963
4838
|
|
|
3964
4839
|
return FlagsPoint;
|
|
3965
4840
|
});
|
|
3966
|
-
_registerModule(_modules, '
|
|
4841
|
+
_registerModule(_modules, 'Series/OnSeriesComposition.js', [_modules['Series/Column/ColumnSeries.js'], _modules['Core/Series/Series.js'], _modules['Core/Utilities.js']], function (ColumnSeries, Series, U) {
|
|
3967
4842
|
/* *
|
|
3968
4843
|
*
|
|
3969
4844
|
* (c) 2010-2021 Torstein Honsi
|
|
@@ -3977,52 +4852,78 @@
|
|
|
3977
4852
|
var seriesProto = Series.prototype;
|
|
3978
4853
|
var defined = U.defined,
|
|
3979
4854
|
stableSort = U.stableSort;
|
|
3980
|
-
|
|
3981
|
-
*
|
|
3982
|
-
*
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4855
|
+
/* *
|
|
4856
|
+
*
|
|
4857
|
+
* Composition
|
|
4858
|
+
*
|
|
4859
|
+
* */
|
|
4860
|
+
var OnSeriesComposition;
|
|
4861
|
+
(function (OnSeriesComposition) {
|
|
4862
|
+
/* *
|
|
4863
|
+
*
|
|
4864
|
+
* Declarations
|
|
4865
|
+
*
|
|
4866
|
+
* */
|
|
4867
|
+
/* *
|
|
4868
|
+
*
|
|
4869
|
+
* Properties
|
|
4870
|
+
*
|
|
4871
|
+
* */
|
|
4872
|
+
var composedClasses = [];
|
|
4873
|
+
/* *
|
|
4874
|
+
*
|
|
4875
|
+
* Functions
|
|
4876
|
+
*
|
|
4877
|
+
* */
|
|
4878
|
+
/* eslint-disable valid-jsdoc */
|
|
4879
|
+
/**
|
|
4880
|
+
* @private
|
|
4881
|
+
*/
|
|
4882
|
+
function compose(SeriesClass) {
|
|
4883
|
+
if (composedClasses.indexOf(SeriesClass) === -1) {
|
|
4884
|
+
composedClasses.push(SeriesClass);
|
|
4885
|
+
var seriesProto_1 = SeriesClass.prototype;
|
|
4886
|
+
seriesProto_1.getPlotBox = getPlotBox;
|
|
4887
|
+
seriesProto_1.translate = translate;
|
|
4888
|
+
}
|
|
4889
|
+
return SeriesClass;
|
|
4890
|
+
}
|
|
4891
|
+
OnSeriesComposition.compose = compose;
|
|
4892
|
+
/**
|
|
4893
|
+
* Override getPlotBox. If the onSeries option is valid, return the plot box
|
|
4894
|
+
* of the onSeries, otherwise proceed as usual.
|
|
4895
|
+
*
|
|
4896
|
+
* @private
|
|
4897
|
+
*/
|
|
4898
|
+
function getPlotBox() {
|
|
4899
|
+
return seriesProto.getPlotBox.call((this.options.onSeries &&
|
|
4900
|
+
this.chart.get(this.options.onSeries)) || this);
|
|
4901
|
+
}
|
|
4902
|
+
OnSeriesComposition.getPlotBox = getPlotBox;
|
|
4000
4903
|
/**
|
|
4001
4904
|
* Extend the translate method by placing the point on the related series
|
|
4002
4905
|
*
|
|
4003
4906
|
* @private
|
|
4004
|
-
* @function onSeriesMixin.translate
|
|
4005
|
-
* @return {void}
|
|
4006
4907
|
*/
|
|
4007
|
-
|
|
4908
|
+
function translate() {
|
|
4008
4909
|
columnProto.translate.apply(this);
|
|
4009
4910
|
var series = this,
|
|
4010
4911
|
options = series.options,
|
|
4011
4912
|
chart = series.chart,
|
|
4012
4913
|
points = series.points,
|
|
4013
|
-
cursor = points.length - 1,
|
|
4014
|
-
point,
|
|
4015
|
-
lastPoint,
|
|
4016
4914
|
optionsOnSeries = options.onSeries,
|
|
4017
4915
|
onSeries = (optionsOnSeries &&
|
|
4018
4916
|
chart.get(optionsOnSeries)),
|
|
4019
|
-
onKey = options.onKey || 'y',
|
|
4020
4917
|
step = onSeries && onSeries.options.step,
|
|
4021
4918
|
onData = (onSeries && onSeries.points),
|
|
4022
|
-
i = onData && onData.length,
|
|
4023
4919
|
inverted = chart.inverted,
|
|
4024
4920
|
xAxis = series.xAxis,
|
|
4025
|
-
yAxis = series.yAxis
|
|
4921
|
+
yAxis = series.yAxis;
|
|
4922
|
+
var cursor = points.length - 1,
|
|
4923
|
+
point,
|
|
4924
|
+
lastPoint,
|
|
4925
|
+
onKey = options.onKey || 'y',
|
|
4926
|
+
i = onData && onData.length,
|
|
4026
4927
|
xOffset = 0,
|
|
4027
4928
|
leftPoint,
|
|
4028
4929
|
lastX,
|
|
@@ -4036,9 +4937,7 @@
|
|
|
4036
4937
|
lastX = (onData[i - 1].x +
|
|
4037
4938
|
(currentDataGrouping ? currentDataGrouping.totalRange : 0)); // #2374
|
|
4038
4939
|
// sort the data points
|
|
4039
|
-
stableSort(points, function (a, b) {
|
|
4040
|
-
return (a.x - b.x);
|
|
4041
|
-
});
|
|
4940
|
+
stableSort(points, function (a, b) { return (a.x - b.x); });
|
|
4042
4941
|
onKey = 'plot' + onKey[0].toUpperCase() + onKey.substr(1);
|
|
4043
4942
|
while (i-- && points[cursor]) {
|
|
4044
4943
|
leftPoint = onData[i];
|
|
@@ -4117,10 +5016,15 @@
|
|
|
4117
5016
|
});
|
|
4118
5017
|
this.onSeries = onSeries;
|
|
4119
5018
|
}
|
|
4120
|
-
|
|
4121
|
-
};
|
|
5019
|
+
OnSeriesComposition.translate = translate;
|
|
5020
|
+
})(OnSeriesComposition || (OnSeriesComposition = {}));
|
|
5021
|
+
/* *
|
|
5022
|
+
*
|
|
5023
|
+
* Default Export
|
|
5024
|
+
*
|
|
5025
|
+
* */
|
|
4122
5026
|
|
|
4123
|
-
return
|
|
5027
|
+
return OnSeriesComposition;
|
|
4124
5028
|
});
|
|
4125
5029
|
_registerModule(_modules, 'Series/Flags/FlagsSymbols.js', [_modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Renderer/SVG/SVGRenderer.js']], function (RendererRegistry, SVGRenderer) {
|
|
4126
5030
|
/* *
|
|
@@ -4216,7 +5120,7 @@
|
|
|
4216
5120
|
|
|
4217
5121
|
return symbols;
|
|
4218
5122
|
});
|
|
4219
|
-
_registerModule(_modules, 'Series/Flags/FlagsSeries.js', [_modules['Series/Flags/FlagsPoint.js'], _modules['Core/Globals.js'], _modules['
|
|
5123
|
+
_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) {
|
|
4220
5124
|
/* *
|
|
4221
5125
|
*
|
|
4222
5126
|
* (c) 2010-2021 Torstein Honsi
|
|
@@ -4421,11 +5325,15 @@
|
|
|
4421
5325
|
}
|
|
4422
5326
|
// Handle X-dimension overlapping
|
|
4423
5327
|
if (!options.allowOverlapX) {
|
|
5328
|
+
var maxDistance_1 = 100;
|
|
4424
5329
|
objectEach(boxesMap, function (box) {
|
|
4425
5330
|
box.plotX = box.anchorX;
|
|
4426
5331
|
boxes.push(box);
|
|
5332
|
+
maxDistance_1 = Math.max(box.size, maxDistance_1);
|
|
4427
5333
|
});
|
|
4428
|
-
|
|
5334
|
+
// If necessary (for overlapping or long labels) distribute it
|
|
5335
|
+
// depending on the label width or a hardcoded value, #16041.
|
|
5336
|
+
distribute(boxes, inverted ? yAxis.len : this.xAxis.len, maxDistance_1);
|
|
4429
5337
|
points.forEach(function (point) {
|
|
4430
5338
|
var box = point.graphic && boxesMap[point.plotX];
|
|
4431
5339
|
if (box) {
|
|
@@ -4689,7 +5597,7 @@
|
|
|
4689
5597
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
4690
5598
|
* @product highstock
|
|
4691
5599
|
*/
|
|
4692
|
-
fillColor:
|
|
5600
|
+
fillColor: "#ffffff" /* backgroundColor */,
|
|
4693
5601
|
/**
|
|
4694
5602
|
* The color of the line/border of the flag.
|
|
4695
5603
|
*
|
|
@@ -4719,14 +5627,14 @@
|
|
|
4719
5627
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
4720
5628
|
* @product highstock
|
|
4721
5629
|
*/
|
|
4722
|
-
lineColor:
|
|
5630
|
+
lineColor: "#000000" /* neutralColor100 */,
|
|
4723
5631
|
/**
|
|
4724
5632
|
* The fill or background color of the flag.
|
|
4725
5633
|
*
|
|
4726
5634
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
4727
5635
|
* @product highstock
|
|
4728
5636
|
*/
|
|
4729
|
-
fillColor:
|
|
5637
|
+
fillColor: "#ccd6eb" /* highlightColor20 */
|
|
4730
5638
|
}
|
|
4731
5639
|
},
|
|
4732
5640
|
/**
|
|
@@ -4748,37 +5656,27 @@
|
|
|
4748
5656
|
});
|
|
4749
5657
|
return FlagsSeries;
|
|
4750
5658
|
}(ColumnSeries));
|
|
5659
|
+
OnSeriesComposition.compose(FlagsSeries);
|
|
4751
5660
|
extend(FlagsSeries.prototype, {
|
|
4752
5661
|
allowDG: false,
|
|
4753
|
-
/**
|
|
4754
|
-
* @private
|
|
4755
|
-
* @function Highcharts.seriesTypes.flags#buildKDTree
|
|
4756
|
-
*/
|
|
4757
|
-
buildKDTree: noop,
|
|
4758
5662
|
forceCrop: true,
|
|
4759
|
-
|
|
5663
|
+
invertible: false,
|
|
5664
|
+
noSharedTooltip: true,
|
|
5665
|
+
pointClass: FlagsPoint,
|
|
5666
|
+
sorted: false,
|
|
5667
|
+
takeOrdinalPosition: false,
|
|
5668
|
+
trackerGroups: ['markerGroup'],
|
|
5669
|
+
buildKDTree: noop,
|
|
4760
5670
|
/**
|
|
4761
5671
|
* Inherit the initialization from base Series.
|
|
4762
|
-
*
|
|
4763
5672
|
* @private
|
|
4764
|
-
* @borrows Highcharts.Series#init as Highcharts.seriesTypes.flags#init
|
|
4765
5673
|
*/
|
|
4766
5674
|
init: Series.prototype.init,
|
|
4767
5675
|
/**
|
|
4768
5676
|
* Don't invert the flag marker group (#4960).
|
|
4769
|
-
*
|
|
4770
5677
|
* @private
|
|
4771
|
-
* @function Highcharts.seriesTypes.flags#invertGroups
|
|
4772
5678
|
*/
|
|
4773
|
-
invertGroups: noop
|
|
4774
|
-
// Flags series group should not be invertible (#14063).
|
|
4775
|
-
invertible: false,
|
|
4776
|
-
noSharedTooltip: true,
|
|
4777
|
-
pointClass: FlagsPoint,
|
|
4778
|
-
sorted: false,
|
|
4779
|
-
takeOrdinalPosition: false,
|
|
4780
|
-
trackerGroups: ['markerGroup'],
|
|
4781
|
-
translate: OnSeriesMixin.translate
|
|
5679
|
+
invertGroups: noop
|
|
4782
5680
|
});
|
|
4783
5681
|
SeriesRegistry.registerSeriesType('flags', FlagsSeries);
|
|
4784
5682
|
/* *
|
|
@@ -5000,8 +5898,15 @@
|
|
|
5000
5898
|
if (axis.opposite) {
|
|
5001
5899
|
scrollbarsOffsets[0] += offset;
|
|
5002
5900
|
}
|
|
5003
|
-
|
|
5004
|
-
|
|
5901
|
+
var xPosition = void 0;
|
|
5902
|
+
if (!scrollbar.options.opposite) {
|
|
5903
|
+
xPosition = axis.opposite ? 0 : axisMargin;
|
|
5904
|
+
}
|
|
5905
|
+
else {
|
|
5906
|
+
xPosition = axis.left + axis.width + 2 + scrollbarsOffsets[0] -
|
|
5907
|
+
(axis.opposite ? 0 : axisMargin);
|
|
5908
|
+
}
|
|
5909
|
+
scrollbar.position(xPosition, axis.top, axis.width, axis.height);
|
|
5005
5910
|
// Next scrollbar should reserve space for margin (if set)
|
|
5006
5911
|
if (axis.opposite) {
|
|
5007
5912
|
scrollbarsOffsets[0] += axisMargin;
|
|
@@ -5040,7 +5945,8 @@
|
|
|
5040
5945
|
// Make space for a scrollbar:
|
|
5041
5946
|
addEvent(AxisClass, 'afterGetOffset', function () {
|
|
5042
5947
|
var axis = this,
|
|
5043
|
-
|
|
5948
|
+
opposite = axis.scrollbar && !axis.scrollbar.options.opposite,
|
|
5949
|
+
index = axis.horiz ? 2 : opposite ? 3 : 1,
|
|
5044
5950
|
scrollbar = axis.scrollbar;
|
|
5045
5951
|
if (scrollbar) {
|
|
5046
5952
|
axis.chart.scrollbarsOffsets = [0, 0]; // reset scrollbars offsets
|
|
@@ -5056,7 +5962,7 @@
|
|
|
5056
5962
|
|
|
5057
5963
|
return ScrollbarAxis;
|
|
5058
5964
|
});
|
|
5059
|
-
_registerModule(_modules, 'Core/ScrollbarDefaults.js', [_modules['Core/Globals.js']
|
|
5965
|
+
_registerModule(_modules, 'Core/ScrollbarDefaults.js', [_modules['Core/Globals.js']], function (H) {
|
|
5060
5966
|
/* *
|
|
5061
5967
|
*
|
|
5062
5968
|
* (c) 2010-2021 Torstein Honsi
|
|
@@ -5155,6 +6061,8 @@
|
|
|
5155
6061
|
* @since 1.2.5
|
|
5156
6062
|
*/
|
|
5157
6063
|
minWidth: 6,
|
|
6064
|
+
/** @ignore-option */
|
|
6065
|
+
opposite: true,
|
|
5158
6066
|
/**
|
|
5159
6067
|
* Whether to show or hide the scrollbar when the scrolled content is
|
|
5160
6068
|
* zoomed out to it full extent.
|
|
@@ -5176,7 +6084,7 @@
|
|
|
5176
6084
|
*
|
|
5177
6085
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5178
6086
|
*/
|
|
5179
|
-
barBackgroundColor:
|
|
6087
|
+
barBackgroundColor: "#cccccc" /* neutralColor20 */,
|
|
5180
6088
|
/**
|
|
5181
6089
|
* The width of the bar's border.
|
|
5182
6090
|
*
|
|
@@ -5189,7 +6097,7 @@
|
|
|
5189
6097
|
*
|
|
5190
6098
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5191
6099
|
*/
|
|
5192
|
-
barBorderColor:
|
|
6100
|
+
barBorderColor: "#cccccc" /* neutralColor20 */,
|
|
5193
6101
|
/**
|
|
5194
6102
|
* The color of the small arrow inside the scrollbar buttons.
|
|
5195
6103
|
*
|
|
@@ -5198,7 +6106,7 @@
|
|
|
5198
6106
|
*
|
|
5199
6107
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5200
6108
|
*/
|
|
5201
|
-
buttonArrowColor:
|
|
6109
|
+
buttonArrowColor: "#333333" /* neutralColor80 */,
|
|
5202
6110
|
/**
|
|
5203
6111
|
* The color of scrollbar buttons.
|
|
5204
6112
|
*
|
|
@@ -5207,7 +6115,7 @@
|
|
|
5207
6115
|
*
|
|
5208
6116
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5209
6117
|
*/
|
|
5210
|
-
buttonBackgroundColor:
|
|
6118
|
+
buttonBackgroundColor: "#e6e6e6" /* neutralColor10 */,
|
|
5211
6119
|
/**
|
|
5212
6120
|
* The color of the border of the scrollbar buttons.
|
|
5213
6121
|
*
|
|
@@ -5216,7 +6124,7 @@
|
|
|
5216
6124
|
*
|
|
5217
6125
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5218
6126
|
*/
|
|
5219
|
-
buttonBorderColor:
|
|
6127
|
+
buttonBorderColor: "#cccccc" /* neutralColor20 */,
|
|
5220
6128
|
/**
|
|
5221
6129
|
* The border width of the scrollbar buttons.
|
|
5222
6130
|
*
|
|
@@ -5229,7 +6137,7 @@
|
|
|
5229
6137
|
*
|
|
5230
6138
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5231
6139
|
*/
|
|
5232
|
-
rifleColor:
|
|
6140
|
+
rifleColor: "#333333" /* neutralColor80 */,
|
|
5233
6141
|
/**
|
|
5234
6142
|
* The color of the track background.
|
|
5235
6143
|
*
|
|
@@ -5238,7 +6146,7 @@
|
|
|
5238
6146
|
*
|
|
5239
6147
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5240
6148
|
*/
|
|
5241
|
-
trackBackgroundColor:
|
|
6149
|
+
trackBackgroundColor: "#f2f2f2" /* neutralColor5 */,
|
|
5242
6150
|
/**
|
|
5243
6151
|
* The color of the border of the scrollbar track.
|
|
5244
6152
|
*
|
|
@@ -5247,7 +6155,7 @@
|
|
|
5247
6155
|
*
|
|
5248
6156
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
5249
6157
|
*/
|
|
5250
|
-
trackBorderColor:
|
|
6158
|
+
trackBorderColor: "#f2f2f2" /* neutralColor5 */,
|
|
5251
6159
|
/**
|
|
5252
6160
|
* The corner radius of the border of the scrollbar track.
|
|
5253
6161
|
*
|
|
@@ -6156,7 +7064,7 @@
|
|
|
6156
7064
|
|
|
6157
7065
|
return NavigatorAxis;
|
|
6158
7066
|
});
|
|
6159
|
-
_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/
|
|
7067
|
+
_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) {
|
|
6160
7068
|
/* *
|
|
6161
7069
|
*
|
|
6162
7070
|
* (c) 2010-2021 Torstein Honsi
|
|
@@ -6364,13 +7272,13 @@
|
|
|
6364
7272
|
*
|
|
6365
7273
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
6366
7274
|
*/
|
|
6367
|
-
backgroundColor:
|
|
7275
|
+
backgroundColor: "#f2f2f2" /* neutralColor5 */,
|
|
6368
7276
|
/**
|
|
6369
7277
|
* The stroke for the handle border and the stripes inside.
|
|
6370
7278
|
*
|
|
6371
7279
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
6372
7280
|
*/
|
|
6373
|
-
borderColor:
|
|
7281
|
+
borderColor: "#999999" /* neutralColor40 */
|
|
6374
7282
|
},
|
|
6375
7283
|
/**
|
|
6376
7284
|
* The color of the mask covering the areas of the navigator series
|
|
@@ -6387,7 +7295,7 @@
|
|
|
6387
7295
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
6388
7296
|
* @default rgba(102,133,194,0.3)
|
|
6389
7297
|
*/
|
|
6390
|
-
maskFill: color(
|
|
7298
|
+
maskFill: color("#6685c2" /* highlightColor60 */).setOpacity(0.3).get(),
|
|
6391
7299
|
/**
|
|
6392
7300
|
* The color of the line marking the currently zoomed area in the
|
|
6393
7301
|
* navigator.
|
|
@@ -6398,7 +7306,7 @@
|
|
|
6398
7306
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
6399
7307
|
* @default #cccccc
|
|
6400
7308
|
*/
|
|
6401
|
-
outlineColor:
|
|
7309
|
+
outlineColor: "#cccccc" /* neutralColor20 */,
|
|
6402
7310
|
/**
|
|
6403
7311
|
* The width of the line marking the currently zoomed area in the
|
|
6404
7312
|
* navigator.
|
|
@@ -6589,7 +7497,7 @@
|
|
|
6589
7497
|
className: 'highcharts-navigator-xaxis',
|
|
6590
7498
|
tickLength: 0,
|
|
6591
7499
|
lineWidth: 0,
|
|
6592
|
-
gridLineColor:
|
|
7500
|
+
gridLineColor: "#e6e6e6" /* neutralColor10 */,
|
|
6593
7501
|
gridLineWidth: 1,
|
|
6594
7502
|
tickPixelInterval: 200,
|
|
6595
7503
|
labels: {
|
|
@@ -6599,7 +7507,7 @@
|
|
|
6599
7507
|
*/
|
|
6600
7508
|
style: {
|
|
6601
7509
|
/** @ignore */
|
|
6602
|
-
color:
|
|
7510
|
+
color: "#999999" /* neutralColor40 */
|
|
6603
7511
|
},
|
|
6604
7512
|
x: 3,
|
|
6605
7513
|
y: -4
|
|
@@ -8026,7 +8934,7 @@
|
|
|
8026
8934
|
// If range declared, stick to the minimum only if the range
|
|
8027
8935
|
// is smaller than the data set range.
|
|
8028
8936
|
if (range && max - xDataMin > 0) {
|
|
8029
|
-
stickToMin = max - xDataMin < range
|
|
8937
|
+
stickToMin = max - xDataMin < range;
|
|
8030
8938
|
}
|
|
8031
8939
|
else {
|
|
8032
8940
|
// If the current axis minimum falls outside the new
|
|
@@ -8253,7 +9161,7 @@
|
|
|
8253
9161
|
|
|
8254
9162
|
return H.Navigator;
|
|
8255
9163
|
});
|
|
8256
|
-
_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/
|
|
9164
|
+
_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) {
|
|
8257
9165
|
/* *
|
|
8258
9166
|
*
|
|
8259
9167
|
* (c) 2010-2021 Torstein Honsi
|
|
@@ -8743,7 +9651,7 @@
|
|
|
8743
9651
|
*/
|
|
8744
9652
|
inputStyle: {
|
|
8745
9653
|
/** @ignore */
|
|
8746
|
-
color:
|
|
9654
|
+
color: "#335cad" /* highlightColor80 */,
|
|
8747
9655
|
/** @ignore */
|
|
8748
9656
|
cursor: 'pointer'
|
|
8749
9657
|
},
|
|
@@ -8760,7 +9668,7 @@
|
|
|
8760
9668
|
*/
|
|
8761
9669
|
labelStyle: {
|
|
8762
9670
|
/** @ignore */
|
|
8763
|
-
color:
|
|
9671
|
+
color: "#666666" /* neutralColor60 */
|
|
8764
9672
|
}
|
|
8765
9673
|
}
|
|
8766
9674
|
});
|
|
@@ -9463,7 +10371,7 @@
|
|
|
9463
10371
|
// Styles
|
|
9464
10372
|
label.css(merge(chartStyle, options.labelStyle));
|
|
9465
10373
|
dateBox.css(merge({
|
|
9466
|
-
color:
|
|
10374
|
+
color: "#333333" /* neutralColor80 */
|
|
9467
10375
|
}, chartStyle, options.inputStyle));
|
|
9468
10376
|
css(input, extend({
|
|
9469
10377
|
position: 'absolute',
|
|
@@ -10646,7 +11554,7 @@
|
|
|
10646
11554
|
|
|
10647
11555
|
return RangeSelector;
|
|
10648
11556
|
});
|
|
10649
|
-
_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/
|
|
11557
|
+
_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) {
|
|
10650
11558
|
/* *
|
|
10651
11559
|
*
|
|
10652
11560
|
* (c) 2010-2021 Torstein Honsi
|
|
@@ -10675,13 +11583,7 @@
|
|
|
10675
11583
|
var animObject = A.animObject;
|
|
10676
11584
|
var format = F.format;
|
|
10677
11585
|
var getOptions = D.getOptions;
|
|
10678
|
-
var pointTooltipFormatter = Point.prototype.tooltipFormatter;
|
|
10679
|
-
var _a = Series.prototype,
|
|
10680
|
-
seriesInit = _a.init,
|
|
10681
|
-
seriesProcessData = _a.processData;
|
|
10682
11586
|
var addEvent = U.addEvent,
|
|
10683
|
-
arrayMax = U.arrayMax,
|
|
10684
|
-
arrayMin = U.arrayMin,
|
|
10685
11587
|
clamp = U.clamp,
|
|
10686
11588
|
defined = U.defined,
|
|
10687
11589
|
extend = U.extend,
|
|
@@ -11215,12 +12117,12 @@
|
|
|
11215
12117
|
.attr({
|
|
11216
12118
|
fill: options.backgroundColor ||
|
|
11217
12119
|
point && point.series && point.series.color || // #14888
|
|
11218
|
-
|
|
12120
|
+
"#666666" /* neutralColor60 */,
|
|
11219
12121
|
stroke: options.borderColor || '',
|
|
11220
12122
|
'stroke-width': options.borderWidth || 0
|
|
11221
12123
|
})
|
|
11222
12124
|
.css(extend({
|
|
11223
|
-
color:
|
|
12125
|
+
color: "#ffffff" /* backgroundColor */,
|
|
11224
12126
|
fontWeight: 'normal',
|
|
11225
12127
|
fontSize: '11px',
|
|
11226
12128
|
textAlign: 'center'
|
|
@@ -11313,76 +12215,6 @@
|
|
|
11313
12215
|
posy + crossBox.height / 2
|
|
11314
12216
|
});
|
|
11315
12217
|
});
|
|
11316
|
-
/* ************************************************************************** *
|
|
11317
|
-
* Start value compare logic *
|
|
11318
|
-
* ************************************************************************** */
|
|
11319
|
-
/**
|
|
11320
|
-
* Extend series.init by adding a method to modify the y value used for plotting
|
|
11321
|
-
* on the y axis. This method is called both from the axis when finding dataMin
|
|
11322
|
-
* and dataMax, and from the series.translate method.
|
|
11323
|
-
*
|
|
11324
|
-
* @ignore
|
|
11325
|
-
* @function Highcharts.Series#init
|
|
11326
|
-
*/
|
|
11327
|
-
Series.prototype.init = function () {
|
|
11328
|
-
// Call base method
|
|
11329
|
-
seriesInit.apply(this, arguments);
|
|
11330
|
-
// Set comparison mode
|
|
11331
|
-
this.initCompare(this.options.compare);
|
|
11332
|
-
};
|
|
11333
|
-
/**
|
|
11334
|
-
* Highcharts Stock only. Set the
|
|
11335
|
-
* [compare](https://api.highcharts.com/highstock/plotOptions.series.compare)
|
|
11336
|
-
* mode of the series after render time. In most cases it is more useful running
|
|
11337
|
-
* {@link Axis#setCompare} on the X axis to update all its series.
|
|
11338
|
-
*
|
|
11339
|
-
* @function Highcharts.Series#setCompare
|
|
11340
|
-
*
|
|
11341
|
-
* @param {string} [compare]
|
|
11342
|
-
* Can be one of `null` (default), `"percent"` or `"value"`.
|
|
11343
|
-
*/
|
|
11344
|
-
Series.prototype.setCompare = function (compare) {
|
|
11345
|
-
this.initCompare(compare);
|
|
11346
|
-
// Survive to export, #5485
|
|
11347
|
-
this.userOptions.compare = compare;
|
|
11348
|
-
};
|
|
11349
|
-
/**
|
|
11350
|
-
* @ignore
|
|
11351
|
-
* @function Highcharts.Series#initCompare
|
|
11352
|
-
*
|
|
11353
|
-
* @param {string} [compare]
|
|
11354
|
-
* Can be one of `null` (default), `"percent"` or `"value"`.
|
|
11355
|
-
*/
|
|
11356
|
-
Series.prototype.initCompare = function (compare) {
|
|
11357
|
-
// Set or unset the modifyValue method
|
|
11358
|
-
this.modifyValue = (compare === 'value' || compare === 'percent') ?
|
|
11359
|
-
function (value, point) {
|
|
11360
|
-
var compareValue = this.compareValue;
|
|
11361
|
-
if (typeof value !== 'undefined' &&
|
|
11362
|
-
typeof compareValue !== 'undefined') { // #2601, #5814
|
|
11363
|
-
// Get the modified value
|
|
11364
|
-
if (compare === 'value') {
|
|
11365
|
-
value -= compareValue;
|
|
11366
|
-
// Compare percent
|
|
11367
|
-
}
|
|
11368
|
-
else {
|
|
11369
|
-
value = 100 * (value / compareValue) -
|
|
11370
|
-
(this.options.compareBase === 100 ? 0 : 100);
|
|
11371
|
-
}
|
|
11372
|
-
// record for tooltip etc.
|
|
11373
|
-
if (point) {
|
|
11374
|
-
point.change = value;
|
|
11375
|
-
}
|
|
11376
|
-
return value;
|
|
11377
|
-
}
|
|
11378
|
-
return 0;
|
|
11379
|
-
} :
|
|
11380
|
-
null;
|
|
11381
|
-
// Mark dirty
|
|
11382
|
-
if (this.chart.hasRendered) {
|
|
11383
|
-
this.isDirty = true;
|
|
11384
|
-
}
|
|
11385
|
-
};
|
|
11386
12218
|
/**
|
|
11387
12219
|
* Based on the data grouping options decides whether
|
|
11388
12220
|
* the data should be cropped while processing.
|
|
@@ -11399,173 +12231,6 @@
|
|
|
11399
12231
|
chart.options.isStock);
|
|
11400
12232
|
return groupingEnabled;
|
|
11401
12233
|
};
|
|
11402
|
-
/**
|
|
11403
|
-
* Extend series.processData by finding the first y value in the plot area,
|
|
11404
|
-
* used for comparing the following values
|
|
11405
|
-
*
|
|
11406
|
-
* @ignore
|
|
11407
|
-
* @function Highcharts.Series#processData
|
|
11408
|
-
*/
|
|
11409
|
-
Series.prototype.processData = function (force) {
|
|
11410
|
-
var series = this,
|
|
11411
|
-
i,
|
|
11412
|
-
keyIndex = -1,
|
|
11413
|
-
processedXData,
|
|
11414
|
-
processedYData,
|
|
11415
|
-
compareStart = series.options.compareStart === true ? 0 : 1,
|
|
11416
|
-
length,
|
|
11417
|
-
compareValue;
|
|
11418
|
-
// call base method
|
|
11419
|
-
seriesProcessData.apply(this, arguments);
|
|
11420
|
-
if (series.xAxis && series.processedYData) { // not pies
|
|
11421
|
-
// local variables
|
|
11422
|
-
processedXData = series.processedXData;
|
|
11423
|
-
processedYData = series.processedYData;
|
|
11424
|
-
length = processedYData.length;
|
|
11425
|
-
// For series with more than one value (range, OHLC etc), compare
|
|
11426
|
-
// against close or the pointValKey (#4922, #3112, #9854)
|
|
11427
|
-
if (series.pointArrayMap) {
|
|
11428
|
-
keyIndex = series.pointArrayMap.indexOf(series.options.pointValKey || series.pointValKey || 'y');
|
|
11429
|
-
}
|
|
11430
|
-
// find the first value for comparison
|
|
11431
|
-
for (i = 0; i < length - compareStart; i++) {
|
|
11432
|
-
compareValue = processedYData[i] && keyIndex > -1 ?
|
|
11433
|
-
processedYData[i][keyIndex] :
|
|
11434
|
-
processedYData[i];
|
|
11435
|
-
if (isNumber(compareValue) &&
|
|
11436
|
-
processedXData[i + compareStart] >=
|
|
11437
|
-
series.xAxis.min &&
|
|
11438
|
-
compareValue !== 0) {
|
|
11439
|
-
series.compareValue = compareValue;
|
|
11440
|
-
break;
|
|
11441
|
-
}
|
|
11442
|
-
}
|
|
11443
|
-
}
|
|
11444
|
-
return;
|
|
11445
|
-
};
|
|
11446
|
-
// Modify series extremes
|
|
11447
|
-
addEvent(Series, 'afterGetExtremes', function (e) {
|
|
11448
|
-
var dataExtremes = e.dataExtremes;
|
|
11449
|
-
if (this.modifyValue && dataExtremes) {
|
|
11450
|
-
var extremes = [
|
|
11451
|
-
this.modifyValue(dataExtremes.dataMin),
|
|
11452
|
-
this.modifyValue(dataExtremes.dataMax)
|
|
11453
|
-
];
|
|
11454
|
-
dataExtremes.dataMin = arrayMin(extremes);
|
|
11455
|
-
dataExtremes.dataMax = arrayMax(extremes);
|
|
11456
|
-
}
|
|
11457
|
-
});
|
|
11458
|
-
/**
|
|
11459
|
-
* Highcharts Stock only. Set the compare mode on all series
|
|
11460
|
-
* belonging to an Y axis after render time.
|
|
11461
|
-
*
|
|
11462
|
-
* @see [series.plotOptions.compare](https://api.highcharts.com/highstock/series.plotOptions.compare)
|
|
11463
|
-
*
|
|
11464
|
-
* @sample stock/members/axis-setcompare/
|
|
11465
|
-
* Set compoare
|
|
11466
|
-
*
|
|
11467
|
-
* @function Highcharts.Axis#setCompare
|
|
11468
|
-
*
|
|
11469
|
-
* @param {string} [compare]
|
|
11470
|
-
* The compare mode. Can be one of `null` (default), `"value"` or
|
|
11471
|
-
* `"percent"`.
|
|
11472
|
-
*
|
|
11473
|
-
* @param {boolean} [redraw=true]
|
|
11474
|
-
* Whether to redraw the chart or to wait for a later call to
|
|
11475
|
-
* {@link Chart#redraw}.
|
|
11476
|
-
*/
|
|
11477
|
-
Axis.prototype.setCompare = function (compare, redraw) {
|
|
11478
|
-
if (!this.isXAxis) {
|
|
11479
|
-
this.series.forEach(function (series) {
|
|
11480
|
-
series.setCompare(compare);
|
|
11481
|
-
});
|
|
11482
|
-
if (pick(redraw, true)) {
|
|
11483
|
-
this.chart.redraw();
|
|
11484
|
-
}
|
|
11485
|
-
}
|
|
11486
|
-
};
|
|
11487
|
-
/**
|
|
11488
|
-
* Extend the tooltip formatter by adding support for the point.change variable
|
|
11489
|
-
* as well as the changeDecimals option.
|
|
11490
|
-
*
|
|
11491
|
-
* @ignore
|
|
11492
|
-
* @function Highcharts.Point#tooltipFormatter
|
|
11493
|
-
*
|
|
11494
|
-
* @param {string} pointFormat
|
|
11495
|
-
*/
|
|
11496
|
-
Point.prototype.tooltipFormatter = function (pointFormat) {
|
|
11497
|
-
var point = this;
|
|
11498
|
-
var numberFormatter = point.series.chart.numberFormatter;
|
|
11499
|
-
pointFormat = pointFormat.replace('{point.change}', (point.change > 0 ? '+' : '') + numberFormatter(point.change, pick(point.series.tooltipOptions.changeDecimals, 2)));
|
|
11500
|
-
return pointTooltipFormatter.apply(this, [pointFormat]);
|
|
11501
|
-
};
|
|
11502
|
-
/* ************************************************************************** *
|
|
11503
|
-
* End value compare logic *
|
|
11504
|
-
* ************************************************************************** */
|
|
11505
|
-
// Extend the Series prototype to create a separate series clip box. This is
|
|
11506
|
-
// related to using multiple panes, and a future pane logic should incorporate
|
|
11507
|
-
// this feature (#2754).
|
|
11508
|
-
addEvent(Series, 'render', function () {
|
|
11509
|
-
var chart = this.chart,
|
|
11510
|
-
clipHeight;
|
|
11511
|
-
// Only do this on not 3d (#2939, #5904) nor polar (#6057) charts, and only
|
|
11512
|
-
// if the series type handles clipping in the animate method (#2975).
|
|
11513
|
-
if (!(chart.is3d && chart.is3d()) &&
|
|
11514
|
-
!chart.polar &&
|
|
11515
|
-
this.xAxis &&
|
|
11516
|
-
!this.xAxis.isRadial && // Gauge, #6192
|
|
11517
|
-
this.options.clip !== false // #15128
|
|
11518
|
-
) {
|
|
11519
|
-
clipHeight = this.yAxis.len;
|
|
11520
|
-
// Include xAxis line width (#8031) but only if the Y axis ends on the
|
|
11521
|
-
// edge of the X axis (#11005).
|
|
11522
|
-
if (this.xAxis.axisLine) {
|
|
11523
|
-
var dist = chart.plotTop + chart.plotHeight -
|
|
11524
|
-
this.yAxis.pos - this.yAxis.len,
|
|
11525
|
-
lineHeightCorrection = Math.floor(this.xAxis.axisLine.strokeWidth() / 2);
|
|
11526
|
-
if (dist >= 0) {
|
|
11527
|
-
clipHeight -= Math.max(lineHeightCorrection - dist, 0);
|
|
11528
|
-
}
|
|
11529
|
-
}
|
|
11530
|
-
// First render, initial clip box. clipBox also needs to be updated if
|
|
11531
|
-
// the series is rendered again before starting animating, in
|
|
11532
|
-
// compliance with a responsive rule (#13858).
|
|
11533
|
-
if (!chart.hasLoaded || (!this.clipBox && this.isDirty && !this.isDirtyData)) {
|
|
11534
|
-
this.clipBox = this.clipBox || merge(chart.clipBox);
|
|
11535
|
-
this.clipBox.width = this.xAxis.len;
|
|
11536
|
-
this.clipBox.height = clipHeight;
|
|
11537
|
-
}
|
|
11538
|
-
if (chart.hasRendered) {
|
|
11539
|
-
var animation = animObject(this.options.animation);
|
|
11540
|
-
// #15435: this.sharedClipKey might not have been set yet, for
|
|
11541
|
-
// example when updating the series, so we need to use this
|
|
11542
|
-
// function instead
|
|
11543
|
-
var sharedClipKey = this.getSharedClipKey(animation);
|
|
11544
|
-
var clipRect = chart.sharedClips[sharedClipKey];
|
|
11545
|
-
// On redrawing, resizing etc, update the clip rectangle.
|
|
11546
|
-
//
|
|
11547
|
-
// #15435: Update it even when we are creating/updating clipBox,
|
|
11548
|
-
// since there could be series updating and pane size changes
|
|
11549
|
-
// happening at the same time and we dont destroy shared clips in
|
|
11550
|
-
// stock.
|
|
11551
|
-
if (clipRect) {
|
|
11552
|
-
// animate in case resize is done during initial animation
|
|
11553
|
-
clipRect.animate({
|
|
11554
|
-
width: this.xAxis.len,
|
|
11555
|
-
height: clipHeight
|
|
11556
|
-
});
|
|
11557
|
-
var markerClipRect = chart.sharedClips[sharedClipKey + 'm'];
|
|
11558
|
-
// also change markers clip animation for consistency
|
|
11559
|
-
// (marker clip rects should exist only on chart init)
|
|
11560
|
-
if (markerClipRect) {
|
|
11561
|
-
markerClipRect.animate({
|
|
11562
|
-
width: this.xAxis.len
|
|
11563
|
-
});
|
|
11564
|
-
}
|
|
11565
|
-
}
|
|
11566
|
-
}
|
|
11567
|
-
}
|
|
11568
|
-
});
|
|
11569
12234
|
addEvent(Chart, 'update', function (e) {
|
|
11570
12235
|
var options = e.options;
|
|
11571
12236
|
// Use case: enabling scrollbar from a disabled state.
|
|
@@ -11582,68 +12247,10 @@
|
|
|
11582
12247
|
* Default Export
|
|
11583
12248
|
*
|
|
11584
12249
|
* */
|
|
11585
|
-
/* *
|
|
11586
|
-
*
|
|
11587
|
-
* API Options
|
|
11588
|
-
*
|
|
11589
|
-
* */
|
|
11590
|
-
/**
|
|
11591
|
-
* Compare the values of the series against the first non-null, non-
|
|
11592
|
-
* zero value in the visible range. The y axis will show percentage
|
|
11593
|
-
* or absolute change depending on whether `compare` is set to `"percent"`
|
|
11594
|
-
* or `"value"`. When this is applied to multiple series, it allows
|
|
11595
|
-
* comparing the development of the series against each other. Adds
|
|
11596
|
-
* a `change` field to every point object.
|
|
11597
|
-
*
|
|
11598
|
-
* @see [compareBase](#plotOptions.series.compareBase)
|
|
11599
|
-
* @see [Axis.setCompare()](/class-reference/Highcharts.Axis#setCompare)
|
|
11600
|
-
*
|
|
11601
|
-
* @sample {highstock} stock/plotoptions/series-compare-percent/
|
|
11602
|
-
* Percent
|
|
11603
|
-
* @sample {highstock} stock/plotoptions/series-compare-value/
|
|
11604
|
-
* Value
|
|
11605
|
-
*
|
|
11606
|
-
* @type {string}
|
|
11607
|
-
* @since 1.0.1
|
|
11608
|
-
* @product highstock
|
|
11609
|
-
* @apioption plotOptions.series.compare
|
|
11610
|
-
*/
|
|
11611
|
-
/**
|
|
11612
|
-
* Defines if comparison should start from the first point within the visible
|
|
11613
|
-
* range or should start from the first point **before** the range.
|
|
11614
|
-
*
|
|
11615
|
-
* In other words, this flag determines if first point within the visible range
|
|
11616
|
-
* will have 0% (`compareStart=true`) or should have been already calculated
|
|
11617
|
-
* according to the previous point (`compareStart=false`).
|
|
11618
|
-
*
|
|
11619
|
-
* @sample {highstock} stock/plotoptions/series-comparestart/
|
|
11620
|
-
* Calculate compare within visible range
|
|
11621
|
-
*
|
|
11622
|
-
* @type {boolean}
|
|
11623
|
-
* @default false
|
|
11624
|
-
* @since 6.0.0
|
|
11625
|
-
* @product highstock
|
|
11626
|
-
* @apioption plotOptions.series.compareStart
|
|
11627
|
-
*/
|
|
11628
|
-
/**
|
|
11629
|
-
* When [compare](#plotOptions.series.compare) is `percent`, this option
|
|
11630
|
-
* dictates whether to use 0 or 100 as the base of comparison.
|
|
11631
|
-
*
|
|
11632
|
-
* @sample {highstock} stock/plotoptions/series-comparebase/
|
|
11633
|
-
* Compare base is 100
|
|
11634
|
-
*
|
|
11635
|
-
* @type {number}
|
|
11636
|
-
* @default 0
|
|
11637
|
-
* @since 5.0.6
|
|
11638
|
-
* @product highstock
|
|
11639
|
-
* @validvalue [0, 100]
|
|
11640
|
-
* @apioption plotOptions.series.compareBase
|
|
11641
|
-
*/
|
|
11642
|
-
''; // keeps doclets above in transpiled file
|
|
11643
12250
|
|
|
11644
12251
|
return StockChart;
|
|
11645
12252
|
});
|
|
11646
|
-
_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) {
|
|
12253
|
+
_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) {
|
|
11647
12254
|
|
|
11648
12255
|
var G = Highcharts;
|
|
11649
12256
|
// Classes
|
|
@@ -11652,6 +12259,7 @@
|
|
|
11652
12259
|
// Compositions
|
|
11653
12260
|
Scrollbar.compose(G.Axis);
|
|
11654
12261
|
OrdinalAxis.compose(G.Axis, G.Series, G.Chart);
|
|
12262
|
+
DataModifyComposition.compose(G.Series, G.Axis, G.Point);
|
|
11655
12263
|
|
|
11656
12264
|
});
|
|
11657
12265
|
}));
|