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,80 +1,68 @@
|
|
|
1
1
|
/* *
|
|
2
|
-
* (c) 2010-2019 Torstein Honsi
|
|
3
2
|
*
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
* (c) 2010-2019 Torstein Honsi
|
|
4
|
+
*
|
|
5
|
+
* License: www.highcharts.com/license
|
|
6
|
+
*
|
|
7
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
8
|
+
*
|
|
9
|
+
* */
|
|
10
|
+
'use strict';
|
|
11
|
+
import Highcharts from './Globals.js';
|
|
7
12
|
/**
|
|
8
13
|
* Configuration hash for the data label and tooltip formatters.
|
|
9
14
|
*
|
|
10
15
|
* @interface Highcharts.PointLabelObject
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
16
|
+
*/ /**
|
|
17
|
+
* The point's current color.
|
|
18
|
+
* @name Highcharts.PointLabelObject#color
|
|
19
|
+
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
20
|
+
*/ /**
|
|
21
|
+
* The point's current color index, used in styled mode instead of `color`. The
|
|
22
|
+
* color index is inserted in class names used for styling.
|
|
23
|
+
* @name Highcharts.PointLabelObject#colorIndex
|
|
24
|
+
* @type {number}
|
|
25
|
+
*/ /**
|
|
26
|
+
* The name of the related point.
|
|
27
|
+
* @name Highcharts.PointLabelObject#key
|
|
28
|
+
* @type {number|string}
|
|
29
|
+
*/ /**
|
|
30
|
+
* The percentage for related points in a stacked series or pies.
|
|
31
|
+
* @name Highcharts.PointLabelObject#percentage
|
|
32
|
+
* @type {number}
|
|
33
|
+
*/ /**
|
|
34
|
+
* The related point.
|
|
35
|
+
* @name Highcharts.PointLabelObject#point
|
|
36
|
+
* @type {Highcharts.Point}
|
|
37
|
+
*/ /**
|
|
38
|
+
* The related series.
|
|
39
|
+
* @name Highcharts.PointLabelObject#series
|
|
40
|
+
* @type {Highcharts.Series}
|
|
41
|
+
*/ /**
|
|
42
|
+
* The total of values in either a stack for stacked series, or a pie in a pie
|
|
43
|
+
* series.
|
|
44
|
+
* @name Highcharts.PointLabelObject#total
|
|
45
|
+
* @type {number}
|
|
46
|
+
*/ /**
|
|
47
|
+
* For categorized axes this property holds the category name for the point. For
|
|
48
|
+
* other axes it holds the X value.
|
|
49
|
+
* @name Highcharts.PointLabelObject#x
|
|
50
|
+
* @type {number|string}
|
|
51
|
+
*/ /**
|
|
52
|
+
* The y value of the point.
|
|
53
|
+
* @name Highcharts.PointLabelObject#y
|
|
54
|
+
* @type {number|undefined}
|
|
55
|
+
*/
|
|
52
56
|
/**
|
|
53
57
|
* @interface Highcharts.PointObject
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
'use strict';
|
|
61
|
-
|
|
62
|
-
import Highcharts from './Globals.js';
|
|
58
|
+
*/ /**
|
|
59
|
+
* Custom properties set by custom data options.
|
|
60
|
+
* @name Highcharts.Point#[property:string]
|
|
61
|
+
* @type {*}
|
|
62
|
+
*/
|
|
63
63
|
import './Utilities.js';
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
H = Highcharts,
|
|
67
|
-
extend = H.extend,
|
|
68
|
-
erase = H.erase,
|
|
69
|
-
fireEvent = H.fireEvent,
|
|
70
|
-
format = H.format,
|
|
71
|
-
isArray = H.isArray,
|
|
72
|
-
isNumber = H.isNumber,
|
|
73
|
-
pick = H.pick,
|
|
74
|
-
uniqueKey = H.uniqueKey,
|
|
75
|
-
defined = H.defined,
|
|
76
|
-
removeEvent = H.removeEvent;
|
|
77
|
-
|
|
64
|
+
var Point, H = Highcharts, extend = H.extend, erase = H.erase, fireEvent = H.fireEvent, format = H.format, isArray = H.isArray, isNumber = H.isNumber, pick = H.pick, uniqueKey = H.uniqueKey, defined = H.defined, removeEvent = H.removeEvent;
|
|
65
|
+
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
78
66
|
/**
|
|
79
67
|
* The Point object. The point objects are generated from the `series.data`
|
|
80
68
|
* configuration objects or raw numbers. They can be accessed from the
|
|
@@ -85,9 +73,8 @@ var Point,
|
|
|
85
73
|
* @name Highcharts.Point
|
|
86
74
|
* @implements {Highcharts.PointObject}
|
|
87
75
|
*/
|
|
88
|
-
Highcharts.Point = Point = function () {};
|
|
76
|
+
Highcharts.Point = Point = function () { };
|
|
89
77
|
Highcharts.Point.prototype = {
|
|
90
|
-
|
|
91
78
|
/**
|
|
92
79
|
* Initialize the point. Called internally based on the `series.data`
|
|
93
80
|
* option.
|
|
@@ -97,7 +84,7 @@ Highcharts.Point.prototype = {
|
|
|
97
84
|
* @param {Highcharts.Series} series
|
|
98
85
|
* The series object containing this point.
|
|
99
86
|
*
|
|
100
|
-
* @param {number|object|Array<number|string>|null} options
|
|
87
|
+
* @param {number|object|Array<(number|string)>|null} options
|
|
101
88
|
* The data in either number, array or object format.
|
|
102
89
|
*
|
|
103
90
|
* @param {number} [x]
|
|
@@ -109,7 +96,6 @@ Highcharts.Point.prototype = {
|
|
|
109
96
|
* @fires Highcharts.Point#event:afterInit
|
|
110
97
|
*/
|
|
111
98
|
init: function (series, options, x) {
|
|
112
|
-
|
|
113
99
|
/**
|
|
114
100
|
* The series object associated with the point.
|
|
115
101
|
*
|
|
@@ -117,29 +103,21 @@ Highcharts.Point.prototype = {
|
|
|
117
103
|
* @type {Highcharts.Series}
|
|
118
104
|
*/
|
|
119
105
|
this.series = series;
|
|
120
|
-
|
|
121
106
|
this.applyOptions(options, x);
|
|
122
|
-
|
|
123
107
|
// Add a unique ID to the point if none is assigned
|
|
124
108
|
this.id = defined(this.id) ? this.id : uniqueKey();
|
|
125
|
-
|
|
126
109
|
this.resolveColor();
|
|
127
|
-
|
|
128
110
|
series.chart.pointCount++;
|
|
129
|
-
|
|
130
111
|
fireEvent(this, 'afterInit');
|
|
131
|
-
|
|
132
112
|
return this;
|
|
133
113
|
},
|
|
134
|
-
|
|
114
|
+
/**
|
|
115
|
+
* @private
|
|
116
|
+
* @function Highcharts.Point#resolveColor
|
|
117
|
+
* @return {void}
|
|
118
|
+
*/
|
|
135
119
|
resolveColor: function () {
|
|
136
|
-
var series = this.series,
|
|
137
|
-
colors,
|
|
138
|
-
optionsChart = series.chart.options.chart,
|
|
139
|
-
colorCount = optionsChart.colorCount,
|
|
140
|
-
styledMode = series.chart.styledMode,
|
|
141
|
-
colorIndex;
|
|
142
|
-
|
|
120
|
+
var series = this.series, colors, optionsChart = series.chart.options.chart, colorCount = optionsChart.colorCount, styledMode = series.chart.styledMode, colorIndex;
|
|
143
121
|
/**
|
|
144
122
|
* The point's current color.
|
|
145
123
|
*
|
|
@@ -149,7 +127,6 @@ Highcharts.Point.prototype = {
|
|
|
149
127
|
if (!styledMode && !this.options.color) {
|
|
150
128
|
this.color = series.color; // #3445
|
|
151
129
|
}
|
|
152
|
-
|
|
153
130
|
if (series.options.colorByPoint) {
|
|
154
131
|
if (!styledMode) {
|
|
155
132
|
colors = series.options.colors || series.chart.options.colors;
|
|
@@ -162,10 +139,10 @@ Highcharts.Point.prototype = {
|
|
|
162
139
|
if (series.colorCounter === colorCount) {
|
|
163
140
|
series.colorCounter = 0;
|
|
164
141
|
}
|
|
165
|
-
}
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
166
144
|
colorIndex = series.colorIndex;
|
|
167
145
|
}
|
|
168
|
-
|
|
169
146
|
/**
|
|
170
147
|
* The point's current color index, used in styled mode instead of
|
|
171
148
|
* `color`. The color index is inserted in class names used for styling.
|
|
@@ -175,7 +152,6 @@ Highcharts.Point.prototype = {
|
|
|
175
152
|
*/
|
|
176
153
|
this.colorIndex = pick(this.colorIndex, colorIndex);
|
|
177
154
|
},
|
|
178
|
-
|
|
179
155
|
/**
|
|
180
156
|
* Apply the options containing the x and y data and possible some extra
|
|
181
157
|
* properties. Called on point init or from point.update.
|
|
@@ -183,7 +159,7 @@ Highcharts.Point.prototype = {
|
|
|
183
159
|
* @private
|
|
184
160
|
* @function Highcharts.Point#applyOptions
|
|
185
161
|
*
|
|
186
|
-
* @param {number|
|
|
162
|
+
* @param {number|Highcharts.Dictionary<any>|Array<(number|string)>|null} options
|
|
187
163
|
* The point options as defined in series.data.
|
|
188
164
|
*
|
|
189
165
|
* @param {number} [x]
|
|
@@ -193,15 +169,10 @@ Highcharts.Point.prototype = {
|
|
|
193
169
|
* The Point instance.
|
|
194
170
|
*/
|
|
195
171
|
applyOptions: function (options, x) {
|
|
196
|
-
var point = this,
|
|
197
|
-
series = point.series,
|
|
198
|
-
pointValKey = series.options.pointValKey || series.pointValKey;
|
|
199
|
-
|
|
172
|
+
var point = this, series = point.series, pointValKey = series.options.pointValKey || series.pointValKey;
|
|
200
173
|
options = Point.prototype.optionsToObject.call(this, options);
|
|
201
|
-
|
|
202
174
|
// copy options directly to point
|
|
203
175
|
extend(point, options);
|
|
204
|
-
|
|
205
176
|
/**
|
|
206
177
|
* The point's options as applied in the initial configuration, or
|
|
207
178
|
* extended through `Point.update`.
|
|
@@ -211,7 +182,6 @@ Highcharts.Point.prototype = {
|
|
|
211
182
|
point.options = point.options ?
|
|
212
183
|
extend(point.options, options) :
|
|
213
184
|
options;
|
|
214
|
-
|
|
215
185
|
// Since options are copied into the Point instance, some accidental
|
|
216
186
|
// options must be shielded (#5681)
|
|
217
187
|
if (options.group) {
|
|
@@ -220,7 +190,6 @@ Highcharts.Point.prototype = {
|
|
|
220
190
|
if (options.dataLabels) {
|
|
221
191
|
delete point.dataLabels;
|
|
222
192
|
}
|
|
223
|
-
|
|
224
193
|
/**
|
|
225
194
|
* The y value of the point.
|
|
226
195
|
* @name Highcharts.Point#y
|
|
@@ -231,20 +200,14 @@ Highcharts.Point.prototype = {
|
|
|
231
200
|
if (pointValKey) {
|
|
232
201
|
point.y = point[pointValKey];
|
|
233
202
|
}
|
|
234
|
-
point.isNull = pick(
|
|
235
|
-
point.isValid && !point.isValid(),
|
|
236
|
-
point.x === null || !isNumber(point.y, true)
|
|
237
|
-
); // #3571, check for NaN
|
|
238
|
-
|
|
203
|
+
point.isNull = pick(point.isValid && !point.isValid(), point.x === null || !isNumber(point.y, true)); // #3571, check for NaN
|
|
239
204
|
if (point.isNull) { // #9233
|
|
240
205
|
point.formatPrefix = 'null';
|
|
241
206
|
}
|
|
242
|
-
|
|
243
207
|
// The point is initially selected by options (#5777)
|
|
244
208
|
if (point.selected) {
|
|
245
209
|
point.state = 'select';
|
|
246
210
|
}
|
|
247
|
-
|
|
248
211
|
/**
|
|
249
212
|
* The x value of the point.
|
|
250
213
|
* @name Highcharts.Point#x
|
|
@@ -253,33 +216,30 @@ Highcharts.Point.prototype = {
|
|
|
253
216
|
// If no x is set by now, get auto incremented value. All points must
|
|
254
217
|
// have an x value, however the y value can be null to create a gap in
|
|
255
218
|
// the series
|
|
256
|
-
if (
|
|
257
|
-
'name' in point &&
|
|
219
|
+
if ('name' in point &&
|
|
258
220
|
x === undefined &&
|
|
259
221
|
series.xAxis &&
|
|
260
|
-
series.xAxis.hasNames
|
|
261
|
-
) {
|
|
222
|
+
series.xAxis.hasNames) {
|
|
262
223
|
point.x = series.xAxis.nameToX(point);
|
|
263
224
|
}
|
|
264
225
|
if (point.x === undefined && series) {
|
|
265
226
|
if (x === undefined) {
|
|
266
227
|
point.x = series.autoIncrement(point);
|
|
267
|
-
}
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
268
230
|
point.x = x;
|
|
269
231
|
}
|
|
270
232
|
}
|
|
271
|
-
|
|
272
233
|
return point;
|
|
273
234
|
},
|
|
274
|
-
|
|
275
235
|
/**
|
|
276
236
|
* Set a value in an object, on the property defined by key. The key
|
|
277
237
|
* supports nested properties using dot notation. The function modifies the
|
|
278
238
|
* input object and does not make a copy.
|
|
279
239
|
*
|
|
280
|
-
* @function Highcharts.Point#setNestedProperty
|
|
240
|
+
* @function Highcharts.Point#setNestedProperty<T>
|
|
281
241
|
*
|
|
282
|
-
* @param {
|
|
242
|
+
* @param {T} object
|
|
283
243
|
* The object to set the value on.
|
|
284
244
|
*
|
|
285
245
|
* @param {*} value
|
|
@@ -288,60 +248,50 @@ Highcharts.Point.prototype = {
|
|
|
288
248
|
* @param {string} key
|
|
289
249
|
* Key to the property to set.
|
|
290
250
|
*
|
|
291
|
-
* @return {
|
|
251
|
+
* @return {T}
|
|
292
252
|
* The modified object.
|
|
293
253
|
*/
|
|
294
254
|
setNestedProperty: function (object, value, key) {
|
|
295
255
|
var nestedKeys = key.split('.');
|
|
296
|
-
|
|
297
256
|
nestedKeys.reduce(function (result, key, i, arr) {
|
|
298
257
|
var isLastKey = arr.length - 1 === i;
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
);
|
|
258
|
+
result[key] = (isLastKey ?
|
|
259
|
+
value :
|
|
260
|
+
H.isObject(result[key], true) ?
|
|
261
|
+
result[key] :
|
|
262
|
+
{});
|
|
305
263
|
return result[key];
|
|
306
264
|
}, object);
|
|
307
265
|
return object;
|
|
308
266
|
},
|
|
309
|
-
|
|
310
267
|
/**
|
|
311
|
-
* Transform number or array configs into objects.
|
|
312
|
-
* the different configuration formats for
|
|
313
|
-
* number `10` in a line series will be
|
|
314
|
-
* array config like `[1, 10]` in a
|
|
315
|
-
* `{ x: 1, y: 10 }`.
|
|
268
|
+
* Transform number or array configs into objects. Also called for object
|
|
269
|
+
* configs. Used internally to unify the different configuration formats for
|
|
270
|
+
* points. For example, a simple number `10` in a line series will be
|
|
271
|
+
* transformed to `{ y: 10 }`, and an array config like `[1, 10]` in a
|
|
272
|
+
* scatter series will be transformed to `{ x: 1, y: 10 }`.
|
|
316
273
|
*
|
|
317
274
|
* @function Highcharts.Point#optionsToObject
|
|
318
275
|
*
|
|
319
|
-
* @param {number|
|
|
276
|
+
* @param {number|Highcharts.Dictionary<*>|Array<number|string>|null} options
|
|
320
277
|
* The input option.
|
|
321
278
|
*
|
|
322
|
-
* @return {
|
|
279
|
+
* @return {Highcharts.Dictionary<*>}
|
|
323
280
|
* Transformed options.
|
|
324
281
|
*/
|
|
325
282
|
optionsToObject: function (options) {
|
|
326
|
-
var ret = {},
|
|
327
|
-
series = this.series,
|
|
328
|
-
keys = series.options.keys,
|
|
329
|
-
pointArrayMap = keys || series.pointArrayMap || ['y'],
|
|
330
|
-
valueCount = pointArrayMap.length,
|
|
331
|
-
firstItemType,
|
|
332
|
-
i = 0,
|
|
333
|
-
j = 0;
|
|
334
|
-
|
|
283
|
+
var ret = {}, series = this.series, keys = series.options.keys, pointArrayMap = keys || series.pointArrayMap || ['y'], valueCount = pointArrayMap.length, firstItemType, i = 0, j = 0;
|
|
335
284
|
if (isNumber(options) || options === null) {
|
|
336
285
|
ret[pointArrayMap[0]] = options;
|
|
337
|
-
|
|
338
|
-
|
|
286
|
+
}
|
|
287
|
+
else if (isArray(options)) {
|
|
339
288
|
// with leading x value
|
|
340
289
|
if (!keys && options.length > valueCount) {
|
|
341
290
|
firstItemType = typeof options[0];
|
|
342
291
|
if (firstItemType === 'string') {
|
|
343
292
|
ret.name = options[0];
|
|
344
|
-
}
|
|
293
|
+
}
|
|
294
|
+
else if (firstItemType === 'number') {
|
|
345
295
|
ret.x = options[0];
|
|
346
296
|
}
|
|
347
297
|
i++;
|
|
@@ -352,26 +302,24 @@ Highcharts.Point.prototype = {
|
|
|
352
302
|
if (pointArrayMap[j].indexOf('.') > 0) {
|
|
353
303
|
// Handle nested keys, e.g. ['color.pattern.image']
|
|
354
304
|
// Avoid function call unless necessary.
|
|
355
|
-
H.Point.prototype.setNestedProperty(
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
} else {
|
|
305
|
+
H.Point.prototype.setNestedProperty(ret, options[i], pointArrayMap[j]);
|
|
306
|
+
}
|
|
307
|
+
else {
|
|
359
308
|
ret[pointArrayMap[j]] = options[i];
|
|
360
309
|
}
|
|
361
310
|
}
|
|
362
311
|
i++;
|
|
363
312
|
j++;
|
|
364
313
|
}
|
|
365
|
-
}
|
|
314
|
+
}
|
|
315
|
+
else if (typeof options === 'object') {
|
|
366
316
|
ret = options;
|
|
367
|
-
|
|
368
317
|
// This is the fastest way to detect if there are individual point
|
|
369
318
|
// dataLabels that need to be considered in drawDataLabels. These
|
|
370
319
|
// can only occur in object configs.
|
|
371
320
|
if (options.dataLabels) {
|
|
372
321
|
series._hasPointLabels = true;
|
|
373
322
|
}
|
|
374
|
-
|
|
375
323
|
// Same approach as above for markers
|
|
376
324
|
if (options.marker) {
|
|
377
325
|
series._hasPointMarkers = true;
|
|
@@ -379,7 +327,6 @@ Highcharts.Point.prototype = {
|
|
|
379
327
|
}
|
|
380
328
|
return ret;
|
|
381
329
|
},
|
|
382
|
-
|
|
383
330
|
/**
|
|
384
331
|
* Get the CSS class names for individual points. Used internally where the
|
|
385
332
|
* returned value is set on every point.
|
|
@@ -400,7 +347,6 @@ Highcharts.Point.prototype = {
|
|
|
400
347
|
(this.zone && this.zone.className ? ' ' +
|
|
401
348
|
this.zone.className.replace('highcharts-negative', '') : '');
|
|
402
349
|
},
|
|
403
|
-
|
|
404
350
|
/**
|
|
405
351
|
* In a series with `zones`, return the zone that the point belongs to.
|
|
406
352
|
*
|
|
@@ -410,86 +356,66 @@ Highcharts.Point.prototype = {
|
|
|
410
356
|
* The zone item.
|
|
411
357
|
*/
|
|
412
358
|
getZone: function () {
|
|
413
|
-
var series = this.series,
|
|
414
|
-
zones = series.zones,
|
|
415
|
-
zoneAxis = series.zoneAxis || 'y',
|
|
416
|
-
i = 0,
|
|
417
|
-
zone;
|
|
418
|
-
|
|
359
|
+
var series = this.series, zones = series.zones, zoneAxis = series.zoneAxis || 'y', i = 0, zone;
|
|
419
360
|
zone = zones[i];
|
|
420
361
|
while (this[zoneAxis] >= zone.value) {
|
|
421
362
|
zone = zones[++i];
|
|
422
363
|
}
|
|
423
|
-
|
|
424
364
|
// For resetting or reusing the point (#8100)
|
|
425
365
|
if (!this.nonZonedColor) {
|
|
426
366
|
this.nonZonedColor = this.color;
|
|
427
367
|
}
|
|
428
|
-
|
|
429
368
|
if (zone && zone.color && !this.options.color) {
|
|
430
369
|
this.color = zone.color;
|
|
431
|
-
}
|
|
370
|
+
}
|
|
371
|
+
else {
|
|
432
372
|
this.color = this.nonZonedColor;
|
|
433
373
|
}
|
|
434
|
-
|
|
435
374
|
return zone;
|
|
436
375
|
},
|
|
437
|
-
|
|
438
376
|
/**
|
|
439
377
|
* Destroy a point to clear memory. Its reference still stays in
|
|
440
378
|
* `series.data`.
|
|
441
379
|
*
|
|
442
380
|
* @private
|
|
443
381
|
* @function Highcharts.Point#destroy
|
|
382
|
+
* @return {void}
|
|
444
383
|
*/
|
|
445
384
|
destroy: function () {
|
|
446
|
-
var point = this,
|
|
447
|
-
series = point.series,
|
|
448
|
-
chart = series.chart,
|
|
449
|
-
hoverPoints = chart.hoverPoints,
|
|
450
|
-
prop;
|
|
451
|
-
|
|
385
|
+
var point = this, series = point.series, chart = series.chart, hoverPoints = chart.hoverPoints, prop;
|
|
452
386
|
chart.pointCount--;
|
|
453
|
-
|
|
454
387
|
if (hoverPoints) {
|
|
455
388
|
point.setState();
|
|
456
389
|
erase(hoverPoints, point);
|
|
457
390
|
if (!hoverPoints.length) {
|
|
458
391
|
chart.hoverPoints = null;
|
|
459
392
|
}
|
|
460
|
-
|
|
461
393
|
}
|
|
462
394
|
if (point === chart.hoverPoint) {
|
|
463
395
|
point.onMouseOut();
|
|
464
396
|
}
|
|
465
|
-
|
|
466
397
|
// Remove all events and elements
|
|
467
398
|
if (point.graphic || point.dataLabel || point.dataLabels) {
|
|
468
399
|
removeEvent(point);
|
|
469
400
|
point.destroyElements();
|
|
470
401
|
}
|
|
471
|
-
|
|
472
402
|
if (point.legendItem) { // pies have legend items
|
|
473
403
|
chart.legend.destroyItem(point);
|
|
474
404
|
}
|
|
475
|
-
|
|
476
|
-
for (prop in point) {
|
|
405
|
+
for (prop in point) { // eslint-disable-line guard-for-in
|
|
477
406
|
point[prop] = null;
|
|
478
407
|
}
|
|
479
408
|
},
|
|
480
|
-
|
|
481
409
|
/**
|
|
482
410
|
* Destroy SVG elements associated with the point.
|
|
483
411
|
*
|
|
484
412
|
* @private
|
|
485
413
|
* @function Highcharts.Point#destroyElements
|
|
414
|
+
* @param {Highcharts.Dictionary<number>} [kinds]
|
|
415
|
+
* @return {void}
|
|
486
416
|
*/
|
|
487
417
|
destroyElements: function (kinds) {
|
|
488
|
-
var point = this,
|
|
489
|
-
props = [],
|
|
490
|
-
prop,
|
|
491
|
-
i;
|
|
492
|
-
|
|
418
|
+
var point = this, props = [], prop, i;
|
|
493
419
|
kinds = kinds || { graphic: 1, dataLabel: 1 };
|
|
494
420
|
if (kinds.graphic) {
|
|
495
421
|
props.push('graphic', 'shadowGroup');
|
|
@@ -497,7 +423,6 @@ Highcharts.Point.prototype = {
|
|
|
497
423
|
if (kinds.dataLabel) {
|
|
498
424
|
props.push('dataLabel', 'dataLabelUpper', 'connector');
|
|
499
425
|
}
|
|
500
|
-
|
|
501
426
|
i = props.length;
|
|
502
427
|
while (i--) {
|
|
503
428
|
prop = props[i];
|
|
@@ -505,7 +430,6 @@ Highcharts.Point.prototype = {
|
|
|
505
430
|
point[prop] = point[prop].destroy();
|
|
506
431
|
}
|
|
507
432
|
}
|
|
508
|
-
|
|
509
433
|
['dataLabel', 'connector'].forEach(function (prop) {
|
|
510
434
|
var plural = prop + 's';
|
|
511
435
|
if (kinds[prop] && point[plural]) {
|
|
@@ -518,7 +442,6 @@ Highcharts.Point.prototype = {
|
|
|
518
442
|
}
|
|
519
443
|
});
|
|
520
444
|
},
|
|
521
|
-
|
|
522
445
|
/**
|
|
523
446
|
* Return the configuration hash needed for the data label and tooltip
|
|
524
447
|
* formatters.
|
|
@@ -541,7 +464,6 @@ Highcharts.Point.prototype = {
|
|
|
541
464
|
total: this.total || this.stackTotal
|
|
542
465
|
};
|
|
543
466
|
},
|
|
544
|
-
|
|
545
467
|
/**
|
|
546
468
|
* Extendable method for formatting each point's tooltip line.
|
|
547
469
|
*
|
|
@@ -554,41 +476,26 @@ Highcharts.Point.prototype = {
|
|
|
554
476
|
* A string to be concatenated in to the common tooltip text.
|
|
555
477
|
*/
|
|
556
478
|
tooltipFormatter: function (pointFormat) {
|
|
557
|
-
|
|
558
479
|
// Insert options for valueDecimals, valuePrefix, and valueSuffix
|
|
559
|
-
var series = this.series,
|
|
560
|
-
seriesTooltipOptions = series.tooltipOptions,
|
|
561
|
-
valueDecimals = pick(seriesTooltipOptions.valueDecimals, ''),
|
|
562
|
-
valuePrefix = seriesTooltipOptions.valuePrefix || '',
|
|
563
|
-
valueSuffix = seriesTooltipOptions.valueSuffix || '';
|
|
564
|
-
|
|
480
|
+
var series = this.series, seriesTooltipOptions = series.tooltipOptions, valueDecimals = pick(seriesTooltipOptions.valueDecimals, ''), valuePrefix = seriesTooltipOptions.valuePrefix || '', valueSuffix = seriesTooltipOptions.valueSuffix || '';
|
|
565
481
|
// Replace default point style with class name
|
|
566
482
|
if (series.chart.styledMode) {
|
|
567
483
|
pointFormat = series.chart.tooltip.styledModeFormat(pointFormat);
|
|
568
484
|
}
|
|
569
|
-
|
|
570
485
|
// Loop over the point array map and replace unformatted values with
|
|
571
486
|
// sprintf formatting markup
|
|
572
487
|
(series.pointArrayMap || ['y']).forEach(function (key) {
|
|
573
488
|
key = '{point.' + key; // without the closing bracket
|
|
574
489
|
if (valuePrefix || valueSuffix) {
|
|
575
|
-
pointFormat = pointFormat.replace(
|
|
576
|
-
RegExp(key + '}', 'g'),
|
|
577
|
-
valuePrefix + key + '}' + valueSuffix
|
|
578
|
-
);
|
|
490
|
+
pointFormat = pointFormat.replace(RegExp(key + '}', 'g'), valuePrefix + key + '}' + valueSuffix);
|
|
579
491
|
}
|
|
580
|
-
pointFormat = pointFormat.replace(
|
|
581
|
-
RegExp(key + '}', 'g'),
|
|
582
|
-
key + ':,.' + valueDecimals + 'f}'
|
|
583
|
-
);
|
|
492
|
+
pointFormat = pointFormat.replace(RegExp(key + '}', 'g'), key + ':,.' + valueDecimals + 'f}');
|
|
584
493
|
});
|
|
585
|
-
|
|
586
494
|
return format(pointFormat, {
|
|
587
495
|
point: this,
|
|
588
496
|
series: this.series
|
|
589
497
|
}, series.chart.time);
|
|
590
498
|
},
|
|
591
|
-
|
|
592
499
|
/**
|
|
593
500
|
* Fire an event on the Point object.
|
|
594
501
|
*
|
|
@@ -598,48 +505,35 @@ Highcharts.Point.prototype = {
|
|
|
598
505
|
* @param {string} eventType
|
|
599
506
|
* Type of the event.
|
|
600
507
|
*
|
|
601
|
-
* @param {
|
|
508
|
+
* @param {Highcharts.Dictionary<any>|Event} eventArgs
|
|
602
509
|
* Additional event arguments.
|
|
603
510
|
*
|
|
604
|
-
* @param {Function} defaultFunction
|
|
511
|
+
* @param {Highcharts.EventCallbackFunction<Highcharts.Point>|Function} defaultFunction
|
|
605
512
|
* Default event handler.
|
|
606
513
|
*
|
|
607
514
|
* @fires Highcharts.Point#event:*
|
|
608
515
|
*/
|
|
609
516
|
firePointEvent: function (eventType, eventArgs, defaultFunction) {
|
|
610
|
-
var point = this,
|
|
611
|
-
series = this.series,
|
|
612
|
-
seriesOptions = series.options;
|
|
613
|
-
|
|
517
|
+
var point = this, series = this.series, seriesOptions = series.options;
|
|
614
518
|
// load event handlers on demand to save time on mouseover/out
|
|
615
|
-
if (
|
|
616
|
-
|
|
617
|
-
(
|
|
618
|
-
point.options &&
|
|
519
|
+
if (seriesOptions.point.events[eventType] ||
|
|
520
|
+
(point.options &&
|
|
619
521
|
point.options.events &&
|
|
620
|
-
point.options.events[eventType]
|
|
621
|
-
)
|
|
622
|
-
) {
|
|
522
|
+
point.options.events[eventType])) {
|
|
623
523
|
this.importEvents();
|
|
624
524
|
}
|
|
625
|
-
|
|
626
525
|
// add default handler if in selection mode
|
|
627
526
|
if (eventType === 'click' && seriesOptions.allowPointSelect) {
|
|
628
527
|
defaultFunction = function (event) {
|
|
629
528
|
// Control key is for Windows, meta (= Cmd key) for Mac, Shift
|
|
630
529
|
// for Opera.
|
|
631
530
|
if (point.select) { // #2911
|
|
632
|
-
point.select(
|
|
633
|
-
null,
|
|
634
|
-
event.ctrlKey || event.metaKey || event.shiftKey
|
|
635
|
-
);
|
|
531
|
+
point.select(null, event.ctrlKey || event.metaKey || event.shiftKey);
|
|
636
532
|
}
|
|
637
533
|
};
|
|
638
534
|
}
|
|
639
|
-
|
|
640
535
|
fireEvent(this, eventType, eventArgs, defaultFunction);
|
|
641
536
|
},
|
|
642
|
-
|
|
643
537
|
/**
|
|
644
538
|
* For categorized axes this property holds the category name for the
|
|
645
539
|
* point. For other axes it holds the X value.
|
|
@@ -647,7 +541,6 @@ Highcharts.Point.prototype = {
|
|
|
647
541
|
* @name Highcharts.Point#category
|
|
648
542
|
* @type {number|string}
|
|
649
543
|
*/
|
|
650
|
-
|
|
651
544
|
/**
|
|
652
545
|
* The name of the point. The name can be given as the first position of the
|
|
653
546
|
* point configuration array, or as a `name` property in the configuration:
|
|
@@ -671,14 +564,12 @@ Highcharts.Point.prototype = {
|
|
|
671
564
|
* @name Highcharts.Point#name
|
|
672
565
|
* @type {string}
|
|
673
566
|
*/
|
|
674
|
-
|
|
675
567
|
/**
|
|
676
568
|
* The percentage for points in a stacked series or pies.
|
|
677
569
|
*
|
|
678
570
|
* @name Highcharts.Point#percentage
|
|
679
571
|
* @type {number}
|
|
680
572
|
*/
|
|
681
|
-
|
|
682
573
|
/**
|
|
683
574
|
* The total of values in either a stack for stacked series, or a pie in a
|
|
684
575
|
* pie series.
|
|
@@ -686,7 +577,6 @@ Highcharts.Point.prototype = {
|
|
|
686
577
|
* @name Highcharts.Point#total
|
|
687
578
|
* @type {number}
|
|
688
579
|
*/
|
|
689
|
-
|
|
690
580
|
/**
|
|
691
581
|
* For certain series types, like pie charts, where individual points can
|
|
692
582
|
* be shown or hidden.
|