highcharts 6.1.4 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bower.json +1 -1
- package/css/highcharts.css +17 -0
- package/css/highcharts.scss +14 -0
- package/css/themes/dark-unica.css +17 -0
- package/css/themes/grid-light.css +17 -0
- package/css/themes/sand-signika.css +17 -0
- package/es-modules/indicators/momentum.src.js +1 -1
- package/es-modules/indicators/pivot-points.src.js +6 -1
- package/es-modules/masters/highcharts-gantt.src.js +11 -0
- package/es-modules/masters/modules/annotations.src.js +1 -1
- package/es-modules/masters/modules/arrow-symbols.src.js +12 -0
- package/es-modules/masters/modules/broken-axis.src.js +1 -1
- package/es-modules/masters/modules/current-date-indicator.src.js +12 -0
- package/es-modules/masters/modules/data.src.js +1 -1
- package/es-modules/masters/modules/draggable-points.src.js +9 -0
- package/es-modules/masters/modules/export-data.src.js +1 -1
- package/es-modules/masters/modules/exporting.src.js +1 -1
- package/es-modules/masters/modules/funnel.src.js +1 -1
- package/es-modules/masters/modules/gantt.src.js +2 -1
- package/es-modules/masters/modules/grid-axis.src.js +1 -1
- package/es-modules/masters/modules/heatmap.src.js +1 -1
- package/es-modules/masters/modules/item-series.src.js +1 -1
- package/es-modules/masters/modules/map.src.js +1 -1
- package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
- package/es-modules/masters/modules/pathfinder.src.js +12 -0
- package/es-modules/masters/modules/sankey.src.js +1 -1
- package/es-modules/masters/modules/series-label.src.js +1 -1
- package/es-modules/masters/modules/solid-gauge.src.js +1 -1
- package/es-modules/masters/modules/stock.src.js +1 -1
- package/es-modules/masters/modules/streamgraph.src.js +1 -1
- package/es-modules/masters/modules/treegrid.src.js +12 -0
- package/es-modules/masters/modules/variwide.src.js +1 -1
- package/es-modules/masters/modules/vector.src.js +1 -1
- package/es-modules/masters/modules/windbarb.src.js +1 -1
- package/es-modules/masters/modules/xrange.src.js +1 -1
- package/es-modules/masters/themes/dark-blue.src.js +1 -1
- package/es-modules/masters/themes/dark-green.src.js +1 -1
- package/es-modules/masters/themes/dark-unica.src.js +1 -1
- package/es-modules/masters/themes/gray.src.js +1 -1
- package/es-modules/masters/themes/grid-light.src.js +1 -1
- package/es-modules/masters/themes/grid.src.js +1 -1
- package/es-modules/masters/themes/sand-signika.src.js +1 -1
- package/es-modules/masters/themes/skies.src.js +1 -1
- package/es-modules/mixins/centered-series.js +1 -1
- package/es-modules/mixins/on-series.js +1 -1
- package/es-modules/modules/boost.src.js +22 -14
- package/es-modules/modules/broken-axis.src.js +169 -134
- package/es-modules/modules/data.src.js +2 -2
- package/es-modules/modules/draggable-points.src.js +2257 -0
- package/es-modules/modules/drilldown.src.js +1 -0
- package/es-modules/modules/export-data.src.js +1 -1
- package/es-modules/modules/exporting.src.js +1 -1
- package/es-modules/modules/funnel.src.js +1 -1
- package/es-modules/modules/item-series.src.js +1 -1
- package/es-modules/modules/no-data-to-display.src.js +5 -5
- package/es-modules/modules/oldie.src.js +1 -1
- package/es-modules/modules/overlapping-datalabels.src.js +38 -22
- package/es-modules/modules/parallel-coordinates.src.js +3 -2
- package/es-modules/modules/sankey.src.js +1 -1
- package/es-modules/modules/series-label.src.js +2 -2
- package/es-modules/modules/solid-gauge.src.js +1 -1
- package/es-modules/modules/static-scale.src.js +67 -28
- package/es-modules/modules/streamgraph.src.js +1 -1
- package/es-modules/modules/tilemap.src.js +231 -134
- package/es-modules/modules/variwide.src.js +1 -1
- package/es-modules/modules/vector.src.js +92 -22
- package/es-modules/modules/windbarb.src.js +1 -1
- package/es-modules/modules/xrange.src.js +257 -77
- package/es-modules/parts/AreaSeries.js +77 -77
- package/es-modules/parts/AreaSplineSeries.js +64 -27
- package/es-modules/parts/Axis.js +160 -67
- package/es-modules/parts/BarSeries.js +68 -51
- package/es-modules/parts/CandlestickSeries.js +1 -1
- package/es-modules/parts/Chart.js +31 -55
- package/es-modules/parts/Color.js +29 -18
- package/es-modules/parts/ColumnSeries.js +264 -142
- package/es-modules/parts/DataGrouping.js +9 -6
- package/es-modules/parts/DataLabels.js +261 -210
- package/es-modules/parts/DateTimeAxis.js +26 -7
- package/es-modules/parts/Dynamics.js +5 -2
- package/es-modules/parts/FlagsSeries.js +1 -1
- package/es-modules/parts/Globals.js +1 -1
- package/es-modules/parts/Html.js +64 -12
- package/es-modules/parts/Interaction.js +187 -63
- package/es-modules/parts/Legend.js +7 -3
- package/es-modules/parts/LogarithmicAxis.js +35 -4
- package/es-modules/parts/MSPointer.js +1 -1
- package/es-modules/parts/Navigator.js +27 -5
- package/es-modules/parts/OHLCSeries.js +1 -1
- package/es-modules/parts/Options.js +15 -13
- package/es-modules/parts/OrdinalAxis.js +1 -1
- package/es-modules/parts/PieSeries.js +256 -140
- package/es-modules/parts/PlotBandSeries.experimental.js +1 -1
- package/es-modules/parts/PlotLineOrBand.js +7 -40
- package/es-modules/parts/Point.js +28 -4
- package/es-modules/parts/Pointer.js +8 -6
- package/es-modules/parts/RangeSelector.js +1 -1
- package/es-modules/parts/Responsive.js +82 -36
- package/es-modules/parts/ScatterSeries.js +57 -25
- package/es-modules/parts/ScrollablePlotArea.js +17 -7
- package/es-modules/parts/Scrollbar.js +9 -2
- package/es-modules/parts/Series.js +22 -9
- package/es-modules/parts/SplineSeries.js +51 -29
- package/es-modules/parts/Stacking.js +100 -6
- package/es-modules/parts/StockChart.js +9 -3
- package/es-modules/parts/SvgRenderer.js +15 -10
- package/es-modules/parts/Tick.js +150 -30
- package/es-modules/parts/Time.js +23 -5
- package/es-modules/parts/Tooltip.js +2 -2
- package/es-modules/parts/TouchPointer.js +1 -1
- package/es-modules/parts/Utilities.js +16 -1
- package/es-modules/parts-3d/Axis.js +1 -1
- package/es-modules/parts-3d/Chart.js +1 -1
- package/es-modules/parts-3d/Column.js +1 -1
- package/es-modules/parts-3d/Math.js +1 -1
- package/es-modules/parts-3d/Pie.js +1 -1
- package/es-modules/parts-3d/SVGRenderer.js +1 -1
- package/es-modules/parts-3d/Scatter.js +1 -1
- package/es-modules/parts-3d/Series.js +1 -1
- package/es-modules/parts-3d/VMLRenderer.js +1 -1
- package/es-modules/parts-gantt/ArrowSymbols.js +110 -0
- package/es-modules/parts-gantt/CurrentDateIndicator.js +92 -0
- package/es-modules/parts-gantt/GanttChart.js +111 -0
- package/es-modules/parts-gantt/GanttSeries.js +376 -0
- package/es-modules/parts-gantt/GridAxis.js +965 -0
- package/es-modules/parts-gantt/Pathfinder.js +1247 -0
- package/es-modules/parts-gantt/PathfinderAlgorithms.js +746 -0
- package/es-modules/parts-gantt/Tree.js +146 -0
- package/es-modules/parts-gantt/TreeGrid.js +917 -0
- package/es-modules/parts-map/ColorAxis.js +1 -1
- package/es-modules/parts-map/ColorSeriesMixin.js +1 -1
- package/es-modules/parts-map/GeoJSON.js +1 -1
- package/es-modules/parts-map/HeatmapSeries.js +124 -53
- package/es-modules/parts-map/Map.js +1 -1
- package/es-modules/parts-map/MapAxis.js +1 -1
- package/es-modules/parts-map/MapBubbleSeries.js +1 -1
- package/es-modules/parts-map/MapLineSeries.js +1 -1
- package/es-modules/parts-map/MapNavigation.js +1 -1
- package/es-modules/parts-map/MapPointSeries.js +1 -1
- package/es-modules/parts-map/MapPointer.js +1 -1
- package/es-modules/parts-map/MapSeries.js +2 -2
- package/es-modules/parts-more/AreaRangeSeries.js +80 -38
- package/es-modules/parts-more/AreaSplineRangeSeries.js +1 -1
- package/es-modules/parts-more/BoxPlotSeries.js +1 -1
- package/es-modules/parts-more/BubbleSeries.js +1 -1
- package/es-modules/parts-more/ColumnRangeSeries.js +1 -1
- package/es-modules/parts-more/ErrorBarSeries.js +1 -1
- package/es-modules/parts-more/GaugeSeries.js +1 -1
- package/es-modules/parts-more/Pane.js +2 -1
- package/es-modules/parts-more/Polar.js +1 -1
- package/es-modules/parts-more/PolygonSeries.js +1 -1
- package/es-modules/parts-more/RadialAxis.js +5 -4
- package/es-modules/parts-more/WaterfallSeries.js +1 -1
- package/es-modules/supplemental.docs.js +0 -1955
- package/es-modules/themes/dark-blue.js +1 -1
- package/es-modules/themes/dark-green.js +1 -1
- package/es-modules/themes/dark-unica.js +1 -1
- package/es-modules/themes/gray.js +1 -1
- package/es-modules/themes/grid-light.js +1 -1
- package/es-modules/themes/grid.js +1 -1
- package/es-modules/themes/sand-signika.js +1 -1
- package/es-modules/themes/skies.js +1 -1
- package/highcharts-3d.js +1 -1
- package/highcharts-3d.src.js +10 -10
- package/highcharts-gantt.js +503 -0
- package/highcharts-gantt.js.map +1 -0
- package/highcharts-gantt.src.js +49289 -0
- package/highcharts-more.js +65 -64
- package/highcharts-more.js.map +1 -1
- package/highcharts-more.src.js +97 -53
- package/highcharts.js +415 -410
- package/highcharts.js.map +1 -1
- package/highcharts.src.js +2170 -1128
- package/highmaps.js +443 -438
- package/highmaps.js.map +1 -1
- package/highmaps.src.js +1647 -849
- package/highstock.js +553 -548
- package/highstock.js.map +1 -1
- package/highstock.src.js +2398 -1283
- package/indicators/accumulation-distribution.js +1 -1
- package/indicators/accumulation-distribution.src.js +1 -1
- package/indicators/atr.js +1 -1
- package/indicators/atr.src.js +1 -1
- package/indicators/bollinger-bands.js +1 -1
- package/indicators/bollinger-bands.src.js +1 -1
- package/indicators/cci.js +1 -1
- package/indicators/cci.src.js +1 -1
- package/indicators/cmf.js +1 -1
- package/indicators/cmf.src.js +1 -1
- package/indicators/ema.js +1 -1
- package/indicators/ema.src.js +1 -1
- package/indicators/ichimoku-kinko-hyo.js +1 -1
- package/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/indicators/indicators.js +1 -1
- package/indicators/indicators.src.js +1 -1
- package/indicators/macd.js +1 -1
- package/indicators/macd.src.js +1 -1
- package/indicators/mfi.js +1 -1
- package/indicators/mfi.src.js +1 -1
- package/indicators/momentum.js +1 -1
- package/indicators/momentum.src.js +2 -2
- package/indicators/pivot-points.js +4 -4
- package/indicators/pivot-points.js.map +1 -1
- package/indicators/pivot-points.src.js +7 -2
- package/indicators/price-envelopes.js +1 -1
- package/indicators/price-envelopes.src.js +1 -1
- package/indicators/psar.js +1 -1
- package/indicators/psar.src.js +1 -1
- package/indicators/roc.js +1 -1
- package/indicators/roc.src.js +1 -1
- package/indicators/rsi.js +1 -1
- package/indicators/rsi.src.js +1 -1
- package/indicators/stochastic.js +1 -1
- package/indicators/stochastic.src.js +1 -1
- package/indicators/volume-by-price.js +1 -1
- package/indicators/volume-by-price.src.js +1 -1
- package/indicators/vwap.js +1 -1
- package/indicators/vwap.src.js +1 -1
- package/indicators/wma.js +1 -1
- package/indicators/wma.src.js +1 -1
- package/indicators/zigzag.js +1 -1
- package/indicators/zigzag.src.js +1 -1
- package/js/es-modules/indicators/momentum.src.js +1 -1
- package/js/es-modules/indicators/pivot-points.src.js +6 -1
- package/js/es-modules/masters/highcharts-gantt.src.js +11 -0
- package/js/es-modules/masters/modules/annotations.src.js +1 -1
- package/js/es-modules/masters/modules/arrow-symbols.src.js +12 -0
- package/js/es-modules/masters/modules/broken-axis.src.js +1 -1
- package/js/es-modules/masters/modules/current-date-indicator.src.js +12 -0
- package/js/es-modules/masters/modules/data.src.js +1 -1
- package/js/es-modules/masters/modules/draggable-points.src.js +9 -0
- package/js/es-modules/masters/modules/export-data.src.js +1 -1
- package/js/es-modules/masters/modules/exporting.src.js +1 -1
- package/js/es-modules/masters/modules/funnel.src.js +1 -1
- package/js/es-modules/masters/modules/gantt.src.js +2 -1
- package/js/es-modules/masters/modules/grid-axis.src.js +1 -1
- package/js/es-modules/masters/modules/heatmap.src.js +1 -1
- package/js/es-modules/masters/modules/item-series.src.js +1 -1
- package/js/es-modules/masters/modules/map.src.js +1 -1
- package/js/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
- package/js/es-modules/masters/modules/pathfinder.src.js +12 -0
- package/js/es-modules/masters/modules/sankey.src.js +1 -1
- package/js/es-modules/masters/modules/series-label.src.js +1 -1
- package/js/es-modules/masters/modules/solid-gauge.src.js +1 -1
- package/js/es-modules/masters/modules/stock.src.js +1 -1
- package/js/es-modules/masters/modules/streamgraph.src.js +1 -1
- package/js/es-modules/masters/modules/treegrid.src.js +12 -0
- package/js/es-modules/masters/modules/variwide.src.js +1 -1
- package/js/es-modules/masters/modules/vector.src.js +1 -1
- package/js/es-modules/masters/modules/windbarb.src.js +1 -1
- package/js/es-modules/masters/modules/xrange.src.js +1 -1
- package/js/es-modules/masters/themes/dark-blue.src.js +1 -1
- package/js/es-modules/masters/themes/dark-green.src.js +1 -1
- package/js/es-modules/masters/themes/dark-unica.src.js +1 -1
- package/js/es-modules/masters/themes/gray.src.js +1 -1
- package/js/es-modules/masters/themes/grid-light.src.js +1 -1
- package/js/es-modules/masters/themes/grid.src.js +1 -1
- package/js/es-modules/masters/themes/sand-signika.src.js +1 -1
- package/js/es-modules/masters/themes/skies.src.js +1 -1
- package/js/es-modules/mixins/centered-series.js +1 -1
- package/js/es-modules/mixins/on-series.js +1 -1
- package/js/es-modules/modules/boost.src.js +22 -14
- package/js/es-modules/modules/broken-axis.src.js +169 -134
- package/js/es-modules/modules/data.src.js +2 -2
- package/js/es-modules/modules/draggable-points.src.js +2257 -0
- package/js/es-modules/modules/drilldown.src.js +1 -0
- package/js/es-modules/modules/export-data.src.js +1 -1
- package/js/es-modules/modules/exporting.src.js +1 -1
- package/js/es-modules/modules/funnel.src.js +1 -1
- package/js/es-modules/modules/item-series.src.js +1 -1
- package/js/es-modules/modules/no-data-to-display.src.js +5 -5
- package/js/es-modules/modules/oldie.src.js +1 -1
- package/js/es-modules/modules/overlapping-datalabels.src.js +38 -22
- package/js/es-modules/modules/parallel-coordinates.src.js +3 -2
- package/js/es-modules/modules/sankey.src.js +1 -1
- package/js/es-modules/modules/series-label.src.js +2 -2
- package/js/es-modules/modules/solid-gauge.src.js +1 -1
- package/js/es-modules/modules/static-scale.src.js +67 -28
- package/js/es-modules/modules/streamgraph.src.js +1 -1
- package/js/es-modules/modules/tilemap.src.js +231 -134
- package/js/es-modules/modules/variwide.src.js +1 -1
- package/js/es-modules/modules/vector.src.js +92 -22
- package/js/es-modules/modules/windbarb.src.js +1 -1
- package/js/es-modules/modules/xrange.src.js +255 -68
- package/js/es-modules/parts/AreaSeries.js +77 -77
- package/js/es-modules/parts/AreaSplineSeries.js +64 -27
- package/js/es-modules/parts/Axis.js +160 -67
- package/js/es-modules/parts/BarSeries.js +68 -51
- package/js/es-modules/parts/CandlestickSeries.js +1 -1
- package/js/es-modules/parts/Chart.js +31 -55
- package/js/es-modules/parts/Color.js +29 -18
- package/js/es-modules/parts/ColumnSeries.js +231 -123
- package/js/es-modules/parts/DataGrouping.js +9 -6
- package/js/es-modules/parts/DataLabels.js +230 -182
- package/js/es-modules/parts/DateTimeAxis.js +26 -7
- package/js/es-modules/parts/Dynamics.js +5 -2
- package/js/es-modules/parts/FlagsSeries.js +1 -1
- package/js/es-modules/parts/Globals.js +1 -1
- package/js/es-modules/parts/Html.js +64 -12
- package/js/es-modules/parts/Interaction.js +178 -61
- package/js/es-modules/parts/Legend.js +7 -3
- package/js/es-modules/parts/LogarithmicAxis.js +35 -4
- package/js/es-modules/parts/MSPointer.js +1 -1
- package/js/es-modules/parts/Navigator.js +27 -5
- package/js/es-modules/parts/OHLCSeries.js +1 -1
- package/js/es-modules/parts/Options.js +13 -12
- package/js/es-modules/parts/OrdinalAxis.js +1 -1
- package/js/es-modules/parts/PieSeries.js +245 -132
- package/js/es-modules/parts/PlotBandSeries.experimental.js +1 -1
- package/js/es-modules/parts/PlotLineOrBand.js +7 -40
- package/js/es-modules/parts/Point.js +28 -4
- package/js/es-modules/parts/Pointer.js +8 -6
- package/js/es-modules/parts/RangeSelector.js +1 -1
- package/js/es-modules/parts/Responsive.js +82 -36
- package/js/es-modules/parts/ScatterSeries.js +56 -25
- package/js/es-modules/parts/ScrollablePlotArea.js +17 -7
- package/js/es-modules/parts/Scrollbar.js +9 -2
- package/js/es-modules/parts/Series.js +22 -9
- package/js/es-modules/parts/SplineSeries.js +51 -29
- package/js/es-modules/parts/Stacking.js +100 -6
- package/js/es-modules/parts/StockChart.js +9 -3
- package/js/es-modules/parts/SvgRenderer.js +15 -10
- package/js/es-modules/parts/Tick.js +150 -30
- package/js/es-modules/parts/Time.js +23 -5
- package/js/es-modules/parts/Tooltip.js +2 -2
- package/js/es-modules/parts/TouchPointer.js +1 -1
- package/js/es-modules/parts/Utilities.js +16 -1
- package/js/es-modules/parts-3d/Axis.js +1 -1
- package/js/es-modules/parts-3d/Chart.js +1 -1
- package/js/es-modules/parts-3d/Column.js +1 -1
- package/js/es-modules/parts-3d/Math.js +1 -1
- package/js/es-modules/parts-3d/Pie.js +1 -1
- package/js/es-modules/parts-3d/SVGRenderer.js +1 -1
- package/js/es-modules/parts-3d/Scatter.js +1 -1
- package/js/es-modules/parts-3d/Series.js +1 -1
- package/js/es-modules/parts-3d/VMLRenderer.js +1 -1
- package/js/es-modules/parts-gantt/ArrowSymbols.js +110 -0
- package/js/es-modules/parts-gantt/CurrentDateIndicator.js +92 -0
- package/js/es-modules/parts-gantt/GanttChart.js +111 -0
- package/js/es-modules/parts-gantt/GanttSeries.js +371 -0
- package/js/es-modules/parts-gantt/GridAxis.js +962 -0
- package/js/es-modules/parts-gantt/Pathfinder.js +1225 -0
- package/js/es-modules/parts-gantt/PathfinderAlgorithms.js +746 -0
- package/js/es-modules/parts-gantt/Tree.js +146 -0
- package/js/es-modules/parts-gantt/TreeGrid.js +891 -0
- package/js/es-modules/parts-map/ColorAxis.js +1 -1
- package/js/es-modules/parts-map/ColorSeriesMixin.js +1 -1
- package/js/es-modules/parts-map/GeoJSON.js +1 -1
- package/js/es-modules/parts-map/HeatmapSeries.js +122 -52
- package/js/es-modules/parts-map/Map.js +1 -1
- package/js/es-modules/parts-map/MapAxis.js +1 -1
- package/js/es-modules/parts-map/MapBubbleSeries.js +1 -1
- package/js/es-modules/parts-map/MapLineSeries.js +1 -1
- package/js/es-modules/parts-map/MapNavigation.js +1 -1
- package/js/es-modules/parts-map/MapPointSeries.js +1 -1
- package/js/es-modules/parts-map/MapPointer.js +1 -1
- package/js/es-modules/parts-map/MapSeries.js +2 -2
- package/js/es-modules/parts-more/AreaRangeSeries.js +80 -38
- package/js/es-modules/parts-more/AreaSplineRangeSeries.js +1 -1
- package/js/es-modules/parts-more/BoxPlotSeries.js +1 -1
- package/js/es-modules/parts-more/BubbleSeries.js +1 -1
- package/js/es-modules/parts-more/ColumnRangeSeries.js +1 -1
- package/js/es-modules/parts-more/ErrorBarSeries.js +1 -1
- package/js/es-modules/parts-more/GaugeSeries.js +1 -1
- package/js/es-modules/parts-more/Pane.js +2 -1
- package/js/es-modules/parts-more/Polar.js +1 -1
- package/js/es-modules/parts-more/PolygonSeries.js +1 -1
- package/js/es-modules/parts-more/RadialAxis.js +5 -4
- package/js/es-modules/parts-more/WaterfallSeries.js +1 -1
- package/js/es-modules/supplemental.docs.js +0 -1955
- package/js/es-modules/themes/dark-blue.js +1 -1
- package/js/es-modules/themes/dark-green.js +1 -1
- package/js/es-modules/themes/dark-unica.js +1 -1
- package/js/es-modules/themes/gray.js +1 -1
- package/js/es-modules/themes/grid-light.js +1 -1
- package/js/es-modules/themes/grid.js +1 -1
- package/js/es-modules/themes/sand-signika.js +1 -1
- package/js/es-modules/themes/skies.js +1 -1
- package/js/highcharts-3d.js +1 -1
- package/js/highcharts-3d.src.js +10 -10
- package/js/highcharts-gantt.js +480 -0
- package/js/highcharts-gantt.js.map +1 -0
- package/js/highcharts-gantt.src.js +47011 -0
- package/js/highcharts-more.js +62 -61
- package/js/highcharts-more.js.map +1 -1
- package/js/highcharts-more.src.js +97 -53
- package/js/highcharts.js +394 -390
- package/js/highcharts.js.map +1 -1
- package/js/highcharts.src.js +2083 -1070
- package/js/highmaps.js +420 -416
- package/js/highmaps.js.map +1 -1
- package/js/highmaps.src.js +1569 -798
- package/js/highstock.js +526 -520
- package/js/highstock.js.map +1 -1
- package/js/highstock.src.js +2311 -1225
- package/js/indicators/accumulation-distribution.js +1 -1
- package/js/indicators/accumulation-distribution.src.js +1 -1
- package/js/indicators/atr.js +1 -1
- package/js/indicators/atr.src.js +1 -1
- package/js/indicators/bollinger-bands.js +1 -1
- package/js/indicators/bollinger-bands.src.js +1 -1
- package/js/indicators/cci.js +1 -1
- package/js/indicators/cci.src.js +1 -1
- package/js/indicators/cmf.js +1 -1
- package/js/indicators/cmf.src.js +1 -1
- package/js/indicators/ema.js +1 -1
- package/js/indicators/ema.src.js +1 -1
- package/js/indicators/ichimoku-kinko-hyo.js +1 -1
- package/js/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/js/indicators/indicators.js +1 -1
- package/js/indicators/indicators.src.js +1 -1
- package/js/indicators/macd.js +1 -1
- package/js/indicators/macd.src.js +1 -1
- package/js/indicators/mfi.js +1 -1
- package/js/indicators/mfi.src.js +1 -1
- package/js/indicators/momentum.js +1 -1
- package/js/indicators/momentum.src.js +2 -2
- package/js/indicators/pivot-points.js +4 -4
- package/js/indicators/pivot-points.js.map +1 -1
- package/js/indicators/pivot-points.src.js +7 -2
- package/js/indicators/price-envelopes.js +1 -1
- package/js/indicators/price-envelopes.src.js +1 -1
- package/js/indicators/psar.js +1 -1
- package/js/indicators/psar.src.js +1 -1
- package/js/indicators/roc.js +1 -1
- package/js/indicators/roc.src.js +1 -1
- package/js/indicators/rsi.js +1 -1
- package/js/indicators/rsi.src.js +1 -1
- package/js/indicators/stochastic.js +1 -1
- package/js/indicators/stochastic.src.js +1 -1
- package/js/indicators/volume-by-price.js +1 -1
- package/js/indicators/volume-by-price.src.js +1 -1
- package/js/indicators/vwap.js +1 -1
- package/js/indicators/vwap.src.js +1 -1
- package/js/indicators/wma.js +1 -1
- package/js/indicators/wma.src.js +1 -1
- package/js/indicators/zigzag.js +1 -1
- package/js/indicators/zigzag.src.js +1 -1
- package/js/modules/accessibility.js +1 -1
- package/js/modules/accessibility.src.js +1 -1
- package/js/modules/annotations.js +2 -2
- package/js/modules/annotations.src.js +2 -2
- package/js/modules/arrow-symbols.js +13 -0
- package/js/modules/arrow-symbols.js.map +1 -0
- package/js/modules/arrow-symbols.src.js +138 -0
- package/js/modules/boost-canvas.js +1 -1
- package/js/modules/boost-canvas.src.js +1 -1
- package/js/modules/boost.js +43 -43
- package/js/modules/boost.js.map +1 -1
- package/js/modules/boost.src.js +23 -15
- package/js/modules/broken-axis.js +11 -10
- package/js/modules/broken-axis.js.map +1 -1
- package/js/modules/broken-axis.src.js +171 -136
- package/js/modules/bullet.js +1 -1
- package/js/modules/bullet.src.js +1 -1
- package/js/modules/current-date-indicator.js +13 -0
- package/js/modules/current-date-indicator.js.map +1 -0
- package/js/modules/current-date-indicator.src.js +120 -0
- package/js/modules/data.js +2 -2
- package/js/modules/data.src.js +4 -4
- package/js/modules/drag-panes.js +1 -1
- package/js/modules/drag-panes.src.js +1 -1
- package/js/modules/draggable-points.js +38 -0
- package/js/modules/draggable-points.js.map +1 -0
- package/js/modules/draggable-points.src.js +2281 -0
- package/js/modules/drilldown.js +1 -1
- package/js/modules/drilldown.js.map +1 -1
- package/js/modules/drilldown.src.js +2 -1
- package/js/modules/export-data.js +2 -2
- package/js/modules/export-data.src.js +3 -3
- package/js/modules/exporting.js +2 -2
- package/js/modules/exporting.src.js +3 -3
- package/js/modules/funnel.js +2 -2
- package/js/modules/funnel.src.js +3 -3
- package/js/modules/gantt.js +80 -18
- package/js/modules/gantt.js.map +1 -1
- package/js/modules/gantt.src.js +5490 -372
- package/js/modules/grid-axis.js +15 -11
- package/js/modules/grid-axis.js.map +1 -1
- package/js/modules/grid-axis.src.js +731 -293
- package/js/modules/heatmap.js +2 -2
- package/js/modules/heatmap.js.map +1 -1
- package/js/modules/heatmap.src.js +126 -56
- package/js/modules/histogram-bellcurve.js +1 -1
- package/js/modules/histogram-bellcurve.src.js +1 -1
- package/js/modules/item-series.js +2 -2
- package/js/modules/item-series.src.js +3 -3
- package/js/modules/map.js +2 -2
- package/js/modules/map.js.map +1 -1
- package/js/modules/map.src.js +137 -67
- package/js/modules/no-data-to-display.js +1 -1
- package/js/modules/no-data-to-display.src.js +6 -6
- package/js/modules/offline-exporting.js +2 -2
- package/js/modules/offline-exporting.src.js +2 -2
- package/js/modules/oldie.js +2 -2
- package/js/modules/oldie.src.js +3 -3
- package/js/modules/overlapping-datalabels.js +2 -2
- package/js/modules/overlapping-datalabels.src.js +2 -2
- package/js/modules/parallel-coordinates.js +9 -9
- package/js/modules/parallel-coordinates.js.map +1 -1
- package/js/modules/parallel-coordinates.src.js +4 -3
- package/js/modules/pareto.js +1 -1
- package/js/modules/pareto.src.js +1 -1
- package/js/modules/pathfinder.js +34 -0
- package/js/modules/pathfinder.js.map +1 -0
- package/js/modules/pathfinder.src.js +2106 -0
- package/js/modules/pattern-fill.js +1 -1
- package/js/modules/pattern-fill.src.js +1 -1
- package/js/modules/sankey.js +2 -2
- package/js/modules/sankey.src.js +3 -3
- package/js/modules/series-label.js +2 -2
- package/js/modules/series-label.src.js +4 -4
- package/js/modules/solid-gauge.js +2 -2
- package/js/modules/solid-gauge.src.js +3 -3
- package/js/modules/static-scale.js +3 -3
- package/js/modules/static-scale.js.map +1 -1
- package/js/modules/static-scale.src.js +65 -26
- package/js/modules/stock.js +135 -134
- package/js/modules/stock.js.map +1 -1
- package/js/modules/stock.src.js +230 -157
- package/js/modules/streamgraph.js +2 -2
- package/js/modules/streamgraph.src.js +3 -3
- package/js/modules/sunburst.js +1 -1
- package/js/modules/sunburst.src.js +1 -1
- package/js/modules/tilemap.js +1 -1
- package/js/modules/tilemap.js.map +1 -1
- package/js/modules/tilemap.src.js +355 -188
- package/js/modules/treegrid.js +51 -0
- package/js/modules/treegrid.js.map +1 -0
- package/js/modules/treegrid.src.js +2759 -0
- package/js/modules/treemap.js +1 -1
- package/js/modules/treemap.src.js +1 -1
- package/js/modules/variable-pie.js +1 -1
- package/js/modules/variable-pie.src.js +1 -1
- package/js/modules/variwide.js +2 -2
- package/js/modules/variwide.src.js +3 -3
- package/js/modules/vector.js +2 -2
- package/js/modules/vector.js.map +1 -1
- package/js/modules/vector.src.js +94 -24
- package/js/modules/windbarb.js +2 -2
- package/js/modules/windbarb.src.js +4 -4
- package/js/modules/wordcloud.js +1 -1
- package/js/modules/wordcloud.src.js +1 -1
- package/js/modules/xrange.js +11 -10
- package/js/modules/xrange.js.map +1 -1
- package/js/modules/xrange.src.js +257 -70
- package/js/themes/avocado.js +1 -1
- package/js/themes/avocado.src.js +1 -1
- package/js/themes/dark-blue.js +2 -2
- package/js/themes/dark-blue.src.js +3 -3
- package/js/themes/dark-green.js +2 -2
- package/js/themes/dark-green.src.js +3 -3
- package/js/themes/dark-unica.js +2 -2
- package/js/themes/dark-unica.src.js +3 -3
- package/js/themes/gray.js +2 -2
- package/js/themes/gray.src.js +3 -3
- package/js/themes/grid-light.js +2 -2
- package/js/themes/grid-light.src.js +3 -3
- package/js/themes/grid.js +2 -2
- package/js/themes/grid.src.js +3 -3
- package/js/themes/sand-signika.js +2 -2
- package/js/themes/sand-signika.src.js +3 -3
- package/js/themes/skies.js +2 -2
- package/js/themes/skies.src.js +3 -3
- package/js/themes/sunset.js +1 -1
- package/js/themes/sunset.src.js +1 -1
- package/modules/accessibility.js +1 -1
- package/modules/accessibility.src.js +1 -1
- package/modules/annotations.js +2 -2
- package/modules/annotations.src.js +2 -2
- package/modules/arrow-symbols.js +13 -0
- package/modules/arrow-symbols.js.map +1 -0
- package/modules/arrow-symbols.src.js +138 -0
- package/modules/boost-canvas.js +1 -1
- package/modules/boost-canvas.src.js +1 -1
- package/modules/boost.js +36 -36
- package/modules/boost.js.map +1 -1
- package/modules/boost.src.js +23 -15
- package/modules/broken-axis.js +11 -10
- package/modules/broken-axis.js.map +1 -1
- package/modules/broken-axis.src.js +171 -136
- package/modules/bullet.js +1 -1
- package/modules/bullet.src.js +1 -1
- package/modules/current-date-indicator.js +13 -0
- package/modules/current-date-indicator.js.map +1 -0
- package/modules/current-date-indicator.src.js +120 -0
- package/modules/data.js +2 -2
- package/modules/data.src.js +4 -4
- package/modules/drag-panes.js +1 -1
- package/modules/drag-panes.src.js +1 -1
- package/modules/draggable-points.js +38 -0
- package/modules/draggable-points.js.map +1 -0
- package/modules/draggable-points.src.js +2281 -0
- package/modules/drilldown.js +1 -1
- package/modules/drilldown.js.map +1 -1
- package/modules/drilldown.src.js +2 -1
- package/modules/export-data.js +2 -2
- package/modules/export-data.src.js +3 -3
- package/modules/exporting.js +2 -2
- package/modules/exporting.src.js +3 -3
- package/modules/funnel.js +2 -2
- package/modules/funnel.src.js +3 -3
- package/modules/gantt.js +83 -19
- package/modules/gantt.js.map +1 -1
- package/modules/gantt.src.js +5553 -379
- package/modules/grid-axis.js +16 -11
- package/modules/grid-axis.js.map +1 -1
- package/modules/grid-axis.src.js +732 -293
- package/modules/heatmap.js +2 -2
- package/modules/heatmap.js.map +1 -1
- package/modules/heatmap.src.js +128 -57
- package/modules/histogram-bellcurve.js +1 -1
- package/modules/histogram-bellcurve.src.js +1 -1
- package/modules/item-series.js +2 -2
- package/modules/item-series.src.js +3 -3
- package/modules/map.js +2 -2
- package/modules/map.js.map +1 -1
- package/modules/map.src.js +139 -68
- package/modules/no-data-to-display.js +1 -1
- package/modules/no-data-to-display.src.js +6 -6
- package/modules/offline-exporting.js +2 -2
- package/modules/offline-exporting.src.js +2 -2
- package/modules/oldie.js +2 -2
- package/modules/oldie.src.js +3 -3
- package/modules/overlapping-datalabels.js +2 -2
- package/modules/overlapping-datalabels.src.js +2 -2
- package/modules/parallel-coordinates.js +8 -8
- package/modules/parallel-coordinates.js.map +1 -1
- package/modules/parallel-coordinates.src.js +4 -3
- package/modules/pareto.js +1 -1
- package/modules/pareto.src.js +1 -1
- package/modules/pathfinder.js +35 -0
- package/modules/pathfinder.js.map +1 -0
- package/modules/pathfinder.src.js +2128 -0
- package/modules/pattern-fill.js +1 -1
- package/modules/pattern-fill.src.js +1 -1
- package/modules/sankey.js +2 -2
- package/modules/sankey.src.js +3 -3
- package/modules/series-label.js +2 -2
- package/modules/series-label.src.js +4 -4
- package/modules/solid-gauge.js +2 -2
- package/modules/solid-gauge.src.js +3 -3
- package/modules/static-scale.js +3 -3
- package/modules/static-scale.js.map +1 -1
- package/modules/static-scale.src.js +65 -26
- package/modules/stock.js +142 -142
- package/modules/stock.js.map +1 -1
- package/modules/stock.src.js +230 -157
- package/modules/streamgraph.js +2 -2
- package/modules/streamgraph.src.js +3 -3
- package/modules/sunburst.js +1 -1
- package/modules/sunburst.src.js +1 -1
- package/modules/tilemap.js +1 -1
- package/modules/tilemap.js.map +1 -1
- package/modules/tilemap.src.js +357 -189
- package/modules/treegrid.js +52 -0
- package/modules/treegrid.js.map +1 -0
- package/modules/treegrid.src.js +2797 -0
- package/modules/treemap.js +1 -1
- package/modules/treemap.src.js +1 -1
- package/modules/variable-pie.js +1 -1
- package/modules/variable-pie.src.js +1 -1
- package/modules/variwide.js +2 -2
- package/modules/variwide.src.js +3 -3
- package/modules/vector.js +2 -2
- package/modules/vector.js.map +1 -1
- package/modules/vector.src.js +94 -24
- package/modules/windbarb.js +2 -2
- package/modules/windbarb.src.js +4 -4
- package/modules/wordcloud.js +1 -1
- package/modules/wordcloud.src.js +1 -1
- package/modules/xrange.js +12 -11
- package/modules/xrange.js.map +1 -1
- package/modules/xrange.src.js +259 -79
- package/package.json +1 -1
- package/themes/avocado.js +1 -1
- package/themes/avocado.src.js +1 -1
- package/themes/dark-blue.js +2 -2
- package/themes/dark-blue.src.js +3 -3
- package/themes/dark-green.js +2 -2
- package/themes/dark-green.src.js +3 -3
- package/themes/dark-unica.js +2 -2
- package/themes/dark-unica.src.js +3 -3
- package/themes/gray.js +2 -2
- package/themes/gray.src.js +3 -3
- package/themes/grid-light.js +2 -2
- package/themes/grid-light.src.js +3 -3
- package/themes/grid.js +2 -2
- package/themes/grid.src.js +3 -3
- package/themes/sand-signika.js +2 -2
- package/themes/sand-signika.src.js +3 -3
- package/themes/skies.js +2 -2
- package/themes/skies.src.js +3 -3
- package/themes/sunset.js +1 -1
- package/themes/sunset.src.js +1 -1
package/modules/grid-axis.src.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Highcharts JS v6.
|
|
2
|
+
* @license Highcharts JS v6.2.0 (2018-10-17)
|
|
3
3
|
* GridAxis
|
|
4
4
|
*
|
|
5
5
|
* (c) 2016 Lars A. V. Cabrera
|
|
@@ -28,14 +28,78 @@
|
|
|
28
28
|
* License: www.highcharts.com/license
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
-
var
|
|
32
|
-
|
|
31
|
+
var argsToArray = function (args) {
|
|
32
|
+
return Array.prototype.slice.call(args, 1);
|
|
33
|
+
},
|
|
34
|
+
dateFormat = H.dateFormat,
|
|
35
|
+
defined = H.defined,
|
|
36
|
+
each = H.each,
|
|
37
|
+
isArray = H.isArray,
|
|
38
|
+
isNumber = H.isNumber,
|
|
39
|
+
isObject = function (x) {
|
|
40
|
+
// Always use strict mode
|
|
41
|
+
return H.isObject(x, true);
|
|
42
|
+
},
|
|
43
|
+
merge = H.merge,
|
|
33
44
|
pick = H.pick,
|
|
34
45
|
wrap = H.wrap,
|
|
35
46
|
Axis = H.Axis,
|
|
36
|
-
Chart = H.Chart,
|
|
37
47
|
Tick = H.Tick;
|
|
38
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Set grid options for the axis labels. Requires Highcharts Gantt.
|
|
51
|
+
*
|
|
52
|
+
* @type {object}
|
|
53
|
+
* @since 6.2.0
|
|
54
|
+
* @product gantt
|
|
55
|
+
* @apioption xAxis.grid
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Enable grid on the axis labels. Defaults to true for Gantt charts.
|
|
60
|
+
*
|
|
61
|
+
* @type {boolean}
|
|
62
|
+
* @since 6.2.0
|
|
63
|
+
* @default true
|
|
64
|
+
* @product gantt
|
|
65
|
+
* @apioption xAxis.grid.enabled
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Set specific options for each column (or row for horizontal axes) in the
|
|
70
|
+
* grid. Each extra column/row is its own axis, and the axis options can be set
|
|
71
|
+
* here.
|
|
72
|
+
*
|
|
73
|
+
* @type {Array<object>}
|
|
74
|
+
* @sample gantt/demo/left-axis-table
|
|
75
|
+
* Left axis as a table
|
|
76
|
+
* @apioption xAxis.grid.columns
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Set border color for the label grid lines.
|
|
81
|
+
*
|
|
82
|
+
* @type {Highcharts.ColorString}
|
|
83
|
+
* @apioption xAxis.grid.borderColor
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Set border width of the label grid lines.
|
|
88
|
+
*
|
|
89
|
+
* @type {number}
|
|
90
|
+
* @default 1
|
|
91
|
+
* @apioption xAxis.grid.borderWidth
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Set cell height for grid axis labels. By default this is calculated from font
|
|
96
|
+
* size.
|
|
97
|
+
*
|
|
98
|
+
* @type {number}
|
|
99
|
+
* @default null
|
|
100
|
+
* @apioption xAxis.grid.cellHeight
|
|
101
|
+
*/
|
|
102
|
+
|
|
39
103
|
|
|
40
104
|
// Enum for which side the axis is on.
|
|
41
105
|
// Maps to axis.side
|
|
@@ -50,6 +114,14 @@
|
|
|
50
114
|
3: 'left'
|
|
51
115
|
};
|
|
52
116
|
|
|
117
|
+
/**
|
|
118
|
+
* Checks if an axis is a navigator axis.
|
|
119
|
+
* @return {Boolean} true if axis is found in axis.chart.navigator
|
|
120
|
+
*/
|
|
121
|
+
Axis.prototype.isNavigatorAxis = function () {
|
|
122
|
+
return /highcharts-navigator-[xy]axis/.test(this.options.className);
|
|
123
|
+
};
|
|
124
|
+
|
|
53
125
|
/**
|
|
54
126
|
* Checks if an axis is the outer axis in its dimension. Since
|
|
55
127
|
* axes are placed outwards in order, the axis with the highest
|
|
@@ -64,11 +136,12 @@
|
|
|
64
136
|
*/
|
|
65
137
|
Axis.prototype.isOuterAxis = function () {
|
|
66
138
|
var axis = this,
|
|
139
|
+
chart = axis.chart,
|
|
67
140
|
thisIndex = -1,
|
|
68
141
|
isOuter = true;
|
|
69
142
|
|
|
70
|
-
each(
|
|
71
|
-
if (otherAxis.side === axis.side) {
|
|
143
|
+
each(chart.axes, function (otherAxis, index) {
|
|
144
|
+
if (otherAxis.side === axis.side && !otherAxis.isNavigatorAxis()) {
|
|
72
145
|
if (otherAxis === axis) {
|
|
73
146
|
// Get the index of the axis in question
|
|
74
147
|
thisIndex = index;
|
|
@@ -77,9 +150,8 @@
|
|
|
77
150
|
// not been found yet
|
|
78
151
|
} else if (thisIndex >= 0 && index > thisIndex) {
|
|
79
152
|
// There was an axis on the same side with a
|
|
80
|
-
// higher index.
|
|
153
|
+
// higher index.
|
|
81
154
|
isOuter = false;
|
|
82
|
-
return;
|
|
83
155
|
}
|
|
84
156
|
}
|
|
85
157
|
});
|
|
@@ -89,99 +161,37 @@
|
|
|
89
161
|
};
|
|
90
162
|
|
|
91
163
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* @
|
|
164
|
+
* Get the largest label width and height.
|
|
165
|
+
* @param {object} ticks All the ticks on one axis.
|
|
166
|
+
* @param {array} tickPositions All the tick positions on one axis.
|
|
167
|
+
* @return {object} object containing the properties height and width.
|
|
95
168
|
*/
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
maxLabelLength = tick.labelLength;
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
this.maxLabelLength = maxLabelLength;
|
|
122
|
-
}
|
|
123
|
-
return this.maxLabelLength;
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Adds the axis defined in axis.options.title
|
|
128
|
-
*/
|
|
129
|
-
Axis.prototype.addTitle = function () {
|
|
130
|
-
var axis = this,
|
|
131
|
-
renderer = axis.chart.renderer,
|
|
132
|
-
axisParent = axis.axisParent,
|
|
133
|
-
horiz = axis.horiz,
|
|
134
|
-
opposite = axis.opposite,
|
|
135
|
-
options = axis.options,
|
|
136
|
-
axisTitleOptions = options.title,
|
|
137
|
-
hasData,
|
|
138
|
-
showAxis,
|
|
139
|
-
textAlign;
|
|
140
|
-
|
|
141
|
-
// For reuse in Axis.render
|
|
142
|
-
hasData = axis.hasData();
|
|
143
|
-
axis.showAxis = showAxis = hasData || pick(options.showEmpty, true);
|
|
144
|
-
|
|
145
|
-
// Disregard title generation in original Axis.getOffset()
|
|
146
|
-
options.title = '';
|
|
147
|
-
|
|
148
|
-
if (!axis.axisTitle) {
|
|
149
|
-
textAlign = axisTitleOptions.textAlign;
|
|
150
|
-
if (!textAlign) {
|
|
151
|
-
textAlign = (horiz ? {
|
|
152
|
-
low: 'left',
|
|
153
|
-
middle: 'center',
|
|
154
|
-
high: 'right'
|
|
155
|
-
} : {
|
|
156
|
-
low: opposite ? 'right' : 'left',
|
|
157
|
-
middle: 'center',
|
|
158
|
-
high: opposite ? 'left' : 'right'
|
|
159
|
-
})[axisTitleOptions.align];
|
|
169
|
+
Axis.prototype.getMaxLabelDimensions = function (ticks, tickPositions) {
|
|
170
|
+
var dimensions = {
|
|
171
|
+
width: 0,
|
|
172
|
+
height: 0
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
each(tickPositions, function (pos) {
|
|
176
|
+
var tick = ticks[pos],
|
|
177
|
+
tickHeight = 0,
|
|
178
|
+
tickWidth = 0,
|
|
179
|
+
label;
|
|
180
|
+
|
|
181
|
+
if (isObject(tick)) {
|
|
182
|
+
label = isObject(tick.label) ? tick.label : {};
|
|
183
|
+
|
|
184
|
+
// Find width and height of tick
|
|
185
|
+
tickHeight = label.getBBox ? label.getBBox().height : 0;
|
|
186
|
+
tickWidth = isNumber(label.textPxLength) ? label.textPxLength : 0;
|
|
187
|
+
|
|
188
|
+
// Update the result if width and/or height are larger
|
|
189
|
+
dimensions.height = Math.max(tickHeight, dimensions.height);
|
|
190
|
+
dimensions.width = Math.max(tickWidth, dimensions.width);
|
|
160
191
|
}
|
|
161
|
-
|
|
162
|
-
axisTitleOptions.text,
|
|
163
|
-
0,
|
|
164
|
-
0,
|
|
165
|
-
axisTitleOptions.useHTML
|
|
166
|
-
)
|
|
167
|
-
.attr({
|
|
168
|
-
zIndex: 7,
|
|
169
|
-
rotation: axisTitleOptions.rotation || 0,
|
|
170
|
-
align: textAlign
|
|
171
|
-
})
|
|
172
|
-
.addClass('highcharts-axis-title')
|
|
173
|
-
|
|
174
|
-
.css(axisTitleOptions.style)
|
|
175
|
-
|
|
176
|
-
// Add to axisParent instead of axisGroup, to ignore the space
|
|
177
|
-
// it takes
|
|
178
|
-
.add(axisParent);
|
|
179
|
-
axis.axisTitle.isNew = true;
|
|
180
|
-
}
|
|
181
|
-
|
|
192
|
+
});
|
|
182
193
|
|
|
183
|
-
|
|
184
|
-
axis.axisTitle[showAxis ? 'show' : 'hide'](true);
|
|
194
|
+
return dimensions;
|
|
185
195
|
};
|
|
186
196
|
|
|
187
197
|
/**
|
|
@@ -190,106 +200,172 @@
|
|
|
190
200
|
H.dateFormats = {
|
|
191
201
|
// Week number
|
|
192
202
|
W: function (timestamp) {
|
|
193
|
-
var
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
return
|
|
203
|
+
var d = new Date(timestamp),
|
|
204
|
+
yearStart,
|
|
205
|
+
weekNo;
|
|
206
|
+
d.setHours(0, 0, 0, 0);
|
|
207
|
+
d.setDate(d.getDate() - (d.getDay() || 7));
|
|
208
|
+
yearStart = new Date(d.getFullYear(), 0, 1);
|
|
209
|
+
weekNo = Math.ceil((((d - yearStart) / 86400000) + 1) / 7);
|
|
210
|
+
return weekNo;
|
|
201
211
|
},
|
|
202
212
|
// First letter of the day of the week, e.g. 'M' for 'Monday'.
|
|
203
213
|
E: function (timestamp) {
|
|
204
|
-
return
|
|
214
|
+
return dateFormat('%a', timestamp, true).charAt(0);
|
|
205
215
|
}
|
|
206
216
|
};
|
|
207
217
|
|
|
208
218
|
/**
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
* Since numeric labels are normally placed at starts and ends of a range of
|
|
212
|
-
* value, and this module makes the label point at the value, an "extra" label
|
|
213
|
-
* would appear.
|
|
214
|
-
*
|
|
219
|
+
* If chart is stockChart, always return 'left' to avoid labels being placed
|
|
220
|
+
* inside chart. Stock charts place yAxis labels inside by default.
|
|
215
221
|
* @param {function} proceed - the original function
|
|
222
|
+
* @return {string} 'left' if stockChart, or auto calculated alignment
|
|
216
223
|
*/
|
|
217
|
-
wrap(
|
|
218
|
-
var axis = this
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
if (!axis.options.grid || isCategoryAxis || isLastTick) {
|
|
225
|
-
proceed.apply(this);
|
|
224
|
+
wrap(Axis.prototype, 'autoLabelAlign', function (proceed) {
|
|
225
|
+
var axis = this,
|
|
226
|
+
retVal;
|
|
227
|
+
if (axis.chart.isStock) {
|
|
228
|
+
retVal = 'left';
|
|
229
|
+
} else {
|
|
230
|
+
retVal = proceed.apply(axis, argsToArray(arguments));
|
|
226
231
|
}
|
|
232
|
+
return retVal;
|
|
227
233
|
});
|
|
228
234
|
|
|
229
235
|
/**
|
|
230
|
-
* Center tick labels
|
|
236
|
+
* Center tick labels in cells.
|
|
231
237
|
*
|
|
232
238
|
* @param {function} proceed - the original function
|
|
233
239
|
*
|
|
234
240
|
* @return {object} object - an object containing x and y positions
|
|
235
|
-
*
|
|
241
|
+
* for the tick
|
|
236
242
|
*/
|
|
237
|
-
wrap(Tick.prototype, 'getLabelPosition', function (proceed, x, y, label
|
|
238
|
-
|
|
239
|
-
|
|
243
|
+
wrap(Tick.prototype, 'getLabelPosition', function (proceed, x, y, label, horiz,
|
|
244
|
+
labelOpts, tickmarkOffset, index) {
|
|
245
|
+
var tick = this,
|
|
246
|
+
axis = tick.axis,
|
|
247
|
+
reversed = axis.reversed,
|
|
248
|
+
chart = axis.chart,
|
|
240
249
|
options = axis.options,
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
250
|
+
gridOptions = (options && isObject(options.grid)) ? options.grid : {},
|
|
251
|
+
align = labelOpts.align,
|
|
252
|
+
// verticalAlign is currently not supported for axis.labels.
|
|
253
|
+
verticalAlign = 'middle', // labelOpts.verticalAlign,
|
|
254
|
+
side = axisSide[axis.side],
|
|
255
|
+
tickPositions = axis.tickPositions,
|
|
256
|
+
tickPos = tick.pos - tickmarkOffset,
|
|
257
|
+
nextTickPos = (
|
|
258
|
+
isNumber(tickPositions[index + 1]) ?
|
|
259
|
+
tickPositions[index + 1] - tickmarkOffset :
|
|
260
|
+
axis.max + tickmarkOffset
|
|
261
|
+
),
|
|
262
|
+
tickSize = axis.tickSize('tick', true),
|
|
263
|
+
tickWidth = isArray(tickSize) ? tickSize[0] : 0,
|
|
264
|
+
crispCorr = tickSize && tickSize[1] / 2,
|
|
265
|
+
labelHeight,
|
|
266
|
+
lblMetrics,
|
|
267
|
+
lines,
|
|
268
|
+
result,
|
|
269
|
+
bottom,
|
|
270
|
+
top,
|
|
271
|
+
left,
|
|
272
|
+
right;
|
|
273
|
+
|
|
274
|
+
// Only center tick labels in grid axes
|
|
275
|
+
if (gridOptions.enabled === true) {
|
|
276
|
+
/**
|
|
277
|
+
* Calculate top and bottom positions of the cell.
|
|
278
|
+
*/
|
|
279
|
+
if (side === 'top') {
|
|
280
|
+
bottom = axis.top + axis.offset;
|
|
281
|
+
top = bottom - tickWidth;
|
|
282
|
+
} else if (side === 'bottom') {
|
|
283
|
+
top = chart.chartHeight - axis.bottom + axis.offset;
|
|
284
|
+
bottom = top + tickWidth;
|
|
271
285
|
} else {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
286
|
+
bottom = axis.top + axis.len - axis.translate(
|
|
287
|
+
reversed ? nextTickPos : tickPos
|
|
288
|
+
);
|
|
289
|
+
top = axis.top + axis.len - axis.translate(
|
|
290
|
+
reversed ? tickPos : nextTickPos
|
|
291
|
+
);
|
|
292
|
+
}
|
|
277
293
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
294
|
+
/**
|
|
295
|
+
* Calculate left and right positions of the cell.
|
|
296
|
+
*/
|
|
297
|
+
if (side === 'right') {
|
|
298
|
+
left = chart.chartWidth - axis.right + axis.offset;
|
|
299
|
+
right = left + tickWidth;
|
|
300
|
+
} else if (side === 'left') {
|
|
301
|
+
right = axis.left + axis.offset;
|
|
302
|
+
left = right - tickWidth;
|
|
303
|
+
} else {
|
|
304
|
+
left = Math.round(axis.left + axis.translate(
|
|
305
|
+
reversed ? nextTickPos : tickPos
|
|
306
|
+
)) - crispCorr;
|
|
307
|
+
right = Math.round(axis.left + axis.translate(
|
|
308
|
+
reversed ? tickPos : nextTickPos
|
|
309
|
+
)) - crispCorr;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
tick.slotWidth = right - left;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Calculate the positioning of the label based on alignment.
|
|
316
|
+
*/
|
|
317
|
+
result = {
|
|
318
|
+
x: (
|
|
319
|
+
align === 'left' ?
|
|
320
|
+
left :
|
|
321
|
+
align === 'right' ?
|
|
322
|
+
right :
|
|
323
|
+
left + ((right - left) / 2) // default to center
|
|
324
|
+
),
|
|
325
|
+
y: (
|
|
326
|
+
verticalAlign === 'top' ?
|
|
327
|
+
top :
|
|
328
|
+
verticalAlign === 'bottom' ?
|
|
329
|
+
bottom :
|
|
330
|
+
top + ((bottom - top) / 2) // default to middle
|
|
331
|
+
)
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
lblMetrics = chart.renderer.fontMetrics(
|
|
335
|
+
labelOpts.style.fontSize,
|
|
336
|
+
label.element
|
|
337
|
+
);
|
|
338
|
+
labelHeight = label.getBBox().height;
|
|
339
|
+
|
|
340
|
+
// Adjustment to y position to align the label correctly.
|
|
341
|
+
// Would be better to have a setter or similar for this.
|
|
342
|
+
if (!labelOpts.useHTML) {
|
|
343
|
+
lines = Math.round(labelHeight / lblMetrics.h);
|
|
344
|
+
result.y += (
|
|
345
|
+
// Center the label
|
|
346
|
+
// TODO: why does this actually center the label?
|
|
347
|
+
((lblMetrics.b - (lblMetrics.h - lblMetrics.f)) / 2) +
|
|
348
|
+
// Adjust for height of additional lines.
|
|
349
|
+
-(((lines - 1) * lblMetrics.h) / 2)
|
|
350
|
+
);
|
|
351
|
+
} else {
|
|
352
|
+
result.y += (
|
|
353
|
+
// Readjust yCorr in htmlUpdateTransform
|
|
354
|
+
lblMetrics.b +
|
|
355
|
+
// Adjust for height of html label
|
|
356
|
+
-(labelHeight / 2)
|
|
357
|
+
);
|
|
285
358
|
}
|
|
359
|
+
|
|
360
|
+
result.x += (axis.horiz && labelOpts.x || 0);
|
|
361
|
+
} else {
|
|
362
|
+
result = proceed.apply(tick, argsToArray(arguments));
|
|
286
363
|
}
|
|
287
|
-
return
|
|
364
|
+
return result;
|
|
288
365
|
});
|
|
289
366
|
|
|
290
|
-
|
|
291
367
|
/**
|
|
292
|
-
* Draw vertical ticks extra long to create cell floors and roofs.
|
|
368
|
+
* Draw vertical axis ticks extra long to create cell floors and roofs.
|
|
293
369
|
* Overrides the tickLength for vertical axes.
|
|
294
370
|
*
|
|
295
371
|
* @param {function} proceed - the original function
|
|
@@ -297,105 +373,400 @@
|
|
|
297
373
|
*/
|
|
298
374
|
wrap(Axis.prototype, 'tickSize', function (proceed) {
|
|
299
375
|
var axis = this,
|
|
300
|
-
|
|
376
|
+
dimensions = axis.maxLabelDimensions,
|
|
377
|
+
options = axis.options,
|
|
378
|
+
gridOptions = (options && isObject(options.grid)) ? options.grid : {},
|
|
379
|
+
retVal = proceed.apply(axis, argsToArray(arguments)),
|
|
301
380
|
labelPadding,
|
|
302
381
|
distance;
|
|
303
382
|
|
|
304
|
-
if (
|
|
383
|
+
if (gridOptions.enabled === true) {
|
|
305
384
|
labelPadding = (Math.abs(axis.defaultLeftAxisOptions.labels.x) * 2);
|
|
306
|
-
|
|
307
|
-
axis.
|
|
308
|
-
}
|
|
309
|
-
distance = axis.maxLabelLength + labelPadding;
|
|
385
|
+
distance = labelPadding +
|
|
386
|
+
(axis.horiz ? dimensions.height : dimensions.width);
|
|
310
387
|
|
|
311
|
-
retVal
|
|
388
|
+
if (isArray(retVal)) {
|
|
389
|
+
retVal[0] = distance;
|
|
390
|
+
} else {
|
|
391
|
+
retVal = [distance];
|
|
392
|
+
}
|
|
312
393
|
}
|
|
313
394
|
return retVal;
|
|
314
395
|
});
|
|
315
396
|
|
|
397
|
+
wrap(Axis.prototype, 'getTitlePosition', function (proceed) {
|
|
398
|
+
var axis = this,
|
|
399
|
+
options = axis.options,
|
|
400
|
+
gridOptions = (options && isObject(options.grid)) ? options.grid : {};
|
|
401
|
+
|
|
402
|
+
if (gridOptions.enabled === true) {
|
|
403
|
+
// compute anchor points for each of the title align options
|
|
404
|
+
var title = axis.axisTitle,
|
|
405
|
+
titleWidth = title && title.getBBox().width,
|
|
406
|
+
horiz = axis.horiz,
|
|
407
|
+
axisLeft = axis.left,
|
|
408
|
+
axisTop = axis.top,
|
|
409
|
+
axisWidth = axis.width,
|
|
410
|
+
axisHeight = axis.height,
|
|
411
|
+
axisTitleOptions = options.title,
|
|
412
|
+
opposite = axis.opposite,
|
|
413
|
+
offset = axis.offset,
|
|
414
|
+
tickSize = axis.tickSize() || [0],
|
|
415
|
+
xOption = axisTitleOptions.x || 0,
|
|
416
|
+
yOption = axisTitleOptions.y || 0,
|
|
417
|
+
titleMargin = pick(axisTitleOptions.margin, horiz ? 5 : 10),
|
|
418
|
+
titleFontSize = axis.chart.renderer.fontMetrics(
|
|
419
|
+
axisTitleOptions.style && axisTitleOptions.style.fontSize,
|
|
420
|
+
title
|
|
421
|
+
).f,
|
|
422
|
+
// TODO account for alignment
|
|
423
|
+
// the position in the perpendicular direction of the axis
|
|
424
|
+
offAxis = (horiz ? axisTop + axisHeight : axisLeft) +
|
|
425
|
+
(horiz ? 1 : -1) * // horizontal axis reverses the margin
|
|
426
|
+
(opposite ? -1 : 1) * // so does opposite axes
|
|
427
|
+
(tickSize[0] / 2) +
|
|
428
|
+
(axis.side === axisSide.bottom ? titleFontSize : 0);
|
|
429
|
+
|
|
430
|
+
return {
|
|
431
|
+
x: horiz ?
|
|
432
|
+
axisLeft - titleWidth / 2 - titleMargin + xOption :
|
|
433
|
+
offAxis + (opposite ? axisWidth : 0) + offset + xOption,
|
|
434
|
+
y: horiz ?
|
|
435
|
+
(
|
|
436
|
+
offAxis -
|
|
437
|
+
(opposite ? axisHeight : 0) +
|
|
438
|
+
(opposite ? titleFontSize : -titleFontSize) / 2 +
|
|
439
|
+
offset +
|
|
440
|
+
yOption
|
|
441
|
+
) :
|
|
442
|
+
axisTop - titleMargin + yOption
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
return proceed.apply(this, argsToArray(arguments));
|
|
447
|
+
});
|
|
448
|
+
|
|
316
449
|
/**
|
|
317
|
-
*
|
|
318
|
-
* instead of axisGroup, and disregarding margins and offsets related to
|
|
319
|
-
* axisTitle.
|
|
320
|
-
*
|
|
321
|
-
* @param {function} proceed - the original function
|
|
450
|
+
* Avoid altering tickInterval when reserving space.
|
|
322
451
|
*/
|
|
323
|
-
wrap(Axis.prototype, '
|
|
452
|
+
wrap(Axis.prototype, 'unsquish', function (proceed) {
|
|
324
453
|
var axis = this,
|
|
325
|
-
axisOffset = axis.chart.axisOffset,
|
|
326
|
-
side = axis.side,
|
|
327
|
-
axisHeight,
|
|
328
|
-
tickSize,
|
|
329
454
|
options = axis.options,
|
|
330
|
-
|
|
331
|
-
addTitle = axisTitleOptions &&
|
|
332
|
-
axisTitleOptions.text &&
|
|
333
|
-
axisTitleOptions.enabled !== false;
|
|
455
|
+
gridOptions = (options && isObject(options.grid)) ? options.grid : {};
|
|
334
456
|
|
|
335
|
-
if (
|
|
457
|
+
if (gridOptions.enabled === true && this.categories) {
|
|
458
|
+
return this.tickInterval;
|
|
459
|
+
}
|
|
336
460
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
axisHeight = axisOffset[side] + tickSize;
|
|
340
|
-
}
|
|
461
|
+
return proceed.apply(this, argsToArray(arguments));
|
|
462
|
+
});
|
|
341
463
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
464
|
+
/**
|
|
465
|
+
* Creates a left and right wall on horizontal axes:
|
|
466
|
+
* - Places leftmost tick at the start of the axis, to create a left wall
|
|
467
|
+
* - Ensures that the rightmost tick is at the end of the axis, to create a
|
|
468
|
+
* right wall.
|
|
469
|
+
*
|
|
470
|
+
* @param {function} proceed - the original function
|
|
471
|
+
* @param {object} options - the pure axis options as input by the user
|
|
472
|
+
*/
|
|
473
|
+
H.addEvent(Axis, 'afterSetOptions', function (e) {
|
|
474
|
+
var options = this.options,
|
|
475
|
+
userOptions = e.userOptions,
|
|
476
|
+
gridAxisOptions,
|
|
477
|
+
gridOptions = (options && isObject(options.grid)) ? options.grid : {};
|
|
478
|
+
|
|
479
|
+
if (gridOptions.enabled === true) {
|
|
480
|
+
|
|
481
|
+
// Merge the user options into default grid axis options so that when a
|
|
482
|
+
// user option is set, it takes presedence.
|
|
483
|
+
gridAxisOptions = merge(true, {
|
|
484
|
+
|
|
485
|
+
className: 'highcharts-grid-axis ' + (userOptions.className || ''),
|
|
486
|
+
|
|
487
|
+
dateTimeLabelFormats: {
|
|
488
|
+
hour: {
|
|
489
|
+
list: ['%H:%M', '%H']
|
|
490
|
+
},
|
|
491
|
+
day: {
|
|
492
|
+
list: ['%A, %e. %B', '%a, %e. %b', '%E']
|
|
493
|
+
},
|
|
494
|
+
week: {
|
|
495
|
+
list: ['Week %W', 'W%W']
|
|
496
|
+
},
|
|
497
|
+
month: {
|
|
498
|
+
list: ['%B', '%b', '%o']
|
|
499
|
+
}
|
|
500
|
+
},
|
|
347
501
|
|
|
348
|
-
|
|
502
|
+
grid: {
|
|
503
|
+
borderWidth: 1
|
|
504
|
+
},
|
|
349
505
|
|
|
350
|
-
|
|
506
|
+
labels: {
|
|
507
|
+
padding: 2,
|
|
508
|
+
style: {
|
|
509
|
+
fontSize: '13px'
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
|
|
513
|
+
title: {
|
|
514
|
+
text: null,
|
|
515
|
+
reserveSpace: false,
|
|
516
|
+
rotation: 0
|
|
517
|
+
},
|
|
518
|
+
|
|
519
|
+
// In a grid axis, only allow one unit of certain types, for example
|
|
520
|
+
// we shouln't have one grid cell spanning two days.
|
|
521
|
+
units: [[
|
|
522
|
+
'millisecond', // unit name
|
|
523
|
+
[1, 10, 100]
|
|
524
|
+
], [
|
|
525
|
+
'second',
|
|
526
|
+
[1, 10]
|
|
527
|
+
], [
|
|
528
|
+
'minute',
|
|
529
|
+
[1, 5, 15]
|
|
530
|
+
], [
|
|
531
|
+
'hour',
|
|
532
|
+
[1, 6]
|
|
533
|
+
], [
|
|
534
|
+
'day',
|
|
535
|
+
[1]
|
|
536
|
+
], [
|
|
537
|
+
'week',
|
|
538
|
+
[1]
|
|
539
|
+
], [
|
|
540
|
+
'month',
|
|
541
|
+
[1]
|
|
542
|
+
], [
|
|
543
|
+
'year',
|
|
544
|
+
null
|
|
545
|
+
]]
|
|
546
|
+
}, userOptions);
|
|
547
|
+
|
|
548
|
+
// X-axis specific options
|
|
549
|
+
if (this.coll === 'xAxis') {
|
|
550
|
+
|
|
551
|
+
// For linked axes, tickPixelInterval is used only if the
|
|
552
|
+
// tickPositioner below doesn't run or returns undefined (like
|
|
553
|
+
// multiple years)
|
|
554
|
+
if (
|
|
555
|
+
defined(userOptions.linkedTo) &&
|
|
556
|
+
!defined(userOptions.tickPixelInterval)
|
|
557
|
+
) {
|
|
558
|
+
gridAxisOptions.tickPixelInterval = 350;
|
|
559
|
+
}
|
|
351
560
|
|
|
561
|
+
// For the secondary grid axis, use the primary axis' tick intervals
|
|
562
|
+
// and return ticks one level higher.
|
|
563
|
+
if (
|
|
564
|
+
// Check for tick pixel interval in options
|
|
565
|
+
!defined(userOptions.tickPixelInterval) &&
|
|
566
|
+
|
|
567
|
+
// Only for linked axes
|
|
568
|
+
defined(userOptions.linkedTo) &&
|
|
569
|
+
|
|
570
|
+
!defined(userOptions.tickPositioner) &&
|
|
571
|
+
!defined(userOptions.tickInterval)
|
|
572
|
+
) {
|
|
573
|
+
gridAxisOptions.tickPositioner = function (min, max) {
|
|
574
|
+
|
|
575
|
+
var parentInfo = (
|
|
576
|
+
this.linkedParent &&
|
|
577
|
+
this.linkedParent.tickPositions &&
|
|
578
|
+
this.linkedParent.tickPositions.info
|
|
579
|
+
);
|
|
580
|
+
|
|
581
|
+
if (parentInfo) {
|
|
582
|
+
|
|
583
|
+
var unitIdx,
|
|
584
|
+
count,
|
|
585
|
+
unitName,
|
|
586
|
+
i,
|
|
587
|
+
units = gridAxisOptions.units,
|
|
588
|
+
unitRange;
|
|
589
|
+
|
|
590
|
+
for (i = 0; i < units.length; i++) {
|
|
591
|
+
if (units[i][0] === parentInfo.unitName) {
|
|
592
|
+
unitIdx = i;
|
|
593
|
+
break;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
// Spanning multiple years, go default
|
|
598
|
+
if (!units[unitIdx][1]) {
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
// Get the first allowed count on the next unit.
|
|
603
|
+
if (units[unitIdx + 1]) {
|
|
604
|
+
unitName = units[unitIdx + 1][0];
|
|
605
|
+
count = (units[unitIdx + 1][1] || [1])[0];
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
unitRange = H.timeUnits[unitName];
|
|
609
|
+
this.tickInterval = unitRange * count;
|
|
610
|
+
return this.getTimeTicks(
|
|
611
|
+
{
|
|
612
|
+
unitRange: unitRange,
|
|
613
|
+
count: count,
|
|
614
|
+
unitName: unitName
|
|
615
|
+
},
|
|
616
|
+
min,
|
|
617
|
+
max,
|
|
618
|
+
this.options.startOfWeek
|
|
619
|
+
);
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
}
|
|
352
623
|
|
|
353
|
-
|
|
354
|
-
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
// Now merge the combined options into the axis options
|
|
627
|
+
merge(true, this.options, gridAxisOptions);
|
|
628
|
+
|
|
629
|
+
if (this.horiz) {
|
|
630
|
+
/** _________________________
|
|
631
|
+
* Make this: ___|_____|_____|_____|__|
|
|
632
|
+
* ^ ^
|
|
633
|
+
* _________________________
|
|
634
|
+
* Into this: |_____|_____|_____|_____|
|
|
635
|
+
* ^ ^
|
|
636
|
+
*/
|
|
637
|
+
options.minPadding = pick(userOptions.minPadding, 0);
|
|
638
|
+
options.maxPadding = pick(userOptions.maxPadding, 0);
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
// If borderWidth is set, then use its value for tick and line width.
|
|
642
|
+
if (isNumber(options.grid.borderWidth)) {
|
|
643
|
+
options.tickWidth = options.lineWidth = gridOptions.borderWidth;
|
|
644
|
+
}
|
|
355
645
|
|
|
356
|
-
} else {
|
|
357
|
-
proceed.apply(axis, Array.prototype.slice.call(arguments, 1));
|
|
358
646
|
}
|
|
359
647
|
});
|
|
360
648
|
|
|
361
649
|
/**
|
|
362
|
-
*
|
|
363
|
-
*
|
|
650
|
+
* Ensures a left wall on horizontal axes with series inheriting from column.
|
|
651
|
+
* ColumnSeries normally sets pointRange to null, resulting in Axis to select
|
|
652
|
+
* other values for point ranges. This enforces the above Axis.setOptions()
|
|
653
|
+
* override.
|
|
654
|
+
* _________________________
|
|
655
|
+
* Enforce this: ___|_____|_____|_____|__|
|
|
656
|
+
* ^
|
|
657
|
+
* _________________________
|
|
658
|
+
* To be this: |_____|_____|_____|_____|
|
|
659
|
+
* ^
|
|
364
660
|
*
|
|
365
661
|
* @param {function} proceed - the original function
|
|
662
|
+
* @param {object} options - the pure axis options as input by the user
|
|
366
663
|
*/
|
|
367
|
-
wrap(Axis.prototype, '
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
664
|
+
wrap(Axis.prototype, 'setAxisTranslation', function (proceed) {
|
|
665
|
+
var axis = this,
|
|
666
|
+
options = axis.options,
|
|
667
|
+
gridOptions = (options && isObject(options.grid)) ? options.grid : {},
|
|
668
|
+
tickInfo = this.tickPositions && this.tickPositions.info,
|
|
669
|
+
userLabels = this.userOptions.labels || {};
|
|
670
|
+
|
|
671
|
+
if (this.horiz) {
|
|
672
|
+
if (gridOptions.enabled === true) {
|
|
673
|
+
each(axis.series, function (series) {
|
|
674
|
+
series.options.pointRange = 0;
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
// Lower level time ticks, like hours or minutes, represent points in
|
|
679
|
+
// time and not ranges. These should be aligned left in the grid cell
|
|
680
|
+
// by default. The same applies to years of higher order.
|
|
681
|
+
if (
|
|
682
|
+
tickInfo &&
|
|
683
|
+
(
|
|
684
|
+
options.dateTimeLabelFormats[tickInfo.unitName]
|
|
685
|
+
.range === false ||
|
|
686
|
+
tickInfo.count > 1 // years
|
|
687
|
+
) &&
|
|
688
|
+
!defined(userLabels.align)
|
|
689
|
+
) {
|
|
690
|
+
options.labels.align = 'left';
|
|
691
|
+
|
|
692
|
+
if (!defined(userLabels.x)) {
|
|
693
|
+
options.labels.x = 3;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
371
696
|
}
|
|
372
|
-
|
|
697
|
+
|
|
698
|
+
proceed.apply(axis, argsToArray(arguments));
|
|
373
699
|
});
|
|
374
700
|
|
|
701
|
+
// TODO: Does this function do what the drawing says? Seems to affect ticks and
|
|
702
|
+
// not the labels directly?
|
|
375
703
|
/**
|
|
376
|
-
*
|
|
377
|
-
*
|
|
704
|
+
* Makes tick labels which are usually ignored in a linked axis displayed if
|
|
705
|
+
* they are within range of linkedParent.min.
|
|
706
|
+
* _____________________________
|
|
707
|
+
* | | | | |
|
|
708
|
+
* Make this: | | 2 | 3 | 4 |
|
|
709
|
+
* |___|_______|_______|_______|
|
|
710
|
+
* ^
|
|
711
|
+
* _____________________________
|
|
712
|
+
* | | | | |
|
|
713
|
+
* Into this: | 1 | 2 | 3 | 4 |
|
|
714
|
+
* |___|_______|_______|_______|
|
|
715
|
+
* ^
|
|
378
716
|
* @param {function} proceed - the original function
|
|
379
717
|
*/
|
|
380
|
-
wrap(Axis.prototype, '
|
|
381
|
-
var axis = this
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
718
|
+
wrap(Axis.prototype, 'trimTicks', function (proceed) {
|
|
719
|
+
var axis = this,
|
|
720
|
+
options = axis.options,
|
|
721
|
+
gridOptions = (options && isObject(options.grid)) ? options.grid : {},
|
|
722
|
+
categoryAxis = axis.categories,
|
|
723
|
+
tickPositions = axis.tickPositions,
|
|
724
|
+
firstPos = tickPositions[0],
|
|
725
|
+
lastPos = tickPositions[tickPositions.length - 1],
|
|
726
|
+
linkedMin = axis.linkedParent && axis.linkedParent.min,
|
|
727
|
+
linkedMax = axis.linkedParent && axis.linkedParent.max,
|
|
728
|
+
min = linkedMin || axis.min,
|
|
729
|
+
max = linkedMax || axis.max,
|
|
730
|
+
tickInterval = axis.tickInterval,
|
|
731
|
+
moreThanMin = firstPos > min,
|
|
732
|
+
lessThanMax = lastPos < max,
|
|
733
|
+
endMoreThanMin = firstPos < min && firstPos + tickInterval > min,
|
|
734
|
+
startLessThanMax = lastPos > max && lastPos - tickInterval < max;
|
|
735
|
+
|
|
736
|
+
if (
|
|
737
|
+
gridOptions.enabled === true &&
|
|
738
|
+
!categoryAxis &&
|
|
739
|
+
(axis.horiz || axis.isLinked)
|
|
740
|
+
) {
|
|
741
|
+
if ((moreThanMin || endMoreThanMin) && !options.startOnTick) {
|
|
742
|
+
tickPositions[0] = min;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
if ((lessThanMax || startLessThanMax) && !options.endOnTick) {
|
|
746
|
+
tickPositions[tickPositions.length - 1] = max;
|
|
747
|
+
}
|
|
386
748
|
}
|
|
387
|
-
|
|
749
|
+
|
|
750
|
+
proceed.apply(axis, argsToArray(arguments));
|
|
388
751
|
});
|
|
389
752
|
|
|
390
753
|
/**
|
|
391
|
-
* Draw an extra line on the far side of the
|
|
392
|
-
* creating
|
|
754
|
+
* Draw an extra line on the far side of the outermost axis,
|
|
755
|
+
* creating floor/roof/wall of a grid. And some padding.
|
|
756
|
+
*
|
|
757
|
+
* Make this:
|
|
758
|
+
* (axis.min) __________________________ (axis.max)
|
|
759
|
+
* | | | | |
|
|
760
|
+
* Into this:
|
|
761
|
+
* (axis.min) __________________________ (axis.max)
|
|
762
|
+
* ___|____|____|____|____|__
|
|
393
763
|
*
|
|
394
764
|
* @param {function} proceed - the original function
|
|
395
765
|
*/
|
|
396
766
|
wrap(Axis.prototype, 'render', function (proceed) {
|
|
397
767
|
var axis = this,
|
|
398
768
|
options = axis.options,
|
|
769
|
+
gridOptions = (options && isObject(options.grid)) ? options.grid : {},
|
|
399
770
|
labelPadding,
|
|
400
771
|
distance,
|
|
401
772
|
lineWidth,
|
|
@@ -405,14 +776,21 @@
|
|
|
405
776
|
xStartIndex,
|
|
406
777
|
xEndIndex,
|
|
407
778
|
renderer = axis.chart.renderer,
|
|
779
|
+
horiz = axis.horiz,
|
|
408
780
|
axisGroupBox;
|
|
409
781
|
|
|
410
|
-
if (
|
|
782
|
+
if (gridOptions.enabled === true) {
|
|
783
|
+
// TODO acutual label padding (top, bottom, left, right)
|
|
784
|
+
// Label padding is needed to figure out where to draw the outer line.
|
|
411
785
|
labelPadding = (Math.abs(axis.defaultLeftAxisOptions.labels.x) * 2);
|
|
412
|
-
|
|
786
|
+
axis.maxLabelDimensions = axis.getMaxLabelDimensions(
|
|
787
|
+
axis.ticks,
|
|
788
|
+
axis.tickPositions
|
|
789
|
+
);
|
|
790
|
+
distance = axis.maxLabelDimensions.width + labelPadding;
|
|
413
791
|
lineWidth = options.lineWidth;
|
|
414
792
|
|
|
415
|
-
// Remove right wall before rendering
|
|
793
|
+
// Remove right wall before rendering if updating
|
|
416
794
|
if (axis.rightWall) {
|
|
417
795
|
axis.rightWall.destroy();
|
|
418
796
|
}
|
|
@@ -423,27 +801,17 @@
|
|
|
423
801
|
|
|
424
802
|
axisGroupBox = axis.axisGroup.getBBox();
|
|
425
803
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
])
|
|
436
|
-
.attr({
|
|
437
|
-
stroke: options.tickColor || '#ccd6eb',
|
|
438
|
-
'stroke-width': options.tickWidth || 1,
|
|
439
|
-
zIndex: 7,
|
|
440
|
-
class: 'grid-wall'
|
|
441
|
-
})
|
|
442
|
-
.add(axis.axisGroup);
|
|
443
|
-
}
|
|
444
|
-
|
|
804
|
+
/*
|
|
805
|
+
* Draw an extra axis line on outer axes
|
|
806
|
+
* >
|
|
807
|
+
* Make this: |______|______|______|___
|
|
808
|
+
*
|
|
809
|
+
* > _________________________
|
|
810
|
+
* Into this: |______|______|______|__|
|
|
811
|
+
*
|
|
812
|
+
*/
|
|
445
813
|
if (axis.isOuterAxis() && axis.axisLine) {
|
|
446
|
-
if (
|
|
814
|
+
if (horiz) {
|
|
447
815
|
// -1 to avoid adding distance each time the chart updates
|
|
448
816
|
distance = axisGroupBox.height - 1;
|
|
449
817
|
}
|
|
@@ -461,7 +829,7 @@
|
|
|
461
829
|
}
|
|
462
830
|
|
|
463
831
|
// If axis is horizontal, reposition line path vertically
|
|
464
|
-
if (
|
|
832
|
+
if (horiz) {
|
|
465
833
|
linePath[yStartIndex] = linePath[yStartIndex] + distance;
|
|
466
834
|
linePath[yEndIndex] = linePath[yEndIndex] + distance;
|
|
467
835
|
} else {
|
|
@@ -473,10 +841,13 @@
|
|
|
473
841
|
if (!axis.axisLineExtra) {
|
|
474
842
|
axis.axisLineExtra = renderer.path(linePath)
|
|
475
843
|
.attr({
|
|
844
|
+
|
|
476
845
|
stroke: options.lineColor,
|
|
477
846
|
'stroke-width': lineWidth,
|
|
847
|
+
|
|
478
848
|
zIndex: 7
|
|
479
849
|
})
|
|
850
|
+
.addClass('highcharts-axis-line')
|
|
480
851
|
.add(axis.axisGroup);
|
|
481
852
|
} else {
|
|
482
853
|
axis.axisLineExtra.animate({
|
|
@@ -488,62 +859,130 @@
|
|
|
488
859
|
axis.axisLine[axis.showAxis ? 'show' : 'hide'](true);
|
|
489
860
|
}
|
|
490
861
|
}
|
|
862
|
+
|
|
491
863
|
} else {
|
|
492
864
|
proceed.apply(axis);
|
|
493
865
|
}
|
|
494
866
|
});
|
|
495
867
|
|
|
496
868
|
/**
|
|
497
|
-
* Wraps
|
|
498
|
-
* 1. Prohibit timespans of multitudes of a time unit
|
|
499
|
-
* 2. Draw cell walls on vertical axes
|
|
869
|
+
* Wraps axis init to draw cell walls on vertical axes.
|
|
500
870
|
*
|
|
501
871
|
* @param {function} proceed - the original function
|
|
502
872
|
*/
|
|
503
|
-
wrap(
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
873
|
+
wrap(Axis.prototype, 'init', function (proceed, chart, userOptions) {
|
|
874
|
+
var axis = this,
|
|
875
|
+
gridOptions = (
|
|
876
|
+
(userOptions && isObject(userOptions.grid)) ?
|
|
877
|
+
userOptions.grid :
|
|
878
|
+
{}
|
|
879
|
+
),
|
|
880
|
+
columnOptions,
|
|
881
|
+
column,
|
|
882
|
+
columnIndex,
|
|
883
|
+
i;
|
|
884
|
+
function applyGridOptions(axis) {
|
|
885
|
+
var options = axis.options,
|
|
886
|
+
// TODO: Consider using cell margins defined in % of font size?
|
|
887
|
+
// 25 is optimal height for default fontSize (11px)
|
|
888
|
+
// 25 / 11 ≈ 2.28
|
|
889
|
+
fontSizeToCellHeightRatio = 25 / 11,
|
|
890
|
+
fontSize = options.labels.style.fontSize,
|
|
514
891
|
fontMetrics = axis.chart.renderer.fontMetrics(fontSize);
|
|
515
892
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
893
|
+
// Center-align by default
|
|
894
|
+
if (!options.labels) {
|
|
895
|
+
options.labels = {};
|
|
896
|
+
}
|
|
897
|
+
options.labels.align = pick(options.labels.align, 'center');
|
|
898
|
+
|
|
899
|
+
// TODO: Check against tickLabelPlacement between/on etc
|
|
900
|
+
/**
|
|
901
|
+
* Prevents adding the last tick label if the axis is not a category
|
|
902
|
+
* axis.
|
|
903
|
+
*
|
|
904
|
+
* Since numeric labels are normally placed at starts and ends of a
|
|
905
|
+
* range of value, and this module makes the label point at the value,
|
|
906
|
+
* an "extra" label would appear.
|
|
907
|
+
*/
|
|
908
|
+
if (!axis.categories) {
|
|
909
|
+
options.showLastLabel = false;
|
|
910
|
+
}
|
|
530
911
|
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
if (!options.lineWidth) {
|
|
539
|
-
options.lineWidth = 1;
|
|
540
|
-
}
|
|
541
|
-
}
|
|
912
|
+
/**
|
|
913
|
+
* Make tick marks taller, creating cell walls of a grid.
|
|
914
|
+
* Use cellHeight axis option if set
|
|
915
|
+
*/
|
|
916
|
+
if (axis.horiz) {
|
|
917
|
+
options.tickLength = gridOptions.cellHeight ||
|
|
918
|
+
fontMetrics.h * fontSizeToCellHeightRatio;
|
|
542
919
|
}
|
|
543
|
-
});
|
|
544
920
|
|
|
545
|
-
|
|
546
|
-
|
|
921
|
+
/**
|
|
922
|
+
* Prevents rotation of labels when squished, as rotating them would not
|
|
923
|
+
* help.
|
|
924
|
+
*/
|
|
925
|
+
axis.labelRotation = 0;
|
|
926
|
+
options.labels.rotation = 0;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
if (gridOptions.enabled) {
|
|
930
|
+
if (defined(gridOptions.borderColor)) {
|
|
931
|
+
userOptions.tickColor =
|
|
932
|
+
userOptions.lineColor = gridOptions.borderColor;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
// Handle columns, each column is a grid axis
|
|
936
|
+
if (isArray(gridOptions.columns)) {
|
|
937
|
+
columnIndex = 0;
|
|
938
|
+
i = gridOptions.columns.length;
|
|
939
|
+
while (i--) {
|
|
940
|
+
columnOptions = merge(
|
|
941
|
+
userOptions,
|
|
942
|
+
gridOptions.columns[i],
|
|
943
|
+
{
|
|
944
|
+
// Force to behave like category axis
|
|
945
|
+
type: 'category'
|
|
946
|
+
}
|
|
947
|
+
);
|
|
948
|
+
|
|
949
|
+
delete columnOptions.grid.columns; // Prevent recursion
|
|
950
|
+
|
|
951
|
+
column = new Axis(chart, columnOptions);
|
|
952
|
+
column.isColumn = true;
|
|
953
|
+
column.columnIndex = columnIndex;
|
|
954
|
+
|
|
955
|
+
wrap(column, 'labelFormatter', function (proceed) {
|
|
956
|
+
var axis = this.axis,
|
|
957
|
+
tickPos = axis.tickPositions,
|
|
958
|
+
value = this.value,
|
|
959
|
+
series = axis.series[0],
|
|
960
|
+
isFirst = value === tickPos[0],
|
|
961
|
+
isLast = value === tickPos[tickPos.length - 1],
|
|
962
|
+
point = H.find(series.options.data, function (p) {
|
|
963
|
+
return p[axis.isXAxis ? 'x' : 'y'] === value;
|
|
964
|
+
});
|
|
965
|
+
|
|
966
|
+
// Make additional properties available for the formatter
|
|
967
|
+
this.isFirst = isFirst;
|
|
968
|
+
this.isLast = isLast;
|
|
969
|
+
this.point = point;
|
|
970
|
+
|
|
971
|
+
// Call original labelFormatter
|
|
972
|
+
return proceed.call(this);
|
|
973
|
+
});
|
|
974
|
+
|
|
975
|
+
columnIndex++;
|
|
976
|
+
}
|
|
977
|
+
} else {
|
|
978
|
+
// Call original Axis.init()
|
|
979
|
+
proceed.apply(axis, argsToArray(arguments));
|
|
980
|
+
applyGridOptions(axis);
|
|
981
|
+
}
|
|
982
|
+
} else {
|
|
983
|
+
// Call original Axis.init()
|
|
984
|
+
proceed.apply(axis, argsToArray(arguments));
|
|
985
|
+
}
|
|
547
986
|
});
|
|
548
987
|
|
|
549
988
|
}(Highcharts));
|