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,229 @@
|
|
1
|
+
/**
|
2
|
+
* @license @product.name@ JS v@product.version@ (@product.date@)
|
3
|
+
*
|
4
|
+
* (c) 2010-2017 Highsoft AS
|
5
|
+
* Author: Sebastian Domas
|
6
|
+
*
|
7
|
+
* License: www.highcharts.com/license
|
8
|
+
*/
|
9
|
+
|
10
|
+
'use strict';
|
11
|
+
import H from '../parts/Globals.js';
|
12
|
+
import derivedSeriesMixin from '../mixins/derived-series.js';
|
13
|
+
|
14
|
+
var objectEach = H.objectEach,
|
15
|
+
seriesType = H.seriesType,
|
16
|
+
correctFloat = H.correctFloat,
|
17
|
+
isNumber = H.isNumber,
|
18
|
+
arrayMax = H.arrayMax,
|
19
|
+
arrayMin = H.arrayMin,
|
20
|
+
merge = H.merge;
|
21
|
+
|
22
|
+
/* ***************************************************************************
|
23
|
+
*
|
24
|
+
* HISTOGRAM
|
25
|
+
*
|
26
|
+
**************************************************************************** */
|
27
|
+
|
28
|
+
/**
|
29
|
+
* A dictionary with formulas for calculating number of bins based on the
|
30
|
+
* base series
|
31
|
+
**/
|
32
|
+
var binsNumberFormulas = {
|
33
|
+
'square-root': function (baseSeries) {
|
34
|
+
return Math.round(Math.sqrt(baseSeries.options.data.length));
|
35
|
+
},
|
36
|
+
|
37
|
+
'sturges': function (baseSeries) {
|
38
|
+
return Math.ceil(Math.log(baseSeries.options.data.length) * Math.LOG2E);
|
39
|
+
},
|
40
|
+
|
41
|
+
'rice': function (baseSeries) {
|
42
|
+
return Math.ceil(2 * Math.pow(baseSeries.options.data.length, 1 / 3));
|
43
|
+
}
|
44
|
+
};
|
45
|
+
|
46
|
+
/**
|
47
|
+
* Returns a function for mapping number to the closed (right opened) bins
|
48
|
+
*
|
49
|
+
* @param {number} binWidth - width of the bin
|
50
|
+
* @returns {function}
|
51
|
+
**/
|
52
|
+
function fitToBinLeftClosed(bins) {
|
53
|
+
return function (y) {
|
54
|
+
var i = 1;
|
55
|
+
|
56
|
+
while (bins[i] <= y) {
|
57
|
+
i++;
|
58
|
+
}
|
59
|
+
return bins[--i];
|
60
|
+
};
|
61
|
+
}
|
62
|
+
|
63
|
+
/**
|
64
|
+
* Histogram class
|
65
|
+
*
|
66
|
+
* @constructor seriesTypes.histogram
|
67
|
+
* @augments seriesTypes.column
|
68
|
+
* @mixes DerivedSeriesMixin
|
69
|
+
**/
|
70
|
+
|
71
|
+
/**
|
72
|
+
* A histogram is a column series which represents the distribution of the data
|
73
|
+
* set in the base series. Histogram splits data into bins and shows their
|
74
|
+
* frequencies.
|
75
|
+
*
|
76
|
+
* @product highcharts
|
77
|
+
* @sample {highcharts} highcharts/demo/histogram/ Histogram
|
78
|
+
* @since 6.0.0
|
79
|
+
* @extends plotOptions.column
|
80
|
+
* @excluding boostThreshold, pointInterval, pointIntervalUnit, stacking
|
81
|
+
* @optionparent plotOptions.histogram
|
82
|
+
**/
|
83
|
+
seriesType('histogram', 'column', {
|
84
|
+
/**
|
85
|
+
* A preferable number of bins. It is a suggestion, so a histogram may have
|
86
|
+
* a different number of bins. By default it is set to the square root
|
87
|
+
* of the base series' data length. Available options are: `square-root`,
|
88
|
+
* `sturges`, `rice`. You can also define a function which takes a
|
89
|
+
* `baseSeries` as a parameter and should return a positive integer.
|
90
|
+
*
|
91
|
+
* @type {String|Number|Function}
|
92
|
+
* @validvalue ["square-root", "sturges", "rice"]
|
93
|
+
*/
|
94
|
+
binsNumber: 'square-root',
|
95
|
+
|
96
|
+
/**
|
97
|
+
* Width of each bin. By default the bin's width is calculated as
|
98
|
+
* `(max - min) / number of bins`. This option takes precedence over
|
99
|
+
* [binsNumber](#plotOptions.histogram.binsNumber).
|
100
|
+
*
|
101
|
+
* @type {Number}
|
102
|
+
*/
|
103
|
+
binWidth: undefined,
|
104
|
+
pointPadding: 0,
|
105
|
+
groupPadding: 0,
|
106
|
+
grouping: false,
|
107
|
+
pointPlacement: 'between',
|
108
|
+
tooltip: {
|
109
|
+
headerFormat: '',
|
110
|
+
pointFormat: '<span style="font-size: 10px">{point.x} - {point.x2}' +
|
111
|
+
'</span><br/>' +
|
112
|
+
'<span style="color:{point.color}">\u25CF</span>' +
|
113
|
+
' {series.name} <b>{point.y}</b><br/>'
|
114
|
+
}
|
115
|
+
|
116
|
+
}, merge(derivedSeriesMixin, {
|
117
|
+
setDerivedData: function () {
|
118
|
+
var data = this.derivedData(
|
119
|
+
this.baseSeries.yData,
|
120
|
+
this.binsNumber(),
|
121
|
+
this.options.binWidth
|
122
|
+
);
|
123
|
+
|
124
|
+
this.setData(data, false);
|
125
|
+
},
|
126
|
+
|
127
|
+
derivedData: function (baseData, binsNumber, binWidth) {
|
128
|
+
var max = arrayMax(baseData),
|
129
|
+
min = arrayMin(baseData),
|
130
|
+
frequencies = [],
|
131
|
+
bins = {},
|
132
|
+
data = [],
|
133
|
+
x,
|
134
|
+
fitToBin;
|
135
|
+
|
136
|
+
binWidth = this.binWidth = correctFloat(
|
137
|
+
isNumber(binWidth) ?
|
138
|
+
(binWidth || 1) :
|
139
|
+
(max - min) / binsNumber
|
140
|
+
);
|
141
|
+
|
142
|
+
// If binWidth is 0 then max and min are equaled,
|
143
|
+
// increment the x with some positive value to quit the loop
|
144
|
+
for (x = min; x < max; x = correctFloat(x + binWidth)) {
|
145
|
+
frequencies.push(x);
|
146
|
+
bins[x] = 0;
|
147
|
+
}
|
148
|
+
|
149
|
+
if (bins[min] !== 0) {
|
150
|
+
frequencies.push(correctFloat(min));
|
151
|
+
bins[correctFloat(min)] = 0;
|
152
|
+
}
|
153
|
+
|
154
|
+
fitToBin = fitToBinLeftClosed(
|
155
|
+
frequencies.map(function (elem) {
|
156
|
+
return parseFloat(elem);
|
157
|
+
})
|
158
|
+
);
|
159
|
+
|
160
|
+
baseData.forEach(function (y) {
|
161
|
+
var x = correctFloat(fitToBin(y));
|
162
|
+
|
163
|
+
bins[x]++;
|
164
|
+
});
|
165
|
+
|
166
|
+
objectEach(bins, function (frequency, x) {
|
167
|
+
data.push({
|
168
|
+
x: Number(x),
|
169
|
+
y: frequency,
|
170
|
+
x2: correctFloat(Number(x) + binWidth)
|
171
|
+
});
|
172
|
+
});
|
173
|
+
|
174
|
+
data.sort(function (a, b) {
|
175
|
+
return a.x - b.x;
|
176
|
+
});
|
177
|
+
|
178
|
+
return data;
|
179
|
+
},
|
180
|
+
|
181
|
+
binsNumber: function () {
|
182
|
+
var binsNumberOption = this.options.binsNumber;
|
183
|
+
var binsNumber = binsNumberFormulas[binsNumberOption] ||
|
184
|
+
// #7457
|
185
|
+
(typeof binsNumberOption === 'function' && binsNumberOption);
|
186
|
+
|
187
|
+
return Math.ceil(
|
188
|
+
(binsNumber && binsNumber(this.baseSeries)) ||
|
189
|
+
(
|
190
|
+
isNumber(binsNumberOption) ?
|
191
|
+
binsNumberOption :
|
192
|
+
binsNumberFormulas['square-root'](this.baseSeries)
|
193
|
+
)
|
194
|
+
);
|
195
|
+
}
|
196
|
+
}));
|
197
|
+
|
198
|
+
/**
|
199
|
+
* A `histogram` series. If the [type](#series.histogram.type) option is not
|
200
|
+
* specified, it is inherited from [chart.type](#chart.type).
|
201
|
+
*
|
202
|
+
* @type {Object}
|
203
|
+
* @since 6.0.0
|
204
|
+
* @extends series,plotOptions.histogram
|
205
|
+
* @excluding dataParser,dataURL,data
|
206
|
+
* @product highcharts
|
207
|
+
* @apioption series.histogram
|
208
|
+
*/
|
209
|
+
|
210
|
+
/**
|
211
|
+
* An integer identifying the index to use for the base series, or a string
|
212
|
+
* representing the id of the series.
|
213
|
+
*
|
214
|
+
* @type {Number|String}
|
215
|
+
* @default undefined
|
216
|
+
* @apioption series.histogram.baseSeries
|
217
|
+
*/
|
218
|
+
|
219
|
+
/**
|
220
|
+
* An array of data points for the series. For the `histogram` series type,
|
221
|
+
* points are calculated dynamically. See
|
222
|
+
* [histogram.baseSeries](#series.histogram.baseSeries).
|
223
|
+
*
|
224
|
+
* @type {Array<Object|Array>}
|
225
|
+
* @since 6.0.0
|
226
|
+
* @extends series.column.data
|
227
|
+
* @product highcharts
|
228
|
+
* @apioption series.histogram.data
|
229
|
+
*/
|
@@ -0,0 +1,150 @@
|
|
1
|
+
/* *
|
2
|
+
*
|
3
|
+
* (c) 2009-2019 Torstein Honsi
|
4
|
+
*
|
5
|
+
* Item series type for Highcharts
|
6
|
+
*
|
7
|
+
* License: www.highcharts.com/license
|
8
|
+
*
|
9
|
+
* */
|
10
|
+
|
11
|
+
/**
|
12
|
+
* @private
|
13
|
+
* @todo
|
14
|
+
* - Check update, remove etc.
|
15
|
+
* - Custom icons like persons, carts etc. Either as images, font icons or
|
16
|
+
* Highcharts symbols.
|
17
|
+
*/
|
18
|
+
|
19
|
+
'use strict';
|
20
|
+
|
21
|
+
import H from '../parts/Globals.js';
|
22
|
+
import '../parts/Utilities.js';
|
23
|
+
import '../parts/Series.js';
|
24
|
+
|
25
|
+
var extend = H.extend,
|
26
|
+
pick = H.pick,
|
27
|
+
seriesType = H.seriesType;
|
28
|
+
|
29
|
+
/**
|
30
|
+
* @private
|
31
|
+
* @class
|
32
|
+
* @name Highcharts.seriesTypes.item
|
33
|
+
*
|
34
|
+
* @augments Highcharts.Series
|
35
|
+
*/
|
36
|
+
seriesType('item', 'column', {
|
37
|
+
itemPadding: 0.2,
|
38
|
+
marker: {
|
39
|
+
symbol: 'circle',
|
40
|
+
states: {
|
41
|
+
hover: {},
|
42
|
+
select: {}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}, {
|
46
|
+
drawPoints: function () {
|
47
|
+
var series = this,
|
48
|
+
renderer = series.chart.renderer,
|
49
|
+
seriesMarkerOptions = this.options.marker,
|
50
|
+
itemPaddingTranslated = this.yAxis.transA *
|
51
|
+
series.options.itemPadding,
|
52
|
+
borderWidth = this.borderWidth,
|
53
|
+
crisp = borderWidth % 2 ? 0.5 : 1;
|
54
|
+
|
55
|
+
this.points.forEach(function (point) {
|
56
|
+
var yPos,
|
57
|
+
attr,
|
58
|
+
graphics,
|
59
|
+
itemY,
|
60
|
+
pointAttr,
|
61
|
+
pointMarkerOptions = point.marker || {},
|
62
|
+
symbol = (
|
63
|
+
pointMarkerOptions.symbol ||
|
64
|
+
seriesMarkerOptions.symbol
|
65
|
+
),
|
66
|
+
radius = pick(
|
67
|
+
pointMarkerOptions.radius,
|
68
|
+
seriesMarkerOptions.radius
|
69
|
+
),
|
70
|
+
size,
|
71
|
+
yTop,
|
72
|
+
isSquare = symbol !== 'rect',
|
73
|
+
x,
|
74
|
+
y;
|
75
|
+
|
76
|
+
point.graphics = graphics = point.graphics || {};
|
77
|
+
pointAttr = point.pointAttr ?
|
78
|
+
(
|
79
|
+
point.pointAttr[point.selected ? 'selected' : ''] ||
|
80
|
+
series.pointAttr['']
|
81
|
+
) :
|
82
|
+
series.pointAttribs(point, point.selected && 'select');
|
83
|
+
delete pointAttr.r;
|
84
|
+
|
85
|
+
if (series.chart.styledMode) {
|
86
|
+
delete pointAttr.stroke;
|
87
|
+
delete pointAttr['stroke-width'];
|
88
|
+
}
|
89
|
+
|
90
|
+
if (point.y !== null) {
|
91
|
+
|
92
|
+
if (!point.graphic) {
|
93
|
+
point.graphic = renderer.g('point').add(series.group);
|
94
|
+
}
|
95
|
+
|
96
|
+
itemY = point.y;
|
97
|
+
yTop = pick(point.stackY, point.y);
|
98
|
+
size = Math.min(
|
99
|
+
point.pointWidth,
|
100
|
+
series.yAxis.transA - itemPaddingTranslated
|
101
|
+
);
|
102
|
+
for (yPos = yTop; yPos > yTop - point.y; yPos--) {
|
103
|
+
|
104
|
+
x = point.barX + (
|
105
|
+
isSquare ?
|
106
|
+
point.pointWidth / 2 - size / 2 :
|
107
|
+
0
|
108
|
+
);
|
109
|
+
y = series.yAxis.toPixels(yPos, true) +
|
110
|
+
itemPaddingTranslated / 2;
|
111
|
+
|
112
|
+
if (series.options.crisp) {
|
113
|
+
x = Math.round(x) - crisp;
|
114
|
+
y = Math.round(y) + crisp;
|
115
|
+
}
|
116
|
+
attr = {
|
117
|
+
x: x,
|
118
|
+
y: y,
|
119
|
+
width: Math.round(isSquare ? size : point.pointWidth),
|
120
|
+
height: Math.round(size),
|
121
|
+
r: radius
|
122
|
+
};
|
123
|
+
|
124
|
+
if (graphics[itemY]) {
|
125
|
+
graphics[itemY].animate(attr);
|
126
|
+
} else {
|
127
|
+
graphics[itemY] = renderer.symbol(symbol)
|
128
|
+
.attr(extend(attr, pointAttr))
|
129
|
+
.add(point.graphic);
|
130
|
+
}
|
131
|
+
graphics[itemY].isActive = true;
|
132
|
+
itemY--;
|
133
|
+
}
|
134
|
+
}
|
135
|
+
H.objectEach(graphics, function (graphic, key) {
|
136
|
+
if (!graphic.isActive) {
|
137
|
+
graphic.destroy();
|
138
|
+
delete graphic[key];
|
139
|
+
} else {
|
140
|
+
graphic.isActive = false;
|
141
|
+
}
|
142
|
+
});
|
143
|
+
});
|
144
|
+
|
145
|
+
}
|
146
|
+
});
|
147
|
+
|
148
|
+
H.SVGRenderer.prototype.symbols.rect = function (x, y, w, h, options) {
|
149
|
+
return H.SVGRenderer.prototype.symbols.callout(x, y, w, h, options);
|
150
|
+
};
|
@@ -0,0 +1,1606 @@
|
|
1
|
+
/**
|
2
|
+
* Accessibility module - Keyboard navigation
|
3
|
+
*
|
4
|
+
* (c) 2010-2017 Highsoft AS
|
5
|
+
* Author: Oystein Moseng
|
6
|
+
*
|
7
|
+
* License: www.highcharts.com/license
|
8
|
+
*/
|
9
|
+
|
10
|
+
'use strict';
|
11
|
+
|
12
|
+
import H from '../parts/Globals.js';
|
13
|
+
import '../parts/Utilities.js';
|
14
|
+
import '../parts/Chart.js';
|
15
|
+
import '../parts/Series.js';
|
16
|
+
import '../parts/Point.js';
|
17
|
+
import '../parts/Tooltip.js';
|
18
|
+
import '../parts/SvgRenderer.js';
|
19
|
+
|
20
|
+
var win = H.win,
|
21
|
+
doc = win.document,
|
22
|
+
addEvent = H.addEvent,
|
23
|
+
fireEvent = H.fireEvent,
|
24
|
+
merge = H.merge,
|
25
|
+
pick = H.pick;
|
26
|
+
|
27
|
+
/*
|
28
|
+
* Add focus border functionality to SVGElements. Draws a new rect on top of
|
29
|
+
* element around its bounding box.
|
30
|
+
*/
|
31
|
+
H.extend(H.SVGElement.prototype, {
|
32
|
+
|
33
|
+
/**
|
34
|
+
* @private
|
35
|
+
* @function Highcharts.SVGElement#addFocusBorder
|
36
|
+
*
|
37
|
+
* @param {number} margin
|
38
|
+
*
|
39
|
+
* @param {Higcharts.CSSObject} style
|
40
|
+
*/
|
41
|
+
addFocusBorder: function (margin, style) {
|
42
|
+
// Allow updating by just adding new border
|
43
|
+
if (this.focusBorder) {
|
44
|
+
this.removeFocusBorder();
|
45
|
+
}
|
46
|
+
// Add the border rect
|
47
|
+
var bb = this.getBBox(),
|
48
|
+
pad = pick(margin, 3);
|
49
|
+
|
50
|
+
bb.x += this.translateX ? this.translateX : 0;
|
51
|
+
bb.y += this.translateY ? this.translateY : 0;
|
52
|
+
|
53
|
+
this.focusBorder = this.renderer.rect(
|
54
|
+
bb.x - pad,
|
55
|
+
bb.y - pad,
|
56
|
+
bb.width + 2 * pad,
|
57
|
+
bb.height + 2 * pad,
|
58
|
+
style && style.borderRadius
|
59
|
+
)
|
60
|
+
.addClass('highcharts-focus-border')
|
61
|
+
.attr({
|
62
|
+
zIndex: 99
|
63
|
+
})
|
64
|
+
.add(this.parentGroup);
|
65
|
+
|
66
|
+
if (!this.renderer.styledMode) {
|
67
|
+
this.focusBorder.attr({
|
68
|
+
stroke: style && style.stroke,
|
69
|
+
'stroke-width': style && style.strokeWidth
|
70
|
+
});
|
71
|
+
}
|
72
|
+
},
|
73
|
+
|
74
|
+
/**
|
75
|
+
* @private
|
76
|
+
* @function Highcharts.SVGElement#removeFocusBorder
|
77
|
+
*/
|
78
|
+
removeFocusBorder: function () {
|
79
|
+
if (this.focusBorder) {
|
80
|
+
this.focusBorder.destroy();
|
81
|
+
delete this.focusBorder;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
});
|
85
|
+
|
86
|
+
|
87
|
+
/*
|
88
|
+
* Set for which series types it makes sense to move to the closest point with
|
89
|
+
* up/down arrows, and which series types should just move to next series.
|
90
|
+
*/
|
91
|
+
H.Series.prototype.keyboardMoveVertical = true;
|
92
|
+
['column', 'pie'].forEach(function (type) {
|
93
|
+
if (H.seriesTypes[type]) {
|
94
|
+
H.seriesTypes[type].prototype.keyboardMoveVertical = false;
|
95
|
+
}
|
96
|
+
});
|
97
|
+
|
98
|
+
|
99
|
+
/**
|
100
|
+
* Get the index of a point in a series. This is needed when using e.g. data
|
101
|
+
* grouping.
|
102
|
+
*
|
103
|
+
* @private
|
104
|
+
* @function getPointIndex
|
105
|
+
*
|
106
|
+
* @param {Highcharts.Point} point
|
107
|
+
* The point to find index of.
|
108
|
+
*
|
109
|
+
* @return {number}
|
110
|
+
* The index in the series.points array of the point.
|
111
|
+
*/
|
112
|
+
function getPointIndex(point) {
|
113
|
+
var index = point.index,
|
114
|
+
points = point.series.points,
|
115
|
+
i = points.length;
|
116
|
+
|
117
|
+
if (points[index] !== point) {
|
118
|
+
while (i--) {
|
119
|
+
if (points[i] === point) {
|
120
|
+
return i;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
} else {
|
124
|
+
return index;
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
|
129
|
+
// Set default keyboard navigation options
|
130
|
+
H.setOptions({
|
131
|
+
|
132
|
+
/**
|
133
|
+
* @since 5.0.0
|
134
|
+
* @optionparent accessibility
|
135
|
+
*/
|
136
|
+
accessibility: {
|
137
|
+
|
138
|
+
/**
|
139
|
+
* Options for keyboard navigation.
|
140
|
+
*
|
141
|
+
* @since 5.0.0
|
142
|
+
*/
|
143
|
+
keyboardNavigation: {
|
144
|
+
|
145
|
+
/**
|
146
|
+
* Enable keyboard navigation for the chart.
|
147
|
+
*
|
148
|
+
* @since 5.0.0
|
149
|
+
*/
|
150
|
+
enabled: true,
|
151
|
+
|
152
|
+
|
153
|
+
/**
|
154
|
+
* Options for the focus border drawn around elements while
|
155
|
+
* navigating through them.
|
156
|
+
*
|
157
|
+
* @sample highcharts/accessibility/custom-focus
|
158
|
+
* Custom focus ring
|
159
|
+
*
|
160
|
+
* @since 6.0.3
|
161
|
+
*/
|
162
|
+
focusBorder: {
|
163
|
+
|
164
|
+
/**
|
165
|
+
* Enable/disable focus border for chart.
|
166
|
+
*
|
167
|
+
* @since 6.0.3
|
168
|
+
*/
|
169
|
+
enabled: true,
|
170
|
+
|
171
|
+
/**
|
172
|
+
* Hide the browser's default focus indicator.
|
173
|
+
*
|
174
|
+
* @since 6.0.4
|
175
|
+
*/
|
176
|
+
hideBrowserFocusOutline: true,
|
177
|
+
|
178
|
+
/**
|
179
|
+
* Style options for the focus border drawn around elements
|
180
|
+
* while navigating through them. Note that some browsers in
|
181
|
+
* addition draw their own borders for focused elements. These
|
182
|
+
* automatic borders can not be styled by Highcharts.
|
183
|
+
*
|
184
|
+
* In styled mode, the border is given the
|
185
|
+
* `.highcharts-focus-border` class.
|
186
|
+
*
|
187
|
+
* @type {Highcharts.CSSObject}
|
188
|
+
* @default {"color": "#335cad", "lineWidth": 2, "borderRadius": 3}
|
189
|
+
* @since 6.0.3
|
190
|
+
*/
|
191
|
+
style: {
|
192
|
+
/** @ignore-option */
|
193
|
+
color: '#335cad',
|
194
|
+
/** @ignore-option */
|
195
|
+
lineWidth: 2,
|
196
|
+
/** @ignore-option */
|
197
|
+
borderRadius: 3
|
198
|
+
},
|
199
|
+
|
200
|
+
/**
|
201
|
+
* Focus border margin around the elements.
|
202
|
+
*
|
203
|
+
* @since 6.0.3
|
204
|
+
*/
|
205
|
+
margin: 2
|
206
|
+
|
207
|
+
},
|
208
|
+
|
209
|
+
/**
|
210
|
+
* Set the keyboard navigation mode for the chart. Can be "normal"
|
211
|
+
* or "serialize". In normal mode, left/right arrow keys move
|
212
|
+
* between points in a series, while up/down arrow keys move between
|
213
|
+
* series. Up/down navigation acts intelligently to figure out which
|
214
|
+
* series makes sense to move to from any given point.
|
215
|
+
*
|
216
|
+
* In "serialize" mode, points are instead navigated as a single
|
217
|
+
* list. Left/right behaves as in "normal" mode. Up/down arrow keys
|
218
|
+
* will behave like left/right. This is useful for unifying
|
219
|
+
* navigation behavior with/without screen readers enabled.
|
220
|
+
*
|
221
|
+
* @type {string}
|
222
|
+
* @default normal
|
223
|
+
* @since 6.0.4
|
224
|
+
* @validvalue ["normal", "serialize"]
|
225
|
+
* @apioption accessibility.keyboardNavigation.mode
|
226
|
+
*/
|
227
|
+
|
228
|
+
/**
|
229
|
+
* Skip null points when navigating through points with the
|
230
|
+
* keyboard.
|
231
|
+
*
|
232
|
+
* @since 5.0.0
|
233
|
+
*/
|
234
|
+
skipNullPoints: true
|
235
|
+
|
236
|
+
}
|
237
|
+
|
238
|
+
}
|
239
|
+
|
240
|
+
});
|
241
|
+
|
242
|
+
/**
|
243
|
+
* Keyboard navigation for the legend. Requires the Accessibility module.
|
244
|
+
*
|
245
|
+
* @since 5.0.14
|
246
|
+
* @apioption legend.keyboardNavigation
|
247
|
+
*/
|
248
|
+
|
249
|
+
/**
|
250
|
+
* Enable/disable keyboard navigation for the legend. Requires the Accessibility
|
251
|
+
* module.
|
252
|
+
*
|
253
|
+
* @see [accessibility.keyboardNavigation](
|
254
|
+
* #accessibility.keyboardNavigation.enabled)
|
255
|
+
*
|
256
|
+
* @type {boolean}
|
257
|
+
* @default true
|
258
|
+
* @since 5.0.13
|
259
|
+
* @apioption legend.keyboardNavigation.enabled
|
260
|
+
*/
|
261
|
+
|
262
|
+
|
263
|
+
/**
|
264
|
+
* Abstraction layer for keyboard navigation. Keep a map of keyCodes to handler
|
265
|
+
* functions, and a next/prev move handler for tab order. The module's keyCode
|
266
|
+
* handlers determine when to move to another module. Validate holds a function
|
267
|
+
* to determine if there are prerequisites for this module to run that are not
|
268
|
+
* met. Init holds a function to run once before any keyCodes are interpreted.
|
269
|
+
* Terminate holds a function to run once before moving to next/prev module.
|
270
|
+
*
|
271
|
+
* @private
|
272
|
+
* @class
|
273
|
+
* @name KeyboardNavigationModule
|
274
|
+
*
|
275
|
+
* @param {Highcharts.Chart} chart
|
276
|
+
* The chart object keeps track of a list of KeyboardNavigationModules.
|
277
|
+
*
|
278
|
+
* @param {*} options
|
279
|
+
*/
|
280
|
+
function KeyboardNavigationModule(chart, options) {
|
281
|
+
this.chart = chart;
|
282
|
+
this.id = options.id;
|
283
|
+
this.keyCodeMap = options.keyCodeMap;
|
284
|
+
this.validate = options.validate;
|
285
|
+
this.init = options.init;
|
286
|
+
this.terminate = options.terminate;
|
287
|
+
}
|
288
|
+
KeyboardNavigationModule.prototype = {
|
289
|
+
|
290
|
+
/**
|
291
|
+
* Find handler function(s) for key code in the keyCodeMap and run it.
|
292
|
+
*
|
293
|
+
* @private
|
294
|
+
* @function KeyboardNavigationModule#run
|
295
|
+
*
|
296
|
+
* @param {global.Event} e
|
297
|
+
*
|
298
|
+
* @return {boolean}
|
299
|
+
*/
|
300
|
+
run: function (e) {
|
301
|
+
var navModule = this,
|
302
|
+
keyCode = e.which || e.keyCode,
|
303
|
+
found = false,
|
304
|
+
handled = false;
|
305
|
+
|
306
|
+
this.keyCodeMap.forEach(function (codeSet) {
|
307
|
+
if (codeSet[0].indexOf(keyCode) > -1) {
|
308
|
+
found = true;
|
309
|
+
handled = codeSet[1].call(navModule, keyCode, e) !== false;
|
310
|
+
}
|
311
|
+
});
|
312
|
+
// Default tab handler, move to next/prev module
|
313
|
+
if (!found && keyCode === 9) {
|
314
|
+
handled = this.move(e.shiftKey ? -1 : 1);
|
315
|
+
}
|
316
|
+
return handled;
|
317
|
+
},
|
318
|
+
|
319
|
+
/**
|
320
|
+
* Move to next/prev valid module, or undefined if none, and init it.
|
321
|
+
* Returns true on success and false if there is no valid module to move to.
|
322
|
+
*
|
323
|
+
* @private
|
324
|
+
* @function KeyboardNavigationModule#move
|
325
|
+
*
|
326
|
+
* @param {number} direction
|
327
|
+
*
|
328
|
+
* @return {boolean}
|
329
|
+
*/
|
330
|
+
move: function (direction) {
|
331
|
+
var chart = this.chart;
|
332
|
+
|
333
|
+
if (this.terminate) {
|
334
|
+
this.terminate(direction);
|
335
|
+
}
|
336
|
+
chart.keyboardNavigationModuleIndex += direction;
|
337
|
+
var newModule = chart.keyboardNavigationModules[
|
338
|
+
chart.keyboardNavigationModuleIndex
|
339
|
+
];
|
340
|
+
|
341
|
+
// Remove existing focus border if any
|
342
|
+
if (chart.focusElement) {
|
343
|
+
chart.focusElement.removeFocusBorder();
|
344
|
+
}
|
345
|
+
|
346
|
+
// Verify new module
|
347
|
+
if (newModule) {
|
348
|
+
if (newModule.validate && !newModule.validate()) {
|
349
|
+
return this.move(direction); // Invalid module, recurse
|
350
|
+
}
|
351
|
+
if (newModule.init) {
|
352
|
+
newModule.init(direction); // Valid module, init it
|
353
|
+
return true;
|
354
|
+
}
|
355
|
+
}
|
356
|
+
// No module
|
357
|
+
chart.keyboardNavigationModuleIndex = 0; // Reset counter
|
358
|
+
|
359
|
+
// Set focus to chart or exit anchor depending on direction
|
360
|
+
if (direction > 0) {
|
361
|
+
this.chart.exiting = true;
|
362
|
+
this.chart.tabExitAnchor.focus();
|
363
|
+
} else {
|
364
|
+
this.chart.renderTo.focus();
|
365
|
+
}
|
366
|
+
|
367
|
+
return false;
|
368
|
+
}
|
369
|
+
};
|
370
|
+
|
371
|
+
|
372
|
+
/**
|
373
|
+
* Utility function to attempt to fake a click event on an element.
|
374
|
+
*
|
375
|
+
* @private
|
376
|
+
* @function fakeClickEvent
|
377
|
+
*
|
378
|
+
* @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement}
|
379
|
+
*/
|
380
|
+
function fakeClickEvent(element) {
|
381
|
+
var fakeEvent;
|
382
|
+
|
383
|
+
if (element && element.onclick && doc.createEvent) {
|
384
|
+
fakeEvent = doc.createEvent('Events');
|
385
|
+
fakeEvent.initEvent('click', true, false);
|
386
|
+
element.onclick(fakeEvent);
|
387
|
+
}
|
388
|
+
}
|
389
|
+
|
390
|
+
|
391
|
+
/**
|
392
|
+
* Determine if a series should be skipped
|
393
|
+
*
|
394
|
+
* @private
|
395
|
+
* @function isSkipSeries
|
396
|
+
*
|
397
|
+
* @param {Highcharts.Series} series
|
398
|
+
*
|
399
|
+
* @return {boolean}
|
400
|
+
*/
|
401
|
+
function isSkipSeries(series) {
|
402
|
+
var a11yOptions = series.chart.options.accessibility;
|
403
|
+
|
404
|
+
return series.options.skipKeyboardNavigation ||
|
405
|
+
series.options.enableMouseTracking === false || // #8440
|
406
|
+
!series.visible ||
|
407
|
+
// Skip all points in a series where pointDescriptionThreshold is
|
408
|
+
// reached
|
409
|
+
(a11yOptions.pointDescriptionThreshold &&
|
410
|
+
a11yOptions.pointDescriptionThreshold <= series.points.length);
|
411
|
+
}
|
412
|
+
|
413
|
+
|
414
|
+
/**
|
415
|
+
* Determine if a point should be skipped
|
416
|
+
*
|
417
|
+
* @private
|
418
|
+
* @function isSkipPoint
|
419
|
+
*
|
420
|
+
* @param {Highcharts.Point} point
|
421
|
+
*
|
422
|
+
* @return {boolean}
|
423
|
+
*/
|
424
|
+
function isSkipPoint(point) {
|
425
|
+
var a11yOptions = point.series.chart.options.accessibility;
|
426
|
+
|
427
|
+
return point.isNull && a11yOptions.keyboardNavigation.skipNullPoints ||
|
428
|
+
point.visible === false ||
|
429
|
+
isSkipSeries(point.series);
|
430
|
+
}
|
431
|
+
|
432
|
+
|
433
|
+
/**
|
434
|
+
* Get the point in a series that is closest (in distance) to a reference point.
|
435
|
+
* Optionally supply weight factors for x and y directions.
|
436
|
+
*
|
437
|
+
* @private
|
438
|
+
* @function getClosestPoint
|
439
|
+
*
|
440
|
+
* @param {Highcharts.Point} point
|
441
|
+
*
|
442
|
+
* @param {Highcharts.Series} series
|
443
|
+
*
|
444
|
+
* @param {number} [xWeight]
|
445
|
+
*
|
446
|
+
* @param {number} [yWeight]
|
447
|
+
*
|
448
|
+
* @return {Highcharts.Point|undefined}
|
449
|
+
*/
|
450
|
+
function getClosestPoint(point, series, xWeight, yWeight) {
|
451
|
+
var minDistance = Infinity,
|
452
|
+
dPoint,
|
453
|
+
minIx,
|
454
|
+
distance,
|
455
|
+
i = series.points.length;
|
456
|
+
|
457
|
+
if (point.plotX === undefined || point.plotY === undefined) {
|
458
|
+
return;
|
459
|
+
}
|
460
|
+
while (i--) {
|
461
|
+
dPoint = series.points[i];
|
462
|
+
if (dPoint.plotX === undefined || dPoint.plotY === undefined) {
|
463
|
+
continue;
|
464
|
+
}
|
465
|
+
distance = (point.plotX - dPoint.plotX) *
|
466
|
+
(point.plotX - dPoint.plotX) * (xWeight || 1) +
|
467
|
+
(point.plotY - dPoint.plotY) *
|
468
|
+
(point.plotY - dPoint.plotY) * (yWeight || 1);
|
469
|
+
if (distance < minDistance) {
|
470
|
+
minDistance = distance;
|
471
|
+
minIx = i;
|
472
|
+
}
|
473
|
+
}
|
474
|
+
return minIx !== undefined && series.points[minIx];
|
475
|
+
}
|
476
|
+
|
477
|
+
|
478
|
+
/**
|
479
|
+
* Pan along axis in a direction (1 or -1), optionally with a defined
|
480
|
+
* granularity (number of steps it takes to walk across current view)
|
481
|
+
*
|
482
|
+
* @private
|
483
|
+
* @function Highcharts.Axis#panStep
|
484
|
+
*
|
485
|
+
* @param {number} direction
|
486
|
+
*
|
487
|
+
* @param {number} [granularity]
|
488
|
+
*/
|
489
|
+
H.Axis.prototype.panStep = function (direction, granularity) {
|
490
|
+
var gran = granularity || 3,
|
491
|
+
extremes = this.getExtremes(),
|
492
|
+
step = (extremes.max - extremes.min) / gran * direction,
|
493
|
+
newMax = extremes.max + step,
|
494
|
+
newMin = extremes.min + step,
|
495
|
+
size = newMax - newMin;
|
496
|
+
|
497
|
+
if (direction < 0 && newMin < extremes.dataMin) {
|
498
|
+
newMin = extremes.dataMin;
|
499
|
+
newMax = newMin + size;
|
500
|
+
} else if (direction > 0 && newMax > extremes.dataMax) {
|
501
|
+
newMax = extremes.dataMax;
|
502
|
+
newMin = newMax - size;
|
503
|
+
}
|
504
|
+
this.setExtremes(newMin, newMax);
|
505
|
+
};
|
506
|
+
|
507
|
+
|
508
|
+
/**
|
509
|
+
* Set chart's focus to an SVGElement. Calls focus() on it, and draws the focus
|
510
|
+
* border.
|
511
|
+
*
|
512
|
+
* @private
|
513
|
+
* @function Highcharts.Chart#setFocusToElement
|
514
|
+
*
|
515
|
+
* @param {Highcharts.SVGElement} svgElement
|
516
|
+
* Element to draw the border around.
|
517
|
+
*
|
518
|
+
* @param {Highcharts.SVGElement} [focusElement]
|
519
|
+
* If supplied, it draws the border around svgElement and sets the focus
|
520
|
+
* to focusElement.
|
521
|
+
*/
|
522
|
+
H.Chart.prototype.setFocusToElement = function (svgElement, focusElement) {
|
523
|
+
var focusBorderOptions = this.options.accessibility
|
524
|
+
.keyboardNavigation.focusBorder,
|
525
|
+
browserFocusElement = focusElement || svgElement;
|
526
|
+
|
527
|
+
// Set browser focus if possible
|
528
|
+
if (
|
529
|
+
browserFocusElement.element &&
|
530
|
+
browserFocusElement.element.focus
|
531
|
+
) {
|
532
|
+
browserFocusElement.element.focus();
|
533
|
+
// Hide default focus ring
|
534
|
+
if (focusBorderOptions.hideBrowserFocusOutline) {
|
535
|
+
browserFocusElement.css({ outline: 'none' });
|
536
|
+
}
|
537
|
+
}
|
538
|
+
if (focusBorderOptions.enabled) {
|
539
|
+
// Remove old focus border
|
540
|
+
if (this.focusElement) {
|
541
|
+
this.focusElement.removeFocusBorder();
|
542
|
+
}
|
543
|
+
// Draw focus border (since some browsers don't do it automatically)
|
544
|
+
svgElement.addFocusBorder(focusBorderOptions.margin, {
|
545
|
+
stroke: focusBorderOptions.style.color,
|
546
|
+
strokeWidth: focusBorderOptions.style.lineWidth,
|
547
|
+
borderRadius: focusBorderOptions.style.borderRadius
|
548
|
+
});
|
549
|
+
this.focusElement = svgElement;
|
550
|
+
}
|
551
|
+
};
|
552
|
+
|
553
|
+
|
554
|
+
/**
|
555
|
+
* Highlights a point (show tooltip and display hover state).
|
556
|
+
*
|
557
|
+
* @private
|
558
|
+
* @function Highcharts.Point#highlight
|
559
|
+
*
|
560
|
+
* @return {Highcharts.Point}
|
561
|
+
* This highlighted point.
|
562
|
+
*/
|
563
|
+
H.Point.prototype.highlight = function () {
|
564
|
+
var chart = this.series.chart;
|
565
|
+
|
566
|
+
if (!this.isNull) {
|
567
|
+
this.onMouseOver(); // Show the hover marker and tooltip
|
568
|
+
} else {
|
569
|
+
if (chart.tooltip) {
|
570
|
+
chart.tooltip.hide(0);
|
571
|
+
}
|
572
|
+
// Don't call blur on the element, as it messes up the chart div's focus
|
573
|
+
}
|
574
|
+
|
575
|
+
// We focus only after calling onMouseOver because the state change can
|
576
|
+
// change z-index and mess up the element.
|
577
|
+
if (this.graphic) {
|
578
|
+
chart.setFocusToElement(this.graphic);
|
579
|
+
}
|
580
|
+
|
581
|
+
chart.highlightedPoint = this;
|
582
|
+
return this;
|
583
|
+
};
|
584
|
+
|
585
|
+
|
586
|
+
/**
|
587
|
+
* Function to highlight next/previous point in chart.
|
588
|
+
*
|
589
|
+
* @private
|
590
|
+
* @function Highcharts.Chart#highlightAdjacentPoint
|
591
|
+
*
|
592
|
+
* @param {boolean} next
|
593
|
+
* Flag for the direction.
|
594
|
+
*
|
595
|
+
* @return {Highcharts.Point|false}
|
596
|
+
* Returns highlighted point on success, false on failure (no adjacent
|
597
|
+
* point to highlight in chosen direction).
|
598
|
+
*/
|
599
|
+
H.Chart.prototype.highlightAdjacentPoint = function (next) {
|
600
|
+
var chart = this,
|
601
|
+
series = chart.series,
|
602
|
+
curPoint = chart.highlightedPoint,
|
603
|
+
curPointIndex = curPoint && getPointIndex(curPoint) || 0,
|
604
|
+
curPoints = curPoint && curPoint.series.points,
|
605
|
+
lastSeries = chart.series && chart.series[chart.series.length - 1],
|
606
|
+
lastPoint = lastSeries && lastSeries.points &&
|
607
|
+
lastSeries.points[lastSeries.points.length - 1],
|
608
|
+
newSeries,
|
609
|
+
newPoint;
|
610
|
+
|
611
|
+
// If no points, return false
|
612
|
+
if (!series[0] || !series[0].points) {
|
613
|
+
return false;
|
614
|
+
}
|
615
|
+
|
616
|
+
if (!curPoint) {
|
617
|
+
// No point is highlighted yet. Try first/last point depending on move
|
618
|
+
// direction
|
619
|
+
newPoint = next ? series[0].points[0] : lastPoint;
|
620
|
+
} else {
|
621
|
+
// We have a highlighted point.
|
622
|
+
// Grab next/prev point & series
|
623
|
+
newSeries = series[curPoint.series.index + (next ? 1 : -1)];
|
624
|
+
newPoint = curPoints[curPointIndex + (next ? 1 : -1)];
|
625
|
+
if (!newPoint && newSeries) {
|
626
|
+
// Done with this series, try next one
|
627
|
+
newPoint = newSeries.points[next ? 0 : newSeries.points.length - 1];
|
628
|
+
}
|
629
|
+
|
630
|
+
// If there is no adjacent point, we return false
|
631
|
+
if (!newPoint) {
|
632
|
+
return false;
|
633
|
+
}
|
634
|
+
}
|
635
|
+
|
636
|
+
// Recursively skip points
|
637
|
+
if (isSkipPoint(newPoint)) {
|
638
|
+
// If we skip this whole series, move to the end of the series before we
|
639
|
+
// recurse, just to optimize
|
640
|
+
newSeries = newPoint.series;
|
641
|
+
if (isSkipSeries(newSeries)) {
|
642
|
+
chart.highlightedPoint = next ?
|
643
|
+
newSeries.points[newSeries.points.length - 1] :
|
644
|
+
newSeries.points[0];
|
645
|
+
} else {
|
646
|
+
// Otherwise, just move one point
|
647
|
+
chart.highlightedPoint = newPoint;
|
648
|
+
}
|
649
|
+
// Retry
|
650
|
+
return chart.highlightAdjacentPoint(next);
|
651
|
+
}
|
652
|
+
|
653
|
+
// There is an adjacent point, highlight it
|
654
|
+
return newPoint.highlight();
|
655
|
+
};
|
656
|
+
|
657
|
+
|
658
|
+
/**
|
659
|
+
* Highlight first valid point in a series. Returns the point if successfully
|
660
|
+
* highlighted, otherwise false. If there is a highlighted point in the series,
|
661
|
+
* use that as starting point.
|
662
|
+
*
|
663
|
+
* @private
|
664
|
+
* @function Highcharts.Series#highlightFirstValidPoint
|
665
|
+
*
|
666
|
+
* @return {Highcharts.Point|false}
|
667
|
+
*/
|
668
|
+
H.Series.prototype.highlightFirstValidPoint = function () {
|
669
|
+
var curPoint = this.chart.highlightedPoint,
|
670
|
+
start = (curPoint && curPoint.series) === this ?
|
671
|
+
getPointIndex(curPoint) :
|
672
|
+
0,
|
673
|
+
points = this.points;
|
674
|
+
|
675
|
+
if (points) {
|
676
|
+
for (var i = start, len = points.length; i < len; ++i) {
|
677
|
+
if (!isSkipPoint(points[i])) {
|
678
|
+
return points[i].highlight();
|
679
|
+
}
|
680
|
+
}
|
681
|
+
for (var j = start; j >= 0; --j) {
|
682
|
+
if (!isSkipPoint(points[j])) {
|
683
|
+
return points[j].highlight();
|
684
|
+
}
|
685
|
+
}
|
686
|
+
}
|
687
|
+
return false;
|
688
|
+
};
|
689
|
+
|
690
|
+
|
691
|
+
/**
|
692
|
+
* Highlight next/previous series in chart. Returns false if no adjacent series
|
693
|
+
* in the direction, otherwise returns new highlighted point.
|
694
|
+
*
|
695
|
+
* @private
|
696
|
+
* @function Highcharts.Chart#highlightAdjacentSeries
|
697
|
+
*
|
698
|
+
* @param {boolean} down
|
699
|
+
*
|
700
|
+
* @return {Highcharts.Point|false}
|
701
|
+
*/
|
702
|
+
H.Chart.prototype.highlightAdjacentSeries = function (down) {
|
703
|
+
var chart = this,
|
704
|
+
newSeries,
|
705
|
+
newPoint,
|
706
|
+
adjacentNewPoint,
|
707
|
+
curPoint = chart.highlightedPoint,
|
708
|
+
lastSeries = chart.series && chart.series[chart.series.length - 1],
|
709
|
+
lastPoint = lastSeries && lastSeries.points &&
|
710
|
+
lastSeries.points[lastSeries.points.length - 1];
|
711
|
+
|
712
|
+
// If no point is highlighted, highlight the first/last point
|
713
|
+
if (!chart.highlightedPoint) {
|
714
|
+
newSeries = down ? (chart.series && chart.series[0]) : lastSeries;
|
715
|
+
newPoint = down ?
|
716
|
+
(newSeries && newSeries.points && newSeries.points[0]) : lastPoint;
|
717
|
+
return newPoint ? newPoint.highlight() : false;
|
718
|
+
}
|
719
|
+
|
720
|
+
newSeries = chart.series[curPoint.series.index + (down ? -1 : 1)];
|
721
|
+
|
722
|
+
if (!newSeries) {
|
723
|
+
return false;
|
724
|
+
}
|
725
|
+
|
726
|
+
// We have a new series in this direction, find the right point
|
727
|
+
// Weigh xDistance as counting much higher than Y distance
|
728
|
+
newPoint = getClosestPoint(curPoint, newSeries, 4);
|
729
|
+
|
730
|
+
if (!newPoint) {
|
731
|
+
return false;
|
732
|
+
}
|
733
|
+
|
734
|
+
// New series and point exists, but we might want to skip it
|
735
|
+
if (isSkipSeries(newSeries)) {
|
736
|
+
// Skip the series
|
737
|
+
newPoint.highlight();
|
738
|
+
adjacentNewPoint = chart.highlightAdjacentSeries(down); // Try recurse
|
739
|
+
if (!adjacentNewPoint) {
|
740
|
+
// Recurse failed
|
741
|
+
curPoint.highlight();
|
742
|
+
return false;
|
743
|
+
}
|
744
|
+
// Recurse succeeded
|
745
|
+
return adjacentNewPoint;
|
746
|
+
}
|
747
|
+
|
748
|
+
// Highlight the new point or any first valid point back or forwards from it
|
749
|
+
newPoint.highlight();
|
750
|
+
return newPoint.series.highlightFirstValidPoint();
|
751
|
+
};
|
752
|
+
|
753
|
+
|
754
|
+
/**
|
755
|
+
* Highlight the closest point vertically.
|
756
|
+
*
|
757
|
+
* @private
|
758
|
+
* @function Highcharts.Chart#highlightAdjacentPointVertical
|
759
|
+
*
|
760
|
+
* @param {boolean} down
|
761
|
+
*
|
762
|
+
* @return {Highcharts.Point|false}
|
763
|
+
*/
|
764
|
+
H.Chart.prototype.highlightAdjacentPointVertical = function (down) {
|
765
|
+
var curPoint = this.highlightedPoint,
|
766
|
+
minDistance = Infinity,
|
767
|
+
bestPoint;
|
768
|
+
|
769
|
+
if (curPoint.plotX === undefined || curPoint.plotY === undefined) {
|
770
|
+
return false;
|
771
|
+
}
|
772
|
+
this.series.forEach(function (series) {
|
773
|
+
if (isSkipSeries(series)) {
|
774
|
+
return;
|
775
|
+
}
|
776
|
+
series.points.forEach(function (point) {
|
777
|
+
if (point.plotY === undefined || point.plotX === undefined ||
|
778
|
+
point === curPoint) {
|
779
|
+
return;
|
780
|
+
}
|
781
|
+
var yDistance = point.plotY - curPoint.plotY,
|
782
|
+
width = Math.abs(point.plotX - curPoint.plotX),
|
783
|
+
distance = Math.abs(yDistance) * Math.abs(yDistance) +
|
784
|
+
width * width * 4; // Weigh horizontal distance highly
|
785
|
+
|
786
|
+
// Reverse distance number if axis is reversed
|
787
|
+
if (series.yAxis.reversed) {
|
788
|
+
yDistance *= -1;
|
789
|
+
}
|
790
|
+
|
791
|
+
if (
|
792
|
+
yDistance < 0 && down || yDistance > 0 && !down || // Wrong dir
|
793
|
+
distance < 5 || // Points in same spot => infinite loop
|
794
|
+
isSkipPoint(point)
|
795
|
+
) {
|
796
|
+
return;
|
797
|
+
}
|
798
|
+
|
799
|
+
if (distance < minDistance) {
|
800
|
+
minDistance = distance;
|
801
|
+
bestPoint = point;
|
802
|
+
}
|
803
|
+
});
|
804
|
+
});
|
805
|
+
|
806
|
+
return bestPoint ? bestPoint.highlight() : false;
|
807
|
+
};
|
808
|
+
|
809
|
+
|
810
|
+
/**
|
811
|
+
* Show the export menu and focus the first item (if exists).
|
812
|
+
*
|
813
|
+
* @private
|
814
|
+
* @function Highcharts.Chart#showExportMenu
|
815
|
+
*/
|
816
|
+
H.Chart.prototype.showExportMenu = function () {
|
817
|
+
if (this.exportSVGElements && this.exportSVGElements[0]) {
|
818
|
+
this.exportSVGElements[0].element.onclick();
|
819
|
+
this.highlightExportItem(0);
|
820
|
+
}
|
821
|
+
};
|
822
|
+
|
823
|
+
|
824
|
+
/**
|
825
|
+
* Hide export menu.
|
826
|
+
*
|
827
|
+
* @private
|
828
|
+
* @function Highcharts.Chart#hideExportMenu
|
829
|
+
*/
|
830
|
+
H.Chart.prototype.hideExportMenu = function () {
|
831
|
+
var chart = this,
|
832
|
+
exportList = chart.exportDivElements;
|
833
|
+
|
834
|
+
if (exportList && chart.exportContextMenu) {
|
835
|
+
// Reset hover states etc.
|
836
|
+
exportList.forEach(function (el) {
|
837
|
+
if (el.className === 'highcharts-menu-item' && el.onmouseout) {
|
838
|
+
el.onmouseout();
|
839
|
+
}
|
840
|
+
});
|
841
|
+
chart.highlightedExportItem = 0;
|
842
|
+
// Hide the menu div
|
843
|
+
chart.exportContextMenu.hideMenu();
|
844
|
+
// Make sure the chart has focus and can capture keyboard events
|
845
|
+
chart.container.focus();
|
846
|
+
}
|
847
|
+
};
|
848
|
+
|
849
|
+
|
850
|
+
/**
|
851
|
+
* Highlight export menu item by index.
|
852
|
+
*
|
853
|
+
* @private
|
854
|
+
* @function Highcharts.Chart#highlightExportItem
|
855
|
+
*
|
856
|
+
* @param {number} ix
|
857
|
+
*
|
858
|
+
* @return {true|undefined}
|
859
|
+
*/
|
860
|
+
H.Chart.prototype.highlightExportItem = function (ix) {
|
861
|
+
var listItem = this.exportDivElements && this.exportDivElements[ix],
|
862
|
+
curHighlighted =
|
863
|
+
this.exportDivElements &&
|
864
|
+
this.exportDivElements[this.highlightedExportItem],
|
865
|
+
hasSVGFocusSupport;
|
866
|
+
|
867
|
+
if (
|
868
|
+
listItem &&
|
869
|
+
listItem.tagName === 'DIV' &&
|
870
|
+
!(listItem.children && listItem.children.length)
|
871
|
+
) {
|
872
|
+
// Test if we have focus support for SVG elements
|
873
|
+
hasSVGFocusSupport = !!(
|
874
|
+
this.renderTo.getElementsByTagName('g')[0] || {}
|
875
|
+
).focus;
|
876
|
+
|
877
|
+
// Only focus if we can set focus back to the elements after
|
878
|
+
// destroying the menu (#7422)
|
879
|
+
if (listItem.focus && hasSVGFocusSupport) {
|
880
|
+
listItem.focus();
|
881
|
+
}
|
882
|
+
if (curHighlighted && curHighlighted.onmouseout) {
|
883
|
+
curHighlighted.onmouseout();
|
884
|
+
}
|
885
|
+
if (listItem.onmouseover) {
|
886
|
+
listItem.onmouseover();
|
887
|
+
}
|
888
|
+
this.highlightedExportItem = ix;
|
889
|
+
return true;
|
890
|
+
}
|
891
|
+
};
|
892
|
+
|
893
|
+
|
894
|
+
/**
|
895
|
+
* Try to highlight the last valid export menu item.
|
896
|
+
*
|
897
|
+
* @private
|
898
|
+
* @function Highcharts.Chart#highlightLastExportItem
|
899
|
+
*/
|
900
|
+
H.Chart.prototype.highlightLastExportItem = function () {
|
901
|
+
var chart = this,
|
902
|
+
i;
|
903
|
+
|
904
|
+
if (chart.exportDivElements) {
|
905
|
+
i = chart.exportDivElements.length;
|
906
|
+
while (i--) {
|
907
|
+
if (chart.highlightExportItem(i)) {
|
908
|
+
break;
|
909
|
+
}
|
910
|
+
}
|
911
|
+
}
|
912
|
+
};
|
913
|
+
|
914
|
+
|
915
|
+
/**
|
916
|
+
* Highlight range selector button by index.
|
917
|
+
*
|
918
|
+
* @private
|
919
|
+
* @function Highcharts.Chart#highlightRangeSelectorButton
|
920
|
+
*
|
921
|
+
* @param {number} ix
|
922
|
+
*
|
923
|
+
* @return {boolean}
|
924
|
+
*/
|
925
|
+
H.Chart.prototype.highlightRangeSelectorButton = function (ix) {
|
926
|
+
var buttons = this.rangeSelector.buttons;
|
927
|
+
|
928
|
+
// Deselect old
|
929
|
+
if (buttons[this.highlightedRangeSelectorItemIx]) {
|
930
|
+
buttons[this.highlightedRangeSelectorItemIx].setState(
|
931
|
+
this.oldRangeSelectorItemState || 0
|
932
|
+
);
|
933
|
+
}
|
934
|
+
// Select new
|
935
|
+
this.highlightedRangeSelectorItemIx = ix;
|
936
|
+
if (buttons[ix]) {
|
937
|
+
this.setFocusToElement(buttons[ix].box, buttons[ix]);
|
938
|
+
this.oldRangeSelectorItemState = buttons[ix].state;
|
939
|
+
buttons[ix].setState(2);
|
940
|
+
return true;
|
941
|
+
}
|
942
|
+
return false;
|
943
|
+
};
|
944
|
+
|
945
|
+
|
946
|
+
/**
|
947
|
+
* Highlight legend item by index.
|
948
|
+
*
|
949
|
+
* @private
|
950
|
+
* @function Highcharts.Chart#highlightLegendItem
|
951
|
+
*
|
952
|
+
* @param {number} ix
|
953
|
+
*
|
954
|
+
* @return {boolean}
|
955
|
+
*/
|
956
|
+
H.Chart.prototype.highlightLegendItem = function (ix) {
|
957
|
+
var items = this.legend.allItems,
|
958
|
+
oldIx = this.highlightedLegendItemIx;
|
959
|
+
|
960
|
+
if (items[ix]) {
|
961
|
+
if (items[oldIx]) {
|
962
|
+
fireEvent(
|
963
|
+
items[oldIx].legendGroup.element,
|
964
|
+
'mouseout'
|
965
|
+
);
|
966
|
+
}
|
967
|
+
// Scroll if we have to
|
968
|
+
if (items[ix].pageIx !== undefined &&
|
969
|
+
items[ix].pageIx + 1 !== this.legend.currentPage) {
|
970
|
+
this.legend.scroll(1 + items[ix].pageIx - this.legend.currentPage);
|
971
|
+
}
|
972
|
+
// Focus
|
973
|
+
this.highlightedLegendItemIx = ix;
|
974
|
+
this.setFocusToElement(items[ix].legendItem, items[ix].legendGroup);
|
975
|
+
fireEvent(items[ix].legendGroup.element, 'mouseover');
|
976
|
+
return true;
|
977
|
+
}
|
978
|
+
return false;
|
979
|
+
};
|
980
|
+
|
981
|
+
|
982
|
+
/**
|
983
|
+
* Add keyboard navigation handling modules to chart.
|
984
|
+
*
|
985
|
+
* @private
|
986
|
+
* @function Highcharts.Chart#addKeyboardNavigationModules
|
987
|
+
*/
|
988
|
+
H.Chart.prototype.addKeyboardNavigationModules = function () {
|
989
|
+
var chart = this;
|
990
|
+
|
991
|
+
/**
|
992
|
+
* @private
|
993
|
+
* @function navModuleFactory
|
994
|
+
*
|
995
|
+
* @param {string} id
|
996
|
+
*
|
997
|
+
* @param {Array<Array<number>,Function>} keyMap
|
998
|
+
*
|
999
|
+
* @param {Highcharts.Dictionary<Function>} options
|
1000
|
+
*
|
1001
|
+
* @return {KeyboardNavigationModule}
|
1002
|
+
*/
|
1003
|
+
function navModuleFactory(id, keyMap, options) {
|
1004
|
+
return new KeyboardNavigationModule(chart, merge({
|
1005
|
+
keyCodeMap: keyMap
|
1006
|
+
}, { id: id }, options));
|
1007
|
+
}
|
1008
|
+
|
1009
|
+
/**
|
1010
|
+
* List of the different keyboard handling modes we use depending on where
|
1011
|
+
* we are in the chart. Each mode has a set of handling functions mapped to
|
1012
|
+
* key codes. Each mode determines when to move to the next/prev mode.
|
1013
|
+
*
|
1014
|
+
* @private
|
1015
|
+
* @name Highcharts.Chart#keyboardNavigationModules
|
1016
|
+
* @type {Array<KeyboardNavigationModule>}
|
1017
|
+
*/
|
1018
|
+
chart.keyboardNavigationModules = [
|
1019
|
+
|
1020
|
+
// Entry point catching the first tab, allowing users to tab into points
|
1021
|
+
// more intuitively.
|
1022
|
+
navModuleFactory('entry', []),
|
1023
|
+
|
1024
|
+
// Points
|
1025
|
+
navModuleFactory('points', [
|
1026
|
+
// Left/Right
|
1027
|
+
[[37, 39], function (keyCode) {
|
1028
|
+
var right = keyCode === 39;
|
1029
|
+
|
1030
|
+
if (!chart.highlightAdjacentPoint(right)) {
|
1031
|
+
// Failed to highlight next, wrap to last/first
|
1032
|
+
return this.init(right ? 1 : -1);
|
1033
|
+
}
|
1034
|
+
return true;
|
1035
|
+
}],
|
1036
|
+
// Up/Down
|
1037
|
+
[[38, 40], function (keyCode) {
|
1038
|
+
var down = keyCode !== 38,
|
1039
|
+
navOptions = chart.options.accessibility.keyboardNavigation;
|
1040
|
+
|
1041
|
+
if (navOptions.mode && navOptions.mode === 'serialize') {
|
1042
|
+
// Act like left/right
|
1043
|
+
if (!chart.highlightAdjacentPoint(down)) {
|
1044
|
+
return this.init(down ? 1 : -1);
|
1045
|
+
}
|
1046
|
+
return true;
|
1047
|
+
}
|
1048
|
+
// Normal mode, move between series
|
1049
|
+
var highlightMethod = chart.highlightedPoint &&
|
1050
|
+
chart.highlightedPoint.series.keyboardMoveVertical ?
|
1051
|
+
'highlightAdjacentPointVertical' :
|
1052
|
+
'highlightAdjacentSeries';
|
1053
|
+
|
1054
|
+
chart[highlightMethod](down);
|
1055
|
+
return true;
|
1056
|
+
}],
|
1057
|
+
// Enter/Spacebar
|
1058
|
+
[[13, 32], function () {
|
1059
|
+
if (chart.highlightedPoint) {
|
1060
|
+
chart.highlightedPoint.firePointEvent('click');
|
1061
|
+
}
|
1062
|
+
}]
|
1063
|
+
], {
|
1064
|
+
// Always start highlighting from scratch when entering this module
|
1065
|
+
init: function (dir) {
|
1066
|
+
var numSeries = chart.series.length,
|
1067
|
+
i = dir > 0 ? 0 : numSeries,
|
1068
|
+
res;
|
1069
|
+
|
1070
|
+
if (dir > 0) {
|
1071
|
+
delete chart.highlightedPoint;
|
1072
|
+
// Find first valid point to highlight
|
1073
|
+
while (i < numSeries) {
|
1074
|
+
res = chart.series[i].highlightFirstValidPoint();
|
1075
|
+
if (res) {
|
1076
|
+
return res;
|
1077
|
+
}
|
1078
|
+
++i;
|
1079
|
+
}
|
1080
|
+
} else {
|
1081
|
+
// Find last valid point to highlight
|
1082
|
+
while (i--) {
|
1083
|
+
chart.highlightedPoint = chart.series[i].points[
|
1084
|
+
chart.series[i].points.length - 1
|
1085
|
+
];
|
1086
|
+
// Highlight first valid point in the series will also
|
1087
|
+
// look backwards. It always starts from currently
|
1088
|
+
// highlighted point.
|
1089
|
+
res = chart.series[i].highlightFirstValidPoint();
|
1090
|
+
if (res) {
|
1091
|
+
return res;
|
1092
|
+
}
|
1093
|
+
}
|
1094
|
+
}
|
1095
|
+
},
|
1096
|
+
// If leaving points, don't show tooltip anymore
|
1097
|
+
terminate: function () {
|
1098
|
+
if (chart.tooltip) {
|
1099
|
+
chart.tooltip.hide(0);
|
1100
|
+
}
|
1101
|
+
delete chart.highlightedPoint;
|
1102
|
+
}
|
1103
|
+
}),
|
1104
|
+
|
1105
|
+
// Reset zoom
|
1106
|
+
navModuleFactory('resetZoom', [
|
1107
|
+
// Tab/Up/Down/Left/Right - just move
|
1108
|
+
[[9, 37, 38, 39, 40], function (keyCode, e) {
|
1109
|
+
return this.move((
|
1110
|
+
keyCode === 9 && e.shiftKey ||
|
1111
|
+
keyCode === 38 || keyCode === 37
|
1112
|
+
) ? -1 : 1);
|
1113
|
+
}],
|
1114
|
+
// Space/Enter - select
|
1115
|
+
[[13, 32], function () {
|
1116
|
+
chart.zoomOut();
|
1117
|
+
}]
|
1118
|
+
], {
|
1119
|
+
// Only run if we have a reset zoom button
|
1120
|
+
validate: function () {
|
1121
|
+
return chart.resetZoomButton && chart.resetZoomButton.box;
|
1122
|
+
},
|
1123
|
+
init: function () {
|
1124
|
+
chart.setFocusToElement(
|
1125
|
+
chart.resetZoomButton.box, chart.resetZoomButton
|
1126
|
+
);
|
1127
|
+
}
|
1128
|
+
}),
|
1129
|
+
|
1130
|
+
// Exporting
|
1131
|
+
navModuleFactory('exporting', [
|
1132
|
+
// Left/Up
|
1133
|
+
[[37, 38], function () {
|
1134
|
+
var i = chart.highlightedExportItem || 0,
|
1135
|
+
reachedEnd = true;
|
1136
|
+
|
1137
|
+
// Try to highlight prev item in list. Highlighting e.g.
|
1138
|
+
// separators will fail.
|
1139
|
+
while (i--) {
|
1140
|
+
if (chart.highlightExportItem(i)) {
|
1141
|
+
reachedEnd = false;
|
1142
|
+
break;
|
1143
|
+
}
|
1144
|
+
}
|
1145
|
+
if (reachedEnd) {
|
1146
|
+
chart.highlightLastExportItem();
|
1147
|
+
return true;
|
1148
|
+
}
|
1149
|
+
}],
|
1150
|
+
// Right/Down
|
1151
|
+
[[39, 40], function () {
|
1152
|
+
var highlightedExportItem = chart.highlightedExportItem || 0,
|
1153
|
+
reachedEnd = true;
|
1154
|
+
|
1155
|
+
// Try to highlight next item in list. Highlighting e.g.
|
1156
|
+
// separators will fail.
|
1157
|
+
for (
|
1158
|
+
var i = highlightedExportItem + 1;
|
1159
|
+
i < chart.exportDivElements.length;
|
1160
|
+
++i
|
1161
|
+
) {
|
1162
|
+
if (chart.highlightExportItem(i)) {
|
1163
|
+
reachedEnd = false;
|
1164
|
+
break;
|
1165
|
+
}
|
1166
|
+
}
|
1167
|
+
if (reachedEnd) {
|
1168
|
+
chart.highlightExportItem(0);
|
1169
|
+
return true;
|
1170
|
+
}
|
1171
|
+
}],
|
1172
|
+
// Enter/Spacebar
|
1173
|
+
[[13, 32], function () {
|
1174
|
+
fakeClickEvent(
|
1175
|
+
chart.exportDivElements[chart.highlightedExportItem]
|
1176
|
+
);
|
1177
|
+
}]
|
1178
|
+
], {
|
1179
|
+
// Only run exporting navigation if exporting support exists and is
|
1180
|
+
// enabled on chart
|
1181
|
+
validate: function () {
|
1182
|
+
return (
|
1183
|
+
chart.exportChart &&
|
1184
|
+
!(
|
1185
|
+
chart.options.exporting &&
|
1186
|
+
chart.options.exporting.enabled === false
|
1187
|
+
)
|
1188
|
+
);
|
1189
|
+
},
|
1190
|
+
// Show export menu
|
1191
|
+
init: function (direction) {
|
1192
|
+
chart.highlightedPoint = null;
|
1193
|
+
chart.showExportMenu();
|
1194
|
+
// If coming back to export menu from other module, try to
|
1195
|
+
// highlight last item in menu
|
1196
|
+
if (direction < 0) {
|
1197
|
+
chart.highlightLastExportItem();
|
1198
|
+
}
|
1199
|
+
},
|
1200
|
+
// Hide the menu
|
1201
|
+
terminate: function () {
|
1202
|
+
chart.hideExportMenu();
|
1203
|
+
}
|
1204
|
+
}),
|
1205
|
+
|
1206
|
+
// Map zoom
|
1207
|
+
navModuleFactory('mapZoom', [
|
1208
|
+
// Up/down/left/right
|
1209
|
+
[[38, 40, 37, 39], function (keyCode) {
|
1210
|
+
chart[keyCode === 38 || keyCode === 40 ? 'yAxis' : 'xAxis'][0]
|
1211
|
+
.panStep(keyCode < 39 ? -1 : 1);
|
1212
|
+
}],
|
1213
|
+
|
1214
|
+
// Tabs
|
1215
|
+
[[9], function (keyCode, e) {
|
1216
|
+
var button;
|
1217
|
+
|
1218
|
+
// Deselect old
|
1219
|
+
chart.mapNavButtons[chart.focusedMapNavButtonIx].setState(0);
|
1220
|
+
if (
|
1221
|
+
e.shiftKey && !chart.focusedMapNavButtonIx ||
|
1222
|
+
!e.shiftKey && chart.focusedMapNavButtonIx
|
1223
|
+
) { // trying to go somewhere we can't?
|
1224
|
+
chart.mapZoom(); // Reset zoom
|
1225
|
+
// Nowhere to go, go to prev/next module
|
1226
|
+
return this.move(e.shiftKey ? -1 : 1);
|
1227
|
+
}
|
1228
|
+
chart.focusedMapNavButtonIx += e.shiftKey ? -1 : 1;
|
1229
|
+
button = chart.mapNavButtons[chart.focusedMapNavButtonIx];
|
1230
|
+
chart.setFocusToElement(button.box, button);
|
1231
|
+
button.setState(2);
|
1232
|
+
}],
|
1233
|
+
|
1234
|
+
// Enter/Spacebar
|
1235
|
+
[[13, 32], function () {
|
1236
|
+
fakeClickEvent(
|
1237
|
+
chart.mapNavButtons[chart.focusedMapNavButtonIx].element
|
1238
|
+
);
|
1239
|
+
}]
|
1240
|
+
], {
|
1241
|
+
// Only run this module if we have map zoom on the chart
|
1242
|
+
validate: function () {
|
1243
|
+
return (
|
1244
|
+
chart.mapZoom &&
|
1245
|
+
chart.mapNavButtons &&
|
1246
|
+
chart.mapNavButtons.length === 2
|
1247
|
+
);
|
1248
|
+
},
|
1249
|
+
|
1250
|
+
// Make zoom buttons do their magic
|
1251
|
+
init: function (direction) {
|
1252
|
+
var zoomIn = chart.mapNavButtons[0],
|
1253
|
+
zoomOut = chart.mapNavButtons[1],
|
1254
|
+
initialButton = direction > 0 ? zoomIn : zoomOut;
|
1255
|
+
|
1256
|
+
chart.mapNavButtons.forEach(function (button, i) {
|
1257
|
+
button.element.setAttribute('tabindex', -1);
|
1258
|
+
button.element.setAttribute('role', 'button');
|
1259
|
+
button.element.setAttribute(
|
1260
|
+
'aria-label',
|
1261
|
+
chart.langFormat(
|
1262
|
+
'accessibility.mapZoom' + (i ? 'Out' : 'In'),
|
1263
|
+
{ chart: chart }
|
1264
|
+
)
|
1265
|
+
);
|
1266
|
+
});
|
1267
|
+
|
1268
|
+
chart.setFocusToElement(initialButton.box, initialButton);
|
1269
|
+
initialButton.setState(2);
|
1270
|
+
chart.focusedMapNavButtonIx = direction > 0 ? 0 : 1;
|
1271
|
+
}
|
1272
|
+
}),
|
1273
|
+
|
1274
|
+
// Highstock range selector (minus input boxes)
|
1275
|
+
navModuleFactory('rangeSelector', [
|
1276
|
+
// Left/Right/Up/Down
|
1277
|
+
[[37, 39, 38, 40], function (keyCode) {
|
1278
|
+
var direction = (keyCode === 37 || keyCode === 38) ? -1 : 1;
|
1279
|
+
|
1280
|
+
// Try to highlight next/prev button
|
1281
|
+
if (
|
1282
|
+
!chart.highlightRangeSelectorButton(
|
1283
|
+
chart.highlightedRangeSelectorItemIx + direction
|
1284
|
+
)
|
1285
|
+
) {
|
1286
|
+
return this.move(direction);
|
1287
|
+
}
|
1288
|
+
}],
|
1289
|
+
// Enter/Spacebar
|
1290
|
+
[[13, 32], function () {
|
1291
|
+
// Don't allow click if button used to be disabled
|
1292
|
+
if (chart.oldRangeSelectorItemState !== 3) {
|
1293
|
+
fakeClickEvent(
|
1294
|
+
chart.rangeSelector.buttons[
|
1295
|
+
chart.highlightedRangeSelectorItemIx
|
1296
|
+
].element
|
1297
|
+
);
|
1298
|
+
}
|
1299
|
+
}]
|
1300
|
+
], {
|
1301
|
+
// Only run this module if we have range selector
|
1302
|
+
validate: function () {
|
1303
|
+
return (
|
1304
|
+
chart.rangeSelector &&
|
1305
|
+
chart.rangeSelector.buttons &&
|
1306
|
+
chart.rangeSelector.buttons.length
|
1307
|
+
);
|
1308
|
+
},
|
1309
|
+
|
1310
|
+
// Make elements focusable and accessible
|
1311
|
+
init: function (direction) {
|
1312
|
+
chart.rangeSelector.buttons.forEach(function (button) {
|
1313
|
+
button.element.setAttribute('tabindex', '-1');
|
1314
|
+
button.element.setAttribute('role', 'button');
|
1315
|
+
button.element.setAttribute(
|
1316
|
+
'aria-label',
|
1317
|
+
chart.langFormat(
|
1318
|
+
'accessibility.rangeSelectorButton',
|
1319
|
+
{
|
1320
|
+
chart: chart,
|
1321
|
+
buttonText: button.text && button.text.textStr
|
1322
|
+
}
|
1323
|
+
)
|
1324
|
+
);
|
1325
|
+
});
|
1326
|
+
// Focus first/last button
|
1327
|
+
chart.highlightRangeSelectorButton(
|
1328
|
+
direction > 0 ? 0 : chart.rangeSelector.buttons.length - 1
|
1329
|
+
);
|
1330
|
+
}
|
1331
|
+
}),
|
1332
|
+
|
1333
|
+
// Highstock range selector, input boxes
|
1334
|
+
navModuleFactory('rangeSelectorInput', [
|
1335
|
+
// Tab/Up/Down
|
1336
|
+
[[9, 38, 40], function (keyCode, e) {
|
1337
|
+
var direction =
|
1338
|
+
(keyCode === 9 && e.shiftKey || keyCode === 38) ? -1 : 1,
|
1339
|
+
|
1340
|
+
newIx = chart.highlightedInputRangeIx =
|
1341
|
+
chart.highlightedInputRangeIx + direction;
|
1342
|
+
|
1343
|
+
// Try to highlight next/prev item in list.
|
1344
|
+
if (newIx > 1 || newIx < 0) { // Out of range
|
1345
|
+
return this.move(direction);
|
1346
|
+
}
|
1347
|
+
chart.rangeSelector[newIx ? 'maxInput' : 'minInput'].focus();
|
1348
|
+
}]
|
1349
|
+
], {
|
1350
|
+
// Only run if we have range selector with input boxes
|
1351
|
+
validate: function () {
|
1352
|
+
var inputVisible = (
|
1353
|
+
chart.rangeSelector &&
|
1354
|
+
chart.rangeSelector.inputGroup &&
|
1355
|
+
chart.rangeSelector.inputGroup.element
|
1356
|
+
.getAttribute('visibility') !== 'hidden'
|
1357
|
+
);
|
1358
|
+
|
1359
|
+
return (
|
1360
|
+
inputVisible &&
|
1361
|
+
chart.options.rangeSelector.inputEnabled !== false &&
|
1362
|
+
chart.rangeSelector.minInput &&
|
1363
|
+
chart.rangeSelector.maxInput
|
1364
|
+
);
|
1365
|
+
},
|
1366
|
+
|
1367
|
+
// Highlight first/last input box
|
1368
|
+
init: function (direction) {
|
1369
|
+
chart.highlightedInputRangeIx = direction > 0 ? 0 : 1;
|
1370
|
+
chart.rangeSelector[
|
1371
|
+
chart.highlightedInputRangeIx ? 'maxInput' : 'minInput'
|
1372
|
+
].focus();
|
1373
|
+
}
|
1374
|
+
}),
|
1375
|
+
|
1376
|
+
// Legend navigation
|
1377
|
+
navModuleFactory('legend', [
|
1378
|
+
// Left/Right/Up/Down
|
1379
|
+
[[37, 39, 38, 40], function (keyCode) {
|
1380
|
+
var direction = (keyCode === 37 || keyCode === 38) ? -1 : 1;
|
1381
|
+
|
1382
|
+
// Try to highlight next/prev legend item
|
1383
|
+
if (!chart.highlightLegendItem(
|
1384
|
+
chart.highlightedLegendItemIx + direction
|
1385
|
+
) && chart.legend.allItems.length > 1) {
|
1386
|
+
// Wrap around if more than 1 item
|
1387
|
+
this.init(direction);
|
1388
|
+
}
|
1389
|
+
}],
|
1390
|
+
// Enter/Spacebar
|
1391
|
+
[[13, 32], function () {
|
1392
|
+
var legendElement = chart.legend.allItems[
|
1393
|
+
chart.highlightedLegendItemIx
|
1394
|
+
].legendItem.element;
|
1395
|
+
|
1396
|
+
fakeClickEvent(
|
1397
|
+
!chart.legend.options.useHTML ? // #8561
|
1398
|
+
legendElement.parentNode : legendElement
|
1399
|
+
);
|
1400
|
+
}]
|
1401
|
+
], {
|
1402
|
+
// Only run this module if we have at least one legend - wait for
|
1403
|
+
// it - item. Don't run if the legend is populated by a colorAxis.
|
1404
|
+
// Don't run if legend navigation is disabled.
|
1405
|
+
validate: function () {
|
1406
|
+
return chart.legend && chart.legend.allItems &&
|
1407
|
+
chart.legend.display &&
|
1408
|
+
!(chart.colorAxis && chart.colorAxis.length) &&
|
1409
|
+
(chart.options.legend &&
|
1410
|
+
chart.options.legend.keyboardNavigation &&
|
1411
|
+
chart.options.legend.keyboardNavigation.enabled) !== false;
|
1412
|
+
},
|
1413
|
+
|
1414
|
+
// Make elements focusable
|
1415
|
+
init: function (direction) {
|
1416
|
+
chart.legend.allItems.forEach(function (item) {
|
1417
|
+
item.legendGroup.element.setAttribute('tabindex', '-1');
|
1418
|
+
});
|
1419
|
+
// Focus first/last item
|
1420
|
+
chart.highlightLegendItem(
|
1421
|
+
direction > 0 ? 0 : chart.legend.allItems.length - 1
|
1422
|
+
);
|
1423
|
+
}
|
1424
|
+
})
|
1425
|
+
];
|
1426
|
+
};
|
1427
|
+
|
1428
|
+
|
1429
|
+
/**
|
1430
|
+
* Add exit anchor to the chart. We use this to move focus out of chart whenever
|
1431
|
+
* we want, by setting focus to this div and not preventing the default tab
|
1432
|
+
* action. We also use this when users come back into the chart by tabbing back,
|
1433
|
+
* in order to navigate from the end of the chart.
|
1434
|
+
*
|
1435
|
+
* @private
|
1436
|
+
* @function Highcharts.Chart#addExitAnchor
|
1437
|
+
*
|
1438
|
+
* @return {Function}
|
1439
|
+
* Returns the unbind function for the exit anchor's event handler.
|
1440
|
+
*/
|
1441
|
+
H.Chart.prototype.addExitAnchor = function () {
|
1442
|
+
var chart = this;
|
1443
|
+
|
1444
|
+
chart.tabExitAnchor = doc.createElement('div');
|
1445
|
+
chart.tabExitAnchor.setAttribute('tabindex', '0');
|
1446
|
+
|
1447
|
+
// Hide exit anchor
|
1448
|
+
merge(true, chart.tabExitAnchor.style, {
|
1449
|
+
position: 'absolute',
|
1450
|
+
top: '-999em',
|
1451
|
+
width: '1px',
|
1452
|
+
height: '1px',
|
1453
|
+
overflow: 'hidden'
|
1454
|
+
});
|
1455
|
+
|
1456
|
+
chart.renderTo.appendChild(chart.tabExitAnchor);
|
1457
|
+
return addEvent(
|
1458
|
+
chart.tabExitAnchor,
|
1459
|
+
'focus',
|
1460
|
+
function (ev) {
|
1461
|
+
var e = ev || win.event,
|
1462
|
+
curModule;
|
1463
|
+
|
1464
|
+
// If focusing and we are exiting, do nothing once.
|
1465
|
+
if (!chart.exiting) {
|
1466
|
+
|
1467
|
+
// Not exiting, means we are coming in backwards
|
1468
|
+
chart.renderTo.focus();
|
1469
|
+
e.preventDefault();
|
1470
|
+
|
1471
|
+
// Move to last valid keyboard nav module
|
1472
|
+
// Note the we don't run it, just set the index
|
1473
|
+
chart.keyboardNavigationModuleIndex =
|
1474
|
+
chart.keyboardNavigationModules.length - 1;
|
1475
|
+
curModule = chart.keyboardNavigationModules[
|
1476
|
+
chart.keyboardNavigationModuleIndex
|
1477
|
+
];
|
1478
|
+
|
1479
|
+
// Validate the module
|
1480
|
+
if (curModule.validate && !curModule.validate()) {
|
1481
|
+
// Invalid.
|
1482
|
+
// Move inits next valid module in direction
|
1483
|
+
curModule.move(-1);
|
1484
|
+
} else {
|
1485
|
+
// We have a valid module, init it
|
1486
|
+
curModule.init(-1);
|
1487
|
+
}
|
1488
|
+
|
1489
|
+
} else {
|
1490
|
+
// Don't skip the next focus, we only skip once.
|
1491
|
+
chart.exiting = false;
|
1492
|
+
}
|
1493
|
+
}
|
1494
|
+
);
|
1495
|
+
};
|
1496
|
+
|
1497
|
+
|
1498
|
+
/**
|
1499
|
+
* Clear the chart and reset the navigation state.
|
1500
|
+
*
|
1501
|
+
* @private
|
1502
|
+
* @function Highcharts.Chart#resetKeyboardNavigation
|
1503
|
+
*/
|
1504
|
+
H.Chart.prototype.resetKeyboardNavigation = function () {
|
1505
|
+
var chart = this,
|
1506
|
+
curMod = (
|
1507
|
+
chart.keyboardNavigationModules &&
|
1508
|
+
chart.keyboardNavigationModules[
|
1509
|
+
chart.keyboardNavigationModuleIndex || 0
|
1510
|
+
]
|
1511
|
+
);
|
1512
|
+
|
1513
|
+
if (curMod && curMod.terminate) {
|
1514
|
+
curMod.terminate();
|
1515
|
+
}
|
1516
|
+
if (chart.focusElement) {
|
1517
|
+
chart.focusElement.removeFocusBorder();
|
1518
|
+
}
|
1519
|
+
chart.keyboardNavigationModuleIndex = 0;
|
1520
|
+
chart.keyboardReset = true;
|
1521
|
+
};
|
1522
|
+
|
1523
|
+
|
1524
|
+
// On destroy, we need to clean up the focus border and the state.
|
1525
|
+
H.addEvent(H.Series, 'destroy', function () {
|
1526
|
+
var chart = this.chart;
|
1527
|
+
|
1528
|
+
if (chart.highlightedPoint && chart.highlightedPoint.series === this) {
|
1529
|
+
delete chart.highlightedPoint;
|
1530
|
+
if (chart.focusElement) {
|
1531
|
+
chart.focusElement.removeFocusBorder();
|
1532
|
+
}
|
1533
|
+
}
|
1534
|
+
});
|
1535
|
+
|
1536
|
+
|
1537
|
+
// Add keyboard navigation events on chart load.
|
1538
|
+
H.Chart.prototype.callbacks.push(function (chart) {
|
1539
|
+
var a11yOptions = chart.options.accessibility;
|
1540
|
+
|
1541
|
+
if (a11yOptions.enabled && a11yOptions.keyboardNavigation.enabled) {
|
1542
|
+
|
1543
|
+
// Init nav modules. We start at the first module, and as the user
|
1544
|
+
// navigates through the chart the index will increase to use different
|
1545
|
+
// handler modules.
|
1546
|
+
chart.addKeyboardNavigationModules();
|
1547
|
+
chart.keyboardNavigationModuleIndex = 0;
|
1548
|
+
|
1549
|
+
// Make chart container reachable by tab
|
1550
|
+
if (
|
1551
|
+
chart.container.hasAttribute &&
|
1552
|
+
!chart.container.hasAttribute('tabIndex')
|
1553
|
+
) {
|
1554
|
+
chart.container.setAttribute('tabindex', '0');
|
1555
|
+
}
|
1556
|
+
|
1557
|
+
// Add tab exit anchor
|
1558
|
+
if (!chart.tabExitAnchor) {
|
1559
|
+
chart.unbindExitAnchorFocus = chart.addExitAnchor();
|
1560
|
+
}
|
1561
|
+
|
1562
|
+
// Handle keyboard events by routing them to active keyboard nav module
|
1563
|
+
chart.unbindKeydownHandler = addEvent(chart.renderTo, 'keydown',
|
1564
|
+
function (ev) {
|
1565
|
+
var e = ev || win.event,
|
1566
|
+
curNavModule = chart.keyboardNavigationModules[
|
1567
|
+
chart.keyboardNavigationModuleIndex
|
1568
|
+
];
|
1569
|
+
|
1570
|
+
chart.keyboardReset = false;
|
1571
|
+
// If there is a nav module for the current index, run it.
|
1572
|
+
// Otherwise, we are outside of the chart in some direction.
|
1573
|
+
if (curNavModule) {
|
1574
|
+
if (curNavModule.run(e)) {
|
1575
|
+
// Successfully handled this key event, stop default
|
1576
|
+
e.preventDefault();
|
1577
|
+
}
|
1578
|
+
}
|
1579
|
+
});
|
1580
|
+
|
1581
|
+
// Reset chart navigation state if we click outside the chart and it's
|
1582
|
+
// not already reset
|
1583
|
+
chart.unbindBlurHandler = addEvent(doc, 'mouseup', function () {
|
1584
|
+
if (
|
1585
|
+
!chart.keyboardReset &&
|
1586
|
+
!(chart.pointer && chart.pointer.chartPosition)
|
1587
|
+
) {
|
1588
|
+
chart.resetKeyboardNavigation();
|
1589
|
+
}
|
1590
|
+
});
|
1591
|
+
|
1592
|
+
// Add cleanup handlers
|
1593
|
+
addEvent(chart, 'destroy', function () {
|
1594
|
+
chart.resetKeyboardNavigation();
|
1595
|
+
if (chart.unbindExitAnchorFocus && chart.tabExitAnchor) {
|
1596
|
+
chart.unbindExitAnchorFocus();
|
1597
|
+
}
|
1598
|
+
if (chart.unbindKeydownHandler && chart.renderTo) {
|
1599
|
+
chart.unbindKeydownHandler();
|
1600
|
+
}
|
1601
|
+
if (chart.unbindBlurHandler) {
|
1602
|
+
chart.unbindBlurHandler();
|
1603
|
+
}
|
1604
|
+
});
|
1605
|
+
}
|
1606
|
+
});
|