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
|
@@ -228,8 +228,13 @@ H.Tooltip.prototype = {
|
|
|
228
228
|
* Split tooltip does not support outside in the first iteration. Should
|
|
229
229
|
* not be too complicated to implement.
|
|
230
230
|
*/
|
|
231
|
-
this.outside =
|
|
232
|
-
|
|
231
|
+
this.outside = (
|
|
232
|
+
pick(
|
|
233
|
+
options.outside,
|
|
234
|
+
Boolean(chart.scrollablePixelsX || chart.scrollablePixelsY)
|
|
235
|
+
) &&
|
|
236
|
+
!this.split
|
|
237
|
+
);
|
|
233
238
|
},
|
|
234
239
|
|
|
235
240
|
/**
|
|
@@ -331,7 +336,8 @@ H.Tooltip.prototype = {
|
|
|
331
336
|
H.css(container, {
|
|
332
337
|
position: 'absolute',
|
|
333
338
|
top: '1px',
|
|
334
|
-
pointerEvents: options.style && options.style.pointerEvents
|
|
339
|
+
pointerEvents: options.style && options.style.pointerEvents,
|
|
340
|
+
zIndex: 3
|
|
335
341
|
});
|
|
336
342
|
H.doc.body.appendChild(container);
|
|
337
343
|
|
|
@@ -530,6 +536,8 @@ H.Tooltip.prototype = {
|
|
|
530
536
|
* @param {Array<Highchart.Points>} points
|
|
531
537
|
*
|
|
532
538
|
* @param {global.Event} [mouseEvent]
|
|
539
|
+
*
|
|
540
|
+
* @return {Array<number,number>}
|
|
533
541
|
*/
|
|
534
542
|
getAnchor: function (points, mouseEvent) {
|
|
535
543
|
var ret,
|
|
@@ -990,12 +998,6 @@ H.Tooltip.prototype = {
|
|
|
990
998
|
|
|
991
999
|
if (!chart.styledMode) {
|
|
992
1000
|
attribs.fill = options.backgroundColor;
|
|
993
|
-
attribs.stroke = (
|
|
994
|
-
options.borderColor ||
|
|
995
|
-
point.color ||
|
|
996
|
-
series.color ||
|
|
997
|
-
'#333333'
|
|
998
|
-
);
|
|
999
1001
|
attribs['stroke-width'] = options.borderWidth;
|
|
1000
1002
|
}
|
|
1001
1003
|
|
|
@@ -1023,7 +1025,15 @@ H.Tooltip.prototype = {
|
|
|
1023
1025
|
});
|
|
1024
1026
|
if (!chart.styledMode) {
|
|
1025
1027
|
tt.css(options.style)
|
|
1026
|
-
.shadow(options.shadow)
|
|
1028
|
+
.shadow(options.shadow)
|
|
1029
|
+
.attr({
|
|
1030
|
+
stroke: (
|
|
1031
|
+
options.borderColor ||
|
|
1032
|
+
point.color ||
|
|
1033
|
+
series.color ||
|
|
1034
|
+
'#333333'
|
|
1035
|
+
)
|
|
1036
|
+
});
|
|
1027
1037
|
}
|
|
1028
1038
|
|
|
1029
1039
|
// Get X position now, so we can move all to the other side in
|
|
@@ -1044,8 +1054,9 @@ H.Tooltip.prototype = {
|
|
|
1044
1054
|
chart.chartWidth +
|
|
1045
1055
|
(
|
|
1046
1056
|
// Scrollable plot area
|
|
1047
|
-
chart.
|
|
1048
|
-
chart.
|
|
1057
|
+
chart.scrollablePixelsX ?
|
|
1058
|
+
chart.scrollablePixelsX -
|
|
1059
|
+
chart.marginRight :
|
|
1049
1060
|
0
|
|
1050
1061
|
) -
|
|
1051
1062
|
boxWidth
|
|
@@ -1,23 +1,19 @@
|
|
|
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
|
+
* */
|
|
7
10
|
'use strict';
|
|
8
|
-
|
|
9
11
|
import H from './Globals.js';
|
|
10
12
|
import './Utilities.js';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
extend = H.extend,
|
|
14
|
-
noop = H.noop,
|
|
15
|
-
pick = H.pick,
|
|
16
|
-
Pointer = H.Pointer;
|
|
17
|
-
|
|
13
|
+
var charts = H.charts, extend = H.extend, noop = H.noop, pick = H.pick, Pointer = H.Pointer;
|
|
14
|
+
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
18
15
|
// Support for touch devices
|
|
19
16
|
extend(Pointer.prototype, /** @lends Pointer.prototype */ {
|
|
20
|
-
|
|
21
17
|
/**
|
|
22
18
|
* Run translation operations
|
|
23
19
|
*
|
|
@@ -35,39 +31,17 @@ extend(Pointer.prototype, /** @lends Pointer.prototype */ {
|
|
|
35
31
|
* @param {*} clip
|
|
36
32
|
*
|
|
37
33
|
* @param {*} lastValidTouch
|
|
34
|
+
*
|
|
35
|
+
* @return {void}
|
|
38
36
|
*/
|
|
39
|
-
pinchTranslate: function (
|
|
40
|
-
pinchDown,
|
|
41
|
-
touches,
|
|
42
|
-
transform,
|
|
43
|
-
selectionMarker,
|
|
44
|
-
clip,
|
|
45
|
-
lastValidTouch
|
|
46
|
-
) {
|
|
37
|
+
pinchTranslate: function (pinchDown, touches, transform, selectionMarker, clip, lastValidTouch) {
|
|
47
38
|
if (this.zoomHor) {
|
|
48
|
-
this.pinchTranslateDirection(
|
|
49
|
-
true,
|
|
50
|
-
pinchDown,
|
|
51
|
-
touches,
|
|
52
|
-
transform,
|
|
53
|
-
selectionMarker,
|
|
54
|
-
clip,
|
|
55
|
-
lastValidTouch
|
|
56
|
-
);
|
|
39
|
+
this.pinchTranslateDirection(true, pinchDown, touches, transform, selectionMarker, clip, lastValidTouch);
|
|
57
40
|
}
|
|
58
41
|
if (this.zoomVert) {
|
|
59
|
-
this.pinchTranslateDirection(
|
|
60
|
-
false,
|
|
61
|
-
pinchDown,
|
|
62
|
-
touches,
|
|
63
|
-
transform,
|
|
64
|
-
selectionMarker,
|
|
65
|
-
clip,
|
|
66
|
-
lastValidTouch
|
|
67
|
-
);
|
|
42
|
+
this.pinchTranslateDirection(false, pinchDown, touches, transform, selectionMarker, clip, lastValidTouch);
|
|
68
43
|
}
|
|
69
44
|
},
|
|
70
|
-
|
|
71
45
|
/**
|
|
72
46
|
* Run translation operations for each direction (horizontal and vertical)
|
|
73
47
|
* independently.
|
|
@@ -90,70 +64,37 @@ extend(Pointer.prototype, /** @lends Pointer.prototype */ {
|
|
|
90
64
|
* @param {*} lastValidTouch
|
|
91
65
|
*
|
|
92
66
|
* @param {number|undefined} [forcedScale=1]
|
|
67
|
+
*
|
|
68
|
+
* @return {void}
|
|
93
69
|
*/
|
|
94
|
-
pinchTranslateDirection: function (
|
|
95
|
-
horiz,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
clip,
|
|
101
|
-
lastValidTouch,
|
|
102
|
-
forcedScale
|
|
103
|
-
) {
|
|
104
|
-
var chart = this.chart,
|
|
105
|
-
xy = horiz ? 'x' : 'y',
|
|
106
|
-
XY = horiz ? 'X' : 'Y',
|
|
107
|
-
sChartXY = 'chart' + XY,
|
|
108
|
-
wh = horiz ? 'width' : 'height',
|
|
109
|
-
plotLeftTop = chart['plot' + (horiz ? 'Left' : 'Top')],
|
|
110
|
-
selectionWH,
|
|
111
|
-
selectionXY,
|
|
112
|
-
clipXY,
|
|
113
|
-
scale = forcedScale || 1,
|
|
114
|
-
inverted = chart.inverted,
|
|
115
|
-
bounds = chart.bounds[horiz ? 'h' : 'v'],
|
|
116
|
-
singleTouch = pinchDown.length === 1,
|
|
117
|
-
touch0Start = pinchDown[0][sChartXY],
|
|
118
|
-
touch0Now = touches[0][sChartXY],
|
|
119
|
-
touch1Start = !singleTouch && pinchDown[1][sChartXY],
|
|
120
|
-
touch1Now = !singleTouch && touches[1][sChartXY],
|
|
121
|
-
outOfBounds,
|
|
122
|
-
transformScale,
|
|
123
|
-
scaleKey,
|
|
124
|
-
setScale = function () {
|
|
125
|
-
// Don't zoom if fingers are too close on this axis
|
|
126
|
-
if (!singleTouch && Math.abs(touch0Start - touch1Start) > 20) {
|
|
127
|
-
scale = forcedScale ||
|
|
128
|
-
Math.abs(touch0Now - touch1Now) /
|
|
70
|
+
pinchTranslateDirection: function (horiz, pinchDown, touches, transform, selectionMarker, clip, lastValidTouch, forcedScale) {
|
|
71
|
+
var chart = this.chart, xy = horiz ? 'x' : 'y', XY = horiz ? 'X' : 'Y', sChartXY = 'chart' + XY, wh = horiz ? 'width' : 'height', plotLeftTop = chart['plot' + (horiz ? 'Left' : 'Top')], selectionWH, selectionXY, clipXY, scale = forcedScale || 1, inverted = chart.inverted, bounds = chart.bounds[horiz ? 'h' : 'v'], singleTouch = pinchDown.length === 1, touch0Start = pinchDown[0][sChartXY], touch0Now = touches[0][sChartXY], touch1Start = !singleTouch && pinchDown[1][sChartXY], touch1Now = !singleTouch && touches[1][sChartXY], outOfBounds, transformScale, scaleKey, setScale = function () {
|
|
72
|
+
// Don't zoom if fingers are too close on this axis
|
|
73
|
+
if (!singleTouch && Math.abs(touch0Start - touch1Start) > 20) {
|
|
74
|
+
scale = forcedScale ||
|
|
75
|
+
Math.abs(touch0Now - touch1Now) /
|
|
129
76
|
Math.abs(touch0Start - touch1Start);
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
scale;
|
|
135
|
-
};
|
|
136
|
-
|
|
77
|
+
}
|
|
78
|
+
clipXY = ((plotLeftTop - touch0Now) / scale) + touch0Start;
|
|
79
|
+
selectionWH = chart['plot' + (horiz ? 'Width' : 'Height')] / scale;
|
|
80
|
+
};
|
|
137
81
|
// Set the scale, first pass
|
|
138
82
|
setScale();
|
|
139
|
-
|
|
140
83
|
// The clip position (x or y) is altered if out of bounds, the selection
|
|
141
84
|
// position is not
|
|
142
85
|
selectionXY = clipXY;
|
|
143
|
-
|
|
144
86
|
// Out of bounds
|
|
145
87
|
if (selectionXY < bounds.min) {
|
|
146
88
|
selectionXY = bounds.min;
|
|
147
89
|
outOfBounds = true;
|
|
148
|
-
}
|
|
90
|
+
}
|
|
91
|
+
else if (selectionXY + selectionWH > bounds.max) {
|
|
149
92
|
selectionXY = bounds.max - selectionWH;
|
|
150
93
|
outOfBounds = true;
|
|
151
94
|
}
|
|
152
|
-
|
|
153
95
|
// Is the chart dragged off its bounds, determined by dataMin and
|
|
154
96
|
// dataMax?
|
|
155
97
|
if (outOfBounds) {
|
|
156
|
-
|
|
157
98
|
// Modify the touchNow position in order to create an elastic drag
|
|
158
99
|
// movement. This indicates to the user that the chart is responsive
|
|
159
100
|
// but can't be dragged further.
|
|
@@ -161,15 +102,13 @@ extend(Pointer.prototype, /** @lends Pointer.prototype */ {
|
|
|
161
102
|
if (!singleTouch) {
|
|
162
103
|
touch1Now -= 0.8 * (touch1Now - lastValidTouch[xy][1]);
|
|
163
104
|
}
|
|
164
|
-
|
|
165
105
|
// Set the scale, second pass to adapt to the modified touchNow
|
|
166
106
|
// positions
|
|
167
107
|
setScale();
|
|
168
|
-
|
|
169
|
-
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
170
110
|
lastValidTouch[xy] = [touch0Now, touch1Now];
|
|
171
111
|
}
|
|
172
|
-
|
|
173
112
|
// Set geometry for clipping, selection and transformation
|
|
174
113
|
if (!inverted) {
|
|
175
114
|
clip[xy] = clipXY - plotLeftTop;
|
|
@@ -177,103 +116,68 @@ extend(Pointer.prototype, /** @lends Pointer.prototype */ {
|
|
|
177
116
|
}
|
|
178
117
|
scaleKey = inverted ? (horiz ? 'scaleY' : 'scaleX') : 'scale' + XY;
|
|
179
118
|
transformScale = inverted ? 1 / scale : scale;
|
|
180
|
-
|
|
181
119
|
selectionMarker[wh] = selectionWH;
|
|
182
120
|
selectionMarker[xy] = selectionXY;
|
|
183
121
|
transform[scaleKey] = scale;
|
|
184
122
|
transform['translate' + XY] = (transformScale * plotLeftTop) +
|
|
185
123
|
(touch0Now - (transformScale * touch0Start));
|
|
186
124
|
},
|
|
187
|
-
|
|
188
125
|
/**
|
|
189
126
|
* Handle touch events with two touches
|
|
190
127
|
*
|
|
191
128
|
* @private
|
|
192
129
|
* @function Highcharts.Pointer#pinch
|
|
193
130
|
*
|
|
194
|
-
* @param {Highcharts.
|
|
131
|
+
* @param {Highcharts.PointerEventObject} e
|
|
132
|
+
*
|
|
133
|
+
* @return {void}
|
|
195
134
|
*/
|
|
196
135
|
pinch: function (e) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
pinchDown = self.pinchDown,
|
|
201
|
-
touches = e.touches,
|
|
202
|
-
touchesLength = touches.length,
|
|
203
|
-
lastValidTouch = self.lastValidTouch,
|
|
204
|
-
hasZoom = self.hasZoom,
|
|
205
|
-
selectionMarker = self.selectionMarker,
|
|
206
|
-
transform = {},
|
|
207
|
-
fireClickEvent = touchesLength === 1 && (
|
|
208
|
-
(
|
|
209
|
-
self.inClass(e.target, 'highcharts-tracker') &&
|
|
210
|
-
chart.runTrackerClick
|
|
211
|
-
) ||
|
|
212
|
-
self.runChartClick
|
|
213
|
-
),
|
|
214
|
-
clip = {};
|
|
215
|
-
|
|
136
|
+
var self = this, chart = self.chart, pinchDown = self.pinchDown, touches = e.touches, touchesLength = touches.length, lastValidTouch = self.lastValidTouch, hasZoom = self.hasZoom, selectionMarker = self.selectionMarker, transform = {}, fireClickEvent = touchesLength === 1 && ((self.inClass(e.target, 'highcharts-tracker') &&
|
|
137
|
+
chart.runTrackerClick) ||
|
|
138
|
+
self.runChartClick), clip = {};
|
|
216
139
|
// Don't initiate panning until the user has pinched. This prevents us
|
|
217
140
|
// from blocking page scrolling as users scroll down a long page
|
|
218
141
|
// (#4210).
|
|
219
142
|
if (touchesLength > 1) {
|
|
220
143
|
self.initiated = true;
|
|
221
144
|
}
|
|
222
|
-
|
|
223
145
|
// On touch devices, only proceed to trigger click if a handler is
|
|
224
146
|
// defined
|
|
225
147
|
if (hasZoom && self.initiated && !fireClickEvent) {
|
|
226
148
|
e.preventDefault();
|
|
227
149
|
}
|
|
228
|
-
|
|
229
150
|
// Normalize each touch
|
|
230
151
|
[].map.call(touches, function (e) {
|
|
231
152
|
return self.normalize(e);
|
|
232
153
|
});
|
|
233
|
-
|
|
234
154
|
// Register the touch start position
|
|
235
155
|
if (e.type === 'touchstart') {
|
|
236
156
|
[].forEach.call(touches, function (e, i) {
|
|
237
157
|
pinchDown[i] = { chartX: e.chartX, chartY: e.chartY };
|
|
238
158
|
});
|
|
239
159
|
lastValidTouch.x = [pinchDown[0].chartX, pinchDown[1] &&
|
|
240
|
-
|
|
160
|
+
pinchDown[1].chartX];
|
|
241
161
|
lastValidTouch.y = [pinchDown[0].chartY, pinchDown[1] &&
|
|
242
|
-
|
|
243
|
-
|
|
162
|
+
pinchDown[1].chartY];
|
|
244
163
|
// Identify the data bounds in pixels
|
|
245
164
|
chart.axes.forEach(function (axis) {
|
|
246
165
|
if (axis.zoomEnabled) {
|
|
247
|
-
var bounds = chart.bounds[axis.horiz ? 'h' : 'v'],
|
|
248
|
-
minPixelPadding = axis.minPixelPadding,
|
|
249
|
-
min = axis.toPixels(
|
|
250
|
-
pick(axis.options.min, axis.dataMin)
|
|
251
|
-
),
|
|
252
|
-
max = axis.toPixels(
|
|
253
|
-
pick(axis.options.max, axis.dataMax)
|
|
254
|
-
),
|
|
255
|
-
absMin = Math.min(min, max),
|
|
256
|
-
absMax = Math.max(min, max);
|
|
257
|
-
|
|
166
|
+
var bounds = chart.bounds[axis.horiz ? 'h' : 'v'], minPixelPadding = axis.minPixelPadding, min = axis.toPixels(Math.min(pick(axis.options.min, axis.dataMin), axis.dataMin)), max = axis.toPixels(Math.max(pick(axis.options.max, axis.dataMax), axis.dataMax)), absMin = Math.min(min, max), absMax = Math.max(min, max);
|
|
258
167
|
// Store the bounds for use in the touchmove handler
|
|
259
168
|
bounds.min = Math.min(axis.pos, absMin - minPixelPadding);
|
|
260
|
-
bounds.max = Math.max(
|
|
261
|
-
axis.pos + axis.len,
|
|
262
|
-
absMax + minPixelPadding
|
|
263
|
-
);
|
|
169
|
+
bounds.max = Math.max(axis.pos + axis.len, absMax + minPixelPadding);
|
|
264
170
|
}
|
|
265
171
|
});
|
|
266
172
|
self.res = true; // reset on next move
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
173
|
+
// Optionally move the tooltip on touchmove
|
|
174
|
+
}
|
|
175
|
+
else if (self.followTouchMove && touchesLength === 1) {
|
|
270
176
|
this.runPointActions(self.normalize(e));
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
177
|
+
// Event type is touchmove, handle panning and pinching
|
|
178
|
+
}
|
|
179
|
+
else if (pinchDown.length) { // can be 0 when releasing, if touchend
|
|
274
180
|
// fires first
|
|
275
|
-
|
|
276
|
-
|
|
277
181
|
// Set the marker
|
|
278
182
|
if (!selectionMarker) {
|
|
279
183
|
self.selectionMarker = selectionMarker = extend({
|
|
@@ -281,65 +185,43 @@ extend(Pointer.prototype, /** @lends Pointer.prototype */ {
|
|
|
281
185
|
touch: true
|
|
282
186
|
}, chart.plotBox);
|
|
283
187
|
}
|
|
284
|
-
|
|
285
|
-
self.pinchTranslate(
|
|
286
|
-
pinchDown,
|
|
287
|
-
touches,
|
|
288
|
-
transform,
|
|
289
|
-
selectionMarker,
|
|
290
|
-
clip,
|
|
291
|
-
lastValidTouch
|
|
292
|
-
);
|
|
293
|
-
|
|
188
|
+
self.pinchTranslate(pinchDown, touches, transform, selectionMarker, clip, lastValidTouch);
|
|
294
189
|
self.hasPinched = hasZoom;
|
|
295
|
-
|
|
296
190
|
// Scale and translate the groups to provide visual feedback during
|
|
297
191
|
// pinching
|
|
298
192
|
self.scaleGroups(transform, clip);
|
|
299
|
-
|
|
300
193
|
if (self.res) {
|
|
301
194
|
self.res = false;
|
|
302
195
|
this.reset(false, 0);
|
|
303
196
|
}
|
|
304
197
|
}
|
|
305
198
|
},
|
|
306
|
-
|
|
307
199
|
/**
|
|
308
200
|
* General touch handler shared by touchstart and touchmove.
|
|
309
201
|
*
|
|
310
202
|
* @private
|
|
311
203
|
* @function Highcharts.Pointer#touch
|
|
312
204
|
*
|
|
313
|
-
* @param {Highcharts.
|
|
205
|
+
* @param {Highcharts.PointerEventObject} e
|
|
314
206
|
*
|
|
315
|
-
* @param {boolean} start
|
|
207
|
+
* @param {boolean} [start]
|
|
208
|
+
*
|
|
209
|
+
* @return {void}
|
|
316
210
|
*/
|
|
317
211
|
touch: function (e, start) {
|
|
318
|
-
var chart = this.chart,
|
|
319
|
-
hasMoved,
|
|
320
|
-
pinchDown,
|
|
321
|
-
isInside;
|
|
322
|
-
|
|
212
|
+
var chart = this.chart, hasMoved, pinchDown, isInside;
|
|
323
213
|
if (chart.index !== H.hoverChartIndex) {
|
|
324
214
|
this.onContainerMouseLeave({ relatedTarget: true });
|
|
325
215
|
}
|
|
326
216
|
H.hoverChartIndex = chart.index;
|
|
327
|
-
|
|
328
217
|
if (e.touches.length === 1) {
|
|
329
|
-
|
|
330
218
|
e = this.normalize(e);
|
|
331
|
-
|
|
332
|
-
isInside = chart.isInsidePlot(
|
|
333
|
-
e.chartX - chart.plotLeft,
|
|
334
|
-
e.chartY - chart.plotTop
|
|
335
|
-
);
|
|
219
|
+
isInside = chart.isInsidePlot(e.chartX - chart.plotLeft, e.chartY - chart.plotTop);
|
|
336
220
|
if (isInside && !chart.openMenu) {
|
|
337
|
-
|
|
338
221
|
// Run mouse events and display tooltip etc
|
|
339
222
|
if (start) {
|
|
340
223
|
this.runPointActions(e);
|
|
341
224
|
}
|
|
342
|
-
|
|
343
225
|
// Android fires touchmove events after the touchstart even if
|
|
344
226
|
// the finger hasn't moved, or moved only a pixel or two. In iOS
|
|
345
227
|
// however, the touchmove doesn't fire unless the finger moves
|
|
@@ -348,57 +230,57 @@ extend(Pointer.prototype, /** @lends Pointer.prototype */ {
|
|
|
348
230
|
// distances. #3450.
|
|
349
231
|
if (e.type === 'touchmove') {
|
|
350
232
|
pinchDown = this.pinchDown;
|
|
351
|
-
hasMoved = pinchDown[0] ? Math.sqrt(
|
|
352
|
-
|
|
353
|
-
Math.pow(pinchDown[0].chartY - e.chartY, 2)
|
|
354
|
-
) >= 4 : false;
|
|
233
|
+
hasMoved = pinchDown[0] ? Math.sqrt(// #5266
|
|
234
|
+
Math.pow(pinchDown[0].chartX - e.chartX, 2) +
|
|
235
|
+
Math.pow(pinchDown[0].chartY - e.chartY, 2)) >= 4 : false;
|
|
355
236
|
}
|
|
356
|
-
|
|
357
237
|
if (pick(hasMoved, true)) {
|
|
358
238
|
this.pinch(e);
|
|
359
239
|
}
|
|
360
|
-
|
|
361
|
-
|
|
240
|
+
}
|
|
241
|
+
else if (start) {
|
|
362
242
|
// Hide the tooltip on touching outside the plot area (#1203)
|
|
363
243
|
this.reset();
|
|
364
244
|
}
|
|
365
|
-
|
|
366
|
-
|
|
245
|
+
}
|
|
246
|
+
else if (e.touches.length === 2) {
|
|
367
247
|
this.pinch(e);
|
|
368
248
|
}
|
|
369
249
|
},
|
|
370
|
-
|
|
371
250
|
/**
|
|
372
251
|
* @private
|
|
373
252
|
* @function Highcharts.Pointer#onContainerTouchStart
|
|
374
253
|
*
|
|
375
|
-
* @param {Highcharts.
|
|
254
|
+
* @param {Highcharts.PointerEventObject} e
|
|
255
|
+
*
|
|
256
|
+
* @return {void}
|
|
376
257
|
*/
|
|
377
258
|
onContainerTouchStart: function (e) {
|
|
378
259
|
this.zoomOption(e);
|
|
379
260
|
this.touch(e, true);
|
|
380
261
|
},
|
|
381
|
-
|
|
382
262
|
/**
|
|
383
263
|
* @private
|
|
384
264
|
* @function Highcharts.Pointer#onContainerTouchMove
|
|
385
265
|
*
|
|
386
|
-
* @param {Highcharts.
|
|
266
|
+
* @param {Highcharts.PointerEventObject} e
|
|
267
|
+
*
|
|
268
|
+
* @return {void}
|
|
387
269
|
*/
|
|
388
270
|
onContainerTouchMove: function (e) {
|
|
389
271
|
this.touch(e);
|
|
390
272
|
},
|
|
391
|
-
|
|
392
273
|
/**
|
|
393
274
|
* @private
|
|
394
275
|
* @function Highcharts.Pointer#onDocumentTouchEnd
|
|
395
276
|
*
|
|
396
|
-
* @param {Highcharts.
|
|
277
|
+
* @param {Highcharts.PointerEventObject} e
|
|
278
|
+
*
|
|
279
|
+
* @return {void}
|
|
397
280
|
*/
|
|
398
281
|
onDocumentTouchEnd: function (e) {
|
|
399
282
|
if (charts[H.hoverChartIndex]) {
|
|
400
283
|
charts[H.hoverChartIndex].pointer.drop(e);
|
|
401
284
|
}
|
|
402
285
|
}
|
|
403
|
-
|
|
404
286
|
});
|