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,1951 @@
|
|
1
|
+
/* *
|
2
|
+
* (c) 2009-2017 Highsoft, Black Label
|
3
|
+
*
|
4
|
+
* License: www.highcharts.com/license
|
5
|
+
*/
|
6
|
+
|
7
|
+
/**
|
8
|
+
* @interface Highcharts.AnnotationAnchorObject
|
9
|
+
*//**
|
10
|
+
* Relative to the plot area position
|
11
|
+
* @name Highcharts.AnnotationAnchorObject#relativePosition
|
12
|
+
* @type {Highcharts.AnnotationAnchorPositionObject}
|
13
|
+
*//**
|
14
|
+
* Absolute position
|
15
|
+
* @name Highcharts.AnnotationAnchorObject#absolutePosition
|
16
|
+
* @type {Highcharts.AnnotationAnchorPositionObject}
|
17
|
+
*/
|
18
|
+
|
19
|
+
/**
|
20
|
+
* An object which denotes an anchor position
|
21
|
+
*
|
22
|
+
* @interface Highcharts.AnnotationAnchorPositionObject
|
23
|
+
*//**
|
24
|
+
* @name Highcharts.AnnotationAnchorPositionObject#x
|
25
|
+
* @property {number}
|
26
|
+
*//**
|
27
|
+
* @name Highcharts.AnnotationAnchorPositionObject#y
|
28
|
+
* @property {number}
|
29
|
+
*//**
|
30
|
+
* @name Highcharts.AnnotationAnchorPositionObject#height
|
31
|
+
* @property {number}
|
32
|
+
*//**
|
33
|
+
* @name Highcharts.AnnotationAnchorPositionObject#width
|
34
|
+
* @property {number}
|
35
|
+
*/
|
36
|
+
|
37
|
+
/**
|
38
|
+
* A mock point label configuration.
|
39
|
+
*
|
40
|
+
* @private
|
41
|
+
* @interface Highcharts.MockLabelOptionsObject
|
42
|
+
*//**
|
43
|
+
* X value translated to x axis scale
|
44
|
+
* @name Highcharts.MockLabelOptionsObject#x
|
45
|
+
* @type {number|undefined}
|
46
|
+
*//**
|
47
|
+
* Y value translated to y axis scale
|
48
|
+
* @name Highcharts.MockLabelOptionsObject#y
|
49
|
+
* @type {number|undefined}
|
50
|
+
*//**
|
51
|
+
* @name Highcharts.MockLabelOptionsObject#point
|
52
|
+
* @type {Highcharts.Point}
|
53
|
+
*/
|
54
|
+
|
55
|
+
/**
|
56
|
+
* A mock point configuration.
|
57
|
+
*
|
58
|
+
* @todo Make official
|
59
|
+
*
|
60
|
+
* @private
|
61
|
+
* @interface Highcharts.MockPointOptionsObject
|
62
|
+
*//**
|
63
|
+
* x value for the point in xAxis scale or pixels
|
64
|
+
* @name Highcharts.MockPointOptionsObject#x
|
65
|
+
* @type {number}
|
66
|
+
*//**
|
67
|
+
* y value for the point in yAxis scale or pixels
|
68
|
+
* @name Highcharts.MockPointOptionsObject#y
|
69
|
+
* @type {number}
|
70
|
+
*//**
|
71
|
+
* xAxis index or id
|
72
|
+
* @name Highcharts.MockPointOptionsObject#xAxis
|
73
|
+
* @type {number|string|undefined}
|
74
|
+
*//**
|
75
|
+
* yAxis index or id
|
76
|
+
* @name Highcharts.MockPointOptionsObject#yAxis
|
77
|
+
* @property {number|string|undefined}
|
78
|
+
*/
|
79
|
+
|
80
|
+
'use strict';
|
81
|
+
|
82
|
+
import H from '../parts/Globals.js';
|
83
|
+
import '../parts/Utilities.js';
|
84
|
+
import '../parts/Chart.js';
|
85
|
+
import '../parts/Series.js';
|
86
|
+
import '../parts/Tooltip.js';
|
87
|
+
|
88
|
+
var merge = H.merge,
|
89
|
+
addEvent = H.addEvent,
|
90
|
+
extend = H.extend,
|
91
|
+
isString = H.isString,
|
92
|
+
isNumber = H.isNumber,
|
93
|
+
defined = H.defined,
|
94
|
+
isObject = H.isObject,
|
95
|
+
erase = H.erase,
|
96
|
+
find = H.find,
|
97
|
+
format = H.format,
|
98
|
+
pick = H.pick,
|
99
|
+
objectEach = H.objectEach,
|
100
|
+
uniqueKey = H.uniqueKey,
|
101
|
+
destroyObjectProperties = H.destroyObjectProperties,
|
102
|
+
tooltipPrototype = H.Tooltip.prototype,
|
103
|
+
seriesPrototype = H.Series.prototype,
|
104
|
+
chartPrototype = H.Chart.prototype;
|
105
|
+
|
106
|
+
|
107
|
+
/* ************************************************************************** *
|
108
|
+
*
|
109
|
+
* MARKER SECTION
|
110
|
+
* Contains objects and functions for adding a marker element to a path
|
111
|
+
* element
|
112
|
+
*
|
113
|
+
* ************************************************************************** */
|
114
|
+
|
115
|
+
/**
|
116
|
+
* Options for configuring markers for annotations.
|
117
|
+
*
|
118
|
+
* An example of the arrow marker:
|
119
|
+
* ```
|
120
|
+
* {
|
121
|
+
* arrow: {
|
122
|
+
* id: 'arrow',
|
123
|
+
* tagName: 'marker',
|
124
|
+
* refY: 5,
|
125
|
+
* refX: 5,
|
126
|
+
* markerWidth: 10,
|
127
|
+
* markerHeight: 10,
|
128
|
+
* children: [{
|
129
|
+
* tagName: 'path',
|
130
|
+
* attrs: {
|
131
|
+
* d: 'M 0 0 L 10 5 L 0 10 Z',
|
132
|
+
* strokeWidth: 0
|
133
|
+
* }
|
134
|
+
* }]
|
135
|
+
* }
|
136
|
+
* }
|
137
|
+
* ```
|
138
|
+
*
|
139
|
+
* @sample highcharts/annotations/custom-markers/
|
140
|
+
* Define a custom marker for annotations
|
141
|
+
* @sample highcharts/css/annotations-markers/
|
142
|
+
* Define markers in a styled mode
|
143
|
+
*
|
144
|
+
* @type {Highcharts.Dictionary<Highcharts.SVGAttributes>}
|
145
|
+
* @since 6.0.0
|
146
|
+
* @apioption defs
|
147
|
+
*/
|
148
|
+
var defaultMarkers = {
|
149
|
+
arrow: {
|
150
|
+
tagName: 'marker',
|
151
|
+
render: false,
|
152
|
+
id: 'arrow',
|
153
|
+
refY: 5,
|
154
|
+
refX: 5,
|
155
|
+
markerWidth: 10,
|
156
|
+
markerHeight: 10,
|
157
|
+
children: [{
|
158
|
+
tagName: 'path',
|
159
|
+
d: 'M 0 0 L 10 5 L 0 10 Z', // triangle (used as an arrow)
|
160
|
+
strokeWidth: 0
|
161
|
+
}]
|
162
|
+
}
|
163
|
+
};
|
164
|
+
|
165
|
+
var MarkerMixin = {
|
166
|
+
markerSetter: function (markerType) {
|
167
|
+
return function (value) {
|
168
|
+
this.attr(markerType, 'url(#' + value + ')');
|
169
|
+
};
|
170
|
+
}
|
171
|
+
};
|
172
|
+
|
173
|
+
extend(MarkerMixin, {
|
174
|
+
markerEndSetter: MarkerMixin.markerSetter('marker-end'),
|
175
|
+
markerStartSetter: MarkerMixin.markerSetter('marker-start')
|
176
|
+
});
|
177
|
+
|
178
|
+
H.SVGRenderer.prototype.addMarker = function (id, markerOptions) {
|
179
|
+
var options = { id: id };
|
180
|
+
|
181
|
+
if (!this.styledMode) {
|
182
|
+
var attrs = {
|
183
|
+
stroke: markerOptions.color || 'none',
|
184
|
+
fill: markerOptions.color || 'rgba(0, 0, 0, 0.75)'
|
185
|
+
};
|
186
|
+
|
187
|
+
options.children = markerOptions.children.map(function (child) {
|
188
|
+
return merge(attrs, child);
|
189
|
+
});
|
190
|
+
}
|
191
|
+
|
192
|
+
var marker = this.definition(merge({
|
193
|
+
markerWidth: 20,
|
194
|
+
markerHeight: 20,
|
195
|
+
refX: 0,
|
196
|
+
refY: 0,
|
197
|
+
orient: 'auto'
|
198
|
+
}, markerOptions, options));
|
199
|
+
|
200
|
+
marker.id = id;
|
201
|
+
|
202
|
+
return marker;
|
203
|
+
};
|
204
|
+
|
205
|
+
|
206
|
+
/* ************************************************************************** *
|
207
|
+
*
|
208
|
+
* MOCK POINT
|
209
|
+
*
|
210
|
+
* ************************************************************************** */
|
211
|
+
|
212
|
+
/**
|
213
|
+
* A trimmed point object which imitates {@link Highchart.Point} class.
|
214
|
+
* It is created when there is a need of pointing to some chart's position
|
215
|
+
* using axis values or pixel values
|
216
|
+
*
|
217
|
+
* @private
|
218
|
+
* @class
|
219
|
+
* @name Highcharts.MockPoint
|
220
|
+
*
|
221
|
+
* @param {Highcharts.Chart} chart
|
222
|
+
* The chart object
|
223
|
+
*
|
224
|
+
* @param {Highcharts.MockPointOptionsObject} options
|
225
|
+
* The options object
|
226
|
+
*/
|
227
|
+
var MockPoint = H.MockPoint = function (chart, options) {
|
228
|
+
this.mock = true;
|
229
|
+
this.series = {
|
230
|
+
visible: true,
|
231
|
+
chart: chart,
|
232
|
+
getPlotBox: seriesPrototype.getPlotBox
|
233
|
+
};
|
234
|
+
|
235
|
+
// this.plotX
|
236
|
+
// this.plotY
|
237
|
+
|
238
|
+
/* Those might not exist if a specific axis was not found/defined */
|
239
|
+
// this.x?
|
240
|
+
// this.y?
|
241
|
+
|
242
|
+
this.init(chart, options);
|
243
|
+
};
|
244
|
+
|
245
|
+
/**
|
246
|
+
* A factory function for creating a mock point object
|
247
|
+
*
|
248
|
+
* @function Highcharts.MockPoint#mockPoint
|
249
|
+
*
|
250
|
+
* @param {Highcharts.MockPointOptionsObject} mockPointOptions
|
251
|
+
*
|
252
|
+
* @return {Highcharts.MockPoint}
|
253
|
+
* A mock point
|
254
|
+
*/
|
255
|
+
var mockPoint = H.mockPoint = function (chart, mockPointOptions) {
|
256
|
+
return new MockPoint(chart, mockPointOptions);
|
257
|
+
};
|
258
|
+
|
259
|
+
/**
|
260
|
+
* @private
|
261
|
+
* @class
|
262
|
+
* @name Highcharts.MockPoint
|
263
|
+
*/
|
264
|
+
MockPoint.prototype = {
|
265
|
+
/**
|
266
|
+
* Initialisation of the mock point
|
267
|
+
*
|
268
|
+
* @function Highcharts.MockPoint#init
|
269
|
+
*
|
270
|
+
* @param {Highcharts.Chart} chart
|
271
|
+
* A chart object to which the mock point is attached
|
272
|
+
*
|
273
|
+
* @param {Highcharts.MockPointOptionsObject} options
|
274
|
+
* A config for the mock point
|
275
|
+
*/
|
276
|
+
init: function (chart, options) {
|
277
|
+
var xAxisId = options.xAxis,
|
278
|
+
xAxis = defined(xAxisId) ?
|
279
|
+
chart.xAxis[xAxisId] || chart.get(xAxisId) :
|
280
|
+
null,
|
281
|
+
|
282
|
+
yAxisId = options.yAxis,
|
283
|
+
yAxis = defined(yAxisId) ?
|
284
|
+
chart.yAxis[yAxisId] || chart.get(yAxisId) :
|
285
|
+
null;
|
286
|
+
|
287
|
+
|
288
|
+
if (xAxis) {
|
289
|
+
this.x = options.x;
|
290
|
+
this.series.xAxis = xAxis;
|
291
|
+
} else {
|
292
|
+
this.plotX = options.x;
|
293
|
+
}
|
294
|
+
|
295
|
+
if (yAxis) {
|
296
|
+
this.y = options.y;
|
297
|
+
this.series.yAxis = yAxis;
|
298
|
+
} else {
|
299
|
+
this.plotY = options.y;
|
300
|
+
}
|
301
|
+
},
|
302
|
+
|
303
|
+
/**
|
304
|
+
* Update of the point's coordinates (plotX/plotY)
|
305
|
+
*
|
306
|
+
* @function Highcharts.MockPoint#translate
|
307
|
+
*/
|
308
|
+
translate: function () {
|
309
|
+
var series = this.series,
|
310
|
+
xAxis = series.xAxis,
|
311
|
+
yAxis = series.yAxis;
|
312
|
+
|
313
|
+
if (xAxis) {
|
314
|
+
this.plotX = xAxis.toPixels(this.x, true);
|
315
|
+
}
|
316
|
+
|
317
|
+
if (yAxis) {
|
318
|
+
this.plotY = yAxis.toPixels(this.y, true);
|
319
|
+
}
|
320
|
+
|
321
|
+
this.isInside = this.isInsidePane();
|
322
|
+
},
|
323
|
+
|
324
|
+
/**
|
325
|
+
* Returns a box to which an item can be aligned to
|
326
|
+
*
|
327
|
+
* @function Highcharts.MockPoint#alignToBox
|
328
|
+
*
|
329
|
+
* @param {boolean} [forceTranslate=false]
|
330
|
+
* Whether to update the point's coordinates
|
331
|
+
*
|
332
|
+
* @return {Array<number,number,number,number>}
|
333
|
+
* A quadruple of numbers which denotes x, y, width and height of
|
334
|
+
* the box
|
335
|
+
**/
|
336
|
+
alignToBox: function (forceTranslate) {
|
337
|
+
if (forceTranslate) {
|
338
|
+
this.translate();
|
339
|
+
}
|
340
|
+
|
341
|
+
var x = this.plotX,
|
342
|
+
y = this.plotY,
|
343
|
+
temp;
|
344
|
+
|
345
|
+
|
346
|
+
if (this.series.chart.inverted) {
|
347
|
+
temp = x;
|
348
|
+
x = y;
|
349
|
+
y = temp;
|
350
|
+
}
|
351
|
+
|
352
|
+
return [x, y, 0, 0];
|
353
|
+
},
|
354
|
+
|
355
|
+
/**
|
356
|
+
* Returns a label config object -
|
357
|
+
* the same as Highcharts.Point.prototype.getLabelConfig
|
358
|
+
*
|
359
|
+
* @function Highcharts.MockPoint#getLabelConfig
|
360
|
+
*
|
361
|
+
* @return {Highcharts.MockLabelOptionsObject}
|
362
|
+
* Label config object
|
363
|
+
*/
|
364
|
+
getLabelConfig: function () {
|
365
|
+
return {
|
366
|
+
x: this.x,
|
367
|
+
y: this.y,
|
368
|
+
point: this
|
369
|
+
};
|
370
|
+
},
|
371
|
+
|
372
|
+
isInsidePane: function () {
|
373
|
+
var plotX = this.plotX,
|
374
|
+
plotY = this.plotY,
|
375
|
+
xAxis = this.series.xAxis,
|
376
|
+
yAxis = this.series.yAxis,
|
377
|
+
isInside = true;
|
378
|
+
|
379
|
+
if (xAxis) {
|
380
|
+
isInside = defined(plotX) && plotX >= 0 && plotX <= xAxis.len;
|
381
|
+
}
|
382
|
+
|
383
|
+
if (yAxis) {
|
384
|
+
isInside =
|
385
|
+
isInside &&
|
386
|
+
defined(plotY) &&
|
387
|
+
plotY >= 0 && plotY <= yAxis.len;
|
388
|
+
}
|
389
|
+
|
390
|
+
return isInside;
|
391
|
+
}
|
392
|
+
};
|
393
|
+
|
394
|
+
|
395
|
+
/* ************************************************************************** *
|
396
|
+
*
|
397
|
+
* ANNOTATION
|
398
|
+
*
|
399
|
+
* ************************************************************************** */
|
400
|
+
|
401
|
+
H.defaultOptions.annotations = [];
|
402
|
+
|
403
|
+
/**
|
404
|
+
* An annotation class which serves as a container for items like labels or
|
405
|
+
* shapes. Created items are positioned on the chart either by linking them to
|
406
|
+
* existing points or created mock points
|
407
|
+
*
|
408
|
+
* @class
|
409
|
+
* @name Highcharts.Annotation
|
410
|
+
*
|
411
|
+
* @param {Highcharts.Chart} chart
|
412
|
+
* The chart object
|
413
|
+
*
|
414
|
+
* @param {Highcharts.AnnotationsOptions} userOptions
|
415
|
+
* The options object
|
416
|
+
*/
|
417
|
+
var Annotation = H.Annotation = function (chart, userOptions) {
|
418
|
+
|
419
|
+
/**
|
420
|
+
* The chart that the annotation belongs to.
|
421
|
+
*
|
422
|
+
* @name Highcharts.Annotation#chart
|
423
|
+
* @type {Highcharts.Chart}
|
424
|
+
*/
|
425
|
+
this.chart = chart;
|
426
|
+
|
427
|
+
/**
|
428
|
+
* The array of labels which belong to the annotation.
|
429
|
+
*
|
430
|
+
* @name Highcharts.Annotation#labels
|
431
|
+
* @type {Array<Highcharts.SVGElement>}
|
432
|
+
*/
|
433
|
+
this.labels = [];
|
434
|
+
|
435
|
+
/**
|
436
|
+
* The array of shapes which belong to the annotation.
|
437
|
+
*
|
438
|
+
* @name Highcharts.Annotation#shapes
|
439
|
+
* @type {Array<Highcharts.SVGElement>}
|
440
|
+
*/
|
441
|
+
this.shapes = [];
|
442
|
+
|
443
|
+
/**
|
444
|
+
* The user options for the annotations.
|
445
|
+
*
|
446
|
+
* @name Highcharts.Annotation#userOptions
|
447
|
+
* @type {Highcharts.AnnotationsOptions}
|
448
|
+
*/
|
449
|
+
this.userOptions = userOptions;
|
450
|
+
|
451
|
+
/**
|
452
|
+
* The options for the annotations. It contains user defined options
|
453
|
+
* merged with the default options.
|
454
|
+
*
|
455
|
+
* @name Highcharts.Annotation#options
|
456
|
+
* @type {Highcharts.AnnotationsOptions}
|
457
|
+
*/
|
458
|
+
this.options = merge(this.defaultOptions, userOptions);
|
459
|
+
|
460
|
+
/**
|
461
|
+
* The callback that reports to the overlapping-labels module which
|
462
|
+
* labels it should account for.
|
463
|
+
*
|
464
|
+
* @todo Needs more specific function interface
|
465
|
+
*
|
466
|
+
* @private
|
467
|
+
* @name Highcharts.Annotation#labelCollector
|
468
|
+
* @type {Function}
|
469
|
+
*/
|
470
|
+
|
471
|
+
/**
|
472
|
+
* The group element of the annotation.
|
473
|
+
*
|
474
|
+
* @private
|
475
|
+
* @name Highcharts.Annotation#group
|
476
|
+
* @type {Highcharts.SVGElement}
|
477
|
+
*/
|
478
|
+
|
479
|
+
/**
|
480
|
+
* The group element of the annotation's shapes.
|
481
|
+
*
|
482
|
+
* @private
|
483
|
+
* @name Highcharts.Annotation#shapesGroup
|
484
|
+
* @type {Highcharts.SVGElement}
|
485
|
+
*/
|
486
|
+
|
487
|
+
/**
|
488
|
+
* The group element of the annotation's labels.
|
489
|
+
*
|
490
|
+
* @private
|
491
|
+
* @name Highcharts.Annotation#labelsGroup
|
492
|
+
* @type {Highcharts.SVGElement}
|
493
|
+
*/
|
494
|
+
|
495
|
+
this.init(chart, userOptions);
|
496
|
+
};
|
497
|
+
|
498
|
+
Annotation.prototype = {
|
499
|
+
/**
|
500
|
+
* Shapes which do not have background - the object is used for proper
|
501
|
+
* setting of the contrast color
|
502
|
+
*
|
503
|
+
* @private
|
504
|
+
* @name Highcharts.Annotations#shapesWithoutBackground
|
505
|
+
* @type {Array<string>}
|
506
|
+
*/
|
507
|
+
shapesWithoutBackground: ['connector'],
|
508
|
+
|
509
|
+
/**
|
510
|
+
* Returns a map object which allows to map options attributes to element
|
511
|
+
* attributes.
|
512
|
+
*
|
513
|
+
* @private
|
514
|
+
* @function Highcharts.Annotations#getAttrsMap
|
515
|
+
*
|
516
|
+
* @return {object}
|
517
|
+
*/
|
518
|
+
getAttrsMap: function () {
|
519
|
+
|
520
|
+
var attrsMap = {
|
521
|
+
zIndex: 'zIndex',
|
522
|
+
width: 'width',
|
523
|
+
height: 'height',
|
524
|
+
borderRadius: 'r',
|
525
|
+
r: 'r',
|
526
|
+
padding: 'padding'
|
527
|
+
};
|
528
|
+
|
529
|
+
if (!this.chart.styledMode) {
|
530
|
+
extend(attrsMap, {
|
531
|
+
backgroundColor: 'fill',
|
532
|
+
borderColor: 'stroke',
|
533
|
+
borderWidth: 'stroke-width',
|
534
|
+
dashStyle: 'dashstyle',
|
535
|
+
strokeWidth: 'stroke-width',
|
536
|
+
stroke: 'stroke',
|
537
|
+
fill: 'fill'
|
538
|
+
});
|
539
|
+
}
|
540
|
+
return attrsMap;
|
541
|
+
},
|
542
|
+
|
543
|
+
/**
|
544
|
+
* Options for configuring annotations, for example labels, arrows or
|
545
|
+
* shapes. Annotations can be tied to points, axis coordinates or chart
|
546
|
+
* pixel coordinates.
|
547
|
+
*
|
548
|
+
* @sample highcharts/annotations/basic/
|
549
|
+
* Basic annotations
|
550
|
+
* @sample highcharts/demo/annotations/
|
551
|
+
* Advanced annotations
|
552
|
+
* @sample highcharts/css/annotations
|
553
|
+
* Styled mode
|
554
|
+
* @sample {highstock} stock/annotations/fibonacci-retracements
|
555
|
+
* Custom annotation, Fibonacci retracement
|
556
|
+
*
|
557
|
+
* @type {Array<*>}
|
558
|
+
* @since 6.0.0
|
559
|
+
* @optionparent annotations
|
560
|
+
*/
|
561
|
+
defaultOptions: {
|
562
|
+
/**
|
563
|
+
* Sets an ID for an annotation. Can be user later when removing an
|
564
|
+
* annotation in [Chart#removeAnnotation(id)](
|
565
|
+
* /class-reference/Highcharts.Chart#removeAnnotation) method.
|
566
|
+
*
|
567
|
+
* @type {string}
|
568
|
+
* @apioption annotations.id
|
569
|
+
*/
|
570
|
+
|
571
|
+
/**
|
572
|
+
* Whether the annotation is visible.
|
573
|
+
*
|
574
|
+
* @sample highcharts/annotations/visible/
|
575
|
+
* Set annotation visibility
|
576
|
+
*/
|
577
|
+
visible: true,
|
578
|
+
|
579
|
+
/**
|
580
|
+
* Allow an annotation to be draggable by a user. Possible
|
581
|
+
* values are `"x"`, `"xy"`, `"y"` and `""` (disabled).
|
582
|
+
*
|
583
|
+
* @sample highcharts/annotations/draggable/
|
584
|
+
* Annotations draggable: 'xy'
|
585
|
+
*/
|
586
|
+
draggable: 'xy',
|
587
|
+
|
588
|
+
/**
|
589
|
+
* Options for annotation's labels. Each label inherits options
|
590
|
+
* from the labelOptions object. An option from the labelOptions can be
|
591
|
+
* overwritten by config for a specific label.
|
592
|
+
*/
|
593
|
+
labelOptions: {
|
594
|
+
|
595
|
+
/**
|
596
|
+
* The alignment of the annotation's label. If right,
|
597
|
+
* the right side of the label should be touching the point.
|
598
|
+
*
|
599
|
+
* @sample highcharts/annotations/label-position/
|
600
|
+
* Set labels position
|
601
|
+
*
|
602
|
+
* @type {Highcharts.AlignType}
|
603
|
+
*/
|
604
|
+
align: 'center',
|
605
|
+
|
606
|
+
/**
|
607
|
+
* Whether to allow the annotation's labels to overlap.
|
608
|
+
* To make the labels less sensitive for overlapping,
|
609
|
+
* the can be set to 0.
|
610
|
+
*
|
611
|
+
* @sample highcharts/annotations/tooltip-like/
|
612
|
+
* Hide overlapping labels
|
613
|
+
*/
|
614
|
+
allowOverlap: false,
|
615
|
+
|
616
|
+
/**
|
617
|
+
* The background color or gradient for the annotation's label.
|
618
|
+
*
|
619
|
+
* @sample highcharts/annotations/label-presentation/
|
620
|
+
* Set labels graphic options
|
621
|
+
*
|
622
|
+
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
623
|
+
*/
|
624
|
+
backgroundColor: 'rgba(0, 0, 0, 0.75)',
|
625
|
+
|
626
|
+
/**
|
627
|
+
* The border color for the annotation's label.
|
628
|
+
*
|
629
|
+
* @sample highcharts/annotations/label-presentation/
|
630
|
+
* Set labels graphic options
|
631
|
+
*
|
632
|
+
* @type {Highcharts.ColorString}
|
633
|
+
*/
|
634
|
+
borderColor: 'black',
|
635
|
+
|
636
|
+
/**
|
637
|
+
* The border radius in pixels for the annotaiton's label.
|
638
|
+
*
|
639
|
+
* @sample highcharts/annotations/label-presentation/
|
640
|
+
* Set labels graphic options
|
641
|
+
*/
|
642
|
+
borderRadius: 3,
|
643
|
+
|
644
|
+
/**
|
645
|
+
* The border width in pixels for the annotation's label
|
646
|
+
*
|
647
|
+
* @sample highcharts/annotations/label-presentation/
|
648
|
+
* Set labels graphic options
|
649
|
+
*/
|
650
|
+
borderWidth: 1,
|
651
|
+
|
652
|
+
/**
|
653
|
+
* A class name for styling by CSS.
|
654
|
+
*
|
655
|
+
* @sample highcharts/css/annotations
|
656
|
+
* Styled mode annotations
|
657
|
+
*
|
658
|
+
* @since 6.0.5
|
659
|
+
*/
|
660
|
+
className: '',
|
661
|
+
|
662
|
+
/**
|
663
|
+
* Whether to hide the annotation's label that is outside the plot
|
664
|
+
* area.
|
665
|
+
*
|
666
|
+
* @sample highcharts/annotations/label-crop-overflow/
|
667
|
+
* Crop or justify labels
|
668
|
+
*/
|
669
|
+
crop: false,
|
670
|
+
|
671
|
+
/**
|
672
|
+
* The label's pixel distance from the point.
|
673
|
+
*
|
674
|
+
* @sample highcharts/annotations/label-position/
|
675
|
+
* Set labels position
|
676
|
+
*
|
677
|
+
* @type {number}
|
678
|
+
* @apioption annotations.labelOptions.distance
|
679
|
+
*/
|
680
|
+
|
681
|
+
/**
|
682
|
+
* A
|
683
|
+
* [format](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)
|
684
|
+
* string for the data label.
|
685
|
+
*
|
686
|
+
* @see [plotOptions.series.dataLabels.format](plotOptions.series.dataLabels.format.html)
|
687
|
+
*
|
688
|
+
* @sample highcharts/annotations/label-text/
|
689
|
+
* Set labels text
|
690
|
+
*
|
691
|
+
* @type {string}
|
692
|
+
* @apioption annotations.labelOptions.format
|
693
|
+
*/
|
694
|
+
|
695
|
+
/**
|
696
|
+
* Alias for the format option.
|
697
|
+
*
|
698
|
+
* @see [format](annotations.labelOptions.format.html)
|
699
|
+
*
|
700
|
+
* @sample highcharts/annotations/label-text/
|
701
|
+
* Set labels text
|
702
|
+
*
|
703
|
+
* @type {string}
|
704
|
+
* @apioption annotations.labelOptions.text
|
705
|
+
*/
|
706
|
+
|
707
|
+
/**
|
708
|
+
* Callback JavaScript function to format the annotation's label.
|
709
|
+
* Note that if a `format` or `text` are defined, the format or text
|
710
|
+
* take precedence and the formatter is ignored. `This` refers to a
|
711
|
+
* point object.
|
712
|
+
*
|
713
|
+
* @sample highcharts/annotations/label-text/
|
714
|
+
* Set labels text
|
715
|
+
*
|
716
|
+
* @type {Highcharts.FormatterCallbackFunction<Highcharts.Point>}
|
717
|
+
* @default function () { return defined(this.y) ? this.y : 'Annotation label'; }
|
718
|
+
*/
|
719
|
+
formatter: function () {
|
720
|
+
return defined(this.y) ? this.y : 'Annotation label';
|
721
|
+
},
|
722
|
+
|
723
|
+
/**
|
724
|
+
* How to handle the annotation's label that flow outside the plot
|
725
|
+
* area. The justify option aligns the label inside the plot area.
|
726
|
+
*
|
727
|
+
* @sample highcharts/annotations/label-crop-overflow/
|
728
|
+
* Crop or justify labels
|
729
|
+
*
|
730
|
+
* @validvalue ["allow", "justify"]
|
731
|
+
*/
|
732
|
+
overflow: 'justify',
|
733
|
+
|
734
|
+
/**
|
735
|
+
* When either the borderWidth or the backgroundColor is set,
|
736
|
+
* this is the padding within the box.
|
737
|
+
*
|
738
|
+
* @sample highcharts/annotations/label-presentation/
|
739
|
+
* Set labels graphic options
|
740
|
+
*/
|
741
|
+
padding: 5,
|
742
|
+
|
743
|
+
/**
|
744
|
+
* The shadow of the box. The shadow can be an object configuration
|
745
|
+
* containing `color`, `offsetX`, `offsetY`, `opacity` and `width`.
|
746
|
+
*
|
747
|
+
* @sample highcharts/annotations/label-presentation/
|
748
|
+
* Set labels graphic options
|
749
|
+
*
|
750
|
+
* @type {boolean|Highcharts.ShadowOptionsObject}
|
751
|
+
*/
|
752
|
+
shadow: false,
|
753
|
+
|
754
|
+
/**
|
755
|
+
* The name of a symbol to use for the border around the label.
|
756
|
+
* Symbols are predefined functions on the Renderer object.
|
757
|
+
*
|
758
|
+
* @sample highcharts/annotations/shapes/
|
759
|
+
* Available shapes for labels
|
760
|
+
*
|
761
|
+
* @type {string}
|
762
|
+
*/
|
763
|
+
shape: 'callout',
|
764
|
+
|
765
|
+
/**
|
766
|
+
* Styles for the annotation's label.
|
767
|
+
*
|
768
|
+
* @see [plotOptions.series.dataLabels.style](plotOptions.series.dataLabels.style.html)
|
769
|
+
*
|
770
|
+
* @sample highcharts/annotations/label-presentation/
|
771
|
+
* Set labels graphic options
|
772
|
+
*
|
773
|
+
* @type {Highcharts.CSSObject}
|
774
|
+
*/
|
775
|
+
style: {
|
776
|
+
/** @ignore */
|
777
|
+
fontSize: '11px',
|
778
|
+
/** @ignore */
|
779
|
+
fontWeight: 'normal',
|
780
|
+
/** @ignore */
|
781
|
+
color: 'contrast'
|
782
|
+
},
|
783
|
+
|
784
|
+
/**
|
785
|
+
* Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)
|
786
|
+
* to render the annotation's label.
|
787
|
+
*/
|
788
|
+
useHTML: false,
|
789
|
+
|
790
|
+
/**
|
791
|
+
* The vertical alignment of the annotation's label.
|
792
|
+
*
|
793
|
+
* @sample highcharts/annotations/label-position/
|
794
|
+
* Set labels position
|
795
|
+
*
|
796
|
+
* @type {Highcharts.VerticalAlignType}
|
797
|
+
*/
|
798
|
+
verticalAlign: 'bottom',
|
799
|
+
|
800
|
+
/**
|
801
|
+
* The x position offset of the label relative to the point.
|
802
|
+
* Note that if a `distance` is defined, the distance takes
|
803
|
+
* precedence over `x` and `y` options.
|
804
|
+
*
|
805
|
+
* @sample highcharts/annotations/label-position/
|
806
|
+
* Set labels position
|
807
|
+
*/
|
808
|
+
x: 0,
|
809
|
+
|
810
|
+
/**
|
811
|
+
* The y position offset of the label relative to the point.
|
812
|
+
* Note that if a `distance` is defined, the distance takes
|
813
|
+
* precedence over `x` and `y` options.
|
814
|
+
*
|
815
|
+
* @sample highcharts/annotations/label-position/
|
816
|
+
* Set labels position
|
817
|
+
*/
|
818
|
+
y: -16
|
819
|
+
},
|
820
|
+
|
821
|
+
/**
|
822
|
+
* An array of labels for the annotation. For options that apply to
|
823
|
+
* multiple labels, they can be added to the
|
824
|
+
* [labelOptions](annotations.labelOptions.html).
|
825
|
+
*
|
826
|
+
* @type {Array<*>}
|
827
|
+
* @extends annotations.labelOptions
|
828
|
+
* @apioption annotations.labels
|
829
|
+
*/
|
830
|
+
|
831
|
+
/**
|
832
|
+
* This option defines the point to which the label will be connected.
|
833
|
+
* It can be either the point which exists in the series - it is
|
834
|
+
* referenced by the point's id - or a new point with defined x, y
|
835
|
+
* properies and optionally axes.
|
836
|
+
*
|
837
|
+
* @sample highcharts/annotations/mock-point/
|
838
|
+
* Attach annotation to a mock point
|
839
|
+
*
|
840
|
+
* @type {string|*}
|
841
|
+
* @apioption annotations.labels.point
|
842
|
+
*/
|
843
|
+
|
844
|
+
/**
|
845
|
+
* The x position of the point. Units can be either in axis
|
846
|
+
* or chart pixel coordinates.
|
847
|
+
*
|
848
|
+
* @type {number}
|
849
|
+
* @apioption annotations.labels.point.x
|
850
|
+
*/
|
851
|
+
|
852
|
+
/**
|
853
|
+
* The y position of the point. Units can be either in axis
|
854
|
+
* or chart pixel coordinates.
|
855
|
+
*
|
856
|
+
* @type {number}
|
857
|
+
* @apioption annotations.labels.point.y
|
858
|
+
*/
|
859
|
+
|
860
|
+
/**
|
861
|
+
* This number defines which xAxis the point is connected to. It refers
|
862
|
+
* to either the axis id or the index of the axis in the xAxis array.
|
863
|
+
* If the option is not configured or the axis is not found the point's
|
864
|
+
* x coordinate refers to the chart pixels.
|
865
|
+
*
|
866
|
+
* @type {number|string}
|
867
|
+
* @apioption annotations.labels.point.xAxis
|
868
|
+
*/
|
869
|
+
|
870
|
+
/**
|
871
|
+
* This number defines which yAxis the point is connected to. It refers
|
872
|
+
* to either the axis id or the index of the axis in the yAxis array.
|
873
|
+
* If the option is not configured or the axis is not found the point's
|
874
|
+
* y coordinate refers to the chart pixels.
|
875
|
+
*
|
876
|
+
* @type {number|string}
|
877
|
+
* @apioption annotations.labels.point.yAxis
|
878
|
+
*/
|
879
|
+
|
880
|
+
|
881
|
+
/**
|
882
|
+
* An array of shapes for the annotation. For options that apply to
|
883
|
+
* multiple shapes, then can be added to the
|
884
|
+
* [shapeOptions](annotations.shapeOptions.html).
|
885
|
+
*
|
886
|
+
* @type {Array<*>}
|
887
|
+
* @extends annotations.shapeOptions
|
888
|
+
* @apioption annotations.shapes
|
889
|
+
*/
|
890
|
+
|
891
|
+
/**
|
892
|
+
* This option defines the point to which the shape will be connected.
|
893
|
+
* It can be either the point which exists in the series - it is
|
894
|
+
* referenced by the point's id - or a new point with defined x, y
|
895
|
+
* properties and optionally axes.
|
896
|
+
*
|
897
|
+
* @extends annotations.labels.point
|
898
|
+
* @apioption annotations.shapes.point
|
899
|
+
*/
|
900
|
+
|
901
|
+
/**
|
902
|
+
* An array of points for the shape. This option is available for shapes
|
903
|
+
* which can use multiple points such as path. A point can be either
|
904
|
+
* a point object or a point's id.
|
905
|
+
*
|
906
|
+
* @see [annotations.shapes.point](annotations.shapes.point.html)
|
907
|
+
*
|
908
|
+
* @type {Array<*>}
|
909
|
+
* @extends annotations.labels.point
|
910
|
+
* @apioption annotations.shapes.points
|
911
|
+
*/
|
912
|
+
|
913
|
+
/**
|
914
|
+
* Id of the marker which will be drawn at the final vertex of the path.
|
915
|
+
* Custom markers can be defined in defs property.
|
916
|
+
*
|
917
|
+
* @see [defs.markers](defs.markers.html)
|
918
|
+
*
|
919
|
+
* @sample highcharts/annotations/custom-markers/
|
920
|
+
* Define a custom marker for annotations
|
921
|
+
*
|
922
|
+
* @type {string}
|
923
|
+
* @apioption annotations.shapes.markerEnd
|
924
|
+
*/
|
925
|
+
|
926
|
+
/**
|
927
|
+
* Id of the marker which will be drawn at the first vertex of the path.
|
928
|
+
* Custom markers can be defined in defs property.
|
929
|
+
*
|
930
|
+
* @see [defs.markers](defs.markers.html)
|
931
|
+
*
|
932
|
+
* @sample {highcharts} highcharts/annotations/custom-markers/
|
933
|
+
* Define a custom marker for annotations
|
934
|
+
*
|
935
|
+
* @type {string}
|
936
|
+
* @apioption annotations.shapes.markerStart
|
937
|
+
*/
|
938
|
+
|
939
|
+
|
940
|
+
/**
|
941
|
+
* Options for annotation's shapes. Each shape inherits options
|
942
|
+
* from the shapeOptions object. An option from the shapeOptions can be
|
943
|
+
* overwritten by config for a specific shape.
|
944
|
+
*/
|
945
|
+
shapeOptions: {
|
946
|
+
|
947
|
+
/**
|
948
|
+
* The width of the shape.
|
949
|
+
*
|
950
|
+
* @sample highcharts/annotations/shape/
|
951
|
+
* Basic shape annotation
|
952
|
+
*
|
953
|
+
* @type {number}
|
954
|
+
* @apioption annotations.shapeOptions.width
|
955
|
+
**/
|
956
|
+
|
957
|
+
/**
|
958
|
+
* The height of the shape.
|
959
|
+
*
|
960
|
+
* @sample highcharts/annotations/shape/
|
961
|
+
* Basic shape annotation
|
962
|
+
*
|
963
|
+
* @type {number}
|
964
|
+
* @apioption annotations.shapeOptions.height
|
965
|
+
*/
|
966
|
+
|
967
|
+
/**
|
968
|
+
* The color of the shape's stroke.
|
969
|
+
*
|
970
|
+
* @sample highcharts/annotations/shape/
|
971
|
+
* Basic shape annotation
|
972
|
+
*
|
973
|
+
* @type {Highcharts.ColorString}
|
974
|
+
*/
|
975
|
+
stroke: 'rgba(0, 0, 0, 0.75)',
|
976
|
+
|
977
|
+
/**
|
978
|
+
* The pixel stroke width of the shape.
|
979
|
+
*
|
980
|
+
* @sample highcharts/annotations/shape/
|
981
|
+
* Basic shape annotation
|
982
|
+
*/
|
983
|
+
strokeWidth: 1,
|
984
|
+
|
985
|
+
/**
|
986
|
+
* The color of the shape's fill.
|
987
|
+
*
|
988
|
+
* @sample highcharts/annotations/shape/
|
989
|
+
* Basic shape annotation
|
990
|
+
*
|
991
|
+
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
992
|
+
*/
|
993
|
+
fill: 'rgba(0, 0, 0, 0.75)',
|
994
|
+
|
995
|
+
/**
|
996
|
+
* The type of the shape, e.g. circle or rectangle.
|
997
|
+
*
|
998
|
+
* @sample highcharts/annotations/shape/
|
999
|
+
* Basic shape annotation
|
1000
|
+
*
|
1001
|
+
* @type {string}
|
1002
|
+
* @default 'rect'
|
1003
|
+
* @apioption annotations.shapeOptions.type
|
1004
|
+
*/
|
1005
|
+
|
1006
|
+
/**
|
1007
|
+
* The radius of the shape.
|
1008
|
+
*
|
1009
|
+
* @sample highcharts/annotations/shape/
|
1010
|
+
* Basic shape annotation
|
1011
|
+
*/
|
1012
|
+
r: 0
|
1013
|
+
},
|
1014
|
+
|
1015
|
+
/**
|
1016
|
+
* The Z index of the annotation.
|
1017
|
+
*/
|
1018
|
+
zIndex: 6
|
1019
|
+
},
|
1020
|
+
|
1021
|
+
/**
|
1022
|
+
* Initialize the annotation.
|
1023
|
+
*
|
1024
|
+
* @function Highcharts.Annotation#init
|
1025
|
+
*/
|
1026
|
+
init: function () {
|
1027
|
+
var anno = this;
|
1028
|
+
|
1029
|
+
(this.options.labels || []).forEach(this.initLabel, this);
|
1030
|
+
(this.options.shapes || []).forEach(this.initShape, this);
|
1031
|
+
|
1032
|
+
this.labelCollector = function () {
|
1033
|
+
return anno.labels.filter(function (label) {
|
1034
|
+
return !label.options.allowOverlap;
|
1035
|
+
});
|
1036
|
+
};
|
1037
|
+
|
1038
|
+
this.chart.labelCollectors.push(this.labelCollector);
|
1039
|
+
},
|
1040
|
+
|
1041
|
+
/**
|
1042
|
+
* Main method for drawing an annotation.
|
1043
|
+
*
|
1044
|
+
* @function Highcharts.Annotation#redraw
|
1045
|
+
*/
|
1046
|
+
redraw: function () {
|
1047
|
+
if (!this.group) {
|
1048
|
+
this.render();
|
1049
|
+
}
|
1050
|
+
|
1051
|
+
this.redrawItems(this.shapes);
|
1052
|
+
this.redrawItems(this.labels);
|
1053
|
+
},
|
1054
|
+
|
1055
|
+
/**
|
1056
|
+
* @private
|
1057
|
+
* @function Highcharts.Annotation#redrawItems
|
1058
|
+
*
|
1059
|
+
* @param {Array<Highcharts.SVGElement>} items
|
1060
|
+
*/
|
1061
|
+
redrawItems: function (items) {
|
1062
|
+
var i = items.length;
|
1063
|
+
|
1064
|
+
// needs a backward loop
|
1065
|
+
// labels/shapes array might be modified due to destruction of the item
|
1066
|
+
while (i--) {
|
1067
|
+
this.redrawItem(items[i]);
|
1068
|
+
}
|
1069
|
+
},
|
1070
|
+
|
1071
|
+
/**
|
1072
|
+
* Render the annotation.
|
1073
|
+
*
|
1074
|
+
* @function Highcharts.Annotation#render
|
1075
|
+
*/
|
1076
|
+
render: function () {
|
1077
|
+
var renderer = this.chart.renderer;
|
1078
|
+
|
1079
|
+
var group = this.group = renderer.g('annotation')
|
1080
|
+
.attr({
|
1081
|
+
zIndex: this.options.zIndex,
|
1082
|
+
visibility: this.options.visible ? 'visible' : 'hidden'
|
1083
|
+
})
|
1084
|
+
.add();
|
1085
|
+
|
1086
|
+
this.shapesGroup = renderer.g('annotation-shapes').add(group);
|
1087
|
+
|
1088
|
+
this.labelsGroup = renderer.g('annotation-labels').attr({
|
1089
|
+
// hideOverlappingLabels requires translation
|
1090
|
+
translateX: 0,
|
1091
|
+
translateY: 0
|
1092
|
+
}).add(group);
|
1093
|
+
|
1094
|
+
this.shapesGroup.clip(this.chart.plotBoxClip);
|
1095
|
+
},
|
1096
|
+
|
1097
|
+
/**
|
1098
|
+
* Set the annotation's visibility.
|
1099
|
+
*
|
1100
|
+
* @function Highcharts.Annotation#setVisible
|
1101
|
+
*
|
1102
|
+
* @param {boolean} [visibility]
|
1103
|
+
* Whether to show or hide an annotation. If the param is omitted,
|
1104
|
+
* the annotation's visibility is toggled.
|
1105
|
+
*/
|
1106
|
+
setVisible: function (visibility) {
|
1107
|
+
var options = this.options,
|
1108
|
+
visible = pick(visibility, !options.visible);
|
1109
|
+
|
1110
|
+
this.group.attr({
|
1111
|
+
visibility: visible ? 'visible' : 'hidden'
|
1112
|
+
});
|
1113
|
+
|
1114
|
+
options.visible = visible;
|
1115
|
+
},
|
1116
|
+
|
1117
|
+
|
1118
|
+
/**
|
1119
|
+
* Destroy the annotation. This function does not touch the chart
|
1120
|
+
* that the annotation belongs to (all annotations are kept in
|
1121
|
+
* the chart.annotations array) - it is recommended to use
|
1122
|
+
* {@link Highcharts.Chart#removeAnnotation} instead.
|
1123
|
+
*
|
1124
|
+
* @function Highcharts.Annotation#destroy
|
1125
|
+
*/
|
1126
|
+
destroy: function () {
|
1127
|
+
var chart = this.chart,
|
1128
|
+
destroyItem = function (item) {
|
1129
|
+
item.destroy();
|
1130
|
+
};
|
1131
|
+
|
1132
|
+
erase(this.chart.labelCollectors, this.labelCollector);
|
1133
|
+
|
1134
|
+
this.labels.forEach(destroyItem);
|
1135
|
+
this.shapes.forEach(destroyItem);
|
1136
|
+
|
1137
|
+
destroyObjectProperties(this, chart);
|
1138
|
+
},
|
1139
|
+
|
1140
|
+
|
1141
|
+
/* ********************************************************************** *
|
1142
|
+
*
|
1143
|
+
* ITEM SECTION
|
1144
|
+
* Contains methods for handling a single item in an annotation
|
1145
|
+
*
|
1146
|
+
* ********************************************************************** */
|
1147
|
+
|
1148
|
+
/**
|
1149
|
+
* Initialisation of a single shape
|
1150
|
+
*
|
1151
|
+
* @private
|
1152
|
+
* @function Highcharts.Annotation#initShape
|
1153
|
+
*
|
1154
|
+
* @param {Highcharts.AnnotationsShapesOptions} shapeOptions
|
1155
|
+
* A confg object for a single shape
|
1156
|
+
*/
|
1157
|
+
initShape: function (shapeOptions) {
|
1158
|
+
var renderer = this.chart.renderer,
|
1159
|
+
options = merge(this.options.shapeOptions, shapeOptions),
|
1160
|
+
attr = this.attrsFromOptions(options),
|
1161
|
+
|
1162
|
+
type = renderer[options.type] ? options.type : 'rect',
|
1163
|
+
shape = renderer[type](0, -9e9, 0, 0);
|
1164
|
+
|
1165
|
+
shape.points = [];
|
1166
|
+
shape.type = type;
|
1167
|
+
shape.options = options;
|
1168
|
+
shape.itemType = 'shape';
|
1169
|
+
|
1170
|
+
if (type === 'path') {
|
1171
|
+
extend(shape, {
|
1172
|
+
markerStartSetter: MarkerMixin.markerStartSetter,
|
1173
|
+
markerEndSetter: MarkerMixin.markerEndSetter,
|
1174
|
+
markerStart: MarkerMixin.markerStart,
|
1175
|
+
markerEnd: MarkerMixin.markerEnd
|
1176
|
+
});
|
1177
|
+
}
|
1178
|
+
|
1179
|
+
shape.attr(attr);
|
1180
|
+
|
1181
|
+
|
1182
|
+
if (options.className) {
|
1183
|
+
shape.addClass(options.className);
|
1184
|
+
}
|
1185
|
+
|
1186
|
+
this.shapes.push(shape);
|
1187
|
+
},
|
1188
|
+
|
1189
|
+
/**
|
1190
|
+
* Initialisation of a single label
|
1191
|
+
*
|
1192
|
+
* @private
|
1193
|
+
* @function Highcharts.Annotation#initLabel
|
1194
|
+
*
|
1195
|
+
* @param {Highcharts.AnnotationsLabelsOptions} labelOptions
|
1196
|
+
*/
|
1197
|
+
initLabel: function (labelOptions) {
|
1198
|
+
var options = merge(this.options.labelOptions, labelOptions),
|
1199
|
+
attr = this.attrsFromOptions(options),
|
1200
|
+
|
1201
|
+
label = this.chart.renderer.label(
|
1202
|
+
'',
|
1203
|
+
0, -9e9,
|
1204
|
+
options.shape,
|
1205
|
+
null,
|
1206
|
+
null,
|
1207
|
+
options.useHTML,
|
1208
|
+
null,
|
1209
|
+
'annotation-label'
|
1210
|
+
);
|
1211
|
+
|
1212
|
+
label.points = [];
|
1213
|
+
label.options = options;
|
1214
|
+
label.itemType = 'label';
|
1215
|
+
|
1216
|
+
// Labelrank required for hideOverlappingLabels()
|
1217
|
+
label.labelrank = options.labelrank;
|
1218
|
+
label.annotation = this;
|
1219
|
+
|
1220
|
+
label.attr(attr);
|
1221
|
+
|
1222
|
+
if (!this.chart.styledMode) {
|
1223
|
+
var style = options.style;
|
1224
|
+
|
1225
|
+
if (style.color === 'contrast') {
|
1226
|
+
style.color = this.chart.renderer.getContrast(
|
1227
|
+
this.shapesWithoutBackground.indexOf(options.shape) > -1 ?
|
1228
|
+
'#FFFFFF' :
|
1229
|
+
options.backgroundColor
|
1230
|
+
);
|
1231
|
+
}
|
1232
|
+
label.css(style).shadow(options.shadow);
|
1233
|
+
}
|
1234
|
+
|
1235
|
+
if (options.className) {
|
1236
|
+
label.addClass(options.className);
|
1237
|
+
}
|
1238
|
+
|
1239
|
+
|
1240
|
+
this.labels.push(label);
|
1241
|
+
},
|
1242
|
+
|
1243
|
+
/**
|
1244
|
+
* Redrawing a single item
|
1245
|
+
*
|
1246
|
+
* @private
|
1247
|
+
* @function Highcharts.Annotation#redrawItem
|
1248
|
+
*
|
1249
|
+
* @param {Highcharts.SVGElement} item
|
1250
|
+
*/
|
1251
|
+
redrawItem: function (item) {
|
1252
|
+
var points = this.linkPoints(item),
|
1253
|
+
itemOptions = item.options,
|
1254
|
+
text,
|
1255
|
+
time = this.chart.time,
|
1256
|
+
hasVisiblePoints = false;
|
1257
|
+
|
1258
|
+
if (!points.length) {
|
1259
|
+
this.destroyItem(item);
|
1260
|
+
|
1261
|
+
} else {
|
1262
|
+
if (!item.parentGroup) {
|
1263
|
+
this.renderItem(item);
|
1264
|
+
}
|
1265
|
+
|
1266
|
+
if (item.itemType === 'label') {
|
1267
|
+
text = itemOptions.format || itemOptions.text;
|
1268
|
+
item.attr({
|
1269
|
+
text: text ?
|
1270
|
+
format(text, points[0].getLabelConfig(), time) :
|
1271
|
+
itemOptions.formatter.call(points[0])
|
1272
|
+
});
|
1273
|
+
}
|
1274
|
+
|
1275
|
+
// Hide or show annotaiton attached to points (#9481)
|
1276
|
+
points.forEach(function (point) {
|
1277
|
+
if (
|
1278
|
+
point.series.visible !== false &&
|
1279
|
+
point.visible !== false
|
1280
|
+
) {
|
1281
|
+
hasVisiblePoints = true;
|
1282
|
+
}
|
1283
|
+
});
|
1284
|
+
|
1285
|
+
if (!hasVisiblePoints) {
|
1286
|
+
item.hide();
|
1287
|
+
|
1288
|
+
} else if (item.visibility === 'hidden') {
|
1289
|
+
item.show();
|
1290
|
+
}
|
1291
|
+
|
1292
|
+
|
1293
|
+
if (item.type === 'path') {
|
1294
|
+
this.redrawPath(item);
|
1295
|
+
|
1296
|
+
} else {
|
1297
|
+
this.alignItem(item, !item.placed);
|
1298
|
+
}
|
1299
|
+
}
|
1300
|
+
},
|
1301
|
+
|
1302
|
+
/**
|
1303
|
+
* Destroing a single item
|
1304
|
+
*
|
1305
|
+
* @private
|
1306
|
+
* @function Highcharts.Annotation#destroyItem
|
1307
|
+
*
|
1308
|
+
* @param {Highcharts.SVGElement} item
|
1309
|
+
*/
|
1310
|
+
destroyItem: function (item) {
|
1311
|
+
// erase from shapes or labels array
|
1312
|
+
erase(this[item.itemType + 's'], item);
|
1313
|
+
item.destroy();
|
1314
|
+
},
|
1315
|
+
|
1316
|
+
/**
|
1317
|
+
* Returns a point object
|
1318
|
+
*
|
1319
|
+
* @private
|
1320
|
+
* @function Highcharts.Annotation#pointItem
|
1321
|
+
*
|
1322
|
+
* @param {object} pointOptions
|
1323
|
+
*
|
1324
|
+
* @param {Highcharts.MockPoint|Highcharts.Point} point
|
1325
|
+
*
|
1326
|
+
* @return {Highcharts.MockPoint|Highcharts.Point|null}
|
1327
|
+
* If the point is found/exists returns this point, otherwise null
|
1328
|
+
*/
|
1329
|
+
pointItem: function (pointOptions, point) {
|
1330
|
+
if (!point || point.series === null) {
|
1331
|
+
if (isObject(pointOptions)) {
|
1332
|
+
point = mockPoint(this.chart, pointOptions);
|
1333
|
+
|
1334
|
+
} else if (isString(pointOptions)) {
|
1335
|
+
point = this.chart.get(pointOptions) || null;
|
1336
|
+
}
|
1337
|
+
}
|
1338
|
+
|
1339
|
+
return point;
|
1340
|
+
},
|
1341
|
+
|
1342
|
+
/**
|
1343
|
+
* Linking item with the point or points and returning an array of linked
|
1344
|
+
* points.
|
1345
|
+
*
|
1346
|
+
* @private
|
1347
|
+
* @function Highcharts.Annotation#linkPoints
|
1348
|
+
*
|
1349
|
+
* @param {Highcharts.SVGElement} item
|
1350
|
+
*
|
1351
|
+
* @return {Highcharts.MockPoint|Highcharts.Point|Array<Highcharts.MockPoint|Highcharts.Point>}
|
1352
|
+
*/
|
1353
|
+
linkPoints: function (item) {
|
1354
|
+
var pointsOptions = (
|
1355
|
+
item.options.points ||
|
1356
|
+
(item.options.point && H.splat(item.options.point))
|
1357
|
+
),
|
1358
|
+
points = item.points,
|
1359
|
+
len = pointsOptions && pointsOptions.length,
|
1360
|
+
i,
|
1361
|
+
point;
|
1362
|
+
|
1363
|
+
for (i = 0; i < len; i++) {
|
1364
|
+
point = this.pointItem(pointsOptions[i], points[i]);
|
1365
|
+
|
1366
|
+
if (!point) {
|
1367
|
+
return (item.points = []);
|
1368
|
+
}
|
1369
|
+
|
1370
|
+
points[i] = point;
|
1371
|
+
}
|
1372
|
+
|
1373
|
+
return points;
|
1374
|
+
},
|
1375
|
+
|
1376
|
+
/**
|
1377
|
+
* Aligning the item and setting its anchor
|
1378
|
+
*
|
1379
|
+
* @private
|
1380
|
+
* @function Highcharts.Annotation#alignItem
|
1381
|
+
*
|
1382
|
+
* @param {Highcharts.SVGElement} item
|
1383
|
+
*
|
1384
|
+
* @param {boolean} [isNew=false]
|
1385
|
+
* If the label is re-positioned (is not new) it is animated
|
1386
|
+
*/
|
1387
|
+
alignItem: function (item, isNew) {
|
1388
|
+
var anchor = this.itemAnchor(item, item.points[0]),
|
1389
|
+
attrs = this.itemPosition(item, anchor);
|
1390
|
+
|
1391
|
+
if (attrs) {
|
1392
|
+
item.alignAttr = attrs;
|
1393
|
+
item.placed = true;
|
1394
|
+
|
1395
|
+
attrs.anchorX = anchor.absolutePosition.x;
|
1396
|
+
attrs.anchorY = anchor.absolutePosition.y;
|
1397
|
+
|
1398
|
+
item[isNew ? 'attr' : 'animate'](attrs);
|
1399
|
+
|
1400
|
+
} else {
|
1401
|
+
item.placed = false;
|
1402
|
+
|
1403
|
+
item.attr({
|
1404
|
+
x: 0,
|
1405
|
+
y: -9e9
|
1406
|
+
});
|
1407
|
+
}
|
1408
|
+
},
|
1409
|
+
|
1410
|
+
redrawPath: function (pathItem, isNew) {
|
1411
|
+
var points = pathItem.points,
|
1412
|
+
strokeWidth = pathItem['stroke-width'] || 1,
|
1413
|
+
d = ['M'],
|
1414
|
+
pointIndex = 0,
|
1415
|
+
dIndex = 0,
|
1416
|
+
len = points && points.length,
|
1417
|
+
crispSegmentIndex,
|
1418
|
+
anchor,
|
1419
|
+
point,
|
1420
|
+
showPath;
|
1421
|
+
|
1422
|
+
if (len) {
|
1423
|
+
do {
|
1424
|
+
point = points[pointIndex];
|
1425
|
+
|
1426
|
+
anchor = this.itemAnchor(pathItem, point).absolutePosition;
|
1427
|
+
d[++dIndex] = anchor.x;
|
1428
|
+
d[++dIndex] = anchor.y;
|
1429
|
+
|
1430
|
+
// Crisping line, it might be replaced with
|
1431
|
+
// Renderer.prototype.crispLine but it requires creating many
|
1432
|
+
// temporary arrays
|
1433
|
+
crispSegmentIndex = dIndex % 5;
|
1434
|
+
if (crispSegmentIndex === 0) {
|
1435
|
+
if (d[crispSegmentIndex + 1] === d[crispSegmentIndex + 4]) {
|
1436
|
+
d[crispSegmentIndex + 1] = d[crispSegmentIndex + 4] =
|
1437
|
+
Math.round(d[crispSegmentIndex + 1]) -
|
1438
|
+
(strokeWidth % 2 / 2);
|
1439
|
+
}
|
1440
|
+
|
1441
|
+
if (d[crispSegmentIndex + 2] === d[crispSegmentIndex + 5]) {
|
1442
|
+
d[crispSegmentIndex + 2] = d[crispSegmentIndex + 5] =
|
1443
|
+
Math.round(d[crispSegmentIndex + 2]) +
|
1444
|
+
(strokeWidth % 2 / 2);
|
1445
|
+
}
|
1446
|
+
}
|
1447
|
+
|
1448
|
+
if (pointIndex < len - 1) {
|
1449
|
+
d[++dIndex] = 'L';
|
1450
|
+
}
|
1451
|
+
|
1452
|
+
showPath = point.series.visible;
|
1453
|
+
|
1454
|
+
} while (++pointIndex < len && showPath);
|
1455
|
+
}
|
1456
|
+
|
1457
|
+
|
1458
|
+
if (showPath) {
|
1459
|
+
pathItem[isNew ? 'attr' : 'animate']({
|
1460
|
+
d: d
|
1461
|
+
});
|
1462
|
+
|
1463
|
+
} else {
|
1464
|
+
pathItem.attr({
|
1465
|
+
d: 'M 0 ' + -9e9
|
1466
|
+
});
|
1467
|
+
}
|
1468
|
+
|
1469
|
+
pathItem.placed = showPath;
|
1470
|
+
},
|
1471
|
+
|
1472
|
+
renderItem: function (item) {
|
1473
|
+
item.add(
|
1474
|
+
item.itemType === 'label' ?
|
1475
|
+
this.labelsGroup :
|
1476
|
+
this.shapesGroup
|
1477
|
+
);
|
1478
|
+
|
1479
|
+
this.setItemMarkers(item);
|
1480
|
+
},
|
1481
|
+
|
1482
|
+
setItemMarkers: function (item) {
|
1483
|
+
var itemOptions = item.options,
|
1484
|
+
chart = this.chart,
|
1485
|
+
defs = chart.options.defs,
|
1486
|
+
fill = itemOptions.fill,
|
1487
|
+
color = defined(fill) && fill !== 'none' ?
|
1488
|
+
fill :
|
1489
|
+
itemOptions.stroke,
|
1490
|
+
|
1491
|
+
|
1492
|
+
setMarker = function (markerType) {
|
1493
|
+
var markerId = itemOptions[markerType],
|
1494
|
+
def,
|
1495
|
+
predefinedMarker,
|
1496
|
+
key,
|
1497
|
+
marker;
|
1498
|
+
|
1499
|
+
if (markerId) {
|
1500
|
+
for (key in defs) {
|
1501
|
+
def = defs[key];
|
1502
|
+
if (markerId === def.id && def.tagName === 'marker') {
|
1503
|
+
predefinedMarker = def;
|
1504
|
+
break;
|
1505
|
+
}
|
1506
|
+
}
|
1507
|
+
|
1508
|
+
if (predefinedMarker) {
|
1509
|
+
marker = item[markerType] = chart.renderer.addMarker(
|
1510
|
+
(itemOptions.id || uniqueKey()) + '-' +
|
1511
|
+
predefinedMarker.id,
|
1512
|
+
merge(predefinedMarker, { color: color })
|
1513
|
+
);
|
1514
|
+
|
1515
|
+
item.attr(markerType, marker.attr('id'));
|
1516
|
+
}
|
1517
|
+
}
|
1518
|
+
};
|
1519
|
+
|
1520
|
+
['markerStart', 'markerEnd'].forEach(setMarker);
|
1521
|
+
},
|
1522
|
+
|
1523
|
+
/**
|
1524
|
+
* Returns object which denotes anchor position - relative and absolute
|
1525
|
+
*
|
1526
|
+
* @private
|
1527
|
+
* @function Highcharts.Annotation#itemAnchor
|
1528
|
+
*
|
1529
|
+
* @param {Highcharts.SVGElement} item
|
1530
|
+
*
|
1531
|
+
* @param {Highcharts.MockPoint|Highcharts.Point} point
|
1532
|
+
*
|
1533
|
+
* @return {Highcharts.AnnotationAnchorObject}
|
1534
|
+
*/
|
1535
|
+
itemAnchor: function (item, point) {
|
1536
|
+
var plotBox = point.series.getPlotBox(),
|
1537
|
+
|
1538
|
+
box = point.mock ?
|
1539
|
+
point.alignToBox(true) :
|
1540
|
+
tooltipPrototype.getAnchor.call({
|
1541
|
+
chart: this.chart
|
1542
|
+
}, point),
|
1543
|
+
|
1544
|
+
anchor = {
|
1545
|
+
x: box[0],
|
1546
|
+
y: box[1],
|
1547
|
+
height: box[2] || 0,
|
1548
|
+
width: box[3] || 0
|
1549
|
+
};
|
1550
|
+
|
1551
|
+
return {
|
1552
|
+
relativePosition: anchor,
|
1553
|
+
absolutePosition: merge(anchor, {
|
1554
|
+
x: anchor.x + plotBox.translateX,
|
1555
|
+
y: anchor.y + plotBox.translateY
|
1556
|
+
})
|
1557
|
+
};
|
1558
|
+
},
|
1559
|
+
|
1560
|
+
/**
|
1561
|
+
* Returns the item position
|
1562
|
+
*
|
1563
|
+
* @private
|
1564
|
+
* @function Highcharts.Annotation#itemPosition
|
1565
|
+
*
|
1566
|
+
* @param {Highcharts.SVGElement} item
|
1567
|
+
*
|
1568
|
+
* @param {Highcharts.AnnotationAnchorObject} anchor
|
1569
|
+
*
|
1570
|
+
* @return {Highcharts.AnnotationAnchorPositionObject}
|
1571
|
+
*/
|
1572
|
+
itemPosition: function (item, anchor) {
|
1573
|
+
var chart = this.chart,
|
1574
|
+
point = item.points[0],
|
1575
|
+
itemOptions = item.options,
|
1576
|
+
anchorAbsolutePosition = anchor.absolutePosition,
|
1577
|
+
anchorRelativePosition = anchor.relativePosition,
|
1578
|
+
itemPosition,
|
1579
|
+
alignTo,
|
1580
|
+
itemPosRelativeX,
|
1581
|
+
itemPosRelativeY,
|
1582
|
+
|
1583
|
+
showItem =
|
1584
|
+
point.series.visible &&
|
1585
|
+
MockPoint.prototype.isInsidePane.call(point);
|
1586
|
+
|
1587
|
+
if (showItem) {
|
1588
|
+
|
1589
|
+
if (defined(itemOptions.distance) || itemOptions.positioner) {
|
1590
|
+
itemPosition = (
|
1591
|
+
itemOptions.positioner ||
|
1592
|
+
tooltipPrototype.getPosition
|
1593
|
+
).call(
|
1594
|
+
{
|
1595
|
+
chart: chart,
|
1596
|
+
distance: pick(itemOptions.distance, 16)
|
1597
|
+
},
|
1598
|
+
item.width,
|
1599
|
+
item.height,
|
1600
|
+
{
|
1601
|
+
plotX: anchorRelativePosition.x,
|
1602
|
+
plotY: anchorRelativePosition.y,
|
1603
|
+
negative: point.negative,
|
1604
|
+
ttBelow: point.ttBelow,
|
1605
|
+
h: anchorRelativePosition.height ||
|
1606
|
+
anchorRelativePosition.width
|
1607
|
+
}
|
1608
|
+
);
|
1609
|
+
|
1610
|
+
} else {
|
1611
|
+
alignTo = {
|
1612
|
+
x: anchorAbsolutePosition.x,
|
1613
|
+
y: anchorAbsolutePosition.y,
|
1614
|
+
width: 0,
|
1615
|
+
height: 0
|
1616
|
+
};
|
1617
|
+
|
1618
|
+
itemPosition = this.alignedPosition(
|
1619
|
+
extend(itemOptions, {
|
1620
|
+
width: item.width,
|
1621
|
+
height: item.height
|
1622
|
+
}),
|
1623
|
+
alignTo
|
1624
|
+
);
|
1625
|
+
|
1626
|
+
if (item.options.overflow === 'justify') {
|
1627
|
+
itemPosition = this.alignedPosition(
|
1628
|
+
this.justifiedOptions(item, itemOptions, itemPosition),
|
1629
|
+
alignTo
|
1630
|
+
);
|
1631
|
+
}
|
1632
|
+
}
|
1633
|
+
|
1634
|
+
|
1635
|
+
if (itemOptions.crop) {
|
1636
|
+
itemPosRelativeX = itemPosition.x - chart.plotLeft;
|
1637
|
+
itemPosRelativeY = itemPosition.y - chart.plotTop;
|
1638
|
+
|
1639
|
+
showItem =
|
1640
|
+
chart.isInsidePlot(itemPosRelativeX, itemPosRelativeY) &&
|
1641
|
+
chart.isInsidePlot(
|
1642
|
+
itemPosRelativeX + item.width,
|
1643
|
+
itemPosRelativeY + item.height
|
1644
|
+
);
|
1645
|
+
}
|
1646
|
+
}
|
1647
|
+
|
1648
|
+
return showItem ? itemPosition : null;
|
1649
|
+
},
|
1650
|
+
|
1651
|
+
/**
|
1652
|
+
* Returns new aligned position based alignment options and box to align to.
|
1653
|
+
* It is almost a one-to-one copy from SVGElement.prototype.align
|
1654
|
+
* except it does not use and mutate an element
|
1655
|
+
*
|
1656
|
+
* @private
|
1657
|
+
* @function Highcharts.Annotation#alignedPosition
|
1658
|
+
*
|
1659
|
+
* @param {Highcharts.AlignObject} alignOptions
|
1660
|
+
*
|
1661
|
+
* @param {Highcharts.BBoxObject} box
|
1662
|
+
*
|
1663
|
+
* @return {Highcharts.AlignObject}
|
1664
|
+
*/
|
1665
|
+
alignedPosition: function (alignOptions, box) {
|
1666
|
+
var align = alignOptions.align,
|
1667
|
+
vAlign = alignOptions.verticalAlign,
|
1668
|
+
x = (box.x || 0) + (alignOptions.x || 0),
|
1669
|
+
y = (box.y || 0) + (alignOptions.y || 0),
|
1670
|
+
|
1671
|
+
alignFactor,
|
1672
|
+
vAlignFactor;
|
1673
|
+
|
1674
|
+
if (align === 'right') {
|
1675
|
+
alignFactor = 1;
|
1676
|
+
} else if (align === 'center') {
|
1677
|
+
alignFactor = 2;
|
1678
|
+
}
|
1679
|
+
if (alignFactor) {
|
1680
|
+
x += (box.width - (alignOptions.width || 0)) / alignFactor;
|
1681
|
+
}
|
1682
|
+
|
1683
|
+
if (vAlign === 'bottom') {
|
1684
|
+
vAlignFactor = 1;
|
1685
|
+
} else if (vAlign === 'middle') {
|
1686
|
+
vAlignFactor = 2;
|
1687
|
+
}
|
1688
|
+
if (vAlignFactor) {
|
1689
|
+
y += (box.height - (alignOptions.height || 0)) / vAlignFactor;
|
1690
|
+
}
|
1691
|
+
|
1692
|
+
return {
|
1693
|
+
x: Math.round(x),
|
1694
|
+
y: Math.round(y)
|
1695
|
+
};
|
1696
|
+
},
|
1697
|
+
|
1698
|
+
/**
|
1699
|
+
* Returns new alignment options for a label if the label is outside the
|
1700
|
+
* plot area. It is almost a one-to-one copy from
|
1701
|
+
* Series.prototype.justifyDataLabel except it does not mutate the label and
|
1702
|
+
* it works with absolute instead of relative position.
|
1703
|
+
*
|
1704
|
+
* @private
|
1705
|
+
* @function Highcharts.Annotation#justifiedOptions
|
1706
|
+
*
|
1707
|
+
* @param {Highcharts.SVGElement} label
|
1708
|
+
*
|
1709
|
+
* @param {Highcharts.AlignObject} alignOptions
|
1710
|
+
*
|
1711
|
+
* @param {Highcharts.SVGAttributes} alignAttr
|
1712
|
+
*
|
1713
|
+
* @return {Highcharts.AlignObject}
|
1714
|
+
*/
|
1715
|
+
justifiedOptions: function (label, alignOptions, alignAttr) {
|
1716
|
+
var chart = this.chart,
|
1717
|
+
align = alignOptions.align,
|
1718
|
+
verticalAlign = alignOptions.verticalAlign,
|
1719
|
+
padding = label.box ? 0 : (label.padding || 0),
|
1720
|
+
bBox = label.getBBox(),
|
1721
|
+
off,
|
1722
|
+
|
1723
|
+
options = {
|
1724
|
+
align: align,
|
1725
|
+
verticalAlign: verticalAlign,
|
1726
|
+
x: alignOptions.x,
|
1727
|
+
y: alignOptions.y,
|
1728
|
+
width: label.width,
|
1729
|
+
height: label.height
|
1730
|
+
},
|
1731
|
+
|
1732
|
+
x = alignAttr.x - chart.plotLeft,
|
1733
|
+
y = alignAttr.y - chart.plotTop;
|
1734
|
+
|
1735
|
+
// Off left
|
1736
|
+
off = x + padding;
|
1737
|
+
if (off < 0) {
|
1738
|
+
if (align === 'right') {
|
1739
|
+
options.align = 'left';
|
1740
|
+
} else {
|
1741
|
+
options.x = -off;
|
1742
|
+
}
|
1743
|
+
}
|
1744
|
+
|
1745
|
+
// Off right
|
1746
|
+
off = x + bBox.width - padding;
|
1747
|
+
if (off > chart.plotWidth) {
|
1748
|
+
if (align === 'left') {
|
1749
|
+
options.align = 'right';
|
1750
|
+
} else {
|
1751
|
+
options.x = chart.plotWidth - off;
|
1752
|
+
}
|
1753
|
+
}
|
1754
|
+
|
1755
|
+
// Off top
|
1756
|
+
off = y + padding;
|
1757
|
+
if (off < 0) {
|
1758
|
+
if (verticalAlign === 'bottom') {
|
1759
|
+
options.verticalAlign = 'top';
|
1760
|
+
} else {
|
1761
|
+
options.y = -off;
|
1762
|
+
}
|
1763
|
+
}
|
1764
|
+
|
1765
|
+
// Off bottom
|
1766
|
+
off = y + bBox.height - padding;
|
1767
|
+
if (off > chart.plotHeight) {
|
1768
|
+
if (verticalAlign === 'top') {
|
1769
|
+
options.verticalAlign = 'bottom';
|
1770
|
+
} else {
|
1771
|
+
options.y = chart.plotHeight - off;
|
1772
|
+
}
|
1773
|
+
}
|
1774
|
+
|
1775
|
+
return options;
|
1776
|
+
},
|
1777
|
+
|
1778
|
+
|
1779
|
+
/**
|
1780
|
+
* Utility function for mapping item's options to element's attribute
|
1781
|
+
*
|
1782
|
+
* @private
|
1783
|
+
* @function Highcharts.Annotation#attrsFromOptions
|
1784
|
+
*
|
1785
|
+
* @param {object} options
|
1786
|
+
*
|
1787
|
+
* @return {object}
|
1788
|
+
* Mapped options
|
1789
|
+
*/
|
1790
|
+
attrsFromOptions: function (options) {
|
1791
|
+
var map = this.getAttrsMap(),
|
1792
|
+
attrs = {},
|
1793
|
+
key,
|
1794
|
+
mappedKey;
|
1795
|
+
|
1796
|
+
for (key in options) {
|
1797
|
+
mappedKey = map[key];
|
1798
|
+
if (mappedKey) {
|
1799
|
+
attrs[mappedKey] = options[key];
|
1800
|
+
}
|
1801
|
+
}
|
1802
|
+
|
1803
|
+
return attrs;
|
1804
|
+
}
|
1805
|
+
};
|
1806
|
+
|
1807
|
+
/* ************************************************************************** *
|
1808
|
+
*
|
1809
|
+
* EXTENDING CHART PROTOTYPE
|
1810
|
+
*
|
1811
|
+
* ************************************************************************** */
|
1812
|
+
|
1813
|
+
H.extend(chartPrototype, {
|
1814
|
+
/**
|
1815
|
+
* Add an annotation to the chart after render time.
|
1816
|
+
*
|
1817
|
+
* @function Highcharts.Chart#addAnnotation
|
1818
|
+
*
|
1819
|
+
* @param {Highcharts.AnnotationsOptions} options
|
1820
|
+
* The series options for the new, detailed series.
|
1821
|
+
*
|
1822
|
+
* @return {Highcharts.Annotation}
|
1823
|
+
* The newly generated annotation.
|
1824
|
+
*/
|
1825
|
+
addAnnotation: function (userOptions, redraw) {
|
1826
|
+
var annotation = new Annotation(this, userOptions);
|
1827
|
+
|
1828
|
+
this.annotations.push(annotation);
|
1829
|
+
this.options.annotations.push(userOptions);
|
1830
|
+
|
1831
|
+
if (pick(redraw, true)) {
|
1832
|
+
annotation.redraw();
|
1833
|
+
}
|
1834
|
+
|
1835
|
+
return annotation;
|
1836
|
+
},
|
1837
|
+
|
1838
|
+
/**
|
1839
|
+
* Remove an annotation from the chart.
|
1840
|
+
*
|
1841
|
+
* @function Highcharts.Chart#removeAnnotation
|
1842
|
+
*
|
1843
|
+
* @param {string} id
|
1844
|
+
* The annotation's id.
|
1845
|
+
*/
|
1846
|
+
removeAnnotation: function (id) {
|
1847
|
+
var annotations = this.annotations,
|
1848
|
+
annotation = find(annotations, function (annotation) {
|
1849
|
+
return annotation.options.id === id;
|
1850
|
+
});
|
1851
|
+
|
1852
|
+
if (annotation) {
|
1853
|
+
erase(this.options.annotations, annotation.userOptions);
|
1854
|
+
erase(annotations, annotation);
|
1855
|
+
annotation.destroy();
|
1856
|
+
}
|
1857
|
+
},
|
1858
|
+
|
1859
|
+
drawAnnotations: function () {
|
1860
|
+
var clip = this.plotBoxClip,
|
1861
|
+
plotBox = this.plotBox;
|
1862
|
+
|
1863
|
+
if (clip) {
|
1864
|
+
clip.attr(plotBox);
|
1865
|
+
} else {
|
1866
|
+
this.plotBoxClip = this.renderer.clipRect(plotBox);
|
1867
|
+
}
|
1868
|
+
|
1869
|
+
this.annotations.forEach(function (annotation) {
|
1870
|
+
annotation.redraw();
|
1871
|
+
});
|
1872
|
+
}
|
1873
|
+
});
|
1874
|
+
|
1875
|
+
|
1876
|
+
chartPrototype.callbacks.push(function (chart) {
|
1877
|
+
chart.annotations = [];
|
1878
|
+
|
1879
|
+
chart.options.annotations.forEach(function (annotationOptions) {
|
1880
|
+
chart.annotations.push(
|
1881
|
+
new Annotation(chart, annotationOptions)
|
1882
|
+
);
|
1883
|
+
});
|
1884
|
+
|
1885
|
+
chart.drawAnnotations();
|
1886
|
+
addEvent(chart, 'redraw', chart.drawAnnotations);
|
1887
|
+
addEvent(chart, 'destroy', function () {
|
1888
|
+
var plotBoxClip = chart.plotBoxClip;
|
1889
|
+
|
1890
|
+
if (plotBoxClip && plotBoxClip.destroy) {
|
1891
|
+
plotBoxClip.destroy();
|
1892
|
+
}
|
1893
|
+
});
|
1894
|
+
});
|
1895
|
+
|
1896
|
+
|
1897
|
+
addEvent(H.Chart, 'afterGetContainer', function () {
|
1898
|
+
this.options.defs = merge(defaultMarkers, this.options.defs || {});
|
1899
|
+
|
1900
|
+
if (!this.styledMode) {
|
1901
|
+
objectEach(this.options.defs, function (def) {
|
1902
|
+
if (def.tagName === 'marker' && def.render !== false) {
|
1903
|
+
this.renderer.addMarker(def.id, def);
|
1904
|
+
}
|
1905
|
+
}, this);
|
1906
|
+
}
|
1907
|
+
});
|
1908
|
+
|
1909
|
+
|
1910
|
+
/* ************************************************************************** */
|
1911
|
+
|
1912
|
+
// General symbol definition for labels with connector
|
1913
|
+
H.SVGRenderer.prototype.symbols.connector = function (x, y, w, h, options) {
|
1914
|
+
var anchorX = options && options.anchorX,
|
1915
|
+
anchorY = options && options.anchorY,
|
1916
|
+
path,
|
1917
|
+
yOffset,
|
1918
|
+
lateral = w / 2;
|
1919
|
+
|
1920
|
+
if (isNumber(anchorX) && isNumber(anchorY)) {
|
1921
|
+
|
1922
|
+
path = ['M', anchorX, anchorY];
|
1923
|
+
|
1924
|
+
// Prefer 45 deg connectors
|
1925
|
+
yOffset = y - anchorY;
|
1926
|
+
if (yOffset < 0) {
|
1927
|
+
yOffset = -h - yOffset;
|
1928
|
+
}
|
1929
|
+
if (yOffset < w) {
|
1930
|
+
lateral = anchorX < x + (w / 2) ? yOffset : w - yOffset;
|
1931
|
+
}
|
1932
|
+
|
1933
|
+
// Anchor below label
|
1934
|
+
if (anchorY > y + h) {
|
1935
|
+
path.push('L', x + lateral, y + h);
|
1936
|
+
|
1937
|
+
// Anchor above label
|
1938
|
+
} else if (anchorY < y) {
|
1939
|
+
path.push('L', x + lateral, y);
|
1940
|
+
|
1941
|
+
// Anchor left of label
|
1942
|
+
} else if (anchorX < x) {
|
1943
|
+
path.push('L', x, y + h / 2);
|
1944
|
+
|
1945
|
+
// Anchor right of label
|
1946
|
+
} else if (anchorX > x + w) {
|
1947
|
+
path.push('L', x + w, y + h / 2);
|
1948
|
+
}
|
1949
|
+
}
|
1950
|
+
return path || [];
|
1951
|
+
};
|