highcharts 10.1.0 → 10.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/es-modules/Accessibility/Accessibility.js +2 -3
- package/es-modules/Accessibility/Components/AnnotationsA11y.js +3 -3
- package/es-modules/Accessibility/Components/ContainerComponent.js +3 -1
- package/es-modules/Accessibility/Components/InfoRegionsComponent.js +5 -3
- package/es-modules/Accessibility/Components/LegendComponent.js +3 -3
- package/es-modules/Accessibility/Components/MenuComponent.js +3 -1
- package/es-modules/Accessibility/Components/RangeSelectorComponent.js +3 -1
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +3 -1
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +12 -6
- package/es-modules/Accessibility/Components/ZoomComponent.js +30 -70
- package/es-modules/Accessibility/HighContrastMode.js +1 -1
- package/es-modules/Accessibility/KeyboardNavigation.js +2 -2
- package/es-modules/Accessibility/Options/{Options.js → A11yDefaults.js} +6 -1
- package/es-modules/Accessibility/Options/DeprecatedOptions.js +12 -2
- package/es-modules/Accessibility/Options/{LangOptions.js → LangDefaults.js} +10 -0
- package/es-modules/Accessibility/Utils/ChartUtilities.js +1 -1
- package/es-modules/Core/Animation/Fx.js +1 -1
- package/es-modules/Core/Axis/Axis.js +18 -19
- package/es-modules/Core/Axis/AxisDefaults.js +8 -8
- package/es-modules/Core/Axis/Color/ColorAxis.js +4 -2
- package/es-modules/Core/Axis/Color/ColorAxisDefaults.js +3 -3
- package/es-modules/Core/Axis/DateTimeAxis.js +5 -3
- package/es-modules/Core/Axis/GridAxis.js +817 -821
- package/es-modules/Core/Axis/OrdinalAxis.js +23 -1
- package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +2 -2
- package/es-modules/Core/Axis/Tick.js +20 -16
- package/es-modules/Core/Axis/TreeGridTick.js +2 -2
- package/es-modules/Core/Axis/ZAxis.js +3 -1
- package/es-modules/Core/Chart/Chart.js +13 -12
- package/es-modules/Core/Chart/ChartDefaults.js +3 -3
- package/es-modules/Core/Chart/GanttChart.js +3 -1
- package/es-modules/Core/Chart/MapChart.js +3 -1
- package/es-modules/Core/Chart/StockChart.js +6 -4
- package/es-modules/Core/Color/Color.js +1 -1
- package/es-modules/Core/DefaultOptions.js +11 -11
- package/es-modules/Core/Globals.js +1 -1
- package/es-modules/Core/HttpUtilities.js +39 -37
- package/es-modules/Core/Legend/Legend.js +3 -3
- package/es-modules/Core/MSPointer.js +3 -1
- package/es-modules/Core/Navigator.js +6 -6
- package/es-modules/Core/Pointer.js +1 -1
- package/es-modules/Core/Renderer/HTML/AST.js +1 -1
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +3 -1
- package/es-modules/Core/Renderer/HTML/HTMLRenderer.js +3 -1
- package/es-modules/Core/Renderer/SVG/SVGElement.js +7 -7
- package/es-modules/Core/Renderer/SVG/SVGLabel.js +3 -1
- package/es-modules/Core/Renderer/SVG/SVGRenderer.js +37 -35
- package/es-modules/Core/Renderer/SVG/SVGRenderer3D.js +3 -1
- package/es-modules/Core/ScrollbarDefaults.js +8 -8
- package/es-modules/Core/Series/DataLabel.js +2 -2
- package/es-modules/Core/Series/Point.js +9 -0
- package/es-modules/Core/Series/Series.js +5 -5
- package/es-modules/Core/Series/Series3D.js +3 -1
- package/es-modules/Core/Series/SeriesDefaults.js +3 -3
- package/es-modules/Core/Time.js +6 -7
- package/es-modules/Core/Tooltip.js +3 -3
- package/es-modules/Core/Utilities.js +5 -5
- package/es-modules/Data/DataConverter.js +1 -1
- package/es-modules/Data/DataTable.js +12 -10
- package/es-modules/Data/Modifiers/ChainModifier.js +3 -1
- package/es-modules/Data/Modifiers/GroupModifier.js +3 -1
- package/es-modules/Data/Modifiers/InvertModifier.js +9 -7
- package/es-modules/Data/Modifiers/RangeModifier.js +3 -1
- package/es-modules/Data/Modifiers/SeriesPointsModifier.js +3 -1
- package/es-modules/Data/Modifiers/SortModifier.js +3 -1
- package/es-modules/Data/Parsers/CSVParser.js +3 -1
- package/es-modules/Data/Parsers/DataParser.js +1 -1
- package/es-modules/Data/Parsers/GoogleSheetsParser.js +3 -2
- package/es-modules/Data/Parsers/HTMLTableParser.js +3 -1
- package/es-modules/Data/Stores/CSVStore.js +8 -5
- package/es-modules/Data/Stores/GoogleSheetsStore.js +3 -1
- package/es-modules/Data/Stores/HTMLTableStore.js +3 -1
- package/es-modules/Extensions/Annotations/{Annotations.js → Annotation.js} +21 -9
- package/es-modules/Extensions/Annotations/AnnotationsDefaults.js +0 -0
- package/es-modules/Extensions/Annotations/Controllables/ControllableEllipse.js +5 -2
- package/es-modules/Extensions/Annotations/NavigationBindings.js +8 -5
- package/es-modules/Extensions/Annotations/Popup.js +2 -2
- package/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +13 -9
- package/es-modules/Extensions/Annotations/Types/CrookedLine.js +4 -2
- package/es-modules/Extensions/Annotations/Types/ElliottWave.js +4 -2
- package/es-modules/Extensions/Annotations/Types/Fibonacci.js +5 -3
- package/es-modules/Extensions/Annotations/Types/FibonacciTimeZones.js +4 -2
- package/es-modules/Extensions/Annotations/Types/InfinityLine.js +4 -2
- package/es-modules/Extensions/Annotations/Types/Measure.js +4 -2
- package/es-modules/Extensions/Annotations/Types/Pitchfork.js +4 -2
- package/es-modules/Extensions/Annotations/Types/TimeCycles.js +4 -2
- package/es-modules/Extensions/Annotations/Types/Tunnel.js +5 -2
- package/es-modules/Extensions/Annotations/Types/VerticalLine.js +4 -2
- package/es-modules/Extensions/Boost/BoostAttach.js +5 -1
- package/es-modules/Extensions/Boost/BoostInit.js +3 -2
- package/es-modules/Extensions/BoostCanvas.js +11 -5
- package/es-modules/Extensions/Breadcrumbs.js +31 -6
- package/es-modules/Extensions/CurrentDateIndication.js +1 -1
- package/es-modules/Extensions/Data.js +638 -602
- package/es-modules/Extensions/DownloadURL.js +3 -3
- package/es-modules/Extensions/DragPanes.js +1 -1
- package/es-modules/Extensions/Drilldown.js +2 -2
- package/es-modules/Extensions/ExportData.js +57 -7
- package/es-modules/Extensions/Exporting/Exporting.js +3 -3
- package/es-modules/Extensions/Exporting/ExportingDefaults.js +7 -7
- package/es-modules/Extensions/GeoJSON.js +0 -2
- package/es-modules/Extensions/MarkerClusters.js +3 -3
- package/es-modules/Extensions/NoDataToDisplay.js +1 -1
- package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +1 -1
- package/es-modules/Extensions/Oldie/Oldie.js +2 -2
- package/es-modules/Extensions/Pane.js +3 -3
- package/es-modules/Extensions/ParallelCoordinates.js +1 -1
- package/es-modules/Extensions/PatternFill.js +14 -2
- package/es-modules/Extensions/RangeSelector.js +29 -18
- package/es-modules/Extensions/ScrollablePlotArea.js +3 -3
- package/es-modules/Extensions/{SeriesLabel.js → SeriesLabel/SeriesLabel.js} +262 -384
- package/es-modules/Extensions/SeriesLabel/SeriesLabelDefaults.js +124 -0
- package/es-modules/Extensions/SeriesLabel/SeriesLabelUtilities.js +67 -0
- package/es-modules/Extensions/Sonification/Earcon.js +1 -1
- package/es-modules/Extensions/Stacking.js +1 -1
- package/es-modules/Maps/MapNavigation.js +2 -2
- package/es-modules/Maps/MapView.js +23 -16
- package/es-modules/Maps/MapViewInsetsOptionsDefault.js +1 -1
- package/es-modules/Maps/Projection.js +13 -11
- package/es-modules/Series/ArcDiagram/ArcDiagramPoint.js +3 -1
- package/es-modules/Series/ArcDiagram/ArcDiagramSeries.js +3 -1
- package/es-modules/Series/Area/AreaSeries.js +21 -14
- package/es-modules/Series/AreaRange/AreaRangePoint.js +24 -11
- package/es-modules/Series/AreaRange/AreaRangeSeries.js +154 -147
- package/es-modules/Series/AreaSpline/AreaSplineSeries.js +45 -41
- package/es-modules/Series/AreaSplineRange/AreaSplineRangeSeries.js +43 -43
- package/es-modules/Series/Bar/BarSeries.js +3 -1
- package/es-modules/Series/Bellcurve/BellcurveSeries.js +3 -1
- package/es-modules/Series/BoxPlot/BoxPlotSeries.js +4 -2
- package/es-modules/Series/Bubble/BubbleLegendDefaults.js +1 -1
- package/es-modules/Series/Bubble/BubblePoint.js +3 -1
- package/es-modules/Series/Bubble/BubbleSeries.js +15 -6
- package/es-modules/Series/Bullet/BulletPoint.js +3 -1
- package/es-modules/Series/Bullet/BulletSeries.js +4 -3
- package/es-modules/Series/Candlestick/CandlestickSeries.js +5 -3
- package/es-modules/Series/CenteredUtilities.js +2 -1
- package/es-modules/Series/ColorMapComposition.js +111 -0
- package/es-modules/Series/Column/ColumnSeries.js +6 -4
- package/es-modules/Series/ColumnPyramid/ColumnPyramidSeries.js +3 -1
- package/es-modules/Series/ColumnRange/ColumnRangePoint.js +17 -13
- package/es-modules/Series/ColumnRange/ColumnRangeSeries.js +60 -57
- package/es-modules/Series/Cylinder/CylinderPoint.js +3 -1
- package/es-modules/Series/Cylinder/CylinderSeries.js +3 -1
- package/es-modules/Series/DependencyWheel/DependencyWheelPoint.js +3 -1
- package/es-modules/Series/DependencyWheel/DependencyWheelSeries.js +3 -1
- package/es-modules/Series/DotPlot/DotPlotSeries.js +3 -1
- package/es-modules/Series/DrawPointUtilities.js +87 -0
- package/es-modules/Series/Dumbbell/DumbbellPoint.js +3 -1
- package/es-modules/Series/Dumbbell/DumbbellSeries.js +4 -2
- package/es-modules/Series/ErrorBar/ErrorBarSeries.js +4 -2
- package/es-modules/Series/Flags/FlagsPoint.js +4 -1
- package/es-modules/Series/Flags/FlagsSeries.js +6 -4
- package/es-modules/Series/Funnel/FunnelSeries.js +5 -3
- package/es-modules/Series/Funnel3D/Funnel3DPoint.js +3 -1
- package/es-modules/Series/Funnel3D/Funnel3DSeries.js +3 -1
- package/es-modules/Series/Gantt/GanttPoint.js +3 -1
- package/es-modules/Series/Gantt/GanttSeries.js +3 -1
- package/es-modules/Series/Gauge/GaugePoint.js +3 -1
- package/es-modules/Series/Gauge/GaugeSeries.js +195 -173
- package/es-modules/Series/HLC/HLCPoint.js +3 -1
- package/es-modules/Series/HLC/HLCSeries.js +4 -2
- package/es-modules/Series/Heatmap/HeatmapPoint.js +7 -5
- package/es-modules/Series/Heatmap/HeatmapSeries.js +16 -13
- package/es-modules/Series/HeikinAshi/HeikinAshiPoint.js +3 -1
- package/es-modules/Series/HeikinAshi/HeikinAshiSeries.js +3 -1
- package/es-modules/Series/Histogram/HistogramSeries.js +3 -1
- package/es-modules/Series/HollowCandlestick/HollowCandlestickPoint.js +3 -1
- package/es-modules/Series/HollowCandlestick/HollowCandlestickSeries.js +11 -9
- package/es-modules/Series/Item/ItemPoint.js +3 -1
- package/es-modules/Series/Item/ItemSeries.js +3 -1
- package/es-modules/Series/Line/LineSeries.js +4 -2
- package/es-modules/Series/Lollipop/LollipopPoint.js +3 -1
- package/es-modules/Series/Lollipop/LollipopSeries.js +3 -1
- package/es-modules/Series/Map/MapPoint.js +8 -6
- package/es-modules/Series/Map/MapSeries.js +98 -26
- package/es-modules/Series/MapBubble/MapBubblePoint.js +3 -1
- package/es-modules/Series/MapBubble/MapBubbleSeries.js +3 -1
- package/es-modules/Series/MapLine/MapLineSeries.js +18 -1
- package/es-modules/Series/MapPoint/MapPointPoint.js +4 -2
- package/es-modules/Series/MapPoint/MapPointSeries.js +10 -2
- package/es-modules/Series/Networkgraph/Networkgraph.js +3 -1
- package/es-modules/Series/NodesComposition.js +45 -40
- package/es-modules/Series/OHLC/OHLCPoint.js +3 -1
- package/es-modules/Series/OHLC/OHLCSeries.js +3 -1
- package/es-modules/Series/Organization/OrganizationPoint.js +3 -1
- package/es-modules/Series/Organization/OrganizationSeries.js +5 -3
- package/es-modules/Series/PackedBubble/PackedBubbleComposition.js +0 -2
- package/es-modules/Series/PackedBubble/PackedBubblePoint.js +3 -1
- package/es-modules/Series/PackedBubble/PackedBubbleSeries.js +3 -1
- package/es-modules/Series/ParetoSeries/ParetoSeries.js +3 -1
- package/es-modules/Series/Pie/PieDataLabel.js +1 -1
- package/es-modules/Series/Pie/PiePoint.js +3 -1
- package/es-modules/Series/Pie/PieSeries.js +39 -36
- package/es-modules/Series/Pie3D/Pie3DPoint.js +3 -1
- package/es-modules/Series/Pie3D/Pie3DSeries.js +3 -1
- package/es-modules/Series/PolarComposition.js +819 -0
- package/es-modules/Series/Polygon/PolygonSeries.js +3 -1
- package/es-modules/Series/Pyramid/PyramidSeries.js +3 -1
- package/es-modules/Series/Pyramid3D/Pyramid3DSeries.js +3 -1
- package/es-modules/Series/Sankey/SankeyPoint.js +3 -1
- package/es-modules/Series/Sankey/SankeySeries.js +22 -8
- package/es-modules/Series/Scatter/ScatterSeries.js +10 -5
- package/es-modules/Series/Scatter3D/Scatter3DPoint.js +3 -1
- package/es-modules/Series/Scatter3D/Scatter3DSeries.js +3 -1
- package/es-modules/Series/SeriesOnPointComposition.js +391 -0
- package/es-modules/Series/SolidGauge/SolidGaugeSeries.js +5 -3
- package/es-modules/Series/Spline/SplineSeries.js +13 -4
- package/es-modules/Series/Streamgraph/StreamgraphSeries.js +3 -1
- package/es-modules/Series/Sunburst/SunburstPoint.js +3 -3
- package/es-modules/Series/Sunburst/SunburstSeries.js +7 -2
- package/es-modules/Series/Tilemap/TilemapPoint.js +3 -1
- package/es-modules/Series/Tilemap/TilemapSeries.js +3 -1
- package/es-modules/Series/Timeline/TimelinePoint.js +3 -1
- package/es-modules/Series/Timeline/TimelineSeries.js +6 -4
- package/es-modules/Series/Treemap/TreemapPoint.js +8 -4
- package/es-modules/Series/Treemap/TreemapSeries.js +9 -7
- package/es-modules/Series/VariablePie/VariablePieSeries.js +3 -1
- package/es-modules/Series/Variwide/VariwidePoint.js +3 -1
- package/es-modules/Series/Variwide/VariwideSeries.js +3 -1
- package/es-modules/Series/Vector/VectorSeries.js +3 -1
- package/es-modules/Series/Venn/VennPoint.js +5 -5
- package/es-modules/Series/Venn/VennSeries.js +9 -6
- package/es-modules/Series/Waterfall/WaterfallPoint.js +3 -1
- package/es-modules/Series/Waterfall/WaterfallSeries.js +14 -12
- package/es-modules/Series/Windbarb/WindbarbPoint.js +3 -1
- package/es-modules/Series/Windbarb/WindbarbSeries.js +3 -1
- package/es-modules/Series/Wordcloud/WordcloudPoint.js +6 -6
- package/es-modules/Series/Wordcloud/WordcloudSeries.js +7 -4
- package/es-modules/Series/XRange/XRangePoint.js +3 -1
- package/es-modules/Series/XRange/XRangeSeries.js +3 -1
- package/es-modules/Stock/Indicators/ABands/ABandsIndicator.js +3 -1
- package/es-modules/Stock/Indicators/AD/ADIndicator.js +3 -1
- package/es-modules/Stock/Indicators/AO/AOIndicator.js +5 -3
- package/es-modules/Stock/Indicators/APO/APOIndicator.js +3 -1
- package/es-modules/Stock/Indicators/ATR/ATRIndicator.js +3 -1
- package/es-modules/Stock/Indicators/Aroon/AroonIndicator.js +3 -1
- package/es-modules/Stock/Indicators/AroonOscillator/AroonOscillatorIndicator.js +3 -1
- package/es-modules/Stock/Indicators/BB/BBIndicator.js +6 -4
- package/es-modules/Stock/Indicators/CCI/CCIIndicator.js +3 -1
- package/es-modules/Stock/Indicators/CMF/CMFIndicator.js +3 -1
- package/es-modules/Stock/Indicators/CMO/CMOIndicator.js +3 -1
- package/es-modules/Stock/Indicators/Chaikin/ChaikinIndicator.js +3 -1
- package/es-modules/Stock/Indicators/DEMA/DEMAIndicator.js +3 -1
- package/es-modules/Stock/Indicators/DMI/DMIIndicator.js +13 -7
- package/es-modules/Stock/Indicators/DPO/DPOIndicator.js +3 -1
- package/es-modules/Stock/Indicators/DisparityIndex/DisparityIndexIndicator.js +3 -1
- package/es-modules/Stock/Indicators/EMA/EMAIndicator.js +3 -1
- package/es-modules/Stock/Indicators/IKH/IKHIndicator.js +3 -1
- package/es-modules/Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js +3 -1
- package/es-modules/Stock/Indicators/Klinger/KlingerIndicator.js +3 -1
- package/es-modules/Stock/Indicators/LinearRegression/LinearRegression.js +3 -1
- package/es-modules/Stock/Indicators/LinearRegressionAngle/LinearRegressionAngle.js +3 -1
- package/es-modules/Stock/Indicators/LinearRegressionIntercept/LinearRegressionIntercept.js +3 -1
- package/es-modules/Stock/Indicators/LinearRegressionSlopes/LinearRegressionSlopes.js +3 -1
- package/es-modules/Stock/Indicators/MACD/MACDIndicator.js +26 -13
- package/es-modules/Stock/Indicators/MFI/MFIIndicator.js +3 -1
- package/es-modules/Stock/Indicators/Momentum/MomentumIndicator.js +3 -1
- package/es-modules/Stock/Indicators/MultipleLinesComposition.js +85 -95
- package/es-modules/Stock/Indicators/NATR/NATRIndicator.js +3 -1
- package/es-modules/Stock/Indicators/OBV/OBVIndicator.js +3 -1
- package/es-modules/Stock/Indicators/PC/PCIndicator.js +3 -1
- package/es-modules/Stock/Indicators/PPO/PPOIndicator.js +3 -1
- package/es-modules/Stock/Indicators/PSAR/PSARIndicator.js +3 -1
- package/es-modules/Stock/Indicators/PivotPoints/PivotPointsIndicator.js +3 -1
- package/es-modules/Stock/Indicators/PivotPoints/PivotPointsPoint.js +3 -1
- package/es-modules/Stock/Indicators/PriceEnvelopes/PriceEnvelopesIndicator.js +3 -1
- package/es-modules/Stock/Indicators/ROC/ROCIndicator.js +3 -1
- package/es-modules/Stock/Indicators/RSI/RSIIndicator.js +3 -1
- package/es-modules/Stock/Indicators/SMA/SMAIndicator.js +3 -1
- package/es-modules/Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js +3 -1
- package/es-modules/Stock/Indicators/Stochastic/StochasticIndicator.js +3 -1
- package/es-modules/Stock/Indicators/Supertrend/SupertrendIndicator.js +6 -4
- package/es-modules/Stock/Indicators/TEMA/TEMAIndicator.js +3 -1
- package/es-modules/Stock/Indicators/TRIX/TRIXIndicator.js +3 -1
- package/es-modules/Stock/Indicators/TrendLine/TrendLineIndicator.js +3 -1
- package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +3 -1
- package/es-modules/Stock/Indicators/VBP/VBPPoint.js +3 -1
- package/es-modules/Stock/Indicators/VWAP/VWAPIndicator.js +3 -1
- package/es-modules/Stock/Indicators/WMA/WMAIndicator.js +3 -1
- package/es-modules/Stock/Indicators/WilliamsR/WilliamsRIndicator.js +3 -1
- package/es-modules/Stock/Indicators/Zigzag/ZigzagIndicator.js +3 -1
- package/es-modules/Stock/StockToolsBindings.js +20 -19
- package/es-modules/Stock/StockToolsGui.js +1 -1
- package/es-modules/masters/highcharts-3d.src.js +1 -1
- package/es-modules/masters/highcharts-gantt.src.js +1 -1
- package/es-modules/masters/highcharts-more.src.js +4 -4
- package/es-modules/masters/highcharts.src.js +1 -1
- package/es-modules/masters/highmaps.src.js +1 -1
- package/es-modules/masters/highstock.src.js +1 -1
- package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
- package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
- package/es-modules/masters/indicators/ao.src.js +1 -1
- package/es-modules/masters/indicators/apo.src.js +1 -1
- package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
- package/es-modules/masters/indicators/aroon.src.js +1 -1
- package/es-modules/masters/indicators/atr.src.js +1 -1
- package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
- package/es-modules/masters/indicators/cci.src.js +1 -1
- package/es-modules/masters/indicators/chaikin.src.js +1 -1
- package/es-modules/masters/indicators/cmf.src.js +1 -1
- package/es-modules/masters/indicators/cmo.src.js +1 -1
- package/es-modules/masters/indicators/dema.src.js +1 -1
- package/es-modules/masters/indicators/disparity-index.src.js +1 -1
- package/es-modules/masters/indicators/dmi.src.js +1 -1
- package/es-modules/masters/indicators/dpo.src.js +1 -1
- package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/es-modules/masters/indicators/indicators-all.src.js +1 -1
- package/es-modules/masters/indicators/indicators.src.js +1 -1
- package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
- package/es-modules/masters/indicators/klinger.src.js +1 -1
- package/es-modules/masters/indicators/macd.src.js +1 -1
- package/es-modules/masters/indicators/mfi.src.js +1 -1
- package/es-modules/masters/indicators/momentum.src.js +1 -1
- package/es-modules/masters/indicators/natr.src.js +1 -1
- package/es-modules/masters/indicators/obv.src.js +1 -1
- package/es-modules/masters/indicators/pivot-points.src.js +1 -1
- package/es-modules/masters/indicators/ppo.src.js +1 -1
- package/es-modules/masters/indicators/price-channel.src.js +1 -1
- package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
- package/es-modules/masters/indicators/psar.src.js +1 -1
- package/es-modules/masters/indicators/regressions.src.js +1 -1
- package/es-modules/masters/indicators/roc.src.js +1 -1
- package/es-modules/masters/indicators/rsi.src.js +1 -1
- package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
- package/es-modules/masters/indicators/stochastic.src.js +1 -1
- package/es-modules/masters/indicators/supertrend.src.js +1 -1
- package/es-modules/masters/indicators/tema.src.js +1 -1
- package/es-modules/masters/indicators/trendline.src.js +1 -1
- package/es-modules/masters/indicators/trix.src.js +1 -1
- package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
- package/es-modules/masters/indicators/vwap.src.js +1 -1
- package/es-modules/masters/indicators/williams-r.src.js +1 -1
- package/es-modules/masters/indicators/wma.src.js +1 -1
- package/es-modules/masters/indicators/zigzag.src.js +1 -1
- package/es-modules/masters/modules/accessibility.src.js +1 -1
- package/es-modules/masters/modules/annotations-advanced.src.js +2 -2
- package/es-modules/masters/modules/annotations.src.js +2 -2
- package/es-modules/masters/modules/arc-diagram.src.js +1 -1
- package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
- package/es-modules/masters/modules/boost-canvas.src.js +1 -1
- package/es-modules/masters/modules/boost.src.js +1 -1
- package/es-modules/masters/modules/broken-axis.src.js +1 -1
- package/es-modules/masters/modules/bullet.src.js +1 -1
- package/es-modules/masters/modules/coloraxis.src.js +1 -1
- package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
- package/es-modules/masters/modules/cylinder.src.js +1 -1
- package/es-modules/masters/modules/data.src.js +2 -1
- package/es-modules/masters/modules/datagrouping.src.js +1 -1
- package/es-modules/masters/modules/debugger.src.js +1 -1
- package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
- package/es-modules/masters/modules/dotplot.src.js +1 -1
- package/es-modules/masters/modules/drag-panes.src.js +1 -1
- package/es-modules/masters/modules/draggable-points.src.js +1 -1
- package/es-modules/masters/modules/drilldown.src.js +1 -1
- package/es-modules/masters/modules/dumbbell.src.js +1 -1
- 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/full-screen.src.js +1 -1
- package/es-modules/masters/modules/funnel.src.js +1 -1
- package/es-modules/masters/modules/funnel3d.src.js +1 -1
- package/es-modules/masters/modules/gantt.src.js +1 -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/heikinashi.src.js +1 -1
- package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
- package/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
- package/es-modules/masters/modules/item-series.src.js +1 -1
- package/es-modules/masters/modules/lollipop.src.js +1 -1
- package/es-modules/masters/modules/map.src.js +1 -1
- package/es-modules/masters/modules/marker-clusters.src.js +1 -1
- package/es-modules/masters/modules/networkgraph.src.js +1 -1
- package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
- package/es-modules/masters/modules/offline-exporting.src.js +1 -1
- package/es-modules/masters/modules/oldie-polyfills.src.js +1 -1
- package/es-modules/masters/modules/oldie.src.js +1 -1
- package/es-modules/masters/modules/organization.src.js +1 -1
- package/es-modules/masters/modules/overlapping-datalabels.src.js +1 -1
- package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
- package/es-modules/masters/modules/pareto.src.js +1 -1
- package/es-modules/masters/modules/pathfinder.src.js +1 -1
- package/es-modules/masters/modules/pattern-fill.src.js +1 -1
- package/es-modules/masters/modules/price-indicator.src.js +1 -1
- package/es-modules/masters/modules/pyramid3d.src.js +1 -1
- package/es-modules/masters/modules/sankey.src.js +1 -1
- package/es-modules/masters/modules/series-label.src.js +5 -2
- package/es-modules/masters/modules/series-on-point.src.js +16 -0
- package/es-modules/masters/modules/solid-gauge.src.js +1 -1
- package/es-modules/masters/modules/sonification.src.js +2 -6
- package/es-modules/masters/modules/static-scale.src.js +1 -1
- package/es-modules/masters/modules/stock-tools.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/sunburst.src.js +1 -1
- package/es-modules/masters/modules/tilemap.src.js +1 -1
- package/es-modules/masters/modules/timeline.src.js +1 -1
- package/es-modules/masters/modules/treegrid.src.js +1 -1
- package/es-modules/masters/modules/treemap.src.js +1 -1
- package/es-modules/masters/modules/variable-pie.src.js +1 -1
- 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/venn.src.js +1 -1
- package/es-modules/masters/modules/windbarb.src.js +1 -1
- package/es-modules/masters/modules/wordcloud.src.js +1 -1
- package/es-modules/masters/modules/xrange.src.js +1 -1
- package/es-modules/masters/themes/avocado.src.js +1 -1
- package/es-modules/masters/themes/brand-dark.src.js +1 -1
- package/es-modules/masters/themes/brand-light.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/high-contrast-dark.src.js +1 -1
- package/es-modules/masters/themes/high-contrast-light.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/masters/themes/sunset.src.js +1 -1
- package/highcharts-3d.js +1 -1
- package/highcharts-3d.src.js +1 -1
- package/highcharts-gantt.js +811 -809
- package/highcharts-gantt.js.map +1 -1
- package/highcharts-gantt.src.js +1271 -1213
- package/highcharts-more.d.ts +10 -0
- package/highcharts-more.js +194 -195
- package/highcharts-more.js.map +1 -1
- package/highcharts-more.src.d.ts +10 -0
- package/highcharts-more.src.js +5649 -5515
- package/highcharts.d.ts +9118 -429
- package/highcharts.js +595 -594
- package/highcharts.js.map +1 -1
- package/highcharts.src.d.ts +9118 -429
- package/highcharts.src.js +335 -285
- package/highmaps.js +763 -760
- package/highmaps.js.map +1 -1
- package/highmaps.src.js +640 -448
- package/highstock.js +797 -794
- package/highstock.js.map +1 -1
- package/highstock.src.js +414 -327
- package/indicators/acceleration-bands.d.ts +1 -17
- package/indicators/acceleration-bands.js +11 -12
- package/indicators/acceleration-bands.js.map +1 -1
- package/indicators/acceleration-bands.src.d.ts +1 -17
- package/indicators/acceleration-bands.src.js +89 -99
- package/indicators/accumulation-distribution.js +1 -1
- package/indicators/accumulation-distribution.src.js +1 -1
- package/indicators/ao.js +1 -1
- package/indicators/ao.src.js +3 -3
- package/indicators/apo.js +1 -1
- package/indicators/apo.src.js +1 -1
- package/indicators/aroon-oscillator.d.ts +1 -17
- package/indicators/aroon-oscillator.js +10 -10
- package/indicators/aroon-oscillator.js.map +1 -1
- package/indicators/aroon-oscillator.src.d.ts +1 -17
- package/indicators/aroon-oscillator.src.js +89 -99
- package/indicators/aroon.d.ts +1 -17
- package/indicators/aroon.js +11 -11
- package/indicators/aroon.js.map +1 -1
- package/indicators/aroon.src.d.ts +1 -17
- package/indicators/aroon.src.js +89 -99
- package/indicators/atr.js +1 -1
- package/indicators/atr.src.js +1 -1
- package/indicators/bollinger-bands.d.ts +1 -17
- package/indicators/bollinger-bands.js +11 -12
- package/indicators/bollinger-bands.js.map +1 -1
- package/indicators/bollinger-bands.src.d.ts +1 -17
- package/indicators/bollinger-bands.src.js +92 -102
- package/indicators/cci.js +1 -1
- package/indicators/cci.src.js +1 -1
- package/indicators/chaikin.js +1 -1
- package/indicators/chaikin.src.js +1 -1
- package/indicators/cmf.js +1 -1
- package/indicators/cmf.src.js +1 -1
- package/indicators/cmo.js +1 -1
- package/indicators/cmo.src.js +1 -1
- package/indicators/dema.js +1 -1
- package/indicators/dema.src.js +1 -1
- package/indicators/disparity-index.js +1 -1
- package/indicators/disparity-index.src.js +1 -1
- package/indicators/dmi.js +12 -12
- package/indicators/dmi.js.map +1 -1
- package/indicators/dmi.src.js +99 -105
- package/indicators/dpo.js +1 -1
- package/indicators/dpo.src.js +1 -1
- package/indicators/ichimoku-kinko-hyo.js +1 -1
- package/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/indicators/indicators-all.d.ts +1 -17
- package/indicators/indicators-all.js +195 -194
- package/indicators/indicators-all.js.map +1 -1
- package/indicators/indicators-all.src.d.ts +1 -17
- package/indicators/indicators-all.src.js +131 -125
- package/indicators/indicators.js +1 -1
- package/indicators/indicators.src.js +1 -1
- package/indicators/keltner-channels.d.ts +1 -17
- package/indicators/keltner-channels.js +11 -12
- package/indicators/keltner-channels.js.map +1 -1
- package/indicators/keltner-channels.src.d.ts +1 -17
- package/indicators/keltner-channels.src.js +89 -99
- package/indicators/klinger.js +14 -14
- package/indicators/klinger.js.map +1 -1
- package/indicators/klinger.src.js +89 -99
- package/indicators/macd.js +10 -9
- package/indicators/macd.js.map +1 -1
- package/indicators/macd.src.js +25 -13
- package/indicators/mfi.js +1 -1
- package/indicators/mfi.src.js +1 -1
- package/indicators/momentum.js +1 -1
- package/indicators/momentum.src.js +1 -1
- package/indicators/natr.js +1 -1
- package/indicators/natr.src.js +1 -1
- package/indicators/obv.js +1 -1
- package/indicators/obv.src.js +1 -1
- package/indicators/pivot-points.js +1 -1
- package/indicators/pivot-points.src.js +1 -1
- package/indicators/ppo.js +1 -1
- package/indicators/ppo.src.js +1 -1
- package/indicators/price-channel.d.ts +1 -17
- package/indicators/price-channel.js +11 -11
- package/indicators/price-channel.js.map +1 -1
- package/indicators/price-channel.src.d.ts +1 -17
- package/indicators/price-channel.src.js +89 -99
- 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/regressions.js +1 -1
- package/indicators/regressions.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/slow-stochastic.js +1 -1
- package/indicators/slow-stochastic.src.js +1 -1
- package/indicators/stochastic.d.ts +1 -17
- package/indicators/stochastic.js +12 -12
- package/indicators/stochastic.js.map +1 -1
- package/indicators/stochastic.src.d.ts +1 -17
- package/indicators/stochastic.src.js +89 -99
- package/indicators/supertrend.js +1 -1
- package/indicators/supertrend.src.js +4 -4
- package/indicators/tema.js +1 -1
- package/indicators/tema.src.js +1 -1
- package/indicators/trendline.js +1 -1
- package/indicators/trendline.src.js +1 -1
- package/indicators/trix.js +1 -1
- package/indicators/trix.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/williams-r.js +1 -1
- package/indicators/williams-r.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/modules/accessibility.js +230 -229
- package/modules/accessibility.js.map +1 -1
- package/modules/accessibility.src.js +110 -115
- package/modules/annotations-advanced.js +187 -187
- package/modules/annotations-advanced.js.map +1 -1
- package/modules/annotations-advanced.src.js +62 -39
- package/modules/annotations.js +61 -61
- package/modules/annotations.js.map +1 -1
- package/modules/annotations.src.js +38 -20
- package/modules/arc-diagram.js +1 -1
- package/modules/arc-diagram.src.js +1 -1
- package/modules/arrow-symbols.js +1 -1
- package/modules/arrow-symbols.src.js +1 -1
- package/modules/boost-canvas.js +12 -11
- package/modules/boost-canvas.js.map +1 -1
- package/modules/boost-canvas.src.js +12 -6
- package/modules/boost.js +81 -80
- package/modules/boost.js.map +1 -1
- package/modules/boost.src.js +20 -9
- package/modules/broken-axis.js +1 -1
- package/modules/broken-axis.src.js +1 -1
- package/modules/bullet.js +1 -1
- package/modules/bullet.js.map +1 -1
- package/modules/bullet.src.js +2 -5
- package/modules/coloraxis.js +2 -2
- package/modules/coloraxis.js.map +1 -1
- package/modules/coloraxis.src.js +5 -5
- package/modules/current-date-indicator.js +1 -1
- package/modules/current-date-indicator.src.js +2 -2
- package/modules/cylinder.js +1 -1
- package/modules/cylinder.src.js +1 -1
- package/modules/data.d.ts +12 -12
- package/modules/data.js +33 -34
- package/modules/data.js.map +1 -1
- package/modules/data.src.d.ts +12 -12
- package/modules/data.src.js +862 -829
- package/modules/datagrouping.js +1 -1
- package/modules/datagrouping.src.js +1 -1
- package/modules/debugger.js +1 -1
- package/modules/debugger.src.js +1 -1
- package/modules/dependency-wheel.js +1 -1
- package/modules/dependency-wheel.src.js +1 -1
- package/modules/dotplot.js +1 -1
- package/modules/dotplot.src.js +1 -1
- package/modules/drag-panes.js +1 -1
- package/modules/drag-panes.src.js +2 -2
- package/modules/draggable-points.js +1 -1
- package/modules/draggable-points.src.js +1 -1
- package/modules/drilldown.js +37 -36
- package/modules/drilldown.js.map +1 -1
- package/modules/drilldown.src.js +40 -9
- package/modules/dumbbell.d.ts +4 -0
- package/modules/dumbbell.js +17 -17
- package/modules/dumbbell.js.map +1 -1
- package/modules/dumbbell.src.d.ts +4 -0
- package/modules/dumbbell.src.js +24 -12
- package/modules/export-data.js +24 -22
- package/modules/export-data.js.map +1 -1
- package/modules/export-data.src.js +76 -11
- package/modules/exporting.d.ts +8 -8
- package/modules/exporting.js +36 -36
- package/modules/exporting.js.map +1 -1
- package/modules/exporting.src.d.ts +8 -8
- package/modules/exporting.src.js +50 -50
- package/modules/full-screen.js +1 -1
- package/modules/full-screen.src.js +1 -1
- package/modules/funnel.js +1 -1
- package/modules/funnel.src.js +3 -3
- package/modules/funnel3d.js +1 -1
- package/modules/funnel3d.src.js +1 -1
- package/modules/gantt.js +218 -218
- package/modules/gantt.js.map +1 -1
- package/modules/gantt.src.js +935 -927
- package/modules/grid-axis.js +23 -23
- package/modules/grid-axis.js.map +1 -1
- package/modules/grid-axis.src.js +886 -890
- package/modules/heatmap.js +40 -40
- package/modules/heatmap.js.map +1 -1
- package/modules/heatmap.src.js +115 -87
- package/modules/heikinashi.js +1 -1
- package/modules/heikinashi.src.js +1 -1
- package/modules/histogram-bellcurve.js +1 -1
- package/modules/histogram-bellcurve.src.js +1 -1
- package/modules/hollowcandlestick.js +1 -1
- package/modules/hollowcandlestick.src.js +9 -9
- package/modules/item-series.js +1 -1
- package/modules/item-series.src.js +1 -1
- package/modules/lollipop.js +1 -1
- package/modules/lollipop.src.js +1 -1
- package/modules/map.js +171 -169
- package/modules/map.js.map +1 -1
- package/modules/map.src.js +306 -164
- package/modules/marker-clusters.js +1 -1
- package/modules/marker-clusters.js.map +1 -1
- package/modules/marker-clusters.src.js +2 -6
- package/modules/networkgraph.d.ts +1 -17
- package/modules/networkgraph.js +49 -49
- package/modules/networkgraph.js.map +1 -1
- package/modules/networkgraph.src.d.ts +1 -17
- package/modules/networkgraph.src.js +55 -45
- package/modules/no-data-to-display.js +1 -1
- package/modules/no-data-to-display.src.js +2 -2
- package/modules/offline-exporting.js +3 -3
- package/modules/offline-exporting.js.map +1 -1
- package/modules/offline-exporting.src.js +5 -5
- package/modules/oldie-polyfills.js +1 -1
- package/modules/oldie-polyfills.src.js +1 -1
- package/modules/oldie.js +2 -2
- package/modules/oldie.src.js +3 -3
- package/modules/organization.js +1 -1
- package/modules/organization.src.js +3 -3
- package/modules/overlapping-datalabels.js +1 -1
- package/modules/overlapping-datalabels.src.js +1 -1
- package/modules/parallel-coordinates.js +2 -2
- package/modules/parallel-coordinates.js.map +1 -1
- package/modules/parallel-coordinates.src.js +2 -2
- package/modules/pareto.js +1 -1
- package/modules/pareto.src.js +1 -1
- package/modules/pathfinder.js +1 -1
- package/modules/pathfinder.src.js +1 -1
- package/modules/pattern-fill.js +15 -14
- package/modules/pattern-fill.js.map +1 -1
- package/modules/pattern-fill.src.js +15 -2
- package/modules/price-indicator.js +1 -1
- package/modules/price-indicator.src.js +1 -1
- package/modules/pyramid3d.js +1 -1
- package/modules/pyramid3d.src.js +1 -1
- package/modules/sankey.d.ts +1 -17
- package/modules/sankey.js +32 -32
- package/modules/sankey.js.map +1 -1
- package/modules/sankey.src.d.ts +1 -17
- package/modules/sankey.src.js +86 -55
- package/modules/series-label.js +18 -18
- package/modules/series-label.js.map +1 -1
- package/modules/series-label.src.js +472 -385
- package/modules/series-on-point.js +18 -0
- package/modules/series-on-point.js.map +1 -0
- package/modules/series-on-point.src.js +464 -0
- package/modules/solid-gauge.js +4 -4
- package/modules/solid-gauge.js.map +1 -1
- package/modules/solid-gauge.src.js +5 -5
- package/modules/sonification.js +1 -1
- package/modules/sonification.js.map +1 -1
- package/modules/sonification.src.js +3 -7
- package/modules/static-scale.js +1 -1
- package/modules/static-scale.src.js +1 -1
- package/modules/stock-tools.js +142 -142
- package/modules/stock-tools.js.map +1 -1
- package/modules/stock-tools.src.js +57 -38
- package/modules/stock.js +205 -204
- package/modules/stock.js.map +1 -1
- package/modules/stock.src.js +80 -43
- package/modules/streamgraph.js +1 -1
- package/modules/streamgraph.src.js +1 -1
- package/modules/sunburst.js +73 -73
- package/modules/sunburst.js.map +1 -1
- package/modules/sunburst.src.js +211 -177
- package/modules/tilemap.js +1 -1
- package/modules/tilemap.src.js +1 -1
- package/modules/timeline.js +1 -1
- package/modules/timeline.src.js +4 -4
- package/modules/treegrid.js +56 -56
- package/modules/treegrid.js.map +1 -1
- package/modules/treegrid.src.js +888 -892
- package/modules/treemap.js +54 -53
- package/modules/treemap.js.map +1 -1
- package/modules/treemap.src.js +208 -176
- package/modules/variable-pie.js +1 -1
- package/modules/variable-pie.src.js +1 -1
- package/modules/variwide.js +1 -1
- package/modules/variwide.src.js +1 -1
- package/modules/vector.js +1 -1
- package/modules/vector.src.js +1 -1
- package/modules/venn.js +31 -31
- package/modules/venn.js.map +1 -1
- package/modules/venn.src.js +78 -107
- package/modules/windbarb.js +1 -1
- package/modules/windbarb.src.js +1 -1
- package/modules/wordcloud.js +23 -24
- package/modules/wordcloud.js.map +1 -1
- package/modules/wordcloud.src.js +78 -107
- package/modules/xrange.js +1 -1
- package/modules/xrange.src.js +1 -1
- package/package.json +1 -1
- package/themes/avocado.js +1 -1
- package/themes/avocado.src.js +1 -1
- package/themes/brand-dark.js +1 -1
- package/themes/brand-dark.src.js +1 -1
- package/themes/brand-light.js +1 -1
- package/themes/brand-light.src.js +1 -1
- package/themes/dark-blue.js +1 -1
- package/themes/dark-blue.src.js +1 -1
- package/themes/dark-green.js +1 -1
- package/themes/dark-green.src.js +1 -1
- package/themes/dark-unica.js +1 -1
- package/themes/dark-unica.src.js +1 -1
- package/themes/gray.js +1 -1
- package/themes/gray.src.js +1 -1
- package/themes/grid-light.js +1 -1
- package/themes/grid-light.src.js +1 -1
- package/themes/grid.js +1 -1
- package/themes/grid.src.js +1 -1
- package/themes/high-contrast-dark.js +1 -1
- package/themes/high-contrast-dark.src.js +1 -1
- package/themes/high-contrast-light.js +1 -1
- package/themes/high-contrast-light.src.js +1 -1
- package/themes/sand-signika.js +1 -1
- package/themes/sand-signika.src.js +1 -1
- package/themes/skies.js +1 -1
- package/themes/skies.src.js +1 -1
- package/themes/sunset.js +1 -1
- package/themes/sunset.src.js +1 -1
- package/es-modules/Extensions/Polar.js +0 -743
- package/es-modules/Series/ColorMapMixin.js +0 -84
- package/es-modules/Series/DrawPointComposition.js +0 -114
package/modules/gantt.src.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Highcharts Gantt JS v10.
|
|
2
|
+
* @license Highcharts Gantt JS v10.2.0 (2022-07-05)
|
|
3
3
|
*
|
|
4
4
|
* Gantt series
|
|
5
5
|
*
|
|
@@ -1724,19 +1724,49 @@
|
|
|
1724
1724
|
pick = U.pick,
|
|
1725
1725
|
timeUnits = U.timeUnits,
|
|
1726
1726
|
wrap = U.wrap;
|
|
1727
|
+
/* *
|
|
1728
|
+
*
|
|
1729
|
+
* Enums
|
|
1730
|
+
*
|
|
1731
|
+
* */
|
|
1732
|
+
/**
|
|
1733
|
+
* Enum for which side the axis is on. Maps to axis.side.
|
|
1734
|
+
* @private
|
|
1735
|
+
*/
|
|
1736
|
+
var GridAxisSide;
|
|
1737
|
+
(function (GridAxisSide) {
|
|
1738
|
+
GridAxisSide[GridAxisSide["top"] = 0] = "top";
|
|
1739
|
+
GridAxisSide[GridAxisSide["right"] = 1] = "right";
|
|
1740
|
+
GridAxisSide[GridAxisSide["bottom"] = 2] = "bottom";
|
|
1741
|
+
GridAxisSide[GridAxisSide["left"] = 3] = "left";
|
|
1742
|
+
})(GridAxisSide || (GridAxisSide = {}));
|
|
1743
|
+
/* *
|
|
1744
|
+
*
|
|
1745
|
+
* Constants
|
|
1746
|
+
*
|
|
1747
|
+
* */
|
|
1748
|
+
var composedClasses = [];
|
|
1727
1749
|
/* *
|
|
1728
1750
|
*
|
|
1729
1751
|
* Functions
|
|
1730
1752
|
*
|
|
1731
1753
|
* */
|
|
1732
|
-
|
|
1754
|
+
/**
|
|
1755
|
+
* @private
|
|
1756
|
+
*/
|
|
1733
1757
|
function argsToArray(args) {
|
|
1734
1758
|
return Array.prototype.slice.call(args, 1);
|
|
1735
1759
|
}
|
|
1760
|
+
/**
|
|
1761
|
+
* @private
|
|
1762
|
+
*/
|
|
1736
1763
|
function isObject(x) {
|
|
1737
1764
|
// Always use strict mode
|
|
1738
1765
|
return U.isObject(x, true);
|
|
1739
1766
|
}
|
|
1767
|
+
/**
|
|
1768
|
+
* @private
|
|
1769
|
+
*/
|
|
1740
1770
|
function applyGridOptions(axis) {
|
|
1741
1771
|
var options = axis.options;
|
|
1742
1772
|
// Center-align by default
|
|
@@ -1761,962 +1791,925 @@
|
|
|
1761
1791
|
options.labels.rotation = 0;
|
|
1762
1792
|
}
|
|
1763
1793
|
/**
|
|
1764
|
-
*
|
|
1794
|
+
* Extends axis class with grid support.
|
|
1765
1795
|
* @private
|
|
1766
1796
|
*/
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
*
|
|
1789
|
-
* */
|
|
1790
|
-
/* eslint-disable valid-jsdoc */
|
|
1791
|
-
/**
|
|
1792
|
-
* Extends axis class with grid support.
|
|
1793
|
-
* @private
|
|
1794
|
-
*/
|
|
1795
|
-
function compose(AxisClass, ChartClass, TickClass) {
|
|
1796
|
-
if (AxisClass.keepProps.indexOf('grid') === -1) {
|
|
1797
|
-
AxisClass.keepProps.push('grid');
|
|
1798
|
-
AxisClass.prototype.getMaxLabelDimensions = getMaxLabelDimensions;
|
|
1799
|
-
wrap(AxisClass.prototype, 'unsquish', wrapUnsquish);
|
|
1800
|
-
// Add event handlers
|
|
1801
|
-
addEvent(AxisClass, 'init', onInit);
|
|
1802
|
-
addEvent(AxisClass, 'afterGetOffset', onAfterGetOffset);
|
|
1803
|
-
addEvent(AxisClass, 'afterGetTitlePosition', onAfterGetTitlePosition);
|
|
1804
|
-
addEvent(AxisClass, 'afterInit', onAfterInit);
|
|
1805
|
-
addEvent(AxisClass, 'afterRender', onAfterRender);
|
|
1806
|
-
addEvent(AxisClass, 'afterSetAxisTranslation', onAfterSetAxisTranslation);
|
|
1807
|
-
addEvent(AxisClass, 'afterSetOptions', onAfterSetOptions);
|
|
1808
|
-
addEvent(AxisClass, 'afterSetOptions', onAfterSetOptions2);
|
|
1809
|
-
addEvent(AxisClass, 'afterSetScale', onAfterSetScale);
|
|
1810
|
-
addEvent(AxisClass, 'afterTickSize', onAfterTickSize);
|
|
1811
|
-
addEvent(AxisClass, 'trimTicks', onTrimTicks);
|
|
1812
|
-
addEvent(AxisClass, 'destroy', onDestroy);
|
|
1813
|
-
}
|
|
1797
|
+
function compose(AxisClass, ChartClass, TickClass) {
|
|
1798
|
+
if (composedClasses.indexOf(AxisClass) === -1) {
|
|
1799
|
+
composedClasses.push(AxisClass);
|
|
1800
|
+
AxisClass.keepProps.push('grid');
|
|
1801
|
+
AxisClass.prototype.getMaxLabelDimensions = getMaxLabelDimensions;
|
|
1802
|
+
wrap(AxisClass.prototype, 'unsquish', wrapUnsquish);
|
|
1803
|
+
// Add event handlers
|
|
1804
|
+
addEvent(AxisClass, 'init', onInit);
|
|
1805
|
+
addEvent(AxisClass, 'afterGetOffset', onAfterGetOffset);
|
|
1806
|
+
addEvent(AxisClass, 'afterGetTitlePosition', onAfterGetTitlePosition);
|
|
1807
|
+
addEvent(AxisClass, 'afterInit', onAfterInit);
|
|
1808
|
+
addEvent(AxisClass, 'afterRender', onAfterRender);
|
|
1809
|
+
addEvent(AxisClass, 'afterSetAxisTranslation', onAfterSetAxisTranslation);
|
|
1810
|
+
addEvent(AxisClass, 'afterSetOptions', onAfterSetOptions);
|
|
1811
|
+
addEvent(AxisClass, 'afterSetOptions', onAfterSetOptions2);
|
|
1812
|
+
addEvent(AxisClass, 'afterSetScale', onAfterSetScale);
|
|
1813
|
+
addEvent(AxisClass, 'afterTickSize', onAfterTickSize);
|
|
1814
|
+
addEvent(AxisClass, 'trimTicks', onTrimTicks);
|
|
1815
|
+
addEvent(AxisClass, 'destroy', onDestroy);
|
|
1816
|
+
}
|
|
1817
|
+
if (composedClasses.indexOf(ChartClass) === -1) {
|
|
1814
1818
|
addEvent(ChartClass, 'afterSetChartSize', onChartAfterSetChartSize);
|
|
1819
|
+
}
|
|
1820
|
+
if (composedClasses.indexOf(TickClass) === -1) {
|
|
1815
1821
|
addEvent(TickClass, 'afterGetLabelPosition', onTickAfterGetLabelPosition);
|
|
1816
1822
|
addEvent(TickClass, 'labelFormat', onTickLabelFormat);
|
|
1817
|
-
return AxisClass;
|
|
1818
1823
|
}
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
// Update the result if width and/or height are larger
|
|
1864
|
-
dimensions.height = Math.max(labelHeight, dimensions.height);
|
|
1865
|
-
dimensions.width = Math.max(labelWidth, dimensions.width);
|
|
1824
|
+
return AxisClass;
|
|
1825
|
+
}
|
|
1826
|
+
/**
|
|
1827
|
+
* Get the largest label width and height.
|
|
1828
|
+
*
|
|
1829
|
+
* @private
|
|
1830
|
+
* @function Highcharts.Axis#getMaxLabelDimensions
|
|
1831
|
+
*
|
|
1832
|
+
* @param {Highcharts.Dictionary<Highcharts.Tick>} ticks
|
|
1833
|
+
* All the ticks on one axis.
|
|
1834
|
+
*
|
|
1835
|
+
* @param {Array<number|string>} tickPositions
|
|
1836
|
+
* All the tick positions on one axis.
|
|
1837
|
+
*
|
|
1838
|
+
* @return {Highcharts.SizeObject}
|
|
1839
|
+
* Object containing the properties height and width.
|
|
1840
|
+
*
|
|
1841
|
+
* @todo Move this to the generic axis implementation, as it is used there.
|
|
1842
|
+
*/
|
|
1843
|
+
function getMaxLabelDimensions(ticks, tickPositions) {
|
|
1844
|
+
var dimensions = {
|
|
1845
|
+
width: 0,
|
|
1846
|
+
height: 0
|
|
1847
|
+
};
|
|
1848
|
+
tickPositions.forEach(function (pos) {
|
|
1849
|
+
var tick = ticks[pos];
|
|
1850
|
+
var labelHeight = 0,
|
|
1851
|
+
labelWidth = 0,
|
|
1852
|
+
label;
|
|
1853
|
+
if (isObject(tick)) {
|
|
1854
|
+
label = isObject(tick.label) ? tick.label : {};
|
|
1855
|
+
// Find width and height of label
|
|
1856
|
+
labelHeight = label.getBBox ? label.getBBox().height : 0;
|
|
1857
|
+
if (label.textStr && !isNumber(label.textPxLength)) {
|
|
1858
|
+
label.textPxLength = label.getBBox().width;
|
|
1859
|
+
}
|
|
1860
|
+
labelWidth = isNumber(label.textPxLength) ?
|
|
1861
|
+
// Math.round ensures crisp lines
|
|
1862
|
+
Math.round(label.textPxLength) :
|
|
1863
|
+
0;
|
|
1864
|
+
if (label.textStr) {
|
|
1865
|
+
// Set the tickWidth same as the label width after ellipsis
|
|
1866
|
+
// applied #10281
|
|
1867
|
+
labelWidth = Math.round(label.getBBox().width);
|
|
1866
1868
|
}
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1869
|
+
// Update the result if width and/or height are larger
|
|
1870
|
+
dimensions.height = Math.max(labelHeight, dimensions.height);
|
|
1871
|
+
dimensions.width = Math.max(labelWidth, dimensions.width);
|
|
1872
|
+
}
|
|
1873
|
+
});
|
|
1874
|
+
// For tree grid, add indentation
|
|
1875
|
+
if (this.options.type === 'treegrid' &&
|
|
1876
|
+
this.treeGrid &&
|
|
1877
|
+
this.treeGrid.mapOfPosToGridNode) {
|
|
1878
|
+
var treeDepth = this.treeGrid.mapOfPosToGridNode[-1].height || 0;
|
|
1879
|
+
dimensions.width += (this.options.labels.indentation *
|
|
1880
|
+
(treeDepth - 1));
|
|
1877
1881
|
}
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1882
|
+
return dimensions;
|
|
1883
|
+
}
|
|
1884
|
+
/**
|
|
1885
|
+
* Handle columns and getOffset.
|
|
1886
|
+
* @private
|
|
1887
|
+
*/
|
|
1888
|
+
function onAfterGetOffset() {
|
|
1889
|
+
var grid = this.grid;
|
|
1890
|
+
(grid && grid.columns || []).forEach(function (column) {
|
|
1891
|
+
column.getOffset();
|
|
1892
|
+
});
|
|
1893
|
+
}
|
|
1894
|
+
/**
|
|
1895
|
+
* @private
|
|
1896
|
+
*/
|
|
1897
|
+
function onAfterGetTitlePosition(e) {
|
|
1898
|
+
var axis = this;
|
|
1899
|
+
var options = axis.options;
|
|
1900
|
+
var gridOptions = options.grid || {};
|
|
1901
|
+
if (gridOptions.enabled === true) {
|
|
1902
|
+
// compute anchor points for each of the title align options
|
|
1903
|
+
var axisTitle = axis.axisTitle,
|
|
1904
|
+
axisHeight = axis.height,
|
|
1905
|
+
horiz = axis.horiz,
|
|
1906
|
+
axisLeft = axis.left,
|
|
1907
|
+
offset = axis.offset,
|
|
1908
|
+
opposite = axis.opposite,
|
|
1909
|
+
options_1 = axis.options,
|
|
1910
|
+
axisTop = axis.top,
|
|
1911
|
+
axisWidth = axis.width;
|
|
1912
|
+
var tickSize = axis.tickSize();
|
|
1913
|
+
var titleWidth = axisTitle && axisTitle.getBBox().width;
|
|
1914
|
+
var xOption = options_1.title.x;
|
|
1915
|
+
var yOption = options_1.title.y;
|
|
1916
|
+
var titleMargin = pick(options_1.title.margin,
|
|
1917
|
+
horiz ? 5 : 10);
|
|
1918
|
+
var titleFontSize = axis.chart.renderer.fontMetrics(options_1.title.style.fontSize,
|
|
1919
|
+
axisTitle).f;
|
|
1920
|
+
var crispCorr = tickSize ? tickSize[0] / 2 : 0;
|
|
1921
|
+
// TODO account for alignment
|
|
1922
|
+
// the position in the perpendicular direction of the axis
|
|
1923
|
+
var offAxis = ((horiz ? axisTop + axisHeight : axisLeft) +
|
|
1924
|
+
(horiz ? 1 : -1) * // horizontal axis reverses the margin
|
|
1925
|
+
(opposite ? -1 : 1) * // so does opposite axes
|
|
1926
|
+
crispCorr +
|
|
1927
|
+
(axis.side === GridAxisSide.bottom ? titleFontSize : 0));
|
|
1928
|
+
e.titlePosition.x = horiz ?
|
|
1929
|
+
axisLeft - (titleWidth || 0) / 2 - titleMargin + xOption :
|
|
1930
|
+
offAxis + (opposite ? axisWidth : 0) + offset + xOption;
|
|
1931
|
+
e.titlePosition.y = horiz ?
|
|
1932
|
+
(offAxis -
|
|
1933
|
+
(opposite ? axisHeight : 0) +
|
|
1934
|
+
(opposite ? titleFontSize : -titleFontSize) / 2 +
|
|
1935
|
+
offset +
|
|
1936
|
+
yOption) :
|
|
1937
|
+
axisTop - titleMargin + yOption;
|
|
1887
1938
|
}
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
axisLeft = axis.left,
|
|
1901
|
-
offset = axis.offset,
|
|
1902
|
-
opposite = axis.opposite,
|
|
1903
|
-
options_1 = axis.options,
|
|
1904
|
-
axisTop = axis.top,
|
|
1905
|
-
axisWidth = axis.width;
|
|
1906
|
-
var tickSize = axis.tickSize();
|
|
1907
|
-
var titleWidth = axisTitle && axisTitle.getBBox().width;
|
|
1908
|
-
var xOption = options_1.title.x;
|
|
1909
|
-
var yOption = options_1.title.y;
|
|
1910
|
-
var titleMargin = pick(options_1.title.margin,
|
|
1911
|
-
horiz ? 5 : 10);
|
|
1912
|
-
var titleFontSize = axis.chart.renderer.fontMetrics(options_1.title.style.fontSize,
|
|
1913
|
-
axisTitle).f;
|
|
1914
|
-
var crispCorr = tickSize ? tickSize[0] / 2 : 0;
|
|
1915
|
-
// TODO account for alignment
|
|
1916
|
-
// the position in the perpendicular direction of the axis
|
|
1917
|
-
var offAxis = ((horiz ? axisTop + axisHeight : axisLeft) +
|
|
1918
|
-
(horiz ? 1 : -1) * // horizontal axis reverses the margin
|
|
1919
|
-
(opposite ? -1 : 1) * // so does opposite axes
|
|
1920
|
-
crispCorr +
|
|
1921
|
-
(axis.side === GridAxis.Side.bottom ? titleFontSize : 0));
|
|
1922
|
-
e.titlePosition.x = horiz ?
|
|
1923
|
-
axisLeft - (titleWidth || 0) / 2 - titleMargin + xOption :
|
|
1924
|
-
offAxis + (opposite ? axisWidth : 0) + offset + xOption;
|
|
1925
|
-
e.titlePosition.y = horiz ?
|
|
1926
|
-
(offAxis -
|
|
1927
|
-
(opposite ? axisHeight : 0) +
|
|
1928
|
-
(opposite ? titleFontSize : -titleFontSize) / 2 +
|
|
1929
|
-
offset +
|
|
1930
|
-
yOption) :
|
|
1931
|
-
axisTop - titleMargin + yOption;
|
|
1932
|
-
}
|
|
1939
|
+
}
|
|
1940
|
+
/**
|
|
1941
|
+
* @private
|
|
1942
|
+
*/
|
|
1943
|
+
function onAfterInit() {
|
|
1944
|
+
var axis = this;
|
|
1945
|
+
var chart = axis.chart,
|
|
1946
|
+
_a = axis.options.grid,
|
|
1947
|
+
gridOptions = _a === void 0 ? {} : _a,
|
|
1948
|
+
userOptions = axis.userOptions;
|
|
1949
|
+
if (gridOptions.enabled) {
|
|
1950
|
+
applyGridOptions(axis);
|
|
1933
1951
|
}
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
}
|
|
1960
|
-
});
|
|
1961
|
-
delete columnOptions.grid.columns; // Prevent recursion
|
|
1962
|
-
var column = new Axis(axis.chart,
|
|
1963
|
-
columnOptions);
|
|
1964
|
-
column.grid.isColumn = true;
|
|
1965
|
-
column.grid.columnIndex = columnIndex;
|
|
1966
|
-
// Remove column axis from chart axes array, and place it
|
|
1967
|
-
// in the columns array.
|
|
1968
|
-
erase(chart.axes, column);
|
|
1969
|
-
erase(chart[axis.coll], column);
|
|
1970
|
-
columns.push(column);
|
|
1971
|
-
}
|
|
1952
|
+
if (gridOptions.columns) {
|
|
1953
|
+
var columns = axis.grid.columns = [];
|
|
1954
|
+
var columnIndex = axis.grid.columnIndex = 0;
|
|
1955
|
+
// Handle columns, each column is a grid axis
|
|
1956
|
+
while (++columnIndex < gridOptions.columns.length) {
|
|
1957
|
+
var columnOptions = merge(userOptions,
|
|
1958
|
+
gridOptions.columns[gridOptions.columns.length - columnIndex - 1], {
|
|
1959
|
+
linkedTo: 0,
|
|
1960
|
+
// Force to behave like category axis
|
|
1961
|
+
type: 'category',
|
|
1962
|
+
// Disable by default the scrollbar on the grid axis
|
|
1963
|
+
scrollbar: {
|
|
1964
|
+
enabled: false
|
|
1965
|
+
}
|
|
1966
|
+
});
|
|
1967
|
+
delete columnOptions.grid.columns; // Prevent recursion
|
|
1968
|
+
var column = new Axis(axis.chart,
|
|
1969
|
+
columnOptions);
|
|
1970
|
+
column.grid.isColumn = true;
|
|
1971
|
+
column.grid.columnIndex = columnIndex;
|
|
1972
|
+
// Remove column axis from chart axes array, and place it
|
|
1973
|
+
// in the columns array.
|
|
1974
|
+
erase(chart.axes, column);
|
|
1975
|
+
erase(chart[axis.coll], column);
|
|
1976
|
+
columns.push(column);
|
|
1972
1977
|
}
|
|
1973
1978
|
}
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
1979
|
+
}
|
|
1980
|
+
/**
|
|
1981
|
+
* Draw an extra line on the far side of the outermost axis,
|
|
1982
|
+
* creating floor/roof/wall of a grid. And some padding.
|
|
1983
|
+
* ```
|
|
1984
|
+
* Make this:
|
|
1985
|
+
* (axis.min) __________________________ (axis.max)
|
|
1986
|
+
* | | | | |
|
|
1987
|
+
* Into this:
|
|
1988
|
+
* (axis.min) __________________________ (axis.max)
|
|
1989
|
+
* ___|____|____|____|____|__
|
|
1990
|
+
* ```
|
|
1991
|
+
* @private
|
|
1992
|
+
*/
|
|
1993
|
+
function onAfterRender() {
|
|
1994
|
+
var axis = this,
|
|
1995
|
+
grid = axis.grid,
|
|
1996
|
+
options = axis.options,
|
|
1997
|
+
gridOptions = options.grid || {};
|
|
1998
|
+
if (gridOptions.enabled === true) {
|
|
1999
|
+
var min = axis.min || 0,
|
|
2000
|
+
max = axis.max || 0;
|
|
2001
|
+
// @todo acutual label padding (top, bottom, left, right)
|
|
2002
|
+
axis.maxLabelDimensions = axis.getMaxLabelDimensions(axis.ticks, axis.tickPositions);
|
|
2003
|
+
// Remove right wall before rendering if updating
|
|
2004
|
+
if (axis.rightWall) {
|
|
2005
|
+
axis.rightWall.destroy();
|
|
2006
|
+
}
|
|
2007
|
+
/*
|
|
2008
|
+
Draw an extra axis line on outer axes
|
|
2009
|
+
>
|
|
2010
|
+
Make this: |______|______|______|___
|
|
2005
2011
|
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
}
|
|
2026
|
-
else {
|
|
2027
|
-
startPoint[1] += distance;
|
|
2028
|
-
endPoint[1] += distance;
|
|
2029
|
-
}
|
|
2012
|
+
> _________________________
|
|
2013
|
+
Into this: |______|______|______|__|
|
|
2014
|
+
*/
|
|
2015
|
+
if (axis.grid && axis.grid.isOuterAxis() && axis.axisLine) {
|
|
2016
|
+
var lineWidth = options.lineWidth;
|
|
2017
|
+
if (lineWidth) {
|
|
2018
|
+
var linePath = axis.getLinePath(lineWidth),
|
|
2019
|
+
startPoint = linePath[0],
|
|
2020
|
+
endPoint = linePath[1],
|
|
2021
|
+
// Negate distance if top or left axis
|
|
2022
|
+
// Subtract 1px to draw the line at the end of the tick
|
|
2023
|
+
tickLength = (axis.tickSize('tick') || [1])[0],
|
|
2024
|
+
distance = (tickLength - 1) * ((axis.side === GridAxisSide.top ||
|
|
2025
|
+
axis.side === GridAxisSide.left) ? -1 : 1);
|
|
2026
|
+
// If axis is horizontal, reposition line path vertically
|
|
2027
|
+
if (startPoint[0] === 'M' && endPoint[0] === 'L') {
|
|
2028
|
+
if (axis.horiz) {
|
|
2029
|
+
startPoint[2] += distance;
|
|
2030
|
+
endPoint[2] += distance;
|
|
2030
2031
|
}
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
var upperBorderStartPoint = startPoint,
|
|
2035
|
-
upperBorderEndPoint = [
|
|
2036
|
-
'L',
|
|
2037
|
-
axis.left,
|
|
2038
|
-
startPoint[2] || 0
|
|
2039
|
-
],
|
|
2040
|
-
upperBorderPath = [
|
|
2041
|
-
upperBorderStartPoint,
|
|
2042
|
-
upperBorderEndPoint
|
|
2043
|
-
],
|
|
2044
|
-
lowerBorderEndPoint = [
|
|
2045
|
-
'L',
|
|
2046
|
-
axis.chart.chartWidth - axis.chart.marginRight,
|
|
2047
|
-
axis.toPixels(max + axis.tickmarkOffset)
|
|
2048
|
-
],
|
|
2049
|
-
lowerBorderStartPoint = [
|
|
2050
|
-
'M',
|
|
2051
|
-
endPoint[1] || 0,
|
|
2052
|
-
axis.toPixels(max + axis.tickmarkOffset)
|
|
2053
|
-
],
|
|
2054
|
-
lowerBorderPath = [
|
|
2055
|
-
lowerBorderStartPoint,
|
|
2056
|
-
lowerBorderEndPoint
|
|
2057
|
-
];
|
|
2058
|
-
if (!axis.grid.upperBorder && min % 1 !== 0) {
|
|
2059
|
-
axis.grid.upperBorder = axis.grid.renderBorder(upperBorderPath);
|
|
2060
|
-
}
|
|
2061
|
-
if (axis.grid.upperBorder) {
|
|
2062
|
-
axis.grid.upperBorder.attr({
|
|
2063
|
-
stroke: options.lineColor,
|
|
2064
|
-
'stroke-width': options.lineWidth
|
|
2065
|
-
});
|
|
2066
|
-
axis.grid.upperBorder.animate({
|
|
2067
|
-
d: upperBorderPath
|
|
2068
|
-
});
|
|
2069
|
-
}
|
|
2070
|
-
if (!axis.grid.lowerBorder && max % 1 !== 0) {
|
|
2071
|
-
axis.grid.lowerBorder = axis.grid.renderBorder(lowerBorderPath);
|
|
2072
|
-
}
|
|
2073
|
-
if (axis.grid.lowerBorder) {
|
|
2074
|
-
axis.grid.lowerBorder.attr({
|
|
2075
|
-
stroke: options.lineColor,
|
|
2076
|
-
'stroke-width': options.lineWidth
|
|
2077
|
-
});
|
|
2078
|
-
axis.grid.lowerBorder.animate({
|
|
2079
|
-
d: lowerBorderPath
|
|
2080
|
-
});
|
|
2081
|
-
}
|
|
2032
|
+
else {
|
|
2033
|
+
startPoint[1] += distance;
|
|
2034
|
+
endPoint[1] += distance;
|
|
2082
2035
|
}
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2036
|
+
}
|
|
2037
|
+
// If it doesn't exist, add an upper and lower border
|
|
2038
|
+
// for the vertical grid axis.
|
|
2039
|
+
if (!axis.horiz && axis.chart.marginRight) {
|
|
2040
|
+
var upperBorderStartPoint = startPoint,
|
|
2041
|
+
upperBorderEndPoint = [
|
|
2042
|
+
'L',
|
|
2043
|
+
axis.left,
|
|
2044
|
+
startPoint[2] || 0
|
|
2045
|
+
],
|
|
2046
|
+
upperBorderPath = [
|
|
2047
|
+
upperBorderStartPoint,
|
|
2048
|
+
upperBorderEndPoint
|
|
2049
|
+
],
|
|
2050
|
+
lowerBorderEndPoint = [
|
|
2051
|
+
'L',
|
|
2052
|
+
axis.chart.chartWidth - axis.chart.marginRight,
|
|
2053
|
+
axis.toPixels(max + axis.tickmarkOffset)
|
|
2054
|
+
],
|
|
2055
|
+
lowerBorderStartPoint = [
|
|
2056
|
+
'M',
|
|
2057
|
+
endPoint[1] || 0,
|
|
2058
|
+
axis.toPixels(max + axis.tickmarkOffset)
|
|
2059
|
+
],
|
|
2060
|
+
lowerBorderPath = [
|
|
2061
|
+
lowerBorderStartPoint,
|
|
2062
|
+
lowerBorderEndPoint
|
|
2063
|
+
];
|
|
2064
|
+
if (!axis.grid.upperBorder && min % 1 !== 0) {
|
|
2065
|
+
axis.grid.upperBorder = axis.grid.renderBorder(upperBorderPath);
|
|
2087
2066
|
}
|
|
2088
|
-
|
|
2089
|
-
axis.grid.
|
|
2067
|
+
if (axis.grid.upperBorder) {
|
|
2068
|
+
axis.grid.upperBorder.attr({
|
|
2069
|
+
stroke: options.lineColor,
|
|
2070
|
+
'stroke-width': options.lineWidth
|
|
2071
|
+
});
|
|
2072
|
+
axis.grid.upperBorder.animate({
|
|
2073
|
+
d: upperBorderPath
|
|
2074
|
+
});
|
|
2075
|
+
}
|
|
2076
|
+
if (!axis.grid.lowerBorder && max % 1 !== 0) {
|
|
2077
|
+
axis.grid.lowerBorder = axis.grid.renderBorder(lowerBorderPath);
|
|
2078
|
+
}
|
|
2079
|
+
if (axis.grid.lowerBorder) {
|
|
2080
|
+
axis.grid.lowerBorder.attr({
|
|
2090
2081
|
stroke: options.lineColor,
|
|
2091
2082
|
'stroke-width': options.lineWidth
|
|
2092
2083
|
});
|
|
2093
|
-
axis.grid.
|
|
2094
|
-
d:
|
|
2084
|
+
axis.grid.lowerBorder.animate({
|
|
2085
|
+
d: lowerBorderPath
|
|
2095
2086
|
});
|
|
2096
2087
|
}
|
|
2097
|
-
// show or hide the line depending on options.showEmpty
|
|
2098
|
-
axis.axisLine[axis.showAxis ? 'show' : 'hide']();
|
|
2099
2088
|
}
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
var label = void 0,
|
|
2114
|
-
tickMark = void 0;
|
|
2115
|
-
while ((label = axis.hiddenLabels.pop()) && label.element) {
|
|
2116
|
-
label.show(); // #15453
|
|
2089
|
+
// Render an extra line parallel to the existing axes, to
|
|
2090
|
+
// close the grid.
|
|
2091
|
+
if (!axis.grid.axisLineExtra) {
|
|
2092
|
+
axis.grid.axisLineExtra = axis.grid.renderBorder(linePath);
|
|
2093
|
+
}
|
|
2094
|
+
else {
|
|
2095
|
+
axis.grid.axisLineExtra.attr({
|
|
2096
|
+
stroke: options.lineColor,
|
|
2097
|
+
'stroke-width': options.lineWidth
|
|
2098
|
+
});
|
|
2099
|
+
axis.grid.axisLineExtra.animate({
|
|
2100
|
+
d: linePath
|
|
2101
|
+
});
|
|
2117
2102
|
}
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2103
|
+
// show or hide the line depending on options.showEmpty
|
|
2104
|
+
axis.axisLine[axis.showAxis ? 'show' : 'hide']();
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
(grid && grid.columns || []).forEach(function (column) { return column.render(); });
|
|
2108
|
+
// Manipulate the tick mark visibility
|
|
2109
|
+
// based on the axis.max- allows smooth scrolling.
|
|
2110
|
+
if (!axis.horiz &&
|
|
2111
|
+
axis.chart.hasRendered &&
|
|
2112
|
+
(axis.scrollbar ||
|
|
2113
|
+
(axis.linkedParent && axis.linkedParent.scrollbar))) {
|
|
2114
|
+
var tickmarkOffset = axis.tickmarkOffset,
|
|
2115
|
+
lastTick = axis.tickPositions[axis.tickPositions.length - 1],
|
|
2116
|
+
firstTick = axis.tickPositions[0];
|
|
2117
|
+
var label = void 0,
|
|
2118
|
+
tickMark = void 0;
|
|
2119
|
+
while ((label = axis.hiddenLabels.pop()) && label.element) {
|
|
2120
|
+
label.show(); // #15453
|
|
2121
|
+
}
|
|
2122
|
+
while ((tickMark = axis.hiddenMarks.pop()) &&
|
|
2123
|
+
tickMark.element) {
|
|
2124
|
+
tickMark.show(); // #16439
|
|
2125
|
+
}
|
|
2126
|
+
// Hide/show firts tick label.
|
|
2127
|
+
label = axis.ticks[firstTick].label;
|
|
2128
|
+
if (label) {
|
|
2129
|
+
if (min - firstTick > tickmarkOffset) {
|
|
2130
|
+
axis.hiddenLabels.push(label.hide());
|
|
2121
2131
|
}
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
if (label) {
|
|
2125
|
-
if (min - firstTick > tickmarkOffset) {
|
|
2126
|
-
axis.hiddenLabels.push(label.hide());
|
|
2127
|
-
}
|
|
2128
|
-
else {
|
|
2129
|
-
label.show();
|
|
2130
|
-
}
|
|
2132
|
+
else {
|
|
2133
|
+
label.show();
|
|
2131
2134
|
}
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
else {
|
|
2139
|
-
label.show();
|
|
2140
|
-
}
|
|
2135
|
+
}
|
|
2136
|
+
// Hide/show last tick mark/label.
|
|
2137
|
+
label = axis.ticks[lastTick].label;
|
|
2138
|
+
if (label) {
|
|
2139
|
+
if (lastTick - max > tickmarkOffset) {
|
|
2140
|
+
axis.hiddenLabels.push(label.hide());
|
|
2141
2141
|
}
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
lastTick - max < tickmarkOffset &&
|
|
2145
|
-
lastTick - max > 0 && axis.ticks[lastTick].isLast) {
|
|
2146
|
-
axis.hiddenMarks.push(mark.hide());
|
|
2142
|
+
else {
|
|
2143
|
+
label.show();
|
|
2147
2144
|
}
|
|
2148
2145
|
}
|
|
2146
|
+
var mark = axis.ticks[lastTick].mark;
|
|
2147
|
+
if (mark &&
|
|
2148
|
+
lastTick - max < tickmarkOffset &&
|
|
2149
|
+
lastTick - max > 0 && axis.ticks[lastTick].isLast) {
|
|
2150
|
+
axis.hiddenMarks.push(mark.hide());
|
|
2151
|
+
}
|
|
2149
2152
|
}
|
|
2150
2153
|
}
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2154
|
+
}
|
|
2155
|
+
/**
|
|
2156
|
+
* @private
|
|
2157
|
+
*/
|
|
2158
|
+
function onAfterSetAxisTranslation() {
|
|
2159
|
+
var axis = this;
|
|
2160
|
+
var tickInfo = axis.tickPositions && axis.tickPositions.info;
|
|
2161
|
+
var options = axis.options;
|
|
2162
|
+
var gridOptions = options.grid || {};
|
|
2163
|
+
var userLabels = axis.userOptions.labels || {};
|
|
2164
|
+
// Fire this only for the Gantt type chart, #14868.
|
|
2165
|
+
if (gridOptions.enabled) {
|
|
2166
|
+
if (axis.horiz) {
|
|
2167
|
+
axis.series.forEach(function (series) {
|
|
2168
|
+
series.options.pointRange = 0;
|
|
2169
|
+
});
|
|
2170
|
+
// Lower level time ticks, like hours or minutes, represent
|
|
2171
|
+
// points in time and not ranges. These should be aligned
|
|
2172
|
+
// left in the grid cell by default. The same applies to
|
|
2173
|
+
// years of higher order.
|
|
2174
|
+
if (tickInfo &&
|
|
2175
|
+
options.dateTimeLabelFormats &&
|
|
2176
|
+
options.labels &&
|
|
2177
|
+
!defined(userLabels.align) &&
|
|
2178
|
+
(options.dateTimeLabelFormats[tickInfo.unitName]
|
|
2179
|
+
.range === false ||
|
|
2180
|
+
tickInfo.count > 1 // years
|
|
2181
|
+
)) {
|
|
2182
|
+
options.labels.align = 'left';
|
|
2183
|
+
if (!defined(userLabels.x)) {
|
|
2184
|
+
options.labels.x = 3;
|
|
2182
2185
|
}
|
|
2183
2186
|
}
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2187
|
+
}
|
|
2188
|
+
else {
|
|
2189
|
+
// Don't trim ticks which not in min/max range but
|
|
2190
|
+
// they are still in the min/max plus tickInterval.
|
|
2191
|
+
if (this.options.type !== 'treegrid' &&
|
|
2192
|
+
axis.grid &&
|
|
2193
|
+
axis.grid.columns) {
|
|
2194
|
+
this.minPointOffset = this.tickInterval;
|
|
2192
2195
|
}
|
|
2193
2196
|
}
|
|
2194
2197
|
}
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
day: {
|
|
2218
|
-
list: ['%A, %e. %B', '%a, %e. %b', '%E']
|
|
2219
|
-
},
|
|
2220
|
-
week: {
|
|
2221
|
-
list: ['Week %W', 'W%W']
|
|
2222
|
-
},
|
|
2223
|
-
month: {
|
|
2224
|
-
list: ['%B', '%b', '%o']
|
|
2225
|
-
}
|
|
2226
|
-
},
|
|
2227
|
-
grid: {
|
|
2228
|
-
borderWidth: 1
|
|
2198
|
+
}
|
|
2199
|
+
/**
|
|
2200
|
+
* Creates a left and right wall on horizontal axes:
|
|
2201
|
+
* - Places leftmost tick at the start of the axis, to create a left
|
|
2202
|
+
* wall
|
|
2203
|
+
* - Ensures that the rightmost tick is at the end of the axis, to
|
|
2204
|
+
* create a right wall.
|
|
2205
|
+
* @private
|
|
2206
|
+
*/
|
|
2207
|
+
function onAfterSetOptions(e) {
|
|
2208
|
+
var options = this.options,
|
|
2209
|
+
userOptions = e.userOptions,
|
|
2210
|
+
gridOptions = ((options && isObject(options.grid)) ? options.grid : {});
|
|
2211
|
+
var gridAxisOptions;
|
|
2212
|
+
if (gridOptions.enabled === true) {
|
|
2213
|
+
// Merge the user options into default grid axis options so
|
|
2214
|
+
// that when a user option is set, it takes presedence.
|
|
2215
|
+
gridAxisOptions = merge(true, {
|
|
2216
|
+
className: ('highcharts-grid-axis ' + (userOptions.className || '')),
|
|
2217
|
+
dateTimeLabelFormats: {
|
|
2218
|
+
hour: {
|
|
2219
|
+
list: ['%H:%M', '%H']
|
|
2229
2220
|
},
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
style: {
|
|
2233
|
-
fontSize: '13px'
|
|
2234
|
-
}
|
|
2221
|
+
day: {
|
|
2222
|
+
list: ['%A, %e. %B', '%a, %e. %b', '%E']
|
|
2235
2223
|
},
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
text: null,
|
|
2239
|
-
reserveSpace: false,
|
|
2240
|
-
rotation: 0
|
|
2224
|
+
week: {
|
|
2225
|
+
list: ['Week %W', 'W%W']
|
|
2241
2226
|
},
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
// two days.
|
|
2245
|
-
units: [[
|
|
2246
|
-
'millisecond',
|
|
2247
|
-
[1, 10, 100]
|
|
2248
|
-
], [
|
|
2249
|
-
'second',
|
|
2250
|
-
[1, 10]
|
|
2251
|
-
], [
|
|
2252
|
-
'minute',
|
|
2253
|
-
[1, 5, 15]
|
|
2254
|
-
], [
|
|
2255
|
-
'hour',
|
|
2256
|
-
[1, 6]
|
|
2257
|
-
], [
|
|
2258
|
-
'day',
|
|
2259
|
-
[1]
|
|
2260
|
-
], [
|
|
2261
|
-
'week',
|
|
2262
|
-
[1]
|
|
2263
|
-
], [
|
|
2264
|
-
'month',
|
|
2265
|
-
[1]
|
|
2266
|
-
], [
|
|
2267
|
-
'year',
|
|
2268
|
-
null
|
|
2269
|
-
]]
|
|
2270
|
-
}, userOptions);
|
|
2271
|
-
// X-axis specific options
|
|
2272
|
-
if (this.coll === 'xAxis') {
|
|
2273
|
-
// For linked axes, tickPixelInterval is used only if
|
|
2274
|
-
// the tickPositioner below doesn't run or returns
|
|
2275
|
-
// undefined (like multiple years)
|
|
2276
|
-
if (defined(userOptions.linkedTo) &&
|
|
2277
|
-
!defined(userOptions.tickPixelInterval)) {
|
|
2278
|
-
gridAxisOptions.tickPixelInterval = 350;
|
|
2227
|
+
month: {
|
|
2228
|
+
list: ['%B', '%b', '%o']
|
|
2279
2229
|
}
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2230
|
+
},
|
|
2231
|
+
grid: {
|
|
2232
|
+
borderWidth: 1
|
|
2233
|
+
},
|
|
2234
|
+
labels: {
|
|
2235
|
+
padding: 2,
|
|
2236
|
+
style: {
|
|
2237
|
+
fontSize: '13px'
|
|
2238
|
+
}
|
|
2239
|
+
},
|
|
2240
|
+
margin: 0,
|
|
2241
|
+
title: {
|
|
2242
|
+
text: null,
|
|
2243
|
+
reserveSpace: false,
|
|
2244
|
+
rotation: 0
|
|
2245
|
+
},
|
|
2246
|
+
// In a grid axis, only allow one unit of certain types,
|
|
2247
|
+
// for example we shouln't have one grid cell spanning
|
|
2248
|
+
// two days.
|
|
2249
|
+
units: [[
|
|
2250
|
+
'millisecond',
|
|
2251
|
+
[1, 10, 100]
|
|
2252
|
+
], [
|
|
2253
|
+
'second',
|
|
2254
|
+
[1, 10]
|
|
2255
|
+
], [
|
|
2256
|
+
'minute',
|
|
2257
|
+
[1, 5, 15]
|
|
2258
|
+
], [
|
|
2259
|
+
'hour',
|
|
2260
|
+
[1, 6]
|
|
2261
|
+
], [
|
|
2262
|
+
'day',
|
|
2263
|
+
[1]
|
|
2264
|
+
], [
|
|
2265
|
+
'week',
|
|
2266
|
+
[1]
|
|
2267
|
+
], [
|
|
2268
|
+
'month',
|
|
2269
|
+
[1]
|
|
2270
|
+
], [
|
|
2271
|
+
'year',
|
|
2272
|
+
null
|
|
2273
|
+
]]
|
|
2274
|
+
}, userOptions);
|
|
2275
|
+
// X-axis specific options
|
|
2276
|
+
if (this.coll === 'xAxis') {
|
|
2277
|
+
// For linked axes, tickPixelInterval is used only if
|
|
2278
|
+
// the tickPositioner below doesn't run or returns
|
|
2279
|
+
// undefined (like multiple years)
|
|
2280
|
+
if (defined(userOptions.linkedTo) &&
|
|
2281
|
+
!defined(userOptions.tickPixelInterval)) {
|
|
2282
|
+
gridAxisOptions.tickPixelInterval = 350;
|
|
2283
|
+
}
|
|
2284
|
+
// For the secondary grid axis, use the primary axis'
|
|
2285
|
+
// tick intervals and return ticks one level higher.
|
|
2286
|
+
if (
|
|
2287
|
+
// Check for tick pixel interval in options
|
|
2288
|
+
!defined(userOptions.tickPixelInterval) &&
|
|
2289
|
+
// Only for linked axes
|
|
2290
|
+
defined(userOptions.linkedTo) &&
|
|
2291
|
+
!defined(userOptions.tickPositioner) &&
|
|
2292
|
+
!defined(userOptions.tickInterval)) {
|
|
2293
|
+
gridAxisOptions.tickPositioner = function (min, max) {
|
|
2294
|
+
var parentInfo = (this.linkedParent &&
|
|
2295
|
+
this.linkedParent.tickPositions &&
|
|
2296
|
+
this.linkedParent.tickPositions.info);
|
|
2297
|
+
if (parentInfo) {
|
|
2298
|
+
var units = (gridAxisOptions.units || []);
|
|
2299
|
+
var unitIdx = void 0,
|
|
2300
|
+
count = 1,
|
|
2301
|
+
unitName = 'year';
|
|
2302
|
+
for (var i = 0; i < units.length; i++) {
|
|
2303
|
+
var unit_1 = units[i];
|
|
2304
|
+
if (unit_1 && unit_1[0] === parentInfo.unitName) {
|
|
2305
|
+
unitIdx = i;
|
|
2306
|
+
break;
|
|
2318
2307
|
}
|
|
2319
|
-
var unitRange = timeUnits[unitName];
|
|
2320
|
-
this.tickInterval = unitRange * count;
|
|
2321
|
-
return this.getTimeTicks({
|
|
2322
|
-
unitRange: unitRange,
|
|
2323
|
-
count: count,
|
|
2324
|
-
unitName: unitName
|
|
2325
|
-
}, min, max, this.options.startOfWeek);
|
|
2326
2308
|
}
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
options.tickWidth = options.lineWidth =
|
|
2346
|
-
gridOptions.borderWidth;
|
|
2309
|
+
// Get the first allowed count on the next unit.
|
|
2310
|
+
var unit = (isNumber(unitIdx) && units[unitIdx + 1]);
|
|
2311
|
+
if (unit) {
|
|
2312
|
+
unitName = unit[0] || 'year';
|
|
2313
|
+
var counts = unit[1];
|
|
2314
|
+
count = counts && counts[0] || 1;
|
|
2315
|
+
// In case the base X axis shows years, make the
|
|
2316
|
+
// secondary axis show ten times the years (#11427)
|
|
2317
|
+
}
|
|
2318
|
+
else if (parentInfo.unitName === 'year') {
|
|
2319
|
+
// unitName is 'year'
|
|
2320
|
+
count = parentInfo.count * 10;
|
|
2321
|
+
}
|
|
2322
|
+
var unitRange = timeUnits[unitName];
|
|
2323
|
+
this.tickInterval = unitRange * count;
|
|
2324
|
+
return this.chart.time.getTimeTicks({ unitRange: unitRange, count: count, unitName: unitName }, min, max, this.options.startOfWeek);
|
|
2325
|
+
}
|
|
2326
|
+
};
|
|
2347
2327
|
}
|
|
2348
2328
|
}
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2329
|
+
// Now merge the combined options into the axis options
|
|
2330
|
+
merge(true, this.options, gridAxisOptions);
|
|
2331
|
+
if (this.horiz) {
|
|
2332
|
+
/* _________________________
|
|
2333
|
+
Make this: ___|_____|_____|_____|__|
|
|
2334
|
+
^ ^
|
|
2335
|
+
_________________________
|
|
2336
|
+
Into this: |_____|_____|_____|_____|
|
|
2337
|
+
^ ^ */
|
|
2338
|
+
options.minPadding = pick(userOptions.minPadding, 0);
|
|
2339
|
+
options.maxPadding = pick(userOptions.maxPadding, 0);
|
|
2340
|
+
}
|
|
2341
|
+
// If borderWidth is set, then use its value for tick and
|
|
2342
|
+
// line width.
|
|
2343
|
+
if (isNumber(options.grid.borderWidth)) {
|
|
2344
|
+
options.tickWidth = options.lineWidth =
|
|
2345
|
+
gridOptions.borderWidth;
|
|
2362
2346
|
}
|
|
2363
2347
|
}
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2348
|
+
}
|
|
2349
|
+
/**
|
|
2350
|
+
* @private
|
|
2351
|
+
*/
|
|
2352
|
+
function onAfterSetOptions2(e) {
|
|
2353
|
+
var axis = this;
|
|
2354
|
+
var userOptions = e.userOptions;
|
|
2355
|
+
var gridOptions = userOptions && userOptions.grid || {};
|
|
2356
|
+
var columns = gridOptions.columns;
|
|
2357
|
+
// Add column options to the parent axis. Children has their column
|
|
2358
|
+
// options set on init in onGridAxisAfterInit.
|
|
2359
|
+
if (gridOptions.enabled && columns) {
|
|
2360
|
+
merge(true, axis.options, columns[columns.length - 1]);
|
|
2373
2361
|
}
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2362
|
+
}
|
|
2363
|
+
/**
|
|
2364
|
+
* Handle columns and setScale.
|
|
2365
|
+
* @private
|
|
2366
|
+
*/
|
|
2367
|
+
function onAfterSetScale() {
|
|
2368
|
+
var axis = this;
|
|
2369
|
+
(axis.grid.columns || []).forEach(function (column) { return column.setScale(); });
|
|
2370
|
+
}
|
|
2371
|
+
/**
|
|
2372
|
+
* Draw vertical axis ticks extra long to create cell floors and roofs.
|
|
2373
|
+
* Overrides the tickLength for vertical axes.
|
|
2374
|
+
* @private
|
|
2375
|
+
*/
|
|
2376
|
+
function onAfterTickSize(e) {
|
|
2377
|
+
var defaultLeftAxisOptions = AxisDefaults.defaultLeftAxisOptions;
|
|
2378
|
+
var _a = this,
|
|
2379
|
+
horiz = _a.horiz,
|
|
2380
|
+
maxLabelDimensions = _a.maxLabelDimensions,
|
|
2381
|
+
_b = _a.options.grid,
|
|
2382
|
+
gridOptions = _b === void 0 ? {} : _b;
|
|
2383
|
+
if (gridOptions.enabled && maxLabelDimensions) {
|
|
2384
|
+
var labelPadding = (Math.abs(defaultLeftAxisOptions.labels.x) * 2);
|
|
2385
|
+
var distance = horiz ?
|
|
2386
|
+
(gridOptions.cellHeight ||
|
|
2387
|
+
labelPadding + maxLabelDimensions.height) :
|
|
2388
|
+
labelPadding + maxLabelDimensions.width;
|
|
2389
|
+
if (isArray(e.tickSize)) {
|
|
2390
|
+
e.tickSize[0] = distance;
|
|
2391
|
+
}
|
|
2392
|
+
else {
|
|
2393
|
+
e.tickSize = [distance, 0];
|
|
2398
2394
|
}
|
|
2399
2395
|
}
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2396
|
+
}
|
|
2397
|
+
/**
|
|
2398
|
+
* @private
|
|
2399
|
+
*/
|
|
2400
|
+
function onChartAfterSetChartSize() {
|
|
2401
|
+
this.axes.forEach(function (axis) {
|
|
2402
|
+
(axis.grid && axis.grid.columns || []).forEach(function (column) {
|
|
2403
|
+
column.setAxisSize();
|
|
2404
|
+
column.setAxisTranslation();
|
|
2409
2405
|
});
|
|
2406
|
+
});
|
|
2407
|
+
}
|
|
2408
|
+
/**
|
|
2409
|
+
* @private
|
|
2410
|
+
*/
|
|
2411
|
+
function onDestroy(e) {
|
|
2412
|
+
var grid = this.grid;
|
|
2413
|
+
(grid.columns || []).forEach(function (column) { return column.destroy(e.keepEvents); });
|
|
2414
|
+
grid.columns = void 0;
|
|
2415
|
+
}
|
|
2416
|
+
/**
|
|
2417
|
+
* Wraps axis init to draw cell walls on vertical axes.
|
|
2418
|
+
* @private
|
|
2419
|
+
*/
|
|
2420
|
+
function onInit(e) {
|
|
2421
|
+
var axis = this;
|
|
2422
|
+
var userOptions = e.userOptions || {};
|
|
2423
|
+
var gridOptions = userOptions.grid || {};
|
|
2424
|
+
if (gridOptions.enabled && defined(gridOptions.borderColor)) {
|
|
2425
|
+
userOptions.tickColor = userOptions.lineColor = (gridOptions.borderColor);
|
|
2410
2426
|
}
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
*/
|
|
2414
|
-
function onDestroy(e) {
|
|
2415
|
-
var grid = this.grid;
|
|
2416
|
-
(grid.columns || []).forEach(function (column) {
|
|
2417
|
-
column.destroy(e.keepEvents);
|
|
2418
|
-
});
|
|
2419
|
-
grid.columns = void 0;
|
|
2427
|
+
if (!axis.grid) {
|
|
2428
|
+
axis.grid = new GridAxisAdditions(axis);
|
|
2420
2429
|
}
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2430
|
+
axis.hiddenLabels = [];
|
|
2431
|
+
axis.hiddenMarks = [];
|
|
2432
|
+
}
|
|
2433
|
+
/**
|
|
2434
|
+
* Center tick labels in cells.
|
|
2435
|
+
* @private
|
|
2436
|
+
*/
|
|
2437
|
+
function onTickAfterGetLabelPosition(e) {
|
|
2438
|
+
var tick = this,
|
|
2439
|
+
label = tick.label,
|
|
2440
|
+
axis = tick.axis,
|
|
2441
|
+
reversed = axis.reversed,
|
|
2442
|
+
chart = axis.chart,
|
|
2443
|
+
options = axis.options,
|
|
2444
|
+
gridOptions = options.grid || {},
|
|
2445
|
+
labelOpts = axis.options.labels,
|
|
2446
|
+
align = labelOpts.align,
|
|
2447
|
+
// verticalAlign is currently not supported for axis.labels.
|
|
2448
|
+
verticalAlign = 'middle', // labelOpts.verticalAlign,
|
|
2449
|
+
side = GridAxisSide[axis.side],
|
|
2450
|
+
tickmarkOffset = e.tickmarkOffset,
|
|
2451
|
+
tickPositions = axis.tickPositions,
|
|
2452
|
+
tickPos = tick.pos - tickmarkOffset,
|
|
2453
|
+
nextTickPos = (isNumber(tickPositions[e.index + 1]) ?
|
|
2454
|
+
tickPositions[e.index + 1] - tickmarkOffset :
|
|
2455
|
+
(axis.max || 0) + tickmarkOffset),
|
|
2456
|
+
tickSize = axis.tickSize('tick'),
|
|
2457
|
+
tickWidth = tickSize ? tickSize[0] : 0,
|
|
2458
|
+
crispCorr = tickSize ? tickSize[1] / 2 : 0;
|
|
2459
|
+
var labelHeight,
|
|
2460
|
+
lblMetrics,
|
|
2461
|
+
lines,
|
|
2462
|
+
bottom,
|
|
2463
|
+
top,
|
|
2464
|
+
left,
|
|
2465
|
+
right;
|
|
2466
|
+
// Only center tick labels in grid axes
|
|
2467
|
+
if (gridOptions.enabled === true) {
|
|
2468
|
+
// Calculate top and bottom positions of the cell.
|
|
2469
|
+
if (side === 'top') {
|
|
2470
|
+
bottom = axis.top + axis.offset;
|
|
2471
|
+
top = bottom - tickWidth;
|
|
2472
|
+
}
|
|
2473
|
+
else if (side === 'bottom') {
|
|
2474
|
+
top = chart.chartHeight - axis.bottom + axis.offset;
|
|
2475
|
+
bottom = top + tickWidth;
|
|
2431
2476
|
}
|
|
2432
|
-
|
|
2433
|
-
axis.
|
|
2477
|
+
else {
|
|
2478
|
+
bottom = axis.top + axis.len - (axis.translate(reversed ? nextTickPos : tickPos) || 0);
|
|
2479
|
+
top = axis.top + axis.len - (axis.translate(reversed ? tickPos : nextTickPos) || 0);
|
|
2434
2480
|
}
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
* Center tick labels in cells.
|
|
2440
|
-
* @private
|
|
2441
|
-
*/
|
|
2442
|
-
function onTickAfterGetLabelPosition(e) {
|
|
2443
|
-
var tick = this,
|
|
2444
|
-
label = tick.label,
|
|
2445
|
-
axis = tick.axis,
|
|
2446
|
-
reversed = axis.reversed,
|
|
2447
|
-
chart = axis.chart,
|
|
2448
|
-
options = axis.options,
|
|
2449
|
-
gridOptions = options.grid || {},
|
|
2450
|
-
labelOpts = axis.options.labels,
|
|
2451
|
-
align = labelOpts.align,
|
|
2452
|
-
// verticalAlign is currently not supported for axis.labels.
|
|
2453
|
-
verticalAlign = 'middle', // labelOpts.verticalAlign,
|
|
2454
|
-
side = GridAxis.Side[axis.side],
|
|
2455
|
-
tickmarkOffset = e.tickmarkOffset,
|
|
2456
|
-
tickPositions = axis.tickPositions,
|
|
2457
|
-
tickPos = tick.pos - tickmarkOffset,
|
|
2458
|
-
nextTickPos = (isNumber(tickPositions[e.index + 1]) ?
|
|
2459
|
-
tickPositions[e.index + 1] - tickmarkOffset :
|
|
2460
|
-
(axis.max || 0) + tickmarkOffset),
|
|
2461
|
-
tickSize = axis.tickSize('tick'),
|
|
2462
|
-
tickWidth = tickSize ? tickSize[0] : 0,
|
|
2463
|
-
crispCorr = tickSize ? tickSize[1] / 2 : 0;
|
|
2464
|
-
var labelHeight,
|
|
2465
|
-
lblMetrics,
|
|
2466
|
-
lines,
|
|
2467
|
-
bottom,
|
|
2468
|
-
top,
|
|
2469
|
-
left,
|
|
2470
|
-
right;
|
|
2471
|
-
// Only center tick labels in grid axes
|
|
2472
|
-
if (gridOptions.enabled === true) {
|
|
2473
|
-
// Calculate top and bottom positions of the cell.
|
|
2474
|
-
if (side === 'top') {
|
|
2475
|
-
bottom = axis.top + axis.offset;
|
|
2476
|
-
top = bottom - tickWidth;
|
|
2477
|
-
}
|
|
2478
|
-
else if (side === 'bottom') {
|
|
2479
|
-
top = chart.chartHeight - axis.bottom + axis.offset;
|
|
2480
|
-
bottom = top + tickWidth;
|
|
2481
|
-
}
|
|
2482
|
-
else {
|
|
2483
|
-
bottom = axis.top + axis.len - (axis.translate(reversed ? nextTickPos : tickPos) || 0);
|
|
2484
|
-
top = axis.top + axis.len - (axis.translate(reversed ? tickPos : nextTickPos) || 0);
|
|
2485
|
-
}
|
|
2486
|
-
// Calculate left and right positions of the cell.
|
|
2487
|
-
if (side === 'right') {
|
|
2488
|
-
left = chart.chartWidth - axis.right + axis.offset;
|
|
2489
|
-
right = left + tickWidth;
|
|
2490
|
-
}
|
|
2491
|
-
else if (side === 'left') {
|
|
2492
|
-
right = axis.left + axis.offset;
|
|
2493
|
-
left = right - tickWidth;
|
|
2494
|
-
}
|
|
2495
|
-
else {
|
|
2496
|
-
left = Math.round(axis.left + (axis.translate(reversed ? nextTickPos : tickPos) || 0)) - crispCorr;
|
|
2497
|
-
right = Math.min(// #15742
|
|
2498
|
-
Math.round(axis.left + (axis.translate(reversed ? tickPos : nextTickPos) || 0)) - crispCorr, axis.left + axis.len);
|
|
2499
|
-
}
|
|
2500
|
-
tick.slotWidth = right - left;
|
|
2501
|
-
// Calculate the positioning of the label based on
|
|
2502
|
-
// alignment.
|
|
2503
|
-
e.pos.x = (align === 'left' ?
|
|
2504
|
-
left :
|
|
2505
|
-
align === 'right' ?
|
|
2506
|
-
right :
|
|
2507
|
-
left + ((right - left) / 2) // default to center
|
|
2508
|
-
);
|
|
2509
|
-
e.pos.y = (verticalAlign === 'top' ?
|
|
2510
|
-
top :
|
|
2511
|
-
verticalAlign === 'bottom' ?
|
|
2512
|
-
bottom :
|
|
2513
|
-
top + ((bottom - top) / 2) // default to middle
|
|
2514
|
-
);
|
|
2515
|
-
lblMetrics = chart.renderer.fontMetrics(labelOpts.style.fontSize, label && label.element);
|
|
2516
|
-
labelHeight = label ? label.getBBox().height : 0;
|
|
2517
|
-
// Adjustment to y position to align the label correctly.
|
|
2518
|
-
// Would be better to have a setter or similar for this.
|
|
2519
|
-
if (!labelOpts.useHTML) {
|
|
2520
|
-
lines = Math.round(labelHeight / lblMetrics.h);
|
|
2521
|
-
e.pos.y += (
|
|
2522
|
-
// Center the label
|
|
2523
|
-
// TODO: why does this actually center the label?
|
|
2524
|
-
((lblMetrics.b - (lblMetrics.h - lblMetrics.f)) / 2) +
|
|
2525
|
-
// Adjust for height of additional lines.
|
|
2526
|
-
-(((lines - 1) * lblMetrics.h) / 2));
|
|
2527
|
-
}
|
|
2528
|
-
else {
|
|
2529
|
-
e.pos.y += (
|
|
2530
|
-
// Readjust yCorr in htmlUpdateTransform
|
|
2531
|
-
lblMetrics.b +
|
|
2532
|
-
// Adjust for height of html label
|
|
2533
|
-
-(labelHeight / 2));
|
|
2534
|
-
}
|
|
2535
|
-
e.pos.x += (axis.horiz && labelOpts.x) || 0;
|
|
2481
|
+
// Calculate left and right positions of the cell.
|
|
2482
|
+
if (side === 'right') {
|
|
2483
|
+
left = chart.chartWidth - axis.right + axis.offset;
|
|
2484
|
+
right = left + tickWidth;
|
|
2536
2485
|
}
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
*/
|
|
2541
|
-
function onTickLabelFormat(ctx) {
|
|
2542
|
-
var axis = ctx.axis,
|
|
2543
|
-
value = ctx.value;
|
|
2544
|
-
if (axis.options.grid &&
|
|
2545
|
-
axis.options.grid.enabled) {
|
|
2546
|
-
var tickPos = axis.tickPositions;
|
|
2547
|
-
var series = (axis.linkedParent || axis).series[0];
|
|
2548
|
-
var isFirst = value === tickPos[0];
|
|
2549
|
-
var isLast = value === tickPos[tickPos.length - 1];
|
|
2550
|
-
var point = series && find(series.options.data,
|
|
2551
|
-
function (p) {
|
|
2552
|
-
return p[axis.isXAxis ? 'x' : 'y'] === value;
|
|
2553
|
-
});
|
|
2554
|
-
var pointCopy = void 0;
|
|
2555
|
-
if (point && series.is('gantt')) {
|
|
2556
|
-
// For the Gantt set point aliases to the pointCopy
|
|
2557
|
-
// to do not change the original point
|
|
2558
|
-
pointCopy = merge(point);
|
|
2559
|
-
H.seriesTypes.gantt.prototype.pointClass
|
|
2560
|
-
.setGanttPointAliases(pointCopy);
|
|
2561
|
-
}
|
|
2562
|
-
// Make additional properties available for the
|
|
2563
|
-
// formatter
|
|
2564
|
-
ctx.isFirst = isFirst;
|
|
2565
|
-
ctx.isLast = isLast;
|
|
2566
|
-
ctx.point = pointCopy;
|
|
2486
|
+
else if (side === 'left') {
|
|
2487
|
+
right = axis.left + axis.offset;
|
|
2488
|
+
left = right - tickWidth;
|
|
2567
2489
|
}
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
var tickInterval = axis.tickInterval;
|
|
2601
|
-
var endMoreThanMin = (firstPos < min &&
|
|
2602
|
-
firstPos + tickInterval > min);
|
|
2603
|
-
var startLessThanMax = (lastPos > max &&
|
|
2604
|
-
lastPos - tickInterval < max);
|
|
2605
|
-
if (gridOptions.enabled === true &&
|
|
2606
|
-
!categoryAxis &&
|
|
2607
|
-
(axis.horiz || axis.isLinked)) {
|
|
2608
|
-
if (endMoreThanMin && !options.startOnTick) {
|
|
2609
|
-
tickPositions[0] = min;
|
|
2610
|
-
}
|
|
2611
|
-
if (startLessThanMax && !options.endOnTick) {
|
|
2612
|
-
tickPositions[tickPositions.length - 1] = max;
|
|
2613
|
-
}
|
|
2490
|
+
else {
|
|
2491
|
+
left = Math.round(axis.left + (axis.translate(reversed ? nextTickPos : tickPos) || 0)) - crispCorr;
|
|
2492
|
+
right = Math.min(// #15742
|
|
2493
|
+
Math.round(axis.left + (axis.translate(reversed ? tickPos : nextTickPos) || 0)) - crispCorr, axis.left + axis.len);
|
|
2494
|
+
}
|
|
2495
|
+
tick.slotWidth = right - left;
|
|
2496
|
+
// Calculate the positioning of the label based on
|
|
2497
|
+
// alignment.
|
|
2498
|
+
e.pos.x = (align === 'left' ?
|
|
2499
|
+
left :
|
|
2500
|
+
align === 'right' ?
|
|
2501
|
+
right :
|
|
2502
|
+
left + ((right - left) / 2) // default to center
|
|
2503
|
+
);
|
|
2504
|
+
e.pos.y = (verticalAlign === 'top' ?
|
|
2505
|
+
top :
|
|
2506
|
+
verticalAlign === 'bottom' ?
|
|
2507
|
+
bottom :
|
|
2508
|
+
top + ((bottom - top) / 2) // default to middle
|
|
2509
|
+
);
|
|
2510
|
+
lblMetrics = chart.renderer.fontMetrics(labelOpts.style.fontSize, label && label.element);
|
|
2511
|
+
labelHeight = label ? label.getBBox().height : 0;
|
|
2512
|
+
// Adjustment to y position to align the label correctly.
|
|
2513
|
+
// Would be better to have a setter or similar for this.
|
|
2514
|
+
if (!labelOpts.useHTML) {
|
|
2515
|
+
lines = Math.round(labelHeight / lblMetrics.h);
|
|
2516
|
+
e.pos.y += (
|
|
2517
|
+
// Center the label
|
|
2518
|
+
// TODO: why does this actually center the label?
|
|
2519
|
+
((lblMetrics.b - (lblMetrics.h - lblMetrics.f)) / 2) +
|
|
2520
|
+
// Adjust for height of additional lines.
|
|
2521
|
+
-(((lines - 1) * lblMetrics.h) / 2));
|
|
2614
2522
|
}
|
|
2523
|
+
else {
|
|
2524
|
+
e.pos.y += (
|
|
2525
|
+
// Readjust yCorr in htmlUpdateTransform
|
|
2526
|
+
lblMetrics.b +
|
|
2527
|
+
// Adjust for height of html label
|
|
2528
|
+
-(labelHeight / 2));
|
|
2529
|
+
}
|
|
2530
|
+
e.pos.x += (axis.horiz && labelOpts.x) || 0;
|
|
2615
2531
|
}
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2532
|
+
}
|
|
2533
|
+
/**
|
|
2534
|
+
* @private
|
|
2535
|
+
*/
|
|
2536
|
+
function onTickLabelFormat(ctx) {
|
|
2537
|
+
var axis = ctx.axis,
|
|
2538
|
+
value = ctx.value;
|
|
2539
|
+
if (axis.options.grid &&
|
|
2540
|
+
axis.options.grid.enabled) {
|
|
2541
|
+
var tickPos = axis.tickPositions;
|
|
2542
|
+
var series = (axis.linkedParent || axis).series[0];
|
|
2543
|
+
var isFirst = value === tickPos[0];
|
|
2544
|
+
var isLast = value === tickPos[tickPos.length - 1];
|
|
2545
|
+
var point = series && find(series.options.data,
|
|
2546
|
+
function (p) {
|
|
2547
|
+
return p[axis.isXAxis ? 'x' : 'y'] === value;
|
|
2548
|
+
});
|
|
2549
|
+
var pointCopy = void 0;
|
|
2550
|
+
if (point && series.is('gantt')) {
|
|
2551
|
+
// For the Gantt set point aliases to the pointCopy
|
|
2552
|
+
// to do not change the original point
|
|
2553
|
+
pointCopy = merge(point);
|
|
2554
|
+
H.seriesTypes.gantt.prototype.pointClass
|
|
2555
|
+
.setGanttPointAliases(pointCopy);
|
|
2556
|
+
}
|
|
2557
|
+
// Make additional properties available for the
|
|
2558
|
+
// formatter
|
|
2559
|
+
ctx.isFirst = isFirst;
|
|
2560
|
+
ctx.isLast = isLast;
|
|
2561
|
+
ctx.point = pointCopy;
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
/**
|
|
2565
|
+
* Makes tick labels which are usually ignored in a linked axis
|
|
2566
|
+
* displayed if they are within range of linkedParent.min.
|
|
2567
|
+
* ```
|
|
2568
|
+
* _____________________________
|
|
2569
|
+
* | | | | |
|
|
2570
|
+
* Make this: | | 2 | 3 | 4 |
|
|
2571
|
+
* |___|_______|_______|_______|
|
|
2572
|
+
* ^
|
|
2573
|
+
* _____________________________
|
|
2574
|
+
* | | | | |
|
|
2575
|
+
* Into this: | 1 | 2 | 3 | 4 |
|
|
2576
|
+
* |___|_______|_______|_______|
|
|
2577
|
+
* ^
|
|
2578
|
+
* ```
|
|
2579
|
+
* @private
|
|
2580
|
+
* @todo Does this function do what the drawing says? Seems to affect
|
|
2581
|
+
* ticks and not the labels directly?
|
|
2582
|
+
*/
|
|
2583
|
+
function onTrimTicks() {
|
|
2584
|
+
var axis = this;
|
|
2585
|
+
var options = axis.options;
|
|
2586
|
+
var gridOptions = options.grid || {};
|
|
2587
|
+
var categoryAxis = axis.categories;
|
|
2588
|
+
var tickPositions = axis.tickPositions;
|
|
2589
|
+
var firstPos = tickPositions[0];
|
|
2590
|
+
var lastPos = tickPositions[tickPositions.length - 1];
|
|
2591
|
+
var linkedMin = axis.linkedParent && axis.linkedParent.min;
|
|
2592
|
+
var linkedMax = axis.linkedParent && axis.linkedParent.max;
|
|
2593
|
+
var min = linkedMin || axis.min;
|
|
2594
|
+
var max = linkedMax || axis.max;
|
|
2595
|
+
var tickInterval = axis.tickInterval;
|
|
2596
|
+
var endMoreThanMin = (firstPos < min &&
|
|
2597
|
+
firstPos + tickInterval > min);
|
|
2598
|
+
var startLessThanMax = (lastPos > max &&
|
|
2599
|
+
lastPos - tickInterval < max);
|
|
2600
|
+
if (gridOptions.enabled === true &&
|
|
2601
|
+
!categoryAxis &&
|
|
2602
|
+
(axis.horiz || axis.isLinked)) {
|
|
2603
|
+
if (endMoreThanMin && !options.startOnTick) {
|
|
2604
|
+
tickPositions[0] = min;
|
|
2605
|
+
}
|
|
2606
|
+
if (startLessThanMax && !options.endOnTick) {
|
|
2607
|
+
tickPositions[tickPositions.length - 1] = max;
|
|
2626
2608
|
}
|
|
2627
|
-
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
/**
|
|
2612
|
+
* Avoid altering tickInterval when reserving space.
|
|
2613
|
+
* @private
|
|
2614
|
+
*/
|
|
2615
|
+
function wrapUnsquish(proceed) {
|
|
2616
|
+
var axis = this;
|
|
2617
|
+
var _a = axis.options.grid,
|
|
2618
|
+
gridOptions = _a === void 0 ? {} : _a;
|
|
2619
|
+
if (gridOptions.enabled === true && axis.categories) {
|
|
2620
|
+
return axis.tickInterval;
|
|
2621
|
+
}
|
|
2622
|
+
return proceed.apply(axis, argsToArray(arguments));
|
|
2623
|
+
}
|
|
2624
|
+
/* *
|
|
2625
|
+
*
|
|
2626
|
+
* Class
|
|
2627
|
+
*
|
|
2628
|
+
* */
|
|
2629
|
+
/**
|
|
2630
|
+
* Additions for grid axes.
|
|
2631
|
+
* @private
|
|
2632
|
+
* @class
|
|
2633
|
+
*/
|
|
2634
|
+
var GridAxisAdditions = /** @class */ (function () {
|
|
2635
|
+
/* *
|
|
2636
|
+
*
|
|
2637
|
+
* Constructors
|
|
2638
|
+
*
|
|
2639
|
+
* */
|
|
2640
|
+
function GridAxisAdditions(axis) {
|
|
2641
|
+
this.axis = axis;
|
|
2628
2642
|
}
|
|
2629
2643
|
/* *
|
|
2644
|
+
*
|
|
2645
|
+
* Functions
|
|
2646
|
+
*
|
|
2647
|
+
* */
|
|
2648
|
+
/**
|
|
2649
|
+
* Checks if an axis is the outer axis in its dimension. Since
|
|
2650
|
+
* axes are placed outwards in order, the axis with the highest
|
|
2651
|
+
* index is the outermost axis.
|
|
2630
2652
|
*
|
|
2631
|
-
*
|
|
2653
|
+
* Example: If there are multiple x-axes at the top of the chart,
|
|
2654
|
+
* this function returns true if the axis supplied is the last
|
|
2655
|
+
* of the x-axes.
|
|
2632
2656
|
*
|
|
2633
|
-
* */
|
|
2634
|
-
/**
|
|
2635
|
-
* Additions for grid axes.
|
|
2636
2657
|
* @private
|
|
2637
|
-
*
|
|
2658
|
+
*
|
|
2659
|
+
* @return {boolean}
|
|
2660
|
+
* True if the axis is the outermost axis in its dimension; false if
|
|
2661
|
+
* not.
|
|
2638
2662
|
*/
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
* axes are placed outwards in order, the axis with the highest
|
|
2656
|
-
* index is the outermost axis.
|
|
2657
|
-
*
|
|
2658
|
-
* Example: If there are multiple x-axes at the top of the chart,
|
|
2659
|
-
* this function returns true if the axis supplied is the last
|
|
2660
|
-
* of the x-axes.
|
|
2661
|
-
*
|
|
2662
|
-
* @private
|
|
2663
|
-
*
|
|
2664
|
-
* @return {boolean}
|
|
2665
|
-
* True if the axis is the outermost axis in its dimension; false if
|
|
2666
|
-
* not.
|
|
2667
|
-
*/
|
|
2668
|
-
Additions.prototype.isOuterAxis = function () {
|
|
2669
|
-
var axis = this.axis;
|
|
2670
|
-
var chart = axis.chart;
|
|
2671
|
-
var columnIndex = axis.grid.columnIndex;
|
|
2672
|
-
var columns = (axis.linkedParent && axis.linkedParent.grid.columns ||
|
|
2673
|
-
axis.grid.columns);
|
|
2674
|
-
var parentAxis = columnIndex ? axis.linkedParent : axis;
|
|
2675
|
-
var thisIndex = -1,
|
|
2676
|
-
lastIndex = 0;
|
|
2677
|
-
chart[axis.coll].forEach(function (otherAxis, index) {
|
|
2678
|
-
if (otherAxis.side === axis.side &&
|
|
2679
|
-
!otherAxis.options.isInternal) {
|
|
2680
|
-
lastIndex = index;
|
|
2681
|
-
if (otherAxis === parentAxis) {
|
|
2682
|
-
// Get the index of the axis in question
|
|
2683
|
-
thisIndex = index;
|
|
2684
|
-
}
|
|
2663
|
+
GridAxisAdditions.prototype.isOuterAxis = function () {
|
|
2664
|
+
var axis = this.axis;
|
|
2665
|
+
var chart = axis.chart;
|
|
2666
|
+
var columnIndex = axis.grid.columnIndex;
|
|
2667
|
+
var columns = (axis.linkedParent && axis.linkedParent.grid.columns ||
|
|
2668
|
+
axis.grid.columns);
|
|
2669
|
+
var parentAxis = columnIndex ? axis.linkedParent : axis;
|
|
2670
|
+
var thisIndex = -1,
|
|
2671
|
+
lastIndex = 0;
|
|
2672
|
+
(chart[axis.coll] || []).forEach(function (otherAxis, index) {
|
|
2673
|
+
if (otherAxis.side === axis.side &&
|
|
2674
|
+
!otherAxis.options.isInternal) {
|
|
2675
|
+
lastIndex = index;
|
|
2676
|
+
if (otherAxis === parentAxis) {
|
|
2677
|
+
// Get the index of the axis in question
|
|
2678
|
+
thisIndex = index;
|
|
2685
2679
|
}
|
|
2686
|
-
});
|
|
2687
|
-
return (lastIndex === thisIndex &&
|
|
2688
|
-
(isNumber(columnIndex) ?
|
|
2689
|
-
columns.length === columnIndex :
|
|
2690
|
-
true));
|
|
2691
|
-
};
|
|
2692
|
-
/**
|
|
2693
|
-
* Add extra border based on the provided path.
|
|
2694
|
-
* @private
|
|
2695
|
-
* @param {SVGPath} path
|
|
2696
|
-
* The path of the border.
|
|
2697
|
-
* @return {Highcharts.SVGElement}
|
|
2698
|
-
* Border
|
|
2699
|
-
*/
|
|
2700
|
-
Additions.prototype.renderBorder = function (path) {
|
|
2701
|
-
var axis = this.axis,
|
|
2702
|
-
renderer = axis.chart.renderer,
|
|
2703
|
-
options = axis.options,
|
|
2704
|
-
extraBorderLine = renderer.path(path)
|
|
2705
|
-
.addClass('highcharts-axis-line')
|
|
2706
|
-
.add(axis.axisBorder);
|
|
2707
|
-
if (!renderer.styledMode) {
|
|
2708
|
-
extraBorderLine.attr({
|
|
2709
|
-
stroke: options.lineColor,
|
|
2710
|
-
'stroke-width': options.lineWidth,
|
|
2711
|
-
zIndex: 7
|
|
2712
|
-
});
|
|
2713
2680
|
}
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2681
|
+
});
|
|
2682
|
+
return (lastIndex === thisIndex &&
|
|
2683
|
+
(isNumber(columnIndex) ?
|
|
2684
|
+
columns.length === columnIndex :
|
|
2685
|
+
true));
|
|
2686
|
+
};
|
|
2687
|
+
/**
|
|
2688
|
+
* Add extra border based on the provided path.
|
|
2689
|
+
* @private
|
|
2690
|
+
* @param {SVGPath} path
|
|
2691
|
+
* The path of the border.
|
|
2692
|
+
* @return {Highcharts.SVGElement}
|
|
2693
|
+
* Border
|
|
2694
|
+
*/
|
|
2695
|
+
GridAxisAdditions.prototype.renderBorder = function (path) {
|
|
2696
|
+
var axis = this.axis,
|
|
2697
|
+
renderer = axis.chart.renderer,
|
|
2698
|
+
options = axis.options,
|
|
2699
|
+
extraBorderLine = renderer.path(path)
|
|
2700
|
+
.addClass('highcharts-axis-line')
|
|
2701
|
+
.add(axis.axisBorder);
|
|
2702
|
+
if (!renderer.styledMode) {
|
|
2703
|
+
extraBorderLine.attr({
|
|
2704
|
+
stroke: options.lineColor,
|
|
2705
|
+
'stroke-width': options.lineWidth,
|
|
2706
|
+
zIndex: 7
|
|
2707
|
+
});
|
|
2708
|
+
}
|
|
2709
|
+
return extraBorderLine;
|
|
2710
|
+
};
|
|
2711
|
+
return GridAxisAdditions;
|
|
2712
|
+
}());
|
|
2720
2713
|
/* *
|
|
2721
2714
|
*
|
|
2722
2715
|
* Registry
|
|
@@ -2750,6 +2743,9 @@
|
|
|
2750
2743
|
* Default Export
|
|
2751
2744
|
*
|
|
2752
2745
|
* */
|
|
2746
|
+
var GridAxis = {
|
|
2747
|
+
compose: compose
|
|
2748
|
+
};
|
|
2753
2749
|
/* *
|
|
2754
2750
|
*
|
|
2755
2751
|
* API Options
|
|
@@ -3078,13 +3074,13 @@
|
|
|
3078
3074
|
.add(params.group);
|
|
3079
3075
|
}
|
|
3080
3076
|
// Set the new position, and show or hide
|
|
3081
|
-
icon
|
|
3077
|
+
icon[shouldRender ? 'show' : 'hide'](); // #14904, #1338
|
|
3082
3078
|
// Presentational attributes
|
|
3083
3079
|
if (!renderer.styledMode) {
|
|
3084
3080
|
icon
|
|
3085
3081
|
.attr({
|
|
3086
3082
|
cursor: 'pointer',
|
|
3087
|
-
'fill': pick(params.color, "#666666" /* neutralColor60 */),
|
|
3083
|
+
'fill': pick(params.color, "#666666" /* Palette.neutralColor60 */),
|
|
3088
3084
|
'stroke-width': 1,
|
|
3089
3085
|
stroke: options.lineColor,
|
|
3090
3086
|
strokeWidth: options.lineWidth || 0
|
|
@@ -4362,7 +4358,7 @@
|
|
|
4362
4358
|
* @apioption xAxis.currentDateIndicator
|
|
4363
4359
|
*/
|
|
4364
4360
|
var defaultOptions = {
|
|
4365
|
-
color: "#ccd6eb" /* highlightColor20 */,
|
|
4361
|
+
color: "#ccd6eb" /* Palette.highlightColor20 */,
|
|
4366
4362
|
width: 2,
|
|
4367
4363
|
/**
|
|
4368
4364
|
* @declare Highcharts.AxisCurrentDateIndicatorLabelOptions
|
|
@@ -8055,7 +8051,7 @@
|
|
|
8055
8051
|
*
|
|
8056
8052
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
8057
8053
|
*/
|
|
8058
|
-
barBackgroundColor: "#cccccc" /* neutralColor20 */,
|
|
8054
|
+
barBackgroundColor: "#cccccc" /* Palette.neutralColor20 */,
|
|
8059
8055
|
/**
|
|
8060
8056
|
* The width of the bar's border.
|
|
8061
8057
|
*
|
|
@@ -8068,7 +8064,7 @@
|
|
|
8068
8064
|
*
|
|
8069
8065
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
8070
8066
|
*/
|
|
8071
|
-
barBorderColor: "#cccccc" /* neutralColor20 */,
|
|
8067
|
+
barBorderColor: "#cccccc" /* Palette.neutralColor20 */,
|
|
8072
8068
|
/**
|
|
8073
8069
|
* The color of the small arrow inside the scrollbar buttons.
|
|
8074
8070
|
*
|
|
@@ -8077,7 +8073,7 @@
|
|
|
8077
8073
|
*
|
|
8078
8074
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
8079
8075
|
*/
|
|
8080
|
-
buttonArrowColor: "#333333" /* neutralColor80 */,
|
|
8076
|
+
buttonArrowColor: "#333333" /* Palette.neutralColor80 */,
|
|
8081
8077
|
/**
|
|
8082
8078
|
* The color of scrollbar buttons.
|
|
8083
8079
|
*
|
|
@@ -8086,7 +8082,7 @@
|
|
|
8086
8082
|
*
|
|
8087
8083
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
8088
8084
|
*/
|
|
8089
|
-
buttonBackgroundColor: "#e6e6e6" /* neutralColor10 */,
|
|
8085
|
+
buttonBackgroundColor: "#e6e6e6" /* Palette.neutralColor10 */,
|
|
8090
8086
|
/**
|
|
8091
8087
|
* The color of the border of the scrollbar buttons.
|
|
8092
8088
|
*
|
|
@@ -8095,7 +8091,7 @@
|
|
|
8095
8091
|
*
|
|
8096
8092
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
8097
8093
|
*/
|
|
8098
|
-
buttonBorderColor: "#cccccc" /* neutralColor20 */,
|
|
8094
|
+
buttonBorderColor: "#cccccc" /* Palette.neutralColor20 */,
|
|
8099
8095
|
/**
|
|
8100
8096
|
* The border width of the scrollbar buttons.
|
|
8101
8097
|
*
|
|
@@ -8108,7 +8104,7 @@
|
|
|
8108
8104
|
*
|
|
8109
8105
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
8110
8106
|
*/
|
|
8111
|
-
rifleColor: "#333333" /* neutralColor80 */,
|
|
8107
|
+
rifleColor: "#333333" /* Palette.neutralColor80 */,
|
|
8112
8108
|
/**
|
|
8113
8109
|
* The color of the track background.
|
|
8114
8110
|
*
|
|
@@ -8117,7 +8113,7 @@
|
|
|
8117
8113
|
*
|
|
8118
8114
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
8119
8115
|
*/
|
|
8120
|
-
trackBackgroundColor: "#f2f2f2" /* neutralColor5 */,
|
|
8116
|
+
trackBackgroundColor: "#f2f2f2" /* Palette.neutralColor5 */,
|
|
8121
8117
|
/**
|
|
8122
8118
|
* The color of the border of the scrollbar track.
|
|
8123
8119
|
*
|
|
@@ -8126,7 +8122,7 @@
|
|
|
8126
8122
|
*
|
|
8127
8123
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
8128
8124
|
*/
|
|
8129
|
-
trackBorderColor: "#f2f2f2" /* neutralColor5 */,
|
|
8125
|
+
trackBorderColor: "#f2f2f2" /* Palette.neutralColor5 */,
|
|
8130
8126
|
/**
|
|
8131
8127
|
* The corner radius of the border of the scrollbar track.
|
|
8132
8128
|
*
|
|
@@ -9353,7 +9349,7 @@
|
|
|
9353
9349
|
*/
|
|
9354
9350
|
inputStyle: {
|
|
9355
9351
|
/** @ignore */
|
|
9356
|
-
color: "#335cad" /* highlightColor80 */,
|
|
9352
|
+
color: "#335cad" /* Palette.highlightColor80 */,
|
|
9357
9353
|
/** @ignore */
|
|
9358
9354
|
cursor: 'pointer'
|
|
9359
9355
|
},
|
|
@@ -9370,7 +9366,7 @@
|
|
|
9370
9366
|
*/
|
|
9371
9367
|
labelStyle: {
|
|
9372
9368
|
/** @ignore */
|
|
9373
|
-
color: "#666666" /* neutralColor60 */
|
|
9369
|
+
color: "#666666" /* Palette.neutralColor60 */
|
|
9374
9370
|
}
|
|
9375
9371
|
}
|
|
9376
9372
|
});
|
|
@@ -9474,7 +9470,8 @@
|
|
|
9474
9470
|
rangeSetting,
|
|
9475
9471
|
ctx,
|
|
9476
9472
|
ytdExtremes,
|
|
9477
|
-
dataGrouping = rangeOptions.dataGrouping
|
|
9473
|
+
dataGrouping = rangeOptions.dataGrouping,
|
|
9474
|
+
addOffsetMin = true;
|
|
9478
9475
|
// chart has no data, base series is removed
|
|
9479
9476
|
if (dataMin === null || dataMax === null) {
|
|
9480
9477
|
return;
|
|
@@ -9507,12 +9504,16 @@
|
|
|
9507
9504
|
if (isNumber(ctx.newMax)) {
|
|
9508
9505
|
newMax = ctx.newMax;
|
|
9509
9506
|
}
|
|
9507
|
+
// #15799: offsetMin is added in minFromRange so that it works
|
|
9508
|
+
// with pre-selected buttons as well
|
|
9509
|
+
addOffsetMin = false;
|
|
9510
9510
|
}
|
|
9511
9511
|
// Fixed times like minutes, hours, days
|
|
9512
9512
|
}
|
|
9513
9513
|
else if (range) {
|
|
9514
9514
|
newMin = Math.max(newMax - range, dataMin);
|
|
9515
9515
|
newMax = Math.min(newMin + range, dataMax);
|
|
9516
|
+
addOffsetMin = false;
|
|
9516
9517
|
}
|
|
9517
9518
|
else if (type === 'ytd') {
|
|
9518
9519
|
// On user clicks on the buttons, or a delayed action running from
|
|
@@ -9523,14 +9524,17 @@
|
|
|
9523
9524
|
// event (below). When the series are initialized, but before
|
|
9524
9525
|
// the chart is rendered, we have access to the xData array
|
|
9525
9526
|
// (#942).
|
|
9526
|
-
if (typeof dataMax === 'undefined'
|
|
9527
|
+
if (typeof dataMax === 'undefined' ||
|
|
9528
|
+
typeof dataMin === 'undefined') {
|
|
9527
9529
|
dataMin = Number.MAX_VALUE;
|
|
9528
9530
|
dataMax = Number.MIN_VALUE;
|
|
9529
9531
|
chart.series.forEach(function (series) {
|
|
9530
9532
|
// reassign it to the last item
|
|
9531
9533
|
var xData = series.xData;
|
|
9532
|
-
|
|
9533
|
-
|
|
9534
|
+
if (xData) {
|
|
9535
|
+
dataMin = Math.min(xData[0], dataMin);
|
|
9536
|
+
dataMax = Math.max(xData[xData.length - 1], dataMax);
|
|
9537
|
+
}
|
|
9534
9538
|
});
|
|
9535
9539
|
redraw = false;
|
|
9536
9540
|
}
|
|
@@ -9550,16 +9554,15 @@
|
|
|
9550
9554
|
// If the navigator exist and the axis range is declared reset that
|
|
9551
9555
|
// range and from now on only use the range set by a user, #14742.
|
|
9552
9556
|
if (chart.navigator && chart.navigator.baseSeries[0]) {
|
|
9553
|
-
chart.navigator.baseSeries[0].xAxis.options
|
|
9554
|
-
.range = void 0;
|
|
9557
|
+
chart.navigator.baseSeries[0].xAxis.options.range = void 0;
|
|
9555
9558
|
}
|
|
9556
9559
|
newMin = dataMin;
|
|
9557
9560
|
newMax = dataMax;
|
|
9558
9561
|
}
|
|
9559
|
-
if (defined(newMin)) {
|
|
9562
|
+
if (addOffsetMin && rangeOptions._offsetMin && defined(newMin)) {
|
|
9560
9563
|
newMin += rangeOptions._offsetMin;
|
|
9561
9564
|
}
|
|
9562
|
-
if (defined(newMax)) {
|
|
9565
|
+
if (rangeOptions._offsetMax && defined(newMax)) {
|
|
9563
9566
|
newMax += rangeOptions._offsetMax;
|
|
9564
9567
|
}
|
|
9565
9568
|
if (this.dropdown) {
|
|
@@ -9616,10 +9619,10 @@
|
|
|
9616
9619
|
var minInput = rangeSelector.minInput,
|
|
9617
9620
|
maxInput = rangeSelector.maxInput;
|
|
9618
9621
|
// #3274 in some case blur is not defined
|
|
9619
|
-
if (minInput && minInput.blur) {
|
|
9622
|
+
if (minInput && (minInput.blur)) {
|
|
9620
9623
|
fireEvent(minInput, 'blur');
|
|
9621
9624
|
}
|
|
9622
|
-
if (maxInput && maxInput.blur) {
|
|
9625
|
+
if (maxInput && (maxInput.blur)) {
|
|
9623
9626
|
fireEvent(maxInput, 'blur');
|
|
9624
9627
|
}
|
|
9625
9628
|
};
|
|
@@ -9938,7 +9941,7 @@
|
|
|
9938
9941
|
}
|
|
9939
9942
|
else if (H.isSafari && !hasTimezone(input)) {
|
|
9940
9943
|
var offset = new Date(input).getTimezoneOffset() / 60;
|
|
9941
|
-
input += offset <= 0 ? "+"
|
|
9944
|
+
input += offset <= 0 ? "+".concat(pad(-offset), ":00") : "-".concat(pad(offset), ":00");
|
|
9942
9945
|
}
|
|
9943
9946
|
var date = Date.parse(input);
|
|
9944
9947
|
// If the value isn't parsed directly to a value by the
|
|
@@ -10060,7 +10063,7 @@
|
|
|
10060
10063
|
// Styles
|
|
10061
10064
|
label.css(merge(chartStyle, options.labelStyle));
|
|
10062
10065
|
dateBox.css(merge({
|
|
10063
|
-
color: "#333333" /* neutralColor80 */
|
|
10066
|
+
color: "#333333" /* Palette.neutralColor80 */
|
|
10064
10067
|
}, chartStyle, options.inputStyle));
|
|
10065
10068
|
css(input, extend({
|
|
10066
10069
|
position: 'absolute',
|
|
@@ -10698,7 +10701,7 @@
|
|
|
10698
10701
|
var userButtonTheme = (chart.userOptions.rangeSelector &&
|
|
10699
10702
|
chart.userOptions.rangeSelector.buttonTheme) || {};
|
|
10700
10703
|
var getAttribs = function (text) { return ({
|
|
10701
|
-
text: text ? text + " \u25BE" : '▾',
|
|
10704
|
+
text: text ? "" + text + " \u25BE" : '▾',
|
|
10702
10705
|
width: 'auto',
|
|
10703
10706
|
paddingLeft: pick(options.buttonTheme.paddingLeft,
|
|
10704
10707
|
userButtonTheme.padding, 8),
|
|
@@ -11027,8 +11030,8 @@
|
|
|
11027
11030
|
min = max - rangeOptions;
|
|
11028
11031
|
range = rangeOptions;
|
|
11029
11032
|
}
|
|
11030
|
-
else {
|
|
11031
|
-
min = max + getTrueRange(max, -rangeOptions.count);
|
|
11033
|
+
else if (rangeOptions) {
|
|
11034
|
+
min = max + getTrueRange(max, -(rangeOptions.count || 1));
|
|
11032
11035
|
// Let the fixedRange reflect initial settings (#5930)
|
|
11033
11036
|
if (this.chart) {
|
|
11034
11037
|
this.chart.fixedRange = max - min;
|
|
@@ -11043,11 +11046,16 @@
|
|
|
11043
11046
|
if (typeof range === 'undefined') { // #4501
|
|
11044
11047
|
range = getTrueRange(min, rangeOptions.count);
|
|
11045
11048
|
}
|
|
11046
|
-
this.newMax = Math.min(min + range, this.dataMax);
|
|
11049
|
+
this.newMax = Math.min(min + range, pick(this.dataMax, Number.MAX_VALUE));
|
|
11047
11050
|
}
|
|
11048
11051
|
if (!isNumber(max)) {
|
|
11049
11052
|
min = void 0;
|
|
11050
11053
|
}
|
|
11054
|
+
else if (!isNumber(rangeOptions) &&
|
|
11055
|
+
rangeOptions &&
|
|
11056
|
+
rangeOptions._offsetMin) {
|
|
11057
|
+
min += rangeOptions._offsetMin;
|
|
11058
|
+
}
|
|
11051
11059
|
return min;
|
|
11052
11060
|
};
|
|
11053
11061
|
if (!H.RangeSelector) {
|
|
@@ -11599,13 +11607,13 @@
|
|
|
11599
11607
|
*
|
|
11600
11608
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
11601
11609
|
*/
|
|
11602
|
-
backgroundColor: "#f2f2f2" /* neutralColor5 */,
|
|
11610
|
+
backgroundColor: "#f2f2f2" /* Palette.neutralColor5 */,
|
|
11603
11611
|
/**
|
|
11604
11612
|
* The stroke for the handle border and the stripes inside.
|
|
11605
11613
|
*
|
|
11606
11614
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
11607
11615
|
*/
|
|
11608
|
-
borderColor: "#999999" /* neutralColor40 */
|
|
11616
|
+
borderColor: "#999999" /* Palette.neutralColor40 */
|
|
11609
11617
|
},
|
|
11610
11618
|
/**
|
|
11611
11619
|
* The color of the mask covering the areas of the navigator series
|
|
@@ -11622,7 +11630,7 @@
|
|
|
11622
11630
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
11623
11631
|
* @default rgba(102,133,194,0.3)
|
|
11624
11632
|
*/
|
|
11625
|
-
maskFill: color("#6685c2" /* highlightColor60 */).setOpacity(0.3).get(),
|
|
11633
|
+
maskFill: color("#6685c2" /* Palette.highlightColor60 */).setOpacity(0.3).get(),
|
|
11626
11634
|
/**
|
|
11627
11635
|
* The color of the line marking the currently zoomed area in the
|
|
11628
11636
|
* navigator.
|
|
@@ -11633,7 +11641,7 @@
|
|
|
11633
11641
|
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
11634
11642
|
* @default #cccccc
|
|
11635
11643
|
*/
|
|
11636
|
-
outlineColor: "#cccccc" /* neutralColor20 */,
|
|
11644
|
+
outlineColor: "#cccccc" /* Palette.neutralColor20 */,
|
|
11637
11645
|
/**
|
|
11638
11646
|
* The width of the line marking the currently zoomed area in the
|
|
11639
11647
|
* navigator.
|
|
@@ -11824,7 +11832,7 @@
|
|
|
11824
11832
|
className: 'highcharts-navigator-xaxis',
|
|
11825
11833
|
tickLength: 0,
|
|
11826
11834
|
lineWidth: 0,
|
|
11827
|
-
gridLineColor: "#e6e6e6" /* neutralColor10 */,
|
|
11835
|
+
gridLineColor: "#e6e6e6" /* Palette.neutralColor10 */,
|
|
11828
11836
|
gridLineWidth: 1,
|
|
11829
11837
|
tickPixelInterval: 200,
|
|
11830
11838
|
labels: {
|
|
@@ -11834,7 +11842,7 @@
|
|
|
11834
11842
|
*/
|
|
11835
11843
|
style: {
|
|
11836
11844
|
/** @ignore */
|
|
11837
|
-
color: "#999999" /* neutralColor40 */
|
|
11845
|
+
color: "#999999" /* Palette.neutralColor40 */
|
|
11838
11846
|
},
|
|
11839
11847
|
x: 3,
|
|
11840
11848
|
y: -4
|