highcharts 6.1.4 → 6.2.0
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/highcharts.css +17 -0
- package/css/highcharts.scss +14 -0
- package/css/themes/dark-unica.css +17 -0
- package/css/themes/grid-light.css +17 -0
- package/css/themes/sand-signika.css +17 -0
- package/es-modules/indicators/momentum.src.js +1 -1
- package/es-modules/indicators/pivot-points.src.js +6 -1
- package/es-modules/masters/highcharts-gantt.src.js +11 -0
- package/es-modules/masters/modules/annotations.src.js +1 -1
- package/es-modules/masters/modules/arrow-symbols.src.js +12 -0
- package/es-modules/masters/modules/broken-axis.src.js +1 -1
- package/es-modules/masters/modules/current-date-indicator.src.js +12 -0
- package/es-modules/masters/modules/data.src.js +1 -1
- package/es-modules/masters/modules/draggable-points.src.js +9 -0
- package/es-modules/masters/modules/export-data.src.js +1 -1
- package/es-modules/masters/modules/exporting.src.js +1 -1
- package/es-modules/masters/modules/funnel.src.js +1 -1
- package/es-modules/masters/modules/gantt.src.js +2 -1
- package/es-modules/masters/modules/grid-axis.src.js +1 -1
- package/es-modules/masters/modules/heatmap.src.js +1 -1
- package/es-modules/masters/modules/item-series.src.js +1 -1
- package/es-modules/masters/modules/map.src.js +1 -1
- package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
- package/es-modules/masters/modules/pathfinder.src.js +12 -0
- package/es-modules/masters/modules/sankey.src.js +1 -1
- package/es-modules/masters/modules/series-label.src.js +1 -1
- package/es-modules/masters/modules/solid-gauge.src.js +1 -1
- package/es-modules/masters/modules/stock.src.js +1 -1
- package/es-modules/masters/modules/streamgraph.src.js +1 -1
- package/es-modules/masters/modules/treegrid.src.js +12 -0
- package/es-modules/masters/modules/variwide.src.js +1 -1
- package/es-modules/masters/modules/vector.src.js +1 -1
- package/es-modules/masters/modules/windbarb.src.js +1 -1
- package/es-modules/masters/modules/xrange.src.js +1 -1
- package/es-modules/masters/themes/dark-blue.src.js +1 -1
- package/es-modules/masters/themes/dark-green.src.js +1 -1
- package/es-modules/masters/themes/dark-unica.src.js +1 -1
- package/es-modules/masters/themes/gray.src.js +1 -1
- package/es-modules/masters/themes/grid-light.src.js +1 -1
- package/es-modules/masters/themes/grid.src.js +1 -1
- package/es-modules/masters/themes/sand-signika.src.js +1 -1
- package/es-modules/masters/themes/skies.src.js +1 -1
- package/es-modules/mixins/centered-series.js +1 -1
- package/es-modules/mixins/on-series.js +1 -1
- package/es-modules/modules/boost.src.js +22 -14
- package/es-modules/modules/broken-axis.src.js +169 -134
- package/es-modules/modules/data.src.js +2 -2
- package/es-modules/modules/draggable-points.src.js +2257 -0
- package/es-modules/modules/drilldown.src.js +1 -0
- package/es-modules/modules/export-data.src.js +1 -1
- package/es-modules/modules/exporting.src.js +1 -1
- package/es-modules/modules/funnel.src.js +1 -1
- package/es-modules/modules/item-series.src.js +1 -1
- package/es-modules/modules/no-data-to-display.src.js +5 -5
- package/es-modules/modules/oldie.src.js +1 -1
- package/es-modules/modules/overlapping-datalabels.src.js +38 -22
- package/es-modules/modules/parallel-coordinates.src.js +3 -2
- package/es-modules/modules/sankey.src.js +1 -1
- package/es-modules/modules/series-label.src.js +2 -2
- package/es-modules/modules/solid-gauge.src.js +1 -1
- package/es-modules/modules/static-scale.src.js +67 -28
- package/es-modules/modules/streamgraph.src.js +1 -1
- package/es-modules/modules/tilemap.src.js +231 -134
- package/es-modules/modules/variwide.src.js +1 -1
- package/es-modules/modules/vector.src.js +92 -22
- package/es-modules/modules/windbarb.src.js +1 -1
- package/es-modules/modules/xrange.src.js +257 -77
- package/es-modules/parts/AreaSeries.js +77 -77
- package/es-modules/parts/AreaSplineSeries.js +64 -27
- package/es-modules/parts/Axis.js +160 -67
- package/es-modules/parts/BarSeries.js +68 -51
- package/es-modules/parts/CandlestickSeries.js +1 -1
- package/es-modules/parts/Chart.js +31 -55
- package/es-modules/parts/Color.js +29 -18
- package/es-modules/parts/ColumnSeries.js +264 -142
- package/es-modules/parts/DataGrouping.js +9 -6
- package/es-modules/parts/DataLabels.js +261 -210
- package/es-modules/parts/DateTimeAxis.js +26 -7
- package/es-modules/parts/Dynamics.js +5 -2
- package/es-modules/parts/FlagsSeries.js +1 -1
- package/es-modules/parts/Globals.js +1 -1
- package/es-modules/parts/Html.js +64 -12
- package/es-modules/parts/Interaction.js +187 -63
- package/es-modules/parts/Legend.js +7 -3
- package/es-modules/parts/LogarithmicAxis.js +35 -4
- package/es-modules/parts/MSPointer.js +1 -1
- package/es-modules/parts/Navigator.js +27 -5
- package/es-modules/parts/OHLCSeries.js +1 -1
- package/es-modules/parts/Options.js +15 -13
- package/es-modules/parts/OrdinalAxis.js +1 -1
- package/es-modules/parts/PieSeries.js +256 -140
- package/es-modules/parts/PlotBandSeries.experimental.js +1 -1
- package/es-modules/parts/PlotLineOrBand.js +7 -40
- package/es-modules/parts/Point.js +28 -4
- package/es-modules/parts/Pointer.js +8 -6
- package/es-modules/parts/RangeSelector.js +1 -1
- package/es-modules/parts/Responsive.js +82 -36
- package/es-modules/parts/ScatterSeries.js +57 -25
- package/es-modules/parts/ScrollablePlotArea.js +17 -7
- package/es-modules/parts/Scrollbar.js +9 -2
- package/es-modules/parts/Series.js +22 -9
- package/es-modules/parts/SplineSeries.js +51 -29
- package/es-modules/parts/Stacking.js +100 -6
- package/es-modules/parts/StockChart.js +9 -3
- package/es-modules/parts/SvgRenderer.js +15 -10
- package/es-modules/parts/Tick.js +150 -30
- package/es-modules/parts/Time.js +23 -5
- package/es-modules/parts/Tooltip.js +2 -2
- package/es-modules/parts/TouchPointer.js +1 -1
- package/es-modules/parts/Utilities.js +16 -1
- package/es-modules/parts-3d/Axis.js +1 -1
- package/es-modules/parts-3d/Chart.js +1 -1
- package/es-modules/parts-3d/Column.js +1 -1
- package/es-modules/parts-3d/Math.js +1 -1
- package/es-modules/parts-3d/Pie.js +1 -1
- package/es-modules/parts-3d/SVGRenderer.js +1 -1
- package/es-modules/parts-3d/Scatter.js +1 -1
- package/es-modules/parts-3d/Series.js +1 -1
- package/es-modules/parts-3d/VMLRenderer.js +1 -1
- package/es-modules/parts-gantt/ArrowSymbols.js +110 -0
- package/es-modules/parts-gantt/CurrentDateIndicator.js +92 -0
- package/es-modules/parts-gantt/GanttChart.js +111 -0
- package/es-modules/parts-gantt/GanttSeries.js +376 -0
- package/es-modules/parts-gantt/GridAxis.js +965 -0
- package/es-modules/parts-gantt/Pathfinder.js +1247 -0
- package/es-modules/parts-gantt/PathfinderAlgorithms.js +746 -0
- package/es-modules/parts-gantt/Tree.js +146 -0
- package/es-modules/parts-gantt/TreeGrid.js +917 -0
- package/es-modules/parts-map/ColorAxis.js +1 -1
- package/es-modules/parts-map/ColorSeriesMixin.js +1 -1
- package/es-modules/parts-map/GeoJSON.js +1 -1
- package/es-modules/parts-map/HeatmapSeries.js +124 -53
- package/es-modules/parts-map/Map.js +1 -1
- package/es-modules/parts-map/MapAxis.js +1 -1
- package/es-modules/parts-map/MapBubbleSeries.js +1 -1
- package/es-modules/parts-map/MapLineSeries.js +1 -1
- package/es-modules/parts-map/MapNavigation.js +1 -1
- package/es-modules/parts-map/MapPointSeries.js +1 -1
- package/es-modules/parts-map/MapPointer.js +1 -1
- package/es-modules/parts-map/MapSeries.js +2 -2
- package/es-modules/parts-more/AreaRangeSeries.js +80 -38
- package/es-modules/parts-more/AreaSplineRangeSeries.js +1 -1
- package/es-modules/parts-more/BoxPlotSeries.js +1 -1
- package/es-modules/parts-more/BubbleSeries.js +1 -1
- package/es-modules/parts-more/ColumnRangeSeries.js +1 -1
- package/es-modules/parts-more/ErrorBarSeries.js +1 -1
- package/es-modules/parts-more/GaugeSeries.js +1 -1
- package/es-modules/parts-more/Pane.js +2 -1
- package/es-modules/parts-more/Polar.js +1 -1
- package/es-modules/parts-more/PolygonSeries.js +1 -1
- package/es-modules/parts-more/RadialAxis.js +5 -4
- package/es-modules/parts-more/WaterfallSeries.js +1 -1
- package/es-modules/supplemental.docs.js +0 -1955
- package/es-modules/themes/dark-blue.js +1 -1
- package/es-modules/themes/dark-green.js +1 -1
- package/es-modules/themes/dark-unica.js +1 -1
- package/es-modules/themes/gray.js +1 -1
- package/es-modules/themes/grid-light.js +1 -1
- package/es-modules/themes/grid.js +1 -1
- package/es-modules/themes/sand-signika.js +1 -1
- package/es-modules/themes/skies.js +1 -1
- package/highcharts-3d.js +1 -1
- package/highcharts-3d.src.js +10 -10
- package/highcharts-gantt.js +503 -0
- package/highcharts-gantt.js.map +1 -0
- package/highcharts-gantt.src.js +49289 -0
- package/highcharts-more.js +65 -64
- package/highcharts-more.js.map +1 -1
- package/highcharts-more.src.js +97 -53
- package/highcharts.js +415 -410
- package/highcharts.js.map +1 -1
- package/highcharts.src.js +2170 -1128
- package/highmaps.js +443 -438
- package/highmaps.js.map +1 -1
- package/highmaps.src.js +1647 -849
- package/highstock.js +553 -548
- package/highstock.js.map +1 -1
- package/highstock.src.js +2398 -1283
- package/indicators/accumulation-distribution.js +1 -1
- package/indicators/accumulation-distribution.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/cmf.js +1 -1
- package/indicators/cmf.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.js +1 -1
- package/indicators/indicators.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 +2 -2
- package/indicators/pivot-points.js +4 -4
- package/indicators/pivot-points.js.map +1 -1
- package/indicators/pivot-points.src.js +7 -2
- 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/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/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/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/js/es-modules/indicators/momentum.src.js +1 -1
- package/js/es-modules/indicators/pivot-points.src.js +6 -1
- package/js/es-modules/masters/highcharts-gantt.src.js +11 -0
- package/js/es-modules/masters/modules/annotations.src.js +1 -1
- package/js/es-modules/masters/modules/arrow-symbols.src.js +12 -0
- package/js/es-modules/masters/modules/broken-axis.src.js +1 -1
- package/js/es-modules/masters/modules/current-date-indicator.src.js +12 -0
- package/js/es-modules/masters/modules/data.src.js +1 -1
- package/js/es-modules/masters/modules/draggable-points.src.js +9 -0
- package/js/es-modules/masters/modules/export-data.src.js +1 -1
- package/js/es-modules/masters/modules/exporting.src.js +1 -1
- package/js/es-modules/masters/modules/funnel.src.js +1 -1
- package/js/es-modules/masters/modules/gantt.src.js +2 -1
- package/js/es-modules/masters/modules/grid-axis.src.js +1 -1
- package/js/es-modules/masters/modules/heatmap.src.js +1 -1
- package/js/es-modules/masters/modules/item-series.src.js +1 -1
- package/js/es-modules/masters/modules/map.src.js +1 -1
- package/js/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
- package/js/es-modules/masters/modules/pathfinder.src.js +12 -0
- package/js/es-modules/masters/modules/sankey.src.js +1 -1
- package/js/es-modules/masters/modules/series-label.src.js +1 -1
- package/js/es-modules/masters/modules/solid-gauge.src.js +1 -1
- package/js/es-modules/masters/modules/stock.src.js +1 -1
- package/js/es-modules/masters/modules/streamgraph.src.js +1 -1
- package/js/es-modules/masters/modules/treegrid.src.js +12 -0
- package/js/es-modules/masters/modules/variwide.src.js +1 -1
- package/js/es-modules/masters/modules/vector.src.js +1 -1
- package/js/es-modules/masters/modules/windbarb.src.js +1 -1
- package/js/es-modules/masters/modules/xrange.src.js +1 -1
- package/js/es-modules/masters/themes/dark-blue.src.js +1 -1
- package/js/es-modules/masters/themes/dark-green.src.js +1 -1
- package/js/es-modules/masters/themes/dark-unica.src.js +1 -1
- package/js/es-modules/masters/themes/gray.src.js +1 -1
- package/js/es-modules/masters/themes/grid-light.src.js +1 -1
- package/js/es-modules/masters/themes/grid.src.js +1 -1
- package/js/es-modules/masters/themes/sand-signika.src.js +1 -1
- package/js/es-modules/masters/themes/skies.src.js +1 -1
- package/js/es-modules/mixins/centered-series.js +1 -1
- package/js/es-modules/mixins/on-series.js +1 -1
- package/js/es-modules/modules/boost.src.js +22 -14
- package/js/es-modules/modules/broken-axis.src.js +169 -134
- package/js/es-modules/modules/data.src.js +2 -2
- package/js/es-modules/modules/draggable-points.src.js +2257 -0
- package/js/es-modules/modules/drilldown.src.js +1 -0
- package/js/es-modules/modules/export-data.src.js +1 -1
- package/js/es-modules/modules/exporting.src.js +1 -1
- package/js/es-modules/modules/funnel.src.js +1 -1
- package/js/es-modules/modules/item-series.src.js +1 -1
- package/js/es-modules/modules/no-data-to-display.src.js +5 -5
- package/js/es-modules/modules/oldie.src.js +1 -1
- package/js/es-modules/modules/overlapping-datalabels.src.js +38 -22
- package/js/es-modules/modules/parallel-coordinates.src.js +3 -2
- package/js/es-modules/modules/sankey.src.js +1 -1
- package/js/es-modules/modules/series-label.src.js +2 -2
- package/js/es-modules/modules/solid-gauge.src.js +1 -1
- package/js/es-modules/modules/static-scale.src.js +67 -28
- package/js/es-modules/modules/streamgraph.src.js +1 -1
- package/js/es-modules/modules/tilemap.src.js +231 -134
- package/js/es-modules/modules/variwide.src.js +1 -1
- package/js/es-modules/modules/vector.src.js +92 -22
- package/js/es-modules/modules/windbarb.src.js +1 -1
- package/js/es-modules/modules/xrange.src.js +255 -68
- package/js/es-modules/parts/AreaSeries.js +77 -77
- package/js/es-modules/parts/AreaSplineSeries.js +64 -27
- package/js/es-modules/parts/Axis.js +160 -67
- package/js/es-modules/parts/BarSeries.js +68 -51
- package/js/es-modules/parts/CandlestickSeries.js +1 -1
- package/js/es-modules/parts/Chart.js +31 -55
- package/js/es-modules/parts/Color.js +29 -18
- package/js/es-modules/parts/ColumnSeries.js +231 -123
- package/js/es-modules/parts/DataGrouping.js +9 -6
- package/js/es-modules/parts/DataLabels.js +230 -182
- package/js/es-modules/parts/DateTimeAxis.js +26 -7
- package/js/es-modules/parts/Dynamics.js +5 -2
- package/js/es-modules/parts/FlagsSeries.js +1 -1
- package/js/es-modules/parts/Globals.js +1 -1
- package/js/es-modules/parts/Html.js +64 -12
- package/js/es-modules/parts/Interaction.js +178 -61
- package/js/es-modules/parts/Legend.js +7 -3
- package/js/es-modules/parts/LogarithmicAxis.js +35 -4
- package/js/es-modules/parts/MSPointer.js +1 -1
- package/js/es-modules/parts/Navigator.js +27 -5
- package/js/es-modules/parts/OHLCSeries.js +1 -1
- package/js/es-modules/parts/Options.js +13 -12
- package/js/es-modules/parts/OrdinalAxis.js +1 -1
- package/js/es-modules/parts/PieSeries.js +245 -132
- package/js/es-modules/parts/PlotBandSeries.experimental.js +1 -1
- package/js/es-modules/parts/PlotLineOrBand.js +7 -40
- package/js/es-modules/parts/Point.js +28 -4
- package/js/es-modules/parts/Pointer.js +8 -6
- package/js/es-modules/parts/RangeSelector.js +1 -1
- package/js/es-modules/parts/Responsive.js +82 -36
- package/js/es-modules/parts/ScatterSeries.js +56 -25
- package/js/es-modules/parts/ScrollablePlotArea.js +17 -7
- package/js/es-modules/parts/Scrollbar.js +9 -2
- package/js/es-modules/parts/Series.js +22 -9
- package/js/es-modules/parts/SplineSeries.js +51 -29
- package/js/es-modules/parts/Stacking.js +100 -6
- package/js/es-modules/parts/StockChart.js +9 -3
- package/js/es-modules/parts/SvgRenderer.js +15 -10
- package/js/es-modules/parts/Tick.js +150 -30
- package/js/es-modules/parts/Time.js +23 -5
- package/js/es-modules/parts/Tooltip.js +2 -2
- package/js/es-modules/parts/TouchPointer.js +1 -1
- package/js/es-modules/parts/Utilities.js +16 -1
- package/js/es-modules/parts-3d/Axis.js +1 -1
- package/js/es-modules/parts-3d/Chart.js +1 -1
- package/js/es-modules/parts-3d/Column.js +1 -1
- package/js/es-modules/parts-3d/Math.js +1 -1
- package/js/es-modules/parts-3d/Pie.js +1 -1
- package/js/es-modules/parts-3d/SVGRenderer.js +1 -1
- package/js/es-modules/parts-3d/Scatter.js +1 -1
- package/js/es-modules/parts-3d/Series.js +1 -1
- package/js/es-modules/parts-3d/VMLRenderer.js +1 -1
- package/js/es-modules/parts-gantt/ArrowSymbols.js +110 -0
- package/js/es-modules/parts-gantt/CurrentDateIndicator.js +92 -0
- package/js/es-modules/parts-gantt/GanttChart.js +111 -0
- package/js/es-modules/parts-gantt/GanttSeries.js +371 -0
- package/js/es-modules/parts-gantt/GridAxis.js +962 -0
- package/js/es-modules/parts-gantt/Pathfinder.js +1225 -0
- package/js/es-modules/parts-gantt/PathfinderAlgorithms.js +746 -0
- package/js/es-modules/parts-gantt/Tree.js +146 -0
- package/js/es-modules/parts-gantt/TreeGrid.js +891 -0
- package/js/es-modules/parts-map/ColorAxis.js +1 -1
- package/js/es-modules/parts-map/ColorSeriesMixin.js +1 -1
- package/js/es-modules/parts-map/GeoJSON.js +1 -1
- package/js/es-modules/parts-map/HeatmapSeries.js +122 -52
- package/js/es-modules/parts-map/Map.js +1 -1
- package/js/es-modules/parts-map/MapAxis.js +1 -1
- package/js/es-modules/parts-map/MapBubbleSeries.js +1 -1
- package/js/es-modules/parts-map/MapLineSeries.js +1 -1
- package/js/es-modules/parts-map/MapNavigation.js +1 -1
- package/js/es-modules/parts-map/MapPointSeries.js +1 -1
- package/js/es-modules/parts-map/MapPointer.js +1 -1
- package/js/es-modules/parts-map/MapSeries.js +2 -2
- package/js/es-modules/parts-more/AreaRangeSeries.js +80 -38
- package/js/es-modules/parts-more/AreaSplineRangeSeries.js +1 -1
- package/js/es-modules/parts-more/BoxPlotSeries.js +1 -1
- package/js/es-modules/parts-more/BubbleSeries.js +1 -1
- package/js/es-modules/parts-more/ColumnRangeSeries.js +1 -1
- package/js/es-modules/parts-more/ErrorBarSeries.js +1 -1
- package/js/es-modules/parts-more/GaugeSeries.js +1 -1
- package/js/es-modules/parts-more/Pane.js +2 -1
- package/js/es-modules/parts-more/Polar.js +1 -1
- package/js/es-modules/parts-more/PolygonSeries.js +1 -1
- package/js/es-modules/parts-more/RadialAxis.js +5 -4
- package/js/es-modules/parts-more/WaterfallSeries.js +1 -1
- package/js/es-modules/supplemental.docs.js +0 -1955
- package/js/es-modules/themes/dark-blue.js +1 -1
- package/js/es-modules/themes/dark-green.js +1 -1
- package/js/es-modules/themes/dark-unica.js +1 -1
- package/js/es-modules/themes/gray.js +1 -1
- package/js/es-modules/themes/grid-light.js +1 -1
- package/js/es-modules/themes/grid.js +1 -1
- package/js/es-modules/themes/sand-signika.js +1 -1
- package/js/es-modules/themes/skies.js +1 -1
- package/js/highcharts-3d.js +1 -1
- package/js/highcharts-3d.src.js +10 -10
- package/js/highcharts-gantt.js +480 -0
- package/js/highcharts-gantt.js.map +1 -0
- package/js/highcharts-gantt.src.js +47011 -0
- package/js/highcharts-more.js +62 -61
- package/js/highcharts-more.js.map +1 -1
- package/js/highcharts-more.src.js +97 -53
- package/js/highcharts.js +394 -390
- package/js/highcharts.js.map +1 -1
- package/js/highcharts.src.js +2083 -1070
- package/js/highmaps.js +420 -416
- package/js/highmaps.js.map +1 -1
- package/js/highmaps.src.js +1569 -798
- package/js/highstock.js +526 -520
- package/js/highstock.js.map +1 -1
- package/js/highstock.src.js +2311 -1225
- package/js/indicators/accumulation-distribution.js +1 -1
- package/js/indicators/accumulation-distribution.src.js +1 -1
- package/js/indicators/atr.js +1 -1
- package/js/indicators/atr.src.js +1 -1
- package/js/indicators/bollinger-bands.js +1 -1
- package/js/indicators/bollinger-bands.src.js +1 -1
- package/js/indicators/cci.js +1 -1
- package/js/indicators/cci.src.js +1 -1
- package/js/indicators/cmf.js +1 -1
- package/js/indicators/cmf.src.js +1 -1
- package/js/indicators/ema.js +1 -1
- package/js/indicators/ema.src.js +1 -1
- package/js/indicators/ichimoku-kinko-hyo.js +1 -1
- package/js/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/js/indicators/indicators.js +1 -1
- package/js/indicators/indicators.src.js +1 -1
- package/js/indicators/macd.js +1 -1
- package/js/indicators/macd.src.js +1 -1
- package/js/indicators/mfi.js +1 -1
- package/js/indicators/mfi.src.js +1 -1
- package/js/indicators/momentum.js +1 -1
- package/js/indicators/momentum.src.js +2 -2
- package/js/indicators/pivot-points.js +4 -4
- package/js/indicators/pivot-points.js.map +1 -1
- package/js/indicators/pivot-points.src.js +7 -2
- package/js/indicators/price-envelopes.js +1 -1
- package/js/indicators/price-envelopes.src.js +1 -1
- package/js/indicators/psar.js +1 -1
- package/js/indicators/psar.src.js +1 -1
- package/js/indicators/roc.js +1 -1
- package/js/indicators/roc.src.js +1 -1
- package/js/indicators/rsi.js +1 -1
- package/js/indicators/rsi.src.js +1 -1
- package/js/indicators/stochastic.js +1 -1
- package/js/indicators/stochastic.src.js +1 -1
- package/js/indicators/volume-by-price.js +1 -1
- package/js/indicators/volume-by-price.src.js +1 -1
- package/js/indicators/vwap.js +1 -1
- package/js/indicators/vwap.src.js +1 -1
- package/js/indicators/wma.js +1 -1
- package/js/indicators/wma.src.js +1 -1
- package/js/indicators/zigzag.js +1 -1
- package/js/indicators/zigzag.src.js +1 -1
- package/js/modules/accessibility.js +1 -1
- package/js/modules/accessibility.src.js +1 -1
- package/js/modules/annotations.js +2 -2
- package/js/modules/annotations.src.js +2 -2
- package/js/modules/arrow-symbols.js +13 -0
- package/js/modules/arrow-symbols.js.map +1 -0
- package/js/modules/arrow-symbols.src.js +138 -0
- package/js/modules/boost-canvas.js +1 -1
- package/js/modules/boost-canvas.src.js +1 -1
- package/js/modules/boost.js +43 -43
- package/js/modules/boost.js.map +1 -1
- package/js/modules/boost.src.js +23 -15
- package/js/modules/broken-axis.js +11 -10
- package/js/modules/broken-axis.js.map +1 -1
- package/js/modules/broken-axis.src.js +171 -136
- package/js/modules/bullet.js +1 -1
- package/js/modules/bullet.src.js +1 -1
- package/js/modules/current-date-indicator.js +13 -0
- package/js/modules/current-date-indicator.js.map +1 -0
- package/js/modules/current-date-indicator.src.js +120 -0
- package/js/modules/data.js +2 -2
- package/js/modules/data.src.js +4 -4
- package/js/modules/drag-panes.js +1 -1
- package/js/modules/drag-panes.src.js +1 -1
- package/js/modules/draggable-points.js +38 -0
- package/js/modules/draggable-points.js.map +1 -0
- package/js/modules/draggable-points.src.js +2281 -0
- package/js/modules/drilldown.js +1 -1
- package/js/modules/drilldown.js.map +1 -1
- package/js/modules/drilldown.src.js +2 -1
- package/js/modules/export-data.js +2 -2
- package/js/modules/export-data.src.js +3 -3
- package/js/modules/exporting.js +2 -2
- package/js/modules/exporting.src.js +3 -3
- package/js/modules/funnel.js +2 -2
- package/js/modules/funnel.src.js +3 -3
- package/js/modules/gantt.js +80 -18
- package/js/modules/gantt.js.map +1 -1
- package/js/modules/gantt.src.js +5490 -372
- package/js/modules/grid-axis.js +15 -11
- package/js/modules/grid-axis.js.map +1 -1
- package/js/modules/grid-axis.src.js +731 -293
- package/js/modules/heatmap.js +2 -2
- package/js/modules/heatmap.js.map +1 -1
- package/js/modules/heatmap.src.js +126 -56
- package/js/modules/histogram-bellcurve.js +1 -1
- package/js/modules/histogram-bellcurve.src.js +1 -1
- package/js/modules/item-series.js +2 -2
- package/js/modules/item-series.src.js +3 -3
- package/js/modules/map.js +2 -2
- package/js/modules/map.js.map +1 -1
- package/js/modules/map.src.js +137 -67
- package/js/modules/no-data-to-display.js +1 -1
- package/js/modules/no-data-to-display.src.js +6 -6
- package/js/modules/offline-exporting.js +2 -2
- package/js/modules/offline-exporting.src.js +2 -2
- package/js/modules/oldie.js +2 -2
- package/js/modules/oldie.src.js +3 -3
- package/js/modules/overlapping-datalabels.js +2 -2
- package/js/modules/overlapping-datalabels.src.js +2 -2
- package/js/modules/parallel-coordinates.js +9 -9
- package/js/modules/parallel-coordinates.js.map +1 -1
- package/js/modules/parallel-coordinates.src.js +4 -3
- package/js/modules/pareto.js +1 -1
- package/js/modules/pareto.src.js +1 -1
- package/js/modules/pathfinder.js +34 -0
- package/js/modules/pathfinder.js.map +1 -0
- package/js/modules/pathfinder.src.js +2106 -0
- package/js/modules/pattern-fill.js +1 -1
- package/js/modules/pattern-fill.src.js +1 -1
- package/js/modules/sankey.js +2 -2
- package/js/modules/sankey.src.js +3 -3
- package/js/modules/series-label.js +2 -2
- package/js/modules/series-label.src.js +4 -4
- package/js/modules/solid-gauge.js +2 -2
- package/js/modules/solid-gauge.src.js +3 -3
- package/js/modules/static-scale.js +3 -3
- package/js/modules/static-scale.js.map +1 -1
- package/js/modules/static-scale.src.js +65 -26
- package/js/modules/stock.js +135 -134
- package/js/modules/stock.js.map +1 -1
- package/js/modules/stock.src.js +230 -157
- package/js/modules/streamgraph.js +2 -2
- package/js/modules/streamgraph.src.js +3 -3
- package/js/modules/sunburst.js +1 -1
- package/js/modules/sunburst.src.js +1 -1
- package/js/modules/tilemap.js +1 -1
- package/js/modules/tilemap.js.map +1 -1
- package/js/modules/tilemap.src.js +355 -188
- package/js/modules/treegrid.js +51 -0
- package/js/modules/treegrid.js.map +1 -0
- package/js/modules/treegrid.src.js +2759 -0
- package/js/modules/treemap.js +1 -1
- package/js/modules/treemap.src.js +1 -1
- package/js/modules/variable-pie.js +1 -1
- package/js/modules/variable-pie.src.js +1 -1
- package/js/modules/variwide.js +2 -2
- package/js/modules/variwide.src.js +3 -3
- package/js/modules/vector.js +2 -2
- package/js/modules/vector.js.map +1 -1
- package/js/modules/vector.src.js +94 -24
- package/js/modules/windbarb.js +2 -2
- package/js/modules/windbarb.src.js +4 -4
- package/js/modules/wordcloud.js +1 -1
- package/js/modules/wordcloud.src.js +1 -1
- package/js/modules/xrange.js +11 -10
- package/js/modules/xrange.js.map +1 -1
- package/js/modules/xrange.src.js +257 -70
- package/js/themes/avocado.js +1 -1
- package/js/themes/avocado.src.js +1 -1
- package/js/themes/dark-blue.js +2 -2
- package/js/themes/dark-blue.src.js +3 -3
- package/js/themes/dark-green.js +2 -2
- package/js/themes/dark-green.src.js +3 -3
- package/js/themes/dark-unica.js +2 -2
- package/js/themes/dark-unica.src.js +3 -3
- package/js/themes/gray.js +2 -2
- package/js/themes/gray.src.js +3 -3
- package/js/themes/grid-light.js +2 -2
- package/js/themes/grid-light.src.js +3 -3
- package/js/themes/grid.js +2 -2
- package/js/themes/grid.src.js +3 -3
- package/js/themes/sand-signika.js +2 -2
- package/js/themes/sand-signika.src.js +3 -3
- package/js/themes/skies.js +2 -2
- package/js/themes/skies.src.js +3 -3
- package/js/themes/sunset.js +1 -1
- package/js/themes/sunset.src.js +1 -1
- package/modules/accessibility.js +1 -1
- package/modules/accessibility.src.js +1 -1
- package/modules/annotations.js +2 -2
- package/modules/annotations.src.js +2 -2
- package/modules/arrow-symbols.js +13 -0
- package/modules/arrow-symbols.js.map +1 -0
- package/modules/arrow-symbols.src.js +138 -0
- package/modules/boost-canvas.js +1 -1
- package/modules/boost-canvas.src.js +1 -1
- package/modules/boost.js +36 -36
- package/modules/boost.js.map +1 -1
- package/modules/boost.src.js +23 -15
- package/modules/broken-axis.js +11 -10
- package/modules/broken-axis.js.map +1 -1
- package/modules/broken-axis.src.js +171 -136
- package/modules/bullet.js +1 -1
- package/modules/bullet.src.js +1 -1
- package/modules/current-date-indicator.js +13 -0
- package/modules/current-date-indicator.js.map +1 -0
- package/modules/current-date-indicator.src.js +120 -0
- package/modules/data.js +2 -2
- package/modules/data.src.js +4 -4
- package/modules/drag-panes.js +1 -1
- package/modules/drag-panes.src.js +1 -1
- package/modules/draggable-points.js +38 -0
- package/modules/draggable-points.js.map +1 -0
- package/modules/draggable-points.src.js +2281 -0
- package/modules/drilldown.js +1 -1
- package/modules/drilldown.js.map +1 -1
- package/modules/drilldown.src.js +2 -1
- package/modules/export-data.js +2 -2
- package/modules/export-data.src.js +3 -3
- package/modules/exporting.js +2 -2
- package/modules/exporting.src.js +3 -3
- package/modules/funnel.js +2 -2
- package/modules/funnel.src.js +3 -3
- package/modules/gantt.js +83 -19
- package/modules/gantt.js.map +1 -1
- package/modules/gantt.src.js +5553 -379
- package/modules/grid-axis.js +16 -11
- package/modules/grid-axis.js.map +1 -1
- package/modules/grid-axis.src.js +732 -293
- package/modules/heatmap.js +2 -2
- package/modules/heatmap.js.map +1 -1
- package/modules/heatmap.src.js +128 -57
- package/modules/histogram-bellcurve.js +1 -1
- package/modules/histogram-bellcurve.src.js +1 -1
- package/modules/item-series.js +2 -2
- package/modules/item-series.src.js +3 -3
- package/modules/map.js +2 -2
- package/modules/map.js.map +1 -1
- package/modules/map.src.js +139 -68
- package/modules/no-data-to-display.js +1 -1
- package/modules/no-data-to-display.src.js +6 -6
- package/modules/offline-exporting.js +2 -2
- package/modules/offline-exporting.src.js +2 -2
- package/modules/oldie.js +2 -2
- package/modules/oldie.src.js +3 -3
- package/modules/overlapping-datalabels.js +2 -2
- package/modules/overlapping-datalabels.src.js +2 -2
- package/modules/parallel-coordinates.js +8 -8
- package/modules/parallel-coordinates.js.map +1 -1
- package/modules/parallel-coordinates.src.js +4 -3
- package/modules/pareto.js +1 -1
- package/modules/pareto.src.js +1 -1
- package/modules/pathfinder.js +35 -0
- package/modules/pathfinder.js.map +1 -0
- package/modules/pathfinder.src.js +2128 -0
- package/modules/pattern-fill.js +1 -1
- package/modules/pattern-fill.src.js +1 -1
- package/modules/sankey.js +2 -2
- package/modules/sankey.src.js +3 -3
- package/modules/series-label.js +2 -2
- package/modules/series-label.src.js +4 -4
- package/modules/solid-gauge.js +2 -2
- package/modules/solid-gauge.src.js +3 -3
- package/modules/static-scale.js +3 -3
- package/modules/static-scale.js.map +1 -1
- package/modules/static-scale.src.js +65 -26
- package/modules/stock.js +142 -142
- package/modules/stock.js.map +1 -1
- package/modules/stock.src.js +230 -157
- package/modules/streamgraph.js +2 -2
- package/modules/streamgraph.src.js +3 -3
- package/modules/sunburst.js +1 -1
- package/modules/sunburst.src.js +1 -1
- package/modules/tilemap.js +1 -1
- package/modules/tilemap.js.map +1 -1
- package/modules/tilemap.src.js +357 -189
- package/modules/treegrid.js +52 -0
- package/modules/treegrid.js.map +1 -0
- package/modules/treegrid.src.js +2797 -0
- package/modules/treemap.js +1 -1
- package/modules/treemap.src.js +1 -1
- package/modules/variable-pie.js +1 -1
- package/modules/variable-pie.src.js +1 -1
- package/modules/variwide.js +2 -2
- package/modules/variwide.src.js +3 -3
- package/modules/vector.js +2 -2
- package/modules/vector.js.map +1 -1
- package/modules/vector.src.js +94 -24
- package/modules/windbarb.js +2 -2
- package/modules/windbarb.src.js +4 -4
- package/modules/wordcloud.js +1 -1
- package/modules/wordcloud.src.js +1 -1
- package/modules/xrange.js +12 -11
- package/modules/xrange.js.map +1 -1
- package/modules/xrange.src.js +259 -79
- package/package.json +1 -1
- package/themes/avocado.js +1 -1
- package/themes/avocado.src.js +1 -1
- package/themes/dark-blue.js +2 -2
- package/themes/dark-blue.src.js +3 -3
- package/themes/dark-green.js +2 -2
- package/themes/dark-green.src.js +3 -3
- package/themes/dark-unica.js +2 -2
- package/themes/dark-unica.src.js +3 -3
- package/themes/gray.js +2 -2
- package/themes/gray.src.js +3 -3
- package/themes/grid-light.js +2 -2
- package/themes/grid-light.src.js +3 -3
- package/themes/grid.js +2 -2
- package/themes/grid.src.js +3 -3
- package/themes/sand-signika.js +2 -2
- package/themes/sand-signika.src.js +3 -3
- package/themes/skies.js +2 -2
- package/themes/skies.src.js +3 -3
- package/themes/sunset.js +1 -1
- package/themes/sunset.src.js +1 -1
|
@@ -0,0 +1,1247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (c) 2016 Highsoft AS
|
|
3
|
+
* Authors: Øystein Moseng, Lars A. V. Cabrera
|
|
4
|
+
*
|
|
5
|
+
* License: www.highcharts.com/license
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
import H from '../parts/Globals.js';
|
|
9
|
+
import '../parts/Point.js';
|
|
10
|
+
import '../parts/Utilities.js';
|
|
11
|
+
import pathfinderAlgorithms from 'PathfinderAlgorithms.js';
|
|
12
|
+
import 'ArrowSymbols.js';
|
|
13
|
+
|
|
14
|
+
var defined = H.defined,
|
|
15
|
+
deg2rad = H.deg2rad,
|
|
16
|
+
extend = H.extend,
|
|
17
|
+
each = H.each,
|
|
18
|
+
addEvent = H.addEvent,
|
|
19
|
+
merge = H.merge,
|
|
20
|
+
pick = H.pick,
|
|
21
|
+
max = Math.max,
|
|
22
|
+
min = Math.min;
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
TODO:
|
|
26
|
+
- Test dynamics, hiding/adding/removing/updating chart/series/points/axes
|
|
27
|
+
- Test connecting to multiple points
|
|
28
|
+
- Add demos/samples
|
|
29
|
+
- Document how to write your own algorithms
|
|
30
|
+
- Consider adding a Point.pathTo method that wraps creating a connection
|
|
31
|
+
and rendering it
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
// Set default Pathfinder options
|
|
36
|
+
extend(H.defaultOptions, {
|
|
37
|
+
/**
|
|
38
|
+
* The Pathfinder allows you to define connections between any two points,
|
|
39
|
+
* represented as lines - optionally with markers for the start and/or end
|
|
40
|
+
* points. Multiple algorithms are available for calculating how the
|
|
41
|
+
* connecting lines are drawn.
|
|
42
|
+
*
|
|
43
|
+
* Pathfinder functionality requires Highcharts Gantt to be loaded. In Gantt
|
|
44
|
+
* charts, the Pathfinder is used to draw dependencies between tasks.
|
|
45
|
+
*
|
|
46
|
+
* @product gantt
|
|
47
|
+
* @see [dependency](series.gantt.data.dependency)
|
|
48
|
+
* @optionparent pathfinder
|
|
49
|
+
*/
|
|
50
|
+
pathfinder: {
|
|
51
|
+
/**
|
|
52
|
+
* Enable the pathfinder for this chart. Requires Highcharts Gantt.
|
|
53
|
+
*
|
|
54
|
+
* @type {boolean}
|
|
55
|
+
* @default true
|
|
56
|
+
* @since 6.2.0
|
|
57
|
+
* @apioption pathfinder.enabled
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Set the default dash style for this chart's Pathfinder connecting
|
|
62
|
+
* lines.
|
|
63
|
+
*
|
|
64
|
+
* @type {string}
|
|
65
|
+
* @default solid
|
|
66
|
+
* @since 6.2.0
|
|
67
|
+
* @apioption pathfinder.dashStyle
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Set the default color for this chart's Pathfinder connecting lines.
|
|
72
|
+
* Defaults to the color of the point being connected.
|
|
73
|
+
*
|
|
74
|
+
* @type {Color}
|
|
75
|
+
* @default null
|
|
76
|
+
* @since 6.2.0
|
|
77
|
+
* @apioption pathfinder.lineColor
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Set the default pathfinder margin to use, in pixels. Some Pathfinder
|
|
82
|
+
* algorithms attempt to avoid obstacles, such as other points in the
|
|
83
|
+
* chart. These algorithms use this margin to determine how close lines
|
|
84
|
+
* can be to an obstacle. The default is to compute this automatically
|
|
85
|
+
* from the size of the obstacles in the chart.
|
|
86
|
+
*
|
|
87
|
+
* To draw connecting lines close to existing points, set this to a low
|
|
88
|
+
* number. For more space around existing points, set this number
|
|
89
|
+
* higher.
|
|
90
|
+
*
|
|
91
|
+
* @type {number}
|
|
92
|
+
* @default null
|
|
93
|
+
* @since 6.2.0
|
|
94
|
+
* @apioption pathfinder.algorithmMargin
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Set the default pathfinder algorithm to use for this chart. It is
|
|
99
|
+
* possible to define your own algorithms by adding them to the
|
|
100
|
+
* Highcharts.Pathfinder.prototype.algorithms object after the chart
|
|
101
|
+
* has been created.
|
|
102
|
+
*
|
|
103
|
+
* The default algorithms are as follows:
|
|
104
|
+
*
|
|
105
|
+
* straight: Draws a straight line between the connecting points.
|
|
106
|
+
* Does not avoid other points when drawing.
|
|
107
|
+
*
|
|
108
|
+
* simpleConnect: Finds a path between the points using right angles
|
|
109
|
+
* only. Takes only starting/ending points into
|
|
110
|
+
* account, and will not avoid other points.
|
|
111
|
+
*
|
|
112
|
+
* fastAvoid: Finds a path between the points using right angles
|
|
113
|
+
* only. Will attempt to avoid other points, but its
|
|
114
|
+
* focus is performance over accuracy. Works well with
|
|
115
|
+
* less dense datasets.
|
|
116
|
+
*
|
|
117
|
+
* @type {string}
|
|
118
|
+
* @default straight
|
|
119
|
+
* @since 6.2.0
|
|
120
|
+
* @apioption pathfinder.type
|
|
121
|
+
*/
|
|
122
|
+
type: 'straight',
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Set the default pixel width for this chart's Pathfinder connecting
|
|
126
|
+
* lines.
|
|
127
|
+
*
|
|
128
|
+
* @type {number}
|
|
129
|
+
* @default 1
|
|
130
|
+
* @since 6.2.0
|
|
131
|
+
* @apioption pathfinder.lineWidth
|
|
132
|
+
*/
|
|
133
|
+
lineWidth: 1,
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Marker options for this chart's Pathfinder connectors.
|
|
137
|
+
*
|
|
138
|
+
* @type {object}
|
|
139
|
+
* @since 6.2.0
|
|
140
|
+
* @apioption pathfinder.marker
|
|
141
|
+
*/
|
|
142
|
+
marker: {
|
|
143
|
+
/**
|
|
144
|
+
* Set the radius of the pathfinder markers. The default is
|
|
145
|
+
* automatically computed based on the algorithmMargin setting.
|
|
146
|
+
*
|
|
147
|
+
* Setting marker.width and marker.height will override this
|
|
148
|
+
* setting.
|
|
149
|
+
*
|
|
150
|
+
* @type {number}
|
|
151
|
+
* @default null
|
|
152
|
+
* @since 6.2.0
|
|
153
|
+
* @apioption pathfinder.marker.radius
|
|
154
|
+
*/
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Set the width of the pathfinder markers. If not supplied, this
|
|
158
|
+
* is inferred from the marker radius.
|
|
159
|
+
*
|
|
160
|
+
* @type {number}
|
|
161
|
+
* @default null
|
|
162
|
+
* @since 6.2.0
|
|
163
|
+
* @apioption pathfinder.marker.width
|
|
164
|
+
*/
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Set the height of the pathfinder markers. If not supplied, this
|
|
168
|
+
* is inferred from the marker radius.
|
|
169
|
+
*
|
|
170
|
+
* @type {number}
|
|
171
|
+
* @default null
|
|
172
|
+
* @since 6.2.0
|
|
173
|
+
* @apioption pathfinder.marker.height
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Set the color of the pathfinder markers. By default this is the
|
|
178
|
+
* same as the connector color.
|
|
179
|
+
*
|
|
180
|
+
* @type {Color}
|
|
181
|
+
* @default null
|
|
182
|
+
* @since 6.2.0
|
|
183
|
+
* @apioption pathfinder.marker.color
|
|
184
|
+
*/
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Set the line/border color of the pathfinder markers. By default
|
|
188
|
+
* this is the same as the marker color.
|
|
189
|
+
*
|
|
190
|
+
* @type {Color}
|
|
191
|
+
* @default null
|
|
192
|
+
* @since 6.2.0
|
|
193
|
+
* @apioption pathfinder.marker.lineColor
|
|
194
|
+
*/
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Enable markers for the connectors.
|
|
198
|
+
*/
|
|
199
|
+
enabled: false,
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Horizontal alignment of the markers relative to the points.
|
|
203
|
+
*/
|
|
204
|
+
align: 'center',
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Vertical alignment of the markers relative to the points.
|
|
208
|
+
*/
|
|
209
|
+
verticalAlign: 'middle',
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Whether or not to draw the markers inside the points.
|
|
213
|
+
*/
|
|
214
|
+
inside: false,
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Set the line/border width of the pathfinder markers.
|
|
218
|
+
*/
|
|
219
|
+
lineWidth: 1
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Marker options specific to the start markers for this chart's
|
|
224
|
+
* Pathfinder connectors. Overrides the generic marker options.
|
|
225
|
+
*
|
|
226
|
+
* @type {object}
|
|
227
|
+
* @since 6.2.0
|
|
228
|
+
* @extends pathfinder.marker
|
|
229
|
+
* @apioption pathfinder.startMarker
|
|
230
|
+
*/
|
|
231
|
+
startMarker: {
|
|
232
|
+
/**
|
|
233
|
+
* Set the symbol of the pathfinder start markers.
|
|
234
|
+
*/
|
|
235
|
+
symbol: 'diamond'
|
|
236
|
+
},
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Marker options specific to the end markers for this chart's
|
|
240
|
+
* Pathfinder connectors. Overrides the generic marker options.
|
|
241
|
+
*
|
|
242
|
+
* @type {object}
|
|
243
|
+
* @since 6.2.0
|
|
244
|
+
* @extends pathfinder.marker
|
|
245
|
+
* @apioption pathfinder.endMarker
|
|
246
|
+
*/
|
|
247
|
+
endMarker: {
|
|
248
|
+
/**
|
|
249
|
+
* Set the symbol of the pathfinder end markers.
|
|
250
|
+
*/
|
|
251
|
+
symbol: 'arrow-filled'
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Override Pathfinder options for a series. Requires Highcharts Gantt or the
|
|
258
|
+
* Pathfinder module.
|
|
259
|
+
*
|
|
260
|
+
* @since 6.2.0
|
|
261
|
+
* @extends pathfinder
|
|
262
|
+
* @product gantt
|
|
263
|
+
* @apioption plotOptions.series.pathfinder
|
|
264
|
+
* @excluding enabled,algorithmMargin
|
|
265
|
+
*/
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Connect to a point. Requires Highcharts Gantt to be loaded. This option can
|
|
269
|
+
* be either a string, referring to the ID of another point, or an object.
|
|
270
|
+
*
|
|
271
|
+
* @type {string|object}
|
|
272
|
+
* @since 6.2.0
|
|
273
|
+
* @extends plotOptions.series.pathfinder
|
|
274
|
+
* @product gantt
|
|
275
|
+
* @apioption series.xrange.data.connect
|
|
276
|
+
*/
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* The ID of the point to connect to.
|
|
280
|
+
*
|
|
281
|
+
* @type {string}
|
|
282
|
+
* @since 6.2.0
|
|
283
|
+
* @product gantt
|
|
284
|
+
* @apioption series.xrange.data.connect.to
|
|
285
|
+
*/
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Get point bounding box using plotX/plotY and shapeArgs. If using
|
|
290
|
+
* graphic.getBBox() directly, the bbox will be affected by animation.
|
|
291
|
+
*
|
|
292
|
+
* @param {Highcharts.Point} point
|
|
293
|
+
* The point to get BB of.
|
|
294
|
+
*
|
|
295
|
+
* @return {object}
|
|
296
|
+
* Result xMax, xMin, yMax, yMin.
|
|
297
|
+
*/
|
|
298
|
+
function getPointBB(point) {
|
|
299
|
+
var shapeArgs = point.shapeArgs,
|
|
300
|
+
bb;
|
|
301
|
+
|
|
302
|
+
// Prefer using shapeArgs (columns)
|
|
303
|
+
if (shapeArgs) {
|
|
304
|
+
return {
|
|
305
|
+
xMin: shapeArgs.x,
|
|
306
|
+
xMax: shapeArgs.x + shapeArgs.width,
|
|
307
|
+
yMin: shapeArgs.y,
|
|
308
|
+
yMax: shapeArgs.y + shapeArgs.height
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// Otherwise use plotX/plotY and bb
|
|
313
|
+
bb = point.graphic && point.graphic.getBBox();
|
|
314
|
+
return bb ? {
|
|
315
|
+
xMin: point.plotX - bb.width / 2,
|
|
316
|
+
xMax: point.plotX + bb.width / 2,
|
|
317
|
+
yMin: point.plotY - bb.height / 2,
|
|
318
|
+
yMax: point.plotY + bb.height / 2
|
|
319
|
+
} : null;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Calculate margin to place around obstacles for the pathfinder in pixels.
|
|
325
|
+
* Returns a minimum of 1 pixel margin.
|
|
326
|
+
*
|
|
327
|
+
* @param {Array} obstacles
|
|
328
|
+
* Obstacles to calculate margin from.
|
|
329
|
+
*
|
|
330
|
+
* @return {number}
|
|
331
|
+
* The calculated margin in pixels. At least 1.
|
|
332
|
+
*/
|
|
333
|
+
function calculateObstacleMargin(obstacles) {
|
|
334
|
+
var len = obstacles.length,
|
|
335
|
+
i = 0,
|
|
336
|
+
j,
|
|
337
|
+
obstacleDistance,
|
|
338
|
+
distances = [],
|
|
339
|
+
// Compute smallest distance between two rectangles
|
|
340
|
+
distance = function (a, b, bbMargin) {
|
|
341
|
+
// Count the distance even if we are slightly off
|
|
342
|
+
var margin = pick(bbMargin, 10),
|
|
343
|
+
yOverlap = a.yMax + margin > b.yMin - margin &&
|
|
344
|
+
a.yMin - margin < b.yMax + margin,
|
|
345
|
+
xOverlap = a.xMax + margin > b.xMin - margin &&
|
|
346
|
+
a.xMin - margin < b.xMax + margin,
|
|
347
|
+
xDistance = yOverlap ? (
|
|
348
|
+
a.xMin > b.xMax ? a.xMin - b.xMax : b.xMin - a.xMax
|
|
349
|
+
) : Infinity,
|
|
350
|
+
yDistance = xOverlap ? (
|
|
351
|
+
a.yMin > b.yMax ? a.yMin - b.yMax : b.yMin - a.yMax
|
|
352
|
+
) : Infinity;
|
|
353
|
+
|
|
354
|
+
// If the rectangles collide, try recomputing with smaller margin.
|
|
355
|
+
// If they collide anyway, discard the obstacle.
|
|
356
|
+
if (xOverlap && yOverlap) {
|
|
357
|
+
return (
|
|
358
|
+
margin ?
|
|
359
|
+
distance(a, b, Math.floor(margin / 2)) :
|
|
360
|
+
Infinity
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
return min(xDistance, yDistance);
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
// Go over all obstacles and compare them to the others.
|
|
368
|
+
for (; i < len; ++i) {
|
|
369
|
+
// Compare to all obstacles ahead. We will already have compared this
|
|
370
|
+
// obstacle to the ones before.
|
|
371
|
+
for (j = i + 1; j < len; ++j) {
|
|
372
|
+
obstacleDistance = distance(obstacles[i], obstacles[j]);
|
|
373
|
+
// TODO: Magic number 80
|
|
374
|
+
if (obstacleDistance < 80) { // Ignore large distances
|
|
375
|
+
distances.push(obstacleDistance);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
// Ensure we always have at least one value, even in very spaceous charts
|
|
380
|
+
distances.push(80);
|
|
381
|
+
|
|
382
|
+
return max(
|
|
383
|
+
Math.floor(
|
|
384
|
+
distances.sort(function (a, b) {
|
|
385
|
+
return a - b;
|
|
386
|
+
})[
|
|
387
|
+
// Discard first 10% of the relevant distances, and then grab
|
|
388
|
+
// the smallest one.
|
|
389
|
+
Math.floor(distances.length / 10)
|
|
390
|
+
] / 2 - 1 // Divide the distance by 2 and subtract 1.
|
|
391
|
+
),
|
|
392
|
+
1 // 1 is the minimum margin
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* The Connection class. Used internally to represent a connection between two
|
|
399
|
+
* points.
|
|
400
|
+
*
|
|
401
|
+
* @private
|
|
402
|
+
* @class Connection
|
|
403
|
+
*
|
|
404
|
+
* @param {Highcharts.Point} from
|
|
405
|
+
* Connection runs from this Point.
|
|
406
|
+
*
|
|
407
|
+
* @param {Highcharts.Point} to
|
|
408
|
+
* Connection runs to this Point.
|
|
409
|
+
*
|
|
410
|
+
* @param {object} [options]
|
|
411
|
+
* Connection options.
|
|
412
|
+
*/
|
|
413
|
+
function Connection(from, to, options) {
|
|
414
|
+
this.init(from, to, options);
|
|
415
|
+
}
|
|
416
|
+
Connection.prototype = {
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Initialize the Connection object. Used as constructor only.
|
|
420
|
+
*
|
|
421
|
+
* @function Highcharts.Connection#init
|
|
422
|
+
*
|
|
423
|
+
* @param {Highcharts.Point} from
|
|
424
|
+
* Connection runs from this Point.
|
|
425
|
+
*
|
|
426
|
+
* @param {Highcharts.Point} to
|
|
427
|
+
* Connection runs to this Point.
|
|
428
|
+
*
|
|
429
|
+
* @param {object} [options]
|
|
430
|
+
* Connection options.
|
|
431
|
+
*
|
|
432
|
+
* @return {void}
|
|
433
|
+
*/
|
|
434
|
+
init: function (from, to, options) {
|
|
435
|
+
this.fromPoint = from;
|
|
436
|
+
this.toPoint = to;
|
|
437
|
+
this.options = options;
|
|
438
|
+
this.chart = from.series.chart;
|
|
439
|
+
this.pathfinder = this.chart.pathfinder;
|
|
440
|
+
},
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Add (or update) this connection's path on chart. Stores reference to the
|
|
444
|
+
* created element on this.graphics.path.
|
|
445
|
+
*
|
|
446
|
+
* @function Highcharts.Connection#renderPath
|
|
447
|
+
*
|
|
448
|
+
* @param {Array} path
|
|
449
|
+
* Path to render, in array format. E.g. ['M', 0, 0, 'L', 10, 10]
|
|
450
|
+
*
|
|
451
|
+
* @param {object} [attribs]
|
|
452
|
+
* SVG attributes for the path.
|
|
453
|
+
*
|
|
454
|
+
* @param {object} [animation]
|
|
455
|
+
* Animation options for the rendering.
|
|
456
|
+
*
|
|
457
|
+
* @param {Function} [complete]
|
|
458
|
+
* Callback function when the path has been rendered and animation
|
|
459
|
+
* is complete.
|
|
460
|
+
*
|
|
461
|
+
* @return {void}
|
|
462
|
+
*/
|
|
463
|
+
renderPath: function (path, attribs, animation) {
|
|
464
|
+
var connection = this,
|
|
465
|
+
chart = this.chart,
|
|
466
|
+
pathfinder = chart.pathfinder,
|
|
467
|
+
animate = !chart.options.chart.forExport && animation !== false,
|
|
468
|
+
pathGraphic = connection.graphics && connection.graphics.path;
|
|
469
|
+
|
|
470
|
+
// Add the SVG element of the pathfinder group if it doesn't exist
|
|
471
|
+
if (!pathfinder.group) {
|
|
472
|
+
pathfinder.group = chart.renderer.g()
|
|
473
|
+
.addClass('highcharts-pathfinder-group')
|
|
474
|
+
.attr({ zIndex: -1 })
|
|
475
|
+
.add(chart.seriesGroup);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// Shift the group to compensate for plot area.
|
|
479
|
+
// Note: Do this always (even when redrawing a path) to avoid issues
|
|
480
|
+
// when updating chart in a way that changes plot metrics.
|
|
481
|
+
pathfinder.group.translate(chart.plotLeft, chart.plotTop);
|
|
482
|
+
|
|
483
|
+
// Create path if does not exist
|
|
484
|
+
if (!(pathGraphic && pathGraphic.renderer)) {
|
|
485
|
+
pathGraphic = chart.renderer.path()
|
|
486
|
+
|
|
487
|
+
.attr({
|
|
488
|
+
opacity: 0
|
|
489
|
+
})
|
|
490
|
+
|
|
491
|
+
.add(pathfinder.group);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
// Set path attribs and animate to the new path
|
|
495
|
+
pathGraphic.attr(attribs);
|
|
496
|
+
pathGraphic[animate ? 'animate' : 'attr']({
|
|
497
|
+
|
|
498
|
+
opacity: 1,
|
|
499
|
+
|
|
500
|
+
d: path
|
|
501
|
+
}, animation);
|
|
502
|
+
|
|
503
|
+
// Store reference on connection
|
|
504
|
+
this.graphics = this.graphics || {};
|
|
505
|
+
this.graphics.path = pathGraphic;
|
|
506
|
+
},
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Calculate and add marker graphics for connection to the chart. The
|
|
510
|
+
* created/updated elements are stored on this.graphics.start and
|
|
511
|
+
* this.graphics.end.
|
|
512
|
+
*
|
|
513
|
+
* @function Highcharts.Connection#addMarker
|
|
514
|
+
*
|
|
515
|
+
* @param {string} type
|
|
516
|
+
* Marker type, either 'start' or 'end'.
|
|
517
|
+
*
|
|
518
|
+
* @param {object} options
|
|
519
|
+
* All options for this marker. Not calculated or merged with other
|
|
520
|
+
* options.
|
|
521
|
+
*
|
|
522
|
+
* @param {Array} path
|
|
523
|
+
* Connection path in array format. This is used to calculate the
|
|
524
|
+
* rotation angle of the markers.
|
|
525
|
+
*
|
|
526
|
+
* @return {void}
|
|
527
|
+
*/
|
|
528
|
+
addMarker: function (type, options, path) {
|
|
529
|
+
var connection = this,
|
|
530
|
+
chart = connection.fromPoint.series.chart,
|
|
531
|
+
pathfinder = chart.pathfinder,
|
|
532
|
+
renderer = chart.renderer,
|
|
533
|
+
point = (
|
|
534
|
+
type === 'start' ?
|
|
535
|
+
connection.fromPoint :
|
|
536
|
+
connection.toPoint
|
|
537
|
+
),
|
|
538
|
+
anchor = point.getPathfinderAnchorPoint(options),
|
|
539
|
+
markerVector,
|
|
540
|
+
radians,
|
|
541
|
+
rotation,
|
|
542
|
+
box,
|
|
543
|
+
width,
|
|
544
|
+
height,
|
|
545
|
+
pathVector;
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
if (!options.enabled) {
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
// Last vector before start/end of path, used to get angle
|
|
553
|
+
if (type === 'start') {
|
|
554
|
+
pathVector = {
|
|
555
|
+
x: path[4],
|
|
556
|
+
y: path[5]
|
|
557
|
+
};
|
|
558
|
+
} else { // 'end'
|
|
559
|
+
pathVector = {
|
|
560
|
+
x: path[path.length - 5],
|
|
561
|
+
y: path[path.length - 4]
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
// Get angle between pathVector and anchor point and use it to create
|
|
566
|
+
// marker position.
|
|
567
|
+
radians = point.getRadiansToVector(pathVector, anchor);
|
|
568
|
+
markerVector = point.getMarkerVector(
|
|
569
|
+
radians,
|
|
570
|
+
options.radius,
|
|
571
|
+
anchor
|
|
572
|
+
);
|
|
573
|
+
|
|
574
|
+
// Rotation of marker is calculated from angle between pathVector and
|
|
575
|
+
// markerVector.
|
|
576
|
+
// (Note:
|
|
577
|
+
// Used to recalculate radians between markerVector and pathVector,
|
|
578
|
+
// but this should be the same as between pathVector and anchor.)
|
|
579
|
+
rotation = -radians / deg2rad;
|
|
580
|
+
|
|
581
|
+
if (options.width && options.height) {
|
|
582
|
+
width = options.width;
|
|
583
|
+
height = options.height;
|
|
584
|
+
} else {
|
|
585
|
+
width = height = options.radius * 2;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
// Add graphics object if it does not exist
|
|
589
|
+
connection.graphics = connection.graphics || {};
|
|
590
|
+
box = {
|
|
591
|
+
x: markerVector.x - (width / 2),
|
|
592
|
+
y: markerVector.y - (height / 2),
|
|
593
|
+
width: width,
|
|
594
|
+
height: height,
|
|
595
|
+
rotation: rotation,
|
|
596
|
+
rotationOriginX: markerVector.x,
|
|
597
|
+
rotationOriginY: markerVector.y
|
|
598
|
+
};
|
|
599
|
+
|
|
600
|
+
if (!connection.graphics[type]) {
|
|
601
|
+
|
|
602
|
+
// Create new marker element
|
|
603
|
+
connection.graphics[type] = renderer.symbol(
|
|
604
|
+
options.symbol
|
|
605
|
+
)
|
|
606
|
+
.addClass(
|
|
607
|
+
'highcharts-point-connecting-path-' + type + '-marker'
|
|
608
|
+
)
|
|
609
|
+
.attr(box)
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
.attr({
|
|
613
|
+
fill: options.color || connection.fromPoint.color,
|
|
614
|
+
stroke: options.lineColor,
|
|
615
|
+
'stroke-width': options.lineWidth,
|
|
616
|
+
opacity: 0
|
|
617
|
+
})
|
|
618
|
+
.animate({
|
|
619
|
+
opacity: 1
|
|
620
|
+
}, point.series.options.animation)
|
|
621
|
+
|
|
622
|
+
.add(pathfinder.group);
|
|
623
|
+
} else {
|
|
624
|
+
connection.graphics[type].animate(box);
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Calculate and return connection path.
|
|
630
|
+
* Note: Recalculates chart obstacles on demand if they aren't calculated.
|
|
631
|
+
*
|
|
632
|
+
* @function Highcharts.Connection#getPath
|
|
633
|
+
*
|
|
634
|
+
* @param {object} options
|
|
635
|
+
* Pathfinder options. Not calculated or merged with other options.
|
|
636
|
+
*
|
|
637
|
+
* @return {Array}
|
|
638
|
+
* Calculated SVG path data in array format.
|
|
639
|
+
*/
|
|
640
|
+
getPath: function (options) {
|
|
641
|
+
var pathfinder = this.pathfinder,
|
|
642
|
+
chart = this.chart,
|
|
643
|
+
algorithm = pathfinder.algorithms[options.type],
|
|
644
|
+
chartObstacles = pathfinder.chartObstacles;
|
|
645
|
+
|
|
646
|
+
if (typeof algorithm !== 'function') {
|
|
647
|
+
H.error(
|
|
648
|
+
'"' + options.type + '" is not a Pathfinder algorithm.'
|
|
649
|
+
);
|
|
650
|
+
return;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
// This function calculates obstacles on demand if they don't exist
|
|
654
|
+
if (algorithm.requiresObstacles && !chartObstacles) {
|
|
655
|
+
chartObstacles =
|
|
656
|
+
pathfinder.chartObstacles =
|
|
657
|
+
pathfinder.getChartObstacles(options);
|
|
658
|
+
|
|
659
|
+
// If the algorithmMargin was computed, store the result in default
|
|
660
|
+
// options.
|
|
661
|
+
chart.options.pathfinder.algorithmMargin = options.algorithmMargin;
|
|
662
|
+
|
|
663
|
+
// Cache some metrics too
|
|
664
|
+
pathfinder.chartObstacleMetrics =
|
|
665
|
+
pathfinder.getObstacleMetrics(chartObstacles);
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
// Get the SVG path
|
|
669
|
+
return algorithm(
|
|
670
|
+
// From
|
|
671
|
+
this.fromPoint.getPathfinderAnchorPoint(options.startMarker),
|
|
672
|
+
// To
|
|
673
|
+
this.toPoint.getPathfinderAnchorPoint(options.endMarker),
|
|
674
|
+
merge({
|
|
675
|
+
chartObstacles: chartObstacles,
|
|
676
|
+
lineObstacles: pathfinder.lineObstacles || [],
|
|
677
|
+
obstacleMetrics: pathfinder.chartObstacleMetrics,
|
|
678
|
+
hardBounds: {
|
|
679
|
+
xMin: 0,
|
|
680
|
+
xMax: chart.plotWidth,
|
|
681
|
+
yMin: 0,
|
|
682
|
+
yMax: chart.plotHeight
|
|
683
|
+
},
|
|
684
|
+
obstacleOptions: {
|
|
685
|
+
margin: options.algorithmMargin
|
|
686
|
+
},
|
|
687
|
+
startDirectionX: pathfinder.getAlgorithmStartDirection(
|
|
688
|
+
options.startMarker
|
|
689
|
+
)
|
|
690
|
+
}, options)
|
|
691
|
+
);
|
|
692
|
+
},
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* (re)Calculate and (re)draw the connection.
|
|
696
|
+
*
|
|
697
|
+
* @function Highcharts.Connection#render
|
|
698
|
+
*/
|
|
699
|
+
render: function () {
|
|
700
|
+
var connection = this,
|
|
701
|
+
fromPoint = connection.fromPoint,
|
|
702
|
+
series = fromPoint.series,
|
|
703
|
+
chart = series.chart,
|
|
704
|
+
pathfinder = chart.pathfinder,
|
|
705
|
+
pathResult,
|
|
706
|
+
path,
|
|
707
|
+
options = merge(
|
|
708
|
+
chart.options.pathfinder, series.options.pathfinder,
|
|
709
|
+
fromPoint.options.pathfinder, connection.options
|
|
710
|
+
),
|
|
711
|
+
attribs = {};
|
|
712
|
+
|
|
713
|
+
// Set path attribs
|
|
714
|
+
|
|
715
|
+
attribs.stroke = options.lineColor || fromPoint.color;
|
|
716
|
+
attribs['stroke-width'] = options.lineWidth;
|
|
717
|
+
if (options.dashStyle) {
|
|
718
|
+
attribs.dashstyle = options.dashStyle;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
attribs.class = 'highcharts-point-connecting-path ' +
|
|
723
|
+
'highcharts-color-' + fromPoint.colorIndex;
|
|
724
|
+
options = merge(attribs, options);
|
|
725
|
+
|
|
726
|
+
// Set common marker options
|
|
727
|
+
if (!defined(options.marker.radius)) {
|
|
728
|
+
options.marker.radius = min(max(
|
|
729
|
+
Math.ceil((options.algorithmMargin || 8) / 2) - 1, 1
|
|
730
|
+
), 5);
|
|
731
|
+
}
|
|
732
|
+
// Get the path
|
|
733
|
+
pathResult = connection.getPath(options);
|
|
734
|
+
path = pathResult.path;
|
|
735
|
+
|
|
736
|
+
// Always update obstacle storage with obstacles from this path.
|
|
737
|
+
// We don't know if future calls will need this for their algorithm.
|
|
738
|
+
if (pathResult.obstacles) {
|
|
739
|
+
pathfinder.lineObstacles = pathfinder.lineObstacles || [];
|
|
740
|
+
pathfinder.lineObstacles =
|
|
741
|
+
pathfinder.lineObstacles.concat(pathResult.obstacles);
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
// Add the calculated path to the pathfinder group
|
|
745
|
+
connection.renderPath(path, attribs, series.options.animation);
|
|
746
|
+
|
|
747
|
+
// Render the markers
|
|
748
|
+
connection.addMarker(
|
|
749
|
+
'start',
|
|
750
|
+
merge(options.marker, options.startMarker),
|
|
751
|
+
path
|
|
752
|
+
);
|
|
753
|
+
connection.addMarker(
|
|
754
|
+
'end',
|
|
755
|
+
merge(options.marker, options.endMarker),
|
|
756
|
+
path
|
|
757
|
+
);
|
|
758
|
+
},
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Destroy connection by destroying the added graphics elements.
|
|
762
|
+
*
|
|
763
|
+
* @function Highcharts.Connection#destroy
|
|
764
|
+
*/
|
|
765
|
+
destroy: function () {
|
|
766
|
+
if (this.graphics) {
|
|
767
|
+
H.objectEach(this.graphics, function (val) {
|
|
768
|
+
val.destroy();
|
|
769
|
+
});
|
|
770
|
+
delete this.graphics;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* The Pathfinder class.
|
|
778
|
+
*
|
|
779
|
+
* @private
|
|
780
|
+
* @class Pathfinder
|
|
781
|
+
*
|
|
782
|
+
* @param {Highcharts.Chart} chart
|
|
783
|
+
* The chart to operate on.
|
|
784
|
+
*/
|
|
785
|
+
function Pathfinder(chart) {
|
|
786
|
+
this.init(chart);
|
|
787
|
+
}
|
|
788
|
+
Pathfinder.prototype = {
|
|
789
|
+
|
|
790
|
+
algorithms: pathfinderAlgorithms,
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Initialize the Pathfinder object.
|
|
794
|
+
*
|
|
795
|
+
* @function Highcharts.Pathfinder#init
|
|
796
|
+
*
|
|
797
|
+
* @param {Highcharts.Chart} chart
|
|
798
|
+
* The chart context.
|
|
799
|
+
*
|
|
800
|
+
* @return {void}
|
|
801
|
+
*/
|
|
802
|
+
init: function (chart) {
|
|
803
|
+
// Initialize pathfinder with chart context
|
|
804
|
+
this.chart = chart;
|
|
805
|
+
|
|
806
|
+
// Init connection reference list
|
|
807
|
+
this.connections = [];
|
|
808
|
+
|
|
809
|
+
// Recalculate paths/obstacles on chart redraw
|
|
810
|
+
addEvent(chart, 'redraw', function () {
|
|
811
|
+
this.pathfinder.update();
|
|
812
|
+
});
|
|
813
|
+
},
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* Update Pathfinder connections from scratch.
|
|
817
|
+
*
|
|
818
|
+
* @function Highcharts.Pathfinder#update
|
|
819
|
+
*
|
|
820
|
+
* @param {boolean} deferRender Whether or not to defer rendering of
|
|
821
|
+
* connections until series.afterAnimate event has fired. Used on first
|
|
822
|
+
* render.
|
|
823
|
+
*/
|
|
824
|
+
update: function (deferRender) {
|
|
825
|
+
var chart = this.chart,
|
|
826
|
+
pathfinder = this,
|
|
827
|
+
oldConnections = pathfinder.connections;
|
|
828
|
+
|
|
829
|
+
// Rebuild pathfinder connections from options
|
|
830
|
+
pathfinder.connections = [];
|
|
831
|
+
each(chart.series, function (series) {
|
|
832
|
+
if (series.visible) {
|
|
833
|
+
each(series.points, function (point) {
|
|
834
|
+
var to,
|
|
835
|
+
connects = (
|
|
836
|
+
point.options &&
|
|
837
|
+
point.options.connect &&
|
|
838
|
+
H.splat(point.options.connect)
|
|
839
|
+
);
|
|
840
|
+
if (point.visible && point.isInside !== false && connects) {
|
|
841
|
+
each(connects, function (connect) {
|
|
842
|
+
to = chart.get(typeof connect === 'string' ?
|
|
843
|
+
connect : connect.to
|
|
844
|
+
);
|
|
845
|
+
if (
|
|
846
|
+
to instanceof H.Point &&
|
|
847
|
+
to.series.visible &&
|
|
848
|
+
to.visible &&
|
|
849
|
+
to.isInside !== false
|
|
850
|
+
) {
|
|
851
|
+
// Add new connection
|
|
852
|
+
pathfinder.connections.push(new Connection(
|
|
853
|
+
point, // from
|
|
854
|
+
to,
|
|
855
|
+
typeof connect === 'string' ? {} : connect
|
|
856
|
+
));
|
|
857
|
+
}
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
});
|
|
863
|
+
|
|
864
|
+
// Clear connections that should not be updated, and move old info over
|
|
865
|
+
// to new connections.
|
|
866
|
+
for (
|
|
867
|
+
var j = 0, k, found, lenOld = oldConnections.length,
|
|
868
|
+
lenNew = pathfinder.connections.length;
|
|
869
|
+
j < lenOld;
|
|
870
|
+
++j
|
|
871
|
+
) {
|
|
872
|
+
found = false;
|
|
873
|
+
for (k = 0; k < lenNew; ++k) {
|
|
874
|
+
if (
|
|
875
|
+
oldConnections[j].fromPoint ===
|
|
876
|
+
pathfinder.connections[k].fromPoint &&
|
|
877
|
+
oldConnections[j].toPoint ===
|
|
878
|
+
pathfinder.connections[k].toPoint
|
|
879
|
+
) {
|
|
880
|
+
pathfinder.connections[k].graphics =
|
|
881
|
+
oldConnections[j].graphics;
|
|
882
|
+
found = true;
|
|
883
|
+
break;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
if (!found) {
|
|
887
|
+
oldConnections[j].destroy();
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
// Clear obstacles to force recalculation. This must be done on every
|
|
892
|
+
// redraw in case positions have changed. Recalculation is handled in
|
|
893
|
+
// Connection.getPath on demand.
|
|
894
|
+
delete this.chartObstacles;
|
|
895
|
+
delete this.lineObstacles;
|
|
896
|
+
|
|
897
|
+
// Draw the pending connections
|
|
898
|
+
pathfinder.renderConnections(deferRender);
|
|
899
|
+
},
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Draw the chart's connecting paths.
|
|
903
|
+
*
|
|
904
|
+
* @function Highcharts.Pathfinder#renderConnections
|
|
905
|
+
*
|
|
906
|
+
* @param {boolean} deferRender Whether or not to defer render until series
|
|
907
|
+
* animation is finished. Used on first render.
|
|
908
|
+
*/
|
|
909
|
+
renderConnections: function (deferRender) {
|
|
910
|
+
if (deferRender) {
|
|
911
|
+
// Render after series are done animating
|
|
912
|
+
each(this.chart.series, function (series) {
|
|
913
|
+
var render = function () {
|
|
914
|
+
// Find pathfinder connections belonging to this series
|
|
915
|
+
// that haven't rendered, and render them now.
|
|
916
|
+
var pathfinder = series.chart.pathfinder,
|
|
917
|
+
conns = pathfinder && pathfinder.connections || [];
|
|
918
|
+
each(conns, function (connection) {
|
|
919
|
+
if (
|
|
920
|
+
connection.fromPoint &&
|
|
921
|
+
connection.fromPoint.series === series
|
|
922
|
+
) {
|
|
923
|
+
connection.render();
|
|
924
|
+
}
|
|
925
|
+
});
|
|
926
|
+
if (series.pathfinderRemoveRenderEvent) {
|
|
927
|
+
series.pathfinderRemoveRenderEvent();
|
|
928
|
+
delete series.pathfinderRemoveRenderEvent;
|
|
929
|
+
}
|
|
930
|
+
};
|
|
931
|
+
if (series.options.animation === false) {
|
|
932
|
+
render();
|
|
933
|
+
} else {
|
|
934
|
+
series.pathfinderRemoveRenderEvent = addEvent(
|
|
935
|
+
series, 'afterAnimate', render
|
|
936
|
+
);
|
|
937
|
+
}
|
|
938
|
+
});
|
|
939
|
+
} else {
|
|
940
|
+
// Go through connections and render them
|
|
941
|
+
each(this.connections, function (connection) {
|
|
942
|
+
connection.render();
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
},
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Get obstacles for the points in the chart. Does not include connecting
|
|
949
|
+
* lines from Pathfinder. Applies algorithmMargin to the obstacles.
|
|
950
|
+
*
|
|
951
|
+
* @function Highcharts.Pathfinder#getChartObstacles
|
|
952
|
+
*
|
|
953
|
+
* @param {object} options
|
|
954
|
+
* Options for the calculation. Currenlty only
|
|
955
|
+
* options.algorithmMargin.
|
|
956
|
+
*
|
|
957
|
+
* @return {Array}
|
|
958
|
+
* An array of calculated obstacles. Each obstacle is defined as
|
|
959
|
+
* an object with xMin, xMax, yMin and yMax properties.
|
|
960
|
+
*/
|
|
961
|
+
getChartObstacles: function (options) {
|
|
962
|
+
var obstacles = [],
|
|
963
|
+
series = this.chart.series,
|
|
964
|
+
margin = pick(options.algorithmMargin, 0),
|
|
965
|
+
calculatedMargin;
|
|
966
|
+
for (var i = 0, sLen = series.length; i < sLen; ++i) {
|
|
967
|
+
if (series[i].visible) {
|
|
968
|
+
for (
|
|
969
|
+
var j = 0, pLen = series[i].points.length, bb, point;
|
|
970
|
+
j < pLen;
|
|
971
|
+
++j
|
|
972
|
+
) {
|
|
973
|
+
point = series[i].points[j];
|
|
974
|
+
if (point.visible) {
|
|
975
|
+
bb = getPointBB(point);
|
|
976
|
+
if (bb) {
|
|
977
|
+
obstacles.push({
|
|
978
|
+
xMin: bb.xMin - margin,
|
|
979
|
+
xMax: bb.xMax + margin,
|
|
980
|
+
yMin: bb.yMin - margin,
|
|
981
|
+
yMax: bb.yMax + margin
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
// Sort obstacles by xMin for optimization
|
|
990
|
+
obstacles = obstacles.sort(function (a, b) {
|
|
991
|
+
return a.xMin - b.xMin;
|
|
992
|
+
});
|
|
993
|
+
|
|
994
|
+
// Add auto-calculated margin if the option is not defined
|
|
995
|
+
if (!defined(options.algorithmMargin)) {
|
|
996
|
+
calculatedMargin =
|
|
997
|
+
options.algorithmMargin =
|
|
998
|
+
calculateObstacleMargin(obstacles);
|
|
999
|
+
each(obstacles, function (obstacle) {
|
|
1000
|
+
obstacle.xMin -= calculatedMargin;
|
|
1001
|
+
obstacle.xMax += calculatedMargin;
|
|
1002
|
+
obstacle.yMin -= calculatedMargin;
|
|
1003
|
+
obstacle.yMax += calculatedMargin;
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
return obstacles;
|
|
1008
|
+
},
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* Utility function to get metrics for obstacles:
|
|
1012
|
+
* - Widest obstacle width
|
|
1013
|
+
* - Tallest obstacle height
|
|
1014
|
+
*
|
|
1015
|
+
* @function Highcharts.Pathfinder#getObstacleMetrics
|
|
1016
|
+
*
|
|
1017
|
+
* @param {Array} obstacles
|
|
1018
|
+
* An array of obstacles to inspect.
|
|
1019
|
+
*
|
|
1020
|
+
* @return {object}
|
|
1021
|
+
* The calculated metrics, as an object with maxHeight and maxWidth
|
|
1022
|
+
* properties.
|
|
1023
|
+
*/
|
|
1024
|
+
getObstacleMetrics: function (obstacles) {
|
|
1025
|
+
var maxWidth = 0,
|
|
1026
|
+
maxHeight = 0,
|
|
1027
|
+
width,
|
|
1028
|
+
height,
|
|
1029
|
+
i = obstacles.length;
|
|
1030
|
+
|
|
1031
|
+
while (i--) {
|
|
1032
|
+
width = obstacles[i].xMax - obstacles[i].xMin;
|
|
1033
|
+
height = obstacles[i].yMax - obstacles[i].yMin;
|
|
1034
|
+
if (maxWidth < width) {
|
|
1035
|
+
maxWidth = width;
|
|
1036
|
+
}
|
|
1037
|
+
if (maxHeight < height) {
|
|
1038
|
+
maxHeight = height;
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
return {
|
|
1043
|
+
maxHeight: maxHeight,
|
|
1044
|
+
maxWidth: maxWidth
|
|
1045
|
+
};
|
|
1046
|
+
},
|
|
1047
|
+
|
|
1048
|
+
/**
|
|
1049
|
+
* Utility to get which direction to start the pathfinding algorithm
|
|
1050
|
+
* (X vs Y), calculated from a set of marker options.
|
|
1051
|
+
*
|
|
1052
|
+
* @function Highcharts.Pathfinder#getAlgorithmStartDirection
|
|
1053
|
+
*
|
|
1054
|
+
* @param {object} markerOptions
|
|
1055
|
+
* Marker options to calculate from.
|
|
1056
|
+
*
|
|
1057
|
+
* @return {boolean}
|
|
1058
|
+
* Returns true for X, false for Y, and undefined for
|
|
1059
|
+
* autocalculate.
|
|
1060
|
+
*/
|
|
1061
|
+
getAlgorithmStartDirection: function (markerOptions) {
|
|
1062
|
+
var xCenter = markerOptions.align !== 'left' &&
|
|
1063
|
+
markerOptions.align !== 'right',
|
|
1064
|
+
yCenter = markerOptions.verticalAlign !== 'top' &&
|
|
1065
|
+
markerOptions.verticalAlign !== 'bottom',
|
|
1066
|
+
undef;
|
|
1067
|
+
|
|
1068
|
+
return xCenter ?
|
|
1069
|
+
(yCenter ? undef : false) : // x is centered
|
|
1070
|
+
(yCenter ? true : undef); // x is off-center
|
|
1071
|
+
}
|
|
1072
|
+
};
|
|
1073
|
+
|
|
1074
|
+
// Add to Highcharts namespace
|
|
1075
|
+
H.Connection = Connection;
|
|
1076
|
+
H.Pathfinder = Pathfinder;
|
|
1077
|
+
|
|
1078
|
+
|
|
1079
|
+
// Add pathfinding capabilities to Points
|
|
1080
|
+
extend(H.Point.prototype, /** @lends Point.prototype */ {
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* Get coordinates of anchor point for pathfinder connection.
|
|
1084
|
+
*
|
|
1085
|
+
* @private
|
|
1086
|
+
* @function Highcharts.Point#getPathfinderAnchorPoint
|
|
1087
|
+
*
|
|
1088
|
+
* @param {object} markerOptions
|
|
1089
|
+
* Connection options for position on point.
|
|
1090
|
+
*
|
|
1091
|
+
* @return {object}
|
|
1092
|
+
* An object with x/y properties for the position. Coordinates are
|
|
1093
|
+
* in plot values, not relative to point.
|
|
1094
|
+
*/
|
|
1095
|
+
getPathfinderAnchorPoint: function (markerOptions) {
|
|
1096
|
+
var bb = getPointBB(this),
|
|
1097
|
+
x,
|
|
1098
|
+
y;
|
|
1099
|
+
|
|
1100
|
+
switch (markerOptions.align) { // eslint-disable-line default-case
|
|
1101
|
+
case 'right':
|
|
1102
|
+
x = 'xMax';
|
|
1103
|
+
break;
|
|
1104
|
+
case 'left':
|
|
1105
|
+
x = 'xMin';
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
switch (markerOptions.verticalAlign) { // eslint-disable-line default-case
|
|
1109
|
+
case 'top':
|
|
1110
|
+
y = 'yMin';
|
|
1111
|
+
break;
|
|
1112
|
+
case 'bottom':
|
|
1113
|
+
y = 'yMax';
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
return {
|
|
1117
|
+
x: x ? bb[x] : (bb.xMin + bb.xMax) / 2,
|
|
1118
|
+
y: y ? bb[y] : (bb.yMin + bb.yMax) / 2
|
|
1119
|
+
};
|
|
1120
|
+
},
|
|
1121
|
+
|
|
1122
|
+
/**
|
|
1123
|
+
* Utility to get the angle from one point to another.
|
|
1124
|
+
*
|
|
1125
|
+
* @private
|
|
1126
|
+
* @function Highcharts.Point#getRadiansToVector
|
|
1127
|
+
*
|
|
1128
|
+
* @param {object} v1
|
|
1129
|
+
* The first vector, as an object with x/y properties.
|
|
1130
|
+
*
|
|
1131
|
+
* @param {object} v2
|
|
1132
|
+
* The second vector, as an object with x/y properties.
|
|
1133
|
+
*
|
|
1134
|
+
* @return {number}
|
|
1135
|
+
* The angle in degrees
|
|
1136
|
+
*/
|
|
1137
|
+
getRadiansToVector: function (v1, v2) {
|
|
1138
|
+
var box;
|
|
1139
|
+
if (!defined(v2)) {
|
|
1140
|
+
box = getPointBB(this);
|
|
1141
|
+
v2 = {
|
|
1142
|
+
x: (box.xMin + box.xMax) / 2,
|
|
1143
|
+
y: (box.yMin + box.yMax) / 2
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
return Math.atan2(v2.y - v1.y, v1.x - v2.x);
|
|
1147
|
+
},
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* Utility to get the position of the marker, based on the path angle and
|
|
1151
|
+
* the marker's radius.
|
|
1152
|
+
*
|
|
1153
|
+
* @private
|
|
1154
|
+
* @function Highcharts.Point#getMarkerVector
|
|
1155
|
+
*
|
|
1156
|
+
* @param {number} radians
|
|
1157
|
+
* The angle in radians from the point center to another vector.
|
|
1158
|
+
*
|
|
1159
|
+
* @param {number} markerRadius
|
|
1160
|
+
* The radius of the marker, to calculate the additional distance
|
|
1161
|
+
* to the center of the marker.
|
|
1162
|
+
*
|
|
1163
|
+
* @param {object} anchor
|
|
1164
|
+
* The anchor point of the path and marker as an object with x/y
|
|
1165
|
+
* properties.
|
|
1166
|
+
*
|
|
1167
|
+
* @return {object}
|
|
1168
|
+
* The marker vector as an object with x/y properties.
|
|
1169
|
+
*/
|
|
1170
|
+
getMarkerVector: function (radians, markerRadius, anchor) {
|
|
1171
|
+
var twoPI = Math.PI * 2.0,
|
|
1172
|
+
theta = radians,
|
|
1173
|
+
bb = getPointBB(this),
|
|
1174
|
+
rectWidth = bb.xMax - bb.xMin,
|
|
1175
|
+
rectHeight = bb.yMax - bb.yMin,
|
|
1176
|
+
rAtan = Math.atan2(rectHeight, rectWidth),
|
|
1177
|
+
tanTheta = 1,
|
|
1178
|
+
leftOrRightRegion = false,
|
|
1179
|
+
rectHalfWidth = rectWidth / 2.0,
|
|
1180
|
+
rectHalfHeight = rectHeight / 2.0,
|
|
1181
|
+
rectHorizontalCenter = bb.xMin + rectHalfWidth,
|
|
1182
|
+
rectVerticalCenter = bb.yMin + rectHalfHeight,
|
|
1183
|
+
edgePoint = {
|
|
1184
|
+
x: rectHorizontalCenter,
|
|
1185
|
+
y: rectVerticalCenter
|
|
1186
|
+
},
|
|
1187
|
+
markerPoint = {},
|
|
1188
|
+
xFactor = 1,
|
|
1189
|
+
yFactor = 1;
|
|
1190
|
+
|
|
1191
|
+
while (theta < -Math.PI) {
|
|
1192
|
+
theta += twoPI;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
while (theta > Math.PI) {
|
|
1196
|
+
theta -= twoPI;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
tanTheta = Math.tan(theta);
|
|
1200
|
+
|
|
1201
|
+
if ((theta > -rAtan) && (theta <= rAtan)) {
|
|
1202
|
+
// Right side
|
|
1203
|
+
yFactor = -1;
|
|
1204
|
+
leftOrRightRegion = true;
|
|
1205
|
+
} else if (theta > rAtan && theta <= (Math.PI - rAtan)) {
|
|
1206
|
+
// Top side
|
|
1207
|
+
yFactor = -1;
|
|
1208
|
+
} else if (theta > (Math.PI - rAtan) || theta <= -(Math.PI - rAtan)) {
|
|
1209
|
+
// Left side
|
|
1210
|
+
xFactor = -1;
|
|
1211
|
+
leftOrRightRegion = true;
|
|
1212
|
+
} else {
|
|
1213
|
+
// Bottom side
|
|
1214
|
+
xFactor = -1;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
// Correct the edgePoint according to the placement of the marker
|
|
1218
|
+
if (leftOrRightRegion) {
|
|
1219
|
+
edgePoint.x += xFactor * (rectHalfWidth);
|
|
1220
|
+
edgePoint.y += yFactor * (rectHalfWidth) * tanTheta;
|
|
1221
|
+
} else {
|
|
1222
|
+
edgePoint.x += xFactor * (rectHeight / (2.0 * tanTheta));
|
|
1223
|
+
edgePoint.y += yFactor * (rectHalfHeight);
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
if (anchor.x !== rectHorizontalCenter) {
|
|
1227
|
+
edgePoint.x = anchor.x;
|
|
1228
|
+
}
|
|
1229
|
+
if (anchor.y !== rectVerticalCenter) {
|
|
1230
|
+
edgePoint.y = anchor.y;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
markerPoint.x = edgePoint.x + (markerRadius * Math.cos(theta));
|
|
1234
|
+
markerPoint.y = edgePoint.y - (markerRadius * Math.sin(theta));
|
|
1235
|
+
|
|
1236
|
+
return markerPoint;
|
|
1237
|
+
}
|
|
1238
|
+
});
|
|
1239
|
+
|
|
1240
|
+
// Initialize Pathfinder for charts
|
|
1241
|
+
H.Chart.prototype.callbacks.push(function (chart) {
|
|
1242
|
+
var options = chart.options;
|
|
1243
|
+
if (options.pathfinder.enabled !== false) {
|
|
1244
|
+
this.pathfinder = new Pathfinder(this);
|
|
1245
|
+
this.pathfinder.update(true); // First draw, defer render
|
|
1246
|
+
}
|
|
1247
|
+
});
|