aw-highstock_rails 7.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +22 -0
- data/LICENSE.txt +21 -0
- data/README.md +53 -0
- data/Rakefile +10 -0
- data/aw-highstock_rails.gemspec +28 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/aw/highstock_rails.rb +9 -0
- data/lib/aw/highstock_rails/version.rb +5 -0
- data/vendor/assets/javascripts/highstock/css/annotations/popup.css +229 -0
- data/vendor/assets/javascripts/highstock/css/annotations/popup.scss +235 -0
- data/vendor/assets/javascripts/highstock/css/highcharts.css +890 -0
- data/vendor/assets/javascripts/highstock/css/highcharts.scss +788 -0
- data/vendor/assets/javascripts/highstock/css/stocktools/gui.css +268 -0
- data/vendor/assets/javascripts/highstock/css/stocktools/gui.scss +270 -0
- data/vendor/assets/javascripts/highstock/css/themes/dark-unica.css +951 -0
- data/vendor/assets/javascripts/highstock/css/themes/dark-unica.scss +122 -0
- data/vendor/assets/javascripts/highstock/css/themes/grid-light.css +904 -0
- data/vendor/assets/javascripts/highstock/css/themes/grid-light.scss +33 -0
- data/vendor/assets/javascripts/highstock/css/themes/sand-signika.css +920 -0
- data/vendor/assets/javascripts/highstock/css/themes/sand-signika.scss +74 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/ControlPoint.js +130 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/MockPoint.js +415 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/annotations.src.js +1231 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/controllable/ControllableCircle.js +92 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/controllable/ControllableImage.js +101 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/controllable/ControllableLabel.js +452 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/controllable/ControllablePath.js +175 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/controllable/ControllableRect.js +93 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/controllable/controllableMixin.js +411 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/controllable/markerMixin.js +214 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/eventEmitterMixin.js +271 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/navigationBindings.js +1283 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/popup.js +1069 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/types/CrookedLine.js +191 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/types/ElliottWave.js +76 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/types/Fibonacci.js +247 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/types/InfinityLine.js +185 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/types/Measure.js +928 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/types/Pitchfork.js +203 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/types/Tunnel.js +242 -0
- data/vendor/assets/javascripts/highstock/es-modules/annotations/types/VerticalLine.js +157 -0
- data/vendor/assets/javascripts/highstock/es-modules/error-messages.js +128 -0
- data/vendor/assets/javascripts/highstock/es-modules/error.js +1 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/acceleration-bands.src.js +199 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/accumulation-distribution.src.js +129 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/ao.src.js +206 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/apo.src.js +148 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/aroon-oscillator.src.js +128 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/aroon.src.js +173 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/atr.src.js +151 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/bollinger-bands.src.js +209 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/cci.src.js +131 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/chaikin.src.js +167 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/cmf.src.js +246 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/dema.src.js +191 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/dpo.src.js +138 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/ema.src.js +166 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/ichimoku-kinko-hyo.src.js +850 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/indicators.src.js +425 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/keltner-channels.src.js +193 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/macd.src.js +417 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/mfi.src.js +198 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/momentum.src.js +119 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/natr.src.js +74 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/pivot-points.src.js +360 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/ppo.src.js +152 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/price-channel.src.js +149 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/price-envelopes.src.js +251 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/psar.src.js +307 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/regressions.src.js +427 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/roc.src.js +149 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/rsi.src.js +163 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/stochastic.src.js +193 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/supertrend.src.js +544 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/tema.src.js +247 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/trix.src.js +96 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/volume-by-price.src.js +671 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/vwap.src.js +189 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/williams-r.src.js +128 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/wma.src.js +146 -0
- data/vendor/assets/javascripts/highstock/es-modules/indicators/zigzag.src.js +221 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/highcharts-3d.src.js +17 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/highcharts-more.src.js +22 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/highstock.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/acceleration-bands.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/accumulation-distribution.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/ao.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/apo.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/aroon-oscillator.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/aroon.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/atr.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/bollinger-bands.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/cci.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/chaikin.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/cmf.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/dema.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/dpo.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/ema.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/indicators-all.src.js +49 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/indicators.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/keltner-channels.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/macd.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/mfi.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/momentum.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/natr.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/pivot-points.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/ppo.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/price-channel.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/price-envelopes.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/psar.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/regressions.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/roc.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/rsi.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/stochastic.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/supertrend.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/tema.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/trix.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/volume-by-price.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/vwap.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/williams-r.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/wma.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/indicators/zigzag.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/accessibility.src.js +13 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/annotations-advanced.src.js +20 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/annotations.src.js +12 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/arrow-symbols.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/boost-canvas.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/boost.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/bullet.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/current-date-indicator.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/cylinder.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/data.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/datagrouping.src.js +12 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/debugger.src.js +13 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/dependency-wheel.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/drag-panes.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/draggable-points.src.js +9 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/drilldown.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/export-data.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/exporting.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/full-screen.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/funnel.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/grid-axis.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/heatmap.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/histogram-bellcurve.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/item-series.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/networkgraph.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/no-data-to-display.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/offline-exporting.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/oldie-polyfills.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/oldie.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/overlapping-datalabels.src.js +9 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/parallel-coordinates.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/pareto.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/pathfinder.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/pattern-fill.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/price-indicator.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/sankey.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/series-label.src.js +9 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/solid-gauge.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/sonification.src.js +12 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/static-scale.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/stock-tools.src.js +12 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/stock.src.js +19 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/streamgraph.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/sunburst.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/tilemap.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/timeline.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/treegrid.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/treemap.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/variable-pie.src.js +11 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/variwide.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/vector.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/venn.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/windbarb.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/wordcloud.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/modules/xrange.src.js +10 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/themes/avocado.js +9 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/themes/avocado.src.js +9 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/themes/dark-blue.src.js +9 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/themes/dark-green.src.js +9 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/themes/dark-unica.src.js +9 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/themes/gray.src.js +9 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/themes/grid-light.src.js +9 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/themes/grid.src.js +9 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/themes/sand-signika.src.js +9 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/themes/skies.src.js +9 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/themes/sunset.js +9 -0
- data/vendor/assets/javascripts/highstock/es-modules/masters/themes/sunset.src.js +9 -0
- data/vendor/assets/javascripts/highstock/es-modules/mixins/ajax.js +123 -0
- data/vendor/assets/javascripts/highstock/es-modules/mixins/centered-series.js +116 -0
- data/vendor/assets/javascripts/highstock/es-modules/mixins/derived-series.js +150 -0
- data/vendor/assets/javascripts/highstock/es-modules/mixins/download-url.js +103 -0
- data/vendor/assets/javascripts/highstock/es-modules/mixins/draw-point.js +51 -0
- data/vendor/assets/javascripts/highstock/es-modules/mixins/geometry-circles.js +300 -0
- data/vendor/assets/javascripts/highstock/es-modules/mixins/geometry.js +50 -0
- data/vendor/assets/javascripts/highstock/es-modules/mixins/indicator-required.js +49 -0
- data/vendor/assets/javascripts/highstock/es-modules/mixins/multipe-lines.js +223 -0
- data/vendor/assets/javascripts/highstock/es-modules/mixins/navigation.js +59 -0
- data/vendor/assets/javascripts/highstock/es-modules/mixins/nodes.js +76 -0
- data/vendor/assets/javascripts/highstock/es-modules/mixins/on-series.js +167 -0
- data/vendor/assets/javascripts/highstock/es-modules/mixins/polygon.js +293 -0
- data/vendor/assets/javascripts/highstock/es-modules/mixins/reduce-array.js +53 -0
- data/vendor/assets/javascripts/highstock/es-modules/mixins/tree-series.js +256 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/a11y-i18n.src.js +524 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/annotations-legacy.src.js +1951 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/bellcurve.src.js +173 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/boost-canvas.src.js +732 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/boost.src.js +3730 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/bullet.src.js +361 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/cylinder.src.js +389 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/data.src.js +2417 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/debugger.src.js +109 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/dependency-wheel.src.js +199 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/drag-panes.src.js +624 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/draggable-points.src.js +2625 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/drilldown.src.js +1300 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/export-data.src.js +983 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/exporting.src.js +2149 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/full-screen.src.js +40 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/funnel.src.js +552 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/histogram.src.js +229 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/item-series.src.js +150 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/keyboard-navigation.src.js +1606 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/networkgraph/QuadTree.js +175 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/networkgraph/layouts.js +506 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/networkgraph/networkgraph.src.js +740 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/no-data-to-display.src.js +260 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/offline-exporting.src.js +710 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/oldie-polyfills.src.js +121 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/oldie.src.js +1556 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/overlapping-datalabels.src.js +250 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/parallel-coordinates.src.js +492 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/pareto.src.js +152 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/pattern-fill.src.js +607 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/price-indicator.src.js +149 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/sankey.src.js +809 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/screen-reader.src.js +954 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/series-label.src.js +1042 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/solid-gauge.src.js +486 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/Earcon.js +184 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/Instrument.js +582 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/Timeline.js +702 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/chartSonify.js +1026 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/instrumentDefinitions.js +37 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/musicalFrequencies.js +113 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/pointSonify.js +385 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/sonification.js +107 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/sonification/utilities.js +178 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/static-scale.src.js +88 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/stock-tools-bindings.js +1950 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/stock-tools-gui.js +1458 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/streamgraph.src.js +132 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/sunburst.src.js +1041 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/tilemap.src.js +769 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/timeline.src.js +750 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/treemap.src.js +1803 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/variable-pie.src.js +459 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/variwide.src.js +350 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/vector.src.js +354 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/venn.src.js +1192 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/windbarb.src.js +380 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/wordcloud.src.js +1103 -0
- data/vendor/assets/javascripts/highstock/es-modules/modules/xrange.src.js +761 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-3d/Axis.js +669 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-3d/Chart.js +1753 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-3d/Column.js +437 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-3d/Math.js +206 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-3d/Pie.js +207 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-3d/SVGRenderer.js +1002 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-3d/Scatter.js +154 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-3d/Series.js +73 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-3d/VMLRenderer.js +62 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/ArrowSymbols.js +198 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/CurrentDateIndicator.js +100 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/GanttChart.js +140 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/GanttSeries.js +415 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/GridAxis.js +961 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/Pathfinder.js +1298 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/PathfinderAlgorithms.js +816 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/Tree.js +158 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-gantt/TreeGrid.js +1003 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-map/ColorAxis.js +1103 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-map/ColorSeriesMixin.js +138 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-map/GeoJSON.js +435 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-map/HeatmapSeries.js +474 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-map/Map.js +477 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-map/MapAxis.js +124 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-map/MapBubbleSeries.js +274 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-map/MapLineSeries.js +143 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-map/MapNavigation.js +357 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-map/MapPointSeries.js +187 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-map/MapPointer.js +132 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-map/MapSeries.js +1294 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-more/AreaRangeSeries.js +725 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-more/AreaSplineRangeSeries.js +98 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-more/BoxPlotSeries.js +617 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-more/BubbleLegend.js +1167 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-more/BubbleSeries.js +661 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-more/ColumnPyramidSeries.js +288 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-more/ColumnRangeSeries.js +278 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-more/ErrorBarSeries.js +172 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-more/GaugeSeries.js +618 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-more/PackedBubbleSeries.js +567 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-more/Pane.js +399 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-more/Polar.js +634 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-more/PolygonSeries.js +151 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-more/RadialAxis.js +685 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts-more/WaterfallSeries.js +765 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts.js +684 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/AreaSeries.js +578 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/AreaSplineSeries.js +122 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Axis.js +6453 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/BarSeries.js +153 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/CandlestickSeries.js +358 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Chart.js +2307 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Color.js +301 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/ColumnSeries.js +1125 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/DataGrouping.js +1115 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/DataLabels.js +1431 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/DateTimeAxis.js +134 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Dynamics.js +1301 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/FlagsSeries.js +739 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Globals.js +75 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Html.js +539 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Interaction.js +1299 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Legend.js +1411 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/LogarithmicAxis.js +168 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/MSPointer.js +176 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Navigator.js +2486 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/OHLCSeries.js +412 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Options.js +3732 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/OrdinalAxis.js +962 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/PieSeries.js +1328 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/PlotBandSeries.experimental.js +74 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/PlotLineOrBand.js +1061 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Point.js +681 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Pointer.js +1332 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/RangeSelector.js +2063 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Responsive.js +295 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/ScatterSeries.js +278 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/ScrollablePlotArea.js +266 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Scrollbar.js +1134 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Series.js +5864 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/SplineSeries.js +267 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Stacking.js +604 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/StockChart.js +951 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/SvgRenderer.js +5109 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Tick.js +746 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Time.js +881 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Tooltip.js +1318 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/TouchPointer.js +404 -0
- data/vendor/assets/javascripts/highstock/es-modules/parts/Utilities.js +2751 -0
- data/vendor/assets/javascripts/highstock/es-modules/themes/avocado.js +37 -0
- data/vendor/assets/javascripts/highstock/es-modules/themes/dark-blue.js +259 -0
- data/vendor/assets/javascripts/highstock/es-modules/themes/dark-green.js +261 -0
- data/vendor/assets/javascripts/highstock/es-modules/themes/dark-unica.js +220 -0
- data/vendor/assets/javascripts/highstock/es-modules/themes/gray.js +267 -0
- data/vendor/assets/javascripts/highstock/es-modules/themes/grid-light.js +81 -0
- data/vendor/assets/javascripts/highstock/es-modules/themes/grid.js +110 -0
- data/vendor/assets/javascripts/highstock/es-modules/themes/sand-signika.js +111 -0
- data/vendor/assets/javascripts/highstock/es-modules/themes/skies.js +100 -0
- data/vendor/assets/javascripts/highstock/es-modules/themes/sunset.js +36 -0
- data/vendor/assets/javascripts/highstock/highcharts-3d.js +85 -0
- data/vendor/assets/javascripts/highstock/highcharts-3d.js.map +1 -0
- data/vendor/assets/javascripts/highstock/highcharts-more.js +101 -0
- data/vendor/assets/javascripts/highstock/highcharts-more.js.map +1 -0
- data/vendor/assets/javascripts/highstock/highstock.js +583 -0
- data/vendor/assets/javascripts/highstock/highstock.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/acceleration-bands.js +16 -0
- data/vendor/assets/javascripts/highstock/indicators/acceleration-bands.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/acceleration-bands.src.js +448 -0
- data/vendor/assets/javascripts/highstock/indicators/accumulation-distribution.js +12 -0
- data/vendor/assets/javascripts/highstock/indicators/accumulation-distribution.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/accumulation-distribution.src.js +156 -0
- data/vendor/assets/javascripts/highstock/indicators/ao.js +13 -0
- data/vendor/assets/javascripts/highstock/indicators/ao.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/ao.src.js +233 -0
- data/vendor/assets/javascripts/highstock/indicators/apo.js +13 -0
- data/vendor/assets/javascripts/highstock/indicators/apo.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/apo.src.js +223 -0
- data/vendor/assets/javascripts/highstock/indicators/aroon-oscillator.js +15 -0
- data/vendor/assets/javascripts/highstock/indicators/aroon-oscillator.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/aroon-oscillator.src.js +426 -0
- data/vendor/assets/javascripts/highstock/indicators/aroon.js +16 -0
- data/vendor/assets/javascripts/highstock/indicators/aroon.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/aroon.src.js +423 -0
- data/vendor/assets/javascripts/highstock/indicators/atr.js +12 -0
- data/vendor/assets/javascripts/highstock/indicators/atr.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/atr.src.js +178 -0
- data/vendor/assets/javascripts/highstock/indicators/bollinger-bands.js +16 -0
- data/vendor/assets/javascripts/highstock/indicators/bollinger-bands.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/bollinger-bands.src.js +458 -0
- data/vendor/assets/javascripts/highstock/indicators/cci.js +12 -0
- data/vendor/assets/javascripts/highstock/indicators/cci.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/cci.src.js +158 -0
- data/vendor/assets/javascripts/highstock/indicators/chaikin.js +15 -0
- data/vendor/assets/javascripts/highstock/indicators/chaikin.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/chaikin.src.js +370 -0
- data/vendor/assets/javascripts/highstock/indicators/cmf.js +12 -0
- data/vendor/assets/javascripts/highstock/indicators/cmf.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/cmf.src.js +273 -0
- data/vendor/assets/javascripts/highstock/indicators/dema.js +13 -0
- data/vendor/assets/javascripts/highstock/indicators/dema.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/dema.src.js +266 -0
- data/vendor/assets/javascripts/highstock/indicators/dpo.js +12 -0
- data/vendor/assets/javascripts/highstock/indicators/dpo.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/dpo.src.js +166 -0
- data/vendor/assets/javascripts/highstock/indicators/ema.js +12 -0
- data/vendor/assets/javascripts/highstock/indicators/ema.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/ema.src.js +193 -0
- data/vendor/assets/javascripts/highstock/indicators/ichimoku-kinko-hyo.js +22 -0
- data/vendor/assets/javascripts/highstock/indicators/ichimoku-kinko-hyo.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/ichimoku-kinko-hyo.src.js +877 -0
- data/vendor/assets/javascripts/highstock/indicators/indicators-all.js +117 -0
- data/vendor/assets/javascripts/highstock/indicators/indicators-all.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/indicators-all.src.js +9389 -0
- data/vendor/assets/javascripts/highstock/indicators/indicators.js +17 -0
- data/vendor/assets/javascripts/highstock/indicators/indicators.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/indicators.src.js +500 -0
- data/vendor/assets/javascripts/highstock/indicators/keltner-channels.js +16 -0
- data/vendor/assets/javascripts/highstock/indicators/keltner-channels.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/keltner-channels.src.js +442 -0
- data/vendor/assets/javascripts/highstock/indicators/macd.js +18 -0
- data/vendor/assets/javascripts/highstock/indicators/macd.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/macd.src.js +444 -0
- data/vendor/assets/javascripts/highstock/indicators/mfi.js +13 -0
- data/vendor/assets/javascripts/highstock/indicators/mfi.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/mfi.src.js +225 -0
- data/vendor/assets/javascripts/highstock/indicators/momentum.js +12 -0
- data/vendor/assets/javascripts/highstock/indicators/momentum.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/momentum.src.js +146 -0
- data/vendor/assets/javascripts/highstock/indicators/natr.js +12 -0
- data/vendor/assets/javascripts/highstock/indicators/natr.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/natr.src.js +101 -0
- data/vendor/assets/javascripts/highstock/indicators/pivot-points.js +16 -0
- data/vendor/assets/javascripts/highstock/indicators/pivot-points.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/pivot-points.src.js +387 -0
- data/vendor/assets/javascripts/highstock/indicators/ppo.js +13 -0
- data/vendor/assets/javascripts/highstock/indicators/ppo.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/ppo.src.js +227 -0
- data/vendor/assets/javascripts/highstock/indicators/price-channel.js +16 -0
- data/vendor/assets/javascripts/highstock/indicators/price-channel.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/price-channel.src.js +450 -0
- data/vendor/assets/javascripts/highstock/indicators/price-envelopes.js +15 -0
- data/vendor/assets/javascripts/highstock/indicators/price-envelopes.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/price-envelopes.src.js +278 -0
- data/vendor/assets/javascripts/highstock/indicators/psar.js +13 -0
- data/vendor/assets/javascripts/highstock/indicators/psar.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/psar.src.js +334 -0
- data/vendor/assets/javascripts/highstock/indicators/regressions.js +14 -0
- data/vendor/assets/javascripts/highstock/indicators/regressions.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/regressions.src.js +454 -0
- data/vendor/assets/javascripts/highstock/indicators/roc.js +12 -0
- data/vendor/assets/javascripts/highstock/indicators/roc.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/roc.src.js +176 -0
- data/vendor/assets/javascripts/highstock/indicators/rsi.js +12 -0
- data/vendor/assets/javascripts/highstock/indicators/rsi.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/rsi.src.js +190 -0
- data/vendor/assets/javascripts/highstock/indicators/stochastic.js +17 -0
- data/vendor/assets/javascripts/highstock/indicators/stochastic.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/stochastic.src.js +494 -0
- data/vendor/assets/javascripts/highstock/indicators/supertrend.js +17 -0
- data/vendor/assets/javascripts/highstock/indicators/supertrend.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/supertrend.src.js +571 -0
- data/vendor/assets/javascripts/highstock/indicators/tema.js +14 -0
- data/vendor/assets/javascripts/highstock/indicators/tema.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/tema.src.js +322 -0
- data/vendor/assets/javascripts/highstock/indicators/trix.js +12 -0
- data/vendor/assets/javascripts/highstock/indicators/trix.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/trix.src.js +171 -0
- data/vendor/assets/javascripts/highstock/indicators/volume-by-price.js +21 -0
- data/vendor/assets/javascripts/highstock/indicators/volume-by-price.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/volume-by-price.src.js +698 -0
- data/vendor/assets/javascripts/highstock/indicators/vwap.js +12 -0
- data/vendor/assets/javascripts/highstock/indicators/vwap.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/vwap.src.js +216 -0
- data/vendor/assets/javascripts/highstock/indicators/williams-r.js +13 -0
- data/vendor/assets/javascripts/highstock/indicators/williams-r.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/williams-r.src.js +207 -0
- data/vendor/assets/javascripts/highstock/indicators/wma.js +12 -0
- data/vendor/assets/javascripts/highstock/indicators/wma.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/wma.src.js +173 -0
- data/vendor/assets/javascripts/highstock/indicators/zigzag.js +13 -0
- data/vendor/assets/javascripts/highstock/indicators/zigzag.js.map +1 -0
- data/vendor/assets/javascripts/highstock/indicators/zigzag.src.js +248 -0
- data/vendor/assets/javascripts/highstock/lib/canvg.js +130 -0
- data/vendor/assets/javascripts/highstock/lib/canvg.src.js +3073 -0
- data/vendor/assets/javascripts/highstock/lib/jspdf.js +283 -0
- data/vendor/assets/javascripts/highstock/lib/jspdf.src.js +21627 -0
- data/vendor/assets/javascripts/highstock/lib/rgbcolor.js +17 -0
- data/vendor/assets/javascripts/highstock/lib/rgbcolor.src.js +299 -0
- data/vendor/assets/javascripts/highstock/lib/svg2pdf.js +38 -0
- data/vendor/assets/javascripts/highstock/lib/svg2pdf.src.js +4390 -0
- data/vendor/assets/javascripts/highstock/modules/accessibility.js +73 -0
- data/vendor/assets/javascripts/highstock/modules/accessibility.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/accessibility.src.js +3103 -0
- data/vendor/assets/javascripts/highstock/modules/annotations-advanced.js +132 -0
- data/vendor/assets/javascripts/highstock/modules/annotations-advanced.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/annotations-advanced.src.js +8230 -0
- data/vendor/assets/javascripts/highstock/modules/annotations.js +94 -0
- data/vendor/assets/javascripts/highstock/modules/annotations.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/annotations.src.js +6001 -0
- data/vendor/assets/javascripts/highstock/modules/arrow-symbols.js +11 -0
- data/vendor/assets/javascripts/highstock/modules/arrow-symbols.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/arrow-symbols.src.js +225 -0
- data/vendor/assets/javascripts/highstock/modules/boost-canvas.js +23 -0
- data/vendor/assets/javascripts/highstock/modules/boost-canvas.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/boost-canvas.src.js +756 -0
- data/vendor/assets/javascripts/highstock/modules/boost.js +65 -0
- data/vendor/assets/javascripts/highstock/modules/boost.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/boost.src.js +3752 -0
- data/vendor/assets/javascripts/highstock/modules/bullet.js +14 -0
- data/vendor/assets/javascripts/highstock/modules/bullet.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/bullet.src.js +388 -0
- data/vendor/assets/javascripts/highstock/modules/current-date-indicator.js +11 -0
- data/vendor/assets/javascripts/highstock/modules/current-date-indicator.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/current-date-indicator.src.js +127 -0
- data/vendor/assets/javascripts/highstock/modules/cylinder.js +14 -0
- data/vendor/assets/javascripts/highstock/modules/cylinder.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/cylinder.src.js +413 -0
- data/vendor/assets/javascripts/highstock/modules/data.js +37 -0
- data/vendor/assets/javascripts/highstock/modules/data.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/data.src.js +2565 -0
- data/vendor/assets/javascripts/highstock/modules/datagrouping.js +25 -0
- data/vendor/assets/javascripts/highstock/modules/datagrouping.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/datagrouping.src.js +1140 -0
- data/vendor/assets/javascripts/highstock/modules/debugger.js +28 -0
- data/vendor/assets/javascripts/highstock/modules/debugger.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/debugger.src.js +267 -0
- data/vendor/assets/javascripts/highstock/modules/dependency-wheel.js +15 -0
- data/vendor/assets/javascripts/highstock/modules/dependency-wheel.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/dependency-wheel.src.js +301 -0
- data/vendor/assets/javascripts/highstock/modules/drag-panes.js +18 -0
- data/vendor/assets/javascripts/highstock/modules/drag-panes.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/drag-panes.src.js +649 -0
- data/vendor/assets/javascripts/highstock/modules/draggable-points.js +40 -0
- data/vendor/assets/javascripts/highstock/modules/draggable-points.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/draggable-points.src.js +2650 -0
- data/vendor/assets/javascripts/highstock/modules/drilldown.js +29 -0
- data/vendor/assets/javascripts/highstock/modules/drilldown.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/drilldown.src.js +1321 -0
- data/vendor/assets/javascripts/highstock/modules/export-data.js +27 -0
- data/vendor/assets/javascripts/highstock/modules/export-data.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/export-data.src.js +1234 -0
- data/vendor/assets/javascripts/highstock/modules/exporting.js +35 -0
- data/vendor/assets/javascripts/highstock/modules/exporting.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/exporting.src.js +2233 -0
- data/vendor/assets/javascripts/highstock/modules/full-screen.js +11 -0
- data/vendor/assets/javascripts/highstock/modules/full-screen.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/full-screen.src.js +68 -0
- data/vendor/assets/javascripts/highstock/modules/funnel.js +14 -0
- data/vendor/assets/javascripts/highstock/modules/funnel.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/funnel.src.js +576 -0
- data/vendor/assets/javascripts/highstock/modules/grid-axis.js +23 -0
- data/vendor/assets/javascripts/highstock/modules/grid-axis.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/grid-axis.src.js +988 -0
- data/vendor/assets/javascripts/highstock/modules/heatmap.js +28 -0
- data/vendor/assets/javascripts/highstock/modules/heatmap.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/heatmap.src.js +1731 -0
- data/vendor/assets/javascripts/highstock/modules/histogram-bellcurve.js +16 -0
- data/vendor/assets/javascripts/highstock/modules/histogram-bellcurve.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/histogram-bellcurve.src.js +570 -0
- data/vendor/assets/javascripts/highstock/modules/item-series.js +13 -0
- data/vendor/assets/javascripts/highstock/modules/item-series.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/item-series.src.js +176 -0
- data/vendor/assets/javascripts/highstock/modules/networkgraph.js +31 -0
- data/vendor/assets/javascripts/highstock/modules/networkgraph.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/networkgraph.src.js +1348 -0
- data/vendor/assets/javascripts/highstock/modules/no-data-to-display.js +13 -0
- data/vendor/assets/javascripts/highstock/modules/no-data-to-display.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/no-data-to-display.src.js +285 -0
- data/vendor/assets/javascripts/highstock/modules/offline-exporting.js +22 -0
- data/vendor/assets/javascripts/highstock/modules/offline-exporting.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/offline-exporting.src.js +838 -0
- data/vendor/assets/javascripts/highstock/modules/oldie-polyfills.js +13 -0
- data/vendor/assets/javascripts/highstock/modules/oldie-polyfills.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/oldie-polyfills.src.js +150 -0
- data/vendor/assets/javascripts/highstock/modules/oldie.js +35 -0
- data/vendor/assets/javascripts/highstock/modules/oldie.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/oldie.src.js +1582 -0
- data/vendor/assets/javascripts/highstock/modules/overlapping-datalabels.js +9 -0
- data/vendor/assets/javascripts/highstock/modules/overlapping-datalabels.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/overlapping-datalabels.src.js +22 -0
- data/vendor/assets/javascripts/highstock/modules/parallel-coordinates.js +18 -0
- data/vendor/assets/javascripts/highstock/modules/parallel-coordinates.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/parallel-coordinates.src.js +517 -0
- data/vendor/assets/javascripts/highstock/modules/pareto.js +14 -0
- data/vendor/assets/javascripts/highstock/modules/pareto.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/pareto.src.js +327 -0
- data/vendor/assets/javascripts/highstock/modules/pathfinder.js +34 -0
- data/vendor/assets/javascripts/highstock/modules/pathfinder.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/pathfinder.src.js +2336 -0
- data/vendor/assets/javascripts/highstock/modules/pattern-fill.js +21 -0
- data/vendor/assets/javascripts/highstock/modules/pattern-fill.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/pattern-fill.src.js +634 -0
- data/vendor/assets/javascripts/highstock/modules/price-indicator.js +13 -0
- data/vendor/assets/javascripts/highstock/modules/price-indicator.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/price-indicator.src.js +176 -0
- data/vendor/assets/javascripts/highstock/modules/sankey.js +22 -0
- data/vendor/assets/javascripts/highstock/modules/sankey.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/sankey.src.js +911 -0
- data/vendor/assets/javascripts/highstock/modules/series-label.js +23 -0
- data/vendor/assets/javascripts/highstock/modules/series-label.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/series-label.src.js +1065 -0
- data/vendor/assets/javascripts/highstock/modules/solid-gauge.js +15 -0
- data/vendor/assets/javascripts/highstock/modules/solid-gauge.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/solid-gauge.src.js +510 -0
- data/vendor/assets/javascripts/highstock/modules/sonification.js +53 -0
- data/vendor/assets/javascripts/highstock/modules/sonification.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/sonification.src.js +3341 -0
- data/vendor/assets/javascripts/highstock/modules/static-scale.js +12 -0
- data/vendor/assets/javascripts/highstock/modules/static-scale.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/static-scale.src.js +114 -0
- data/vendor/assets/javascripts/highstock/modules/stock-tools.js +65 -0
- data/vendor/assets/javascripts/highstock/modules/stock-tools.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/stock-tools.src.js +3437 -0
- data/vendor/assets/javascripts/highstock/modules/stock.js +151 -0
- data/vendor/assets/javascripts/highstock/modules/stock.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/stock.src.js +10907 -0
- data/vendor/assets/javascripts/highstock/modules/streamgraph.js +10 -0
- data/vendor/assets/javascripts/highstock/modules/streamgraph.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/streamgraph.src.js +158 -0
- data/vendor/assets/javascripts/highstock/modules/sunburst.js +52 -0
- data/vendor/assets/javascripts/highstock/modules/sunburst.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/sunburst.src.js +3174 -0
- data/vendor/assets/javascripts/highstock/modules/tilemap.js +26 -0
- data/vendor/assets/javascripts/highstock/modules/tilemap.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/tilemap.src.js +1402 -0
- data/vendor/assets/javascripts/highstock/modules/timeline.js +23 -0
- data/vendor/assets/javascripts/highstock/modules/timeline.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/timeline.src.js +778 -0
- data/vendor/assets/javascripts/highstock/modules/treegrid.js +50 -0
- data/vendor/assets/javascripts/highstock/modules/treegrid.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/treegrid.src.js +2917 -0
- data/vendor/assets/javascripts/highstock/modules/treemap.js +39 -0
- data/vendor/assets/javascripts/highstock/modules/treemap.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/treemap.src.js +2083 -0
- data/vendor/assets/javascripts/highstock/modules/variable-pie.js +16 -0
- data/vendor/assets/javascripts/highstock/modules/variable-pie.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/variable-pie.src.js +485 -0
- data/vendor/assets/javascripts/highstock/modules/variwide.js +15 -0
- data/vendor/assets/javascripts/highstock/modules/variwide.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/variwide.src.js +376 -0
- data/vendor/assets/javascripts/highstock/modules/vector.js +13 -0
- data/vendor/assets/javascripts/highstock/modules/vector.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/vector.src.js +381 -0
- data/vendor/assets/javascripts/highstock/modules/venn.js +30 -0
- data/vendor/assets/javascripts/highstock/modules/venn.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/venn.src.js +1624 -0
- data/vendor/assets/javascripts/highstock/modules/windbarb.js +17 -0
- data/vendor/assets/javascripts/highstock/modules/windbarb.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/windbarb.src.js +574 -0
- data/vendor/assets/javascripts/highstock/modules/wordcloud.js +25 -0
- data/vendor/assets/javascripts/highstock/modules/wordcloud.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/wordcloud.src.js +1475 -0
- data/vendor/assets/javascripts/highstock/modules/xrange.js +20 -0
- data/vendor/assets/javascripts/highstock/modules/xrange.js.map +1 -0
- data/vendor/assets/javascripts/highstock/modules/xrange.src.js +788 -0
- data/vendor/assets/javascripts/highstock/themes/avocado.js +9 -0
- data/vendor/assets/javascripts/highstock/themes/avocado.js.map +1 -0
- data/vendor/assets/javascripts/highstock/themes/avocado.src.js +63 -0
- data/vendor/assets/javascripts/highstock/themes/dark-blue.js +15 -0
- data/vendor/assets/javascripts/highstock/themes/dark-blue.js.map +1 -0
- data/vendor/assets/javascripts/highstock/themes/dark-blue.src.js +285 -0
- data/vendor/assets/javascripts/highstock/themes/dark-green.js +15 -0
- data/vendor/assets/javascripts/highstock/themes/dark-green.js.map +1 -0
- data/vendor/assets/javascripts/highstock/themes/dark-green.src.js +287 -0
- data/vendor/assets/javascripts/highstock/themes/dark-unica.js +14 -0
- data/vendor/assets/javascripts/highstock/themes/dark-unica.js.map +1 -0
- data/vendor/assets/javascripts/highstock/themes/dark-unica.src.js +246 -0
- data/vendor/assets/javascripts/highstock/themes/gray.js +15 -0
- data/vendor/assets/javascripts/highstock/themes/gray.js.map +1 -0
- data/vendor/assets/javascripts/highstock/themes/gray.src.js +293 -0
- data/vendor/assets/javascripts/highstock/themes/grid-light.js +11 -0
- data/vendor/assets/javascripts/highstock/themes/grid-light.js.map +1 -0
- data/vendor/assets/javascripts/highstock/themes/grid-light.src.js +107 -0
- data/vendor/assets/javascripts/highstock/themes/grid.js +11 -0
- data/vendor/assets/javascripts/highstock/themes/grid.js.map +1 -0
- data/vendor/assets/javascripts/highstock/themes/grid.src.js +136 -0
- data/vendor/assets/javascripts/highstock/themes/sand-signika.js +11 -0
- data/vendor/assets/javascripts/highstock/themes/sand-signika.js.map +1 -0
- data/vendor/assets/javascripts/highstock/themes/sand-signika.src.js +137 -0
- data/vendor/assets/javascripts/highstock/themes/skies.js +11 -0
- data/vendor/assets/javascripts/highstock/themes/skies.js.map +1 -0
- data/vendor/assets/javascripts/highstock/themes/skies.src.js +126 -0
- data/vendor/assets/javascripts/highstock/themes/sunset.js +9 -0
- data/vendor/assets/javascripts/highstock/themes/sunset.js.map +1 -0
- data/vendor/assets/javascripts/highstock/themes/sunset.src.js +62 -0
- metadata +781 -0
@@ -0,0 +1,816 @@
|
|
1
|
+
/* *
|
2
|
+
* (c) 2016 Highsoft AS
|
3
|
+
* Author: Øystein Moseng
|
4
|
+
*
|
5
|
+
* License: www.highcharts.com/license
|
6
|
+
*/
|
7
|
+
|
8
|
+
'use strict';
|
9
|
+
|
10
|
+
import H from '../parts/Globals.js';
|
11
|
+
import '../parts/Utilities.js';
|
12
|
+
|
13
|
+
var min = Math.min,
|
14
|
+
max = Math.max,
|
15
|
+
abs = Math.abs,
|
16
|
+
pick = H.pick;
|
17
|
+
|
18
|
+
/**
|
19
|
+
* Get index of last obstacle before xMin. Employs a type of binary search, and
|
20
|
+
* thus requires that obstacles are sorted by xMin value.
|
21
|
+
*
|
22
|
+
* @private
|
23
|
+
* @function findLastObstacleBefore
|
24
|
+
*
|
25
|
+
* @param {Array<object>} obstacles
|
26
|
+
* Array of obstacles to search in.
|
27
|
+
*
|
28
|
+
* @param {number} xMin
|
29
|
+
* The xMin threshold.
|
30
|
+
*
|
31
|
+
* @param {number} startIx
|
32
|
+
* Starting index to search from. Must be within array range.
|
33
|
+
*
|
34
|
+
* @return {number}
|
35
|
+
* The index of the last obstacle element before xMin.
|
36
|
+
*/
|
37
|
+
function findLastObstacleBefore(obstacles, xMin, startIx) {
|
38
|
+
var left = startIx || 0, // left limit
|
39
|
+
right = obstacles.length - 1, // right limit
|
40
|
+
min = xMin - 0.0000001, // Make sure we include all obstacles at xMin
|
41
|
+
cursor,
|
42
|
+
cmp;
|
43
|
+
|
44
|
+
while (left <= right) {
|
45
|
+
cursor = (right + left) >> 1;
|
46
|
+
cmp = min - obstacles[cursor].xMin;
|
47
|
+
if (cmp > 0) {
|
48
|
+
left = cursor + 1;
|
49
|
+
} else if (cmp < 0) {
|
50
|
+
right = cursor - 1;
|
51
|
+
} else {
|
52
|
+
return cursor;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
return left > 0 ? left - 1 : 0;
|
56
|
+
}
|
57
|
+
|
58
|
+
/**
|
59
|
+
* Test if a point lays within an obstacle.
|
60
|
+
*
|
61
|
+
* @private
|
62
|
+
* @function pointWithinObstacle
|
63
|
+
*
|
64
|
+
* @param {object} obstacle
|
65
|
+
* Obstacle to test.
|
66
|
+
*
|
67
|
+
* @param {Highcharts.Point} point
|
68
|
+
* Point with x/y props.
|
69
|
+
*
|
70
|
+
* @return {boolean}
|
71
|
+
* Whether point is within the obstacle or not.
|
72
|
+
*/
|
73
|
+
function pointWithinObstacle(obstacle, point) {
|
74
|
+
return (
|
75
|
+
point.x <= obstacle.xMax &&
|
76
|
+
point.x >= obstacle.xMin &&
|
77
|
+
point.y <= obstacle.yMax &&
|
78
|
+
point.y >= obstacle.yMin
|
79
|
+
);
|
80
|
+
}
|
81
|
+
|
82
|
+
/**
|
83
|
+
* Find the index of an obstacle that wraps around a point.
|
84
|
+
* Returns -1 if not found.
|
85
|
+
*
|
86
|
+
* @private
|
87
|
+
* @function findObstacleFromPoint
|
88
|
+
*
|
89
|
+
* @param {Array<object>} obstacles
|
90
|
+
* Obstacles to test.
|
91
|
+
*
|
92
|
+
* @param {Highcharts.Point} point
|
93
|
+
* Point with x/y props.
|
94
|
+
*
|
95
|
+
* @return {number}
|
96
|
+
* Ix of the obstacle in the array, or -1 if not found.
|
97
|
+
*/
|
98
|
+
function findObstacleFromPoint(obstacles, point) {
|
99
|
+
var i = findLastObstacleBefore(obstacles, point.x + 1) + 1;
|
100
|
+
|
101
|
+
while (i--) {
|
102
|
+
if (obstacles[i].xMax >= point.x &&
|
103
|
+
// optimization using lazy evaluation
|
104
|
+
pointWithinObstacle(obstacles[i], point)) {
|
105
|
+
return i;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
return -1;
|
109
|
+
}
|
110
|
+
|
111
|
+
/**
|
112
|
+
* Get SVG path array from array of line segments.
|
113
|
+
*
|
114
|
+
* @private
|
115
|
+
* @function pathFromSegments
|
116
|
+
*
|
117
|
+
* @param {Array<object>} segments
|
118
|
+
* The segments to build the path from.
|
119
|
+
*
|
120
|
+
* @return {Highcharts.SVGPathArray}
|
121
|
+
* SVG path array as accepted by the SVG Renderer.
|
122
|
+
*/
|
123
|
+
function pathFromSegments(segments) {
|
124
|
+
var path = [];
|
125
|
+
|
126
|
+
if (segments.length) {
|
127
|
+
path.push('M', segments[0].start.x, segments[0].start.y);
|
128
|
+
for (var i = 0; i < segments.length; ++i) {
|
129
|
+
path.push('L', segments[i].end.x, segments[i].end.y);
|
130
|
+
}
|
131
|
+
}
|
132
|
+
return path;
|
133
|
+
}
|
134
|
+
|
135
|
+
/**
|
136
|
+
* Limits obstacle max/mins in all directions to bounds. Modifies input
|
137
|
+
* obstacle.
|
138
|
+
*
|
139
|
+
* @private
|
140
|
+
* @function limitObstacleToBounds
|
141
|
+
*
|
142
|
+
* @param {object} obstacle
|
143
|
+
* Obstacle to limit.
|
144
|
+
*
|
145
|
+
* @param {object} bounds
|
146
|
+
* Bounds to use as limit.
|
147
|
+
*/
|
148
|
+
function limitObstacleToBounds(obstacle, bounds) {
|
149
|
+
obstacle.yMin = max(obstacle.yMin, bounds.yMin);
|
150
|
+
obstacle.yMax = min(obstacle.yMax, bounds.yMax);
|
151
|
+
obstacle.xMin = max(obstacle.xMin, bounds.xMin);
|
152
|
+
obstacle.xMax = min(obstacle.xMax, bounds.xMax);
|
153
|
+
}
|
154
|
+
|
155
|
+
|
156
|
+
// Define the available pathfinding algorithms.
|
157
|
+
// Algorithms take up to 3 arguments: starting point, ending point, and an
|
158
|
+
// options object.
|
159
|
+
var algorithms = {
|
160
|
+
|
161
|
+
/**
|
162
|
+
* Get an SVG path from a starting coordinate to an ending coordinate.
|
163
|
+
* Draws a straight line.
|
164
|
+
*
|
165
|
+
* @function Highcharts.Pathfinder.algorithms.straight
|
166
|
+
*
|
167
|
+
* @param {object} start
|
168
|
+
* Starting coordinate, object with x/y props.
|
169
|
+
*
|
170
|
+
* @param {object} end
|
171
|
+
* Ending coordinate, object with x/y props.
|
172
|
+
*
|
173
|
+
* @return {object}
|
174
|
+
* An object with the SVG path in Array form as accepted by the SVG
|
175
|
+
* renderer, as well as an array of new obstacles making up this
|
176
|
+
* path.
|
177
|
+
*/
|
178
|
+
straight: function (start, end) {
|
179
|
+
return {
|
180
|
+
path: ['M', start.x, start.y, 'L', end.x, end.y],
|
181
|
+
obstacles: [{ start: start, end: end }]
|
182
|
+
};
|
183
|
+
},
|
184
|
+
|
185
|
+
/**
|
186
|
+
* Find a path from a starting coordinate to an ending coordinate, using
|
187
|
+
* right angles only, and taking only starting/ending obstacle into
|
188
|
+
* consideration.
|
189
|
+
*
|
190
|
+
* @function Highcharts.Pathfinder.algorithms.simpleConnect
|
191
|
+
*
|
192
|
+
* @param {object} start
|
193
|
+
* Starting coordinate, object with x/y props.
|
194
|
+
*
|
195
|
+
* @param {object} end
|
196
|
+
* Ending coordinate, object with x/y props.
|
197
|
+
*
|
198
|
+
* @param {object} options
|
199
|
+
* Options for the algorithm:
|
200
|
+
* - chartObstacles: Array of chart obstacles to avoid
|
201
|
+
* - startDirectionX: Optional. True if starting in the X direction.
|
202
|
+
* If not provided, the algorithm starts in the direction that is
|
203
|
+
* the furthest between start/end.
|
204
|
+
*
|
205
|
+
* @return {object}
|
206
|
+
* An object with the SVG path in Array form as accepted by the SVG
|
207
|
+
* renderer, as well as an array of new obstacles making up this
|
208
|
+
* path.
|
209
|
+
*/
|
210
|
+
simpleConnect: H.extend(function (start, end, options) {
|
211
|
+
var segments = [],
|
212
|
+
endSegment,
|
213
|
+
dir = pick(
|
214
|
+
options.startDirectionX,
|
215
|
+
abs(end.x - start.x) > abs(end.y - start.y)
|
216
|
+
) ? 'x' : 'y',
|
217
|
+
chartObstacles = options.chartObstacles,
|
218
|
+
startObstacleIx = findObstacleFromPoint(chartObstacles, start),
|
219
|
+
endObstacleIx = findObstacleFromPoint(chartObstacles, end),
|
220
|
+
startObstacle,
|
221
|
+
endObstacle,
|
222
|
+
prevWaypoint,
|
223
|
+
waypoint,
|
224
|
+
waypoint2,
|
225
|
+
useMax,
|
226
|
+
endPoint;
|
227
|
+
|
228
|
+
// Return a clone of a point with a property set from a target object,
|
229
|
+
// optionally with an offset
|
230
|
+
function copyFromPoint(from, fromKey, to, toKey, offset) {
|
231
|
+
var point = {
|
232
|
+
x: from.x,
|
233
|
+
y: from.y
|
234
|
+
};
|
235
|
+
|
236
|
+
point[fromKey] = to[toKey || fromKey] + (offset || 0);
|
237
|
+
return point;
|
238
|
+
}
|
239
|
+
|
240
|
+
// Return waypoint outside obstacle
|
241
|
+
function getMeOut(obstacle, point, direction) {
|
242
|
+
var useMax = abs(point[direction] - obstacle[direction + 'Min']) >
|
243
|
+
abs(point[direction] - obstacle[direction + 'Max']);
|
244
|
+
|
245
|
+
return copyFromPoint(
|
246
|
+
point,
|
247
|
+
direction,
|
248
|
+
obstacle,
|
249
|
+
direction + (useMax ? 'Max' : 'Min'),
|
250
|
+
useMax ? 1 : -1
|
251
|
+
);
|
252
|
+
}
|
253
|
+
|
254
|
+
// Pull out end point
|
255
|
+
if (endObstacleIx > -1) {
|
256
|
+
endObstacle = chartObstacles[endObstacleIx];
|
257
|
+
waypoint = getMeOut(endObstacle, end, dir);
|
258
|
+
endSegment = {
|
259
|
+
start: waypoint,
|
260
|
+
end: end
|
261
|
+
};
|
262
|
+
endPoint = waypoint;
|
263
|
+
} else {
|
264
|
+
endPoint = end;
|
265
|
+
}
|
266
|
+
|
267
|
+
// If an obstacle envelops the start point, add a segment to get out,
|
268
|
+
// and around it.
|
269
|
+
if (startObstacleIx > -1) {
|
270
|
+
startObstacle = chartObstacles[startObstacleIx];
|
271
|
+
waypoint = getMeOut(startObstacle, start, dir);
|
272
|
+
segments.push({
|
273
|
+
start: start,
|
274
|
+
end: waypoint
|
275
|
+
});
|
276
|
+
|
277
|
+
// If we are going back again, switch direction to get around start
|
278
|
+
// obstacle.
|
279
|
+
if (
|
280
|
+
waypoint[dir] > start[dir] === // Going towards max from start
|
281
|
+
waypoint[dir] > endPoint[dir] // Going towards min to end
|
282
|
+
) {
|
283
|
+
dir = dir === 'y' ? 'x' : 'y';
|
284
|
+
useMax = start[dir] < end[dir];
|
285
|
+
segments.push({
|
286
|
+
start: waypoint,
|
287
|
+
end: copyFromPoint(
|
288
|
+
waypoint,
|
289
|
+
dir,
|
290
|
+
startObstacle,
|
291
|
+
dir + (useMax ? 'Max' : 'Min'),
|
292
|
+
useMax ? 1 : -1
|
293
|
+
)
|
294
|
+
});
|
295
|
+
|
296
|
+
// Switch direction again
|
297
|
+
dir = dir === 'y' ? 'x' : 'y';
|
298
|
+
}
|
299
|
+
}
|
300
|
+
|
301
|
+
// We are around the start obstacle. Go towards the end in one
|
302
|
+
// direction.
|
303
|
+
prevWaypoint = segments.length ?
|
304
|
+
segments[segments.length - 1].end :
|
305
|
+
start;
|
306
|
+
waypoint = copyFromPoint(prevWaypoint, dir, endPoint);
|
307
|
+
segments.push({
|
308
|
+
start: prevWaypoint,
|
309
|
+
end: waypoint
|
310
|
+
});
|
311
|
+
|
312
|
+
// Final run to end point in the other direction
|
313
|
+
dir = dir === 'y' ? 'x' : 'y';
|
314
|
+
waypoint2 = copyFromPoint(waypoint, dir, endPoint);
|
315
|
+
segments.push({
|
316
|
+
start: waypoint,
|
317
|
+
end: waypoint2
|
318
|
+
});
|
319
|
+
|
320
|
+
// Finally add the endSegment
|
321
|
+
segments.push(endSegment);
|
322
|
+
|
323
|
+
return {
|
324
|
+
path: pathFromSegments(segments),
|
325
|
+
obstacles: segments
|
326
|
+
};
|
327
|
+
}, {
|
328
|
+
requiresObstacles: true
|
329
|
+
}),
|
330
|
+
|
331
|
+
/**
|
332
|
+
* Find a path from a starting coordinate to an ending coordinate, taking
|
333
|
+
* obstacles into consideration. Might not always find the optimal path,
|
334
|
+
* but is fast, and usually good enough.
|
335
|
+
*
|
336
|
+
* @function Highcharts.Pathfinder.algorithms.fastAvoid
|
337
|
+
*
|
338
|
+
* @param {object} start
|
339
|
+
* Starting coordinate, object with x/y props.
|
340
|
+
*
|
341
|
+
* @param {object} end
|
342
|
+
* Ending coordinate, object with x/y props.
|
343
|
+
*
|
344
|
+
* @param {object} options
|
345
|
+
* Options for the algorithm.
|
346
|
+
* - chartObstacles: Array of chart obstacles to avoid
|
347
|
+
* - lineObstacles: Array of line obstacles to jump over
|
348
|
+
* - obstacleMetrics: Object with metrics of chartObstacles cached
|
349
|
+
* - hardBounds: Hard boundaries to not cross
|
350
|
+
* - obstacleOptions: Options for the obstacles, including margin
|
351
|
+
* - startDirectionX: Optional. True if starting in the X direction.
|
352
|
+
* If not provided, the algorithm starts in the
|
353
|
+
* direction that is the furthest between
|
354
|
+
* start/end.
|
355
|
+
*
|
356
|
+
* @return {object}
|
357
|
+
* An object with the SVG path in Array form as accepted by the SVG
|
358
|
+
* renderer, as well as an array of new obstacles making up this
|
359
|
+
* path.
|
360
|
+
*/
|
361
|
+
fastAvoid: H.extend(function (start, end, options) {
|
362
|
+
/*
|
363
|
+
Algorithm rules/description
|
364
|
+
- Find initial direction
|
365
|
+
- Determine soft/hard max for each direction.
|
366
|
+
- Move along initial direction until obstacle.
|
367
|
+
- Change direction.
|
368
|
+
- If hitting obstacle, first try to change length of previous line
|
369
|
+
before changing direction again.
|
370
|
+
|
371
|
+
Soft min/max x = start/destination x +/- widest obstacle + margin
|
372
|
+
Soft min/max y = start/destination y +/- tallest obstacle + margin
|
373
|
+
|
374
|
+
@todo:
|
375
|
+
- Make retrospective, try changing prev segment to reduce
|
376
|
+
corners
|
377
|
+
- Fix logic for breaking out of end-points - not always picking
|
378
|
+
the best direction currently
|
379
|
+
- When going around the end obstacle we should not always go the
|
380
|
+
shortest route, rather pick the one closer to the end point
|
381
|
+
*/
|
382
|
+
var dirIsX = pick(
|
383
|
+
options.startDirectionX,
|
384
|
+
abs(end.x - start.x) > abs(end.y - start.y)
|
385
|
+
),
|
386
|
+
dir = dirIsX ? 'x' : 'y',
|
387
|
+
segments,
|
388
|
+
useMax,
|
389
|
+
extractedEndPoint,
|
390
|
+
endSegments = [],
|
391
|
+
forceObstacleBreak = false, // Used in clearPathTo to keep track of
|
392
|
+
// when to force break through an obstacle.
|
393
|
+
|
394
|
+
// Boundaries to stay within. If beyond soft boundary, prefer to
|
395
|
+
// change direction ASAP. If at hard max, always change immediately.
|
396
|
+
metrics = options.obstacleMetrics,
|
397
|
+
softMinX = min(start.x, end.x) - metrics.maxWidth - 10,
|
398
|
+
softMaxX = max(start.x, end.x) + metrics.maxWidth + 10,
|
399
|
+
softMinY = min(start.y, end.y) - metrics.maxHeight - 10,
|
400
|
+
softMaxY = max(start.y, end.y) + metrics.maxHeight + 10,
|
401
|
+
|
402
|
+
// Obstacles
|
403
|
+
chartObstacles = options.chartObstacles,
|
404
|
+
startObstacleIx = findLastObstacleBefore(chartObstacles, softMinX),
|
405
|
+
endObstacleIx = findLastObstacleBefore(chartObstacles, softMaxX);
|
406
|
+
|
407
|
+
// How far can you go between two points before hitting an obstacle?
|
408
|
+
// Does not work for diagonal lines (because it doesn't have to).
|
409
|
+
function pivotPoint(fromPoint, toPoint, directionIsX) {
|
410
|
+
var firstPoint,
|
411
|
+
lastPoint,
|
412
|
+
highestPoint,
|
413
|
+
lowestPoint,
|
414
|
+
i,
|
415
|
+
searchDirection = fromPoint.x < toPoint.x ? 1 : -1;
|
416
|
+
|
417
|
+
if (fromPoint.x < toPoint.x) {
|
418
|
+
firstPoint = fromPoint;
|
419
|
+
lastPoint = toPoint;
|
420
|
+
} else {
|
421
|
+
firstPoint = toPoint;
|
422
|
+
lastPoint = fromPoint;
|
423
|
+
}
|
424
|
+
|
425
|
+
if (fromPoint.y < toPoint.y) {
|
426
|
+
lowestPoint = fromPoint;
|
427
|
+
highestPoint = toPoint;
|
428
|
+
} else {
|
429
|
+
lowestPoint = toPoint;
|
430
|
+
highestPoint = fromPoint;
|
431
|
+
}
|
432
|
+
|
433
|
+
// Go through obstacle range in reverse if toPoint is before
|
434
|
+
// fromPoint in the X-dimension.
|
435
|
+
i = searchDirection < 0 ?
|
436
|
+
// Searching backwards, start at last obstacle before last point
|
437
|
+
min(findLastObstacleBefore(chartObstacles, lastPoint.x),
|
438
|
+
chartObstacles.length - 1) :
|
439
|
+
// Forwards. Since we're not sorted by xMax, we have to look
|
440
|
+
// at all obstacles.
|
441
|
+
0;
|
442
|
+
|
443
|
+
// Go through obstacles in this X range
|
444
|
+
while (chartObstacles[i] && (
|
445
|
+
searchDirection > 0 && chartObstacles[i].xMin <= lastPoint.x ||
|
446
|
+
searchDirection < 0 && chartObstacles[i].xMax >= firstPoint.x
|
447
|
+
)) {
|
448
|
+
// If this obstacle is between from and to points in a straight
|
449
|
+
// line, pivot at the intersection.
|
450
|
+
if (
|
451
|
+
chartObstacles[i].xMin <= lastPoint.x &&
|
452
|
+
chartObstacles[i].xMax >= firstPoint.x &&
|
453
|
+
chartObstacles[i].yMin <= highestPoint.y &&
|
454
|
+
chartObstacles[i].yMax >= lowestPoint.y
|
455
|
+
) {
|
456
|
+
if (directionIsX) {
|
457
|
+
return {
|
458
|
+
y: fromPoint.y,
|
459
|
+
x: fromPoint.x < toPoint.x ?
|
460
|
+
chartObstacles[i].xMin - 1 :
|
461
|
+
chartObstacles[i].xMax + 1,
|
462
|
+
obstacle: chartObstacles[i]
|
463
|
+
};
|
464
|
+
}
|
465
|
+
// else ...
|
466
|
+
return {
|
467
|
+
x: fromPoint.x,
|
468
|
+
y: fromPoint.y < toPoint.y ?
|
469
|
+
chartObstacles[i].yMin - 1 :
|
470
|
+
chartObstacles[i].yMax + 1,
|
471
|
+
obstacle: chartObstacles[i]
|
472
|
+
};
|
473
|
+
}
|
474
|
+
|
475
|
+
i += searchDirection;
|
476
|
+
}
|
477
|
+
|
478
|
+
return toPoint;
|
479
|
+
}
|
480
|
+
|
481
|
+
/**
|
482
|
+
* Decide in which direction to dodge or get out of an obstacle.
|
483
|
+
* Considers desired direction, which way is shortest, soft and hard
|
484
|
+
* bounds.
|
485
|
+
*
|
486
|
+
* (? Returns a string, either xMin, xMax, yMin or yMax.)
|
487
|
+
*
|
488
|
+
* @private
|
489
|
+
* @function
|
490
|
+
*
|
491
|
+
* @param {object} obstacle
|
492
|
+
* Obstacle to dodge/escape.
|
493
|
+
*
|
494
|
+
* @param {object} fromPoint
|
495
|
+
* Point with x/y props that's dodging/escaping.
|
496
|
+
*
|
497
|
+
* @param {object} toPoint
|
498
|
+
* Goal point.
|
499
|
+
*
|
500
|
+
* @param {boolean} dirIsX
|
501
|
+
* Dodge in X dimension.
|
502
|
+
*
|
503
|
+
* @param {object} bounds
|
504
|
+
* Hard and soft boundaries.
|
505
|
+
*
|
506
|
+
* @return {boolean}
|
507
|
+
* Use max or not.
|
508
|
+
*/
|
509
|
+
function getDodgeDirection(
|
510
|
+
obstacle,
|
511
|
+
fromPoint,
|
512
|
+
toPoint,
|
513
|
+
dirIsX,
|
514
|
+
bounds
|
515
|
+
) {
|
516
|
+
var softBounds = bounds.soft,
|
517
|
+
hardBounds = bounds.hard,
|
518
|
+
dir = dirIsX ? 'x' : 'y',
|
519
|
+
toPointMax = { x: fromPoint.x, y: fromPoint.y },
|
520
|
+
toPointMin = { x: fromPoint.x, y: fromPoint.y },
|
521
|
+
minPivot,
|
522
|
+
maxPivot,
|
523
|
+
maxOutOfSoftBounds = obstacle[dir + 'Max'] >=
|
524
|
+
softBounds[dir + 'Max'],
|
525
|
+
minOutOfSoftBounds = obstacle[dir + 'Min'] <=
|
526
|
+
softBounds[dir + 'Min'],
|
527
|
+
maxOutOfHardBounds = obstacle[dir + 'Max'] >=
|
528
|
+
hardBounds[dir + 'Max'],
|
529
|
+
minOutOfHardBounds = obstacle[dir + 'Min'] <=
|
530
|
+
hardBounds[dir + 'Min'],
|
531
|
+
// Find out if we should prefer one direction over the other if
|
532
|
+
// we can choose freely
|
533
|
+
minDistance = abs(obstacle[dir + 'Min'] - fromPoint[dir]),
|
534
|
+
maxDistance = abs(obstacle[dir + 'Max'] - fromPoint[dir]),
|
535
|
+
// If it's a small difference, pick the one leading towards dest
|
536
|
+
// point. Otherwise pick the shortest distance
|
537
|
+
useMax = abs(minDistance - maxDistance) < 10 ?
|
538
|
+
fromPoint[dir] < toPoint[dir] :
|
539
|
+
maxDistance < minDistance;
|
540
|
+
|
541
|
+
// Check if we hit any obstacles trying to go around in either
|
542
|
+
// direction.
|
543
|
+
toPointMin[dir] = obstacle[dir + 'Min'];
|
544
|
+
toPointMax[dir] = obstacle[dir + 'Max'];
|
545
|
+
minPivot = pivotPoint(fromPoint, toPointMin, dirIsX)[dir] !==
|
546
|
+
toPointMin[dir];
|
547
|
+
maxPivot = pivotPoint(fromPoint, toPointMax, dirIsX)[dir] !==
|
548
|
+
toPointMax[dir];
|
549
|
+
useMax = minPivot ?
|
550
|
+
(maxPivot ? useMax : true) :
|
551
|
+
(maxPivot ? false : useMax);
|
552
|
+
|
553
|
+
// useMax now contains our preferred choice, bounds not taken into
|
554
|
+
// account. If both or neither direction is out of bounds we want to
|
555
|
+
// use this.
|
556
|
+
|
557
|
+
// Deal with soft bounds
|
558
|
+
useMax = minOutOfSoftBounds ?
|
559
|
+
(maxOutOfSoftBounds ? useMax : true) : // Out on min
|
560
|
+
(maxOutOfSoftBounds ? false : useMax); // Not out on min
|
561
|
+
|
562
|
+
// Deal with hard bounds
|
563
|
+
useMax = minOutOfHardBounds ?
|
564
|
+
(maxOutOfHardBounds ? useMax : true) : // Out on min
|
565
|
+
(maxOutOfHardBounds ? false : useMax); // Not out on min
|
566
|
+
|
567
|
+
return useMax;
|
568
|
+
}
|
569
|
+
|
570
|
+
// Find a clear path between point
|
571
|
+
function clearPathTo(fromPoint, toPoint, dirIsX) {
|
572
|
+
// Don't waste time if we've hit goal
|
573
|
+
if (fromPoint.x === toPoint.x && fromPoint.y === toPoint.y) {
|
574
|
+
return [];
|
575
|
+
}
|
576
|
+
|
577
|
+
var dir = dirIsX ? 'x' : 'y',
|
578
|
+
pivot,
|
579
|
+
segments,
|
580
|
+
waypoint,
|
581
|
+
waypointUseMax,
|
582
|
+
envelopingObstacle,
|
583
|
+
secondEnvelopingObstacle,
|
584
|
+
envelopWaypoint,
|
585
|
+
obstacleMargin = options.obstacleOptions.margin,
|
586
|
+
bounds = {
|
587
|
+
soft: {
|
588
|
+
xMin: softMinX,
|
589
|
+
xMax: softMaxX,
|
590
|
+
yMin: softMinY,
|
591
|
+
yMax: softMaxY
|
592
|
+
},
|
593
|
+
hard: options.hardBounds
|
594
|
+
};
|
595
|
+
|
596
|
+
// If fromPoint is inside an obstacle we have a problem. Break out
|
597
|
+
// by just going to the outside of this obstacle. We prefer to go to
|
598
|
+
// the nearest edge in the chosen direction.
|
599
|
+
envelopingObstacle =
|
600
|
+
findObstacleFromPoint(chartObstacles, fromPoint);
|
601
|
+
if (envelopingObstacle > -1) {
|
602
|
+
envelopingObstacle = chartObstacles[envelopingObstacle];
|
603
|
+
waypointUseMax = getDodgeDirection(
|
604
|
+
envelopingObstacle, fromPoint, toPoint, dirIsX, bounds
|
605
|
+
);
|
606
|
+
|
607
|
+
// Cut obstacle to hard bounds to make sure we stay within
|
608
|
+
limitObstacleToBounds(envelopingObstacle, options.hardBounds);
|
609
|
+
|
610
|
+
envelopWaypoint = dirIsX ? {
|
611
|
+
y: fromPoint.y,
|
612
|
+
x: envelopingObstacle[waypointUseMax ? 'xMax' : 'xMin'] +
|
613
|
+
(waypointUseMax ? 1 : -1)
|
614
|
+
} : {
|
615
|
+
x: fromPoint.x,
|
616
|
+
y: envelopingObstacle[waypointUseMax ? 'yMax' : 'yMin'] +
|
617
|
+
(waypointUseMax ? 1 : -1)
|
618
|
+
};
|
619
|
+
|
620
|
+
// If we crashed into another obstacle doing this, we put the
|
621
|
+
// waypoint between them instead
|
622
|
+
secondEnvelopingObstacle = findObstacleFromPoint(
|
623
|
+
chartObstacles, envelopWaypoint
|
624
|
+
);
|
625
|
+
if (secondEnvelopingObstacle > -1) {
|
626
|
+
secondEnvelopingObstacle = chartObstacles[
|
627
|
+
secondEnvelopingObstacle
|
628
|
+
];
|
629
|
+
|
630
|
+
// Cut obstacle to hard bounds
|
631
|
+
limitObstacleToBounds(
|
632
|
+
secondEnvelopingObstacle,
|
633
|
+
options.hardBounds
|
634
|
+
);
|
635
|
+
|
636
|
+
// Modify waypoint to lay between obstacles
|
637
|
+
envelopWaypoint[dir] = waypointUseMax ? max(
|
638
|
+
envelopingObstacle[dir + 'Max'] - obstacleMargin + 1,
|
639
|
+
(
|
640
|
+
secondEnvelopingObstacle[dir + 'Min'] +
|
641
|
+
envelopingObstacle[dir + 'Max']
|
642
|
+
) / 2
|
643
|
+
) :
|
644
|
+
min((
|
645
|
+
envelopingObstacle[dir + 'Min'] + obstacleMargin - 1
|
646
|
+
), (
|
647
|
+
(
|
648
|
+
secondEnvelopingObstacle[dir + 'Max'] +
|
649
|
+
envelopingObstacle[dir + 'Min']
|
650
|
+
) / 2
|
651
|
+
));
|
652
|
+
|
653
|
+
// We are not going anywhere. If this happens for the first
|
654
|
+
// time, do nothing. Otherwise, try to go to the extreme of
|
655
|
+
// the obstacle pair in the current direction.
|
656
|
+
if (fromPoint.x === envelopWaypoint.x &&
|
657
|
+
fromPoint.y === envelopWaypoint.y) {
|
658
|
+
if (forceObstacleBreak) {
|
659
|
+
envelopWaypoint[dir] = waypointUseMax ?
|
660
|
+
max(
|
661
|
+
envelopingObstacle[dir + 'Max'],
|
662
|
+
secondEnvelopingObstacle[dir + 'Max']
|
663
|
+
) + 1 :
|
664
|
+
min(
|
665
|
+
envelopingObstacle[dir + 'Min'],
|
666
|
+
secondEnvelopingObstacle[dir + 'Min']
|
667
|
+
) - 1;
|
668
|
+
}
|
669
|
+
// Toggle on if off, and the opposite
|
670
|
+
forceObstacleBreak = !forceObstacleBreak;
|
671
|
+
} else {
|
672
|
+
// This point is not identical to previous.
|
673
|
+
// Clear break trigger.
|
674
|
+
forceObstacleBreak = false;
|
675
|
+
}
|
676
|
+
}
|
677
|
+
|
678
|
+
segments = [{
|
679
|
+
start: fromPoint,
|
680
|
+
end: envelopWaypoint
|
681
|
+
}];
|
682
|
+
|
683
|
+
} else { // If not enveloping, use standard pivot calculation
|
684
|
+
|
685
|
+
pivot = pivotPoint(fromPoint, {
|
686
|
+
x: dirIsX ? toPoint.x : fromPoint.x,
|
687
|
+
y: dirIsX ? fromPoint.y : toPoint.y
|
688
|
+
}, dirIsX);
|
689
|
+
|
690
|
+
segments = [{
|
691
|
+
start: fromPoint,
|
692
|
+
end: {
|
693
|
+
x: pivot.x,
|
694
|
+
y: pivot.y
|
695
|
+
}
|
696
|
+
}];
|
697
|
+
|
698
|
+
// Pivot before goal, use a waypoint to dodge obstacle
|
699
|
+
if (pivot[dirIsX ? 'x' : 'y'] !== toPoint[dirIsX ? 'x' : 'y']) {
|
700
|
+
// Find direction of waypoint
|
701
|
+
waypointUseMax = getDodgeDirection(
|
702
|
+
pivot.obstacle, pivot, toPoint, !dirIsX, bounds
|
703
|
+
);
|
704
|
+
|
705
|
+
// Cut waypoint to hard bounds
|
706
|
+
limitObstacleToBounds(pivot.obstacle, options.hardBounds);
|
707
|
+
|
708
|
+
waypoint = {
|
709
|
+
x: dirIsX ?
|
710
|
+
pivot.x :
|
711
|
+
pivot.obstacle[waypointUseMax ? 'xMax' : 'xMin'] +
|
712
|
+
(waypointUseMax ? 1 : -1),
|
713
|
+
y: dirIsX ?
|
714
|
+
pivot.obstacle[waypointUseMax ? 'yMax' : 'yMin'] +
|
715
|
+
(waypointUseMax ? 1 : -1) :
|
716
|
+
pivot.y
|
717
|
+
};
|
718
|
+
|
719
|
+
// We're changing direction here, store that to make sure we
|
720
|
+
// also change direction when adding the last segment array
|
721
|
+
// after handling waypoint.
|
722
|
+
dirIsX = !dirIsX;
|
723
|
+
|
724
|
+
segments = segments.concat(clearPathTo({
|
725
|
+
x: pivot.x,
|
726
|
+
y: pivot.y
|
727
|
+
}, waypoint, dirIsX));
|
728
|
+
}
|
729
|
+
}
|
730
|
+
|
731
|
+
// Get segments for the other direction too
|
732
|
+
// Recursion is our friend
|
733
|
+
segments = segments.concat(clearPathTo(
|
734
|
+
segments[segments.length - 1].end, toPoint, !dirIsX
|
735
|
+
));
|
736
|
+
|
737
|
+
return segments;
|
738
|
+
}
|
739
|
+
|
740
|
+
// Extract point to outside of obstacle in whichever direction is
|
741
|
+
// closest. Returns new point outside obstacle.
|
742
|
+
function extractFromObstacle(obstacle, point, goalPoint) {
|
743
|
+
var dirIsX = min(obstacle.xMax - point.x, point.x - obstacle.xMin) <
|
744
|
+
min(obstacle.yMax - point.y, point.y - obstacle.yMin),
|
745
|
+
bounds = {
|
746
|
+
soft: options.hardBounds,
|
747
|
+
hard: options.hardBounds
|
748
|
+
},
|
749
|
+
useMax = getDodgeDirection(
|
750
|
+
obstacle, point, goalPoint, dirIsX, bounds
|
751
|
+
);
|
752
|
+
|
753
|
+
return dirIsX ? {
|
754
|
+
y: point.y,
|
755
|
+
x: obstacle[useMax ? 'xMax' : 'xMin'] + (useMax ? 1 : -1)
|
756
|
+
} : {
|
757
|
+
x: point.x,
|
758
|
+
y: obstacle[useMax ? 'yMax' : 'yMin'] + (useMax ? 1 : -1)
|
759
|
+
};
|
760
|
+
}
|
761
|
+
|
762
|
+
// Cut the obstacle array to soft bounds for optimization in large
|
763
|
+
// datasets.
|
764
|
+
chartObstacles =
|
765
|
+
chartObstacles.slice(startObstacleIx, endObstacleIx + 1);
|
766
|
+
|
767
|
+
// If an obstacle envelops the end point, move it out of there and add
|
768
|
+
// a little segment to where it was.
|
769
|
+
if ((endObstacleIx = findObstacleFromPoint(chartObstacles, end)) > -1) {
|
770
|
+
extractedEndPoint = extractFromObstacle(
|
771
|
+
chartObstacles[endObstacleIx],
|
772
|
+
end,
|
773
|
+
start
|
774
|
+
);
|
775
|
+
endSegments.push({
|
776
|
+
end: end,
|
777
|
+
start: extractedEndPoint
|
778
|
+
});
|
779
|
+
end = extractedEndPoint;
|
780
|
+
}
|
781
|
+
// If it's still inside one or more obstacles, get out of there by
|
782
|
+
// force-moving towards the start point.
|
783
|
+
while (
|
784
|
+
(endObstacleIx = findObstacleFromPoint(chartObstacles, end)) > -1
|
785
|
+
) {
|
786
|
+
useMax = end[dir] - start[dir] < 0;
|
787
|
+
extractedEndPoint = {
|
788
|
+
x: end.x,
|
789
|
+
y: end.y
|
790
|
+
};
|
791
|
+
extractedEndPoint[dir] = chartObstacles[endObstacleIx][
|
792
|
+
useMax ? dir + 'Max' : dir + 'Min'
|
793
|
+
] + (useMax ? 1 : -1);
|
794
|
+
endSegments.push({
|
795
|
+
end: end,
|
796
|
+
start: extractedEndPoint
|
797
|
+
});
|
798
|
+
end = extractedEndPoint;
|
799
|
+
}
|
800
|
+
|
801
|
+
// Find the path
|
802
|
+
segments = clearPathTo(start, end, dirIsX);
|
803
|
+
|
804
|
+
// Add the end-point segments
|
805
|
+
segments = segments.concat(endSegments.reverse());
|
806
|
+
|
807
|
+
return {
|
808
|
+
path: pathFromSegments(segments),
|
809
|
+
obstacles: segments
|
810
|
+
};
|
811
|
+
}, {
|
812
|
+
requiresObstacles: true
|
813
|
+
})
|
814
|
+
};
|
815
|
+
|
816
|
+
export default algorithms;
|