highcharts 7.1.1 → 7.1.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/annotations/popup.css +3 -3
- package/css/annotations/popup.scss +1 -1
- package/css/stocktools/gui.css +5 -5
- package/css/stocktools/gui.scss +1 -1
- package/es-modules/annotations/ControlPoint.js +1 -1
- package/es-modules/annotations/MockPoint.js +45 -12
- package/es-modules/annotations/annotations.src.js +203 -166
- package/es-modules/annotations/controllable/ControllableCircle.js +2 -10
- package/es-modules/annotations/controllable/ControllableImage.js +2 -10
- package/es-modules/annotations/controllable/ControllableLabel.js +54 -9
- package/es-modules/annotations/controllable/ControllableRect.js +2 -10
- package/es-modules/annotations/controllable/controllableMixin.js +32 -4
- package/es-modules/annotations/controllable/markerMixin.js +1 -0
- package/es-modules/annotations/eventEmitterMixin.js +1 -0
- package/es-modules/annotations/navigationBindings.js +15 -11
- package/es-modules/annotations/popup.js +59 -81
- package/es-modules/annotations/types/CrookedLine.js +19 -7
- package/es-modules/annotations/types/ElliottWave.js +7 -6
- package/es-modules/annotations/types/Fibonacci.js +14 -14
- package/es-modules/annotations/types/InfinityLine.js +4 -4
- package/es-modules/annotations/types/Measure.js +41 -41
- package/es-modules/annotations/types/Pitchfork.js +5 -4
- package/es-modules/annotations/types/VerticalLine.js +6 -5
- package/es-modules/error-messages.js +6 -1
- package/es-modules/indicators/indicators.src.js +5 -3
- package/es-modules/mixins/nodes.js +16 -8
- package/es-modules/modules/accessibility/AccessibilityComponent.js +4 -4
- package/es-modules/modules/accessibility/KeyboardNavigation.js +17 -4
- package/es-modules/modules/accessibility/components/RangeSelectorComponent.js +3 -2
- package/es-modules/modules/accessibility/components/SeriesComponent.js +110 -2
- package/es-modules/modules/accessibility/components/ZoomComponent.js +1 -1
- package/es-modules/modules/accessibility/options.js +2 -1
- package/es-modules/modules/bellcurve.src.js +27 -29
- package/es-modules/modules/boost/boost-init.js +14 -0
- package/es-modules/modules/boost/boost-overrides.js +13 -3
- package/es-modules/modules/boost/wgl-renderer.js +30 -15
- package/es-modules/modules/boost/wgl-shader.js +33 -16
- package/es-modules/modules/boost/wgl-vbuffer.js +8 -4
- package/es-modules/modules/broken-axis.src.js +1 -1
- package/es-modules/modules/bullet.src.js +68 -68
- package/es-modules/modules/cylinder.src.js +3 -1
- package/es-modules/modules/data.src.js +9 -5
- package/es-modules/modules/draggable-points.src.js +1 -1
- package/es-modules/modules/drilldown.src.js +1 -1
- package/es-modules/modules/export-data.src.js +7 -8
- package/es-modules/modules/exporting.src.js +9 -1
- package/es-modules/modules/full-screen.src.js +1 -1
- package/es-modules/modules/funnel3d.src.js +10 -3
- package/es-modules/modules/histogram.src.js +162 -164
- package/es-modules/modules/item-series.src.js +10 -10
- package/es-modules/modules/networkgraph/layouts.js +16 -12
- package/es-modules/modules/networkgraph/networkgraph.src.js +147 -51
- package/es-modules/modules/offline-exporting.src.js +15 -2
- package/es-modules/modules/oldie-polyfills.src.js +1 -1
- package/es-modules/modules/organization.src.js +65 -20
- package/es-modules/modules/pareto.src.js +52 -51
- package/es-modules/modules/pattern-fill.src.js +1 -1
- package/es-modules/modules/price-indicator.src.js +1 -1
- package/es-modules/modules/pyramid3d.src.js +1 -1
- package/es-modules/modules/sankey.src.js +22 -10
- package/es-modules/modules/series-label.src.js +16 -8
- package/es-modules/modules/solid-gauge.src.js +128 -79
- package/es-modules/modules/static-scale.src.js +8 -1
- package/es-modules/modules/stock-tools-gui.js +1 -1
- package/es-modules/modules/streamgraph.src.js +11 -11
- package/es-modules/modules/sunburst.src.js +23 -2
- package/es-modules/modules/tilemap.src.js +58 -57
- package/es-modules/modules/timeline.src.js +17 -12
- package/es-modules/modules/treemap.src.js +6 -6
- package/es-modules/modules/variwide.src.js +39 -39
- package/es-modules/modules/vector.src.js +108 -107
- package/es-modules/modules/venn.src.js +4 -2
- package/es-modules/modules/windbarb.src.js +43 -43
- package/es-modules/modules/wordcloud.src.js +1 -0
- package/es-modules/modules/xrange.src.js +112 -104
- package/es-modules/parts/AreaSeries.js +4 -1
- package/es-modules/parts/Axis.js +809 -1870
- package/es-modules/parts/Chart.js +254 -743
- package/es-modules/parts/Color.js +160 -113
- package/es-modules/parts/ColumnSeries.js +9 -3
- package/es-modules/parts/DataLabels.js +31 -2
- package/es-modules/parts/Dynamics.js +73 -26
- package/es-modules/parts/FlagsSeries.js +6 -4
- package/es-modules/parts/Globals.js +20 -36
- package/es-modules/parts/Html.js +116 -235
- package/es-modules/parts/Interaction.js +17 -7
- package/es-modules/parts/Legend.js +277 -632
- package/es-modules/parts/MSPointer.js +62 -106
- package/es-modules/parts/Options.js +128 -367
- package/es-modules/parts/OrdinalAxis.js +12 -0
- package/es-modules/parts/PieSeries.js +61 -44
- package/es-modules/parts/PlotLineOrBand.js +38 -3
- package/es-modules/parts/Point.js +117 -227
- package/es-modules/parts/Pointer.js +273 -558
- package/es-modules/parts/RangeSelector.js +5 -3
- package/es-modules/parts/Responsive.js +8 -4
- package/es-modules/parts/ScrollablePlotArea.js +215 -81
- package/es-modules/parts/Scrollbar.js +38 -23
- package/es-modules/parts/Series.js +151 -47
- package/es-modules/parts/Stacking.js +8 -3
- package/es-modules/parts/StockChart.js +42 -29
- package/es-modules/parts/SvgRenderer.js +1080 -2100
- package/es-modules/parts/Tick.js +11 -4
- package/es-modules/parts/Time.js +179 -363
- package/es-modules/parts/Tooltip.js +23 -12
- package/es-modules/parts/TouchPointer.js +69 -187
- package/es-modules/parts/Utilities.js +593 -846
- package/es-modules/parts-3d/Axis.js +2 -2
- package/es-modules/parts-3d/Column.js +18 -8
- package/es-modules/parts-gantt/GanttSeries.js +17 -21
- package/es-modules/parts-gantt/GridAxis.js +183 -101
- package/es-modules/parts-gantt/PathfinderAlgorithms.js +2 -2
- package/es-modules/parts-gantt/TreeGrid.js +53 -36
- package/es-modules/parts-map/ColorAxis.js +35 -14
- package/es-modules/parts-map/MapBubbleSeries.js +2 -1
- package/es-modules/parts-map/MapSeries.js +29 -18
- package/es-modules/parts-more/AreaRangeSeries.js +13 -12
- package/es-modules/parts-more/ColumnRangeSeries.js +8 -2
- package/es-modules/parts-more/GaugeSeries.js +9 -9
- package/es-modules/parts-more/PackedBubbleSeries.js +152 -115
- package/es-modules/parts-more/RadialAxis.js +102 -8
- package/es-modules/parts-more/WaterfallSeries.js +148 -35
- package/highcharts-3d.js +68 -67
- package/highcharts-3d.js.map +1 -1
- package/highcharts-3d.src.js +21 -11
- package/highcharts-gantt.d.ts +5 -3
- package/highcharts-gantt.js +618 -610
- package/highcharts-gantt.js.map +1 -1
- package/highcharts-gantt.src.d.ts +5 -3
- package/highcharts-gantt.src.js +5185 -8892
- package/highcharts-more.js +144 -140
- package/highcharts-more.js.map +1 -1
- package/highcharts-more.src.js +449 -194
- package/highcharts.d.ts +3943 -5236
- package/highcharts.js +454 -449
- package/highcharts.js.map +1 -1
- package/highcharts.src.d.ts +3943 -5236
- package/highcharts.src.js +4767 -8601
- package/highmaps.d.ts +5 -3
- package/highmaps.js +498 -494
- package/highmaps.js.map +1 -1
- package/highmaps.src.d.ts +5 -3
- package/highmaps.src.js +4547 -8507
- package/highstock.d.ts +5 -3
- package/highstock.js +597 -590
- package/highstock.js.map +1 -1
- package/highstock.src.d.ts +5 -3
- package/highstock.src.js +4871 -8661
- package/indicators/acceleration-bands.js +1 -1
- package/indicators/acceleration-bands.src.js +1 -1
- package/indicators/accumulation-distribution.js +1 -1
- package/indicators/accumulation-distribution.src.js +1 -1
- package/indicators/ao.js +1 -1
- package/indicators/ao.src.js +1 -1
- package/indicators/apo.js +1 -1
- package/indicators/apo.src.js +1 -1
- package/indicators/aroon-oscillator.js +1 -1
- package/indicators/aroon-oscillator.src.js +1 -1
- package/indicators/aroon.js +1 -1
- package/indicators/aroon.src.js +1 -1
- package/indicators/atr.js +1 -1
- package/indicators/atr.src.js +1 -1
- package/indicators/bollinger-bands.js +1 -1
- package/indicators/bollinger-bands.src.js +1 -1
- package/indicators/cci.js +1 -1
- package/indicators/cci.src.js +1 -1
- package/indicators/chaikin.js +1 -1
- package/indicators/chaikin.src.js +1 -1
- package/indicators/cmf.js +1 -1
- package/indicators/cmf.src.js +1 -1
- package/indicators/dema.js +1 -1
- package/indicators/dema.src.js +1 -1
- package/indicators/dpo.js +1 -1
- package/indicators/dpo.src.js +1 -1
- package/indicators/ema.js +1 -1
- package/indicators/ema.src.js +1 -1
- package/indicators/ichimoku-kinko-hyo.js +1 -1
- package/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/indicators/indicators-all.js +105 -105
- package/indicators/indicators-all.js.map +1 -1
- package/indicators/indicators-all.src.js +6 -4
- package/indicators/indicators.js +9 -9
- package/indicators/indicators.js.map +1 -1
- package/indicators/indicators.src.js +6 -4
- package/indicators/keltner-channels.js +1 -1
- package/indicators/keltner-channels.src.js +1 -1
- package/indicators/macd.js +1 -1
- package/indicators/macd.src.js +1 -1
- package/indicators/mfi.js +1 -1
- package/indicators/mfi.src.js +1 -1
- package/indicators/momentum.js +1 -1
- package/indicators/momentum.src.js +1 -1
- package/indicators/natr.js +1 -1
- package/indicators/natr.src.js +1 -1
- package/indicators/pivot-points.js +1 -1
- package/indicators/pivot-points.src.js +1 -1
- package/indicators/ppo.js +1 -1
- package/indicators/ppo.src.js +1 -1
- package/indicators/price-channel.js +1 -1
- package/indicators/price-channel.src.js +1 -1
- package/indicators/price-envelopes.js +1 -1
- package/indicators/price-envelopes.src.js +1 -1
- package/indicators/psar.js +1 -1
- package/indicators/psar.src.js +1 -1
- package/indicators/regressions.js +1 -1
- package/indicators/regressions.src.js +1 -1
- package/indicators/roc.js +1 -1
- package/indicators/roc.src.js +1 -1
- package/indicators/rsi.js +1 -1
- package/indicators/rsi.src.js +1 -1
- package/indicators/stochastic.js +1 -1
- package/indicators/stochastic.src.js +1 -1
- package/indicators/supertrend.js +1 -1
- package/indicators/supertrend.src.js +1 -1
- package/indicators/tema.js +1 -1
- package/indicators/tema.src.js +1 -1
- package/indicators/trix.js +1 -1
- package/indicators/trix.src.js +1 -1
- package/indicators/volume-by-price.js +1 -1
- package/indicators/volume-by-price.src.js +1 -1
- package/indicators/vwap.js +1 -1
- package/indicators/vwap.src.js +1 -1
- package/indicators/williams-r.js +1 -1
- package/indicators/williams-r.src.js +1 -1
- package/indicators/wma.js +1 -1
- package/indicators/wma.src.js +1 -1
- package/indicators/zigzag.js +1 -1
- package/indicators/zigzag.src.js +1 -1
- package/modules/accessibility.js +92 -89
- package/modules/accessibility.js.map +1 -1
- package/modules/accessibility.src.js +138 -15
- package/modules/annotations-advanced.js +128 -127
- package/modules/annotations-advanced.js.map +1 -1
- package/modules/annotations-advanced.src.js +514 -396
- package/modules/annotations.d.ts +36 -0
- package/modules/annotations.js +81 -81
- package/modules/annotations.js.map +1 -1
- package/modules/annotations.src.d.ts +36 -0
- package/modules/annotations.src.js +418 -315
- package/modules/arrow-symbols.js +1 -1
- package/modules/arrow-symbols.src.js +1 -1
- package/modules/boost-canvas.js +1 -1
- package/modules/boost-canvas.src.js +1 -1
- package/modules/boost.js +63 -63
- package/modules/boost.js.map +1 -1
- package/modules/boost.src.js +99 -39
- package/modules/broken-axis.js +1 -1
- package/modules/broken-axis.src.js +2 -2
- package/modules/bullet.js +1 -1
- package/modules/bullet.src.js +69 -69
- package/modules/current-date-indicator.js +1 -1
- package/modules/current-date-indicator.src.js +1 -1
- package/modules/cylinder.js +1 -1
- package/modules/cylinder.js.map +1 -1
- package/modules/cylinder.src.js +4 -2
- package/modules/data.js +4 -4
- package/modules/data.js.map +1 -1
- package/modules/data.src.js +10 -6
- package/modules/datagrouping.js +1 -1
- package/modules/datagrouping.src.js +1 -1
- package/modules/debugger.js +4 -4
- package/modules/debugger.js.map +1 -1
- package/modules/debugger.src.js +7 -2
- package/modules/dependency-wheel.js +1 -1
- package/modules/dependency-wheel.src.js +1 -1
- package/modules/dotplot.js +1 -1
- package/modules/dotplot.src.js +1 -1
- package/modules/drag-panes.js +1 -1
- package/modules/drag-panes.src.js +1 -1
- package/modules/draggable-points.js +1 -1
- package/modules/draggable-points.src.js +2 -2
- package/modules/drilldown.js +1 -1
- package/modules/drilldown.src.js +2 -2
- package/modules/export-data.js +2 -2
- package/modules/export-data.js.map +1 -1
- package/modules/export-data.src.js +8 -9
- package/modules/exporting.js +25 -25
- package/modules/exporting.js.map +1 -1
- package/modules/exporting.src.js +11 -3
- package/modules/full-screen.js +1 -1
- package/modules/full-screen.src.js +2 -2
- package/modules/funnel.js +1 -1
- package/modules/funnel.src.js +1 -1
- package/modules/funnel3d.js +2 -2
- package/modules/funnel3d.js.map +1 -1
- package/modules/funnel3d.src.js +11 -4
- package/modules/gantt.js +166 -164
- package/modules/gantt.js.map +1 -1
- package/modules/gantt.src.js +422 -295
- package/modules/grid-axis.js +18 -16
- package/modules/grid-axis.js.map +1 -1
- package/modules/grid-axis.src.js +184 -102
- package/modules/heatmap.js +22 -22
- package/modules/heatmap.js.map +1 -1
- package/modules/heatmap.src.js +36 -15
- package/modules/histogram-bellcurve.js +1 -1
- package/modules/histogram-bellcurve.js.map +1 -1
- package/modules/histogram-bellcurve.src.js +186 -183
- package/modules/item-series.js +1 -1
- package/modules/item-series.src.js +11 -11
- package/modules/map-parser.js +1 -1
- package/modules/map-parser.src.js +1 -1
- package/modules/map.js +83 -83
- package/modules/map.js.map +1 -1
- package/modules/map.src.js +67 -34
- package/modules/networkgraph.js +10 -9
- package/modules/networkgraph.js.map +1 -1
- package/modules/networkgraph.src.js +180 -72
- package/modules/no-data-to-display.js +1 -1
- package/modules/no-data-to-display.src.js +1 -1
- package/modules/offline-exporting.js +15 -15
- package/modules/offline-exporting.js.map +1 -1
- package/modules/offline-exporting.src.js +17 -4
- package/modules/oldie-polyfills.js +1 -1
- package/modules/oldie-polyfills.src.js +2 -2
- package/modules/oldie.js +2 -2
- package/modules/oldie.src.js +2 -2
- package/modules/organization.js +1 -1
- package/modules/organization.js.map +1 -1
- package/modules/organization.src.js +66 -21
- package/modules/overlapping-datalabels.js +1 -1
- package/modules/overlapping-datalabels.src.js +1 -1
- package/modules/parallel-coordinates.js +1 -1
- package/modules/parallel-coordinates.src.js +1 -1
- package/modules/pareto.js +1 -1
- package/modules/pareto.js.map +1 -1
- package/modules/pareto.src.js +53 -52
- package/modules/pathfinder.js +3 -3
- package/modules/pathfinder.js.map +1 -1
- package/modules/pathfinder.src.js +3 -3
- package/modules/pattern-fill.js +1 -1
- package/modules/pattern-fill.src.js +2 -2
- package/modules/price-indicator.js +1 -1
- package/modules/price-indicator.src.js +2 -2
- package/modules/pyramid3d.js +1 -1
- package/modules/pyramid3d.src.js +2 -2
- package/modules/sankey.js +14 -14
- package/modules/sankey.js.map +1 -1
- package/modules/sankey.src.js +39 -19
- package/modules/series-label.js +16 -16
- package/modules/series-label.js.map +1 -1
- package/modules/series-label.src.js +17 -9
- package/modules/solid-gauge.js +5 -5
- package/modules/solid-gauge.js.map +1 -1
- package/modules/solid-gauge.src.js +129 -80
- package/modules/sonification.js +1 -1
- package/modules/sonification.src.js +1 -1
- package/modules/static-scale.js +4 -4
- package/modules/static-scale.js.map +1 -1
- package/modules/static-scale.src.js +9 -2
- package/modules/stock-tools.js +2 -2
- package/modules/stock-tools.src.js +3 -3
- package/modules/stock.js +146 -145
- package/modules/stock.js.map +1 -1
- package/modules/stock.src.js +105 -61
- package/modules/streamgraph.js +1 -1
- package/modules/streamgraph.src.js +12 -12
- package/modules/sunburst.js +40 -40
- package/modules/sunburst.js.map +1 -1
- package/modules/sunburst.src.js +30 -9
- package/modules/tilemap.js +1 -1
- package/modules/tilemap.js.map +1 -1
- package/modules/tilemap.src.js +59 -58
- package/modules/timeline.js +12 -11
- package/modules/timeline.js.map +1 -1
- package/modules/timeline.src.js +18 -13
- package/modules/treegrid.js +45 -43
- package/modules/treegrid.js.map +1 -1
- package/modules/treegrid.src.js +238 -139
- package/modules/treemap.js +1 -1
- package/modules/treemap.src.js +7 -7
- package/modules/variable-pie.js +1 -1
- package/modules/variable-pie.src.js +1 -1
- package/modules/variwide.js +1 -1
- package/modules/variwide.src.js +40 -40
- package/modules/vector.js +1 -1
- package/modules/vector.js.map +1 -1
- package/modules/vector.src.js +109 -108
- package/modules/venn.js +23 -23
- package/modules/venn.js.map +1 -1
- package/modules/venn.src.js +5 -3
- package/modules/windbarb.js +1 -1
- package/modules/windbarb.src.js +44 -44
- package/modules/wordcloud.js +10 -10
- package/modules/wordcloud.js.map +1 -1
- package/modules/wordcloud.src.js +2 -1
- package/modules/xrange.js +12 -12
- package/modules/xrange.js.map +1 -1
- package/modules/xrange.src.js +113 -105
- package/package.json +1 -1
- package/themes/avocado.js +21 -37
- package/themes/avocado.src.js +1 -1
- package/themes/dark-blue.js +1 -1
- package/themes/dark-blue.src.js +1 -1
- package/themes/dark-green.js +1 -1
- package/themes/dark-green.src.js +1 -1
- package/themes/dark-unica.js +1 -1
- package/themes/dark-unica.src.js +1 -1
- package/themes/gray.js +1 -1
- package/themes/gray.src.js +1 -1
- package/themes/grid-light.js +1 -1
- package/themes/grid-light.src.js +1 -1
- package/themes/grid.js +1 -1
- package/themes/grid.src.js +1 -1
- package/themes/sand-signika.js +1 -1
- package/themes/sand-signika.src.js +1 -1
- package/themes/skies.js +1 -1
- package/themes/skies.src.js +1 -1
- package/themes/sunset.js +21 -37
- package/themes/sunset.src.js +1 -1
- package/.DS_Store +0 -0
- package/es-modules/.DS_Store +0 -0
- package/es-modules/modules/annotations-legacy.src.js +0 -1977
- package/js/.DS_Store +0 -0
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
* (c) 2009-2017 Highsoft, Black Label
|
|
1
|
+
/* *
|
|
3
2
|
*
|
|
4
|
-
*
|
|
5
|
-
|
|
3
|
+
* (c) 2009-2017 Highsoft, Black Label
|
|
4
|
+
*
|
|
5
|
+
* License: www.highcharts.com/license
|
|
6
|
+
*
|
|
7
|
+
* */
|
|
8
|
+
|
|
6
9
|
'use strict';
|
|
10
|
+
|
|
7
11
|
import H from '../parts/Globals.js';
|
|
8
12
|
import '../parts/Utilities.js';
|
|
9
13
|
import '../parts/Chart.js';
|
|
@@ -27,7 +31,8 @@ var merge = H.merge,
|
|
|
27
31
|
pick = H.pick,
|
|
28
32
|
reduce = H.reduce,
|
|
29
33
|
splat = H.splat,
|
|
30
|
-
destroyObjectProperties = H.destroyObjectProperties
|
|
34
|
+
destroyObjectProperties = H.destroyObjectProperties,
|
|
35
|
+
chartProto = H.Chart.prototype;
|
|
31
36
|
|
|
32
37
|
/* *********************************************************************
|
|
33
38
|
*
|
|
@@ -55,8 +60,7 @@ var merge = H.merge,
|
|
|
55
60
|
* existing points or created mock points
|
|
56
61
|
*
|
|
57
62
|
* @class
|
|
58
|
-
* @
|
|
59
|
-
* @mixes Annotation.eventEmitterMixin
|
|
63
|
+
* @name Highcharts.Annotation
|
|
60
64
|
*
|
|
61
65
|
* @param {Highcharts.Chart} chart a chart instance
|
|
62
66
|
* @param {Highcharts.AnnotationsOptions} options the options object
|
|
@@ -74,7 +78,7 @@ var Annotation = H.Annotation = function (chart, options) {
|
|
|
74
78
|
/**
|
|
75
79
|
* The array of points which defines the annotation.
|
|
76
80
|
*
|
|
77
|
-
* @type {Array<
|
|
81
|
+
* @type {Array<Highcharts.Point>}
|
|
78
82
|
*/
|
|
79
83
|
this.points = [];
|
|
80
84
|
|
|
@@ -97,7 +101,7 @@ var Annotation = H.Annotation = function (chart, options) {
|
|
|
97
101
|
/**
|
|
98
102
|
* The array of shapes which belong to the annotation.
|
|
99
103
|
*
|
|
100
|
-
* @type {Array<
|
|
104
|
+
* @type {Array<Annotation.Shape>}
|
|
101
105
|
*/
|
|
102
106
|
this.shapes = [];
|
|
103
107
|
|
|
@@ -166,7 +170,10 @@ merge(
|
|
|
166
170
|
true,
|
|
167
171
|
Annotation.prototype,
|
|
168
172
|
controllableMixin,
|
|
169
|
-
eventEmitterMixin,
|
|
173
|
+
eventEmitterMixin,
|
|
174
|
+
/** @lends Annotation# */
|
|
175
|
+
{
|
|
176
|
+
|
|
170
177
|
/**
|
|
171
178
|
* List of events for `annotation.options.events` that should not be
|
|
172
179
|
* added to `annotation.graphic` but to the `annotation`.
|
|
@@ -174,14 +181,12 @@ merge(
|
|
|
174
181
|
* @type {Array<string>}
|
|
175
182
|
*/
|
|
176
183
|
nonDOMEvents: ['add', 'afterUpdate', 'remove'],
|
|
184
|
+
|
|
177
185
|
/**
|
|
178
186
|
* A basic type of an annotation. It allows to add custom labels
|
|
179
187
|
* or shapes. The items can be tied to points, axis coordinates
|
|
180
188
|
* or chart pixel coordinates.
|
|
181
189
|
*
|
|
182
|
-
* @private
|
|
183
|
-
* @type {Object}
|
|
184
|
-
* @ignore-options base, annotations.crookedLine
|
|
185
190
|
* @sample highcharts/annotations/basic/
|
|
186
191
|
* Basic annotations
|
|
187
192
|
* @sample highcharts/demo/annotations/
|
|
@@ -189,13 +194,25 @@ merge(
|
|
|
189
194
|
* @sample highcharts/css/annotations
|
|
190
195
|
* Styled mode
|
|
191
196
|
* @sample highcharts/annotations-advanced/controllable
|
|
192
|
-
*
|
|
197
|
+
* Controllable items
|
|
193
198
|
* @sample {highstock} stock/annotations/fibonacci-retracements
|
|
194
199
|
* Custom annotation, Fibonacci retracement
|
|
195
|
-
*
|
|
196
|
-
* @
|
|
200
|
+
*
|
|
201
|
+
* @type {Array<*>}
|
|
202
|
+
* @since 6.0.0
|
|
203
|
+
* @optionparent annotations
|
|
197
204
|
*/
|
|
198
205
|
defaultOptions: {
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Sets an ID for an annotation. Can be user later when removing an
|
|
209
|
+
* annotation in [Chart#removeAnnotation(id)](
|
|
210
|
+
* /class-reference/Highcharts.Chart#removeAnnotation) method.
|
|
211
|
+
*
|
|
212
|
+
* @type {string}
|
|
213
|
+
* @apioption annotations.id
|
|
214
|
+
*/
|
|
215
|
+
|
|
199
216
|
/**
|
|
200
217
|
* Whether the annotation is visible.
|
|
201
218
|
*
|
|
@@ -208,7 +225,10 @@ merge(
|
|
|
208
225
|
* Allow an annotation to be draggable by a user. Possible
|
|
209
226
|
* values are `"x"`, `"xy"`, `"y"` and `""` (disabled).
|
|
210
227
|
*
|
|
211
|
-
* @
|
|
228
|
+
* @sample highcharts/annotations/draggable/
|
|
229
|
+
* Annotations draggable: 'xy'
|
|
230
|
+
*
|
|
231
|
+
* @type {string}
|
|
212
232
|
* @validvalue ["x", "xy", "y", ""]
|
|
213
233
|
*/
|
|
214
234
|
draggable: 'xy',
|
|
@@ -244,18 +264,20 @@ merge(
|
|
|
244
264
|
/**
|
|
245
265
|
* The background color or gradient for the annotation's label.
|
|
246
266
|
*
|
|
247
|
-
* @type {Color}
|
|
248
267
|
* @sample highcharts/annotations/label-presentation/
|
|
249
268
|
* Set labels graphic options
|
|
269
|
+
*
|
|
270
|
+
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
250
271
|
*/
|
|
251
272
|
backgroundColor: 'rgba(0, 0, 0, 0.75)',
|
|
252
273
|
|
|
253
274
|
/**
|
|
254
275
|
* The border color for the annotation's label.
|
|
255
276
|
*
|
|
256
|
-
* @type {Color}
|
|
257
277
|
* @sample highcharts/annotations/label-presentation/
|
|
258
278
|
* Set labels graphic options
|
|
279
|
+
*
|
|
280
|
+
* @type {Highcharts.ColorString}
|
|
259
281
|
*/
|
|
260
282
|
borderColor: 'black',
|
|
261
283
|
|
|
@@ -280,6 +302,7 @@ merge(
|
|
|
280
302
|
*
|
|
281
303
|
* @sample highcharts/css/annotations
|
|
282
304
|
* Styled mode annotations
|
|
305
|
+
*
|
|
283
306
|
* @since 6.0.5
|
|
284
307
|
*/
|
|
285
308
|
className: '',
|
|
@@ -296,67 +319,70 @@ merge(
|
|
|
296
319
|
/**
|
|
297
320
|
* The label's pixel distance from the point.
|
|
298
321
|
*
|
|
299
|
-
* @type {number}
|
|
300
322
|
* @sample highcharts/annotations/label-position/
|
|
301
323
|
* Set labels position
|
|
302
|
-
*
|
|
303
|
-
* @
|
|
324
|
+
*
|
|
325
|
+
* @type {number}
|
|
326
|
+
* @apioption annotations.labelOptions.distance
|
|
304
327
|
*/
|
|
305
328
|
|
|
306
329
|
/**
|
|
307
|
-
* A
|
|
330
|
+
* A
|
|
331
|
+
* [format](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)
|
|
332
|
+
* string for the data label.
|
|
333
|
+
*
|
|
334
|
+
* @see [plotOptions.series.dataLabels.format](plotOptions.series.dataLabels.format.html)
|
|
308
335
|
*
|
|
309
|
-
* @type {string}
|
|
310
|
-
* @see [plotOptions.series.dataLabels.format](
|
|
311
|
-
* plotOptions.series.dataLabels.format.html)
|
|
312
336
|
* @sample highcharts/annotations/label-text/
|
|
313
337
|
* Set labels text
|
|
314
|
-
*
|
|
315
|
-
* @
|
|
338
|
+
*
|
|
339
|
+
* @type {string}
|
|
340
|
+
* @apioption annotations.labelOptions.format
|
|
316
341
|
*/
|
|
317
342
|
|
|
318
343
|
/**
|
|
319
344
|
* Alias for the format option.
|
|
320
345
|
*
|
|
321
|
-
* @type {string}
|
|
322
346
|
* @see [format](annotations.labelOptions.format.html)
|
|
347
|
+
*
|
|
323
348
|
* @sample highcharts/annotations/label-text/
|
|
324
349
|
* Set labels text
|
|
325
|
-
*
|
|
326
|
-
* @
|
|
350
|
+
*
|
|
351
|
+
* @type {string}
|
|
352
|
+
* @apioption annotations.labelOptions.text
|
|
327
353
|
*/
|
|
328
354
|
|
|
329
355
|
/**
|
|
330
|
-
* Callback JavaScript function to format
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
*
|
|
356
|
+
* Callback JavaScript function to format the annotation's
|
|
357
|
+
* label. Note that if a `format` or `text` are defined, the
|
|
358
|
+
* format or text take precedence and the formatter is ignored.
|
|
359
|
+
* `This` refers to a point object.
|
|
334
360
|
*
|
|
335
|
-
* @type {function}
|
|
336
361
|
* @sample highcharts/annotations/label-text/
|
|
337
362
|
* Set labels text
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
* }
|
|
363
|
+
*
|
|
364
|
+
* @type {Highcharts.FormatterCallbackFunction<Highcharts.Point>}
|
|
365
|
+
* @default function () { return defined(this.y) ? this.y : 'Annotation label'; }
|
|
341
366
|
*/
|
|
342
367
|
formatter: function () {
|
|
343
368
|
return defined(this.y) ? this.y : 'Annotation label';
|
|
344
369
|
},
|
|
345
370
|
|
|
346
371
|
/**
|
|
347
|
-
* How to handle the annotation's label that flow
|
|
348
|
-
*
|
|
349
|
-
*
|
|
372
|
+
* How to handle the annotation's label that flow outside the
|
|
373
|
+
* plot area. The justify option aligns the label inside the
|
|
374
|
+
* plot area.
|
|
350
375
|
*
|
|
351
|
-
* @validvalue ["allow", "justify"]
|
|
352
376
|
* @sample highcharts/annotations/label-crop-overflow/
|
|
353
377
|
* Crop or justify labels
|
|
378
|
+
*
|
|
379
|
+
* @validvalue ["allow", "justify"]
|
|
354
380
|
*/
|
|
355
381
|
overflow: 'justify',
|
|
356
382
|
|
|
357
383
|
/**
|
|
358
384
|
* When either the borderWidth or the backgroundColor is set,
|
|
359
|
-
* this
|
|
385
|
+
* this is the padding within the box.
|
|
360
386
|
*
|
|
361
387
|
* @sample highcharts/annotations/label-presentation/
|
|
362
388
|
* Set labels graphic options
|
|
@@ -364,13 +390,14 @@ merge(
|
|
|
364
390
|
padding: 5,
|
|
365
391
|
|
|
366
392
|
/**
|
|
367
|
-
* The shadow of the box. The shadow can be
|
|
368
|
-
*
|
|
369
|
-
* `
|
|
393
|
+
* The shadow of the box. The shadow can be an object
|
|
394
|
+
* configuration containing `color`, `offsetX`, `offsetY`,
|
|
395
|
+
* `opacity` and `width`.
|
|
370
396
|
*
|
|
371
|
-
* @type {Boolean|Object}
|
|
372
397
|
* @sample highcharts/annotations/label-presentation/
|
|
373
398
|
* Set labels graphic options
|
|
399
|
+
*
|
|
400
|
+
* @type {boolean|Highcharts.ShadowOptionsObject}
|
|
374
401
|
*/
|
|
375
402
|
shadow: false,
|
|
376
403
|
|
|
@@ -378,7 +405,6 @@ merge(
|
|
|
378
405
|
* The name of a symbol to use for the border around the label.
|
|
379
406
|
* Symbols are predefined functions on the Renderer object.
|
|
380
407
|
*
|
|
381
|
-
* @type {string}
|
|
382
408
|
* @sample highcharts/annotations/shapes/
|
|
383
409
|
* Available shapes for labels
|
|
384
410
|
*/
|
|
@@ -387,24 +413,25 @@ merge(
|
|
|
387
413
|
/**
|
|
388
414
|
* Styles for the annotation's label.
|
|
389
415
|
*
|
|
390
|
-
* @
|
|
416
|
+
* @see [plotOptions.series.dataLabels.style](plotOptions.series.dataLabels.style.html)
|
|
417
|
+
*
|
|
391
418
|
* @sample highcharts/annotations/label-presentation/
|
|
392
419
|
* Set labels graphic options
|
|
393
|
-
*
|
|
394
|
-
*
|
|
420
|
+
*
|
|
421
|
+
* @type {Highcharts.CSSObject}
|
|
395
422
|
*/
|
|
396
423
|
style: {
|
|
424
|
+
/** @ignore */
|
|
397
425
|
fontSize: '11px',
|
|
426
|
+
/** @ignore */
|
|
398
427
|
fontWeight: 'normal',
|
|
428
|
+
/** @ignore */
|
|
399
429
|
color: 'contrast'
|
|
400
430
|
},
|
|
401
431
|
|
|
402
432
|
/**
|
|
403
|
-
* Whether to [use HTML](
|
|
433
|
+
* Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)
|
|
404
434
|
* to render the annotation's label.
|
|
405
|
-
*
|
|
406
|
-
* @type {boolean}
|
|
407
|
-
* @default false
|
|
408
435
|
*/
|
|
409
436
|
useHTML: false,
|
|
410
437
|
|
|
@@ -444,60 +471,58 @@ merge(
|
|
|
444
471
|
* multiple labels, they can be added to the
|
|
445
472
|
* [labelOptions](annotations.labelOptions.html).
|
|
446
473
|
*
|
|
447
|
-
* @type
|
|
448
|
-
* @extends
|
|
449
|
-
* @apioption annotations.
|
|
474
|
+
* @type {Array<*>}
|
|
475
|
+
* @extends annotations.labelOptions
|
|
476
|
+
* @apioption annotations.labels
|
|
450
477
|
*/
|
|
451
478
|
|
|
452
479
|
/**
|
|
453
|
-
* This option defines the point to which the label
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
*
|
|
457
|
-
* properies and optionally axes.
|
|
480
|
+
* This option defines the point to which the label will be
|
|
481
|
+
* connected. It can be either the point which exists in the
|
|
482
|
+
* series - it is referenced by the point's id - or a new point with
|
|
483
|
+
* defined x, y properties and optionally axes.
|
|
458
484
|
*
|
|
459
|
-
* @type {string|MockPointOptions}
|
|
460
485
|
* @sample highcharts/annotations/mock-point/
|
|
461
486
|
* Attach annotation to a mock point
|
|
462
|
-
*
|
|
487
|
+
*
|
|
488
|
+
* @type {string|Highcharts.MockPointOptionsObject}
|
|
489
|
+
* @apioption annotations.labels.point
|
|
463
490
|
*/
|
|
464
491
|
|
|
465
492
|
/**
|
|
466
493
|
* The x position of the point. Units can be either in axis
|
|
467
494
|
* or chart pixel coordinates.
|
|
468
495
|
*
|
|
469
|
-
* @type
|
|
470
|
-
* @apioption annotations.
|
|
496
|
+
* @type {number}
|
|
497
|
+
* @apioption annotations.labels.point.x
|
|
471
498
|
*/
|
|
472
499
|
|
|
473
500
|
/**
|
|
474
501
|
* The y position of the point. Units can be either in axis
|
|
475
502
|
* or chart pixel coordinates.
|
|
476
503
|
*
|
|
477
|
-
* @type
|
|
478
|
-
* @apioption annotations.
|
|
504
|
+
* @type {number}
|
|
505
|
+
* @apioption annotations.labels.point.y
|
|
479
506
|
*/
|
|
480
507
|
|
|
481
508
|
/**
|
|
482
|
-
* This number defines which xAxis the point is connected to.
|
|
483
|
-
*
|
|
484
|
-
*
|
|
485
|
-
* the
|
|
486
|
-
* x coordinate refers to the chart pixels.
|
|
509
|
+
* This number defines which xAxis the point is connected to. It
|
|
510
|
+
* refers to either the axis id or the index of the axis in the
|
|
511
|
+
* xAxis array. If the option is not configured or the axis is not
|
|
512
|
+
* found the point's x coordinate refers to the chart pixels.
|
|
487
513
|
*
|
|
488
|
-
* @type
|
|
489
|
-
* @apioption annotations.
|
|
514
|
+
* @type {number|string}
|
|
515
|
+
* @apioption annotations.labels.point.xAxis
|
|
490
516
|
*/
|
|
491
517
|
|
|
492
518
|
/**
|
|
493
|
-
* This number defines which yAxis the point is connected to.
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
* the
|
|
497
|
-
* y coordinate refers to the chart pixels.
|
|
519
|
+
* This number defines which yAxis the point is connected to. It
|
|
520
|
+
* refers to either the axis id or the index of the axis in the
|
|
521
|
+
* yAxis array. If the option is not configured or the axis is not
|
|
522
|
+
* found the point's y coordinate refers to the chart pixels.
|
|
498
523
|
*
|
|
499
|
-
* @type
|
|
500
|
-
* @apioption annotations.
|
|
524
|
+
* @type {number|string}
|
|
525
|
+
* @apioption annotations.labels.point.yAxis
|
|
501
526
|
*/
|
|
502
527
|
|
|
503
528
|
|
|
@@ -506,119 +531,126 @@ merge(
|
|
|
506
531
|
* multiple shapes, then can be added to the
|
|
507
532
|
* [shapeOptions](annotations.shapeOptions.html).
|
|
508
533
|
*
|
|
509
|
-
* @type
|
|
510
|
-
* @extends
|
|
511
|
-
* @apioption annotations.
|
|
534
|
+
* @type {Array<*>}
|
|
535
|
+
* @extends annotations.shapeOptions
|
|
536
|
+
* @apioption annotations.shapes
|
|
512
537
|
*/
|
|
513
538
|
|
|
514
539
|
/**
|
|
515
540
|
* This option defines the point to which the shape will be
|
|
516
|
-
* connected.
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
* properties and optionally axes.
|
|
541
|
+
* connected. It can be either the point which exists in the
|
|
542
|
+
* series - it is referenced by the point's id - or a new point with
|
|
543
|
+
* defined x, y properties and optionally axes.
|
|
520
544
|
*
|
|
521
|
-
* @type
|
|
522
|
-
* @extends
|
|
523
|
-
* @apioption annotations.
|
|
545
|
+
* @type {string|Highcharts.MockPointOptionsObject}
|
|
546
|
+
* @extends annotations.labels.point
|
|
547
|
+
* @apioption annotations.shapes.point
|
|
524
548
|
*/
|
|
525
549
|
|
|
526
550
|
/**
|
|
527
|
-
* An array of points for the shape. This option is available
|
|
528
|
-
*
|
|
529
|
-
*
|
|
551
|
+
* An array of points for the shape. This option is available for
|
|
552
|
+
* shapes which can use multiple points such as path. A point can be
|
|
553
|
+
* either a point object or a point's id.
|
|
530
554
|
*
|
|
531
|
-
* @type {Array<string|Highcharts.MockPoint.Options>}
|
|
532
555
|
* @see [annotations.shapes.point](annotations.shapes.point.html)
|
|
533
|
-
*
|
|
556
|
+
*
|
|
557
|
+
* @type {Array<string|Highcharts.MockPointOptionsObject>}
|
|
558
|
+
* @extends annotations.labels.point
|
|
559
|
+
* @apioption annotations.shapes.points
|
|
534
560
|
*/
|
|
535
561
|
|
|
536
562
|
/**
|
|
537
|
-
* Id of the marker which will be drawn at the final
|
|
538
|
-
*
|
|
539
|
-
* Custom markers can be defined in defs property.
|
|
563
|
+
* Id of the marker which will be drawn at the final vertex of the
|
|
564
|
+
* path. Custom markers can be defined in defs property.
|
|
540
565
|
*
|
|
541
|
-
* @type {string}
|
|
542
566
|
* @see [defs.markers](defs.markers.html)
|
|
567
|
+
*
|
|
543
568
|
* @sample highcharts/annotations/custom-markers/
|
|
544
569
|
* Define a custom marker for annotations
|
|
545
|
-
*
|
|
570
|
+
*
|
|
571
|
+
* @type {string}
|
|
572
|
+
* @apioption annotations.shapes.markerEnd
|
|
546
573
|
*/
|
|
547
574
|
|
|
548
575
|
/**
|
|
549
|
-
* Id of the marker which will be drawn at the first
|
|
550
|
-
*
|
|
551
|
-
* Custom markers can be defined in defs property.
|
|
576
|
+
* Id of the marker which will be drawn at the first vertex of the
|
|
577
|
+
* path. Custom markers can be defined in defs property.
|
|
552
578
|
*
|
|
553
|
-
* @type {string}
|
|
554
579
|
* @see [defs.markers](defs.markers.html)
|
|
580
|
+
*
|
|
555
581
|
* @sample {highcharts} highcharts/annotations/custom-markers/
|
|
556
582
|
* Define a custom marker for annotations
|
|
557
|
-
*
|
|
583
|
+
*
|
|
584
|
+
* @type {string}
|
|
585
|
+
* @apioption annotations.shapes.markerStart
|
|
558
586
|
*/
|
|
559
587
|
|
|
560
588
|
|
|
561
589
|
/**
|
|
562
|
-
* Options for annotation's shapes. Each shape inherits options
|
|
563
|
-
*
|
|
564
|
-
*
|
|
565
|
-
*
|
|
566
|
-
* @type {Object}
|
|
590
|
+
* Options for annotation's shapes. Each shape inherits options from
|
|
591
|
+
* the shapeOptions object. An option from the shapeOptions can be
|
|
592
|
+
* overwritten by config for a specific shape.
|
|
567
593
|
*/
|
|
568
594
|
shapeOptions: {
|
|
595
|
+
|
|
569
596
|
/**
|
|
570
597
|
* The width of the shape.
|
|
571
598
|
*
|
|
572
|
-
* @type {number}
|
|
573
599
|
* @sample highcharts/annotations/shape/
|
|
574
600
|
* Basic shape annotation
|
|
575
|
-
*
|
|
601
|
+
*
|
|
602
|
+
* @type {number}
|
|
603
|
+
* @apioption annotations.shapeOptions.width
|
|
576
604
|
**/
|
|
577
605
|
|
|
578
606
|
/**
|
|
579
607
|
* The height of the shape.
|
|
580
608
|
*
|
|
581
|
-
* @type {number}
|
|
582
609
|
* @sample highcharts/annotations/shape/
|
|
583
610
|
* Basic shape annotation
|
|
584
|
-
*
|
|
611
|
+
*
|
|
612
|
+
* @type {number}
|
|
613
|
+
* @apioption annotations.shapeOptions.height
|
|
585
614
|
*/
|
|
586
615
|
|
|
587
616
|
/**
|
|
588
|
-
* The
|
|
617
|
+
* The type of the shape, e.g. circle or rectangle.
|
|
589
618
|
*
|
|
590
|
-
* @type {Color}
|
|
591
619
|
* @sample highcharts/annotations/shape/
|
|
592
620
|
* Basic shape annotation
|
|
621
|
+
*
|
|
622
|
+
* @type {string}
|
|
623
|
+
* @default 'rect'
|
|
624
|
+
* @apioption annotations.shapeOptions.type
|
|
593
625
|
*/
|
|
594
|
-
stroke: 'rgba(0, 0, 0, 0.75)',
|
|
595
626
|
|
|
596
627
|
/**
|
|
597
|
-
* The
|
|
628
|
+
* The color of the shape's stroke.
|
|
598
629
|
*
|
|
599
630
|
* @sample highcharts/annotations/shape/
|
|
600
631
|
* Basic shape annotation
|
|
632
|
+
*
|
|
633
|
+
* @type {Highcharts.ColorString}
|
|
601
634
|
*/
|
|
602
|
-
|
|
635
|
+
stroke: 'rgba(0, 0, 0, 0.75)',
|
|
603
636
|
|
|
604
637
|
/**
|
|
605
|
-
* The
|
|
638
|
+
* The pixel stroke width of the shape.
|
|
606
639
|
*
|
|
607
|
-
* @type {Color}
|
|
608
640
|
* @sample highcharts/annotations/shape/
|
|
609
641
|
* Basic shape annotation
|
|
610
642
|
*/
|
|
611
|
-
|
|
643
|
+
strokeWidth: 1,
|
|
612
644
|
|
|
613
645
|
/**
|
|
614
|
-
* The
|
|
646
|
+
* The color of the shape's fill.
|
|
615
647
|
*
|
|
616
|
-
* @type {string}
|
|
617
648
|
* @sample highcharts/annotations/shape/
|
|
618
649
|
* Basic shape annotation
|
|
619
|
-
*
|
|
620
|
-
* @
|
|
650
|
+
*
|
|
651
|
+
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
621
652
|
*/
|
|
653
|
+
fill: 'rgba(0, 0, 0, 0.75)',
|
|
622
654
|
|
|
623
655
|
/**
|
|
624
656
|
* The radius of the shape.
|
|
@@ -641,10 +673,16 @@ merge(
|
|
|
641
673
|
* Options from the controlPointOptions can be overwritten
|
|
642
674
|
* by options in a specific control point.
|
|
643
675
|
*
|
|
644
|
-
* @type
|
|
645
|
-
* @apioption annotations.
|
|
676
|
+
* @type {Annotation.ControlPoint.Options}
|
|
677
|
+
* @apioption annotations.controlPointOptions
|
|
646
678
|
*/
|
|
647
679
|
controlPointOptions: {
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* @function {Annotation.ControlPoint.Positioner}
|
|
683
|
+
* @apioption annotations.controlPointOptions.positioner
|
|
684
|
+
*/
|
|
685
|
+
|
|
648
686
|
symbol: 'circle',
|
|
649
687
|
width: 10,
|
|
650
688
|
height: 10,
|
|
@@ -654,57 +692,53 @@ merge(
|
|
|
654
692
|
fill: 'white'
|
|
655
693
|
},
|
|
656
694
|
visible: false,
|
|
657
|
-
|
|
658
|
-
/**
|
|
659
|
-
* @function {Annotation.ControlPoint.Positioner}
|
|
660
|
-
* @apioption annotations.crookedLine.controlPointOptions.positioner
|
|
661
|
-
*/
|
|
662
|
-
|
|
663
|
-
|
|
664
695
|
events: {}
|
|
665
696
|
},
|
|
666
697
|
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* Events available in annotations.
|
|
670
|
-
*
|
|
671
|
-
* @type {Object}
|
|
672
|
-
*/
|
|
673
698
|
/**
|
|
674
699
|
* Event callback when annotation is added to the chart.
|
|
675
700
|
*
|
|
676
|
-
* @
|
|
677
|
-
* @
|
|
701
|
+
* @type {Highcharts.EventCallbackFunction<Highcharts.Annotation>}
|
|
702
|
+
* @since 7.1.0
|
|
703
|
+
* @apioption annotations.events.add
|
|
678
704
|
*/
|
|
705
|
+
|
|
679
706
|
/**
|
|
680
707
|
* Event callback when annotation is updated (e.g. drag and
|
|
681
708
|
* droppped or resized by control points).
|
|
682
709
|
*
|
|
683
|
-
* @
|
|
684
|
-
* @
|
|
710
|
+
* @type {Highcharts.EventCallbackFunction<Highcharts.Annotation>}
|
|
711
|
+
* @since 7.1.0
|
|
712
|
+
* @apioption annotations.events.afterUpdate
|
|
685
713
|
*/
|
|
714
|
+
|
|
686
715
|
/**
|
|
687
716
|
* Event callback when annotation is removed from the chart.
|
|
688
717
|
*
|
|
689
|
-
* @
|
|
690
|
-
* @
|
|
718
|
+
* @type {Highcharts.EventCallbackFunction<Highcharts.Annotation>}
|
|
719
|
+
* @since 7.1.0
|
|
720
|
+
* @apioption annotations.events.remove
|
|
721
|
+
*/
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* Events available in annotations.
|
|
691
725
|
*/
|
|
692
726
|
events: {},
|
|
693
727
|
|
|
694
728
|
/**
|
|
695
729
|
* The Z index of the annotation.
|
|
696
|
-
*
|
|
697
|
-
* @type {number}
|
|
698
|
-
* @default 6
|
|
699
730
|
*/
|
|
700
731
|
zIndex: 6
|
|
732
|
+
|
|
701
733
|
},
|
|
702
734
|
|
|
703
735
|
/**
|
|
704
736
|
* Initialize the annotation.
|
|
705
737
|
*
|
|
706
|
-
* @param {Highcharts.Chart}
|
|
707
|
-
*
|
|
738
|
+
* @param {Highcharts.Chart}
|
|
739
|
+
* The chart
|
|
740
|
+
* @param {Highcharts.AnnotationsOptions}
|
|
741
|
+
* The user options for the annotation
|
|
708
742
|
*/
|
|
709
743
|
init: function () {
|
|
710
744
|
this.linkPoints();
|
|
@@ -953,10 +987,11 @@ merge(
|
|
|
953
987
|
},
|
|
954
988
|
|
|
955
989
|
/**
|
|
956
|
-
* See {@link Highcharts.
|
|
990
|
+
* See {@link Highcharts.Chart#removeAnnotation}.
|
|
957
991
|
*/
|
|
958
992
|
remove: function () {
|
|
959
|
-
|
|
993
|
+
// Let chart.update() remove annoations on demand
|
|
994
|
+
return this.chart.removeAnnotation(this);
|
|
960
995
|
},
|
|
961
996
|
|
|
962
997
|
update: function (userOptions) {
|
|
@@ -992,7 +1027,7 @@ merge(
|
|
|
992
1027
|
* Initialisation of a single shape
|
|
993
1028
|
*
|
|
994
1029
|
* @param {Object} shapeOptions - a confg object for a single shape
|
|
995
|
-
|
|
1030
|
+
*/
|
|
996
1031
|
initShape: function (shapeOptions, index) {
|
|
997
1032
|
var options = merge(
|
|
998
1033
|
this.options.shapeOptions,
|
|
@@ -1104,7 +1139,7 @@ merge(
|
|
|
1104
1139
|
item.destroy();
|
|
1105
1140
|
},
|
|
1106
1141
|
|
|
1107
|
-
|
|
1142
|
+
/**
|
|
1108
1143
|
* @private
|
|
1109
1144
|
*/
|
|
1110
1145
|
renderItem: function (item) {
|
|
@@ -1121,7 +1156,7 @@ merge(
|
|
|
1121
1156
|
* An object uses for mapping between a shape type and a constructor.
|
|
1122
1157
|
* To add a new shape type extend this object with type name as a key
|
|
1123
1158
|
* and a constructor as its value.
|
|
1124
|
-
|
|
1159
|
+
*/
|
|
1125
1160
|
Annotation.shapesMap = {
|
|
1126
1161
|
'rect': ControllableRect,
|
|
1127
1162
|
'circle': ControllableCircle,
|
|
@@ -1161,10 +1196,7 @@ H.extendAnnotation = function (
|
|
|
1161
1196
|
*
|
|
1162
1197
|
******************************************************************** */
|
|
1163
1198
|
|
|
1164
|
-
|
|
1165
|
-
H.Chart.prototype.collectionsWithUpdate.push('annotations');
|
|
1166
|
-
|
|
1167
|
-
H.extend(H.Chart.prototype, /** @lends Highcharts.Chart# */ {
|
|
1199
|
+
H.extend(chartProto, /** @lends Highcharts.Chart# */ {
|
|
1168
1200
|
initAnnotation: function (userOptions) {
|
|
1169
1201
|
var Constructor =
|
|
1170
1202
|
Annotation.types[userOptions.type] || Annotation,
|
|
@@ -1232,8 +1264,13 @@ H.extend(H.Chart.prototype, /** @lends Highcharts.Chart# */ {
|
|
|
1232
1264
|
}
|
|
1233
1265
|
});
|
|
1234
1266
|
|
|
1267
|
+
// Let chart.update() update annotations
|
|
1268
|
+
chartProto.collectionsWithUpdate.push('annotations');
|
|
1269
|
+
|
|
1270
|
+
// Let chart.update() create annoations on demand
|
|
1271
|
+
chartProto.collectionsWithInit.annotations = [chartProto.addAnnotation];
|
|
1235
1272
|
|
|
1236
|
-
|
|
1273
|
+
chartProto.callbacks.push(function (chart) {
|
|
1237
1274
|
chart.annotations = [];
|
|
1238
1275
|
|
|
1239
1276
|
if (!chart.options.annotations) {
|