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
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
/**
|
|
10
10
|
* Formatter callback function.
|
|
11
11
|
*
|
|
12
|
-
* @callback Highcharts.
|
|
12
|
+
* @callback Highcharts.SeriesPackedBubbleDataLabelsFormatterCallbackFunction
|
|
13
13
|
*
|
|
14
|
-
* @param {Highcharts.
|
|
14
|
+
* @param {Highcharts.SeriesPackedBubbleDataLabelsFormatterContextObject|Highcharts.DataLabelsFormatterContextObject} this
|
|
15
15
|
* Data label context to format
|
|
16
16
|
*
|
|
17
17
|
* @return {string}
|
|
@@ -21,24 +21,24 @@
|
|
|
21
21
|
/**
|
|
22
22
|
* Context for the formatter function.
|
|
23
23
|
*
|
|
24
|
-
* @interface Highcharts.
|
|
24
|
+
* @interface Highcharts.SeriesPackedBubbleDataLabelsFormatterContextObject
|
|
25
25
|
* @extends Highcharts.DataLabelsFormatterContextObject
|
|
26
26
|
* @since 7.0.0
|
|
27
27
|
*//**
|
|
28
28
|
* The color of the node.
|
|
29
|
-
* @name Highcharts.
|
|
29
|
+
* @name Highcharts.SeriesPackedBubbleDataLabelsFormatterContextObject#color
|
|
30
30
|
* @type {Highcharts.ColorString}
|
|
31
31
|
* @since 7.0.0
|
|
32
32
|
*//**
|
|
33
33
|
* The point (node) object. The node name, if defined, is available through
|
|
34
34
|
* `this.point.name`. Arrays: `this.point.linksFrom` and `this.point.linksTo`
|
|
35
35
|
* contains all nodes connected to this point.
|
|
36
|
-
* @name Highcharts.
|
|
36
|
+
* @name Highcharts.SeriesPackedBubbleDataLabelsFormatterContextObject#point
|
|
37
37
|
* @type {Highcharts.Point}
|
|
38
38
|
* @since 7.0.0
|
|
39
39
|
*//**
|
|
40
40
|
* The ID of the node.
|
|
41
|
-
* @name Highcharts.
|
|
41
|
+
* @name Highcharts.SeriesPackedBubbleDataLabelsFormatterContextObject#key
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @since 7.0.0
|
|
44
44
|
*/
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
/**
|
|
47
47
|
* Data labels options
|
|
48
48
|
*
|
|
49
|
-
* @interface Highcharts.
|
|
49
|
+
* @interface Highcharts.SeriesPackedBubbleDataLabelsOptionsObject
|
|
50
50
|
* @extends Highcharts.DataLabelsOptionsObject
|
|
51
51
|
* @since 7.0.0
|
|
52
52
|
*//**
|
|
@@ -54,54 +54,54 @@
|
|
|
54
54
|
* [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)
|
|
55
55
|
* specifying what to show for _node_ in the networkgraph. In v7.0 defaults to
|
|
56
56
|
* `{key}`, since v7.1 defaults to `undefined` and `formatter` is used instead.
|
|
57
|
-
* @name Highcharts.
|
|
57
|
+
* @name Highcharts.SeriesPackedBubbleDataLabelsOptionsObject#format
|
|
58
58
|
* @type {string}
|
|
59
59
|
* @since 7.0.0
|
|
60
60
|
*//**
|
|
61
61
|
* Callback JavaScript function to format the data label for a node. Note that
|
|
62
62
|
* if a `format` is defined, the format takes precedence and the formatter is
|
|
63
63
|
* ignored.
|
|
64
|
-
* @name Highcharts.
|
|
65
|
-
* @type {Highcharts.
|
|
64
|
+
* @name Highcharts.SeriesPackedBubbleDataLabelsOptionsObject#formatter
|
|
65
|
+
* @type {Highcharts.SeriesPackedBubbleDataLabelsFormatterCallbackFunction|undefined}
|
|
66
66
|
* @since 7.0.0
|
|
67
67
|
*//**
|
|
68
68
|
* Callback to format data labels for _parentNodes_. The `parentNodeFormat`
|
|
69
69
|
* option takes precedence over the `parentNodeFormatter`.
|
|
70
|
-
* @name Highcharts.
|
|
70
|
+
* @name Highcharts.SeriesPackedBubbleDataLabelsFormatterContextObject#parentNodeFormatter
|
|
71
71
|
* @type {Highcharts.FormatterCallbackFunction<Highcharts.DataLabelsFormatterContextObject>}
|
|
72
72
|
* @since 7.1.0
|
|
73
73
|
*//**
|
|
74
74
|
* Options for a _parentNode_ label text.
|
|
75
75
|
* @sample highcharts/series-packedbubble/packed-dashboard
|
|
76
76
|
* Dashboard with dataLabels on parentNodes
|
|
77
|
-
* @name Highcharts.
|
|
78
|
-
* @type {Highcharts.
|
|
77
|
+
* @name Highcharts.SeriesPackedBubbleDataLabelsFormatterContextObject#parentNodeTextPath
|
|
78
|
+
* @type {Highcharts.SeriesPackedBubbleDataLabelsTextPath}
|
|
79
79
|
* @since 7.1.0
|
|
80
80
|
*//**
|
|
81
81
|
* Options for a _node_ label text which should follow marker's shape.
|
|
82
82
|
* **Note:** Only SVG-based renderer supports this option.
|
|
83
|
-
* @see {@link Highcharts.
|
|
84
|
-
* @name Highcharts.
|
|
85
|
-
* @type {Highcharts.
|
|
83
|
+
* @see {@link Highcharts.SeriesPackedBubbleDataLabelsTextPath#linkTextPath}
|
|
84
|
+
* @name Highcharts.SeriesPackedBubbleDataLabelsOptionsObject#textPath
|
|
85
|
+
* @type {Highcharts.SeriesPackedBubbleDataLabelsTextPath}
|
|
86
86
|
* @since 7.1.0
|
|
87
87
|
*/
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
90
|
* **Note:** Only SVG-based renderer supports this option.
|
|
91
91
|
*
|
|
92
|
-
* @see {@link Highcharts.
|
|
93
|
-
* @see {@link Highcharts.
|
|
92
|
+
* @see {@link Highcharts.SeriesNetworkDataLabelsTextPath#linkTextPath}
|
|
93
|
+
* @see {@link Highcharts.SeriesNetworkDataLabelsTextPath#textPath}
|
|
94
94
|
*
|
|
95
|
-
* @interface Highcharts.
|
|
95
|
+
* @interface Highcharts.SeriesPackedBubbleDataLabelsTextPath
|
|
96
96
|
* @since 7.1.0
|
|
97
97
|
*//**
|
|
98
98
|
* Presentation attributes for the text path.
|
|
99
|
-
* @name Highcharts.
|
|
99
|
+
* @name Highcharts.SeriesPackedBubbleDataLabelsTextPath#attributes
|
|
100
100
|
* @type {Highcharts.SVGAttributes}
|
|
101
101
|
* @since 7.1.0
|
|
102
102
|
*//**
|
|
103
103
|
* Enable or disable `textPath` option for link's or marker's data labels.
|
|
104
|
-
* @name Highcharts.
|
|
104
|
+
* @name Highcharts.SeriesPackedBubbleDataLabelsTextPath#enabled
|
|
105
105
|
* @type {boolean|undefined}
|
|
106
106
|
* @since 7.1.0
|
|
107
107
|
*/
|
|
@@ -188,8 +188,7 @@ H.layouts.packedbubble = H.extendClass(
|
|
|
188
188
|
if (this.options.marker) {
|
|
189
189
|
this.series.forEach(function (series) {
|
|
190
190
|
if (series) {
|
|
191
|
-
series.
|
|
192
|
-
series.drawPoints();
|
|
191
|
+
series.calculateParentRadius();
|
|
193
192
|
}
|
|
194
193
|
});
|
|
195
194
|
}
|
|
@@ -325,7 +324,10 @@ H.layouts.packedbubble = H.extendClass(
|
|
|
325
324
|
(
|
|
326
325
|
// In first iteration system does not move:
|
|
327
326
|
this.systemTemperature > 0 &&
|
|
328
|
-
|
|
327
|
+
(
|
|
328
|
+
this.systemTemperature / this.nodes.length < 0.02 &&
|
|
329
|
+
this.enableSimulation
|
|
330
|
+
) // Use only when simulation is enabled
|
|
329
331
|
);
|
|
330
332
|
}
|
|
331
333
|
}
|
|
@@ -422,7 +424,8 @@ seriesType(
|
|
|
422
424
|
*/
|
|
423
425
|
useSimulation: true,
|
|
424
426
|
/**
|
|
425
|
-
* @type
|
|
427
|
+
* @type {Highcharts.SeriesPackedBubbleDataLabelsOptionsObject|Array<Highcharts.SeriesPackedBubbleDataLabelsOptionsObject>}
|
|
428
|
+
* @default {"formatter": function () { return this.point.value; }, "parentNodeFormatter": function () { return this.name; }, "parentNodeTextPath": {"enabled: true}, "padding": 0}
|
|
426
429
|
*
|
|
427
430
|
* @private
|
|
428
431
|
*/
|
|
@@ -519,7 +522,7 @@ seriesType(
|
|
|
519
522
|
* @sample highcharts/series-packedbubble/parentnode-style/
|
|
520
523
|
* Bubble size
|
|
521
524
|
*
|
|
522
|
-
* @extends plotOptions.
|
|
525
|
+
* @extends plotOptions.series.marker
|
|
523
526
|
* @excluding states
|
|
524
527
|
*/
|
|
525
528
|
marker: {
|
|
@@ -646,14 +649,18 @@ seriesType(
|
|
|
646
649
|
var series = this,
|
|
647
650
|
dataLabels = [];
|
|
648
651
|
Series.prototype.render.apply(this, arguments);
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
652
|
+
// #10823 - dataLabels should stay visible
|
|
653
|
+
// when enabled allowOverlap.
|
|
654
|
+
if (!series.options.dataLabels.allowOverlap) {
|
|
655
|
+
series.data.forEach(function (point) {
|
|
656
|
+
if (H.isArray(point.dataLabels)) {
|
|
657
|
+
point.dataLabels.forEach(function (dataLabel) {
|
|
658
|
+
dataLabels.push(dataLabel);
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
});
|
|
662
|
+
series.chart.hideOverlappingLabels(dataLabels);
|
|
663
|
+
}
|
|
657
664
|
},
|
|
658
665
|
// Needed because of z-indexing issue if point is added in series.group
|
|
659
666
|
setVisible: function () {
|
|
@@ -704,6 +711,38 @@ seriesType(
|
|
|
704
711
|
this.options.dataLabels.textPath = textPath;
|
|
705
712
|
}
|
|
706
713
|
},
|
|
714
|
+
/**
|
|
715
|
+
* The function responsible for calculating series bubble' s bBox.
|
|
716
|
+
* Needed because of exporting failure when useSimulation
|
|
717
|
+
* is set to false
|
|
718
|
+
* @private
|
|
719
|
+
*/
|
|
720
|
+
seriesBox: function () {
|
|
721
|
+
var series = this,
|
|
722
|
+
chart = series.chart,
|
|
723
|
+
data = series.data,
|
|
724
|
+
max = Math.max,
|
|
725
|
+
min = Math.min,
|
|
726
|
+
radius,
|
|
727
|
+
// bBox = [xMin, xMax, yMin, yMax]
|
|
728
|
+
bBox = [
|
|
729
|
+
chart.plotLeft,
|
|
730
|
+
chart.plotLeft + chart.plotWidth,
|
|
731
|
+
chart.plotTop,
|
|
732
|
+
chart.plotTop + chart.plotHeight
|
|
733
|
+
];
|
|
734
|
+
|
|
735
|
+
data.forEach(function (p) {
|
|
736
|
+
if (defined(p.plotX) && defined(p.plotY) && p.marker.radius) {
|
|
737
|
+
radius = p.marker.radius;
|
|
738
|
+
bBox[0] = min(bBox[0], p.plotX - radius);
|
|
739
|
+
bBox[1] = max(bBox[1], p.plotX + radius);
|
|
740
|
+
bBox[2] = min(bBox[2], p.plotY - radius);
|
|
741
|
+
bBox[3] = max(bBox[3], p.plotY + radius);
|
|
742
|
+
}
|
|
743
|
+
});
|
|
744
|
+
return H.isNumber(bBox.width / bBox.height) ? bBox : null;
|
|
745
|
+
},
|
|
707
746
|
/**
|
|
708
747
|
* The function responsible for calculating the parent node radius
|
|
709
748
|
* based on the total surface of iniside-bubbles and the group BBox
|
|
@@ -715,10 +754,7 @@ seriesType(
|
|
|
715
754
|
parentPadding = 20,
|
|
716
755
|
minParentRadius = 20;
|
|
717
756
|
|
|
718
|
-
|
|
719
|
-
bBox = series.group.element.getBBox();
|
|
720
|
-
}
|
|
721
|
-
|
|
757
|
+
bBox = series.seriesBox();
|
|
722
758
|
series.parentNodeRadius =
|
|
723
759
|
Math.min(
|
|
724
760
|
Math.max(
|
|
@@ -1122,16 +1158,7 @@ seriesType(
|
|
|
1122
1158
|
return b[2] - a[2];
|
|
1123
1159
|
});
|
|
1124
1160
|
|
|
1125
|
-
if (sortedArr.length
|
|
1126
|
-
// if length is 1,return only one bubble
|
|
1127
|
-
arr = [
|
|
1128
|
-
0, 0,
|
|
1129
|
-
sortedArr[0][0],
|
|
1130
|
-
sortedArr[0][1],
|
|
1131
|
-
sortedArr[0][2]
|
|
1132
|
-
];
|
|
1133
|
-
} else if (sortedArr.length) {
|
|
1134
|
-
|
|
1161
|
+
if (sortedArr.length) {
|
|
1135
1162
|
// create first bubble in the middle of the chart
|
|
1136
1163
|
bubblePos.push([
|
|
1137
1164
|
[
|
|
@@ -1142,74 +1169,78 @@ seriesType(
|
|
|
1142
1169
|
sortedArr[0][4]
|
|
1143
1170
|
] // point index
|
|
1144
1171
|
]); // 0 level bubble
|
|
1172
|
+
if (sortedArr.length > 1) {
|
|
1173
|
+
|
|
1174
|
+
bubblePos.push([
|
|
1175
|
+
[
|
|
1176
|
+
0,
|
|
1177
|
+
0 - sortedArr[1][2] - sortedArr[0][2],
|
|
1178
|
+
// move bubble above first one
|
|
1179
|
+
sortedArr[1][2],
|
|
1180
|
+
sortedArr[1][3],
|
|
1181
|
+
sortedArr[1][4]
|
|
1182
|
+
]
|
|
1183
|
+
]); // 1 level 1st bubble
|
|
1184
|
+
|
|
1185
|
+
// first two already positioned so starting from 2
|
|
1186
|
+
for (i = 2; i < sortedArr.length; i++) {
|
|
1187
|
+
sortedArr[i][2] = sortedArr[i][2] || 1;
|
|
1188
|
+
// in case if radius is calculated as 0.
|
|
1189
|
+
calculatedBubble = positionBubble(
|
|
1190
|
+
bubblePos[stage][j],
|
|
1191
|
+
bubblePos[stage - 1][k],
|
|
1192
|
+
sortedArr[i]
|
|
1193
|
+
); // calculate initial bubble position
|
|
1145
1194
|
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
/* reset index of bubble, used for
|
|
1175
|
-
* positioning the bubbles
|
|
1176
|
-
* around it, we are starting from first bubble in next
|
|
1177
|
-
* stage because we are changing level to higher
|
|
1178
|
-
*/
|
|
1179
|
-
bubblePos[stage + 1].push(
|
|
1180
|
-
positionBubble(
|
|
1181
|
-
bubblePos[stage][j],
|
|
1182
|
-
bubblePos[stage][0],
|
|
1183
|
-
sortedArr[i]
|
|
1184
|
-
)
|
|
1185
|
-
);
|
|
1186
|
-
// (last added bubble, 1. from curr stage, new bubble)
|
|
1187
|
-
stage++; // the new level is created, above current one
|
|
1188
|
-
j = 0; // set the index of bubble in current level to 0
|
|
1189
|
-
} else if (
|
|
1190
|
-
stage > 1 && bubblePos[stage - 1][k + 1] &&
|
|
1191
|
-
checkOverlap(
|
|
1192
|
-
calculatedBubble, bubblePos[stage - 1][k + 1]
|
|
1193
|
-
)
|
|
1194
|
-
) {
|
|
1195
|
-
/* if new bubble is overlapping with one of the previous
|
|
1196
|
-
* stage bubbles, it means that - bubble, used for
|
|
1197
|
-
* positioning the bubbles around it has changed
|
|
1198
|
-
* so we need to recalculate it
|
|
1199
|
-
*/
|
|
1200
|
-
k++;
|
|
1201
|
-
bubblePos[stage].push(
|
|
1202
|
-
positionBubble(
|
|
1203
|
-
bubblePos[stage][j],
|
|
1204
|
-
bubblePos[stage - 1][k],
|
|
1205
|
-
sortedArr[i]
|
|
1195
|
+
if (
|
|
1196
|
+
checkOverlap(calculatedBubble, bubblePos[stage][0])
|
|
1197
|
+
) {
|
|
1198
|
+
/* if new bubble is overlapping with first bubble
|
|
1199
|
+
* in current level (stage)
|
|
1200
|
+
*/
|
|
1201
|
+
|
|
1202
|
+
bubblePos.push([]);
|
|
1203
|
+
k = 0;
|
|
1204
|
+
/* reset index of bubble, used for
|
|
1205
|
+
* positioning the bubbles around it,
|
|
1206
|
+
* we are starting from first bubble in next
|
|
1207
|
+
* stage because we are changing level to higher
|
|
1208
|
+
*/
|
|
1209
|
+
bubblePos[stage + 1].push(
|
|
1210
|
+
positionBubble(
|
|
1211
|
+
bubblePos[stage][j],
|
|
1212
|
+
bubblePos[stage][0],
|
|
1213
|
+
sortedArr[i]
|
|
1214
|
+
)
|
|
1215
|
+
);
|
|
1216
|
+
// (last bubble, 1. from curr stage, new bubble)
|
|
1217
|
+
stage++; // the new level is created, above current
|
|
1218
|
+
j = 0; // set the index of bubble in curr level to 0
|
|
1219
|
+
} else if (
|
|
1220
|
+
stage > 1 && bubblePos[stage - 1][k + 1] &&
|
|
1221
|
+
checkOverlap(
|
|
1222
|
+
calculatedBubble, bubblePos[stage - 1][k + 1]
|
|
1206
1223
|
)
|
|
1207
|
-
)
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1224
|
+
) {
|
|
1225
|
+
/* if new bubble is overlapping with one of the prev
|
|
1226
|
+
* stage bubbles, it means that - bubble, used for
|
|
1227
|
+
* positioning the bubbles around it has changed
|
|
1228
|
+
* so we need to recalculate it
|
|
1229
|
+
*/
|
|
1230
|
+
k++;
|
|
1231
|
+
bubblePos[stage].push(
|
|
1232
|
+
positionBubble(
|
|
1233
|
+
bubblePos[stage][j],
|
|
1234
|
+
bubblePos[stage - 1][k],
|
|
1235
|
+
sortedArr[i]
|
|
1236
|
+
)
|
|
1237
|
+
);
|
|
1238
|
+
// (last bubble, prev stage bubble, new bubble)
|
|
1239
|
+
j++;
|
|
1240
|
+
} else { // simply add calculated bubble
|
|
1241
|
+
j++;
|
|
1242
|
+
bubblePos[stage].push(calculatedBubble);
|
|
1243
|
+
}
|
|
1213
1244
|
}
|
|
1214
1245
|
}
|
|
1215
1246
|
series.chart.stages = bubblePos;
|
|
@@ -1221,7 +1252,6 @@ seriesType(
|
|
|
1221
1252
|
|
|
1222
1253
|
series.resizeRadius();
|
|
1223
1254
|
arr = series.chart.rawPositions;
|
|
1224
|
-
|
|
1225
1255
|
}
|
|
1226
1256
|
return arr;
|
|
1227
1257
|
},
|
|
@@ -1527,7 +1557,14 @@ addEvent(Chart, 'beforeRedraw', function () {
|
|
|
1527
1557
|
* @apioption series.packedbubble.data
|
|
1528
1558
|
*/
|
|
1529
1559
|
|
|
1560
|
+
/**
|
|
1561
|
+
* @type {Highcharts.SeriesPackedBubbleDataLabelsOptionsObject|Array<Highcharts.SeriesPackedBubbleDataLabelsOptionsObject>}
|
|
1562
|
+
* @product highcharts
|
|
1563
|
+
* @apioption series.packedbubble.data.dataLabels
|
|
1564
|
+
*/
|
|
1565
|
+
|
|
1530
1566
|
/**
|
|
1531
1567
|
* @excluding enabled,enabledThreshold,height,radius,width
|
|
1568
|
+
* @product highcharts
|
|
1532
1569
|
* @apioption series.packedbubble.marker
|
|
1533
1570
|
*/
|
|
@@ -322,8 +322,8 @@ radialAxisMixin = {
|
|
|
322
322
|
|
|
323
323
|
// Polygonal plot bands
|
|
324
324
|
if (this.options.gridLineInterpolation === 'polygon') {
|
|
325
|
-
ret = this.getPlotLinePath(from).concat(
|
|
326
|
-
this.getPlotLinePath(to, true)
|
|
325
|
+
ret = this.getPlotLinePath({ value: from }).concat(
|
|
326
|
+
this.getPlotLinePath({ value: to, reverse: true })
|
|
327
327
|
);
|
|
328
328
|
|
|
329
329
|
// Circular grid bands
|
|
@@ -408,10 +408,12 @@ radialAxisMixin = {
|
|
|
408
408
|
/* *
|
|
409
409
|
* Find the path for plot lines perpendicular to the radial axis.
|
|
410
410
|
*/
|
|
411
|
-
getPlotLinePath: function (
|
|
411
|
+
getPlotLinePath: function (options) {
|
|
412
412
|
var axis = this,
|
|
413
413
|
center = axis.center,
|
|
414
414
|
chart = axis.chart,
|
|
415
|
+
value = options.value,
|
|
416
|
+
reverse = options.reverse,
|
|
415
417
|
end = axis.getPosition(value),
|
|
416
418
|
xAxis,
|
|
417
419
|
xy,
|
|
@@ -462,6 +464,7 @@ radialAxisMixin = {
|
|
|
462
464
|
});
|
|
463
465
|
|
|
464
466
|
}
|
|
467
|
+
|
|
465
468
|
return ret;
|
|
466
469
|
},
|
|
467
470
|
|
|
@@ -605,6 +608,7 @@ addEvent(Tick, 'afterGetPosition', function (e) {
|
|
|
605
608
|
addEvent(Tick, 'afterGetLabelPosition', function (e) {
|
|
606
609
|
var axis = this.axis,
|
|
607
610
|
label = this.label,
|
|
611
|
+
labelBBox = label.getBBox(),
|
|
608
612
|
labelOptions = axis.options.labels,
|
|
609
613
|
optionsY = labelOptions.y,
|
|
610
614
|
ret,
|
|
@@ -613,11 +617,27 @@ addEvent(Tick, 'afterGetLabelPosition', function (e) {
|
|
|
613
617
|
angle = (
|
|
614
618
|
(axis.translate(this.pos) + axis.startAngleRad + Math.PI / 2) /
|
|
615
619
|
Math.PI * 180
|
|
616
|
-
) % 360
|
|
620
|
+
) % 360,
|
|
621
|
+
correctAngle = Math.round(angle),
|
|
622
|
+
labelDir = 'end', // Direction of the label 'start' or 'end'
|
|
623
|
+
reducedAngle1 = correctAngle < 0 ?
|
|
624
|
+
correctAngle + 360 : correctAngle,
|
|
625
|
+
reducedAngle2 = reducedAngle1,
|
|
626
|
+
translateY = 0,
|
|
627
|
+
translateX = 0,
|
|
628
|
+
labelYPosCorrection =
|
|
629
|
+
labelOptions.y === null ? -labelBBox.height * 0.3 : 0;
|
|
617
630
|
|
|
618
631
|
if (axis.isRadial) { // Both X and Y axes in a polar chart
|
|
619
|
-
ret = axis.getPosition(
|
|
620
|
-
|
|
632
|
+
ret = axis.getPosition(
|
|
633
|
+
this.pos,
|
|
634
|
+
(axis.center[2] / 2) +
|
|
635
|
+
H.relativeLength(
|
|
636
|
+
pick(labelOptions.distance, -25),
|
|
637
|
+
axis.center[2] / 2,
|
|
638
|
+
-axis.center[2] / 2
|
|
639
|
+
)
|
|
640
|
+
);
|
|
621
641
|
|
|
622
642
|
// Automatically rotated
|
|
623
643
|
if (labelOptions.rotation === 'auto') {
|
|
@@ -630,7 +650,7 @@ addEvent(Tick, 'afterGetLabelPosition', function (e) {
|
|
|
630
650
|
optionsY = (
|
|
631
651
|
axis.chart.renderer
|
|
632
652
|
.fontMetrics(label.styles && label.styles.fontSize).b -
|
|
633
|
-
|
|
653
|
+
labelBBox.height / 2
|
|
634
654
|
);
|
|
635
655
|
}
|
|
636
656
|
|
|
@@ -638,7 +658,7 @@ addEvent(Tick, 'afterGetLabelPosition', function (e) {
|
|
|
638
658
|
if (align === null) {
|
|
639
659
|
if (axis.isCircular) { // Y axis
|
|
640
660
|
if (
|
|
641
|
-
|
|
661
|
+
labelBBox.width >
|
|
642
662
|
axis.len * axis.tickInterval / (axis.max - axis.min)
|
|
643
663
|
) { // #3506
|
|
644
664
|
centerSlot = 0;
|
|
@@ -661,6 +681,80 @@ addEvent(Tick, 'afterGetLabelPosition', function (e) {
|
|
|
661
681
|
});
|
|
662
682
|
}
|
|
663
683
|
|
|
684
|
+
// Auto alignment for solid-gauges with two labels (#10635)
|
|
685
|
+
if (
|
|
686
|
+
align === 'auto' &&
|
|
687
|
+
axis.tickPositions.length === 2 &&
|
|
688
|
+
axis.isCircular
|
|
689
|
+
) {
|
|
690
|
+
// Angles reduced to 0 - 90 or 180 - 270
|
|
691
|
+
if (reducedAngle1 > 90 && reducedAngle1 < 180) {
|
|
692
|
+
reducedAngle1 = 180 - reducedAngle1;
|
|
693
|
+
} else if (reducedAngle1 > 270 && reducedAngle1 <= 360) {
|
|
694
|
+
reducedAngle1 = 540 - reducedAngle1;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
// Angles reduced to 0 - 180
|
|
698
|
+
if (reducedAngle2 > 180 && reducedAngle2 <= 360) {
|
|
699
|
+
reducedAngle2 = 360 - reducedAngle2;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
if (
|
|
703
|
+
(axis.pane.options.startAngle === correctAngle) ||
|
|
704
|
+
(axis.pane.options.startAngle === correctAngle + 360) ||
|
|
705
|
+
(axis.pane.options.startAngle === correctAngle - 360)
|
|
706
|
+
) {
|
|
707
|
+
labelDir = 'start';
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
if (
|
|
711
|
+
(correctAngle >= -90 && correctAngle <= 90) ||
|
|
712
|
+
(correctAngle >= -360 && correctAngle <= -270) ||
|
|
713
|
+
(correctAngle >= 270 && correctAngle <= 360)
|
|
714
|
+
) {
|
|
715
|
+
align = (labelDir === 'start') ? 'right' : 'left';
|
|
716
|
+
} else {
|
|
717
|
+
align = (labelDir === 'start') ? 'left' : 'right';
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
// For angles beetwen (90 + n * 180) +- 20
|
|
721
|
+
if (reducedAngle2 > 70 && reducedAngle2 < 110) {
|
|
722
|
+
align = 'center';
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
// auto Y translation
|
|
726
|
+
if (
|
|
727
|
+
reducedAngle1 < 15 ||
|
|
728
|
+
(reducedAngle1 >= 180 && reducedAngle1 < 195)
|
|
729
|
+
) {
|
|
730
|
+
translateY = labelBBox.height * 0.3;
|
|
731
|
+
} else if (reducedAngle1 >= 15 && reducedAngle1 <= 35) {
|
|
732
|
+
translateY = labelDir === 'start' ?
|
|
733
|
+
0 : labelBBox.height * 0.75;
|
|
734
|
+
} else if (reducedAngle1 >= 195 && reducedAngle1 <= 215) {
|
|
735
|
+
translateY = labelDir === 'start' ?
|
|
736
|
+
labelBBox.height * 0.75 : 0;
|
|
737
|
+
} else if (reducedAngle1 > 35 && reducedAngle1 <= 90) {
|
|
738
|
+
translateY = labelDir === 'start' ?
|
|
739
|
+
-labelBBox.height * 0.25 : labelBBox.height;
|
|
740
|
+
} else if (reducedAngle1 > 215 && reducedAngle1 <= 270) {
|
|
741
|
+
translateY = labelDir === 'start' ?
|
|
742
|
+
labelBBox.height : -labelBBox.height * 0.25;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
// auto X translation
|
|
746
|
+
if (reducedAngle2 < 15) {
|
|
747
|
+
translateX = labelDir === 'start' ?
|
|
748
|
+
-labelBBox.height * 0.15 : labelBBox.height * 0.15;
|
|
749
|
+
} else if (reducedAngle2 > 165 && reducedAngle2 <= 180) {
|
|
750
|
+
translateX = labelDir === 'start' ?
|
|
751
|
+
labelBBox.height * 0.15 : -labelBBox.height * 0.15;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
label.attr({ align: align });
|
|
755
|
+
label.translate(translateX, translateY + labelYPosCorrection);
|
|
756
|
+
}
|
|
757
|
+
|
|
664
758
|
e.pos.x = ret.x + labelOptions.x;
|
|
665
759
|
e.pos.y = ret.y + optionsY;
|
|
666
760
|
|