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,14 @@
|
|
|
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 H from './Globals.js';
|
|
7
12
|
/**
|
|
8
13
|
* A valid color to be parsed and handled by Highcharts. Highcharts internally
|
|
9
14
|
* supports hex colors like `#ffffff`, rgb colors like `rgb(255,255,255)` and
|
|
@@ -13,24 +18,89 @@
|
|
|
13
18
|
*
|
|
14
19
|
* @typedef {string} Highcharts.ColorString
|
|
15
20
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Gradient options instead of a solid color.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // Linear gradient used as a color option
|
|
26
|
+
* color: {
|
|
27
|
+
* linearGradient: { x1: 0, x2: 0, y1: 0, y2: 1 },
|
|
28
|
+
* stops: [
|
|
29
|
+
* [0, '#003399'], // start
|
|
30
|
+
* [0.5, '#ffffff'], // middle
|
|
31
|
+
* [1, '#3366AA'] // end
|
|
32
|
+
* ]
|
|
33
|
+
* }
|
|
34
|
+
* }
|
|
35
|
+
*
|
|
36
|
+
* @interface Highcharts.GradientColorObject
|
|
37
|
+
*/ /**
|
|
38
|
+
* Holds an object that defines the start position and the end position relative
|
|
39
|
+
* to the shape.
|
|
40
|
+
* @name Highcharts.GradientColorObject#linearGradient
|
|
41
|
+
* @type {Highcharts.LinearGradientColorObject|undefined}
|
|
42
|
+
*/ /**
|
|
43
|
+
* Holds an object that defines the center position and the radius.
|
|
44
|
+
* @name Highcharts.GradientColorObject#radialGradient
|
|
45
|
+
* @type {Highcharts.RadialGradientColorObject|undefined}
|
|
46
|
+
*/ /**
|
|
47
|
+
* The first item in each tuple is the position in the gradient, where 0 is the
|
|
48
|
+
* start of the gradient and 1 is the end of the gradient. Multiple stops can be
|
|
49
|
+
* applied. The second item is the color for each stop. This color can also be
|
|
50
|
+
* given in the rgba format.
|
|
51
|
+
* @name Highcharts.GradientColorObject#stops
|
|
52
|
+
* @type {Array<Array<number,Highcharts.ColorString>>|undefined}
|
|
53
|
+
*/
|
|
54
|
+
/**
|
|
55
|
+
* Defines the start position and the end position for a gradient relative
|
|
56
|
+
* to the shape. Start position (x1, y1) and end position (x2, y2) are relative
|
|
57
|
+
* to the shape, where 0 means top/left and 1 is bottom/right.
|
|
58
|
+
*
|
|
59
|
+
* @interface Highcharts.LinearGradientColorObject
|
|
60
|
+
*/ /**
|
|
61
|
+
* Start horizontal position of the gradient. Float ranges 0-1.
|
|
62
|
+
* @name Highcharts.LinearGradientColorObject#x1
|
|
63
|
+
* @type {number}
|
|
64
|
+
*/ /**
|
|
65
|
+
* End horizontal position of the gradient. Float ranges 0-1.
|
|
66
|
+
* @name Highcharts.LinearGradientColorObject#x2
|
|
67
|
+
* @type {number}
|
|
68
|
+
*/ /**
|
|
69
|
+
* Start vertical position of the gradient. Float ranges 0-1.
|
|
70
|
+
* @name Highcharts.LinearGradientColorObject#y1
|
|
71
|
+
* @type {number}
|
|
72
|
+
*/ /**
|
|
73
|
+
* End vertical position of the gradient. Float ranges 0-1.
|
|
74
|
+
* @name Highcharts.LinearGradientColorObject#y2
|
|
75
|
+
* @type {number}
|
|
76
|
+
*/
|
|
77
|
+
/**
|
|
78
|
+
* Defines the center position and the radius for a gradient.
|
|
79
|
+
*
|
|
80
|
+
* @interface Highcharts.RadialGradientColorObject
|
|
81
|
+
*/ /**
|
|
82
|
+
* Center horizontal position relative to the shape. Float ranges 0-1.
|
|
83
|
+
* @name Highcharts.RadialGradientColorObject#cx
|
|
84
|
+
* @type {number}
|
|
85
|
+
*/ /**
|
|
86
|
+
* Center vertical position relative to the shape. Float ranges 0-1.
|
|
87
|
+
* @name Highcharts.RadialGradientColorObject#cy
|
|
88
|
+
* @type {number}
|
|
89
|
+
*/ /**
|
|
90
|
+
* Radius relative to the shape. Float ranges 0-1.
|
|
91
|
+
* @name Highcharts.RadialGradientColorObject#r
|
|
92
|
+
* @type {number}
|
|
93
|
+
*/
|
|
20
94
|
import './Utilities.js';
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
merge = H.merge,
|
|
24
|
-
pInt = H.pInt;
|
|
25
|
-
|
|
95
|
+
var isNumber = H.isNumber, merge = H.merge, pInt = H.pInt;
|
|
96
|
+
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
26
97
|
/**
|
|
27
|
-
* Handle color operations.
|
|
98
|
+
* Handle color operations. Some object methods are chainable.
|
|
28
99
|
*
|
|
29
|
-
* @private
|
|
30
100
|
* @class
|
|
31
101
|
* @name Highcharts.Color
|
|
32
102
|
*
|
|
33
|
-
* @param {Highcharts.ColorString} input
|
|
103
|
+
* @param {Highcharts.ColorString|Highcharts.GradientColorObject} input
|
|
34
104
|
* The input color in either rbga or hex format
|
|
35
105
|
*/
|
|
36
106
|
H.Color = function (input) {
|
|
@@ -42,97 +112,85 @@ H.Color = function (input) {
|
|
|
42
112
|
this.init(input);
|
|
43
113
|
};
|
|
44
114
|
H.Color.prototype = {
|
|
45
|
-
|
|
46
115
|
// Collection of parsers. This can be extended from the outside by pushing
|
|
47
116
|
// parsers to Highcharts.Color.prototype.parsers.
|
|
48
117
|
parsers: [{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
}],
|
|
67
|
-
|
|
118
|
+
// RGBA color
|
|
119
|
+
regex: /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,
|
|
120
|
+
parse: function (result) {
|
|
121
|
+
return [
|
|
122
|
+
pInt(result[1]),
|
|
123
|
+
pInt(result[2]),
|
|
124
|
+
pInt(result[3]),
|
|
125
|
+
parseFloat(result[4], 10)
|
|
126
|
+
];
|
|
127
|
+
}
|
|
128
|
+
}, {
|
|
129
|
+
// RGB color
|
|
130
|
+
regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,
|
|
131
|
+
parse: function (result) {
|
|
132
|
+
return [pInt(result[1]), pInt(result[2]), pInt(result[3]), 1];
|
|
133
|
+
}
|
|
134
|
+
}],
|
|
68
135
|
// Collection of named colors. Can be extended from the outside by adding
|
|
69
136
|
// colors to Highcharts.Color.prototype.names.
|
|
70
137
|
names: {
|
|
71
138
|
white: '#ffffff',
|
|
72
139
|
black: '#000000'
|
|
73
140
|
},
|
|
74
|
-
|
|
75
141
|
/**
|
|
76
142
|
* Parse the input color to rgba array
|
|
77
143
|
*
|
|
78
144
|
* @private
|
|
79
145
|
* @function Highcharts.Color#init
|
|
80
146
|
*
|
|
81
|
-
* @param {Highcharts.ColorString} input
|
|
147
|
+
* @param {Highcharts.ColorString|Highcharts.GradientColorObject} input
|
|
82
148
|
* The input color in either rbga or hex format
|
|
149
|
+
*
|
|
150
|
+
* @return {void}
|
|
83
151
|
*/
|
|
84
152
|
init: function (input) {
|
|
85
|
-
var result,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
len;
|
|
90
|
-
|
|
91
|
-
this.input = input = this.names[
|
|
92
|
-
input && input.toLowerCase ?
|
|
93
|
-
input.toLowerCase() :
|
|
94
|
-
''
|
|
95
|
-
] || input;
|
|
96
|
-
|
|
153
|
+
var result, rgba, i, parser, len;
|
|
154
|
+
this.input = input = this.names[input && input.toLowerCase ?
|
|
155
|
+
input.toLowerCase() :
|
|
156
|
+
''] || input;
|
|
97
157
|
// Gradients
|
|
98
158
|
if (input && input.stops) {
|
|
99
159
|
this.stops = input.stops.map(function (stop) {
|
|
100
160
|
return new H.Color(stop[1]);
|
|
101
161
|
});
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
162
|
+
// Solid colors
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
106
165
|
// Bitmasking as input[0] is not working for legacy IE.
|
|
107
|
-
if (input &&
|
|
108
|
-
|
|
166
|
+
if (input &&
|
|
167
|
+
input.charAt &&
|
|
168
|
+
input.charAt() === '#') {
|
|
109
169
|
len = input.length;
|
|
110
170
|
input = parseInt(input.substr(1), 16);
|
|
111
|
-
|
|
112
171
|
// Handle long-form, e.g. #AABBCC
|
|
113
172
|
if (len === 7) {
|
|
114
|
-
|
|
115
173
|
rgba = [
|
|
116
174
|
(input & 0xFF0000) >> 16,
|
|
117
175
|
(input & 0xFF00) >> 8,
|
|
118
176
|
(input & 0xFF),
|
|
119
177
|
1
|
|
120
178
|
];
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
179
|
+
// Handle short-form, e.g. #ABC
|
|
180
|
+
// In short form, the value is assumed to be the same
|
|
181
|
+
// for both nibbles for each component. e.g. #ABC = #AABBCC
|
|
182
|
+
}
|
|
183
|
+
else if (len === 4) {
|
|
127
184
|
rgba = [
|
|
128
|
-
((input & 0xF00) >> 4) |
|
|
129
|
-
|
|
185
|
+
(((input & 0xF00) >> 4) |
|
|
186
|
+
(input & 0xF00) >> 8),
|
|
187
|
+
(((input & 0xF0) >> 4) |
|
|
188
|
+
(input & 0xF0)),
|
|
130
189
|
((input & 0xF) << 4) | (input & 0xF),
|
|
131
190
|
1
|
|
132
191
|
];
|
|
133
192
|
}
|
|
134
193
|
}
|
|
135
|
-
|
|
136
194
|
// Otherwise, check regex parsers
|
|
137
195
|
if (!rgba) {
|
|
138
196
|
i = this.parsers.length;
|
|
@@ -147,45 +205,46 @@ H.Color.prototype = {
|
|
|
147
205
|
}
|
|
148
206
|
this.rgba = rgba || [];
|
|
149
207
|
},
|
|
150
|
-
|
|
151
208
|
/**
|
|
152
|
-
* Return the color in the specified format
|
|
209
|
+
* Return the color or gradient stops in the specified format
|
|
153
210
|
*
|
|
154
211
|
* @function Highcharts.Color#get
|
|
155
212
|
*
|
|
156
|
-
* @param {string} format
|
|
157
|
-
* Possible values are 'a', 'rgb',
|
|
213
|
+
* @param {string} [format]
|
|
214
|
+
* Possible values are 'a', 'rgb', 'rgba' (default).
|
|
158
215
|
*
|
|
159
|
-
* @return {Highcharts.ColorString}
|
|
160
|
-
* This color as a string.
|
|
216
|
+
* @return {Highcharts.ColorString|Highcharts.GradientColorObject}
|
|
217
|
+
* This color as a string or gradient stops.
|
|
161
218
|
*/
|
|
162
219
|
get: function (format) {
|
|
163
|
-
var input = this.input,
|
|
164
|
-
rgba = this.rgba,
|
|
165
|
-
ret;
|
|
166
|
-
|
|
220
|
+
var input = this.input, rgba = this.rgba, ret;
|
|
167
221
|
if (this.stops) {
|
|
168
222
|
ret = merge(input);
|
|
169
223
|
ret.stops = [].concat(ret.stops);
|
|
170
224
|
this.stops.forEach(function (stop, i) {
|
|
171
|
-
ret.stops[i] = [
|
|
225
|
+
ret.stops[i] = [
|
|
226
|
+
ret.stops[i][0],
|
|
227
|
+
stop.get(format)
|
|
228
|
+
];
|
|
172
229
|
});
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
230
|
+
// it's NaN if gradient colors on a column chart
|
|
231
|
+
}
|
|
232
|
+
else if (rgba && isNumber(rgba[0])) {
|
|
176
233
|
if (format === 'rgb' || (!format && rgba[3] === 1)) {
|
|
177
234
|
ret = 'rgb(' + rgba[0] + ',' + rgba[1] + ',' + rgba[2] + ')';
|
|
178
|
-
}
|
|
235
|
+
}
|
|
236
|
+
else if (format === 'a') {
|
|
179
237
|
ret = rgba[3];
|
|
180
|
-
}
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
181
240
|
ret = 'rgba(' + rgba.join(',') + ')';
|
|
182
241
|
}
|
|
183
|
-
}
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
184
244
|
ret = input;
|
|
185
245
|
}
|
|
186
246
|
return ret;
|
|
187
247
|
},
|
|
188
|
-
|
|
189
248
|
/**
|
|
190
249
|
* Brighten the color instance.
|
|
191
250
|
*
|
|
@@ -194,22 +253,19 @@ H.Color.prototype = {
|
|
|
194
253
|
* @param {number} alpha
|
|
195
254
|
* The alpha value.
|
|
196
255
|
*
|
|
197
|
-
* @return {Highcharts.
|
|
256
|
+
* @return {Highcharts.Color}
|
|
198
257
|
* This color with modifications.
|
|
199
258
|
*/
|
|
200
259
|
brighten: function (alpha) {
|
|
201
|
-
var i,
|
|
202
|
-
rgba = this.rgba;
|
|
203
|
-
|
|
260
|
+
var i, rgba = this.rgba;
|
|
204
261
|
if (this.stops) {
|
|
205
262
|
this.stops.forEach(function (stop) {
|
|
206
263
|
stop.brighten(alpha);
|
|
207
264
|
});
|
|
208
|
-
|
|
209
|
-
|
|
265
|
+
}
|
|
266
|
+
else if (isNumber(alpha) && alpha !== 0) {
|
|
210
267
|
for (i = 0; i < 3; i++) {
|
|
211
268
|
rgba[i] += pInt(alpha * 255);
|
|
212
|
-
|
|
213
269
|
if (rgba[i] < 0) {
|
|
214
270
|
rgba[i] = 0;
|
|
215
271
|
}
|
|
@@ -220,7 +276,6 @@ H.Color.prototype = {
|
|
|
220
276
|
}
|
|
221
277
|
return this;
|
|
222
278
|
},
|
|
223
|
-
|
|
224
279
|
/**
|
|
225
280
|
* Set the color's opacity to a given alpha value.
|
|
226
281
|
*
|
|
@@ -229,14 +284,13 @@ H.Color.prototype = {
|
|
|
229
284
|
* @param {number} alpha
|
|
230
285
|
* Opacity between 0 and 1.
|
|
231
286
|
*
|
|
232
|
-
* @return {Highcharts.
|
|
287
|
+
* @return {Highcharts.Color}
|
|
233
288
|
* Color with modifications.
|
|
234
289
|
*/
|
|
235
290
|
setOpacity: function (alpha) {
|
|
236
291
|
this.rgba[3] = alpha;
|
|
237
292
|
return this;
|
|
238
293
|
},
|
|
239
|
-
|
|
240
294
|
/**
|
|
241
295
|
* Return an intermediate color between two colors.
|
|
242
296
|
*
|
|
@@ -255,17 +309,13 @@ H.Color.prototype = {
|
|
|
255
309
|
tweenTo: function (to, pos) {
|
|
256
310
|
// Check for has alpha, because rgba colors perform worse due to lack of
|
|
257
311
|
// support in WebKit.
|
|
258
|
-
var fromRgba = this.rgba,
|
|
259
|
-
toRgba = to.rgba,
|
|
260
|
-
hasAlpha,
|
|
261
|
-
ret;
|
|
262
|
-
|
|
312
|
+
var fromRgba = this.rgba, toRgba = to.rgba, hasAlpha, ret;
|
|
263
313
|
// Unsupported color, return to-color (#3920, #7034)
|
|
264
314
|
if (!toRgba.length || !fromRgba || !fromRgba.length) {
|
|
265
315
|
ret = to.input || 'none';
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
316
|
+
// Interpolate
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
269
319
|
hasAlpha = (toRgba[3] !== 1 || fromRgba[3] !== 1);
|
|
270
320
|
ret = (hasAlpha ? 'rgba(' : 'rgb(') +
|
|
271
321
|
Math.round(toRgba[0] + (fromRgba[0] - toRgba[0]) * (1 - pos)) +
|
|
@@ -273,28 +323,25 @@ H.Color.prototype = {
|
|
|
273
323
|
Math.round(toRgba[1] + (fromRgba[1] - toRgba[1]) * (1 - pos)) +
|
|
274
324
|
',' +
|
|
275
325
|
Math.round(toRgba[2] + (fromRgba[2] - toRgba[2]) * (1 - pos)) +
|
|
276
|
-
(
|
|
277
|
-
|
|
278
|
-
(
|
|
279
|
-
|
|
280
|
-
(toRgba[3] + (fromRgba[3] - toRgba[3]) * (1 - pos))
|
|
281
|
-
) :
|
|
282
|
-
''
|
|
283
|
-
) +
|
|
326
|
+
(hasAlpha ?
|
|
327
|
+
(',' +
|
|
328
|
+
(toRgba[3] + (fromRgba[3] - toRgba[3]) * (1 - pos))) :
|
|
329
|
+
'') +
|
|
284
330
|
')';
|
|
285
331
|
}
|
|
286
332
|
return ret;
|
|
287
333
|
}
|
|
288
334
|
};
|
|
289
|
-
|
|
290
335
|
/**
|
|
291
336
|
* Creates a color instance out of a color string.
|
|
292
337
|
*
|
|
293
|
-
* @private
|
|
294
338
|
* @function Highcharts.color
|
|
295
339
|
*
|
|
296
340
|
* @param {Highcharts.ColorString} input
|
|
297
341
|
* The input color in either rbga or hex format
|
|
342
|
+
*
|
|
343
|
+
* @return {Highcharts.Color}
|
|
344
|
+
* Color instance
|
|
298
345
|
*/
|
|
299
346
|
H.color = function (input) {
|
|
300
347
|
return new H.Color(input);
|
|
@@ -664,7 +664,9 @@ seriesType(
|
|
|
664
664
|
// postprocessed for border width
|
|
665
665
|
seriesBarW = series.barW =
|
|
666
666
|
Math.max(seriesPointWidth, 1 + 2 * borderWidth),
|
|
667
|
-
seriesXOffset = series.pointXOffset = metrics.offset
|
|
667
|
+
seriesXOffset = series.pointXOffset = metrics.offset,
|
|
668
|
+
dataMin = series.dataMin,
|
|
669
|
+
dataMax = series.dataMax;
|
|
668
670
|
|
|
669
671
|
if (chart.inverted) {
|
|
670
672
|
translatedThreshold -= 0.5; // #3355
|
|
@@ -707,8 +709,12 @@ seriesType(
|
|
|
707
709
|
// in visible range (#7046)
|
|
708
710
|
if (
|
|
709
711
|
point.y === threshold &&
|
|
710
|
-
|
|
711
|
-
|
|
712
|
+
series.dataMax <= threshold &&
|
|
713
|
+
// and if there's room for it (#7311)
|
|
714
|
+
yAxis.min < threshold &&
|
|
715
|
+
// if all points are the same value (i.e zero) not draw
|
|
716
|
+
// as negative points (#10646)
|
|
717
|
+
dataMin !== dataMax
|
|
712
718
|
) {
|
|
713
719
|
up = !up;
|
|
714
720
|
}
|
|
@@ -408,6 +408,14 @@
|
|
|
408
408
|
* @default {"color": "contrast", "fontSize": "11px", "fontWeight": "bold", "textOutline": "1px contrast" }
|
|
409
409
|
* @since 4.1.0
|
|
410
410
|
*//**
|
|
411
|
+
* Options for a label text which should follow marker's shape. Border and
|
|
412
|
+
* background are disabled for a label that follows a path.
|
|
413
|
+
* **Note:** Only SVG-based renderer supports this option. Setting `useHTML` to
|
|
414
|
+
* true will disable this option.
|
|
415
|
+
* @name Highcharts.DataLabelsOptionsObject#textPath
|
|
416
|
+
* @type {Highcharts.DataLabelsTextPath|undefined}
|
|
417
|
+
* @since 7.1.0
|
|
418
|
+
*//**
|
|
411
419
|
* Whether to
|
|
412
420
|
* [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)
|
|
413
421
|
* to render the labels.
|
|
@@ -457,6 +465,27 @@
|
|
|
457
465
|
* @typedef {"allow"|"justify"} Highcharts.DataLabelsOverflowValue
|
|
458
466
|
*/
|
|
459
467
|
|
|
468
|
+
/**
|
|
469
|
+
* Options for a label text which should follow marker's shape.
|
|
470
|
+
* **Note:** Only SVG-based renderer supports this option.
|
|
471
|
+
*
|
|
472
|
+
* @see {@link Highcharts.SeriesNetworkDataLabelsTextPath#linkTextPath}
|
|
473
|
+
* @see {@link Highcharts.SeriesNetworkDataLabelsTextPath#textPath}
|
|
474
|
+
*
|
|
475
|
+
* @interface Highcharts.DataLabelsTextPath
|
|
476
|
+
* @since 7.1.0
|
|
477
|
+
*//**
|
|
478
|
+
* Presentation attributes for the text path.
|
|
479
|
+
* @name Highcharts.DataLabelsTextPath#attributes
|
|
480
|
+
* @type {Highcharts.SVGAttributes}
|
|
481
|
+
* @since 7.1.0
|
|
482
|
+
*//**
|
|
483
|
+
* Enable or disable `textPath` option for link's or marker's data labels.
|
|
484
|
+
* @name Highcharts.DataLabelsTextPath#enabled
|
|
485
|
+
* @type {boolean|undefined}
|
|
486
|
+
* @since 7.1.0
|
|
487
|
+
*/
|
|
488
|
+
|
|
460
489
|
'use strict';
|
|
461
490
|
|
|
462
491
|
import H from './Globals.js';
|
|
@@ -654,7 +683,7 @@ Series.prototype.drawDataLabels = function () {
|
|
|
654
683
|
dataLabelsGroup,
|
|
655
684
|
seriesAnimDuration = H.animObject(seriesOptions.animation).duration,
|
|
656
685
|
fadeInDuration = Math.min(seriesAnimDuration, 200),
|
|
657
|
-
defer = pick(
|
|
686
|
+
defer = !chart.renderer.forExport && pick(
|
|
658
687
|
seriesDlOptions.defer,
|
|
659
688
|
fadeInDuration > 0
|
|
660
689
|
),
|
|
@@ -953,7 +982,7 @@ Series.prototype.drawDataLabels = function () {
|
|
|
953
982
|
dataLabel.add(dataLabelsGroup);
|
|
954
983
|
}
|
|
955
984
|
|
|
956
|
-
if (labelOptions.textPath) {
|
|
985
|
+
if (labelOptions.textPath && !labelOptions.useHTML) {
|
|
957
986
|
dataLabel.setTextPath(
|
|
958
987
|
(
|
|
959
988
|
point.getDataLabelPath &&
|