@amcharts/amcharts5 5.2.49 → 5.3.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/.internal/charts/flow/Chord.js +151 -199
- package/.internal/charts/flow/Chord.js.map +1 -1
- package/.internal/charts/flow/ChordDirected.js +46 -66
- package/.internal/charts/flow/ChordDirected.js.map +1 -1
- package/.internal/charts/flow/ChordLink.js +32 -42
- package/.internal/charts/flow/ChordLink.js.map +1 -1
- package/.internal/charts/flow/ChordLinkDirected.js +17 -29
- package/.internal/charts/flow/ChordLinkDirected.js.map +1 -1
- package/.internal/charts/flow/ChordNodes.js +70 -86
- package/.internal/charts/flow/ChordNodes.js.map +1 -1
- package/.internal/charts/flow/ChordNonRibbon.js +63 -91
- package/.internal/charts/flow/ChordNonRibbon.js.map +1 -1
- package/.internal/charts/flow/Flow.js +289 -356
- package/.internal/charts/flow/Flow.js.map +1 -1
- package/.internal/charts/flow/FlowDefaultTheme.js +187 -199
- package/.internal/charts/flow/FlowDefaultTheme.js.map +1 -1
- package/.internal/charts/flow/FlowLink.js +34 -49
- package/.internal/charts/flow/FlowLink.js.map +1 -1
- package/.internal/charts/flow/FlowNode.js +17 -22
- package/.internal/charts/flow/FlowNode.js.map +1 -1
- package/.internal/charts/flow/FlowNodes.js +141 -202
- package/.internal/charts/flow/FlowNodes.js.map +1 -1
- package/.internal/charts/flow/Sankey.js +165 -203
- package/.internal/charts/flow/Sankey.js.map +1 -1
- package/.internal/charts/flow/SankeyLink.js +207 -229
- package/.internal/charts/flow/SankeyLink.js.map +1 -1
- package/.internal/charts/flow/SankeyNodes.js +70 -90
- package/.internal/charts/flow/SankeyNodes.js.map +1 -1
- package/.internal/charts/funnel/FunnelSeries.js +353 -447
- package/.internal/charts/funnel/FunnelSeries.js.map +1 -1
- package/.internal/charts/funnel/FunnelSlice.js +96 -117
- package/.internal/charts/funnel/FunnelSlice.js.map +1 -1
- package/.internal/charts/funnel/PictorialStackedSeries.js +59 -79
- package/.internal/charts/funnel/PictorialStackedSeries.js.map +1 -1
- package/.internal/charts/funnel/PyramidSeries.js +106 -122
- package/.internal/charts/funnel/PyramidSeries.js.map +1 -1
- package/.internal/charts/funnel/SlicedChart.js +17 -29
- package/.internal/charts/funnel/SlicedChart.js.map +1 -1
- package/.internal/charts/hierarchy/BreadcrumbBar.js +69 -96
- package/.internal/charts/hierarchy/BreadcrumbBar.js.map +1 -1
- package/.internal/charts/hierarchy/ForceDirected.js +255 -370
- package/.internal/charts/hierarchy/ForceDirected.js.map +1 -1
- package/.internal/charts/hierarchy/Hierarchy.js +476 -640
- package/.internal/charts/hierarchy/Hierarchy.js.map +1 -1
- package/.internal/charts/hierarchy/HierarchyDefaultTheme.js +337 -349
- package/.internal/charts/hierarchy/HierarchyDefaultTheme.js.map +1 -1
- package/.internal/charts/hierarchy/HierarchyLink.js +43 -61
- package/.internal/charts/hierarchy/HierarchyLink.js.map +1 -1
- package/.internal/charts/hierarchy/HierarchyNode.js +57 -74
- package/.internal/charts/hierarchy/HierarchyNode.js.map +1 -1
- package/.internal/charts/hierarchy/LinkedHierarchy.js +229 -323
- package/.internal/charts/hierarchy/LinkedHierarchy.js.map +1 -1
- package/.internal/charts/hierarchy/LinkedHierarchyNode.js +48 -80
- package/.internal/charts/hierarchy/LinkedHierarchyNode.js.map +1 -1
- package/.internal/charts/hierarchy/Pack.js +105 -147
- package/.internal/charts/hierarchy/Pack.js.map +1 -1
- package/.internal/charts/hierarchy/Partition.js +183 -230
- package/.internal/charts/hierarchy/Partition.js.map +1 -1
- package/.internal/charts/hierarchy/Sunburst.js +259 -323
- package/.internal/charts/hierarchy/Sunburst.js.map +1 -1
- package/.internal/charts/hierarchy/Tree.js +49 -69
- package/.internal/charts/hierarchy/Tree.js.map +1 -1
- package/.internal/charts/hierarchy/Treemap.js +168 -209
- package/.internal/charts/hierarchy/Treemap.js.map +1 -1
- package/.internal/charts/map/GraticuleSeries.js +49 -70
- package/.internal/charts/map/GraticuleSeries.js.map +1 -1
- package/.internal/charts/map/MapChart.js +587 -751
- package/.internal/charts/map/MapChart.js.map +1 -1
- package/.internal/charts/map/MapChartDefaultTheme.js +98 -110
- package/.internal/charts/map/MapChartDefaultTheme.js.map +1 -1
- package/.internal/charts/map/MapLine.js +165 -196
- package/.internal/charts/map/MapLine.js.map +1 -1
- package/.internal/charts/map/MapLineSeries.js +130 -197
- package/.internal/charts/map/MapLineSeries.js.map +1 -1
- package/.internal/charts/map/MapPointSeries.d.ts +7 -2
- package/.internal/charts/map/MapPointSeries.d.ts.map +1 -1
- package/.internal/charts/map/MapPointSeries.js +265 -342
- package/.internal/charts/map/MapPointSeries.js.map +1 -1
- package/.internal/charts/map/MapPolygon.js +86 -122
- package/.internal/charts/map/MapPolygon.js.map +1 -1
- package/.internal/charts/map/MapPolygonSeries.d.ts +6 -1
- package/.internal/charts/map/MapPolygonSeries.d.ts.map +1 -1
- package/.internal/charts/map/MapPolygonSeries.js +110 -170
- package/.internal/charts/map/MapPolygonSeries.js.map +1 -1
- package/.internal/charts/map/MapSeries.d.ts +9 -3
- package/.internal/charts/map/MapSeries.d.ts.map +1 -1
- package/.internal/charts/map/MapSeries.js +212 -303
- package/.internal/charts/map/MapSeries.js.map +1 -1
- package/.internal/charts/map/MapUtils.js +19 -19
- package/.internal/charts/map/MapUtils.js.map +1 -1
- package/.internal/charts/map/ZoomControl.js +52 -67
- package/.internal/charts/map/ZoomControl.js.map +1 -1
- package/.internal/charts/percent/PercentChart.js +23 -40
- package/.internal/charts/percent/PercentChart.js.map +1 -1
- package/.internal/charts/percent/PercentDefaultTheme.js +196 -208
- package/.internal/charts/percent/PercentDefaultTheme.js.map +1 -1
- package/.internal/charts/percent/PercentSeries.js +378 -549
- package/.internal/charts/percent/PercentSeries.js.map +1 -1
- package/.internal/charts/pie/PieChart.js +85 -110
- package/.internal/charts/pie/PieChart.js.map +1 -1
- package/.internal/charts/pie/PieSeries.js +175 -232
- package/.internal/charts/pie/PieSeries.js.map +1 -1
- package/.internal/charts/radar/AxisRendererCircular.js +219 -307
- package/.internal/charts/radar/AxisRendererCircular.js.map +1 -1
- package/.internal/charts/radar/AxisRendererRadial.js +188 -276
- package/.internal/charts/radar/AxisRendererRadial.js.map +1 -1
- package/.internal/charts/radar/ClockHand.js +89 -104
- package/.internal/charts/radar/ClockHand.js.map +1 -1
- package/.internal/charts/radar/RadarChart.js +142 -201
- package/.internal/charts/radar/RadarChart.js.map +1 -1
- package/.internal/charts/radar/RadarColumnSeries.js +118 -170
- package/.internal/charts/radar/RadarColumnSeries.js.map +1 -1
- package/.internal/charts/radar/RadarCursor.js +147 -220
- package/.internal/charts/radar/RadarCursor.js.map +1 -1
- package/.internal/charts/radar/RadarDefaultTheme.js +85 -97
- package/.internal/charts/radar/RadarDefaultTheme.js.map +1 -1
- package/.internal/charts/radar/RadarLineSeries.js +71 -113
- package/.internal/charts/radar/RadarLineSeries.js.map +1 -1
- package/.internal/charts/radar/SmoothedRadarLineSeries.js +33 -55
- package/.internal/charts/radar/SmoothedRadarLineSeries.js.map +1 -1
- package/.internal/charts/stock/PanelControls.js +49 -60
- package/.internal/charts/stock/PanelControls.js.map +1 -1
- package/.internal/charts/stock/SettingsModal.js +321 -393
- package/.internal/charts/stock/SettingsModal.js.map +1 -1
- package/.internal/charts/stock/StockChart.d.ts.map +1 -1
- package/.internal/charts/stock/StockChart.js +466 -568
- package/.internal/charts/stock/StockChart.js.map +1 -1
- package/.internal/charts/stock/StockChartDefaultTheme.d.ts.map +1 -1
- package/.internal/charts/stock/StockChartDefaultTheme.js +1162 -1162
- package/.internal/charts/stock/StockChartDefaultTheme.js.map +1 -1
- package/.internal/charts/stock/StockLegend.js +65 -91
- package/.internal/charts/stock/StockLegend.js.map +1 -1
- package/.internal/charts/stock/StockPanel.js +87 -119
- package/.internal/charts/stock/StockPanel.js.map +1 -1
- package/.internal/charts/stock/drawing/AverageSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/AverageSeries.js +48 -60
- package/.internal/charts/stock/drawing/AverageSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/CalloutSeries.d.ts +7 -2
- package/.internal/charts/stock/drawing/CalloutSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/CalloutSeries.js +90 -95
- package/.internal/charts/stock/drawing/CalloutSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/DoodleSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/DoodleSeries.js +82 -122
- package/.internal/charts/stock/drawing/DoodleSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/DrawingSeries.d.ts +5 -3
- package/.internal/charts/stock/drawing/DrawingSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/DrawingSeries.js +519 -712
- package/.internal/charts/stock/drawing/DrawingSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/EllipseSeries.d.ts +3 -0
- package/.internal/charts/stock/drawing/EllipseSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/EllipseSeries.js +258 -307
- package/.internal/charts/stock/drawing/EllipseSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/FibonacciSeries.d.ts +2 -3
- package/.internal/charts/stock/drawing/FibonacciSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/FibonacciSeries.js +189 -250
- package/.internal/charts/stock/drawing/FibonacciSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/FibonacciTimezoneSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/FibonacciTimezoneSeries.js +108 -103
- package/.internal/charts/stock/drawing/FibonacciTimezoneSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/HorizontalLineSeries.d.ts +4 -2
- package/.internal/charts/stock/drawing/HorizontalLineSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/HorizontalLineSeries.js +64 -84
- package/.internal/charts/stock/drawing/HorizontalLineSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/HorizontalRaySeries.d.ts +2 -1
- package/.internal/charts/stock/drawing/HorizontalRaySeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/HorizontalRaySeries.js +57 -92
- package/.internal/charts/stock/drawing/HorizontalRaySeries.js.map +1 -1
- package/.internal/charts/stock/drawing/IconSeries.d.ts +2 -4
- package/.internal/charts/stock/drawing/IconSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/IconSeries.js +112 -112
- package/.internal/charts/stock/drawing/IconSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/LabelSeries.d.ts +5 -2
- package/.internal/charts/stock/drawing/LabelSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/LabelSeries.js +151 -172
- package/.internal/charts/stock/drawing/LabelSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/PolylineSeries.d.ts +1 -0
- package/.internal/charts/stock/drawing/PolylineSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/PolylineSeries.js +101 -122
- package/.internal/charts/stock/drawing/PolylineSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/QuadrantLineSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/QuadrantLineSeries.js +115 -149
- package/.internal/charts/stock/drawing/QuadrantLineSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/RectangleSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/RectangleSeries.js +117 -155
- package/.internal/charts/stock/drawing/RectangleSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/RegressionSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/RegressionSeries.js +64 -82
- package/.internal/charts/stock/drawing/RegressionSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/SimpleLineSeries.d.ts +6 -2
- package/.internal/charts/stock/drawing/SimpleLineSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/SimpleLineSeries.js +233 -303
- package/.internal/charts/stock/drawing/SimpleLineSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/TrendLineSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/TrendLineSeries.js +40 -57
- package/.internal/charts/stock/drawing/TrendLineSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/VerticalLineSeries.d.ts +3 -1
- package/.internal/charts/stock/drawing/VerticalLineSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/VerticalLineSeries.js +63 -79
- package/.internal/charts/stock/drawing/VerticalLineSeries.js.map +1 -1
- package/.internal/charts/stock/indicators/AccumulationDistribution.js +68 -88
- package/.internal/charts/stock/indicators/AccumulationDistribution.js.map +1 -1
- package/.internal/charts/stock/indicators/AccumulativeSwingIndex.js +107 -127
- package/.internal/charts/stock/indicators/AccumulativeSwingIndex.js.map +1 -1
- package/.internal/charts/stock/indicators/Aroon.js +85 -110
- package/.internal/charts/stock/indicators/Aroon.js.map +1 -1
- package/.internal/charts/stock/indicators/AwesomeOscillator.js +68 -88
- package/.internal/charts/stock/indicators/AwesomeOscillator.js.map +1 -1
- package/.internal/charts/stock/indicators/BollingerBands.js +109 -135
- package/.internal/charts/stock/indicators/BollingerBands.js.map +1 -1
- package/.internal/charts/stock/indicators/ChaikinMoneyFlow.js +77 -97
- package/.internal/charts/stock/indicators/ChaikinMoneyFlow.js.map +1 -1
- package/.internal/charts/stock/indicators/ChaikinOscillator.js +75 -95
- package/.internal/charts/stock/indicators/ChaikinOscillator.js.map +1 -1
- package/.internal/charts/stock/indicators/ChartIndicator.js +86 -102
- package/.internal/charts/stock/indicators/ChartIndicator.js.map +1 -1
- package/.internal/charts/stock/indicators/CommodityChannelIndex.js +136 -161
- package/.internal/charts/stock/indicators/CommodityChannelIndex.js.map +1 -1
- package/.internal/charts/stock/indicators/DisparityIndex.js +69 -89
- package/.internal/charts/stock/indicators/DisparityIndex.js.map +1 -1
- package/.internal/charts/stock/indicators/Indicator.d.ts +1 -2
- package/.internal/charts/stock/indicators/Indicator.d.ts.map +1 -1
- package/.internal/charts/stock/indicators/Indicator.js +286 -383
- package/.internal/charts/stock/indicators/Indicator.js.map +1 -1
- package/.internal/charts/stock/indicators/MACD.js +129 -159
- package/.internal/charts/stock/indicators/MACD.js.map +1 -1
- package/.internal/charts/stock/indicators/MedianPrice.js +56 -71
- package/.internal/charts/stock/indicators/MedianPrice.js.map +1 -1
- package/.internal/charts/stock/indicators/MovingAverage.js +95 -115
- package/.internal/charts/stock/indicators/MovingAverage.js.map +1 -1
- package/.internal/charts/stock/indicators/MovingAverageDeviation.js +93 -118
- package/.internal/charts/stock/indicators/MovingAverageDeviation.js.map +1 -1
- package/.internal/charts/stock/indicators/MovingAverageEnvelope.js +114 -144
- package/.internal/charts/stock/indicators/MovingAverageEnvelope.js.map +1 -1
- package/.internal/charts/stock/indicators/OnBalanceVolume.js +65 -85
- package/.internal/charts/stock/indicators/OnBalanceVolume.js.map +1 -1
- package/.internal/charts/stock/indicators/RelativeStrengthIndex.js +162 -187
- package/.internal/charts/stock/indicators/RelativeStrengthIndex.js.map +1 -1
- package/.internal/charts/stock/indicators/StandardDeviation.js +56 -72
- package/.internal/charts/stock/indicators/StandardDeviation.js.map +1 -1
- package/.internal/charts/stock/indicators/StochasticOscillator.js +142 -173
- package/.internal/charts/stock/indicators/StochasticOscillator.js.map +1 -1
- package/.internal/charts/stock/indicators/Trix.js +90 -120
- package/.internal/charts/stock/indicators/Trix.js.map +1 -1
- package/.internal/charts/stock/indicators/TypicalPrice.js +56 -71
- package/.internal/charts/stock/indicators/TypicalPrice.js.map +1 -1
- package/.internal/charts/stock/indicators/VWAP.js +78 -98
- package/.internal/charts/stock/indicators/VWAP.js.map +1 -1
- package/.internal/charts/stock/indicators/Volume.js +55 -75
- package/.internal/charts/stock/indicators/Volume.js.map +1 -1
- package/.internal/charts/stock/indicators/WilliamsR.js +138 -163
- package/.internal/charts/stock/indicators/WilliamsR.js.map +1 -1
- package/.internal/charts/stock/indicators/ZigZag.js +141 -161
- package/.internal/charts/stock/indicators/ZigZag.js.map +1 -1
- package/.internal/charts/stock/toolbar/ColorControl.js +78 -101
- package/.internal/charts/stock/toolbar/ColorControl.js.map +1 -1
- package/.internal/charts/stock/toolbar/ComparisonControl.js +16 -28
- package/.internal/charts/stock/toolbar/ComparisonControl.js.map +1 -1
- package/.internal/charts/stock/toolbar/DateRangeSelector.js +1157 -345
- package/.internal/charts/stock/toolbar/DateRangeSelector.js.map +1 -1
- package/.internal/charts/stock/toolbar/DrawingControl.d.ts +26 -0
- package/.internal/charts/stock/toolbar/DrawingControl.d.ts.map +1 -1
- package/.internal/charts/stock/toolbar/DrawingControl.js +754 -709
- package/.internal/charts/stock/toolbar/DrawingControl.js.map +1 -1
- package/.internal/charts/stock/toolbar/DrawingToolControl.js +80 -119
- package/.internal/charts/stock/toolbar/DrawingToolControl.js.map +1 -1
- package/.internal/charts/stock/toolbar/Dropdown.js +102 -150
- package/.internal/charts/stock/toolbar/Dropdown.js.map +1 -1
- package/.internal/charts/stock/toolbar/DropdownColors.js +92 -141
- package/.internal/charts/stock/toolbar/DropdownColors.js.map +1 -1
- package/.internal/charts/stock/toolbar/DropdownList.js +186 -249
- package/.internal/charts/stock/toolbar/DropdownList.js.map +1 -1
- package/.internal/charts/stock/toolbar/DropdownListControl.js +117 -150
- package/.internal/charts/stock/toolbar/DropdownListControl.js.map +1 -1
- package/.internal/charts/stock/toolbar/IconControl.js +81 -120
- package/.internal/charts/stock/toolbar/IconControl.js.map +1 -1
- package/.internal/charts/stock/toolbar/IndicatorControl.d.ts +23 -1
- package/.internal/charts/stock/toolbar/IndicatorControl.d.ts.map +1 -1
- package/.internal/charts/stock/toolbar/IndicatorControl.js +352 -297
- package/.internal/charts/stock/toolbar/IndicatorControl.js.map +1 -1
- package/.internal/charts/stock/toolbar/IntervalControl.js +16 -28
- package/.internal/charts/stock/toolbar/IntervalControl.js.map +1 -1
- package/.internal/charts/stock/toolbar/PeriodSelector.js +141 -189
- package/.internal/charts/stock/toolbar/PeriodSelector.js.map +1 -1
- package/.internal/charts/stock/toolbar/ResetControl.js +26 -44
- package/.internal/charts/stock/toolbar/ResetControl.js.map +1 -1
- package/.internal/charts/stock/toolbar/SeriesTypeControl.js +14 -21
- package/.internal/charts/stock/toolbar/SeriesTypeControl.js.map +1 -1
- package/.internal/charts/stock/toolbar/SettingsControl.js +97 -140
- package/.internal/charts/stock/toolbar/SettingsControl.js.map +1 -1
- package/.internal/charts/stock/toolbar/StockControl.js +114 -177
- package/.internal/charts/stock/toolbar/StockControl.js.map +1 -1
- package/.internal/charts/stock/toolbar/StockIcons.js +67 -81
- package/.internal/charts/stock/toolbar/StockIcons.js.map +1 -1
- package/.internal/charts/stock/toolbar/StockToolbar.js +63 -94
- package/.internal/charts/stock/toolbar/StockToolbar.js.map +1 -1
- package/.internal/charts/stock/toolbar/StockToolbarCSS.js +11 -11
- package/.internal/charts/stock/toolbar/StockToolbarCSS.js.map +1 -1
- package/.internal/charts/venn/Venn.js +276 -373
- package/.internal/charts/venn/Venn.js.map +1 -1
- package/.internal/charts/venn/VennDefaultTheme.js +18 -30
- package/.internal/charts/venn/VennDefaultTheme.js.map +1 -1
- package/.internal/charts/wordcloud/WordCloud.js +381 -452
- package/.internal/charts/wordcloud/WordCloud.js.map +1 -1
- package/.internal/charts/wordcloud/WordCloudDefaultTheme.js +35 -48
- package/.internal/charts/wordcloud/WordCloudDefaultTheme.js.map +1 -1
- package/.internal/charts/xy/XYChart.js +956 -1136
- package/.internal/charts/xy/XYChart.js.map +1 -1
- package/.internal/charts/xy/XYChartDefaultTheme.d.ts.map +1 -1
- package/.internal/charts/xy/XYChartDefaultTheme.js +597 -604
- package/.internal/charts/xy/XYChartDefaultTheme.js.map +1 -1
- package/.internal/charts/xy/XYChartScrollbar.js +78 -95
- package/.internal/charts/xy/XYChartScrollbar.js.map +1 -1
- package/.internal/charts/xy/XYCursor.d.ts.map +1 -1
- package/.internal/charts/xy/XYCursor.js +468 -608
- package/.internal/charts/xy/XYCursor.js.map +1 -1
- package/.internal/charts/xy/axes/Axis.d.ts +0 -2
- package/.internal/charts/xy/axes/Axis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/Axis.js +509 -726
- package/.internal/charts/xy/axes/Axis.js.map +1 -1
- package/.internal/charts/xy/axes/AxisBullet.js +30 -40
- package/.internal/charts/xy/axes/AxisBullet.js.map +1 -1
- package/.internal/charts/xy/axes/AxisLabel.js +17 -22
- package/.internal/charts/xy/axes/AxisLabel.js.map +1 -1
- package/.internal/charts/xy/axes/AxisLabelRadial.js +17 -22
- package/.internal/charts/xy/axes/AxisLabelRadial.js.map +1 -1
- package/.internal/charts/xy/axes/AxisRenderer.js +186 -302
- package/.internal/charts/xy/axes/AxisRenderer.js.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererX.js +308 -400
- package/.internal/charts/xy/axes/AxisRendererX.js.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererY.js +319 -421
- package/.internal/charts/xy/axes/AxisRendererY.js.map +1 -1
- package/.internal/charts/xy/axes/AxisTick.js +17 -22
- package/.internal/charts/xy/axes/AxisTick.js.map +1 -1
- package/.internal/charts/xy/axes/CategoryAxis.js +312 -454
- package/.internal/charts/xy/axes/CategoryAxis.js.map +1 -1
- package/.internal/charts/xy/axes/CategoryDateAxis.js +136 -167
- package/.internal/charts/xy/axes/CategoryDateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/DateAxis.js +579 -758
- package/.internal/charts/xy/axes/DateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/DurationAxis.js +92 -128
- package/.internal/charts/xy/axes/DurationAxis.js.map +1 -1
- package/.internal/charts/xy/axes/GaplessDateAxis.js +207 -254
- package/.internal/charts/xy/axes/GaplessDateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/Grid.js +19 -31
- package/.internal/charts/xy/axes/Grid.js.map +1 -1
- package/.internal/charts/xy/axes/ValueAxis.js +848 -1041
- package/.internal/charts/xy/axes/ValueAxis.js.map +1 -1
- package/.internal/charts/xy/series/BaseColumnSeries.js +480 -576
- package/.internal/charts/xy/series/BaseColumnSeries.js.map +1 -1
- package/.internal/charts/xy/series/Candlestick.js +27 -44
- package/.internal/charts/xy/series/Candlestick.js.map +1 -1
- package/.internal/charts/xy/series/CandlestickSeries.js +114 -140
- package/.internal/charts/xy/series/CandlestickSeries.js.map +1 -1
- package/.internal/charts/xy/series/ColumnSeries.js +33 -49
- package/.internal/charts/xy/series/ColumnSeries.js.map +1 -1
- package/.internal/charts/xy/series/LineSeries.js +447 -548
- package/.internal/charts/xy/series/LineSeries.js.map +1 -1
- package/.internal/charts/xy/series/OHLC.js +36 -48
- package/.internal/charts/xy/series/OHLC.js.map +1 -1
- package/.internal/charts/xy/series/OHLCSeries.js +32 -48
- package/.internal/charts/xy/series/OHLCSeries.js.map +1 -1
- package/.internal/charts/xy/series/SmoothedXLineSeries.js +23 -40
- package/.internal/charts/xy/series/SmoothedXLineSeries.js.map +1 -1
- package/.internal/charts/xy/series/SmoothedXYLineSeries.js +23 -40
- package/.internal/charts/xy/series/SmoothedXYLineSeries.js.map +1 -1
- package/.internal/charts/xy/series/SmoothedYLineSeries.js +23 -40
- package/.internal/charts/xy/series/SmoothedYLineSeries.js.map +1 -1
- package/.internal/charts/xy/series/StepLineSeries.js +114 -131
- package/.internal/charts/xy/series/StepLineSeries.js.map +1 -1
- package/.internal/charts/xy/series/XYSeries.d.ts +1 -1
- package/.internal/charts/xy/series/XYSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/XYSeries.js +939 -1222
- package/.internal/charts/xy/series/XYSeries.js.map +1 -1
- package/.internal/core/Classes.d.ts +11 -7
- package/.internal/core/Classes.d.ts.map +1 -1
- package/.internal/core/Classes.js.map +1 -1
- package/.internal/core/Registry.d.ts.map +1 -1
- package/.internal/core/Registry.js +6 -8
- package/.internal/core/Registry.js.map +1 -1
- package/.internal/core/Root.d.ts +20 -0
- package/.internal/core/Root.d.ts.map +1 -1
- package/.internal/core/Root.js +1006 -1241
- package/.internal/core/Root.js.map +1 -1
- package/.internal/core/Theme.js +38 -67
- package/.internal/core/Theme.js.map +1 -1
- package/.internal/core/render/Bullet.js +34 -49
- package/.internal/core/render/Bullet.js.map +1 -1
- package/.internal/core/render/Button.js +47 -64
- package/.internal/core/render/Button.js.map +1 -1
- package/.internal/core/render/Chart.js +20 -25
- package/.internal/core/render/Chart.js.map +1 -1
- package/.internal/core/render/Circle.js +24 -41
- package/.internal/core/render/Circle.js.map +1 -1
- package/.internal/core/render/Component.js +239 -384
- package/.internal/core/render/Component.js.map +1 -1
- package/.internal/core/render/Container.d.ts.map +1 -1
- package/.internal/core/render/Container.js +444 -548
- package/.internal/core/render/Container.js.map +1 -1
- package/.internal/core/render/Ellipse.js +24 -41
- package/.internal/core/render/Ellipse.js.map +1 -1
- package/.internal/core/render/Graphics.d.ts.map +1 -1
- package/.internal/core/render/Graphics.js +197 -215
- package/.internal/core/render/Graphics.js.map +1 -1
- package/.internal/core/render/GridLayout.js +102 -125
- package/.internal/core/render/GridLayout.js.map +1 -1
- package/.internal/core/render/HeatLegend.js +129 -154
- package/.internal/core/render/HeatLegend.js.map +1 -1
- package/.internal/core/render/HorizontalLayout.js +79 -91
- package/.internal/core/render/HorizontalLayout.js.map +1 -1
- package/.internal/core/render/Label.js +109 -150
- package/.internal/core/render/Label.js.map +1 -1
- package/.internal/core/render/Layout.js +14 -21
- package/.internal/core/render/Layout.js.map +1 -1
- package/.internal/core/render/Legend.js +230 -282
- package/.internal/core/render/Legend.js.map +1 -1
- package/.internal/core/render/Line.js +37 -54
- package/.internal/core/render/Line.js.map +1 -1
- package/.internal/core/render/MonotoneXTension.js +58 -85
- package/.internal/core/render/MonotoneXTension.js.map +1 -1
- package/.internal/core/render/MonotoneYTension.js +59 -88
- package/.internal/core/render/MonotoneYTension.js.map +1 -1
- package/.internal/core/render/Picture.js +92 -113
- package/.internal/core/render/Picture.js.map +1 -1
- package/.internal/core/render/PointedRectangle.js +94 -111
- package/.internal/core/render/PointedRectangle.js.map +1 -1
- package/.internal/core/render/RadialLabel.js +119 -158
- package/.internal/core/render/RadialLabel.js.map +1 -1
- package/.internal/core/render/RadialText.js +47 -62
- package/.internal/core/render/RadialText.js.map +1 -1
- package/.internal/core/render/Rectangle.js +31 -58
- package/.internal/core/render/Rectangle.js.map +1 -1
- package/.internal/core/render/RoundedRectangle.js +55 -72
- package/.internal/core/render/RoundedRectangle.js.map +1 -1
- package/.internal/core/render/Scrollbar.js +292 -349
- package/.internal/core/render/Scrollbar.js.map +1 -1
- package/.internal/core/render/SerialChart.js +64 -85
- package/.internal/core/render/SerialChart.js.map +1 -1
- package/.internal/core/render/Series.js +472 -660
- package/.internal/core/render/Series.js.map +1 -1
- package/.internal/core/render/Slice.js +83 -103
- package/.internal/core/render/Slice.js.map +1 -1
- package/.internal/core/render/Slider.js +25 -42
- package/.internal/core/render/Slider.js.map +1 -1
- package/.internal/core/render/Sprite.d.ts +17 -1
- package/.internal/core/render/Sprite.d.ts.map +1 -1
- package/.internal/core/render/Sprite.js +1307 -1777
- package/.internal/core/render/Sprite.js.map +1 -1
- package/.internal/core/render/SpriteResizer.js +157 -199
- package/.internal/core/render/SpriteResizer.js.map +1 -1
- package/.internal/core/render/Star.js +37 -54
- package/.internal/core/render/Star.js.map +1 -1
- package/.internal/core/render/Text.d.ts.map +1 -1
- package/.internal/core/render/Text.js +145 -182
- package/.internal/core/render/Text.js.map +1 -1
- package/.internal/core/render/Tick.js +14 -21
- package/.internal/core/render/Tick.js.map +1 -1
- package/.internal/core/render/Tooltip.d.ts +0 -1
- package/.internal/core/render/Tooltip.d.ts.map +1 -1
- package/.internal/core/render/Tooltip.js +272 -333
- package/.internal/core/render/Tooltip.js.map +1 -1
- package/.internal/core/render/Triangle.js +38 -65
- package/.internal/core/render/Triangle.js.map +1 -1
- package/.internal/core/render/VerticalLayout.js +79 -91
- package/.internal/core/render/VerticalLayout.js.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.d.ts +2 -2
- package/.internal/core/render/backend/CanvasRenderer.d.ts.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.js +2806 -3721
- package/.internal/core/render/backend/CanvasRenderer.js.map +1 -1
- package/.internal/core/render/backend/Renderer.d.ts +1 -0
- package/.internal/core/render/backend/Renderer.d.ts.map +1 -1
- package/.internal/core/render/backend/Renderer.js.map +1 -1
- package/.internal/core/render/gradients/Gradient.js +45 -72
- package/.internal/core/render/gradients/Gradient.js.map +1 -1
- package/.internal/core/render/gradients/LinearGradient.js +53 -65
- package/.internal/core/render/gradients/LinearGradient.js.map +1 -1
- package/.internal/core/render/gradients/RadialGradient.js +69 -81
- package/.internal/core/render/gradients/RadialGradient.js.map +1 -1
- package/.internal/core/render/patterns/CirclePattern.js +64 -81
- package/.internal/core/render/patterns/CirclePattern.js.map +1 -1
- package/.internal/core/render/patterns/LinePattern.js +49 -66
- package/.internal/core/render/patterns/LinePattern.js.map +1 -1
- package/.internal/core/render/patterns/PathPattern.js +72 -89
- package/.internal/core/render/patterns/PathPattern.js.map +1 -1
- package/.internal/core/render/patterns/Pattern.js +54 -83
- package/.internal/core/render/patterns/Pattern.js.map +1 -1
- package/.internal/core/render/patterns/PicturePattern.js +69 -90
- package/.internal/core/render/patterns/PicturePattern.js.map +1 -1
- package/.internal/core/render/patterns/RectanglePattern.js +65 -82
- package/.internal/core/render/patterns/RectanglePattern.js.map +1 -1
- package/.internal/core/util/Animation.js +102 -151
- package/.internal/core/util/Animation.js.map +1 -1
- package/.internal/core/util/Array.js +48 -49
- package/.internal/core/util/Array.js.map +1 -1
- package/.internal/core/util/AsyncPending.js +15 -15
- package/.internal/core/util/AsyncPending.js.map +1 -1
- package/.internal/core/util/Benchmark.js +37 -55
- package/.internal/core/util/Benchmark.js.map +1 -1
- package/.internal/core/util/Children.js +42 -67
- package/.internal/core/util/Children.js.map +1 -1
- package/.internal/core/util/Color.js +110 -206
- package/.internal/core/util/Color.js.map +1 -1
- package/.internal/core/util/ColorSet.js +73 -110
- package/.internal/core/util/ColorSet.js.map +1 -1
- package/.internal/core/util/Counter.js +13 -25
- package/.internal/core/util/Counter.js.map +1 -1
- package/.internal/core/util/Data.js +28 -70
- package/.internal/core/util/Data.js.map +1 -1
- package/.internal/core/util/DataParser.js +145 -178
- package/.internal/core/util/DataParser.js.map +1 -1
- package/.internal/core/util/DataProcessor.js +89 -144
- package/.internal/core/util/DataProcessor.js.map +1 -1
- package/.internal/core/util/DateFormatter.d.ts.map +1 -1
- package/.internal/core/util/DateFormatter.js +795 -901
- package/.internal/core/util/DateFormatter.js.map +1 -1
- package/.internal/core/util/Disposer.js +82 -159
- package/.internal/core/util/Disposer.js.map +1 -1
- package/.internal/core/util/Draw.js +27 -27
- package/.internal/core/util/Draw.js.map +1 -1
- package/.internal/core/util/DurationFormatter.js +343 -409
- package/.internal/core/util/DurationFormatter.js.map +1 -1
- package/.internal/core/util/Ease.js +6 -6
- package/.internal/core/util/Entity.d.ts +5 -1
- package/.internal/core/util/Entity.d.ts.map +1 -1
- package/.internal/core/util/Entity.js +869 -1442
- package/.internal/core/util/Entity.js.map +1 -1
- package/.internal/core/util/EventDispatcher.js +216 -346
- package/.internal/core/util/EventDispatcher.js.map +1 -1
- package/.internal/core/util/InterfaceColors.js +14 -21
- package/.internal/core/util/InterfaceColors.js.map +1 -1
- package/.internal/core/util/Language.js +63 -123
- package/.internal/core/util/Language.js.map +1 -1
- package/.internal/core/util/List.js +244 -441
- package/.internal/core/util/List.js.map +1 -1
- package/.internal/core/util/Math.js +35 -35
- package/.internal/core/util/Math.js.map +1 -1
- package/.internal/core/util/Matrix.js +56 -95
- package/.internal/core/util/Matrix.js.map +1 -1
- package/.internal/core/util/Modal.js +103 -147
- package/.internal/core/util/Modal.js.map +1 -1
- package/.internal/core/util/Net.js +19 -19
- package/.internal/core/util/Net.js.map +1 -1
- package/.internal/core/util/NumberFormatter.js +393 -442
- package/.internal/core/util/NumberFormatter.js.map +1 -1
- package/.internal/core/util/Object.js +4 -4
- package/.internal/core/util/Object.js.map +1 -1
- package/.internal/core/util/Order.js +5 -5
- package/.internal/core/util/Order.js.map +1 -1
- package/.internal/core/util/Percent.js +65 -90
- package/.internal/core/util/Percent.js.map +1 -1
- package/.internal/core/util/PopulateString.js +28 -28
- package/.internal/core/util/PopulateString.js.map +1 -1
- package/.internal/core/util/ResizeSensor.js +76 -116
- package/.internal/core/util/ResizeSensor.js.map +1 -1
- package/.internal/core/util/States.js +116 -188
- package/.internal/core/util/States.js.map +1 -1
- package/.internal/core/util/Template.js +203 -364
- package/.internal/core/util/Template.js.map +1 -1
- package/.internal/core/util/TextFormatter.js +148 -184
- package/.internal/core/util/TextFormatter.js.map +1 -1
- package/.internal/core/util/Throttler.js +18 -26
- package/.internal/core/util/Throttler.js.map +1 -1
- package/.internal/core/util/Time.d.ts.map +1 -1
- package/.internal/core/util/Time.js +61 -63
- package/.internal/core/util/Time.js.map +1 -1
- package/.internal/core/util/Timezone.js +35 -57
- package/.internal/core/util/Timezone.js.map +1 -1
- package/.internal/core/util/Type.js +12 -12
- package/.internal/core/util/Type.js.map +1 -1
- package/.internal/core/util/Utils.d.ts +17 -0
- package/.internal/core/util/Utils.d.ts.map +1 -1
- package/.internal/core/util/Utils.js +166 -182
- package/.internal/core/util/Utils.js.map +1 -1
- package/.internal/core/util/Value.js +14 -30
- package/.internal/core/util/Value.js.map +1 -1
- package/.internal/plugins/exporting/Annotator.js +139 -265
- package/.internal/plugins/exporting/Annotator.js.map +1 -1
- package/.internal/plugins/exporting/Exporting.js +1216 -1614
- package/.internal/plugins/exporting/Exporting.js.map +1 -1
- package/.internal/plugins/exporting/ExportingCSS.js +5 -5
- package/.internal/plugins/exporting/ExportingCSS.js.map +1 -1
- package/.internal/plugins/exporting/ExportingMenu.js +337 -405
- package/.internal/plugins/exporting/ExportingMenu.js.map +1 -1
- package/.internal/plugins/json/Classes-script.d.ts +16 -0
- package/.internal/plugins/json/Classes-script.d.ts.map +1 -1
- package/.internal/plugins/json/Classes-script.js +202 -194
- package/.internal/plugins/json/Classes-script.js.map +1 -1
- package/.internal/plugins/json/Classes.d.ts +16 -0
- package/.internal/plugins/json/Classes.d.ts.map +1 -1
- package/.internal/plugins/json/Classes.js +202 -194
- package/.internal/plugins/json/Classes.js.map +1 -1
- package/.internal/plugins/json/Json.d.ts +42 -2
- package/.internal/plugins/json/Json.d.ts.map +1 -1
- package/.internal/plugins/json/Json.js +391 -278
- package/.internal/plugins/json/Json.js.map +1 -1
- package/.internal/plugins/json/Serializer.d.ts +62 -0
- package/.internal/plugins/json/Serializer.d.ts.map +1 -0
- package/.internal/plugins/json/Serializer.js +137 -0
- package/.internal/plugins/json/Serializer.js.map +1 -0
- package/.internal/plugins/sliceGrouper/SliceGrouper.js +159 -202
- package/.internal/plugins/sliceGrouper/SliceGrouper.js.map +1 -1
- package/.internal/themes/AnimatedTheme.js +20 -32
- package/.internal/themes/AnimatedTheme.js.map +1 -1
- package/.internal/themes/DarkTheme.js +28 -40
- package/.internal/themes/DarkTheme.js.map +1 -1
- package/.internal/themes/DatavizTheme.js +12 -24
- package/.internal/themes/DatavizTheme.js.map +1 -1
- package/.internal/themes/DefaultTheme.d.ts.map +1 -1
- package/.internal/themes/DefaultTheme.js +803 -813
- package/.internal/themes/DefaultTheme.js.map +1 -1
- package/.internal/themes/FrozenTheme.js +19 -31
- package/.internal/themes/FrozenTheme.js.map +1 -1
- package/.internal/themes/KellyTheme.js +31 -43
- package/.internal/themes/KellyTheme.js.map +1 -1
- package/.internal/themes/MaterialTheme.js +28 -40
- package/.internal/themes/MaterialTheme.js.map +1 -1
- package/.internal/themes/MicrochartTheme.js +67 -79
- package/.internal/themes/MicrochartTheme.js.map +1 -1
- package/.internal/themes/MoonriseTheme.js +19 -31
- package/.internal/themes/MoonriseTheme.js.map +1 -1
- package/.internal/themes/ResponsiveTheme.js +613 -790
- package/.internal/themes/ResponsiveTheme.js.map +1 -1
- package/.internal/themes/SpiritedTheme.js +19 -31
- package/.internal/themes/SpiritedTheme.js.map +1 -1
- package/CHANGELOG.md +28 -0
- package/examples/javascript/flow-chord/package.json +1 -1
- package/examples/javascript/flow-chord-directed/package.json +1 -1
- package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/javascript/flow-sankey/package.json +1 -1
- package/examples/javascript/gauge/package.json +1 -1
- package/examples/javascript/gauge-bands/index.js +3 -1
- package/examples/javascript/gauge-bands/package.json +1 -1
- package/examples/javascript/hierarchy-force-directed/package.json +1 -1
- package/examples/javascript/hierarchy-pack/package.json +1 -1
- package/examples/javascript/hierarchy-partition/package.json +1 -1
- package/examples/javascript/hierarchy-sunburst/package.json +1 -1
- package/examples/javascript/hierarchy-tree/package.json +1 -1
- package/examples/javascript/hierarchy-treemap/package.json +1 -1
- package/examples/javascript/jest/package.json +1 -1
- package/examples/javascript/{json → json-pie}/README.md +0 -0
- package/examples/javascript/{json → json-pie}/index.css +0 -0
- package/examples/javascript/json-pie/index.html +12 -0
- package/examples/javascript/json-pie/index.js +77 -0
- package/examples/javascript/json-pie/package.json +16 -0
- package/examples/javascript/{json → json-pie}/webpack.config.js +0 -0
- package/examples/{typescript/json → javascript/json-xy}/README.md +0 -0
- package/examples/{typescript/json → javascript/json-xy}/index.css +0 -0
- package/examples/{typescript/json → javascript/json-xy}/index.html +1 -1
- package/examples/javascript/json-xy/index.js +203 -0
- package/examples/javascript/{json → json-xy}/package.json +2 -2
- package/examples/javascript/json-xy/webpack.config.js +38 -0
- package/examples/javascript/map-animating-along-lines/package.json +1 -1
- package/examples/javascript/map-day-and-night/package.json +1 -1
- package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/javascript/map-with-bubbles/package.json +1 -1
- package/examples/javascript/map-zoom-to-country/package.json +1 -1
- package/examples/javascript/misc-40-charts/package.json +1 -1
- package/examples/javascript/misc-microchart-grid/package.json +1 -1
- package/examples/javascript/pie-chart/package.json +1 -1
- package/examples/javascript/pie-donut-chart/package.json +1 -1
- package/examples/javascript/pie-variable-radius/package.json +1 -1
- package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
- package/examples/javascript/radar-heat-map/index.js +33 -33
- package/examples/javascript/radar-heat-map/package.json +1 -1
- package/examples/javascript/radar-line/package.json +1 -1
- package/examples/javascript/radar-time-line/package.json +1 -1
- package/examples/javascript/sliced-funnel/package.json +1 -1
- package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/javascript/sliced-pyramid/package.json +1 -1
- package/examples/javascript/stock-chart/package.json +1 -1
- package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
- package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
- package/examples/javascript/stock-chart-intraday/package.json +1 -1
- package/examples/javascript/stock-chart-live/package.json +1 -1
- package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/javascript/venn-diagram/package.json +1 -1
- package/examples/javascript/wordcloud-with-data/package.json +1 -1
- package/examples/javascript/wordcloud-with-text/package.json +1 -1
- package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/javascript/xy-bubble/package.json +1 -1
- package/examples/javascript/xy-candlestick/package.json +1 -1
- package/examples/javascript/xy-clustered-column/package.json +1 -1
- package/examples/javascript/xy-column/package.json +1 -1
- package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/javascript/xy-data-grouping/package.json +1 -1
- package/examples/javascript/xy-draggable-range/package.json +1 -1
- package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/javascript/xy-dumbbell plot/package.json +1 -1
- package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/javascript/xy-line/package.json +1 -1
- package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/javascript/xy-live-data/package.json +1 -1
- package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/javascript/xy-ohlc/package.json +1 -1
- package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/javascript/xy-smoothed-line/package.json +1 -1
- package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/javascript/xy-stacked-column/package.json +1 -1
- package/examples/javascript/xy-stacked-step/package.json +1 -1
- package/examples/javascript/xy-stock/package.json +1 -1
- package/examples/javascript/xy-stock-comparing/package.json +1 -1
- package/examples/typescript/flow-chord/package.json +1 -1
- package/examples/typescript/flow-chord/tsconfig.json +1 -1
- package/examples/typescript/flow-chord-directed/package.json +1 -1
- package/examples/typescript/flow-chord-directed/tsconfig.json +1 -1
- package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/typescript/flow-chord-non-ribbon/tsconfig.json +1 -1
- package/examples/typescript/flow-sankey/package.json +1 -1
- package/examples/typescript/flow-sankey/tsconfig.json +1 -1
- package/examples/typescript/gauge/package.json +1 -1
- package/examples/typescript/gauge/tsconfig.json +1 -1
- package/examples/typescript/gauge-bands/index.ts +3 -1
- package/examples/typescript/gauge-bands/package.json +1 -1
- package/examples/typescript/gauge-bands/tsconfig.json +1 -1
- package/examples/typescript/hierarchy-force-directed/package.json +1 -1
- package/examples/typescript/hierarchy-force-directed/tsconfig.json +1 -1
- package/examples/typescript/hierarchy-pack/package.json +1 -1
- package/examples/typescript/hierarchy-pack/tsconfig.json +1 -1
- package/examples/typescript/hierarchy-partition/package.json +1 -1
- package/examples/typescript/hierarchy-partition/tsconfig.json +1 -1
- package/examples/typescript/hierarchy-sunburst/package.json +1 -1
- package/examples/typescript/hierarchy-sunburst/tsconfig.json +1 -1
- package/examples/typescript/hierarchy-tree/package.json +1 -1
- package/examples/typescript/hierarchy-tree/tsconfig.json +1 -1
- package/examples/typescript/hierarchy-treemap/package.json +1 -1
- package/examples/typescript/hierarchy-treemap/tsconfig.json +1 -1
- package/examples/typescript/jest/package.json +1 -1
- package/examples/typescript/jest/tsconfig.json +1 -1
- package/examples/typescript/json-pie/README.md +6 -0
- package/examples/typescript/json-pie/index.css +11 -0
- package/examples/typescript/json-pie/index.html +12 -0
- package/examples/typescript/json-pie/index.ts +77 -0
- package/examples/typescript/json-pie/package.json +18 -0
- package/examples/typescript/{json → json-pie}/tsconfig.json +1 -1
- package/examples/typescript/{json → json-pie}/webpack.config.js +0 -0
- package/examples/typescript/json-xy/README.md +6 -0
- package/examples/typescript/json-xy/index.css +11 -0
- package/examples/{javascript/json → typescript/json-xy}/index.html +1 -1
- package/examples/typescript/json-xy/index.ts +203 -0
- package/examples/typescript/{json → json-xy}/package.json +2 -2
- package/examples/typescript/json-xy/tsconfig.json +12 -0
- package/examples/typescript/json-xy/webpack.config.js +45 -0
- package/examples/typescript/map-animating-along-lines/package.json +1 -1
- package/examples/typescript/map-animating-along-lines/tsconfig.json +1 -1
- package/examples/typescript/map-day-and-night/package.json +1 -1
- package/examples/typescript/map-day-and-night/tsconfig.json +1 -1
- package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/typescript/map-globe-rotate-to-country/tsconfig.json +1 -1
- package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/typescript/map-globe-with-projected-circles/tsconfig.json +1 -1
- package/examples/typescript/map-with-bubbles/package.json +1 -1
- package/examples/typescript/map-with-bubbles/tsconfig.json +1 -1
- package/examples/typescript/map-zoom-to-country/package.json +1 -1
- package/examples/typescript/map-zoom-to-country/tsconfig.json +1 -1
- package/examples/typescript/misc-40-charts/package.json +1 -1
- package/examples/typescript/misc-40-charts/tsconfig.json +1 -1
- package/examples/typescript/misc-microchart-grid/package.json +1 -1
- package/examples/typescript/misc-microchart-grid/tsconfig.json +1 -1
- package/examples/typescript/pie-chart/package.json +1 -1
- package/examples/typescript/pie-chart/tsconfig.json +1 -1
- package/examples/typescript/pie-donut-chart/package.json +1 -1
- package/examples/typescript/pie-donut-chart/tsconfig.json +1 -1
- package/examples/typescript/pie-variable-radius/package.json +1 -1
- package/examples/typescript/pie-variable-radius/tsconfig.json +1 -1
- package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
- package/examples/typescript/radar-column-iwatch-style/tsconfig.json +1 -1
- package/examples/typescript/radar-heat-map/index.ts +33 -33
- package/examples/typescript/radar-heat-map/package.json +1 -1
- package/examples/typescript/radar-heat-map/tsconfig.json +1 -1
- package/examples/typescript/radar-line/package.json +1 -1
- package/examples/typescript/radar-line/tsconfig.json +1 -1
- package/examples/typescript/radar-time-line/package.json +1 -1
- package/examples/typescript/radar-time-line/tsconfig.json +1 -1
- package/examples/typescript/sliced-funnel/package.json +1 -1
- package/examples/typescript/sliced-funnel/tsconfig.json +1 -1
- package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/typescript/sliced-pictorial-stacked/tsconfig.json +1 -1
- package/examples/typescript/sliced-pyramid/package.json +1 -1
- package/examples/typescript/sliced-pyramid/tsconfig.json +1 -1
- package/examples/typescript/stock-chart/package.json +1 -1
- package/examples/typescript/stock-chart/tsconfig.json +1 -1
- package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/typescript/stock-chart-comparing-stocks/tsconfig.json +1 -1
- package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
- package/examples/typescript/stock-chart-data-granularity/tsconfig.json +1 -1
- package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
- package/examples/typescript/stock-chart-data-grouping/tsconfig.json +1 -1
- package/examples/typescript/stock-chart-intraday/package.json +1 -1
- package/examples/typescript/stock-chart-intraday/tsconfig.json +1 -1
- package/examples/typescript/stock-chart-live/package.json +1 -1
- package/examples/typescript/stock-chart-live/tsconfig.json +1 -1
- package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/typescript/stock-chart-volume-separate-panel/tsconfig.json +1 -1
- package/examples/typescript/venn-diagram/package.json +1 -1
- package/examples/typescript/venn-diagram/tsconfig.json +1 -1
- package/examples/typescript/wordcloud-with-data/package.json +1 -1
- package/examples/typescript/wordcloud-with-data/tsconfig.json +1 -1
- package/examples/typescript/wordcloud-with-text/package.json +1 -1
- package/examples/typescript/wordcloud-with-text/tsconfig.json +1 -1
- package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/typescript/xy-100-percent-stacked-column/tsconfig.json +1 -1
- package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/tsconfig.json +1 -1
- package/examples/typescript/xy-bubble/package.json +1 -1
- package/examples/typescript/xy-bubble/tsconfig.json +1 -1
- package/examples/typescript/xy-candlestick/package.json +1 -1
- package/examples/typescript/xy-candlestick/tsconfig.json +1 -1
- package/examples/typescript/xy-clustered-column/package.json +1 -1
- package/examples/typescript/xy-clustered-column/tsconfig.json +1 -1
- package/examples/typescript/xy-column/package.json +1 -1
- package/examples/typescript/xy-column/tsconfig.json +1 -1
- package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/typescript/xy-comparing-series-google-analytics-style/tsconfig.json +1 -1
- package/examples/typescript/xy-data-grouping/package.json +1 -1
- package/examples/typescript/xy-data-grouping/tsconfig.json +1 -1
- package/examples/typescript/xy-draggable-range/package.json +1 -1
- package/examples/typescript/xy-draggable-range/tsconfig.json +1 -1
- package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/typescript/xy-drawing-series-with-mouse-or-touch/tsconfig.json +1 -1
- package/examples/typescript/xy-dumbbell plot/package.json +1 -1
- package/examples/typescript/xy-dumbbell plot/tsconfig.json +1 -1
- package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/typescript/xy-evenly-spaced-date-axis/tsconfig.json +1 -1
- package/examples/typescript/xy-line/package.json +1 -1
- package/examples/typescript/xy-line/tsconfig.json +1 -1
- package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/typescript/xy-line-highlight-on-legend-hover/tsconfig.json +1 -1
- package/examples/typescript/xy-live-data/package.json +1 -1
- package/examples/typescript/xy-live-data/tsconfig.json +1 -1
- package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/typescript/xy-multiple-synced-value-axes/tsconfig.json +1 -1
- package/examples/typescript/xy-ohlc/package.json +1 -1
- package/examples/typescript/xy-ohlc/tsconfig.json +1 -1
- package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/typescript/xy-real-time-data-sorting/tsconfig.json +1 -1
- package/examples/typescript/xy-smoothed-line/package.json +1 -1
- package/examples/typescript/xy-smoothed-line/tsconfig.json +1 -1
- package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/typescript/xy-stacked-and-clustered-column/tsconfig.json +1 -1
- package/examples/typescript/xy-stacked-column/package.json +1 -1
- package/examples/typescript/xy-stacked-column/tsconfig.json +1 -1
- package/examples/typescript/xy-stacked-step/package.json +1 -1
- package/examples/typescript/xy-stacked-step/tsconfig.json +1 -1
- package/examples/typescript/xy-stock/package.json +1 -1
- package/examples/typescript/xy-stock/tsconfig.json +1 -1
- package/examples/typescript/xy-stock-comparing/package.json +1 -1
- package/examples/typescript/xy-stock-comparing/tsconfig.json +1 -1
- package/locales/ar.js +1 -1
- package/locales/bg_BG.js +1 -1
- package/locales/bs_BA.js +1 -1
- package/locales/ca_ES.js +1 -1
- package/locales/cs_CZ.js +1 -1
- package/locales/da_DK.js +1 -1
- package/locales/el_GR.js +1 -1
- package/locales/en.js +1 -1
- package/locales/en_CA.js +1 -1
- package/locales/en_US.js +1 -1
- package/locales/et_EE.js +1 -1
- package/locales/fi_FI.js +1 -1
- package/locales/fr_FR.js +1 -1
- package/locales/he_IL.js +1 -1
- package/locales/hi_IN.js +1 -1
- package/locales/hr_HR.js +1 -1
- package/locales/hu_HU.js +1 -1
- package/locales/id_ID.js +1 -1
- package/locales/ja_JP.js +1 -1
- package/locales/ko_KR.js +1 -1
- package/locales/lv_LV.js +1 -1
- package/locales/nb_NO.js +1 -1
- package/locales/nl_NL.js +1 -1
- package/locales/pl_PL.js +1 -1
- package/locales/ro_RO.js +1 -1
- package/locales/sr_RS.js +1 -1
- package/locales/th_TH.js +1 -1
- package/locales/tr_TR.js +1 -1
- package/locales/vi_VN.js +1 -1
- package/locales/zh_Hans.js +1 -1
- package/locales/zh_Hant.js +1 -1
- package/package.json +1 -1
- package/plugins/json.d.ts +1 -0
- package/plugins/json.d.ts.map +1 -1
- package/plugins/json.js +1 -0
- package/plugins/json.js.map +1 -1
- package/examples/javascript/json/index.js +0 -206
- package/examples/typescript/json/index.ts +0 -206
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __extends, __read } from "tslib";
|
|
2
1
|
import { DataItem } from "../../../core/render/Component";
|
|
3
2
|
import { Axis } from "./Axis";
|
|
4
3
|
import { MultiDisposer } from "../../../core/util/Disposer";
|
|
@@ -12,326 +11,278 @@ import * as $utils from "../../../core/util/Utils";
|
|
|
12
11
|
* @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/} for more info
|
|
13
12
|
* @important
|
|
14
13
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Object.defineProperty(_this, "_dirtyExtremes", {
|
|
14
|
+
export class ValueAxis extends Axis {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
Object.defineProperty(this, "_dirtyExtremes", {
|
|
20
18
|
enumerable: true,
|
|
21
19
|
configurable: true,
|
|
22
20
|
writable: true,
|
|
23
21
|
value: false
|
|
24
22
|
});
|
|
25
|
-
Object.defineProperty(
|
|
23
|
+
Object.defineProperty(this, "_dirtySelectionExtremes", {
|
|
26
24
|
enumerable: true,
|
|
27
25
|
configurable: true,
|
|
28
26
|
writable: true,
|
|
29
27
|
value: false
|
|
30
28
|
});
|
|
31
|
-
Object.defineProperty(
|
|
29
|
+
Object.defineProperty(this, "_deltaMinMax", {
|
|
32
30
|
enumerable: true,
|
|
33
31
|
configurable: true,
|
|
34
32
|
writable: true,
|
|
35
33
|
value: 1
|
|
36
34
|
});
|
|
37
|
-
Object.defineProperty(
|
|
35
|
+
Object.defineProperty(this, "_minReal", {
|
|
38
36
|
enumerable: true,
|
|
39
37
|
configurable: true,
|
|
40
38
|
writable: true,
|
|
41
39
|
value: void 0
|
|
42
40
|
});
|
|
43
|
-
Object.defineProperty(
|
|
41
|
+
Object.defineProperty(this, "_maxReal", {
|
|
44
42
|
enumerable: true,
|
|
45
43
|
configurable: true,
|
|
46
44
|
writable: true,
|
|
47
45
|
value: void 0
|
|
48
46
|
});
|
|
49
|
-
Object.defineProperty(
|
|
47
|
+
Object.defineProperty(this, "_baseValue", {
|
|
50
48
|
enumerable: true,
|
|
51
49
|
configurable: true,
|
|
52
50
|
writable: true,
|
|
53
51
|
value: 0
|
|
54
52
|
});
|
|
55
|
-
Object.defineProperty(
|
|
53
|
+
Object.defineProperty(this, "_syncDp", {
|
|
56
54
|
enumerable: true,
|
|
57
55
|
configurable: true,
|
|
58
56
|
writable: true,
|
|
59
57
|
value: void 0
|
|
60
58
|
});
|
|
61
|
-
Object.defineProperty(
|
|
59
|
+
Object.defineProperty(this, "_minLogAdjusted", {
|
|
62
60
|
enumerable: true,
|
|
63
61
|
configurable: true,
|
|
64
62
|
writable: true,
|
|
65
63
|
value: 1
|
|
66
64
|
});
|
|
67
|
-
return _this;
|
|
68
65
|
}
|
|
69
66
|
/**
|
|
70
67
|
* @ignore
|
|
71
68
|
*/
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
value: function () {
|
|
77
|
-
this._dirtyExtremes = true;
|
|
78
|
-
this.markDirty();
|
|
79
|
-
}
|
|
80
|
-
});
|
|
69
|
+
markDirtyExtremes() {
|
|
70
|
+
this._dirtyExtremes = true;
|
|
71
|
+
this.markDirty();
|
|
72
|
+
}
|
|
81
73
|
/**
|
|
82
74
|
* @ignore
|
|
83
75
|
*/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
_super.prototype._afterNew.call(this);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
Object.defineProperty(ValueAxis.prototype, "_prepareChildren", {
|
|
105
|
-
enumerable: false,
|
|
106
|
-
configurable: true,
|
|
107
|
-
writable: true,
|
|
108
|
-
value: function () {
|
|
109
|
-
var _this = this;
|
|
110
|
-
_super.prototype._prepareChildren.call(this);
|
|
111
|
-
if (this.isDirty("syncWithAxis")) {
|
|
112
|
-
var previousValue = this._prevSettings.syncWithAxis;
|
|
113
|
-
if (previousValue) {
|
|
114
|
-
if (this._syncDp) {
|
|
115
|
-
this._syncDp.dispose();
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
var syncWithAxis = this.get("syncWithAxis");
|
|
119
|
-
if (syncWithAxis) {
|
|
120
|
-
this._syncDp = new MultiDisposer([
|
|
121
|
-
syncWithAxis.onPrivate("selectionMinFinal", function () {
|
|
122
|
-
_this._dirtySelectionExtremes = true;
|
|
123
|
-
}),
|
|
124
|
-
syncWithAxis.onPrivate("selectionMaxFinal", function () {
|
|
125
|
-
_this._dirtySelectionExtremes = true;
|
|
126
|
-
})
|
|
127
|
-
]);
|
|
76
|
+
markDirtySelectionExtremes() {
|
|
77
|
+
this._dirtySelectionExtremes = true;
|
|
78
|
+
this.markDirty();
|
|
79
|
+
}
|
|
80
|
+
_afterNew() {
|
|
81
|
+
this._settings.themeTags = $utils.mergeTags(this._settings.themeTags, ["axis"]);
|
|
82
|
+
this.setPrivateRaw("name", "value");
|
|
83
|
+
this.addTag("value");
|
|
84
|
+
super._afterNew();
|
|
85
|
+
}
|
|
86
|
+
_prepareChildren() {
|
|
87
|
+
super._prepareChildren();
|
|
88
|
+
if (this.isDirty("syncWithAxis")) {
|
|
89
|
+
let previousValue = this._prevSettings.syncWithAxis;
|
|
90
|
+
if (previousValue) {
|
|
91
|
+
if (this._syncDp) {
|
|
92
|
+
this._syncDp.dispose();
|
|
128
93
|
}
|
|
129
94
|
}
|
|
130
|
-
|
|
131
|
-
if (
|
|
132
|
-
this.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
this._groupData();
|
|
141
|
-
if (this._sizeDirty || this._valuesDirty || this.isDirty("start") || this.isDirty("end") || this.isPrivateDirty("min") || this.isPrivateDirty("selectionMax") || this.isPrivateDirty("selectionMin") || this.isPrivateDirty("max") || this.isPrivateDirty("step") || this.isPrivateDirty("width") || this.isPrivateDirty("height") || this.isDirty("logarithmic")) {
|
|
142
|
-
this._handleRangeChange();
|
|
143
|
-
this._prepareAxisItems();
|
|
144
|
-
this._updateAxisRanges();
|
|
145
|
-
}
|
|
146
|
-
this._baseValue = this.baseValue();
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
Object.defineProperty(ValueAxis.prototype, "_groupData", {
|
|
150
|
-
enumerable: false,
|
|
151
|
-
configurable: true,
|
|
152
|
-
writable: true,
|
|
153
|
-
value: function () {
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
Object.defineProperty(ValueAxis.prototype, "_formatText", {
|
|
157
|
-
enumerable: false,
|
|
158
|
-
configurable: true,
|
|
159
|
-
writable: true,
|
|
160
|
-
value: function (value) {
|
|
161
|
-
var numberFormat = this.get("numberFormat");
|
|
162
|
-
var formatter = this.getNumberFormatter();
|
|
163
|
-
var text = "";
|
|
164
|
-
if (numberFormat) {
|
|
165
|
-
text = formatter.format(value, numberFormat);
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
text = formatter.format(value, undefined, this.getPrivate("stepDecimalPlaces"));
|
|
95
|
+
let syncWithAxis = this.get("syncWithAxis");
|
|
96
|
+
if (syncWithAxis) {
|
|
97
|
+
this._syncDp = new MultiDisposer([
|
|
98
|
+
syncWithAxis.onPrivate("selectionMinFinal", () => {
|
|
99
|
+
this._dirtySelectionExtremes = true;
|
|
100
|
+
}),
|
|
101
|
+
syncWithAxis.onPrivate("selectionMaxFinal", () => {
|
|
102
|
+
this._dirtySelectionExtremes = true;
|
|
103
|
+
})
|
|
104
|
+
]);
|
|
169
105
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
106
|
+
}
|
|
107
|
+
//if (this._dirtyExtremes || this.isPrivateDirty("width") || this.isPrivateDirty("height") || this.isDirty("min") || this.isDirty("max") || this.isDirty("extraMin") || this.isDirty("extraMax") || this.isDirty("logarithmic") || this.isDirty("treatZeroAs") || this.isDirty("baseValue") || this.isDirty("strictMinMax") || this.isDirty("maxPrecision")) {
|
|
108
|
+
if (this._sizeDirty || this._dirtyExtremes || this._valuesDirty || this.isPrivateDirty("width") || this.isPrivateDirty("height") || this.isDirty("min") || this.isDirty("max") || this.isDirty("extraMin") || this.isDirty("extraMax") || this.isDirty("logarithmic") || this.isDirty("treatZeroAs") || this.isDirty("baseValue") || this.isDirty("strictMinMax") || this.isDirty("strictMinMaxSelection") || this.isDirty("maxPrecision") || this.isDirty("numberFormat")) {
|
|
109
|
+
this._getMinMax();
|
|
110
|
+
this.ghostLabel.set("text", "");
|
|
111
|
+
this._dirtyExtremes = false;
|
|
112
|
+
}
|
|
113
|
+
if (this._dirtySelectionExtremes && !this._isPanning && this.get("autoZoom", true)) {
|
|
114
|
+
this._getSelectionMinMax();
|
|
115
|
+
this._dirtySelectionExtremes = false;
|
|
116
|
+
}
|
|
117
|
+
this._groupData();
|
|
118
|
+
if (this._sizeDirty || this._valuesDirty || this.isDirty("start") || this.isDirty("end") || this.isPrivateDirty("min") || this.isPrivateDirty("selectionMax") || this.isPrivateDirty("selectionMin") || this.isPrivateDirty("max") || this.isPrivateDirty("step") || this.isPrivateDirty("width") || this.isPrivateDirty("height") || this.isDirty("logarithmic")) {
|
|
119
|
+
this._handleRangeChange();
|
|
120
|
+
this._prepareAxisItems();
|
|
121
|
+
this._updateAxisRanges();
|
|
122
|
+
}
|
|
123
|
+
this._baseValue = this.baseValue();
|
|
124
|
+
}
|
|
125
|
+
_groupData() {
|
|
126
|
+
}
|
|
127
|
+
_formatText(value) {
|
|
128
|
+
const numberFormat = this.get("numberFormat");
|
|
129
|
+
const formatter = this.getNumberFormatter();
|
|
130
|
+
let text = "";
|
|
131
|
+
if (numberFormat) {
|
|
132
|
+
text = formatter.format(value, numberFormat);
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
text = formatter.format(value, undefined, this.getPrivate("stepDecimalPlaces"));
|
|
136
|
+
}
|
|
137
|
+
return text;
|
|
138
|
+
}
|
|
139
|
+
_prepareAxisItems() {
|
|
140
|
+
const min = this.getPrivate("min");
|
|
141
|
+
const max = this.getPrivate("max");
|
|
142
|
+
if ($type.isNumber(min) && $type.isNumber(max)) {
|
|
143
|
+
const logarithmic = this.get("logarithmic");
|
|
144
|
+
const step = this.getPrivate("step");
|
|
145
|
+
const selectionMin = this.getPrivate("selectionMin");
|
|
146
|
+
const selectionMax = this.getPrivate("selectionMax") + step;
|
|
147
|
+
let value = selectionMin - step;
|
|
148
|
+
let i = 0;
|
|
149
|
+
let differencePower = 1;
|
|
150
|
+
let minLog = min;
|
|
151
|
+
if (logarithmic) {
|
|
152
|
+
value = this._minLogAdjusted;
|
|
153
|
+
if (value < selectionMin) {
|
|
154
|
+
while (value < selectionMin) {
|
|
155
|
+
value += step;
|
|
202
156
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
157
|
+
}
|
|
158
|
+
minLog = value;
|
|
159
|
+
if (minLog <= 0) {
|
|
160
|
+
minLog = 1;
|
|
161
|
+
if (step < 1) {
|
|
162
|
+
minLog = step;
|
|
206
163
|
}
|
|
207
164
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
165
|
+
differencePower = Math.log(selectionMax - step) * Math.LOG10E - Math.log(minLog) * Math.LOG10E;
|
|
166
|
+
if (differencePower > 2) {
|
|
167
|
+
value = Math.pow(10, Math.log(minLog) * Math.LOG10E - 5);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
let previous = -Infinity;
|
|
171
|
+
while (value < selectionMax) {
|
|
172
|
+
let dataItem;
|
|
173
|
+
if (this.dataItems.length < i + 1) {
|
|
174
|
+
dataItem = new DataItem(this, undefined, {});
|
|
175
|
+
this._dataItems.push(dataItem);
|
|
176
|
+
this.processDataItem(dataItem);
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
dataItem = this.dataItems[i];
|
|
180
|
+
}
|
|
181
|
+
this._createAssets(dataItem, []);
|
|
182
|
+
if (dataItem.isHidden()) {
|
|
183
|
+
dataItem.show();
|
|
184
|
+
}
|
|
185
|
+
dataItem.setRaw("value", value);
|
|
186
|
+
const label = dataItem.get("label");
|
|
187
|
+
if (label) {
|
|
188
|
+
label.set("text", this._formatText(value));
|
|
189
|
+
}
|
|
190
|
+
this._prepareDataItem(dataItem);
|
|
191
|
+
if (!logarithmic) {
|
|
192
|
+
value += step;
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
if (differencePower > 2) {
|
|
196
|
+
value = Math.pow(10, Math.log(minLog) * Math.LOG10E + i - 5);
|
|
215
197
|
}
|
|
216
198
|
else {
|
|
217
|
-
dataItem = this.dataItems[i];
|
|
218
|
-
}
|
|
219
|
-
this._createAssets(dataItem, []);
|
|
220
|
-
if (dataItem.isHidden()) {
|
|
221
|
-
dataItem.show();
|
|
222
|
-
}
|
|
223
|
-
dataItem.setRaw("value", value);
|
|
224
|
-
var label = dataItem.get("label");
|
|
225
|
-
if (label) {
|
|
226
|
-
label.set("text", this._formatText(value));
|
|
227
|
-
}
|
|
228
|
-
this._prepareDataItem(dataItem);
|
|
229
|
-
if (!logarithmic) {
|
|
230
199
|
value += step;
|
|
231
200
|
}
|
|
232
|
-
else {
|
|
233
|
-
if (differencePower > 2) {
|
|
234
|
-
value = Math.pow(10, Math.log(minLog) * Math.LOG10E + i - 5);
|
|
235
|
-
}
|
|
236
|
-
else {
|
|
237
|
-
value += step;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
if (previous == value) {
|
|
241
|
-
break;
|
|
242
|
-
}
|
|
243
|
-
var stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(step)) * Math.LOG10E));
|
|
244
|
-
if (stepPower < 1) {
|
|
245
|
-
// exponent is less then 1 too. Count decimals of exponent
|
|
246
|
-
var decCount = Math.round(Math.abs(Math.log(Math.abs(stepPower)) * Math.LOG10E)) + 2;
|
|
247
|
-
// round value to avoid floating point issues
|
|
248
|
-
value = $math.round(value, decCount);
|
|
249
|
-
}
|
|
250
|
-
i++;
|
|
251
|
-
previous = value;
|
|
252
201
|
}
|
|
253
|
-
|
|
254
|
-
|
|
202
|
+
if (previous == value) {
|
|
203
|
+
break;
|
|
255
204
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
});
|
|
265
|
-
Object.defineProperty(ValueAxis.prototype, "_prepareDataItem", {
|
|
266
|
-
enumerable: false,
|
|
267
|
-
configurable: true,
|
|
268
|
-
writable: true,
|
|
269
|
-
value: function (dataItem, count) {
|
|
270
|
-
var renderer = this.get("renderer");
|
|
271
|
-
var value = dataItem.get("value");
|
|
272
|
-
var endValue = dataItem.get("endValue");
|
|
273
|
-
var position = this.valueToPosition(value);
|
|
274
|
-
var endPosition = position;
|
|
275
|
-
var fillEndPosition = this.valueToPosition(value + this.getPrivate("step"));
|
|
276
|
-
if ($type.isNumber(endValue)) {
|
|
277
|
-
endPosition = this.valueToPosition(endValue);
|
|
278
|
-
fillEndPosition = endPosition;
|
|
279
|
-
}
|
|
280
|
-
if (dataItem.get("isRange")) {
|
|
281
|
-
if (endValue == null) {
|
|
282
|
-
fillEndPosition = position;
|
|
205
|
+
let stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(step)) * Math.LOG10E));
|
|
206
|
+
if (stepPower < 1) {
|
|
207
|
+
// exponent is less then 1 too. Count decimals of exponent
|
|
208
|
+
let decCount = Math.round(Math.abs(Math.log(Math.abs(stepPower)) * Math.LOG10E)) + 2;
|
|
209
|
+
// round value to avoid floating point issues
|
|
210
|
+
value = $math.round(value, decCount);
|
|
283
211
|
}
|
|
212
|
+
i++;
|
|
213
|
+
previous = value;
|
|
284
214
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
renderer.updateGrid(grid, position, endPosition);
|
|
288
|
-
if (grid) {
|
|
289
|
-
if (value == this.get("baseValue", 0)) {
|
|
290
|
-
grid.addTag("base");
|
|
291
|
-
grid._applyThemes();
|
|
292
|
-
}
|
|
293
|
-
else if (grid.hasTag("base")) {
|
|
294
|
-
grid.removeTag("base");
|
|
295
|
-
grid._applyThemes();
|
|
296
|
-
}
|
|
215
|
+
for (let j = i; j < this.dataItems.length; j++) {
|
|
216
|
+
this.dataItems[j].hide();
|
|
297
217
|
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
renderer.updateBullet(dataItem.get("bullet"), position, endPosition);
|
|
302
|
-
if (!dataItem.get("isRange")) {
|
|
303
|
-
var fillRule = this.get("fillRule");
|
|
304
|
-
if (fillRule) {
|
|
305
|
-
fillRule(dataItem);
|
|
218
|
+
$array.each(this.series, (series) => {
|
|
219
|
+
if (series.inited) {
|
|
220
|
+
series._markDirtyAxes();
|
|
306
221
|
}
|
|
222
|
+
});
|
|
223
|
+
this._updateGhost();
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
_prepareDataItem(dataItem, count) {
|
|
227
|
+
let renderer = this.get("renderer");
|
|
228
|
+
let value = dataItem.get("value");
|
|
229
|
+
let endValue = dataItem.get("endValue");
|
|
230
|
+
let position = this.valueToPosition(value);
|
|
231
|
+
let endPosition = position;
|
|
232
|
+
let fillEndPosition = this.valueToPosition(value + this.getPrivate("step"));
|
|
233
|
+
if ($type.isNumber(endValue)) {
|
|
234
|
+
endPosition = this.valueToPosition(endValue);
|
|
235
|
+
fillEndPosition = endPosition;
|
|
236
|
+
}
|
|
237
|
+
if (dataItem.get("isRange")) {
|
|
238
|
+
if (endValue == null) {
|
|
239
|
+
fillEndPosition = position;
|
|
307
240
|
}
|
|
308
241
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
this.setPrivateRaw("stepDecimalPlaces", stepDecimalPlaces);
|
|
321
|
-
selectionMin = $math.round(selectionMin, stepDecimalPlaces);
|
|
322
|
-
selectionMax = $math.round(selectionMax, stepDecimalPlaces);
|
|
323
|
-
minMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount, true);
|
|
324
|
-
var step = minMaxStep.step;
|
|
325
|
-
selectionMin = minMaxStep.min;
|
|
326
|
-
selectionMax = minMaxStep.max;
|
|
327
|
-
if (this.getPrivate("selectionMin") !== selectionMin || this.getPrivate("selectionMax") !== selectionMax || this.getPrivate("step") !== step) {
|
|
328
|
-
// do not change to setPrivate, will cause SO
|
|
329
|
-
this.setPrivateRaw("selectionMin", selectionMin);
|
|
330
|
-
this.setPrivateRaw("selectionMax", selectionMax);
|
|
331
|
-
this.setPrivateRaw("step", step);
|
|
242
|
+
renderer.updateLabel(dataItem.get("label"), position, endPosition, count);
|
|
243
|
+
const grid = dataItem.get("grid");
|
|
244
|
+
renderer.updateGrid(grid, position, endPosition);
|
|
245
|
+
if (grid) {
|
|
246
|
+
if (value == this.get("baseValue", 0)) {
|
|
247
|
+
grid.addTag("base");
|
|
248
|
+
grid._applyThemes();
|
|
249
|
+
}
|
|
250
|
+
else if (grid.hasTag("base")) {
|
|
251
|
+
grid.removeTag("base");
|
|
252
|
+
grid._applyThemes();
|
|
332
253
|
}
|
|
333
254
|
}
|
|
334
|
-
|
|
255
|
+
renderer.updateTick(dataItem.get("tick"), position, endPosition, count);
|
|
256
|
+
renderer.updateFill(dataItem.get("axisFill"), position, fillEndPosition);
|
|
257
|
+
this._processBullet(dataItem);
|
|
258
|
+
renderer.updateBullet(dataItem.get("bullet"), position, endPosition);
|
|
259
|
+
if (!dataItem.get("isRange")) {
|
|
260
|
+
const fillRule = this.get("fillRule");
|
|
261
|
+
if (fillRule) {
|
|
262
|
+
fillRule(dataItem);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
_handleRangeChange() {
|
|
267
|
+
let selectionMin = this.positionToValue(this.get("start", 0));
|
|
268
|
+
let selectionMax = this.positionToValue(this.get("end", 1));
|
|
269
|
+
const gridCount = this.get("renderer").gridCount();
|
|
270
|
+
let minMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount, true);
|
|
271
|
+
let stepDecimalPlaces = $utils.decimalPlaces(minMaxStep.step);
|
|
272
|
+
this.setPrivateRaw("stepDecimalPlaces", stepDecimalPlaces);
|
|
273
|
+
selectionMin = $math.round(selectionMin, stepDecimalPlaces);
|
|
274
|
+
selectionMax = $math.round(selectionMax, stepDecimalPlaces);
|
|
275
|
+
minMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount, true);
|
|
276
|
+
let step = minMaxStep.step;
|
|
277
|
+
selectionMin = minMaxStep.min;
|
|
278
|
+
selectionMax = minMaxStep.max;
|
|
279
|
+
if (this.getPrivate("selectionMin") !== selectionMin || this.getPrivate("selectionMax") !== selectionMax || this.getPrivate("step") !== step) {
|
|
280
|
+
// do not change to setPrivate, will cause SO
|
|
281
|
+
this.setPrivateRaw("selectionMin", selectionMin);
|
|
282
|
+
this.setPrivateRaw("selectionMax", selectionMax);
|
|
283
|
+
this.setPrivateRaw("step", step);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
335
286
|
/**
|
|
336
287
|
* Converts a relative position to a corresponding numeric value from axis
|
|
337
288
|
* scale.
|
|
@@ -339,72 +290,57 @@ var ValueAxis = /** @class */ (function (_super) {
|
|
|
339
290
|
* @param position Relative position
|
|
340
291
|
* @return Value
|
|
341
292
|
*/
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
var min = this.getPrivate("min");
|
|
348
|
-
var max = this.getPrivate("max");
|
|
349
|
-
if (!this.get("logarithmic")) {
|
|
350
|
-
return position * (max - min) + min;
|
|
351
|
-
}
|
|
352
|
-
else {
|
|
353
|
-
return Math.pow(Math.E, (position * ((Math.log(max) * Math.LOG10E - Math.log(min) * Math.LOG10E)) + Math.log(min) * Math.LOG10E) / Math.LOG10E);
|
|
354
|
-
}
|
|
293
|
+
positionToValue(position) {
|
|
294
|
+
const min = this.getPrivate("min");
|
|
295
|
+
const max = this.getPrivate("max");
|
|
296
|
+
if (!this.get("logarithmic")) {
|
|
297
|
+
return position * (max - min) + min;
|
|
355
298
|
}
|
|
356
|
-
|
|
299
|
+
else {
|
|
300
|
+
return Math.pow(Math.E, (position * ((Math.log(max) * Math.LOG10E - Math.log(min) * Math.LOG10E)) + Math.log(min) * Math.LOG10E) / Math.LOG10E);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
357
303
|
/**
|
|
358
304
|
* Convers value to a relative position on axis.
|
|
359
305
|
*
|
|
360
306
|
* @param value Value
|
|
361
307
|
* @return Relative position
|
|
362
308
|
*/
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
if (
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
if (value <= 0) {
|
|
375
|
-
var treatZeroAs = this.get("treatZeroAs");
|
|
376
|
-
if ($type.isNumber(treatZeroAs)) {
|
|
377
|
-
value = treatZeroAs;
|
|
378
|
-
}
|
|
309
|
+
valueToPosition(value) {
|
|
310
|
+
const min = this.getPrivate("min");
|
|
311
|
+
const max = this.getPrivate("max");
|
|
312
|
+
if (!this.get("logarithmic")) {
|
|
313
|
+
return (value - min) / (max - min);
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
if (value <= 0) {
|
|
317
|
+
let treatZeroAs = this.get("treatZeroAs");
|
|
318
|
+
if ($type.isNumber(treatZeroAs)) {
|
|
319
|
+
value = treatZeroAs;
|
|
379
320
|
}
|
|
380
|
-
return (Math.log(value) * Math.LOG10E - Math.log(min) * Math.LOG10E) / ((Math.log(max) * Math.LOG10E - Math.log(min) * Math.LOG10E));
|
|
381
321
|
}
|
|
322
|
+
return (Math.log(value) * Math.LOG10E - Math.log(min) * Math.LOG10E) / ((Math.log(max) * Math.LOG10E - Math.log(min) * Math.LOG10E));
|
|
382
323
|
}
|
|
383
|
-
}
|
|
324
|
+
}
|
|
384
325
|
/**
|
|
385
326
|
* @ignore
|
|
386
327
|
*/
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
if (
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
if (value <= 0) {
|
|
399
|
-
var treatZeroAs = this.get("treatZeroAs");
|
|
400
|
-
if ($type.isNumber(treatZeroAs)) {
|
|
401
|
-
value = treatZeroAs;
|
|
402
|
-
}
|
|
328
|
+
valueToFinalPosition(value) {
|
|
329
|
+
const min = this.getPrivate("minFinal");
|
|
330
|
+
const max = this.getPrivate("maxFinal");
|
|
331
|
+
if (!this.get("logarithmic")) {
|
|
332
|
+
return (value - min) / (max - min);
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
if (value <= 0) {
|
|
336
|
+
let treatZeroAs = this.get("treatZeroAs");
|
|
337
|
+
if ($type.isNumber(treatZeroAs)) {
|
|
338
|
+
value = treatZeroAs;
|
|
403
339
|
}
|
|
404
|
-
return (Math.log(value) * Math.LOG10E - Math.log(min) * Math.LOG10E) / ((Math.log(max) * Math.LOG10E - Math.log(min) * Math.LOG10E));
|
|
405
340
|
}
|
|
341
|
+
return (Math.log(value) * Math.LOG10E - Math.log(min) * Math.LOG10E) / ((Math.log(max) * Math.LOG10E - Math.log(min) * Math.LOG10E));
|
|
406
342
|
}
|
|
407
|
-
}
|
|
343
|
+
}
|
|
408
344
|
/**
|
|
409
345
|
* Returns X coordinate in pixels corresponding to specific value.
|
|
410
346
|
*
|
|
@@ -413,16 +349,11 @@ var ValueAxis = /** @class */ (function (_super) {
|
|
|
413
349
|
* @param baseValue Base value
|
|
414
350
|
* @return X coordinate
|
|
415
351
|
*/
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
value = baseValue + (value - baseValue) * location;
|
|
422
|
-
var position = this.valueToPosition(value);
|
|
423
|
-
return this._settings.renderer.positionToCoordinate(position);
|
|
424
|
-
}
|
|
425
|
-
});
|
|
352
|
+
getX(value, location, baseValue) {
|
|
353
|
+
value = baseValue + (value - baseValue) * location;
|
|
354
|
+
const position = this.valueToPosition(value);
|
|
355
|
+
return this._settings.renderer.positionToCoordinate(position);
|
|
356
|
+
}
|
|
426
357
|
/**
|
|
427
358
|
* Returns X coordinate in pixels corresponding to specific value.
|
|
428
359
|
*
|
|
@@ -431,653 +362,418 @@ var ValueAxis = /** @class */ (function (_super) {
|
|
|
431
362
|
* @param baseValue Base value
|
|
432
363
|
* @return X coordinate
|
|
433
364
|
*/
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
value = baseValue + (value - baseValue) * location;
|
|
440
|
-
var position = this.valueToPosition(value);
|
|
441
|
-
return this._settings.renderer.positionToCoordinate(position);
|
|
442
|
-
}
|
|
443
|
-
});
|
|
365
|
+
getY(value, location, baseValue) {
|
|
366
|
+
value = baseValue + (value - baseValue) * location;
|
|
367
|
+
const position = this.valueToPosition(value);
|
|
368
|
+
return this._settings.renderer.positionToCoordinate(position);
|
|
369
|
+
}
|
|
444
370
|
/**
|
|
445
371
|
* @ignore
|
|
446
372
|
*/
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
writable: true,
|
|
451
|
-
value: function (dataItem, field, _cellLocation, axisLocation) {
|
|
452
|
-
return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(dataItem, field, _cellLocation, axisLocation));
|
|
453
|
-
}
|
|
454
|
-
});
|
|
373
|
+
getDataItemCoordinateX(dataItem, field, _cellLocation, axisLocation) {
|
|
374
|
+
return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(dataItem, field, _cellLocation, axisLocation));
|
|
375
|
+
}
|
|
455
376
|
/**
|
|
456
377
|
* @ignore
|
|
457
378
|
*/
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
value = value * axisLocation + series.getStackedXValueWorking(dataItem, field);
|
|
468
|
-
}
|
|
469
|
-
else {
|
|
470
|
-
value = this._baseValue + (value - this._baseValue) * axisLocation;
|
|
471
|
-
}
|
|
472
|
-
return this.valueToPosition(value);
|
|
379
|
+
getDataItemPositionX(dataItem, field, _cellLocation, axisLocation) {
|
|
380
|
+
let value = dataItem.get(field);
|
|
381
|
+
const stackToItem = dataItem.get("stackToItemX");
|
|
382
|
+
if (stackToItem) {
|
|
383
|
+
const series = dataItem.component;
|
|
384
|
+
value = value * axisLocation + series.getStackedXValueWorking(dataItem, field);
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
value = this._baseValue + (value - this._baseValue) * axisLocation;
|
|
473
388
|
}
|
|
474
|
-
|
|
389
|
+
return this.valueToPosition(value);
|
|
390
|
+
}
|
|
475
391
|
/**
|
|
476
392
|
* @ignore
|
|
477
393
|
*/
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
writable: true,
|
|
482
|
-
value: function (dataItem, field, _cellLocation, axisLocation) {
|
|
483
|
-
return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(dataItem, field, _cellLocation, axisLocation));
|
|
484
|
-
}
|
|
485
|
-
});
|
|
394
|
+
getDataItemCoordinateY(dataItem, field, _cellLocation, axisLocation) {
|
|
395
|
+
return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(dataItem, field, _cellLocation, axisLocation));
|
|
396
|
+
}
|
|
486
397
|
/**
|
|
487
398
|
* @ignore
|
|
488
399
|
*/
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
var stackToItem = dataItem.get("stackToItemY");
|
|
496
|
-
if (stackToItem) {
|
|
497
|
-
var series = dataItem.component;
|
|
498
|
-
value = value * axisLocation + series.getStackedYValueWorking(dataItem, field);
|
|
499
|
-
}
|
|
500
|
-
else {
|
|
501
|
-
value = this._baseValue + (value - this._baseValue) * axisLocation;
|
|
502
|
-
}
|
|
503
|
-
return this.valueToPosition(value);
|
|
400
|
+
getDataItemPositionY(dataItem, field, _cellLocation, axisLocation) {
|
|
401
|
+
let value = dataItem.get(field);
|
|
402
|
+
const stackToItem = dataItem.get("stackToItemY");
|
|
403
|
+
if (stackToItem) {
|
|
404
|
+
const series = dataItem.component;
|
|
405
|
+
value = value * axisLocation + series.getStackedYValueWorking(dataItem, field);
|
|
504
406
|
}
|
|
505
|
-
|
|
407
|
+
else {
|
|
408
|
+
value = this._baseValue + (value - this._baseValue) * axisLocation;
|
|
409
|
+
}
|
|
410
|
+
return this.valueToPosition(value);
|
|
411
|
+
}
|
|
506
412
|
/**
|
|
507
413
|
* Returns relative position of axis' `baseValue`.
|
|
508
414
|
*
|
|
509
415
|
* @return Base value position
|
|
510
416
|
*/
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
writable: true,
|
|
515
|
-
value: function () {
|
|
516
|
-
return this.valueToPosition(this.baseValue());
|
|
517
|
-
}
|
|
518
|
-
});
|
|
417
|
+
basePosition() {
|
|
418
|
+
return this.valueToPosition(this.baseValue());
|
|
419
|
+
}
|
|
519
420
|
/**
|
|
520
421
|
* Base value of the [[ValueAxis]], which determines positive and negative
|
|
521
422
|
* values.
|
|
522
423
|
*
|
|
523
424
|
* @return Base value
|
|
524
425
|
*/
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
var max = Math.max(this.getPrivate("maxFinal", Infinity), this.getPrivate("selectionMax", Infinity));
|
|
532
|
-
var baseValue = this.get("baseValue", 0);
|
|
533
|
-
if (baseValue < min) {
|
|
534
|
-
baseValue = min;
|
|
535
|
-
}
|
|
536
|
-
if (baseValue > max) {
|
|
537
|
-
baseValue = max;
|
|
538
|
-
}
|
|
539
|
-
return baseValue;
|
|
426
|
+
baseValue() {
|
|
427
|
+
const min = Math.min(this.getPrivate("minFinal", -Infinity), this.getPrivate("selectionMin", -Infinity));
|
|
428
|
+
const max = Math.max(this.getPrivate("maxFinal", Infinity), this.getPrivate("selectionMax", Infinity));
|
|
429
|
+
let baseValue = this.get("baseValue", 0);
|
|
430
|
+
if (baseValue < min) {
|
|
431
|
+
baseValue = min;
|
|
540
432
|
}
|
|
541
|
-
|
|
433
|
+
if (baseValue > max) {
|
|
434
|
+
baseValue = max;
|
|
435
|
+
}
|
|
436
|
+
return baseValue;
|
|
437
|
+
}
|
|
542
438
|
/**
|
|
543
439
|
* @ignore
|
|
544
440
|
*/
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
}
|
|
599
|
-
var field_1;
|
|
600
|
-
var vc_1;
|
|
601
|
-
if (series.get("yAxis") == this) {
|
|
602
|
-
field_1 = "valueY";
|
|
603
|
-
vc_1 = "vcy";
|
|
604
|
-
}
|
|
605
|
-
else if (series.get("xAxis") == this) {
|
|
606
|
-
field_1 = "valueX";
|
|
607
|
-
vc_1 = "vcx";
|
|
608
|
-
}
|
|
609
|
-
var fieldWorking_1 = field_1 + "Working";
|
|
610
|
-
if (field_1) {
|
|
611
|
-
var _loop_1 = function (i) {
|
|
612
|
-
var sum = 0;
|
|
613
|
-
var total = 0;
|
|
614
|
-
$array.each(this_1.series, function (series) {
|
|
615
|
-
if (!series.get("excludeFromTotal")) {
|
|
616
|
-
var dataItem = series.dataItems[i];
|
|
617
|
-
if (dataItem) {
|
|
618
|
-
var value = dataItem.get(fieldWorking_1) * series.get(vc_1);
|
|
619
|
-
if (!$type.isNaN(value)) {
|
|
620
|
-
sum += value;
|
|
621
|
-
total += Math.abs(value);
|
|
622
|
-
}
|
|
441
|
+
cellEndValue(value) {
|
|
442
|
+
return value;
|
|
443
|
+
}
|
|
444
|
+
fixSmallStep(step) {
|
|
445
|
+
// happens because of floating point error
|
|
446
|
+
if (1 + step === 1) {
|
|
447
|
+
step *= 2;
|
|
448
|
+
return this.fixSmallStep(step);
|
|
449
|
+
}
|
|
450
|
+
return step;
|
|
451
|
+
}
|
|
452
|
+
_fixMin(min) {
|
|
453
|
+
return min;
|
|
454
|
+
}
|
|
455
|
+
_fixMax(max) {
|
|
456
|
+
return max;
|
|
457
|
+
}
|
|
458
|
+
_calculateTotals() {
|
|
459
|
+
if (this.get("calculateTotals")) {
|
|
460
|
+
let series = this.series[0];
|
|
461
|
+
if (series) {
|
|
462
|
+
let startIndex = series.startIndex();
|
|
463
|
+
if (series.dataItems.length > 0) {
|
|
464
|
+
if (startIndex > 0) {
|
|
465
|
+
startIndex--;
|
|
466
|
+
}
|
|
467
|
+
let endIndex = series.endIndex();
|
|
468
|
+
if (endIndex < series.dataItems.length) {
|
|
469
|
+
endIndex++;
|
|
470
|
+
}
|
|
471
|
+
let field;
|
|
472
|
+
let vc;
|
|
473
|
+
if (series.get("yAxis") == this) {
|
|
474
|
+
field = "valueY";
|
|
475
|
+
vc = "vcy";
|
|
476
|
+
}
|
|
477
|
+
else if (series.get("xAxis") == this) {
|
|
478
|
+
field = "valueX";
|
|
479
|
+
vc = "vcx";
|
|
480
|
+
}
|
|
481
|
+
let fieldWorking = field + "Working";
|
|
482
|
+
if (field) {
|
|
483
|
+
for (let i = startIndex; i < endIndex; i++) {
|
|
484
|
+
let sum = 0;
|
|
485
|
+
let total = 0;
|
|
486
|
+
$array.each(this.series, (series) => {
|
|
487
|
+
if (!series.get("excludeFromTotal")) {
|
|
488
|
+
let dataItem = series.dataItems[i];
|
|
489
|
+
if (dataItem) {
|
|
490
|
+
let value = dataItem.get(fieldWorking) * series.get(vc);
|
|
491
|
+
if (!$type.isNaN(value)) {
|
|
492
|
+
sum += value;
|
|
493
|
+
total += Math.abs(value);
|
|
623
494
|
}
|
|
624
495
|
}
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
$array.each(this.series, (series) => {
|
|
499
|
+
if (!series.get("excludeFromTotal")) {
|
|
500
|
+
let dataItem = series.dataItems[i];
|
|
501
|
+
if (dataItem) {
|
|
502
|
+
let value = dataItem.get(fieldWorking) * series.get(vc);
|
|
503
|
+
if (!$type.isNaN(value)) {
|
|
504
|
+
dataItem.set((field + "Total"), total);
|
|
505
|
+
dataItem.set((field + "Sum"), sum);
|
|
506
|
+
dataItem.set((field + "TotalPercent"), value / total * 100);
|
|
636
507
|
}
|
|
637
508
|
}
|
|
638
|
-
}
|
|
639
|
-
};
|
|
640
|
-
var this_1 = this;
|
|
641
|
-
for (var i = startIndex; i < endIndex; i++) {
|
|
642
|
-
_loop_1(i);
|
|
643
|
-
}
|
|
509
|
+
}
|
|
510
|
+
});
|
|
644
511
|
}
|
|
645
512
|
}
|
|
646
513
|
}
|
|
647
514
|
}
|
|
648
515
|
}
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
if (this.get("logarithmic")) {
|
|
664
|
-
if (this.get("extraMin") == null) {
|
|
665
|
-
extraMin = 0.1;
|
|
666
|
-
}
|
|
667
|
-
if (this.get("extraMax") == null) {
|
|
668
|
-
extraMax = 0.2;
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
var gridCount = this.get("renderer").gridCount();
|
|
672
|
-
var selectionStrictMinMax = this.get("strictMinMaxSelection");
|
|
673
|
-
var strictMinMax = this.get("strictMinMax");
|
|
674
|
-
if ($type.isNumber(min) && $type.isNumber(max)) {
|
|
675
|
-
var selectionMin_1 = max;
|
|
676
|
-
var selectionMax_1 = min;
|
|
677
|
-
$array.each(this.series, function (series) {
|
|
678
|
-
if (!series.get("ignoreMinMax")) {
|
|
679
|
-
var seriesMin = void 0;
|
|
680
|
-
var seriesMax = void 0;
|
|
681
|
-
var outOfSelection = series.getPrivate("outOfSelection");
|
|
682
|
-
if (series.get("xAxis") === _this) {
|
|
683
|
-
if (!outOfSelection) {
|
|
684
|
-
seriesMin = series.getPrivate("selectionMinX", series.getPrivate("minX"));
|
|
685
|
-
seriesMax = series.getPrivate("selectionMaxX", series.getPrivate("maxX"));
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
else if (series.get("yAxis") === _this) {
|
|
689
|
-
if (!outOfSelection) {
|
|
690
|
-
seriesMin = series.getPrivate("selectionMinY", series.getPrivate("minY"));
|
|
691
|
-
seriesMax = series.getPrivate("selectionMaxY", series.getPrivate("maxY"));
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
if (!series.isHidden() && !series.isShowing()) {
|
|
695
|
-
if ($type.isNumber(seriesMin)) {
|
|
696
|
-
selectionMin_1 = Math.min(selectionMin_1, seriesMin);
|
|
697
|
-
}
|
|
698
|
-
if ($type.isNumber(seriesMax)) {
|
|
699
|
-
selectionMax_1 = Math.max(selectionMax_1, seriesMax);
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
});
|
|
704
|
-
this.axisRanges.each(function (range) {
|
|
705
|
-
if (range.get("affectsMinMax")) {
|
|
706
|
-
var value = range.get("value");
|
|
707
|
-
if (value != null) {
|
|
708
|
-
selectionMin_1 = Math.min(selectionMin_1, value);
|
|
709
|
-
selectionMax_1 = Math.max(selectionMax_1, value);
|
|
710
|
-
}
|
|
711
|
-
value = range.get("endValue");
|
|
712
|
-
if (value != null) {
|
|
713
|
-
selectionMin_1 = Math.min(selectionMin_1, value);
|
|
714
|
-
selectionMax_1 = Math.max(selectionMax_1, value);
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
});
|
|
718
|
-
if (selectionMin_1 > selectionMax_1) {
|
|
719
|
-
_a = __read([selectionMax_1, selectionMin_1], 2), selectionMin_1 = _a[0], selectionMax_1 = _a[1];
|
|
720
|
-
}
|
|
721
|
-
if ($type.isNumber(minDefined)) {
|
|
722
|
-
if (strictMinMax) {
|
|
723
|
-
selectionMin_1 = minDefined;
|
|
724
|
-
}
|
|
725
|
-
else {
|
|
726
|
-
selectionMin_1 = min;
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
else if (strictMinMax) {
|
|
730
|
-
if ($type.isNumber(this._minReal)) {
|
|
731
|
-
selectionMin_1 = this._minReal;
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
if ($type.isNumber(maxDefined)) {
|
|
735
|
-
if (strictMinMax) {
|
|
736
|
-
selectionMax_1 = maxDefined;
|
|
737
|
-
}
|
|
738
|
-
else {
|
|
739
|
-
selectionMax_1 = max;
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
else if (strictMinMax) {
|
|
743
|
-
if ($type.isNumber(this._maxReal)) {
|
|
744
|
-
selectionMax_1 = this._maxReal;
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
if (selectionMin_1 === selectionMax_1) {
|
|
748
|
-
selectionMin_1 -= this._deltaMinMax;
|
|
749
|
-
selectionMax_1 += this._deltaMinMax;
|
|
750
|
-
var minMaxStep2 = this._adjustMinMax(selectionMin_1, selectionMax_1, gridCount, strictMinMax);
|
|
751
|
-
selectionMin_1 = minMaxStep2.min;
|
|
752
|
-
selectionMax_1 = minMaxStep2.max;
|
|
753
|
-
}
|
|
754
|
-
var selectionMinReal = selectionMin_1;
|
|
755
|
-
var selectionMaxReal = selectionMax_1;
|
|
756
|
-
selectionMin_1 -= (selectionMax_1 - selectionMin_1) * extraMin;
|
|
757
|
-
selectionMax_1 += (selectionMax_1 - selectionMin_1) * extraMax;
|
|
758
|
-
var minMaxStep = this._adjustMinMax(selectionMin_1, selectionMax_1, gridCount);
|
|
759
|
-
selectionMin_1 = minMaxStep.min;
|
|
760
|
-
selectionMax_1 = minMaxStep.max;
|
|
761
|
-
selectionMin_1 = $math.fitToRange(selectionMin_1, min, max);
|
|
762
|
-
selectionMax_1 = $math.fitToRange(selectionMax_1, min, max);
|
|
763
|
-
// do it for the second time !important
|
|
764
|
-
minMaxStep = this._adjustMinMax(selectionMin_1, selectionMax_1, gridCount, true);
|
|
765
|
-
if (!strictMinMax) {
|
|
766
|
-
selectionMin_1 = minMaxStep.min;
|
|
767
|
-
selectionMax_1 = minMaxStep.max;
|
|
768
|
-
}
|
|
769
|
-
var syncWithAxis = this.get("syncWithAxis");
|
|
770
|
-
if (syncWithAxis) {
|
|
771
|
-
minMaxStep = this._syncAxes(selectionMin_1, selectionMax_1, minMaxStep.step, syncWithAxis.getPrivate("selectionMinFinal", syncWithAxis.getPrivate("minFinal", 0)), syncWithAxis.getPrivate("selectionMaxFinal", syncWithAxis.getPrivate("maxFinal", 1)), syncWithAxis.getPrivate("selectionStepFinal", syncWithAxis.getPrivate("step", 1)));
|
|
772
|
-
selectionMin_1 = minMaxStep.min;
|
|
773
|
-
selectionMax_1 = minMaxStep.max;
|
|
774
|
-
}
|
|
775
|
-
if (strictMinMax) {
|
|
776
|
-
if ($type.isNumber(minDefined)) {
|
|
777
|
-
selectionMin_1 = Math.max(selectionMin_1, minDefined);
|
|
778
|
-
}
|
|
779
|
-
if ($type.isNumber(maxDefined)) {
|
|
780
|
-
selectionMax_1 = Math.min(selectionMax_1, maxDefined);
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
if (selectionStrictMinMax) {
|
|
784
|
-
selectionMin_1 = selectionMinReal - (selectionMax_1 - selectionMin_1) * extraMin;
|
|
785
|
-
selectionMax_1 = selectionMaxReal + (selectionMax_1 - selectionMin_1) * extraMax;
|
|
786
|
-
}
|
|
787
|
-
if (this.get("logarithmic")) {
|
|
788
|
-
if (selectionMin_1 <= 0) {
|
|
789
|
-
selectionMin_1 = selectionMinReal * (1 - Math.min(extraMin, 0.99));
|
|
790
|
-
}
|
|
791
|
-
if (selectionMin_1 < min) {
|
|
792
|
-
selectionMin_1 = min;
|
|
793
|
-
}
|
|
794
|
-
if (selectionMax_1 > max) {
|
|
795
|
-
selectionMax_1 = max;
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
var len = Math.min(20, Math.ceil(Math.log(this.getPrivate("maxZoomFactor", 100) + 1) / Math.LN10) + 2);
|
|
799
|
-
var start = $math.round(this.valueToFinalPosition(selectionMin_1), len);
|
|
800
|
-
var end = $math.round(this.valueToFinalPosition(selectionMax_1), len);
|
|
801
|
-
this.setPrivateRaw("selectionMinFinal", selectionMin_1);
|
|
802
|
-
this.setPrivateRaw("selectionMaxFinal", selectionMax_1);
|
|
803
|
-
this.setPrivateRaw("selectionStepFinal", minMaxStep.step);
|
|
804
|
-
this.zoom(start, end);
|
|
516
|
+
}
|
|
517
|
+
_getSelectionMinMax() {
|
|
518
|
+
const min = this.getPrivate("minFinal");
|
|
519
|
+
const max = this.getPrivate("maxFinal");
|
|
520
|
+
const minDefined = this.get("min");
|
|
521
|
+
const maxDefined = this.get("max");
|
|
522
|
+
let extraMin = this.get("extraMin", 0);
|
|
523
|
+
let extraMax = this.get("extraMax", 0);
|
|
524
|
+
if (this.get("logarithmic")) {
|
|
525
|
+
if (this.get("extraMin") == null) {
|
|
526
|
+
extraMin = 0.1;
|
|
527
|
+
}
|
|
528
|
+
if (this.get("extraMax") == null) {
|
|
529
|
+
extraMax = 0.2;
|
|
805
530
|
}
|
|
806
531
|
}
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
var minDefined = this.get("min");
|
|
815
|
-
var maxDefined = this.get("max");
|
|
816
|
-
var min = Infinity;
|
|
817
|
-
var max = -Infinity;
|
|
818
|
-
var extraMin = this.get("extraMin", 0);
|
|
819
|
-
var extraMax = this.get("extraMax", 0);
|
|
820
|
-
if (this.get("logarithmic")) {
|
|
821
|
-
if (this.get("extraMin") == null) {
|
|
822
|
-
extraMin = 0.1;
|
|
823
|
-
}
|
|
824
|
-
if (this.get("extraMax") == null) {
|
|
825
|
-
extraMax = 0.2;
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
var minDiff = Infinity;
|
|
829
|
-
$array.each(this.series, function (series) {
|
|
532
|
+
const gridCount = this.get("renderer").gridCount();
|
|
533
|
+
const selectionStrictMinMax = this.get("strictMinMaxSelection");
|
|
534
|
+
const strictMinMax = this.get("strictMinMax");
|
|
535
|
+
if ($type.isNumber(min) && $type.isNumber(max)) {
|
|
536
|
+
let selectionMin = max;
|
|
537
|
+
let selectionMax = min;
|
|
538
|
+
$array.each(this.series, (series) => {
|
|
830
539
|
if (!series.get("ignoreMinMax")) {
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
540
|
+
let seriesMin;
|
|
541
|
+
let seriesMax;
|
|
542
|
+
const outOfSelection = series.getPrivate("outOfSelection");
|
|
543
|
+
if (series.get("xAxis") === this) {
|
|
544
|
+
if (!outOfSelection) {
|
|
545
|
+
seriesMin = series.getPrivate("selectionMinX", series.getPrivate("minX"));
|
|
546
|
+
seriesMax = series.getPrivate("selectionMaxX", series.getPrivate("maxX"));
|
|
547
|
+
}
|
|
836
548
|
}
|
|
837
|
-
else if (series.get("yAxis") ===
|
|
838
|
-
|
|
839
|
-
|
|
549
|
+
else if (series.get("yAxis") === this) {
|
|
550
|
+
if (!outOfSelection) {
|
|
551
|
+
seriesMin = series.getPrivate("selectionMinY", series.getPrivate("minY"));
|
|
552
|
+
seriesMax = series.getPrivate("selectionMaxY", series.getPrivate("maxY"));
|
|
553
|
+
}
|
|
840
554
|
}
|
|
841
|
-
if (
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
var diff = seriesMax - seriesMin;
|
|
845
|
-
if (diff <= 0) {
|
|
846
|
-
diff = Math.abs(seriesMax / 100);
|
|
555
|
+
if (!series.isHidden() && !series.isShowing()) {
|
|
556
|
+
if ($type.isNumber(seriesMin)) {
|
|
557
|
+
selectionMin = Math.min(selectionMin, seriesMin);
|
|
847
558
|
}
|
|
848
|
-
if (
|
|
849
|
-
|
|
559
|
+
if ($type.isNumber(seriesMax)) {
|
|
560
|
+
selectionMax = Math.max(selectionMax, seriesMax);
|
|
850
561
|
}
|
|
851
562
|
}
|
|
852
563
|
}
|
|
853
564
|
});
|
|
854
|
-
this.axisRanges.each(
|
|
565
|
+
this.axisRanges.each((range) => {
|
|
855
566
|
if (range.get("affectsMinMax")) {
|
|
856
|
-
|
|
567
|
+
let value = range.get("value");
|
|
857
568
|
if (value != null) {
|
|
858
|
-
|
|
859
|
-
|
|
569
|
+
selectionMin = Math.min(selectionMin, value);
|
|
570
|
+
selectionMax = Math.max(selectionMax, value);
|
|
860
571
|
}
|
|
861
572
|
value = range.get("endValue");
|
|
862
573
|
if (value != null) {
|
|
863
|
-
|
|
864
|
-
|
|
574
|
+
selectionMin = Math.min(selectionMin, value);
|
|
575
|
+
selectionMax = Math.max(selectionMax, value);
|
|
865
576
|
}
|
|
866
577
|
}
|
|
867
578
|
});
|
|
868
|
-
if (
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
579
|
+
if (selectionMin > selectionMax) {
|
|
580
|
+
[selectionMin, selectionMax] = [selectionMax, selectionMin];
|
|
581
|
+
}
|
|
582
|
+
if ($type.isNumber(minDefined)) {
|
|
583
|
+
if (strictMinMax) {
|
|
584
|
+
selectionMin = minDefined;
|
|
874
585
|
}
|
|
875
|
-
|
|
876
|
-
|
|
586
|
+
else {
|
|
587
|
+
selectionMin = min;
|
|
877
588
|
}
|
|
878
589
|
}
|
|
879
|
-
if (
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
if ($type.isNumber(minDefined)) {
|
|
884
|
-
min = minDefined;
|
|
590
|
+
else if (strictMinMax) {
|
|
591
|
+
if ($type.isNumber(this._minReal)) {
|
|
592
|
+
selectionMin = this._minReal;
|
|
593
|
+
}
|
|
885
594
|
}
|
|
886
595
|
if ($type.isNumber(maxDefined)) {
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
// meaning no min/max found on series/ranges and no min/max was defined
|
|
890
|
-
if (min === Infinity || max === -Infinity) {
|
|
891
|
-
return;
|
|
892
|
-
}
|
|
893
|
-
var initialMin = min;
|
|
894
|
-
var initialMax = max;
|
|
895
|
-
// adapter
|
|
896
|
-
var minAdapted = this.adapters.fold("min", min);
|
|
897
|
-
var maxAdapted = this.adapters.fold("max", max);
|
|
898
|
-
if ($type.isNumber(minAdapted)) {
|
|
899
|
-
min = minAdapted;
|
|
900
|
-
}
|
|
901
|
-
if ($type.isNumber(maxAdapted)) {
|
|
902
|
-
max = maxAdapted;
|
|
903
|
-
}
|
|
904
|
-
// DateAxis does some magic here
|
|
905
|
-
min = this._fixMin(min);
|
|
906
|
-
max = this._fixMax(max);
|
|
907
|
-
// this happens if starLocation and endLocation are 0.5 and DateAxis has only one date
|
|
908
|
-
if (max - min <= 1 / Math.pow(10, 15)) {
|
|
909
|
-
if (max - min !== 0) {
|
|
910
|
-
this._deltaMinMax = (max - min) / 2;
|
|
596
|
+
if (strictMinMax) {
|
|
597
|
+
selectionMax = maxDefined;
|
|
911
598
|
}
|
|
912
599
|
else {
|
|
913
|
-
|
|
600
|
+
selectionMax = max;
|
|
914
601
|
}
|
|
915
|
-
min -= this._deltaMinMax;
|
|
916
|
-
max += this._deltaMinMax;
|
|
917
602
|
}
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
if (this.get("logarithmic")) {
|
|
922
|
-
// don't let min go below 0 if real min is >= 0
|
|
923
|
-
if (min < 0 && initialMin >= 0) {
|
|
924
|
-
min = 0;
|
|
925
|
-
}
|
|
926
|
-
// don't let max go above 0 if real max is <= 0
|
|
927
|
-
if (max > 0 && initialMax <= 0) {
|
|
928
|
-
max = 0;
|
|
603
|
+
else if (strictMinMax) {
|
|
604
|
+
if ($type.isNumber(this._maxReal)) {
|
|
605
|
+
selectionMax = this._maxReal;
|
|
929
606
|
}
|
|
930
607
|
}
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
608
|
+
if (selectionMin === selectionMax) {
|
|
609
|
+
selectionMin -= this._deltaMinMax;
|
|
610
|
+
selectionMax += this._deltaMinMax;
|
|
611
|
+
let minMaxStep2 = this._adjustMinMax(selectionMin, selectionMax, gridCount, strictMinMax);
|
|
612
|
+
selectionMin = minMaxStep2.min;
|
|
613
|
+
selectionMax = minMaxStep2.max;
|
|
614
|
+
}
|
|
615
|
+
let selectionMinReal = selectionMin;
|
|
616
|
+
let selectionMaxReal = selectionMax;
|
|
617
|
+
selectionMin -= (selectionMax - selectionMin) * extraMin;
|
|
618
|
+
selectionMax += (selectionMax - selectionMin) * extraMax;
|
|
619
|
+
let minMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount);
|
|
620
|
+
selectionMin = minMaxStep.min;
|
|
621
|
+
selectionMax = minMaxStep.max;
|
|
622
|
+
selectionMin = $math.fitToRange(selectionMin, min, max);
|
|
623
|
+
selectionMax = $math.fitToRange(selectionMax, min, max);
|
|
624
|
+
// do it for the second time !important
|
|
625
|
+
minMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount, true);
|
|
626
|
+
if (!strictMinMax) {
|
|
627
|
+
selectionMin = minMaxStep.min;
|
|
628
|
+
selectionMax = minMaxStep.max;
|
|
937
629
|
}
|
|
938
|
-
|
|
939
|
-
if (
|
|
940
|
-
|
|
630
|
+
const syncWithAxis = this.get("syncWithAxis");
|
|
631
|
+
if (syncWithAxis) {
|
|
632
|
+
minMaxStep = this._syncAxes(selectionMin, selectionMax, minMaxStep.step, syncWithAxis.getPrivate("selectionMinFinal", syncWithAxis.getPrivate("minFinal", 0)), syncWithAxis.getPrivate("selectionMaxFinal", syncWithAxis.getPrivate("maxFinal", 1)), syncWithAxis.getPrivate("selectionStepFinal", syncWithAxis.getPrivate("step", 1)));
|
|
633
|
+
selectionMin = minMaxStep.min;
|
|
634
|
+
selectionMax = minMaxStep.max;
|
|
941
635
|
}
|
|
942
|
-
var gridCount = this.get("renderer").gridCount();
|
|
943
|
-
var minMaxStep = this._adjustMinMax(min, max, gridCount, strict);
|
|
944
|
-
min = minMaxStep.min;
|
|
945
|
-
max = minMaxStep.max;
|
|
946
|
-
// do it for the second time with strict true (importat!)
|
|
947
|
-
minMaxStep = this._adjustMinMax(min, max, gridCount, true);
|
|
948
|
-
min = minMaxStep.min;
|
|
949
|
-
max = minMaxStep.max;
|
|
950
|
-
// return min max if strict
|
|
951
636
|
if (strictMinMax) {
|
|
952
637
|
if ($type.isNumber(minDefined)) {
|
|
953
|
-
|
|
954
|
-
}
|
|
955
|
-
else {
|
|
956
|
-
min = this._minReal;
|
|
638
|
+
selectionMin = Math.max(selectionMin, minDefined);
|
|
957
639
|
}
|
|
958
640
|
if ($type.isNumber(maxDefined)) {
|
|
959
|
-
|
|
641
|
+
selectionMax = Math.min(selectionMax, maxDefined);
|
|
960
642
|
}
|
|
961
|
-
|
|
962
|
-
|
|
643
|
+
}
|
|
644
|
+
if (selectionStrictMinMax) {
|
|
645
|
+
selectionMin = selectionMinReal - (selectionMax - selectionMin) * extraMin;
|
|
646
|
+
selectionMax = selectionMaxReal + (selectionMax - selectionMin) * extraMax;
|
|
647
|
+
}
|
|
648
|
+
if (this.get("logarithmic")) {
|
|
649
|
+
if (selectionMin <= 0) {
|
|
650
|
+
selectionMin = selectionMinReal * (1 - Math.min(extraMin, 0.99));
|
|
963
651
|
}
|
|
964
|
-
if (
|
|
965
|
-
|
|
966
|
-
|
|
652
|
+
if (selectionMin < min) {
|
|
653
|
+
selectionMin = min;
|
|
654
|
+
}
|
|
655
|
+
if (selectionMax > max) {
|
|
656
|
+
selectionMax = max;
|
|
967
657
|
}
|
|
968
|
-
min -= (max - min) * extraMin;
|
|
969
|
-
max += (max - min) * extraMax;
|
|
970
|
-
}
|
|
971
|
-
minAdapted = this.adapters.fold("min", min);
|
|
972
|
-
maxAdapted = this.adapters.fold("max", max);
|
|
973
|
-
if ($type.isNumber(minAdapted)) {
|
|
974
|
-
min = minAdapted;
|
|
975
658
|
}
|
|
976
|
-
|
|
977
|
-
|
|
659
|
+
let len = Math.min(20, Math.ceil(Math.log(this.getPrivate("maxZoomFactor", 100) + 1) / Math.LN10) + 2);
|
|
660
|
+
let start = $math.round(this.valueToFinalPosition(selectionMin), len);
|
|
661
|
+
let end = $math.round(this.valueToFinalPosition(selectionMax), len);
|
|
662
|
+
this.setPrivateRaw("selectionMinFinal", selectionMin);
|
|
663
|
+
this.setPrivateRaw("selectionMaxFinal", selectionMax);
|
|
664
|
+
this.setPrivateRaw("selectionStepFinal", minMaxStep.step);
|
|
665
|
+
this.zoom(start, end);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
_getMinMax() {
|
|
669
|
+
let minDefined = this.get("min");
|
|
670
|
+
let maxDefined = this.get("max");
|
|
671
|
+
let min = Infinity;
|
|
672
|
+
let max = -Infinity;
|
|
673
|
+
let extraMin = this.get("extraMin", 0);
|
|
674
|
+
let extraMax = this.get("extraMax", 0);
|
|
675
|
+
if (this.get("logarithmic")) {
|
|
676
|
+
if (this.get("extraMin") == null) {
|
|
677
|
+
extraMin = 0.1;
|
|
678
|
+
}
|
|
679
|
+
if (this.get("extraMax") == null) {
|
|
680
|
+
extraMax = 0.2;
|
|
978
681
|
}
|
|
979
|
-
|
|
980
|
-
|
|
682
|
+
}
|
|
683
|
+
let minDiff = Infinity;
|
|
684
|
+
$array.each(this.series, (series) => {
|
|
685
|
+
if (!series.get("ignoreMinMax")) {
|
|
686
|
+
let seriesMin;
|
|
687
|
+
let seriesMax;
|
|
688
|
+
if (series.get("xAxis") === this) {
|
|
689
|
+
seriesMin = series.getPrivate("minX");
|
|
690
|
+
seriesMax = series.getPrivate("maxX");
|
|
691
|
+
}
|
|
692
|
+
else if (series.get("yAxis") === this) {
|
|
693
|
+
seriesMin = series.getPrivate("minY");
|
|
694
|
+
seriesMax = series.getPrivate("maxY");
|
|
695
|
+
}
|
|
696
|
+
if ($type.isNumber(seriesMin) && $type.isNumber(seriesMax)) {
|
|
697
|
+
min = Math.min(min, seriesMin);
|
|
698
|
+
max = Math.max(max, seriesMax);
|
|
699
|
+
let diff = seriesMax - seriesMin;
|
|
700
|
+
if (diff <= 0) {
|
|
701
|
+
diff = Math.abs(seriesMax / 100);
|
|
702
|
+
}
|
|
703
|
+
if (diff < minDiff) {
|
|
704
|
+
minDiff = diff;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
981
707
|
}
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
708
|
+
});
|
|
709
|
+
this.axisRanges.each((range) => {
|
|
710
|
+
if (range.get("affectsMinMax")) {
|
|
711
|
+
let value = range.get("value");
|
|
712
|
+
if (value != null) {
|
|
713
|
+
min = Math.min(min, value);
|
|
714
|
+
max = Math.max(max, value);
|
|
715
|
+
}
|
|
716
|
+
value = range.get("endValue");
|
|
717
|
+
if (value != null) {
|
|
718
|
+
min = Math.min(min, value);
|
|
719
|
+
max = Math.max(max, value);
|
|
720
|
+
}
|
|
991
721
|
}
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
min = this._minReal;
|
|
997
|
-
max = this._maxReal;
|
|
722
|
+
});
|
|
723
|
+
if (this.get("logarithmic")) {
|
|
724
|
+
let treatZeroAs = this.get("treatZeroAs");
|
|
725
|
+
if ($type.isNumber(treatZeroAs)) {
|
|
998
726
|
if (min <= 0) {
|
|
999
|
-
min =
|
|
727
|
+
min = treatZeroAs;
|
|
1000
728
|
}
|
|
1001
729
|
}
|
|
1002
|
-
if (
|
|
1003
|
-
|
|
1004
|
-
this.setPrivate("minFinal", min);
|
|
1005
|
-
this.setPrivate("maxFinal", max);
|
|
1006
|
-
this._saveMinMax(min, max);
|
|
1007
|
-
var duration = this.get("interpolationDuration", 0);
|
|
1008
|
-
var easing = this.get("interpolationEasing");
|
|
1009
|
-
this.animatePrivate({ key: "min", to: min, duration: duration, easing: easing });
|
|
1010
|
-
this.animatePrivate({ key: "max", to: max, duration: duration, easing: easing });
|
|
1011
|
-
}
|
|
730
|
+
if (min <= 0) {
|
|
731
|
+
new Error("Logarithmic value axis can not have values <= 0.");
|
|
1012
732
|
}
|
|
1013
733
|
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
writable: true,
|
|
1047
|
-
value: function (min, max, gridCount, strictMode) {
|
|
1048
|
-
// will fail if 0
|
|
1049
|
-
if (gridCount <= 1) {
|
|
1050
|
-
gridCount = 1;
|
|
1051
|
-
}
|
|
1052
|
-
gridCount = Math.round(gridCount);
|
|
1053
|
-
var initialMin = min;
|
|
1054
|
-
var initialMax = max;
|
|
1055
|
-
var difference = max - min;
|
|
1056
|
-
// in case min and max is the same, use max
|
|
1057
|
-
if (difference === 0) {
|
|
1058
|
-
difference = Math.abs(max);
|
|
1059
|
-
}
|
|
1060
|
-
// the number by which we need to raise 10 to get difference
|
|
1061
|
-
var exponent = Math.log(Math.abs(difference)) * Math.LOG10E;
|
|
1062
|
-
// here we find a number which is power of 10 and has the same count of numbers as difference has
|
|
1063
|
-
var power = Math.pow(10, Math.floor(exponent));
|
|
1064
|
-
// reduce this number by 10 times
|
|
1065
|
-
power = power / 10;
|
|
1066
|
-
var extra = power;
|
|
1067
|
-
if (strictMode) {
|
|
1068
|
-
extra = 0;
|
|
1069
|
-
}
|
|
1070
|
-
// round down min
|
|
1071
|
-
if (strictMode) {
|
|
1072
|
-
min = Math.floor(min / power) * power;
|
|
1073
|
-
// round up max
|
|
1074
|
-
max = Math.ceil(max / power) * power;
|
|
734
|
+
if (min === 0 && max === 0) {
|
|
735
|
+
max = 0.9;
|
|
736
|
+
min = -0.9;
|
|
737
|
+
}
|
|
738
|
+
if ($type.isNumber(minDefined)) {
|
|
739
|
+
min = minDefined;
|
|
740
|
+
}
|
|
741
|
+
if ($type.isNumber(maxDefined)) {
|
|
742
|
+
max = maxDefined;
|
|
743
|
+
}
|
|
744
|
+
// meaning no min/max found on series/ranges and no min/max was defined
|
|
745
|
+
if (min === Infinity || max === -Infinity) {
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
748
|
+
const initialMin = min;
|
|
749
|
+
const initialMax = max;
|
|
750
|
+
// adapter
|
|
751
|
+
let minAdapted = this.adapters.fold("min", min);
|
|
752
|
+
let maxAdapted = this.adapters.fold("max", max);
|
|
753
|
+
if ($type.isNumber(minAdapted)) {
|
|
754
|
+
min = minAdapted;
|
|
755
|
+
}
|
|
756
|
+
if ($type.isNumber(maxAdapted)) {
|
|
757
|
+
max = maxAdapted;
|
|
758
|
+
}
|
|
759
|
+
// DateAxis does some magic here
|
|
760
|
+
min = this._fixMin(min);
|
|
761
|
+
max = this._fixMax(max);
|
|
762
|
+
// this happens if starLocation and endLocation are 0.5 and DateAxis has only one date
|
|
763
|
+
if (max - min <= 1 / Math.pow(10, 15)) {
|
|
764
|
+
if (max - min !== 0) {
|
|
765
|
+
this._deltaMinMax = (max - min) / 2;
|
|
1075
766
|
}
|
|
1076
767
|
else {
|
|
1077
|
-
|
|
1078
|
-
// round up max
|
|
1079
|
-
max = Math.floor(max / power) * power + extra;
|
|
768
|
+
this._getDelta(max);
|
|
1080
769
|
}
|
|
770
|
+
min -= this._deltaMinMax;
|
|
771
|
+
max += this._deltaMinMax;
|
|
772
|
+
}
|
|
773
|
+
// add extras
|
|
774
|
+
min -= (max - min) * extraMin;
|
|
775
|
+
max += (max - min) * extraMax;
|
|
776
|
+
if (this.get("logarithmic")) {
|
|
1081
777
|
// don't let min go below 0 if real min is >= 0
|
|
1082
778
|
if (min < 0 && initialMin >= 0) {
|
|
1083
779
|
min = 0;
|
|
@@ -1086,88 +782,221 @@ var ValueAxis = /** @class */ (function (_super) {
|
|
|
1086
782
|
if (max > 0 && initialMax <= 0) {
|
|
1087
783
|
max = 0;
|
|
1088
784
|
}
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
785
|
+
}
|
|
786
|
+
this._minReal = min;
|
|
787
|
+
this._maxReal = max;
|
|
788
|
+
let strictMinMax = this.get("strictMinMax");
|
|
789
|
+
let strictMinMaxSelection = this.get("strictMinMaxSelection", false);
|
|
790
|
+
if (strictMinMaxSelection) {
|
|
791
|
+
strictMinMax = strictMinMaxSelection;
|
|
792
|
+
}
|
|
793
|
+
let strict = strictMinMax;
|
|
794
|
+
if ($type.isNumber(maxDefined)) {
|
|
795
|
+
strict = true;
|
|
796
|
+
}
|
|
797
|
+
let gridCount = this.get("renderer").gridCount();
|
|
798
|
+
let minMaxStep = this._adjustMinMax(min, max, gridCount, strict);
|
|
799
|
+
min = minMaxStep.min;
|
|
800
|
+
max = minMaxStep.max;
|
|
801
|
+
// do it for the second time with strict true (importat!)
|
|
802
|
+
minMaxStep = this._adjustMinMax(min, max, gridCount, true);
|
|
803
|
+
min = minMaxStep.min;
|
|
804
|
+
max = minMaxStep.max;
|
|
805
|
+
// return min max if strict
|
|
806
|
+
if (strictMinMax) {
|
|
807
|
+
if ($type.isNumber(minDefined)) {
|
|
808
|
+
min = minDefined;
|
|
1111
809
|
}
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
if (stepPower < 1) {
|
|
1115
|
-
// exponent is less then 1 too. Count decimals of exponent
|
|
1116
|
-
decCount = Math.round(Math.abs(Math.log(Math.abs(stepPower)) * Math.LOG10E)) + 1;
|
|
1117
|
-
// round step
|
|
1118
|
-
step = $math.round(step, decCount);
|
|
810
|
+
else {
|
|
811
|
+
min = this._minReal;
|
|
1119
812
|
}
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
min = $math.round(step * minCount, decCount);
|
|
1123
|
-
var maxCount;
|
|
1124
|
-
if (!strictMode) {
|
|
1125
|
-
maxCount = Math.ceil(max / step);
|
|
813
|
+
if ($type.isNumber(maxDefined)) {
|
|
814
|
+
max = maxDefined;
|
|
1126
815
|
}
|
|
1127
816
|
else {
|
|
1128
|
-
|
|
817
|
+
max = this._maxReal;
|
|
1129
818
|
}
|
|
1130
|
-
if (
|
|
1131
|
-
|
|
819
|
+
if (max - min <= 0.00000001) {
|
|
820
|
+
min -= this._deltaMinMax;
|
|
821
|
+
max += this._deltaMinMax;
|
|
1132
822
|
}
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
823
|
+
min -= (max - min) * extraMin;
|
|
824
|
+
max += (max - min) * extraMax;
|
|
825
|
+
}
|
|
826
|
+
minAdapted = this.adapters.fold("min", min);
|
|
827
|
+
maxAdapted = this.adapters.fold("max", max);
|
|
828
|
+
if ($type.isNumber(minAdapted)) {
|
|
829
|
+
min = minAdapted;
|
|
830
|
+
}
|
|
831
|
+
if ($type.isNumber(maxAdapted)) {
|
|
832
|
+
max = maxAdapted;
|
|
833
|
+
}
|
|
834
|
+
if (minDiff == Infinity) {
|
|
835
|
+
minDiff = (max - min);
|
|
836
|
+
}
|
|
837
|
+
// this is to avoid floating point number error
|
|
838
|
+
let decCount = Math.round(Math.abs(Math.log(Math.abs(max - min)) * Math.LOG10E)) + 5;
|
|
839
|
+
min = $math.round(min, decCount);
|
|
840
|
+
max = $math.round(max, decCount);
|
|
841
|
+
const syncWithAxis = this.get("syncWithAxis");
|
|
842
|
+
if (syncWithAxis) {
|
|
843
|
+
minMaxStep = this._syncAxes(min, max, minMaxStep.step, syncWithAxis.getPrivate("minFinal", syncWithAxis.getPrivate("min", 0)), syncWithAxis.getPrivate("maxFinal", syncWithAxis.getPrivate("max", 1)), syncWithAxis.getPrivate("step", 1));
|
|
844
|
+
min = minMaxStep.min;
|
|
845
|
+
max = minMaxStep.max;
|
|
846
|
+
}
|
|
847
|
+
this.setPrivateRaw("maxZoomFactor", Math.max(1, Math.ceil((max - min) / minDiff * this.get("maxZoomFactor", 100))));
|
|
848
|
+
this._fixZoomFactor();
|
|
849
|
+
if (this.get("logarithmic")) {
|
|
850
|
+
this._minLogAdjusted = min;
|
|
851
|
+
min = this._minReal;
|
|
852
|
+
max = this._maxReal;
|
|
853
|
+
if (min <= 0) {
|
|
854
|
+
min = initialMin * (1 - Math.min(extraMin, 0.99));
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
if ($type.isNumber(min) && $type.isNumber(max)) {
|
|
858
|
+
if (this.getPrivate("minFinal") !== min || this.getPrivate("maxFinal") !== max) {
|
|
859
|
+
this.setPrivate("minFinal", min);
|
|
860
|
+
this.setPrivate("maxFinal", max);
|
|
861
|
+
this._saveMinMax(min, max);
|
|
862
|
+
const duration = this.get("interpolationDuration", 0);
|
|
863
|
+
const easing = this.get("interpolationEasing");
|
|
864
|
+
this.animatePrivate({ key: "min", to: min, duration, easing });
|
|
865
|
+
this.animatePrivate({ key: "max", to: max, duration, easing });
|
|
1136
866
|
}
|
|
1137
|
-
|
|
1138
|
-
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
_fixZoomFactor() {
|
|
870
|
+
}
|
|
871
|
+
_getDelta(max) {
|
|
872
|
+
// the number by which we need to raise 10 to get difference
|
|
873
|
+
let exponent = Math.log(Math.abs(max)) * Math.LOG10E;
|
|
874
|
+
// here we find a number which is power of 10 and has the same count of numbers as difference has
|
|
875
|
+
let power = Math.pow(10, Math.floor(exponent));
|
|
876
|
+
// reduce this number by 10 times
|
|
877
|
+
power = power / 10;
|
|
878
|
+
this._deltaMinMax = power;
|
|
879
|
+
}
|
|
880
|
+
_saveMinMax(_min, _max) {
|
|
881
|
+
}
|
|
882
|
+
_adjustMinMax(min, max, gridCount, strictMode) {
|
|
883
|
+
// will fail if 0
|
|
884
|
+
if (gridCount <= 1) {
|
|
885
|
+
gridCount = 1;
|
|
886
|
+
}
|
|
887
|
+
gridCount = Math.round(gridCount);
|
|
888
|
+
let initialMin = min;
|
|
889
|
+
let initialMax = max;
|
|
890
|
+
let difference = max - min;
|
|
891
|
+
// in case min and max is the same, use max
|
|
892
|
+
if (difference === 0) {
|
|
893
|
+
difference = Math.abs(max);
|
|
894
|
+
}
|
|
895
|
+
// the number by which we need to raise 10 to get difference
|
|
896
|
+
let exponent = Math.log(Math.abs(difference)) * Math.LOG10E;
|
|
897
|
+
// here we find a number which is power of 10 and has the same count of numbers as difference has
|
|
898
|
+
let power = Math.pow(10, Math.floor(exponent));
|
|
899
|
+
// reduce this number by 10 times
|
|
900
|
+
power = power / 10;
|
|
901
|
+
let extra = power;
|
|
902
|
+
if (strictMode) {
|
|
903
|
+
extra = 0;
|
|
904
|
+
}
|
|
905
|
+
// round down min
|
|
906
|
+
if (strictMode) {
|
|
907
|
+
min = Math.floor(min / power) * power;
|
|
908
|
+
// round up max
|
|
909
|
+
max = Math.ceil(max / power) * power;
|
|
910
|
+
}
|
|
911
|
+
else {
|
|
912
|
+
min = Math.ceil(min / power) * power - extra;
|
|
913
|
+
// round up max
|
|
914
|
+
max = Math.floor(max / power) * power + extra;
|
|
915
|
+
}
|
|
916
|
+
// don't let min go below 0 if real min is >= 0
|
|
917
|
+
if (min < 0 && initialMin >= 0) {
|
|
918
|
+
min = 0;
|
|
919
|
+
}
|
|
920
|
+
// don't let max go above 0 if real max is <= 0
|
|
921
|
+
if (max > 0 && initialMax <= 0) {
|
|
922
|
+
max = 0;
|
|
923
|
+
}
|
|
924
|
+
exponent = Math.log(Math.abs(difference)) * Math.LOG10E;
|
|
925
|
+
power = Math.pow(10, Math.floor(exponent));
|
|
926
|
+
power = power / 100; // used to be 10 in v4, but this caused issue that there could be limited number of grids with even very small minGridDistance
|
|
927
|
+
// approximate difference between two grid lines
|
|
928
|
+
let step = Math.ceil((difference / gridCount) / power) * power;
|
|
929
|
+
let stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(step)) * Math.LOG10E));
|
|
930
|
+
// the step should divide by 2, 5, and 10.
|
|
931
|
+
let stepDivisor = Math.ceil(step / stepPower); // number 0 - 10
|
|
932
|
+
if (stepDivisor > 5) {
|
|
933
|
+
stepDivisor = 10;
|
|
934
|
+
}
|
|
935
|
+
else if (stepDivisor <= 5 && stepDivisor > 2) {
|
|
936
|
+
stepDivisor = 5;
|
|
937
|
+
}
|
|
938
|
+
// now get real step
|
|
939
|
+
step = Math.ceil(step / (stepPower * stepDivisor)) * stepPower * stepDivisor;
|
|
940
|
+
let maxPrecision = this.get("maxPrecision");
|
|
941
|
+
if ($type.isNumber(maxPrecision)) {
|
|
942
|
+
let ceiledStep = $math.ceil(step, maxPrecision);
|
|
943
|
+
if (maxPrecision < Number.MAX_VALUE && step !== ceiledStep) {
|
|
944
|
+
step = ceiledStep;
|
|
1139
945
|
}
|
|
1140
|
-
step = this.fixSmallStep(step);
|
|
1141
|
-
return { min: min, max: max, step: step };
|
|
1142
946
|
}
|
|
1143
|
-
|
|
947
|
+
let decCount = 0;
|
|
948
|
+
// in case numbers are smaller than 1
|
|
949
|
+
if (stepPower < 1) {
|
|
950
|
+
// exponent is less then 1 too. Count decimals of exponent
|
|
951
|
+
decCount = Math.round(Math.abs(Math.log(Math.abs(stepPower)) * Math.LOG10E)) + 1;
|
|
952
|
+
// round step
|
|
953
|
+
step = $math.round(step, decCount);
|
|
954
|
+
}
|
|
955
|
+
// final min and max
|
|
956
|
+
let minCount = Math.floor(min / step);
|
|
957
|
+
min = $math.round(step * minCount, decCount);
|
|
958
|
+
let maxCount;
|
|
959
|
+
if (!strictMode) {
|
|
960
|
+
maxCount = Math.ceil(max / step);
|
|
961
|
+
}
|
|
962
|
+
else {
|
|
963
|
+
maxCount = Math.floor(max / step);
|
|
964
|
+
}
|
|
965
|
+
if (maxCount === minCount) {
|
|
966
|
+
maxCount++;
|
|
967
|
+
}
|
|
968
|
+
max = $math.round(step * maxCount, decCount);
|
|
969
|
+
if (max < initialMax) {
|
|
970
|
+
max = max + step;
|
|
971
|
+
}
|
|
972
|
+
if (min > initialMin) {
|
|
973
|
+
min = min - step;
|
|
974
|
+
}
|
|
975
|
+
step = this.fixSmallStep(step);
|
|
976
|
+
return { min: min, max: max, step: step };
|
|
977
|
+
}
|
|
1144
978
|
/**
|
|
1145
979
|
* Returns text to be used in an axis tooltip for specific relative position.
|
|
1146
980
|
*
|
|
1147
981
|
* @param position Position
|
|
1148
982
|
* @return Tooltip text
|
|
1149
983
|
*/
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
}
|
|
1163
|
-
else {
|
|
1164
|
-
return formatter.format(value, undefined, decimals);
|
|
1165
|
-
//label.set("text", this.getNumberFormatter().format(value, undefined, this.getPrivate("stepDecimalPlaces")));
|
|
1166
|
-
}
|
|
1167
|
-
// //@todo number formatter + tag
|
|
1168
|
-
// return $math.round(this.positionToValue(position), this.getPrivate("stepDecimalPlaces")).toString();
|
|
984
|
+
getTooltipText(position) {
|
|
985
|
+
const numberFormat = this.get("tooltipNumberFormat", this.get("numberFormat"));
|
|
986
|
+
const formatter = this.getNumberFormatter();
|
|
987
|
+
const extraDecimals = this.get("extraTooltipPrecision", 0);
|
|
988
|
+
const decimals = this.getPrivate("stepDecimalPlaces", 0) + extraDecimals;
|
|
989
|
+
const value = $math.round(this.positionToValue(position), decimals);
|
|
990
|
+
if (numberFormat) {
|
|
991
|
+
return formatter.format(value, numberFormat);
|
|
992
|
+
}
|
|
993
|
+
else {
|
|
994
|
+
return formatter.format(value, undefined, decimals);
|
|
995
|
+
//label.set("text", this.getNumberFormatter().format(value, undefined, this.getPrivate("stepDecimalPlaces")));
|
|
1169
996
|
}
|
|
1170
|
-
|
|
997
|
+
// //@todo number formatter + tag
|
|
998
|
+
// return $math.round(this.positionToValue(position), this.getPrivate("stepDecimalPlaces")).toString();
|
|
999
|
+
}
|
|
1171
1000
|
/**
|
|
1172
1001
|
* Returns a data item from series that is closest to the `position`.
|
|
1173
1002
|
*
|
|
@@ -1175,27 +1004,22 @@ var ValueAxis = /** @class */ (function (_super) {
|
|
|
1175
1004
|
* @param position Relative position
|
|
1176
1005
|
* @return Data item
|
|
1177
1006
|
*/
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
var diff = Math.abs(dataItem.get(fieldName) - value);
|
|
1189
|
-
if (index === undefined || diff < oldDiff) {
|
|
1190
|
-
index = i;
|
|
1191
|
-
oldDiff = diff;
|
|
1192
|
-
}
|
|
1193
|
-
});
|
|
1194
|
-
if (index != null) {
|
|
1195
|
-
return series.dataItems[index];
|
|
1007
|
+
getSeriesItem(series, position) {
|
|
1008
|
+
let fieldName = (this.getPrivate("name") + this.get("renderer").getPrivate("letter"));
|
|
1009
|
+
let value = this.positionToValue(position);
|
|
1010
|
+
let index = undefined;
|
|
1011
|
+
let oldDiff;
|
|
1012
|
+
$array.each(series.dataItems, (dataItem, i) => {
|
|
1013
|
+
const diff = Math.abs(dataItem.get(fieldName) - value);
|
|
1014
|
+
if (index === undefined || diff < oldDiff) {
|
|
1015
|
+
index = i;
|
|
1016
|
+
oldDiff = diff;
|
|
1196
1017
|
}
|
|
1018
|
+
});
|
|
1019
|
+
if (index != null) {
|
|
1020
|
+
return series.dataItems[index];
|
|
1197
1021
|
}
|
|
1198
|
-
}
|
|
1022
|
+
}
|
|
1199
1023
|
/**
|
|
1200
1024
|
* Zooms the axis to specific `start` and `end` values.
|
|
1201
1025
|
*
|
|
@@ -1205,18 +1029,13 @@ var ValueAxis = /** @class */ (function (_super) {
|
|
|
1205
1029
|
* @param end End value
|
|
1206
1030
|
* @param duration Duration in milliseconds
|
|
1207
1031
|
*/
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
var min = this.getPrivate("minFinal", 0);
|
|
1214
|
-
var max = this.getPrivate("maxFinal", 0);
|
|
1215
|
-
if (this.getPrivate("min") != null && this.getPrivate("max") != null) {
|
|
1216
|
-
this.zoom((start - min) / (max - min), (end - min) / (max - min), duration);
|
|
1217
|
-
}
|
|
1032
|
+
zoomToValues(start, end, duration) {
|
|
1033
|
+
const min = this.getPrivate("minFinal", 0);
|
|
1034
|
+
const max = this.getPrivate("maxFinal", 0);
|
|
1035
|
+
if (this.getPrivate("min") != null && this.getPrivate("max") != null) {
|
|
1036
|
+
this.zoom((start - min) / (max - min), (end - min) / (max - min), duration);
|
|
1218
1037
|
}
|
|
1219
|
-
}
|
|
1038
|
+
}
|
|
1220
1039
|
/**
|
|
1221
1040
|
* Syncs with a target axis.
|
|
1222
1041
|
*
|
|
@@ -1224,88 +1043,76 @@ var ValueAxis = /** @class */ (function (_super) {
|
|
|
1224
1043
|
* @param max Max
|
|
1225
1044
|
* @param step Step
|
|
1226
1045
|
*/
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
if (
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
if (c
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
if (c / 3 == Math.round(c / 3)) {
|
|
1252
|
-
omin = min - diff * c;
|
|
1253
|
-
if (min >= 0 && omin < 0) {
|
|
1254
|
-
omin = 0;
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
else {
|
|
1258
|
-
omax = max + diff * c;
|
|
1259
|
-
if (omax <= 0 && omax > 0) {
|
|
1260
|
-
omax = 0;
|
|
1261
|
-
}
|
|
1046
|
+
_syncAxes(min, max, step, syncMin, syncMax, syncStep) {
|
|
1047
|
+
let axis = this.get("syncWithAxis");
|
|
1048
|
+
if (axis) {
|
|
1049
|
+
let count = Math.round(syncMax - syncMin) / syncStep;
|
|
1050
|
+
let currentCount = Math.round((max - min) / step);
|
|
1051
|
+
let gridCount = this.get("renderer").gridCount();
|
|
1052
|
+
if ($type.isNumber(count) && $type.isNumber(currentCount)) {
|
|
1053
|
+
let synced = false;
|
|
1054
|
+
let c = 0;
|
|
1055
|
+
let diff = (max - min) * 0.01;
|
|
1056
|
+
let omin = min;
|
|
1057
|
+
let omax = max;
|
|
1058
|
+
let ostep = step;
|
|
1059
|
+
while (synced != true) {
|
|
1060
|
+
synced = this._checkSync(omin, omax, ostep, count);
|
|
1061
|
+
c++;
|
|
1062
|
+
if (c > 500) {
|
|
1063
|
+
synced = true;
|
|
1064
|
+
}
|
|
1065
|
+
if (!synced) {
|
|
1066
|
+
if (c / 3 == Math.round(c / 3)) {
|
|
1067
|
+
omin = min - diff * c;
|
|
1068
|
+
if (min >= 0 && omin < 0) {
|
|
1069
|
+
omin = 0;
|
|
1262
1070
|
}
|
|
1263
|
-
var minMaxStep = this._adjustMinMax(omin, omax, gridCount, true);
|
|
1264
|
-
omin = minMaxStep.min;
|
|
1265
|
-
omax = minMaxStep.max;
|
|
1266
|
-
ostep = minMaxStep.step;
|
|
1267
1071
|
}
|
|
1268
1072
|
else {
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1073
|
+
omax = max + diff * c;
|
|
1074
|
+
if (omax <= 0 && omax > 0) {
|
|
1075
|
+
omax = 0;
|
|
1076
|
+
}
|
|
1272
1077
|
}
|
|
1078
|
+
let minMaxStep = this._adjustMinMax(omin, omax, gridCount, true);
|
|
1079
|
+
omin = minMaxStep.min;
|
|
1080
|
+
omax = minMaxStep.max;
|
|
1081
|
+
ostep = minMaxStep.step;
|
|
1082
|
+
}
|
|
1083
|
+
else {
|
|
1084
|
+
min = omin;
|
|
1085
|
+
max = omax;
|
|
1086
|
+
step = ostep;
|
|
1273
1087
|
}
|
|
1274
1088
|
}
|
|
1275
1089
|
}
|
|
1276
|
-
return { min: min, max: max, step: step };
|
|
1277
1090
|
}
|
|
1278
|
-
|
|
1091
|
+
return { min: min, max: max, step: step };
|
|
1092
|
+
}
|
|
1279
1093
|
/**
|
|
1280
1094
|
* Returns `true` if axis needs to be resunced with some other axis.
|
|
1281
1095
|
*/
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
var currentCount = (max - min) / step;
|
|
1288
|
-
for (var i = 1; i < count; i++) {
|
|
1289
|
-
if ($math.round(currentCount / i, 1) == count || currentCount * i == count) {
|
|
1290
|
-
return true;
|
|
1291
|
-
}
|
|
1096
|
+
_checkSync(min, max, step, count) {
|
|
1097
|
+
let currentCount = (max - min) / step;
|
|
1098
|
+
for (let i = 1; i < count; i++) {
|
|
1099
|
+
if ($math.round(currentCount / i, 1) == count || currentCount * i == count) {
|
|
1100
|
+
return true;
|
|
1292
1101
|
}
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
}(Axis));
|
|
1310
|
-
export { ValueAxis };
|
|
1102
|
+
}
|
|
1103
|
+
return false;
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
Object.defineProperty(ValueAxis, "className", {
|
|
1107
|
+
enumerable: true,
|
|
1108
|
+
configurable: true,
|
|
1109
|
+
writable: true,
|
|
1110
|
+
value: "ValueAxis"
|
|
1111
|
+
});
|
|
1112
|
+
Object.defineProperty(ValueAxis, "classNames", {
|
|
1113
|
+
enumerable: true,
|
|
1114
|
+
configurable: true,
|
|
1115
|
+
writable: true,
|
|
1116
|
+
value: Axis.classNames.concat([ValueAxis.className])
|
|
1117
|
+
});
|
|
1311
1118
|
//# sourceMappingURL=ValueAxis.js.map
|