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,1431 @@
|
|
1
|
+
/**
|
2
|
+
* (c) 2010-2019 Torstein Honsi
|
3
|
+
*
|
4
|
+
* License: www.highcharts.com/license
|
5
|
+
*/
|
6
|
+
|
7
|
+
'use strict';
|
8
|
+
|
9
|
+
import H from './Globals.js';
|
10
|
+
import './Utilities.js';
|
11
|
+
import './Series.js';
|
12
|
+
|
13
|
+
var addEvent = H.addEvent,
|
14
|
+
arrayMax = H.arrayMax,
|
15
|
+
defined = H.defined,
|
16
|
+
extend = H.extend,
|
17
|
+
format = H.format,
|
18
|
+
merge = H.merge,
|
19
|
+
noop = H.noop,
|
20
|
+
pick = H.pick,
|
21
|
+
relativeLength = H.relativeLength,
|
22
|
+
Series = H.Series,
|
23
|
+
seriesTypes = H.seriesTypes,
|
24
|
+
stableSort = H.stableSort,
|
25
|
+
isArray = H.isArray,
|
26
|
+
splat = H.splat;
|
27
|
+
|
28
|
+
/**
|
29
|
+
* General distribution algorithm for distributing labels of differing size
|
30
|
+
* along a confined length in two dimensions. The algorithm takes an array of
|
31
|
+
* objects containing a size, a target and a rank. It will place the labels as
|
32
|
+
* close as possible to their targets, skipping the lowest ranked labels if
|
33
|
+
* necessary.
|
34
|
+
*
|
35
|
+
* @private
|
36
|
+
* @function Highcharts.distribute
|
37
|
+
*
|
38
|
+
* @param {Array<object>} boxes
|
39
|
+
*
|
40
|
+
* @param {number} len
|
41
|
+
*
|
42
|
+
* @param {number} maxDistance
|
43
|
+
*/
|
44
|
+
H.distribute = function (boxes, len, maxDistance) {
|
45
|
+
|
46
|
+
var i,
|
47
|
+
overlapping = true,
|
48
|
+
origBoxes = boxes, // Original array will be altered with added .pos
|
49
|
+
restBoxes = [], // The outranked overshoot
|
50
|
+
box,
|
51
|
+
target,
|
52
|
+
total = 0,
|
53
|
+
reducedLen = origBoxes.reducedLen || len;
|
54
|
+
|
55
|
+
function sortByTarget(a, b) {
|
56
|
+
return a.target - b.target;
|
57
|
+
}
|
58
|
+
|
59
|
+
// If the total size exceeds the len, remove those boxes with the lowest
|
60
|
+
// rank
|
61
|
+
i = boxes.length;
|
62
|
+
while (i--) {
|
63
|
+
total += boxes[i].size;
|
64
|
+
}
|
65
|
+
|
66
|
+
// Sort by rank, then slice away overshoot
|
67
|
+
if (total > reducedLen) {
|
68
|
+
stableSort(boxes, function (a, b) {
|
69
|
+
return (b.rank || 0) - (a.rank || 0);
|
70
|
+
});
|
71
|
+
i = 0;
|
72
|
+
total = 0;
|
73
|
+
while (total <= reducedLen) {
|
74
|
+
total += boxes[i].size;
|
75
|
+
i++;
|
76
|
+
}
|
77
|
+
restBoxes = boxes.splice(i - 1, boxes.length);
|
78
|
+
}
|
79
|
+
|
80
|
+
// Order by target
|
81
|
+
stableSort(boxes, sortByTarget);
|
82
|
+
|
83
|
+
|
84
|
+
// So far we have been mutating the original array. Now
|
85
|
+
// create a copy with target arrays
|
86
|
+
boxes = boxes.map(function (box) {
|
87
|
+
return {
|
88
|
+
size: box.size,
|
89
|
+
targets: [box.target],
|
90
|
+
align: pick(box.align, 0.5)
|
91
|
+
};
|
92
|
+
});
|
93
|
+
|
94
|
+
while (overlapping) {
|
95
|
+
// Initial positions: target centered in box
|
96
|
+
i = boxes.length;
|
97
|
+
while (i--) {
|
98
|
+
box = boxes[i];
|
99
|
+
// Composite box, average of targets
|
100
|
+
target = (
|
101
|
+
Math.min.apply(0, box.targets) +
|
102
|
+
Math.max.apply(0, box.targets)
|
103
|
+
) / 2;
|
104
|
+
box.pos = Math.min(
|
105
|
+
Math.max(0, target - box.size * box.align),
|
106
|
+
len - box.size
|
107
|
+
);
|
108
|
+
}
|
109
|
+
|
110
|
+
// Detect overlap and join boxes
|
111
|
+
i = boxes.length;
|
112
|
+
overlapping = false;
|
113
|
+
while (i--) {
|
114
|
+
// Overlap
|
115
|
+
if (i > 0 && boxes[i - 1].pos + boxes[i - 1].size > boxes[i].pos) {
|
116
|
+
// Add this size to the previous box
|
117
|
+
boxes[i - 1].size += boxes[i].size;
|
118
|
+
boxes[i - 1].targets = boxes[i - 1]
|
119
|
+
.targets
|
120
|
+
.concat(boxes[i].targets);
|
121
|
+
boxes[i - 1].align = 0.5;
|
122
|
+
|
123
|
+
// Overlapping right, push left
|
124
|
+
if (boxes[i - 1].pos + boxes[i - 1].size > len) {
|
125
|
+
boxes[i - 1].pos = len - boxes[i - 1].size;
|
126
|
+
}
|
127
|
+
boxes.splice(i, 1); // Remove this item
|
128
|
+
overlapping = true;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
}
|
132
|
+
|
133
|
+
// Add the rest (hidden boxes)
|
134
|
+
origBoxes.push.apply(origBoxes, restBoxes);
|
135
|
+
|
136
|
+
|
137
|
+
// Now the composite boxes are placed, we need to put the original boxes
|
138
|
+
// within them
|
139
|
+
i = 0;
|
140
|
+
boxes.some(function (box) {
|
141
|
+
var posInCompositeBox = 0;
|
142
|
+
|
143
|
+
if (box.targets.some(function () {
|
144
|
+
origBoxes[i].pos = box.pos + posInCompositeBox;
|
145
|
+
|
146
|
+
// If the distance between the position and the target exceeds
|
147
|
+
// maxDistance, abort the loop and decrease the length in increments
|
148
|
+
// of 10% to recursively reduce the number of visible boxes by
|
149
|
+
// rank. Once all boxes are within the maxDistance, we're good.
|
150
|
+
if (
|
151
|
+
Math.abs(origBoxes[i].pos - origBoxes[i].target) >
|
152
|
+
maxDistance
|
153
|
+
) {
|
154
|
+
// Reset the positions that are already set
|
155
|
+
origBoxes.slice(0, i + 1).forEach(function (box) {
|
156
|
+
delete box.pos;
|
157
|
+
});
|
158
|
+
|
159
|
+
// Try with a smaller length
|
160
|
+
origBoxes.reducedLen =
|
161
|
+
(origBoxes.reducedLen || len) - (len * 0.1);
|
162
|
+
|
163
|
+
// Recurse
|
164
|
+
if (origBoxes.reducedLen > len * 0.1) {
|
165
|
+
H.distribute(origBoxes, len, maxDistance);
|
166
|
+
}
|
167
|
+
|
168
|
+
// Exceeded maxDistance => abort
|
169
|
+
return true;
|
170
|
+
}
|
171
|
+
|
172
|
+
posInCompositeBox += origBoxes[i].size;
|
173
|
+
i++;
|
174
|
+
|
175
|
+
})) {
|
176
|
+
// Exceeded maxDistance => abort
|
177
|
+
return true;
|
178
|
+
}
|
179
|
+
});
|
180
|
+
|
181
|
+
// Add the rest (hidden) boxes and sort by target
|
182
|
+
stableSort(origBoxes, sortByTarget);
|
183
|
+
};
|
184
|
+
|
185
|
+
|
186
|
+
/**
|
187
|
+
* Draw the data labels
|
188
|
+
*
|
189
|
+
* @private
|
190
|
+
* @function Highcharts.Series#drawDataLabels
|
191
|
+
*
|
192
|
+
* @fires Highcharts.Series#event:afterDrawDataLabels
|
193
|
+
*/
|
194
|
+
Series.prototype.drawDataLabels = function () {
|
195
|
+
var series = this,
|
196
|
+
chart = series.chart,
|
197
|
+
seriesOptions = series.options,
|
198
|
+
seriesDlOptions = seriesOptions.dataLabels,
|
199
|
+
points = series.points,
|
200
|
+
pointOptions,
|
201
|
+
hasRendered = series.hasRendered || 0,
|
202
|
+
dataLabelsGroup,
|
203
|
+
defer = pick(seriesDlOptions.defer, !!seriesOptions.animation),
|
204
|
+
renderer = chart.renderer;
|
205
|
+
|
206
|
+
/*
|
207
|
+
* Handle the dataLabels.filter option.
|
208
|
+
*/
|
209
|
+
function applyFilter(point, options) {
|
210
|
+
var filter = options.filter,
|
211
|
+
op,
|
212
|
+
prop,
|
213
|
+
val;
|
214
|
+
|
215
|
+
if (filter) {
|
216
|
+
op = filter.operator;
|
217
|
+
prop = point[filter.property];
|
218
|
+
val = filter.value;
|
219
|
+
if (
|
220
|
+
(op === '>' && prop > val) ||
|
221
|
+
(op === '<' && prop < val) ||
|
222
|
+
(op === '>=' && prop >= val) ||
|
223
|
+
(op === '<=' && prop <= val) ||
|
224
|
+
(op === '==' && prop == val) || // eslint-disable-line eqeqeq
|
225
|
+
(op === '===' && prop === val)
|
226
|
+
) {
|
227
|
+
return true;
|
228
|
+
}
|
229
|
+
return false;
|
230
|
+
}
|
231
|
+
return true;
|
232
|
+
}
|
233
|
+
|
234
|
+
/*
|
235
|
+
* Merge two objects that can be arrays. If one of them is an array, the
|
236
|
+
* other is merged into each element. If both are arrays, each element is
|
237
|
+
* merged by index. If neither are arrays, we use normal merge.
|
238
|
+
*/
|
239
|
+
function mergeArrays(one, two) {
|
240
|
+
var res = [],
|
241
|
+
i;
|
242
|
+
|
243
|
+
if (isArray(one) && !isArray(two)) {
|
244
|
+
res = one.map(function (el) {
|
245
|
+
return merge(el, two);
|
246
|
+
});
|
247
|
+
} else if (isArray(two) && !isArray(one)) {
|
248
|
+
res = two.map(function (el) {
|
249
|
+
return merge(one, el);
|
250
|
+
});
|
251
|
+
} else if (!isArray(one) && !isArray(two)) {
|
252
|
+
res = merge(one, two);
|
253
|
+
} else {
|
254
|
+
i = Math.max(one.length, two.length);
|
255
|
+
while (i--) {
|
256
|
+
res[i] = merge(one[i], two[i]);
|
257
|
+
}
|
258
|
+
}
|
259
|
+
return res;
|
260
|
+
}
|
261
|
+
|
262
|
+
|
263
|
+
// Merge in plotOptions.dataLabels for series
|
264
|
+
seriesDlOptions = mergeArrays(
|
265
|
+
mergeArrays(
|
266
|
+
chart.options.plotOptions &&
|
267
|
+
chart.options.plotOptions.series &&
|
268
|
+
chart.options.plotOptions.series.dataLabels,
|
269
|
+
chart.options.plotOptions &&
|
270
|
+
chart.options.plotOptions[series.type] &&
|
271
|
+
chart.options.plotOptions[series.type].dataLabels
|
272
|
+
),
|
273
|
+
seriesDlOptions
|
274
|
+
);
|
275
|
+
|
276
|
+
H.fireEvent(this, 'drawDataLabels');
|
277
|
+
|
278
|
+
if (
|
279
|
+
isArray(seriesDlOptions) ||
|
280
|
+
seriesDlOptions.enabled ||
|
281
|
+
series._hasPointLabels
|
282
|
+
) {
|
283
|
+
|
284
|
+
// Create a separate group for the data labels to avoid rotation
|
285
|
+
dataLabelsGroup = series.plotGroup(
|
286
|
+
'dataLabelsGroup',
|
287
|
+
'data-labels',
|
288
|
+
defer && !hasRendered ? 'hidden' : 'visible', // #5133
|
289
|
+
seriesDlOptions.zIndex || 6
|
290
|
+
);
|
291
|
+
|
292
|
+
if (defer) {
|
293
|
+
dataLabelsGroup.attr({ opacity: +hasRendered }); // #3300
|
294
|
+
if (!hasRendered) {
|
295
|
+
addEvent(series, 'afterAnimate', function () {
|
296
|
+
if (series.visible) { // #2597, #3023, #3024
|
297
|
+
dataLabelsGroup.show(true);
|
298
|
+
}
|
299
|
+
dataLabelsGroup[
|
300
|
+
seriesOptions.animation ? 'animate' : 'attr'
|
301
|
+
]({ opacity: 1 }, { duration: 200 });
|
302
|
+
});
|
303
|
+
}
|
304
|
+
}
|
305
|
+
|
306
|
+
// Make the labels for each point
|
307
|
+
points.forEach(function (point) {
|
308
|
+
|
309
|
+
// Merge in series options for the point.
|
310
|
+
// @note dataLabelAttribs (like pointAttribs) would eradicate
|
311
|
+
// the need for dlOptions, and simplify the section below.
|
312
|
+
pointOptions = splat(
|
313
|
+
mergeArrays(
|
314
|
+
seriesDlOptions,
|
315
|
+
point.dlOptions || // dlOptions is used in treemaps
|
316
|
+
(point.options && point.options.dataLabels)
|
317
|
+
)
|
318
|
+
);
|
319
|
+
|
320
|
+
// Handle each individual data label for this point
|
321
|
+
pointOptions.forEach(function (labelOptions, i) {
|
322
|
+
// Options for one datalabel
|
323
|
+
var labelEnabled = labelOptions.enabled &&
|
324
|
+
!point.isNull && // #2282, #4641, #7112
|
325
|
+
applyFilter(point, labelOptions),
|
326
|
+
labelConfig,
|
327
|
+
formatString,
|
328
|
+
labelText,
|
329
|
+
style,
|
330
|
+
rotation,
|
331
|
+
attr,
|
332
|
+
dataLabel = point.dataLabels ? point.dataLabels[i] :
|
333
|
+
point.dataLabel,
|
334
|
+
connector = point.connectors ? point.connectors[i] :
|
335
|
+
point.connector,
|
336
|
+
isNew = !dataLabel;
|
337
|
+
|
338
|
+
if (labelEnabled) {
|
339
|
+
// Create individual options structure that can be extended
|
340
|
+
// without affecting others
|
341
|
+
labelConfig = point.getLabelConfig();
|
342
|
+
formatString = (
|
343
|
+
labelOptions[point.formatPrefix + 'Format'] ||
|
344
|
+
labelOptions.format
|
345
|
+
);
|
346
|
+
|
347
|
+
labelText = defined(formatString) ?
|
348
|
+
format(formatString, labelConfig, chart.time) :
|
349
|
+
(
|
350
|
+
labelOptions[point.formatPrefix + 'Formatter'] ||
|
351
|
+
labelOptions.formatter
|
352
|
+
).call(labelConfig, labelOptions);
|
353
|
+
|
354
|
+
style = labelOptions.style;
|
355
|
+
rotation = labelOptions.rotation;
|
356
|
+
|
357
|
+
if (!chart.styledMode) {
|
358
|
+
// Determine the color
|
359
|
+
style.color = pick(
|
360
|
+
labelOptions.color,
|
361
|
+
style.color,
|
362
|
+
series.color,
|
363
|
+
'#000000'
|
364
|
+
);
|
365
|
+
// Get automated contrast color
|
366
|
+
if (style.color === 'contrast') {
|
367
|
+
point.contrastColor = renderer.getContrast(
|
368
|
+
point.color || series.color
|
369
|
+
);
|
370
|
+
style.color = labelOptions.inside ||
|
371
|
+
pick(
|
372
|
+
labelOptions.distance,
|
373
|
+
point.labelDistance
|
374
|
+
) < 0 ||
|
375
|
+
!!seriesOptions.stacking ?
|
376
|
+
point.contrastColor :
|
377
|
+
'#000000';
|
378
|
+
}
|
379
|
+
if (seriesOptions.cursor) {
|
380
|
+
style.cursor = seriesOptions.cursor;
|
381
|
+
}
|
382
|
+
}
|
383
|
+
|
384
|
+
attr = {
|
385
|
+
r: labelOptions.borderRadius || 0,
|
386
|
+
rotation: rotation,
|
387
|
+
padding: labelOptions.padding,
|
388
|
+
zIndex: 1
|
389
|
+
};
|
390
|
+
|
391
|
+
if (!chart.styledMode) {
|
392
|
+
attr.fill = labelOptions.backgroundColor;
|
393
|
+
attr.stroke = labelOptions.borderColor;
|
394
|
+
attr['stroke-width'] = labelOptions.borderWidth;
|
395
|
+
}
|
396
|
+
|
397
|
+
// Remove unused attributes (#947)
|
398
|
+
H.objectEach(attr, function (val, name) {
|
399
|
+
if (val === undefined) {
|
400
|
+
delete attr[name];
|
401
|
+
}
|
402
|
+
});
|
403
|
+
}
|
404
|
+
|
405
|
+
// If the point is outside the plot area, destroy it. #678, #820
|
406
|
+
if (dataLabel && (!labelEnabled || !defined(labelText))) {
|
407
|
+
point.dataLabel =
|
408
|
+
point.dataLabel && point.dataLabel.destroy();
|
409
|
+
if (point.dataLabels) {
|
410
|
+
// Remove point.dataLabels if this was the last one
|
411
|
+
if (point.dataLabels.length === 1) {
|
412
|
+
delete point.dataLabels;
|
413
|
+
} else {
|
414
|
+
delete point.dataLabels[i];
|
415
|
+
}
|
416
|
+
}
|
417
|
+
if (!i) {
|
418
|
+
delete point.dataLabel;
|
419
|
+
}
|
420
|
+
if (connector) {
|
421
|
+
point.connector = point.connector.destroy();
|
422
|
+
if (point.connectors) {
|
423
|
+
// Remove point.connectors if this was the last one
|
424
|
+
if (point.connectors.length === 1) {
|
425
|
+
delete point.connectors;
|
426
|
+
} else {
|
427
|
+
delete point.connectors[i];
|
428
|
+
}
|
429
|
+
}
|
430
|
+
}
|
431
|
+
|
432
|
+
// Individual labels are disabled if the are explicitly disabled
|
433
|
+
// in the point options, or if they fall outside the plot area.
|
434
|
+
} else if (labelEnabled && defined(labelText)) {
|
435
|
+
|
436
|
+
if (!dataLabel) {
|
437
|
+
// Create new label element
|
438
|
+
point.dataLabels = point.dataLabels || [];
|
439
|
+
dataLabel = point.dataLabels[i] = rotation ?
|
440
|
+
|
441
|
+
// Labels don't rotate, use text element
|
442
|
+
renderer.text(labelText, 0, -9999)
|
443
|
+
.addClass('highcharts-data-label') :
|
444
|
+
|
445
|
+
// We can use label
|
446
|
+
renderer.label(
|
447
|
+
labelText,
|
448
|
+
0,
|
449
|
+
-9999,
|
450
|
+
labelOptions.shape,
|
451
|
+
null,
|
452
|
+
null,
|
453
|
+
labelOptions.useHTML,
|
454
|
+
null,
|
455
|
+
'data-label'
|
456
|
+
);
|
457
|
+
|
458
|
+
// Store for backwards compatibility
|
459
|
+
if (!i) {
|
460
|
+
point.dataLabel = dataLabel;
|
461
|
+
}
|
462
|
+
|
463
|
+
dataLabel.addClass(
|
464
|
+
' highcharts-data-label-color-' + point.colorIndex +
|
465
|
+
' ' + (labelOptions.className || '') +
|
466
|
+
( // #3398
|
467
|
+
labelOptions.useHTML ?
|
468
|
+
' highcharts-tracker' :
|
469
|
+
''
|
470
|
+
)
|
471
|
+
);
|
472
|
+
} else {
|
473
|
+
// Use old element and just update text
|
474
|
+
attr.text = labelText;
|
475
|
+
}
|
476
|
+
|
477
|
+
// Store data label options for later access
|
478
|
+
dataLabel.options = labelOptions;
|
479
|
+
|
480
|
+
dataLabel.attr(attr);
|
481
|
+
|
482
|
+
if (!chart.styledMode) {
|
483
|
+
// Styles must be applied before add in order to read
|
484
|
+
// text bounding box
|
485
|
+
dataLabel.css(style).shadow(labelOptions.shadow);
|
486
|
+
}
|
487
|
+
|
488
|
+
if (!dataLabel.added) {
|
489
|
+
dataLabel.add(dataLabelsGroup);
|
490
|
+
}
|
491
|
+
|
492
|
+
// Now the data label is created and placed at 0,0, so we
|
493
|
+
// need to align it
|
494
|
+
series.alignDataLabel(
|
495
|
+
point, dataLabel, labelOptions, null, isNew
|
496
|
+
);
|
497
|
+
}
|
498
|
+
});
|
499
|
+
});
|
500
|
+
}
|
501
|
+
|
502
|
+
H.fireEvent(this, 'afterDrawDataLabels');
|
503
|
+
};
|
504
|
+
|
505
|
+
/**
|
506
|
+
* Align each individual data label.
|
507
|
+
*
|
508
|
+
* @private
|
509
|
+
* @function Highcharts.Series#alignDataLabel
|
510
|
+
*
|
511
|
+
* @param {Highcharts.Point} point
|
512
|
+
*
|
513
|
+
* @param {Highcharts.SVGElement} dataLabel
|
514
|
+
*
|
515
|
+
* @param {Highcharts.PlotSeriesDataLabelsOptions} options
|
516
|
+
*
|
517
|
+
* @param {Highcharts.BBoxObject} alignTo
|
518
|
+
*
|
519
|
+
* @param {boolean} isNew
|
520
|
+
*/
|
521
|
+
Series.prototype.alignDataLabel = function (
|
522
|
+
point,
|
523
|
+
dataLabel,
|
524
|
+
options,
|
525
|
+
alignTo,
|
526
|
+
isNew
|
527
|
+
) {
|
528
|
+
var chart = this.chart,
|
529
|
+
inverted = this.isCartesian && chart.inverted,
|
530
|
+
plotX = pick(point.dlBox && point.dlBox.centerX, point.plotX, -9999),
|
531
|
+
plotY = pick(point.plotY, -9999),
|
532
|
+
bBox = dataLabel.getBBox(),
|
533
|
+
baseline,
|
534
|
+
rotation = options.rotation,
|
535
|
+
normRotation,
|
536
|
+
negRotation,
|
537
|
+
align = options.align,
|
538
|
+
rotCorr, // rotation correction
|
539
|
+
// Math.round for rounding errors (#2683), alignTo to allow column
|
540
|
+
// labels (#2700)
|
541
|
+
visible =
|
542
|
+
this.visible &&
|
543
|
+
(
|
544
|
+
point.series.forceDL ||
|
545
|
+
chart.isInsidePlot(plotX, Math.round(plotY), inverted) ||
|
546
|
+
(
|
547
|
+
alignTo && chart.isInsidePlot(
|
548
|
+
plotX,
|
549
|
+
inverted ?
|
550
|
+
alignTo.x + 1 :
|
551
|
+
alignTo.y + alignTo.height - 1,
|
552
|
+
inverted
|
553
|
+
)
|
554
|
+
)
|
555
|
+
),
|
556
|
+
alignAttr, // the final position;
|
557
|
+
justify = pick(options.overflow, 'justify') === 'justify';
|
558
|
+
|
559
|
+
if (visible) {
|
560
|
+
|
561
|
+
baseline = chart.renderer.fontMetrics(
|
562
|
+
chart.styledMode ? undefined : options.style.fontSize,
|
563
|
+
dataLabel
|
564
|
+
).b;
|
565
|
+
|
566
|
+
// The alignment box is a singular point
|
567
|
+
alignTo = extend({
|
568
|
+
x: inverted ? this.yAxis.len - plotY : plotX,
|
569
|
+
y: Math.round(inverted ? this.xAxis.len - plotX : plotY),
|
570
|
+
width: 0,
|
571
|
+
height: 0
|
572
|
+
}, alignTo);
|
573
|
+
|
574
|
+
// Add the text size for alignment calculation
|
575
|
+
extend(options, {
|
576
|
+
width: bBox.width,
|
577
|
+
height: bBox.height
|
578
|
+
});
|
579
|
+
|
580
|
+
// Allow a hook for changing alignment in the last moment, then do the
|
581
|
+
// alignment
|
582
|
+
if (rotation) {
|
583
|
+
justify = false; // Not supported for rotated text
|
584
|
+
rotCorr = chart.renderer.rotCorr(baseline, rotation); // #3723
|
585
|
+
alignAttr = {
|
586
|
+
x: alignTo.x + options.x + alignTo.width / 2 + rotCorr.x,
|
587
|
+
y: (
|
588
|
+
alignTo.y +
|
589
|
+
options.y +
|
590
|
+
{ top: 0, middle: 0.5, bottom: 1 }[options.verticalAlign] *
|
591
|
+
alignTo.height
|
592
|
+
)
|
593
|
+
};
|
594
|
+
dataLabel[isNew ? 'attr' : 'animate'](alignAttr)
|
595
|
+
.attr({ // #3003
|
596
|
+
align: align
|
597
|
+
});
|
598
|
+
|
599
|
+
// Compensate for the rotated label sticking out on the sides
|
600
|
+
normRotation = (rotation + 720) % 360;
|
601
|
+
negRotation = normRotation > 180 && normRotation < 360;
|
602
|
+
|
603
|
+
if (align === 'left') {
|
604
|
+
alignAttr.y -= negRotation ? bBox.height : 0;
|
605
|
+
} else if (align === 'center') {
|
606
|
+
alignAttr.x -= bBox.width / 2;
|
607
|
+
alignAttr.y -= bBox.height / 2;
|
608
|
+
} else if (align === 'right') {
|
609
|
+
alignAttr.x -= bBox.width;
|
610
|
+
alignAttr.y -= negRotation ? 0 : bBox.height;
|
611
|
+
}
|
612
|
+
dataLabel.placed = true;
|
613
|
+
dataLabel.alignAttr = alignAttr;
|
614
|
+
|
615
|
+
} else {
|
616
|
+
dataLabel.align(options, null, alignTo);
|
617
|
+
alignAttr = dataLabel.alignAttr;
|
618
|
+
}
|
619
|
+
|
620
|
+
// Handle justify or crop
|
621
|
+
if (justify && alignTo.height >= 0) { // #8830
|
622
|
+
point.isLabelJustified = this.justifyDataLabel(
|
623
|
+
dataLabel,
|
624
|
+
options,
|
625
|
+
alignAttr,
|
626
|
+
bBox,
|
627
|
+
alignTo,
|
628
|
+
isNew
|
629
|
+
);
|
630
|
+
|
631
|
+
// Now check that the data label is within the plot area
|
632
|
+
} else if (pick(options.crop, true)) {
|
633
|
+
visible =
|
634
|
+
chart.isInsidePlot(
|
635
|
+
alignAttr.x,
|
636
|
+
alignAttr.y
|
637
|
+
) &&
|
638
|
+
chart.isInsidePlot(
|
639
|
+
alignAttr.x + bBox.width,
|
640
|
+
alignAttr.y + bBox.height
|
641
|
+
);
|
642
|
+
}
|
643
|
+
|
644
|
+
// When we're using a shape, make it possible with a connector or an
|
645
|
+
// arrow pointing to thie point
|
646
|
+
if (options.shape && !rotation) {
|
647
|
+
dataLabel[isNew ? 'attr' : 'animate']({
|
648
|
+
anchorX: inverted ? chart.plotWidth - point.plotY : point.plotX,
|
649
|
+
anchorY: inverted ? chart.plotHeight - point.plotX : point.plotY
|
650
|
+
});
|
651
|
+
}
|
652
|
+
}
|
653
|
+
|
654
|
+
// Show or hide based on the final aligned position
|
655
|
+
if (!visible) {
|
656
|
+
dataLabel.attr({ y: -9999 });
|
657
|
+
dataLabel.placed = false; // don't animate back in
|
658
|
+
}
|
659
|
+
|
660
|
+
};
|
661
|
+
|
662
|
+
/**
|
663
|
+
* If data labels fall partly outside the plot area, align them back in, in a
|
664
|
+
* way that doesn't hide the point.
|
665
|
+
*
|
666
|
+
* @private
|
667
|
+
* @function Highcharts.Series#justifyDataLabel
|
668
|
+
*
|
669
|
+
* @param {Highcharts.SVGElement} dataLabel
|
670
|
+
*
|
671
|
+
* @param {Highcharts.PlotSeriesDataLabelsOptions} options
|
672
|
+
*
|
673
|
+
* @param {*} alignAttr
|
674
|
+
*
|
675
|
+
* @param {Highcharts.BBoxObject} bBox
|
676
|
+
*
|
677
|
+
* @param {boolean} isNew
|
678
|
+
*
|
679
|
+
* @return {boolean}
|
680
|
+
*/
|
681
|
+
Series.prototype.justifyDataLabel = function (
|
682
|
+
dataLabel,
|
683
|
+
options,
|
684
|
+
alignAttr,
|
685
|
+
bBox,
|
686
|
+
alignTo,
|
687
|
+
isNew
|
688
|
+
) {
|
689
|
+
var chart = this.chart,
|
690
|
+
align = options.align,
|
691
|
+
verticalAlign = options.verticalAlign,
|
692
|
+
off,
|
693
|
+
justified,
|
694
|
+
padding = dataLabel.box ? 0 : (dataLabel.padding || 0);
|
695
|
+
|
696
|
+
// Off left
|
697
|
+
off = alignAttr.x + padding;
|
698
|
+
if (off < 0) {
|
699
|
+
if (align === 'right') {
|
700
|
+
options.align = 'left';
|
701
|
+
} else {
|
702
|
+
options.x = -off;
|
703
|
+
}
|
704
|
+
justified = true;
|
705
|
+
}
|
706
|
+
|
707
|
+
// Off right
|
708
|
+
off = alignAttr.x + bBox.width - padding;
|
709
|
+
if (off > chart.plotWidth) {
|
710
|
+
if (align === 'left') {
|
711
|
+
options.align = 'right';
|
712
|
+
} else {
|
713
|
+
options.x = chart.plotWidth - off;
|
714
|
+
}
|
715
|
+
justified = true;
|
716
|
+
}
|
717
|
+
|
718
|
+
// Off top
|
719
|
+
off = alignAttr.y + padding;
|
720
|
+
if (off < 0) {
|
721
|
+
if (verticalAlign === 'bottom') {
|
722
|
+
options.verticalAlign = 'top';
|
723
|
+
} else {
|
724
|
+
options.y = -off;
|
725
|
+
}
|
726
|
+
justified = true;
|
727
|
+
}
|
728
|
+
|
729
|
+
// Off bottom
|
730
|
+
off = alignAttr.y + bBox.height - padding;
|
731
|
+
if (off > chart.plotHeight) {
|
732
|
+
if (verticalAlign === 'top') {
|
733
|
+
options.verticalAlign = 'bottom';
|
734
|
+
} else {
|
735
|
+
options.y = chart.plotHeight - off;
|
736
|
+
}
|
737
|
+
justified = true;
|
738
|
+
}
|
739
|
+
|
740
|
+
if (justified) {
|
741
|
+
dataLabel.placed = !isNew;
|
742
|
+
dataLabel.align(options, null, alignTo);
|
743
|
+
}
|
744
|
+
|
745
|
+
return justified;
|
746
|
+
};
|
747
|
+
|
748
|
+
if (seriesTypes.pie) {
|
749
|
+
seriesTypes.pie.prototype.dataLabelPositioners = {
|
750
|
+
|
751
|
+
// Based on the value computed in Highcharts' distribute algorithm.
|
752
|
+
radialDistributionY: function (point) {
|
753
|
+
return point.top + point.distributeBox.pos;
|
754
|
+
},
|
755
|
+
// get the x - use the natural x position for labels near the
|
756
|
+
// top and bottom, to prevent the top and botton slice
|
757
|
+
// connectors from touching each other on either side
|
758
|
+
|
759
|
+
// Based on the value computed in Highcharts' distribute algorithm.
|
760
|
+
radialDistributionX: function (series, point, y, naturalY) {
|
761
|
+
return series.getX(
|
762
|
+
y < point.top + 2 || y > point.bottom - 2 ?
|
763
|
+
naturalY :
|
764
|
+
y,
|
765
|
+
point.half,
|
766
|
+
point
|
767
|
+
);
|
768
|
+
},
|
769
|
+
|
770
|
+
// dataLabels.distance determines the x position of the label
|
771
|
+
justify: function (point, radius, seriesCenter) {
|
772
|
+
return seriesCenter[0] + (point.half ? -1 : 1) *
|
773
|
+
(radius + point.labelDistance);
|
774
|
+
},
|
775
|
+
|
776
|
+
// Left edges of the left-half labels touch the left edge of the plot
|
777
|
+
// area. Right edges of the right-half labels touch the right edge of
|
778
|
+
// the plot area.
|
779
|
+
alignToPlotEdges: function (
|
780
|
+
dataLabel,
|
781
|
+
half,
|
782
|
+
plotWidth,
|
783
|
+
plotLeft
|
784
|
+
) {
|
785
|
+
var dataLabelWidth = dataLabel.getBBox().width;
|
786
|
+
|
787
|
+
return half ? dataLabelWidth + plotLeft :
|
788
|
+
plotWidth - dataLabelWidth - plotLeft;
|
789
|
+
},
|
790
|
+
|
791
|
+
// Connectors of each side end in the same x position. Labels are
|
792
|
+
// aligned to them. Left edge of the widest left-half label touches the
|
793
|
+
// left edge of the plot area. Right edge of the widest right-half label
|
794
|
+
// touches the right edge of the plot area.
|
795
|
+
alignToConnectors: function (
|
796
|
+
points,
|
797
|
+
half,
|
798
|
+
plotWidth,
|
799
|
+
plotLeft
|
800
|
+
) {
|
801
|
+
var maxDataLabelWidth = 0,
|
802
|
+
dataLabelWidth;
|
803
|
+
|
804
|
+
// find widest data label
|
805
|
+
points.forEach(function (point) {
|
806
|
+
dataLabelWidth = point.dataLabel.getBBox().width;
|
807
|
+
if (dataLabelWidth > maxDataLabelWidth) {
|
808
|
+
maxDataLabelWidth = dataLabelWidth;
|
809
|
+
}
|
810
|
+
});
|
811
|
+
return half ? maxDataLabelWidth + plotLeft :
|
812
|
+
plotWidth - maxDataLabelWidth - plotLeft;
|
813
|
+
}
|
814
|
+
};
|
815
|
+
|
816
|
+
/**
|
817
|
+
* Override the base drawDataLabels method by pie specific functionality
|
818
|
+
*
|
819
|
+
* @private
|
820
|
+
* @function Highcharts.seriesTypes.pie#drawDataLabels
|
821
|
+
*/
|
822
|
+
seriesTypes.pie.prototype.drawDataLabels = function () {
|
823
|
+
var series = this,
|
824
|
+
data = series.data,
|
825
|
+
point,
|
826
|
+
chart = series.chart,
|
827
|
+
options = series.options.dataLabels,
|
828
|
+
connectorPadding = options.connectorPadding,
|
829
|
+
connectorWidth = pick(options.connectorWidth, 1),
|
830
|
+
plotWidth = chart.plotWidth,
|
831
|
+
plotHeight = chart.plotHeight,
|
832
|
+
plotLeft = chart.plotLeft,
|
833
|
+
maxWidth = Math.round(chart.chartWidth / 3),
|
834
|
+
connector,
|
835
|
+
seriesCenter = series.center,
|
836
|
+
radius = seriesCenter[2] / 2,
|
837
|
+
centerY = seriesCenter[1],
|
838
|
+
dataLabel,
|
839
|
+
dataLabelWidth,
|
840
|
+
// labelPos,
|
841
|
+
labelPosition,
|
842
|
+
labelHeight,
|
843
|
+
// divide the points into right and left halves for anti collision
|
844
|
+
halves = [
|
845
|
+
[], // right
|
846
|
+
[] // left
|
847
|
+
],
|
848
|
+
x,
|
849
|
+
y,
|
850
|
+
visibility,
|
851
|
+
j,
|
852
|
+
overflow = [0, 0, 0, 0], // top, right, bottom, left
|
853
|
+
dataLabelPositioners = series.dataLabelPositioners;
|
854
|
+
|
855
|
+
// get out if not enabled
|
856
|
+
if (!series.visible || (!options.enabled && !series._hasPointLabels)) {
|
857
|
+
return;
|
858
|
+
}
|
859
|
+
|
860
|
+
// Reset all labels that have been shortened
|
861
|
+
data.forEach(function (point) {
|
862
|
+
if (point.dataLabel && point.visible && point.dataLabel.shortened) {
|
863
|
+
point.dataLabel
|
864
|
+
.attr({
|
865
|
+
width: 'auto'
|
866
|
+
}).css({
|
867
|
+
width: 'auto',
|
868
|
+
textOverflow: 'clip'
|
869
|
+
});
|
870
|
+
point.dataLabel.shortened = false;
|
871
|
+
}
|
872
|
+
});
|
873
|
+
|
874
|
+
|
875
|
+
// run parent method
|
876
|
+
Series.prototype.drawDataLabels.apply(series);
|
877
|
+
|
878
|
+
data.forEach(function (point) {
|
879
|
+
if (point.dataLabel) {
|
880
|
+
|
881
|
+
if (point.visible) { // #407, #2510
|
882
|
+
|
883
|
+
// Arrange points for detection collision
|
884
|
+
halves[point.half].push(point);
|
885
|
+
|
886
|
+
// Reset positions (#4905)
|
887
|
+
point.dataLabel._pos = null;
|
888
|
+
|
889
|
+
// Avoid long labels squeezing the pie size too far down
|
890
|
+
if (
|
891
|
+
!defined(options.style.width) &&
|
892
|
+
!defined(
|
893
|
+
point.options.dataLabels &&
|
894
|
+
point.options.dataLabels.style &&
|
895
|
+
point.options.dataLabels.style.width
|
896
|
+
)
|
897
|
+
) {
|
898
|
+
if (point.dataLabel.getBBox().width > maxWidth) {
|
899
|
+
point.dataLabel.css({
|
900
|
+
// Use a fraction of the maxWidth to avoid
|
901
|
+
// wrapping close to the end of the string.
|
902
|
+
width: maxWidth * 0.7
|
903
|
+
});
|
904
|
+
point.dataLabel.shortened = true;
|
905
|
+
}
|
906
|
+
}
|
907
|
+
} else {
|
908
|
+
point.dataLabel = point.dataLabel.destroy();
|
909
|
+
// Workaround to make pies destroy multiple datalabels
|
910
|
+
// correctly. This logic needs rewriting to support multiple
|
911
|
+
// datalabels fully.
|
912
|
+
if (point.dataLabels && point.dataLabels.length === 1) {
|
913
|
+
delete point.dataLabels;
|
914
|
+
}
|
915
|
+
}
|
916
|
+
}
|
917
|
+
});
|
918
|
+
|
919
|
+
/* Loop over the points in each half, starting from the top and bottom
|
920
|
+
* of the pie to detect overlapping labels.
|
921
|
+
*/
|
922
|
+
halves.forEach(function (points, i) {
|
923
|
+
|
924
|
+
var top,
|
925
|
+
bottom,
|
926
|
+
length = points.length,
|
927
|
+
positions = [],
|
928
|
+
naturalY,
|
929
|
+
sideOverflow,
|
930
|
+
size,
|
931
|
+
distributionLength;
|
932
|
+
|
933
|
+
if (!length) {
|
934
|
+
return;
|
935
|
+
}
|
936
|
+
|
937
|
+
// Sort by angle
|
938
|
+
series.sortByAngle(points, i - 0.5);
|
939
|
+
// Only do anti-collision when we have dataLabels outside the pie
|
940
|
+
// and have connectors. (#856)
|
941
|
+
if (series.maxLabelDistance > 0) {
|
942
|
+
top = Math.max(
|
943
|
+
0,
|
944
|
+
centerY - radius - series.maxLabelDistance
|
945
|
+
);
|
946
|
+
bottom = Math.min(
|
947
|
+
centerY + radius + series.maxLabelDistance,
|
948
|
+
chart.plotHeight
|
949
|
+
);
|
950
|
+
points.forEach(function (point) {
|
951
|
+
// check if specific points' label is outside the pie
|
952
|
+
if (point.labelDistance > 0 && point.dataLabel) {
|
953
|
+
// point.top depends on point.labelDistance value
|
954
|
+
// Used for calculation of y value in getX method
|
955
|
+
point.top = Math.max(
|
956
|
+
0,
|
957
|
+
centerY - radius - point.labelDistance
|
958
|
+
);
|
959
|
+
point.bottom = Math.min(
|
960
|
+
centerY + radius + point.labelDistance,
|
961
|
+
chart.plotHeight
|
962
|
+
);
|
963
|
+
size = point.dataLabel.getBBox().height || 21;
|
964
|
+
|
965
|
+
// point.positionsIndex is needed for getting index of
|
966
|
+
// parameter related to specific point inside positions
|
967
|
+
// array - not every point is in positions array.
|
968
|
+
point.distributeBox = {
|
969
|
+
target: point.labelPosition.natural.y -
|
970
|
+
point.top + size / 2,
|
971
|
+
size: size,
|
972
|
+
rank: point.y
|
973
|
+
};
|
974
|
+
positions.push(point.distributeBox);
|
975
|
+
}
|
976
|
+
});
|
977
|
+
distributionLength = bottom + size - top;
|
978
|
+
H.distribute(
|
979
|
+
positions,
|
980
|
+
distributionLength,
|
981
|
+
distributionLength / 5
|
982
|
+
);
|
983
|
+
}
|
984
|
+
|
985
|
+
// Now the used slots are sorted, fill them up sequentially
|
986
|
+
for (j = 0; j < length; j++) {
|
987
|
+
|
988
|
+
point = points[j];
|
989
|
+
// labelPos = point.labelPos;
|
990
|
+
labelPosition = point.labelPosition;
|
991
|
+
dataLabel = point.dataLabel;
|
992
|
+
visibility = point.visible === false ? 'hidden' : 'inherit';
|
993
|
+
naturalY = labelPosition.natural.y;
|
994
|
+
y = naturalY;
|
995
|
+
|
996
|
+
if (positions && defined(point.distributeBox)) {
|
997
|
+
if (point.distributeBox.pos === undefined) {
|
998
|
+
visibility = 'hidden';
|
999
|
+
} else {
|
1000
|
+
labelHeight = point.distributeBox.size;
|
1001
|
+
// Find label's y position
|
1002
|
+
y = dataLabelPositioners.radialDistributionY(point);
|
1003
|
+
}
|
1004
|
+
}
|
1005
|
+
|
1006
|
+
// It is needed to delete point.positionIndex for
|
1007
|
+
// dynamically added points etc.
|
1008
|
+
|
1009
|
+
delete point.positionIndex;
|
1010
|
+
|
1011
|
+
// Find label's x position
|
1012
|
+
// justify is undocumented in the API - preserve support for it
|
1013
|
+
if (options.justify) {
|
1014
|
+
x = dataLabelPositioners.justify(point, radius,
|
1015
|
+
seriesCenter);
|
1016
|
+
} else {
|
1017
|
+
switch (options.alignTo) {
|
1018
|
+
case 'connectors':
|
1019
|
+
x = dataLabelPositioners.alignToConnectors(points,
|
1020
|
+
i, plotWidth, plotLeft);
|
1021
|
+
break;
|
1022
|
+
case 'plotEdges':
|
1023
|
+
x = dataLabelPositioners.alignToPlotEdges(dataLabel,
|
1024
|
+
i, plotWidth, plotLeft);
|
1025
|
+
break;
|
1026
|
+
default:
|
1027
|
+
x = dataLabelPositioners.radialDistributionX(series,
|
1028
|
+
point, y, naturalY);
|
1029
|
+
}
|
1030
|
+
}
|
1031
|
+
|
1032
|
+
// Record the placement and visibility
|
1033
|
+
dataLabel._attr = {
|
1034
|
+
visibility: visibility,
|
1035
|
+
align: labelPosition.alignment
|
1036
|
+
};
|
1037
|
+
|
1038
|
+
dataLabel._pos = {
|
1039
|
+
x: (
|
1040
|
+
x +
|
1041
|
+
options.x +
|
1042
|
+
({
|
1043
|
+
left: connectorPadding,
|
1044
|
+
right: -connectorPadding
|
1045
|
+
}[labelPosition.alignment] || 0)
|
1046
|
+
),
|
1047
|
+
|
1048
|
+
// 10 is for the baseline (label vs text)
|
1049
|
+
y: y + options.y - 10
|
1050
|
+
};
|
1051
|
+
// labelPos.x = x;
|
1052
|
+
// labelPos.y = y;
|
1053
|
+
labelPosition.final.x = x;
|
1054
|
+
labelPosition.final.y = y;
|
1055
|
+
|
1056
|
+
// Detect overflowing data labels
|
1057
|
+
if (pick(options.crop, true)) {
|
1058
|
+
dataLabelWidth = dataLabel.getBBox().width;
|
1059
|
+
|
1060
|
+
sideOverflow = null;
|
1061
|
+
// Overflow left
|
1062
|
+
if (
|
1063
|
+
x - dataLabelWidth < connectorPadding &&
|
1064
|
+
i === 1 // left half
|
1065
|
+
) {
|
1066
|
+
sideOverflow = Math.round(
|
1067
|
+
dataLabelWidth - x + connectorPadding
|
1068
|
+
);
|
1069
|
+
overflow[3] = Math.max(sideOverflow, overflow[3]);
|
1070
|
+
|
1071
|
+
// Overflow right
|
1072
|
+
} else if (
|
1073
|
+
x + dataLabelWidth > plotWidth - connectorPadding &&
|
1074
|
+
i === 0 // right half
|
1075
|
+
) {
|
1076
|
+
sideOverflow = Math.round(
|
1077
|
+
x + dataLabelWidth - plotWidth + connectorPadding
|
1078
|
+
);
|
1079
|
+
overflow[1] = Math.max(sideOverflow, overflow[1]);
|
1080
|
+
}
|
1081
|
+
|
1082
|
+
// Overflow top
|
1083
|
+
if (y - labelHeight / 2 < 0) {
|
1084
|
+
overflow[0] = Math.max(
|
1085
|
+
Math.round(-y + labelHeight / 2),
|
1086
|
+
overflow[0]
|
1087
|
+
);
|
1088
|
+
|
1089
|
+
// Overflow left
|
1090
|
+
} else if (y + labelHeight / 2 > plotHeight) {
|
1091
|
+
overflow[2] = Math.max(
|
1092
|
+
Math.round(y + labelHeight / 2 - plotHeight),
|
1093
|
+
overflow[2]
|
1094
|
+
);
|
1095
|
+
}
|
1096
|
+
dataLabel.sideOverflow = sideOverflow;
|
1097
|
+
}
|
1098
|
+
} // for each point
|
1099
|
+
}); // for each half
|
1100
|
+
|
1101
|
+
// Do not apply the final placement and draw the connectors until we
|
1102
|
+
// have verified that labels are not spilling over.
|
1103
|
+
if (
|
1104
|
+
arrayMax(overflow) === 0 ||
|
1105
|
+
this.verifyDataLabelOverflow(overflow)
|
1106
|
+
) {
|
1107
|
+
|
1108
|
+
// Place the labels in the final position
|
1109
|
+
this.placeDataLabels();
|
1110
|
+
|
1111
|
+
// Draw the connectors
|
1112
|
+
if (connectorWidth) {
|
1113
|
+
this.points.forEach(function (point) {
|
1114
|
+
var isNew;
|
1115
|
+
|
1116
|
+
connector = point.connector;
|
1117
|
+
dataLabel = point.dataLabel;
|
1118
|
+
|
1119
|
+
if (
|
1120
|
+
dataLabel &&
|
1121
|
+
dataLabel._pos &&
|
1122
|
+
point.visible &&
|
1123
|
+
point.labelDistance > 0
|
1124
|
+
) {
|
1125
|
+
visibility = dataLabel._attr.visibility;
|
1126
|
+
|
1127
|
+
isNew = !connector;
|
1128
|
+
|
1129
|
+
if (isNew) {
|
1130
|
+
point.connector = connector = chart.renderer.path()
|
1131
|
+
.addClass(
|
1132
|
+
'highcharts-data-label-connector ' +
|
1133
|
+
' highcharts-color-' + point.colorIndex +
|
1134
|
+
(
|
1135
|
+
point.className ?
|
1136
|
+
' ' + point.className :
|
1137
|
+
''
|
1138
|
+
)
|
1139
|
+
)
|
1140
|
+
.add(series.dataLabelsGroup);
|
1141
|
+
|
1142
|
+
if (!chart.styledMode) {
|
1143
|
+
connector.attr({
|
1144
|
+
'stroke-width': connectorWidth,
|
1145
|
+
'stroke': (
|
1146
|
+
options.connectorColor ||
|
1147
|
+
point.color ||
|
1148
|
+
'#666666'
|
1149
|
+
)
|
1150
|
+
});
|
1151
|
+
}
|
1152
|
+
}
|
1153
|
+
connector[isNew ? 'attr' : 'animate']({
|
1154
|
+
d: point.getConnectorPath()
|
1155
|
+
});
|
1156
|
+
connector.attr('visibility', visibility);
|
1157
|
+
|
1158
|
+
} else if (connector) {
|
1159
|
+
point.connector = connector.destroy();
|
1160
|
+
}
|
1161
|
+
});
|
1162
|
+
}
|
1163
|
+
}
|
1164
|
+
};
|
1165
|
+
|
1166
|
+
/**
|
1167
|
+
* Extendable method for getting the path of the connector between the data
|
1168
|
+
* label and the pie slice.
|
1169
|
+
*
|
1170
|
+
* @private
|
1171
|
+
* @function Highcharts.seriesTypes.pie#connectorPath
|
1172
|
+
*
|
1173
|
+
* @param {*} labelPos
|
1174
|
+
*
|
1175
|
+
* @return {Highcharts.PathObject}
|
1176
|
+
*/
|
1177
|
+
// TODO: depracated - remove it
|
1178
|
+
/*
|
1179
|
+
seriesTypes.pie.prototype.connectorPath = function (labelPos) {
|
1180
|
+
var x = labelPos.x,
|
1181
|
+
y = labelPos.y;
|
1182
|
+
return pick(this.options.dataLabels.softConnector, true) ? [
|
1183
|
+
'M',
|
1184
|
+
// end of the string at the label
|
1185
|
+
x + (labelPos[6] === 'left' ? 5 : -5), y,
|
1186
|
+
'C',
|
1187
|
+
x, y, // first break, next to the label
|
1188
|
+
2 * labelPos[2] - labelPos[4], 2 * labelPos[3] - labelPos[5],
|
1189
|
+
labelPos[2], labelPos[3], // second break
|
1190
|
+
'L',
|
1191
|
+
labelPos[4], labelPos[5] // base
|
1192
|
+
] : [
|
1193
|
+
'M',
|
1194
|
+
// end of the string at the label
|
1195
|
+
x + (labelPos[6] === 'left' ? 5 : -5), y,
|
1196
|
+
'L',
|
1197
|
+
labelPos[2], labelPos[3], // second break
|
1198
|
+
'L',
|
1199
|
+
labelPos[4], labelPos[5] // base
|
1200
|
+
];
|
1201
|
+
};
|
1202
|
+
*/
|
1203
|
+
|
1204
|
+
|
1205
|
+
/**
|
1206
|
+
* Perform the final placement of the data labels after we have verified
|
1207
|
+
* that they fall within the plot area.
|
1208
|
+
*
|
1209
|
+
* @private
|
1210
|
+
* @function Highcharts.seriesTypes.pie#placeDataLabels
|
1211
|
+
*/
|
1212
|
+
seriesTypes.pie.prototype.placeDataLabels = function () {
|
1213
|
+
this.points.forEach(function (point) {
|
1214
|
+
var dataLabel = point.dataLabel,
|
1215
|
+
_pos;
|
1216
|
+
|
1217
|
+
if (dataLabel && point.visible) {
|
1218
|
+
_pos = dataLabel._pos;
|
1219
|
+
if (_pos) {
|
1220
|
+
|
1221
|
+
// Shorten data labels with ellipsis if they still overflow
|
1222
|
+
// after the pie has reached minSize (#223).
|
1223
|
+
if (dataLabel.sideOverflow) {
|
1224
|
+
dataLabel._attr.width =
|
1225
|
+
dataLabel.getBBox().width - dataLabel.sideOverflow;
|
1226
|
+
|
1227
|
+
dataLabel.css({
|
1228
|
+
width: dataLabel._attr.width + 'px',
|
1229
|
+
textOverflow: (
|
1230
|
+
(this.options.dataLabels.style || {})
|
1231
|
+
.textOverflow ||
|
1232
|
+
'ellipsis'
|
1233
|
+
)
|
1234
|
+
});
|
1235
|
+
dataLabel.shortened = true;
|
1236
|
+
}
|
1237
|
+
|
1238
|
+
dataLabel.attr(dataLabel._attr);
|
1239
|
+
dataLabel[dataLabel.moved ? 'animate' : 'attr'](_pos);
|
1240
|
+
dataLabel.moved = true;
|
1241
|
+
} else if (dataLabel) {
|
1242
|
+
dataLabel.attr({ y: -9999 });
|
1243
|
+
}
|
1244
|
+
}
|
1245
|
+
}, this);
|
1246
|
+
};
|
1247
|
+
|
1248
|
+
seriesTypes.pie.prototype.alignDataLabel = noop;
|
1249
|
+
|
1250
|
+
/**
|
1251
|
+
* Verify whether the data labels are allowed to draw, or we should run more
|
1252
|
+
* translation and data label positioning to keep them inside the plot area.
|
1253
|
+
* Returns true when data labels are ready to draw.
|
1254
|
+
*
|
1255
|
+
* @private
|
1256
|
+
* @function Highcharts.seriesTypes.pie#verifyDataLabelOverflow
|
1257
|
+
*
|
1258
|
+
* @param {boolean} overflow
|
1259
|
+
*
|
1260
|
+
* @return {boolean}
|
1261
|
+
*/
|
1262
|
+
seriesTypes.pie.prototype.verifyDataLabelOverflow = function (overflow) {
|
1263
|
+
|
1264
|
+
var center = this.center,
|
1265
|
+
options = this.options,
|
1266
|
+
centerOption = options.center,
|
1267
|
+
minSize = options.minSize || 80,
|
1268
|
+
newSize = minSize,
|
1269
|
+
// If a size is set, return true and don't try to shrink the pie
|
1270
|
+
// to fit the labels.
|
1271
|
+
ret = options.size !== null;
|
1272
|
+
|
1273
|
+
if (!ret) {
|
1274
|
+
// Handle horizontal size and center
|
1275
|
+
if (centerOption[0] !== null) { // Fixed center
|
1276
|
+
newSize = Math.max(center[2] -
|
1277
|
+
Math.max(overflow[1], overflow[3]), minSize);
|
1278
|
+
|
1279
|
+
} else { // Auto center
|
1280
|
+
newSize = Math.max(
|
1281
|
+
// horizontal overflow
|
1282
|
+
center[2] - overflow[1] - overflow[3],
|
1283
|
+
minSize
|
1284
|
+
);
|
1285
|
+
// horizontal center
|
1286
|
+
center[0] += (overflow[3] - overflow[1]) / 2;
|
1287
|
+
}
|
1288
|
+
|
1289
|
+
// Handle vertical size and center
|
1290
|
+
if (centerOption[1] !== null) { // Fixed center
|
1291
|
+
newSize = Math.max(Math.min(newSize, center[2] -
|
1292
|
+
Math.max(overflow[0], overflow[2])), minSize);
|
1293
|
+
|
1294
|
+
} else { // Auto center
|
1295
|
+
newSize = Math.max(
|
1296
|
+
Math.min(
|
1297
|
+
newSize,
|
1298
|
+
// vertical overflow
|
1299
|
+
center[2] - overflow[0] - overflow[2]
|
1300
|
+
),
|
1301
|
+
minSize
|
1302
|
+
);
|
1303
|
+
// vertical center
|
1304
|
+
center[1] += (overflow[0] - overflow[2]) / 2;
|
1305
|
+
}
|
1306
|
+
|
1307
|
+
// If the size must be decreased, we need to run translate and
|
1308
|
+
// drawDataLabels again
|
1309
|
+
if (newSize < center[2]) {
|
1310
|
+
center[2] = newSize;
|
1311
|
+
center[3] = Math.min( // #3632
|
1312
|
+
relativeLength(options.innerSize || 0, newSize),
|
1313
|
+
newSize
|
1314
|
+
);
|
1315
|
+
this.translate(center);
|
1316
|
+
|
1317
|
+
if (this.drawDataLabels) {
|
1318
|
+
this.drawDataLabels();
|
1319
|
+
}
|
1320
|
+
// Else, return true to indicate that the pie and its labels is
|
1321
|
+
// within the plot area
|
1322
|
+
} else {
|
1323
|
+
ret = true;
|
1324
|
+
}
|
1325
|
+
}
|
1326
|
+
return ret;
|
1327
|
+
};
|
1328
|
+
}
|
1329
|
+
|
1330
|
+
if (seriesTypes.column) {
|
1331
|
+
|
1332
|
+
/**
|
1333
|
+
* Override the basic data label alignment by adjusting for the position of
|
1334
|
+
* the column.
|
1335
|
+
*
|
1336
|
+
* @private
|
1337
|
+
* @function Highcharts.seriesTypes.column#alignDataLabel
|
1338
|
+
*
|
1339
|
+
* @param {Highcharts.Point} point
|
1340
|
+
*
|
1341
|
+
* @param {Highcharts.SVGElement} dataLabel
|
1342
|
+
*
|
1343
|
+
* @param {Highcharts.PlotSeriesDataLabelsOptions} options
|
1344
|
+
*
|
1345
|
+
* @param {Highcharts.BBoxObject} alignTo
|
1346
|
+
*
|
1347
|
+
* @param {boolean} isNew
|
1348
|
+
*/
|
1349
|
+
seriesTypes.column.prototype.alignDataLabel = function (
|
1350
|
+
point,
|
1351
|
+
dataLabel,
|
1352
|
+
options,
|
1353
|
+
alignTo,
|
1354
|
+
isNew
|
1355
|
+
) {
|
1356
|
+
var inverted = this.chart.inverted,
|
1357
|
+
series = point.series,
|
1358
|
+
// data label box for alignment
|
1359
|
+
dlBox = point.dlBox || point.shapeArgs,
|
1360
|
+
below = pick(
|
1361
|
+
point.below, // range series
|
1362
|
+
point.plotY > pick(this.translatedThreshold, series.yAxis.len)
|
1363
|
+
),
|
1364
|
+
// draw it inside the box?
|
1365
|
+
inside = pick(options.inside, !!this.options.stacking),
|
1366
|
+
overshoot;
|
1367
|
+
|
1368
|
+
// Align to the column itself, or the top of it
|
1369
|
+
if (dlBox) { // Area range uses this method but not alignTo
|
1370
|
+
alignTo = merge(dlBox);
|
1371
|
+
|
1372
|
+
if (alignTo.y < 0) {
|
1373
|
+
alignTo.height += alignTo.y;
|
1374
|
+
alignTo.y = 0;
|
1375
|
+
}
|
1376
|
+
overshoot = alignTo.y + alignTo.height - series.yAxis.len;
|
1377
|
+
if (overshoot > 0) {
|
1378
|
+
alignTo.height -= overshoot;
|
1379
|
+
}
|
1380
|
+
|
1381
|
+
if (inverted) {
|
1382
|
+
alignTo = {
|
1383
|
+
x: series.yAxis.len - alignTo.y - alignTo.height,
|
1384
|
+
y: series.xAxis.len - alignTo.x - alignTo.width,
|
1385
|
+
width: alignTo.height,
|
1386
|
+
height: alignTo.width
|
1387
|
+
};
|
1388
|
+
}
|
1389
|
+
|
1390
|
+
// Compute the alignment box
|
1391
|
+
if (!inside) {
|
1392
|
+
if (inverted) {
|
1393
|
+
alignTo.x += below ? 0 : alignTo.width;
|
1394
|
+
alignTo.width = 0;
|
1395
|
+
} else {
|
1396
|
+
alignTo.y += below ? alignTo.height : 0;
|
1397
|
+
alignTo.height = 0;
|
1398
|
+
}
|
1399
|
+
}
|
1400
|
+
}
|
1401
|
+
|
1402
|
+
|
1403
|
+
// When alignment is undefined (typically columns and bars), display the
|
1404
|
+
// individual point below or above the point depending on the threshold
|
1405
|
+
options.align = pick(
|
1406
|
+
options.align,
|
1407
|
+
!inverted || inside ? 'center' : below ? 'right' : 'left'
|
1408
|
+
);
|
1409
|
+
options.verticalAlign = pick(
|
1410
|
+
options.verticalAlign,
|
1411
|
+
inverted || inside ? 'middle' : below ? 'top' : 'bottom'
|
1412
|
+
);
|
1413
|
+
|
1414
|
+
// Call the parent method
|
1415
|
+
Series.prototype.alignDataLabel.call(
|
1416
|
+
this,
|
1417
|
+
point,
|
1418
|
+
dataLabel,
|
1419
|
+
options,
|
1420
|
+
alignTo,
|
1421
|
+
isNew
|
1422
|
+
);
|
1423
|
+
|
1424
|
+
// If label was justified and we have contrast, set it:
|
1425
|
+
if (point.isLabelJustified && point.contrastColor) {
|
1426
|
+
dataLabel.css({
|
1427
|
+
color: point.contrastColor
|
1428
|
+
});
|
1429
|
+
}
|
1430
|
+
};
|
1431
|
+
}
|