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,2307 @@
|
|
1
|
+
/**
|
2
|
+
* (c) 2010-2019 Torstein Honsi
|
3
|
+
*
|
4
|
+
* License: www.highcharts.com/license
|
5
|
+
*/
|
6
|
+
|
7
|
+
/**
|
8
|
+
* Callback for chart constructors.
|
9
|
+
*
|
10
|
+
* @callback Highcharts.ChartCallbackFunction
|
11
|
+
*
|
12
|
+
* @param {Highcharts.Chart} chart
|
13
|
+
* Created chart.
|
14
|
+
*/
|
15
|
+
|
16
|
+
/**
|
17
|
+
* The chart title. The title has an `update` method that allows modifying the
|
18
|
+
* options directly or indirectly via `chart.update`.
|
19
|
+
*
|
20
|
+
* @interface Highcharts.TitleObject
|
21
|
+
* @extends Highcharts.SVGElement
|
22
|
+
*//**
|
23
|
+
* Modify options for the title.
|
24
|
+
*
|
25
|
+
* @function Highcharts.TitleObject#update
|
26
|
+
*
|
27
|
+
* @param {Highcharts.TitleOptions} titleOptions
|
28
|
+
* Options to modify.
|
29
|
+
*
|
30
|
+
* @param {boolean} [redraw=true]
|
31
|
+
* Whether to redraw the chart after the title is altered. If doing more
|
32
|
+
* operations on the chart, it is a good idea to set redraw to false and
|
33
|
+
* call {@link Chart#redraw} after.
|
34
|
+
*/
|
35
|
+
|
36
|
+
/**
|
37
|
+
* The chart subtitle. The subtitle has an `update` method that
|
38
|
+
* allows modifying the options directly or indirectly via
|
39
|
+
* `chart.update`.
|
40
|
+
*
|
41
|
+
* @interface Highcharts.SubtitleObject
|
42
|
+
* @extends Highcharts.SVGElement
|
43
|
+
*//**
|
44
|
+
* Modify options for the subtitle.
|
45
|
+
*
|
46
|
+
* @function Highcharts.SubtitleObject#update
|
47
|
+
*
|
48
|
+
* @param {Highcharts.SubtitleOptions} subtitleOptions
|
49
|
+
* Options to modify.
|
50
|
+
*
|
51
|
+
* @param {boolean} [redraw=true]
|
52
|
+
* Whether to redraw the chart after the subtitle is altered. If doing
|
53
|
+
* more operations on the chart, it is a good idea to set redraw to false
|
54
|
+
* and call {@link Chart#redraw} after.
|
55
|
+
*/
|
56
|
+
|
57
|
+
'use strict';
|
58
|
+
|
59
|
+
import H from './Globals.js';
|
60
|
+
import './Utilities.js';
|
61
|
+
import './Axis.js';
|
62
|
+
import './Legend.js';
|
63
|
+
import './Options.js';
|
64
|
+
import './Pointer.js';
|
65
|
+
|
66
|
+
var addEvent = H.addEvent,
|
67
|
+
animate = H.animate,
|
68
|
+
animObject = H.animObject,
|
69
|
+
attr = H.attr,
|
70
|
+
doc = H.doc,
|
71
|
+
Axis = H.Axis, // @todo add as requirement
|
72
|
+
createElement = H.createElement,
|
73
|
+
defaultOptions = H.defaultOptions,
|
74
|
+
discardElement = H.discardElement,
|
75
|
+
charts = H.charts,
|
76
|
+
css = H.css,
|
77
|
+
defined = H.defined,
|
78
|
+
extend = H.extend,
|
79
|
+
find = H.find,
|
80
|
+
fireEvent = H.fireEvent,
|
81
|
+
isNumber = H.isNumber,
|
82
|
+
isObject = H.isObject,
|
83
|
+
isString = H.isString,
|
84
|
+
Legend = H.Legend, // @todo add as requirement
|
85
|
+
marginNames = H.marginNames,
|
86
|
+
merge = H.merge,
|
87
|
+
objectEach = H.objectEach,
|
88
|
+
Pointer = H.Pointer, // @todo add as requirement
|
89
|
+
pick = H.pick,
|
90
|
+
pInt = H.pInt,
|
91
|
+
removeEvent = H.removeEvent,
|
92
|
+
seriesTypes = H.seriesTypes,
|
93
|
+
splat = H.splat,
|
94
|
+
syncTimeout = H.syncTimeout,
|
95
|
+
win = H.win;
|
96
|
+
|
97
|
+
/**
|
98
|
+
* The Chart class. The recommended constructor is {@link Highcharts#chart}.
|
99
|
+
*
|
100
|
+
* @example
|
101
|
+
* var chart = Highcharts.chart('container', {
|
102
|
+
* title: {
|
103
|
+
* text: 'My chart'
|
104
|
+
* },
|
105
|
+
* series: [{
|
106
|
+
* data: [1, 3, 2, 4]
|
107
|
+
* }]
|
108
|
+
* })
|
109
|
+
*
|
110
|
+
* @class
|
111
|
+
* @name Highcharts.Chart
|
112
|
+
*
|
113
|
+
* @param {string|Highcharts.HTMLDOMElement} [renderTo]
|
114
|
+
* The DOM element to render to, or its id.
|
115
|
+
*
|
116
|
+
* @param {Highcharts.Options} options
|
117
|
+
* The chart options structure.
|
118
|
+
*
|
119
|
+
* @param {Highcharts.ChartCallbackFunction} [callback]
|
120
|
+
* Function to run when the chart has loaded and and all external images
|
121
|
+
* are loaded. Defining a
|
122
|
+
* [chart.events.load](https://api.highcharts.com/highcharts/chart.events.load)
|
123
|
+
* handler is equivalent.
|
124
|
+
*/
|
125
|
+
var Chart = H.Chart = function () {
|
126
|
+
this.getArgs.apply(this, arguments);
|
127
|
+
};
|
128
|
+
|
129
|
+
/**
|
130
|
+
* Factory function for basic charts.
|
131
|
+
*
|
132
|
+
* @example
|
133
|
+
* // Render a chart in to div#container
|
134
|
+
* var chart = Highcharts.chart('container', {
|
135
|
+
* title: {
|
136
|
+
* text: 'My chart'
|
137
|
+
* },
|
138
|
+
* series: [{
|
139
|
+
* data: [1, 3, 2, 4]
|
140
|
+
* }]
|
141
|
+
* });
|
142
|
+
*
|
143
|
+
* @function Highcharts.chart
|
144
|
+
*
|
145
|
+
* @param {string|Highcharts.HTMLDOMElement} [renderTo]
|
146
|
+
* The DOM element to render to, or its id.
|
147
|
+
*
|
148
|
+
* @param {Highcharts.Options} options
|
149
|
+
* The chart options structure.
|
150
|
+
*
|
151
|
+
* @param {Highcharts.ChartCallbackFunction} [callback]
|
152
|
+
* Function to run when the chart has loaded and and all external images
|
153
|
+
* are loaded. Defining a
|
154
|
+
* [chart.events.load](https://api.highcharts.com/highcharts/chart.events.load)
|
155
|
+
* handler is equivalent.
|
156
|
+
*
|
157
|
+
* @return {Highcharts.Chart}
|
158
|
+
* Returns the Chart object.
|
159
|
+
*/
|
160
|
+
H.chart = function (a, b, c) {
|
161
|
+
return new Chart(a, b, c);
|
162
|
+
};
|
163
|
+
|
164
|
+
extend(Chart.prototype, /** @lends Highcharts.Chart.prototype */ {
|
165
|
+
|
166
|
+
// Hook for adding callbacks in modules
|
167
|
+
callbacks: [],
|
168
|
+
|
169
|
+
/**
|
170
|
+
* Handle the arguments passed to the constructor.
|
171
|
+
*
|
172
|
+
* @private
|
173
|
+
* @function Highcharts.Chart#getArgs
|
174
|
+
*
|
175
|
+
* @param {...Array<*>} arguments
|
176
|
+
* All arguments for the constructor.
|
177
|
+
*
|
178
|
+
* @return {Array<*>}
|
179
|
+
* Passed arguments without renderTo.
|
180
|
+
*
|
181
|
+
* @fires Highcharts.Chart#event:init
|
182
|
+
* @fires Highcharts.Chart#event:afterInit
|
183
|
+
*/
|
184
|
+
getArgs: function () {
|
185
|
+
var args = [].slice.call(arguments);
|
186
|
+
|
187
|
+
// Remove the optional first argument, renderTo, and
|
188
|
+
// set it on this.
|
189
|
+
if (isString(args[0]) || args[0].nodeName) {
|
190
|
+
this.renderTo = args.shift();
|
191
|
+
}
|
192
|
+
this.init(args[0], args[1]);
|
193
|
+
},
|
194
|
+
|
195
|
+
/**
|
196
|
+
* Overridable function that initializes the chart. The constructor's
|
197
|
+
* arguments are passed on directly.
|
198
|
+
*
|
199
|
+
* @function Highcharts.Chart#init
|
200
|
+
*
|
201
|
+
* @param {Highcharts.Options} userOptions
|
202
|
+
* Custom options.
|
203
|
+
*
|
204
|
+
* @param {Function} [callback]
|
205
|
+
* Function to run when the chart has loaded and and all external
|
206
|
+
* images are loaded.
|
207
|
+
*
|
208
|
+
* @fires Highcharts.Chart#event:init
|
209
|
+
* @fires Highcharts.Chart#event:afterInit
|
210
|
+
*/
|
211
|
+
init: function (userOptions, callback) {
|
212
|
+
|
213
|
+
// Handle regular options
|
214
|
+
var options,
|
215
|
+
type,
|
216
|
+
// skip merging data points to increase performance
|
217
|
+
seriesOptions = userOptions.series,
|
218
|
+
userPlotOptions = userOptions.plotOptions || {};
|
219
|
+
|
220
|
+
// Fire the event with a default function
|
221
|
+
fireEvent(this, 'init', { args: arguments }, function () {
|
222
|
+
|
223
|
+
userOptions.series = null;
|
224
|
+
options = merge(defaultOptions, userOptions); // do the merge
|
225
|
+
|
226
|
+
// Override (by copy of user options) or clear tooltip options
|
227
|
+
// in chart.options.plotOptions (#6218)
|
228
|
+
for (type in options.plotOptions) {
|
229
|
+
options.plotOptions[type].tooltip = (
|
230
|
+
userPlotOptions[type] &&
|
231
|
+
merge(userPlotOptions[type].tooltip) // override by copy
|
232
|
+
) || undefined; // or clear
|
233
|
+
}
|
234
|
+
// User options have higher priority than default options
|
235
|
+
// (#6218). In case of exporting: path is changed
|
236
|
+
options.tooltip.userOptions = (
|
237
|
+
userOptions.chart &&
|
238
|
+
userOptions.chart.forExport &&
|
239
|
+
userOptions.tooltip.userOptions
|
240
|
+
) || userOptions.tooltip;
|
241
|
+
|
242
|
+
// set back the series data
|
243
|
+
options.series = userOptions.series = seriesOptions;
|
244
|
+
this.userOptions = userOptions;
|
245
|
+
|
246
|
+
var optionsChart = options.chart;
|
247
|
+
|
248
|
+
var chartEvents = optionsChart.events;
|
249
|
+
|
250
|
+
this.margin = [];
|
251
|
+
this.spacing = [];
|
252
|
+
|
253
|
+
// Pixel data bounds for touch zoom
|
254
|
+
this.bounds = { h: {}, v: {} };
|
255
|
+
|
256
|
+
// An array of functions that returns labels that should be
|
257
|
+
// considered for anti-collision
|
258
|
+
this.labelCollectors = [];
|
259
|
+
|
260
|
+
this.callback = callback;
|
261
|
+
this.isResizing = 0;
|
262
|
+
|
263
|
+
/**
|
264
|
+
* The options structure for the chart. It contains members for
|
265
|
+
* the sub elements like series, legend, tooltip etc.
|
266
|
+
*
|
267
|
+
* @name Highcharts.Chart#options
|
268
|
+
* @type {Highcharts.Options}
|
269
|
+
*/
|
270
|
+
this.options = options;
|
271
|
+
|
272
|
+
/**
|
273
|
+
* All the axes in the chart.
|
274
|
+
*
|
275
|
+
* @see Highcharts.Chart.xAxis
|
276
|
+
* @see Highcharts.Chart.yAxis
|
277
|
+
*
|
278
|
+
* @name Highcharts.Chart#axes
|
279
|
+
* @type {Array<Highcharts.Axis>}
|
280
|
+
*/
|
281
|
+
this.axes = [];
|
282
|
+
|
283
|
+
/**
|
284
|
+
* All the current series in the chart.
|
285
|
+
*
|
286
|
+
* @name Highcharts.Chart#series
|
287
|
+
* @type {Array<Highcharts.Series>}
|
288
|
+
*/
|
289
|
+
this.series = [];
|
290
|
+
|
291
|
+
/**
|
292
|
+
* The `Time` object associated with the chart. Since v6.0.5,
|
293
|
+
* time settings can be applied individually for each chart. If
|
294
|
+
* no individual settings apply, the `Time` object is shared by
|
295
|
+
* all instances.
|
296
|
+
*
|
297
|
+
* @name Highcharts.Chart#time
|
298
|
+
* @type {Highcharts.Time}
|
299
|
+
*/
|
300
|
+
this.time =
|
301
|
+
userOptions.time && Object.keys(userOptions.time).length ?
|
302
|
+
new H.Time(userOptions.time) :
|
303
|
+
H.time;
|
304
|
+
|
305
|
+
/**
|
306
|
+
* Whether the chart is in styled mode, meaning all presentatinoal
|
307
|
+
* attributes are avoided.
|
308
|
+
*
|
309
|
+
* @name Highcharts.Chart#styledMode
|
310
|
+
* @type {boolean}
|
311
|
+
*/
|
312
|
+
this.styledMode = optionsChart.styledMode;
|
313
|
+
this.hasCartesianSeries = optionsChart.showAxes;
|
314
|
+
|
315
|
+
var chart = this;
|
316
|
+
|
317
|
+
// Add the chart to the global lookup
|
318
|
+
chart.index = charts.length;
|
319
|
+
|
320
|
+
charts.push(chart);
|
321
|
+
H.chartCount++;
|
322
|
+
|
323
|
+
// Chart event handlers
|
324
|
+
if (chartEvents) {
|
325
|
+
objectEach(chartEvents, function (event, eventType) {
|
326
|
+
addEvent(chart, eventType, event);
|
327
|
+
});
|
328
|
+
}
|
329
|
+
|
330
|
+
/**
|
331
|
+
* A collection of the X axes in the chart.
|
332
|
+
*
|
333
|
+
* @name Highcharts.Chart#xAxis
|
334
|
+
* @type {Array<Highcharts.Axis>}
|
335
|
+
*/
|
336
|
+
chart.xAxis = [];
|
337
|
+
|
338
|
+
/**
|
339
|
+
* A collection of the Y axes in the chart.
|
340
|
+
*
|
341
|
+
* @name Highcharts.Chart#yAxis
|
342
|
+
* @type {Array<Highcharts.Axis>}
|
343
|
+
*
|
344
|
+
* @todo
|
345
|
+
* Make events official: Fire the event `afterInit`.
|
346
|
+
*/
|
347
|
+
chart.yAxis = [];
|
348
|
+
|
349
|
+
chart.pointCount = chart.colorCounter = chart.symbolCounter = 0;
|
350
|
+
|
351
|
+
// Fire after init but before first render, before axes and series
|
352
|
+
// have been initialized.
|
353
|
+
fireEvent(chart, 'afterInit');
|
354
|
+
|
355
|
+
chart.firstRender();
|
356
|
+
});
|
357
|
+
},
|
358
|
+
|
359
|
+
/**
|
360
|
+
* Internal function to unitialize an individual series.
|
361
|
+
*
|
362
|
+
* @private
|
363
|
+
* @function Highcharts.Chart#initSeries
|
364
|
+
*
|
365
|
+
* @param {Highcharts.ChartOptions} options
|
366
|
+
*
|
367
|
+
* @return {Highcharts.Series}
|
368
|
+
*/
|
369
|
+
initSeries: function (options) {
|
370
|
+
var chart = this,
|
371
|
+
optionsChart = chart.options.chart,
|
372
|
+
type = (
|
373
|
+
options.type ||
|
374
|
+
optionsChart.type ||
|
375
|
+
optionsChart.defaultSeriesType
|
376
|
+
),
|
377
|
+
series,
|
378
|
+
Constr = seriesTypes[type];
|
379
|
+
|
380
|
+
// No such series type
|
381
|
+
if (!Constr) {
|
382
|
+
H.error(17, true, chart);
|
383
|
+
}
|
384
|
+
|
385
|
+
series = new Constr();
|
386
|
+
series.init(this, options);
|
387
|
+
return series;
|
388
|
+
},
|
389
|
+
|
390
|
+
/**
|
391
|
+
* Order all series above a given index. When series are added and ordered
|
392
|
+
* by configuration, only the last series is handled (#248, #1123, #2456,
|
393
|
+
* #6112). This function is called on series initialization and destroy.
|
394
|
+
*
|
395
|
+
* @private
|
396
|
+
* @function Highcharts.Series#orderSeries
|
397
|
+
*
|
398
|
+
* @param {number} fromIndex
|
399
|
+
* If this is given, only the series above this index are handled.
|
400
|
+
*/
|
401
|
+
orderSeries: function (fromIndex) {
|
402
|
+
var series = this.series,
|
403
|
+
i = fromIndex || 0;
|
404
|
+
|
405
|
+
for (; i < series.length; i++) {
|
406
|
+
if (series[i]) {
|
407
|
+
series[i].index = i;
|
408
|
+
series[i].name = series[i].getName();
|
409
|
+
}
|
410
|
+
}
|
411
|
+
},
|
412
|
+
|
413
|
+
/**
|
414
|
+
* Check whether a given point is within the plot area.
|
415
|
+
*
|
416
|
+
* @function Highcharts.Chart#isInsidePlot
|
417
|
+
*
|
418
|
+
* @param {number} plotX
|
419
|
+
* Pixel x relative to the plot area.
|
420
|
+
*
|
421
|
+
* @param {number} plotY
|
422
|
+
* Pixel y relative to the plot area.
|
423
|
+
*
|
424
|
+
* @param {boolean} inverted
|
425
|
+
* Whether the chart is inverted.
|
426
|
+
*
|
427
|
+
* @return {boolean}
|
428
|
+
* Returns true if the given point is inside the plot area.
|
429
|
+
*/
|
430
|
+
isInsidePlot: function (plotX, plotY, inverted) {
|
431
|
+
var x = inverted ? plotY : plotX,
|
432
|
+
y = inverted ? plotX : plotY;
|
433
|
+
|
434
|
+
return x >= 0 &&
|
435
|
+
x <= this.plotWidth &&
|
436
|
+
y >= 0 &&
|
437
|
+
y <= this.plotHeight;
|
438
|
+
},
|
439
|
+
|
440
|
+
/**
|
441
|
+
* Redraw the chart after changes have been done to the data, axis extremes
|
442
|
+
* chart size or chart elements. All methods for updating axes, series or
|
443
|
+
* points have a parameter for redrawing the chart. This is `true` by
|
444
|
+
* default. But in many cases you want to do more than one operation on the
|
445
|
+
* chart before redrawing, for example add a number of points. In those
|
446
|
+
* cases it is a waste of resources to redraw the chart for each new point
|
447
|
+
* added. So you add the points and call `chart.redraw()` after.
|
448
|
+
*
|
449
|
+
* @function Highcharts.Chart#redraw
|
450
|
+
*
|
451
|
+
* @param {boolean|Highcharts.AnimationOptionsObject} [animation]
|
452
|
+
* If or how to apply animation to the redraw.
|
453
|
+
*
|
454
|
+
* @fires Highcharts.Chart#event:afterSetExtremes
|
455
|
+
* @fires Highcharts.Chart#event:beforeRedraw
|
456
|
+
* @fires Highcharts.Chart#event:predraw
|
457
|
+
* @fires Highcharts.Chart#event:redraw
|
458
|
+
* @fires Highcharts.Chart#event:render
|
459
|
+
* @fires Highcharts.Chart#event:updatedData
|
460
|
+
*/
|
461
|
+
redraw: function (animation) {
|
462
|
+
|
463
|
+
fireEvent(this, 'beforeRedraw');
|
464
|
+
|
465
|
+
var chart = this,
|
466
|
+
axes = chart.axes,
|
467
|
+
series = chart.series,
|
468
|
+
pointer = chart.pointer,
|
469
|
+
legend = chart.legend,
|
470
|
+
legendUserOptions = chart.userOptions.legend,
|
471
|
+
redrawLegend = chart.isDirtyLegend,
|
472
|
+
hasStackedSeries,
|
473
|
+
hasDirtyStacks,
|
474
|
+
hasCartesianSeries = chart.hasCartesianSeries,
|
475
|
+
isDirtyBox = chart.isDirtyBox,
|
476
|
+
i,
|
477
|
+
serie,
|
478
|
+
renderer = chart.renderer,
|
479
|
+
isHiddenChart = renderer.isHidden(),
|
480
|
+
afterRedraw = [];
|
481
|
+
|
482
|
+
// Handle responsive rules, not only on resize (#6130)
|
483
|
+
if (chart.setResponsive) {
|
484
|
+
chart.setResponsive(false);
|
485
|
+
}
|
486
|
+
|
487
|
+
H.setAnimation(animation, chart);
|
488
|
+
|
489
|
+
if (isHiddenChart) {
|
490
|
+
chart.temporaryDisplay();
|
491
|
+
}
|
492
|
+
|
493
|
+
// Adjust title layout (reflow multiline text)
|
494
|
+
chart.layOutTitles();
|
495
|
+
|
496
|
+
// link stacked series
|
497
|
+
i = series.length;
|
498
|
+
while (i--) {
|
499
|
+
serie = series[i];
|
500
|
+
|
501
|
+
if (serie.options.stacking) {
|
502
|
+
hasStackedSeries = true;
|
503
|
+
|
504
|
+
if (serie.isDirty) {
|
505
|
+
hasDirtyStacks = true;
|
506
|
+
break;
|
507
|
+
}
|
508
|
+
}
|
509
|
+
}
|
510
|
+
if (hasDirtyStacks) { // mark others as dirty
|
511
|
+
i = series.length;
|
512
|
+
while (i--) {
|
513
|
+
serie = series[i];
|
514
|
+
if (serie.options.stacking) {
|
515
|
+
serie.isDirty = true;
|
516
|
+
}
|
517
|
+
}
|
518
|
+
}
|
519
|
+
|
520
|
+
// Handle updated data in the series
|
521
|
+
series.forEach(function (serie) {
|
522
|
+
if (serie.isDirty) {
|
523
|
+
if (serie.options.legendType === 'point') {
|
524
|
+
if (serie.updateTotals) {
|
525
|
+
serie.updateTotals();
|
526
|
+
}
|
527
|
+
redrawLegend = true;
|
528
|
+
} else if (
|
529
|
+
legendUserOptions &&
|
530
|
+
(
|
531
|
+
legendUserOptions.labelFormatter ||
|
532
|
+
legendUserOptions.labelFormat
|
533
|
+
)
|
534
|
+
) {
|
535
|
+
redrawLegend = true; // #2165
|
536
|
+
}
|
537
|
+
}
|
538
|
+
if (serie.isDirtyData) {
|
539
|
+
fireEvent(serie, 'updatedData');
|
540
|
+
}
|
541
|
+
});
|
542
|
+
|
543
|
+
// handle added or removed series
|
544
|
+
if (redrawLegend && legend && legend.options.enabled) {
|
545
|
+
// draw legend graphics
|
546
|
+
legend.render();
|
547
|
+
|
548
|
+
chart.isDirtyLegend = false;
|
549
|
+
}
|
550
|
+
|
551
|
+
// reset stacks
|
552
|
+
if (hasStackedSeries) {
|
553
|
+
chart.getStacks();
|
554
|
+
}
|
555
|
+
|
556
|
+
|
557
|
+
if (hasCartesianSeries) {
|
558
|
+
// set axes scales
|
559
|
+
axes.forEach(function (axis) {
|
560
|
+
axis.updateNames();
|
561
|
+
axis.setScale();
|
562
|
+
});
|
563
|
+
}
|
564
|
+
|
565
|
+
chart.getMargins(); // #3098
|
566
|
+
|
567
|
+
if (hasCartesianSeries) {
|
568
|
+
// If one axis is dirty, all axes must be redrawn (#792, #2169)
|
569
|
+
axes.forEach(function (axis) {
|
570
|
+
if (axis.isDirty) {
|
571
|
+
isDirtyBox = true;
|
572
|
+
}
|
573
|
+
});
|
574
|
+
|
575
|
+
// redraw axes
|
576
|
+
axes.forEach(function (axis) {
|
577
|
+
|
578
|
+
// Fire 'afterSetExtremes' only if extremes are set
|
579
|
+
var key = axis.min + ',' + axis.max;
|
580
|
+
|
581
|
+
if (axis.extKey !== key) { // #821, #4452
|
582
|
+
axis.extKey = key;
|
583
|
+
|
584
|
+
// prevent a recursive call to chart.redraw() (#1119)
|
585
|
+
afterRedraw.push(function () {
|
586
|
+
fireEvent(
|
587
|
+
axis,
|
588
|
+
'afterSetExtremes',
|
589
|
+
extend(axis.eventArgs, axis.getExtremes())
|
590
|
+
); // #747, #751
|
591
|
+
delete axis.eventArgs;
|
592
|
+
});
|
593
|
+
}
|
594
|
+
if (isDirtyBox || hasStackedSeries) {
|
595
|
+
axis.redraw();
|
596
|
+
}
|
597
|
+
});
|
598
|
+
}
|
599
|
+
|
600
|
+
// the plot areas size has changed
|
601
|
+
if (isDirtyBox) {
|
602
|
+
chart.drawChartBox();
|
603
|
+
}
|
604
|
+
|
605
|
+
// Fire an event before redrawing series, used by the boost module to
|
606
|
+
// clear previous series renderings.
|
607
|
+
fireEvent(chart, 'predraw');
|
608
|
+
|
609
|
+
// redraw affected series
|
610
|
+
series.forEach(function (serie) {
|
611
|
+
if ((isDirtyBox || serie.isDirty) && serie.visible) {
|
612
|
+
serie.redraw();
|
613
|
+
}
|
614
|
+
// Set it here, otherwise we will have unlimited 'updatedData' calls
|
615
|
+
// for a hidden series after setData(). Fixes #6012
|
616
|
+
serie.isDirtyData = false;
|
617
|
+
});
|
618
|
+
|
619
|
+
// move tooltip or reset
|
620
|
+
if (pointer) {
|
621
|
+
pointer.reset(true);
|
622
|
+
}
|
623
|
+
|
624
|
+
// redraw if canvas
|
625
|
+
renderer.draw();
|
626
|
+
|
627
|
+
// Fire the events
|
628
|
+
fireEvent(chart, 'redraw');
|
629
|
+
fireEvent(chart, 'render');
|
630
|
+
|
631
|
+
if (isHiddenChart) {
|
632
|
+
chart.temporaryDisplay(true);
|
633
|
+
}
|
634
|
+
|
635
|
+
// Fire callbacks that are put on hold until after the redraw
|
636
|
+
afterRedraw.forEach(function (callback) {
|
637
|
+
callback.call();
|
638
|
+
});
|
639
|
+
},
|
640
|
+
|
641
|
+
/**
|
642
|
+
* Get an axis, series or point object by `id` as given in the configuration
|
643
|
+
* options. Returns `undefined` if no item is found.
|
644
|
+
*
|
645
|
+
* @sample highcharts/plotoptions/series-id/
|
646
|
+
* Get series by id
|
647
|
+
*
|
648
|
+
* @function Highcharts.Chart#get
|
649
|
+
*
|
650
|
+
* @param {string} id
|
651
|
+
* The id as given in the configuration options.
|
652
|
+
*
|
653
|
+
* @return {Highcharts.Axis|Highcharts.Series|Highcharts.Point|undefined}
|
654
|
+
* The retrieved item.
|
655
|
+
*/
|
656
|
+
get: function (id) {
|
657
|
+
|
658
|
+
var ret,
|
659
|
+
series = this.series,
|
660
|
+
i;
|
661
|
+
|
662
|
+
function itemById(item) {
|
663
|
+
return item.id === id || (item.options && item.options.id === id);
|
664
|
+
}
|
665
|
+
|
666
|
+
ret =
|
667
|
+
// Search axes
|
668
|
+
find(this.axes, itemById) ||
|
669
|
+
|
670
|
+
// Search series
|
671
|
+
find(this.series, itemById);
|
672
|
+
|
673
|
+
// Search points
|
674
|
+
for (i = 0; !ret && i < series.length; i++) {
|
675
|
+
ret = find(series[i].points || [], itemById);
|
676
|
+
}
|
677
|
+
|
678
|
+
return ret;
|
679
|
+
},
|
680
|
+
|
681
|
+
/**
|
682
|
+
* Create the Axis instances based on the config options.
|
683
|
+
*
|
684
|
+
* @private
|
685
|
+
* @function Highcharts.Chart#getAxes
|
686
|
+
*
|
687
|
+
* @fires Highcharts.Chart#event:afterGetAxes
|
688
|
+
* @fires Highcharts.Chart#event:getAxes
|
689
|
+
*/
|
690
|
+
getAxes: function () {
|
691
|
+
var chart = this,
|
692
|
+
options = this.options,
|
693
|
+
xAxisOptions = options.xAxis = splat(options.xAxis || {}),
|
694
|
+
yAxisOptions = options.yAxis = splat(options.yAxis || {}),
|
695
|
+
optionsArray;
|
696
|
+
|
697
|
+
fireEvent(this, 'getAxes');
|
698
|
+
|
699
|
+
// make sure the options are arrays and add some members
|
700
|
+
xAxisOptions.forEach(function (axis, i) {
|
701
|
+
axis.index = i;
|
702
|
+
axis.isX = true;
|
703
|
+
});
|
704
|
+
|
705
|
+
yAxisOptions.forEach(function (axis, i) {
|
706
|
+
axis.index = i;
|
707
|
+
});
|
708
|
+
|
709
|
+
// concatenate all axis options into one array
|
710
|
+
optionsArray = xAxisOptions.concat(yAxisOptions);
|
711
|
+
|
712
|
+
optionsArray.forEach(function (axisOptions) {
|
713
|
+
new Axis(chart, axisOptions); // eslint-disable-line no-new
|
714
|
+
});
|
715
|
+
|
716
|
+
fireEvent(this, 'afterGetAxes');
|
717
|
+
},
|
718
|
+
|
719
|
+
|
720
|
+
/**
|
721
|
+
* Returns an array of all currently selected points in the chart. Points
|
722
|
+
* can be selected by clicking or programmatically by the
|
723
|
+
* {@link Highcharts.Point#select}
|
724
|
+
* function.
|
725
|
+
*
|
726
|
+
* @sample highcharts/plotoptions/series-allowpointselect-line/
|
727
|
+
* Get selected points
|
728
|
+
*
|
729
|
+
* @function Highcharts.Chart#getSelectedPoints
|
730
|
+
*
|
731
|
+
* @return {Array<Highcharts.Point>}
|
732
|
+
* The currently selected points.
|
733
|
+
*/
|
734
|
+
getSelectedPoints: function () {
|
735
|
+
var points = [];
|
736
|
+
|
737
|
+
this.series.forEach(function (serie) {
|
738
|
+
// For one-to-one points inspect series.data in order to retrieve
|
739
|
+
// points outside the visible range (#6445). For grouped data,
|
740
|
+
// inspect the generated series.points.
|
741
|
+
points = points.concat(
|
742
|
+
(serie[serie.hasGroupedData ? 'points' : 'data'] || []).filter(
|
743
|
+
function (point) {
|
744
|
+
return point.selected;
|
745
|
+
}
|
746
|
+
)
|
747
|
+
);
|
748
|
+
});
|
749
|
+
return points;
|
750
|
+
},
|
751
|
+
|
752
|
+
/**
|
753
|
+
* Returns an array of all currently selected series in the chart. Series
|
754
|
+
* can be selected either programmatically by the
|
755
|
+
* {@link Highcharts.Series#select}
|
756
|
+
* function or by checking the checkbox next to the legend item if
|
757
|
+
* [series.showCheckBox](https://api.highcharts.com/highcharts/plotOptions.series.showCheckbox)
|
758
|
+
* is true.
|
759
|
+
*
|
760
|
+
* @sample highcharts/members/chart-getselectedseries/
|
761
|
+
* Get selected series
|
762
|
+
*
|
763
|
+
* @function Highcharts.Chart#getSelectedSeries
|
764
|
+
*
|
765
|
+
* @return {Array<Highcharts.Series>}
|
766
|
+
* The currently selected series.
|
767
|
+
*/
|
768
|
+
getSelectedSeries: function () {
|
769
|
+
return this.series.filter(function (serie) {
|
770
|
+
return serie.selected;
|
771
|
+
});
|
772
|
+
},
|
773
|
+
|
774
|
+
/**
|
775
|
+
* Set a new title or subtitle for the chart.
|
776
|
+
*
|
777
|
+
* @sample highcharts/members/chart-settitle/
|
778
|
+
* Set title text and styles
|
779
|
+
*
|
780
|
+
* @function Highcharts.Chart#setTitle
|
781
|
+
*
|
782
|
+
* @param {Highcharts.TitleOptions} titleOptions
|
783
|
+
* New title options. The title text itself is set by the
|
784
|
+
* `titleOptions.text` property.
|
785
|
+
*
|
786
|
+
* @param {Highcharts.SubtitleOptions} subtitleOptions
|
787
|
+
* New subtitle options. The subtitle text itself is set by the
|
788
|
+
* `subtitleOptions.text` property.
|
789
|
+
*
|
790
|
+
* @param {boolean} redraw
|
791
|
+
* Whether to redraw the chart or wait for a later call to
|
792
|
+
* `chart.redraw()`.
|
793
|
+
*/
|
794
|
+
setTitle: function (titleOptions, subtitleOptions, redraw) {
|
795
|
+
var chart = this,
|
796
|
+
options = chart.options,
|
797
|
+
styledMode = chart.styledMode,
|
798
|
+
chartTitleOptions,
|
799
|
+
chartSubtitleOptions;
|
800
|
+
|
801
|
+
chartTitleOptions = options.title = merge(
|
802
|
+
// Default styles
|
803
|
+
!styledMode && {
|
804
|
+
style: {
|
805
|
+
color: '#333333',
|
806
|
+
fontSize: options.isStock ? '16px' : '18px' // #2944
|
807
|
+
}
|
808
|
+
},
|
809
|
+
options.title,
|
810
|
+
titleOptions
|
811
|
+
);
|
812
|
+
chartSubtitleOptions = options.subtitle = merge(
|
813
|
+
// Default styles
|
814
|
+
!styledMode && {
|
815
|
+
style: {
|
816
|
+
color: '#666666'
|
817
|
+
}
|
818
|
+
},
|
819
|
+
options.subtitle,
|
820
|
+
subtitleOptions
|
821
|
+
);
|
822
|
+
|
823
|
+
|
824
|
+
// add title and subtitle
|
825
|
+
|
826
|
+
/**
|
827
|
+
* The chart title. The title has an `update` method that allows
|
828
|
+
* modifying the options directly or indirectly via
|
829
|
+
* `chart.update`.
|
830
|
+
*
|
831
|
+
* @sample highcharts/members/title-update/
|
832
|
+
* Updating titles
|
833
|
+
*
|
834
|
+
* @name Highcharts.Chart#title
|
835
|
+
* @type {Highcharts.TitleObject}
|
836
|
+
*/
|
837
|
+
|
838
|
+
/**
|
839
|
+
* The chart subtitle. The subtitle has an `update` method that
|
840
|
+
* allows modifying the options directly or indirectly via
|
841
|
+
* `chart.update`.
|
842
|
+
*
|
843
|
+
* @name Highcharts.Chart#subtitle
|
844
|
+
* @type {Highcharts.SubtitleObject}
|
845
|
+
*/
|
846
|
+
|
847
|
+
[
|
848
|
+
['title', titleOptions, chartTitleOptions],
|
849
|
+
['subtitle', subtitleOptions, chartSubtitleOptions]
|
850
|
+
].forEach(function (arr, i) {
|
851
|
+
var name = arr[0],
|
852
|
+
title = chart[name],
|
853
|
+
titleOptions = arr[1],
|
854
|
+
chartTitleOptions = arr[2];
|
855
|
+
|
856
|
+
if (title && titleOptions) {
|
857
|
+
chart[name] = title = title.destroy(); // remove old
|
858
|
+
}
|
859
|
+
|
860
|
+
if (chartTitleOptions && !title) {
|
861
|
+
chart[name] = chart.renderer.text(
|
862
|
+
chartTitleOptions.text,
|
863
|
+
0,
|
864
|
+
0,
|
865
|
+
chartTitleOptions.useHTML
|
866
|
+
)
|
867
|
+
.attr({
|
868
|
+
align: chartTitleOptions.align,
|
869
|
+
'class': 'highcharts-' + name,
|
870
|
+
zIndex: chartTitleOptions.zIndex || 4
|
871
|
+
})
|
872
|
+
.add();
|
873
|
+
|
874
|
+
// Update methods, shortcut to Chart.setTitle
|
875
|
+
chart[name].update = function (o) {
|
876
|
+
chart.setTitle(!i && o, i && o);
|
877
|
+
};
|
878
|
+
|
879
|
+
// Presentational
|
880
|
+
if (!styledMode) {
|
881
|
+
chart[name].css(chartTitleOptions.style);
|
882
|
+
}
|
883
|
+
|
884
|
+
}
|
885
|
+
});
|
886
|
+
chart.layOutTitles(redraw);
|
887
|
+
},
|
888
|
+
|
889
|
+
/**
|
890
|
+
* Internal function to lay out the chart titles and cache the full offset
|
891
|
+
* height for use in `getMargins`. The result is stored in
|
892
|
+
* `this.titleOffset`.
|
893
|
+
*
|
894
|
+
* @private
|
895
|
+
* @function Highcharts.Chart#layOutTitles
|
896
|
+
*
|
897
|
+
* @param {boolean} [redraw=true]
|
898
|
+
*/
|
899
|
+
layOutTitles: function (redraw) {
|
900
|
+
var titleOffset = 0,
|
901
|
+
requiresDirtyBox,
|
902
|
+
renderer = this.renderer,
|
903
|
+
spacingBox = this.spacingBox;
|
904
|
+
|
905
|
+
// Lay out the title and the subtitle respectively
|
906
|
+
['title', 'subtitle'].forEach(function (key) {
|
907
|
+
var title = this[key],
|
908
|
+
titleOptions = this.options[key],
|
909
|
+
offset = key === 'title' ? -3 :
|
910
|
+
// Floating subtitle (#6574)
|
911
|
+
titleOptions.verticalAlign ? 0 : titleOffset + 2,
|
912
|
+
titleSize;
|
913
|
+
|
914
|
+
if (title) {
|
915
|
+
|
916
|
+
if (!this.styledMode) {
|
917
|
+
titleSize = titleOptions.style.fontSize;
|
918
|
+
}
|
919
|
+
titleSize = renderer.fontMetrics(titleSize, title).b;
|
920
|
+
title
|
921
|
+
.css({
|
922
|
+
width: (titleOptions.width ||
|
923
|
+
spacingBox.width + titleOptions.widthAdjust) + 'px'
|
924
|
+
})
|
925
|
+
.align(extend({
|
926
|
+
y: offset + titleSize
|
927
|
+
}, titleOptions), false, 'spacingBox');
|
928
|
+
|
929
|
+
if (!titleOptions.floating && !titleOptions.verticalAlign) {
|
930
|
+
titleOffset = Math.ceil(
|
931
|
+
titleOffset +
|
932
|
+
// Skip the cache for HTML (#3481)
|
933
|
+
title.getBBox(titleOptions.useHTML).height
|
934
|
+
);
|
935
|
+
}
|
936
|
+
}
|
937
|
+
}, this);
|
938
|
+
|
939
|
+
requiresDirtyBox = this.titleOffset !== titleOffset;
|
940
|
+
this.titleOffset = titleOffset; // used in getMargins
|
941
|
+
|
942
|
+
if (!this.isDirtyBox && requiresDirtyBox) {
|
943
|
+
this.isDirtyBox = this.isDirtyLegend = requiresDirtyBox;
|
944
|
+
// Redraw if necessary (#2719, #2744)
|
945
|
+
if (this.hasRendered && pick(redraw, true) && this.isDirtyBox) {
|
946
|
+
this.redraw();
|
947
|
+
}
|
948
|
+
}
|
949
|
+
},
|
950
|
+
|
951
|
+
/**
|
952
|
+
* Internal function to get the chart width and height according to options
|
953
|
+
* and container size. Sets
|
954
|
+
* {@link Chart.chartWidth} and
|
955
|
+
* {@link Chart.chartHeight}.
|
956
|
+
*
|
957
|
+
* @function Highcharts.Chart#getChartSize
|
958
|
+
*/
|
959
|
+
getChartSize: function () {
|
960
|
+
var chart = this,
|
961
|
+
optionsChart = chart.options.chart,
|
962
|
+
widthOption = optionsChart.width,
|
963
|
+
heightOption = optionsChart.height,
|
964
|
+
renderTo = chart.renderTo;
|
965
|
+
|
966
|
+
// Get inner width and height
|
967
|
+
if (!defined(widthOption)) {
|
968
|
+
chart.containerWidth = H.getStyle(renderTo, 'width');
|
969
|
+
}
|
970
|
+
if (!defined(heightOption)) {
|
971
|
+
chart.containerHeight = H.getStyle(renderTo, 'height');
|
972
|
+
}
|
973
|
+
|
974
|
+
/**
|
975
|
+
* The current pixel width of the chart.
|
976
|
+
*
|
977
|
+
* @name Highcharts.Chart#chartWidth
|
978
|
+
* @type {number}
|
979
|
+
*/
|
980
|
+
chart.chartWidth = Math.max( // #1393
|
981
|
+
0,
|
982
|
+
widthOption || chart.containerWidth || 600 // #1460
|
983
|
+
);
|
984
|
+
/**
|
985
|
+
* The current pixel height of the chart.
|
986
|
+
*
|
987
|
+
* @name Highcharts.Chart#chartHeight
|
988
|
+
* @type {number}
|
989
|
+
*/
|
990
|
+
chart.chartHeight = Math.max(
|
991
|
+
0,
|
992
|
+
H.relativeLength(
|
993
|
+
heightOption,
|
994
|
+
chart.chartWidth
|
995
|
+
) ||
|
996
|
+
(chart.containerHeight > 1 ? chart.containerHeight : 400)
|
997
|
+
);
|
998
|
+
},
|
999
|
+
|
1000
|
+
/**
|
1001
|
+
* If the renderTo element has no offsetWidth, most likely one or more of
|
1002
|
+
* its parents are hidden. Loop up the DOM tree to temporarily display the
|
1003
|
+
* parents, then save the original display properties, and when the true
|
1004
|
+
* size is retrieved, reset them. Used on first render and on redraws.
|
1005
|
+
*
|
1006
|
+
* @private
|
1007
|
+
* @function Highcharts.Chart#temporaryDisplay
|
1008
|
+
*
|
1009
|
+
* @param {boolean} revert
|
1010
|
+
* Revert to the saved original styles.
|
1011
|
+
*/
|
1012
|
+
temporaryDisplay: function (revert) {
|
1013
|
+
var node = this.renderTo,
|
1014
|
+
tempStyle;
|
1015
|
+
|
1016
|
+
if (!revert) {
|
1017
|
+
while (node && node.style) {
|
1018
|
+
|
1019
|
+
// When rendering to a detached node, it needs to be temporarily
|
1020
|
+
// attached in order to read styling and bounding boxes (#5783,
|
1021
|
+
// #7024).
|
1022
|
+
if (!doc.body.contains(node) && !node.parentNode) {
|
1023
|
+
node.hcOrigDetached = true;
|
1024
|
+
doc.body.appendChild(node);
|
1025
|
+
}
|
1026
|
+
if (
|
1027
|
+
H.getStyle(node, 'display', false) === 'none' ||
|
1028
|
+
node.hcOricDetached
|
1029
|
+
) {
|
1030
|
+
node.hcOrigStyle = {
|
1031
|
+
display: node.style.display,
|
1032
|
+
height: node.style.height,
|
1033
|
+
overflow: node.style.overflow
|
1034
|
+
};
|
1035
|
+
tempStyle = {
|
1036
|
+
display: 'block',
|
1037
|
+
overflow: 'hidden'
|
1038
|
+
};
|
1039
|
+
if (node !== this.renderTo) {
|
1040
|
+
tempStyle.height = 0;
|
1041
|
+
}
|
1042
|
+
|
1043
|
+
H.css(node, tempStyle);
|
1044
|
+
|
1045
|
+
// If it still doesn't have an offset width after setting
|
1046
|
+
// display to block, it probably has an !important priority
|
1047
|
+
// #2631, 6803
|
1048
|
+
if (!node.offsetWidth) {
|
1049
|
+
node.style.setProperty('display', 'block', 'important');
|
1050
|
+
}
|
1051
|
+
}
|
1052
|
+
node = node.parentNode;
|
1053
|
+
|
1054
|
+
if (node === doc.body) {
|
1055
|
+
break;
|
1056
|
+
}
|
1057
|
+
}
|
1058
|
+
} else {
|
1059
|
+
while (node && node.style) {
|
1060
|
+
if (node.hcOrigStyle) {
|
1061
|
+
H.css(node, node.hcOrigStyle);
|
1062
|
+
delete node.hcOrigStyle;
|
1063
|
+
}
|
1064
|
+
if (node.hcOrigDetached) {
|
1065
|
+
doc.body.removeChild(node);
|
1066
|
+
node.hcOrigDetached = false;
|
1067
|
+
}
|
1068
|
+
node = node.parentNode;
|
1069
|
+
}
|
1070
|
+
}
|
1071
|
+
},
|
1072
|
+
|
1073
|
+
/**
|
1074
|
+
* Set the {@link Chart.container|chart container's} class name, in
|
1075
|
+
* addition to `highcharts-container`.
|
1076
|
+
*
|
1077
|
+
* @function Highcharts.Chart#setClassName
|
1078
|
+
*
|
1079
|
+
* @param {string} className
|
1080
|
+
*/
|
1081
|
+
setClassName: function (className) {
|
1082
|
+
this.container.className = 'highcharts-container ' + (className || '');
|
1083
|
+
},
|
1084
|
+
|
1085
|
+
/**
|
1086
|
+
* Get the containing element, determine the size and create the inner
|
1087
|
+
* container div to hold the chart.
|
1088
|
+
*
|
1089
|
+
* @private
|
1090
|
+
* @function Highcharts.Chart#afterGetContainer
|
1091
|
+
*
|
1092
|
+
* @fires Highcharts.Chart#event:afterGetContainer
|
1093
|
+
*/
|
1094
|
+
getContainer: function () {
|
1095
|
+
var chart = this,
|
1096
|
+
container,
|
1097
|
+
options = chart.options,
|
1098
|
+
optionsChart = options.chart,
|
1099
|
+
chartWidth,
|
1100
|
+
chartHeight,
|
1101
|
+
renderTo = chart.renderTo,
|
1102
|
+
indexAttrName = 'data-highcharts-chart',
|
1103
|
+
oldChartIndex,
|
1104
|
+
Ren,
|
1105
|
+
containerId = H.uniqueKey(),
|
1106
|
+
containerStyle,
|
1107
|
+
key;
|
1108
|
+
|
1109
|
+
if (!renderTo) {
|
1110
|
+
chart.renderTo = renderTo = optionsChart.renderTo;
|
1111
|
+
}
|
1112
|
+
|
1113
|
+
if (isString(renderTo)) {
|
1114
|
+
chart.renderTo = renderTo = doc.getElementById(renderTo);
|
1115
|
+
}
|
1116
|
+
|
1117
|
+
// Display an error if the renderTo is wrong
|
1118
|
+
if (!renderTo) {
|
1119
|
+
H.error(13, true, chart);
|
1120
|
+
}
|
1121
|
+
|
1122
|
+
// If the container already holds a chart, destroy it. The check for
|
1123
|
+
// hasRendered is there because web pages that are saved to disk from
|
1124
|
+
// the browser, will preserve the data-highcharts-chart attribute and
|
1125
|
+
// the SVG contents, but not an interactive chart. So in this case,
|
1126
|
+
// charts[oldChartIndex] will point to the wrong chart if any (#2609).
|
1127
|
+
oldChartIndex = pInt(attr(renderTo, indexAttrName));
|
1128
|
+
if (
|
1129
|
+
isNumber(oldChartIndex) &&
|
1130
|
+
charts[oldChartIndex] &&
|
1131
|
+
charts[oldChartIndex].hasRendered
|
1132
|
+
) {
|
1133
|
+
charts[oldChartIndex].destroy();
|
1134
|
+
}
|
1135
|
+
|
1136
|
+
// Make a reference to the chart from the div
|
1137
|
+
attr(renderTo, indexAttrName, chart.index);
|
1138
|
+
|
1139
|
+
// remove previous chart
|
1140
|
+
renderTo.innerHTML = '';
|
1141
|
+
|
1142
|
+
// If the container doesn't have an offsetWidth, it has or is a child of
|
1143
|
+
// a node that has display:none. We need to temporarily move it out to a
|
1144
|
+
// visible state to determine the size, else the legend and tooltips
|
1145
|
+
// won't render properly. The skipClone option is used in sparklines as
|
1146
|
+
// a micro optimization, saving about 1-2 ms each chart.
|
1147
|
+
if (!optionsChart.skipClone && !renderTo.offsetWidth) {
|
1148
|
+
chart.temporaryDisplay();
|
1149
|
+
}
|
1150
|
+
|
1151
|
+
// get the width and height
|
1152
|
+
chart.getChartSize();
|
1153
|
+
chartWidth = chart.chartWidth;
|
1154
|
+
chartHeight = chart.chartHeight;
|
1155
|
+
|
1156
|
+
// Allow table cells and flex-boxes to shrink without the chart blocking
|
1157
|
+
// them out (#6427)
|
1158
|
+
css(renderTo, { overflow: 'hidden' });
|
1159
|
+
|
1160
|
+
// Create the inner container
|
1161
|
+
if (!chart.styledMode) {
|
1162
|
+
containerStyle = extend({
|
1163
|
+
position: 'relative',
|
1164
|
+
// needed for context menu (avoidscrollbars) and content
|
1165
|
+
// overflow in IE
|
1166
|
+
overflow: 'hidden',
|
1167
|
+
width: chartWidth + 'px',
|
1168
|
+
height: chartHeight + 'px',
|
1169
|
+
textAlign: 'left',
|
1170
|
+
lineHeight: 'normal', // #427
|
1171
|
+
zIndex: 0, // #1072
|
1172
|
+
'-webkit-tap-highlight-color': 'rgba(0,0,0,0)'
|
1173
|
+
}, optionsChart.style);
|
1174
|
+
}
|
1175
|
+
|
1176
|
+
/**
|
1177
|
+
* The containing HTML element of the chart. The container is
|
1178
|
+
* dynamically inserted into the element given as the `renderTo`
|
1179
|
+
* parameter in the {@link Highcharts#chart} constructor.
|
1180
|
+
*
|
1181
|
+
* @name Highcharts.Chart#container
|
1182
|
+
* @type {Highcharts.HTMLDOMElement}
|
1183
|
+
*/
|
1184
|
+
container = createElement(
|
1185
|
+
'div',
|
1186
|
+
{
|
1187
|
+
id: containerId
|
1188
|
+
},
|
1189
|
+
containerStyle,
|
1190
|
+
renderTo
|
1191
|
+
);
|
1192
|
+
chart.container = container;
|
1193
|
+
|
1194
|
+
// cache the cursor (#1650)
|
1195
|
+
chart._cursor = container.style.cursor;
|
1196
|
+
|
1197
|
+
// Initialize the renderer
|
1198
|
+
Ren = H[optionsChart.renderer] || H.Renderer;
|
1199
|
+
|
1200
|
+
/**
|
1201
|
+
* The renderer instance of the chart. Each chart instance has only one
|
1202
|
+
* associated renderer.
|
1203
|
+
*
|
1204
|
+
* @name Highcharts.Chart#renderer
|
1205
|
+
* @type {Highcharts.SVGRenderer}
|
1206
|
+
*/
|
1207
|
+
chart.renderer = new Ren(
|
1208
|
+
container,
|
1209
|
+
chartWidth,
|
1210
|
+
chartHeight,
|
1211
|
+
null,
|
1212
|
+
optionsChart.forExport,
|
1213
|
+
options.exporting && options.exporting.allowHTML,
|
1214
|
+
chart.styledMode
|
1215
|
+
);
|
1216
|
+
|
1217
|
+
|
1218
|
+
chart.setClassName(optionsChart.className);
|
1219
|
+
if (!chart.styledMode) {
|
1220
|
+
chart.renderer.setStyle(optionsChart.style);
|
1221
|
+
} else {
|
1222
|
+
// Initialize definitions
|
1223
|
+
for (key in options.defs) {
|
1224
|
+
this.renderer.definition(options.defs[key]);
|
1225
|
+
}
|
1226
|
+
}
|
1227
|
+
|
1228
|
+
// Add a reference to the charts index
|
1229
|
+
chart.renderer.chartIndex = chart.index;
|
1230
|
+
|
1231
|
+
fireEvent(this, 'afterGetContainer');
|
1232
|
+
},
|
1233
|
+
|
1234
|
+
/**
|
1235
|
+
* Calculate margins by rendering axis labels in a preliminary position.
|
1236
|
+
* Title, subtitle and legend have already been rendered at this stage, but
|
1237
|
+
* will be moved into their final positions.
|
1238
|
+
*
|
1239
|
+
* @private
|
1240
|
+
* @function Highcharts.Chart#getMargins
|
1241
|
+
*
|
1242
|
+
* @param {boolean} skipAxes
|
1243
|
+
*
|
1244
|
+
* @fires Highcharts.Chart#event:getMargins
|
1245
|
+
*/
|
1246
|
+
getMargins: function (skipAxes) {
|
1247
|
+
var chart = this,
|
1248
|
+
spacing = chart.spacing,
|
1249
|
+
margin = chart.margin,
|
1250
|
+
titleOffset = chart.titleOffset;
|
1251
|
+
|
1252
|
+
chart.resetMargins();
|
1253
|
+
|
1254
|
+
// Adjust for title and subtitle
|
1255
|
+
if (titleOffset && !defined(margin[0])) {
|
1256
|
+
chart.plotTop = Math.max(
|
1257
|
+
chart.plotTop,
|
1258
|
+
titleOffset + chart.options.title.margin + spacing[0]
|
1259
|
+
);
|
1260
|
+
}
|
1261
|
+
|
1262
|
+
// Adjust for legend
|
1263
|
+
if (chart.legend && chart.legend.display) {
|
1264
|
+
chart.legend.adjustMargins(margin, spacing);
|
1265
|
+
}
|
1266
|
+
|
1267
|
+
fireEvent(this, 'getMargins');
|
1268
|
+
|
1269
|
+
if (!skipAxes) {
|
1270
|
+
this.getAxisMargins();
|
1271
|
+
}
|
1272
|
+
},
|
1273
|
+
|
1274
|
+
/**
|
1275
|
+
* @private
|
1276
|
+
* @function Highcharts.Chart#getAxisMargins
|
1277
|
+
*/
|
1278
|
+
getAxisMargins: function () {
|
1279
|
+
|
1280
|
+
var chart = this,
|
1281
|
+
// [top, right, bottom, left]
|
1282
|
+
axisOffset = chart.axisOffset = [0, 0, 0, 0],
|
1283
|
+
margin = chart.margin;
|
1284
|
+
|
1285
|
+
// pre-render axes to get labels offset width
|
1286
|
+
if (chart.hasCartesianSeries) {
|
1287
|
+
chart.axes.forEach(function (axis) {
|
1288
|
+
if (axis.visible) {
|
1289
|
+
axis.getOffset();
|
1290
|
+
}
|
1291
|
+
});
|
1292
|
+
}
|
1293
|
+
|
1294
|
+
// Add the axis offsets
|
1295
|
+
marginNames.forEach(function (m, side) {
|
1296
|
+
if (!defined(margin[side])) {
|
1297
|
+
chart[m] += axisOffset[side];
|
1298
|
+
}
|
1299
|
+
});
|
1300
|
+
|
1301
|
+
chart.setChartSize();
|
1302
|
+
|
1303
|
+
},
|
1304
|
+
|
1305
|
+
/**
|
1306
|
+
* Reflows the chart to its container. By default, the chart reflows
|
1307
|
+
* automatically to its container following a `window.resize` event, as per
|
1308
|
+
* the [chart.reflow](https://api.highcharts/highcharts/chart.reflow)
|
1309
|
+
* option. However, there are no reliable events for div resize, so if the
|
1310
|
+
* container is resized without a window resize event, this must be called
|
1311
|
+
* explicitly.
|
1312
|
+
*
|
1313
|
+
* @sample highcharts/members/chart-reflow/
|
1314
|
+
* Resize div and reflow
|
1315
|
+
* @sample highcharts/chart/events-container/
|
1316
|
+
* Pop up and reflow
|
1317
|
+
*
|
1318
|
+
* @function Highcharts.Chart#reflow
|
1319
|
+
*
|
1320
|
+
* @param {global.Event} [e]
|
1321
|
+
* Event arguments. Used primarily when the function is called
|
1322
|
+
* internally as a response to window resize.
|
1323
|
+
*/
|
1324
|
+
reflow: function (e) {
|
1325
|
+
var chart = this,
|
1326
|
+
optionsChart = chart.options.chart,
|
1327
|
+
renderTo = chart.renderTo,
|
1328
|
+
hasUserSize = (
|
1329
|
+
defined(optionsChart.width) &&
|
1330
|
+
defined(optionsChart.height)
|
1331
|
+
),
|
1332
|
+
width = optionsChart.width || H.getStyle(renderTo, 'width'),
|
1333
|
+
height = optionsChart.height || H.getStyle(renderTo, 'height'),
|
1334
|
+
target = e ? e.target : win;
|
1335
|
+
|
1336
|
+
// Width and height checks for display:none. Target is doc in IE8 and
|
1337
|
+
// Opera, win in Firefox, Chrome and IE9.
|
1338
|
+
if (
|
1339
|
+
!hasUserSize &&
|
1340
|
+
!chart.isPrinting &&
|
1341
|
+
width &&
|
1342
|
+
height &&
|
1343
|
+
(target === win || target === doc)
|
1344
|
+
) {
|
1345
|
+
if (
|
1346
|
+
width !== chart.containerWidth ||
|
1347
|
+
height !== chart.containerHeight
|
1348
|
+
) {
|
1349
|
+
H.clearTimeout(chart.reflowTimeout);
|
1350
|
+
// When called from window.resize, e is set, else it's called
|
1351
|
+
// directly (#2224)
|
1352
|
+
chart.reflowTimeout = syncTimeout(function () {
|
1353
|
+
// Set size, it may have been destroyed in the meantime
|
1354
|
+
// (#1257)
|
1355
|
+
if (chart.container) {
|
1356
|
+
chart.setSize(undefined, undefined, false);
|
1357
|
+
}
|
1358
|
+
}, e ? 100 : 0);
|
1359
|
+
}
|
1360
|
+
chart.containerWidth = width;
|
1361
|
+
chart.containerHeight = height;
|
1362
|
+
}
|
1363
|
+
},
|
1364
|
+
|
1365
|
+
/**
|
1366
|
+
* Toggle the event handlers necessary for auto resizing, depending on the
|
1367
|
+
* `chart.reflow` option.
|
1368
|
+
*
|
1369
|
+
* @private
|
1370
|
+
* @function Highcharts.Chart#setReflow
|
1371
|
+
*
|
1372
|
+
* @param {boolean} reflow
|
1373
|
+
*/
|
1374
|
+
setReflow: function (reflow) {
|
1375
|
+
|
1376
|
+
var chart = this;
|
1377
|
+
|
1378
|
+
if (reflow !== false && !this.unbindReflow) {
|
1379
|
+
this.unbindReflow = addEvent(win, 'resize', function (e) {
|
1380
|
+
chart.reflow(e);
|
1381
|
+
});
|
1382
|
+
addEvent(this, 'destroy', this.unbindReflow);
|
1383
|
+
|
1384
|
+
} else if (reflow === false && this.unbindReflow) {
|
1385
|
+
|
1386
|
+
// Unbind and unset
|
1387
|
+
this.unbindReflow = this.unbindReflow();
|
1388
|
+
}
|
1389
|
+
|
1390
|
+
// The following will add listeners to re-fit the chart before and after
|
1391
|
+
// printing (#2284). However it only works in WebKit. Should have worked
|
1392
|
+
// in Firefox, but not supported in IE.
|
1393
|
+
/*
|
1394
|
+
if (win.matchMedia) {
|
1395
|
+
win.matchMedia('print').addListener(function reflow() {
|
1396
|
+
chart.reflow();
|
1397
|
+
});
|
1398
|
+
}
|
1399
|
+
//*/
|
1400
|
+
},
|
1401
|
+
|
1402
|
+
/**
|
1403
|
+
* Resize the chart to a given width and height. In order to set the width
|
1404
|
+
* only, the height argument may be skipped. To set the height only, pass
|
1405
|
+
* `undefined` for the width.
|
1406
|
+
*
|
1407
|
+
* @sample highcharts/members/chart-setsize-button/
|
1408
|
+
* Test resizing from buttons
|
1409
|
+
* @sample highcharts/members/chart-setsize-jquery-resizable/
|
1410
|
+
* Add a jQuery UI resizable
|
1411
|
+
* @sample stock/members/chart-setsize/
|
1412
|
+
* Highstock with UI resizable
|
1413
|
+
*
|
1414
|
+
* @function Highcharts.Chart#setSize
|
1415
|
+
*
|
1416
|
+
* @param {number|null} [width]
|
1417
|
+
* The new pixel width of the chart. Since v4.2.6, the argument can
|
1418
|
+
* be `undefined` in order to preserve the current value (when
|
1419
|
+
* setting height only), or `null` to adapt to the width of the
|
1420
|
+
* containing element.
|
1421
|
+
*
|
1422
|
+
* @param {number|null} [height]
|
1423
|
+
* The new pixel height of the chart. Since v4.2.6, the argument can
|
1424
|
+
* be `undefined` in order to preserve the current value, or `null`
|
1425
|
+
* in order to adapt to the height of the containing element.
|
1426
|
+
*
|
1427
|
+
* @param {Highcharts.AnimationOptionsObject} [animation=true]
|
1428
|
+
* Whether and how to apply animation.
|
1429
|
+
*
|
1430
|
+
* @fires Highcharts.Chart#event:endResize
|
1431
|
+
* @fires Highcharts.Chart#event:resize
|
1432
|
+
*/
|
1433
|
+
setSize: function (width, height, animation) {
|
1434
|
+
var chart = this,
|
1435
|
+
renderer = chart.renderer,
|
1436
|
+
globalAnimation;
|
1437
|
+
|
1438
|
+
// Handle the isResizing counter
|
1439
|
+
chart.isResizing += 1;
|
1440
|
+
|
1441
|
+
// set the animation for the current process
|
1442
|
+
H.setAnimation(animation, chart);
|
1443
|
+
|
1444
|
+
chart.oldChartHeight = chart.chartHeight;
|
1445
|
+
chart.oldChartWidth = chart.chartWidth;
|
1446
|
+
if (width !== undefined) {
|
1447
|
+
chart.options.chart.width = width;
|
1448
|
+
}
|
1449
|
+
if (height !== undefined) {
|
1450
|
+
chart.options.chart.height = height;
|
1451
|
+
}
|
1452
|
+
chart.getChartSize();
|
1453
|
+
|
1454
|
+
// Resize the container with the global animation applied if enabled
|
1455
|
+
// (#2503)
|
1456
|
+
if (!chart.styledMode) {
|
1457
|
+
globalAnimation = renderer.globalAnimation;
|
1458
|
+
(globalAnimation ? animate : css)(chart.container, {
|
1459
|
+
width: chart.chartWidth + 'px',
|
1460
|
+
height: chart.chartHeight + 'px'
|
1461
|
+
}, globalAnimation);
|
1462
|
+
}
|
1463
|
+
|
1464
|
+
chart.setChartSize(true);
|
1465
|
+
renderer.setSize(chart.chartWidth, chart.chartHeight, animation);
|
1466
|
+
|
1467
|
+
// handle axes
|
1468
|
+
chart.axes.forEach(function (axis) {
|
1469
|
+
axis.isDirty = true;
|
1470
|
+
axis.setScale();
|
1471
|
+
});
|
1472
|
+
|
1473
|
+
chart.isDirtyLegend = true; // force legend redraw
|
1474
|
+
chart.isDirtyBox = true; // force redraw of plot and chart border
|
1475
|
+
|
1476
|
+
chart.layOutTitles(); // #2857
|
1477
|
+
chart.getMargins();
|
1478
|
+
|
1479
|
+
chart.redraw(animation);
|
1480
|
+
|
1481
|
+
|
1482
|
+
chart.oldChartHeight = null;
|
1483
|
+
fireEvent(chart, 'resize');
|
1484
|
+
|
1485
|
+
// Fire endResize and set isResizing back. If animation is disabled,
|
1486
|
+
// fire without delay
|
1487
|
+
syncTimeout(function () {
|
1488
|
+
if (chart) {
|
1489
|
+
fireEvent(chart, 'endResize', null, function () {
|
1490
|
+
chart.isResizing -= 1;
|
1491
|
+
});
|
1492
|
+
}
|
1493
|
+
}, animObject(globalAnimation).duration);
|
1494
|
+
},
|
1495
|
+
|
1496
|
+
/**
|
1497
|
+
* Set the public chart properties. This is done before and after the
|
1498
|
+
* pre-render to determine margin sizes.
|
1499
|
+
*
|
1500
|
+
* @private
|
1501
|
+
* @function Highcharts.Chart#setChartSize
|
1502
|
+
*
|
1503
|
+
* @param {boolean} skipAxes
|
1504
|
+
*
|
1505
|
+
* @fires Highcharts.Chart#event:afterSetChartSize
|
1506
|
+
*/
|
1507
|
+
setChartSize: function (skipAxes) {
|
1508
|
+
var chart = this,
|
1509
|
+
inverted = chart.inverted,
|
1510
|
+
renderer = chart.renderer,
|
1511
|
+
chartWidth = chart.chartWidth,
|
1512
|
+
chartHeight = chart.chartHeight,
|
1513
|
+
optionsChart = chart.options.chart,
|
1514
|
+
spacing = chart.spacing,
|
1515
|
+
clipOffset = chart.clipOffset,
|
1516
|
+
clipX,
|
1517
|
+
clipY,
|
1518
|
+
plotLeft,
|
1519
|
+
plotTop,
|
1520
|
+
plotWidth,
|
1521
|
+
plotHeight,
|
1522
|
+
plotBorderWidth;
|
1523
|
+
|
1524
|
+
/**
|
1525
|
+
* The current left position of the plot area in pixels.
|
1526
|
+
*
|
1527
|
+
* @name Highcharts.Chart#plotLeft
|
1528
|
+
* @type {number}
|
1529
|
+
*/
|
1530
|
+
chart.plotLeft = plotLeft = Math.round(chart.plotLeft);
|
1531
|
+
|
1532
|
+
/**
|
1533
|
+
* The current top position of the plot area in pixels.
|
1534
|
+
*
|
1535
|
+
* @name Highcharts.Chart#plotTop
|
1536
|
+
* @type {number}
|
1537
|
+
*/
|
1538
|
+
chart.plotTop = plotTop = Math.round(chart.plotTop);
|
1539
|
+
|
1540
|
+
/**
|
1541
|
+
* The current width of the plot area in pixels.
|
1542
|
+
*
|
1543
|
+
* @name Highcharts.Chart#plotWidth
|
1544
|
+
* @type {number}
|
1545
|
+
*/
|
1546
|
+
chart.plotWidth = plotWidth = Math.max(
|
1547
|
+
0,
|
1548
|
+
Math.round(chartWidth - plotLeft - chart.marginRight)
|
1549
|
+
);
|
1550
|
+
|
1551
|
+
/**
|
1552
|
+
* The current height of the plot area in pixels.
|
1553
|
+
*
|
1554
|
+
* @name Highcharts.Chart#plotHeight
|
1555
|
+
* @type {number}
|
1556
|
+
*/
|
1557
|
+
chart.plotHeight = plotHeight = Math.max(
|
1558
|
+
0,
|
1559
|
+
Math.round(chartHeight - plotTop - chart.marginBottom)
|
1560
|
+
);
|
1561
|
+
|
1562
|
+
chart.plotSizeX = inverted ? plotHeight : plotWidth;
|
1563
|
+
chart.plotSizeY = inverted ? plotWidth : plotHeight;
|
1564
|
+
|
1565
|
+
chart.plotBorderWidth = optionsChart.plotBorderWidth || 0;
|
1566
|
+
|
1567
|
+
// Set boxes used for alignment
|
1568
|
+
chart.spacingBox = renderer.spacingBox = {
|
1569
|
+
x: spacing[3],
|
1570
|
+
y: spacing[0],
|
1571
|
+
width: chartWidth - spacing[3] - spacing[1],
|
1572
|
+
height: chartHeight - spacing[0] - spacing[2]
|
1573
|
+
};
|
1574
|
+
chart.plotBox = renderer.plotBox = {
|
1575
|
+
x: plotLeft,
|
1576
|
+
y: plotTop,
|
1577
|
+
width: plotWidth,
|
1578
|
+
height: plotHeight
|
1579
|
+
};
|
1580
|
+
|
1581
|
+
plotBorderWidth = 2 * Math.floor(chart.plotBorderWidth / 2);
|
1582
|
+
clipX = Math.ceil(Math.max(plotBorderWidth, clipOffset[3]) / 2);
|
1583
|
+
clipY = Math.ceil(Math.max(plotBorderWidth, clipOffset[0]) / 2);
|
1584
|
+
chart.clipBox = {
|
1585
|
+
x: clipX,
|
1586
|
+
y: clipY,
|
1587
|
+
width: Math.floor(
|
1588
|
+
chart.plotSizeX -
|
1589
|
+
Math.max(plotBorderWidth, clipOffset[1]) / 2 -
|
1590
|
+
clipX
|
1591
|
+
),
|
1592
|
+
height: Math.max(
|
1593
|
+
0,
|
1594
|
+
Math.floor(
|
1595
|
+
chart.plotSizeY -
|
1596
|
+
Math.max(plotBorderWidth, clipOffset[2]) / 2 -
|
1597
|
+
clipY
|
1598
|
+
)
|
1599
|
+
)
|
1600
|
+
};
|
1601
|
+
|
1602
|
+
if (!skipAxes) {
|
1603
|
+
chart.axes.forEach(function (axis) {
|
1604
|
+
axis.setAxisSize();
|
1605
|
+
axis.setAxisTranslation();
|
1606
|
+
});
|
1607
|
+
}
|
1608
|
+
|
1609
|
+
fireEvent(chart, 'afterSetChartSize', { skipAxes: skipAxes });
|
1610
|
+
},
|
1611
|
+
|
1612
|
+
/**
|
1613
|
+
* Initial margins before auto size margins are applied.
|
1614
|
+
*
|
1615
|
+
* @private
|
1616
|
+
* @function Highcharts.Chart#resetMargins
|
1617
|
+
*/
|
1618
|
+
resetMargins: function () {
|
1619
|
+
|
1620
|
+
fireEvent(this, 'resetMargins');
|
1621
|
+
|
1622
|
+
var chart = this,
|
1623
|
+
chartOptions = chart.options.chart;
|
1624
|
+
|
1625
|
+
// Create margin and spacing array
|
1626
|
+
['margin', 'spacing'].forEach(function splashArrays(target) {
|
1627
|
+
var value = chartOptions[target],
|
1628
|
+
values = isObject(value) ? value : [value, value, value, value];
|
1629
|
+
|
1630
|
+
[
|
1631
|
+
'Top',
|
1632
|
+
'Right',
|
1633
|
+
'Bottom',
|
1634
|
+
'Left'
|
1635
|
+
].forEach(function (sideName, side) {
|
1636
|
+
chart[target][side] = pick(
|
1637
|
+
chartOptions[target + sideName],
|
1638
|
+
values[side]
|
1639
|
+
);
|
1640
|
+
});
|
1641
|
+
});
|
1642
|
+
|
1643
|
+
// Set margin names like chart.plotTop, chart.plotLeft,
|
1644
|
+
// chart.marginRight, chart.marginBottom.
|
1645
|
+
marginNames.forEach(function (m, side) {
|
1646
|
+
chart[m] = pick(chart.margin[side], chart.spacing[side]);
|
1647
|
+
});
|
1648
|
+
chart.axisOffset = [0, 0, 0, 0]; // top, right, bottom, left
|
1649
|
+
chart.clipOffset = [0, 0, 0, 0];
|
1650
|
+
},
|
1651
|
+
|
1652
|
+
/**
|
1653
|
+
* Internal function to draw or redraw the borders and backgrounds for chart
|
1654
|
+
* and plot area.
|
1655
|
+
*
|
1656
|
+
* @private
|
1657
|
+
* @function Highcharts.Chart#drawChartBox
|
1658
|
+
*
|
1659
|
+
* @fires Highcharts.Chart#event:afterDrawChartBox
|
1660
|
+
*/
|
1661
|
+
drawChartBox: function () {
|
1662
|
+
var chart = this,
|
1663
|
+
optionsChart = chart.options.chart,
|
1664
|
+
renderer = chart.renderer,
|
1665
|
+
chartWidth = chart.chartWidth,
|
1666
|
+
chartHeight = chart.chartHeight,
|
1667
|
+
chartBackground = chart.chartBackground,
|
1668
|
+
plotBackground = chart.plotBackground,
|
1669
|
+
plotBorder = chart.plotBorder,
|
1670
|
+
chartBorderWidth,
|
1671
|
+
styledMode = chart.styledMode,
|
1672
|
+
plotBGImage = chart.plotBGImage,
|
1673
|
+
chartBackgroundColor = optionsChart.backgroundColor,
|
1674
|
+
plotBackgroundColor = optionsChart.plotBackgroundColor,
|
1675
|
+
plotBackgroundImage = optionsChart.plotBackgroundImage,
|
1676
|
+
mgn,
|
1677
|
+
bgAttr,
|
1678
|
+
plotLeft = chart.plotLeft,
|
1679
|
+
plotTop = chart.plotTop,
|
1680
|
+
plotWidth = chart.plotWidth,
|
1681
|
+
plotHeight = chart.plotHeight,
|
1682
|
+
plotBox = chart.plotBox,
|
1683
|
+
clipRect = chart.clipRect,
|
1684
|
+
clipBox = chart.clipBox,
|
1685
|
+
verb = 'animate';
|
1686
|
+
|
1687
|
+
// Chart area
|
1688
|
+
if (!chartBackground) {
|
1689
|
+
chart.chartBackground = chartBackground = renderer.rect()
|
1690
|
+
.addClass('highcharts-background')
|
1691
|
+
.add();
|
1692
|
+
verb = 'attr';
|
1693
|
+
}
|
1694
|
+
|
1695
|
+
if (!styledMode) {
|
1696
|
+
// Presentational
|
1697
|
+
chartBorderWidth = optionsChart.borderWidth || 0;
|
1698
|
+
mgn = chartBorderWidth + (optionsChart.shadow ? 8 : 0);
|
1699
|
+
|
1700
|
+
bgAttr = {
|
1701
|
+
fill: chartBackgroundColor || 'none'
|
1702
|
+
};
|
1703
|
+
|
1704
|
+
if (chartBorderWidth || chartBackground['stroke-width']) { // #980
|
1705
|
+
bgAttr.stroke = optionsChart.borderColor;
|
1706
|
+
bgAttr['stroke-width'] = chartBorderWidth;
|
1707
|
+
}
|
1708
|
+
chartBackground
|
1709
|
+
.attr(bgAttr)
|
1710
|
+
.shadow(optionsChart.shadow);
|
1711
|
+
} else {
|
1712
|
+
chartBorderWidth = mgn = chartBackground.strokeWidth();
|
1713
|
+
}
|
1714
|
+
|
1715
|
+
|
1716
|
+
chartBackground[verb]({
|
1717
|
+
x: mgn / 2,
|
1718
|
+
y: mgn / 2,
|
1719
|
+
width: chartWidth - mgn - chartBorderWidth % 2,
|
1720
|
+
height: chartHeight - mgn - chartBorderWidth % 2,
|
1721
|
+
r: optionsChart.borderRadius
|
1722
|
+
});
|
1723
|
+
|
1724
|
+
// Plot background
|
1725
|
+
verb = 'animate';
|
1726
|
+
if (!plotBackground) {
|
1727
|
+
verb = 'attr';
|
1728
|
+
chart.plotBackground = plotBackground = renderer.rect()
|
1729
|
+
.addClass('highcharts-plot-background')
|
1730
|
+
.add();
|
1731
|
+
}
|
1732
|
+
plotBackground[verb](plotBox);
|
1733
|
+
|
1734
|
+
if (!styledMode) {
|
1735
|
+
// Presentational attributes for the background
|
1736
|
+
plotBackground
|
1737
|
+
.attr({
|
1738
|
+
fill: plotBackgroundColor || 'none'
|
1739
|
+
})
|
1740
|
+
.shadow(optionsChart.plotShadow);
|
1741
|
+
|
1742
|
+
// Create the background image
|
1743
|
+
if (plotBackgroundImage) {
|
1744
|
+
if (!plotBGImage) {
|
1745
|
+
chart.plotBGImage = renderer.image(
|
1746
|
+
plotBackgroundImage,
|
1747
|
+
plotLeft,
|
1748
|
+
plotTop,
|
1749
|
+
plotWidth,
|
1750
|
+
plotHeight
|
1751
|
+
).add();
|
1752
|
+
} else {
|
1753
|
+
plotBGImage.animate(plotBox);
|
1754
|
+
}
|
1755
|
+
}
|
1756
|
+
}
|
1757
|
+
|
1758
|
+
// Plot clip
|
1759
|
+
if (!clipRect) {
|
1760
|
+
chart.clipRect = renderer.clipRect(clipBox);
|
1761
|
+
} else {
|
1762
|
+
clipRect.animate({
|
1763
|
+
width: clipBox.width,
|
1764
|
+
height: clipBox.height
|
1765
|
+
});
|
1766
|
+
}
|
1767
|
+
|
1768
|
+
// Plot area border
|
1769
|
+
verb = 'animate';
|
1770
|
+
if (!plotBorder) {
|
1771
|
+
verb = 'attr';
|
1772
|
+
chart.plotBorder = plotBorder = renderer.rect()
|
1773
|
+
.addClass('highcharts-plot-border')
|
1774
|
+
.attr({
|
1775
|
+
zIndex: 1 // Above the grid
|
1776
|
+
})
|
1777
|
+
.add();
|
1778
|
+
}
|
1779
|
+
|
1780
|
+
if (!styledMode) {
|
1781
|
+
// Presentational
|
1782
|
+
plotBorder.attr({
|
1783
|
+
stroke: optionsChart.plotBorderColor,
|
1784
|
+
'stroke-width': optionsChart.plotBorderWidth || 0,
|
1785
|
+
fill: 'none'
|
1786
|
+
});
|
1787
|
+
}
|
1788
|
+
|
1789
|
+
plotBorder[verb](plotBorder.crisp({
|
1790
|
+
x: plotLeft,
|
1791
|
+
y: plotTop,
|
1792
|
+
width: plotWidth,
|
1793
|
+
height: plotHeight
|
1794
|
+
}, -plotBorder.strokeWidth())); // #3282 plotBorder should be negative;
|
1795
|
+
|
1796
|
+
// reset
|
1797
|
+
chart.isDirtyBox = false;
|
1798
|
+
|
1799
|
+
fireEvent(this, 'afterDrawChartBox');
|
1800
|
+
},
|
1801
|
+
|
1802
|
+
/**
|
1803
|
+
* Detect whether a certain chart property is needed based on inspecting its
|
1804
|
+
* options and series. This mainly applies to the chart.inverted property,
|
1805
|
+
* and in extensions to the chart.angular and chart.polar properties.
|
1806
|
+
*
|
1807
|
+
* @private
|
1808
|
+
* @function Highcharts.Chart#propFromSeries
|
1809
|
+
*/
|
1810
|
+
propFromSeries: function () {
|
1811
|
+
var chart = this,
|
1812
|
+
optionsChart = chart.options.chart,
|
1813
|
+
klass,
|
1814
|
+
seriesOptions = chart.options.series,
|
1815
|
+
i,
|
1816
|
+
value;
|
1817
|
+
|
1818
|
+
|
1819
|
+
['inverted', 'angular', 'polar'].forEach(function (key) {
|
1820
|
+
|
1821
|
+
// The default series type's class
|
1822
|
+
klass = seriesTypes[optionsChart.type ||
|
1823
|
+
optionsChart.defaultSeriesType];
|
1824
|
+
|
1825
|
+
// Get the value from available chart-wide properties
|
1826
|
+
value =
|
1827
|
+
optionsChart[key] || // It is set in the options
|
1828
|
+
(klass && klass.prototype[key]); // The default series class
|
1829
|
+
// requires it
|
1830
|
+
|
1831
|
+
// 4. Check if any the chart's series require it
|
1832
|
+
i = seriesOptions && seriesOptions.length;
|
1833
|
+
while (!value && i--) {
|
1834
|
+
klass = seriesTypes[seriesOptions[i].type];
|
1835
|
+
if (klass && klass.prototype[key]) {
|
1836
|
+
value = true;
|
1837
|
+
}
|
1838
|
+
}
|
1839
|
+
|
1840
|
+
// Set the chart property
|
1841
|
+
chart[key] = value;
|
1842
|
+
});
|
1843
|
+
|
1844
|
+
},
|
1845
|
+
|
1846
|
+
/**
|
1847
|
+
* Internal function to link two or more series together, based on the
|
1848
|
+
* `linkedTo` option. This is done from `Chart.render`, and after
|
1849
|
+
* `Chart.addSeries` and `Series.remove`.
|
1850
|
+
*
|
1851
|
+
* @private
|
1852
|
+
* @function Highcharts.Chart#linkSeries
|
1853
|
+
*
|
1854
|
+
* @fires Highcharts.Chart#event:afterLinkSeries
|
1855
|
+
*/
|
1856
|
+
linkSeries: function () {
|
1857
|
+
var chart = this,
|
1858
|
+
chartSeries = chart.series;
|
1859
|
+
|
1860
|
+
// Reset links
|
1861
|
+
chartSeries.forEach(function (series) {
|
1862
|
+
series.linkedSeries.length = 0;
|
1863
|
+
});
|
1864
|
+
|
1865
|
+
// Apply new links
|
1866
|
+
chartSeries.forEach(function (series) {
|
1867
|
+
var linkedTo = series.options.linkedTo;
|
1868
|
+
|
1869
|
+
if (isString(linkedTo)) {
|
1870
|
+
if (linkedTo === ':previous') {
|
1871
|
+
linkedTo = chart.series[series.index - 1];
|
1872
|
+
} else {
|
1873
|
+
linkedTo = chart.get(linkedTo);
|
1874
|
+
}
|
1875
|
+
// #3341 avoid mutual linking
|
1876
|
+
if (linkedTo && linkedTo.linkedParent !== series) {
|
1877
|
+
linkedTo.linkedSeries.push(series);
|
1878
|
+
series.linkedParent = linkedTo;
|
1879
|
+
series.visible = pick(
|
1880
|
+
series.options.visible,
|
1881
|
+
linkedTo.options.visible,
|
1882
|
+
series.visible
|
1883
|
+
); // #3879
|
1884
|
+
}
|
1885
|
+
}
|
1886
|
+
});
|
1887
|
+
|
1888
|
+
fireEvent(this, 'afterLinkSeries');
|
1889
|
+
},
|
1890
|
+
|
1891
|
+
/**
|
1892
|
+
* Render series for the chart.
|
1893
|
+
*
|
1894
|
+
* @private
|
1895
|
+
* @function Highcharts.Chart#renderSeries
|
1896
|
+
*/
|
1897
|
+
renderSeries: function () {
|
1898
|
+
this.series.forEach(function (serie) {
|
1899
|
+
serie.translate();
|
1900
|
+
serie.render();
|
1901
|
+
});
|
1902
|
+
},
|
1903
|
+
|
1904
|
+
/**
|
1905
|
+
* Render labels for the chart.
|
1906
|
+
*
|
1907
|
+
* @private
|
1908
|
+
* @function Highcharts.Chart#renderLabels
|
1909
|
+
*/
|
1910
|
+
renderLabels: function () {
|
1911
|
+
var chart = this,
|
1912
|
+
labels = chart.options.labels;
|
1913
|
+
|
1914
|
+
if (labels.items) {
|
1915
|
+
labels.items.forEach(function (label) {
|
1916
|
+
var style = extend(labels.style, label.style),
|
1917
|
+
x = pInt(style.left) + chart.plotLeft,
|
1918
|
+
y = pInt(style.top) + chart.plotTop + 12;
|
1919
|
+
|
1920
|
+
// delete to prevent rewriting in IE
|
1921
|
+
delete style.left;
|
1922
|
+
delete style.top;
|
1923
|
+
|
1924
|
+
chart.renderer.text(
|
1925
|
+
label.html,
|
1926
|
+
x,
|
1927
|
+
y
|
1928
|
+
)
|
1929
|
+
.attr({ zIndex: 2 })
|
1930
|
+
.css(style)
|
1931
|
+
.add();
|
1932
|
+
|
1933
|
+
});
|
1934
|
+
}
|
1935
|
+
},
|
1936
|
+
|
1937
|
+
/**
|
1938
|
+
* Render all graphics for the chart. Runs internally on initialization.
|
1939
|
+
*
|
1940
|
+
* @private
|
1941
|
+
* @function Highcharts.Chart#render
|
1942
|
+
*/
|
1943
|
+
render: function () {
|
1944
|
+
var chart = this,
|
1945
|
+
axes = chart.axes,
|
1946
|
+
renderer = chart.renderer,
|
1947
|
+
options = chart.options,
|
1948
|
+
correction = 0, // correction for X axis labels
|
1949
|
+
tempWidth,
|
1950
|
+
tempHeight,
|
1951
|
+
redoHorizontal,
|
1952
|
+
redoVertical;
|
1953
|
+
|
1954
|
+
// Title
|
1955
|
+
chart.setTitle();
|
1956
|
+
|
1957
|
+
/**
|
1958
|
+
* The overview of the chart's series.
|
1959
|
+
*
|
1960
|
+
* @name Highcharts.Chart#legend
|
1961
|
+
* @type {Highcharts.Legend}
|
1962
|
+
*/
|
1963
|
+
chart.legend = new Legend(chart, options.legend);
|
1964
|
+
|
1965
|
+
// Get stacks
|
1966
|
+
if (chart.getStacks) {
|
1967
|
+
chart.getStacks();
|
1968
|
+
}
|
1969
|
+
|
1970
|
+
// Get chart margins
|
1971
|
+
chart.getMargins(true);
|
1972
|
+
chart.setChartSize();
|
1973
|
+
|
1974
|
+
// Record preliminary dimensions for later comparison
|
1975
|
+
tempWidth = chart.plotWidth;
|
1976
|
+
|
1977
|
+
axes.some(function (axis) {
|
1978
|
+
if (
|
1979
|
+
axis.horiz &&
|
1980
|
+
axis.visible &&
|
1981
|
+
axis.options.labels.enabled &&
|
1982
|
+
axis.series.length
|
1983
|
+
) {
|
1984
|
+
// 21 is the most common correction for X axis labels
|
1985
|
+
correction = 21;
|
1986
|
+
return true;
|
1987
|
+
}
|
1988
|
+
});
|
1989
|
+
|
1990
|
+
// use Math.max to prevent negative plotHeight
|
1991
|
+
chart.plotHeight = Math.max(chart.plotHeight - correction, 0);
|
1992
|
+
tempHeight = chart.plotHeight;
|
1993
|
+
|
1994
|
+
// Get margins by pre-rendering axes
|
1995
|
+
axes.forEach(function (axis) {
|
1996
|
+
axis.setScale();
|
1997
|
+
});
|
1998
|
+
chart.getAxisMargins();
|
1999
|
+
|
2000
|
+
// If the plot area size has changed significantly, calculate tick
|
2001
|
+
// positions again
|
2002
|
+
redoHorizontal = tempWidth / chart.plotWidth > 1.1;
|
2003
|
+
// Height is more sensitive, use lower threshold
|
2004
|
+
redoVertical = tempHeight / chart.plotHeight > 1.05;
|
2005
|
+
|
2006
|
+
if (redoHorizontal || redoVertical) {
|
2007
|
+
|
2008
|
+
axes.forEach(function (axis) {
|
2009
|
+
if (
|
2010
|
+
(axis.horiz && redoHorizontal) ||
|
2011
|
+
(!axis.horiz && redoVertical)
|
2012
|
+
) {
|
2013
|
+
// update to reflect the new margins
|
2014
|
+
axis.setTickInterval(true);
|
2015
|
+
}
|
2016
|
+
});
|
2017
|
+
chart.getMargins(); // second pass to check for new labels
|
2018
|
+
}
|
2019
|
+
|
2020
|
+
// Draw the borders and backgrounds
|
2021
|
+
chart.drawChartBox();
|
2022
|
+
|
2023
|
+
|
2024
|
+
// Axes
|
2025
|
+
if (chart.hasCartesianSeries) {
|
2026
|
+
axes.forEach(function (axis) {
|
2027
|
+
if (axis.visible) {
|
2028
|
+
axis.render();
|
2029
|
+
}
|
2030
|
+
});
|
2031
|
+
}
|
2032
|
+
|
2033
|
+
// The series
|
2034
|
+
if (!chart.seriesGroup) {
|
2035
|
+
chart.seriesGroup = renderer.g('series-group')
|
2036
|
+
.attr({ zIndex: 3 })
|
2037
|
+
.add();
|
2038
|
+
}
|
2039
|
+
chart.renderSeries();
|
2040
|
+
|
2041
|
+
// Labels
|
2042
|
+
chart.renderLabels();
|
2043
|
+
|
2044
|
+
// Credits
|
2045
|
+
chart.addCredits();
|
2046
|
+
|
2047
|
+
// Handle responsiveness
|
2048
|
+
if (chart.setResponsive) {
|
2049
|
+
chart.setResponsive();
|
2050
|
+
}
|
2051
|
+
|
2052
|
+
// Set flag
|
2053
|
+
chart.hasRendered = true;
|
2054
|
+
|
2055
|
+
},
|
2056
|
+
|
2057
|
+
/**
|
2058
|
+
* Set a new credits label for the chart.
|
2059
|
+
*
|
2060
|
+
* @sample highcharts/credits/credits-update/
|
2061
|
+
* Add and update credits
|
2062
|
+
*
|
2063
|
+
* @function Highcharts.Chart#addCredits
|
2064
|
+
*
|
2065
|
+
* @param {Highcharts.CreditsOptions} options
|
2066
|
+
* A configuration object for the new credits.
|
2067
|
+
*/
|
2068
|
+
addCredits: function (credits) {
|
2069
|
+
var chart = this;
|
2070
|
+
|
2071
|
+
credits = merge(true, this.options.credits, credits);
|
2072
|
+
if (credits.enabled && !this.credits) {
|
2073
|
+
|
2074
|
+
/**
|
2075
|
+
* The chart's credits label. The label has an `update` method that
|
2076
|
+
* allows setting new options as per the
|
2077
|
+
* [credits options set](https://api.highcharts.com/highcharts/credits).
|
2078
|
+
*
|
2079
|
+
* @name Highcharts.Chart#credits
|
2080
|
+
* @type {Highcharts.SVGElement}
|
2081
|
+
*/
|
2082
|
+
this.credits = this.renderer.text(
|
2083
|
+
credits.text + (this.mapCredits || ''),
|
2084
|
+
0,
|
2085
|
+
0
|
2086
|
+
)
|
2087
|
+
.addClass('highcharts-credits')
|
2088
|
+
.on('click', function () {
|
2089
|
+
if (credits.href) {
|
2090
|
+
win.location.href = credits.href;
|
2091
|
+
}
|
2092
|
+
})
|
2093
|
+
.attr({
|
2094
|
+
align: credits.position.align,
|
2095
|
+
zIndex: 8
|
2096
|
+
});
|
2097
|
+
|
2098
|
+
|
2099
|
+
if (!chart.styledMode) {
|
2100
|
+
this.credits.css(credits.style);
|
2101
|
+
}
|
2102
|
+
|
2103
|
+
this.credits
|
2104
|
+
.add()
|
2105
|
+
.align(credits.position);
|
2106
|
+
|
2107
|
+
// Dynamically update
|
2108
|
+
this.credits.update = function (options) {
|
2109
|
+
chart.credits = chart.credits.destroy();
|
2110
|
+
chart.addCredits(options);
|
2111
|
+
};
|
2112
|
+
}
|
2113
|
+
},
|
2114
|
+
|
2115
|
+
/**
|
2116
|
+
* Remove the chart and purge memory. This method is called internally
|
2117
|
+
* before adding a second chart into the same container, as well as on
|
2118
|
+
* window unload to prevent leaks.
|
2119
|
+
*
|
2120
|
+
* @sample highcharts/members/chart-destroy/
|
2121
|
+
* Destroy the chart from a button
|
2122
|
+
* @sample stock/members/chart-destroy/
|
2123
|
+
* Destroy with Highstock
|
2124
|
+
*
|
2125
|
+
* @function Highcharts.Chart#destroy
|
2126
|
+
*
|
2127
|
+
* @fires Highcharts.Chart#event:destroy
|
2128
|
+
*/
|
2129
|
+
destroy: function () {
|
2130
|
+
var chart = this,
|
2131
|
+
axes = chart.axes,
|
2132
|
+
series = chart.series,
|
2133
|
+
container = chart.container,
|
2134
|
+
i,
|
2135
|
+
parentNode = container && container.parentNode;
|
2136
|
+
|
2137
|
+
// fire the chart.destoy event
|
2138
|
+
fireEvent(chart, 'destroy');
|
2139
|
+
|
2140
|
+
// Delete the chart from charts lookup array
|
2141
|
+
if (chart.renderer.forExport) {
|
2142
|
+
H.erase(charts, chart); // #6569
|
2143
|
+
} else {
|
2144
|
+
charts[chart.index] = undefined;
|
2145
|
+
}
|
2146
|
+
H.chartCount--;
|
2147
|
+
chart.renderTo.removeAttribute('data-highcharts-chart');
|
2148
|
+
|
2149
|
+
// remove events
|
2150
|
+
removeEvent(chart);
|
2151
|
+
|
2152
|
+
// ==== Destroy collections:
|
2153
|
+
// Destroy axes
|
2154
|
+
i = axes.length;
|
2155
|
+
while (i--) {
|
2156
|
+
axes[i] = axes[i].destroy();
|
2157
|
+
}
|
2158
|
+
|
2159
|
+
// Destroy scroller & scroller series before destroying base series
|
2160
|
+
if (this.scroller && this.scroller.destroy) {
|
2161
|
+
this.scroller.destroy();
|
2162
|
+
}
|
2163
|
+
|
2164
|
+
// Destroy each series
|
2165
|
+
i = series.length;
|
2166
|
+
while (i--) {
|
2167
|
+
series[i] = series[i].destroy();
|
2168
|
+
}
|
2169
|
+
|
2170
|
+
// ==== Destroy chart properties:
|
2171
|
+
[
|
2172
|
+
'title', 'subtitle', 'chartBackground', 'plotBackground',
|
2173
|
+
'plotBGImage', 'plotBorder', 'seriesGroup', 'clipRect', 'credits',
|
2174
|
+
'pointer', 'rangeSelector', 'legend', 'resetZoomButton', 'tooltip',
|
2175
|
+
'renderer'
|
2176
|
+
].forEach(function (name) {
|
2177
|
+
var prop = chart[name];
|
2178
|
+
|
2179
|
+
if (prop && prop.destroy) {
|
2180
|
+
chart[name] = prop.destroy();
|
2181
|
+
}
|
2182
|
+
});
|
2183
|
+
|
2184
|
+
// Remove container and all SVG, check container as it can break in IE
|
2185
|
+
// when destroyed before finished loading
|
2186
|
+
if (container) {
|
2187
|
+
container.innerHTML = '';
|
2188
|
+
removeEvent(container);
|
2189
|
+
if (parentNode) {
|
2190
|
+
discardElement(container);
|
2191
|
+
}
|
2192
|
+
|
2193
|
+
}
|
2194
|
+
|
2195
|
+
// clean it all up
|
2196
|
+
objectEach(chart, function (val, key) {
|
2197
|
+
delete chart[key];
|
2198
|
+
});
|
2199
|
+
|
2200
|
+
},
|
2201
|
+
|
2202
|
+
/**
|
2203
|
+
* Prepare for first rendering after all data are loaded.
|
2204
|
+
*
|
2205
|
+
* @private
|
2206
|
+
* @function Highcharts.Chart#firstRender
|
2207
|
+
*
|
2208
|
+
* @fires Highcharts.Chart#event:beforeRender
|
2209
|
+
*/
|
2210
|
+
firstRender: function () {
|
2211
|
+
var chart = this,
|
2212
|
+
options = chart.options;
|
2213
|
+
|
2214
|
+
// Hook for oldIE to check whether the chart is ready to render
|
2215
|
+
if (chart.isReadyToRender && !chart.isReadyToRender()) {
|
2216
|
+
return;
|
2217
|
+
}
|
2218
|
+
|
2219
|
+
// Create the container
|
2220
|
+
chart.getContainer();
|
2221
|
+
|
2222
|
+
chart.resetMargins();
|
2223
|
+
chart.setChartSize();
|
2224
|
+
|
2225
|
+
// Set the common chart properties (mainly invert) from the given series
|
2226
|
+
chart.propFromSeries();
|
2227
|
+
|
2228
|
+
// get axes
|
2229
|
+
chart.getAxes();
|
2230
|
+
|
2231
|
+
// Initialize the series
|
2232
|
+
(H.isArray(options.series) ? options.series : []).forEach( // #9680
|
2233
|
+
function (serieOptions) {
|
2234
|
+
chart.initSeries(serieOptions);
|
2235
|
+
}
|
2236
|
+
);
|
2237
|
+
|
2238
|
+
chart.linkSeries();
|
2239
|
+
|
2240
|
+
// Run an event after axes and series are initialized, but before
|
2241
|
+
// render. At this stage, the series data is indexed and cached in the
|
2242
|
+
// xData and yData arrays, so we can access those before rendering. Used
|
2243
|
+
// in Highstock.
|
2244
|
+
fireEvent(chart, 'beforeRender');
|
2245
|
+
|
2246
|
+
// depends on inverted and on margins being set
|
2247
|
+
if (Pointer) {
|
2248
|
+
|
2249
|
+
/**
|
2250
|
+
* The Pointer that keeps track of mouse and touch interaction.
|
2251
|
+
*
|
2252
|
+
* @memberof Highcharts.Chart
|
2253
|
+
* @name pointer
|
2254
|
+
* @type {Highcharts.Pointer}
|
2255
|
+
* @instance
|
2256
|
+
*/
|
2257
|
+
chart.pointer = new Pointer(chart, options);
|
2258
|
+
}
|
2259
|
+
|
2260
|
+
chart.render();
|
2261
|
+
|
2262
|
+
// Fire the load event if there are no external images
|
2263
|
+
if (!chart.renderer.imgCount && chart.onload) {
|
2264
|
+
chart.onload();
|
2265
|
+
}
|
2266
|
+
|
2267
|
+
// If the chart was rendered outside the top container, put it back in
|
2268
|
+
// (#3679)
|
2269
|
+
chart.temporaryDisplay(true);
|
2270
|
+
|
2271
|
+
},
|
2272
|
+
|
2273
|
+
/**
|
2274
|
+
* Internal function that runs on chart load, async if any images are loaded
|
2275
|
+
* in the chart. Runs the callbacks and triggers the `load` and `render`
|
2276
|
+
* events.
|
2277
|
+
*
|
2278
|
+
* @private
|
2279
|
+
* @function Highcharts.Chart#onload
|
2280
|
+
*
|
2281
|
+
* @fires Highcharts.Chart#event:load
|
2282
|
+
* @fires Highcharts.Chart#event:render
|
2283
|
+
*/
|
2284
|
+
onload: function () {
|
2285
|
+
|
2286
|
+
// Run callbacks
|
2287
|
+
[this.callback].concat(this.callbacks).forEach(function (fn) {
|
2288
|
+
// Chart destroyed in its own callback (#3600)
|
2289
|
+
if (fn && this.index !== undefined) {
|
2290
|
+
fn.apply(this, [this]);
|
2291
|
+
}
|
2292
|
+
}, this);
|
2293
|
+
|
2294
|
+
fireEvent(this, 'load');
|
2295
|
+
fireEvent(this, 'render');
|
2296
|
+
|
2297
|
+
|
2298
|
+
// Set up auto resize, check for not destroyed (#6068)
|
2299
|
+
if (defined(this.index)) {
|
2300
|
+
this.setReflow(this.options.chart.reflow);
|
2301
|
+
}
|
2302
|
+
|
2303
|
+
// Don't run again
|
2304
|
+
this.onload = null;
|
2305
|
+
}
|
2306
|
+
|
2307
|
+
}); // end Chart
|