highcharts 9.2.1 → 9.3.2
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 +46 -1
- package/css/highcharts.scss +40 -0
- package/css/stocktools/gui.css +1 -1
- package/css/themes/dark-unica.css +46 -1
- package/css/themes/grid-light.css +46 -1
- package/css/themes/sand-signika.css +46 -1
- package/es-modules/Accessibility/A11yI18n.js +269 -224
- package/es-modules/Accessibility/Accessibility.js +244 -129
- package/es-modules/Accessibility/AccessibilityComponent.js +78 -313
- package/es-modules/Accessibility/Components/AnnotationsA11y.js +19 -5
- package/es-modules/Accessibility/Components/ContainerComponent.js +53 -28
- package/es-modules/Accessibility/Components/InfoRegionsComponent.js +178 -120
- package/es-modules/Accessibility/Components/LegendComponent.js +251 -129
- package/es-modules/Accessibility/Components/MenuComponent.js +239 -154
- package/es-modules/Accessibility/Components/RangeSelectorComponent.js +172 -93
- package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +161 -115
- package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +138 -69
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +67 -28
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +48 -56
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +387 -343
- package/es-modules/Accessibility/Components/ZoomComponent.js +156 -70
- package/es-modules/Accessibility/FocusBorder.js +192 -152
- package/es-modules/Accessibility/HighContrastMode.js +79 -66
- package/es-modules/Accessibility/HighContrastTheme.js +10 -0
- package/es-modules/Accessibility/KeyboardNavigation.js +151 -75
- package/es-modules/Accessibility/KeyboardNavigationHandler.js +71 -44
- package/es-modules/Accessibility/Options/DeprecatedOptions.js +21 -4
- package/es-modules/Accessibility/Options/LangOptions.js +4 -5
- package/es-modules/Accessibility/Options/Options.js +32 -17
- package/es-modules/Accessibility/ProxyElement.js +218 -0
- package/es-modules/Accessibility/ProxyProvider.js +302 -0
- package/es-modules/Accessibility/Utils/Announcer.js +17 -10
- package/es-modules/Accessibility/Utils/ChartUtilities.js +55 -45
- 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 -42
- package/es-modules/Core/Animation/Fx.js +5 -14
- package/es-modules/Core/Axis/Axis.js +77 -96
- package/es-modules/Core/Axis/Axis3D.js +10 -4
- package/es-modules/Core/Axis/AxisDefaults.js +35 -24
- package/es-modules/Core/Axis/BrokenAxis.js +17 -11
- package/es-modules/Core/Axis/Color/ColorAxis.js +7 -4
- package/es-modules/Core/Axis/Color/ColorAxisComposition.js +55 -5
- package/es-modules/Core/Axis/Color/ColorAxisDefaults.js +5 -5
- package/es-modules/Core/Axis/DateTimeAxis.js +3 -14
- package/es-modules/Core/Axis/GridAxis.js +26 -16
- package/es-modules/Core/Axis/NavigatorAxis.js +0 -5
- package/es-modules/Core/Axis/OrdinalAxis.js +88 -92
- package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +4 -5
- package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js +0 -5
- package/es-modules/Core/Axis/RadialAxis.js +7 -28
- package/es-modules/Core/Axis/ScrollbarAxis.js +27 -12
- package/es-modules/Core/Axis/StackingAxis.js +2 -1
- package/es-modules/Core/Axis/Tick.js +2 -4
- package/es-modules/Core/Axis/TreeGridAxis.js +28 -19
- package/es-modules/Core/Axis/TreeGridTick.js +5 -3
- package/es-modules/Core/Axis/WaterfallAxis.js +1 -1
- package/es-modules/Core/Axis/ZAxis.js +1 -1
- package/es-modules/Core/Chart/Chart.js +44 -47
- package/es-modules/Core/Chart/Chart3D.js +23 -10
- package/es-modules/Core/Chart/ChartDefaults.js +3 -4
- package/es-modules/Core/Chart/ChartNavigationComposition.js +92 -0
- package/es-modules/Core/Chart/GanttChart.js +4 -4
- package/es-modules/Core/Chart/MapChart.js +13 -25
- package/es-modules/Core/Chart/StockChart.js +13 -316
- package/es-modules/Core/Color/Palettes.js +22 -0
- package/es-modules/Core/DefaultOptions.js +22 -19
- package/es-modules/Core/Foundation.js +39 -31
- package/es-modules/Core/Geometry/CircleUtilities.js +2 -1
- package/es-modules/Core/Globals.js +1 -1
- package/es-modules/Core/HttpUtilities.js +8 -7
- package/es-modules/Core/Legend/Legend.js +19 -16
- package/es-modules/Core/Navigator.js +41 -30
- package/es-modules/Core/Pointer.js +52 -45
- package/es-modules/Core/Renderer/HTML/AST.js +29 -14
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +27 -20
- package/es-modules/Core/Renderer/HTML/HTMLRenderer.js +8 -6
- package/es-modules/Core/Renderer/RendererUtilities.js +2 -2
- package/es-modules/Core/Renderer/SVG/SVGElement.js +11 -20
- package/es-modules/Core/Renderer/SVG/SVGLabel.js +17 -8
- package/es-modules/Core/Renderer/SVG/SVGRenderer.js +25 -29
- package/es-modules/Core/Renderer/SVG/SVGRenderer3D.js +12 -5
- package/es-modules/Core/Renderer/SVG/TextBuilder.js +18 -12
- package/es-modules/Core/Responsive.js +2 -3
- package/es-modules/Core/Scrollbar.js +14 -12
- package/es-modules/Core/ScrollbarDefaults.js +10 -9
- package/es-modules/Core/Series/DataLabel.js +19 -15
- package/es-modules/Core/Series/Point.js +22 -19
- package/es-modules/Core/Series/Series.js +200 -235
- package/es-modules/Core/Series/SeriesDefaults.js +8 -8
- package/es-modules/Core/Series/SeriesRegistry.js +1 -2
- package/es-modules/Core/Time.js +14 -11
- package/es-modules/Core/Tooltip.js +63 -53
- package/es-modules/Core/Utilities.js +20 -24
- package/es-modules/Data/DataConverter.js +483 -0
- package/es-modules/Data/DataPromise.js +252 -0
- package/es-modules/Data/DataSeriesConverter.js +207 -0
- package/es-modules/Data/DataTable.js +1205 -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 +400 -0
- package/es-modules/Data/Parsers/DataParser.js +101 -0
- package/es-modules/Data/Parsers/GoogleSheetsParser.js +223 -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 +169 -0
- package/es-modules/Data/Stores/HTMLTableStore.js +353 -0
- package/es-modules/Extensions/Annotations/Annotations.js +69 -18
- package/es-modules/Extensions/Annotations/ControlPoint.js +1 -3
- package/es-modules/Extensions/Annotations/Controllables/ControllableCircle.js +1 -1
- package/es-modules/Extensions/Annotations/Controllables/ControllableEllipse.js +199 -0
- package/es-modules/Extensions/Annotations/Controllables/ControllableImage.js +1 -1
- package/es-modules/Extensions/Annotations/Controllables/ControllableLabel.js +3 -6
- package/es-modules/Extensions/Annotations/Controllables/ControllablePath.js +3 -2
- package/es-modules/Extensions/Annotations/Controllables/ControllableRect.js +1 -1
- package/es-modules/Extensions/Annotations/Mixins/ControllableMixin.js +13 -4
- package/es-modules/Extensions/Annotations/Mixins/EventEmitterMixin.js +0 -1
- package/es-modules/Extensions/Annotations/Mixins/MarkerMixin.js +5 -4
- package/es-modules/Extensions/Annotations/NavigationBindings.js +120 -53
- package/es-modules/Extensions/Annotations/Popup.js +494 -148
- package/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +51 -2
- package/es-modules/Extensions/Annotations/Types/CrookedLine.js +5 -3
- package/es-modules/Extensions/Annotations/Types/ElliottWave.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 +29 -19
- package/es-modules/Extensions/Annotations/Types/Pitchfork.js +7 -6
- package/es-modules/Extensions/Annotations/Types/TimeCycles.js +211 -0
- package/es-modules/Extensions/Annotations/Types/Tunnel.js +13 -10
- package/es-modules/Extensions/Annotations/Types/VerticalLine.js +1 -1
- package/es-modules/Extensions/Boost/BoostOptions.js +2 -2
- package/es-modules/Extensions/Boost/BoostOverrides.js +6 -10
- package/es-modules/Extensions/Boost/BoostUtils.js +0 -6
- package/es-modules/Extensions/Boost/WGLRenderer.js +16 -12
- package/es-modules/Extensions/Boost/WGLShader.js +13 -11
- package/es-modules/Extensions/Boost/WGLVBuffer.js +4 -7
- package/es-modules/Extensions/BoostCanvas.js +1 -2
- package/es-modules/Extensions/CurrentDateIndication.js +2 -3
- package/es-modules/Extensions/Data.js +77 -115
- package/es-modules/Extensions/DataGrouping.js +54 -32
- package/es-modules/Extensions/Debugger/ErrorMessages.js +2 -2
- package/es-modules/Extensions/DownloadURL.js +2 -2
- package/es-modules/Extensions/DragPanes.js +1 -2
- package/es-modules/Extensions/DraggablePoints.js +7 -8
- package/es-modules/Extensions/Drilldown.js +11 -7
- package/es-modules/Extensions/ExportData.js +6 -5
- package/es-modules/Extensions/Exporting/Exporting.js +35 -48
- package/es-modules/Extensions/Exporting/ExportingDefaults.js +8 -15
- package/es-modules/Extensions/FullScreen.js +4 -3
- package/es-modules/Extensions/GeoJSON.js +42 -66
- package/es-modules/Extensions/MarkerClusters.js +118 -98
- package/es-modules/Extensions/Math3D.js +4 -4
- package/es-modules/Extensions/NoDataToDisplay.js +1 -2
- package/es-modules/Extensions/OfflineExporting/OfflineExporting.js +33 -33
- package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
- package/es-modules/Extensions/Oldie/Oldie.js +14 -79
- package/es-modules/Extensions/Oldie/VMLAxis3D.js +5 -1
- package/es-modules/Extensions/OverlappingDataLabels.js +10 -6
- package/es-modules/Extensions/Pane.js +11 -12
- package/es-modules/Extensions/ParallelCoordinates.js +5 -3
- package/es-modules/Extensions/PatternFill.js +17 -11
- package/es-modules/Extensions/Polar.js +7 -4
- package/es-modules/Extensions/PriceIndication.js +2 -1
- package/es-modules/Extensions/RangeSelector.js +22 -59
- package/es-modules/Extensions/ScrollablePlotArea.js +2 -2
- package/es-modules/Extensions/SeriesLabel.js +1 -1
- package/es-modules/Extensions/Sonification/ChartSonify.js +279 -663
- package/es-modules/Extensions/Sonification/Earcon.js +136 -102
- package/es-modules/Extensions/Sonification/Instrument.js +493 -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 +207 -152
- package/es-modules/Extensions/Sonification/SeriesSonify.js +474 -0
- package/es-modules/Extensions/Sonification/SignalHandler.js +122 -0
- package/es-modules/Extensions/Sonification/Sonification.js +27 -53
- package/es-modules/Extensions/Sonification/{Utilities.js → SonificationUtilities.js} +70 -88
- package/es-modules/Extensions/Sonification/Timeline.js +250 -567
- package/es-modules/Extensions/Sonification/TimelineEvent.js +157 -0
- package/es-modules/Extensions/Sonification/TimelinePath.js +311 -0
- package/es-modules/Extensions/Stacking.js +5 -23
- package/es-modules/Extensions/Themes/BrandDark.js +293 -0
- package/es-modules/Extensions/Themes/BrandLight.js +259 -0
- package/es-modules/Extensions/Themes/DarkUnica.js +4 -2
- package/es-modules/Extensions/Themes/Grid.js +4 -2
- package/es-modules/Extensions/Themes/GridLight.js +4 -2
- package/es-modules/Gantt/Connection.js +2 -2
- package/es-modules/Gantt/Pathfinder.js +6 -5
- package/es-modules/Gantt/PathfinderAlgorithms.js +12 -12
- package/es-modules/Maps/MapNavigation.js +30 -68
- package/es-modules/Maps/MapNavigationOptionsDefault.js +3 -0
- package/es-modules/Maps/MapPointer.js +8 -5
- package/es-modules/Maps/MapSymbols.js +23 -3
- package/es-modules/Maps/MapView.js +450 -0
- package/es-modules/Maps/MapViewOptionsDefault.js +97 -0
- package/es-modules/Maps/Projection.js +436 -0
- package/es-modules/Maps/ProjectionDefinition.js +9 -0
- package/es-modules/Maps/Projections/EqualEarth.js +42 -0
- package/es-modules/Maps/Projections/LambertConformalConic.js +52 -0
- package/es-modules/Maps/Projections/Miller.js +16 -0
- package/es-modules/Maps/Projections/Orthographic.js +26 -0
- package/es-modules/Maps/Projections/ProjectionRegistry.js +19 -0
- package/es-modules/Maps/Projections/WebMercator.js +24 -0
- package/es-modules/Series/Area/AreaSeries.js +13 -13
- package/es-modules/Series/Area3DSeries.js +4 -2
- package/es-modules/Series/AreaRange/AreaRangeSeries.js +28 -17
- package/es-modules/Series/Bellcurve/BellcurveSeries.js +4 -9
- 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 +5 -15
- 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 -19
- package/es-modules/{Mixins/CenteredSeries.js → Series/CenteredUtilities.js} +45 -23
- package/es-modules/{Mixins/ColorMapSeries.js → Series/ColorMapMixin.js} +10 -8
- package/es-modules/Series/Column/ColumnDataLabel.js +5 -5
- package/es-modules/Series/Column/ColumnSeries.js +19 -18
- package/es-modules/Series/Column3D/Column3DComposition.js +1 -2
- package/es-modules/Series/ColumnPyramid/ColumnPyramidSeries.js +11 -8
- package/es-modules/Series/ColumnRange/ColumnRangeSeries.js +2 -1
- package/es-modules/Series/Cylinder/CylinderComposition.js +36 -4
- package/es-modules/Series/DataModifyComposition.js +539 -0
- package/es-modules/Series/DependencyWheel/DependencyWheelPoint.js +2 -6
- package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +1 -1
- package/es-modules/Series/DerivedComposition.js +137 -0
- package/es-modules/Series/DrawPointComposition.js +111 -0
- package/es-modules/Series/Dumbbell/DumbbellPoint.js +0 -1
- package/es-modules/Series/Dumbbell/DumbbellSeries.js +2 -6
- package/es-modules/Series/ErrorBar/ErrorBarSeries.js +1 -2
- package/es-modules/Series/Flags/FlagsSeries.js +18 -25
- package/es-modules/Series/Flags/FlagsSymbols.js +2 -2
- package/es-modules/Series/Funnel/FunnelSeries.js +6 -5
- package/es-modules/Series/Funnel3D/Funnel3DComposition.js +14 -8
- package/es-modules/Series/Funnel3D/Funnel3DSeries.js +2 -1
- package/es-modules/Series/Gantt/GanttPoint.js +1 -1
- package/es-modules/Series/Gantt/GanttSeries.js +3 -3
- 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 +378 -0
- package/es-modules/Series/Heatmap/HeatmapPoint.js +13 -14
- package/es-modules/Series/Heatmap/HeatmapSeries.js +24 -12
- package/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +10 -9
- package/es-modules/Series/Histogram/HistogramSeries.js +7 -11
- package/es-modules/Series/HollowCandlestick/HollowCandlestickPoint.js +1 -4
- package/es-modules/Series/HollowCandlestick/HollowCandlestickSeries.js +28 -30
- package/es-modules/Series/Item/ItemSeries.js +4 -5
- package/es-modules/Series/Line/LineSeries.js +1 -2
- package/es-modules/Series/Map/MapPoint.js +27 -14
- package/es-modules/Series/Map/MapSeries.js +283 -322
- package/es-modules/Series/MapBubble/MapBubblePoint.js +0 -3
- package/es-modules/Series/MapBubble/MapBubbleSeries.js +10 -1
- package/es-modules/Series/MapLine/MapLineSeries.js +2 -4
- package/es-modules/Series/MapPoint/MapPointPoint.js +5 -1
- package/es-modules/Series/MapPoint/MapPointSeries.js +99 -14
- package/es-modules/Series/Networkgraph/DraggableNodes.js +0 -4
- package/es-modules/Series/Networkgraph/Integrations.js +8 -22
- package/es-modules/Series/Networkgraph/Networkgraph.js +6 -10
- package/es-modules/Series/Networkgraph/QuadTree.js +1 -3
- package/es-modules/{Mixins/Nodes.js → Series/NodesComposition.js} +78 -30
- package/es-modules/Series/OHLC/OHLCPoint.js +2 -7
- 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 +6 -5
- package/es-modules/Series/PackedBubble/PackedBubbleComposition.js +1 -0
- package/es-modules/Series/PackedBubble/PackedBubblePoint.js +1 -1
- package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +48 -10
- package/es-modules/Series/ParetoSeries/ParetoSeries.js +3 -7
- package/es-modules/Series/Pie/PieDataLabel.js +1 -2
- package/es-modules/Series/Pie/PiePoint.js +2 -2
- package/es-modules/Series/Pie/PieSeries.js +7 -8
- package/es-modules/Series/Pie3D/Pie3DComposition.js +2 -1
- package/es-modules/Series/Pie3D/Pie3DPoint.js +2 -1
- package/es-modules/Series/Pie3D/Pie3DSeries.js +1 -1
- package/es-modules/Series/Pyramid3D/Pyramid3DSeries.js +2 -1
- package/es-modules/Series/Sankey/SankeyPoint.js +0 -4
- package/es-modules/Series/Sankey/SankeySeries.js +92 -22
- package/es-modules/Series/SolidGauge/SolidGaugeComposition.js +3 -1
- package/es-modules/Series/Spline/SplineSeries.js +0 -8
- package/es-modules/Series/Sunburst/SunburstPoint.js +2 -3
- package/es-modules/Series/Sunburst/SunburstSeries.js +6 -6
- package/es-modules/Series/Sunburst/SunburstUtilities.js +3 -2
- package/es-modules/Series/Tilemap/TilemapPoint.js +2 -5
- package/es-modules/Series/Tilemap/TilemapShapes.js +0 -7
- package/es-modules/Series/Timeline/TimelineSeries.js +3 -4
- package/es-modules/{Mixins/TreeSeries.js → Series/TreeUtilities.js} +88 -78
- package/es-modules/Series/Treemap/TreemapPoint.js +2 -2
- package/es-modules/Series/Treemap/TreemapSeries.js +22 -25
- package/es-modules/Series/Variwide/VariwideSeries.js +5 -1
- package/es-modules/Series/Venn/VennPoint.js +16 -7
- package/es-modules/Series/Venn/VennSeries.js +11 -17
- package/es-modules/Series/Venn/VennUtils.js +551 -439
- package/es-modules/Series/Waterfall/WaterfallSeries.js +8 -6
- 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 +26 -22
- package/es-modules/Series/Wordcloud/WordcloudUtils.js +669 -484
- package/es-modules/Series/XRange/XRangePoint.js +7 -12
- package/es-modules/Series/XRange/XRangeSeries.js +4 -20
- package/es-modules/Stock/Indicators/ABands/ABandsIndicator.js +15 -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 +4 -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 +39 -11
- package/es-modules/Stock/Indicators/CMF/CMFIndicator.js +35 -15
- 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 +28 -16
- package/es-modules/Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js +18 -11
- package/es-modules/Stock/Indicators/EMA/EMAIndicator.js +1 -3
- package/es-modules/Stock/Indicators/IKH/IKHIndicator.js +6 -6
- package/es-modules/Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js +23 -9
- package/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +16 -19
- package/es-modules/Stock/Indicators/LinearRegression/LinearRegression.js +32 -14
- 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 +2 -3
- package/es-modules/Stock/Indicators/MultipleLinesComposition.js +294 -0
- package/es-modules/Stock/Indicators/NATR/NATRIndicator.js +1 -3
- package/es-modules/Stock/Indicators/PC/PCIndicator.js +25 -13
- package/es-modules/Stock/Indicators/PPO/PPOIndicator.js +1 -11
- package/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +2 -1
- package/es-modules/Stock/Indicators/RSI/RSIIndicator.js +2 -1
- package/es-modules/Stock/Indicators/SMA/SMAComposition.js +0 -26
- package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +32 -50
- package/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +0 -8
- package/es-modules/Stock/Indicators/Stochastic/StochasticIndicator.js +18 -9
- 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 +26 -10
- package/es-modules/Stock/Indicators/VWAP/VWAPIndicator.js +19 -7
- package/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +2 -3
- package/es-modules/Stock/StockToolsBindings.js +156 -47
- package/es-modules/Stock/StockToolsGui.js +442 -37
- 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/brand-dark.src.js +14 -0
- package/es-modules/masters/themes/brand-light.src.js +14 -0
- 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.js.map +1 -1
- package/highcharts-3d.src.js +65 -35
- package/highcharts-gantt.js +800 -803
- package/highcharts-gantt.js.map +1 -1
- package/highcharts-gantt.src.js +1359 -1429
- package/highcharts-more.js +194 -193
- package/highcharts-more.js.map +1 -1
- package/highcharts-more.src.js +280 -222
- package/highcharts.d.ts +10228 -768
- package/highcharts.js +585 -588
- package/highcharts.js.map +1 -1
- package/highcharts.src.d.ts +10228 -768
- package/highcharts.src.js +995 -1066
- package/highmaps.js +727 -707
- package/highmaps.js.map +1 -1
- package/highmaps.src.js +3243 -2135
- package/highstock.js +788 -783
- package/highstock.js.map +1 -1
- package/highstock.src.js +2492 -1981
- package/indicators/acceleration-bands.d.ts +17 -1
- package/indicators/acceleration-bands.js +11 -9
- package/indicators/acceleration-bands.js.map +1 -1
- package/indicators/acceleration-bands.src.d.ts +17 -1
- package/indicators/acceleration-bands.src.js +238 -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.d.ts +17 -1
- package/indicators/aroon-oscillator.js +10 -9
- package/indicators/aroon-oscillator.js.map +1 -1
- package/indicators/aroon-oscillator.src.d.ts +17 -1
- package/indicators/aroon-oscillator.src.js +230 -177
- package/indicators/aroon.d.ts +17 -1
- package/indicators/aroon.js +11 -9
- package/indicators/aroon.js.map +1 -1
- package/indicators/aroon.src.d.ts +17 -1
- package/indicators/aroon.src.js +227 -112
- package/indicators/atr.js +1 -1
- package/indicators/atr.src.js +1 -1
- package/indicators/bollinger-bands.d.ts +17 -1
- package/indicators/bollinger-bands.js +12 -9
- package/indicators/bollinger-bands.js.map +1 -1
- package/indicators/bollinger-bands.src.d.ts +17 -1
- package/indicators/bollinger-bands.src.js +262 -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.js.map +1 -1
- package/indicators/cmf.src.js +36 -16
- 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 +20 -74
- package/indicators/dmi.js +12 -11
- package/indicators/dmi.js.map +1 -1
- package/indicators/dmi.src.js +252 -121
- 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.js.map +1 -1
- package/indicators/ichimoku-kinko-hyo.src.js +7 -7
- package/indicators/indicators-all.d.ts +17 -1
- package/indicators/indicators-all.js +198 -203
- package/indicators/indicators-all.js.map +1 -1
- package/indicators/indicators-all.src.d.ts +17 -1
- package/indicators/indicators-all.src.js +892 -777
- package/indicators/indicators.js +12 -12
- package/indicators/indicators.js.map +1 -1
- package/indicators/indicators.src.js +213 -144
- package/indicators/keltner-channels.d.ts +17 -1
- package/indicators/keltner-channels.js +11 -10
- package/indicators/keltner-channels.js.map +1 -1
- package/indicators/keltner-channels.src.d.ts +17 -1
- package/indicators/keltner-channels.src.js +246 -118
- package/indicators/klinger.js +14 -13
- package/indicators/klinger.js.map +1 -1
- package/indicators/klinger.src.js +239 -187
- package/indicators/macd.js +2 -2
- package/indicators/macd.js.map +1 -1
- package/indicators/macd.src.js +3 -4
- 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.js.map +1 -1
- package/indicators/pivot-points.src.js +3 -2
- package/indicators/ppo.js +5 -6
- package/indicators/ppo.js.map +1 -1
- package/indicators/ppo.src.js +3 -75
- package/indicators/price-channel.d.ts +17 -1
- package/indicators/price-channel.js +11 -9
- package/indicators/price-channel.js.map +1 -1
- package/indicators/price-channel.src.d.ts +17 -1
- package/indicators/price-channel.src.js +288 -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.js.map +1 -1
- package/indicators/regressions.src.js +39 -21
- package/indicators/roc.js +1 -1
- package/indicators/roc.src.js +1 -1
- package/indicators/rsi.js +1 -1
- package/indicators/rsi.js.map +1 -1
- package/indicators/rsi.src.js +3 -2
- 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.d.ts +17 -1
- package/indicators/stochastic.js +12 -10
- package/indicators/stochastic.js.map +1 -1
- package/indicators/stochastic.src.d.ts +17 -1
- package/indicators/stochastic.src.js +282 -165
- 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 +27 -10
- package/indicators/vwap.js +1 -1
- package/indicators/vwap.js.map +1 -1
- package/indicators/vwap.src.js +20 -8
- 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 +0 -30
- package/modules/accessibility.js +240 -216
- package/modules/accessibility.js.map +1 -1
- package/modules/accessibility.src.d.ts +0 -30
- package/modules/accessibility.src.js +7807 -6400
- package/modules/annotations-advanced.d.ts +30 -0
- package/modules/annotations-advanced.js +192 -165
- package/modules/annotations-advanced.js.map +1 -1
- package/modules/annotations-advanced.src.d.ts +30 -0
- package/modules/annotations-advanced.src.js +1716 -416
- package/modules/annotations.js +125 -110
- package/modules/annotations.js.map +1 -1
- package/modules/annotations.src.js +1059 -304
- 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 +42 -51
- package/modules/broken-axis.js +1 -1
- package/modules/broken-axis.js.map +1 -1
- package/modules/broken-axis.src.js +18 -12
- 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 +77 -103
- 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.js.map +1 -1
- package/modules/cylinder.src.js +37 -5
- package/modules/data.d.ts +6 -6
- package/modules/data.js +32 -32
- package/modules/data.js.map +1 -1
- package/modules/data.src.d.ts +6 -6
- package/modules/data.src.js +94 -140
- package/modules/datagrouping.js +20 -20
- package/modules/datagrouping.js.map +1 -1
- package/modules/datagrouping.src.js +56 -33
- package/modules/debugger.js +3 -3
- package/modules/debugger.js.map +1 -1
- package/modules/debugger.src.js +3 -3
- package/modules/dependency-wheel.js +11 -11
- package/modules/dependency-wheel.js.map +1 -1
- package/modules/dependency-wheel.src.js +5 -8
- 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.js.map +1 -1
- package/modules/draggable-points.src.js +8 -9
- package/modules/drilldown.js +24 -24
- package/modules/drilldown.js.map +1 -1
- package/modules/drilldown.src.js +13 -8
- package/modules/dumbbell.js +17 -17
- package/modules/dumbbell.js.map +1 -1
- package/modules/dumbbell.src.js +4 -8
- package/modules/export-data.js +19 -19
- package/modules/export-data.js.map +1 -1
- package/modules/export-data.src.js +9 -8
- package/modules/exporting.js +39 -38
- package/modules/exporting.js.map +1 -1
- package/modules/exporting.src.js +134 -116
- package/modules/full-screen.js +1 -1
- package/modules/full-screen.js.map +1 -1
- package/modules/full-screen.src.js +5 -4
- 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.js.map +1 -1
- package/modules/funnel3d.src.js +17 -10
- package/modules/gantt.js +217 -218
- package/modules/gantt.js.map +1 -1
- package/modules/gantt.src.js +364 -363
- package/modules/grid-axis.js +1 -1
- package/modules/grid-axis.js.map +1 -1
- package/modules/grid-axis.src.js +27 -19
- package/modules/heatmap.js +39 -39
- package/modules/heatmap.js.map +1 -1
- package/modules/heatmap.src.js +132 -141
- package/modules/heikinashi.js +1 -1
- package/modules/heikinashi.js.map +1 -1
- package/modules/heikinashi.src.js +12 -10
- package/modules/histogram-bellcurve.js +13 -13
- package/modules/histogram-bellcurve.js.map +1 -1
- package/modules/histogram-bellcurve.src.js +97 -91
- package/modules/hollowcandlestick.js +9 -9
- package/modules/hollowcandlestick.js.map +1 -1
- package/modules/hollowcandlestick.src.js +31 -35
- package/modules/item-series.js +6 -6
- package/modules/item-series.js.map +1 -1
- package/modules/item-series.src.js +6 -6
- package/modules/lollipop.js +1 -1
- package/modules/lollipop.src.js +1 -1
- package/modules/map.d.ts +138 -14
- package/modules/map.js +144 -122
- package/modules/map.js.map +1 -1
- package/modules/map.src.d.ts +138 -14
- package/modules/map.src.js +2253 -1074
- package/modules/marker-clusters.js +36 -36
- package/modules/marker-clusters.js.map +1 -1
- package/modules/marker-clusters.src.js +176 -143
- 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 +103 -78
- package/modules/no-data-to-display.js +5 -5
- package/modules/no-data-to-display.js.map +1 -1
- package/modules/no-data-to-display.src.js +3 -3
- package/modules/offline-exporting.js +18 -17
- package/modules/offline-exporting.js.map +1 -1
- package/modules/offline-exporting.src.js +39 -44
- 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 +21 -81
- package/modules/organization.js +13 -13
- package/modules/organization.js.map +1 -1
- package/modules/organization.src.js +8 -6
- 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.js.map +1 -1
- package/modules/parallel-coordinates.src.js +6 -4
- 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.js.map +1 -1
- package/modules/pathfinder.src.js +21 -20
- package/modules/pattern-fill.js +1 -1
- package/modules/pattern-fill.js.map +1 -1
- package/modules/pattern-fill.src.js +18 -12
- package/modules/price-indicator.js +1 -1
- package/modules/price-indicator.js.map +1 -1
- package/modules/price-indicator.src.js +3 -2
- package/modules/pyramid3d.js +1 -1
- package/modules/pyramid3d.js.map +1 -1
- package/modules/pyramid3d.src.js +3 -2
- 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 +307 -181
- package/modules/series-label.js +1 -1
- package/modules/series-label.js.map +1 -1
- package/modules/series-label.src.js +2 -2
- package/modules/solid-gauge.js +1 -1
- package/modules/solid-gauge.js.map +1 -1
- package/modules/solid-gauge.src.js +17 -2
- package/modules/sonification.js +59 -55
- package/modules/sonification.js.map +1 -1
- package/modules/sonification.src.js +3093 -2594
- package/modules/static-scale.js +1 -1
- package/modules/static-scale.src.js +1 -1
- package/modules/stock-tools.js +178 -163
- package/modules/stock-tools.js.map +1 -1
- package/modules/stock-tools.src.js +1136 -229
- 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 +1822 -1240
- package/modules/streamgraph.js +1 -1
- package/modules/streamgraph.src.js +1 -1
- package/modules/sunburst.js +60 -60
- package/modules/sunburst.js.map +1 -1
- package/modules/sunburst.src.js +281 -248
- package/modules/tilemap.js +17 -17
- package/modules/tilemap.js.map +1 -1
- package/modules/tilemap.src.js +3 -13
- 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 +201 -169
- package/modules/treemap.js +41 -41
- package/modules/treemap.js.map +1 -1
- package/modules/treemap.src.js +266 -232
- package/modules/variable-pie.js +1 -1
- package/modules/variable-pie.src.js +1 -1
- package/modules/variwide.js +1 -1
- package/modules/variwide.js.map +1 -1
- package/modules/variwide.src.js +7 -3
- 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 +740 -731
- 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 +898 -954
- package/modules/xrange.js +2 -2
- package/modules/xrange.js.map +1 -1
- package/modules/xrange.src.js +12 -33
- package/package.json +1 -1
- package/themes/avocado.js +1 -1
- package/themes/avocado.src.js +1 -1
- package/themes/brand-dark.js +15 -0
- package/themes/brand-dark.js.map +1 -0
- package/themes/brand-dark.src.js +328 -0
- package/themes/brand-light.js +15 -0
- package/themes/brand-light.js.map +1 -0
- package/themes/brand-light.src.js +294 -0
- 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.js.map +1 -1
- package/themes/dark-unica.src.js +5 -3
- package/themes/gray.js +1 -1
- package/themes/gray.src.js +1 -1
- package/themes/grid-light.js +1 -1
- package/themes/grid-light.js.map +1 -1
- package/themes/grid-light.src.js +5 -3
- package/themes/grid.js +1 -1
- package/themes/grid.js.map +1 -1
- package/themes/grid.src.js +5 -3
- 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/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/MultipleLines.js +0 -181
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Highcharts JS v9.2
|
|
2
|
+
* @license Highcharts JS v9.3.2 (2021-11-29)
|
|
3
3
|
*
|
|
4
4
|
* Annotations module
|
|
5
5
|
*
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
*
|
|
50
50
|
* @private
|
|
51
51
|
* @mixin
|
|
52
|
-
* @memberOf Annotation
|
|
53
52
|
*/
|
|
54
53
|
var eventEmitterMixin = {
|
|
55
54
|
/**
|
|
@@ -293,8 +292,7 @@
|
|
|
293
292
|
* @param {Highcharts.AnnotationControllable} target
|
|
294
293
|
* @return {Highcharts.PositionObject}
|
|
295
294
|
*/
|
|
296
|
-
var
|
|
297
|
-
merge = U.merge,
|
|
295
|
+
var merge = U.merge,
|
|
298
296
|
pick = U.pick;
|
|
299
297
|
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
300
298
|
/**
|
|
@@ -362,7 +360,6 @@
|
|
|
362
360
|
* @param {boolean} visible
|
|
363
361
|
* Visibility of the control point.
|
|
364
362
|
*
|
|
365
|
-
* @return {void}
|
|
366
363
|
*/
|
|
367
364
|
ControlPoint.prototype.setVisibility = function (visible) {
|
|
368
365
|
this.graphic.attr('visibility', visible ? 'visible' : 'hidden');
|
|
@@ -412,7 +409,6 @@
|
|
|
412
409
|
* @param {Partial<Highcharts.AnnotationControlPointOptionsObject>} userOptions
|
|
413
410
|
* New options for the control point.
|
|
414
411
|
*
|
|
415
|
-
* @return {void}
|
|
416
412
|
*/
|
|
417
413
|
ControlPoint.prototype.update = function (userOptions) {
|
|
418
414
|
var chart = this.chart,
|
|
@@ -967,7 +963,8 @@
|
|
|
967
963
|
*/
|
|
968
964
|
getPointsOptions: function () {
|
|
969
965
|
var options = this.options;
|
|
970
|
-
return (options.points ||
|
|
966
|
+
return (options.points ||
|
|
967
|
+
(options.point && splat(options.point)));
|
|
971
968
|
},
|
|
972
969
|
/**
|
|
973
970
|
* Utility function for mapping item's options
|
|
@@ -1188,8 +1185,11 @@
|
|
|
1188
1185
|
*
|
|
1189
1186
|
* @param {number} dx translation for x coordinate
|
|
1190
1187
|
* @param {number} dy translation for y coordinate
|
|
1188
|
+
* @param {boolean|undefined} translateSecondPoint If the shape has two
|
|
1189
|
+
* points attached to it, this option allows you to translate also
|
|
1190
|
+
* the second point
|
|
1191
1191
|
*/
|
|
1192
|
-
translateShape: function (dx, dy) {
|
|
1192
|
+
translateShape: function (dx, dy, translateSecondPoint) {
|
|
1193
1193
|
var chart = this.annotation.chart,
|
|
1194
1194
|
// Annotation.options
|
|
1195
1195
|
shapeOptions = this.annotation.userOptions,
|
|
@@ -1197,11 +1197,16 @@
|
|
|
1197
1197
|
annotationIndex = chart.annotations.indexOf(this.annotation),
|
|
1198
1198
|
chartOptions = chart.options.annotations[annotationIndex];
|
|
1199
1199
|
this.translatePoint(dx, dy, 0);
|
|
1200
|
+
if (translateSecondPoint) {
|
|
1201
|
+
this.translatePoint(dx, dy, 1);
|
|
1202
|
+
}
|
|
1200
1203
|
// Options stored in:
|
|
1201
1204
|
// - chart (for exporting)
|
|
1202
1205
|
// - current config (for redraws)
|
|
1203
|
-
chartOptions[this.collection][this.index]
|
|
1204
|
-
|
|
1206
|
+
chartOptions[this.collection][this.index]
|
|
1207
|
+
.point = this.options.point;
|
|
1208
|
+
shapeOptions[this.collection][this.index]
|
|
1209
|
+
.point = this.options.point;
|
|
1205
1210
|
},
|
|
1206
1211
|
/**
|
|
1207
1212
|
* Rotate a controllable.
|
|
@@ -1419,13 +1424,13 @@
|
|
|
1419
1424
|
fill = itemOptions.fill,
|
|
1420
1425
|
color = defined(fill) && fill !== 'none' ?
|
|
1421
1426
|
fill :
|
|
1422
|
-
itemOptions.stroke
|
|
1423
|
-
|
|
1427
|
+
itemOptions.stroke;
|
|
1428
|
+
var setMarker = function (markerType) {
|
|
1424
1429
|
var markerId = itemOptions[markerType],
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1430
|
+
def,
|
|
1431
|
+
predefinedMarker,
|
|
1432
|
+
key,
|
|
1433
|
+
marker;
|
|
1429
1434
|
if (markerId) {
|
|
1430
1435
|
for (key in defs) { // eslint-disable-line guard-for-in
|
|
1431
1436
|
def = defs[key];
|
|
@@ -1440,13 +1445,13 @@
|
|
|
1440
1445
|
}
|
|
1441
1446
|
if (predefinedMarker) {
|
|
1442
1447
|
marker = item[markerType] = chart.renderer
|
|
1443
|
-
.addMarker((itemOptions.id || uniqueKey()) + '-' +
|
|
1444
|
-
markerId, merge(predefinedMarker, { color: color }));
|
|
1448
|
+
.addMarker((itemOptions.id || uniqueKey()) + '-' + markerId, merge(predefinedMarker, { color: color }));
|
|
1445
1449
|
item.attr(markerType, marker.getAttribute('id'));
|
|
1446
1450
|
}
|
|
1447
1451
|
}
|
|
1448
1452
|
};
|
|
1449
|
-
['markerStart', 'markerEnd']
|
|
1453
|
+
['markerStart', 'markerEnd']
|
|
1454
|
+
.forEach(setMarker);
|
|
1450
1455
|
}
|
|
1451
1456
|
};
|
|
1452
1457
|
addEvent(Chart, 'afterGetContainer', function () {
|
|
@@ -1517,7 +1522,7 @@
|
|
|
1517
1522
|
this.point = ControllableMixin.point;
|
|
1518
1523
|
this.rotate = ControllableMixin.rotate;
|
|
1519
1524
|
this.scale = ControllableMixin.scale;
|
|
1520
|
-
this.setControlPointsVisibility = ControllableMixin.setControlPointsVisibility;
|
|
1525
|
+
this.setControlPointsVisibility = (ControllableMixin.setControlPointsVisibility);
|
|
1521
1526
|
this.setMarkers = MarkerMixin.setItemMarkers;
|
|
1522
1527
|
this.transform = ControllableMixin.transform;
|
|
1523
1528
|
this.transformPoint = ControllableMixin.transformPoint;
|
|
@@ -1581,7 +1586,8 @@
|
|
|
1581
1586
|
null;
|
|
1582
1587
|
};
|
|
1583
1588
|
ControllablePath.prototype.shouldBeDrawn = function () {
|
|
1584
|
-
return (ControllableMixin.shouldBeDrawn.call(this) ||
|
|
1589
|
+
return (ControllableMixin.shouldBeDrawn.call(this) ||
|
|
1590
|
+
Boolean(this.options.d));
|
|
1585
1591
|
};
|
|
1586
1592
|
ControllablePath.prototype.render = function (parent) {
|
|
1587
1593
|
var options = this.options,
|
|
@@ -1708,7 +1714,7 @@
|
|
|
1708
1714
|
this.point = ControllableMixin.point;
|
|
1709
1715
|
this.rotate = ControllableMixin.rotate;
|
|
1710
1716
|
this.scale = ControllableMixin.scale;
|
|
1711
|
-
this.setControlPointsVisibility = ControllableMixin.setControlPointsVisibility;
|
|
1717
|
+
this.setControlPointsVisibility = (ControllableMixin.setControlPointsVisibility);
|
|
1712
1718
|
this.shouldBeDrawn = ControllableMixin.shouldBeDrawn;
|
|
1713
1719
|
this.transform = ControllableMixin.transform;
|
|
1714
1720
|
this.transformPoint = ControllableMixin.transformPoint;
|
|
@@ -1818,7 +1824,7 @@
|
|
|
1818
1824
|
this.point = ControllableMixin.point;
|
|
1819
1825
|
this.rotate = ControllableMixin.rotate;
|
|
1820
1826
|
this.scale = ControllableMixin.scale;
|
|
1821
|
-
this.setControlPointsVisibility = ControllableMixin.setControlPointsVisibility;
|
|
1827
|
+
this.setControlPointsVisibility = (ControllableMixin.setControlPointsVisibility);
|
|
1822
1828
|
this.shouldBeDrawn = ControllableMixin.shouldBeDrawn;
|
|
1823
1829
|
this.transform = ControllableMixin.transform;
|
|
1824
1830
|
this.transformPoint = ControllableMixin.transformPoint;
|
|
@@ -1890,6 +1896,215 @@
|
|
|
1890
1896
|
|
|
1891
1897
|
return ControllableCircle;
|
|
1892
1898
|
});
|
|
1899
|
+
_registerModule(_modules, 'Extensions/Annotations/Controllables/ControllableEllipse.js', [_modules['Extensions/Annotations/Mixins/ControllableMixin.js'], _modules['Extensions/Annotations/Controllables/ControllablePath.js'], _modules['Core/Utilities.js']], function (ControllableMixin, ControllablePath, U) {
|
|
1900
|
+
/* *
|
|
1901
|
+
*
|
|
1902
|
+
* Author: Pawel Lysy
|
|
1903
|
+
*
|
|
1904
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
1905
|
+
*
|
|
1906
|
+
* */
|
|
1907
|
+
var merge = U.merge,
|
|
1908
|
+
defined = U.defined;
|
|
1909
|
+
/**
|
|
1910
|
+
* A controllable ellipse class.
|
|
1911
|
+
*
|
|
1912
|
+
* @requires modules/annotations
|
|
1913
|
+
*
|
|
1914
|
+
* @private
|
|
1915
|
+
* @class
|
|
1916
|
+
* @name Highcharts.AnnotationControllableEllipse
|
|
1917
|
+
*
|
|
1918
|
+
* @param {Highcharts.Annotation} annotation an annotation instance
|
|
1919
|
+
* @param {Highcharts.AnnotationsShapeOptions} options a shape's options
|
|
1920
|
+
* @param {number} index of the Ellipse
|
|
1921
|
+
*/
|
|
1922
|
+
var ControllableEllipse = /** @class */ (function () {
|
|
1923
|
+
/* *
|
|
1924
|
+
*
|
|
1925
|
+
* Constructor
|
|
1926
|
+
*
|
|
1927
|
+
* */
|
|
1928
|
+
function ControllableEllipse(annotation, options, index) {
|
|
1929
|
+
/* *
|
|
1930
|
+
*
|
|
1931
|
+
* Properties
|
|
1932
|
+
*
|
|
1933
|
+
* */
|
|
1934
|
+
this.addControlPoints = ControllableMixin.addControlPoints;
|
|
1935
|
+
this.anchor = ControllableMixin.anchor;
|
|
1936
|
+
this.attr = ControllableMixin.attr;
|
|
1937
|
+
this.attrsFromOptions = ControllableMixin.attrsFromOptions;
|
|
1938
|
+
this.destroy = ControllableMixin.destroy;
|
|
1939
|
+
this.getPointsOptions = ControllableMixin.getPointsOptions;
|
|
1940
|
+
this.linkPoints = ControllableMixin.linkPoints;
|
|
1941
|
+
this.point = ControllableMixin.point;
|
|
1942
|
+
this.scale = ControllableMixin.scale;
|
|
1943
|
+
this.setControlPointsVisibility = (ControllableMixin.setControlPointsVisibility);
|
|
1944
|
+
this.shouldBeDrawn = ControllableMixin.shouldBeDrawn;
|
|
1945
|
+
this.transform = ControllableMixin.transform;
|
|
1946
|
+
this.translatePoint = ControllableMixin.translatePoint;
|
|
1947
|
+
this.transformPoint = ControllableMixin.transformPoint;
|
|
1948
|
+
/**
|
|
1949
|
+
* @type 'ellipse'
|
|
1950
|
+
*/
|
|
1951
|
+
this.type = 'ellipse';
|
|
1952
|
+
this.init(annotation, options, index);
|
|
1953
|
+
this.collection = 'shapes';
|
|
1954
|
+
}
|
|
1955
|
+
/* *
|
|
1956
|
+
*
|
|
1957
|
+
* Functions
|
|
1958
|
+
*
|
|
1959
|
+
* */
|
|
1960
|
+
ControllableEllipse.prototype.init = function (annotation, options, index) {
|
|
1961
|
+
if (defined(options.yAxis)) {
|
|
1962
|
+
options.points.forEach(function (point) {
|
|
1963
|
+
point.yAxis = options.yAxis;
|
|
1964
|
+
});
|
|
1965
|
+
}
|
|
1966
|
+
if (defined(options.xAxis)) {
|
|
1967
|
+
options.points.forEach(function (point) {
|
|
1968
|
+
point.xAxis = options.xAxis;
|
|
1969
|
+
});
|
|
1970
|
+
}
|
|
1971
|
+
ControllableMixin.init.call(this, annotation, options, index);
|
|
1972
|
+
};
|
|
1973
|
+
/**
|
|
1974
|
+
*
|
|
1975
|
+
* Render the element
|
|
1976
|
+
* @param parent parent SVG element.
|
|
1977
|
+
*/
|
|
1978
|
+
ControllableEllipse.prototype.render = function (parent) {
|
|
1979
|
+
this.graphic = this.annotation.chart.renderer.createElement('ellipse')
|
|
1980
|
+
.attr(this.attrsFromOptions(this.options))
|
|
1981
|
+
.add(parent);
|
|
1982
|
+
ControllableMixin.render.call(this);
|
|
1983
|
+
};
|
|
1984
|
+
/**
|
|
1985
|
+
* Translate the points.
|
|
1986
|
+
* Mostly used to handle dragging of the ellipse.
|
|
1987
|
+
*/
|
|
1988
|
+
ControllableEllipse.prototype.translate = function (dx, dy) {
|
|
1989
|
+
ControllableMixin.translateShape.call(this, dx, dy, true);
|
|
1990
|
+
};
|
|
1991
|
+
/**
|
|
1992
|
+
* Get the distance from the line to the point.
|
|
1993
|
+
* @param point1 first point which is on the line
|
|
1994
|
+
* @param point2 second point
|
|
1995
|
+
* @param x0 point's x value from which you want to calculate the distance from
|
|
1996
|
+
* @param y0 point's y value from which you want to calculate the distance from
|
|
1997
|
+
*/
|
|
1998
|
+
ControllableEllipse.prototype.getDistanceFromLine = function (point1, point2, x0, y0) {
|
|
1999
|
+
return Math.abs((point2.y - point1.y) * x0 - (point2.x - point1.x) * y0 +
|
|
2000
|
+
point2.x * point1.y - point2.y * point1.x) / Math.sqrt((point2.y - point1.y) * (point2.y - point1.y) +
|
|
2001
|
+
(point2.x - point1.x) * (point2.x - point1.x));
|
|
2002
|
+
};
|
|
2003
|
+
/**
|
|
2004
|
+
* The fuction calculates the svg attributes of the ellipse, and returns all
|
|
2005
|
+
* parameters neccessary to draw the ellipse.
|
|
2006
|
+
* @param position absolute position of the first point in points array
|
|
2007
|
+
* @param position2 absolute position of the second point in points array
|
|
2008
|
+
*/
|
|
2009
|
+
ControllableEllipse.prototype.getAttrs = function (position, position2) {
|
|
2010
|
+
var x1 = position.x,
|
|
2011
|
+
y1 = position.y,
|
|
2012
|
+
x2 = position2.x,
|
|
2013
|
+
y2 = position2.y,
|
|
2014
|
+
cx = (x1 + x2) / 2,
|
|
2015
|
+
cy = (y1 + y2) / 2,
|
|
2016
|
+
rx = Math.sqrt((x1 - x2) * (x1 - x2) / 4 + (y1 - y2) * (y1 - y2) / 4),
|
|
2017
|
+
tan = (y2 - y1) / (x2 - x1);
|
|
2018
|
+
var angle = Math.atan(tan) * 180 / Math.PI;
|
|
2019
|
+
if (cx < x1) {
|
|
2020
|
+
angle += 180;
|
|
2021
|
+
}
|
|
2022
|
+
var ry = this.getRY();
|
|
2023
|
+
return { cx: cx, cy: cy, rx: rx, ry: ry, angle: angle };
|
|
2024
|
+
};
|
|
2025
|
+
/**
|
|
2026
|
+
* Get the value of minor radius of the ellipse.
|
|
2027
|
+
*/
|
|
2028
|
+
ControllableEllipse.prototype.getRY = function () {
|
|
2029
|
+
var yAxis = this.getYAxis();
|
|
2030
|
+
return defined(yAxis) ?
|
|
2031
|
+
Math.abs(yAxis.toPixels(this.options.ry) - yAxis.toPixels(0)) :
|
|
2032
|
+
this.options.ry;
|
|
2033
|
+
};
|
|
2034
|
+
/**
|
|
2035
|
+
* get the yAxis object to which the ellipse is pinned.
|
|
2036
|
+
*/
|
|
2037
|
+
ControllableEllipse.prototype.getYAxis = function () {
|
|
2038
|
+
var yAxisIndex = this.options.yAxis;
|
|
2039
|
+
return this.chart.yAxis[yAxisIndex];
|
|
2040
|
+
};
|
|
2041
|
+
/**
|
|
2042
|
+
* Get the absolute coordinates of the MockPoint
|
|
2043
|
+
* @param point MockPoint that is added through options
|
|
2044
|
+
*/
|
|
2045
|
+
ControllableEllipse.prototype.getAbsolutePosition = function (point) {
|
|
2046
|
+
return this.anchor(point).absolutePosition;
|
|
2047
|
+
};
|
|
2048
|
+
/**
|
|
2049
|
+
*
|
|
2050
|
+
* Redraw the element
|
|
2051
|
+
* @param animation display an annimation
|
|
2052
|
+
*/
|
|
2053
|
+
ControllableEllipse.prototype.redraw = function (animation) {
|
|
2054
|
+
var position = this.getAbsolutePosition(this.points[0]),
|
|
2055
|
+
position2 = this.getAbsolutePosition(this.points[1]),
|
|
2056
|
+
attrs = this.getAttrs(position,
|
|
2057
|
+
position2);
|
|
2058
|
+
if (position) {
|
|
2059
|
+
this.graphic[animation ? 'animate' : 'attr']({
|
|
2060
|
+
cx: attrs.cx,
|
|
2061
|
+
cy: attrs.cy,
|
|
2062
|
+
rx: attrs.rx,
|
|
2063
|
+
ry: attrs.ry,
|
|
2064
|
+
rotation: attrs.angle,
|
|
2065
|
+
rotationOriginX: attrs.cx,
|
|
2066
|
+
rotationOriginY: attrs.cy
|
|
2067
|
+
});
|
|
2068
|
+
}
|
|
2069
|
+
else {
|
|
2070
|
+
this.graphic.attr({
|
|
2071
|
+
x: 0,
|
|
2072
|
+
y: -9e9
|
|
2073
|
+
});
|
|
2074
|
+
}
|
|
2075
|
+
this.graphic.placed = Boolean(position);
|
|
2076
|
+
ControllableMixin.redraw.call(this, animation);
|
|
2077
|
+
};
|
|
2078
|
+
/**
|
|
2079
|
+
* Set the radius Y.
|
|
2080
|
+
*
|
|
2081
|
+
* @param {number} ry a radius in y direction to be set
|
|
2082
|
+
*/
|
|
2083
|
+
ControllableEllipse.prototype.setYRadius = function (ry) {
|
|
2084
|
+
this.options.ry = ry;
|
|
2085
|
+
this.annotation.userOptions.shapes[0].ry = ry;
|
|
2086
|
+
this.annotation.options.shapes[0].ry = ry;
|
|
2087
|
+
};
|
|
2088
|
+
/* *
|
|
2089
|
+
*
|
|
2090
|
+
* Static Properties
|
|
2091
|
+
*
|
|
2092
|
+
* */
|
|
2093
|
+
/**
|
|
2094
|
+
* A map object which allows to map options attributes to element
|
|
2095
|
+
* attributes.
|
|
2096
|
+
*
|
|
2097
|
+
* @name Highcharts.AnnotationControllableEllipse.attrsMap
|
|
2098
|
+
* @type {Highcharts.Dictionary<string>}
|
|
2099
|
+
*/
|
|
2100
|
+
ControllableEllipse.attrsMap = merge(ControllablePath.attrsMap, {
|
|
2101
|
+
ry: 'ry'
|
|
2102
|
+
});
|
|
2103
|
+
return ControllableEllipse;
|
|
2104
|
+
}());
|
|
2105
|
+
|
|
2106
|
+
return ControllableEllipse;
|
|
2107
|
+
});
|
|
1893
2108
|
_registerModule(_modules, 'Extensions/Annotations/Controllables/ControllableLabel.js', [_modules['Extensions/Annotations/Mixins/ControllableMixin.js'], _modules['Core/FormatUtilities.js'], _modules['Extensions/Annotations/MockPoint.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Tooltip.js'], _modules['Core/Utilities.js']], function (ControllableMixin, F, MockPoint, SVGRenderer, Tooltip, U) {
|
|
1894
2109
|
/* *
|
|
1895
2110
|
*
|
|
@@ -1945,7 +2160,7 @@
|
|
|
1945
2160
|
this.point = ControllableMixin.point;
|
|
1946
2161
|
this.rotate = ControllableMixin.rotate;
|
|
1947
2162
|
this.scale = ControllableMixin.scale;
|
|
1948
|
-
this.setControlPointsVisibility = ControllableMixin.setControlPointsVisibility;
|
|
2163
|
+
this.setControlPointsVisibility = (ControllableMixin.setControlPointsVisibility);
|
|
1949
2164
|
this.shouldBeDrawn = ControllableMixin.shouldBeDrawn;
|
|
1950
2165
|
this.transform = ControllableMixin.transform;
|
|
1951
2166
|
this.transformPoint = ControllableMixin.transformPoint;
|
|
@@ -2178,10 +2393,6 @@
|
|
|
2178
2393
|
};
|
|
2179
2394
|
/**
|
|
2180
2395
|
* Returns the label position relative to its anchor.
|
|
2181
|
-
*
|
|
2182
|
-
* @param {Highcharts.AnnotationAnchorObject} anchor
|
|
2183
|
-
*
|
|
2184
|
-
* @return {Highcharts.PositionObject|null}
|
|
2185
2396
|
*/
|
|
2186
2397
|
ControllableLabel.prototype.position = function (anchor) {
|
|
2187
2398
|
var item = this.graphic,
|
|
@@ -2210,7 +2421,8 @@
|
|
|
2210
2421
|
plotY: anchorRelativePosition.y,
|
|
2211
2422
|
negative: point.negative,
|
|
2212
2423
|
ttBelow: point.ttBelow,
|
|
2213
|
-
h: (anchorRelativePosition.height ||
|
|
2424
|
+
h: (anchorRelativePosition.height ||
|
|
2425
|
+
anchorRelativePosition.width)
|
|
2214
2426
|
});
|
|
2215
2427
|
}
|
|
2216
2428
|
else if (itemOptions.positioner) {
|
|
@@ -2358,7 +2570,7 @@
|
|
|
2358
2570
|
this.point = ControllableMixin.point;
|
|
2359
2571
|
this.rotate = ControllableMixin.rotate;
|
|
2360
2572
|
this.scale = ControllableMixin.scale;
|
|
2361
|
-
this.setControlPointsVisibility = ControllableMixin.setControlPointsVisibility;
|
|
2573
|
+
this.setControlPointsVisibility = (ControllableMixin.setControlPointsVisibility);
|
|
2362
2574
|
this.shouldBeDrawn = ControllableMixin.shouldBeDrawn;
|
|
2363
2575
|
this.transform = ControllableMixin.transform;
|
|
2364
2576
|
this.transformPoint = ControllableMixin.transformPoint;
|
|
@@ -2424,7 +2636,7 @@
|
|
|
2424
2636
|
|
|
2425
2637
|
return ControllableImage;
|
|
2426
2638
|
});
|
|
2427
|
-
_registerModule(_modules, 'Extensions/Annotations/Annotations.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Chart/Chart.js'], _modules['Extensions/Annotations/Mixins/ControllableMixin.js'], _modules['Extensions/Annotations/Controllables/ControllableRect.js'], _modules['Extensions/Annotations/Controllables/ControllableCircle.js'], _modules['Extensions/Annotations/Controllables/ControllablePath.js'], _modules['Extensions/Annotations/Controllables/ControllableImage.js'], _modules['Extensions/Annotations/Controllables/ControllableLabel.js'], _modules['Extensions/Annotations/ControlPoint.js'], _modules['Extensions/Annotations/Mixins/EventEmitterMixin.js'], _modules['Core/Globals.js'], _modules['Extensions/Annotations/MockPoint.js'], _modules['Core/Pointer.js'], _modules['Core/Utilities.js']
|
|
2639
|
+
_registerModule(_modules, 'Extensions/Annotations/Annotations.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Chart/Chart.js'], _modules['Extensions/Annotations/Mixins/ControllableMixin.js'], _modules['Extensions/Annotations/Controllables/ControllableRect.js'], _modules['Extensions/Annotations/Controllables/ControllableCircle.js'], _modules['Extensions/Annotations/Controllables/ControllableEllipse.js'], _modules['Extensions/Annotations/Controllables/ControllablePath.js'], _modules['Extensions/Annotations/Controllables/ControllableImage.js'], _modules['Extensions/Annotations/Controllables/ControllableLabel.js'], _modules['Extensions/Annotations/ControlPoint.js'], _modules['Extensions/Annotations/Mixins/EventEmitterMixin.js'], _modules['Core/Globals.js'], _modules['Extensions/Annotations/MockPoint.js'], _modules['Core/Pointer.js'], _modules['Core/Utilities.js']], function (A, Chart, ControllableMixin, ControllableRect, ControllableCircle, ControllableEllipse, ControllablePath, ControllableImage, ControllableLabel, ControlPoint, EventEmitterMixin, H, MockPoint, Pointer, U) {
|
|
2428
2640
|
/* *
|
|
2429
2641
|
*
|
|
2430
2642
|
* (c) 2009-2021 Highsoft, Black Label
|
|
@@ -2646,7 +2858,10 @@
|
|
|
2646
2858
|
};
|
|
2647
2859
|
Annotation.prototype.addClipPaths = function () {
|
|
2648
2860
|
this.setClipAxes();
|
|
2649
|
-
if (this.clipXAxis &&
|
|
2861
|
+
if (this.clipXAxis &&
|
|
2862
|
+
this.clipYAxis &&
|
|
2863
|
+
this.options.crop // #15399
|
|
2864
|
+
) {
|
|
2650
2865
|
this.clipRect = this.chart.renderer.clipRect(this.getClipBox());
|
|
2651
2866
|
}
|
|
2652
2867
|
};
|
|
@@ -2748,8 +2963,10 @@
|
|
|
2748
2963
|
.add();
|
|
2749
2964
|
this.shapesGroup = renderer
|
|
2750
2965
|
.g('annotation-shapes')
|
|
2751
|
-
.add(this.graphic)
|
|
2752
|
-
|
|
2966
|
+
.add(this.graphic);
|
|
2967
|
+
if (this.options.crop) { // #15399
|
|
2968
|
+
this.shapesGroup.clip(this.chart.plotBoxClip);
|
|
2969
|
+
}
|
|
2753
2970
|
this.labelsGroup = renderer
|
|
2754
2971
|
.g('annotation-labels')
|
|
2755
2972
|
.attr({
|
|
@@ -2835,7 +3052,6 @@
|
|
|
2835
3052
|
* @param {Partial<Highcharts.AnnotationsOptions>} userOptions
|
|
2836
3053
|
* New user options for the annotation.
|
|
2837
3054
|
*
|
|
2838
|
-
* @return {void}
|
|
2839
3055
|
*/
|
|
2840
3056
|
Annotation.prototype.update = function (userOptions, redraw) {
|
|
2841
3057
|
var chart = this.chart,
|
|
@@ -2865,7 +3081,11 @@
|
|
|
2865
3081
|
/**
|
|
2866
3082
|
* Initialisation of a single shape
|
|
2867
3083
|
* @private
|
|
2868
|
-
* @param {Object} shapeOptions
|
|
3084
|
+
* @param {Object} shapeOptions
|
|
3085
|
+
* a confg object for a single shape
|
|
3086
|
+
* @param {number} index
|
|
3087
|
+
* annotation may have many shapes, this is the shape's index saved in
|
|
3088
|
+
* shapes.index.
|
|
2869
3089
|
*/
|
|
2870
3090
|
Annotation.prototype.initShape = function (shapeOptions, index) {
|
|
2871
3091
|
var options = merge(this.options.shapeOptions, {
|
|
@@ -2971,6 +3191,7 @@
|
|
|
2971
3191
|
Annotation.shapesMap = {
|
|
2972
3192
|
'rect': ControllableRect,
|
|
2973
3193
|
'circle': ControllableCircle,
|
|
3194
|
+
'ellipse': ControllableEllipse,
|
|
2974
3195
|
'path': ControllablePath,
|
|
2975
3196
|
'image': ControllableImage
|
|
2976
3197
|
};
|
|
@@ -3047,9 +3268,18 @@
|
|
|
3047
3268
|
* Animation defer settings
|
|
3048
3269
|
* @type {boolean|Partial<Highcharts.AnimationOptionsObject>}
|
|
3049
3270
|
* @since 8.2.0
|
|
3050
|
-
* @apioption annotations.animation
|
|
3051
3271
|
*/
|
|
3052
3272
|
animation: {},
|
|
3273
|
+
/**
|
|
3274
|
+
* Whether to hide the part of the annotation
|
|
3275
|
+
* that is outside the plot area.
|
|
3276
|
+
*
|
|
3277
|
+
* @sample highcharts/annotations/label-crop-overflow/
|
|
3278
|
+
* Crop line annotation
|
|
3279
|
+
* @type {boolean}
|
|
3280
|
+
* @since 9.3.0
|
|
3281
|
+
*/
|
|
3282
|
+
crop: true,
|
|
3053
3283
|
/**
|
|
3054
3284
|
* The animation delay time in milliseconds.
|
|
3055
3285
|
* Set to `0` renders annotation immediately.
|
|
@@ -3114,7 +3344,7 @@
|
|
|
3114
3344
|
*
|
|
3115
3345
|
* @type {Highcharts.ColorString}
|
|
3116
3346
|
*/
|
|
3117
|
-
borderColor:
|
|
3347
|
+
borderColor: "#000000" /* neutralColor100 */,
|
|
3118
3348
|
/**
|
|
3119
3349
|
* The border radius in pixels for the annotaiton's label.
|
|
3120
3350
|
*
|
|
@@ -3409,6 +3639,32 @@
|
|
|
3409
3639
|
* @requires modules/annotations
|
|
3410
3640
|
*/
|
|
3411
3641
|
shapeOptions: {
|
|
3642
|
+
/**
|
|
3643
|
+
*
|
|
3644
|
+
* The radius of the shape in y direction.
|
|
3645
|
+
* Used for the ellipse.
|
|
3646
|
+
*
|
|
3647
|
+
* @sample highcharts/annotations/ellipse/
|
|
3648
|
+
* Ellipse annotation
|
|
3649
|
+
*
|
|
3650
|
+
* @type {number}
|
|
3651
|
+
* @apioption annotations.shapeOptions.ry
|
|
3652
|
+
**/
|
|
3653
|
+
/**
|
|
3654
|
+
*
|
|
3655
|
+
* The xAxis index to which the points should be attached.
|
|
3656
|
+
* Used for the ellipse.
|
|
3657
|
+
*
|
|
3658
|
+
* @type {number}
|
|
3659
|
+
* @apioption annotations.shapeOptions.xAxis
|
|
3660
|
+
**/
|
|
3661
|
+
/**
|
|
3662
|
+
* The yAxis index to which the points should be attached.
|
|
3663
|
+
* Used for the ellipse.
|
|
3664
|
+
*
|
|
3665
|
+
* @type {number}
|
|
3666
|
+
* @apioption annotations.shapeOptions.yAxis
|
|
3667
|
+
**/
|
|
3412
3668
|
/**
|
|
3413
3669
|
* The width of the shape.
|
|
3414
3670
|
*
|
|
@@ -3428,11 +3684,15 @@
|
|
|
3428
3684
|
* @apioption annotations.shapeOptions.height
|
|
3429
3685
|
*/
|
|
3430
3686
|
/**
|
|
3431
|
-
* The type of the shape
|
|
3687
|
+
* The type of the shape.
|
|
3688
|
+
* Avaliable options are circle, rect and ellipse.
|
|
3432
3689
|
*
|
|
3433
3690
|
* @sample highcharts/annotations/shape/
|
|
3434
3691
|
* Basic shape annotation
|
|
3435
3692
|
*
|
|
3693
|
+
* @sample highcharts/annotations/ellipse/
|
|
3694
|
+
* Ellipse annotation
|
|
3695
|
+
*
|
|
3436
3696
|
* @type {string}
|
|
3437
3697
|
* @default rect
|
|
3438
3698
|
* @apioption annotations.shapeOptions.type
|
|
@@ -3514,9 +3774,10 @@
|
|
|
3514
3774
|
width: 10,
|
|
3515
3775
|
height: 10,
|
|
3516
3776
|
style: {
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3777
|
+
cursor: 'pointer',
|
|
3778
|
+
fill: "#ffffff" /* backgroundColor */,
|
|
3779
|
+
stroke: "#000000" /* neutralColor100 */,
|
|
3780
|
+
'stroke-width': 2
|
|
3520
3781
|
},
|
|
3521
3782
|
visible: false,
|
|
3522
3783
|
events: {}
|
|
@@ -3567,7 +3828,8 @@
|
|
|
3567
3828
|
******************************************************************** */
|
|
3568
3829
|
extend(chartProto, /** @lends Highcharts.Chart# */ {
|
|
3569
3830
|
initAnnotation: function (userOptions) {
|
|
3570
|
-
var Constructor = Annotation
|
|
3831
|
+
var Constructor = Annotation
|
|
3832
|
+
.types[userOptions.type] || Annotation,
|
|
3571
3833
|
annotation = new Constructor(this,
|
|
3572
3834
|
userOptions);
|
|
3573
3835
|
this.annotations.push(annotation);
|
|
@@ -3579,7 +3841,8 @@
|
|
|
3579
3841
|
* @param {Highcharts.AnnotationsOptions} options
|
|
3580
3842
|
* The annotation options for the new, detailed annotation.
|
|
3581
3843
|
* @param {boolean} [redraw]
|
|
3582
|
-
*
|
|
3844
|
+
* @sample highcharts/annotations/add-annotation/
|
|
3845
|
+
* Add annotation
|
|
3583
3846
|
* @return {Highcharts.Annotation} - The newly generated annotation.
|
|
3584
3847
|
*/
|
|
3585
3848
|
addAnnotation: function (userOptions, redraw) {
|
|
@@ -3601,7 +3864,7 @@
|
|
|
3601
3864
|
*/
|
|
3602
3865
|
removeAnnotation: function (idOrAnnotation) {
|
|
3603
3866
|
var annotations = this.annotations,
|
|
3604
|
-
annotation = idOrAnnotation.coll === 'annotations' ?
|
|
3867
|
+
annotation = (idOrAnnotation.coll === 'annotations') ?
|
|
3605
3868
|
idOrAnnotation :
|
|
3606
3869
|
find(annotations,
|
|
3607
3870
|
function (annotation) {
|
|
@@ -3720,15 +3983,15 @@
|
|
|
3720
3983
|
// Annotation placed on a exported data point
|
|
3721
3984
|
// - add new column
|
|
3722
3985
|
if (!wasAdded) {
|
|
3723
|
-
event.dataRows.forEach(function (row
|
|
3986
|
+
event.dataRows.forEach(function (row) {
|
|
3724
3987
|
if (!wasAdded &&
|
|
3725
3988
|
row.xValues &&
|
|
3726
3989
|
xAxisIndex !== void 0 &&
|
|
3727
3990
|
annotationX === row.xValues[xAxisIndex]) {
|
|
3728
3991
|
if (joinAnnotations &&
|
|
3729
3992
|
row.length > startRowLength) {
|
|
3730
|
-
row[row.length - 1] +=
|
|
3731
|
-
|
|
3993
|
+
row[row.length - 1] += (annotationSeparator +
|
|
3994
|
+
annotationText_1);
|
|
3732
3995
|
}
|
|
3733
3996
|
else {
|
|
3734
3997
|
row.push(annotationText_1);
|
|
@@ -3846,7 +4109,7 @@
|
|
|
3846
4109
|
|
|
3847
4110
|
return Annotation;
|
|
3848
4111
|
});
|
|
3849
|
-
_registerModule(_modules, '
|
|
4112
|
+
_registerModule(_modules, 'Core/Chart/ChartNavigationComposition.js', [], function () {
|
|
3850
4113
|
/**
|
|
3851
4114
|
*
|
|
3852
4115
|
* (c) 2010-2021 Paweł Fus
|
|
@@ -3856,56 +4119,91 @@
|
|
|
3856
4119
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
3857
4120
|
*
|
|
3858
4121
|
* */
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
updates: [],
|
|
3873
|
-
update: function (options,
|
|
3874
|
-
redraw) {
|
|
3875
|
-
this.updates.forEach(function (updateConfig) {
|
|
3876
|
-
updateConfig.update.call(updateConfig.context,
|
|
3877
|
-
options,
|
|
3878
|
-
redraw);
|
|
3879
|
-
});
|
|
3880
|
-
}
|
|
3881
|
-
};
|
|
3882
|
-
}
|
|
3883
|
-
},
|
|
3884
|
-
/**
|
|
3885
|
-
* Registers an `update()` method in the `chart.navigation` object.
|
|
4122
|
+
/* *
|
|
4123
|
+
*
|
|
4124
|
+
* Composition
|
|
4125
|
+
*
|
|
4126
|
+
* */
|
|
4127
|
+
var ChartNavigationComposition;
|
|
4128
|
+
(function (ChartNavigationComposition) {
|
|
4129
|
+
/* *
|
|
4130
|
+
*
|
|
4131
|
+
* Declarations
|
|
4132
|
+
*
|
|
4133
|
+
* */
|
|
4134
|
+
/* *
|
|
3886
4135
|
*
|
|
4136
|
+
* Functions
|
|
4137
|
+
*
|
|
4138
|
+
* */
|
|
4139
|
+
/* eslint-disable valid-jsdoc */
|
|
4140
|
+
/**
|
|
3887
4141
|
* @private
|
|
3888
|
-
* @param {Highcharts.ChartNavigationUpdateFunction} update
|
|
3889
|
-
* The `update()` method that will be called in `chart.update()`.
|
|
3890
|
-
* @param {Highcharts.Chart} chart
|
|
3891
|
-
* The chart instance. `update()` will use that as a context
|
|
3892
|
-
* (`this`).
|
|
3893
|
-
* @return {void}
|
|
3894
4142
|
*/
|
|
3895
|
-
|
|
4143
|
+
function compose(chart) {
|
|
3896
4144
|
if (!chart.navigation) {
|
|
3897
|
-
|
|
4145
|
+
chart.navigation = new Additions(chart);
|
|
3898
4146
|
}
|
|
3899
|
-
chart
|
|
3900
|
-
update: update,
|
|
3901
|
-
context: chart
|
|
3902
|
-
});
|
|
4147
|
+
return chart;
|
|
3903
4148
|
}
|
|
3904
|
-
|
|
4149
|
+
ChartNavigationComposition.compose = compose;
|
|
4150
|
+
/* *
|
|
4151
|
+
*
|
|
4152
|
+
* Class
|
|
4153
|
+
*
|
|
4154
|
+
* */
|
|
4155
|
+
/**
|
|
4156
|
+
* Initializes `chart.navigation` object which delegates `update()` methods
|
|
4157
|
+
* to all other common classes (used in exporting and navigationBindings).
|
|
4158
|
+
* @private
|
|
4159
|
+
*/
|
|
4160
|
+
var Additions = /** @class */ (function () {
|
|
4161
|
+
/* *
|
|
4162
|
+
*
|
|
4163
|
+
* Constructor
|
|
4164
|
+
*
|
|
4165
|
+
* */
|
|
4166
|
+
function Additions(chart) {
|
|
4167
|
+
this.updates = [];
|
|
4168
|
+
this.chart = chart;
|
|
4169
|
+
}
|
|
4170
|
+
/* *
|
|
4171
|
+
*
|
|
4172
|
+
* Functions
|
|
4173
|
+
*
|
|
4174
|
+
* */
|
|
4175
|
+
/**
|
|
4176
|
+
* Registers an `update()` method in the `chart.navigation` object.
|
|
4177
|
+
*
|
|
4178
|
+
* @private
|
|
4179
|
+
* @param {UpdateFunction} updateFn
|
|
4180
|
+
* The `update()` method that will be called in `chart.update()`.
|
|
4181
|
+
*/
|
|
4182
|
+
Additions.prototype.addUpdate = function (updateFn) {
|
|
4183
|
+
this.chart.navigation.updates.push(updateFn);
|
|
4184
|
+
};
|
|
4185
|
+
/**
|
|
4186
|
+
* @private
|
|
4187
|
+
*/
|
|
4188
|
+
Additions.prototype.update = function (options, redraw) {
|
|
4189
|
+
var _this = this;
|
|
4190
|
+
this.updates.forEach(function (updateFn) {
|
|
4191
|
+
updateFn.call(_this.chart, options, redraw);
|
|
4192
|
+
});
|
|
4193
|
+
};
|
|
4194
|
+
return Additions;
|
|
4195
|
+
}());
|
|
4196
|
+
ChartNavigationComposition.Additions = Additions;
|
|
4197
|
+
})(ChartNavigationComposition || (ChartNavigationComposition = {}));
|
|
4198
|
+
/* *
|
|
4199
|
+
*
|
|
4200
|
+
* Default Export
|
|
4201
|
+
*
|
|
4202
|
+
* */
|
|
3905
4203
|
|
|
3906
|
-
return
|
|
4204
|
+
return ChartNavigationComposition;
|
|
3907
4205
|
});
|
|
3908
|
-
_registerModule(_modules, 'Extensions/Annotations/NavigationBindings.js', [_modules['Extensions/Annotations/Annotations.js'], _modules['Core/Chart/Chart.js'], _modules['
|
|
4206
|
+
_registerModule(_modules, 'Extensions/Annotations/NavigationBindings.js', [_modules['Extensions/Annotations/Annotations.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Chart/ChartNavigationComposition.js'], _modules['Core/FormatUtilities.js'], _modules['Core/Globals.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Utilities.js']], function (Annotation, Chart, ChartNavigationComposition, F, H, D, U) {
|
|
3909
4207
|
/* *
|
|
3910
4208
|
*
|
|
3911
4209
|
* (c) 2009-2021 Highsoft, Black Label
|
|
@@ -4053,8 +4351,9 @@
|
|
|
4053
4351
|
*/
|
|
4054
4352
|
getAssignedAxis: function (coords) {
|
|
4055
4353
|
return coords.filter(function (coord) {
|
|
4056
|
-
var
|
|
4057
|
-
|
|
4354
|
+
var extremes = coord.axis.getExtremes(),
|
|
4355
|
+
axisMin = extremes.min,
|
|
4356
|
+
axisMax = extremes.max,
|
|
4058
4357
|
// Correct axis edges when axis has series
|
|
4059
4358
|
// with pointRange (like column)
|
|
4060
4359
|
minPointOffset = pick(coord.axis.minPointOffset, 0);
|
|
@@ -4125,7 +4424,9 @@
|
|
|
4125
4424
|
navigation.eventsToUnbind.push(addEvent(subContainer, 'click', function (event) {
|
|
4126
4425
|
var bindings = navigation.getButtonEvents(subContainer,
|
|
4127
4426
|
event);
|
|
4128
|
-
if (bindings &&
|
|
4427
|
+
if (bindings &&
|
|
4428
|
+
bindings.button.className
|
|
4429
|
+
.indexOf('highcharts-disabled-btn') === -1) {
|
|
4129
4430
|
navigation.bindingsButtonClick(bindings.button, bindings.events, event);
|
|
4130
4431
|
}
|
|
4131
4432
|
}));
|
|
@@ -4155,9 +4456,11 @@
|
|
|
4155
4456
|
*/
|
|
4156
4457
|
NavigationBindings.prototype.initUpdate = function () {
|
|
4157
4458
|
var navigation = this;
|
|
4158
|
-
|
|
4459
|
+
ChartNavigationComposition
|
|
4460
|
+
.compose(this.chart).navigation
|
|
4461
|
+
.addUpdate(function (options) {
|
|
4159
4462
|
navigation.update(options);
|
|
4160
|
-
}
|
|
4463
|
+
});
|
|
4161
4464
|
};
|
|
4162
4465
|
/**
|
|
4163
4466
|
* Hook for click on a button, method selcts/unselects buttons,
|
|
@@ -4169,7 +4472,7 @@
|
|
|
4169
4472
|
* @param {Highcharts.HTMLDOMElement} [button]
|
|
4170
4473
|
* Clicked button
|
|
4171
4474
|
*
|
|
4172
|
-
* @param {
|
|
4475
|
+
* @param {Object} events
|
|
4173
4476
|
* Events passed down from bindings (`init`, `start`, `step`, `end`)
|
|
4174
4477
|
*
|
|
4175
4478
|
* @param {Highcharts.PointerEventObject} clickEvent
|
|
@@ -4177,8 +4480,13 @@
|
|
|
4177
4480
|
*/
|
|
4178
4481
|
NavigationBindings.prototype.bindingsButtonClick = function (button, events, clickEvent) {
|
|
4179
4482
|
var navigation = this,
|
|
4180
|
-
chart = navigation.chart
|
|
4483
|
+
chart = navigation.chart,
|
|
4484
|
+
svgContainer = chart.renderer.boxWrapper;
|
|
4485
|
+
var shouldEventBeFired = true;
|
|
4181
4486
|
if (navigation.selectedButtonElement) {
|
|
4487
|
+
if (navigation.selectedButtonElement.classList === button.classList) {
|
|
4488
|
+
shouldEventBeFired = false;
|
|
4489
|
+
}
|
|
4182
4490
|
fireEvent(navigation, 'deselectButton', { button: navigation.selectedButtonElement });
|
|
4183
4491
|
if (navigation.nextEvent) {
|
|
4184
4492
|
// Remove in-progress annotations adders:
|
|
@@ -4189,15 +4497,24 @@
|
|
|
4189
4497
|
navigation.mouseMoveEvent = navigation.nextEvent = false;
|
|
4190
4498
|
}
|
|
4191
4499
|
}
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
events.init
|
|
4500
|
+
if (shouldEventBeFired) {
|
|
4501
|
+
navigation.selectedButton = events;
|
|
4502
|
+
navigation.selectedButtonElement = button;
|
|
4503
|
+
fireEvent(navigation, 'selectButton', { button: button });
|
|
4504
|
+
// Call "init" event, for example to open modal window
|
|
4505
|
+
if (events.init) {
|
|
4506
|
+
events.init.call(navigation, button, clickEvent);
|
|
4507
|
+
}
|
|
4508
|
+
if (events.start || events.steps) {
|
|
4509
|
+
chart.renderer.boxWrapper.addClass(PREFIX + 'draw-mode');
|
|
4510
|
+
}
|
|
4198
4511
|
}
|
|
4199
|
-
|
|
4200
|
-
chart.
|
|
4512
|
+
else {
|
|
4513
|
+
chart.stockTools && chart.stockTools.toggleButtonAciveClass(button);
|
|
4514
|
+
svgContainer.removeClass(PREFIX + 'draw-mode');
|
|
4515
|
+
navigation.nextEvent = false;
|
|
4516
|
+
navigation.mouseMoveEvent = false;
|
|
4517
|
+
navigation.selectedButton = null;
|
|
4201
4518
|
}
|
|
4202
4519
|
};
|
|
4203
4520
|
/**
|
|
@@ -4268,8 +4585,7 @@
|
|
|
4268
4585
|
navigation.stepIndex++;
|
|
4269
4586
|
if (selectedButton.steps[navigation.stepIndex]) {
|
|
4270
4587
|
// If we have more steps, bind them one by one:
|
|
4271
|
-
navigation.mouseMoveEvent = navigation.nextEvent =
|
|
4272
|
-
selectedButton.steps[navigation.stepIndex];
|
|
4588
|
+
navigation.mouseMoveEvent = navigation.nextEvent = selectedButton.steps[navigation.stepIndex];
|
|
4273
4589
|
}
|
|
4274
4590
|
else {
|
|
4275
4591
|
fireEvent(navigation, 'deselectButton', { button: navigation.selectedButtonElement });
|
|
@@ -4403,10 +4719,10 @@
|
|
|
4403
4719
|
* @param {string} key
|
|
4404
4720
|
* Option name, for example "visible" or "x", "y"
|
|
4405
4721
|
*
|
|
4406
|
-
* @param {
|
|
4722
|
+
* @param {Object} parentEditables
|
|
4407
4723
|
* Editables from NavigationBindings.annotationsEditable
|
|
4408
4724
|
*
|
|
4409
|
-
* @param {
|
|
4725
|
+
* @param {Object} parent
|
|
4410
4726
|
* Where new options will be assigned
|
|
4411
4727
|
*/
|
|
4412
4728
|
function traverse(option, key, parentEditables, parent) {
|
|
@@ -4447,7 +4763,9 @@
|
|
|
4447
4763
|
parent[key] = nextParent;
|
|
4448
4764
|
}
|
|
4449
4765
|
objectEach(option, function (nestedOption, nestedKey) {
|
|
4450
|
-
traverse(nestedOption, nestedKey, key === 0 ?
|
|
4766
|
+
traverse(nestedOption, nestedKey, key === 0 ?
|
|
4767
|
+
parentEditables :
|
|
4768
|
+
nestedEditables[key], nextParent);
|
|
4451
4769
|
});
|
|
4452
4770
|
}
|
|
4453
4771
|
else {
|
|
@@ -4486,14 +4804,14 @@
|
|
|
4486
4804
|
*
|
|
4487
4805
|
* @function Highcharts.NavigationBindings#getClickedClassNames
|
|
4488
4806
|
*
|
|
4489
|
-
* @param {Highcharts.HTMLDOMElement}
|
|
4490
|
-
*
|
|
4807
|
+
* @param {Highcharts.HTMLDOMElement} container
|
|
4808
|
+
* Container that event is bound to.
|
|
4491
4809
|
*
|
|
4492
4810
|
* @param {global.Event} event
|
|
4493
|
-
*
|
|
4811
|
+
* Browser's event.
|
|
4494
4812
|
*
|
|
4495
4813
|
* @return {Array<Array<string, Highcharts.HTMLDOMElement>>}
|
|
4496
|
-
*
|
|
4814
|
+
* Array of class names with corresponding elements
|
|
4497
4815
|
*/
|
|
4498
4816
|
NavigationBindings.prototype.getClickedClassNames = function (container, event) {
|
|
4499
4817
|
var element = event.target,
|
|
@@ -4531,7 +4849,7 @@
|
|
|
4531
4849
|
* @param {global.Event} event
|
|
4532
4850
|
* Browser's event.
|
|
4533
4851
|
*
|
|
4534
|
-
* @return {
|
|
4852
|
+
* @return {Object}
|
|
4535
4853
|
* Object with events (init, start, steps, and end)
|
|
4536
4854
|
*/
|
|
4537
4855
|
NavigationBindings.prototype.getButtonEvents = function (container, event) {
|
|
@@ -4602,6 +4920,7 @@
|
|
|
4602
4920
|
},
|
|
4603
4921
|
// Simple shapes:
|
|
4604
4922
|
circle: ['shapes'],
|
|
4923
|
+
ellipse: ['shapes'],
|
|
4605
4924
|
verticalLine: [],
|
|
4606
4925
|
label: ['labelOptions'],
|
|
4607
4926
|
// Measure
|
|
@@ -4618,7 +4937,9 @@
|
|
|
4618
4937
|
// Define non editable fields per annotation, for example Rectangle inherits
|
|
4619
4938
|
// options from Measure, but crosshairs are not available
|
|
4620
4939
|
NavigationBindings.annotationsNonEditable = {
|
|
4621
|
-
rectangle: ['crosshairX', 'crosshairY', '
|
|
4940
|
+
rectangle: ['crosshairX', 'crosshairY', 'labelOptions'],
|
|
4941
|
+
ellipse: ['labelOptions'],
|
|
4942
|
+
circle: ['labelOptions']
|
|
4622
4943
|
};
|
|
4623
4944
|
return NavigationBindings;
|
|
4624
4945
|
}());
|
|
@@ -4695,10 +5016,10 @@
|
|
|
4695
5016
|
if (annotation.options.type === 'measure') {
|
|
4696
5017
|
// Manually disable crooshars according to
|
|
4697
5018
|
// stroke width of the shape:
|
|
4698
|
-
typeOptions.crosshairY.enabled =
|
|
4699
|
-
|
|
4700
|
-
typeOptions.crosshairX.enabled =
|
|
4701
|
-
|
|
5019
|
+
typeOptions.crosshairY.enabled = (typeOptions.crosshairY
|
|
5020
|
+
.strokeWidth !== 0);
|
|
5021
|
+
typeOptions.crosshairX.enabled = (typeOptions.crosshairX
|
|
5022
|
+
.strokeWidth !== 0);
|
|
4702
5023
|
}
|
|
4703
5024
|
annotation.update(config);
|
|
4704
5025
|
}
|
|
@@ -4735,7 +5056,6 @@
|
|
|
4735
5056
|
* Configure the Popup strings in the chart. Requires the
|
|
4736
5057
|
* `annotations.js` or `annotations-advanced.src.js` module to be
|
|
4737
5058
|
* loaded.
|
|
4738
|
-
*
|
|
4739
5059
|
* @since 7.0.0
|
|
4740
5060
|
* @product highcharts highstock
|
|
4741
5061
|
*/
|
|
@@ -4749,6 +5069,7 @@
|
|
|
4749
5069
|
simpleShapes: 'Simple shapes',
|
|
4750
5070
|
lines: 'Lines',
|
|
4751
5071
|
circle: 'Circle',
|
|
5072
|
+
ellipse: 'Ellipse',
|
|
4752
5073
|
rectangle: 'Rectangle',
|
|
4753
5074
|
label: 'Label',
|
|
4754
5075
|
shapeOptions: 'Shape options',
|
|
@@ -4809,9 +5130,16 @@
|
|
|
4809
5130
|
* - `end`: last event to be called after last step event
|
|
4810
5131
|
*
|
|
4811
5132
|
* @type {Highcharts.Dictionary<Highcharts.NavigationBindingsOptionsObject>|*}
|
|
4812
|
-
*
|
|
4813
|
-
*
|
|
5133
|
+
*
|
|
5134
|
+
* @sample {highstock} stock/stocktools/stocktools-thresholds
|
|
5135
|
+
* Custom bindings
|
|
5136
|
+
* @sample {highcharts} highcharts/annotations/bindings/
|
|
5137
|
+
* Simple binding
|
|
5138
|
+
* @sample {highcharts} highcharts/annotations/bindings-custom-annotation/
|
|
5139
|
+
* Custom annotation binding
|
|
5140
|
+
*
|
|
4814
5141
|
* @since 7.0.0
|
|
5142
|
+
* @requires modules/annotations
|
|
4815
5143
|
* @product highcharts highstock
|
|
4816
5144
|
*/
|
|
4817
5145
|
bindings: {
|
|
@@ -4848,10 +5176,7 @@
|
|
|
4848
5176
|
},
|
|
4849
5177
|
r: 5
|
|
4850
5178
|
}]
|
|
4851
|
-
}, navigation
|
|
4852
|
-
.annotationsOptions, navigation
|
|
4853
|
-
.bindings
|
|
4854
|
-
.circleAnnotation
|
|
5179
|
+
}, navigation.annotationsOptions, navigation.bindings.circleAnnotation
|
|
4855
5180
|
.annotationsOptions));
|
|
4856
5181
|
},
|
|
4857
5182
|
/** @ignore-option */
|
|
@@ -4859,16 +5184,14 @@
|
|
|
4859
5184
|
function (e, annotation) {
|
|
4860
5185
|
var mockPointOpts = annotation.options.shapes[0]
|
|
4861
5186
|
.point,
|
|
4862
|
-
inverted = this.chart.inverted,
|
|
4863
|
-
x,
|
|
4864
|
-
y,
|
|
4865
5187
|
distance;
|
|
4866
5188
|
if (isNumber(mockPointOpts.xAxis) &&
|
|
4867
5189
|
isNumber(mockPointOpts.yAxis)) {
|
|
4868
|
-
|
|
4869
|
-
.
|
|
4870
|
-
|
|
4871
|
-
.
|
|
5190
|
+
var inverted = this.chart.inverted,
|
|
5191
|
+
x = this.chart.xAxis[mockPointOpts.xAxis]
|
|
5192
|
+
.toPixels(mockPointOpts.x),
|
|
5193
|
+
y = this.chart.yAxis[mockPointOpts.yAxis]
|
|
5194
|
+
.toPixels(mockPointOpts.y);
|
|
4872
5195
|
distance = Math.max(Math.sqrt(Math.pow(inverted ? y - e.chartX : x - e.chartX, 2) +
|
|
4873
5196
|
Math.pow(inverted ? x - e.chartY : y - e.chartY, 2)), 5);
|
|
4874
5197
|
}
|
|
@@ -4880,6 +5203,59 @@
|
|
|
4880
5203
|
}
|
|
4881
5204
|
]
|
|
4882
5205
|
},
|
|
5206
|
+
ellipseAnnotation: {
|
|
5207
|
+
className: 'highcharts-ellipse-annotation',
|
|
5208
|
+
start: function (e) {
|
|
5209
|
+
var coords = this.chart.pointer.getCoordinates(e),
|
|
5210
|
+
coordsX = this.utils.getAssignedAxis(coords.xAxis),
|
|
5211
|
+
coordsY = this.utils.getAssignedAxis(coords.yAxis),
|
|
5212
|
+
navigation = this.chart.options.navigation;
|
|
5213
|
+
if (!coordsX || !coordsY) {
|
|
5214
|
+
return;
|
|
5215
|
+
}
|
|
5216
|
+
return this.chart.addAnnotation(merge({
|
|
5217
|
+
langKey: 'ellipse',
|
|
5218
|
+
type: 'basicAnnotation',
|
|
5219
|
+
shapes: [
|
|
5220
|
+
{
|
|
5221
|
+
type: 'ellipse',
|
|
5222
|
+
xAxis: coordsX.axis.options.index,
|
|
5223
|
+
yAxis: coordsY.axis.options.index,
|
|
5224
|
+
points: [{
|
|
5225
|
+
x: coordsX.value,
|
|
5226
|
+
y: coordsY.value
|
|
5227
|
+
}, {
|
|
5228
|
+
x: coordsX.value,
|
|
5229
|
+
y: coordsY.value
|
|
5230
|
+
}],
|
|
5231
|
+
ry: 1
|
|
5232
|
+
}
|
|
5233
|
+
]
|
|
5234
|
+
}, navigation.annotationsOptions, navigation.bindings.ellipseAnnotation
|
|
5235
|
+
.annotationOptions));
|
|
5236
|
+
},
|
|
5237
|
+
steps: [
|
|
5238
|
+
function (e, annotation) {
|
|
5239
|
+
var target = annotation.shapes[0],
|
|
5240
|
+
position = target.getAbsolutePosition(target.points[1]);
|
|
5241
|
+
target.translatePoint(e.chartX - position.x, e.chartY - position.y, 1);
|
|
5242
|
+
target.redraw(false);
|
|
5243
|
+
},
|
|
5244
|
+
function (e, annotation) {
|
|
5245
|
+
var target = annotation.shapes[0],
|
|
5246
|
+
position = target.getAbsolutePosition(target.points[0]),
|
|
5247
|
+
position2 = target.getAbsolutePosition(target.points[1]),
|
|
5248
|
+
newR = target.getDistanceFromLine(position,
|
|
5249
|
+
position2,
|
|
5250
|
+
e.chartX,
|
|
5251
|
+
e.chartY),
|
|
5252
|
+
yAxis = target.getYAxis(),
|
|
5253
|
+
newRY = Math.abs(yAxis.toValue(0) - yAxis.toValue(newR));
|
|
5254
|
+
target.setYRadius(newRY);
|
|
5255
|
+
target.redraw(false);
|
|
5256
|
+
}
|
|
5257
|
+
]
|
|
5258
|
+
},
|
|
4883
5259
|
/**
|
|
4884
5260
|
* A rectangle annotation bindings. Includes `start` and one event
|
|
4885
5261
|
* in `steps` array.
|
|
@@ -4913,7 +5289,8 @@
|
|
|
4913
5289
|
{ xAxis: xAxis, yAxis: yAxis, x: x, y: y },
|
|
4914
5290
|
{ xAxis: xAxis, yAxis: yAxis, x: x, y: y },
|
|
4915
5291
|
{ xAxis: xAxis, yAxis: yAxis, x: x, y: y },
|
|
4916
|
-
{ xAxis: xAxis, yAxis: yAxis, x: x, y: y }
|
|
5292
|
+
{ xAxis: xAxis, yAxis: yAxis, x: x, y: y },
|
|
5293
|
+
{ command: 'Z' }
|
|
4917
5294
|
]
|
|
4918
5295
|
}]
|
|
4919
5296
|
}, navigation
|
|
@@ -4998,7 +5375,7 @@
|
|
|
4998
5375
|
* from a different server.
|
|
4999
5376
|
*
|
|
5000
5377
|
* @type {string}
|
|
5001
|
-
* @default https://code.highcharts.com/9.2
|
|
5378
|
+
* @default https://code.highcharts.com/9.3.2/gfx/stock-icons/
|
|
5002
5379
|
* @since 7.1.3
|
|
5003
5380
|
* @apioption navigation.iconsURL
|
|
5004
5381
|
*/
|
|
@@ -5054,6 +5431,7 @@
|
|
|
5054
5431
|
* @extends annotations
|
|
5055
5432
|
* @exclude crookedLine, elliottWave, fibonacci, infinityLine,
|
|
5056
5433
|
* measure, pitchfork, tunnel, verticalLine, basicAnnotation
|
|
5434
|
+
* @requires modules/annotations
|
|
5057
5435
|
* @apioption navigation.annotationsOptions
|
|
5058
5436
|
*/
|
|
5059
5437
|
annotationsOptions: {
|
|
@@ -5080,28 +5458,29 @@
|
|
|
5080
5458
|
if (chart.navigationBindings &&
|
|
5081
5459
|
chart.navigationBindings.container &&
|
|
5082
5460
|
chart.navigationBindings.container[0]) {
|
|
5083
|
-
// Get the HTML element coresponding to the
|
|
5084
|
-
//
|
|
5085
|
-
var buttonNode = chart.navigationBindings.container[0]
|
|
5461
|
+
// Get the HTML element coresponding to the className taken
|
|
5462
|
+
// from StockToolsBindings.
|
|
5463
|
+
var buttonNode = chart.navigationBindings.container[0]
|
|
5464
|
+
.querySelectorAll('.' + key);
|
|
5086
5465
|
if (buttonNode) {
|
|
5087
5466
|
for (var i = 0; i < buttonNode.length; i++) {
|
|
5088
|
-
var button = buttonNode[i]
|
|
5467
|
+
var button = buttonNode[i],
|
|
5468
|
+
cls = button.className;
|
|
5089
5469
|
if (value.noDataState === 'normal') {
|
|
5090
|
-
// If button has noDataState: 'normal',
|
|
5091
|
-
//
|
|
5092
|
-
|
|
5093
|
-
if (button.className.indexOf(disabledClassName) !== -1) {
|
|
5470
|
+
// If button has noDataState: 'normal', and has
|
|
5471
|
+
// disabledClassName, remove this className.
|
|
5472
|
+
if (cls.indexOf(disabledClassName) !== -1) {
|
|
5094
5473
|
button.classList.remove(disabledClassName);
|
|
5095
5474
|
}
|
|
5096
5475
|
}
|
|
5097
5476
|
else if (!buttonsEnabled_1) {
|
|
5098
|
-
if (
|
|
5477
|
+
if (cls.indexOf(disabledClassName) === -1) {
|
|
5099
5478
|
button.className += ' ' + disabledClassName;
|
|
5100
5479
|
}
|
|
5101
5480
|
}
|
|
5102
5481
|
else {
|
|
5103
5482
|
// Enable all buttons by deleting the className.
|
|
5104
|
-
if (
|
|
5483
|
+
if (cls.indexOf(disabledClassName) !== -1) {
|
|
5105
5484
|
button.classList.remove(disabledClassName);
|
|
5106
5485
|
}
|
|
5107
5486
|
}
|
|
@@ -5117,7 +5496,7 @@
|
|
|
5117
5496
|
|
|
5118
5497
|
return NavigationBindings;
|
|
5119
5498
|
});
|
|
5120
|
-
_registerModule(_modules, 'Extensions/Annotations/Popup.js', [_modules['Core/Globals.js'], _modules['Extensions/Annotations/NavigationBindings.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Pointer.js'], _modules['Core/Utilities.js']], function (H, NavigationBindings, D, Pointer, U) {
|
|
5499
|
+
_registerModule(_modules, 'Extensions/Annotations/Popup.js', [_modules['Core/Renderer/HTML/AST.js'], _modules['Core/Globals.js'], _modules['Extensions/Annotations/NavigationBindings.js'], _modules['Core/DefaultOptions.js'], _modules['Core/Pointer.js'], _modules['Core/Utilities.js']], function (AST, H, NavigationBindings, D, Pointer, U) {
|
|
5121
5500
|
/* *
|
|
5122
5501
|
*
|
|
5123
5502
|
* Popup generator for Stock tools
|
|
@@ -5138,20 +5517,34 @@
|
|
|
5138
5517
|
fireEvent = U.fireEvent,
|
|
5139
5518
|
isArray = U.isArray,
|
|
5140
5519
|
isObject = U.isObject,
|
|
5141
|
-
isString = U.isString,
|
|
5142
5520
|
objectEach = U.objectEach,
|
|
5143
5521
|
pick = U.pick,
|
|
5144
5522
|
stableSort = U.stableSort,
|
|
5145
5523
|
wrap = U.wrap;
|
|
5146
|
-
var indexFilter = /\d/g, PREFIX = 'highcharts-', DIV = 'div', INPUT = 'input', LABEL = 'label', BUTTON = 'button', SELECT = 'select', OPTION = 'option', SPAN = 'span', UL = 'ul', LI = 'li', H3 = 'h3';
|
|
5524
|
+
var indexFilter = /\d/g, PREFIX = 'highcharts-', A = 'a', DIV = 'div', INPUT = 'input', LABEL = 'label', BUTTON = 'button', SELECT = 'select', OPTION = 'option', SPAN = 'span', UL = 'ul', LI = 'li', H3 = 'h3';
|
|
5525
|
+
/**
|
|
5526
|
+
* Enum for properties which should have dropdown list.
|
|
5527
|
+
* @private
|
|
5528
|
+
*/
|
|
5529
|
+
var DropdownProperties;
|
|
5530
|
+
(function (DropdownProperties) {
|
|
5531
|
+
DropdownProperties[DropdownProperties["params.algorithm"] = 0] = "params.algorithm";
|
|
5532
|
+
DropdownProperties[DropdownProperties["params.average"] = 1] = "params.average";
|
|
5533
|
+
})(DropdownProperties || (DropdownProperties = {}));
|
|
5534
|
+
/**
|
|
5535
|
+
* List of available algorithms for the specific indicator.
|
|
5536
|
+
* @private
|
|
5537
|
+
*/
|
|
5538
|
+
var dropdownParameters = {
|
|
5539
|
+
'algorithm-pivotpoints': ['standard', 'fibonacci', 'camarilla'],
|
|
5540
|
+
'average-disparityindex': ['sma', 'ema', 'dema', 'tema', 'wma']
|
|
5541
|
+
};
|
|
5147
5542
|
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
5148
5543
|
// onContainerMouseDown blocks internal popup events, due to e.preventDefault.
|
|
5149
5544
|
// Related issue #4606
|
|
5150
5545
|
wrap(Pointer.prototype, 'onContainerMouseDown', function (proceed, e) {
|
|
5151
|
-
var popupClass = e.target && e.target.className;
|
|
5152
5546
|
// elements is not in popup
|
|
5153
|
-
if (!(
|
|
5154
|
-
popupClass.indexOf(PREFIX + 'popup-field') >= 0)) {
|
|
5547
|
+
if (!this.inClass(e.target, PREFIX + 'popup')) {
|
|
5155
5548
|
proceed.apply(this, Array.prototype.slice.call(arguments, 1));
|
|
5156
5549
|
}
|
|
5157
5550
|
});
|
|
@@ -5172,7 +5565,22 @@
|
|
|
5172
5565
|
// create popup div
|
|
5173
5566
|
this.container = createElement(DIV, {
|
|
5174
5567
|
className: PREFIX + 'popup highcharts-no-tooltip'
|
|
5175
|
-
},
|
|
5568
|
+
}, void 0, parentDiv);
|
|
5569
|
+
addEvent(this.container, 'mousedown', function () {
|
|
5570
|
+
var activeAnnotation = chart &&
|
|
5571
|
+
chart.navigationBindings &&
|
|
5572
|
+
chart.navigationBindings.activeAnnotation;
|
|
5573
|
+
if (activeAnnotation) {
|
|
5574
|
+
activeAnnotation.cancelClick = true;
|
|
5575
|
+
var unbind_1 = addEvent(H.doc, 'click',
|
|
5576
|
+
function () {
|
|
5577
|
+
setTimeout(function () {
|
|
5578
|
+
activeAnnotation.cancelClick = false;
|
|
5579
|
+
}, 0);
|
|
5580
|
+
unbind_1();
|
|
5581
|
+
});
|
|
5582
|
+
}
|
|
5583
|
+
});
|
|
5176
5584
|
this.lang = this.getLangpack();
|
|
5177
5585
|
this.iconsURL = iconsURL;
|
|
5178
5586
|
// add close button
|
|
@@ -5189,7 +5597,7 @@
|
|
|
5189
5597
|
// create close popup btn
|
|
5190
5598
|
closeBtn = createElement(DIV, {
|
|
5191
5599
|
className: PREFIX + 'popup-close'
|
|
5192
|
-
},
|
|
5600
|
+
}, void 0, this.container);
|
|
5193
5601
|
closeBtn.style['background-image'] = 'url(' +
|
|
5194
5602
|
(iconsURL.match(/png|svg|jpeg|jpg|gif/ig) ?
|
|
5195
5603
|
iconsURL : iconsURL + 'close.svg') + ')';
|
|
@@ -5218,15 +5626,15 @@
|
|
|
5218
5626
|
// left column
|
|
5219
5627
|
lhsCol = createElement(DIV, {
|
|
5220
5628
|
className: PREFIX + 'popup-lhs-col'
|
|
5221
|
-
},
|
|
5629
|
+
}, void 0, container);
|
|
5222
5630
|
// right column
|
|
5223
5631
|
rhsCol = createElement(DIV, {
|
|
5224
5632
|
className: PREFIX + 'popup-rhs-col'
|
|
5225
|
-
},
|
|
5633
|
+
}, void 0, container);
|
|
5226
5634
|
// wrapper content
|
|
5227
5635
|
createElement(DIV, {
|
|
5228
5636
|
className: PREFIX + 'popup-rhs-col-wrapper'
|
|
5229
|
-
},
|
|
5637
|
+
}, void 0, rhsCol);
|
|
5230
5638
|
return {
|
|
5231
5639
|
lhsCol: lhsCol,
|
|
5232
5640
|
rhsCol: rhsCol
|
|
@@ -5234,34 +5642,43 @@
|
|
|
5234
5642
|
},
|
|
5235
5643
|
/**
|
|
5236
5644
|
* Create input with label.
|
|
5645
|
+
*
|
|
5237
5646
|
* @private
|
|
5647
|
+
*
|
|
5238
5648
|
* @param {string} option
|
|
5239
|
-
*
|
|
5240
|
-
*
|
|
5241
|
-
*
|
|
5242
|
-
*
|
|
5243
|
-
*
|
|
5244
|
-
* @param {
|
|
5245
|
-
*
|
|
5246
|
-
*
|
|
5649
|
+
* Chain of fields i.e params.styles.fontSize separeted by the dot.
|
|
5650
|
+
*
|
|
5651
|
+
* @param {string} indicatorType
|
|
5652
|
+
* Type of the indicator i.e. sma, ema...
|
|
5653
|
+
*
|
|
5654
|
+
* @param {HTMLDOMElement} parentDiv
|
|
5655
|
+
* HTML parent element.
|
|
5656
|
+
*
|
|
5657
|
+
* @param {Highcharts.InputAttributes} inputAttributes
|
|
5658
|
+
* Attributes of the input.
|
|
5659
|
+
*
|
|
5660
|
+
* @return {HTMLInputElement}
|
|
5661
|
+
* Return created input element.
|
|
5247
5662
|
*/
|
|
5248
|
-
addInput: function (option,
|
|
5249
|
-
var optionParamList = option.split('.'), optionName = optionParamList[optionParamList.length - 1], lang = this.lang, inputName = PREFIX +
|
|
5663
|
+
addInput: function (option, indicatorType, parentDiv, inputAttributes) {
|
|
5664
|
+
var optionParamList = option.split('.'), optionName = optionParamList[optionParamList.length - 1], lang = this.lang, inputName = PREFIX + indicatorType + '-' + pick(inputAttributes.htmlFor, optionName);
|
|
5665
|
+
var input;
|
|
5250
5666
|
if (!inputName.match(indexFilter)) {
|
|
5251
5667
|
// add label
|
|
5252
5668
|
createElement(LABEL, {
|
|
5253
|
-
htmlFor: inputName
|
|
5669
|
+
htmlFor: inputName,
|
|
5670
|
+
className: inputAttributes.labelClassName
|
|
5254
5671
|
}, void 0, parentDiv).appendChild(doc.createTextNode(lang[optionName] || optionName));
|
|
5255
5672
|
}
|
|
5256
5673
|
// add input
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5674
|
+
input = createElement(INPUT, {
|
|
5675
|
+
name: inputName,
|
|
5676
|
+
value: inputAttributes.value,
|
|
5677
|
+
type: inputAttributes.type,
|
|
5678
|
+
className: PREFIX + 'popup-field'
|
|
5679
|
+
}, void 0, parentDiv);
|
|
5680
|
+
input.setAttribute(PREFIX + 'data-name', option);
|
|
5681
|
+
return input;
|
|
5265
5682
|
},
|
|
5266
5683
|
/**
|
|
5267
5684
|
* Create button.
|
|
@@ -5279,38 +5696,44 @@
|
|
|
5279
5696
|
* @return {Highcharts.HTMLDOMElement}
|
|
5280
5697
|
* HTML button
|
|
5281
5698
|
*/
|
|
5282
|
-
addButton: function (parentDiv, label, type,
|
|
5699
|
+
addButton: function (parentDiv, label, type, fieldsDiv, callback) {
|
|
5283
5700
|
var _self = this,
|
|
5284
5701
|
closePopup = this.closePopup,
|
|
5285
5702
|
getFields = this.getFields,
|
|
5286
5703
|
button;
|
|
5287
5704
|
button = createElement(BUTTON, void 0, void 0, parentDiv);
|
|
5288
5705
|
button.appendChild(doc.createTextNode(label));
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5706
|
+
if (callback) {
|
|
5707
|
+
['click', 'touchstart'].forEach(function (eventName) {
|
|
5708
|
+
addEvent(button, eventName, function () {
|
|
5709
|
+
closePopup.call(_self);
|
|
5710
|
+
return callback(getFields(fieldsDiv, type));
|
|
5711
|
+
});
|
|
5293
5712
|
});
|
|
5294
|
-
}
|
|
5713
|
+
}
|
|
5295
5714
|
return button;
|
|
5296
5715
|
},
|
|
5297
5716
|
/**
|
|
5298
|
-
* Get values from all inputs and create JSON.
|
|
5717
|
+
* Get values from all inputs and selections then create JSON.
|
|
5718
|
+
*
|
|
5299
5719
|
* @private
|
|
5300
|
-
*
|
|
5301
|
-
* @param {
|
|
5302
|
-
*
|
|
5720
|
+
*
|
|
5721
|
+
* @param {Highcharts.HTMLDOMElement} parentDiv
|
|
5722
|
+
* The container where inputs and selections are created.
|
|
5723
|
+
*
|
|
5724
|
+
* @param {string} type
|
|
5725
|
+
* Type of the popup bookmark (add|edit|remove).
|
|
5303
5726
|
*/
|
|
5304
5727
|
getFields: function (parentDiv, type) {
|
|
5305
|
-
var inputList = parentDiv.querySelectorAll(
|
|
5728
|
+
var inputList = Array.prototype.slice.call(parentDiv.querySelectorAll(INPUT)), selectList = Array.prototype.slice.call(parentDiv.querySelectorAll(SELECT)), optionSeries = '#' + PREFIX + 'select-series > option:checked', optionVolume = '#' + PREFIX + 'select-volume > option:checked', linkedTo = parentDiv.querySelectorAll(optionSeries)[0], volumeTo = parentDiv.querySelectorAll(optionVolume)[0];
|
|
5729
|
+
var fieldsOutput;
|
|
5306
5730
|
fieldsOutput = {
|
|
5307
5731
|
actionType: type,
|
|
5308
|
-
linkedTo: linkedTo && linkedTo.getAttribute('value'),
|
|
5732
|
+
linkedTo: linkedTo && linkedTo.getAttribute('value') || '',
|
|
5309
5733
|
fields: {}
|
|
5310
5734
|
};
|
|
5311
|
-
|
|
5312
|
-
param = input.getAttribute(PREFIX + 'data-name');
|
|
5313
|
-
seriesId = input.getAttribute(PREFIX + 'data-series-id');
|
|
5735
|
+
inputList.forEach(function (input) {
|
|
5736
|
+
var param = input.getAttribute(PREFIX + 'data-name'), seriesId = input.getAttribute(PREFIX + 'data-series-id');
|
|
5314
5737
|
// params
|
|
5315
5738
|
if (seriesId) {
|
|
5316
5739
|
fieldsOutput.seriesId = input.value;
|
|
@@ -5323,8 +5746,18 @@
|
|
|
5323
5746
|
fieldsOutput.type = input.value;
|
|
5324
5747
|
}
|
|
5325
5748
|
});
|
|
5749
|
+
selectList.forEach(function (select) {
|
|
5750
|
+
var id = select.id;
|
|
5751
|
+
// Get inputs only for the parameters, not for series and volume.
|
|
5752
|
+
if (id !== PREFIX + 'select-series' &&
|
|
5753
|
+
id !== PREFIX + 'select-volume') {
|
|
5754
|
+
var parameter = id.split('highcharts-select-')[1];
|
|
5755
|
+
fieldsOutput.fields[parameter] = select.value;
|
|
5756
|
+
}
|
|
5757
|
+
});
|
|
5326
5758
|
if (volumeTo) {
|
|
5327
|
-
fieldsOutput.fields['params.volumeSeriesID'] = volumeTo
|
|
5759
|
+
fieldsOutput.fields['params.volumeSeriesID'] = volumeTo
|
|
5760
|
+
.getAttribute('value') || '';
|
|
5328
5761
|
}
|
|
5329
5762
|
return fieldsOutput;
|
|
5330
5763
|
},
|
|
@@ -5339,7 +5772,7 @@
|
|
|
5339
5772
|
.querySelectorAll('.' + PREFIX + 'popup-close')[0];
|
|
5340
5773
|
this.formType = void 0;
|
|
5341
5774
|
// reset content
|
|
5342
|
-
popupDiv.innerHTML =
|
|
5775
|
+
popupDiv.innerHTML = AST.emptyHTML;
|
|
5343
5776
|
// reset toolbar styles if exists
|
|
5344
5777
|
if (popupDiv.className.indexOf(toolbarClass) >= 0) {
|
|
5345
5778
|
popupDiv.classList.remove(toolbarClass);
|
|
@@ -5434,13 +5867,13 @@
|
|
|
5434
5867
|
// Basic shapes:
|
|
5435
5868
|
options.shapes && options.shapes[0].type)));
|
|
5436
5869
|
// add buttons
|
|
5437
|
-
button = this.addButton(popupDiv, lang.removeButton || 'remove', 'remove',
|
|
5870
|
+
button = this.addButton(popupDiv, lang.removeButton || 'remove', 'remove', popupDiv, callback);
|
|
5438
5871
|
button.className += ' ' + PREFIX + 'annotation-remove-button';
|
|
5439
5872
|
button.style['background-image'] = 'url(' +
|
|
5440
5873
|
this.iconsURL + 'destroy.svg)';
|
|
5441
|
-
button = this.addButton(popupDiv, lang.editButton || 'edit', 'edit', function () {
|
|
5874
|
+
button = this.addButton(popupDiv, lang.editButton || 'edit', 'edit', popupDiv, function () {
|
|
5442
5875
|
showForm.call(_self, 'annotation-edit', chart, options, callback);
|
|
5443
|
-
}
|
|
5876
|
+
});
|
|
5444
5877
|
button.className += ' ' + PREFIX + 'annotation-edit-button';
|
|
5445
5878
|
button.style['background-image'] = 'url(' +
|
|
5446
5879
|
this.iconsURL + 'edit.svg)';
|
|
@@ -5473,15 +5906,15 @@
|
|
|
5473
5906
|
lhsCol.appendChild(doc.createTextNode(lang[options.langKey] || options.langKey || ''));
|
|
5474
5907
|
// left column
|
|
5475
5908
|
lhsCol = createElement(DIV, {
|
|
5476
|
-
className: PREFIX + 'popup-lhs-col ' + PREFIX + 'popup-lhs-full'
|
|
5477
|
-
},
|
|
5909
|
+
className: (PREFIX + 'popup-lhs-col ' + PREFIX + 'popup-lhs-full')
|
|
5910
|
+
}, void 0, popupDiv);
|
|
5478
5911
|
bottomRow = createElement(DIV, {
|
|
5479
5912
|
className: PREFIX + 'popup-bottom-row'
|
|
5480
|
-
},
|
|
5913
|
+
}, void 0, popupDiv);
|
|
5481
5914
|
this.annotations.addFormFields.call(this, lhsCol, chart, '', options, [], true);
|
|
5482
5915
|
this.addButton(bottomRow, isInit ?
|
|
5483
5916
|
(lang.addButton || 'add') :
|
|
5484
|
-
(lang.saveButton || 'save'), isInit ? 'add' : 'save',
|
|
5917
|
+
(lang.saveButton || 'save'), isInit ? 'add' : 'save', popupDiv, callback);
|
|
5485
5918
|
},
|
|
5486
5919
|
/**
|
|
5487
5920
|
* Create annotation's form fields.
|
|
@@ -5554,6 +5987,10 @@
|
|
|
5554
5987
|
}, void 0, genInput[2]).appendChild(doc.createTextNode(genInput[1]));
|
|
5555
5988
|
}
|
|
5556
5989
|
else {
|
|
5990
|
+
genInput[4] = {
|
|
5991
|
+
value: genInput[4][0],
|
|
5992
|
+
type: genInput[4][1]
|
|
5993
|
+
};
|
|
5557
5994
|
addInput.apply(genInput[0], genInput.splice(1));
|
|
5558
5995
|
}
|
|
5559
5996
|
});
|
|
@@ -5581,138 +6018,435 @@
|
|
|
5581
6018
|
.querySelectorAll('.' + PREFIX + 'tab-item-content');
|
|
5582
6019
|
// ADD tab
|
|
5583
6020
|
this.addColsContainer(tabsContainers[0]);
|
|
6021
|
+
indicators.addSearchBox.call(this, chart, tabsContainers[0]);
|
|
5584
6022
|
indicators.addIndicatorList.call(this, chart, tabsContainers[0], 'add');
|
|
5585
6023
|
buttonParentDiv = tabsContainers[0]
|
|
5586
6024
|
.querySelectorAll('.' + PREFIX + 'popup-rhs-col')[0];
|
|
5587
|
-
this.addButton(buttonParentDiv, lang.addButton || 'add', 'add',
|
|
6025
|
+
this.addButton(buttonParentDiv, lang.addButton || 'add', 'add', buttonParentDiv, callback);
|
|
5588
6026
|
// EDIT tab
|
|
5589
6027
|
this.addColsContainer(tabsContainers[1]);
|
|
5590
6028
|
indicators.addIndicatorList.call(this, chart, tabsContainers[1], 'edit');
|
|
5591
6029
|
buttonParentDiv = tabsContainers[1]
|
|
5592
6030
|
.querySelectorAll('.' + PREFIX + 'popup-rhs-col')[0];
|
|
5593
|
-
this.addButton(buttonParentDiv, lang.saveButton || 'save', 'edit',
|
|
5594
|
-
this.addButton(buttonParentDiv, lang.removeButton || 'remove', 'remove',
|
|
6031
|
+
this.addButton(buttonParentDiv, lang.saveButton || 'save', 'edit', buttonParentDiv, callback);
|
|
6032
|
+
this.addButton(buttonParentDiv, lang.removeButton || 'remove', 'remove', buttonParentDiv, callback);
|
|
6033
|
+
},
|
|
6034
|
+
/**
|
|
6035
|
+
* Filter object of series which are not indicators.
|
|
6036
|
+
* If the filter string exists, check against it.
|
|
6037
|
+
*
|
|
6038
|
+
* @private
|
|
6039
|
+
*
|
|
6040
|
+
* @param {Highcharts.FilteredSeries} series
|
|
6041
|
+
* All series are available in the plotOptions.
|
|
6042
|
+
*
|
|
6043
|
+
* @param {string|undefined} filter
|
|
6044
|
+
* Applied filter string from the input.
|
|
6045
|
+
* For the first iteration, it's an empty string.
|
|
6046
|
+
*
|
|
6047
|
+
* @return {Array<Highcharts.FilteredSeries>} filteredSeriesArray
|
|
6048
|
+
* Returns array of filtered series based on filter string.
|
|
6049
|
+
*/
|
|
6050
|
+
filterSeries: function (series, filter) {
|
|
6051
|
+
var popup = this,
|
|
6052
|
+
indicators = popup.indicators,
|
|
6053
|
+
lang = popup.chart && popup.chart.options.lang,
|
|
6054
|
+
indicatorAliases = lang &&
|
|
6055
|
+
lang.navigation &&
|
|
6056
|
+
lang.navigation.popup &&
|
|
6057
|
+
lang.navigation.popup.indicatorAliases;
|
|
6058
|
+
var filteredSeriesArray = [],
|
|
6059
|
+
filteredSeries;
|
|
6060
|
+
objectEach(series, function (series, value) {
|
|
6061
|
+
var seriesOptions = series.options;
|
|
6062
|
+
// Allow only indicators.
|
|
6063
|
+
if (series.params || seriesOptions &&
|
|
6064
|
+
seriesOptions.params) {
|
|
6065
|
+
var _a = indicators.getNameType(series,
|
|
6066
|
+
value),
|
|
6067
|
+
indicatorFullName = _a.indicatorFullName,
|
|
6068
|
+
indicatorType = _a.indicatorType;
|
|
6069
|
+
if (filter) {
|
|
6070
|
+
// Replace invalid characters.
|
|
6071
|
+
var validFilter = filter.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
6072
|
+
var regex = new RegExp(validFilter, 'i'),
|
|
6073
|
+
alias = indicatorAliases &&
|
|
6074
|
+
indicatorAliases[indicatorType] &&
|
|
6075
|
+
indicatorAliases[indicatorType].join(' ') || '';
|
|
6076
|
+
if (indicatorFullName.match(regex) ||
|
|
6077
|
+
alias.match(regex)) {
|
|
6078
|
+
filteredSeries = {
|
|
6079
|
+
indicatorFullName: indicatorFullName,
|
|
6080
|
+
indicatorType: indicatorType,
|
|
6081
|
+
series: series
|
|
6082
|
+
};
|
|
6083
|
+
filteredSeriesArray.push(filteredSeries);
|
|
6084
|
+
}
|
|
6085
|
+
}
|
|
6086
|
+
else {
|
|
6087
|
+
filteredSeries = {
|
|
6088
|
+
indicatorFullName: indicatorFullName,
|
|
6089
|
+
indicatorType: indicatorType,
|
|
6090
|
+
series: series
|
|
6091
|
+
};
|
|
6092
|
+
filteredSeriesArray.push(filteredSeries);
|
|
6093
|
+
}
|
|
6094
|
+
}
|
|
6095
|
+
});
|
|
6096
|
+
return filteredSeriesArray;
|
|
6097
|
+
},
|
|
6098
|
+
/**
|
|
6099
|
+
* Filter an array of series and map its names and types.
|
|
6100
|
+
*
|
|
6101
|
+
* @private
|
|
6102
|
+
*
|
|
6103
|
+
* @param {Highcharts.FilteredSeries} series
|
|
6104
|
+
* All series that are available in the plotOptions.
|
|
6105
|
+
*
|
|
6106
|
+
* @return {Array<Highcharts.FilteredSeries>} filteredSeriesArray
|
|
6107
|
+
* Returns array of filtered series based on filter string.
|
|
6108
|
+
*/
|
|
6109
|
+
filterSeriesArray: function (series) {
|
|
6110
|
+
var filteredSeriesArray = [],
|
|
6111
|
+
filteredSeries;
|
|
6112
|
+
// Allow only indicators.
|
|
6113
|
+
series.forEach(function (series) {
|
|
6114
|
+
var seriesOptions = series.options;
|
|
6115
|
+
if (series.is('sma')) {
|
|
6116
|
+
filteredSeries = {
|
|
6117
|
+
indicatorFullName: series.name,
|
|
6118
|
+
indicatorType: series.type,
|
|
6119
|
+
series: series
|
|
6120
|
+
};
|
|
6121
|
+
filteredSeriesArray.push(filteredSeries);
|
|
6122
|
+
}
|
|
6123
|
+
});
|
|
6124
|
+
return filteredSeriesArray;
|
|
5595
6125
|
},
|
|
5596
6126
|
/**
|
|
5597
6127
|
* Create HTML list of all indicators (ADD mode) or added indicators
|
|
5598
6128
|
* (EDIT mode).
|
|
6129
|
+
*
|
|
5599
6130
|
* @private
|
|
6131
|
+
*
|
|
6132
|
+
* @param {Highcharts.AnnotationChart} chart
|
|
6133
|
+
* The chart object.
|
|
6134
|
+
*
|
|
6135
|
+
* @param {string} [optionName]
|
|
6136
|
+
* Name of the option into which selection is being added.
|
|
6137
|
+
*
|
|
6138
|
+
* @param {HTMLDOMElement} [parentDiv]
|
|
6139
|
+
* HTML parent element.
|
|
6140
|
+
*
|
|
6141
|
+
* @param {string} listType
|
|
6142
|
+
* Type of list depending on the selected bookmark.
|
|
6143
|
+
* Might be 'add' or 'edit'.
|
|
6144
|
+
*
|
|
6145
|
+
* @param {string|undefined} filter
|
|
6146
|
+
* Applied filter string from the input.
|
|
6147
|
+
* For the first iteration, it's an empty string.
|
|
5600
6148
|
*/
|
|
5601
|
-
addIndicatorList: function (chart, parentDiv, listType) {
|
|
5602
|
-
var
|
|
6149
|
+
addIndicatorList: function (chart, parentDiv, listType, filter) {
|
|
6150
|
+
var popup = this, indicators = popup.indicators, lang = popup.lang, lhsCol = parentDiv.querySelectorAll('.' + PREFIX + 'popup-lhs-col')[0], rhsCol = parentDiv.querySelectorAll('.' + PREFIX + 'popup-rhs-col')[0], isEdit = listType === 'edit', addFormFields = this.indicators.addFormFields, series = (isEdit ?
|
|
5603
6151
|
chart.series : // EDIT mode
|
|
5604
|
-
chart.options.plotOptions // ADD mode
|
|
5605
|
-
)
|
|
5606
|
-
if (!chart) {
|
|
6152
|
+
chart.options.plotOptions || {} // ADD mode
|
|
6153
|
+
);
|
|
6154
|
+
if (!chart && series) {
|
|
5607
6155
|
return;
|
|
5608
6156
|
}
|
|
5609
|
-
|
|
6157
|
+
var rhsColWrapper,
|
|
6158
|
+
indicatorList,
|
|
6159
|
+
item,
|
|
6160
|
+
filteredSeriesArray = [];
|
|
6161
|
+
// Filter and sort the series.
|
|
6162
|
+
if (!isEdit && !isArray(series)) {
|
|
6163
|
+
// Apply filters only for the 'add' indicator list.
|
|
6164
|
+
filteredSeriesArray = indicators.filterSeries.call(this, series, filter);
|
|
6165
|
+
}
|
|
6166
|
+
else if (isArray(series)) {
|
|
6167
|
+
filteredSeriesArray = indicators.filterSeriesArray.call(this, series);
|
|
6168
|
+
}
|
|
6169
|
+
// Sort indicators alphabeticaly.
|
|
6170
|
+
stableSort(filteredSeriesArray, function (a, b) {
|
|
6171
|
+
var seriesAName = a.indicatorFullName.toLowerCase(),
|
|
6172
|
+
seriesBName = b.indicatorFullName.toLowerCase();
|
|
6173
|
+
return (seriesAName < seriesBName) ?
|
|
6174
|
+
-1 : (seriesAName > seriesBName) ? 1 : 0;
|
|
6175
|
+
});
|
|
6176
|
+
// If the list exists remove it from the DOM
|
|
6177
|
+
// in order to create a new one with different filters.
|
|
6178
|
+
if (lhsCol.children[1]) {
|
|
6179
|
+
lhsCol.children[1].remove();
|
|
6180
|
+
}
|
|
6181
|
+
// Create wrapper for list.
|
|
5610
6182
|
indicatorList = createElement(UL, {
|
|
5611
6183
|
className: PREFIX + 'indicator-list'
|
|
5612
|
-
},
|
|
5613
|
-
rhsColWrapper = rhsCol
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
});
|
|
6184
|
+
}, void 0, lhsCol);
|
|
6185
|
+
rhsColWrapper = rhsCol.querySelectorAll('.' + PREFIX + 'popup-rhs-col-wrapper')[0];
|
|
6186
|
+
filteredSeriesArray.forEach(function (seriesSet) {
|
|
6187
|
+
var indicatorFullName = seriesSet.indicatorFullName,
|
|
6188
|
+
indicatorType = seriesSet.indicatorType,
|
|
6189
|
+
series = seriesSet.series;
|
|
6190
|
+
item = createElement(LI, {
|
|
6191
|
+
className: PREFIX + 'indicator-list'
|
|
6192
|
+
}, void 0, indicatorList);
|
|
6193
|
+
item.appendChild(doc.createTextNode(indicatorFullName));
|
|
6194
|
+
['click', 'touchstart'].forEach(function (eventName) {
|
|
6195
|
+
addEvent(item, eventName, function () {
|
|
6196
|
+
var button = rhsColWrapper.parentNode
|
|
6197
|
+
.children[1];
|
|
6198
|
+
addFormFields.call(popup, chart, series, indicatorType, rhsColWrapper);
|
|
6199
|
+
if (button) {
|
|
6200
|
+
button.style.display = 'block';
|
|
6201
|
+
}
|
|
6202
|
+
// add hidden input with series.id
|
|
6203
|
+
if (isEdit && series.options) {
|
|
6204
|
+
createElement(INPUT, {
|
|
6205
|
+
type: 'hidden',
|
|
6206
|
+
name: PREFIX + 'id-' + indicatorType,
|
|
6207
|
+
value: series.options.id
|
|
6208
|
+
}, void 0, rhsColWrapper).setAttribute(PREFIX + 'data-series-id', series.options.id);
|
|
6209
|
+
}
|
|
5639
6210
|
});
|
|
5640
|
-
}
|
|
6211
|
+
});
|
|
5641
6212
|
});
|
|
5642
6213
|
// select first item from the list
|
|
5643
6214
|
if (indicatorList.childNodes.length > 0) {
|
|
5644
6215
|
indicatorList.childNodes[0].click();
|
|
5645
6216
|
}
|
|
6217
|
+
else if (!isEdit) {
|
|
6218
|
+
AST.setElementHTML(rhsColWrapper.parentNode.children[0], lang.noFilterMatch || '');
|
|
6219
|
+
rhsColWrapper.parentNode.children[1]
|
|
6220
|
+
.style.display = 'none';
|
|
6221
|
+
}
|
|
6222
|
+
},
|
|
6223
|
+
/**
|
|
6224
|
+
* Add searchbox HTML element and its' label.
|
|
6225
|
+
*
|
|
6226
|
+
* @private
|
|
6227
|
+
*
|
|
6228
|
+
* @param {Highcharts.AnnotationChart} chart
|
|
6229
|
+
* The chart object.
|
|
6230
|
+
*
|
|
6231
|
+
* @param {HTMLDOMElement} parentDiv
|
|
6232
|
+
* HTML parent element.
|
|
6233
|
+
*/
|
|
6234
|
+
addSearchBox: function (chart, parentDiv) {
|
|
6235
|
+
var popup = this, lhsCol = parentDiv.querySelectorAll('.' + PREFIX + 'popup-lhs-col')[0], options = 'searchIndicators', inputAttributes = {
|
|
6236
|
+
value: '',
|
|
6237
|
+
type: 'text',
|
|
6238
|
+
htmlFor: 'search-indicators',
|
|
6239
|
+
labelClassName: 'highcharts-input-search-indicators-label'
|
|
6240
|
+
}, clearFilterText = this.lang.clearFilter, inputWrapper = createElement(DIV, {
|
|
6241
|
+
className: 'highcharts-input-wrapper'
|
|
6242
|
+
}, void 0, lhsCol);
|
|
6243
|
+
var handleInputChange = function (inputText) {
|
|
6244
|
+
// Apply some filters.
|
|
6245
|
+
popup.indicators.addIndicatorList.call(popup,
|
|
6246
|
+
chart,
|
|
6247
|
+
popup.container, 'add',
|
|
6248
|
+
inputText);
|
|
6249
|
+
};
|
|
6250
|
+
// Add input field with the label and button.
|
|
6251
|
+
var input = this.addInput(options,
|
|
6252
|
+
INPUT,
|
|
6253
|
+
inputWrapper,
|
|
6254
|
+
inputAttributes),
|
|
6255
|
+
button = createElement(A, {
|
|
6256
|
+
textContent: clearFilterText
|
|
6257
|
+
},
|
|
6258
|
+
void 0,
|
|
6259
|
+
inputWrapper);
|
|
6260
|
+
input.classList.add('highcharts-input-search-indicators');
|
|
6261
|
+
button.classList.add('clear-filter-button');
|
|
6262
|
+
// Add input change events.
|
|
6263
|
+
addEvent(input, 'input', function (e) {
|
|
6264
|
+
handleInputChange(this.value);
|
|
6265
|
+
// Show clear filter button.
|
|
6266
|
+
if (this.value.length) {
|
|
6267
|
+
button.style.display = 'inline-block';
|
|
6268
|
+
}
|
|
6269
|
+
else {
|
|
6270
|
+
button.style.display = 'none';
|
|
6271
|
+
}
|
|
6272
|
+
});
|
|
6273
|
+
// Add clear filter click event.
|
|
6274
|
+
['click', 'touchstart'].forEach(function (eventName) {
|
|
6275
|
+
addEvent(button, eventName, function () {
|
|
6276
|
+
// Clear the input.
|
|
6277
|
+
input.value = '';
|
|
6278
|
+
handleInputChange('');
|
|
6279
|
+
// Hide clear filter button- no longer nececary.
|
|
6280
|
+
button.style.display = 'none';
|
|
6281
|
+
});
|
|
6282
|
+
});
|
|
6283
|
+
},
|
|
6284
|
+
/**
|
|
6285
|
+
* Add selection HTML element and its' label.
|
|
6286
|
+
*
|
|
6287
|
+
* @private
|
|
6288
|
+
*
|
|
6289
|
+
* @param {string} indicatorType
|
|
6290
|
+
* Type of the indicator i.e. sma, ema...
|
|
6291
|
+
*
|
|
6292
|
+
* @param {string} [optionName]
|
|
6293
|
+
* Name of the option into which selection is being added.
|
|
6294
|
+
*
|
|
6295
|
+
* @param {HTMLDOMElement} [parentDiv]
|
|
6296
|
+
* HTML parent element.
|
|
6297
|
+
*/
|
|
6298
|
+
addSelection: function (indicatorType, optionName, parentDiv) {
|
|
6299
|
+
var optionParamList = optionName.split('.'),
|
|
6300
|
+
labelText = optionParamList[optionParamList.length - 1];
|
|
6301
|
+
var selectName = PREFIX + optionName + '-type-' + indicatorType,
|
|
6302
|
+
lang = this.lang,
|
|
6303
|
+
selectBox;
|
|
6304
|
+
// Add a label for the selection box.
|
|
6305
|
+
createElement(LABEL, {
|
|
6306
|
+
htmlFor: selectName
|
|
6307
|
+
}, null, parentDiv).appendChild(doc.createTextNode(lang[labelText] || optionName));
|
|
6308
|
+
// Create a selection box.
|
|
6309
|
+
selectBox = createElement(SELECT, {
|
|
6310
|
+
name: selectName,
|
|
6311
|
+
className: PREFIX + 'popup-field',
|
|
6312
|
+
id: PREFIX + 'select-' + optionName
|
|
6313
|
+
}, null, parentDiv);
|
|
6314
|
+
selectBox.setAttribute('id', PREFIX + 'select-' + optionName);
|
|
6315
|
+
return selectBox;
|
|
6316
|
+
},
|
|
6317
|
+
/**
|
|
6318
|
+
* Get and add selection options.
|
|
6319
|
+
*
|
|
6320
|
+
* @private
|
|
6321
|
+
*
|
|
6322
|
+
* @param {Highcharts.AnnotationChart} chart
|
|
6323
|
+
* The chart object.
|
|
6324
|
+
*
|
|
6325
|
+
* @param {string} [optionName]
|
|
6326
|
+
* Name of the option into which selection is being added.
|
|
6327
|
+
*
|
|
6328
|
+
* @param {HTMLSelectElement} [selectBox]
|
|
6329
|
+
* HTML select box element to which the options are being added.
|
|
6330
|
+
*
|
|
6331
|
+
* @param {string|undefined} indicatorType
|
|
6332
|
+
* Type of the indicator i.e. sma, ema...
|
|
6333
|
+
*
|
|
6334
|
+
* @param {string|undefined} parameterName
|
|
6335
|
+
* Name of the parameter which should be applied.
|
|
6336
|
+
*
|
|
6337
|
+
* @param {string|undefined} selectedOption
|
|
6338
|
+
* Default value in dropdown.
|
|
6339
|
+
*/
|
|
6340
|
+
addSelectionOptions: function (chart, optionName, selectBox, indicatorType, parameterName, selectedOption, currentSeries) {
|
|
6341
|
+
var popup = this;
|
|
6342
|
+
// Get and apply selection options for the possible series.
|
|
6343
|
+
if (optionName === 'series' || optionName === 'volume') {
|
|
6344
|
+
// List all series which have id - mandatory for indicator.
|
|
6345
|
+
chart.series.forEach(function (series) {
|
|
6346
|
+
var seriesOptions = series.options,
|
|
6347
|
+
seriesName = seriesOptions.name ||
|
|
6348
|
+
seriesOptions.params ?
|
|
6349
|
+
series.name :
|
|
6350
|
+
seriesOptions.id || '';
|
|
6351
|
+
if (seriesOptions.id !== PREFIX + 'navigator-series' &&
|
|
6352
|
+
seriesOptions.id !== (currentSeries &&
|
|
6353
|
+
currentSeries.options &&
|
|
6354
|
+
currentSeries.options.id)) {
|
|
6355
|
+
if (!defined(selectedOption) &&
|
|
6356
|
+
optionName === 'volume' &&
|
|
6357
|
+
series.type === 'column') {
|
|
6358
|
+
selectedOption = seriesOptions.id;
|
|
6359
|
+
}
|
|
6360
|
+
createElement(OPTION, {
|
|
6361
|
+
value: seriesOptions.id
|
|
6362
|
+
}, void 0, selectBox).appendChild(doc.createTextNode(seriesName));
|
|
6363
|
+
}
|
|
6364
|
+
});
|
|
6365
|
+
}
|
|
6366
|
+
else if (indicatorType && parameterName) {
|
|
6367
|
+
// Get and apply options for the possible parameters.
|
|
6368
|
+
var dropdownKey = parameterName + '-' + indicatorType,
|
|
6369
|
+
parameterOption = dropdownParameters[dropdownKey];
|
|
6370
|
+
parameterOption.forEach(function (element) {
|
|
6371
|
+
createElement(OPTION, {
|
|
6372
|
+
value: element
|
|
6373
|
+
}, void 0, selectBox).appendChild(doc.createTextNode(element));
|
|
6374
|
+
});
|
|
6375
|
+
}
|
|
6376
|
+
// Add the default dropdown value if defined.
|
|
6377
|
+
if (defined(selectedOption)) {
|
|
6378
|
+
selectBox.value = selectedOption;
|
|
6379
|
+
}
|
|
5646
6380
|
},
|
|
5647
6381
|
/**
|
|
5648
6382
|
* Extract full name and type of requested indicator.
|
|
6383
|
+
*
|
|
5649
6384
|
* @private
|
|
6385
|
+
*
|
|
5650
6386
|
* @param {Highcharts.Series} series
|
|
5651
|
-
* Series which name is needed
|
|
5652
|
-
*
|
|
5653
|
-
*
|
|
5654
|
-
* @
|
|
6387
|
+
* Series which name is needed(EDITmode - defaultOptions.series,
|
|
6388
|
+
* ADDmode - indicator series).
|
|
6389
|
+
*
|
|
6390
|
+
* @param {string} [indicatorType]
|
|
6391
|
+
* Type of the indicator i.e. sma, ema...
|
|
6392
|
+
*
|
|
6393
|
+
* @return {Highcharts.Dictionary<string>}
|
|
6394
|
+
* Full name and series type.
|
|
5655
6395
|
*/
|
|
5656
|
-
getNameType: function (series,
|
|
6396
|
+
getNameType: function (series, indicatorType) {
|
|
5657
6397
|
var options = series.options,
|
|
5658
|
-
seriesTypes = H.seriesTypes
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
seriesTypes[
|
|
5662
|
-
|
|
6398
|
+
seriesTypes = H.seriesTypes;
|
|
6399
|
+
// add mode
|
|
6400
|
+
var seriesName = (seriesTypes[indicatorType] &&
|
|
6401
|
+
seriesTypes[indicatorType].prototype.nameBase) ||
|
|
6402
|
+
indicatorType.toUpperCase(),
|
|
6403
|
+
seriesType = indicatorType;
|
|
5663
6404
|
// edit
|
|
5664
6405
|
if (options && options.type) {
|
|
5665
6406
|
seriesType = series.options.type;
|
|
5666
6407
|
seriesName = series.name;
|
|
5667
6408
|
}
|
|
5668
6409
|
return {
|
|
5669
|
-
|
|
5670
|
-
|
|
6410
|
+
indicatorFullName: seriesName,
|
|
6411
|
+
indicatorType: seriesType
|
|
5671
6412
|
};
|
|
5672
6413
|
},
|
|
5673
6414
|
/**
|
|
5674
|
-
*
|
|
5675
|
-
*
|
|
6415
|
+
* Create the selection box for the series,
|
|
6416
|
+
* add options and apply the default one.
|
|
6417
|
+
*
|
|
5676
6418
|
* @private
|
|
5677
|
-
*
|
|
5678
|
-
*
|
|
5679
|
-
*
|
|
5680
|
-
*
|
|
5681
|
-
* @param {
|
|
5682
|
-
*
|
|
5683
|
-
*
|
|
5684
|
-
*
|
|
5685
|
-
*
|
|
5686
|
-
*
|
|
6419
|
+
*
|
|
6420
|
+
* @param {string} indicatorType
|
|
6421
|
+
* Type of the indicator i.e. sma, ema...
|
|
6422
|
+
*
|
|
6423
|
+
* @param {string} [optionName]
|
|
6424
|
+
* Name of the option into which selection is being added.
|
|
6425
|
+
*
|
|
6426
|
+
* @param {Highcharts.AnnotationChart} chart
|
|
6427
|
+
* The chart object.
|
|
6428
|
+
*
|
|
6429
|
+
* @param {HTMLDOMElement} [parentDiv]
|
|
6430
|
+
* HTML parent element.
|
|
6431
|
+
*
|
|
6432
|
+
* @param {string|undefined} selectedOption
|
|
6433
|
+
* Default value in dropdown.
|
|
5687
6434
|
*/
|
|
5688
|
-
listAllSeries: function (
|
|
5689
|
-
var
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
seriesOptions;
|
|
6435
|
+
listAllSeries: function (indicatorType, optionName, chart, parentDiv, currentSeries, selectedOption) {
|
|
6436
|
+
var popup = this,
|
|
6437
|
+
indicators = popup.indicators;
|
|
6438
|
+
// Won't work without the chart.
|
|
5693
6439
|
if (!chart) {
|
|
5694
6440
|
return;
|
|
5695
6441
|
}
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
selectBox.setAttribute('id', PREFIX + 'select-' + optionName);
|
|
5705
|
-
// list all series which have id - mandatory for creating indicator
|
|
5706
|
-
chart.series.forEach(function (serie) {
|
|
5707
|
-
seriesOptions = serie.options;
|
|
5708
|
-
if (!seriesOptions.params &&
|
|
5709
|
-
seriesOptions.id &&
|
|
5710
|
-
seriesOptions.id !== PREFIX + 'navigator-series') {
|
|
5711
|
-
createElement(OPTION, {
|
|
5712
|
-
value: seriesOptions.id
|
|
5713
|
-
}, null, selectBox).appendChild(doc.createTextNode(seriesOptions.name || seriesOptions.id));
|
|
5714
|
-
}
|
|
5715
|
-
});
|
|
6442
|
+
// Add selection boxes.
|
|
6443
|
+
var selectBox = indicators.addSelection.call(popup,
|
|
6444
|
+
indicatorType,
|
|
6445
|
+
optionName,
|
|
6446
|
+
parentDiv);
|
|
6447
|
+
// Add possible dropdown options.
|
|
6448
|
+
indicators.addSelectionOptions.call(popup, chart, optionName, selectBox, void 0, void 0, void 0, currentSeries);
|
|
6449
|
+
// Add the default dropdown value if defined.
|
|
5716
6450
|
if (defined(selectedOption)) {
|
|
5717
6451
|
selectBox.value = selectedOption;
|
|
5718
6452
|
}
|
|
@@ -5737,21 +6471,21 @@
|
|
|
5737
6471
|
var fields = series.params || series.options.params,
|
|
5738
6472
|
getNameType = this.indicators.getNameType;
|
|
5739
6473
|
// reset current content
|
|
5740
|
-
rhsColWrapper.innerHTML =
|
|
6474
|
+
rhsColWrapper.innerHTML = AST.emptyHTML;
|
|
5741
6475
|
// create title (indicator name in the right column)
|
|
5742
6476
|
createElement(H3, {
|
|
5743
6477
|
className: PREFIX + 'indicator-title'
|
|
5744
|
-
}, void 0, rhsColWrapper).appendChild(doc.createTextNode(getNameType(series, seriesType).
|
|
6478
|
+
}, void 0, rhsColWrapper).appendChild(doc.createTextNode(getNameType(series, seriesType).indicatorFullName));
|
|
5745
6479
|
// input type
|
|
5746
6480
|
createElement(INPUT, {
|
|
5747
6481
|
type: 'hidden',
|
|
5748
6482
|
name: PREFIX + 'type-' + seriesType,
|
|
5749
6483
|
value: seriesType
|
|
5750
|
-
},
|
|
6484
|
+
}, void 0, rhsColWrapper);
|
|
5751
6485
|
// list all series with id
|
|
5752
|
-
this.indicators.listAllSeries.call(this, seriesType, 'series', chart, rhsColWrapper, series.linkedParent &&
|
|
6486
|
+
this.indicators.listAllSeries.call(this, seriesType, 'series', chart, rhsColWrapper, series, series.linkedParent && series.linkedParent.options.id);
|
|
5753
6487
|
if (fields.volumeSeriesID) {
|
|
5754
|
-
this.indicators.listAllSeries.call(this, seriesType, 'volume', chart, rhsColWrapper, series.linkedParent &&
|
|
6488
|
+
this.indicators.listAllSeries.call(this, seriesType, 'volume', chart, rhsColWrapper, series, series.linkedParent && fields.volumeSeriesID);
|
|
5755
6489
|
}
|
|
5756
6490
|
// add param fields
|
|
5757
6491
|
this.indicators.addParamInputs.call(this, chart, 'params', fields, seriesType, rhsColWrapper);
|
|
@@ -5773,8 +6507,9 @@
|
|
|
5773
6507
|
* Element where created HTML list is added
|
|
5774
6508
|
*/
|
|
5775
6509
|
addParamInputs: function (chart, parentNode, fields, type, parentDiv) {
|
|
5776
|
-
var
|
|
5777
|
-
|
|
6510
|
+
var popup = this,
|
|
6511
|
+
indicators = popup.indicators;
|
|
6512
|
+
var addParamInputs = this.indicators.addParamInputs,
|
|
5778
6513
|
addInput = this.addInput,
|
|
5779
6514
|
parentFullName;
|
|
5780
6515
|
if (!chart) {
|
|
@@ -5783,16 +6518,34 @@
|
|
|
5783
6518
|
objectEach(fields, function (value, fieldName) {
|
|
5784
6519
|
// create name like params.styles.fontSize
|
|
5785
6520
|
parentFullName = parentNode + '.' + fieldName;
|
|
5786
|
-
if (value
|
|
6521
|
+
if (defined(value) && // skip if field is unnecessary, #15362
|
|
6522
|
+
parentFullName) {
|
|
5787
6523
|
if (isObject(value)) {
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
6524
|
+
// (15733) 'Periods' has an arrayed value. Label must be
|
|
6525
|
+
// created here.
|
|
6526
|
+
addInput.call(popup, parentFullName, type, parentDiv, {});
|
|
6527
|
+
addParamInputs.call(popup, chart, parentFullName, value, type, parentDiv);
|
|
6528
|
+
}
|
|
6529
|
+
// If the option is listed in dropdown enum,
|
|
6530
|
+
// add the selection box for it.
|
|
6531
|
+
if (parentFullName in DropdownProperties) {
|
|
6532
|
+
// Add selection boxes.
|
|
6533
|
+
var selectBox = indicators.addSelection.call(popup,
|
|
6534
|
+
type,
|
|
6535
|
+
parentFullName,
|
|
6536
|
+
parentDiv);
|
|
6537
|
+
// Add possible dropdown options.
|
|
6538
|
+
indicators.addSelectionOptions.call(popup, chart, parentNode, selectBox, type, fieldName, value);
|
|
5791
6539
|
}
|
|
5792
6540
|
else if (
|
|
5793
|
-
//
|
|
5794
|
-
parentFullName !== 'params.volumeSeriesID'
|
|
5795
|
-
|
|
6541
|
+
// Skip volume field which is created by addFormFields.
|
|
6542
|
+
parentFullName !== 'params.volumeSeriesID' &&
|
|
6543
|
+
!isArray(value) // Skip params declared in array.
|
|
6544
|
+
) {
|
|
6545
|
+
addInput.call(popup, parentFullName, type, parentDiv, {
|
|
6546
|
+
value: value,
|
|
6547
|
+
type: 'text'
|
|
6548
|
+
} // all inputs are text type
|
|
5796
6549
|
);
|
|
5797
6550
|
}
|
|
5798
6551
|
}
|
|
@@ -5874,8 +6627,10 @@
|
|
|
5874
6627
|
addContentItem: function () {
|
|
5875
6628
|
var popupDiv = this.popup.container;
|
|
5876
6629
|
return createElement(DIV, {
|
|
5877
|
-
|
|
5878
|
-
|
|
6630
|
+
// #12100
|
|
6631
|
+
className: PREFIX + 'tab-item-content ' +
|
|
6632
|
+
PREFIX + 'no-mousewheel'
|
|
6633
|
+
}, void 0, popupDiv);
|
|
5879
6634
|
},
|
|
5880
6635
|
/**
|
|
5881
6636
|
* Add click event to each tab
|
|
@@ -5938,7 +6693,7 @@
|
|
|
5938
6693
|
this.popup = new H.Popup(this.chart.container, (this.chart.options.navigation.iconsURL ||
|
|
5939
6694
|
(this.chart.options.stockTools &&
|
|
5940
6695
|
this.chart.options.stockTools.gui.iconsURL) ||
|
|
5941
|
-
'https://code.highcharts.com/9.2
|
|
6696
|
+
'https://code.highcharts.com/9.3.2/gfx/stock-icons/'), this.chart);
|
|
5942
6697
|
}
|
|
5943
6698
|
this.popup.showForm(config.formType, this.chart, config.options, config.onSubmit);
|
|
5944
6699
|
});
|