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,134 @@
|
|
1
|
+
/**
|
2
|
+
* (c) 2010-2019 Torstein Honsi
|
3
|
+
*
|
4
|
+
* License: www.highcharts.com/license
|
5
|
+
*/
|
6
|
+
|
7
|
+
'use strict';
|
8
|
+
|
9
|
+
import H from './Globals.js';
|
10
|
+
import './Utilities.js';
|
11
|
+
|
12
|
+
var Axis = H.Axis,
|
13
|
+
getMagnitude = H.getMagnitude,
|
14
|
+
normalizeTickInterval = H.normalizeTickInterval,
|
15
|
+
timeUnits = H.timeUnits;
|
16
|
+
|
17
|
+
/**
|
18
|
+
* Set the tick positions to a time unit that makes sense, for example
|
19
|
+
* on the first of each month or on every Monday. Return an array
|
20
|
+
* with the time positions. Used in datetime axes as well as for grouping
|
21
|
+
* data on a datetime axis.
|
22
|
+
*
|
23
|
+
* @private
|
24
|
+
* @function Highcharts.Axis#getTimeTicks
|
25
|
+
*
|
26
|
+
* @param {*} normalizedInterval
|
27
|
+
* The interval in axis values (ms) and thecount
|
28
|
+
*
|
29
|
+
* @param {number} min
|
30
|
+
* The minimum in axis values
|
31
|
+
*
|
32
|
+
* @param {number} max
|
33
|
+
* The maximum in axis values
|
34
|
+
*
|
35
|
+
* @param {number} startOfWeek
|
36
|
+
*
|
37
|
+
* @return {number}
|
38
|
+
*/
|
39
|
+
Axis.prototype.getTimeTicks = function () {
|
40
|
+
return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
|
41
|
+
};
|
42
|
+
|
43
|
+
/**
|
44
|
+
* Get a normalized tick interval for dates. Returns a configuration object with
|
45
|
+
* unit range (interval), count and name. Used to prepare data for getTimeTicks.
|
46
|
+
* Previously this logic was part of getTimeTicks, but as getTimeTicks now runs
|
47
|
+
* of segments in stock charts, the normalizing logic was extracted in order to
|
48
|
+
* prevent it for running over again for each segment having the same interval.
|
49
|
+
* #662, #697.
|
50
|
+
*
|
51
|
+
* @private
|
52
|
+
* @function Highcharts.Axis#normalizeTimeTickInterval
|
53
|
+
*
|
54
|
+
* @param {number} tickInterval
|
55
|
+
*
|
56
|
+
* @param {Array<Array<number|string>>} [unitsOption]
|
57
|
+
*
|
58
|
+
* @return {*}
|
59
|
+
*/
|
60
|
+
Axis.prototype.normalizeTimeTickInterval = function (
|
61
|
+
tickInterval,
|
62
|
+
unitsOption
|
63
|
+
) {
|
64
|
+
var units = unitsOption || [[
|
65
|
+
'millisecond', // unit name
|
66
|
+
[1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
|
67
|
+
], [
|
68
|
+
'second',
|
69
|
+
[1, 2, 5, 10, 15, 30]
|
70
|
+
], [
|
71
|
+
'minute',
|
72
|
+
[1, 2, 5, 10, 15, 30]
|
73
|
+
], [
|
74
|
+
'hour',
|
75
|
+
[1, 2, 3, 4, 6, 8, 12]
|
76
|
+
], [
|
77
|
+
'day',
|
78
|
+
[1, 2]
|
79
|
+
], [
|
80
|
+
'week',
|
81
|
+
[1, 2]
|
82
|
+
], [
|
83
|
+
'month',
|
84
|
+
[1, 2, 3, 4, 6]
|
85
|
+
], [
|
86
|
+
'year',
|
87
|
+
null
|
88
|
+
]],
|
89
|
+
unit = units[units.length - 1], // default unit is years
|
90
|
+
interval = timeUnits[unit[0]],
|
91
|
+
multiples = unit[1],
|
92
|
+
count,
|
93
|
+
i;
|
94
|
+
|
95
|
+
// loop through the units to find the one that best fits the tickInterval
|
96
|
+
for (i = 0; i < units.length; i++) {
|
97
|
+
unit = units[i];
|
98
|
+
interval = timeUnits[unit[0]];
|
99
|
+
multiples = unit[1];
|
100
|
+
|
101
|
+
|
102
|
+
if (units[i + 1]) {
|
103
|
+
// lessThan is in the middle between the highest multiple and the
|
104
|
+
// next unit.
|
105
|
+
var lessThan = (interval * multiples[multiples.length - 1] +
|
106
|
+
timeUnits[units[i + 1][0]]) / 2;
|
107
|
+
|
108
|
+
// break and keep the current unit
|
109
|
+
if (tickInterval <= lessThan) {
|
110
|
+
break;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
115
|
+
// prevent 2.5 years intervals, though 25, 250 etc. are allowed
|
116
|
+
if (interval === timeUnits.year && tickInterval < 5 * interval) {
|
117
|
+
multiples = [1, 2, 5];
|
118
|
+
}
|
119
|
+
|
120
|
+
// get the count
|
121
|
+
count = normalizeTickInterval(
|
122
|
+
tickInterval / interval,
|
123
|
+
multiples,
|
124
|
+
unit[0] === 'year' ?
|
125
|
+
Math.max(getMagnitude(tickInterval / interval), 1) : // #1913, #2360
|
126
|
+
1
|
127
|
+
);
|
128
|
+
|
129
|
+
return {
|
130
|
+
unitRange: interval,
|
131
|
+
count: count,
|
132
|
+
unitName: unit[0]
|
133
|
+
};
|
134
|
+
};
|
@@ -0,0 +1,1301 @@
|
|
1
|
+
/**
|
2
|
+
* (c) 2010-2019 Torstein Honsi
|
3
|
+
*
|
4
|
+
* License: www.highcharts.com/license
|
5
|
+
*/
|
6
|
+
|
7
|
+
'use strict';
|
8
|
+
|
9
|
+
import H from './Globals.js';
|
10
|
+
import './Utilities.js';
|
11
|
+
import './Axis.js';
|
12
|
+
import './Chart.js';
|
13
|
+
import './Point.js';
|
14
|
+
import './Series.js';
|
15
|
+
|
16
|
+
var addEvent = H.addEvent,
|
17
|
+
animate = H.animate,
|
18
|
+
Axis = H.Axis,
|
19
|
+
Chart = H.Chart,
|
20
|
+
createElement = H.createElement,
|
21
|
+
css = H.css,
|
22
|
+
defined = H.defined,
|
23
|
+
erase = H.erase,
|
24
|
+
extend = H.extend,
|
25
|
+
fireEvent = H.fireEvent,
|
26
|
+
isNumber = H.isNumber,
|
27
|
+
isObject = H.isObject,
|
28
|
+
isArray = H.isArray,
|
29
|
+
merge = H.merge,
|
30
|
+
objectEach = H.objectEach,
|
31
|
+
pick = H.pick,
|
32
|
+
Point = H.Point,
|
33
|
+
Series = H.Series,
|
34
|
+
seriesTypes = H.seriesTypes,
|
35
|
+
setAnimation = H.setAnimation,
|
36
|
+
splat = H.splat;
|
37
|
+
|
38
|
+
|
39
|
+
// Remove settings that have not changed, to avoid unnecessary rendering or
|
40
|
+
// computing (#9197)
|
41
|
+
H.cleanRecursively = function (newer, older) {
|
42
|
+
var result = {};
|
43
|
+
|
44
|
+
objectEach(newer, function (val, key) {
|
45
|
+
var ob;
|
46
|
+
|
47
|
+
// Dive into objects
|
48
|
+
if (isObject(newer[key], true) && older[key]) {
|
49
|
+
ob = H.cleanRecursively(newer[key], older[key]);
|
50
|
+
if (Object.keys(ob).length) {
|
51
|
+
result[key] = ob;
|
52
|
+
}
|
53
|
+
|
54
|
+
// Arrays or primitives are copied directly
|
55
|
+
} else if (isObject(newer[key]) || newer[key] !== older[key]) {
|
56
|
+
result[key] = newer[key];
|
57
|
+
}
|
58
|
+
});
|
59
|
+
|
60
|
+
return result;
|
61
|
+
};
|
62
|
+
|
63
|
+
// Extend the Chart prototype for dynamic methods
|
64
|
+
extend(Chart.prototype, /** @lends Highcharts.Chart.prototype */ {
|
65
|
+
|
66
|
+
/**
|
67
|
+
* Add a series to the chart after render time. Note that this method should
|
68
|
+
* never be used when adding data synchronously at chart render time, as it
|
69
|
+
* adds expense to the calculations and rendering. When adding data at the
|
70
|
+
* same time as the chart is initialized, add the series as a configuration
|
71
|
+
* option instead. With multiple axes, the `offset` is dynamically adjusted.
|
72
|
+
*
|
73
|
+
* @sample highcharts/members/chart-addseries/
|
74
|
+
* Add a series from a button
|
75
|
+
* @sample stock/members/chart-addseries/
|
76
|
+
* Add a series in Highstock
|
77
|
+
*
|
78
|
+
* @function Highcharts.Chart#addSeries
|
79
|
+
*
|
80
|
+
* @param {Highcharts.SeriesOptionsType} options
|
81
|
+
* The config options for the series.
|
82
|
+
*
|
83
|
+
* @param {boolean} [redraw=true]
|
84
|
+
* Whether to redraw the chart after adding.
|
85
|
+
*
|
86
|
+
* @param {boolean|Highcharts.AnimationOptionsObject} [animation]
|
87
|
+
* Whether to apply animation, and optionally animation
|
88
|
+
* configuration.
|
89
|
+
*
|
90
|
+
* @return {Highcharts.Series}
|
91
|
+
* The newly created series object.
|
92
|
+
*
|
93
|
+
* @fires Highcharts.Chart#event:addSeries
|
94
|
+
* @fires Highcharts.Chart#event:afterAddSeries
|
95
|
+
*/
|
96
|
+
addSeries: function (options, redraw, animation) {
|
97
|
+
var series,
|
98
|
+
chart = this;
|
99
|
+
|
100
|
+
if (options) {
|
101
|
+
redraw = pick(redraw, true); // defaults to true
|
102
|
+
|
103
|
+
fireEvent(chart, 'addSeries', { options: options }, function () {
|
104
|
+
series = chart.initSeries(options);
|
105
|
+
|
106
|
+
chart.isDirtyLegend = true;
|
107
|
+
chart.linkSeries();
|
108
|
+
|
109
|
+
fireEvent(chart, 'afterAddSeries');
|
110
|
+
|
111
|
+
if (redraw) {
|
112
|
+
chart.redraw(animation);
|
113
|
+
}
|
114
|
+
});
|
115
|
+
}
|
116
|
+
|
117
|
+
return series;
|
118
|
+
},
|
119
|
+
|
120
|
+
/**
|
121
|
+
* Add an axis to the chart after render time. Note that this method should
|
122
|
+
* never be used when adding data synchronously at chart render time, as it
|
123
|
+
* adds expense to the calculations and rendering. When adding data at the
|
124
|
+
* same time as the chart is initialized, add the axis as a configuration
|
125
|
+
* option instead.
|
126
|
+
*
|
127
|
+
* @sample highcharts/members/chart-addaxis/
|
128
|
+
* Add and remove axes
|
129
|
+
*
|
130
|
+
* @function Highcharts.Chart#addAxis
|
131
|
+
*
|
132
|
+
* @param {Highcharts.XAxisOptions|Highcharts.YAxisOptions|Highcharts.ZAxisOptions} options
|
133
|
+
* The axis options.
|
134
|
+
*
|
135
|
+
* @param {boolean} [isX=false]
|
136
|
+
* Whether it is an X axis or a value axis.
|
137
|
+
*
|
138
|
+
* @param {boolean} [redraw=true]
|
139
|
+
* Whether to redraw the chart after adding.
|
140
|
+
*
|
141
|
+
* @param {boolean|Highcharts.AnimationOptionsObject} [animation=true]
|
142
|
+
* Whether and how to apply animation in the redraw.
|
143
|
+
*
|
144
|
+
* @return {Highcharts.Axis}
|
145
|
+
* The newly generated Axis object.
|
146
|
+
*/
|
147
|
+
addAxis: function (options, isX, redraw, animation) {
|
148
|
+
var key = isX ? 'xAxis' : 'yAxis',
|
149
|
+
chartOptions = this.options,
|
150
|
+
userOptions = merge(options, {
|
151
|
+
index: this[key].length,
|
152
|
+
isX: isX
|
153
|
+
}),
|
154
|
+
axis;
|
155
|
+
|
156
|
+
axis = new Axis(this, userOptions);
|
157
|
+
|
158
|
+
// Push the new axis options to the chart options
|
159
|
+
chartOptions[key] = splat(chartOptions[key] || {});
|
160
|
+
chartOptions[key].push(userOptions);
|
161
|
+
|
162
|
+
if (pick(redraw, true)) {
|
163
|
+
this.redraw(animation);
|
164
|
+
}
|
165
|
+
|
166
|
+
return axis;
|
167
|
+
},
|
168
|
+
|
169
|
+
/**
|
170
|
+
* Dim the chart and show a loading text or symbol. Options for the loading
|
171
|
+
* screen are defined in {@link
|
172
|
+
* https://api.highcharts.com/highcharts/loading|the loading options}.
|
173
|
+
*
|
174
|
+
* @sample highcharts/members/chart-hideloading/
|
175
|
+
* Show and hide loading from a button
|
176
|
+
* @sample highcharts/members/chart-showloading/
|
177
|
+
* Apply different text labels
|
178
|
+
* @sample stock/members/chart-show-hide-loading/
|
179
|
+
* Toggle loading in Highstock
|
180
|
+
*
|
181
|
+
* @function Highcharts.Chart#showLoading
|
182
|
+
*
|
183
|
+
* @param {string} [str]
|
184
|
+
* An optional text to show in the loading label instead of the
|
185
|
+
* default one. The default text is set in
|
186
|
+
* [lang.loading](http://api.highcharts.com/highcharts/lang.loading).
|
187
|
+
*/
|
188
|
+
showLoading: function (str) {
|
189
|
+
var chart = this,
|
190
|
+
options = chart.options,
|
191
|
+
loadingDiv = chart.loadingDiv,
|
192
|
+
loadingOptions = options.loading,
|
193
|
+
setLoadingSize = function () {
|
194
|
+
if (loadingDiv) {
|
195
|
+
css(loadingDiv, {
|
196
|
+
left: chart.plotLeft + 'px',
|
197
|
+
top: chart.plotTop + 'px',
|
198
|
+
width: chart.plotWidth + 'px',
|
199
|
+
height: chart.plotHeight + 'px'
|
200
|
+
});
|
201
|
+
}
|
202
|
+
};
|
203
|
+
|
204
|
+
// create the layer at the first call
|
205
|
+
if (!loadingDiv) {
|
206
|
+
chart.loadingDiv = loadingDiv = createElement('div', {
|
207
|
+
className: 'highcharts-loading highcharts-loading-hidden'
|
208
|
+
}, null, chart.container);
|
209
|
+
|
210
|
+
chart.loadingSpan = createElement(
|
211
|
+
'span',
|
212
|
+
{ className: 'highcharts-loading-inner' },
|
213
|
+
null,
|
214
|
+
loadingDiv
|
215
|
+
);
|
216
|
+
addEvent(chart, 'redraw', setLoadingSize); // #1080
|
217
|
+
}
|
218
|
+
|
219
|
+
loadingDiv.className = 'highcharts-loading';
|
220
|
+
|
221
|
+
// Update text
|
222
|
+
chart.loadingSpan.innerHTML = str || options.lang.loading;
|
223
|
+
|
224
|
+
if (!chart.styledMode) {
|
225
|
+
// Update visuals
|
226
|
+
css(loadingDiv, extend(loadingOptions.style, {
|
227
|
+
zIndex: 10
|
228
|
+
}));
|
229
|
+
css(chart.loadingSpan, loadingOptions.labelStyle);
|
230
|
+
|
231
|
+
// Show it
|
232
|
+
if (!chart.loadingShown) {
|
233
|
+
css(loadingDiv, {
|
234
|
+
opacity: 0,
|
235
|
+
display: ''
|
236
|
+
});
|
237
|
+
animate(loadingDiv, {
|
238
|
+
opacity: loadingOptions.style.opacity || 0.5
|
239
|
+
}, {
|
240
|
+
duration: loadingOptions.showDuration || 0
|
241
|
+
});
|
242
|
+
}
|
243
|
+
}
|
244
|
+
|
245
|
+
chart.loadingShown = true;
|
246
|
+
setLoadingSize();
|
247
|
+
},
|
248
|
+
|
249
|
+
/**
|
250
|
+
* Hide the loading layer.
|
251
|
+
*
|
252
|
+
* @see Highcharts.Chart#showLoading
|
253
|
+
*
|
254
|
+
* @sample highcharts/members/chart-hideloading/
|
255
|
+
* Show and hide loading from a button
|
256
|
+
* @sample stock/members/chart-show-hide-loading/
|
257
|
+
* Toggle loading in Highstock
|
258
|
+
*
|
259
|
+
* @function Highcharts.Chart#hideLoading
|
260
|
+
*/
|
261
|
+
hideLoading: function () {
|
262
|
+
|
263
|
+
var options = this.options,
|
264
|
+
loadingDiv = this.loadingDiv;
|
265
|
+
|
266
|
+
if (loadingDiv) {
|
267
|
+
loadingDiv.className =
|
268
|
+
'highcharts-loading highcharts-loading-hidden';
|
269
|
+
|
270
|
+
if (!this.styledMode) {
|
271
|
+
animate(loadingDiv, {
|
272
|
+
opacity: 0
|
273
|
+
}, {
|
274
|
+
duration: options.loading.hideDuration || 100,
|
275
|
+
complete: function () {
|
276
|
+
css(loadingDiv, { display: 'none' });
|
277
|
+
}
|
278
|
+
});
|
279
|
+
}
|
280
|
+
}
|
281
|
+
|
282
|
+
this.loadingShown = false;
|
283
|
+
},
|
284
|
+
|
285
|
+
/**
|
286
|
+
* These properties cause isDirtyBox to be set to true when updating. Can be
|
287
|
+
* extended from plugins.
|
288
|
+
*/
|
289
|
+
propsRequireDirtyBox: [
|
290
|
+
'backgroundColor',
|
291
|
+
'borderColor',
|
292
|
+
'borderWidth',
|
293
|
+
'margin',
|
294
|
+
'marginTop',
|
295
|
+
'marginRight',
|
296
|
+
'marginBottom',
|
297
|
+
'marginLeft',
|
298
|
+
'spacing',
|
299
|
+
'spacingTop',
|
300
|
+
'spacingRight',
|
301
|
+
'spacingBottom',
|
302
|
+
'spacingLeft',
|
303
|
+
'borderRadius',
|
304
|
+
'plotBackgroundColor',
|
305
|
+
'plotBackgroundImage',
|
306
|
+
'plotBorderColor',
|
307
|
+
'plotBorderWidth',
|
308
|
+
'plotShadow',
|
309
|
+
'shadow'
|
310
|
+
],
|
311
|
+
|
312
|
+
/**
|
313
|
+
* These properties cause all series to be updated when updating. Can be
|
314
|
+
* extended from plugins.
|
315
|
+
*/
|
316
|
+
propsRequireUpdateSeries: [
|
317
|
+
'chart.inverted',
|
318
|
+
'chart.polar',
|
319
|
+
'chart.ignoreHiddenSeries',
|
320
|
+
'chart.type',
|
321
|
+
'colors',
|
322
|
+
'plotOptions',
|
323
|
+
'time',
|
324
|
+
'tooltip'
|
325
|
+
],
|
326
|
+
|
327
|
+
/**
|
328
|
+
* These collections (arrays) implement update() methods with support for
|
329
|
+
* one-to-one option.
|
330
|
+
*/
|
331
|
+
collectionsWithUpdate: [
|
332
|
+
'xAxis',
|
333
|
+
'yAxis',
|
334
|
+
'zAxis',
|
335
|
+
'series',
|
336
|
+
'colorAxis',
|
337
|
+
'pane'
|
338
|
+
],
|
339
|
+
|
340
|
+
/**
|
341
|
+
* A generic function to update any element of the chart. Elements can be
|
342
|
+
* enabled and disabled, moved, re-styled, re-formatted etc.
|
343
|
+
*
|
344
|
+
* A special case is configuration objects that take arrays, for example
|
345
|
+
* [xAxis](https://api.highcharts.com/highcharts/xAxis),
|
346
|
+
* [yAxis](https://api.highcharts.com/highcharts/yAxis) or
|
347
|
+
* [series](https://api.highcharts.com/highcharts/series). For these
|
348
|
+
* collections, an `id` option is used to map the new option set to an
|
349
|
+
* existing object. If an existing object of the same id is not found, the
|
350
|
+
* corresponding item is updated. So for example, running `chart.update`
|
351
|
+
* with a series item without an id, will cause the existing chart's series
|
352
|
+
* with the same index in the series array to be updated. When the
|
353
|
+
* `oneToOne` parameter is true, `chart.update` will also take care of
|
354
|
+
* adding and removing items from the collection. Read more under the
|
355
|
+
* parameter description below.
|
356
|
+
*
|
357
|
+
* Note that when changing series data, `chart.update` may mutate the passed
|
358
|
+
* data options.
|
359
|
+
*
|
360
|
+
* See also the
|
361
|
+
* [responsive option set](https://api.highcharts.com/highcharts/responsive).
|
362
|
+
* Switching between `responsive.rules` basically runs `chart.update` under
|
363
|
+
* the hood.
|
364
|
+
*
|
365
|
+
* @sample highcharts/members/chart-update/
|
366
|
+
* Update chart geometry
|
367
|
+
*
|
368
|
+
* @function Highcharts.Chart#update
|
369
|
+
*
|
370
|
+
* @param {Highcharts.Options} options
|
371
|
+
* A configuration object for the new chart options.
|
372
|
+
*
|
373
|
+
* @param {boolean} [redraw=true]
|
374
|
+
* Whether to redraw the chart.
|
375
|
+
*
|
376
|
+
* @param {boolean} [oneToOne=false]
|
377
|
+
* When `true`, the `series`, `xAxis` and `yAxis` collections will
|
378
|
+
* be updated one to one, and items will be either added or removed
|
379
|
+
* to match the new updated options. For example, if the chart has
|
380
|
+
* two series and we call `chart.update` with a configuration
|
381
|
+
* containing three series, one will be added. If we call
|
382
|
+
* `chart.update` with one series, one will be removed. Setting an
|
383
|
+
* empty `series` array will remove all series, but leaving out the
|
384
|
+
* `series` property will leave all series untouched. If the series
|
385
|
+
* have id's, the new series options will be matched by id, and the
|
386
|
+
* remaining ones removed.
|
387
|
+
*
|
388
|
+
* @param {boolean|Highcharts.AnimationOptionsObject} [animation=true]
|
389
|
+
* Whether to apply animation, and optionally animation
|
390
|
+
* configuration.
|
391
|
+
*
|
392
|
+
* @fires Highcharts.Chart#event:update
|
393
|
+
* @fires Highcharts.Chart#event:afterUpdate
|
394
|
+
*/
|
395
|
+
update: function (options, redraw, oneToOne, animation) {
|
396
|
+
var chart = this,
|
397
|
+
adders = {
|
398
|
+
credits: 'addCredits',
|
399
|
+
title: 'setTitle',
|
400
|
+
subtitle: 'setSubtitle'
|
401
|
+
},
|
402
|
+
optionsChart,
|
403
|
+
updateAllAxes,
|
404
|
+
updateAllSeries,
|
405
|
+
newWidth,
|
406
|
+
newHeight,
|
407
|
+
itemsForRemoval = [];
|
408
|
+
|
409
|
+
fireEvent(chart, 'update', { options: options });
|
410
|
+
|
411
|
+
// If there are responsive rules in action, undo the responsive rules
|
412
|
+
// before we apply the updated options and replay the responsive rules
|
413
|
+
// on top from the chart.redraw function (#9617).
|
414
|
+
if (!options.isResponsiveOptions) {
|
415
|
+
chart.setResponsive(false, true);
|
416
|
+
}
|
417
|
+
|
418
|
+
options = H.cleanRecursively(options, chart.options);
|
419
|
+
|
420
|
+
// If the top-level chart option is present, some special updates are
|
421
|
+
// required
|
422
|
+
optionsChart = options.chart;
|
423
|
+
|
424
|
+
if (optionsChart) {
|
425
|
+
|
426
|
+
merge(true, chart.options.chart, optionsChart);
|
427
|
+
|
428
|
+
// Setter function
|
429
|
+
if ('className' in optionsChart) {
|
430
|
+
chart.setClassName(optionsChart.className);
|
431
|
+
}
|
432
|
+
|
433
|
+
if ('reflow' in optionsChart) {
|
434
|
+
chart.setReflow(optionsChart.reflow);
|
435
|
+
}
|
436
|
+
|
437
|
+
if (
|
438
|
+
'inverted' in optionsChart ||
|
439
|
+
'polar' in optionsChart ||
|
440
|
+
'type' in optionsChart
|
441
|
+
) {
|
442
|
+
// Parse options.chart.inverted and options.chart.polar together
|
443
|
+
// with the available series.
|
444
|
+
chart.propFromSeries();
|
445
|
+
updateAllAxes = true;
|
446
|
+
}
|
447
|
+
|
448
|
+
if ('alignTicks' in optionsChart) { // #6452
|
449
|
+
updateAllAxes = true;
|
450
|
+
}
|
451
|
+
|
452
|
+
objectEach(optionsChart, function (val, key) {
|
453
|
+
if (
|
454
|
+
chart.propsRequireUpdateSeries.indexOf('chart.' + key) !==
|
455
|
+
-1
|
456
|
+
) {
|
457
|
+
updateAllSeries = true;
|
458
|
+
}
|
459
|
+
// Only dirty box
|
460
|
+
if (chart.propsRequireDirtyBox.indexOf(key) !== -1) {
|
461
|
+
chart.isDirtyBox = true;
|
462
|
+
}
|
463
|
+
});
|
464
|
+
|
465
|
+
if (!chart.styledMode && 'style' in optionsChart) {
|
466
|
+
chart.renderer.setStyle(optionsChart.style);
|
467
|
+
}
|
468
|
+
}
|
469
|
+
|
470
|
+
// Moved up, because tooltip needs updated plotOptions (#6218)
|
471
|
+
if (!chart.styledMode && options.colors) {
|
472
|
+
this.options.colors = options.colors;
|
473
|
+
}
|
474
|
+
|
475
|
+
if (options.plotOptions) {
|
476
|
+
merge(true, this.options.plotOptions, options.plotOptions);
|
477
|
+
}
|
478
|
+
|
479
|
+
// Some option stuctures correspond one-to-one to chart objects that
|
480
|
+
// have update methods, for example
|
481
|
+
// options.credits => chart.credits
|
482
|
+
// options.legend => chart.legend
|
483
|
+
// options.title => chart.title
|
484
|
+
// options.tooltip => chart.tooltip
|
485
|
+
// options.subtitle => chart.subtitle
|
486
|
+
// options.mapNavigation => chart.mapNavigation
|
487
|
+
// options.navigator => chart.navigator
|
488
|
+
// options.scrollbar => chart.scrollbar
|
489
|
+
objectEach(options, function (val, key) {
|
490
|
+
if (chart[key] && typeof chart[key].update === 'function') {
|
491
|
+
chart[key].update(val, false);
|
492
|
+
|
493
|
+
// If a one-to-one object does not exist, look for an adder function
|
494
|
+
} else if (typeof chart[adders[key]] === 'function') {
|
495
|
+
chart[adders[key]](val);
|
496
|
+
}
|
497
|
+
|
498
|
+
if (
|
499
|
+
key !== 'chart' &&
|
500
|
+
chart.propsRequireUpdateSeries.indexOf(key) !== -1
|
501
|
+
) {
|
502
|
+
updateAllSeries = true;
|
503
|
+
}
|
504
|
+
});
|
505
|
+
|
506
|
+
// Setters for collections. For axes and series, each item is referred
|
507
|
+
// by an id. If the id is not found, it defaults to the corresponding
|
508
|
+
// item in the collection, so setting one series without an id, will
|
509
|
+
// update the first series in the chart. Setting two series without
|
510
|
+
// an id will update the first and the second respectively (#6019)
|
511
|
+
// chart.update and responsive.
|
512
|
+
this.collectionsWithUpdate.forEach(function (coll) {
|
513
|
+
var indexMap;
|
514
|
+
|
515
|
+
if (options[coll]) {
|
516
|
+
|
517
|
+
// In stock charts, the navigator series are also part of the
|
518
|
+
// chart.series array, but those series should not be handled
|
519
|
+
// here (#8196).
|
520
|
+
if (coll === 'series') {
|
521
|
+
indexMap = [];
|
522
|
+
chart[coll].forEach(function (s, i) {
|
523
|
+
if (!s.options.isInternal) {
|
524
|
+
indexMap.push(pick(s.options.index, i));
|
525
|
+
}
|
526
|
+
});
|
527
|
+
}
|
528
|
+
|
529
|
+
|
530
|
+
splat(options[coll]).forEach(function (newOptions, i) {
|
531
|
+
var item = (
|
532
|
+
defined(newOptions.id) &&
|
533
|
+
chart.get(newOptions.id)
|
534
|
+
) || chart[coll][indexMap ? indexMap[i] : i];
|
535
|
+
|
536
|
+
if (item && item.coll === coll) {
|
537
|
+
item.update(newOptions, false);
|
538
|
+
|
539
|
+
if (oneToOne) {
|
540
|
+
item.touched = true;
|
541
|
+
}
|
542
|
+
}
|
543
|
+
|
544
|
+
// If oneToOne and no matching item is found, add one
|
545
|
+
if (!item && oneToOne) {
|
546
|
+
if (coll === 'series') {
|
547
|
+
chart.addSeries(newOptions, false)
|
548
|
+
.touched = true;
|
549
|
+
} else if (coll === 'xAxis' || coll === 'yAxis') {
|
550
|
+
chart.addAxis(newOptions, coll === 'xAxis', false)
|
551
|
+
.touched = true;
|
552
|
+
}
|
553
|
+
}
|
554
|
+
|
555
|
+
});
|
556
|
+
|
557
|
+
// Add items for removal
|
558
|
+
if (oneToOne) {
|
559
|
+
chart[coll].forEach(function (item) {
|
560
|
+
if (!item.touched && !item.options.isInternal) {
|
561
|
+
itemsForRemoval.push(item);
|
562
|
+
} else {
|
563
|
+
delete item.touched;
|
564
|
+
}
|
565
|
+
});
|
566
|
+
}
|
567
|
+
|
568
|
+
|
569
|
+
}
|
570
|
+
});
|
571
|
+
|
572
|
+
itemsForRemoval.forEach(function (item) {
|
573
|
+
if (item.remove) {
|
574
|
+
item.remove(false);
|
575
|
+
}
|
576
|
+
});
|
577
|
+
|
578
|
+
if (updateAllAxes) {
|
579
|
+
chart.axes.forEach(function (axis) {
|
580
|
+
axis.update({}, false);
|
581
|
+
});
|
582
|
+
}
|
583
|
+
|
584
|
+
// Certain options require the whole series structure to be thrown away
|
585
|
+
// and rebuilt
|
586
|
+
if (updateAllSeries) {
|
587
|
+
chart.series.forEach(function (series) {
|
588
|
+
series.update({}, false);
|
589
|
+
});
|
590
|
+
}
|
591
|
+
|
592
|
+
// For loading, just update the options, do not redraw
|
593
|
+
if (options.loading) {
|
594
|
+
merge(true, chart.options.loading, options.loading);
|
595
|
+
}
|
596
|
+
|
597
|
+
// Update size. Redraw is forced.
|
598
|
+
newWidth = optionsChart && optionsChart.width;
|
599
|
+
newHeight = optionsChart && optionsChart.height;
|
600
|
+
if ((isNumber(newWidth) && newWidth !== chart.chartWidth) ||
|
601
|
+
(isNumber(newHeight) && newHeight !== chart.chartHeight)) {
|
602
|
+
chart.setSize(newWidth, newHeight, animation);
|
603
|
+
} else if (pick(redraw, true)) {
|
604
|
+
chart.redraw(animation);
|
605
|
+
}
|
606
|
+
|
607
|
+
fireEvent(chart, 'afterUpdate', { options: options });
|
608
|
+
|
609
|
+
},
|
610
|
+
|
611
|
+
/**
|
612
|
+
* Shortcut to set the subtitle options. This can also be done from {@link
|
613
|
+
* Chart#update} or {@link Chart#setTitle}.
|
614
|
+
*
|
615
|
+
* @function Highcharts.Chart#setSubtitle
|
616
|
+
*
|
617
|
+
* @param {Highcharts.SubtitleOptions} options
|
618
|
+
* New subtitle options. The subtitle text itself is set by the
|
619
|
+
* `options.text` property.
|
620
|
+
*/
|
621
|
+
setSubtitle: function (options) {
|
622
|
+
this.setTitle(undefined, options);
|
623
|
+
}
|
624
|
+
|
625
|
+
|
626
|
+
});
|
627
|
+
|
628
|
+
// extend the Point prototype for dynamic methods
|
629
|
+
extend(Point.prototype, /** @lends Highcharts.Point.prototype */ {
|
630
|
+
/**
|
631
|
+
* Update point with new options (typically x/y data) and optionally redraw
|
632
|
+
* the series.
|
633
|
+
*
|
634
|
+
* @sample highcharts/members/point-update-column/
|
635
|
+
* Update column value
|
636
|
+
* @sample highcharts/members/point-update-pie/
|
637
|
+
* Update pie slice
|
638
|
+
* @sample maps/members/point-update/
|
639
|
+
* Update map area value in Highmaps
|
640
|
+
*
|
641
|
+
* @function Highcharts.Point#update
|
642
|
+
*
|
643
|
+
* @param {number|object|Array<number|string>|null} options
|
644
|
+
* The point options. Point options are handled as described under
|
645
|
+
* the `series.type.data` item for each series type. For example
|
646
|
+
* for a line series, if options is a single number, the point will
|
647
|
+
* be given that number as the marin y value. If it is an array, it
|
648
|
+
* will be interpreted as x and y values respectively. If it is an
|
649
|
+
* object, advanced options are applied.
|
650
|
+
*
|
651
|
+
* @param {boolean} [redraw=true]
|
652
|
+
* Whether to redraw the chart after the point is updated. If doing
|
653
|
+
* more operations on the chart, it is best practice to set
|
654
|
+
* `redraw` to false and call `chart.redraw()` after.
|
655
|
+
*
|
656
|
+
* @param {boolean|Highcharts.AnimationOptionsObject} [animation=true]
|
657
|
+
* Whether to apply animation, and optionally animation
|
658
|
+
* configuration.
|
659
|
+
*
|
660
|
+
* @fires Highcharts.Point#event:update
|
661
|
+
*/
|
662
|
+
update: function (options, redraw, animation, runEvent) {
|
663
|
+
var point = this,
|
664
|
+
series = point.series,
|
665
|
+
graphic = point.graphic,
|
666
|
+
i,
|
667
|
+
chart = series.chart,
|
668
|
+
seriesOptions = series.options;
|
669
|
+
|
670
|
+
redraw = pick(redraw, true);
|
671
|
+
|
672
|
+
function update() {
|
673
|
+
|
674
|
+
point.applyOptions(options);
|
675
|
+
|
676
|
+
// Update visuals
|
677
|
+
if (point.y === null && graphic) { // #4146
|
678
|
+
point.graphic = graphic.destroy();
|
679
|
+
}
|
680
|
+
if (isObject(options, true)) {
|
681
|
+
// Destroy so we can get new elements
|
682
|
+
if (graphic && graphic.element) {
|
683
|
+
// "null" is also a valid symbol
|
684
|
+
if (
|
685
|
+
options &&
|
686
|
+
options.marker &&
|
687
|
+
options.marker.symbol !== undefined
|
688
|
+
) {
|
689
|
+
point.graphic = graphic.destroy();
|
690
|
+
}
|
691
|
+
}
|
692
|
+
if (options && options.dataLabels && point.dataLabel) { // #2468
|
693
|
+
point.dataLabel = point.dataLabel.destroy();
|
694
|
+
}
|
695
|
+
if (point.connector) {
|
696
|
+
point.connector = point.connector.destroy(); // #7243
|
697
|
+
}
|
698
|
+
}
|
699
|
+
|
700
|
+
// record changes in the parallel arrays
|
701
|
+
i = point.index;
|
702
|
+
series.updateParallelArrays(point, i);
|
703
|
+
|
704
|
+
// Record the options to options.data. If the old or the new config
|
705
|
+
// is an object, use point options, otherwise use raw options
|
706
|
+
// (#4701, #4916).
|
707
|
+
seriesOptions.data[i] = (
|
708
|
+
isObject(seriesOptions.data[i], true) ||
|
709
|
+
isObject(options, true)
|
710
|
+
) ?
|
711
|
+
point.options :
|
712
|
+
pick(options, seriesOptions.data[i]);
|
713
|
+
|
714
|
+
// redraw
|
715
|
+
series.isDirty = series.isDirtyData = true;
|
716
|
+
if (!series.fixedBox && series.hasCartesianSeries) { // #1906, #2320
|
717
|
+
chart.isDirtyBox = true;
|
718
|
+
}
|
719
|
+
|
720
|
+
if (seriesOptions.legendType === 'point') { // #1831, #1885
|
721
|
+
chart.isDirtyLegend = true;
|
722
|
+
}
|
723
|
+
if (redraw) {
|
724
|
+
chart.redraw(animation);
|
725
|
+
}
|
726
|
+
}
|
727
|
+
|
728
|
+
// Fire the event with a default handler of doing the update
|
729
|
+
if (runEvent === false) { // When called from setData
|
730
|
+
update();
|
731
|
+
} else {
|
732
|
+
point.firePointEvent('update', { options: options }, update);
|
733
|
+
}
|
734
|
+
},
|
735
|
+
|
736
|
+
/**
|
737
|
+
* Remove a point and optionally redraw the series and if necessary the axes
|
738
|
+
*
|
739
|
+
* @sample highcharts/plotoptions/series-point-events-remove/
|
740
|
+
* Remove point and confirm
|
741
|
+
* @sample highcharts/members/point-remove/
|
742
|
+
* Remove pie slice
|
743
|
+
* @sample maps/members/point-remove/
|
744
|
+
* Remove selected points in Highmaps
|
745
|
+
*
|
746
|
+
* @function Highcharts.Point#remove
|
747
|
+
*
|
748
|
+
* @param {boolean} redraw
|
749
|
+
* Whether to redraw the chart or wait for an explicit call. When
|
750
|
+
* doing more operations on the chart, for example running
|
751
|
+
* `point.remove()` in a loop, it is best practice to set `redraw`
|
752
|
+
* to false and call `chart.redraw()` after.
|
753
|
+
*
|
754
|
+
* @param {boolean|Highcharts.AnimationOptionsObject} [animation=false]
|
755
|
+
* Whether to apply animation, and optionally animation
|
756
|
+
* configuration.
|
757
|
+
*/
|
758
|
+
remove: function (redraw, animation) {
|
759
|
+
this.series.removePoint(
|
760
|
+
this.series.data.indexOf(this),
|
761
|
+
redraw,
|
762
|
+
animation
|
763
|
+
);
|
764
|
+
}
|
765
|
+
});
|
766
|
+
|
767
|
+
// Extend the series prototype for dynamic methods
|
768
|
+
extend(Series.prototype, /** @lends Series.prototype */ {
|
769
|
+
/**
|
770
|
+
* Add a point to the series after render time. The point can be added at
|
771
|
+
* the end, or by giving it an X value, to the start or in the middle of the
|
772
|
+
* series.
|
773
|
+
*
|
774
|
+
* @sample highcharts/members/series-addpoint-append/
|
775
|
+
* Append point
|
776
|
+
* @sample highcharts/members/series-addpoint-append-and-shift/
|
777
|
+
* Append and shift
|
778
|
+
* @sample highcharts/members/series-addpoint-x-and-y/
|
779
|
+
* Both X and Y values given
|
780
|
+
* @sample highcharts/members/series-addpoint-pie/
|
781
|
+
* Append pie slice
|
782
|
+
* @sample stock/members/series-addpoint/
|
783
|
+
* Append 100 points in Highstock
|
784
|
+
* @sample stock/members/series-addpoint-shift/
|
785
|
+
* Append and shift in Highstock
|
786
|
+
* @sample maps/members/series-addpoint/
|
787
|
+
* Add a point in Highmaps
|
788
|
+
*
|
789
|
+
* @function Highcharts.Series#addPoint
|
790
|
+
*
|
791
|
+
* @param {number|object|Array<number|string>|null} options
|
792
|
+
* The point options. If options is a single number, a point with
|
793
|
+
* that y value is appended to the series. If it is an array, it will
|
794
|
+
* be interpreted as x and y values respectively. If it is an
|
795
|
+
* object, advanced options as outlined under `series.data` are
|
796
|
+
* applied.
|
797
|
+
*
|
798
|
+
* @param {boolean} [redraw=true]
|
799
|
+
* Whether to redraw the chart after the point is added. When adding
|
800
|
+
* more than one point, it is highly recommended that the redraw
|
801
|
+
* option be set to false, and instead {@link Chart#redraw} is
|
802
|
+
* explicitly called after the adding of points is finished.
|
803
|
+
* Otherwise, the chart will redraw after adding each point.
|
804
|
+
*
|
805
|
+
* @param {boolean} [shift=false]
|
806
|
+
* If true, a point is shifted off the start of the series as one is
|
807
|
+
* appended to the end.
|
808
|
+
*
|
809
|
+
* @param {boolean|Highcharts.AnimationOptionsObject} [animation]
|
810
|
+
* Whether to apply animation, and optionally animation
|
811
|
+
* configuration.
|
812
|
+
*/
|
813
|
+
addPoint: function (options, redraw, shift, animation) {
|
814
|
+
var series = this,
|
815
|
+
seriesOptions = series.options,
|
816
|
+
data = series.data,
|
817
|
+
chart = series.chart,
|
818
|
+
xAxis = series.xAxis,
|
819
|
+
names = xAxis && xAxis.hasNames && xAxis.names,
|
820
|
+
dataOptions = seriesOptions.data,
|
821
|
+
point,
|
822
|
+
isInTheMiddle,
|
823
|
+
xData = series.xData,
|
824
|
+
i,
|
825
|
+
x;
|
826
|
+
|
827
|
+
// Optional redraw, defaults to true
|
828
|
+
redraw = pick(redraw, true);
|
829
|
+
|
830
|
+
// Get options and push the point to xData, yData and series.options. In
|
831
|
+
// series.generatePoints the Point instance will be created on demand
|
832
|
+
// and pushed to the series.data array.
|
833
|
+
point = { series: series };
|
834
|
+
series.pointClass.prototype.applyOptions.apply(point, [options]);
|
835
|
+
x = point.x;
|
836
|
+
|
837
|
+
// Get the insertion point
|
838
|
+
i = xData.length;
|
839
|
+
if (series.requireSorting && x < xData[i - 1]) {
|
840
|
+
isInTheMiddle = true;
|
841
|
+
while (i && xData[i - 1] > x) {
|
842
|
+
i--;
|
843
|
+
}
|
844
|
+
}
|
845
|
+
|
846
|
+
// Insert undefined item
|
847
|
+
series.updateParallelArrays(point, 'splice', i, 0, 0);
|
848
|
+
// Update it
|
849
|
+
series.updateParallelArrays(point, i);
|
850
|
+
|
851
|
+
if (names && point.name) {
|
852
|
+
names[x] = point.name;
|
853
|
+
}
|
854
|
+
dataOptions.splice(i, 0, options);
|
855
|
+
|
856
|
+
if (isInTheMiddle) {
|
857
|
+
series.data.splice(i, 0, null);
|
858
|
+
series.processData();
|
859
|
+
}
|
860
|
+
|
861
|
+
// Generate points to be added to the legend (#1329)
|
862
|
+
if (seriesOptions.legendType === 'point') {
|
863
|
+
series.generatePoints();
|
864
|
+
}
|
865
|
+
|
866
|
+
// Shift the first point off the parallel arrays
|
867
|
+
if (shift) {
|
868
|
+
if (data[0] && data[0].remove) {
|
869
|
+
data[0].remove(false);
|
870
|
+
} else {
|
871
|
+
data.shift();
|
872
|
+
series.updateParallelArrays(point, 'shift');
|
873
|
+
|
874
|
+
dataOptions.shift();
|
875
|
+
}
|
876
|
+
}
|
877
|
+
|
878
|
+
// redraw
|
879
|
+
series.isDirty = true;
|
880
|
+
series.isDirtyData = true;
|
881
|
+
|
882
|
+
if (redraw) {
|
883
|
+
chart.redraw(animation); // Animation is set anyway on redraw, #5665
|
884
|
+
}
|
885
|
+
},
|
886
|
+
|
887
|
+
/**
|
888
|
+
* Remove a point from the series. Unlike the
|
889
|
+
* {@link Highcharts.Point#remove} method, this can also be done on a point
|
890
|
+
* that is not instanciated because it is outside the view or subject to
|
891
|
+
* Highstock data grouping.
|
892
|
+
*
|
893
|
+
* @sample highcharts/members/series-removepoint/
|
894
|
+
* Remove cropped point
|
895
|
+
*
|
896
|
+
* @function Highcharts.Series#removePoint
|
897
|
+
*
|
898
|
+
* @param {number} i
|
899
|
+
* The index of the point in the {@link Highcharts.Series.data|data}
|
900
|
+
* array.
|
901
|
+
*
|
902
|
+
* @param {boolean} [redraw=true]
|
903
|
+
* Whether to redraw the chart after the point is added. When
|
904
|
+
* removing more than one point, it is highly recommended that the
|
905
|
+
* `redraw` option be set to `false`, and instead {@link
|
906
|
+
* Highcharts.Chart#redraw} is explicitly called after the adding of
|
907
|
+
* points is finished.
|
908
|
+
*
|
909
|
+
* @param {boolean|Highcharts.AnimationOptionsObject} [animation]
|
910
|
+
* Whether and optionally how the series should be animated.
|
911
|
+
*
|
912
|
+
* @fires Highcharts.Point#event:remove
|
913
|
+
*/
|
914
|
+
removePoint: function (i, redraw, animation) {
|
915
|
+
|
916
|
+
var series = this,
|
917
|
+
data = series.data,
|
918
|
+
point = data[i],
|
919
|
+
points = series.points,
|
920
|
+
chart = series.chart,
|
921
|
+
remove = function () {
|
922
|
+
|
923
|
+
if (points && points.length === data.length) { // #4935
|
924
|
+
points.splice(i, 1);
|
925
|
+
}
|
926
|
+
data.splice(i, 1);
|
927
|
+
series.options.data.splice(i, 1);
|
928
|
+
series.updateParallelArrays(
|
929
|
+
point || { series: series },
|
930
|
+
'splice',
|
931
|
+
i,
|
932
|
+
1
|
933
|
+
);
|
934
|
+
|
935
|
+
if (point) {
|
936
|
+
point.destroy();
|
937
|
+
}
|
938
|
+
|
939
|
+
// redraw
|
940
|
+
series.isDirty = true;
|
941
|
+
series.isDirtyData = true;
|
942
|
+
if (redraw) {
|
943
|
+
chart.redraw();
|
944
|
+
}
|
945
|
+
};
|
946
|
+
|
947
|
+
setAnimation(animation, chart);
|
948
|
+
redraw = pick(redraw, true);
|
949
|
+
|
950
|
+
// Fire the event with a default handler of removing the point
|
951
|
+
if (point) {
|
952
|
+
point.firePointEvent('remove', null, remove);
|
953
|
+
} else {
|
954
|
+
remove();
|
955
|
+
}
|
956
|
+
},
|
957
|
+
|
958
|
+
/**
|
959
|
+
* Remove a series and optionally redraw the chart.
|
960
|
+
*
|
961
|
+
* @sample highcharts/members/series-remove/
|
962
|
+
* Remove first series from a button
|
963
|
+
*
|
964
|
+
* @function Highcharts.Series#remove
|
965
|
+
*
|
966
|
+
* @param {boolean} [redraw=true]
|
967
|
+
* Whether to redraw the chart or wait for an explicit call to
|
968
|
+
* {@link Highcharts.Chart#redraw}.
|
969
|
+
*
|
970
|
+
* @param {boolean|Highcharts.AnimationOptionsObject} [animation]
|
971
|
+
* Whether to apply animation, and optionally animation
|
972
|
+
* configuration.
|
973
|
+
*
|
974
|
+
* @param {boolean} [withEvent=true]
|
975
|
+
* Used internally, whether to fire the series `remove` event.
|
976
|
+
*
|
977
|
+
* @fires Highcharts.Series#event:remove
|
978
|
+
*/
|
979
|
+
remove: function (redraw, animation, withEvent, keepEvents) {
|
980
|
+
var series = this,
|
981
|
+
chart = series.chart;
|
982
|
+
|
983
|
+
function remove() {
|
984
|
+
|
985
|
+
// Destroy elements
|
986
|
+
series.destroy(keepEvents);
|
987
|
+
series.remove = null; // Prevent from doing again (#9097)
|
988
|
+
|
989
|
+
// Redraw
|
990
|
+
chart.isDirtyLegend = chart.isDirtyBox = true;
|
991
|
+
chart.linkSeries();
|
992
|
+
|
993
|
+
if (pick(redraw, true)) {
|
994
|
+
chart.redraw(animation);
|
995
|
+
}
|
996
|
+
}
|
997
|
+
|
998
|
+
// Fire the event with a default handler of removing the point
|
999
|
+
if (withEvent !== false) {
|
1000
|
+
fireEvent(series, 'remove', null, remove);
|
1001
|
+
} else {
|
1002
|
+
remove();
|
1003
|
+
}
|
1004
|
+
},
|
1005
|
+
|
1006
|
+
/**
|
1007
|
+
* Update the series with a new set of options. For a clean and precise
|
1008
|
+
* handling of new options, all methods and elements from the series are
|
1009
|
+
* removed, and it is initialized from scratch. Therefore, this method is
|
1010
|
+
* more performance expensive than some other utility methods like {@link
|
1011
|
+
* Series#setData} or {@link Series#setVisible}.
|
1012
|
+
*
|
1013
|
+
* Note that `Series.update` may mutate the passed `data` options.
|
1014
|
+
*
|
1015
|
+
* @sample highcharts/members/series-update/
|
1016
|
+
* Updating series options
|
1017
|
+
* @sample maps/members/series-update/
|
1018
|
+
* Update series options in Highmaps
|
1019
|
+
*
|
1020
|
+
* @function Highcharts.Series#update
|
1021
|
+
*
|
1022
|
+
* @param {Highcharts.SeriesOptionsType} options
|
1023
|
+
* New options that will be merged with the series' existing options.
|
1024
|
+
*
|
1025
|
+
* @param {boolean} [redraw=true]
|
1026
|
+
* Whether to redraw the chart after the series is altered. If doing
|
1027
|
+
* more operations on the chart, it is a good idea to set redraw to
|
1028
|
+
* false and call {@link Chart#redraw} after.
|
1029
|
+
*
|
1030
|
+
* @fires Highcharts.Series#event:afterUpdate
|
1031
|
+
*/
|
1032
|
+
update: function (options, redraw) {
|
1033
|
+
|
1034
|
+
options = H.cleanRecursively(options, this.userOptions);
|
1035
|
+
|
1036
|
+
var series = this,
|
1037
|
+
chart = series.chart,
|
1038
|
+
// must use user options when changing type because series.options
|
1039
|
+
// is merged in with type specific plotOptions
|
1040
|
+
oldOptions = series.userOptions,
|
1041
|
+
initialType = series.initialType || series.type,
|
1042
|
+
newType = (
|
1043
|
+
options.type ||
|
1044
|
+
oldOptions.type ||
|
1045
|
+
chart.options.chart.type
|
1046
|
+
),
|
1047
|
+
initialSeriesProto = seriesTypes[initialType].prototype,
|
1048
|
+
n,
|
1049
|
+
groups = [
|
1050
|
+
'group',
|
1051
|
+
'markerGroup',
|
1052
|
+
'dataLabelsGroup'
|
1053
|
+
],
|
1054
|
+
preserve = [
|
1055
|
+
'navigatorSeries',
|
1056
|
+
'baseSeries'
|
1057
|
+
],
|
1058
|
+
|
1059
|
+
// Animation must be enabled when calling update before the initial
|
1060
|
+
// animation has first run. This happens when calling update
|
1061
|
+
// directly after chart initialization, or when applying responsive
|
1062
|
+
// rules (#6912).
|
1063
|
+
animation = series.finishedAnimating && { animation: false },
|
1064
|
+
allowSoftUpdate = [
|
1065
|
+
'data',
|
1066
|
+
'name',
|
1067
|
+
'turboThreshold'
|
1068
|
+
],
|
1069
|
+
keys = Object.keys(options),
|
1070
|
+
doSoftUpdate = keys.length > 0;
|
1071
|
+
|
1072
|
+
// Running Series.update to update the data only is an intuitive usage,
|
1073
|
+
// so we want to make sure that when used like this, we run the
|
1074
|
+
// cheaper setData function and allow animation instead of completely
|
1075
|
+
// recreating the series instance. This includes sideways animation when
|
1076
|
+
// adding points to the data set. The `name` should also support soft
|
1077
|
+
// update because the data module sets name and data when setting new
|
1078
|
+
// data by `chart.update`.
|
1079
|
+
keys.forEach(function (key) {
|
1080
|
+
if (allowSoftUpdate.indexOf(key) === -1) {
|
1081
|
+
doSoftUpdate = false;
|
1082
|
+
}
|
1083
|
+
});
|
1084
|
+
if (doSoftUpdate) {
|
1085
|
+
if (options.data) {
|
1086
|
+
this.setData(options.data, false);
|
1087
|
+
}
|
1088
|
+
if (options.name) {
|
1089
|
+
this.setName(options.name, false);
|
1090
|
+
}
|
1091
|
+
} else {
|
1092
|
+
|
1093
|
+
// Make sure preserved properties are not destroyed (#3094)
|
1094
|
+
preserve = groups.concat(preserve);
|
1095
|
+
preserve.forEach(function (prop) {
|
1096
|
+
preserve[prop] = series[prop];
|
1097
|
+
delete series[prop];
|
1098
|
+
});
|
1099
|
+
|
1100
|
+
// Do the merge, with some forced options
|
1101
|
+
options = merge(oldOptions, animation, {
|
1102
|
+
index: series.index,
|
1103
|
+
pointStart: pick(
|
1104
|
+
oldOptions.pointStart, // when updating from blank (#7933)
|
1105
|
+
series.xData[0] // when updating after addPoint
|
1106
|
+
)
|
1107
|
+
}, { data: series.options.data }, options);
|
1108
|
+
|
1109
|
+
// Destroy the series and delete all properties. Reinsert all
|
1110
|
+
// methods and properties from the new type prototype (#2270,
|
1111
|
+
// #3719).
|
1112
|
+
series.remove(false, null, false, true);
|
1113
|
+
for (n in initialSeriesProto) {
|
1114
|
+
series[n] = undefined;
|
1115
|
+
}
|
1116
|
+
if (seriesTypes[newType || initialType]) {
|
1117
|
+
extend(series, seriesTypes[newType || initialType].prototype);
|
1118
|
+
} else {
|
1119
|
+
H.error(17, true, chart);
|
1120
|
+
}
|
1121
|
+
|
1122
|
+
// Re-register groups (#3094) and other preserved properties
|
1123
|
+
preserve.forEach(function (prop) {
|
1124
|
+
series[prop] = preserve[prop];
|
1125
|
+
});
|
1126
|
+
|
1127
|
+
series.init(chart, options);
|
1128
|
+
|
1129
|
+
// Update the Z index of groups (#3380, #7397)
|
1130
|
+
if (options.zIndex !== oldOptions.zIndex) {
|
1131
|
+
groups.forEach(function (groupName) {
|
1132
|
+
if (series[groupName]) {
|
1133
|
+
series[groupName].attr({
|
1134
|
+
zIndex: options.zIndex
|
1135
|
+
});
|
1136
|
+
}
|
1137
|
+
});
|
1138
|
+
}
|
1139
|
+
|
1140
|
+
|
1141
|
+
series.initialType = initialType;
|
1142
|
+
chart.linkSeries(); // Links are lost in series.remove (#3028)
|
1143
|
+
|
1144
|
+
}
|
1145
|
+
fireEvent(this, 'afterUpdate');
|
1146
|
+
|
1147
|
+
if (pick(redraw, true)) {
|
1148
|
+
chart.redraw(doSoftUpdate ? undefined : false);
|
1149
|
+
}
|
1150
|
+
},
|
1151
|
+
|
1152
|
+
/**
|
1153
|
+
* Used from within series.update
|
1154
|
+
*
|
1155
|
+
* @private
|
1156
|
+
* @function Highcharts.Series#setName
|
1157
|
+
*
|
1158
|
+
* @param {string} name
|
1159
|
+
*/
|
1160
|
+
setName: function (name) {
|
1161
|
+
this.name = this.options.name = this.userOptions.name = name;
|
1162
|
+
this.chart.isDirtyLegend = true;
|
1163
|
+
}
|
1164
|
+
});
|
1165
|
+
|
1166
|
+
// Extend the Axis.prototype for dynamic methods
|
1167
|
+
extend(Axis.prototype, /** @lends Highcharts.Axis.prototype */ {
|
1168
|
+
|
1169
|
+
/**
|
1170
|
+
* Update an axis object with a new set of options. The options are merged
|
1171
|
+
* with the existing options, so only new or altered options need to be
|
1172
|
+
* specified.
|
1173
|
+
*
|
1174
|
+
* @sample highcharts/members/axis-update/
|
1175
|
+
* Axis update demo
|
1176
|
+
*
|
1177
|
+
* @function Highcharts.Axis#update
|
1178
|
+
*
|
1179
|
+
* @param {Highcharts.XAxisOptions|Highcharts.YAxisOptions|Highcharts.ZAxisOptions} options
|
1180
|
+
* The new options that will be merged in with existing options on
|
1181
|
+
* the axis.
|
1182
|
+
*
|
1183
|
+
* @param {boolean} [redraw=true]
|
1184
|
+
* Whether to redraw the chart after the axis is altered. If doing
|
1185
|
+
* more operations on the chart, it is a good idea to set redraw to
|
1186
|
+
* false and call {@link Chart#redraw} after.
|
1187
|
+
*/
|
1188
|
+
update: function (options, redraw) {
|
1189
|
+
var chart = this.chart,
|
1190
|
+
newEvents = ((options && options.events) || {});
|
1191
|
+
|
1192
|
+
options = merge(this.userOptions, options);
|
1193
|
+
|
1194
|
+
// Color Axis is not an array,
|
1195
|
+
// This change is applied in the ColorAxis wrapper
|
1196
|
+
if (chart.options[this.coll].indexOf) {
|
1197
|
+
// Don't use this.options.index,
|
1198
|
+
// StockChart has Axes in navigator too
|
1199
|
+
chart.options[this.coll][
|
1200
|
+
chart.options[this.coll].indexOf(this.userOptions)
|
1201
|
+
] = options;
|
1202
|
+
}
|
1203
|
+
|
1204
|
+
// Remove old events, if no new exist (#8161)
|
1205
|
+
objectEach(chart.options[this.coll].events, function (fn, ev) {
|
1206
|
+
if (typeof newEvents[ev] === 'undefined') {
|
1207
|
+
newEvents[ev] = undefined;
|
1208
|
+
}
|
1209
|
+
});
|
1210
|
+
|
1211
|
+
this.destroy(true);
|
1212
|
+
this.init(chart, extend(options, { events: newEvents }));
|
1213
|
+
|
1214
|
+
chart.isDirtyBox = true;
|
1215
|
+
if (pick(redraw, true)) {
|
1216
|
+
chart.redraw();
|
1217
|
+
}
|
1218
|
+
},
|
1219
|
+
|
1220
|
+
/**
|
1221
|
+
* Remove the axis from the chart.
|
1222
|
+
*
|
1223
|
+
* @sample highcharts/members/chart-addaxis/
|
1224
|
+
* Add and remove axes
|
1225
|
+
*
|
1226
|
+
* @function Highcharts.Axis#remove
|
1227
|
+
*
|
1228
|
+
* @param {boolean} [redraw=true]
|
1229
|
+
* Whether to redraw the chart following the remove.
|
1230
|
+
*/
|
1231
|
+
remove: function (redraw) {
|
1232
|
+
var chart = this.chart,
|
1233
|
+
key = this.coll, // xAxis or yAxis
|
1234
|
+
axisSeries = this.series,
|
1235
|
+
i = axisSeries.length;
|
1236
|
+
|
1237
|
+
// Remove associated series (#2687)
|
1238
|
+
while (i--) {
|
1239
|
+
if (axisSeries[i]) {
|
1240
|
+
axisSeries[i].remove(false);
|
1241
|
+
}
|
1242
|
+
}
|
1243
|
+
|
1244
|
+
// Remove the axis
|
1245
|
+
erase(chart.axes, this);
|
1246
|
+
erase(chart[key], this);
|
1247
|
+
|
1248
|
+
if (isArray(chart.options[key])) {
|
1249
|
+
chart.options[key].splice(this.options.index, 1);
|
1250
|
+
} else { // color axis, #6488
|
1251
|
+
delete chart.options[key];
|
1252
|
+
}
|
1253
|
+
|
1254
|
+
chart[key].forEach(function (axis, i) { // Re-index, #1706, #8075
|
1255
|
+
axis.options.index = axis.userOptions.index = i;
|
1256
|
+
});
|
1257
|
+
this.destroy();
|
1258
|
+
chart.isDirtyBox = true;
|
1259
|
+
|
1260
|
+
if (pick(redraw, true)) {
|
1261
|
+
chart.redraw();
|
1262
|
+
}
|
1263
|
+
},
|
1264
|
+
|
1265
|
+
/**
|
1266
|
+
* Update the axis title by options after render time.
|
1267
|
+
*
|
1268
|
+
* @sample highcharts/members/axis-settitle/
|
1269
|
+
* Set a new Y axis title
|
1270
|
+
*
|
1271
|
+
* @function Highcharts.Axis#setTitle
|
1272
|
+
*
|
1273
|
+
* @param {Highcharts.XAxisTitleOptions|Highcharts.YAxisTitleOptions|Highcharts.ZAxisTitleOptions} titleOptions
|
1274
|
+
* The additional title options.
|
1275
|
+
*
|
1276
|
+
* @param {boolean} [redraw=true]
|
1277
|
+
* Whether to redraw the chart after setting the title.
|
1278
|
+
*/
|
1279
|
+
setTitle: function (titleOptions, redraw) {
|
1280
|
+
this.update({ title: titleOptions }, redraw);
|
1281
|
+
},
|
1282
|
+
|
1283
|
+
/**
|
1284
|
+
* Set new axis categories and optionally redraw.
|
1285
|
+
*
|
1286
|
+
* @sample highcharts/members/axis-setcategories/
|
1287
|
+
* Set categories by click on a button
|
1288
|
+
*
|
1289
|
+
* @function Highcharts.Axis#setCategories
|
1290
|
+
*
|
1291
|
+
* @param {Array<string>} categories
|
1292
|
+
* The new categories.
|
1293
|
+
*
|
1294
|
+
* @param {boolean} [redraw=true]
|
1295
|
+
* Whether to redraw the chart.
|
1296
|
+
*/
|
1297
|
+
setCategories: function (categories, redraw) {
|
1298
|
+
this.update({ categories: categories }, redraw);
|
1299
|
+
}
|
1300
|
+
|
1301
|
+
});
|