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,380 @@
|
|
1
|
+
/* *
|
2
|
+
* Wind barb series module
|
3
|
+
*
|
4
|
+
* (c) 2010-2019 Torstein Honsi
|
5
|
+
*
|
6
|
+
* License: www.highcharts.com/license
|
7
|
+
*/
|
8
|
+
|
9
|
+
'use strict';
|
10
|
+
|
11
|
+
import H from '../parts/Globals.js';
|
12
|
+
import onSeriesMixin from '../mixins/on-series.js';
|
13
|
+
|
14
|
+
var noop = H.noop,
|
15
|
+
seriesType = H.seriesType;
|
16
|
+
|
17
|
+
/**
|
18
|
+
* @private
|
19
|
+
* @class
|
20
|
+
* @name Highcharts.seriesTypes.windbarb
|
21
|
+
*
|
22
|
+
* @augments Highcharts.Series
|
23
|
+
*/
|
24
|
+
seriesType('windbarb', 'column'
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Wind barbs are a convenient way to represent wind speed and direction in one
|
28
|
+
* graphical form. Wind direction is given by the stem direction, and wind speed
|
29
|
+
* by the number and shape of barbs.
|
30
|
+
*
|
31
|
+
* @sample {highcharts|highstock} highcharts/demo/windbarb-series/
|
32
|
+
* Wind barb series
|
33
|
+
*
|
34
|
+
* @extends plotOptions.column
|
35
|
+
* @excluding boostThreshold, marker, connectEnds, connectNulls,
|
36
|
+
* cropThreshold, dashStyle, gapSize, gapUnit, dataGrouping,
|
37
|
+
* linecap, shadow, stacking, step
|
38
|
+
* @since 6.0.0
|
39
|
+
* @product highcharts highstock
|
40
|
+
* @optionparent plotOptions.windbarb
|
41
|
+
*/
|
42
|
+
, {
|
43
|
+
/**
|
44
|
+
* The line width of the wind barb symbols.
|
45
|
+
*/
|
46
|
+
lineWidth: 2,
|
47
|
+
/**
|
48
|
+
* The id of another series in the chart that the wind barbs are projected
|
49
|
+
* on. When `null`, the wind symbols are drawn on the X axis, but offset up
|
50
|
+
* or down by the `yOffset` setting.
|
51
|
+
*
|
52
|
+
* @sample {highcharts|highstock} highcharts/plotoptions/windbarb-onseries
|
53
|
+
* Projected on area series
|
54
|
+
*
|
55
|
+
* @type {string|null}
|
56
|
+
*/
|
57
|
+
onSeries: null,
|
58
|
+
states: {
|
59
|
+
hover: {
|
60
|
+
lineWidthPlus: 0
|
61
|
+
}
|
62
|
+
},
|
63
|
+
tooltip: {
|
64
|
+
/**
|
65
|
+
* The default point format for the wind barb tooltip. Note the
|
66
|
+
* `point.beaufort` property that refers to the Beaufort wind scale. The
|
67
|
+
* names can be internationalized by modifying
|
68
|
+
* `Highcharts.seriesTypes.windbarb.prototype.beaufortNames`.
|
69
|
+
*/
|
70
|
+
pointFormat: '<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.value}</b> ({point.beaufort})<br/>'
|
71
|
+
},
|
72
|
+
/**
|
73
|
+
* Pixel length of the stems.
|
74
|
+
*/
|
75
|
+
vectorLength: 20,
|
76
|
+
/**
|
77
|
+
* Vertical offset from the cartesian position, in pixels. The default value
|
78
|
+
* makes sure the symbols don't overlap the X axis when `onSeries` is
|
79
|
+
* `null`, and that they don't overlap the linked series when `onSeries` is
|
80
|
+
* given.
|
81
|
+
*/
|
82
|
+
yOffset: -20,
|
83
|
+
/**
|
84
|
+
* Horizontal offset from the cartesian position, in pixels. When the chart
|
85
|
+
* is inverted, this option allows translation like
|
86
|
+
* [yOffset](#plotOptions.windbarb.yOffset) in non inverted charts.
|
87
|
+
*
|
88
|
+
* @since 6.1.0
|
89
|
+
*/
|
90
|
+
xOffset: 0
|
91
|
+
}, {
|
92
|
+
pointArrayMap: ['value', 'direction'],
|
93
|
+
parallelArrays: ['x', 'value', 'direction'],
|
94
|
+
beaufortName: ['Calm', 'Light air', 'Light breeze',
|
95
|
+
'Gentle breeze', 'Moderate breeze', 'Fresh breeze',
|
96
|
+
'Strong breeze', 'Near gale', 'Gale', 'Strong gale', 'Storm',
|
97
|
+
'Violent storm', 'Hurricane'],
|
98
|
+
beaufortFloor: [0, 0.3, 1.6, 3.4, 5.5, 8.0, 10.8, 13.9, 17.2, 20.8,
|
99
|
+
24.5, 28.5, 32.7],
|
100
|
+
trackerGroups: ['markerGroup'],
|
101
|
+
|
102
|
+
// Get presentational attributes.
|
103
|
+
pointAttribs: function (point, state) {
|
104
|
+
var options = this.options,
|
105
|
+
stroke = point.color || this.color,
|
106
|
+
strokeWidth = this.options.lineWidth;
|
107
|
+
|
108
|
+
if (state) {
|
109
|
+
stroke = options.states[state].color || stroke;
|
110
|
+
strokeWidth =
|
111
|
+
(options.states[state].lineWidth || strokeWidth) +
|
112
|
+
(options.states[state].lineWidthPlus || 0);
|
113
|
+
}
|
114
|
+
|
115
|
+
return {
|
116
|
+
'stroke': stroke,
|
117
|
+
'stroke-width': strokeWidth
|
118
|
+
};
|
119
|
+
},
|
120
|
+
markerAttribs: function () {
|
121
|
+
return undefined;
|
122
|
+
},
|
123
|
+
getPlotBox: onSeriesMixin.getPlotBox,
|
124
|
+
// Create a single wind arrow. It is later rotated around the zero
|
125
|
+
// centerpoint.
|
126
|
+
windArrow: function (point) {
|
127
|
+
var knots = point.value * 1.943844,
|
128
|
+
level = point.beaufortLevel,
|
129
|
+
path,
|
130
|
+
barbs,
|
131
|
+
u = this.options.vectorLength / 20,
|
132
|
+
pos = -10;
|
133
|
+
|
134
|
+
if (point.isNull) {
|
135
|
+
return [];
|
136
|
+
}
|
137
|
+
|
138
|
+
if (level === 0) {
|
139
|
+
return this.chart.renderer.symbols.circle(
|
140
|
+
-10 * u,
|
141
|
+
-10 * u,
|
142
|
+
20 * u,
|
143
|
+
20 * u
|
144
|
+
);
|
145
|
+
}
|
146
|
+
|
147
|
+
// The stem and the arrow head
|
148
|
+
path = [
|
149
|
+
'M', 0, 7 * u, // base of arrow
|
150
|
+
'L', -1.5 * u, 7 * u,
|
151
|
+
0, 10 * u,
|
152
|
+
1.5 * u, 7 * u,
|
153
|
+
0, 7 * u,
|
154
|
+
0, -10 * u// top
|
155
|
+
];
|
156
|
+
|
157
|
+
// For each full 50 knots, add a pennant
|
158
|
+
barbs = (knots - knots % 50) / 50; // pennants
|
159
|
+
if (barbs > 0) {
|
160
|
+
while (barbs--) {
|
161
|
+
path.push(
|
162
|
+
pos === -10 ? 'L' : 'M',
|
163
|
+
0,
|
164
|
+
pos * u,
|
165
|
+
'L',
|
166
|
+
5 * u,
|
167
|
+
pos * u + 2,
|
168
|
+
'L',
|
169
|
+
0,
|
170
|
+
pos * u + 4
|
171
|
+
|
172
|
+
);
|
173
|
+
|
174
|
+
// Substract from the rest and move position for next
|
175
|
+
knots -= 50;
|
176
|
+
pos += 7;
|
177
|
+
}
|
178
|
+
}
|
179
|
+
|
180
|
+
// For each full 10 knots, add a full barb
|
181
|
+
barbs = (knots - knots % 10) / 10;
|
182
|
+
if (barbs > 0) {
|
183
|
+
while (barbs--) {
|
184
|
+
path.push(
|
185
|
+
pos === -10 ? 'L' : 'M',
|
186
|
+
0,
|
187
|
+
pos * u,
|
188
|
+
'L',
|
189
|
+
7 * u,
|
190
|
+
pos * u
|
191
|
+
);
|
192
|
+
knots -= 10;
|
193
|
+
pos += 3;
|
194
|
+
}
|
195
|
+
}
|
196
|
+
|
197
|
+
// For each full 5 knots, add a half barb
|
198
|
+
barbs = (knots - knots % 5) / 5; // half barbs
|
199
|
+
if (barbs > 0) {
|
200
|
+
while (barbs--) {
|
201
|
+
path.push(
|
202
|
+
pos === -10 ? 'L' : 'M',
|
203
|
+
0,
|
204
|
+
pos * u,
|
205
|
+
'L',
|
206
|
+
4 * u,
|
207
|
+
pos * u
|
208
|
+
);
|
209
|
+
knots -= 5;
|
210
|
+
pos += 3;
|
211
|
+
}
|
212
|
+
}
|
213
|
+
return path;
|
214
|
+
},
|
215
|
+
|
216
|
+
translate: function () {
|
217
|
+
var beaufortFloor = this.beaufortFloor,
|
218
|
+
beaufortName = this.beaufortName;
|
219
|
+
|
220
|
+
onSeriesMixin.translate.call(this);
|
221
|
+
|
222
|
+
this.points.forEach(function (point) {
|
223
|
+
var level = 0;
|
224
|
+
|
225
|
+
// Find the beaufort level (zero based)
|
226
|
+
for (; level < beaufortFloor.length; level++) {
|
227
|
+
if (beaufortFloor[level] > point.value) {
|
228
|
+
break;
|
229
|
+
}
|
230
|
+
}
|
231
|
+
point.beaufortLevel = level - 1;
|
232
|
+
point.beaufort = beaufortName[level - 1];
|
233
|
+
|
234
|
+
});
|
235
|
+
|
236
|
+
},
|
237
|
+
|
238
|
+
drawPoints: function () {
|
239
|
+
var chart = this.chart,
|
240
|
+
yAxis = this.yAxis,
|
241
|
+
inverted = chart.inverted,
|
242
|
+
shapeOffset = this.options.vectorLength / 2;
|
243
|
+
|
244
|
+
this.points.forEach(function (point) {
|
245
|
+
var plotX = point.plotX,
|
246
|
+
plotY = point.plotY;
|
247
|
+
|
248
|
+
// Check if it's inside the plot area, but only for the X
|
249
|
+
// dimension.
|
250
|
+
if (chart.isInsidePlot(plotX, 0, false)) {
|
251
|
+
|
252
|
+
// Create the graphic the first time
|
253
|
+
if (!point.graphic) {
|
254
|
+
point.graphic = this.chart.renderer
|
255
|
+
.path()
|
256
|
+
.add(this.markerGroup);
|
257
|
+
}
|
258
|
+
|
259
|
+
// Position the graphic
|
260
|
+
point.graphic
|
261
|
+
.attr({
|
262
|
+
d: this.windArrow(point),
|
263
|
+
translateX: plotX + this.options.xOffset,
|
264
|
+
translateY: plotY + this.options.yOffset,
|
265
|
+
rotation: point.direction
|
266
|
+
})
|
267
|
+
.attr(this.pointAttribs(point));
|
268
|
+
|
269
|
+
} else if (point.graphic) {
|
270
|
+
point.graphic = point.graphic.destroy();
|
271
|
+
}
|
272
|
+
|
273
|
+
// Set the tooltip anchor position
|
274
|
+
point.tooltipPos = [
|
275
|
+
plotX + this.options.xOffset + (inverted && !this.onSeries ?
|
276
|
+
shapeOffset : 0),
|
277
|
+
plotY + this.options.yOffset - (inverted ? 0 :
|
278
|
+
shapeOffset + yAxis.pos - chart.plotTop)
|
279
|
+
]; // #6327
|
280
|
+
}, this);
|
281
|
+
},
|
282
|
+
|
283
|
+
// Fade in the arrows on initializing series.
|
284
|
+
animate: function (init) {
|
285
|
+
if (init) {
|
286
|
+
this.markerGroup.attr({
|
287
|
+
opacity: 0.01
|
288
|
+
});
|
289
|
+
} else {
|
290
|
+
this.markerGroup.animate({
|
291
|
+
opacity: 1
|
292
|
+
}, H.animObject(this.options.animation));
|
293
|
+
|
294
|
+
this.animate = null;
|
295
|
+
}
|
296
|
+
},
|
297
|
+
|
298
|
+
// Don't invert the marker group (#4960)
|
299
|
+
invertGroups: noop
|
300
|
+
}, {
|
301
|
+
isValid: function () {
|
302
|
+
return H.isNumber(this.value) && this.value >= 0;
|
303
|
+
}
|
304
|
+
});
|
305
|
+
|
306
|
+
|
307
|
+
/**
|
308
|
+
* A `windbarb` series. If the [type](#series.windbarb.type) option is not
|
309
|
+
* specified, it is inherited from [chart.type](#chart.type).
|
310
|
+
*
|
311
|
+
* @extends series,plotOptions.windbarb
|
312
|
+
* @excluding dataParser, dataURL
|
313
|
+
* @product highcharts highstock
|
314
|
+
* @apioption series.windbarb
|
315
|
+
*/
|
316
|
+
|
317
|
+
/**
|
318
|
+
* An array of data points for the series. For the `windbarb` series type,
|
319
|
+
* points can be given in the following ways:
|
320
|
+
*
|
321
|
+
* 1. An array of arrays with 3 values. In this case, the values correspond to
|
322
|
+
* `x,value,direction`. If the first value is a string, it is applied as the
|
323
|
+
* name of the point, and the `x` value is inferred.
|
324
|
+
* ```js
|
325
|
+
* data: [
|
326
|
+
* [Date.UTC(2017, 0, 1, 0), 3.3, 90],
|
327
|
+
* [Date.UTC(2017, 0, 1, 1), 12.1, 180],
|
328
|
+
* [Date.UTC(2017, 0, 1, 2), 11.1, 270]
|
329
|
+
* ]
|
330
|
+
* ```
|
331
|
+
*
|
332
|
+
* 2. An array of objects with named values. The following snippet shows only a
|
333
|
+
* few settings, see the complete options set below. If the total number of
|
334
|
+
* data points exceeds the series'
|
335
|
+
* [turboThreshold](#series.area.turboThreshold), this option is not
|
336
|
+
* available.
|
337
|
+
* ```js
|
338
|
+
* data: [{
|
339
|
+
* x: Date.UTC(2017, 0, 1, 0),
|
340
|
+
* value: 12.1,
|
341
|
+
* direction: 90
|
342
|
+
* }, {
|
343
|
+
* x: Date.UTC(2017, 0, 1, 1),
|
344
|
+
* value: 11.1,
|
345
|
+
* direction: 270
|
346
|
+
* }]
|
347
|
+
* ```
|
348
|
+
*
|
349
|
+
* @sample {highcharts} highcharts/chart/reflow-true/
|
350
|
+
* Numerical values
|
351
|
+
* @sample {highcharts} highcharts/series/data-array-of-arrays/
|
352
|
+
* Arrays of numeric x and y
|
353
|
+
* @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
|
354
|
+
* Arrays of datetime x and y
|
355
|
+
* @sample {highcharts} highcharts/series/data-array-of-name-value/
|
356
|
+
* Arrays of point.name and y
|
357
|
+
* @sample {highcharts} highcharts/series/data-array-of-objects/
|
358
|
+
* Config objects
|
359
|
+
*
|
360
|
+
* @type {Array<Array<(number|string),number,number>|*>}
|
361
|
+
* @extends series.line.data
|
362
|
+
* @product highcharts highstock
|
363
|
+
* @apioption series.windbarb.data
|
364
|
+
*/
|
365
|
+
|
366
|
+
/**
|
367
|
+
* The wind speed in meters per second.
|
368
|
+
*
|
369
|
+
* @type {number}
|
370
|
+
* @product highcharts highstock
|
371
|
+
* @apioption series.windbarb.data.value
|
372
|
+
*/
|
373
|
+
|
374
|
+
/**
|
375
|
+
* The wind direction in degrees, where 0 is north (pointing towards south).
|
376
|
+
*
|
377
|
+
* @type {number}
|
378
|
+
* @product highcharts highstock
|
379
|
+
* @apioption series.windbarb.data.direction
|
380
|
+
*/
|
@@ -0,0 +1,1103 @@
|
|
1
|
+
/* *
|
2
|
+
* Experimental Highcharts module which enables visualization of a word cloud.
|
3
|
+
*
|
4
|
+
* (c) 2016-2019 Highsoft AS
|
5
|
+
*
|
6
|
+
* Authors: Jon Arild Nygard
|
7
|
+
*
|
8
|
+
* License: www.highcharts.com/license
|
9
|
+
*/
|
10
|
+
|
11
|
+
'use strict';
|
12
|
+
|
13
|
+
import H from '../parts/Globals.js';
|
14
|
+
import drawPoint from '../mixins/draw-point.js';
|
15
|
+
import polygon from '../mixins/polygon.js';
|
16
|
+
import '../parts/Series.js';
|
17
|
+
|
18
|
+
var extend = H.extend,
|
19
|
+
isArray = H.isArray,
|
20
|
+
isNumber = H.isNumber,
|
21
|
+
isObject = H.isObject,
|
22
|
+
merge = H.merge,
|
23
|
+
noop = H.noop,
|
24
|
+
find = H.find,
|
25
|
+
getBoundingBoxFromPolygon = polygon.getBoundingBoxFromPolygon,
|
26
|
+
getPolygon = polygon.getPolygon,
|
27
|
+
isPolygonsColliding = polygon.isPolygonsColliding,
|
28
|
+
movePolygon = polygon.movePolygon,
|
29
|
+
Series = H.Series;
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Detects if there is a collision between two rectangles.
|
33
|
+
*
|
34
|
+
* @private
|
35
|
+
* @function isRectanglesIntersecting
|
36
|
+
*
|
37
|
+
* @param {object} r1
|
38
|
+
* First rectangle.
|
39
|
+
*
|
40
|
+
* @param {object} r2
|
41
|
+
* Second rectangle.
|
42
|
+
*
|
43
|
+
* @return {boolean}
|
44
|
+
* Returns true if the rectangles overlap.
|
45
|
+
*/
|
46
|
+
function isRectanglesIntersecting(r1, r2) {
|
47
|
+
return !(
|
48
|
+
r2.left > r1.right ||
|
49
|
+
r2.right < r1.left ||
|
50
|
+
r2.top > r1.bottom ||
|
51
|
+
r2.bottom < r1.top
|
52
|
+
);
|
53
|
+
}
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Detects if a word collides with any previously placed words.
|
57
|
+
*
|
58
|
+
* @private
|
59
|
+
* @function intersectsAnyWord
|
60
|
+
*
|
61
|
+
* @param {Highcharts.Point} point
|
62
|
+
* Point which the word is connected to.
|
63
|
+
*
|
64
|
+
* @param {Array<Highcharts.Point>} points
|
65
|
+
* Previously placed points to check against.
|
66
|
+
*
|
67
|
+
* @return {boolean}
|
68
|
+
* Returns true if there is collision.
|
69
|
+
*/
|
70
|
+
function intersectsAnyWord(point, points) {
|
71
|
+
var intersects = false,
|
72
|
+
rect = point.rect,
|
73
|
+
polygon = point.polygon,
|
74
|
+
lastCollidedWith = point.lastCollidedWith,
|
75
|
+
isIntersecting = function (p) {
|
76
|
+
var result = isRectanglesIntersecting(rect, p.rect);
|
77
|
+
|
78
|
+
if (result && (point.rotation % 90 || p.roation % 90)) {
|
79
|
+
result = isPolygonsColliding(
|
80
|
+
polygon,
|
81
|
+
p.polygon
|
82
|
+
);
|
83
|
+
}
|
84
|
+
return result;
|
85
|
+
};
|
86
|
+
|
87
|
+
// If the point has already intersected a different point, chances are they
|
88
|
+
// are still intersecting. So as an enhancement we check this first.
|
89
|
+
if (lastCollidedWith) {
|
90
|
+
intersects = isIntersecting(lastCollidedWith);
|
91
|
+
// If they no longer intersects, remove the cache from the point.
|
92
|
+
if (!intersects) {
|
93
|
+
delete point.lastCollidedWith;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
// If not already found, then check if we can find a point that is
|
98
|
+
// intersecting.
|
99
|
+
if (!intersects) {
|
100
|
+
intersects = !!find(points, function (p) {
|
101
|
+
var result = isIntersecting(p);
|
102
|
+
|
103
|
+
if (result) {
|
104
|
+
point.lastCollidedWith = p;
|
105
|
+
}
|
106
|
+
return result;
|
107
|
+
});
|
108
|
+
}
|
109
|
+
return intersects;
|
110
|
+
}
|
111
|
+
|
112
|
+
/**
|
113
|
+
* Gives a set of cordinates for an Archimedian Spiral.
|
114
|
+
*
|
115
|
+
* @private
|
116
|
+
* @function archimedeanSpiral
|
117
|
+
*
|
118
|
+
* @param {number} attempt
|
119
|
+
* How far along the spiral we have traversed.
|
120
|
+
*
|
121
|
+
* @param {object} params
|
122
|
+
* Additional parameters.
|
123
|
+
*
|
124
|
+
* @param {object} params.field
|
125
|
+
* Size of field.
|
126
|
+
*
|
127
|
+
* @return {boolean|object}
|
128
|
+
* Resulting coordinates, x and y. False if the word should be dropped
|
129
|
+
* from the visualization.
|
130
|
+
*/
|
131
|
+
function archimedeanSpiral(attempt, params) {
|
132
|
+
var field = params.field,
|
133
|
+
result = false,
|
134
|
+
maxDelta = (field.width * field.width) + (field.height * field.height),
|
135
|
+
t = attempt * 0.8; // 0.2 * 4 = 0.8. Enlarging the spiral.
|
136
|
+
|
137
|
+
// Emergency brake. TODO make spiralling logic more foolproof.
|
138
|
+
if (attempt <= 10000) {
|
139
|
+
result = {
|
140
|
+
x: t * Math.cos(t),
|
141
|
+
y: t * Math.sin(t)
|
142
|
+
};
|
143
|
+
if (!(Math.min(Math.abs(result.x), Math.abs(result.y)) < maxDelta)) {
|
144
|
+
result = false;
|
145
|
+
}
|
146
|
+
}
|
147
|
+
return result;
|
148
|
+
}
|
149
|
+
|
150
|
+
/**
|
151
|
+
* Gives a set of cordinates for an rectangular spiral.
|
152
|
+
*
|
153
|
+
* @private
|
154
|
+
* @function squareSpiral
|
155
|
+
*
|
156
|
+
* @param {number} attempt
|
157
|
+
* How far along the spiral we have traversed.
|
158
|
+
*
|
159
|
+
* @param {object} params
|
160
|
+
* Additional parameters.
|
161
|
+
*
|
162
|
+
* @return {boolean|object}
|
163
|
+
* Resulting coordinates, x and y. False if the word should be dropped
|
164
|
+
* from the visualization.
|
165
|
+
*/
|
166
|
+
function squareSpiral(attempt) {
|
167
|
+
var a = attempt * 4,
|
168
|
+
k = Math.ceil((Math.sqrt(a) - 1) / 2),
|
169
|
+
t = 2 * k + 1,
|
170
|
+
m = Math.pow(t, 2),
|
171
|
+
isBoolean = function (x) {
|
172
|
+
return typeof x === 'boolean';
|
173
|
+
},
|
174
|
+
result = false;
|
175
|
+
|
176
|
+
t -= 1;
|
177
|
+
if (attempt <= 10000) {
|
178
|
+
if (isBoolean(result) && a >= m - t) {
|
179
|
+
result = {
|
180
|
+
x: k - (m - a),
|
181
|
+
y: -k
|
182
|
+
};
|
183
|
+
}
|
184
|
+
m -= t;
|
185
|
+
if (isBoolean(result) && a >= m - t) {
|
186
|
+
result = {
|
187
|
+
x: -k,
|
188
|
+
y: -k + (m - a)
|
189
|
+
};
|
190
|
+
}
|
191
|
+
|
192
|
+
m -= t;
|
193
|
+
if (isBoolean(result)) {
|
194
|
+
if (a >= m - t) {
|
195
|
+
result = {
|
196
|
+
x: -k + (m - a),
|
197
|
+
y: k
|
198
|
+
};
|
199
|
+
} else {
|
200
|
+
result = {
|
201
|
+
x: k,
|
202
|
+
y: k - (m - a - t)
|
203
|
+
};
|
204
|
+
}
|
205
|
+
}
|
206
|
+
result.x *= 5;
|
207
|
+
result.y *= 5;
|
208
|
+
}
|
209
|
+
return result;
|
210
|
+
}
|
211
|
+
|
212
|
+
/**
|
213
|
+
* Gives a set of cordinates for an rectangular spiral.
|
214
|
+
*
|
215
|
+
* @private
|
216
|
+
* @function rectangularSpiral
|
217
|
+
*
|
218
|
+
* @param {number} attempt
|
219
|
+
* How far along the spiral we have traversed.
|
220
|
+
*
|
221
|
+
* @param {object} params
|
222
|
+
* Additional parameters.
|
223
|
+
*
|
224
|
+
* @return {boolean|object}
|
225
|
+
* Resulting coordinates, x and y. False if the word should be dropped
|
226
|
+
* from the visualization.
|
227
|
+
*/
|
228
|
+
function rectangularSpiral(attempt, params) {
|
229
|
+
var result = squareSpiral(attempt, params),
|
230
|
+
field = params.field;
|
231
|
+
|
232
|
+
if (result) {
|
233
|
+
result.x *= field.ratioX;
|
234
|
+
result.y *= field.ratioY;
|
235
|
+
}
|
236
|
+
return result;
|
237
|
+
}
|
238
|
+
|
239
|
+
/**
|
240
|
+
* @private
|
241
|
+
* @function getRandomPosition
|
242
|
+
*
|
243
|
+
* @param {number} size
|
244
|
+
*
|
245
|
+
* @return {number}
|
246
|
+
*/
|
247
|
+
function getRandomPosition(size) {
|
248
|
+
return Math.round((size * (Math.random() + 0.5)) / 2);
|
249
|
+
}
|
250
|
+
|
251
|
+
/**
|
252
|
+
* Calculates the proper scale to fit the cloud inside the plotting area.
|
253
|
+
*
|
254
|
+
* @private
|
255
|
+
* @function getScale
|
256
|
+
*
|
257
|
+
* @param {number} targetWidth
|
258
|
+
* Width of target area.
|
259
|
+
*
|
260
|
+
* @param {number} targetHeight
|
261
|
+
* Height of target area.
|
262
|
+
*
|
263
|
+
* @param {object} field
|
264
|
+
* The playing field.
|
265
|
+
*
|
266
|
+
* @param {Highcharts.Series} series
|
267
|
+
* Series object.
|
268
|
+
*
|
269
|
+
* @return {number}
|
270
|
+
* Returns the value to scale the playing field up to the size of the
|
271
|
+
* target area.
|
272
|
+
*/
|
273
|
+
function getScale(targetWidth, targetHeight, field) {
|
274
|
+
var height = Math.max(Math.abs(field.top), Math.abs(field.bottom)) * 2,
|
275
|
+
width = Math.max(Math.abs(field.left), Math.abs(field.right)) * 2,
|
276
|
+
scaleX = width > 0 ? 1 / width * targetWidth : 1,
|
277
|
+
scaleY = height > 0 ? 1 / height * targetHeight : 1;
|
278
|
+
|
279
|
+
return Math.min(scaleX, scaleY);
|
280
|
+
}
|
281
|
+
|
282
|
+
/**
|
283
|
+
* Calculates what is called the playing field. The field is the area which all
|
284
|
+
* the words are allowed to be positioned within. The area is proportioned to
|
285
|
+
* match the target aspect ratio.
|
286
|
+
*
|
287
|
+
* @private
|
288
|
+
* @function getPlayingField
|
289
|
+
*
|
290
|
+
* @param {number} targetWidth
|
291
|
+
* Width of the target area.
|
292
|
+
*
|
293
|
+
* @param {number} targetHeight
|
294
|
+
* Height of the target area.
|
295
|
+
*
|
296
|
+
* @param {Array<Highcharts.Point>} data
|
297
|
+
* Array of points.
|
298
|
+
*
|
299
|
+
* @param {object} data.dimensions
|
300
|
+
* The height and width of the word.
|
301
|
+
*
|
302
|
+
* @return {object}
|
303
|
+
* The width and height of the playing field.
|
304
|
+
*/
|
305
|
+
function getPlayingField(
|
306
|
+
targetWidth,
|
307
|
+
targetHeight,
|
308
|
+
data
|
309
|
+
) {
|
310
|
+
var info = data.reduce(function (obj, point) {
|
311
|
+
var dimensions = point.dimensions,
|
312
|
+
x = Math.max(dimensions.width, dimensions.height);
|
313
|
+
|
314
|
+
// Find largest height.
|
315
|
+
obj.maxHeight = Math.max(obj.maxHeight, dimensions.height);
|
316
|
+
// Find largest width.
|
317
|
+
obj.maxWidth = Math.max(obj.maxWidth, dimensions.width);
|
318
|
+
// Sum up the total maximum area of all the words.
|
319
|
+
obj.area += x * x;
|
320
|
+
return obj;
|
321
|
+
}, {
|
322
|
+
maxHeight: 0,
|
323
|
+
maxWidth: 0,
|
324
|
+
area: 0
|
325
|
+
}),
|
326
|
+
/**
|
327
|
+
* Use largest width, largest height, or root of total area to give size
|
328
|
+
* to the playing field.
|
329
|
+
*/
|
330
|
+
x = Math.max(
|
331
|
+
info.maxHeight, // Have enough space for the tallest word
|
332
|
+
info.maxWidth, // Have enough space for the broadest word
|
333
|
+
// Adjust 15% to account for close packing of words
|
334
|
+
Math.sqrt(info.area) * 0.85
|
335
|
+
),
|
336
|
+
ratioX = targetWidth > targetHeight ? targetWidth / targetHeight : 1,
|
337
|
+
ratioY = targetHeight > targetWidth ? targetHeight / targetWidth : 1;
|
338
|
+
|
339
|
+
return {
|
340
|
+
width: x * ratioX,
|
341
|
+
height: x * ratioY,
|
342
|
+
ratioX: ratioX,
|
343
|
+
ratioY: ratioY
|
344
|
+
};
|
345
|
+
}
|
346
|
+
|
347
|
+
|
348
|
+
/**
|
349
|
+
* Calculates a number of degrees to rotate, based upon a number of orientations
|
350
|
+
* within a range from-to.
|
351
|
+
*
|
352
|
+
* @private
|
353
|
+
* @function getRotation
|
354
|
+
*
|
355
|
+
* @param {number} orientations
|
356
|
+
* Number of orientations.
|
357
|
+
*
|
358
|
+
* @param {number} index
|
359
|
+
* Index of point, used to decide orientation.
|
360
|
+
*
|
361
|
+
* @param {number} from
|
362
|
+
* The smallest degree of rotation.
|
363
|
+
*
|
364
|
+
* @param {number} to
|
365
|
+
* The largest degree of rotation.
|
366
|
+
*
|
367
|
+
* @return {boolean|number}
|
368
|
+
* Returns the resulting rotation for the word. Returns false if invalid
|
369
|
+
* input parameters.
|
370
|
+
*/
|
371
|
+
function getRotation(orientations, index, from, to) {
|
372
|
+
var result = false, // Default to false
|
373
|
+
range,
|
374
|
+
intervals,
|
375
|
+
orientation;
|
376
|
+
|
377
|
+
// Check if we have valid input parameters.
|
378
|
+
if (
|
379
|
+
isNumber(orientations) &&
|
380
|
+
isNumber(index) &&
|
381
|
+
isNumber(from) &&
|
382
|
+
isNumber(to) &&
|
383
|
+
orientations > -1 &&
|
384
|
+
index > -1 &&
|
385
|
+
to > from
|
386
|
+
) {
|
387
|
+
range = to - from;
|
388
|
+
intervals = range / (orientations - 1);
|
389
|
+
orientation = index % orientations;
|
390
|
+
result = from + (orientation * intervals);
|
391
|
+
}
|
392
|
+
return result;
|
393
|
+
}
|
394
|
+
|
395
|
+
/**
|
396
|
+
* Calculates the spiral positions and store them in scope for quick access.
|
397
|
+
*
|
398
|
+
* @private
|
399
|
+
* @function getSpiral
|
400
|
+
*
|
401
|
+
* @param {Function} fn
|
402
|
+
* The spiral function.
|
403
|
+
*
|
404
|
+
* @param {object} params
|
405
|
+
* Additional parameters for the spiral.
|
406
|
+
*
|
407
|
+
* @return {Function}
|
408
|
+
* Function with access to spiral positions.
|
409
|
+
*/
|
410
|
+
function getSpiral(fn, params) {
|
411
|
+
var length = 10000,
|
412
|
+
i,
|
413
|
+
arr = [];
|
414
|
+
|
415
|
+
for (i = 1; i < length; i++) {
|
416
|
+
arr.push(fn(i, params));
|
417
|
+
}
|
418
|
+
|
419
|
+
return function (attempt) {
|
420
|
+
return attempt <= length ? arr[attempt - 1] : false;
|
421
|
+
};
|
422
|
+
}
|
423
|
+
|
424
|
+
/**
|
425
|
+
* Detects if a word is placed outside the playing field.
|
426
|
+
*
|
427
|
+
* @private
|
428
|
+
* @function outsidePlayingField
|
429
|
+
*
|
430
|
+
* @param {Highcharts.Point} point
|
431
|
+
* Point which the word is connected to.
|
432
|
+
*
|
433
|
+
* @param {object} field
|
434
|
+
* The width and height of the playing field.
|
435
|
+
*
|
436
|
+
* @return {boolean}
|
437
|
+
* Returns true if the word is placed outside the field.
|
438
|
+
*/
|
439
|
+
function outsidePlayingField(rect, field) {
|
440
|
+
var playingField = {
|
441
|
+
left: -(field.width / 2),
|
442
|
+
right: field.width / 2,
|
443
|
+
top: -(field.height / 2),
|
444
|
+
bottom: field.height / 2
|
445
|
+
};
|
446
|
+
|
447
|
+
return !(
|
448
|
+
playingField.left < rect.left &&
|
449
|
+
playingField.right > rect.right &&
|
450
|
+
playingField.top < rect.top &&
|
451
|
+
playingField.bottom > rect.bottom
|
452
|
+
);
|
453
|
+
}
|
454
|
+
|
455
|
+
/**
|
456
|
+
* Check if a point intersects with previously placed words, or if it goes
|
457
|
+
* outside the field boundaries. If a collision, then try to adjusts the
|
458
|
+
* position.
|
459
|
+
*
|
460
|
+
* @private
|
461
|
+
* @function intersectionTesting
|
462
|
+
*
|
463
|
+
* @param {Highcharts.Point} point
|
464
|
+
* Point to test for intersections.
|
465
|
+
*
|
466
|
+
* @param {object} options
|
467
|
+
* Options object.
|
468
|
+
*
|
469
|
+
* @return {boolean|object}
|
470
|
+
* Returns an object with how much to correct the positions. Returns
|
471
|
+
* false if the word should not be placed at all.
|
472
|
+
*/
|
473
|
+
function intersectionTesting(point, options) {
|
474
|
+
var placed = options.placed,
|
475
|
+
field = options.field,
|
476
|
+
rectangle = options.rectangle,
|
477
|
+
polygon = options.polygon,
|
478
|
+
spiral = options.spiral,
|
479
|
+
attempt = 1,
|
480
|
+
delta = {
|
481
|
+
x: 0,
|
482
|
+
y: 0
|
483
|
+
},
|
484
|
+
// Make a copy to update values during intersection testing.
|
485
|
+
rect = point.rect = extend({}, rectangle);
|
486
|
+
|
487
|
+
point.polygon = polygon;
|
488
|
+
point.rotation = options.rotation;
|
489
|
+
|
490
|
+
/* while w intersects any previously placed words:
|
491
|
+
do {
|
492
|
+
move w a little bit along a spiral path
|
493
|
+
} while any part of w is outside the playing field and
|
494
|
+
the spiral radius is still smallish */
|
495
|
+
while (
|
496
|
+
delta !== false &&
|
497
|
+
(
|
498
|
+
intersectsAnyWord(point, placed) ||
|
499
|
+
outsidePlayingField(rect, field)
|
500
|
+
)
|
501
|
+
) {
|
502
|
+
delta = spiral(attempt);
|
503
|
+
if (isObject(delta)) {
|
504
|
+
// Update the DOMRect with new positions.
|
505
|
+
rect.left = rectangle.left + delta.x;
|
506
|
+
rect.right = rectangle.right + delta.x;
|
507
|
+
rect.top = rectangle.top + delta.y;
|
508
|
+
rect.bottom = rectangle.bottom + delta.y;
|
509
|
+
point.polygon = movePolygon(delta.x, delta.y, polygon);
|
510
|
+
}
|
511
|
+
attempt++;
|
512
|
+
}
|
513
|
+
return delta;
|
514
|
+
}
|
515
|
+
|
516
|
+
/**
|
517
|
+
* Extends the playing field to have enough space to fit a given word.
|
518
|
+
*
|
519
|
+
* @private
|
520
|
+
* @function extendPlayingField
|
521
|
+
*
|
522
|
+
* @param {object} field
|
523
|
+
* The width, height and ratios of a playing field.
|
524
|
+
*
|
525
|
+
* @param {object} rectangle
|
526
|
+
* The bounding box of the word to add space for.
|
527
|
+
*
|
528
|
+
* @return {object}
|
529
|
+
* Returns the extended playing field with updated height and width.
|
530
|
+
*/
|
531
|
+
function extendPlayingField(field, rectangle) {
|
532
|
+
var height, width, ratioX, ratioY, x, extendWidth, extendHeight, result;
|
533
|
+
|
534
|
+
if (isObject(field) && isObject(rectangle)) {
|
535
|
+
height = (rectangle.bottom - rectangle.top);
|
536
|
+
width = (rectangle.right - rectangle.left);
|
537
|
+
ratioX = field.ratioX;
|
538
|
+
ratioY = field.ratioY;
|
539
|
+
|
540
|
+
// Use the same variable to extend both the height and width.
|
541
|
+
x = ((width * ratioX) > (height * ratioY)) ? width : height;
|
542
|
+
|
543
|
+
// Multiply variable with ratios to preserve aspect ratio.
|
544
|
+
extendWidth = x * ratioX;
|
545
|
+
extendHeight = x * ratioY;
|
546
|
+
|
547
|
+
// Calculate the size of the new field after adding space for the word.
|
548
|
+
result = merge(field, {
|
549
|
+
// Add space on the left and right.
|
550
|
+
width: field.width + (extendWidth * 2),
|
551
|
+
// Add space on the top and bottom.
|
552
|
+
height: field.height + (extendHeight * 2)
|
553
|
+
});
|
554
|
+
} else {
|
555
|
+
result = field;
|
556
|
+
}
|
557
|
+
|
558
|
+
// Return the new extended field.
|
559
|
+
return result;
|
560
|
+
}
|
561
|
+
|
562
|
+
/**
|
563
|
+
* If a rectangle is outside a give field, then the boundaries of the field is
|
564
|
+
* adjusted accordingly. Modifies the field object which is passed as the first
|
565
|
+
* parameter.
|
566
|
+
*
|
567
|
+
* @private
|
568
|
+
* @function updateFieldBoundaries
|
569
|
+
*
|
570
|
+
* @param {object} field
|
571
|
+
* The bounding box of a playing field.
|
572
|
+
*
|
573
|
+
* @param {object} placement
|
574
|
+
* The bounding box for a placed point.
|
575
|
+
*
|
576
|
+
* @return {object}
|
577
|
+
* Returns a modified field object.
|
578
|
+
*/
|
579
|
+
function updateFieldBoundaries(field, rectangle) {
|
580
|
+
// TODO improve type checking.
|
581
|
+
if (!isNumber(field.left) || field.left > rectangle.left) {
|
582
|
+
field.left = rectangle.left;
|
583
|
+
}
|
584
|
+
if (!isNumber(field.right) || field.right < rectangle.right) {
|
585
|
+
field.right = rectangle.right;
|
586
|
+
}
|
587
|
+
if (!isNumber(field.top) || field.top > rectangle.top) {
|
588
|
+
field.top = rectangle.top;
|
589
|
+
}
|
590
|
+
if (!isNumber(field.bottom) || field.bottom < rectangle.bottom) {
|
591
|
+
field.bottom = rectangle.bottom;
|
592
|
+
}
|
593
|
+
return field;
|
594
|
+
}
|
595
|
+
|
596
|
+
/**
|
597
|
+
* A word cloud is a visualization of a set of words, where the size and
|
598
|
+
* placement of a word is determined by how it is weighted.
|
599
|
+
*
|
600
|
+
* @sample highcharts/demo/wordcloud
|
601
|
+
* Word Cloud chart
|
602
|
+
*
|
603
|
+
* @extends plotOptions.column
|
604
|
+
* @excluding allAreas, boostThreshold, clip, colorAxis, compare,
|
605
|
+
* compareBase, crisp, cropTreshold, dataGrouping, dataLabels,
|
606
|
+
* depth, edgeColor, findNearestPointBy, getExtremesFromAll,
|
607
|
+
* grouping, groupPadding, groupZPadding, joinBy, maxPointWidth,
|
608
|
+
* minPointLength, navigatorOptions, negativeColor, pointInterval,
|
609
|
+
* pointIntervalUnit, pointPadding, pointPlacement, pointRange,
|
610
|
+
* pointStart, pointWidth, pointStart, pointWidth, shadow,
|
611
|
+
* showCheckbox, showInNavigator, softThreshold, stacking,
|
612
|
+
* threshold, zoneAxis, zones
|
613
|
+
* @product highcharts
|
614
|
+
* @since 6.0.0
|
615
|
+
* @optionparent plotOptions.wordcloud
|
616
|
+
*/
|
617
|
+
var wordCloudOptions = {
|
618
|
+
/**
|
619
|
+
* If there is no space for a word on the playing field, then this option
|
620
|
+
* will allow the playing field to be extended to fit the word. If false
|
621
|
+
* then the word will be dropped from the visualization.
|
622
|
+
*
|
623
|
+
* NB! This option is currently not decided to be published in the API, and
|
624
|
+
* is therefore marked as private.
|
625
|
+
*
|
626
|
+
* @private
|
627
|
+
*/
|
628
|
+
allowExtendPlayingField: true,
|
629
|
+
animation: {
|
630
|
+
duration: 500
|
631
|
+
},
|
632
|
+
borderWidth: 0,
|
633
|
+
clip: false, // Something goes wrong with clip. // @todo fix this
|
634
|
+
colorByPoint: true,
|
635
|
+
/**
|
636
|
+
* A threshold determining the minimum font size that can be applied to a
|
637
|
+
* word.
|
638
|
+
*/
|
639
|
+
minFontSize: 1,
|
640
|
+
/**
|
641
|
+
* The word with the largest weight will have a font size equal to this
|
642
|
+
* value. The font size of a word is the ratio between its weight and the
|
643
|
+
* largest occuring weight, multiplied with the value of maxFontSize.
|
644
|
+
*/
|
645
|
+
maxFontSize: 25,
|
646
|
+
/**
|
647
|
+
* This option decides which algorithm is used for placement, and rotation
|
648
|
+
* of a word. The choice of algorith is therefore a crucial part of the
|
649
|
+
* resulting layout of the wordcloud. It is possible for users to add their
|
650
|
+
* own custom placement strategies for use in word cloud. Read more about it
|
651
|
+
* in our
|
652
|
+
* [documentation](https://www.highcharts.com/docs/chart-and-series-types/word-cloud-series#custom-placement-strategies)
|
653
|
+
*
|
654
|
+
* @validvalue: ["center", "random"]
|
655
|
+
*/
|
656
|
+
placementStrategy: 'center',
|
657
|
+
/**
|
658
|
+
* Rotation options for the words in the wordcloud.
|
659
|
+
*
|
660
|
+
* @sample highcharts/plotoptions/wordcloud-rotation
|
661
|
+
* Word cloud with rotation
|
662
|
+
*/
|
663
|
+
rotation: {
|
664
|
+
/**
|
665
|
+
* The smallest degree of rotation for a word.
|
666
|
+
*/
|
667
|
+
from: 0,
|
668
|
+
/**
|
669
|
+
* The number of possible orientations for a word, within the range of
|
670
|
+
* `rotation.from` and `rotation.to`.
|
671
|
+
*/
|
672
|
+
orientations: 2,
|
673
|
+
/**
|
674
|
+
* The largest degree of rotation for a word.
|
675
|
+
*/
|
676
|
+
to: 90
|
677
|
+
},
|
678
|
+
showInLegend: false,
|
679
|
+
/**
|
680
|
+
* Spiral used for placing a word after the initial position experienced a
|
681
|
+
* collision with either another word or the borders.
|
682
|
+
* It is possible for users to add their own custom spiralling algorithms
|
683
|
+
* for use in word cloud. Read more about it in our
|
684
|
+
* [documentation](https://www.highcharts.com/docs/chart-and-series-types/word-cloud-series#custom-spiralling-algorithm)
|
685
|
+
*
|
686
|
+
* @validvalue: ["archimedean", "rectangular", "square"]
|
687
|
+
*/
|
688
|
+
spiral: 'rectangular',
|
689
|
+
/**
|
690
|
+
* CSS styles for the words.
|
691
|
+
*
|
692
|
+
* @type {Highcharts.CSSObject}
|
693
|
+
* @default {"fontFamily":"sans-serif", "fontWeight": "900"}
|
694
|
+
*/
|
695
|
+
style: {
|
696
|
+
/** @ignore-option */
|
697
|
+
fontFamily: 'sans-serif',
|
698
|
+
/** @ignore-option */
|
699
|
+
fontWeight: '900'
|
700
|
+
},
|
701
|
+
tooltip: {
|
702
|
+
followPointer: true,
|
703
|
+
pointFormat: '<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.weight}</b><br/>'
|
704
|
+
}
|
705
|
+
};
|
706
|
+
|
707
|
+
// Properties of the WordCloud series.
|
708
|
+
var wordCloudSeries = {
|
709
|
+
animate: Series.prototype.animate,
|
710
|
+
animateDrilldown: noop,
|
711
|
+
animateDrillupFrom: noop,
|
712
|
+
bindAxes: function () {
|
713
|
+
var wordcloudAxis = {
|
714
|
+
endOnTick: false,
|
715
|
+
gridLineWidth: 0,
|
716
|
+
lineWidth: 0,
|
717
|
+
maxPadding: 0,
|
718
|
+
startOnTick: false,
|
719
|
+
title: null,
|
720
|
+
tickPositions: []
|
721
|
+
};
|
722
|
+
|
723
|
+
Series.prototype.bindAxes.call(this);
|
724
|
+
extend(this.yAxis.options, wordcloudAxis);
|
725
|
+
extend(this.xAxis.options, wordcloudAxis);
|
726
|
+
},
|
727
|
+
|
728
|
+
pointAttribs: function (point, state) {
|
729
|
+
var attribs = H.seriesTypes.column.prototype
|
730
|
+
.pointAttribs.call(this, point, state);
|
731
|
+
|
732
|
+
delete attribs.stroke;
|
733
|
+
delete attribs['stroke-width'];
|
734
|
+
|
735
|
+
return attribs;
|
736
|
+
|
737
|
+
},
|
738
|
+
|
739
|
+
/**
|
740
|
+
* Calculates the fontSize of a word based on its weight.
|
741
|
+
*
|
742
|
+
* @private
|
743
|
+
* @function Highcharts.Series#deriveFontSize
|
744
|
+
*
|
745
|
+
* @param {number} [relativeWeight=0]
|
746
|
+
* The weight of the word, on a scale 0-1.
|
747
|
+
*
|
748
|
+
* @param {number} [maxFontSize=1]
|
749
|
+
* The maximum font size of a word.
|
750
|
+
*
|
751
|
+
* @param {number} [minFontSize=1]
|
752
|
+
* The minimum font size of a word.
|
753
|
+
*
|
754
|
+
* @return {number}
|
755
|
+
* Returns the resulting fontSize of a word. If minFontSize is
|
756
|
+
* larger then maxFontSize the result will equal minFontSize.
|
757
|
+
*/
|
758
|
+
deriveFontSize: function deriveFontSize(
|
759
|
+
relativeWeight,
|
760
|
+
maxFontSize,
|
761
|
+
minFontSize
|
762
|
+
) {
|
763
|
+
var weight = isNumber(relativeWeight) ? relativeWeight : 0,
|
764
|
+
max = isNumber(maxFontSize) ? maxFontSize : 1,
|
765
|
+
min = isNumber(minFontSize) ? minFontSize : 1;
|
766
|
+
|
767
|
+
return Math.floor(Math.max(min, weight * max));
|
768
|
+
},
|
769
|
+
drawPoints: function () {
|
770
|
+
var series = this,
|
771
|
+
hasRendered = series.hasRendered,
|
772
|
+
xAxis = series.xAxis,
|
773
|
+
yAxis = series.yAxis,
|
774
|
+
chart = series.chart,
|
775
|
+
group = series.group,
|
776
|
+
options = series.options,
|
777
|
+
animation = options.animation,
|
778
|
+
allowExtendPlayingField = options.allowExtendPlayingField,
|
779
|
+
renderer = chart.renderer,
|
780
|
+
testElement = renderer.text().add(group),
|
781
|
+
placed = [],
|
782
|
+
placementStrategy = series.placementStrategy[
|
783
|
+
options.placementStrategy
|
784
|
+
],
|
785
|
+
spiral,
|
786
|
+
rotation = options.rotation,
|
787
|
+
scale,
|
788
|
+
weights = series.points
|
789
|
+
.map(function (p) {
|
790
|
+
return p.weight;
|
791
|
+
}),
|
792
|
+
maxWeight = Math.max.apply(null, weights),
|
793
|
+
data = series.points
|
794
|
+
.sort(function (a, b) {
|
795
|
+
return b.weight - a.weight; // Sort descending
|
796
|
+
}),
|
797
|
+
field;
|
798
|
+
|
799
|
+
// Get the dimensions for each word.
|
800
|
+
// Used in calculating the playing field.
|
801
|
+
data.forEach(function (point) {
|
802
|
+
var relativeWeight = 1 / maxWeight * point.weight,
|
803
|
+
fontSize = series.deriveFontSize(
|
804
|
+
relativeWeight,
|
805
|
+
options.maxFontSize,
|
806
|
+
options.minFontSize
|
807
|
+
),
|
808
|
+
css = extend({
|
809
|
+
fontSize: fontSize + 'px'
|
810
|
+
}, options.style),
|
811
|
+
bBox;
|
812
|
+
|
813
|
+
testElement.css(css).attr({
|
814
|
+
x: 0,
|
815
|
+
y: 0,
|
816
|
+
text: point.name
|
817
|
+
});
|
818
|
+
bBox = testElement.getBBox(true);
|
819
|
+
point.dimensions = {
|
820
|
+
height: bBox.height,
|
821
|
+
width: bBox.width
|
822
|
+
};
|
823
|
+
});
|
824
|
+
|
825
|
+
// Calculate the playing field.
|
826
|
+
field = getPlayingField(xAxis.len, yAxis.len, data);
|
827
|
+
spiral = getSpiral(series.spirals[options.spiral], {
|
828
|
+
field: field
|
829
|
+
});
|
830
|
+
// Draw all the points.
|
831
|
+
data.forEach(function (point) {
|
832
|
+
var relativeWeight = 1 / maxWeight * point.weight,
|
833
|
+
fontSize = series.deriveFontSize(
|
834
|
+
relativeWeight,
|
835
|
+
options.maxFontSize,
|
836
|
+
options.minFontSize
|
837
|
+
),
|
838
|
+
css = extend({
|
839
|
+
fontSize: fontSize + 'px'
|
840
|
+
}, options.style),
|
841
|
+
placement = placementStrategy(point, {
|
842
|
+
data: data,
|
843
|
+
field: field,
|
844
|
+
placed: placed,
|
845
|
+
rotation: rotation
|
846
|
+
}),
|
847
|
+
attr = extend(
|
848
|
+
series.pointAttribs(point, point.selected && 'select'),
|
849
|
+
{
|
850
|
+
align: 'center',
|
851
|
+
'alignment-baseline': 'middle',
|
852
|
+
x: placement.x,
|
853
|
+
y: placement.y,
|
854
|
+
text: point.name,
|
855
|
+
rotation: placement.rotation
|
856
|
+
}
|
857
|
+
),
|
858
|
+
polygon = getPolygon(
|
859
|
+
placement.x,
|
860
|
+
placement.y,
|
861
|
+
point.dimensions.width,
|
862
|
+
point.dimensions.height,
|
863
|
+
placement.rotation
|
864
|
+
),
|
865
|
+
rectangle = getBoundingBoxFromPolygon(polygon),
|
866
|
+
delta = intersectionTesting(point, {
|
867
|
+
rectangle: rectangle,
|
868
|
+
polygon: polygon,
|
869
|
+
field: field,
|
870
|
+
placed: placed,
|
871
|
+
spiral: spiral,
|
872
|
+
rotation: placement.rotation
|
873
|
+
}),
|
874
|
+
animate;
|
875
|
+
|
876
|
+
// If there is no space for the word, extend the playing field.
|
877
|
+
if (!delta && allowExtendPlayingField) {
|
878
|
+
// Extend the playing field to fit the word.
|
879
|
+
field = extendPlayingField(field, rectangle);
|
880
|
+
|
881
|
+
// Run intersection testing one more time to place the word.
|
882
|
+
delta = intersectionTesting(point, {
|
883
|
+
rectangle: rectangle,
|
884
|
+
polygon: polygon,
|
885
|
+
field: field,
|
886
|
+
placed: placed,
|
887
|
+
spiral: spiral,
|
888
|
+
rotation: placement.rotation
|
889
|
+
});
|
890
|
+
}
|
891
|
+
// Check if point was placed, if so delete it, otherwise place it on
|
892
|
+
// the correct positions.
|
893
|
+
if (isObject(delta)) {
|
894
|
+
attr.x += delta.x;
|
895
|
+
attr.y += delta.y;
|
896
|
+
rectangle.left += delta.x;
|
897
|
+
rectangle.right += delta.x;
|
898
|
+
rectangle.top += delta.y;
|
899
|
+
rectangle.bottom += delta.y;
|
900
|
+
field = updateFieldBoundaries(field, rectangle);
|
901
|
+
placed.push(point);
|
902
|
+
point.isNull = false;
|
903
|
+
} else {
|
904
|
+
point.isNull = true;
|
905
|
+
}
|
906
|
+
|
907
|
+
if (animation) {
|
908
|
+
// Animate to new positions
|
909
|
+
animate = {
|
910
|
+
x: attr.x,
|
911
|
+
y: attr.y
|
912
|
+
};
|
913
|
+
// Animate from center of chart
|
914
|
+
if (!hasRendered) {
|
915
|
+
attr.x = 0;
|
916
|
+
attr.y = 0;
|
917
|
+
// or animate from previous position
|
918
|
+
} else {
|
919
|
+
delete attr.x;
|
920
|
+
delete attr.y;
|
921
|
+
}
|
922
|
+
}
|
923
|
+
|
924
|
+
point.draw({
|
925
|
+
animatableAttribs: animate,
|
926
|
+
attribs: attr,
|
927
|
+
css: css,
|
928
|
+
group: group,
|
929
|
+
renderer: renderer,
|
930
|
+
shapeArgs: undefined,
|
931
|
+
shapeType: 'text'
|
932
|
+
});
|
933
|
+
});
|
934
|
+
|
935
|
+
// Destroy the element after use.
|
936
|
+
testElement = testElement.destroy();
|
937
|
+
|
938
|
+
// Scale the series group to fit within the plotArea.
|
939
|
+
scale = getScale(xAxis.len, yAxis.len, field);
|
940
|
+
series.group.attr({
|
941
|
+
scaleX: scale,
|
942
|
+
scaleY: scale
|
943
|
+
});
|
944
|
+
},
|
945
|
+
hasData: function () {
|
946
|
+
var series = this;
|
947
|
+
|
948
|
+
return (
|
949
|
+
isObject(series) &&
|
950
|
+
series.visible === true &&
|
951
|
+
isArray(series.points) &&
|
952
|
+
series.points.length > 0
|
953
|
+
);
|
954
|
+
},
|
955
|
+
// Strategies used for deciding rotation and initial position of a word. To
|
956
|
+
// implement a custom strategy, have a look at the function random for
|
957
|
+
// example.
|
958
|
+
placementStrategy: {
|
959
|
+
random: function (point, options) {
|
960
|
+
var field = options.field,
|
961
|
+
r = options.rotation;
|
962
|
+
|
963
|
+
return {
|
964
|
+
x: getRandomPosition(field.width) - (field.width / 2),
|
965
|
+
y: getRandomPosition(field.height) - (field.height / 2),
|
966
|
+
rotation: getRotation(r.orientations, point.index, r.from, r.to)
|
967
|
+
};
|
968
|
+
},
|
969
|
+
center: function (point, options) {
|
970
|
+
var r = options.rotation;
|
971
|
+
|
972
|
+
return {
|
973
|
+
x: 0,
|
974
|
+
y: 0,
|
975
|
+
rotation: getRotation(r.orientations, point.index, r.from, r.to)
|
976
|
+
};
|
977
|
+
}
|
978
|
+
},
|
979
|
+
pointArrayMap: ['weight'],
|
980
|
+
// Spirals used for placing a word after the initial position experienced a
|
981
|
+
// collision with either another word or the borders. To implement a custom
|
982
|
+
// spiral, look at the function archimedeanSpiral for example.
|
983
|
+
spirals: {
|
984
|
+
'archimedean': archimedeanSpiral,
|
985
|
+
'rectangular': rectangularSpiral,
|
986
|
+
'square': squareSpiral
|
987
|
+
},
|
988
|
+
utils: {
|
989
|
+
extendPlayingField: extendPlayingField,
|
990
|
+
getRotation: getRotation,
|
991
|
+
isPolygonsColliding: isPolygonsColliding,
|
992
|
+
rotate2DToOrigin: polygon.rotate2DToOrigin,
|
993
|
+
rotate2DToPoint: polygon.rotate2DToPoint
|
994
|
+
},
|
995
|
+
getPlotBox: function () {
|
996
|
+
var series = this,
|
997
|
+
chart = series.chart,
|
998
|
+
inverted = chart.inverted,
|
999
|
+
// Swap axes for inverted (#2339)
|
1000
|
+
xAxis = series[(inverted ? 'yAxis' : 'xAxis')],
|
1001
|
+
yAxis = series[(inverted ? 'xAxis' : 'yAxis')],
|
1002
|
+
width = xAxis ? xAxis.len : chart.plotWidth,
|
1003
|
+
height = yAxis ? yAxis.len : chart.plotHeight,
|
1004
|
+
x = xAxis ? xAxis.left : chart.plotLeft,
|
1005
|
+
y = yAxis ? yAxis.top : chart.plotTop;
|
1006
|
+
|
1007
|
+
return {
|
1008
|
+
translateX: x + (width / 2),
|
1009
|
+
translateY: y + (height / 2),
|
1010
|
+
scaleX: 1, // #1623
|
1011
|
+
scaleY: 1
|
1012
|
+
};
|
1013
|
+
}
|
1014
|
+
};
|
1015
|
+
|
1016
|
+
// Properties of the Sunburst series.
|
1017
|
+
var wordCloudPoint = {
|
1018
|
+
draw: drawPoint,
|
1019
|
+
shouldDraw: function shouldDraw() {
|
1020
|
+
var point = this;
|
1021
|
+
|
1022
|
+
return !point.isNull;
|
1023
|
+
},
|
1024
|
+
weight: 1
|
1025
|
+
};
|
1026
|
+
|
1027
|
+
/**
|
1028
|
+
* A `wordcloud` series. If the [type](#series.wordcloud.type) option is not
|
1029
|
+
* specified, it is inherited from [chart.type](#chart.type).
|
1030
|
+
*
|
1031
|
+
* @extends series,plotOptions.wordcloud
|
1032
|
+
* @product highcharts
|
1033
|
+
* @apioption series.wordcloud
|
1034
|
+
*/
|
1035
|
+
|
1036
|
+
/**
|
1037
|
+
* An array of data points for the series. For the `wordcloud` series type,
|
1038
|
+
* points can be given in the following ways:
|
1039
|
+
*
|
1040
|
+
* 1. An array of arrays with 2 values. In this case, the values correspond to
|
1041
|
+
* `name,weight`.
|
1042
|
+
* ```js
|
1043
|
+
* data: [
|
1044
|
+
* ['Lorem', 4],
|
1045
|
+
* ['Ipsum', 1]
|
1046
|
+
* ]
|
1047
|
+
* ```
|
1048
|
+
*
|
1049
|
+
* 2. An array of objects with named values. The following snippet shows only a
|
1050
|
+
* few settings, see the complete options set below. If the total number of
|
1051
|
+
* data points exceeds the series'
|
1052
|
+
* [turboThreshold](#series.arearange.turboThreshold), this option is not
|
1053
|
+
* available.
|
1054
|
+
* ```js
|
1055
|
+
* data: [{
|
1056
|
+
* name: "Lorem",
|
1057
|
+
* weight: 4
|
1058
|
+
* }, {
|
1059
|
+
* name: "Ipsum",
|
1060
|
+
* weight: 1
|
1061
|
+
* }]
|
1062
|
+
* ```
|
1063
|
+
*
|
1064
|
+
* @type {Array<Array<string,number>|*>}
|
1065
|
+
* @extends series.line.data
|
1066
|
+
* @excluding drilldown, marker, x, y
|
1067
|
+
* @product highcharts
|
1068
|
+
* @apioption series.wordcloud.data
|
1069
|
+
*/
|
1070
|
+
|
1071
|
+
/**
|
1072
|
+
* The name decides the text for a word.
|
1073
|
+
*
|
1074
|
+
* @type {string}
|
1075
|
+
* @since 6.0.0
|
1076
|
+
* @product highcharts
|
1077
|
+
* @apioption series.sunburst.data.name
|
1078
|
+
*/
|
1079
|
+
|
1080
|
+
/**
|
1081
|
+
* The weighting of a word. The weight decides the relative size of a word
|
1082
|
+
* compared to the rest of the collection.
|
1083
|
+
*
|
1084
|
+
* @type {number}
|
1085
|
+
* @since 6.0.0
|
1086
|
+
* @product highcharts
|
1087
|
+
* @apioption series.sunburst.data.weight
|
1088
|
+
*/
|
1089
|
+
|
1090
|
+
/**
|
1091
|
+
* @private
|
1092
|
+
* @class
|
1093
|
+
* @name Highcharts.seriesTypes.wordcloud
|
1094
|
+
*
|
1095
|
+
* @augments Highcharts.Series
|
1096
|
+
*/
|
1097
|
+
H.seriesType(
|
1098
|
+
'wordcloud',
|
1099
|
+
'column',
|
1100
|
+
wordCloudOptions,
|
1101
|
+
wordCloudSeries,
|
1102
|
+
wordCloudPoint
|
1103
|
+
);
|