highcharts 8.1.0 → 8.2.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/bower.json +1 -1
- package/css/highcharts.css +12 -0
- package/css/highcharts.scss +12 -0
- package/css/themes/dark-unica.css +12 -0
- package/css/themes/grid-light.css +12 -0
- package/css/themes/sand-signika.css +12 -0
- package/es-modules/{modules/accessibility/a11y-i18n.js → Accessibility/A11yI18n.js} +2 -2
- package/es-modules/{modules/accessibility/accessibility.js → Accessibility/Accessibility.js} +24 -21
- package/es-modules/{modules/accessibility → Accessibility}/AccessibilityComponent.js +73 -17
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/AnnotationsA11y.js +2 -4
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/ContainerComponent.js +8 -9
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/InfoRegionsComponent.js +9 -12
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/LegendComponent.js +60 -22
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/MenuComponent.js +4 -11
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/RangeSelectorComponent.js +8 -7
- package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +171 -0
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/SeriesComponent/NewDataAnnouncer.js +8 -7
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/SeriesComponent/SeriesComponent.js +5 -5
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/SeriesComponent/SeriesDescriber.js +6 -6
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/SeriesComponent/SeriesKeyboardNavigation.js +22 -20
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/ZoomComponent.js +9 -8
- package/es-modules/{modules/accessibility/focusBorder.js → Accessibility/FocusBorder.js} +13 -10
- package/es-modules/{modules/accessibility/high-contrast-mode.js → Accessibility/HighContrastMode.js} +3 -2
- package/es-modules/{modules/accessibility/high-contrast-theme.js → Accessibility/HighContrastTheme.js} +0 -0
- package/es-modules/{modules/accessibility → Accessibility}/KeyboardNavigation.js +35 -22
- package/es-modules/{modules/accessibility → Accessibility}/KeyboardNavigationHandler.js +1 -1
- package/es-modules/{modules/accessibility/options/deprecatedOptions.js → Accessibility/Options/DeprecatedOptions.js} +10 -20
- package/es-modules/{modules/accessibility/options/langOptions.js → Accessibility/Options/LangOptions.js} +1 -1
- package/es-modules/{modules/accessibility/options/options.js → Accessibility/Options/Options.js} +1 -2
- package/es-modules/{modules/accessibility/utils → Accessibility/Utils}/Announcer.js +2 -2
- package/es-modules/{modules/accessibility/utils/chartUtilities.js → Accessibility/Utils/ChartUtilities.js} +8 -9
- package/es-modules/{modules/accessibility/utils → Accessibility/Utils}/DOMElementProvider.js +5 -5
- package/es-modules/{modules/accessibility/utils → Accessibility/Utils}/EventProvider.js +2 -2
- package/es-modules/{modules/accessibility/utils/htmlUtilities.js → Accessibility/Utils/HTMLUtilities.js} +3 -4
- package/es-modules/Core/Animation/AnimationUtilities.js +193 -0
- package/es-modules/Core/Animation/Fx.js +378 -0
- package/es-modules/{parts → Core/Axis}/Axis.js +153 -89
- package/es-modules/{parts-3d → Core/Axis}/Axis3D.js +12 -7
- package/es-modules/{modules/broken-axis.src.js → Core/Axis/BrokenAxis.js} +6 -8
- package/es-modules/{parts-map → Core/Axis}/ColorAxis.js +28 -31
- package/es-modules/{parts → Core/Axis}/DateTimeAxis.js +1 -1
- package/es-modules/{parts-gantt → Core/Axis}/GridAxis.js +136 -39
- package/es-modules/{parts-more → Core/Axis}/HiddenAxis.js +0 -0
- package/es-modules/{parts → Core/Axis}/LogarithmicAxis.js +1 -1
- package/es-modules/{parts-map → Core/Axis}/MapAxis.js +2 -2
- package/es-modules/{parts → Core/Axis}/NavigatorAxis.js +2 -2
- package/es-modules/{parts → Core/Axis}/OrdinalAxis.js +241 -224
- package/es-modules/{parts → Core/Axis}/PlotLineOrBand.js +24 -15
- package/es-modules/{parts-more → Core/Axis}/RadialAxis.js +34 -27
- package/es-modules/{parts → Core/Axis}/ScrollbarAxis.js +2 -2
- package/es-modules/{parts → Core/Axis}/StackingAxis.js +11 -2
- package/es-modules/{parts → Core/Axis}/Tick.js +14 -14
- package/es-modules/{parts-3d → Core/Axis}/Tick3D.js +1 -1
- package/es-modules/{parts-gantt → Core/Axis}/TreeGridAxis.js +81 -15
- package/es-modules/{parts-gantt → Core/Axis}/TreeGridTick.js +1 -1
- package/es-modules/{parts-3d → Core/Axis}/ZAxis.js +2 -2
- package/es-modules/{parts → Core/Chart}/Chart.js +225 -227
- package/es-modules/Core/Chart/Chart3D.js +1674 -0
- package/es-modules/{parts-gantt → Core/Chart}/GanttChart.js +13 -12
- package/es-modules/{parts → Core/Chart}/StockChart.js +26 -25
- package/es-modules/Core/Color/Color.js +419 -0
- package/es-modules/Core/Color/ColorType.js +9 -0
- package/es-modules/{parts → Core}/Color.js +1 -1
- package/es-modules/{parts → Core}/Dynamics.js +91 -61
- package/es-modules/{parts → Core}/Globals.js +9 -1
- package/es-modules/{parts → Core}/Interaction.js +27 -20
- package/es-modules/{parts → Core}/Legend.js +26 -11
- package/es-modules/{parts → Core}/MSPointer.js +2 -2
- package/es-modules/{parts → Core}/Navigator.js +24 -14
- package/es-modules/{parts → Core}/Options.js +157 -69
- package/es-modules/{parts → Core}/Pointer.js +50 -27
- package/es-modules/Core/Renderer/DOMElementType.js +9 -0
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +220 -0
- package/es-modules/{parts/Html.js → Core/Renderer/HTML/HTMLRenderer.js} +16 -207
- package/es-modules/{parts → Core/Renderer/SVG}/SVGElement.js +186 -32
- package/es-modules/Core/Renderer/SVG/SVGLabel.js +410 -0
- package/es-modules/{parts/SvgRenderer.js → Core/Renderer/SVG/SVGRenderer.js} +426 -886
- package/es-modules/{parts-3d/SVGRenderer.js → Core/Renderer/SVG/SVGRenderer3D.js} +31 -23
- package/es-modules/{parts → Core}/Responsive.js +24 -14
- package/es-modules/{parts → Core}/Scrollbar.js +5 -4
- package/es-modules/Core/Series/BaseSeries.js +157 -0
- package/es-modules/{parts/Series.js → Core/Series/CartesianSeries.js} +119 -55
- package/es-modules/{parts → Core/Series}/DataLabels.js +40 -36
- package/es-modules/{parts → Core/Series}/Point.js +8 -10
- package/es-modules/Core/Series/Series.js +158 -0
- package/es-modules/{parts-3d/Series.js → Core/Series/Series3D.js} +5 -3
- package/es-modules/{parts → Core}/Time.js +11 -133
- package/es-modules/{parts → Core}/Tooltip.js +30 -27
- package/es-modules/{parts → Core}/Utilities.js +103 -562
- package/es-modules/{mixins/ajax.js → Extensions/Ajax.js} +9 -4
- package/es-modules/{annotations/annotations.src.js → Extensions/Annotations/Annotations.js} +901 -709
- package/es-modules/{annotations → Extensions/Annotations}/ControlPoint.js +2 -2
- package/es-modules/Extensions/Annotations/Controllables/ControllableCircle.js +117 -0
- package/es-modules/Extensions/Annotations/Controllables/ControllableImage.js +111 -0
- package/es-modules/{annotations/controllable → Extensions/Annotations/Controllables}/ControllableLabel.js +186 -146
- package/es-modules/{annotations/controllable → Extensions/Annotations/Controllables}/ControllablePath.js +81 -42
- package/es-modules/Extensions/Annotations/Controllables/ControllableRect.js +121 -0
- package/es-modules/{annotations/controllable/controllableMixin.js → Extensions/Annotations/Mixins/ControllableMixin.js} +8 -9
- package/es-modules/{annotations/eventEmitterMixin.js → Extensions/Annotations/Mixins/EventEmitterMixin.js} +7 -7
- package/es-modules/{annotations/controllable/markerMixin.js → Extensions/Annotations/Mixins/MarkerMixin.js} +10 -8
- package/es-modules/{annotations → Extensions/Annotations}/MockPoint.js +6 -6
- package/es-modules/{annotations/navigationBindings.js → Extensions/Annotations/NavigationBindings.js} +27 -16
- package/es-modules/{annotations/popup.js → Extensions/Annotations/Popup.js} +9 -9
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/BasicAnnotation.js +68 -20
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/CrookedLine.js +46 -19
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/ElliottWave.js +33 -12
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/Fibonacci.js +54 -22
- package/es-modules/Extensions/Annotations/Types/InfinityLine.js +147 -0
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/Measure.js +82 -52
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/Pitchfork.js +69 -32
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/Tunnel.js +58 -30
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/VerticalLine.js +64 -33
- package/es-modules/{parts-gantt → Extensions}/ArrowSymbols.js +9 -11
- package/es-modules/{modules/boost/boost.js → Extensions/Boost/Boost.js} +8 -8
- package/es-modules/{modules/boost/boost-attach.js → Extensions/Boost/BoostAttach.js} +10 -8
- package/es-modules/{modules/boost/boost-init.js → Extensions/Boost/BoostInit.js} +7 -6
- package/es-modules/{modules/boost/boost-options.js → Extensions/Boost/BoostOptions.js} +1 -1
- package/es-modules/{modules/boost/boost-overrides.js → Extensions/Boost/BoostOverrides.js} +14 -11
- package/es-modules/{modules/boost/boost-utils.js → Extensions/Boost/BoostUtils.js} +6 -6
- package/es-modules/{modules/boost/boostable-map.js → Extensions/Boost/BoostableMap.js} +1 -1
- package/es-modules/{modules/boost/boostables.js → Extensions/Boost/Boostables.js} +0 -0
- package/es-modules/{modules/boost/named-colors.js → Extensions/Boost/NamedColors.js} +1 -1
- package/es-modules/{modules/boost/wgl-renderer.js → Extensions/Boost/WGLRenderer.js} +9 -9
- package/es-modules/{modules/boost/wgl-shader.js → Extensions/Boost/WGLShader.js} +3 -4
- package/es-modules/{modules/boost/wgl-vbuffer.js → Extensions/Boost/WGLVBuffer.js} +0 -0
- package/es-modules/{modules/boost-canvas.src.js → Extensions/BoostCanvas.js} +13 -9
- package/es-modules/{parts-gantt/CurrentDateIndicator.js → Extensions/CurrentDateIndication.js} +5 -7
- package/es-modules/{modules/data.src.js → Extensions/Data.js} +14 -16
- package/es-modules/{parts → Extensions}/DataGrouping.js +12 -9
- package/es-modules/{modules/debugger.src.js → Extensions/Debugger.js} +6 -6
- package/es-modules/{mixins/download-url.js → Extensions/DownloadURL.js} +15 -7
- package/es-modules/{modules/drag-panes.src.js → Extensions/DragPanes.js} +6 -6
- package/es-modules/{modules/draggable-points.src.js → Extensions/DraggablePoints.js} +21 -32
- package/es-modules/{modules/drilldown.src.js → Extensions/Drilldown.js} +64 -43
- package/es-modules/{modules/export-data.src.js → Extensions/ExportData.js} +126 -26
- package/es-modules/{modules/exporting.src.js → Extensions/Exporting.js} +26 -12
- package/es-modules/{modules/full-screen.src.js → Extensions/FullScreen.js} +5 -3
- package/es-modules/{parts-map → Extensions}/GeoJSON.js +112 -7
- package/es-modules/{modules/marker-clusters.src.js → Extensions/MarkerClusters.js} +29 -39
- package/es-modules/{parts-3d/Math.js → Extensions/Math3D.js} +17 -9
- package/es-modules/{modules/no-data-to-display.src.js → Extensions/NoDataToDisplay.js} +14 -15
- package/es-modules/{modules/offline-exporting.src.js → Extensions/OfflineExporting.js} +39 -35
- package/es-modules/{modules/oldie.src.js → Extensions/Oldie/Oldie.js} +19 -12
- package/es-modules/{parts-3d → Extensions/Oldie}/VMLAxis3D.js +1 -1
- package/es-modules/Extensions/Oldie/VMLRenderer3D.js +46 -0
- package/es-modules/{modules/oldie-polyfills.src.js → Extensions/OldiePolyfills.js} +5 -0
- package/es-modules/{modules/overlapping-datalabels.src.js → Extensions/OverlappingDataLabels.js} +14 -13
- package/es-modules/{parts-more → Extensions}/Pane.js +13 -12
- package/es-modules/{modules/parallel-coordinates.src.js → Extensions/ParallelCoordinates.js} +140 -138
- package/es-modules/{modules/pattern-fill.src.js → Extensions/PatternFill.js} +23 -15
- package/es-modules/{parts-more → Extensions}/Polar.js +15 -12
- package/es-modules/{modules/price-indicator.src.js → Extensions/PriceIndication.js} +5 -3
- package/es-modules/{parts → Extensions}/RangeSelector.js +112 -79
- package/es-modules/{parts → Extensions}/ScrollablePlotArea.js +19 -9
- package/es-modules/{modules/series-label.src.js → Extensions/SeriesLabel.js} +14 -10
- package/es-modules/{modules/sonification/chartSonify.js → Extensions/Sonification/ChartSonify.js} +212 -41
- package/es-modules/{modules/sonification → Extensions/Sonification}/Earcon.js +3 -7
- package/es-modules/{modules/sonification → Extensions/Sonification}/Instrument.js +35 -11
- package/es-modules/{modules/sonification/instrumentDefinitions.js → Extensions/Sonification/InstrumentDefinitions.js} +1 -1
- package/es-modules/{modules/sonification/musicalFrequencies.js → Extensions/Sonification/MusicalFrequencies.js} +0 -0
- package/es-modules/Extensions/Sonification/Options.js +34 -0
- package/es-modules/{modules/sonification/pointSonify.js → Extensions/Sonification/PointSonify.js} +43 -28
- package/es-modules/{modules/sonification/sonification.js → Extensions/Sonification/Sonification.js} +16 -12
- package/es-modules/{modules/sonification → Extensions/Sonification}/Timeline.js +25 -6
- package/es-modules/{modules/sonification/utilities.js → Extensions/Sonification/Utilities.js} +8 -5
- package/es-modules/{parts → Extensions}/Stacking.js +57 -18
- package/es-modules/{modules/static-scale.src.js → Extensions/StaticScale.js} +4 -4
- package/es-modules/{themes/avocado.js → Extensions/Themes/Avocado.js} +5 -4
- package/es-modules/{themes/dark-blue.js → Extensions/Themes/DarkBlue.js} +4 -2
- package/es-modules/{themes/dark-green.js → Extensions/Themes/DarkGreen.js} +4 -2
- package/es-modules/{themes/dark-unica.js → Extensions/Themes/DarkUnica.js} +6 -6
- package/es-modules/{themes/gray.js → Extensions/Themes/Gray.js} +5 -4
- package/es-modules/{themes/grid.js → Extensions/Themes/Grid.js} +4 -2
- package/es-modules/{themes/grid-light.js → Extensions/Themes/GridLight.js} +4 -2
- package/es-modules/{themes/high-contrast-dark.js → Extensions/Themes/HighContrastDark.js} +5 -4
- package/es-modules/{themes/high-contrast-light.js → Extensions/Themes/HighContrastLight.js} +4 -2
- package/es-modules/{themes/sand-signika.js → Extensions/Themes/SandSignika.js} +4 -2
- package/es-modules/{themes/skies.js → Extensions/Themes/Skies.js} +5 -3
- package/es-modules/{themes/sunset.js → Extensions/Themes/Sunset.js} +5 -4
- package/es-modules/{parts-gantt/Pathfinder.js → Gantt/Connection.js} +41 -284
- package/es-modules/Gantt/Pathfinder.js +816 -0
- package/es-modules/Gantt/PathfinderAlgorithms.js +659 -0
- package/es-modules/{parts-gantt → Gantt}/Tree.js +1 -1
- package/es-modules/{parts-map → Maps}/Map.js +24 -15
- package/es-modules/{parts-map → Maps}/MapNavigation.js +4 -5
- package/es-modules/{parts-map → Maps}/MapPointer.js +2 -4
- package/es-modules/{mixins/centered-series.js → Mixins/CenteredSeries.js} +7 -5
- package/es-modules/{parts-map/ColorMapSeriesMixin.js → Mixins/ColorMapSeries.js} +10 -6
- package/es-modules/{parts-map/ColorSeriesMixin.js → Mixins/ColorSeries.js} +12 -4
- package/es-modules/{mixins/derived-series.js → Mixins/DerivedSeries.js} +3 -3
- package/es-modules/{mixins/draw-point.js → Mixins/DrawPoint.js} +6 -1
- package/es-modules/{mixins/geometry.js → Mixins/Geometry.js} +0 -0
- package/es-modules/{mixins/geometry-circles.js → Mixins/GeometryCircles.js} +2 -2
- package/es-modules/{mixins/indicator-required.js → Mixins/IndicatorRequired.js} +1 -1
- package/es-modules/{mixins/legend-symbol.js → Mixins/LegendSymbol.js} +6 -10
- package/es-modules/{mixins/multipe-lines.js → Mixins/MultipleLines.js} +2 -2
- package/es-modules/{mixins/navigation.js → Mixins/Navigation.js} +0 -0
- package/es-modules/{mixins/nelder-mead.js → Mixins/NelderMead.js} +2 -2
- package/es-modules/{mixins/nodes.js → Mixins/Nodes.js} +7 -5
- package/es-modules/{mixins/on-series.js → Mixins/OnSeries.js} +3 -2
- package/es-modules/{mixins/polygon.js → Mixins/Polygon.js} +2 -2
- package/es-modules/{mixins/reduce-array.js → Mixins/ReduceArray.js} +1 -1
- package/es-modules/{mixins/tree-series.js → Mixins/TreeSeries.js} +2 -2
- package/es-modules/{parts-more → Series}/AreaRangeSeries.js +75 -38
- package/es-modules/{parts → Series}/AreaSeries.js +43 -25
- package/es-modules/{parts-more → Series}/AreaSplineRangeSeries.js +47 -10
- package/es-modules/{parts → Series}/AreaSplineSeries.js +49 -10
- package/es-modules/{parts → Series}/BarSeries.js +2 -5
- package/es-modules/{modules/bellcurve.src.js → Series/BellcurveSeries.js} +47 -7
- package/es-modules/{parts-more → Series}/BoxPlotSeries.js +18 -13
- package/es-modules/{parts-more → Series/Bubble}/BubbleLegend.js +11 -9
- package/es-modules/{parts-more → Series/Bubble}/BubbleSeries.js +25 -27
- package/es-modules/{modules/bullet.src.js → Series/BulletSeries.js} +9 -8
- package/es-modules/{parts → Series}/CandlestickSeries.js +11 -8
- package/es-modules/{parts-3d/Column.js → Series/Column3DSeries.js} +108 -28
- package/es-modules/{parts-more → Series}/ColumnPyramidSeries.js +9 -9
- package/es-modules/{parts-more → Series}/ColumnRangeSeries.js +21 -18
- package/es-modules/{parts → Series}/ColumnSeries.js +119 -41
- package/es-modules/{modules/cylinder.src.js → Series/CylinderSeries.js} +14 -14
- package/es-modules/{modules/dependency-wheel.src.js → Series/DependencyWheelSeries.js} +14 -12
- package/es-modules/{modules/dotplot.src.js → Series/DotplotSeries.js} +7 -15
- package/es-modules/{modules/dumbbell.src.js → Series/DumbbellSeries.js} +16 -10
- package/es-modules/{parts-more → Series}/ErrorBarSeries.js +8 -8
- package/es-modules/{parts → Series}/FlagsSeries.js +18 -12
- package/es-modules/{modules/funnel3d.src.js → Series/Funnel3DSeries.js} +14 -16
- package/es-modules/{modules/funnel.src.js → Series/FunnelSeries.js} +16 -14
- package/es-modules/{parts-gantt → Series}/GanttSeries.js +21 -20
- package/es-modules/{parts-more → Series}/GaugeSeries.js +14 -12
- package/es-modules/{parts-map → Series}/HeatmapSeries.js +23 -16
- package/es-modules/{modules/histogram.src.js → Series/HistogramSeries.js} +13 -9
- package/es-modules/{modules/item-series.src.js → Series/ItemSeries.js} +22 -14
- package/es-modules/Series/LineSeries.js +13 -0
- package/es-modules/{modules/lollipop.src.js → Series/LollipopSeries.js} +34 -10
- package/es-modules/{parts-map → Series}/MapBubbleSeries.js +8 -9
- package/es-modules/{parts-map → Series}/MapLineSeries.js +5 -7
- package/es-modules/{parts-map → Series}/MapPointSeries.js +9 -8
- package/es-modules/{parts-map → Series}/MapSeries.js +22 -18
- package/es-modules/{modules/networkgraph/draggable-nodes.js → Series/Networkgraph/DraggableNodes.js} +15 -30
- package/es-modules/{modules/networkgraph/integrations.js → Series/Networkgraph/Integrations.js} +1 -1
- package/es-modules/{modules/networkgraph/layouts.js → Series/Networkgraph/Layouts.js} +43 -13
- package/es-modules/{modules/networkgraph/networkgraph.src.js → Series/Networkgraph/Networkgraph.js} +29 -23
- package/es-modules/{modules/networkgraph → Series/Networkgraph}/QuadTree.js +2 -2
- package/es-modules/{parts → Series}/OHLCSeries.js +5 -7
- package/es-modules/{modules/organization.src.js → Series/OrganizationSeries.js} +10 -7
- package/es-modules/{parts-more → Series}/PackedBubbleSeries.js +104 -28
- package/es-modules/{modules/pareto.src.js → Series/ParetoSeries.js} +10 -9
- package/es-modules/{parts-3d/Pie.js → Series/Pie3DSeries.js} +5 -4
- package/es-modules/{parts → Series}/PieSeries.js +66 -31
- package/es-modules/{parts-more → Series}/PolygonSeries.js +13 -13
- package/es-modules/{modules/pyramid3d.src.js → Series/Pyramid3DSeries.js} +5 -7
- package/es-modules/{modules/sankey.src.js → Series/SankeySeries.js} +23 -21
- package/es-modules/{parts-3d/Scatter.js → Series/Scatter3DSeries.js} +10 -9
- package/es-modules/{parts → Series}/ScatterSeries.js +15 -10
- package/es-modules/{modules/solid-gauge.src.js → Series/SolidGaugeSeries.js} +112 -78
- package/es-modules/{parts → Series}/SplineSeries.js +9 -7
- package/es-modules/{modules/streamgraph.src.js → Series/StreamgraphSeries.js} +42 -6
- package/es-modules/{modules/sunburst.src.js → Series/SunburstSeries.js} +20 -13
- package/es-modules/{modules/tilemap.src.js → Series/TilemapSeries.js} +12 -9
- package/es-modules/{modules/timeline.src.js → Series/TimelineSeries.js} +16 -11
- package/es-modules/{modules/treemap.src.js → Series/TreemapSeries.js} +47 -40
- package/es-modules/{modules/variable-pie.src.js → Series/VariablePieSeries.js} +11 -8
- package/es-modules/{modules/variwide.src.js → Series/VariwideSeries.js} +12 -10
- package/es-modules/{modules/vector.src.js → Series/VectorSeries.js} +11 -7
- package/es-modules/{modules/venn.src.js → Series/VennSeries.js} +29 -20
- package/es-modules/{parts-more → Series}/WaterfallSeries.js +145 -66
- package/es-modules/{modules/windbarb.src.js → Series/WindbarbSeries.js} +13 -9
- package/es-modules/{modules/wordcloud.src.js → Series/WordcloudSeries.js} +17 -13
- package/es-modules/{modules/xrange.src.js → Series/XRangeSeries.js} +16 -12
- package/es-modules/{indicators/acceleration-bands.src.js → Stock/Indicators/ABIndicator.js} +8 -8
- package/es-modules/{indicators/accumulation-distribution.src.js → Stock/Indicators/ADIndicator.js} +5 -4
- package/es-modules/{indicators/ao.src.js → Stock/Indicators/AOIndicator.js} +6 -5
- package/es-modules/{indicators/apo.src.js → Stock/Indicators/APOIndicator.js} +8 -8
- package/es-modules/{indicators/atr.src.js → Stock/Indicators/ATRIndicator.js} +6 -6
- package/es-modules/{indicators/aroon.src.js → Stock/Indicators/AroonIndicator.js} +7 -6
- package/es-modules/{indicators/aroon-oscillator.src.js → Stock/Indicators/AroonOscillatorIndicator.js} +8 -8
- package/es-modules/{indicators/bollinger-bands.src.js → Stock/Indicators/BBIndicator.js} +8 -8
- package/es-modules/{indicators/cci.src.js → Stock/Indicators/CCIIndicator.js} +5 -4
- package/es-modules/{indicators/cmf.src.js → Stock/Indicators/CMFIndicator.js} +3 -4
- package/es-modules/{indicators/chaikin.src.js → Stock/Indicators/ChaikinIndicator.js} +10 -9
- package/es-modules/{indicators/dema.src.js → Stock/Indicators/DEMAIndicator.js} +8 -8
- package/es-modules/{indicators/dpo.src.js → Stock/Indicators/DPOIndicator.js} +5 -4
- package/es-modules/{indicators/ema.src.js → Stock/Indicators/EMAIndicator.js} +4 -4
- package/es-modules/{indicators/ichimoku-kinko-hyo.src.js → Stock/Indicators/IKHIndicator.js} +23 -20
- package/es-modules/{indicators/keltner-channels.src.js → Stock/Indicators/KeltnerChannelsIndicator.js} +11 -8
- package/es-modules/{indicators/macd.src.js → Stock/Indicators/MACDIndicator.js} +9 -6
- package/es-modules/{indicators/mfi.src.js → Stock/Indicators/MFIIndicator.js} +5 -4
- package/es-modules/{indicators/momentum.src.js → Stock/Indicators/MomentumIndicator.js} +5 -4
- package/es-modules/{indicators/natr.src.js → Stock/Indicators/NATRIndicator.js} +4 -6
- package/es-modules/{indicators/price-channel.src.js → Stock/Indicators/PCIndicator.js} +9 -8
- package/es-modules/{indicators/ppo.src.js → Stock/Indicators/PPOIndicator.js} +8 -8
- package/es-modules/{indicators/psar.src.js → Stock/Indicators/PSARIndicator.js} +3 -4
- package/es-modules/{indicators/pivot-points.src.js → Stock/Indicators/PivotPointsIndicator.js} +6 -6
- package/es-modules/{indicators/price-envelopes.src.js → Stock/Indicators/PriceEnvelopesIndicator.js} +6 -6
- package/es-modules/{indicators/roc.src.js → Stock/Indicators/ROCIndicator.js} +5 -4
- package/es-modules/{indicators/rsi.src.js → Stock/Indicators/RSIIndicator.js} +5 -4
- package/es-modules/{indicators/regressions.src.js → Stock/Indicators/RegressionIndicators.js} +8 -7
- package/es-modules/{indicators/indicators.src.js → Stock/Indicators/SMAIndicator.js} +12 -8
- package/es-modules/{indicators/slow-stochastic.src.js → Stock/Indicators/SlowStochasticIndicator.js} +6 -8
- package/es-modules/{indicators/stochastic.src.js → Stock/Indicators/StochasticIndicator.js} +9 -9
- package/es-modules/{indicators/supertrend.src.js → Stock/Indicators/SupertrendIndicator.js} +8 -7
- package/es-modules/{indicators/tema.src.js → Stock/Indicators/TEMAIndicator.js} +8 -8
- package/es-modules/{indicators/trix.src.js → Stock/Indicators/TRIXIndicator.js} +8 -8
- package/es-modules/{indicators/trendline.src.js → Stock/Indicators/TrendLineIndicator.js} +5 -4
- package/es-modules/{indicators/volume-by-price.src.js → Stock/Indicators/VBPIndicator.js} +10 -7
- package/es-modules/{indicators/vwap.src.js → Stock/Indicators/VWAPIndicator.js} +5 -4
- package/es-modules/{indicators/wma.src.js → Stock/Indicators/WMAIndicator.js} +5 -4
- package/es-modules/{indicators/williams-r.src.js → Stock/Indicators/WilliamsRIndicator.js} +7 -6
- package/es-modules/{indicators/zigzag.src.js → Stock/Indicators/ZigzagIndicator.js} +5 -7
- package/es-modules/{modules/stock-tools-bindings.js → Stock/StockToolsBindings.js} +22 -7
- package/es-modules/{modules/stock-tools-gui.js → Stock/StockToolsGui.js} +17 -17
- package/es-modules/error-messages.js +7 -2
- package/es-modules/highcharts.src.js +19853 -0
- package/es-modules/masters/highcharts-3d.src.js +11 -12
- package/es-modules/masters/highcharts-gantt.src.js +1 -1
- package/es-modules/masters/highcharts-more.src.js +15 -15
- package/es-modules/masters/highcharts.src.js +28 -27
- 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 +2 -2
- package/es-modules/masters/indicators/accumulation-distribution.src.js +2 -2
- package/es-modules/masters/indicators/ao.src.js +2 -2
- package/es-modules/masters/indicators/apo.src.js +2 -2
- package/es-modules/masters/indicators/aroon-oscillator.src.js +2 -2
- package/es-modules/masters/indicators/aroon.src.js +2 -2
- package/es-modules/masters/indicators/atr.src.js +2 -2
- package/es-modules/masters/indicators/bollinger-bands.src.js +2 -2
- package/es-modules/masters/indicators/cci.src.js +2 -2
- package/es-modules/masters/indicators/chaikin.src.js +2 -2
- package/es-modules/masters/indicators/cmf.src.js +2 -2
- package/es-modules/masters/indicators/dema.src.js +2 -2
- package/es-modules/masters/indicators/dpo.src.js +2 -2
- package/es-modules/masters/indicators/ema.src.js +2 -2
- package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +2 -2
- package/es-modules/masters/indicators/indicators-all.src.js +41 -41
- package/es-modules/masters/indicators/indicators.src.js +2 -2
- package/es-modules/masters/indicators/keltner-channels.src.js +2 -2
- package/es-modules/masters/indicators/macd.src.js +2 -2
- package/es-modules/masters/indicators/mfi.src.js +2 -2
- package/es-modules/masters/indicators/momentum.src.js +2 -2
- package/es-modules/masters/indicators/natr.src.js +2 -2
- package/es-modules/masters/indicators/pivot-points.src.js +2 -2
- package/es-modules/masters/indicators/ppo.src.js +2 -2
- package/es-modules/masters/indicators/price-channel.src.js +2 -2
- package/es-modules/masters/indicators/price-envelopes.src.js +2 -2
- package/es-modules/masters/indicators/psar.src.js +2 -2
- package/es-modules/masters/indicators/regressions.src.js +2 -2
- package/es-modules/masters/indicators/roc.src.js +2 -2
- package/es-modules/masters/indicators/rsi.src.js +2 -2
- package/es-modules/masters/indicators/slow-stochastic.src.js +2 -2
- package/es-modules/masters/indicators/stochastic.src.js +2 -2
- package/es-modules/masters/indicators/supertrend.src.js +2 -2
- package/es-modules/masters/indicators/tema.src.js +2 -2
- package/es-modules/masters/indicators/trendline.src.js +2 -2
- package/es-modules/masters/indicators/trix.src.js +2 -2
- package/es-modules/masters/indicators/volume-by-price.src.js +2 -2
- package/es-modules/masters/indicators/vwap.src.js +2 -2
- package/es-modules/masters/indicators/williams-r.src.js +2 -2
- package/es-modules/masters/indicators/wma.src.js +2 -2
- package/es-modules/masters/indicators/zigzag.src.js +2 -2
- package/es-modules/masters/modules/accessibility.src.js +2 -2
- package/es-modules/masters/modules/annotations-advanced.src.js +13 -13
- package/es-modules/masters/modules/annotations.src.js +4 -4
- package/es-modules/masters/modules/arrow-symbols.src.js +2 -2
- package/es-modules/masters/modules/boost-canvas.src.js +2 -2
- package/es-modules/masters/modules/boost.src.js +2 -2
- package/es-modules/masters/modules/broken-axis.src.js +2 -2
- package/es-modules/masters/modules/bullet.src.js +2 -2
- package/es-modules/masters/modules/coloraxis.src.js +2 -2
- package/es-modules/masters/modules/current-date-indicator.src.js +2 -2
- package/es-modules/masters/modules/cylinder.src.js +2 -2
- package/es-modules/masters/modules/data.src.js +2 -2
- package/es-modules/masters/modules/datagrouping.src.js +2 -2
- package/es-modules/masters/modules/debugger.src.js +2 -2
- package/es-modules/masters/modules/dependency-wheel.src.js +2 -2
- package/es-modules/masters/modules/dotplot.src.js +2 -2
- package/es-modules/masters/modules/drag-panes.src.js +2 -2
- package/es-modules/masters/modules/draggable-points.src.js +2 -2
- package/es-modules/masters/modules/drilldown.src.js +2 -2
- package/es-modules/masters/modules/dumbbell.src.js +2 -2
- package/es-modules/masters/modules/export-data.src.js +2 -2
- package/es-modules/masters/modules/exporting.src.js +3 -3
- package/es-modules/masters/modules/full-screen.src.js +2 -2
- package/es-modules/masters/modules/funnel.src.js +2 -2
- package/es-modules/masters/modules/funnel3d.src.js +2 -2
- package/es-modules/masters/modules/gantt.src.js +6 -6
- package/es-modules/masters/modules/grid-axis.src.js +2 -2
- package/es-modules/masters/modules/heatmap.src.js +4 -4
- package/es-modules/masters/modules/histogram-bellcurve.src.js +3 -3
- package/es-modules/masters/modules/item-series.src.js +2 -2
- package/es-modules/masters/modules/lollipop.src.js +2 -2
- package/es-modules/masters/modules/map.src.js +13 -13
- package/es-modules/masters/modules/marker-clusters.src.js +2 -2
- package/es-modules/masters/modules/networkgraph.src.js +2 -2
- package/es-modules/masters/modules/no-data-to-display.src.js +2 -2
- package/es-modules/masters/modules/offline-exporting.src.js +2 -2
- package/es-modules/masters/modules/oldie-polyfills.src.js +2 -2
- package/es-modules/masters/modules/oldie.src.js +2 -2
- package/es-modules/masters/modules/organization.src.js +2 -2
- package/es-modules/masters/modules/overlapping-datalabels.src.js +2 -2
- package/es-modules/masters/modules/parallel-coordinates.src.js +2 -2
- package/es-modules/masters/modules/pareto.src.js +2 -2
- package/es-modules/masters/modules/pathfinder.src.js +2 -2
- package/es-modules/masters/modules/pattern-fill.src.js +2 -2
- package/es-modules/masters/modules/price-indicator.src.js +2 -2
- package/es-modules/masters/modules/pyramid3d.src.js +2 -2
- package/es-modules/masters/modules/sankey.src.js +2 -2
- package/es-modules/masters/modules/series-label.src.js +2 -2
- package/es-modules/masters/modules/solid-gauge.src.js +2 -2
- package/es-modules/masters/modules/sonification.src.js +2 -2
- package/es-modules/masters/modules/static-scale.src.js +2 -2
- package/es-modules/masters/modules/stock-tools.src.js +3 -3
- package/es-modules/masters/modules/stock.src.js +10 -10
- package/es-modules/masters/modules/streamgraph.src.js +2 -2
- package/es-modules/masters/modules/sunburst.src.js +2 -2
- package/es-modules/masters/modules/tilemap.src.js +2 -2
- package/es-modules/masters/modules/timeline.src.js +2 -2
- package/es-modules/masters/modules/treegrid.src.js +2 -2
- package/es-modules/masters/modules/treemap.src.js +2 -2
- package/es-modules/masters/modules/variable-pie.src.js +2 -2
- package/es-modules/masters/modules/variwide.src.js +2 -2
- package/es-modules/masters/modules/vector.src.js +2 -2
- package/es-modules/masters/modules/venn.src.js +2 -2
- package/es-modules/masters/modules/windbarb.src.js +2 -2
- package/es-modules/masters/modules/wordcloud.src.js +2 -2
- package/es-modules/masters/modules/xrange.src.js +2 -2
- package/es-modules/masters/themes/avocado.src.js +2 -2
- package/es-modules/masters/themes/dark-blue.src.js +2 -2
- package/es-modules/masters/themes/dark-green.src.js +2 -2
- package/es-modules/masters/themes/dark-unica.src.js +2 -2
- package/es-modules/masters/themes/gray.src.js +2 -2
- package/es-modules/masters/themes/grid-light.src.js +2 -2
- package/es-modules/masters/themes/grid.src.js +2 -2
- package/es-modules/masters/themes/high-contrast-dark.src.js +2 -2
- package/es-modules/masters/themes/high-contrast-light.src.js +2 -2
- package/es-modules/masters/themes/sand-signika.src.js +2 -2
- package/es-modules/masters/themes/skies.src.js +2 -2
- package/es-modules/masters/themes/sunset.src.js +2 -2
- package/highcharts-3d.js +86 -88
- package/highcharts-3d.js.map +1 -1
- package/highcharts-3d.src.js +1713 -1615
- package/highcharts-gantt.js +730 -697
- package/highcharts-gantt.js.map +1 -1
- package/highcharts-gantt.src.js +11747 -10110
- package/highcharts-more.js +164 -161
- package/highcharts-more.js.map +1 -1
- package/highcharts-more.src.js +766 -523
- package/highcharts.d.ts +7728 -1337
- package/highcharts.js +538 -515
- package/highcharts.js.map +1 -1
- package/highcharts.src.d.ts +7728 -1337
- package/highcharts.src.js +8517 -7691
- package/highmaps.js +636 -612
- package/highmaps.js.map +1 -1
- package/highmaps.src.js +9151 -8209
- package/highstock.js +697 -671
- package/highstock.js.map +1 -1
- package/highstock.src.js +8919 -8049
- package/indicators/acceleration-bands.js +8 -8
- package/indicators/acceleration-bands.js.map +1 -1
- package/indicators/acceleration-bands.src.js +8 -8
- package/indicators/accumulation-distribution.js +4 -4
- package/indicators/accumulation-distribution.js.map +1 -1
- package/indicators/accumulation-distribution.src.js +5 -5
- package/indicators/ao.js +5 -5
- package/indicators/ao.js.map +1 -1
- package/indicators/ao.src.js +6 -6
- package/indicators/apo.js +5 -5
- package/indicators/apo.js.map +1 -1
- package/indicators/apo.src.js +8 -9
- package/indicators/aroon-oscillator.js +8 -8
- package/indicators/aroon-oscillator.js.map +1 -1
- package/indicators/aroon-oscillator.src.js +8 -9
- package/indicators/aroon.js +7 -7
- package/indicators/aroon.js.map +1 -1
- package/indicators/aroon.src.js +7 -7
- package/indicators/atr.js +4 -4
- package/indicators/atr.js.map +1 -1
- package/indicators/atr.src.js +6 -14
- package/indicators/bollinger-bands.js +8 -8
- package/indicators/bollinger-bands.js.map +1 -1
- package/indicators/bollinger-bands.src.js +8 -8
- package/indicators/cci.js +4 -4
- package/indicators/cci.js.map +1 -1
- package/indicators/cci.src.js +5 -5
- package/indicators/chaikin.js +6 -6
- package/indicators/chaikin.js.map +1 -1
- package/indicators/chaikin.src.js +75 -75
- package/indicators/cmf.js +4 -4
- package/indicators/cmf.js.map +1 -1
- package/indicators/cmf.src.js +4 -4
- package/indicators/dema.js +5 -5
- package/indicators/dema.js.map +1 -1
- package/indicators/dema.src.js +8 -9
- package/indicators/dpo.js +4 -4
- package/indicators/dpo.js.map +1 -1
- package/indicators/dpo.src.js +5 -5
- package/indicators/ema.js +4 -4
- package/indicators/ema.js.map +1 -1
- package/indicators/ema.src.js +4 -5
- package/indicators/ichimoku-kinko-hyo.js +13 -13
- package/indicators/ichimoku-kinko-hyo.js.map +1 -1
- package/indicators/ichimoku-kinko-hyo.src.js +21 -20
- package/indicators/indicators-all.js +119 -118
- package/indicators/indicators-all.js.map +1 -1
- package/indicators/indicators-all.src.js +231 -240
- package/indicators/indicators.js +9 -9
- package/indicators/indicators.js.map +1 -1
- package/indicators/indicators.src.js +9 -9
- package/indicators/keltner-channels.js +8 -8
- package/indicators/keltner-channels.js.map +1 -1
- package/indicators/keltner-channels.src.js +13 -10
- package/indicators/macd.js +10 -10
- package/indicators/macd.js.map +1 -1
- package/indicators/macd.src.js +8 -7
- package/indicators/mfi.js +4 -4
- package/indicators/mfi.js.map +1 -1
- package/indicators/mfi.src.js +5 -5
- package/indicators/momentum.js +4 -4
- package/indicators/momentum.js.map +1 -1
- package/indicators/momentum.src.js +5 -5
- package/indicators/natr.js +3 -3
- package/indicators/natr.js.map +1 -1
- package/indicators/natr.src.js +5 -5
- package/indicators/pivot-points.js +8 -8
- package/indicators/pivot-points.js.map +1 -1
- package/indicators/pivot-points.src.js +6 -6
- package/indicators/ppo.js +5 -5
- package/indicators/ppo.js.map +1 -1
- package/indicators/ppo.src.js +8 -9
- package/indicators/price-channel.js +8 -8
- package/indicators/price-channel.js.map +1 -1
- package/indicators/price-channel.src.js +66 -66
- package/indicators/price-envelopes.js +6 -6
- package/indicators/price-envelopes.js.map +1 -1
- package/indicators/price-envelopes.src.js +6 -6
- package/indicators/psar.js +3 -3
- package/indicators/psar.js.map +1 -1
- package/indicators/psar.src.js +4 -4
- package/indicators/regressions.js +6 -6
- package/indicators/regressions.js.map +1 -1
- package/indicators/regressions.src.js +8 -8
- package/indicators/roc.js +3 -3
- package/indicators/roc.js.map +1 -1
- package/indicators/roc.src.js +5 -5
- package/indicators/rsi.js +4 -4
- package/indicators/rsi.js.map +1 -1
- package/indicators/rsi.src.js +5 -5
- package/indicators/slow-stochastic.js +5 -5
- package/indicators/slow-stochastic.js.map +1 -1
- package/indicators/slow-stochastic.src.js +7 -7
- package/indicators/stochastic.js +9 -9
- package/indicators/stochastic.js.map +1 -1
- package/indicators/stochastic.src.js +67 -67
- package/indicators/supertrend.js +9 -9
- package/indicators/supertrend.js.map +1 -1
- package/indicators/supertrend.src.js +9 -7
- package/indicators/tema.js +6 -6
- package/indicators/tema.js.map +1 -1
- package/indicators/tema.src.js +8 -9
- package/indicators/trendline.js +3 -3
- package/indicators/trendline.js.map +1 -1
- package/indicators/trendline.src.js +5 -5
- package/indicators/trix.js +4 -4
- package/indicators/trix.js.map +1 -1
- package/indicators/trix.src.js +8 -8
- package/indicators/volume-by-price.js +13 -13
- package/indicators/volume-by-price.js.map +1 -1
- package/indicators/volume-by-price.src.js +7 -8
- package/indicators/vwap.js +4 -4
- package/indicators/vwap.js.map +1 -1
- package/indicators/vwap.src.js +5 -5
- package/indicators/williams-r.js +4 -4
- package/indicators/williams-r.js.map +1 -1
- package/indicators/williams-r.src.js +7 -7
- package/indicators/wma.js +4 -4
- package/indicators/wma.js.map +1 -1
- package/indicators/wma.src.js +5 -5
- package/indicators/zigzag.js +4 -4
- package/indicators/zigzag.js.map +1 -1
- package/indicators/zigzag.src.js +6 -7
- package/modules/accessibility.d.ts +0 -35
- package/modules/accessibility.js +171 -168
- package/modules/accessibility.js.map +1 -1
- package/modules/accessibility.src.d.ts +0 -35
- package/modules/accessibility.src.js +369 -252
- package/modules/annotations-advanced.js +158 -136
- package/modules/annotations-advanced.js.map +1 -1
- package/modules/annotations-advanced.src.js +1929 -1263
- package/modules/annotations.js +105 -94
- package/modules/annotations.js.map +1 -1
- package/modules/annotations.src.js +1485 -1101
- package/modules/arrow-symbols.js +4 -4
- package/modules/arrow-symbols.js.map +1 -1
- package/modules/arrow-symbols.src.js +10 -12
- package/modules/boost-canvas.js +15 -15
- package/modules/boost-canvas.js.map +1 -1
- package/modules/boost-canvas.src.js +17 -17
- package/modules/boost.d.ts +4 -0
- package/modules/boost.js +77 -64
- package/modules/boost.js.map +1 -1
- package/modules/boost.src.d.ts +4 -0
- package/modules/boost.src.js +581 -33
- package/modules/broken-axis.js +10 -10
- package/modules/broken-axis.js.map +1 -1
- package/modules/broken-axis.src.js +4 -5
- package/modules/bullet.js +6 -6
- package/modules/bullet.js.map +1 -1
- package/modules/bullet.src.js +8 -8
- package/modules/coloraxis.js +22 -21
- package/modules/coloraxis.js.map +1 -1
- package/modules/coloraxis.src.js +67 -59
- package/modules/current-date-indicator.js +3 -3
- package/modules/current-date-indicator.js.map +1 -1
- package/modules/current-date-indicator.src.js +4 -5
- package/modules/cylinder.js +8 -8
- package/modules/cylinder.js.map +1 -1
- package/modules/cylinder.src.js +21 -23
- package/modules/data.d.ts +2 -2
- package/modules/data.js +32 -32
- package/modules/data.js.map +1 -1
- package/modules/data.src.d.ts +2 -2
- package/modules/data.src.js +26 -25
- package/modules/datagrouping.js +17 -17
- package/modules/datagrouping.js.map +1 -1
- package/modules/datagrouping.src.js +6 -7
- package/modules/debugger.js +5 -5
- package/modules/debugger.js.map +1 -1
- package/modules/debugger.src.js +13 -8
- package/modules/dependency-wheel.js +8 -8
- package/modules/dependency-wheel.js.map +1 -1
- package/modules/dependency-wheel.src.js +10 -10
- package/modules/dotplot.js +5 -5
- package/modules/dotplot.js.map +1 -1
- package/modules/dotplot.src.js +6 -14
- package/modules/drag-panes.js +10 -10
- package/modules/drag-panes.js.map +1 -1
- package/modules/drag-panes.src.js +4 -6
- package/modules/draggable-points.js +33 -33
- package/modules/draggable-points.js.map +1 -1
- package/modules/draggable-points.src.js +22 -35
- package/modules/drilldown.d.ts +1 -1
- package/modules/drilldown.js +23 -22
- package/modules/drilldown.js.map +1 -1
- package/modules/drilldown.src.d.ts +1 -1
- package/modules/drilldown.src.js +66 -53
- package/modules/dumbbell.d.ts +4 -0
- package/modules/dumbbell.js +24 -9
- package/modules/dumbbell.js.map +1 -1
- package/modules/dumbbell.src.d.ts +4 -0
- package/modules/dumbbell.src.js +1029 -104
- package/modules/export-data.d.ts +4 -29
- package/modules/export-data.js +21 -21
- package/modules/export-data.js.map +1 -1
- package/modules/export-data.src.d.ts +4 -29
- package/modules/export-data.src.js +155 -189
- package/modules/exporting.d.ts +2 -0
- package/modules/exporting.js +33 -33
- package/modules/exporting.js.map +1 -1
- package/modules/exporting.src.d.ts +2 -0
- package/modules/exporting.src.js +40 -30
- package/modules/full-screen.js +7 -7
- package/modules/full-screen.js.map +1 -1
- package/modules/full-screen.src.js +4 -3
- package/modules/funnel.js +9 -9
- package/modules/funnel.js.map +1 -1
- package/modules/funnel.src.js +14 -15
- package/modules/funnel3d.js +17 -17
- package/modules/funnel3d.js.map +1 -1
- package/modules/funnel3d.src.js +12 -14
- package/modules/gantt.js +194 -183
- package/modules/gantt.js.map +1 -1
- package/modules/gantt.src.js +2071 -1260
- package/modules/grid-axis.js +22 -19
- package/modules/grid-axis.js.map +1 -1
- package/modules/grid-axis.src.js +149 -43
- package/modules/heatmap.js +33 -32
- package/modules/heatmap.js.map +1 -1
- package/modules/heatmap.src.js +130 -114
- package/modules/histogram-bellcurve.js +10 -10
- package/modules/histogram-bellcurve.js.map +1 -1
- package/modules/histogram-bellcurve.src.js +57 -16
- package/modules/item-series.js +9 -9
- package/modules/item-series.js.map +1 -1
- package/modules/item-series.src.js +20 -13
- package/modules/lollipop.d.ts +20 -1
- package/modules/lollipop.js +26 -4
- package/modules/lollipop.js.map +1 -1
- package/modules/lollipop.src.d.ts +20 -1
- package/modules/lollipop.src.js +1452 -10
- package/modules/map.d.ts +2 -2
- package/modules/map.js +99 -98
- package/modules/map.js.map +1 -1
- package/modules/map.src.d.ts +2 -2
- package/modules/map.src.js +1442 -1326
- package/modules/marker-clusters.js +35 -36
- package/modules/marker-clusters.js.map +1 -1
- package/modules/marker-clusters.src.js +31 -51
- package/modules/networkgraph.js +47 -46
- package/modules/networkgraph.js.map +1 -1
- package/modules/networkgraph.src.js +98 -81
- package/modules/no-data-to-display.js +4 -4
- package/modules/no-data-to-display.js.map +1 -1
- package/modules/no-data-to-display.src.js +17 -13
- package/modules/offline-exporting.js +15 -15
- package/modules/offline-exporting.js.map +1 -1
- package/modules/offline-exporting.src.js +63 -46
- package/modules/oldie-polyfills.js +6 -6
- package/modules/oldie-polyfills.js.map +1 -1
- package/modules/oldie-polyfills.src.js +7 -2
- package/modules/oldie.js +52 -26
- package/modules/oldie.js.map +1 -1
- package/modules/oldie.src.js +1411 -34
- package/modules/organization.js +11 -11
- package/modules/organization.js.map +1 -1
- package/modules/organization.src.js +7 -6
- package/modules/overlapping-datalabels.js +1 -1
- package/modules/overlapping-datalabels.src.js +1 -1
- package/modules/parallel-coordinates.js +11 -11
- package/modules/parallel-coordinates.js.map +1 -1
- package/modules/parallel-coordinates.src.js +144 -136
- package/modules/pareto.js +5 -5
- package/modules/pareto.js.map +1 -1
- package/modules/pareto.src.js +8 -9
- package/modules/pathfinder.js +31 -27
- package/modules/pathfinder.js.map +1 -1
- package/modules/pathfinder.src.js +1589 -985
- package/modules/pattern-fill.js +13 -13
- package/modules/pattern-fill.js.map +1 -1
- package/modules/pattern-fill.src.js +25 -21
- package/modules/price-indicator.js +4 -4
- package/modules/price-indicator.js.map +1 -1
- package/modules/price-indicator.src.js +5 -3
- package/modules/pyramid3d.js +3 -3
- package/modules/pyramid3d.js.map +1 -1
- package/modules/pyramid3d.src.js +4 -5
- package/modules/sankey.js +25 -26
- package/modules/sankey.js.map +1 -1
- package/modules/sankey.src.js +39 -36
- package/modules/series-label.js +17 -17
- package/modules/series-label.js.map +1 -1
- package/modules/series-label.src.js +17 -17
- package/modules/solid-gauge.js +8 -8
- package/modules/solid-gauge.js.map +1 -1
- package/modules/solid-gauge.src.js +123 -91
- package/modules/sonification.d.ts +33 -16
- package/modules/sonification.js +55 -49
- package/modules/sonification.js.map +1 -1
- package/modules/sonification.src.d.ts +33 -16
- package/modules/sonification.src.js +361 -115
- package/modules/static-scale.js +4 -4
- package/modules/static-scale.js.map +1 -1
- package/modules/static-scale.src.js +3 -4
- package/modules/stock-tools.d.ts +23 -1
- package/modules/stock-tools.js +150 -84
- package/modules/stock-tools.js.map +1 -1
- package/modules/stock-tools.src.d.ts +23 -1
- package/modules/stock-tools.src.js +3792 -44
- package/modules/stock.js +161 -158
- package/modules/stock.js.map +1 -1
- package/modules/stock.src.js +456 -412
- package/modules/streamgraph.js +2 -2
- package/modules/streamgraph.js.map +1 -1
- package/modules/streamgraph.src.js +42 -5
- package/modules/sunburst.js +51 -49
- package/modules/sunburst.js.map +1 -1
- package/modules/sunburst.src.js +152 -52
- package/modules/tilemap.js +14 -14
- package/modules/tilemap.js.map +1 -1
- package/modules/tilemap.src.js +12 -11
- package/modules/timeline.js +14 -14
- package/modules/timeline.js.map +1 -1
- package/modules/timeline.src.js +19 -18
- package/modules/treegrid.js +57 -52
- package/modules/treegrid.js.map +1 -1
- package/modules/treegrid.src.js +236 -60
- package/modules/treemap.js +35 -34
- package/modules/treemap.js.map +1 -1
- package/modules/treemap.src.js +213 -118
- package/modules/variable-pie.js +8 -8
- package/modules/variable-pie.js.map +1 -1
- package/modules/variable-pie.src.js +12 -10
- package/modules/variwide.js +8 -8
- package/modules/variwide.js.map +1 -1
- package/modules/variwide.src.js +8 -8
- package/modules/vector.js +6 -6
- package/modules/vector.js.map +1 -1
- package/modules/vector.src.js +9 -9
- package/modules/venn.js +26 -26
- package/modules/venn.js.map +1 -1
- package/modules/venn.src.js +49 -37
- package/modules/windbarb.js +11 -11
- package/modules/windbarb.js.map +1 -1
- package/modules/windbarb.src.js +11 -12
- package/modules/wordcloud.js +19 -19
- package/modules/wordcloud.js.map +1 -1
- package/modules/wordcloud.src.js +26 -18
- package/modules/xrange.js +12 -12
- package/modules/xrange.js.map +1 -1
- package/modules/xrange.src.js +19 -20
- package/package.json +1 -1
- package/themes/avocado.js +3 -3
- package/themes/avocado.js.map +1 -1
- package/themes/avocado.src.js +5 -4
- package/themes/dark-blue.js +3 -3
- package/themes/dark-blue.js.map +1 -1
- package/themes/dark-blue.src.js +4 -3
- package/themes/dark-green.js +3 -3
- package/themes/dark-green.js.map +1 -1
- package/themes/dark-green.src.js +4 -3
- package/themes/dark-unica.js +7 -7
- package/themes/dark-unica.js.map +1 -1
- package/themes/dark-unica.src.js +6 -6
- package/themes/gray.js +3 -3
- package/themes/gray.js.map +1 -1
- package/themes/gray.src.js +5 -4
- package/themes/grid-light.js +4 -4
- package/themes/grid-light.js.map +1 -1
- package/themes/grid-light.src.js +4 -3
- package/themes/grid.js +3 -3
- package/themes/grid.js.map +1 -1
- package/themes/grid.src.js +4 -3
- package/themes/high-contrast-dark.js +6 -6
- package/themes/high-contrast-dark.js.map +1 -1
- package/themes/high-contrast-dark.src.js +5 -4
- package/themes/high-contrast-light.js +3 -3
- package/themes/high-contrast-light.js.map +1 -1
- package/themes/high-contrast-light.src.js +4 -3
- package/themes/sand-signika.js +5 -5
- package/themes/sand-signika.js.map +1 -1
- package/themes/sand-signika.src.js +4 -3
- package/themes/skies.js +4 -4
- package/themes/skies.js.map +1 -1
- package/themes/skies.src.js +5 -4
- package/themes/sunset.js +3 -3
- package/themes/sunset.js.map +1 -1
- package/themes/sunset.src.js +5 -4
- package/es-modules/annotations/controllable/ControllableCircle.js +0 -79
- package/es-modules/annotations/controllable/ControllableImage.js +0 -79
- package/es-modules/annotations/controllable/ControllableRect.js +0 -82
- package/es-modules/annotations/types/InfinityLine.js +0 -110
- package/es-modules/masters/modules/map-parser.src.js +0 -12
- package/es-modules/modules/accessibility/components/InfoRegionsComponent/AnnotationsA11y.js +0 -80
- package/es-modules/modules/accessibility/components/InfoRegionsComponent/InfoRegionsComponent.js +0 -499
- package/es-modules/modules/accessibility/components/SeriesComponent/forcedMarkers.js +0 -147
- package/es-modules/modules/map-parser.src.js +0 -365
- package/es-modules/modules/sonification/options.js +0 -36
- package/es-modules/parts-3d/Chart.js +0 -1577
- package/es-modules/parts-3d/VMLRenderer.js +0 -35
- package/es-modules/parts-gantt/PathfinderAlgorithms.js +0 -656
- package/modules/map-parser.d.ts +0 -17
- package/modules/map-parser.js +0 -17
- package/modules/map-parser.js.map +0 -1
- package/modules/map-parser.src.d.ts +0 -17
- package/modules/map-parser.src.js +0 -421
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Highcharts JS v8.
|
|
2
|
+
* @license Highcharts JS v8.2.2 (2020-10-22)
|
|
3
3
|
*
|
|
4
4
|
* Annotations module
|
|
5
5
|
*
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
obj[path] = fn.apply(null, args);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
_registerModule(_modules, '
|
|
31
|
+
_registerModule(_modules, 'Extensions/Annotations/Mixins/EventEmitterMixin.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (H, U) {
|
|
32
32
|
/* *
|
|
33
33
|
*
|
|
34
34
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
* */
|
|
37
37
|
var addEvent = U.addEvent,
|
|
38
38
|
fireEvent = U.fireEvent,
|
|
39
|
-
inArray = U.inArray,
|
|
40
39
|
objectEach = U.objectEach,
|
|
41
40
|
pick = U.pick,
|
|
42
41
|
removeEvent = U.removeEvent;
|
|
@@ -59,7 +58,8 @@
|
|
|
59
58
|
addEvents: function () {
|
|
60
59
|
var emitter = this,
|
|
61
60
|
addMouseDownEvent = function (element) {
|
|
62
|
-
addEvent(element,
|
|
61
|
+
addEvent(element,
|
|
62
|
+
H.isTouchDevice ? 'touchstart' : 'mousedown',
|
|
63
63
|
function (e) {
|
|
64
64
|
emitter.onMouseDown(e);
|
|
65
65
|
});
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
emitter.target);
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
-
if (
|
|
82
|
+
if ((emitter.nonDOMEvents || []).indexOf(type) === -1) {
|
|
83
83
|
emitter.graphic.on(type, eventHandler);
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
prevChartY = e.chartY;
|
|
140
140
|
emitter.cancelClick = false;
|
|
141
141
|
emitter.chart.hasDraggedAnnotation = true;
|
|
142
|
-
emitter.removeDrag = addEvent(H.doc, 'mousemove', function (e) {
|
|
142
|
+
emitter.removeDrag = addEvent(H.doc, H.isTouchDevice ? 'touchmove' : 'mousemove', function (e) {
|
|
143
143
|
emitter.hasDragged = true;
|
|
144
144
|
e = pointer.normalize(e);
|
|
145
145
|
e.prevChartX = prevChartX;
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
prevChartX = e.chartX;
|
|
149
149
|
prevChartY = e.chartY;
|
|
150
150
|
});
|
|
151
|
-
emitter.removeMouseUp = addEvent(H.doc, 'mouseup', function (e) {
|
|
151
|
+
emitter.removeMouseUp = addEvent(H.doc, H.isTouchDevice ? 'touchend' : 'mouseup', function (e) {
|
|
152
152
|
emitter.cancelClick = emitter.hasDragged;
|
|
153
153
|
emitter.hasDragged = false;
|
|
154
154
|
emitter.chart.hasDraggedAnnotation = false;
|
|
@@ -268,7 +268,7 @@
|
|
|
268
268
|
|
|
269
269
|
return eventEmitterMixin;
|
|
270
270
|
});
|
|
271
|
-
_registerModule(_modules, '
|
|
271
|
+
_registerModule(_modules, 'Extensions/Annotations/ControlPoint.js', [_modules['Core/Utilities.js'], _modules['Extensions/Annotations/Mixins/EventEmitterMixin.js']], function (U, eventEmitterMixin) {
|
|
272
272
|
/* *
|
|
273
273
|
*
|
|
274
274
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
@@ -420,7 +420,7 @@
|
|
|
420
420
|
|
|
421
421
|
return ControlPoint;
|
|
422
422
|
});
|
|
423
|
-
_registerModule(_modules, '
|
|
423
|
+
_registerModule(_modules, 'Extensions/Annotations/MockPoint.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js'], _modules['Core/Axis/Axis.js']], function (H, U, Axis) {
|
|
424
424
|
/* *
|
|
425
425
|
*
|
|
426
426
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
@@ -686,7 +686,7 @@
|
|
|
686
686
|
axisOptions = options[axisName],
|
|
687
687
|
chart = this.series.chart;
|
|
688
688
|
this.series[axisName] =
|
|
689
|
-
axisOptions instanceof
|
|
689
|
+
axisOptions instanceof Axis ?
|
|
690
690
|
axisOptions :
|
|
691
691
|
defined(axisOptions) ?
|
|
692
692
|
(chart[axisName][axisOptions] ||
|
|
@@ -712,7 +712,7 @@
|
|
|
712
712
|
* Returns a label config object - the same as
|
|
713
713
|
* Highcharts.Point.prototype.getLabelConfig
|
|
714
714
|
* @private
|
|
715
|
-
* @return {
|
|
715
|
+
* @return {Highcharts.AnnotationMockLabelOptionsObject} the point's label config
|
|
716
716
|
*/
|
|
717
717
|
MockPoint.prototype.getLabelConfig = function () {
|
|
718
718
|
return {
|
|
@@ -871,12 +871,16 @@
|
|
|
871
871
|
|
|
872
872
|
return MockPoint;
|
|
873
873
|
});
|
|
874
|
-
_registerModule(_modules, '
|
|
874
|
+
_registerModule(_modules, 'Extensions/Annotations/Mixins/ControllableMixin.js', [_modules['Extensions/Annotations/ControlPoint.js'], _modules['Extensions/Annotations/MockPoint.js'], _modules['Core/Tooltip.js'], _modules['Core/Utilities.js']], function (ControlPoint, MockPoint, Tooltip, U) {
|
|
875
875
|
/* *
|
|
876
876
|
*
|
|
877
877
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
878
878
|
*
|
|
879
879
|
* */
|
|
880
|
+
var isObject = U.isObject,
|
|
881
|
+
isString = U.isString,
|
|
882
|
+
merge = U.merge,
|
|
883
|
+
splat = U.splat;
|
|
880
884
|
/**
|
|
881
885
|
* An object which denots a controllable's anchor positions - relative and
|
|
882
886
|
* absolute.
|
|
@@ -911,10 +915,6 @@
|
|
|
911
915
|
* @name Highcharts.AnnotationControllable#points
|
|
912
916
|
* @type {Array<Highcharts.Point>}
|
|
913
917
|
*/
|
|
914
|
-
var isObject = U.isObject,
|
|
915
|
-
isString = U.isString,
|
|
916
|
-
merge = U.merge,
|
|
917
|
-
splat = U.splat;
|
|
918
918
|
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
919
919
|
/**
|
|
920
920
|
* It provides methods for handling points, control points
|
|
@@ -992,6 +992,7 @@
|
|
|
992
992
|
*/
|
|
993
993
|
anchor: function (point) {
|
|
994
994
|
var plotBox = point.series.getPlotBox(),
|
|
995
|
+
chart = point.series.chart,
|
|
995
996
|
box = point.mock ?
|
|
996
997
|
point.toAnchor() :
|
|
997
998
|
Tooltip.prototype.getAnchor.call({
|
|
@@ -1007,8 +1008,8 @@
|
|
|
1007
1008
|
return {
|
|
1008
1009
|
relativePosition: anchor,
|
|
1009
1010
|
absolutePosition: merge(anchor, {
|
|
1010
|
-
x: anchor.x + plotBox.translateX,
|
|
1011
|
-
y: anchor.y + plotBox.translateY
|
|
1011
|
+
x: anchor.x + (point.mock ? plotBox.translateX : chart.plotLeft),
|
|
1012
|
+
y: anchor.y + (point.mock ? plotBox.translateY : chart.plotTop)
|
|
1012
1013
|
})
|
|
1013
1014
|
};
|
|
1014
1015
|
},
|
|
@@ -1261,7 +1262,7 @@
|
|
|
1261
1262
|
|
|
1262
1263
|
return controllableMixin;
|
|
1263
1264
|
});
|
|
1264
|
-
_registerModule(_modules, '
|
|
1265
|
+
_registerModule(_modules, 'Extensions/Annotations/Mixins/MarkerMixin.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js']], function (Chart, SVGRenderer, U) {
|
|
1265
1266
|
/* *
|
|
1266
1267
|
*
|
|
1267
1268
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
@@ -1346,7 +1347,7 @@
|
|
|
1346
1347
|
}]
|
|
1347
1348
|
}
|
|
1348
1349
|
};
|
|
1349
|
-
|
|
1350
|
+
SVGRenderer.prototype.addMarker = function (id, markerOptions) {
|
|
1350
1351
|
var options = { id: id };
|
|
1351
1352
|
var attrs = {
|
|
1352
1353
|
stroke: markerOptions.color || 'none',
|
|
@@ -1368,11 +1369,14 @@
|
|
|
1368
1369
|
return marker;
|
|
1369
1370
|
};
|
|
1370
1371
|
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1372
|
+
/**
|
|
1373
|
+
* @private
|
|
1374
|
+
*/
|
|
1375
|
+
function createMarkerSetter(markerType) {
|
|
1376
|
+
return function (value) {
|
|
1377
|
+
this.attr(markerType, 'url(#' + value + ')');
|
|
1374
1378
|
};
|
|
1375
|
-
}
|
|
1379
|
+
}
|
|
1376
1380
|
/**
|
|
1377
1381
|
* @private
|
|
1378
1382
|
* @mixin
|
|
@@ -1420,7 +1424,7 @@
|
|
|
1420
1424
|
['markerStart', 'markerEnd'].forEach(setMarker);
|
|
1421
1425
|
}
|
|
1422
1426
|
};
|
|
1423
|
-
addEvent(
|
|
1427
|
+
addEvent(Chart, 'afterGetContainer', function () {
|
|
1424
1428
|
this.options.defs = merge(defaultMarkers, this.options.defs || {});
|
|
1425
1429
|
objectEach(this.options.defs, function (def) {
|
|
1426
1430
|
if (def.tagName === 'marker' && def.render !== false) {
|
|
@@ -1431,14 +1435,13 @@
|
|
|
1431
1435
|
|
|
1432
1436
|
return markerMixin;
|
|
1433
1437
|
});
|
|
1434
|
-
_registerModule(_modules, '
|
|
1438
|
+
_registerModule(_modules, 'Extensions/Annotations/Controllables/ControllablePath.js', [_modules['Extensions/Annotations/Mixins/ControllableMixin.js'], _modules['Core/Globals.js'], _modules['Extensions/Annotations/Mixins/MarkerMixin.js'], _modules['Core/Utilities.js']], function (ControllableMixin, H, MarkerMixin, U) {
|
|
1435
1439
|
/* *
|
|
1436
1440
|
*
|
|
1437
1441
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
1438
1442
|
*
|
|
1439
1443
|
* */
|
|
1440
|
-
var extend = U.extend
|
|
1441
|
-
merge = U.merge;
|
|
1444
|
+
var extend = U.extend;
|
|
1442
1445
|
// See TRACKER_FILL in highcharts.src.js
|
|
1443
1446
|
var TRACKER_FILL = 'rgba(192,192,192,' + (H.svg ? 0.0001 : 0.002) + ')';
|
|
1444
1447
|
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
@@ -1459,41 +1462,57 @@
|
|
|
1459
1462
|
*
|
|
1460
1463
|
* @param {number} index
|
|
1461
1464
|
* Index of the path.
|
|
1462
|
-
**/
|
|
1463
|
-
var ControllablePath = function (annotation,
|
|
1464
|
-
options,
|
|
1465
|
-
index) {
|
|
1466
|
-
this.init(annotation,
|
|
1467
|
-
options,
|
|
1468
|
-
index);
|
|
1469
|
-
this.collection = 'shapes';
|
|
1470
|
-
};
|
|
1471
|
-
/**
|
|
1472
|
-
* A map object which allows to map options attributes to element attributes
|
|
1473
|
-
*
|
|
1474
|
-
* @name Highcharts.AnnotationControllablePath.attrsMap
|
|
1475
|
-
* @type {Highcharts.Dictionary<string>}
|
|
1476
1465
|
*/
|
|
1477
|
-
ControllablePath
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1466
|
+
var ControllablePath = /** @class */ (function () {
|
|
1467
|
+
/* *
|
|
1468
|
+
*
|
|
1469
|
+
* Constructors
|
|
1470
|
+
*
|
|
1471
|
+
* */
|
|
1472
|
+
function ControllablePath(annotation, options, index) {
|
|
1473
|
+
/* *
|
|
1474
|
+
*
|
|
1475
|
+
* Properties
|
|
1476
|
+
*
|
|
1477
|
+
* */
|
|
1478
|
+
this.addControlPoints = ControllableMixin.addControlPoints;
|
|
1479
|
+
this.anchor = ControllableMixin.anchor;
|
|
1480
|
+
this.attr = ControllableMixin.attr;
|
|
1481
|
+
this.attrsFromOptions = ControllableMixin.attrsFromOptions;
|
|
1482
|
+
this.destroy = ControllableMixin.destroy;
|
|
1483
|
+
this.getPointsOptions = ControllableMixin.getPointsOptions;
|
|
1484
|
+
this.init = ControllableMixin.init;
|
|
1485
|
+
this.linkPoints = ControllableMixin.linkPoints;
|
|
1486
|
+
this.point = ControllableMixin.point;
|
|
1487
|
+
this.rotate = ControllableMixin.rotate;
|
|
1488
|
+
this.scale = ControllableMixin.scale;
|
|
1489
|
+
this.setControlPointsVisibility = ControllableMixin.setControlPointsVisibility;
|
|
1490
|
+
this.setMarkers = MarkerMixin.setItemMarkers;
|
|
1491
|
+
this.transform = ControllableMixin.transform;
|
|
1492
|
+
this.transformPoint = ControllableMixin.transformPoint;
|
|
1493
|
+
this.translate = ControllableMixin.translate;
|
|
1494
|
+
this.translatePoint = ControllableMixin.translatePoint;
|
|
1495
|
+
this.translateShape = ControllableMixin.translateShape;
|
|
1496
|
+
this.update = ControllableMixin.update;
|
|
1497
|
+
/**
|
|
1498
|
+
* @type 'path'
|
|
1499
|
+
*/
|
|
1500
|
+
this.type = 'path';
|
|
1501
|
+
this.init(annotation, options, index);
|
|
1502
|
+
this.collection = 'shapes';
|
|
1503
|
+
}
|
|
1504
|
+
/* *
|
|
1505
|
+
*
|
|
1506
|
+
* Functions
|
|
1507
|
+
*
|
|
1508
|
+
* */
|
|
1490
1509
|
/**
|
|
1491
1510
|
* Map the controllable path to 'd' path attribute.
|
|
1492
1511
|
*
|
|
1493
1512
|
* @return {Highcharts.SVGPathArray|null}
|
|
1494
1513
|
* A path's d attribute.
|
|
1495
1514
|
*/
|
|
1496
|
-
toD
|
|
1515
|
+
ControllablePath.prototype.toD = function () {
|
|
1497
1516
|
var dOption = this.options.d;
|
|
1498
1517
|
if (dOption) {
|
|
1499
1518
|
return typeof dOption === 'function' ?
|
|
@@ -1529,11 +1548,11 @@
|
|
|
1529
1548
|
return showPath ?
|
|
1530
1549
|
this.chart.renderer.crispLine(d, this.graphic.strokeWidth()) :
|
|
1531
1550
|
null;
|
|
1532
|
-
}
|
|
1533
|
-
shouldBeDrawn
|
|
1534
|
-
return (
|
|
1535
|
-
}
|
|
1536
|
-
render
|
|
1551
|
+
};
|
|
1552
|
+
ControllablePath.prototype.shouldBeDrawn = function () {
|
|
1553
|
+
return (ControllableMixin.shouldBeDrawn.call(this) || Boolean(this.options.d));
|
|
1554
|
+
};
|
|
1555
|
+
ControllablePath.prototype.render = function (parent) {
|
|
1537
1556
|
var options = this.options,
|
|
1538
1557
|
attrs = this.attrsFromOptions(options);
|
|
1539
1558
|
this.graphic = this.annotation.chart.renderer
|
|
@@ -1559,14 +1578,14 @@
|
|
|
1559
1578
|
options.snap * 2
|
|
1560
1579
|
});
|
|
1561
1580
|
}
|
|
1562
|
-
|
|
1581
|
+
ControllableMixin.render.call(this);
|
|
1563
1582
|
extend(this.graphic, {
|
|
1564
|
-
markerStartSetter:
|
|
1565
|
-
markerEndSetter:
|
|
1583
|
+
markerStartSetter: MarkerMixin.markerStartSetter,
|
|
1584
|
+
markerEndSetter: MarkerMixin.markerEndSetter
|
|
1566
1585
|
});
|
|
1567
1586
|
this.setMarkers(this);
|
|
1568
|
-
}
|
|
1569
|
-
redraw
|
|
1587
|
+
};
|
|
1588
|
+
ControllablePath.prototype.redraw = function (animation) {
|
|
1570
1589
|
var d = this.toD(),
|
|
1571
1590
|
action = animation ? 'animate' : 'attr';
|
|
1572
1591
|
if (d) {
|
|
@@ -1578,19 +1597,44 @@
|
|
|
1578
1597
|
this.tracker.attr({ d: 'M 0 ' + -9e9 });
|
|
1579
1598
|
}
|
|
1580
1599
|
this.graphic.placed = this.tracker.placed = Boolean(d);
|
|
1581
|
-
|
|
1582
|
-
}
|
|
1583
|
-
|
|
1600
|
+
ControllableMixin.redraw.call(this, animation);
|
|
1601
|
+
};
|
|
1602
|
+
/* *
|
|
1603
|
+
*
|
|
1604
|
+
* Static Properties
|
|
1605
|
+
*
|
|
1606
|
+
* */
|
|
1607
|
+
/**
|
|
1608
|
+
* A map object which allows to map options attributes to element attributes
|
|
1609
|
+
*
|
|
1610
|
+
* @name Highcharts.AnnotationControllablePath.attrsMap
|
|
1611
|
+
* @type {Highcharts.Dictionary<string>}
|
|
1612
|
+
*/
|
|
1613
|
+
ControllablePath.attrsMap = {
|
|
1614
|
+
dashStyle: 'dashstyle',
|
|
1615
|
+
strokeWidth: 'stroke-width',
|
|
1616
|
+
stroke: 'stroke',
|
|
1617
|
+
fill: 'fill',
|
|
1618
|
+
zIndex: 'zIndex'
|
|
1619
|
+
};
|
|
1620
|
+
return ControllablePath;
|
|
1621
|
+
}());
|
|
1584
1622
|
|
|
1585
1623
|
return ControllablePath;
|
|
1586
1624
|
});
|
|
1587
|
-
_registerModule(_modules, '
|
|
1625
|
+
_registerModule(_modules, 'Extensions/Annotations/Controllables/ControllableRect.js', [_modules['Extensions/Annotations/Mixins/ControllableMixin.js'], _modules['Extensions/Annotations/Controllables/ControllablePath.js'], _modules['Core/Utilities.js']], function (ControllableMixin, ControllablePath, U) {
|
|
1588
1626
|
/* *
|
|
1589
1627
|
*
|
|
1590
1628
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
1591
1629
|
*
|
|
1592
1630
|
* */
|
|
1593
1631
|
var merge = U.merge;
|
|
1632
|
+
/**
|
|
1633
|
+
* @typedef {Annotation.ControllablePath.AttrsMap}
|
|
1634
|
+
* Annotation.ControllableRect.AttrsMap
|
|
1635
|
+
* @property {string} width=width
|
|
1636
|
+
* @property {string} height=height
|
|
1637
|
+
*/
|
|
1594
1638
|
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
1595
1639
|
/**
|
|
1596
1640
|
* A controllable rect class.
|
|
@@ -1610,44 +1654,58 @@
|
|
|
1610
1654
|
* @param {number} index
|
|
1611
1655
|
* Index of the rectangle
|
|
1612
1656
|
*/
|
|
1613
|
-
var ControllableRect = function (
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1657
|
+
var ControllableRect = /** @class */ (function () {
|
|
1658
|
+
/* *
|
|
1659
|
+
*
|
|
1660
|
+
* Constructors
|
|
1661
|
+
*
|
|
1662
|
+
* */
|
|
1663
|
+
function ControllableRect(annotation, options, index) {
|
|
1664
|
+
/* *
|
|
1665
|
+
*
|
|
1666
|
+
* Properties
|
|
1667
|
+
*
|
|
1668
|
+
* */
|
|
1669
|
+
this.addControlPoints = ControllableMixin.addControlPoints;
|
|
1670
|
+
this.anchor = ControllableMixin.anchor;
|
|
1671
|
+
this.attr = ControllableMixin.attr;
|
|
1672
|
+
this.attrsFromOptions = ControllableMixin.attrsFromOptions;
|
|
1673
|
+
this.destroy = ControllableMixin.destroy;
|
|
1674
|
+
this.getPointsOptions = ControllableMixin.getPointsOptions;
|
|
1675
|
+
this.init = ControllableMixin.init;
|
|
1676
|
+
this.linkPoints = ControllableMixin.linkPoints;
|
|
1677
|
+
this.point = ControllableMixin.point;
|
|
1678
|
+
this.rotate = ControllableMixin.rotate;
|
|
1679
|
+
this.scale = ControllableMixin.scale;
|
|
1680
|
+
this.setControlPointsVisibility = ControllableMixin.setControlPointsVisibility;
|
|
1681
|
+
this.shouldBeDrawn = ControllableMixin.shouldBeDrawn;
|
|
1682
|
+
this.transform = ControllableMixin.transform;
|
|
1683
|
+
this.transformPoint = ControllableMixin.transformPoint;
|
|
1684
|
+
this.translatePoint = ControllableMixin.translatePoint;
|
|
1685
|
+
this.translateShape = ControllableMixin.translateShape;
|
|
1686
|
+
this.update = ControllableMixin.update;
|
|
1687
|
+
/**
|
|
1688
|
+
* @type 'rect'
|
|
1689
|
+
*/
|
|
1690
|
+
this.type = 'rect';
|
|
1691
|
+
this.translate = ControllableMixin.translateShape;
|
|
1692
|
+
this.init(annotation, options, index);
|
|
1693
|
+
this.collection = 'shapes';
|
|
1694
|
+
}
|
|
1695
|
+
/* *
|
|
1696
|
+
*
|
|
1697
|
+
* Functions
|
|
1698
|
+
*
|
|
1699
|
+
* */
|
|
1700
|
+
ControllableRect.prototype.render = function (parent) {
|
|
1643
1701
|
var attrs = this.attrsFromOptions(this.options);
|
|
1644
1702
|
this.graphic = this.annotation.chart.renderer
|
|
1645
1703
|
.rect(0, -9e9, 0, 0)
|
|
1646
1704
|
.attr(attrs)
|
|
1647
1705
|
.add(parent);
|
|
1648
|
-
|
|
1649
|
-
}
|
|
1650
|
-
redraw
|
|
1706
|
+
ControllableMixin.render.call(this);
|
|
1707
|
+
};
|
|
1708
|
+
ControllableRect.prototype.redraw = function (animation) {
|
|
1651
1709
|
var position = this.anchor(this.points[0]).absolutePosition;
|
|
1652
1710
|
if (position) {
|
|
1653
1711
|
this.graphic[animation ? 'animate' : 'attr']({
|
|
@@ -1664,13 +1722,28 @@
|
|
|
1664
1722
|
});
|
|
1665
1723
|
}
|
|
1666
1724
|
this.graphic.placed = Boolean(position);
|
|
1667
|
-
|
|
1668
|
-
}
|
|
1669
|
-
|
|
1725
|
+
ControllableMixin.redraw.call(this, animation);
|
|
1726
|
+
};
|
|
1727
|
+
/* *
|
|
1728
|
+
*
|
|
1729
|
+
* Static Properties
|
|
1730
|
+
*
|
|
1731
|
+
* */
|
|
1732
|
+
/**
|
|
1733
|
+
* A map object which allows to map options attributes to element attributes
|
|
1734
|
+
*
|
|
1735
|
+
* @type {Annotation.ControllableRect.AttrsMap}
|
|
1736
|
+
*/
|
|
1737
|
+
ControllableRect.attrsMap = merge(ControllablePath.attrsMap, {
|
|
1738
|
+
width: 'width',
|
|
1739
|
+
height: 'height'
|
|
1740
|
+
});
|
|
1741
|
+
return ControllableRect;
|
|
1742
|
+
}());
|
|
1670
1743
|
|
|
1671
1744
|
return ControllableRect;
|
|
1672
1745
|
});
|
|
1673
|
-
_registerModule(_modules, '
|
|
1746
|
+
_registerModule(_modules, 'Extensions/Annotations/Controllables/ControllableCircle.js', [_modules['Extensions/Annotations/Mixins/ControllableMixin.js'], _modules['Extensions/Annotations/Controllables/ControllablePath.js'], _modules['Core/Utilities.js']], function (ControllableMixin, ControllablePath, U) {
|
|
1674
1747
|
/* *
|
|
1675
1748
|
*
|
|
1676
1749
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
@@ -1684,45 +1757,65 @@
|
|
|
1684
1757
|
* @requires modules/annotations
|
|
1685
1758
|
*
|
|
1686
1759
|
* @private
|
|
1687
|
-
* @
|
|
1760
|
+
* @class
|
|
1688
1761
|
* @name Highcharts.AnnotationControllableCircle
|
|
1689
1762
|
*
|
|
1690
1763
|
* @param {Highcharts.Annotation} annotation an annotation instance
|
|
1691
1764
|
* @param {Highcharts.AnnotationsShapeOptions} options a shape's options
|
|
1692
1765
|
* @param {number} index of the circle
|
|
1693
|
-
**/
|
|
1694
|
-
var ControllableCircle = function (annotation,
|
|
1695
|
-
options,
|
|
1696
|
-
index) {
|
|
1697
|
-
this.init(annotation,
|
|
1698
|
-
options,
|
|
1699
|
-
index);
|
|
1700
|
-
this.collection = 'shapes';
|
|
1701
|
-
};
|
|
1702
|
-
/**
|
|
1703
|
-
* A map object which allows to map options attributes to element attributes.
|
|
1704
|
-
*
|
|
1705
|
-
* @name Highcharts.AnnotationControllableCircle.attrsMap
|
|
1706
|
-
* @type {Highcharts.Dictionary<string>}
|
|
1707
1766
|
*/
|
|
1708
|
-
ControllableCircle
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1767
|
+
var ControllableCircle = /** @class */ (function () {
|
|
1768
|
+
/* *
|
|
1769
|
+
*
|
|
1770
|
+
* Constructors
|
|
1771
|
+
*
|
|
1772
|
+
* */
|
|
1773
|
+
function ControllableCircle(annotation, options, index) {
|
|
1774
|
+
/* *
|
|
1775
|
+
*
|
|
1776
|
+
* Properties
|
|
1777
|
+
*
|
|
1778
|
+
* */
|
|
1779
|
+
this.addControlPoints = ControllableMixin.addControlPoints;
|
|
1780
|
+
this.anchor = ControllableMixin.anchor;
|
|
1781
|
+
this.attr = ControllableMixin.attr;
|
|
1782
|
+
this.attrsFromOptions = ControllableMixin.attrsFromOptions;
|
|
1783
|
+
this.destroy = ControllableMixin.destroy;
|
|
1784
|
+
this.getPointsOptions = ControllableMixin.getPointsOptions;
|
|
1785
|
+
this.init = ControllableMixin.init;
|
|
1786
|
+
this.linkPoints = ControllableMixin.linkPoints;
|
|
1787
|
+
this.point = ControllableMixin.point;
|
|
1788
|
+
this.rotate = ControllableMixin.rotate;
|
|
1789
|
+
this.scale = ControllableMixin.scale;
|
|
1790
|
+
this.setControlPointsVisibility = ControllableMixin.setControlPointsVisibility;
|
|
1791
|
+
this.shouldBeDrawn = ControllableMixin.shouldBeDrawn;
|
|
1792
|
+
this.transform = ControllableMixin.transform;
|
|
1793
|
+
this.transformPoint = ControllableMixin.transformPoint;
|
|
1794
|
+
this.translatePoint = ControllableMixin.translatePoint;
|
|
1795
|
+
this.translateShape = ControllableMixin.translateShape;
|
|
1796
|
+
this.update = ControllableMixin.update;
|
|
1797
|
+
/**
|
|
1798
|
+
* @type 'circle'
|
|
1799
|
+
*/
|
|
1800
|
+
this.type = 'circle';
|
|
1801
|
+
this.translate = ControllableMixin.translateShape;
|
|
1802
|
+
this.init(annotation, options, index);
|
|
1803
|
+
this.collection = 'shapes';
|
|
1804
|
+
}
|
|
1805
|
+
/* *
|
|
1806
|
+
*
|
|
1807
|
+
* Functions
|
|
1808
|
+
*
|
|
1809
|
+
* */
|
|
1810
|
+
ControllableCircle.prototype.render = function (parent) {
|
|
1718
1811
|
var attrs = this.attrsFromOptions(this.options);
|
|
1719
1812
|
this.graphic = this.annotation.chart.renderer
|
|
1720
1813
|
.circle(0, -9e9, 0)
|
|
1721
1814
|
.attr(attrs)
|
|
1722
1815
|
.add(parent);
|
|
1723
|
-
|
|
1724
|
-
}
|
|
1725
|
-
redraw
|
|
1816
|
+
ControllableMixin.render.call(this);
|
|
1817
|
+
};
|
|
1818
|
+
ControllableCircle.prototype.redraw = function (animation) {
|
|
1726
1819
|
var position = this.anchor(this.points[0]).absolutePosition;
|
|
1727
1820
|
if (position) {
|
|
1728
1821
|
this.graphic[animation ? 'animate' : 'attr']({
|
|
@@ -1738,21 +1831,35 @@
|
|
|
1738
1831
|
});
|
|
1739
1832
|
}
|
|
1740
1833
|
this.graphic.placed = Boolean(position);
|
|
1741
|
-
|
|
1742
|
-
}
|
|
1834
|
+
ControllableMixin.redraw.call(this, animation);
|
|
1835
|
+
};
|
|
1743
1836
|
/**
|
|
1744
1837
|
* Set the radius.
|
|
1745
1838
|
*
|
|
1746
1839
|
* @param {number} r a radius to be set
|
|
1747
1840
|
*/
|
|
1748
|
-
setRadius
|
|
1841
|
+
ControllableCircle.prototype.setRadius = function (r) {
|
|
1749
1842
|
this.options.r = r;
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1843
|
+
};
|
|
1844
|
+
/* *
|
|
1845
|
+
*
|
|
1846
|
+
* Static Properties
|
|
1847
|
+
*
|
|
1848
|
+
* */
|
|
1849
|
+
/**
|
|
1850
|
+
* A map object which allows to map options attributes to element
|
|
1851
|
+
* attributes.
|
|
1852
|
+
*
|
|
1853
|
+
* @name Highcharts.AnnotationControllableCircle.attrsMap
|
|
1854
|
+
* @type {Highcharts.Dictionary<string>}
|
|
1855
|
+
*/
|
|
1856
|
+
ControllableCircle.attrsMap = merge(ControllablePath.attrsMap, { r: 'r' });
|
|
1857
|
+
return ControllableCircle;
|
|
1858
|
+
}());
|
|
1752
1859
|
|
|
1753
1860
|
return ControllableCircle;
|
|
1754
1861
|
});
|
|
1755
|
-
_registerModule(_modules, '
|
|
1862
|
+
_registerModule(_modules, 'Extensions/Annotations/Controllables/ControllableLabel.js', [_modules['Extensions/Annotations/Mixins/ControllableMixin.js'], _modules['Extensions/Annotations/MockPoint.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Tooltip.js'], _modules['Core/Utilities.js']], function (ControllableMixin, MockPoint, SVGRenderer, Tooltip, U) {
|
|
1756
1863
|
/* *
|
|
1757
1864
|
*
|
|
1758
1865
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
@@ -1761,7 +1868,6 @@
|
|
|
1761
1868
|
var extend = U.extend,
|
|
1762
1869
|
format = U.format,
|
|
1763
1870
|
isNumber = U.isNumber,
|
|
1764
|
-
merge = U.merge,
|
|
1765
1871
|
pick = U.pick;
|
|
1766
1872
|
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
1767
1873
|
/**
|
|
@@ -1780,161 +1886,172 @@
|
|
|
1780
1886
|
* @param {number} index
|
|
1781
1887
|
* Index of the label.
|
|
1782
1888
|
*/
|
|
1783
|
-
var ControllableLabel = function (
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
x = (box.x || 0) + (alignOptions.x || 0),
|
|
1814
|
-
y = (box.y || 0) + (alignOptions.y || 0),
|
|
1815
|
-
alignFactor,
|
|
1816
|
-
vAlignFactor;
|
|
1817
|
-
if (align === 'right') {
|
|
1818
|
-
alignFactor = 1;
|
|
1819
|
-
}
|
|
1820
|
-
else if (align === 'center') {
|
|
1821
|
-
alignFactor = 2;
|
|
1822
|
-
}
|
|
1823
|
-
if (alignFactor) {
|
|
1824
|
-
x += (box.width - (alignOptions.width || 0)) / alignFactor;
|
|
1825
|
-
}
|
|
1826
|
-
if (vAlign === 'bottom') {
|
|
1827
|
-
vAlignFactor = 1;
|
|
1828
|
-
}
|
|
1829
|
-
else if (vAlign === 'middle') {
|
|
1830
|
-
vAlignFactor = 2;
|
|
1831
|
-
}
|
|
1832
|
-
if (vAlignFactor) {
|
|
1833
|
-
y += (box.height - (alignOptions.height || 0)) / vAlignFactor;
|
|
1889
|
+
var ControllableLabel = /** @class */ (function () {
|
|
1890
|
+
/* *
|
|
1891
|
+
*
|
|
1892
|
+
* Constructors
|
|
1893
|
+
*
|
|
1894
|
+
* */
|
|
1895
|
+
function ControllableLabel(annotation, options, index) {
|
|
1896
|
+
/* *
|
|
1897
|
+
*
|
|
1898
|
+
* Properties
|
|
1899
|
+
*
|
|
1900
|
+
* */
|
|
1901
|
+
this.addControlPoints = ControllableMixin.addControlPoints;
|
|
1902
|
+
this.attr = ControllableMixin.attr;
|
|
1903
|
+
this.attrsFromOptions = ControllableMixin.attrsFromOptions;
|
|
1904
|
+
this.destroy = ControllableMixin.destroy;
|
|
1905
|
+
this.getPointsOptions = ControllableMixin.getPointsOptions;
|
|
1906
|
+
this.init = ControllableMixin.init;
|
|
1907
|
+
this.linkPoints = ControllableMixin.linkPoints;
|
|
1908
|
+
this.point = ControllableMixin.point;
|
|
1909
|
+
this.rotate = ControllableMixin.rotate;
|
|
1910
|
+
this.scale = ControllableMixin.scale;
|
|
1911
|
+
this.setControlPointsVisibility = ControllableMixin.setControlPointsVisibility;
|
|
1912
|
+
this.shouldBeDrawn = ControllableMixin.shouldBeDrawn;
|
|
1913
|
+
this.transform = ControllableMixin.transform;
|
|
1914
|
+
this.transformPoint = ControllableMixin.transformPoint;
|
|
1915
|
+
this.translateShape = ControllableMixin.translateShape;
|
|
1916
|
+
this.update = ControllableMixin.update;
|
|
1917
|
+
this.init(annotation, options, index);
|
|
1918
|
+
this.collection = 'labels';
|
|
1834
1919
|
}
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
height: label.height
|
|
1860
|
-
},
|
|
1861
|
-
//
|
|
1862
|
-
x = alignAttr.x - chart.plotLeft,
|
|
1863
|
-
y = alignAttr.y - chart.plotTop;
|
|
1864
|
-
// Off left
|
|
1865
|
-
off = x + padding;
|
|
1866
|
-
if (off < 0) {
|
|
1920
|
+
/* *
|
|
1921
|
+
*
|
|
1922
|
+
* Static Functions
|
|
1923
|
+
*
|
|
1924
|
+
* */
|
|
1925
|
+
/**
|
|
1926
|
+
* Returns new aligned position based alignment options and box to align to.
|
|
1927
|
+
* It is almost a one-to-one copy from SVGElement.prototype.align
|
|
1928
|
+
* except it does not use and mutate an element
|
|
1929
|
+
*
|
|
1930
|
+
* @param {Highcharts.AnnotationAlignObject} alignOptions
|
|
1931
|
+
*
|
|
1932
|
+
* @param {Highcharts.BBoxObject} box
|
|
1933
|
+
*
|
|
1934
|
+
* @return {Highcharts.PositionObject}
|
|
1935
|
+
* Aligned position.
|
|
1936
|
+
*/
|
|
1937
|
+
ControllableLabel.alignedPosition = function (alignOptions, box) {
|
|
1938
|
+
var align = alignOptions.align,
|
|
1939
|
+
vAlign = alignOptions.verticalAlign,
|
|
1940
|
+
x = (box.x || 0) + (alignOptions.x || 0),
|
|
1941
|
+
y = (box.y || 0) + (alignOptions.y || 0),
|
|
1942
|
+
alignFactor,
|
|
1943
|
+
vAlignFactor;
|
|
1867
1944
|
if (align === 'right') {
|
|
1868
|
-
|
|
1945
|
+
alignFactor = 1;
|
|
1869
1946
|
}
|
|
1870
|
-
else {
|
|
1871
|
-
|
|
1947
|
+
else if (align === 'center') {
|
|
1948
|
+
alignFactor = 2;
|
|
1872
1949
|
}
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
off = x + bBox.width - padding;
|
|
1876
|
-
if (off > chart.plotWidth) {
|
|
1877
|
-
if (align === 'left') {
|
|
1878
|
-
options.align = 'right';
|
|
1950
|
+
if (alignFactor) {
|
|
1951
|
+
x += (box.width - (alignOptions.width || 0)) / alignFactor;
|
|
1879
1952
|
}
|
|
1880
|
-
|
|
1881
|
-
|
|
1953
|
+
if (vAlign === 'bottom') {
|
|
1954
|
+
vAlignFactor = 1;
|
|
1882
1955
|
}
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
off = y + padding;
|
|
1886
|
-
if (off < 0) {
|
|
1887
|
-
if (verticalAlign === 'bottom') {
|
|
1888
|
-
options.verticalAlign = 'top';
|
|
1956
|
+
else if (vAlign === 'middle') {
|
|
1957
|
+
vAlignFactor = 2;
|
|
1889
1958
|
}
|
|
1890
|
-
|
|
1891
|
-
|
|
1959
|
+
if (vAlignFactor) {
|
|
1960
|
+
y += (box.height - (alignOptions.height || 0)) / vAlignFactor;
|
|
1892
1961
|
}
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1962
|
+
return {
|
|
1963
|
+
x: Math.round(x),
|
|
1964
|
+
y: Math.round(y)
|
|
1965
|
+
};
|
|
1966
|
+
};
|
|
1967
|
+
/**
|
|
1968
|
+
* Returns new alignment options for a label if the label is outside the
|
|
1969
|
+
* plot area. It is almost a one-to-one copy from
|
|
1970
|
+
* Series.prototype.justifyDataLabel except it does not mutate the label and
|
|
1971
|
+
* it works with absolute instead of relative position.
|
|
1972
|
+
*/
|
|
1973
|
+
ControllableLabel.justifiedOptions = function (chart, label, alignOptions, alignAttr) {
|
|
1974
|
+
var align = alignOptions.align,
|
|
1975
|
+
verticalAlign = alignOptions.verticalAlign,
|
|
1976
|
+
padding = label.box ? 0 : (label.padding || 0),
|
|
1977
|
+
bBox = label.getBBox(),
|
|
1978
|
+
off,
|
|
1979
|
+
//
|
|
1980
|
+
options = {
|
|
1981
|
+
align: align,
|
|
1982
|
+
verticalAlign: verticalAlign,
|
|
1983
|
+
x: alignOptions.x,
|
|
1984
|
+
y: alignOptions.y,
|
|
1985
|
+
width: label.width,
|
|
1986
|
+
height: label.height
|
|
1987
|
+
},
|
|
1988
|
+
//
|
|
1989
|
+
x = alignAttr.x - chart.plotLeft,
|
|
1990
|
+
y = alignAttr.y - chart.plotTop;
|
|
1991
|
+
// Off left
|
|
1992
|
+
off = x + padding;
|
|
1993
|
+
if (off < 0) {
|
|
1994
|
+
if (align === 'right') {
|
|
1995
|
+
options.align = 'left';
|
|
1996
|
+
}
|
|
1997
|
+
else {
|
|
1998
|
+
options.x = -off;
|
|
1999
|
+
}
|
|
1899
2000
|
}
|
|
1900
|
-
|
|
1901
|
-
|
|
2001
|
+
// Off right
|
|
2002
|
+
off = x + bBox.width - padding;
|
|
2003
|
+
if (off > chart.plotWidth) {
|
|
2004
|
+
if (align === 'left') {
|
|
2005
|
+
options.align = 'right';
|
|
2006
|
+
}
|
|
2007
|
+
else {
|
|
2008
|
+
options.x = chart.plotWidth - off;
|
|
2009
|
+
}
|
|
1902
2010
|
}
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
2011
|
+
// Off top
|
|
2012
|
+
off = y + padding;
|
|
2013
|
+
if (off < 0) {
|
|
2014
|
+
if (verticalAlign === 'bottom') {
|
|
2015
|
+
options.verticalAlign = 'top';
|
|
2016
|
+
}
|
|
2017
|
+
else {
|
|
2018
|
+
options.y = -off;
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
// Off bottom
|
|
2022
|
+
off = y + bBox.height - padding;
|
|
2023
|
+
if (off > chart.plotHeight) {
|
|
2024
|
+
if (verticalAlign === 'top') {
|
|
2025
|
+
options.verticalAlign = 'bottom';
|
|
2026
|
+
}
|
|
2027
|
+
else {
|
|
2028
|
+
options.y = chart.plotHeight - off;
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
return options;
|
|
2032
|
+
};
|
|
2033
|
+
/* *
|
|
2034
|
+
*
|
|
2035
|
+
* Functions
|
|
2036
|
+
*
|
|
2037
|
+
* */
|
|
1921
2038
|
/**
|
|
1922
2039
|
* Translate the point of the label by deltaX and deltaY translations.
|
|
1923
2040
|
* The point is the label's anchor.
|
|
1924
2041
|
*
|
|
1925
2042
|
* @param {number} dx translation for x coordinate
|
|
1926
2043
|
* @param {number} dy translation for y coordinate
|
|
1927
|
-
|
|
1928
|
-
translatePoint
|
|
1929
|
-
|
|
1930
|
-
}
|
|
2044
|
+
*/
|
|
2045
|
+
ControllableLabel.prototype.translatePoint = function (dx, dy) {
|
|
2046
|
+
ControllableMixin.translatePoint.call(this, dx, dy, 0);
|
|
2047
|
+
};
|
|
1931
2048
|
/**
|
|
1932
2049
|
* Translate x and y position relative to the label's anchor.
|
|
1933
2050
|
*
|
|
1934
2051
|
* @param {number} dx translation for x coordinate
|
|
1935
2052
|
* @param {number} dy translation for y coordinate
|
|
1936
|
-
|
|
1937
|
-
translate
|
|
2053
|
+
*/
|
|
2054
|
+
ControllableLabel.prototype.translate = function (dx, dy) {
|
|
1938
2055
|
var chart = this.annotation.chart,
|
|
1939
2056
|
// Annotation.options
|
|
1940
2057
|
labelOptions = this.annotation.userOptions,
|
|
@@ -1956,8 +2073,8 @@
|
|
|
1956
2073
|
chartOptions[this.collection][this.index].y = this.options.y;
|
|
1957
2074
|
labelOptions[this.collection][this.index].x = this.options.x;
|
|
1958
2075
|
labelOptions[this.collection][this.index].y = this.options.y;
|
|
1959
|
-
}
|
|
1960
|
-
render
|
|
2076
|
+
};
|
|
2077
|
+
ControllableLabel.prototype.render = function (parent) {
|
|
1961
2078
|
var options = this.options,
|
|
1962
2079
|
attrs = this.attrsFromOptions(options),
|
|
1963
2080
|
style = options.style;
|
|
@@ -1978,14 +2095,13 @@
|
|
|
1978
2095
|
this.graphic.addClass(options.className);
|
|
1979
2096
|
}
|
|
1980
2097
|
this.graphic.labelrank = options.labelrank;
|
|
1981
|
-
|
|
1982
|
-
}
|
|
1983
|
-
redraw
|
|
2098
|
+
ControllableMixin.render.call(this);
|
|
2099
|
+
};
|
|
2100
|
+
ControllableLabel.prototype.redraw = function (animation) {
|
|
1984
2101
|
var options = this.options,
|
|
1985
2102
|
text = this.text || options.format || options.text,
|
|
1986
2103
|
label = this.graphic,
|
|
1987
2104
|
point = this.points[0],
|
|
1988
|
-
show = false,
|
|
1989
2105
|
anchor,
|
|
1990
2106
|
attrs;
|
|
1991
2107
|
label.attr({
|
|
@@ -1995,8 +2111,7 @@
|
|
|
1995
2111
|
});
|
|
1996
2112
|
anchor = this.anchor(point);
|
|
1997
2113
|
attrs = this.position(anchor);
|
|
1998
|
-
|
|
1999
|
-
if (show) {
|
|
2114
|
+
if (attrs) {
|
|
2000
2115
|
label.alignAttr = attrs;
|
|
2001
2116
|
attrs.anchorX = anchor.absolutePosition.x;
|
|
2002
2117
|
attrs.anchorY = anchor.absolutePosition.y;
|
|
@@ -2008,16 +2123,16 @@
|
|
|
2008
2123
|
y: -9999 // #10055
|
|
2009
2124
|
});
|
|
2010
2125
|
}
|
|
2011
|
-
label.placed =
|
|
2012
|
-
|
|
2013
|
-
}
|
|
2126
|
+
label.placed = !!attrs;
|
|
2127
|
+
ControllableMixin.redraw.call(this, animation);
|
|
2128
|
+
};
|
|
2014
2129
|
/**
|
|
2015
2130
|
* All basic shapes don't support alignTo() method except label.
|
|
2016
2131
|
* For a controllable label, we need to subtract translation from
|
|
2017
2132
|
* options.
|
|
2018
2133
|
*/
|
|
2019
|
-
anchor
|
|
2020
|
-
var anchor =
|
|
2134
|
+
ControllableLabel.prototype.anchor = function (_point) {
|
|
2135
|
+
var anchor = ControllableMixin.anchor.apply(this,
|
|
2021
2136
|
arguments),
|
|
2022
2137
|
x = this.options.x || 0,
|
|
2023
2138
|
y = this.options.y || 0;
|
|
@@ -2026,7 +2141,7 @@
|
|
|
2026
2141
|
anchor.relativePosition.x -= x;
|
|
2027
2142
|
anchor.relativePosition.y -= y;
|
|
2028
2143
|
return anchor;
|
|
2029
|
-
}
|
|
2144
|
+
};
|
|
2030
2145
|
/**
|
|
2031
2146
|
* Returns the label position relative to its anchor.
|
|
2032
2147
|
*
|
|
@@ -2034,7 +2149,7 @@
|
|
|
2034
2149
|
*
|
|
2035
2150
|
* @return {Highcharts.PositionObject|null}
|
|
2036
2151
|
*/
|
|
2037
|
-
position
|
|
2152
|
+
ControllableLabel.prototype.position = function (anchor) {
|
|
2038
2153
|
var item = this.graphic,
|
|
2039
2154
|
chart = this.annotation.chart,
|
|
2040
2155
|
point = this.points[0],
|
|
@@ -2087,16 +2202,42 @@
|
|
|
2087
2202
|
}
|
|
2088
2203
|
}
|
|
2089
2204
|
return showItem ? itemPosition : null;
|
|
2090
|
-
}
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2205
|
+
};
|
|
2206
|
+
/* *
|
|
2207
|
+
*
|
|
2208
|
+
* Static Properties
|
|
2209
|
+
*
|
|
2210
|
+
* */
|
|
2211
|
+
/**
|
|
2212
|
+
* A map object which allows to map options attributes to element attributes
|
|
2213
|
+
*
|
|
2214
|
+
* @type {Highcharts.Dictionary<string>}
|
|
2215
|
+
*/
|
|
2216
|
+
ControllableLabel.attrsMap = {
|
|
2217
|
+
backgroundColor: 'fill',
|
|
2218
|
+
borderColor: 'stroke',
|
|
2219
|
+
borderWidth: 'stroke-width',
|
|
2220
|
+
zIndex: 'zIndex',
|
|
2221
|
+
borderRadius: 'r',
|
|
2222
|
+
padding: 'padding'
|
|
2223
|
+
};
|
|
2224
|
+
/**
|
|
2225
|
+
* Shapes which do not have background - the object is used for proper
|
|
2226
|
+
* setting of the contrast color.
|
|
2227
|
+
*
|
|
2228
|
+
* @type {Array<string>}
|
|
2229
|
+
*/
|
|
2230
|
+
ControllableLabel.shapesWithoutBackground = ['connector'];
|
|
2231
|
+
return ControllableLabel;
|
|
2232
|
+
}());
|
|
2233
|
+
/* ********************************************************************** */
|
|
2234
|
+
/**
|
|
2235
|
+
* General symbol definition for labels with connector
|
|
2236
|
+
* @private
|
|
2237
|
+
*/
|
|
2238
|
+
SVGRenderer.prototype.symbols.connector = function (x, y, w, h, options) {
|
|
2239
|
+
var anchorX = options && options.anchorX,
|
|
2240
|
+
anchorY = options && options.anchorY,
|
|
2100
2241
|
path,
|
|
2101
2242
|
yOffset,
|
|
2102
2243
|
lateral = w / 2;
|
|
@@ -2132,13 +2273,12 @@
|
|
|
2132
2273
|
|
|
2133
2274
|
return ControllableLabel;
|
|
2134
2275
|
});
|
|
2135
|
-
_registerModule(_modules, '
|
|
2276
|
+
_registerModule(_modules, 'Extensions/Annotations/Controllables/ControllableImage.js', [_modules['Extensions/Annotations/Controllables/ControllableLabel.js'], _modules['Extensions/Annotations/Mixins/ControllableMixin.js']], function (ControllableLabel, ControllableMixin) {
|
|
2136
2277
|
/* *
|
|
2137
2278
|
*
|
|
2138
2279
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
2139
2280
|
*
|
|
2140
2281
|
* */
|
|
2141
|
-
var merge = U.merge;
|
|
2142
2282
|
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
2143
2283
|
/**
|
|
2144
2284
|
* A controllable image class.
|
|
@@ -2157,33 +2297,46 @@
|
|
|
2157
2297
|
*
|
|
2158
2298
|
* @param {number} index
|
|
2159
2299
|
* Index of the image.
|
|
2160
|
-
**/
|
|
2161
|
-
var ControllableImage = function (annotation,
|
|
2162
|
-
options,
|
|
2163
|
-
index) {
|
|
2164
|
-
this.init(annotation,
|
|
2165
|
-
options,
|
|
2166
|
-
index);
|
|
2167
|
-
this.collection = 'shapes';
|
|
2168
|
-
};
|
|
2169
|
-
/**
|
|
2170
|
-
* A map object which allows to map options attributes to element attributes
|
|
2171
|
-
*
|
|
2172
|
-
* @name Highcharts.AnnotationControllableImage.attrsMap
|
|
2173
|
-
* @type {Highcharts.Dictionary<string>}
|
|
2174
2300
|
*/
|
|
2175
|
-
ControllableImage
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2301
|
+
var ControllableImage = /** @class */ (function () {
|
|
2302
|
+
/* *
|
|
2303
|
+
*
|
|
2304
|
+
* Constructors
|
|
2305
|
+
*
|
|
2306
|
+
* */
|
|
2307
|
+
function ControllableImage(annotation, options, index) {
|
|
2308
|
+
/* *
|
|
2309
|
+
*
|
|
2310
|
+
* Properties
|
|
2311
|
+
*
|
|
2312
|
+
* */
|
|
2313
|
+
this.addControlPoints = ControllableMixin.addControlPoints;
|
|
2314
|
+
this.anchor = ControllableMixin.anchor;
|
|
2315
|
+
this.attr = ControllableMixin.attr;
|
|
2316
|
+
this.attrsFromOptions = ControllableMixin.attrsFromOptions;
|
|
2317
|
+
this.destroy = ControllableMixin.destroy;
|
|
2318
|
+
this.getPointsOptions = ControllableMixin.getPointsOptions;
|
|
2319
|
+
this.init = ControllableMixin.init;
|
|
2320
|
+
this.linkPoints = ControllableMixin.linkPoints;
|
|
2321
|
+
this.point = ControllableMixin.point;
|
|
2322
|
+
this.rotate = ControllableMixin.rotate;
|
|
2323
|
+
this.scale = ControllableMixin.scale;
|
|
2324
|
+
this.setControlPointsVisibility = ControllableMixin.setControlPointsVisibility;
|
|
2325
|
+
this.shouldBeDrawn = ControllableMixin.shouldBeDrawn;
|
|
2326
|
+
this.transform = ControllableMixin.transform;
|
|
2327
|
+
this.transformPoint = ControllableMixin.transformPoint;
|
|
2328
|
+
this.translatePoint = ControllableMixin.translatePoint;
|
|
2329
|
+
this.translateShape = ControllableMixin.translateShape;
|
|
2330
|
+
this.update = ControllableMixin.update;
|
|
2331
|
+
/**
|
|
2332
|
+
* @type 'image'
|
|
2333
|
+
*/
|
|
2334
|
+
this.type = 'image';
|
|
2335
|
+
this.translate = ControllableMixin.translateShape;
|
|
2336
|
+
this.init(annotation, options, index);
|
|
2337
|
+
this.collection = 'shapes';
|
|
2338
|
+
}
|
|
2339
|
+
ControllableImage.prototype.render = function (parent) {
|
|
2187
2340
|
var attrs = this.attrsFromOptions(this.options),
|
|
2188
2341
|
options = this.options;
|
|
2189
2342
|
this.graphic = this.annotation.chart.renderer
|
|
@@ -2192,9 +2345,9 @@
|
|
|
2192
2345
|
.add(parent);
|
|
2193
2346
|
this.graphic.width = options.width;
|
|
2194
2347
|
this.graphic.height = options.height;
|
|
2195
|
-
|
|
2196
|
-
}
|
|
2197
|
-
redraw
|
|
2348
|
+
ControllableMixin.render.call(this);
|
|
2349
|
+
};
|
|
2350
|
+
ControllableImage.prototype.redraw = function (animation) {
|
|
2198
2351
|
var anchor = this.anchor(this.points[0]),
|
|
2199
2352
|
position = ControllableLabel.prototype.position.call(this,
|
|
2200
2353
|
anchor);
|
|
@@ -2211,13 +2364,30 @@
|
|
|
2211
2364
|
});
|
|
2212
2365
|
}
|
|
2213
2366
|
this.graphic.placed = Boolean(position);
|
|
2214
|
-
|
|
2215
|
-
}
|
|
2216
|
-
|
|
2367
|
+
ControllableMixin.redraw.call(this, animation);
|
|
2368
|
+
};
|
|
2369
|
+
/* *
|
|
2370
|
+
*
|
|
2371
|
+
* Static Properties
|
|
2372
|
+
*
|
|
2373
|
+
* */
|
|
2374
|
+
/**
|
|
2375
|
+
* A map object which allows to map options attributes to element attributes
|
|
2376
|
+
*
|
|
2377
|
+
* @name Highcharts.AnnotationControllableImage.attrsMap
|
|
2378
|
+
* @type {Highcharts.Dictionary<string>}
|
|
2379
|
+
*/
|
|
2380
|
+
ControllableImage.attrsMap = {
|
|
2381
|
+
width: 'width',
|
|
2382
|
+
height: 'height',
|
|
2383
|
+
zIndex: 'zIndex'
|
|
2384
|
+
};
|
|
2385
|
+
return ControllableImage;
|
|
2386
|
+
}());
|
|
2217
2387
|
|
|
2218
2388
|
return ControllableImage;
|
|
2219
2389
|
});
|
|
2220
|
-
_registerModule(_modules, '
|
|
2390
|
+
_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']], function (A, Chart, ControllableMixin, ControllableRect, ControllableCircle, ControllablePath, ControllableImage, ControllableLabel, ControlPoint, EventEmitterMixin, H, MockPoint, Pointer, U) {
|
|
2221
2391
|
/* *
|
|
2222
2392
|
*
|
|
2223
2393
|
* (c) 2009-2017 Highsoft, Black Label
|
|
@@ -2227,6 +2397,8 @@
|
|
|
2227
2397
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
2228
2398
|
*
|
|
2229
2399
|
* */
|
|
2400
|
+
var getDeferredAnimation = A.getDeferredAnimation;
|
|
2401
|
+
var chartProto = Chart.prototype;
|
|
2230
2402
|
var addEvent = U.addEvent,
|
|
2231
2403
|
defined = U.defined,
|
|
2232
2404
|
destroyObjectProperties = U.destroyObjectProperties,
|
|
@@ -2238,7 +2410,6 @@
|
|
|
2238
2410
|
pick = U.pick,
|
|
2239
2411
|
splat = U.splat,
|
|
2240
2412
|
wrap = U.wrap;
|
|
2241
|
-
var chartProto = H.Chart.prototype;
|
|
2242
2413
|
/* *********************************************************************
|
|
2243
2414
|
*
|
|
2244
2415
|
* ANNOTATION
|
|
@@ -2287,652 +2458,126 @@
|
|
|
2287
2458
|
* @param {Highcharts.Chart} chart a chart instance
|
|
2288
2459
|
* @param {Highcharts.AnnotationsOptions} userOptions the options object
|
|
2289
2460
|
*/
|
|
2290
|
-
var Annotation =
|
|
2291
|
-
|
|
2461
|
+
var Annotation = /** @class */ (function () {
|
|
2462
|
+
/* *
|
|
2463
|
+
*
|
|
2464
|
+
* Constructors
|
|
2465
|
+
*
|
|
2466
|
+
* */
|
|
2467
|
+
function Annotation(chart, userOptions) {
|
|
2468
|
+
/* *
|
|
2469
|
+
*
|
|
2470
|
+
* Properties
|
|
2471
|
+
*
|
|
2472
|
+
* */
|
|
2473
|
+
this.annotation = void 0;
|
|
2474
|
+
this.coll = 'annotations';
|
|
2475
|
+
this.collection = void 0;
|
|
2476
|
+
this.animationConfig = void 0;
|
|
2477
|
+
this.graphic = void 0;
|
|
2478
|
+
this.group = void 0;
|
|
2479
|
+
this.labelCollector = void 0;
|
|
2480
|
+
this.labelsGroup = void 0;
|
|
2481
|
+
this.shapesGroup = void 0;
|
|
2292
2482
|
var labelsAndShapes;
|
|
2293
|
-
/**
|
|
2294
|
-
* The chart that the annotation belongs to.
|
|
2295
|
-
*
|
|
2296
|
-
* @type {Highcharts.Chart}
|
|
2297
|
-
*/
|
|
2298
|
-
this.chart = chart;
|
|
2299
|
-
/**
|
|
2300
|
-
* The array of points which defines the annotation.
|
|
2301
|
-
*
|
|
2302
|
-
* @type {Array<Highcharts.Point>}
|
|
2303
|
-
*/
|
|
2304
|
-
this.points = [];
|
|
2305
|
-
/**
|
|
2306
|
-
* The array of control points.
|
|
2307
|
-
*
|
|
2308
|
-
* @private
|
|
2309
|
-
* @name Highcharts.Annotation#controlPoints
|
|
2310
|
-
* @type {Array<Annotation.ControlPoint>}
|
|
2311
|
-
*/
|
|
2312
|
-
this.controlPoints = [];
|
|
2313
|
-
this.coll = 'annotations';
|
|
2314
|
-
/**
|
|
2315
|
-
* The array of labels which belong to the annotation.
|
|
2316
|
-
*
|
|
2317
|
-
* @private
|
|
2318
|
-
* @name Highcharts.Annotation#labels
|
|
2319
|
-
* @type {Array<Highcharts.AnnotationLabelType>}
|
|
2320
|
-
*/
|
|
2321
|
-
this.labels = [];
|
|
2322
|
-
/**
|
|
2323
|
-
* The array of shapes which belong to the annotation.
|
|
2324
|
-
*
|
|
2325
|
-
* @private
|
|
2326
|
-
* @name Highcharts.Annotation#shapes
|
|
2327
|
-
* @type {Array<Highcharts.AnnotationShapeType>}
|
|
2328
|
-
*/
|
|
2329
|
-
this.shapes = [];
|
|
2330
|
-
/**
|
|
2331
|
-
* The options for the annotations.
|
|
2332
|
-
*
|
|
2333
|
-
* @name Highcharts.Annotation#options
|
|
2334
|
-
* @type {Highcharts.AnnotationsOptions}
|
|
2335
|
-
*/
|
|
2336
|
-
this.options = merge(this.defaultOptions, userOptions);
|
|
2337
|
-
/**
|
|
2338
|
-
* The user options for the annotations.
|
|
2339
|
-
*
|
|
2340
|
-
* @name Highcharts.Annotation#userOptions
|
|
2341
|
-
* @type {Highcharts.AnnotationsOptions}
|
|
2342
|
-
*/
|
|
2343
|
-
this.userOptions = userOptions;
|
|
2344
|
-
// Handle labels and shapes - those are arrays
|
|
2345
|
-
// Merging does not work with arrays (stores reference)
|
|
2346
|
-
labelsAndShapes = this.getLabelsAndShapesOptions(this.options, userOptions);
|
|
2347
|
-
this.options.labels = labelsAndShapes.labels;
|
|
2348
|
-
this.options.shapes = labelsAndShapes.shapes;
|
|
2349
|
-
/**
|
|
2350
|
-
* The callback that reports to the overlapping-labels module which
|
|
2351
|
-
* labels it should account for.
|
|
2352
|
-
* @private
|
|
2353
|
-
* @name Highcharts.Annotation#labelCollector
|
|
2354
|
-
* @type {Function}
|
|
2355
|
-
*/
|
|
2356
|
-
/**
|
|
2357
|
-
* The group svg element.
|
|
2358
|
-
*
|
|
2359
|
-
* @name Highcharts.Annotation#group
|
|
2360
|
-
* @type {Highcharts.SVGElement}
|
|
2361
|
-
*/
|
|
2362
|
-
/**
|
|
2363
|
-
* The group svg element of the annotation's shapes.
|
|
2364
|
-
*
|
|
2365
|
-
* @name Highcharts.Annotation#shapesGroup
|
|
2366
|
-
* @type {Highcharts.SVGElement}
|
|
2367
|
-
*/
|
|
2368
|
-
/**
|
|
2369
|
-
* The group svg element of the annotation's labels.
|
|
2370
|
-
*
|
|
2371
|
-
* @name Highcharts.Annotation#labelsGroup
|
|
2372
|
-
* @type {Highcharts.SVGElement}
|
|
2373
|
-
*/
|
|
2374
|
-
this.init(chart, this.options);
|
|
2375
|
-
};
|
|
2376
|
-
merge(true, Annotation.prototype, controllableMixin, eventEmitterMixin,
|
|
2377
|
-
/** @lends Highcharts.Annotation# */
|
|
2378
|
-
{
|
|
2379
|
-
/**
|
|
2380
|
-
* List of events for `annotation.options.events` that should not be
|
|
2381
|
-
* added to `annotation.graphic` but to the `annotation`.
|
|
2382
|
-
*
|
|
2383
|
-
* @private
|
|
2384
|
-
* @type {Array<string>}
|
|
2385
|
-
*/
|
|
2386
|
-
nonDOMEvents: ['add', 'afterUpdate', 'drag', 'remove'],
|
|
2387
|
-
/**
|
|
2388
|
-
* A basic type of an annotation. It allows to add custom labels
|
|
2389
|
-
* or shapes. The items can be tied to points, axis coordinates
|
|
2390
|
-
* or chart pixel coordinates.
|
|
2391
|
-
*
|
|
2392
|
-
* @sample highcharts/annotations/basic/
|
|
2393
|
-
* Basic annotations
|
|
2394
|
-
* @sample highcharts/demo/annotations/
|
|
2395
|
-
* Advanced annotations
|
|
2396
|
-
* @sample highcharts/css/annotations
|
|
2397
|
-
* Styled mode
|
|
2398
|
-
* @sample highcharts/annotations-advanced/controllable
|
|
2399
|
-
* Controllable items
|
|
2400
|
-
* @sample {highstock} stock/annotations/fibonacci-retracements
|
|
2401
|
-
* Custom annotation, Fibonacci retracement
|
|
2402
|
-
*
|
|
2403
|
-
* @type {Array<*>}
|
|
2404
|
-
* @since 6.0.0
|
|
2405
|
-
* @requires modules/annotations
|
|
2406
|
-
* @optionparent annotations
|
|
2407
|
-
*
|
|
2408
|
-
* @private
|
|
2409
|
-
*/
|
|
2410
|
-
defaultOptions: {
|
|
2411
2483
|
/**
|
|
2412
|
-
*
|
|
2413
|
-
* annotation in [Chart#removeAnnotation(id)](
|
|
2414
|
-
* /class-reference/Highcharts.Chart#removeAnnotation) method.
|
|
2484
|
+
* The chart that the annotation belongs to.
|
|
2415
2485
|
*
|
|
2416
|
-
* @type
|
|
2417
|
-
* @apioption annotations.id
|
|
2486
|
+
* @type {Highcharts.Chart}
|
|
2418
2487
|
*/
|
|
2488
|
+
this.chart = chart;
|
|
2419
2489
|
/**
|
|
2420
|
-
*
|
|
2490
|
+
* The array of points which defines the annotation.
|
|
2421
2491
|
*
|
|
2422
|
-
* @
|
|
2423
|
-
* Set annotation visibility
|
|
2492
|
+
* @type {Array<Highcharts.Point>}
|
|
2424
2493
|
*/
|
|
2425
|
-
|
|
2494
|
+
this.points = [];
|
|
2426
2495
|
/**
|
|
2427
|
-
*
|
|
2428
|
-
* values are `'x'`, `'xy'`, `'y'` and `''` (disabled).
|
|
2496
|
+
* The array of control points.
|
|
2429
2497
|
*
|
|
2430
|
-
* @
|
|
2431
|
-
*
|
|
2498
|
+
* @private
|
|
2499
|
+
* @name Highcharts.Annotation#controlPoints
|
|
2500
|
+
* @type {Array<Annotation.ControlPoint>}
|
|
2501
|
+
*/
|
|
2502
|
+
this.controlPoints = [];
|
|
2503
|
+
this.coll = 'annotations';
|
|
2504
|
+
/**
|
|
2505
|
+
* The array of labels which belong to the annotation.
|
|
2432
2506
|
*
|
|
2433
|
-
* @
|
|
2507
|
+
* @private
|
|
2508
|
+
* @name Highcharts.Annotation#labels
|
|
2509
|
+
* @type {Array<Highcharts.AnnotationLabelType>}
|
|
2434
2510
|
*/
|
|
2435
|
-
|
|
2511
|
+
this.labels = [];
|
|
2436
2512
|
/**
|
|
2437
|
-
*
|
|
2438
|
-
* from the labelOptions object. An option from the labelOptions
|
|
2439
|
-
* can be overwritten by config for a specific label.
|
|
2513
|
+
* The array of shapes which belong to the annotation.
|
|
2440
2514
|
*
|
|
2441
|
-
* @
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
/**
|
|
2445
|
-
* The alignment of the annotation's label. If right,
|
|
2446
|
-
* the right side of the label should be touching the point.
|
|
2447
|
-
*
|
|
2448
|
-
* @sample highcharts/annotations/label-position/
|
|
2449
|
-
* Set labels position
|
|
2450
|
-
*
|
|
2451
|
-
* @type {Highcharts.AlignValue}
|
|
2452
|
-
*/
|
|
2453
|
-
align: 'center',
|
|
2454
|
-
/**
|
|
2455
|
-
* Whether to allow the annotation's labels to overlap.
|
|
2456
|
-
* To make the labels less sensitive for overlapping,
|
|
2457
|
-
* the can be set to 0.
|
|
2458
|
-
*
|
|
2459
|
-
* @sample highcharts/annotations/tooltip-like/
|
|
2460
|
-
* Hide overlapping labels
|
|
2461
|
-
*/
|
|
2462
|
-
allowOverlap: false,
|
|
2463
|
-
/**
|
|
2464
|
-
* The background color or gradient for the annotation's label.
|
|
2465
|
-
*
|
|
2466
|
-
* @sample highcharts/annotations/label-presentation/
|
|
2467
|
-
* Set labels graphic options
|
|
2468
|
-
*
|
|
2469
|
-
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
2470
|
-
*/
|
|
2471
|
-
backgroundColor: 'rgba(0, 0, 0, 0.75)',
|
|
2472
|
-
/**
|
|
2473
|
-
* The border color for the annotation's label.
|
|
2474
|
-
*
|
|
2475
|
-
* @sample highcharts/annotations/label-presentation/
|
|
2476
|
-
* Set labels graphic options
|
|
2477
|
-
*
|
|
2478
|
-
* @type {Highcharts.ColorString}
|
|
2479
|
-
*/
|
|
2480
|
-
borderColor: 'black',
|
|
2481
|
-
/**
|
|
2482
|
-
* The border radius in pixels for the annotaiton's label.
|
|
2483
|
-
*
|
|
2484
|
-
* @sample highcharts/annotations/label-presentation/
|
|
2485
|
-
* Set labels graphic options
|
|
2486
|
-
*/
|
|
2487
|
-
borderRadius: 3,
|
|
2488
|
-
/**
|
|
2489
|
-
* The border width in pixels for the annotation's label
|
|
2490
|
-
*
|
|
2491
|
-
* @sample highcharts/annotations/label-presentation/
|
|
2492
|
-
* Set labels graphic options
|
|
2493
|
-
*/
|
|
2494
|
-
borderWidth: 1,
|
|
2495
|
-
/**
|
|
2496
|
-
* A class name for styling by CSS.
|
|
2497
|
-
*
|
|
2498
|
-
* @sample highcharts/css/annotations
|
|
2499
|
-
* Styled mode annotations
|
|
2500
|
-
*
|
|
2501
|
-
* @since 6.0.5
|
|
2502
|
-
*/
|
|
2503
|
-
className: '',
|
|
2504
|
-
/**
|
|
2505
|
-
* Whether to hide the annotation's label
|
|
2506
|
-
* that is outside the plot area.
|
|
2507
|
-
*
|
|
2508
|
-
* @sample highcharts/annotations/label-crop-overflow/
|
|
2509
|
-
* Crop or justify labels
|
|
2510
|
-
*/
|
|
2511
|
-
crop: false,
|
|
2512
|
-
/**
|
|
2513
|
-
* The label's pixel distance from the point.
|
|
2514
|
-
*
|
|
2515
|
-
* @sample highcharts/annotations/label-position/
|
|
2516
|
-
* Set labels position
|
|
2517
|
-
*
|
|
2518
|
-
* @type {number}
|
|
2519
|
-
* @apioption annotations.labelOptions.distance
|
|
2520
|
-
*/
|
|
2521
|
-
/**
|
|
2522
|
-
* A
|
|
2523
|
-
* [format](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)
|
|
2524
|
-
* string for the data label.
|
|
2525
|
-
*
|
|
2526
|
-
* @see [plotOptions.series.dataLabels.format](plotOptions.series.dataLabels.format.html)
|
|
2527
|
-
*
|
|
2528
|
-
* @sample highcharts/annotations/label-text/
|
|
2529
|
-
* Set labels text
|
|
2530
|
-
*
|
|
2531
|
-
* @type {string}
|
|
2532
|
-
* @apioption annotations.labelOptions.format
|
|
2533
|
-
*/
|
|
2534
|
-
/**
|
|
2535
|
-
* Alias for the format option.
|
|
2536
|
-
*
|
|
2537
|
-
* @see [format](annotations.labelOptions.format.html)
|
|
2538
|
-
*
|
|
2539
|
-
* @sample highcharts/annotations/label-text/
|
|
2540
|
-
* Set labels text
|
|
2541
|
-
*
|
|
2542
|
-
* @type {string}
|
|
2543
|
-
* @apioption annotations.labelOptions.text
|
|
2544
|
-
*/
|
|
2545
|
-
/**
|
|
2546
|
-
* Callback JavaScript function to format the annotation's
|
|
2547
|
-
* label. Note that if a `format` or `text` are defined, the
|
|
2548
|
-
* format or text take precedence and the formatter is ignored.
|
|
2549
|
-
* `This` refers to a point object.
|
|
2550
|
-
*
|
|
2551
|
-
* @sample highcharts/annotations/label-text/
|
|
2552
|
-
* Set labels text
|
|
2553
|
-
*
|
|
2554
|
-
* @type {Highcharts.FormatterCallbackFunction<Highcharts.Point>}
|
|
2555
|
-
* @default function () { return defined(this.y) ? this.y : 'Annotation label'; }
|
|
2556
|
-
*/
|
|
2557
|
-
formatter: function () {
|
|
2558
|
-
return defined(this.y) ? this.y : 'Annotation label';
|
|
2559
|
-
},
|
|
2560
|
-
/**
|
|
2561
|
-
* How to handle the annotation's label that flow outside the
|
|
2562
|
-
* plot area. The justify option aligns the label inside the
|
|
2563
|
-
* plot area.
|
|
2564
|
-
*
|
|
2565
|
-
* @sample highcharts/annotations/label-crop-overflow/
|
|
2566
|
-
* Crop or justify labels
|
|
2567
|
-
*
|
|
2568
|
-
* @validvalue ["allow", "justify"]
|
|
2569
|
-
*/
|
|
2570
|
-
overflow: 'justify',
|
|
2571
|
-
/**
|
|
2572
|
-
* When either the borderWidth or the backgroundColor is set,
|
|
2573
|
-
* this is the padding within the box.
|
|
2574
|
-
*
|
|
2575
|
-
* @sample highcharts/annotations/label-presentation/
|
|
2576
|
-
* Set labels graphic options
|
|
2577
|
-
*/
|
|
2578
|
-
padding: 5,
|
|
2579
|
-
/**
|
|
2580
|
-
* The shadow of the box. The shadow can be an object
|
|
2581
|
-
* configuration containing `color`, `offsetX`, `offsetY`,
|
|
2582
|
-
* `opacity` and `width`.
|
|
2583
|
-
*
|
|
2584
|
-
* @sample highcharts/annotations/label-presentation/
|
|
2585
|
-
* Set labels graphic options
|
|
2586
|
-
*
|
|
2587
|
-
* @type {boolean|Highcharts.ShadowOptionsObject}
|
|
2588
|
-
*/
|
|
2589
|
-
shadow: false,
|
|
2590
|
-
/**
|
|
2591
|
-
* The name of a symbol to use for the border around the label.
|
|
2592
|
-
* Symbols are predefined functions on the Renderer object.
|
|
2593
|
-
*
|
|
2594
|
-
* @sample highcharts/annotations/shapes/
|
|
2595
|
-
* Available shapes for labels
|
|
2596
|
-
*/
|
|
2597
|
-
shape: 'callout',
|
|
2598
|
-
/**
|
|
2599
|
-
* Styles for the annotation's label.
|
|
2600
|
-
*
|
|
2601
|
-
* @see [plotOptions.series.dataLabels.style](plotOptions.series.dataLabels.style.html)
|
|
2602
|
-
*
|
|
2603
|
-
* @sample highcharts/annotations/label-presentation/
|
|
2604
|
-
* Set labels graphic options
|
|
2605
|
-
*
|
|
2606
|
-
* @type {Highcharts.CSSObject}
|
|
2607
|
-
*/
|
|
2608
|
-
style: {
|
|
2609
|
-
/** @ignore */
|
|
2610
|
-
fontSize: '11px',
|
|
2611
|
-
/** @ignore */
|
|
2612
|
-
fontWeight: 'normal',
|
|
2613
|
-
/** @ignore */
|
|
2614
|
-
color: 'contrast'
|
|
2615
|
-
},
|
|
2616
|
-
/**
|
|
2617
|
-
* Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)
|
|
2618
|
-
* to render the annotation's label.
|
|
2619
|
-
*/
|
|
2620
|
-
useHTML: false,
|
|
2621
|
-
/**
|
|
2622
|
-
* The vertical alignment of the annotation's label.
|
|
2623
|
-
*
|
|
2624
|
-
* @sample highcharts/annotations/label-position/
|
|
2625
|
-
* Set labels position
|
|
2626
|
-
*
|
|
2627
|
-
* @type {Highcharts.VerticalAlignValue}
|
|
2628
|
-
*/
|
|
2629
|
-
verticalAlign: 'bottom',
|
|
2630
|
-
/**
|
|
2631
|
-
* The x position offset of the label relative to the point.
|
|
2632
|
-
* Note that if a `distance` is defined, the distance takes
|
|
2633
|
-
* precedence over `x` and `y` options.
|
|
2634
|
-
*
|
|
2635
|
-
* @sample highcharts/annotations/label-position/
|
|
2636
|
-
* Set labels position
|
|
2637
|
-
*/
|
|
2638
|
-
x: 0,
|
|
2639
|
-
/**
|
|
2640
|
-
* The y position offset of the label relative to the point.
|
|
2641
|
-
* Note that if a `distance` is defined, the distance takes
|
|
2642
|
-
* precedence over `x` and `y` options.
|
|
2643
|
-
*
|
|
2644
|
-
* @sample highcharts/annotations/label-position/
|
|
2645
|
-
* Set labels position
|
|
2646
|
-
*/
|
|
2647
|
-
y: -16
|
|
2648
|
-
},
|
|
2649
|
-
/**
|
|
2650
|
-
* An array of labels for the annotation. For options that apply to
|
|
2651
|
-
* multiple labels, they can be added to the
|
|
2652
|
-
* [labelOptions](annotations.labelOptions.html).
|
|
2653
|
-
*
|
|
2654
|
-
* @type {Array<*>}
|
|
2655
|
-
* @extends annotations.labelOptions
|
|
2656
|
-
* @apioption annotations.labels
|
|
2657
|
-
*/
|
|
2658
|
-
/**
|
|
2659
|
-
* This option defines the point to which the label will be
|
|
2660
|
-
* connected. It can be either the point which exists in the
|
|
2661
|
-
* series - it is referenced by the point's id - or a new point with
|
|
2662
|
-
* defined x, y properties and optionally axes.
|
|
2663
|
-
*
|
|
2664
|
-
* @sample highcharts/annotations/mock-point/
|
|
2665
|
-
* Attach annotation to a mock point
|
|
2666
|
-
*
|
|
2667
|
-
* @declare Highcharts.AnnotationMockPointOptionsObject
|
|
2668
|
-
* @type {string|*}
|
|
2669
|
-
* @requires modules/annotations
|
|
2670
|
-
* @apioption annotations.labels.point
|
|
2671
|
-
*/
|
|
2672
|
-
/**
|
|
2673
|
-
* The x position of the point. Units can be either in axis
|
|
2674
|
-
* or chart pixel coordinates.
|
|
2675
|
-
*
|
|
2676
|
-
* @type {number}
|
|
2677
|
-
* @apioption annotations.labels.point.x
|
|
2678
|
-
*/
|
|
2679
|
-
/**
|
|
2680
|
-
* The y position of the point. Units can be either in axis
|
|
2681
|
-
* or chart pixel coordinates.
|
|
2682
|
-
*
|
|
2683
|
-
* @type {number}
|
|
2684
|
-
* @apioption annotations.labels.point.y
|
|
2685
|
-
*/
|
|
2686
|
-
/**
|
|
2687
|
-
* This number defines which xAxis the point is connected to. It
|
|
2688
|
-
* refers to either the axis id or the index of the axis in the
|
|
2689
|
-
* xAxis array. If the option is not configured or the axis is not
|
|
2690
|
-
* found the point's x coordinate refers to the chart pixels.
|
|
2691
|
-
*
|
|
2692
|
-
* @type {number|string|null}
|
|
2693
|
-
* @apioption annotations.labels.point.xAxis
|
|
2694
|
-
*/
|
|
2695
|
-
/**
|
|
2696
|
-
* This number defines which yAxis the point is connected to. It
|
|
2697
|
-
* refers to either the axis id or the index of the axis in the
|
|
2698
|
-
* yAxis array. If the option is not configured or the axis is not
|
|
2699
|
-
* found the point's y coordinate refers to the chart pixels.
|
|
2700
|
-
*
|
|
2701
|
-
* @type {number|string|null}
|
|
2702
|
-
* @apioption annotations.labels.point.yAxis
|
|
2515
|
+
* @private
|
|
2516
|
+
* @name Highcharts.Annotation#shapes
|
|
2517
|
+
* @type {Array<Highcharts.AnnotationShapeType>}
|
|
2703
2518
|
*/
|
|
2519
|
+
this.shapes = [];
|
|
2704
2520
|
/**
|
|
2705
|
-
*
|
|
2706
|
-
* multiple shapes, then can be added to the
|
|
2707
|
-
* [shapeOptions](annotations.shapeOptions.html).
|
|
2708
|
-
*
|
|
2709
|
-
* @type {Array<*>}
|
|
2710
|
-
* @extends annotations.shapeOptions
|
|
2711
|
-
* @apioption annotations.shapes
|
|
2712
|
-
*/
|
|
2713
|
-
/**
|
|
2714
|
-
* This option defines the point to which the shape will be
|
|
2715
|
-
* connected. It can be either the point which exists in the
|
|
2716
|
-
* series - it is referenced by the point's id - or a new point with
|
|
2717
|
-
* defined x, y properties and optionally axes.
|
|
2521
|
+
* The options for the annotations.
|
|
2718
2522
|
*
|
|
2719
|
-
* @
|
|
2720
|
-
* @type
|
|
2721
|
-
* @extends annotations.labels.point
|
|
2722
|
-
* @apioption annotations.shapes.point
|
|
2523
|
+
* @name Highcharts.Annotation#options
|
|
2524
|
+
* @type {Highcharts.AnnotationsOptions}
|
|
2723
2525
|
*/
|
|
2526
|
+
this.options = merge(this.defaultOptions, userOptions);
|
|
2724
2527
|
/**
|
|
2725
|
-
*
|
|
2726
|
-
* shapes which can use multiple points such as path. A point can be
|
|
2727
|
-
* either a point object or a point's id.
|
|
2728
|
-
*
|
|
2729
|
-
* @see [annotations.shapes.point](annotations.shapes.point.html)
|
|
2528
|
+
* The user options for the annotations.
|
|
2730
2529
|
*
|
|
2731
|
-
* @
|
|
2732
|
-
* @type
|
|
2733
|
-
* @extends annotations.labels.point
|
|
2734
|
-
* @apioption annotations.shapes.points
|
|
2530
|
+
* @name Highcharts.Annotation#userOptions
|
|
2531
|
+
* @type {Highcharts.AnnotationsOptions}
|
|
2735
2532
|
*/
|
|
2533
|
+
this.userOptions = userOptions;
|
|
2534
|
+
// Handle labels and shapes - those are arrays
|
|
2535
|
+
// Merging does not work with arrays (stores reference)
|
|
2536
|
+
labelsAndShapes = this.getLabelsAndShapesOptions(this.options, userOptions);
|
|
2537
|
+
this.options.labels = labelsAndShapes.labels;
|
|
2538
|
+
this.options.shapes = labelsAndShapes.shapes;
|
|
2736
2539
|
/**
|
|
2737
|
-
* The
|
|
2738
|
-
*
|
|
2739
|
-
*
|
|
2740
|
-
* @
|
|
2741
|
-
* @
|
|
2742
|
-
* Define a marker image url for annotations
|
|
2743
|
-
*
|
|
2744
|
-
* @type {string}
|
|
2745
|
-
* @apioption annotations.shapes.src
|
|
2540
|
+
* The callback that reports to the overlapping-labels module which
|
|
2541
|
+
* labels it should account for.
|
|
2542
|
+
* @private
|
|
2543
|
+
* @name Highcharts.Annotation#labelCollector
|
|
2544
|
+
* @type {Function}
|
|
2746
2545
|
*/
|
|
2747
2546
|
/**
|
|
2748
|
-
*
|
|
2749
|
-
* path. Custom markers can be defined in defs property.
|
|
2750
|
-
*
|
|
2751
|
-
* @see [defs.markers](defs.markers.html)
|
|
2547
|
+
* The group svg element.
|
|
2752
2548
|
*
|
|
2753
|
-
* @
|
|
2754
|
-
*
|
|
2755
|
-
*
|
|
2756
|
-
* @type {string}
|
|
2757
|
-
* @apioption annotations.shapes.markerEnd
|
|
2549
|
+
* @name Highcharts.Annotation#group
|
|
2550
|
+
* @type {Highcharts.SVGElement}
|
|
2758
2551
|
*/
|
|
2759
2552
|
/**
|
|
2760
|
-
*
|
|
2761
|
-
* path. Custom markers can be defined in defs property.
|
|
2762
|
-
*
|
|
2763
|
-
* @see [defs.markers](defs.markers.html)
|
|
2764
|
-
*
|
|
2765
|
-
* @sample {highcharts} highcharts/annotations/custom-markers/
|
|
2766
|
-
* Define a custom marker for annotations
|
|
2553
|
+
* The group svg element of the annotation's shapes.
|
|
2767
2554
|
*
|
|
2768
|
-
* @
|
|
2769
|
-
* @
|
|
2555
|
+
* @name Highcharts.Annotation#shapesGroup
|
|
2556
|
+
* @type {Highcharts.SVGElement}
|
|
2770
2557
|
*/
|
|
2771
2558
|
/**
|
|
2772
|
-
*
|
|
2773
|
-
* the shapeOptions object. An option from the shapeOptions can be
|
|
2774
|
-
* overwritten by config for a specific shape.
|
|
2559
|
+
* The group svg element of the annotation's labels.
|
|
2775
2560
|
*
|
|
2776
|
-
* @
|
|
2561
|
+
* @name Highcharts.Annotation#labelsGroup
|
|
2562
|
+
* @type {Highcharts.SVGElement}
|
|
2777
2563
|
*/
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
* The width of the shape.
|
|
2781
|
-
*
|
|
2782
|
-
* @sample highcharts/annotations/shape/
|
|
2783
|
-
* Basic shape annotation
|
|
2784
|
-
*
|
|
2785
|
-
* @type {number}
|
|
2786
|
-
* @apioption annotations.shapeOptions.width
|
|
2787
|
-
**/
|
|
2788
|
-
/**
|
|
2789
|
-
* The height of the shape.
|
|
2790
|
-
*
|
|
2791
|
-
* @sample highcharts/annotations/shape/
|
|
2792
|
-
* Basic shape annotation
|
|
2793
|
-
*
|
|
2794
|
-
* @type {number}
|
|
2795
|
-
* @apioption annotations.shapeOptions.height
|
|
2796
|
-
*/
|
|
2797
|
-
/**
|
|
2798
|
-
* The type of the shape, e.g. circle or rectangle.
|
|
2799
|
-
*
|
|
2800
|
-
* @sample highcharts/annotations/shape/
|
|
2801
|
-
* Basic shape annotation
|
|
2802
|
-
*
|
|
2803
|
-
* @type {string}
|
|
2804
|
-
* @default 'rect'
|
|
2805
|
-
* @apioption annotations.shapeOptions.type
|
|
2806
|
-
*/
|
|
2807
|
-
/**
|
|
2808
|
-
* The URL for an image to use as the annotation shape. Note,
|
|
2809
|
-
* type has to be set to `'image'`.
|
|
2810
|
-
*
|
|
2811
|
-
* @see [annotations.shapeOptions.type](annotations.shapeOptions.type)
|
|
2812
|
-
* @sample highcharts/annotations/shape-src/
|
|
2813
|
-
* Define a marker image url for annotations
|
|
2814
|
-
*
|
|
2815
|
-
* @type {string}
|
|
2816
|
-
* @apioption annotations.shapeOptions.src
|
|
2817
|
-
*/
|
|
2818
|
-
/**
|
|
2819
|
-
* Name of the dash style to use for the shape's stroke.
|
|
2820
|
-
*
|
|
2821
|
-
* @sample {highcharts} highcharts/plotoptions/series-dashstyle-all/
|
|
2822
|
-
* Possible values demonstrated
|
|
2823
|
-
*
|
|
2824
|
-
* @type {Highcharts.DashStyleValue}
|
|
2825
|
-
* @apioption annotations.shapeOptions.dashStyle
|
|
2826
|
-
*/
|
|
2827
|
-
/**
|
|
2828
|
-
* The color of the shape's stroke.
|
|
2829
|
-
*
|
|
2830
|
-
* @sample highcharts/annotations/shape/
|
|
2831
|
-
* Basic shape annotation
|
|
2832
|
-
*
|
|
2833
|
-
* @type {Highcharts.ColorString}
|
|
2834
|
-
*/
|
|
2835
|
-
stroke: 'rgba(0, 0, 0, 0.75)',
|
|
2836
|
-
/**
|
|
2837
|
-
* The pixel stroke width of the shape.
|
|
2838
|
-
*
|
|
2839
|
-
* @sample highcharts/annotations/shape/
|
|
2840
|
-
* Basic shape annotation
|
|
2841
|
-
*/
|
|
2842
|
-
strokeWidth: 1,
|
|
2843
|
-
/**
|
|
2844
|
-
* The color of the shape's fill.
|
|
2845
|
-
*
|
|
2846
|
-
* @sample highcharts/annotations/shape/
|
|
2847
|
-
* Basic shape annotation
|
|
2848
|
-
*
|
|
2849
|
-
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
2850
|
-
*/
|
|
2851
|
-
fill: 'rgba(0, 0, 0, 0.75)',
|
|
2852
|
-
/**
|
|
2853
|
-
* The radius of the shape.
|
|
2854
|
-
*
|
|
2855
|
-
* @sample highcharts/annotations/shape/
|
|
2856
|
-
* Basic shape annotation
|
|
2857
|
-
*/
|
|
2858
|
-
r: 0,
|
|
2859
|
-
/**
|
|
2860
|
-
* Defines additional snapping area around an annotation
|
|
2861
|
-
* making this annotation to focus. Defined in pixels.
|
|
2862
|
-
*/
|
|
2863
|
-
snap: 2
|
|
2864
|
-
},
|
|
2865
|
-
/**
|
|
2866
|
-
* Options for annotation's control points. Each control point
|
|
2867
|
-
* inherits options from controlPointOptions object.
|
|
2868
|
-
* Options from the controlPointOptions can be overwritten
|
|
2869
|
-
* by options in a specific control point.
|
|
2870
|
-
*
|
|
2871
|
-
* @declare Highcharts.AnnotationControlPointOptionsObject
|
|
2872
|
-
* @requires modules/annotations
|
|
2873
|
-
* @apioption annotations.controlPointOptions
|
|
2874
|
-
*/
|
|
2875
|
-
controlPointOptions: {
|
|
2876
|
-
/**
|
|
2877
|
-
* @type {Highcharts.AnnotationControlPointPositionerFunction}
|
|
2878
|
-
* @apioption annotations.controlPointOptions.positioner
|
|
2879
|
-
*/
|
|
2880
|
-
symbol: 'circle',
|
|
2881
|
-
width: 10,
|
|
2882
|
-
height: 10,
|
|
2883
|
-
style: {
|
|
2884
|
-
stroke: 'black',
|
|
2885
|
-
'stroke-width': 2,
|
|
2886
|
-
fill: 'white'
|
|
2887
|
-
},
|
|
2888
|
-
visible: false,
|
|
2889
|
-
events: {}
|
|
2890
|
-
},
|
|
2891
|
-
/**
|
|
2892
|
-
* Event callback when annotation is added to the chart.
|
|
2893
|
-
*
|
|
2894
|
-
* @type {Highcharts.EventCallbackFunction<Highcharts.Annotation>}
|
|
2895
|
-
* @since 7.1.0
|
|
2896
|
-
* @apioption annotations.events.add
|
|
2897
|
-
*/
|
|
2898
|
-
/**
|
|
2899
|
-
* Event callback when annotation is updated (e.g. drag and
|
|
2900
|
-
* droppped or resized by control points).
|
|
2901
|
-
*
|
|
2902
|
-
* @type {Highcharts.EventCallbackFunction<Highcharts.Annotation>}
|
|
2903
|
-
* @since 7.1.0
|
|
2904
|
-
* @apioption annotations.events.afterUpdate
|
|
2905
|
-
*/
|
|
2906
|
-
/**
|
|
2907
|
-
* Event callback when annotation is removed from the chart.
|
|
2908
|
-
*
|
|
2909
|
-
* @type {Highcharts.EventCallbackFunction<Highcharts.Annotation>}
|
|
2910
|
-
* @since 7.1.0
|
|
2911
|
-
* @apioption annotations.events.remove
|
|
2912
|
-
*/
|
|
2913
|
-
/**
|
|
2914
|
-
* Events available in annotations.
|
|
2915
|
-
*
|
|
2916
|
-
* @requires modules/annotations
|
|
2917
|
-
*/
|
|
2918
|
-
events: {},
|
|
2919
|
-
/**
|
|
2920
|
-
* The Z index of the annotation.
|
|
2921
|
-
*/
|
|
2922
|
-
zIndex: 6
|
|
2923
|
-
},
|
|
2564
|
+
this.init(chart, this.options);
|
|
2565
|
+
}
|
|
2924
2566
|
/**
|
|
2925
2567
|
* Initialize the annotation.
|
|
2926
2568
|
* @private
|
|
2927
2569
|
*/
|
|
2928
|
-
init
|
|
2570
|
+
Annotation.prototype.init = function () {
|
|
2571
|
+
var chart = this.chart,
|
|
2572
|
+
animOptions = this.options.animation;
|
|
2929
2573
|
this.linkPoints();
|
|
2930
2574
|
this.addControlPoints();
|
|
2931
2575
|
this.addShapes();
|
|
2932
2576
|
this.addLabels();
|
|
2933
2577
|
this.setLabelCollector();
|
|
2934
|
-
|
|
2935
|
-
|
|
2578
|
+
this.animationConfig = getDeferredAnimation(chart, animOptions);
|
|
2579
|
+
};
|
|
2580
|
+
Annotation.prototype.getLabelsAndShapesOptions = function (baseOptions, newOptions) {
|
|
2936
2581
|
var mergedOptions = {};
|
|
2937
2582
|
['labels', 'shapes'].forEach(function (name) {
|
|
2938
2583
|
if (baseOptions[name]) {
|
|
@@ -2942,28 +2587,28 @@
|
|
|
2942
2587
|
}
|
|
2943
2588
|
});
|
|
2944
2589
|
return mergedOptions;
|
|
2945
|
-
}
|
|
2946
|
-
addShapes
|
|
2590
|
+
};
|
|
2591
|
+
Annotation.prototype.addShapes = function () {
|
|
2947
2592
|
(this.options.shapes || []).forEach(function (shapeOptions, i) {
|
|
2948
2593
|
var shape = this.initShape(shapeOptions,
|
|
2949
2594
|
i);
|
|
2950
2595
|
merge(true, this.options.shapes[i], shape.options);
|
|
2951
2596
|
}, this);
|
|
2952
|
-
}
|
|
2953
|
-
addLabels
|
|
2597
|
+
};
|
|
2598
|
+
Annotation.prototype.addLabels = function () {
|
|
2954
2599
|
(this.options.labels || []).forEach(function (labelsOptions, i) {
|
|
2955
2600
|
var labels = this.initLabel(labelsOptions,
|
|
2956
2601
|
i);
|
|
2957
2602
|
merge(true, this.options.labels[i], labels.options);
|
|
2958
2603
|
}, this);
|
|
2959
|
-
}
|
|
2960
|
-
addClipPaths
|
|
2604
|
+
};
|
|
2605
|
+
Annotation.prototype.addClipPaths = function () {
|
|
2961
2606
|
this.setClipAxes();
|
|
2962
2607
|
if (this.clipXAxis && this.clipYAxis) {
|
|
2963
2608
|
this.clipRect = this.chart.renderer.clipRect(this.getClipBox());
|
|
2964
2609
|
}
|
|
2965
|
-
}
|
|
2966
|
-
setClipAxes
|
|
2610
|
+
};
|
|
2611
|
+
Annotation.prototype.setClipAxes = function () {
|
|
2967
2612
|
var xAxes = this.chart.xAxis,
|
|
2968
2613
|
yAxes = this.chart.yAxis,
|
|
2969
2614
|
linkedAxes = (this.options.labels || [])
|
|
@@ -2981,8 +2626,8 @@
|
|
|
2981
2626
|
}, []);
|
|
2982
2627
|
this.clipXAxis = linkedAxes[0];
|
|
2983
2628
|
this.clipYAxis = linkedAxes[1];
|
|
2984
|
-
}
|
|
2985
|
-
getClipBox
|
|
2629
|
+
};
|
|
2630
|
+
Annotation.prototype.getClipBox = function () {
|
|
2986
2631
|
if (this.clipXAxis && this.clipYAxis) {
|
|
2987
2632
|
return {
|
|
2988
2633
|
x: this.clipXAxis.left,
|
|
@@ -2991,8 +2636,8 @@
|
|
|
2991
2636
|
height: this.clipYAxis.height
|
|
2992
2637
|
};
|
|
2993
2638
|
}
|
|
2994
|
-
}
|
|
2995
|
-
setLabelCollector
|
|
2639
|
+
};
|
|
2640
|
+
Annotation.prototype.setLabelCollector = function () {
|
|
2996
2641
|
var annotation = this;
|
|
2997
2642
|
annotation.labelCollector = function () {
|
|
2998
2643
|
return annotation.labels.reduce(function (labels, label) {
|
|
@@ -3003,16 +2648,16 @@
|
|
|
3003
2648
|
}, []);
|
|
3004
2649
|
};
|
|
3005
2650
|
annotation.chart.labelCollectors.push(annotation.labelCollector);
|
|
3006
|
-
}
|
|
2651
|
+
};
|
|
3007
2652
|
/**
|
|
3008
2653
|
* Set an annotation options.
|
|
3009
2654
|
* @private
|
|
3010
2655
|
* @param {Highcharts.AnnotationsOptions} - user options for an annotation
|
|
3011
2656
|
*/
|
|
3012
|
-
setOptions
|
|
2657
|
+
Annotation.prototype.setOptions = function (userOptions) {
|
|
3013
2658
|
this.options = merge(this.defaultOptions, userOptions);
|
|
3014
|
-
}
|
|
3015
|
-
redraw
|
|
2659
|
+
};
|
|
2660
|
+
Annotation.prototype.redraw = function (animation) {
|
|
3016
2661
|
this.linkPoints();
|
|
3017
2662
|
if (!this.graphic) {
|
|
3018
2663
|
this.render();
|
|
@@ -3022,14 +2667,14 @@
|
|
|
3022
2667
|
}
|
|
3023
2668
|
this.redrawItems(this.shapes, animation);
|
|
3024
2669
|
this.redrawItems(this.labels, animation);
|
|
3025
|
-
|
|
3026
|
-
}
|
|
2670
|
+
ControllableMixin.redraw.call(this, animation);
|
|
2671
|
+
};
|
|
3027
2672
|
/**
|
|
3028
2673
|
* @private
|
|
3029
2674
|
* @param {Array<Highcharts.AnnotationControllable>} items
|
|
3030
2675
|
* @param {boolean} [animation]
|
|
3031
2676
|
*/
|
|
3032
|
-
redrawItems
|
|
2677
|
+
Annotation.prototype.redrawItems = function (items, animation) {
|
|
3033
2678
|
var i = items.length;
|
|
3034
2679
|
// needs a backward loop
|
|
3035
2680
|
// labels/shapes array might be modified
|
|
@@ -3037,22 +2682,23 @@
|
|
|
3037
2682
|
while (i--) {
|
|
3038
2683
|
this.redrawItem(items[i], animation);
|
|
3039
2684
|
}
|
|
3040
|
-
}
|
|
2685
|
+
};
|
|
3041
2686
|
/**
|
|
3042
2687
|
* @private
|
|
3043
2688
|
* @param {Array<Highcharts.AnnotationControllable>} items
|
|
3044
2689
|
*/
|
|
3045
|
-
renderItems
|
|
2690
|
+
Annotation.prototype.renderItems = function (items) {
|
|
3046
2691
|
var i = items.length;
|
|
3047
2692
|
while (i--) {
|
|
3048
2693
|
this.renderItem(items[i]);
|
|
3049
2694
|
}
|
|
3050
|
-
}
|
|
3051
|
-
render
|
|
2695
|
+
};
|
|
2696
|
+
Annotation.prototype.render = function () {
|
|
3052
2697
|
var renderer = this.chart.renderer;
|
|
3053
2698
|
this.graphic = renderer
|
|
3054
2699
|
.g('annotation')
|
|
3055
2700
|
.attr({
|
|
2701
|
+
opacity: 0,
|
|
3056
2702
|
zIndex: this.options.zIndex,
|
|
3057
2703
|
visibility: this.options.visible ?
|
|
3058
2704
|
'visible' :
|
|
@@ -3079,8 +2725,8 @@
|
|
|
3079
2725
|
this.renderItems(this.shapes);
|
|
3080
2726
|
this.renderItems(this.labels);
|
|
3081
2727
|
this.addEvents();
|
|
3082
|
-
|
|
3083
|
-
}
|
|
2728
|
+
ControllableMixin.render.call(this);
|
|
2729
|
+
};
|
|
3084
2730
|
/**
|
|
3085
2731
|
* Set the annotation's visibility.
|
|
3086
2732
|
* @private
|
|
@@ -3088,7 +2734,7 @@
|
|
|
3088
2734
|
* Whether to show or hide an annotation. If the param is omitted, the
|
|
3089
2735
|
* annotation's visibility is toggled.
|
|
3090
2736
|
*/
|
|
3091
|
-
setVisibility
|
|
2737
|
+
Annotation.prototype.setVisibility = function (visible) {
|
|
3092
2738
|
var options = this.options,
|
|
3093
2739
|
visibility = pick(visible, !options.visible);
|
|
3094
2740
|
this.graphic.attr('visibility', visibility ? 'visible' : 'hidden');
|
|
@@ -3096,15 +2742,15 @@
|
|
|
3096
2742
|
this.setControlPointsVisibility(false);
|
|
3097
2743
|
}
|
|
3098
2744
|
options.visible = visibility;
|
|
3099
|
-
}
|
|
3100
|
-
setControlPointsVisibility
|
|
2745
|
+
};
|
|
2746
|
+
Annotation.prototype.setControlPointsVisibility = function (visible) {
|
|
3101
2747
|
var setItemControlPointsVisibility = function (item) {
|
|
3102
2748
|
item.setControlPointsVisibility(visible);
|
|
3103
2749
|
};
|
|
3104
|
-
|
|
2750
|
+
ControllableMixin.setControlPointsVisibility.call(this, visible);
|
|
3105
2751
|
this.shapes.forEach(setItemControlPointsVisibility);
|
|
3106
2752
|
this.labels.forEach(setItemControlPointsVisibility);
|
|
3107
|
-
}
|
|
2753
|
+
};
|
|
3108
2754
|
/**
|
|
3109
2755
|
* Destroy the annotation. This function does not touch the chart
|
|
3110
2756
|
* that the annotation belongs to (all annotations are kept in
|
|
@@ -3112,7 +2758,7 @@
|
|
|
3112
2758
|
* {@link Highcharts.Chart#removeAnnotation} instead.
|
|
3113
2759
|
* @private
|
|
3114
2760
|
*/
|
|
3115
|
-
destroy
|
|
2761
|
+
Annotation.prototype.destroy = function () {
|
|
3116
2762
|
var chart = this.chart,
|
|
3117
2763
|
destroyItem = function (item) {
|
|
3118
2764
|
item.destroy();
|
|
@@ -3122,18 +2768,18 @@
|
|
|
3122
2768
|
this.clipXAxis = null;
|
|
3123
2769
|
this.clipYAxis = null;
|
|
3124
2770
|
erase(chart.labelCollectors, this.labelCollector);
|
|
3125
|
-
|
|
3126
|
-
|
|
2771
|
+
EventEmitterMixin.destroy.call(this);
|
|
2772
|
+
ControllableMixin.destroy.call(this);
|
|
3127
2773
|
destroyObjectProperties(this, chart);
|
|
3128
|
-
}
|
|
2774
|
+
};
|
|
3129
2775
|
/**
|
|
3130
2776
|
* See {@link Highcharts.Chart#removeAnnotation}.
|
|
3131
2777
|
* @private
|
|
3132
2778
|
*/
|
|
3133
|
-
remove
|
|
2779
|
+
Annotation.prototype.remove = function () {
|
|
3134
2780
|
// Let chart.update() remove annoations on demand
|
|
3135
2781
|
return this.chart.removeAnnotation(this);
|
|
3136
|
-
}
|
|
2782
|
+
};
|
|
3137
2783
|
/**
|
|
3138
2784
|
* Updates an annotation.
|
|
3139
2785
|
*
|
|
@@ -3144,7 +2790,7 @@
|
|
|
3144
2790
|
*
|
|
3145
2791
|
* @return {void}
|
|
3146
2792
|
*/
|
|
3147
|
-
update
|
|
2793
|
+
Annotation.prototype.update = function (userOptions, redraw) {
|
|
3148
2794
|
var chart = this.chart,
|
|
3149
2795
|
labelsAndShapes = this.getLabelsAndShapesOptions(this.userOptions,
|
|
3150
2796
|
userOptions),
|
|
@@ -3164,17 +2810,17 @@
|
|
|
3164
2810
|
}
|
|
3165
2811
|
fireEvent(this, 'afterUpdate');
|
|
3166
2812
|
this.isUpdating = false;
|
|
3167
|
-
}
|
|
2813
|
+
};
|
|
3168
2814
|
/* *************************************************************
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
2815
|
+
* ITEM SECTION
|
|
2816
|
+
* Contains methods for handling a single item in an annotation
|
|
2817
|
+
**************************************************************** */
|
|
3172
2818
|
/**
|
|
3173
2819
|
* Initialisation of a single shape
|
|
3174
2820
|
* @private
|
|
3175
2821
|
* @param {Object} shapeOptions - a confg object for a single shape
|
|
3176
2822
|
*/
|
|
3177
|
-
initShape
|
|
2823
|
+
Annotation.prototype.initShape = function (shapeOptions, index) {
|
|
3178
2824
|
var options = merge(this.options.shapeOptions, {
|
|
3179
2825
|
controlPointOptions: this.options.controlPointOptions
|
|
3180
2826
|
},
|
|
@@ -3185,98 +2831,701 @@
|
|
|
3185
2831
|
shape.itemType = 'shape';
|
|
3186
2832
|
this.shapes.push(shape);
|
|
3187
2833
|
return shape;
|
|
3188
|
-
}
|
|
2834
|
+
};
|
|
3189
2835
|
/**
|
|
3190
2836
|
* Initialisation of a single label
|
|
3191
2837
|
* @private
|
|
3192
2838
|
*/
|
|
3193
|
-
initLabel
|
|
2839
|
+
Annotation.prototype.initLabel = function (labelOptions, index) {
|
|
3194
2840
|
var options = merge(this.options.labelOptions, {
|
|
3195
2841
|
controlPointOptions: this.options.controlPointOptions
|
|
3196
2842
|
},
|
|
3197
|
-
labelOptions),
|
|
3198
|
-
label = new ControllableLabel(this,
|
|
3199
|
-
options,
|
|
3200
|
-
index);
|
|
3201
|
-
label.itemType = 'label';
|
|
3202
|
-
this.labels.push(label);
|
|
3203
|
-
return label;
|
|
3204
|
-
}
|
|
3205
|
-
/**
|
|
3206
|
-
* Redraw a single item.
|
|
3207
|
-
* @private
|
|
3208
|
-
* @param {Annotation.Label|Annotation.Shape} item
|
|
3209
|
-
* @param {boolean} [animation]
|
|
3210
|
-
*/
|
|
3211
|
-
redrawItem
|
|
3212
|
-
item.linkPoints();
|
|
3213
|
-
if (!item.shouldBeDrawn()) {
|
|
3214
|
-
this.destroyItem(item);
|
|
3215
|
-
}
|
|
3216
|
-
else {
|
|
3217
|
-
if (!item.graphic) {
|
|
3218
|
-
this.renderItem(item);
|
|
3219
|
-
}
|
|
3220
|
-
item.redraw(pick(animation, true) && item.graphic.placed);
|
|
3221
|
-
if (item.points.length) {
|
|
3222
|
-
this.adjustVisibility(item);
|
|
3223
|
-
}
|
|
3224
|
-
}
|
|
3225
|
-
}
|
|
3226
|
-
/**
|
|
3227
|
-
* Hide or show annotaiton attached to points.
|
|
3228
|
-
* @private
|
|
3229
|
-
* @param {Annotation.Label|Annotation.Shape} item
|
|
3230
|
-
*/
|
|
3231
|
-
adjustVisibility
|
|
3232
|
-
var hasVisiblePoints = false,
|
|
3233
|
-
label = item.graphic;
|
|
3234
|
-
item.points.forEach(function (point) {
|
|
3235
|
-
if (point.series.visible !== false &&
|
|
3236
|
-
point.visible !== false) {
|
|
3237
|
-
hasVisiblePoints = true;
|
|
3238
|
-
}
|
|
3239
|
-
});
|
|
3240
|
-
if (!hasVisiblePoints) {
|
|
3241
|
-
label.hide();
|
|
3242
|
-
}
|
|
3243
|
-
else if (label.visibility === 'hidden') {
|
|
3244
|
-
label.show();
|
|
3245
|
-
}
|
|
3246
|
-
}
|
|
3247
|
-
/**
|
|
3248
|
-
* Destroy a single item.
|
|
3249
|
-
* @private
|
|
3250
|
-
* @param {Annotation.Label|Annotation.Shape} item
|
|
3251
|
-
*/
|
|
3252
|
-
destroyItem
|
|
3253
|
-
// erase from shapes or labels array
|
|
3254
|
-
erase(this[item.itemType + 's'], item);
|
|
3255
|
-
item.destroy();
|
|
3256
|
-
}
|
|
3257
|
-
/**
|
|
3258
|
-
* @private
|
|
3259
|
-
*/
|
|
3260
|
-
renderItem
|
|
3261
|
-
item.render(item.itemType === 'label' ?
|
|
3262
|
-
this.labelsGroup :
|
|
3263
|
-
this.shapesGroup);
|
|
2843
|
+
labelOptions),
|
|
2844
|
+
label = new ControllableLabel(this,
|
|
2845
|
+
options,
|
|
2846
|
+
index);
|
|
2847
|
+
label.itemType = 'label';
|
|
2848
|
+
this.labels.push(label);
|
|
2849
|
+
return label;
|
|
2850
|
+
};
|
|
2851
|
+
/**
|
|
2852
|
+
* Redraw a single item.
|
|
2853
|
+
* @private
|
|
2854
|
+
* @param {Annotation.Label|Annotation.Shape} item
|
|
2855
|
+
* @param {boolean} [animation]
|
|
2856
|
+
*/
|
|
2857
|
+
Annotation.prototype.redrawItem = function (item, animation) {
|
|
2858
|
+
item.linkPoints();
|
|
2859
|
+
if (!item.shouldBeDrawn()) {
|
|
2860
|
+
this.destroyItem(item);
|
|
2861
|
+
}
|
|
2862
|
+
else {
|
|
2863
|
+
if (!item.graphic) {
|
|
2864
|
+
this.renderItem(item);
|
|
2865
|
+
}
|
|
2866
|
+
item.redraw(pick(animation, true) && item.graphic.placed);
|
|
2867
|
+
if (item.points.length) {
|
|
2868
|
+
this.adjustVisibility(item);
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2871
|
+
};
|
|
2872
|
+
/**
|
|
2873
|
+
* Hide or show annotaiton attached to points.
|
|
2874
|
+
* @private
|
|
2875
|
+
* @param {Annotation.Label|Annotation.Shape} item
|
|
2876
|
+
*/
|
|
2877
|
+
Annotation.prototype.adjustVisibility = function (item) {
|
|
2878
|
+
var hasVisiblePoints = false,
|
|
2879
|
+
label = item.graphic;
|
|
2880
|
+
item.points.forEach(function (point) {
|
|
2881
|
+
if (point.series.visible !== false &&
|
|
2882
|
+
point.visible !== false) {
|
|
2883
|
+
hasVisiblePoints = true;
|
|
2884
|
+
}
|
|
2885
|
+
});
|
|
2886
|
+
if (!hasVisiblePoints) {
|
|
2887
|
+
label.hide();
|
|
2888
|
+
}
|
|
2889
|
+
else if (label.visibility === 'hidden') {
|
|
2890
|
+
label.show();
|
|
2891
|
+
}
|
|
2892
|
+
};
|
|
2893
|
+
/**
|
|
2894
|
+
* Destroy a single item.
|
|
2895
|
+
* @private
|
|
2896
|
+
* @param {Annotation.Label|Annotation.Shape} item
|
|
2897
|
+
*/
|
|
2898
|
+
Annotation.prototype.destroyItem = function (item) {
|
|
2899
|
+
// erase from shapes or labels array
|
|
2900
|
+
erase(this[item.itemType + 's'], item);
|
|
2901
|
+
item.destroy();
|
|
2902
|
+
};
|
|
2903
|
+
/**
|
|
2904
|
+
* @private
|
|
2905
|
+
*/
|
|
2906
|
+
Annotation.prototype.renderItem = function (item) {
|
|
2907
|
+
item.render(item.itemType === 'label' ?
|
|
2908
|
+
this.labelsGroup :
|
|
2909
|
+
this.shapesGroup);
|
|
2910
|
+
};
|
|
2911
|
+
/**
|
|
2912
|
+
* @private
|
|
2913
|
+
*/
|
|
2914
|
+
Annotation.ControlPoint = ControlPoint;
|
|
2915
|
+
/**
|
|
2916
|
+
* @private
|
|
2917
|
+
*/
|
|
2918
|
+
Annotation.MockPoint = MockPoint;
|
|
2919
|
+
/**
|
|
2920
|
+
* An object uses for mapping between a shape type and a constructor.
|
|
2921
|
+
* To add a new shape type extend this object with type name as a key
|
|
2922
|
+
* and a constructor as its value.
|
|
2923
|
+
*/
|
|
2924
|
+
Annotation.shapesMap = {
|
|
2925
|
+
'rect': ControllableRect,
|
|
2926
|
+
'circle': ControllableCircle,
|
|
2927
|
+
'path': ControllablePath,
|
|
2928
|
+
'image': ControllableImage
|
|
2929
|
+
};
|
|
2930
|
+
/**
|
|
2931
|
+
* @private
|
|
2932
|
+
*/
|
|
2933
|
+
Annotation.types = {};
|
|
2934
|
+
return Annotation;
|
|
2935
|
+
}());
|
|
2936
|
+
merge(true, Annotation.prototype, ControllableMixin, EventEmitterMixin,
|
|
2937
|
+
// restore original Annotation implementation after mixin overwrite
|
|
2938
|
+
merge(Annotation.prototype,
|
|
2939
|
+
/** @lends Highcharts.Annotation# */
|
|
2940
|
+
{
|
|
2941
|
+
/**
|
|
2942
|
+
* List of events for `annotation.options.events` that should not be
|
|
2943
|
+
* added to `annotation.graphic` but to the `annotation`.
|
|
2944
|
+
*
|
|
2945
|
+
* @private
|
|
2946
|
+
* @type {Array<string>}
|
|
2947
|
+
*/
|
|
2948
|
+
nonDOMEvents: ['add', 'afterUpdate', 'drag', 'remove'],
|
|
2949
|
+
/**
|
|
2950
|
+
* A basic type of an annotation. It allows to add custom labels
|
|
2951
|
+
* or shapes. The items can be tied to points, axis coordinates
|
|
2952
|
+
* or chart pixel coordinates.
|
|
2953
|
+
*
|
|
2954
|
+
* @sample highcharts/annotations/basic/
|
|
2955
|
+
* Basic annotations
|
|
2956
|
+
* @sample highcharts/demo/annotations/
|
|
2957
|
+
* Advanced annotations
|
|
2958
|
+
* @sample highcharts/css/annotations
|
|
2959
|
+
* Styled mode
|
|
2960
|
+
* @sample highcharts/annotations-advanced/controllable
|
|
2961
|
+
* Controllable items
|
|
2962
|
+
* @sample {highstock} stock/annotations/fibonacci-retracements
|
|
2963
|
+
* Custom annotation, Fibonacci retracement
|
|
2964
|
+
*
|
|
2965
|
+
* @type {Array<*>}
|
|
2966
|
+
* @since 6.0.0
|
|
2967
|
+
* @requires modules/annotations
|
|
2968
|
+
* @optionparent annotations
|
|
2969
|
+
*
|
|
2970
|
+
* @private
|
|
2971
|
+
*/
|
|
2972
|
+
defaultOptions: {
|
|
2973
|
+
/**
|
|
2974
|
+
* Sets an ID for an annotation. Can be user later when
|
|
2975
|
+
* removing an annotation in [Chart#removeAnnotation(id)](
|
|
2976
|
+
* /class-reference/Highcharts.Chart#removeAnnotation) method.
|
|
2977
|
+
*
|
|
2978
|
+
* @type {number|string}
|
|
2979
|
+
* @apioption annotations.id
|
|
2980
|
+
*/
|
|
2981
|
+
/**
|
|
2982
|
+
* Whether the annotation is visible.
|
|
2983
|
+
*
|
|
2984
|
+
* @sample highcharts/annotations/visible/
|
|
2985
|
+
* Set annotation visibility
|
|
2986
|
+
*/
|
|
2987
|
+
visible: true,
|
|
2988
|
+
/**
|
|
2989
|
+
* Enable or disable the initial animation when a series is
|
|
2990
|
+
* displayed for the `annotation`. The animation can also be set
|
|
2991
|
+
* as a configuration object. Please note that this option only
|
|
2992
|
+
* applies to the initial animation.
|
|
2993
|
+
* For other animations, see [chart.animation](#chart.animation)
|
|
2994
|
+
* and the animation parameter under the API methods.
|
|
2995
|
+
* The following properties are supported:
|
|
2996
|
+
*
|
|
2997
|
+
* - `defer`: The animation delay time in milliseconds.
|
|
2998
|
+
*
|
|
2999
|
+
* @sample {highcharts} highcharts/annotations/defer/
|
|
3000
|
+
* Animation defer settings
|
|
3001
|
+
* @type {boolean|Partial<Highcharts.AnimationOptionsObject>}
|
|
3002
|
+
* @since 8.2.0
|
|
3003
|
+
* @apioption annotations.animation
|
|
3004
|
+
*/
|
|
3005
|
+
animation: {},
|
|
3006
|
+
/**
|
|
3007
|
+
* The animation delay time in milliseconds.
|
|
3008
|
+
* Set to `0` renders annotation immediately.
|
|
3009
|
+
* As `undefined` inherits defer time from the [series.animation.defer](#plotOptions.series.animation.defer).
|
|
3010
|
+
*
|
|
3011
|
+
* @type {number}
|
|
3012
|
+
* @since 8.2.0
|
|
3013
|
+
* @apioption annotations.animation.defer
|
|
3014
|
+
*/
|
|
3015
|
+
/**
|
|
3016
|
+
* Allow an annotation to be draggable by a user. Possible
|
|
3017
|
+
* values are `'x'`, `'xy'`, `'y'` and `''` (disabled).
|
|
3018
|
+
*
|
|
3019
|
+
* @sample highcharts/annotations/draggable/
|
|
3020
|
+
* Annotations draggable: 'xy'
|
|
3021
|
+
*
|
|
3022
|
+
* @type {Highcharts.AnnotationDraggableValue}
|
|
3023
|
+
*/
|
|
3024
|
+
draggable: 'xy',
|
|
3025
|
+
/**
|
|
3026
|
+
* Options for annotation's labels. Each label inherits options
|
|
3027
|
+
* from the labelOptions object. An option from the labelOptions
|
|
3028
|
+
* can be overwritten by config for a specific label.
|
|
3029
|
+
*
|
|
3030
|
+
* @requires modules/annotations
|
|
3031
|
+
*/
|
|
3032
|
+
labelOptions: {
|
|
3033
|
+
/**
|
|
3034
|
+
* The alignment of the annotation's label. If right,
|
|
3035
|
+
* the right side of the label should be touching the point.
|
|
3036
|
+
*
|
|
3037
|
+
* @sample highcharts/annotations/label-position/
|
|
3038
|
+
* Set labels position
|
|
3039
|
+
*
|
|
3040
|
+
* @type {Highcharts.AlignValue}
|
|
3041
|
+
*/
|
|
3042
|
+
align: 'center',
|
|
3043
|
+
/**
|
|
3044
|
+
* Whether to allow the annotation's labels to overlap.
|
|
3045
|
+
* To make the labels less sensitive for overlapping,
|
|
3046
|
+
* the can be set to 0.
|
|
3047
|
+
*
|
|
3048
|
+
* @sample highcharts/annotations/tooltip-like/
|
|
3049
|
+
* Hide overlapping labels
|
|
3050
|
+
*/
|
|
3051
|
+
allowOverlap: false,
|
|
3052
|
+
/**
|
|
3053
|
+
* The background color or gradient for the annotation's
|
|
3054
|
+
* label.
|
|
3055
|
+
*
|
|
3056
|
+
* @sample highcharts/annotations/label-presentation/
|
|
3057
|
+
* Set labels graphic options
|
|
3058
|
+
*
|
|
3059
|
+
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
3060
|
+
*/
|
|
3061
|
+
backgroundColor: 'rgba(0, 0, 0, 0.75)',
|
|
3062
|
+
/**
|
|
3063
|
+
* The border color for the annotation's label.
|
|
3064
|
+
*
|
|
3065
|
+
* @sample highcharts/annotations/label-presentation/
|
|
3066
|
+
* Set labels graphic options
|
|
3067
|
+
*
|
|
3068
|
+
* @type {Highcharts.ColorString}
|
|
3069
|
+
*/
|
|
3070
|
+
borderColor: 'black',
|
|
3071
|
+
/**
|
|
3072
|
+
* The border radius in pixels for the annotaiton's label.
|
|
3073
|
+
*
|
|
3074
|
+
* @sample highcharts/annotations/label-presentation/
|
|
3075
|
+
* Set labels graphic options
|
|
3076
|
+
*/
|
|
3077
|
+
borderRadius: 3,
|
|
3078
|
+
/**
|
|
3079
|
+
* The border width in pixels for the annotation's label
|
|
3080
|
+
*
|
|
3081
|
+
* @sample highcharts/annotations/label-presentation/
|
|
3082
|
+
* Set labels graphic options
|
|
3083
|
+
*/
|
|
3084
|
+
borderWidth: 1,
|
|
3085
|
+
/**
|
|
3086
|
+
* A class name for styling by CSS.
|
|
3087
|
+
*
|
|
3088
|
+
* @sample highcharts/css/annotations
|
|
3089
|
+
* Styled mode annotations
|
|
3090
|
+
*
|
|
3091
|
+
* @since 6.0.5
|
|
3092
|
+
*/
|
|
3093
|
+
className: '',
|
|
3094
|
+
/**
|
|
3095
|
+
* Whether to hide the annotation's label
|
|
3096
|
+
* that is outside the plot area.
|
|
3097
|
+
*
|
|
3098
|
+
* @sample highcharts/annotations/label-crop-overflow/
|
|
3099
|
+
* Crop or justify labels
|
|
3100
|
+
*/
|
|
3101
|
+
crop: false,
|
|
3102
|
+
/**
|
|
3103
|
+
* The label's pixel distance from the point.
|
|
3104
|
+
*
|
|
3105
|
+
* @sample highcharts/annotations/label-position/
|
|
3106
|
+
* Set labels position
|
|
3107
|
+
*
|
|
3108
|
+
* @type {number}
|
|
3109
|
+
* @apioption annotations.labelOptions.distance
|
|
3110
|
+
*/
|
|
3111
|
+
/**
|
|
3112
|
+
* A
|
|
3113
|
+
* [format](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)
|
|
3114
|
+
* string for the data label.
|
|
3115
|
+
*
|
|
3116
|
+
* @see [plotOptions.series.dataLabels.format](plotOptions.series.dataLabels.format.html)
|
|
3117
|
+
*
|
|
3118
|
+
* @sample highcharts/annotations/label-text/
|
|
3119
|
+
* Set labels text
|
|
3120
|
+
*
|
|
3121
|
+
* @type {string}
|
|
3122
|
+
* @apioption annotations.labelOptions.format
|
|
3123
|
+
*/
|
|
3124
|
+
/**
|
|
3125
|
+
* Alias for the format option.
|
|
3126
|
+
*
|
|
3127
|
+
* @see [format](annotations.labelOptions.format.html)
|
|
3128
|
+
*
|
|
3129
|
+
* @sample highcharts/annotations/label-text/
|
|
3130
|
+
* Set labels text
|
|
3131
|
+
*
|
|
3132
|
+
* @type {string}
|
|
3133
|
+
* @apioption annotations.labelOptions.text
|
|
3134
|
+
*/
|
|
3135
|
+
/**
|
|
3136
|
+
* Callback JavaScript function to format the annotation's
|
|
3137
|
+
* label. Note that if a `format` or `text` are defined,
|
|
3138
|
+
* the format or text take precedence and the formatter is
|
|
3139
|
+
* ignored. `This` refers to a point object.
|
|
3140
|
+
*
|
|
3141
|
+
* @sample highcharts/annotations/label-text/
|
|
3142
|
+
* Set labels text
|
|
3143
|
+
*
|
|
3144
|
+
* @type {Highcharts.FormatterCallbackFunction<Highcharts.Point>}
|
|
3145
|
+
* @default function () { return defined(this.y) ? this.y : 'Annotation label'; }
|
|
3146
|
+
*/
|
|
3147
|
+
formatter: function () {
|
|
3148
|
+
return defined(this.y) ? this.y : 'Annotation label';
|
|
3149
|
+
},
|
|
3150
|
+
/**
|
|
3151
|
+
* Whether the annotation is visible in the exported data
|
|
3152
|
+
* table.
|
|
3153
|
+
*
|
|
3154
|
+
* @sample highcharts/annotations/include-in-data-export/
|
|
3155
|
+
* Do not include in the data export
|
|
3156
|
+
*
|
|
3157
|
+
* @since 8.2.0
|
|
3158
|
+
* @requires modules/export-data
|
|
3159
|
+
*/
|
|
3160
|
+
includeInDataExport: true,
|
|
3161
|
+
/**
|
|
3162
|
+
* How to handle the annotation's label that flow outside
|
|
3163
|
+
* the plot area. The justify option aligns the label inside
|
|
3164
|
+
* the plot area.
|
|
3165
|
+
*
|
|
3166
|
+
* @sample highcharts/annotations/label-crop-overflow/
|
|
3167
|
+
* Crop or justify labels
|
|
3168
|
+
*
|
|
3169
|
+
* @validvalue ["allow", "justify"]
|
|
3170
|
+
*/
|
|
3171
|
+
overflow: 'justify',
|
|
3172
|
+
/**
|
|
3173
|
+
* When either the borderWidth or the backgroundColor is
|
|
3174
|
+
* set, this is the padding within the box.
|
|
3175
|
+
*
|
|
3176
|
+
* @sample highcharts/annotations/label-presentation/
|
|
3177
|
+
* Set labels graphic options
|
|
3178
|
+
*/
|
|
3179
|
+
padding: 5,
|
|
3180
|
+
/**
|
|
3181
|
+
* The shadow of the box. The shadow can be an object
|
|
3182
|
+
* configuration containing `color`, `offsetX`, `offsetY`,
|
|
3183
|
+
* `opacity` and `width`.
|
|
3184
|
+
*
|
|
3185
|
+
* @sample highcharts/annotations/label-presentation/
|
|
3186
|
+
* Set labels graphic options
|
|
3187
|
+
*
|
|
3188
|
+
* @type {boolean|Highcharts.ShadowOptionsObject}
|
|
3189
|
+
*/
|
|
3190
|
+
shadow: false,
|
|
3191
|
+
/**
|
|
3192
|
+
* The name of a symbol to use for the border around the
|
|
3193
|
+
* label. Symbols are predefined functions on the Renderer
|
|
3194
|
+
* object.
|
|
3195
|
+
*
|
|
3196
|
+
* @sample highcharts/annotations/shapes/
|
|
3197
|
+
* Available shapes for labels
|
|
3198
|
+
*/
|
|
3199
|
+
shape: 'callout',
|
|
3200
|
+
/**
|
|
3201
|
+
* Styles for the annotation's label.
|
|
3202
|
+
*
|
|
3203
|
+
* @see [plotOptions.series.dataLabels.style](plotOptions.series.dataLabels.style.html)
|
|
3204
|
+
*
|
|
3205
|
+
* @sample highcharts/annotations/label-presentation/
|
|
3206
|
+
* Set labels graphic options
|
|
3207
|
+
*
|
|
3208
|
+
* @type {Highcharts.CSSObject}
|
|
3209
|
+
*/
|
|
3210
|
+
style: {
|
|
3211
|
+
/** @ignore */
|
|
3212
|
+
fontSize: '11px',
|
|
3213
|
+
/** @ignore */
|
|
3214
|
+
fontWeight: 'normal',
|
|
3215
|
+
/** @ignore */
|
|
3216
|
+
color: 'contrast'
|
|
3217
|
+
},
|
|
3218
|
+
/**
|
|
3219
|
+
* Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)
|
|
3220
|
+
* to render the annotation's label.
|
|
3221
|
+
*/
|
|
3222
|
+
useHTML: false,
|
|
3223
|
+
/**
|
|
3224
|
+
* The vertical alignment of the annotation's label.
|
|
3225
|
+
*
|
|
3226
|
+
* @sample highcharts/annotations/label-position/
|
|
3227
|
+
* Set labels position
|
|
3228
|
+
*
|
|
3229
|
+
* @type {Highcharts.VerticalAlignValue}
|
|
3230
|
+
*/
|
|
3231
|
+
verticalAlign: 'bottom',
|
|
3232
|
+
/**
|
|
3233
|
+
* The x position offset of the label relative to the point.
|
|
3234
|
+
* Note that if a `distance` is defined, the distance takes
|
|
3235
|
+
* precedence over `x` and `y` options.
|
|
3236
|
+
*
|
|
3237
|
+
* @sample highcharts/annotations/label-position/
|
|
3238
|
+
* Set labels position
|
|
3239
|
+
*/
|
|
3240
|
+
x: 0,
|
|
3241
|
+
/**
|
|
3242
|
+
* The y position offset of the label relative to the point.
|
|
3243
|
+
* Note that if a `distance` is defined, the distance takes
|
|
3244
|
+
* precedence over `x` and `y` options.
|
|
3245
|
+
*
|
|
3246
|
+
* @sample highcharts/annotations/label-position/
|
|
3247
|
+
* Set labels position
|
|
3248
|
+
*/
|
|
3249
|
+
y: -16
|
|
3250
|
+
},
|
|
3251
|
+
/**
|
|
3252
|
+
* An array of labels for the annotation. For options that apply
|
|
3253
|
+
* to multiple labels, they can be added to the
|
|
3254
|
+
* [labelOptions](annotations.labelOptions.html).
|
|
3255
|
+
*
|
|
3256
|
+
* @type {Array<*>}
|
|
3257
|
+
* @extends annotations.labelOptions
|
|
3258
|
+
* @apioption annotations.labels
|
|
3259
|
+
*/
|
|
3260
|
+
/**
|
|
3261
|
+
* This option defines the point to which the label will be
|
|
3262
|
+
* connected. It can be either the point which exists in the
|
|
3263
|
+
* series - it is referenced by the point's id - or a new point
|
|
3264
|
+
* with defined x, y properties and optionally axes.
|
|
3265
|
+
*
|
|
3266
|
+
* @sample highcharts/annotations/mock-point/
|
|
3267
|
+
* Attach annotation to a mock point
|
|
3268
|
+
*
|
|
3269
|
+
* @declare Highcharts.AnnotationMockPointOptionsObject
|
|
3270
|
+
* @type {string|*}
|
|
3271
|
+
* @requires modules/annotations
|
|
3272
|
+
* @apioption annotations.labels.point
|
|
3273
|
+
*/
|
|
3274
|
+
/**
|
|
3275
|
+
* The x position of the point. Units can be either in axis
|
|
3276
|
+
* or chart pixel coordinates.
|
|
3277
|
+
*
|
|
3278
|
+
* @type {number}
|
|
3279
|
+
* @apioption annotations.labels.point.x
|
|
3280
|
+
*/
|
|
3281
|
+
/**
|
|
3282
|
+
* The y position of the point. Units can be either in axis
|
|
3283
|
+
* or chart pixel coordinates.
|
|
3284
|
+
*
|
|
3285
|
+
* @type {number}
|
|
3286
|
+
* @apioption annotations.labels.point.y
|
|
3287
|
+
*/
|
|
3288
|
+
/**
|
|
3289
|
+
* This number defines which xAxis the point is connected to.
|
|
3290
|
+
* It refers to either the axis id or the index of the axis in
|
|
3291
|
+
* the xAxis array. If the option is not configured or the axis
|
|
3292
|
+
* is not found the point's x coordinate refers to the chart
|
|
3293
|
+
* pixels.
|
|
3294
|
+
*
|
|
3295
|
+
* @type {number|string|null}
|
|
3296
|
+
* @apioption annotations.labels.point.xAxis
|
|
3297
|
+
*/
|
|
3298
|
+
/**
|
|
3299
|
+
* This number defines which yAxis the point is connected to.
|
|
3300
|
+
* It refers to either the axis id or the index of the axis in
|
|
3301
|
+
* the yAxis array. If the option is not configured or the axis
|
|
3302
|
+
* is not found the point's y coordinate refers to the chart
|
|
3303
|
+
* pixels.
|
|
3304
|
+
*
|
|
3305
|
+
* @type {number|string|null}
|
|
3306
|
+
* @apioption annotations.labels.point.yAxis
|
|
3307
|
+
*/
|
|
3308
|
+
/**
|
|
3309
|
+
* An array of shapes for the annotation. For options that apply
|
|
3310
|
+
* to multiple shapes, then can be added to the
|
|
3311
|
+
* [shapeOptions](annotations.shapeOptions.html).
|
|
3312
|
+
*
|
|
3313
|
+
* @type {Array<*>}
|
|
3314
|
+
* @extends annotations.shapeOptions
|
|
3315
|
+
* @apioption annotations.shapes
|
|
3316
|
+
*/
|
|
3317
|
+
/**
|
|
3318
|
+
* This option defines the point to which the shape will be
|
|
3319
|
+
* connected. It can be either the point which exists in the
|
|
3320
|
+
* series - it is referenced by the point's id - or a new point
|
|
3321
|
+
* with defined x, y properties and optionally axes.
|
|
3322
|
+
*
|
|
3323
|
+
* @declare Highcharts.AnnotationMockPointOptionsObject
|
|
3324
|
+
* @type {string|Highcharts.AnnotationMockPointOptionsObject}
|
|
3325
|
+
* @extends annotations.labels.point
|
|
3326
|
+
* @apioption annotations.shapes.point
|
|
3327
|
+
*/
|
|
3328
|
+
/**
|
|
3329
|
+
* An array of points for the shape. This option is available
|
|
3330
|
+
* for shapes which can use multiple points such as path. A
|
|
3331
|
+
* point can be either a point object or a point's id.
|
|
3332
|
+
*
|
|
3333
|
+
* @see [annotations.shapes.point](annotations.shapes.point.html)
|
|
3334
|
+
*
|
|
3335
|
+
* @declare Highcharts.AnnotationMockPointOptionsObject
|
|
3336
|
+
* @type {Array<string|*>}
|
|
3337
|
+
* @extends annotations.labels.point
|
|
3338
|
+
* @apioption annotations.shapes.points
|
|
3339
|
+
*/
|
|
3340
|
+
/**
|
|
3341
|
+
* The URL for an image to use as the annotation shape. Note,
|
|
3342
|
+
* type has to be set to `'image'`.
|
|
3343
|
+
*
|
|
3344
|
+
* @see [annotations.shapes.type](annotations.shapes.type)
|
|
3345
|
+
* @sample highcharts/annotations/shape-src/
|
|
3346
|
+
* Define a marker image url for annotations
|
|
3347
|
+
*
|
|
3348
|
+
* @type {string}
|
|
3349
|
+
* @apioption annotations.shapes.src
|
|
3350
|
+
*/
|
|
3351
|
+
/**
|
|
3352
|
+
* Id of the marker which will be drawn at the final vertex of
|
|
3353
|
+
* the path. Custom markers can be defined in defs property.
|
|
3354
|
+
*
|
|
3355
|
+
* @see [defs.markers](defs.markers.html)
|
|
3356
|
+
*
|
|
3357
|
+
* @sample highcharts/annotations/custom-markers/
|
|
3358
|
+
* Define a custom marker for annotations
|
|
3359
|
+
*
|
|
3360
|
+
* @type {string}
|
|
3361
|
+
* @apioption annotations.shapes.markerEnd
|
|
3362
|
+
*/
|
|
3363
|
+
/**
|
|
3364
|
+
* Id of the marker which will be drawn at the first vertex of
|
|
3365
|
+
* the path. Custom markers can be defined in defs property.
|
|
3366
|
+
*
|
|
3367
|
+
* @see [defs.markers](defs.markers.html)
|
|
3368
|
+
*
|
|
3369
|
+
* @sample {highcharts} highcharts/annotations/custom-markers/
|
|
3370
|
+
* Define a custom marker for annotations
|
|
3371
|
+
*
|
|
3372
|
+
* @type {string}
|
|
3373
|
+
* @apioption annotations.shapes.markerStart
|
|
3374
|
+
*/
|
|
3375
|
+
/**
|
|
3376
|
+
* Options for annotation's shapes. Each shape inherits options
|
|
3377
|
+
* from the shapeOptions object. An option from the shapeOptions
|
|
3378
|
+
* can be overwritten by config for a specific shape.
|
|
3379
|
+
*
|
|
3380
|
+
* @requires modules/annotations
|
|
3381
|
+
*/
|
|
3382
|
+
shapeOptions: {
|
|
3383
|
+
/**
|
|
3384
|
+
* The width of the shape.
|
|
3385
|
+
*
|
|
3386
|
+
* @sample highcharts/annotations/shape/
|
|
3387
|
+
* Basic shape annotation
|
|
3388
|
+
*
|
|
3389
|
+
* @type {number}
|
|
3390
|
+
* @apioption annotations.shapeOptions.width
|
|
3391
|
+
**/
|
|
3392
|
+
/**
|
|
3393
|
+
* The height of the shape.
|
|
3394
|
+
*
|
|
3395
|
+
* @sample highcharts/annotations/shape/
|
|
3396
|
+
* Basic shape annotation
|
|
3397
|
+
*
|
|
3398
|
+
* @type {number}
|
|
3399
|
+
* @apioption annotations.shapeOptions.height
|
|
3400
|
+
*/
|
|
3401
|
+
/**
|
|
3402
|
+
* The type of the shape, e.g. circle or rectangle.
|
|
3403
|
+
*
|
|
3404
|
+
* @sample highcharts/annotations/shape/
|
|
3405
|
+
* Basic shape annotation
|
|
3406
|
+
*
|
|
3407
|
+
* @type {string}
|
|
3408
|
+
* @default rect
|
|
3409
|
+
* @apioption annotations.shapeOptions.type
|
|
3410
|
+
*/
|
|
3411
|
+
/**
|
|
3412
|
+
* The URL for an image to use as the annotation shape.
|
|
3413
|
+
* Note, type has to be set to `'image'`.
|
|
3414
|
+
*
|
|
3415
|
+
* @see [annotations.shapeOptions.type](annotations.shapeOptions.type)
|
|
3416
|
+
* @sample highcharts/annotations/shape-src/
|
|
3417
|
+
* Define a marker image url for annotations
|
|
3418
|
+
*
|
|
3419
|
+
* @type {string}
|
|
3420
|
+
* @apioption annotations.shapeOptions.src
|
|
3421
|
+
*/
|
|
3422
|
+
/**
|
|
3423
|
+
* Name of the dash style to use for the shape's stroke.
|
|
3424
|
+
*
|
|
3425
|
+
* @sample {highcharts} highcharts/plotoptions/series-dashstyle-all/
|
|
3426
|
+
* Possible values demonstrated
|
|
3427
|
+
*
|
|
3428
|
+
* @type {Highcharts.DashStyleValue}
|
|
3429
|
+
* @apioption annotations.shapeOptions.dashStyle
|
|
3430
|
+
*/
|
|
3431
|
+
/**
|
|
3432
|
+
* The color of the shape's stroke.
|
|
3433
|
+
*
|
|
3434
|
+
* @sample highcharts/annotations/shape/
|
|
3435
|
+
* Basic shape annotation
|
|
3436
|
+
*
|
|
3437
|
+
* @type {Highcharts.ColorString}
|
|
3438
|
+
*/
|
|
3439
|
+
stroke: 'rgba(0, 0, 0, 0.75)',
|
|
3440
|
+
/**
|
|
3441
|
+
* The pixel stroke width of the shape.
|
|
3442
|
+
*
|
|
3443
|
+
* @sample highcharts/annotations/shape/
|
|
3444
|
+
* Basic shape annotation
|
|
3445
|
+
*/
|
|
3446
|
+
strokeWidth: 1,
|
|
3447
|
+
/**
|
|
3448
|
+
* The color of the shape's fill.
|
|
3449
|
+
*
|
|
3450
|
+
* @sample highcharts/annotations/shape/
|
|
3451
|
+
* Basic shape annotation
|
|
3452
|
+
*
|
|
3453
|
+
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
3454
|
+
*/
|
|
3455
|
+
fill: 'rgba(0, 0, 0, 0.75)',
|
|
3456
|
+
/**
|
|
3457
|
+
* The radius of the shape.
|
|
3458
|
+
*
|
|
3459
|
+
* @sample highcharts/annotations/shape/
|
|
3460
|
+
* Basic shape annotation
|
|
3461
|
+
*/
|
|
3462
|
+
r: 0,
|
|
3463
|
+
/**
|
|
3464
|
+
* Defines additional snapping area around an annotation
|
|
3465
|
+
* making this annotation to focus. Defined in pixels.
|
|
3466
|
+
*/
|
|
3467
|
+
snap: 2
|
|
3468
|
+
},
|
|
3469
|
+
/**
|
|
3470
|
+
* Options for annotation's control points. Each control point
|
|
3471
|
+
* inherits options from controlPointOptions object.
|
|
3472
|
+
* Options from the controlPointOptions can be overwritten
|
|
3473
|
+
* by options in a specific control point.
|
|
3474
|
+
*
|
|
3475
|
+
* @declare Highcharts.AnnotationControlPointOptionsObject
|
|
3476
|
+
* @requires modules/annotations
|
|
3477
|
+
* @apioption annotations.controlPointOptions
|
|
3478
|
+
*/
|
|
3479
|
+
controlPointOptions: {
|
|
3480
|
+
/**
|
|
3481
|
+
* @type {Highcharts.AnnotationControlPointPositionerFunction}
|
|
3482
|
+
* @apioption annotations.controlPointOptions.positioner
|
|
3483
|
+
*/
|
|
3484
|
+
symbol: 'circle',
|
|
3485
|
+
width: 10,
|
|
3486
|
+
height: 10,
|
|
3487
|
+
style: {
|
|
3488
|
+
stroke: 'black',
|
|
3489
|
+
'stroke-width': 2,
|
|
3490
|
+
fill: 'white'
|
|
3491
|
+
},
|
|
3492
|
+
visible: false,
|
|
3493
|
+
events: {}
|
|
3494
|
+
},
|
|
3495
|
+
/**
|
|
3496
|
+
* Event callback when annotation is added to the chart.
|
|
3497
|
+
*
|
|
3498
|
+
* @type {Highcharts.EventCallbackFunction<Highcharts.Annotation>}
|
|
3499
|
+
* @since 7.1.0
|
|
3500
|
+
* @apioption annotations.events.add
|
|
3501
|
+
*/
|
|
3502
|
+
/**
|
|
3503
|
+
* Event callback when annotation is updated (e.g. drag and
|
|
3504
|
+
* droppped or resized by control points).
|
|
3505
|
+
*
|
|
3506
|
+
* @type {Highcharts.EventCallbackFunction<Highcharts.Annotation>}
|
|
3507
|
+
* @since 7.1.0
|
|
3508
|
+
* @apioption annotations.events.afterUpdate
|
|
3509
|
+
*/
|
|
3510
|
+
/**
|
|
3511
|
+
* Event callback when annotation is removed from the chart.
|
|
3512
|
+
*
|
|
3513
|
+
* @type {Highcharts.EventCallbackFunction<Highcharts.Annotation>}
|
|
3514
|
+
* @since 7.1.0
|
|
3515
|
+
* @apioption annotations.events.remove
|
|
3516
|
+
*/
|
|
3517
|
+
/**
|
|
3518
|
+
* Events available in annotations.
|
|
3519
|
+
*
|
|
3520
|
+
* @requires modules/annotations
|
|
3521
|
+
*/
|
|
3522
|
+
events: {},
|
|
3523
|
+
/**
|
|
3524
|
+
* The Z index of the annotation.
|
|
3525
|
+
*/
|
|
3526
|
+
zIndex: 6
|
|
3264
3527
|
}
|
|
3265
|
-
});
|
|
3266
|
-
/**
|
|
3267
|
-
* An object uses for mapping between a shape type and a constructor.
|
|
3268
|
-
* To add a new shape type extend this object with type name as a key
|
|
3269
|
-
* and a constructor as its value.
|
|
3270
|
-
*/
|
|
3271
|
-
Annotation.shapesMap = {
|
|
3272
|
-
'rect': ControllableRect,
|
|
3273
|
-
'circle': ControllableCircle,
|
|
3274
|
-
'path': ControllablePath,
|
|
3275
|
-
'image': ControllableImage
|
|
3276
|
-
};
|
|
3277
|
-
Annotation.types = {};
|
|
3278
|
-
Annotation.MockPoint = MockPoint;
|
|
3279
|
-
Annotation.ControlPoint = ControlPoint;
|
|
3528
|
+
}));
|
|
3280
3529
|
H.extendAnnotation = function (Constructor, BaseConstructor, prototype, defaultOptions) {
|
|
3281
3530
|
BaseConstructor = BaseConstructor || Annotation;
|
|
3282
3531
|
merge(true, Constructor.prototype, BaseConstructor.prototype, prototype);
|
|
@@ -3309,6 +3558,9 @@
|
|
|
3309
3558
|
this.options.annotations.push(annotation.options);
|
|
3310
3559
|
if (pick(redraw, true)) {
|
|
3311
3560
|
annotation.redraw();
|
|
3561
|
+
annotation.graphic.attr({
|
|
3562
|
+
opacity: 1
|
|
3563
|
+
});
|
|
3312
3564
|
}
|
|
3313
3565
|
return annotation;
|
|
3314
3566
|
},
|
|
@@ -3337,6 +3589,9 @@
|
|
|
3337
3589
|
this.plotBoxClip.attr(this.plotBox);
|
|
3338
3590
|
this.annotations.forEach(function (annotation) {
|
|
3339
3591
|
annotation.redraw();
|
|
3592
|
+
annotation.graphic.animate({
|
|
3593
|
+
opacity: 1
|
|
3594
|
+
}, annotation.animationConfig);
|
|
3340
3595
|
});
|
|
3341
3596
|
}
|
|
3342
3597
|
});
|
|
@@ -3365,15 +3620,133 @@
|
|
|
3365
3620
|
chart.plotBoxClip.destroy();
|
|
3366
3621
|
chart.controlPointsGroup.destroy();
|
|
3367
3622
|
});
|
|
3623
|
+
addEvent(chart, 'exportData', function (event) {
|
|
3624
|
+
var _a,
|
|
3625
|
+
_b,
|
|
3626
|
+
_c,
|
|
3627
|
+
_d,
|
|
3628
|
+
_e,
|
|
3629
|
+
_f,
|
|
3630
|
+
_g,
|
|
3631
|
+
_h;
|
|
3632
|
+
var annotations = chart.annotations,
|
|
3633
|
+
csvColumnHeaderFormatter = ((this.options.exporting &&
|
|
3634
|
+
this.options.exporting.csv) ||
|
|
3635
|
+
{}).columnHeaderFormatter,
|
|
3636
|
+
// If second row doesn't have xValues
|
|
3637
|
+
// then it is a title row thus multiple level header is in use.
|
|
3638
|
+
multiLevelHeaders = !event.dataRows[1].xValues,
|
|
3639
|
+
annotationHeader = (_b = (_a = chart.options.lang) === null || _a === void 0 ? void 0 : _a.exportData) === null || _b === void 0 ? void 0 : _b.annotationHeader,
|
|
3640
|
+
columnHeaderFormatter = function (index) {
|
|
3641
|
+
var s;
|
|
3642
|
+
if (csvColumnHeaderFormatter) {
|
|
3643
|
+
s = csvColumnHeaderFormatter(index);
|
|
3644
|
+
if (s !== false) {
|
|
3645
|
+
return s;
|
|
3646
|
+
}
|
|
3647
|
+
}
|
|
3648
|
+
s = annotationHeader + ' ' + index;
|
|
3649
|
+
if (multiLevelHeaders) {
|
|
3650
|
+
return {
|
|
3651
|
+
columnTitle: s,
|
|
3652
|
+
topLevelColumnTitle: s
|
|
3653
|
+
};
|
|
3654
|
+
}
|
|
3655
|
+
return s;
|
|
3656
|
+
}, startRowLength = event.dataRows[0].length, annotationSeparator = (_e = (_d = (_c = chart.options.exporting) === null || _c === void 0 ? void 0 : _c.csv) === null || _d === void 0 ? void 0 : _d.annotations) === null || _e === void 0 ? void 0 : _e.itemDelimiter, joinAnnotations = (_h = (_g = (_f = chart.options.exporting) === null || _f === void 0 ? void 0 : _f.csv) === null || _g === void 0 ? void 0 : _g.annotations) === null || _h === void 0 ? void 0 : _h.join;
|
|
3657
|
+
annotations.forEach(function (annotation) {
|
|
3658
|
+
if (annotation.options.labelOptions.includeInDataExport) {
|
|
3659
|
+
annotation.labels.forEach(function (label) {
|
|
3660
|
+
if (label.options.text) {
|
|
3661
|
+
var annotationText_1 = label.options.text;
|
|
3662
|
+
label.points.forEach(function (points) {
|
|
3663
|
+
var annotationX = points.x,
|
|
3664
|
+
xAxisIndex = points.series.xAxis ?
|
|
3665
|
+
points.series.xAxis.options.index :
|
|
3666
|
+
-1;
|
|
3667
|
+
var wasAdded = false;
|
|
3668
|
+
// Annotation not connected to any xAxis -
|
|
3669
|
+
// add new row.
|
|
3670
|
+
if (xAxisIndex === -1) {
|
|
3671
|
+
var n = event.dataRows[0].length,
|
|
3672
|
+
newRow = new Array(n);
|
|
3673
|
+
for (var i = 0; i < n; ++i) {
|
|
3674
|
+
newRow[i] = '';
|
|
3675
|
+
}
|
|
3676
|
+
newRow.push(annotationText_1);
|
|
3677
|
+
newRow.xValues = [];
|
|
3678
|
+
newRow.xValues[xAxisIndex] = annotationX;
|
|
3679
|
+
event.dataRows.push(newRow);
|
|
3680
|
+
wasAdded = true;
|
|
3681
|
+
}
|
|
3682
|
+
// Annotation placed on a exported data point
|
|
3683
|
+
// - add new column
|
|
3684
|
+
if (!wasAdded) {
|
|
3685
|
+
event.dataRows.forEach(function (row, rowIndex) {
|
|
3686
|
+
if (!wasAdded &&
|
|
3687
|
+
row.xValues &&
|
|
3688
|
+
xAxisIndex !== void 0 &&
|
|
3689
|
+
annotationX === row.xValues[xAxisIndex]) {
|
|
3690
|
+
if (joinAnnotations &&
|
|
3691
|
+
row.length > startRowLength) {
|
|
3692
|
+
row[row.length - 1] +=
|
|
3693
|
+
annotationSeparator + annotationText_1;
|
|
3694
|
+
}
|
|
3695
|
+
else {
|
|
3696
|
+
row.push(annotationText_1);
|
|
3697
|
+
}
|
|
3698
|
+
wasAdded = true;
|
|
3699
|
+
}
|
|
3700
|
+
});
|
|
3701
|
+
}
|
|
3702
|
+
// Annotation not placed on any exported data point,
|
|
3703
|
+
// but connected to the xAxis - add new row
|
|
3704
|
+
if (!wasAdded) {
|
|
3705
|
+
var n = event.dataRows[0].length,
|
|
3706
|
+
newRow = new Array(n);
|
|
3707
|
+
for (var i = 0; i < n; ++i) {
|
|
3708
|
+
newRow[i] = '';
|
|
3709
|
+
}
|
|
3710
|
+
newRow[0] = annotationX;
|
|
3711
|
+
newRow.push(annotationText_1);
|
|
3712
|
+
newRow.xValues = [];
|
|
3713
|
+
if (xAxisIndex !== void 0) {
|
|
3714
|
+
newRow.xValues[xAxisIndex] = annotationX;
|
|
3715
|
+
}
|
|
3716
|
+
event.dataRows.push(newRow);
|
|
3717
|
+
}
|
|
3718
|
+
});
|
|
3719
|
+
}
|
|
3720
|
+
});
|
|
3721
|
+
}
|
|
3722
|
+
});
|
|
3723
|
+
var maxRowLen = 0;
|
|
3724
|
+
event.dataRows.forEach(function (row) {
|
|
3725
|
+
maxRowLen = Math.max(maxRowLen, row.length);
|
|
3726
|
+
});
|
|
3727
|
+
var newRows = maxRowLen - event.dataRows[0].length;
|
|
3728
|
+
for (var i = 0; i < newRows; i++) {
|
|
3729
|
+
var header = columnHeaderFormatter(i + 1);
|
|
3730
|
+
if (multiLevelHeaders) {
|
|
3731
|
+
event.dataRows[0].push(header.topLevelColumnTitle);
|
|
3732
|
+
event.dataRows[1].push(header.columnTitle);
|
|
3733
|
+
}
|
|
3734
|
+
else {
|
|
3735
|
+
event.dataRows[0].push(header);
|
|
3736
|
+
}
|
|
3737
|
+
}
|
|
3738
|
+
});
|
|
3368
3739
|
});
|
|
3369
|
-
wrap(
|
|
3740
|
+
wrap(Pointer.prototype, 'onContainerMouseDown', function (proceed) {
|
|
3370
3741
|
if (!this.chart.hasDraggedAnnotation) {
|
|
3371
3742
|
proceed.apply(this, Array.prototype.slice.call(arguments, 1));
|
|
3372
3743
|
}
|
|
3373
3744
|
});
|
|
3745
|
+
H.Annotation = Annotation;
|
|
3374
3746
|
|
|
3747
|
+
return Annotation;
|
|
3375
3748
|
});
|
|
3376
|
-
_registerModule(_modules, '
|
|
3749
|
+
_registerModule(_modules, 'Mixins/Navigation.js', [], function () {
|
|
3377
3750
|
/**
|
|
3378
3751
|
*
|
|
3379
3752
|
* (c) 2010-2018 Paweł Fus
|
|
@@ -3432,7 +3805,7 @@
|
|
|
3432
3805
|
|
|
3433
3806
|
return chartNavigation;
|
|
3434
3807
|
});
|
|
3435
|
-
_registerModule(_modules, '
|
|
3808
|
+
_registerModule(_modules, 'Extensions/Annotations/NavigationBindings.js', [_modules['Extensions/Annotations/Annotations.js'], _modules['Core/Chart/Chart.js'], _modules['Mixins/Navigation.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (Annotation, Chart, chartNavigationMixin, H, U) {
|
|
3436
3809
|
/* *
|
|
3437
3810
|
*
|
|
3438
3811
|
* (c) 2009-2017 Highsoft, Black Label
|
|
@@ -3442,6 +3815,19 @@
|
|
|
3442
3815
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
3443
3816
|
*
|
|
3444
3817
|
* */
|
|
3818
|
+
var addEvent = U.addEvent,
|
|
3819
|
+
attr = U.attr,
|
|
3820
|
+
extend = U.extend,
|
|
3821
|
+
format = U.format,
|
|
3822
|
+
fireEvent = U.fireEvent,
|
|
3823
|
+
isArray = U.isArray,
|
|
3824
|
+
isFunction = U.isFunction,
|
|
3825
|
+
isNumber = U.isNumber,
|
|
3826
|
+
isObject = U.isObject,
|
|
3827
|
+
merge = U.merge,
|
|
3828
|
+
objectEach = U.objectEach,
|
|
3829
|
+
pick = U.pick,
|
|
3830
|
+
setOptions = U.setOptions;
|
|
3445
3831
|
/**
|
|
3446
3832
|
* A config object for navigation bindings in annotations.
|
|
3447
3833
|
*
|
|
@@ -3468,18 +3854,6 @@
|
|
|
3468
3854
|
* @name Highcharts.NavigationBindingsOptionsObject#steps
|
|
3469
3855
|
* @type {Array<Function>|undefined}
|
|
3470
3856
|
*/
|
|
3471
|
-
var addEvent = U.addEvent,
|
|
3472
|
-
attr = U.attr,
|
|
3473
|
-
extend = U.extend,
|
|
3474
|
-
format = U.format,
|
|
3475
|
-
fireEvent = U.fireEvent,
|
|
3476
|
-
isArray = U.isArray,
|
|
3477
|
-
isFunction = U.isFunction,
|
|
3478
|
-
isNumber = U.isNumber,
|
|
3479
|
-
isObject = U.isObject,
|
|
3480
|
-
merge = U.merge,
|
|
3481
|
-
objectEach = U.objectEach,
|
|
3482
|
-
pick = U.pick;
|
|
3483
3857
|
var doc = H.doc,
|
|
3484
3858
|
win = H.win,
|
|
3485
3859
|
PREFIX = 'highcharts-';
|
|
@@ -3637,7 +4011,7 @@
|
|
|
3637
4011
|
navigation.bindingsChartClick(this, e);
|
|
3638
4012
|
}
|
|
3639
4013
|
}));
|
|
3640
|
-
navigation.eventsToUnbind.push(addEvent(chart.container, 'mousemove', function (e) {
|
|
4014
|
+
navigation.eventsToUnbind.push(addEvent(chart.container, H.isTouchDevice ? 'touchmove' : 'mousemove', function (e) {
|
|
3641
4015
|
navigation.bindingsContainerMouseMove(this, e);
|
|
3642
4016
|
}));
|
|
3643
4017
|
};
|
|
@@ -3897,6 +4271,7 @@
|
|
|
3897
4271
|
function traverse(option, key, parentEditables, parent) {
|
|
3898
4272
|
var nextParent;
|
|
3899
4273
|
if (parentEditables &&
|
|
4274
|
+
option &&
|
|
3900
4275
|
nonEditables.indexOf(key) === -1 &&
|
|
3901
4276
|
((parentEditables.indexOf &&
|
|
3902
4277
|
parentEditables.indexOf(key)) >= 0 ||
|
|
@@ -4097,7 +4472,7 @@
|
|
|
4097
4472
|
rect: ['shapes'],
|
|
4098
4473
|
// Crooked lines, elliots, arrows etc:
|
|
4099
4474
|
crookedLine: [],
|
|
4100
|
-
basicAnnotation: []
|
|
4475
|
+
basicAnnotation: ['shapes', 'labelOptions']
|
|
4101
4476
|
};
|
|
4102
4477
|
// Define non editable fields per annotation, for example Rectangle inherits
|
|
4103
4478
|
// options from Measure, but crosshairs are not available
|
|
@@ -4114,7 +4489,7 @@
|
|
|
4114
4489
|
* @type {bindingsUtils}
|
|
4115
4490
|
*/
|
|
4116
4491
|
NavigationBindings.prototype.utils = bindingsUtils;
|
|
4117
|
-
|
|
4492
|
+
Chart.prototype.initNavigationBindings = function () {
|
|
4118
4493
|
var chart = this,
|
|
4119
4494
|
options = chart.options;
|
|
4120
4495
|
if (options && options.navigation && options.navigation.bindings) {
|
|
@@ -4123,10 +4498,10 @@
|
|
|
4123
4498
|
chart.navigationBindings.initUpdate();
|
|
4124
4499
|
}
|
|
4125
4500
|
};
|
|
4126
|
-
addEvent(
|
|
4501
|
+
addEvent(Chart, 'load', function () {
|
|
4127
4502
|
this.initNavigationBindings();
|
|
4128
4503
|
});
|
|
4129
|
-
addEvent(
|
|
4504
|
+
addEvent(Chart, 'destroy', function () {
|
|
4130
4505
|
if (this.navigationBindings) {
|
|
4131
4506
|
this.navigationBindings.destroy();
|
|
4132
4507
|
}
|
|
@@ -4134,7 +4509,7 @@
|
|
|
4134
4509
|
addEvent(NavigationBindings, 'deselectButton', function () {
|
|
4135
4510
|
this.selectedButtonElement = null;
|
|
4136
4511
|
});
|
|
4137
|
-
addEvent(
|
|
4512
|
+
addEvent(Annotation, 'remove', function () {
|
|
4138
4513
|
if (this.chart.navigationBindings) {
|
|
4139
4514
|
this.chart.navigationBindings.deselectAnnotation();
|
|
4140
4515
|
}
|
|
@@ -4154,7 +4529,7 @@
|
|
|
4154
4529
|
navigation = annotation.chart.navigationBindings,
|
|
4155
4530
|
prevAnnotation = navigation.activeAnnotation;
|
|
4156
4531
|
if (originalClick) {
|
|
4157
|
-
originalClick.
|
|
4532
|
+
originalClick.call(annotation, event);
|
|
4158
4533
|
}
|
|
4159
4534
|
if (prevAnnotation !== annotation) {
|
|
4160
4535
|
// Select current:
|
|
@@ -4203,15 +4578,17 @@
|
|
|
4203
4578
|
}
|
|
4204
4579
|
if (H.Annotation) {
|
|
4205
4580
|
// Basic shapes:
|
|
4206
|
-
selectableAnnotation(
|
|
4581
|
+
selectableAnnotation(Annotation);
|
|
4207
4582
|
// Advanced annotations:
|
|
4208
|
-
objectEach(
|
|
4583
|
+
objectEach(Annotation.types, function (annotationType) {
|
|
4209
4584
|
selectableAnnotation(annotationType);
|
|
4210
4585
|
});
|
|
4211
4586
|
}
|
|
4212
|
-
|
|
4587
|
+
setOptions({
|
|
4213
4588
|
/**
|
|
4214
4589
|
* @optionparent lang
|
|
4590
|
+
*
|
|
4591
|
+
* @private
|
|
4215
4592
|
*/
|
|
4216
4593
|
lang: {
|
|
4217
4594
|
/**
|
|
@@ -4261,6 +4638,8 @@
|
|
|
4261
4638
|
/**
|
|
4262
4639
|
* @optionparent navigation
|
|
4263
4640
|
* @product highcharts highstock
|
|
4641
|
+
*
|
|
4642
|
+
* @private
|
|
4264
4643
|
*/
|
|
4265
4644
|
navigation: {
|
|
4266
4645
|
/**
|
|
@@ -4459,7 +4838,7 @@
|
|
|
4459
4838
|
* from a different server.
|
|
4460
4839
|
*
|
|
4461
4840
|
* @type {string}
|
|
4462
|
-
* @default https://code.highcharts.com/8.
|
|
4841
|
+
* @default https://code.highcharts.com/8.2.2/gfx/stock-icons/
|
|
4463
4842
|
* @since 7.1.3
|
|
4464
4843
|
* @apioption navigation.iconsURL
|
|
4465
4844
|
*/
|
|
@@ -4517,13 +4896,17 @@
|
|
|
4517
4896
|
* measure, pitchfork, tunnel, verticalLine, basicAnnotation
|
|
4518
4897
|
* @apioption navigation.annotationsOptions
|
|
4519
4898
|
*/
|
|
4520
|
-
annotationsOptions: {
|
|
4899
|
+
annotationsOptions: {
|
|
4900
|
+
animation: {
|
|
4901
|
+
defer: 0
|
|
4902
|
+
}
|
|
4903
|
+
}
|
|
4521
4904
|
}
|
|
4522
4905
|
});
|
|
4523
4906
|
|
|
4524
4907
|
return NavigationBindings;
|
|
4525
4908
|
});
|
|
4526
|
-
_registerModule(_modules, '
|
|
4909
|
+
_registerModule(_modules, 'Extensions/Annotations/Popup.js', [_modules['Core/Globals.js'], _modules['Extensions/Annotations/NavigationBindings.js'], _modules['Core/Pointer.js'], _modules['Core/Utilities.js']], function (H, NavigationBindings, Pointer, U) {
|
|
4527
4910
|
/* *
|
|
4528
4911
|
*
|
|
4529
4912
|
* Popup generator for Stock tools
|
|
@@ -4538,6 +4921,7 @@
|
|
|
4538
4921
|
var addEvent = U.addEvent,
|
|
4539
4922
|
createElement = U.createElement,
|
|
4540
4923
|
defined = U.defined,
|
|
4924
|
+
getOptions = U.getOptions,
|
|
4541
4925
|
isArray = U.isArray,
|
|
4542
4926
|
isObject = U.isObject,
|
|
4543
4927
|
isString = U.isString,
|
|
@@ -4548,7 +4932,7 @@
|
|
|
4548
4932
|
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
4549
4933
|
// onContainerMouseDown blocks internal popup events, due to e.preventDefault.
|
|
4550
4934
|
// Related issue #4606
|
|
4551
|
-
wrap(
|
|
4935
|
+
wrap(Pointer.prototype, 'onContainerMouseDown', function (proceed, e) {
|
|
4552
4936
|
var popupClass = e.target && e.target.className;
|
|
4553
4937
|
// elements is not in popup
|
|
4554
4938
|
if (!(isString(popupClass) &&
|
|
@@ -4784,7 +5168,7 @@
|
|
|
4784
5168
|
* @return {Highcharts.Dictionary<string>} - elements translations.
|
|
4785
5169
|
*/
|
|
4786
5170
|
getLangpack: function () {
|
|
4787
|
-
return
|
|
5171
|
+
return getOptions().lang.navigation.popup;
|
|
4788
5172
|
},
|
|
4789
5173
|
annotations: {
|
|
4790
5174
|
/**
|
|
@@ -5168,7 +5552,7 @@
|
|
|
5168
5552
|
getAmount: function () {
|
|
5169
5553
|
var series = this.series,
|
|
5170
5554
|
counter = 0;
|
|
5171
|
-
|
|
5555
|
+
series.forEach(function (serie) {
|
|
5172
5556
|
var seriesOptions = serie.options;
|
|
5173
5557
|
if (serie.params ||
|
|
5174
5558
|
seriesOptions && seriesOptions.params) {
|
|
@@ -5297,7 +5681,7 @@
|
|
|
5297
5681
|
this.popup = new H.Popup(this.chart.container, (this.chart.options.navigation.iconsURL ||
|
|
5298
5682
|
(this.chart.options.stockTools &&
|
|
5299
5683
|
this.chart.options.stockTools.gui.iconsURL) ||
|
|
5300
|
-
'https://code.highcharts.com/8.
|
|
5684
|
+
'https://code.highcharts.com/8.2.2/gfx/stock-icons/'));
|
|
5301
5685
|
}
|
|
5302
5686
|
this.popup.showForm(config.formType, this.chart, config.options, config.onSubmit);
|
|
5303
5687
|
});
|