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
|
@@ -8,20 +8,23 @@
|
|
|
8
8
|
*
|
|
9
9
|
* */
|
|
10
10
|
'use strict';
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import
|
|
16
|
-
import ControllableRect from './
|
|
17
|
-
import ControllableCircle from './
|
|
18
|
-
import ControllablePath from './
|
|
19
|
-
import ControllableImage from './
|
|
20
|
-
import ControllableLabel from './
|
|
21
|
-
import eventEmitterMixin from './eventEmitterMixin.js';
|
|
22
|
-
import MockPoint from './MockPoint.js';
|
|
11
|
+
import A from '../../Core/Animation/AnimationUtilities.js';
|
|
12
|
+
var getDeferredAnimation = A.getDeferredAnimation;
|
|
13
|
+
import Chart from '../../Core/Chart/Chart.js';
|
|
14
|
+
var chartProto = Chart.prototype;
|
|
15
|
+
import ControllableMixin from './Mixins/ControllableMixin.js';
|
|
16
|
+
import ControllableRect from './Controllables/ControllableRect.js';
|
|
17
|
+
import ControllableCircle from './Controllables/ControllableCircle.js';
|
|
18
|
+
import ControllablePath from './Controllables/ControllablePath.js';
|
|
19
|
+
import ControllableImage from './Controllables/ControllableImage.js';
|
|
20
|
+
import ControllableLabel from './Controllables/ControllableLabel.js';
|
|
23
21
|
import ControlPoint from './ControlPoint.js';
|
|
24
|
-
|
|
22
|
+
import EventEmitterMixin from './Mixins/EventEmitterMixin.js';
|
|
23
|
+
import H from '../../Core/Globals.js';
|
|
24
|
+
import MockPoint from './MockPoint.js';
|
|
25
|
+
import Pointer from '../../Core/Pointer.js';
|
|
26
|
+
import U from '../../Core/Utilities.js';
|
|
27
|
+
var addEvent = U.addEvent, defined = U.defined, destroyObjectProperties = U.destroyObjectProperties, erase = U.erase, extend = U.extend, find = U.find, fireEvent = U.fireEvent, merge = U.merge, pick = U.pick, splat = U.splat, wrap = U.wrap;
|
|
25
28
|
/* *********************************************************************
|
|
26
29
|
*
|
|
27
30
|
* ANNOTATION
|
|
@@ -70,114 +73,483 @@ var chartProto = H.Chart.prototype;
|
|
|
70
73
|
* @param {Highcharts.Chart} chart a chart instance
|
|
71
74
|
* @param {Highcharts.AnnotationsOptions} userOptions the options object
|
|
72
75
|
*/
|
|
73
|
-
var Annotation =
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* The chart that the annotation belongs to.
|
|
76
|
+
var Annotation = /** @class */ (function () {
|
|
77
|
+
/* *
|
|
77
78
|
*
|
|
78
|
-
*
|
|
79
|
-
*/
|
|
80
|
-
this.chart = chart;
|
|
81
|
-
/**
|
|
82
|
-
* The array of points which defines the annotation.
|
|
79
|
+
* Constructors
|
|
83
80
|
*
|
|
84
|
-
*
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
* */
|
|
82
|
+
function Annotation(chart, userOptions) {
|
|
83
|
+
/* *
|
|
84
|
+
*
|
|
85
|
+
* Properties
|
|
86
|
+
*
|
|
87
|
+
* */
|
|
88
|
+
this.annotation = void 0;
|
|
89
|
+
this.coll = 'annotations';
|
|
90
|
+
this.collection = void 0;
|
|
91
|
+
this.animationConfig = void 0;
|
|
92
|
+
this.graphic = void 0;
|
|
93
|
+
this.group = void 0;
|
|
94
|
+
this.labelCollector = void 0;
|
|
95
|
+
this.labelsGroup = void 0;
|
|
96
|
+
this.shapesGroup = void 0;
|
|
97
|
+
var labelsAndShapes;
|
|
98
|
+
/**
|
|
99
|
+
* The chart that the annotation belongs to.
|
|
100
|
+
*
|
|
101
|
+
* @type {Highcharts.Chart}
|
|
102
|
+
*/
|
|
103
|
+
this.chart = chart;
|
|
104
|
+
/**
|
|
105
|
+
* The array of points which defines the annotation.
|
|
106
|
+
*
|
|
107
|
+
* @type {Array<Highcharts.Point>}
|
|
108
|
+
*/
|
|
109
|
+
this.points = [];
|
|
110
|
+
/**
|
|
111
|
+
* The array of control points.
|
|
112
|
+
*
|
|
113
|
+
* @private
|
|
114
|
+
* @name Highcharts.Annotation#controlPoints
|
|
115
|
+
* @type {Array<Annotation.ControlPoint>}
|
|
116
|
+
*/
|
|
117
|
+
this.controlPoints = [];
|
|
118
|
+
this.coll = 'annotations';
|
|
119
|
+
/**
|
|
120
|
+
* The array of labels which belong to the annotation.
|
|
121
|
+
*
|
|
122
|
+
* @private
|
|
123
|
+
* @name Highcharts.Annotation#labels
|
|
124
|
+
* @type {Array<Highcharts.AnnotationLabelType>}
|
|
125
|
+
*/
|
|
126
|
+
this.labels = [];
|
|
127
|
+
/**
|
|
128
|
+
* The array of shapes which belong to the annotation.
|
|
129
|
+
*
|
|
130
|
+
* @private
|
|
131
|
+
* @name Highcharts.Annotation#shapes
|
|
132
|
+
* @type {Array<Highcharts.AnnotationShapeType>}
|
|
133
|
+
*/
|
|
134
|
+
this.shapes = [];
|
|
135
|
+
/**
|
|
136
|
+
* The options for the annotations.
|
|
137
|
+
*
|
|
138
|
+
* @name Highcharts.Annotation#options
|
|
139
|
+
* @type {Highcharts.AnnotationsOptions}
|
|
140
|
+
*/
|
|
141
|
+
this.options = merge(this.defaultOptions, userOptions);
|
|
142
|
+
/**
|
|
143
|
+
* The user options for the annotations.
|
|
144
|
+
*
|
|
145
|
+
* @name Highcharts.Annotation#userOptions
|
|
146
|
+
* @type {Highcharts.AnnotationsOptions}
|
|
147
|
+
*/
|
|
148
|
+
this.userOptions = userOptions;
|
|
149
|
+
// Handle labels and shapes - those are arrays
|
|
150
|
+
// Merging does not work with arrays (stores reference)
|
|
151
|
+
labelsAndShapes = this.getLabelsAndShapesOptions(this.options, userOptions);
|
|
152
|
+
this.options.labels = labelsAndShapes.labels;
|
|
153
|
+
this.options.shapes = labelsAndShapes.shapes;
|
|
154
|
+
/**
|
|
155
|
+
* The callback that reports to the overlapping-labels module which
|
|
156
|
+
* labels it should account for.
|
|
157
|
+
* @private
|
|
158
|
+
* @name Highcharts.Annotation#labelCollector
|
|
159
|
+
* @type {Function}
|
|
160
|
+
*/
|
|
161
|
+
/**
|
|
162
|
+
* The group svg element.
|
|
163
|
+
*
|
|
164
|
+
* @name Highcharts.Annotation#group
|
|
165
|
+
* @type {Highcharts.SVGElement}
|
|
166
|
+
*/
|
|
167
|
+
/**
|
|
168
|
+
* The group svg element of the annotation's shapes.
|
|
169
|
+
*
|
|
170
|
+
* @name Highcharts.Annotation#shapesGroup
|
|
171
|
+
* @type {Highcharts.SVGElement}
|
|
172
|
+
*/
|
|
173
|
+
/**
|
|
174
|
+
* The group svg element of the annotation's labels.
|
|
175
|
+
*
|
|
176
|
+
* @name Highcharts.Annotation#labelsGroup
|
|
177
|
+
* @type {Highcharts.SVGElement}
|
|
178
|
+
*/
|
|
179
|
+
this.init(chart, this.options);
|
|
180
|
+
}
|
|
87
181
|
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
182
|
+
* Initialize the annotation.
|
|
90
183
|
* @private
|
|
91
|
-
* @name Highcharts.Annotation#controlPoints
|
|
92
|
-
* @type {Array<Annotation.ControlPoint>}
|
|
93
184
|
*/
|
|
94
|
-
|
|
95
|
-
|
|
185
|
+
Annotation.prototype.init = function () {
|
|
186
|
+
var chart = this.chart, animOptions = this.options.animation;
|
|
187
|
+
this.linkPoints();
|
|
188
|
+
this.addControlPoints();
|
|
189
|
+
this.addShapes();
|
|
190
|
+
this.addLabels();
|
|
191
|
+
this.setLabelCollector();
|
|
192
|
+
this.animationConfig = getDeferredAnimation(chart, animOptions);
|
|
193
|
+
};
|
|
194
|
+
Annotation.prototype.getLabelsAndShapesOptions = function (baseOptions, newOptions) {
|
|
195
|
+
var mergedOptions = {};
|
|
196
|
+
['labels', 'shapes'].forEach(function (name) {
|
|
197
|
+
if (baseOptions[name]) {
|
|
198
|
+
mergedOptions[name] = splat(newOptions[name]).map(function (basicOptions, i) {
|
|
199
|
+
return merge(baseOptions[name][i], basicOptions);
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
return mergedOptions;
|
|
204
|
+
};
|
|
205
|
+
Annotation.prototype.addShapes = function () {
|
|
206
|
+
(this.options.shapes || []).forEach(function (shapeOptions, i) {
|
|
207
|
+
var shape = this.initShape(shapeOptions, i);
|
|
208
|
+
merge(true, this.options.shapes[i], shape.options);
|
|
209
|
+
}, this);
|
|
210
|
+
};
|
|
211
|
+
Annotation.prototype.addLabels = function () {
|
|
212
|
+
(this.options.labels || []).forEach(function (labelsOptions, i) {
|
|
213
|
+
var labels = this.initLabel(labelsOptions, i);
|
|
214
|
+
merge(true, this.options.labels[i], labels.options);
|
|
215
|
+
}, this);
|
|
216
|
+
};
|
|
217
|
+
Annotation.prototype.addClipPaths = function () {
|
|
218
|
+
this.setClipAxes();
|
|
219
|
+
if (this.clipXAxis && this.clipYAxis) {
|
|
220
|
+
this.clipRect = this.chart.renderer.clipRect(this.getClipBox());
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
Annotation.prototype.setClipAxes = function () {
|
|
224
|
+
var xAxes = this.chart.xAxis, yAxes = this.chart.yAxis, linkedAxes = (this.options.labels || [])
|
|
225
|
+
.concat(this.options.shapes || [])
|
|
226
|
+
.reduce(function (axes, labelOrShape) {
|
|
227
|
+
return [
|
|
228
|
+
xAxes[labelOrShape &&
|
|
229
|
+
labelOrShape.point &&
|
|
230
|
+
labelOrShape.point.xAxis] || axes[0],
|
|
231
|
+
yAxes[labelOrShape &&
|
|
232
|
+
labelOrShape.point &&
|
|
233
|
+
labelOrShape.point.yAxis] || axes[1]
|
|
234
|
+
];
|
|
235
|
+
}, []);
|
|
236
|
+
this.clipXAxis = linkedAxes[0];
|
|
237
|
+
this.clipYAxis = linkedAxes[1];
|
|
238
|
+
};
|
|
239
|
+
Annotation.prototype.getClipBox = function () {
|
|
240
|
+
if (this.clipXAxis && this.clipYAxis) {
|
|
241
|
+
return {
|
|
242
|
+
x: this.clipXAxis.left,
|
|
243
|
+
y: this.clipYAxis.top,
|
|
244
|
+
width: this.clipXAxis.width,
|
|
245
|
+
height: this.clipYAxis.height
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
Annotation.prototype.setLabelCollector = function () {
|
|
250
|
+
var annotation = this;
|
|
251
|
+
annotation.labelCollector = function () {
|
|
252
|
+
return annotation.labels.reduce(function (labels, label) {
|
|
253
|
+
if (!label.options.allowOverlap) {
|
|
254
|
+
labels.push(label.graphic);
|
|
255
|
+
}
|
|
256
|
+
return labels;
|
|
257
|
+
}, []);
|
|
258
|
+
};
|
|
259
|
+
annotation.chart.labelCollectors.push(annotation.labelCollector);
|
|
260
|
+
};
|
|
96
261
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
262
|
+
* Set an annotation options.
|
|
99
263
|
* @private
|
|
100
|
-
* @
|
|
101
|
-
* @type {Array<Highcharts.AnnotationLabelType>}
|
|
264
|
+
* @param {Highcharts.AnnotationsOptions} - user options for an annotation
|
|
102
265
|
*/
|
|
103
|
-
|
|
266
|
+
Annotation.prototype.setOptions = function (userOptions) {
|
|
267
|
+
this.options = merge(this.defaultOptions, userOptions);
|
|
268
|
+
};
|
|
269
|
+
Annotation.prototype.redraw = function (animation) {
|
|
270
|
+
this.linkPoints();
|
|
271
|
+
if (!this.graphic) {
|
|
272
|
+
this.render();
|
|
273
|
+
}
|
|
274
|
+
if (this.clipRect) {
|
|
275
|
+
this.clipRect.animate(this.getClipBox());
|
|
276
|
+
}
|
|
277
|
+
this.redrawItems(this.shapes, animation);
|
|
278
|
+
this.redrawItems(this.labels, animation);
|
|
279
|
+
ControllableMixin.redraw.call(this, animation);
|
|
280
|
+
};
|
|
104
281
|
/**
|
|
105
|
-
* The array of shapes which belong to the annotation.
|
|
106
|
-
*
|
|
107
282
|
* @private
|
|
108
|
-
* @
|
|
109
|
-
* @
|
|
283
|
+
* @param {Array<Highcharts.AnnotationControllable>} items
|
|
284
|
+
* @param {boolean} [animation]
|
|
110
285
|
*/
|
|
111
|
-
|
|
286
|
+
Annotation.prototype.redrawItems = function (items, animation) {
|
|
287
|
+
var i = items.length;
|
|
288
|
+
// needs a backward loop
|
|
289
|
+
// labels/shapes array might be modified
|
|
290
|
+
// due to destruction of the item
|
|
291
|
+
while (i--) {
|
|
292
|
+
this.redrawItem(items[i], animation);
|
|
293
|
+
}
|
|
294
|
+
};
|
|
112
295
|
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* @name Highcharts.Annotation#options
|
|
116
|
-
* @type {Highcharts.AnnotationsOptions}
|
|
296
|
+
* @private
|
|
297
|
+
* @param {Array<Highcharts.AnnotationControllable>} items
|
|
117
298
|
*/
|
|
118
|
-
|
|
299
|
+
Annotation.prototype.renderItems = function (items) {
|
|
300
|
+
var i = items.length;
|
|
301
|
+
while (i--) {
|
|
302
|
+
this.renderItem(items[i]);
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
Annotation.prototype.render = function () {
|
|
306
|
+
var renderer = this.chart.renderer;
|
|
307
|
+
this.graphic = renderer
|
|
308
|
+
.g('annotation')
|
|
309
|
+
.attr({
|
|
310
|
+
opacity: 0,
|
|
311
|
+
zIndex: this.options.zIndex,
|
|
312
|
+
visibility: this.options.visible ?
|
|
313
|
+
'visible' :
|
|
314
|
+
'hidden'
|
|
315
|
+
})
|
|
316
|
+
.add();
|
|
317
|
+
this.shapesGroup = renderer
|
|
318
|
+
.g('annotation-shapes')
|
|
319
|
+
.add(this.graphic)
|
|
320
|
+
.clip(this.chart.plotBoxClip);
|
|
321
|
+
this.labelsGroup = renderer
|
|
322
|
+
.g('annotation-labels')
|
|
323
|
+
.attr({
|
|
324
|
+
// hideOverlappingLabels requires translation
|
|
325
|
+
translateX: 0,
|
|
326
|
+
translateY: 0
|
|
327
|
+
})
|
|
328
|
+
.add(this.graphic);
|
|
329
|
+
this.addClipPaths();
|
|
330
|
+
if (this.clipRect) {
|
|
331
|
+
this.graphic.clip(this.clipRect);
|
|
332
|
+
}
|
|
333
|
+
// Render shapes and labels before adding events (#13070).
|
|
334
|
+
this.renderItems(this.shapes);
|
|
335
|
+
this.renderItems(this.labels);
|
|
336
|
+
this.addEvents();
|
|
337
|
+
ControllableMixin.render.call(this);
|
|
338
|
+
};
|
|
119
339
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* @
|
|
123
|
-
*
|
|
340
|
+
* Set the annotation's visibility.
|
|
341
|
+
* @private
|
|
342
|
+
* @param {boolean} [visible]
|
|
343
|
+
* Whether to show or hide an annotation. If the param is omitted, the
|
|
344
|
+
* annotation's visibility is toggled.
|
|
124
345
|
*/
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
346
|
+
Annotation.prototype.setVisibility = function (visible) {
|
|
347
|
+
var options = this.options, visibility = pick(visible, !options.visible);
|
|
348
|
+
this.graphic.attr('visibility', visibility ? 'visible' : 'hidden');
|
|
349
|
+
if (!visibility) {
|
|
350
|
+
this.setControlPointsVisibility(false);
|
|
351
|
+
}
|
|
352
|
+
options.visible = visibility;
|
|
353
|
+
};
|
|
354
|
+
Annotation.prototype.setControlPointsVisibility = function (visible) {
|
|
355
|
+
var setItemControlPointsVisibility = function (item) {
|
|
356
|
+
item.setControlPointsVisibility(visible);
|
|
357
|
+
};
|
|
358
|
+
ControllableMixin.setControlPointsVisibility.call(this, visible);
|
|
359
|
+
this.shapes.forEach(setItemControlPointsVisibility);
|
|
360
|
+
this.labels.forEach(setItemControlPointsVisibility);
|
|
361
|
+
};
|
|
131
362
|
/**
|
|
132
|
-
*
|
|
133
|
-
*
|
|
363
|
+
* Destroy the annotation. This function does not touch the chart
|
|
364
|
+
* that the annotation belongs to (all annotations are kept in
|
|
365
|
+
* the chart.annotations array) - it is recommended to use
|
|
366
|
+
* {@link Highcharts.Chart#removeAnnotation} instead.
|
|
134
367
|
* @private
|
|
135
|
-
* @name Highcharts.Annotation#labelCollector
|
|
136
|
-
* @type {Function}
|
|
137
368
|
*/
|
|
369
|
+
Annotation.prototype.destroy = function () {
|
|
370
|
+
var chart = this.chart, destroyItem = function (item) {
|
|
371
|
+
item.destroy();
|
|
372
|
+
};
|
|
373
|
+
this.labels.forEach(destroyItem);
|
|
374
|
+
this.shapes.forEach(destroyItem);
|
|
375
|
+
this.clipXAxis = null;
|
|
376
|
+
this.clipYAxis = null;
|
|
377
|
+
erase(chart.labelCollectors, this.labelCollector);
|
|
378
|
+
EventEmitterMixin.destroy.call(this);
|
|
379
|
+
ControllableMixin.destroy.call(this);
|
|
380
|
+
destroyObjectProperties(this, chart);
|
|
381
|
+
};
|
|
138
382
|
/**
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* @name Highcharts.Annotation#group
|
|
142
|
-
* @type {Highcharts.SVGElement}
|
|
383
|
+
* See {@link Highcharts.Chart#removeAnnotation}.
|
|
384
|
+
* @private
|
|
143
385
|
*/
|
|
386
|
+
Annotation.prototype.remove = function () {
|
|
387
|
+
// Let chart.update() remove annoations on demand
|
|
388
|
+
return this.chart.removeAnnotation(this);
|
|
389
|
+
};
|
|
144
390
|
/**
|
|
145
|
-
*
|
|
391
|
+
* Updates an annotation.
|
|
146
392
|
*
|
|
147
|
-
* @
|
|
148
|
-
*
|
|
393
|
+
* @function Highcharts.Annotation#update
|
|
394
|
+
*
|
|
395
|
+
* @param {Partial<Highcharts.AnnotationsOptions>} userOptions
|
|
396
|
+
* New user options for the annotation.
|
|
397
|
+
*
|
|
398
|
+
* @return {void}
|
|
149
399
|
*/
|
|
400
|
+
Annotation.prototype.update = function (userOptions, redraw) {
|
|
401
|
+
var chart = this.chart, labelsAndShapes = this.getLabelsAndShapesOptions(this.userOptions, userOptions), userOptionsIndex = chart.annotations.indexOf(this), options = merge(true, this.userOptions, userOptions);
|
|
402
|
+
options.labels = labelsAndShapes.labels;
|
|
403
|
+
options.shapes = labelsAndShapes.shapes;
|
|
404
|
+
this.destroy();
|
|
405
|
+
this.constructor(chart, options);
|
|
406
|
+
// Update options in chart options, used in exporting (#9767):
|
|
407
|
+
chart.options.annotations[userOptionsIndex] = options;
|
|
408
|
+
this.isUpdating = true;
|
|
409
|
+
if (pick(redraw, true)) {
|
|
410
|
+
chart.redraw();
|
|
411
|
+
}
|
|
412
|
+
fireEvent(this, 'afterUpdate');
|
|
413
|
+
this.isUpdating = false;
|
|
414
|
+
};
|
|
415
|
+
/* *************************************************************
|
|
416
|
+
* ITEM SECTION
|
|
417
|
+
* Contains methods for handling a single item in an annotation
|
|
418
|
+
**************************************************************** */
|
|
150
419
|
/**
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
* @
|
|
154
|
-
* @type {Highcharts.SVGElement}
|
|
420
|
+
* Initialisation of a single shape
|
|
421
|
+
* @private
|
|
422
|
+
* @param {Object} shapeOptions - a confg object for a single shape
|
|
155
423
|
*/
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
424
|
+
Annotation.prototype.initShape = function (shapeOptions, index) {
|
|
425
|
+
var options = merge(this.options.shapeOptions, {
|
|
426
|
+
controlPointOptions: this.options.controlPointOptions
|
|
427
|
+
}, shapeOptions), shape = new Annotation.shapesMap[options.type](this, options, index);
|
|
428
|
+
shape.itemType = 'shape';
|
|
429
|
+
this.shapes.push(shape);
|
|
430
|
+
return shape;
|
|
431
|
+
};
|
|
161
432
|
/**
|
|
162
|
-
*
|
|
163
|
-
* added to `annotation.graphic` but to the `annotation`.
|
|
164
|
-
*
|
|
433
|
+
* Initialisation of a single label
|
|
165
434
|
* @private
|
|
166
|
-
* @type {Array<string>}
|
|
167
435
|
*/
|
|
168
|
-
|
|
436
|
+
Annotation.prototype.initLabel = function (labelOptions, index) {
|
|
437
|
+
var options = merge(this.options.labelOptions, {
|
|
438
|
+
controlPointOptions: this.options.controlPointOptions
|
|
439
|
+
}, labelOptions), label = new ControllableLabel(this, options, index);
|
|
440
|
+
label.itemType = 'label';
|
|
441
|
+
this.labels.push(label);
|
|
442
|
+
return label;
|
|
443
|
+
};
|
|
169
444
|
/**
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
445
|
+
* Redraw a single item.
|
|
446
|
+
* @private
|
|
447
|
+
* @param {Annotation.Label|Annotation.Shape} item
|
|
448
|
+
* @param {boolean} [animation]
|
|
449
|
+
*/
|
|
450
|
+
Annotation.prototype.redrawItem = function (item, animation) {
|
|
451
|
+
item.linkPoints();
|
|
452
|
+
if (!item.shouldBeDrawn()) {
|
|
453
|
+
this.destroyItem(item);
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
456
|
+
if (!item.graphic) {
|
|
457
|
+
this.renderItem(item);
|
|
458
|
+
}
|
|
459
|
+
item.redraw(pick(animation, true) && item.graphic.placed);
|
|
460
|
+
if (item.points.length) {
|
|
461
|
+
this.adjustVisibility(item);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
/**
|
|
466
|
+
* Hide or show annotaiton attached to points.
|
|
467
|
+
* @private
|
|
468
|
+
* @param {Annotation.Label|Annotation.Shape} item
|
|
469
|
+
*/
|
|
470
|
+
Annotation.prototype.adjustVisibility = function (item) {
|
|
471
|
+
var hasVisiblePoints = false, label = item.graphic;
|
|
472
|
+
item.points.forEach(function (point) {
|
|
473
|
+
if (point.series.visible !== false &&
|
|
474
|
+
point.visible !== false) {
|
|
475
|
+
hasVisiblePoints = true;
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
if (!hasVisiblePoints) {
|
|
479
|
+
label.hide();
|
|
480
|
+
}
|
|
481
|
+
else if (label.visibility === 'hidden') {
|
|
482
|
+
label.show();
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
/**
|
|
486
|
+
* Destroy a single item.
|
|
487
|
+
* @private
|
|
488
|
+
* @param {Annotation.Label|Annotation.Shape} item
|
|
489
|
+
*/
|
|
490
|
+
Annotation.prototype.destroyItem = function (item) {
|
|
491
|
+
// erase from shapes or labels array
|
|
492
|
+
erase(this[item.itemType + 's'], item);
|
|
493
|
+
item.destroy();
|
|
494
|
+
};
|
|
495
|
+
/**
|
|
496
|
+
* @private
|
|
497
|
+
*/
|
|
498
|
+
Annotation.prototype.renderItem = function (item) {
|
|
499
|
+
item.render(item.itemType === 'label' ?
|
|
500
|
+
this.labelsGroup :
|
|
501
|
+
this.shapesGroup);
|
|
502
|
+
};
|
|
503
|
+
/**
|
|
504
|
+
* @private
|
|
505
|
+
*/
|
|
506
|
+
Annotation.ControlPoint = ControlPoint;
|
|
507
|
+
/**
|
|
508
|
+
* @private
|
|
509
|
+
*/
|
|
510
|
+
Annotation.MockPoint = MockPoint;
|
|
511
|
+
/**
|
|
512
|
+
* An object uses for mapping between a shape type and a constructor.
|
|
513
|
+
* To add a new shape type extend this object with type name as a key
|
|
514
|
+
* and a constructor as its value.
|
|
515
|
+
*/
|
|
516
|
+
Annotation.shapesMap = {
|
|
517
|
+
'rect': ControllableRect,
|
|
518
|
+
'circle': ControllableCircle,
|
|
519
|
+
'path': ControllablePath,
|
|
520
|
+
'image': ControllableImage
|
|
521
|
+
};
|
|
522
|
+
/**
|
|
523
|
+
* @private
|
|
524
|
+
*/
|
|
525
|
+
Annotation.types = {};
|
|
526
|
+
return Annotation;
|
|
527
|
+
}());
|
|
528
|
+
merge(true, Annotation.prototype, ControllableMixin, EventEmitterMixin,
|
|
529
|
+
// restore original Annotation implementation after mixin overwrite
|
|
530
|
+
merge(Annotation.prototype,
|
|
531
|
+
/** @lends Highcharts.Annotation# */
|
|
532
|
+
{
|
|
533
|
+
/**
|
|
534
|
+
* List of events for `annotation.options.events` that should not be
|
|
535
|
+
* added to `annotation.graphic` but to the `annotation`.
|
|
536
|
+
*
|
|
537
|
+
* @private
|
|
538
|
+
* @type {Array<string>}
|
|
539
|
+
*/
|
|
540
|
+
nonDOMEvents: ['add', 'afterUpdate', 'drag', 'remove'],
|
|
541
|
+
/**
|
|
542
|
+
* A basic type of an annotation. It allows to add custom labels
|
|
543
|
+
* or shapes. The items can be tied to points, axis coordinates
|
|
544
|
+
* or chart pixel coordinates.
|
|
545
|
+
*
|
|
546
|
+
* @sample highcharts/annotations/basic/
|
|
547
|
+
* Basic annotations
|
|
548
|
+
* @sample highcharts/demo/annotations/
|
|
549
|
+
* Advanced annotations
|
|
550
|
+
* @sample highcharts/css/annotations
|
|
551
|
+
* Styled mode
|
|
552
|
+
* @sample highcharts/annotations-advanced/controllable
|
|
181
553
|
* Controllable items
|
|
182
554
|
* @sample {highstock} stock/annotations/fibonacci-retracements
|
|
183
555
|
* Custom annotation, Fibonacci retracement
|
|
@@ -191,8 +563,8 @@ merge(true, Annotation.prototype, controllableMixin, eventEmitterMixin,
|
|
|
191
563
|
*/
|
|
192
564
|
defaultOptions: {
|
|
193
565
|
/**
|
|
194
|
-
* Sets an ID for an annotation. Can be user later when
|
|
195
|
-
* annotation in [Chart#removeAnnotation(id)](
|
|
566
|
+
* Sets an ID for an annotation. Can be user later when
|
|
567
|
+
* removing an annotation in [Chart#removeAnnotation(id)](
|
|
196
568
|
* /class-reference/Highcharts.Chart#removeAnnotation) method.
|
|
197
569
|
*
|
|
198
570
|
* @type {number|string}
|
|
@@ -205,6 +577,33 @@ merge(true, Annotation.prototype, controllableMixin, eventEmitterMixin,
|
|
|
205
577
|
* Set annotation visibility
|
|
206
578
|
*/
|
|
207
579
|
visible: true,
|
|
580
|
+
/**
|
|
581
|
+
* Enable or disable the initial animation when a series is
|
|
582
|
+
* displayed for the `annotation`. The animation can also be set
|
|
583
|
+
* as a configuration object. Please note that this option only
|
|
584
|
+
* applies to the initial animation.
|
|
585
|
+
* For other animations, see [chart.animation](#chart.animation)
|
|
586
|
+
* and the animation parameter under the API methods.
|
|
587
|
+
* The following properties are supported:
|
|
588
|
+
*
|
|
589
|
+
* - `defer`: The animation delay time in milliseconds.
|
|
590
|
+
*
|
|
591
|
+
* @sample {highcharts} highcharts/annotations/defer/
|
|
592
|
+
* Animation defer settings
|
|
593
|
+
* @type {boolean|Partial<Highcharts.AnimationOptionsObject>}
|
|
594
|
+
* @since 8.2.0
|
|
595
|
+
* @apioption annotations.animation
|
|
596
|
+
*/
|
|
597
|
+
animation: {},
|
|
598
|
+
/**
|
|
599
|
+
* The animation delay time in milliseconds.
|
|
600
|
+
* Set to `0` renders annotation immediately.
|
|
601
|
+
* As `undefined` inherits defer time from the [series.animation.defer](#plotOptions.series.animation.defer).
|
|
602
|
+
*
|
|
603
|
+
* @type {number}
|
|
604
|
+
* @since 8.2.0
|
|
605
|
+
* @apioption annotations.animation.defer
|
|
606
|
+
*/
|
|
208
607
|
/**
|
|
209
608
|
* Allow an annotation to be draggable by a user. Possible
|
|
210
609
|
* values are `'x'`, `'xy'`, `'y'` and `''` (disabled).
|
|
@@ -243,7 +642,8 @@ merge(true, Annotation.prototype, controllableMixin, eventEmitterMixin,
|
|
|
243
642
|
*/
|
|
244
643
|
allowOverlap: false,
|
|
245
644
|
/**
|
|
246
|
-
* The background color or gradient for the annotation's
|
|
645
|
+
* The background color or gradient for the annotation's
|
|
646
|
+
* label.
|
|
247
647
|
*
|
|
248
648
|
* @sample highcharts/annotations/label-presentation/
|
|
249
649
|
* Set labels graphic options
|
|
@@ -326,9 +726,9 @@ merge(true, Annotation.prototype, controllableMixin, eventEmitterMixin,
|
|
|
326
726
|
*/
|
|
327
727
|
/**
|
|
328
728
|
* Callback JavaScript function to format the annotation's
|
|
329
|
-
* label. Note that if a `format` or `text` are defined,
|
|
330
|
-
* format or text take precedence and the formatter is
|
|
331
|
-
* `This` refers to a point object.
|
|
729
|
+
* label. Note that if a `format` or `text` are defined,
|
|
730
|
+
* the format or text take precedence and the formatter is
|
|
731
|
+
* ignored. `This` refers to a point object.
|
|
332
732
|
*
|
|
333
733
|
* @sample highcharts/annotations/label-text/
|
|
334
734
|
* Set labels text
|
|
@@ -340,9 +740,20 @@ merge(true, Annotation.prototype, controllableMixin, eventEmitterMixin,
|
|
|
340
740
|
return defined(this.y) ? this.y : 'Annotation label';
|
|
341
741
|
},
|
|
342
742
|
/**
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
*
|
|
743
|
+
* Whether the annotation is visible in the exported data
|
|
744
|
+
* table.
|
|
745
|
+
*
|
|
746
|
+
* @sample highcharts/annotations/include-in-data-export/
|
|
747
|
+
* Do not include in the data export
|
|
748
|
+
*
|
|
749
|
+
* @since 8.2.0
|
|
750
|
+
* @requires modules/export-data
|
|
751
|
+
*/
|
|
752
|
+
includeInDataExport: true,
|
|
753
|
+
/**
|
|
754
|
+
* How to handle the annotation's label that flow outside
|
|
755
|
+
* the plot area. The justify option aligns the label inside
|
|
756
|
+
* the plot area.
|
|
346
757
|
*
|
|
347
758
|
* @sample highcharts/annotations/label-crop-overflow/
|
|
348
759
|
* Crop or justify labels
|
|
@@ -351,8 +762,8 @@ merge(true, Annotation.prototype, controllableMixin, eventEmitterMixin,
|
|
|
351
762
|
*/
|
|
352
763
|
overflow: 'justify',
|
|
353
764
|
/**
|
|
354
|
-
* When either the borderWidth or the backgroundColor is
|
|
355
|
-
* this
|
|
765
|
+
* When either the borderWidth or the backgroundColor is
|
|
766
|
+
* set, this is the padding within the box.
|
|
356
767
|
*
|
|
357
768
|
* @sample highcharts/annotations/label-presentation/
|
|
358
769
|
* Set labels graphic options
|
|
@@ -370,8 +781,9 @@ merge(true, Annotation.prototype, controllableMixin, eventEmitterMixin,
|
|
|
370
781
|
*/
|
|
371
782
|
shadow: false,
|
|
372
783
|
/**
|
|
373
|
-
* The name of a symbol to use for the border around the
|
|
374
|
-
* Symbols are predefined functions on the Renderer
|
|
784
|
+
* The name of a symbol to use for the border around the
|
|
785
|
+
* label. Symbols are predefined functions on the Renderer
|
|
786
|
+
* object.
|
|
375
787
|
*
|
|
376
788
|
* @sample highcharts/annotations/shapes/
|
|
377
789
|
* Available shapes for labels
|
|
@@ -429,614 +841,283 @@ merge(true, Annotation.prototype, controllableMixin, eventEmitterMixin,
|
|
|
429
841
|
y: -16
|
|
430
842
|
},
|
|
431
843
|
/**
|
|
432
|
-
* An array of labels for the annotation. For options that apply
|
|
433
|
-
* multiple labels, they can be added to the
|
|
844
|
+
* An array of labels for the annotation. For options that apply
|
|
845
|
+
* to multiple labels, they can be added to the
|
|
434
846
|
* [labelOptions](annotations.labelOptions.html).
|
|
435
847
|
*
|
|
436
848
|
* @type {Array<*>}
|
|
437
849
|
* @extends annotations.labelOptions
|
|
438
|
-
* @apioption annotations.labels
|
|
439
|
-
*/
|
|
440
|
-
/**
|
|
441
|
-
* This option defines the point to which the label will be
|
|
442
|
-
* connected. It can be either the point which exists in the
|
|
443
|
-
* series - it is referenced by the point's id - or a new point
|
|
444
|
-
* defined x, y properties and optionally axes.
|
|
445
|
-
*
|
|
446
|
-
* @sample highcharts/annotations/mock-point/
|
|
447
|
-
* Attach annotation to a mock point
|
|
448
|
-
*
|
|
449
|
-
* @declare Highcharts.AnnotationMockPointOptionsObject
|
|
450
|
-
* @type {string|*}
|
|
451
|
-
* @requires modules/annotations
|
|
452
|
-
* @apioption annotations.labels.point
|
|
453
|
-
*/
|
|
454
|
-
/**
|
|
455
|
-
* The x position of the point. Units can be either in axis
|
|
456
|
-
* or chart pixel coordinates.
|
|
457
|
-
*
|
|
458
|
-
* @type {number}
|
|
459
|
-
* @apioption annotations.labels.point.x
|
|
460
|
-
*/
|
|
461
|
-
/**
|
|
462
|
-
* The y position of the point. Units can be either in axis
|
|
463
|
-
* or chart pixel coordinates.
|
|
464
|
-
*
|
|
465
|
-
* @type {number}
|
|
466
|
-
* @apioption annotations.labels.point.y
|
|
467
|
-
*/
|
|
468
|
-
/**
|
|
469
|
-
* This number defines which xAxis the point is connected to.
|
|
470
|
-
* refers to either the axis id or the index of the axis in
|
|
471
|
-
* xAxis array. If the option is not configured or the axis
|
|
472
|
-
* found the point's x coordinate refers to the chart
|
|
473
|
-
*
|
|
474
|
-
*
|
|
475
|
-
* @
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
*
|
|
482
|
-
*
|
|
483
|
-
*
|
|
484
|
-
*
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
493
|
-
* @
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
*
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
* @
|
|
504
|
-
* @
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
*
|
|
510
|
-
*
|
|
511
|
-
*
|
|
512
|
-
*
|
|
513
|
-
* @
|
|
514
|
-
*
|
|
515
|
-
* @
|
|
516
|
-
* @
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
*
|
|
522
|
-
*
|
|
523
|
-
*
|
|
524
|
-
*
|
|
525
|
-
*
|
|
526
|
-
*
|
|
527
|
-
*
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
*
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
* @
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
*
|
|
539
|
-
*
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
*
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
* @
|
|
548
|
-
*
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
*
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
*
|
|
557
|
-
*
|
|
558
|
-
*
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
*
|
|
565
|
-
*
|
|
566
|
-
*
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
*
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
*
|
|
577
|
-
*
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
*
|
|
583
|
-
*
|
|
584
|
-
*
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
* @
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
*
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
*
|
|
597
|
-
*
|
|
598
|
-
*
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
*
|
|
606
|
-
*
|
|
607
|
-
*
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
*
|
|
615
|
-
*
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
*
|
|
622
|
-
*
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
*
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
*
|
|
638
|
-
*
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
* Options
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
*
|
|
654
|
-
*
|
|
655
|
-
* @
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
*
|
|
677
|
-
*
|
|
678
|
-
* @
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
*
|
|
684
|
-
*
|
|
685
|
-
*
|
|
686
|
-
* @
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
*
|
|
692
|
-
*
|
|
693
|
-
* @
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
*
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
* Initialize the annotation.
|
|
708
|
-
* @private
|
|
709
|
-
*/
|
|
710
|
-
init: function () {
|
|
711
|
-
this.linkPoints();
|
|
712
|
-
this.addControlPoints();
|
|
713
|
-
this.addShapes();
|
|
714
|
-
this.addLabels();
|
|
715
|
-
this.setLabelCollector();
|
|
716
|
-
},
|
|
717
|
-
getLabelsAndShapesOptions: function (baseOptions, newOptions) {
|
|
718
|
-
var mergedOptions = {};
|
|
719
|
-
['labels', 'shapes'].forEach(function (name) {
|
|
720
|
-
if (baseOptions[name]) {
|
|
721
|
-
mergedOptions[name] = splat(newOptions[name]).map(function (basicOptions, i) {
|
|
722
|
-
return merge(baseOptions[name][i], basicOptions);
|
|
723
|
-
});
|
|
724
|
-
}
|
|
725
|
-
});
|
|
726
|
-
return mergedOptions;
|
|
727
|
-
},
|
|
728
|
-
addShapes: function () {
|
|
729
|
-
(this.options.shapes || []).forEach(function (shapeOptions, i) {
|
|
730
|
-
var shape = this.initShape(shapeOptions, i);
|
|
731
|
-
merge(true, this.options.shapes[i], shape.options);
|
|
732
|
-
}, this);
|
|
733
|
-
},
|
|
734
|
-
addLabels: function () {
|
|
735
|
-
(this.options.labels || []).forEach(function (labelsOptions, i) {
|
|
736
|
-
var labels = this.initLabel(labelsOptions, i);
|
|
737
|
-
merge(true, this.options.labels[i], labels.options);
|
|
738
|
-
}, this);
|
|
739
|
-
},
|
|
740
|
-
addClipPaths: function () {
|
|
741
|
-
this.setClipAxes();
|
|
742
|
-
if (this.clipXAxis && this.clipYAxis) {
|
|
743
|
-
this.clipRect = this.chart.renderer.clipRect(this.getClipBox());
|
|
744
|
-
}
|
|
745
|
-
},
|
|
746
|
-
setClipAxes: function () {
|
|
747
|
-
var xAxes = this.chart.xAxis, yAxes = this.chart.yAxis, linkedAxes = (this.options.labels || [])
|
|
748
|
-
.concat(this.options.shapes || [])
|
|
749
|
-
.reduce(function (axes, labelOrShape) {
|
|
750
|
-
return [
|
|
751
|
-
xAxes[labelOrShape &&
|
|
752
|
-
labelOrShape.point &&
|
|
753
|
-
labelOrShape.point.xAxis] || axes[0],
|
|
754
|
-
yAxes[labelOrShape &&
|
|
755
|
-
labelOrShape.point &&
|
|
756
|
-
labelOrShape.point.yAxis] || axes[1]
|
|
757
|
-
];
|
|
758
|
-
}, []);
|
|
759
|
-
this.clipXAxis = linkedAxes[0];
|
|
760
|
-
this.clipYAxis = linkedAxes[1];
|
|
761
|
-
},
|
|
762
|
-
getClipBox: function () {
|
|
763
|
-
if (this.clipXAxis && this.clipYAxis) {
|
|
764
|
-
return {
|
|
765
|
-
x: this.clipXAxis.left,
|
|
766
|
-
y: this.clipYAxis.top,
|
|
767
|
-
width: this.clipXAxis.width,
|
|
768
|
-
height: this.clipYAxis.height
|
|
769
|
-
};
|
|
770
|
-
}
|
|
771
|
-
},
|
|
772
|
-
setLabelCollector: function () {
|
|
773
|
-
var annotation = this;
|
|
774
|
-
annotation.labelCollector = function () {
|
|
775
|
-
return annotation.labels.reduce(function (labels, label) {
|
|
776
|
-
if (!label.options.allowOverlap) {
|
|
777
|
-
labels.push(label.graphic);
|
|
778
|
-
}
|
|
779
|
-
return labels;
|
|
780
|
-
}, []);
|
|
781
|
-
};
|
|
782
|
-
annotation.chart.labelCollectors.push(annotation.labelCollector);
|
|
783
|
-
},
|
|
784
|
-
/**
|
|
785
|
-
* Set an annotation options.
|
|
786
|
-
* @private
|
|
787
|
-
* @param {Highcharts.AnnotationsOptions} - user options for an annotation
|
|
788
|
-
*/
|
|
789
|
-
setOptions: function (userOptions) {
|
|
790
|
-
this.options = merge(this.defaultOptions, userOptions);
|
|
791
|
-
},
|
|
792
|
-
redraw: function (animation) {
|
|
793
|
-
this.linkPoints();
|
|
794
|
-
if (!this.graphic) {
|
|
795
|
-
this.render();
|
|
796
|
-
}
|
|
797
|
-
if (this.clipRect) {
|
|
798
|
-
this.clipRect.animate(this.getClipBox());
|
|
799
|
-
}
|
|
800
|
-
this.redrawItems(this.shapes, animation);
|
|
801
|
-
this.redrawItems(this.labels, animation);
|
|
802
|
-
controllableMixin.redraw.call(this, animation);
|
|
803
|
-
},
|
|
804
|
-
/**
|
|
805
|
-
* @private
|
|
806
|
-
* @param {Array<Highcharts.AnnotationControllable>} items
|
|
807
|
-
* @param {boolean} [animation]
|
|
808
|
-
*/
|
|
809
|
-
redrawItems: function (items, animation) {
|
|
810
|
-
var i = items.length;
|
|
811
|
-
// needs a backward loop
|
|
812
|
-
// labels/shapes array might be modified
|
|
813
|
-
// due to destruction of the item
|
|
814
|
-
while (i--) {
|
|
815
|
-
this.redrawItem(items[i], animation);
|
|
816
|
-
}
|
|
817
|
-
},
|
|
818
|
-
/**
|
|
819
|
-
* @private
|
|
820
|
-
* @param {Array<Highcharts.AnnotationControllable>} items
|
|
821
|
-
*/
|
|
822
|
-
renderItems: function (items) {
|
|
823
|
-
var i = items.length;
|
|
824
|
-
while (i--) {
|
|
825
|
-
this.renderItem(items[i]);
|
|
826
|
-
}
|
|
827
|
-
},
|
|
828
|
-
render: function () {
|
|
829
|
-
var renderer = this.chart.renderer;
|
|
830
|
-
this.graphic = renderer
|
|
831
|
-
.g('annotation')
|
|
832
|
-
.attr({
|
|
833
|
-
zIndex: this.options.zIndex,
|
|
834
|
-
visibility: this.options.visible ?
|
|
835
|
-
'visible' :
|
|
836
|
-
'hidden'
|
|
837
|
-
})
|
|
838
|
-
.add();
|
|
839
|
-
this.shapesGroup = renderer
|
|
840
|
-
.g('annotation-shapes')
|
|
841
|
-
.add(this.graphic)
|
|
842
|
-
.clip(this.chart.plotBoxClip);
|
|
843
|
-
this.labelsGroup = renderer
|
|
844
|
-
.g('annotation-labels')
|
|
845
|
-
.attr({
|
|
846
|
-
// hideOverlappingLabels requires translation
|
|
847
|
-
translateX: 0,
|
|
848
|
-
translateY: 0
|
|
849
|
-
})
|
|
850
|
-
.add(this.graphic);
|
|
851
|
-
this.addClipPaths();
|
|
852
|
-
if (this.clipRect) {
|
|
853
|
-
this.graphic.clip(this.clipRect);
|
|
854
|
-
}
|
|
855
|
-
// Render shapes and labels before adding events (#13070).
|
|
856
|
-
this.renderItems(this.shapes);
|
|
857
|
-
this.renderItems(this.labels);
|
|
858
|
-
this.addEvents();
|
|
859
|
-
controllableMixin.render.call(this);
|
|
860
|
-
},
|
|
861
|
-
/**
|
|
862
|
-
* Set the annotation's visibility.
|
|
863
|
-
* @private
|
|
864
|
-
* @param {boolean} [visible]
|
|
865
|
-
* Whether to show or hide an annotation. If the param is omitted, the
|
|
866
|
-
* annotation's visibility is toggled.
|
|
867
|
-
*/
|
|
868
|
-
setVisibility: function (visible) {
|
|
869
|
-
var options = this.options, visibility = pick(visible, !options.visible);
|
|
870
|
-
this.graphic.attr('visibility', visibility ? 'visible' : 'hidden');
|
|
871
|
-
if (!visibility) {
|
|
872
|
-
this.setControlPointsVisibility(false);
|
|
873
|
-
}
|
|
874
|
-
options.visible = visibility;
|
|
875
|
-
},
|
|
876
|
-
setControlPointsVisibility: function (visible) {
|
|
877
|
-
var setItemControlPointsVisibility = function (item) {
|
|
878
|
-
item.setControlPointsVisibility(visible);
|
|
879
|
-
};
|
|
880
|
-
controllableMixin.setControlPointsVisibility.call(this, visible);
|
|
881
|
-
this.shapes.forEach(setItemControlPointsVisibility);
|
|
882
|
-
this.labels.forEach(setItemControlPointsVisibility);
|
|
883
|
-
},
|
|
884
|
-
/**
|
|
885
|
-
* Destroy the annotation. This function does not touch the chart
|
|
886
|
-
* that the annotation belongs to (all annotations are kept in
|
|
887
|
-
* the chart.annotations array) - it is recommended to use
|
|
888
|
-
* {@link Highcharts.Chart#removeAnnotation} instead.
|
|
889
|
-
* @private
|
|
890
|
-
*/
|
|
891
|
-
destroy: function () {
|
|
892
|
-
var chart = this.chart, destroyItem = function (item) {
|
|
893
|
-
item.destroy();
|
|
894
|
-
};
|
|
895
|
-
this.labels.forEach(destroyItem);
|
|
896
|
-
this.shapes.forEach(destroyItem);
|
|
897
|
-
this.clipXAxis = null;
|
|
898
|
-
this.clipYAxis = null;
|
|
899
|
-
erase(chart.labelCollectors, this.labelCollector);
|
|
900
|
-
eventEmitterMixin.destroy.call(this);
|
|
901
|
-
controllableMixin.destroy.call(this);
|
|
902
|
-
destroyObjectProperties(this, chart);
|
|
903
|
-
},
|
|
904
|
-
/**
|
|
905
|
-
* See {@link Highcharts.Chart#removeAnnotation}.
|
|
906
|
-
* @private
|
|
907
|
-
*/
|
|
908
|
-
remove: function () {
|
|
909
|
-
// Let chart.update() remove annoations on demand
|
|
910
|
-
return this.chart.removeAnnotation(this);
|
|
911
|
-
},
|
|
912
|
-
/**
|
|
913
|
-
* Updates an annotation.
|
|
914
|
-
*
|
|
915
|
-
* @function Highcharts.Annotation#update
|
|
916
|
-
*
|
|
917
|
-
* @param {Partial<Highcharts.AnnotationsOptions>} userOptions
|
|
918
|
-
* New user options for the annotation.
|
|
919
|
-
*
|
|
920
|
-
* @return {void}
|
|
921
|
-
*/
|
|
922
|
-
update: function (userOptions, redraw) {
|
|
923
|
-
var chart = this.chart, labelsAndShapes = this.getLabelsAndShapesOptions(this.userOptions, userOptions), userOptionsIndex = chart.annotations.indexOf(this), options = merge(true, this.userOptions, userOptions);
|
|
924
|
-
options.labels = labelsAndShapes.labels;
|
|
925
|
-
options.shapes = labelsAndShapes.shapes;
|
|
926
|
-
this.destroy();
|
|
927
|
-
this.constructor(chart, options);
|
|
928
|
-
// Update options in chart options, used in exporting (#9767):
|
|
929
|
-
chart.options.annotations[userOptionsIndex] = options;
|
|
930
|
-
this.isUpdating = true;
|
|
931
|
-
if (pick(redraw, true)) {
|
|
932
|
-
chart.redraw();
|
|
933
|
-
}
|
|
934
|
-
fireEvent(this, 'afterUpdate');
|
|
935
|
-
this.isUpdating = false;
|
|
936
|
-
},
|
|
937
|
-
/* *************************************************************
|
|
938
|
-
* ITEM SECTION
|
|
939
|
-
* Contains methods for handling a single item in an annotation
|
|
940
|
-
**************************************************************** */
|
|
941
|
-
/**
|
|
942
|
-
* Initialisation of a single shape
|
|
943
|
-
* @private
|
|
944
|
-
* @param {Object} shapeOptions - a confg object for a single shape
|
|
945
|
-
*/
|
|
946
|
-
initShape: function (shapeOptions, index) {
|
|
947
|
-
var options = merge(this.options.shapeOptions, {
|
|
948
|
-
controlPointOptions: this.options.controlPointOptions
|
|
949
|
-
}, shapeOptions), shape = new Annotation.shapesMap[options.type](this, options, index);
|
|
950
|
-
shape.itemType = 'shape';
|
|
951
|
-
this.shapes.push(shape);
|
|
952
|
-
return shape;
|
|
953
|
-
},
|
|
954
|
-
/**
|
|
955
|
-
* Initialisation of a single label
|
|
956
|
-
* @private
|
|
957
|
-
*/
|
|
958
|
-
initLabel: function (labelOptions, index) {
|
|
959
|
-
var options = merge(this.options.labelOptions, {
|
|
960
|
-
controlPointOptions: this.options.controlPointOptions
|
|
961
|
-
}, labelOptions), label = new ControllableLabel(this, options, index);
|
|
962
|
-
label.itemType = 'label';
|
|
963
|
-
this.labels.push(label);
|
|
964
|
-
return label;
|
|
965
|
-
},
|
|
966
|
-
/**
|
|
967
|
-
* Redraw a single item.
|
|
968
|
-
* @private
|
|
969
|
-
* @param {Annotation.Label|Annotation.Shape} item
|
|
970
|
-
* @param {boolean} [animation]
|
|
971
|
-
*/
|
|
972
|
-
redrawItem: function (item, animation) {
|
|
973
|
-
item.linkPoints();
|
|
974
|
-
if (!item.shouldBeDrawn()) {
|
|
975
|
-
this.destroyItem(item);
|
|
976
|
-
}
|
|
977
|
-
else {
|
|
978
|
-
if (!item.graphic) {
|
|
979
|
-
this.renderItem(item);
|
|
980
|
-
}
|
|
981
|
-
item.redraw(pick(animation, true) && item.graphic.placed);
|
|
982
|
-
if (item.points.length) {
|
|
983
|
-
this.adjustVisibility(item);
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
},
|
|
987
|
-
/**
|
|
988
|
-
* Hide or show annotaiton attached to points.
|
|
989
|
-
* @private
|
|
990
|
-
* @param {Annotation.Label|Annotation.Shape} item
|
|
991
|
-
*/
|
|
992
|
-
adjustVisibility: function (item) {
|
|
993
|
-
var hasVisiblePoints = false, label = item.graphic;
|
|
994
|
-
item.points.forEach(function (point) {
|
|
995
|
-
if (point.series.visible !== false &&
|
|
996
|
-
point.visible !== false) {
|
|
997
|
-
hasVisiblePoints = true;
|
|
998
|
-
}
|
|
999
|
-
});
|
|
1000
|
-
if (!hasVisiblePoints) {
|
|
1001
|
-
label.hide();
|
|
1002
|
-
}
|
|
1003
|
-
else if (label.visibility === 'hidden') {
|
|
1004
|
-
label.show();
|
|
1005
|
-
}
|
|
1006
|
-
},
|
|
1007
|
-
/**
|
|
1008
|
-
* Destroy a single item.
|
|
1009
|
-
* @private
|
|
1010
|
-
* @param {Annotation.Label|Annotation.Shape} item
|
|
1011
|
-
*/
|
|
1012
|
-
destroyItem: function (item) {
|
|
1013
|
-
// erase from shapes or labels array
|
|
1014
|
-
erase(this[item.itemType + 's'], item);
|
|
1015
|
-
item.destroy();
|
|
1016
|
-
},
|
|
1017
|
-
/**
|
|
1018
|
-
* @private
|
|
1019
|
-
*/
|
|
1020
|
-
renderItem: function (item) {
|
|
1021
|
-
item.render(item.itemType === 'label' ?
|
|
1022
|
-
this.labelsGroup :
|
|
1023
|
-
this.shapesGroup);
|
|
850
|
+
* @apioption annotations.labels
|
|
851
|
+
*/
|
|
852
|
+
/**
|
|
853
|
+
* This option defines the point to which the label will be
|
|
854
|
+
* connected. It can be either the point which exists in the
|
|
855
|
+
* series - it is referenced by the point's id - or a new point
|
|
856
|
+
* with defined x, y properties and optionally axes.
|
|
857
|
+
*
|
|
858
|
+
* @sample highcharts/annotations/mock-point/
|
|
859
|
+
* Attach annotation to a mock point
|
|
860
|
+
*
|
|
861
|
+
* @declare Highcharts.AnnotationMockPointOptionsObject
|
|
862
|
+
* @type {string|*}
|
|
863
|
+
* @requires modules/annotations
|
|
864
|
+
* @apioption annotations.labels.point
|
|
865
|
+
*/
|
|
866
|
+
/**
|
|
867
|
+
* The x position of the point. Units can be either in axis
|
|
868
|
+
* or chart pixel coordinates.
|
|
869
|
+
*
|
|
870
|
+
* @type {number}
|
|
871
|
+
* @apioption annotations.labels.point.x
|
|
872
|
+
*/
|
|
873
|
+
/**
|
|
874
|
+
* The y position of the point. Units can be either in axis
|
|
875
|
+
* or chart pixel coordinates.
|
|
876
|
+
*
|
|
877
|
+
* @type {number}
|
|
878
|
+
* @apioption annotations.labels.point.y
|
|
879
|
+
*/
|
|
880
|
+
/**
|
|
881
|
+
* This number defines which xAxis the point is connected to.
|
|
882
|
+
* It refers to either the axis id or the index of the axis in
|
|
883
|
+
* the xAxis array. If the option is not configured or the axis
|
|
884
|
+
* is not found the point's x coordinate refers to the chart
|
|
885
|
+
* pixels.
|
|
886
|
+
*
|
|
887
|
+
* @type {number|string|null}
|
|
888
|
+
* @apioption annotations.labels.point.xAxis
|
|
889
|
+
*/
|
|
890
|
+
/**
|
|
891
|
+
* This number defines which yAxis the point is connected to.
|
|
892
|
+
* It refers to either the axis id or the index of the axis in
|
|
893
|
+
* the yAxis array. If the option is not configured or the axis
|
|
894
|
+
* is not found the point's y coordinate refers to the chart
|
|
895
|
+
* pixels.
|
|
896
|
+
*
|
|
897
|
+
* @type {number|string|null}
|
|
898
|
+
* @apioption annotations.labels.point.yAxis
|
|
899
|
+
*/
|
|
900
|
+
/**
|
|
901
|
+
* An array of shapes for the annotation. For options that apply
|
|
902
|
+
* to multiple shapes, then can be added to the
|
|
903
|
+
* [shapeOptions](annotations.shapeOptions.html).
|
|
904
|
+
*
|
|
905
|
+
* @type {Array<*>}
|
|
906
|
+
* @extends annotations.shapeOptions
|
|
907
|
+
* @apioption annotations.shapes
|
|
908
|
+
*/
|
|
909
|
+
/**
|
|
910
|
+
* This option defines the point to which the shape will be
|
|
911
|
+
* connected. It can be either the point which exists in the
|
|
912
|
+
* series - it is referenced by the point's id - or a new point
|
|
913
|
+
* with defined x, y properties and optionally axes.
|
|
914
|
+
*
|
|
915
|
+
* @declare Highcharts.AnnotationMockPointOptionsObject
|
|
916
|
+
* @type {string|Highcharts.AnnotationMockPointOptionsObject}
|
|
917
|
+
* @extends annotations.labels.point
|
|
918
|
+
* @apioption annotations.shapes.point
|
|
919
|
+
*/
|
|
920
|
+
/**
|
|
921
|
+
* An array of points for the shape. This option is available
|
|
922
|
+
* for shapes which can use multiple points such as path. A
|
|
923
|
+
* point can be either a point object or a point's id.
|
|
924
|
+
*
|
|
925
|
+
* @see [annotations.shapes.point](annotations.shapes.point.html)
|
|
926
|
+
*
|
|
927
|
+
* @declare Highcharts.AnnotationMockPointOptionsObject
|
|
928
|
+
* @type {Array<string|*>}
|
|
929
|
+
* @extends annotations.labels.point
|
|
930
|
+
* @apioption annotations.shapes.points
|
|
931
|
+
*/
|
|
932
|
+
/**
|
|
933
|
+
* The URL for an image to use as the annotation shape. Note,
|
|
934
|
+
* type has to be set to `'image'`.
|
|
935
|
+
*
|
|
936
|
+
* @see [annotations.shapes.type](annotations.shapes.type)
|
|
937
|
+
* @sample highcharts/annotations/shape-src/
|
|
938
|
+
* Define a marker image url for annotations
|
|
939
|
+
*
|
|
940
|
+
* @type {string}
|
|
941
|
+
* @apioption annotations.shapes.src
|
|
942
|
+
*/
|
|
943
|
+
/**
|
|
944
|
+
* Id of the marker which will be drawn at the final vertex of
|
|
945
|
+
* the path. Custom markers can be defined in defs property.
|
|
946
|
+
*
|
|
947
|
+
* @see [defs.markers](defs.markers.html)
|
|
948
|
+
*
|
|
949
|
+
* @sample highcharts/annotations/custom-markers/
|
|
950
|
+
* Define a custom marker for annotations
|
|
951
|
+
*
|
|
952
|
+
* @type {string}
|
|
953
|
+
* @apioption annotations.shapes.markerEnd
|
|
954
|
+
*/
|
|
955
|
+
/**
|
|
956
|
+
* Id of the marker which will be drawn at the first vertex of
|
|
957
|
+
* the path. Custom markers can be defined in defs property.
|
|
958
|
+
*
|
|
959
|
+
* @see [defs.markers](defs.markers.html)
|
|
960
|
+
*
|
|
961
|
+
* @sample {highcharts} highcharts/annotations/custom-markers/
|
|
962
|
+
* Define a custom marker for annotations
|
|
963
|
+
*
|
|
964
|
+
* @type {string}
|
|
965
|
+
* @apioption annotations.shapes.markerStart
|
|
966
|
+
*/
|
|
967
|
+
/**
|
|
968
|
+
* Options for annotation's shapes. Each shape inherits options
|
|
969
|
+
* from the shapeOptions object. An option from the shapeOptions
|
|
970
|
+
* can be overwritten by config for a specific shape.
|
|
971
|
+
*
|
|
972
|
+
* @requires modules/annotations
|
|
973
|
+
*/
|
|
974
|
+
shapeOptions: {
|
|
975
|
+
/**
|
|
976
|
+
* The width of the shape.
|
|
977
|
+
*
|
|
978
|
+
* @sample highcharts/annotations/shape/
|
|
979
|
+
* Basic shape annotation
|
|
980
|
+
*
|
|
981
|
+
* @type {number}
|
|
982
|
+
* @apioption annotations.shapeOptions.width
|
|
983
|
+
**/
|
|
984
|
+
/**
|
|
985
|
+
* The height of the shape.
|
|
986
|
+
*
|
|
987
|
+
* @sample highcharts/annotations/shape/
|
|
988
|
+
* Basic shape annotation
|
|
989
|
+
*
|
|
990
|
+
* @type {number}
|
|
991
|
+
* @apioption annotations.shapeOptions.height
|
|
992
|
+
*/
|
|
993
|
+
/**
|
|
994
|
+
* The type of the shape, e.g. circle or rectangle.
|
|
995
|
+
*
|
|
996
|
+
* @sample highcharts/annotations/shape/
|
|
997
|
+
* Basic shape annotation
|
|
998
|
+
*
|
|
999
|
+
* @type {string}
|
|
1000
|
+
* @default rect
|
|
1001
|
+
* @apioption annotations.shapeOptions.type
|
|
1002
|
+
*/
|
|
1003
|
+
/**
|
|
1004
|
+
* The URL for an image to use as the annotation shape.
|
|
1005
|
+
* Note, type has to be set to `'image'`.
|
|
1006
|
+
*
|
|
1007
|
+
* @see [annotations.shapeOptions.type](annotations.shapeOptions.type)
|
|
1008
|
+
* @sample highcharts/annotations/shape-src/
|
|
1009
|
+
* Define a marker image url for annotations
|
|
1010
|
+
*
|
|
1011
|
+
* @type {string}
|
|
1012
|
+
* @apioption annotations.shapeOptions.src
|
|
1013
|
+
*/
|
|
1014
|
+
/**
|
|
1015
|
+
* Name of the dash style to use for the shape's stroke.
|
|
1016
|
+
*
|
|
1017
|
+
* @sample {highcharts} highcharts/plotoptions/series-dashstyle-all/
|
|
1018
|
+
* Possible values demonstrated
|
|
1019
|
+
*
|
|
1020
|
+
* @type {Highcharts.DashStyleValue}
|
|
1021
|
+
* @apioption annotations.shapeOptions.dashStyle
|
|
1022
|
+
*/
|
|
1023
|
+
/**
|
|
1024
|
+
* The color of the shape's stroke.
|
|
1025
|
+
*
|
|
1026
|
+
* @sample highcharts/annotations/shape/
|
|
1027
|
+
* Basic shape annotation
|
|
1028
|
+
*
|
|
1029
|
+
* @type {Highcharts.ColorString}
|
|
1030
|
+
*/
|
|
1031
|
+
stroke: 'rgba(0, 0, 0, 0.75)',
|
|
1032
|
+
/**
|
|
1033
|
+
* The pixel stroke width of the shape.
|
|
1034
|
+
*
|
|
1035
|
+
* @sample highcharts/annotations/shape/
|
|
1036
|
+
* Basic shape annotation
|
|
1037
|
+
*/
|
|
1038
|
+
strokeWidth: 1,
|
|
1039
|
+
/**
|
|
1040
|
+
* The color of the shape's fill.
|
|
1041
|
+
*
|
|
1042
|
+
* @sample highcharts/annotations/shape/
|
|
1043
|
+
* Basic shape annotation
|
|
1044
|
+
*
|
|
1045
|
+
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
1046
|
+
*/
|
|
1047
|
+
fill: 'rgba(0, 0, 0, 0.75)',
|
|
1048
|
+
/**
|
|
1049
|
+
* The radius of the shape.
|
|
1050
|
+
*
|
|
1051
|
+
* @sample highcharts/annotations/shape/
|
|
1052
|
+
* Basic shape annotation
|
|
1053
|
+
*/
|
|
1054
|
+
r: 0,
|
|
1055
|
+
/**
|
|
1056
|
+
* Defines additional snapping area around an annotation
|
|
1057
|
+
* making this annotation to focus. Defined in pixels.
|
|
1058
|
+
*/
|
|
1059
|
+
snap: 2
|
|
1060
|
+
},
|
|
1061
|
+
/**
|
|
1062
|
+
* Options for annotation's control points. Each control point
|
|
1063
|
+
* inherits options from controlPointOptions object.
|
|
1064
|
+
* Options from the controlPointOptions can be overwritten
|
|
1065
|
+
* by options in a specific control point.
|
|
1066
|
+
*
|
|
1067
|
+
* @declare Highcharts.AnnotationControlPointOptionsObject
|
|
1068
|
+
* @requires modules/annotations
|
|
1069
|
+
* @apioption annotations.controlPointOptions
|
|
1070
|
+
*/
|
|
1071
|
+
controlPointOptions: {
|
|
1072
|
+
/**
|
|
1073
|
+
* @type {Highcharts.AnnotationControlPointPositionerFunction}
|
|
1074
|
+
* @apioption annotations.controlPointOptions.positioner
|
|
1075
|
+
*/
|
|
1076
|
+
symbol: 'circle',
|
|
1077
|
+
width: 10,
|
|
1078
|
+
height: 10,
|
|
1079
|
+
style: {
|
|
1080
|
+
stroke: 'black',
|
|
1081
|
+
'stroke-width': 2,
|
|
1082
|
+
fill: 'white'
|
|
1083
|
+
},
|
|
1084
|
+
visible: false,
|
|
1085
|
+
events: {}
|
|
1086
|
+
},
|
|
1087
|
+
/**
|
|
1088
|
+
* Event callback when annotation is added to the chart.
|
|
1089
|
+
*
|
|
1090
|
+
* @type {Highcharts.EventCallbackFunction<Highcharts.Annotation>}
|
|
1091
|
+
* @since 7.1.0
|
|
1092
|
+
* @apioption annotations.events.add
|
|
1093
|
+
*/
|
|
1094
|
+
/**
|
|
1095
|
+
* Event callback when annotation is updated (e.g. drag and
|
|
1096
|
+
* droppped or resized by control points).
|
|
1097
|
+
*
|
|
1098
|
+
* @type {Highcharts.EventCallbackFunction<Highcharts.Annotation>}
|
|
1099
|
+
* @since 7.1.0
|
|
1100
|
+
* @apioption annotations.events.afterUpdate
|
|
1101
|
+
*/
|
|
1102
|
+
/**
|
|
1103
|
+
* Event callback when annotation is removed from the chart.
|
|
1104
|
+
*
|
|
1105
|
+
* @type {Highcharts.EventCallbackFunction<Highcharts.Annotation>}
|
|
1106
|
+
* @since 7.1.0
|
|
1107
|
+
* @apioption annotations.events.remove
|
|
1108
|
+
*/
|
|
1109
|
+
/**
|
|
1110
|
+
* Events available in annotations.
|
|
1111
|
+
*
|
|
1112
|
+
* @requires modules/annotations
|
|
1113
|
+
*/
|
|
1114
|
+
events: {},
|
|
1115
|
+
/**
|
|
1116
|
+
* The Z index of the annotation.
|
|
1117
|
+
*/
|
|
1118
|
+
zIndex: 6
|
|
1024
1119
|
}
|
|
1025
|
-
});
|
|
1026
|
-
/**
|
|
1027
|
-
* An object uses for mapping between a shape type and a constructor.
|
|
1028
|
-
* To add a new shape type extend this object with type name as a key
|
|
1029
|
-
* and a constructor as its value.
|
|
1030
|
-
*/
|
|
1031
|
-
Annotation.shapesMap = {
|
|
1032
|
-
'rect': ControllableRect,
|
|
1033
|
-
'circle': ControllableCircle,
|
|
1034
|
-
'path': ControllablePath,
|
|
1035
|
-
'image': ControllableImage
|
|
1036
|
-
};
|
|
1037
|
-
Annotation.types = {};
|
|
1038
|
-
Annotation.MockPoint = MockPoint;
|
|
1039
|
-
Annotation.ControlPoint = ControlPoint;
|
|
1120
|
+
}));
|
|
1040
1121
|
H.extendAnnotation = function (Constructor, BaseConstructor, prototype, defaultOptions) {
|
|
1041
1122
|
BaseConstructor = BaseConstructor || Annotation;
|
|
1042
1123
|
merge(true, Constructor.prototype, BaseConstructor.prototype, prototype);
|
|
@@ -1067,6 +1148,9 @@ extend(chartProto, /** @lends Highcharts.Chart# */ {
|
|
|
1067
1148
|
this.options.annotations.push(annotation.options);
|
|
1068
1149
|
if (pick(redraw, true)) {
|
|
1069
1150
|
annotation.redraw();
|
|
1151
|
+
annotation.graphic.attr({
|
|
1152
|
+
opacity: 1
|
|
1153
|
+
});
|
|
1070
1154
|
}
|
|
1071
1155
|
return annotation;
|
|
1072
1156
|
},
|
|
@@ -1093,6 +1177,9 @@ extend(chartProto, /** @lends Highcharts.Chart# */ {
|
|
|
1093
1177
|
this.plotBoxClip.attr(this.plotBox);
|
|
1094
1178
|
this.annotations.forEach(function (annotation) {
|
|
1095
1179
|
annotation.redraw();
|
|
1180
|
+
annotation.graphic.animate({
|
|
1181
|
+
opacity: 1
|
|
1182
|
+
}, annotation.animationConfig);
|
|
1096
1183
|
});
|
|
1097
1184
|
}
|
|
1098
1185
|
});
|
|
@@ -1121,9 +1208,114 @@ chartProto.callbacks.push(function (chart) {
|
|
|
1121
1208
|
chart.plotBoxClip.destroy();
|
|
1122
1209
|
chart.controlPointsGroup.destroy();
|
|
1123
1210
|
});
|
|
1211
|
+
addEvent(chart, 'exportData', function (event) {
|
|
1212
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1213
|
+
var annotations = chart.annotations, csvColumnHeaderFormatter = ((this.options.exporting &&
|
|
1214
|
+
this.options.exporting.csv) ||
|
|
1215
|
+
{}).columnHeaderFormatter,
|
|
1216
|
+
// If second row doesn't have xValues
|
|
1217
|
+
// then it is a title row thus multiple level header is in use.
|
|
1218
|
+
multiLevelHeaders = !event.dataRows[1].xValues, annotationHeader = (_b = (_a = chart.options.lang) === null || _a === void 0 ? void 0 : _a.exportData) === null || _b === void 0 ? void 0 : _b.annotationHeader, columnHeaderFormatter = function (index) {
|
|
1219
|
+
var s;
|
|
1220
|
+
if (csvColumnHeaderFormatter) {
|
|
1221
|
+
s = csvColumnHeaderFormatter(index);
|
|
1222
|
+
if (s !== false) {
|
|
1223
|
+
return s;
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
s = annotationHeader + ' ' + index;
|
|
1227
|
+
if (multiLevelHeaders) {
|
|
1228
|
+
return {
|
|
1229
|
+
columnTitle: s,
|
|
1230
|
+
topLevelColumnTitle: s
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
return s;
|
|
1234
|
+
}, 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;
|
|
1235
|
+
annotations.forEach(function (annotation) {
|
|
1236
|
+
if (annotation.options.labelOptions.includeInDataExport) {
|
|
1237
|
+
annotation.labels.forEach(function (label) {
|
|
1238
|
+
if (label.options.text) {
|
|
1239
|
+
var annotationText_1 = label.options.text;
|
|
1240
|
+
label.points.forEach(function (points) {
|
|
1241
|
+
var annotationX = points.x, xAxisIndex = points.series.xAxis ?
|
|
1242
|
+
points.series.xAxis.options.index :
|
|
1243
|
+
-1;
|
|
1244
|
+
var wasAdded = false;
|
|
1245
|
+
// Annotation not connected to any xAxis -
|
|
1246
|
+
// add new row.
|
|
1247
|
+
if (xAxisIndex === -1) {
|
|
1248
|
+
var n = event.dataRows[0].length, newRow = new Array(n);
|
|
1249
|
+
for (var i = 0; i < n; ++i) {
|
|
1250
|
+
newRow[i] = '';
|
|
1251
|
+
}
|
|
1252
|
+
newRow.push(annotationText_1);
|
|
1253
|
+
newRow.xValues = [];
|
|
1254
|
+
newRow.xValues[xAxisIndex] = annotationX;
|
|
1255
|
+
event.dataRows.push(newRow);
|
|
1256
|
+
wasAdded = true;
|
|
1257
|
+
}
|
|
1258
|
+
// Annotation placed on a exported data point
|
|
1259
|
+
// - add new column
|
|
1260
|
+
if (!wasAdded) {
|
|
1261
|
+
event.dataRows.forEach(function (row, rowIndex) {
|
|
1262
|
+
if (!wasAdded &&
|
|
1263
|
+
row.xValues &&
|
|
1264
|
+
xAxisIndex !== void 0 &&
|
|
1265
|
+
annotationX === row.xValues[xAxisIndex]) {
|
|
1266
|
+
if (joinAnnotations &&
|
|
1267
|
+
row.length > startRowLength) {
|
|
1268
|
+
row[row.length - 1] +=
|
|
1269
|
+
annotationSeparator + annotationText_1;
|
|
1270
|
+
}
|
|
1271
|
+
else {
|
|
1272
|
+
row.push(annotationText_1);
|
|
1273
|
+
}
|
|
1274
|
+
wasAdded = true;
|
|
1275
|
+
}
|
|
1276
|
+
});
|
|
1277
|
+
}
|
|
1278
|
+
// Annotation not placed on any exported data point,
|
|
1279
|
+
// but connected to the xAxis - add new row
|
|
1280
|
+
if (!wasAdded) {
|
|
1281
|
+
var n = event.dataRows[0].length, newRow = new Array(n);
|
|
1282
|
+
for (var i = 0; i < n; ++i) {
|
|
1283
|
+
newRow[i] = '';
|
|
1284
|
+
}
|
|
1285
|
+
newRow[0] = annotationX;
|
|
1286
|
+
newRow.push(annotationText_1);
|
|
1287
|
+
newRow.xValues = [];
|
|
1288
|
+
if (xAxisIndex !== void 0) {
|
|
1289
|
+
newRow.xValues[xAxisIndex] = annotationX;
|
|
1290
|
+
}
|
|
1291
|
+
event.dataRows.push(newRow);
|
|
1292
|
+
}
|
|
1293
|
+
});
|
|
1294
|
+
}
|
|
1295
|
+
});
|
|
1296
|
+
}
|
|
1297
|
+
});
|
|
1298
|
+
var maxRowLen = 0;
|
|
1299
|
+
event.dataRows.forEach(function (row) {
|
|
1300
|
+
maxRowLen = Math.max(maxRowLen, row.length);
|
|
1301
|
+
});
|
|
1302
|
+
var newRows = maxRowLen - event.dataRows[0].length;
|
|
1303
|
+
for (var i = 0; i < newRows; i++) {
|
|
1304
|
+
var header = columnHeaderFormatter(i + 1);
|
|
1305
|
+
if (multiLevelHeaders) {
|
|
1306
|
+
event.dataRows[0].push(header.topLevelColumnTitle);
|
|
1307
|
+
event.dataRows[1].push(header.columnTitle);
|
|
1308
|
+
}
|
|
1309
|
+
else {
|
|
1310
|
+
event.dataRows[0].push(header);
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
});
|
|
1124
1314
|
});
|
|
1125
|
-
wrap(
|
|
1315
|
+
wrap(Pointer.prototype, 'onContainerMouseDown', function (proceed) {
|
|
1126
1316
|
if (!this.chart.hasDraggedAnnotation) {
|
|
1127
1317
|
proceed.apply(this, Array.prototype.slice.call(arguments, 1));
|
|
1128
1318
|
}
|
|
1129
1319
|
});
|
|
1320
|
+
H.Annotation = Annotation;
|
|
1321
|
+
export default Annotation;
|