@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 } from "tslib";
|
|
2
1
|
import { MapChartDefaultTheme } from "./MapChartDefaultTheme";
|
|
3
2
|
import { SerialChart } from "../../core/render/SerialChart";
|
|
4
3
|
import { Rectangle } from "../../core/render/Rectangle";
|
|
@@ -11,197 +10,190 @@ import * as $type from "../../core/util/Type";
|
|
|
11
10
|
import * as $mapUtils from "./MapUtils";
|
|
12
11
|
import * as $object from "../../core/util/Object";
|
|
13
12
|
import * as $utils from "../../core/util/Utils";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Object.defineProperty(_this, "_downTranslateX", {
|
|
13
|
+
export class MapChart extends SerialChart {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
Object.defineProperty(this, "_downTranslateX", {
|
|
19
17
|
enumerable: true,
|
|
20
18
|
configurable: true,
|
|
21
19
|
writable: true,
|
|
22
20
|
value: void 0
|
|
23
21
|
});
|
|
24
|
-
Object.defineProperty(
|
|
22
|
+
Object.defineProperty(this, "_downTranslateY", {
|
|
25
23
|
enumerable: true,
|
|
26
24
|
configurable: true,
|
|
27
25
|
writable: true,
|
|
28
26
|
value: void 0
|
|
29
27
|
});
|
|
30
|
-
Object.defineProperty(
|
|
28
|
+
Object.defineProperty(this, "_downRotationX", {
|
|
31
29
|
enumerable: true,
|
|
32
30
|
configurable: true,
|
|
33
31
|
writable: true,
|
|
34
32
|
value: void 0
|
|
35
33
|
});
|
|
36
|
-
Object.defineProperty(
|
|
34
|
+
Object.defineProperty(this, "_downRotationY", {
|
|
37
35
|
enumerable: true,
|
|
38
36
|
configurable: true,
|
|
39
37
|
writable: true,
|
|
40
38
|
value: void 0
|
|
41
39
|
});
|
|
42
|
-
Object.defineProperty(
|
|
40
|
+
Object.defineProperty(this, "_downRotationZ", {
|
|
43
41
|
enumerable: true,
|
|
44
42
|
configurable: true,
|
|
45
43
|
writable: true,
|
|
46
44
|
value: void 0
|
|
47
45
|
});
|
|
48
|
-
Object.defineProperty(
|
|
46
|
+
Object.defineProperty(this, "_pLat", {
|
|
49
47
|
enumerable: true,
|
|
50
48
|
configurable: true,
|
|
51
49
|
writable: true,
|
|
52
50
|
value: 0
|
|
53
51
|
});
|
|
54
|
-
Object.defineProperty(
|
|
52
|
+
Object.defineProperty(this, "_pLon", {
|
|
55
53
|
enumerable: true,
|
|
56
54
|
configurable: true,
|
|
57
55
|
writable: true,
|
|
58
56
|
value: 0
|
|
59
57
|
});
|
|
60
|
-
Object.defineProperty(
|
|
58
|
+
Object.defineProperty(this, "_movePoints", {
|
|
61
59
|
enumerable: true,
|
|
62
60
|
configurable: true,
|
|
63
61
|
writable: true,
|
|
64
62
|
value: {}
|
|
65
63
|
});
|
|
66
|
-
Object.defineProperty(
|
|
64
|
+
Object.defineProperty(this, "_downZoomLevel", {
|
|
67
65
|
enumerable: true,
|
|
68
66
|
configurable: true,
|
|
69
67
|
writable: true,
|
|
70
68
|
value: 1
|
|
71
69
|
});
|
|
72
|
-
Object.defineProperty(
|
|
70
|
+
Object.defineProperty(this, "_doubleDownDistance", {
|
|
73
71
|
enumerable: true,
|
|
74
72
|
configurable: true,
|
|
75
73
|
writable: true,
|
|
76
74
|
value: 0
|
|
77
75
|
});
|
|
78
|
-
Object.defineProperty(
|
|
76
|
+
Object.defineProperty(this, "_dirtyGeometries", {
|
|
79
77
|
enumerable: true,
|
|
80
78
|
configurable: true,
|
|
81
79
|
writable: true,
|
|
82
80
|
value: false
|
|
83
81
|
});
|
|
84
|
-
Object.defineProperty(
|
|
82
|
+
Object.defineProperty(this, "_geometryColection", {
|
|
85
83
|
enumerable: true,
|
|
86
84
|
configurable: true,
|
|
87
85
|
writable: true,
|
|
88
86
|
value: { type: "GeometryCollection", geometries: [] }
|
|
89
87
|
});
|
|
90
|
-
Object.defineProperty(
|
|
88
|
+
Object.defineProperty(this, "_centerLocation", {
|
|
91
89
|
enumerable: true,
|
|
92
90
|
configurable: true,
|
|
93
91
|
writable: true,
|
|
94
92
|
value: null
|
|
95
93
|
});
|
|
96
|
-
Object.defineProperty(
|
|
94
|
+
Object.defineProperty(this, "_za", {
|
|
97
95
|
enumerable: true,
|
|
98
96
|
configurable: true,
|
|
99
97
|
writable: true,
|
|
100
98
|
value: void 0
|
|
101
99
|
});
|
|
102
|
-
Object.defineProperty(
|
|
100
|
+
Object.defineProperty(this, "_rxa", {
|
|
103
101
|
enumerable: true,
|
|
104
102
|
configurable: true,
|
|
105
103
|
writable: true,
|
|
106
104
|
value: void 0
|
|
107
105
|
});
|
|
108
|
-
Object.defineProperty(
|
|
106
|
+
Object.defineProperty(this, "_rya", {
|
|
109
107
|
enumerable: true,
|
|
110
108
|
configurable: true,
|
|
111
109
|
writable: true,
|
|
112
110
|
value: void 0
|
|
113
111
|
});
|
|
114
|
-
Object.defineProperty(
|
|
112
|
+
Object.defineProperty(this, "_txa", {
|
|
115
113
|
enumerable: true,
|
|
116
114
|
configurable: true,
|
|
117
115
|
writable: true,
|
|
118
116
|
value: void 0
|
|
119
117
|
});
|
|
120
|
-
Object.defineProperty(
|
|
118
|
+
Object.defineProperty(this, "_tya", {
|
|
121
119
|
enumerable: true,
|
|
122
120
|
configurable: true,
|
|
123
121
|
writable: true,
|
|
124
122
|
value: void 0
|
|
125
123
|
});
|
|
126
|
-
Object.defineProperty(
|
|
124
|
+
Object.defineProperty(this, "_mapBounds", {
|
|
127
125
|
enumerable: true,
|
|
128
126
|
configurable: true,
|
|
129
127
|
writable: true,
|
|
130
128
|
value: [[0, 0], [0, 0]]
|
|
131
129
|
});
|
|
132
|
-
Object.defineProperty(
|
|
130
|
+
Object.defineProperty(this, "_geoCentroid", {
|
|
133
131
|
enumerable: true,
|
|
134
132
|
configurable: true,
|
|
135
133
|
writable: true,
|
|
136
134
|
value: { longitude: 0, latitude: 0 }
|
|
137
135
|
});
|
|
138
|
-
Object.defineProperty(
|
|
136
|
+
Object.defineProperty(this, "_geoBounds", {
|
|
139
137
|
enumerable: true,
|
|
140
138
|
configurable: true,
|
|
141
139
|
writable: true,
|
|
142
140
|
value: { left: 0, right: 0, top: 0, bottom: 0 }
|
|
143
141
|
});
|
|
144
|
-
Object.defineProperty(
|
|
142
|
+
Object.defineProperty(this, "_prevGeoBounds", {
|
|
145
143
|
enumerable: true,
|
|
146
144
|
configurable: true,
|
|
147
145
|
writable: true,
|
|
148
146
|
value: { left: 0, right: 0, top: 0, bottom: 0 }
|
|
149
147
|
});
|
|
150
|
-
Object.defineProperty(
|
|
148
|
+
Object.defineProperty(this, "_dispatchBounds", {
|
|
151
149
|
enumerable: true,
|
|
152
150
|
configurable: true,
|
|
153
151
|
writable: true,
|
|
154
152
|
value: false
|
|
155
153
|
});
|
|
156
|
-
Object.defineProperty(
|
|
154
|
+
Object.defineProperty(this, "_wheelDp", {
|
|
157
155
|
enumerable: true,
|
|
158
156
|
configurable: true,
|
|
159
157
|
writable: true,
|
|
160
158
|
value: void 0
|
|
161
159
|
});
|
|
162
|
-
Object.defineProperty(
|
|
160
|
+
Object.defineProperty(this, "_pw", {
|
|
163
161
|
enumerable: true,
|
|
164
162
|
configurable: true,
|
|
165
163
|
writable: true,
|
|
166
164
|
value: void 0
|
|
167
165
|
});
|
|
168
|
-
Object.defineProperty(
|
|
166
|
+
Object.defineProperty(this, "_ph", {
|
|
169
167
|
enumerable: true,
|
|
170
168
|
configurable: true,
|
|
171
169
|
writable: true,
|
|
172
170
|
value: void 0
|
|
173
171
|
});
|
|
174
|
-
Object.defineProperty(
|
|
172
|
+
Object.defineProperty(this, "_mapFitted", {
|
|
175
173
|
enumerable: true,
|
|
176
174
|
configurable: true,
|
|
177
175
|
writable: true,
|
|
178
176
|
value: false
|
|
179
177
|
});
|
|
180
|
-
Object.defineProperty(
|
|
178
|
+
Object.defineProperty(this, "_centerX", {
|
|
181
179
|
enumerable: true,
|
|
182
180
|
configurable: true,
|
|
183
181
|
writable: true,
|
|
184
182
|
value: 0
|
|
185
183
|
});
|
|
186
|
-
Object.defineProperty(
|
|
184
|
+
Object.defineProperty(this, "_centerY", {
|
|
187
185
|
enumerable: true,
|
|
188
186
|
configurable: true,
|
|
189
187
|
writable: true,
|
|
190
188
|
value: 0
|
|
191
189
|
});
|
|
192
|
-
return _this;
|
|
193
190
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
var path = geoPath();
|
|
201
|
-
path.projection(projection);
|
|
202
|
-
this.setPrivateRaw("geoPath", path);
|
|
203
|
-
}
|
|
204
|
-
});
|
|
191
|
+
_makeGeoPath() {
|
|
192
|
+
const projection = this.get("projection");
|
|
193
|
+
const path = geoPath();
|
|
194
|
+
path.projection(projection);
|
|
195
|
+
this.setPrivateRaw("geoPath", path);
|
|
196
|
+
}
|
|
205
197
|
/**
|
|
206
198
|
* Returns a geoPoint of the current zoom position.
|
|
207
199
|
*
|
|
@@ -209,474 +201,396 @@ var MapChart = /** @class */ (function (_super) {
|
|
|
209
201
|
*
|
|
210
202
|
* @since 5.2.19
|
|
211
203
|
*/
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
writable: true,
|
|
216
|
-
value: function () {
|
|
217
|
-
return this.invert(this.seriesContainer.toGlobal({ x: this.width() / 2, y: this.height() / 2 }));
|
|
218
|
-
}
|
|
219
|
-
});
|
|
204
|
+
geoPoint() {
|
|
205
|
+
return this.invert(this.seriesContainer.toGlobal({ x: this.width() / 2, y: this.height() / 2 }));
|
|
206
|
+
}
|
|
220
207
|
/**
|
|
221
208
|
* Returns coordinates to geographical center of the map.
|
|
222
209
|
*/
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
writable: true,
|
|
227
|
-
value: function () {
|
|
228
|
-
return this._geoCentroid;
|
|
229
|
-
}
|
|
230
|
-
});
|
|
210
|
+
geoCentroid() {
|
|
211
|
+
return this._geoCentroid;
|
|
212
|
+
}
|
|
231
213
|
/**
|
|
232
214
|
* Returns geographical bounds of the map.
|
|
233
215
|
*/
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
if (this
|
|
253
|
-
|
|
216
|
+
geoBounds() {
|
|
217
|
+
return this._geoBounds;
|
|
218
|
+
}
|
|
219
|
+
_handleSetWheel() {
|
|
220
|
+
const wheelX = this.get("wheelX");
|
|
221
|
+
const wheelY = this.get("wheelY");
|
|
222
|
+
const chartContainer = this.chartContainer;
|
|
223
|
+
if (wheelX != "none" || wheelY != "none") {
|
|
224
|
+
if (this._wheelDp) {
|
|
225
|
+
this._wheelDp.dispose();
|
|
226
|
+
}
|
|
227
|
+
this._wheelDp = chartContainer.events.on("wheel", (event) => {
|
|
228
|
+
const wheelEasing = this.get("wheelEasing");
|
|
229
|
+
const wheelSensitivity = this.get("wheelSensitivity", 1);
|
|
230
|
+
const wheelDuration = this.get("wheelDuration", 0);
|
|
231
|
+
const wheelEvent = event.originalEvent;
|
|
232
|
+
// Ignore wheel event if it is happening on a non-chart element, e.g. if
|
|
233
|
+
// some page element is over the chart.
|
|
234
|
+
if ($utils.isLocalEvent(wheelEvent, this)) {
|
|
235
|
+
wheelEvent.preventDefault();
|
|
254
236
|
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
var wheelSensitivity = _this.get("wheelSensitivity", 1);
|
|
258
|
-
var wheelDuration = _this.get("wheelDuration", 0);
|
|
259
|
-
var wheelEvent = event.originalEvent;
|
|
260
|
-
// Ignore wheel event if it is happening on a non-chart element, e.g. if
|
|
261
|
-
// some page element is over the chart.
|
|
262
|
-
if ($utils.isLocalEvent(wheelEvent, _this)) {
|
|
263
|
-
wheelEvent.preventDefault();
|
|
264
|
-
}
|
|
265
|
-
else {
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
|
-
var chartContainer = _this.chartContainer;
|
|
269
|
-
var point = chartContainer._display.toLocal(event.point);
|
|
270
|
-
if ((wheelY == "zoom")) {
|
|
271
|
-
_this._handleWheelZoom(wheelEvent.deltaY, point);
|
|
272
|
-
}
|
|
273
|
-
else if (wheelY == "rotateY") {
|
|
274
|
-
_this._handleWheelRotateY(wheelEvent.deltaY / 5 * wheelSensitivity, wheelDuration, wheelEasing);
|
|
275
|
-
}
|
|
276
|
-
else if (wheelY == "rotateX") {
|
|
277
|
-
_this._handleWheelRotateX(wheelEvent.deltaY / 5 * wheelSensitivity, wheelDuration, wheelEasing);
|
|
278
|
-
}
|
|
279
|
-
if ((wheelX == "zoom")) {
|
|
280
|
-
_this._handleWheelZoom(wheelEvent.deltaX, point);
|
|
281
|
-
}
|
|
282
|
-
else if (wheelX == "rotateY") {
|
|
283
|
-
_this._handleWheelRotateY(wheelEvent.deltaX / 5 * wheelSensitivity, wheelDuration, wheelEasing);
|
|
284
|
-
}
|
|
285
|
-
else if (wheelX == "rotateX") {
|
|
286
|
-
_this._handleWheelRotateX(wheelEvent.deltaX / 5 * wheelSensitivity, wheelDuration, wheelEasing);
|
|
287
|
-
}
|
|
288
|
-
});
|
|
289
|
-
this._disposers.push(this._wheelDp);
|
|
290
|
-
}
|
|
291
|
-
else {
|
|
292
|
-
if (this._wheelDp) {
|
|
293
|
-
this._wheelDp.dispose();
|
|
237
|
+
else {
|
|
238
|
+
return;
|
|
294
239
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
enumerable: false,
|
|
300
|
-
configurable: true,
|
|
301
|
-
writable: true,
|
|
302
|
-
value: function () {
|
|
303
|
-
var _this = this;
|
|
304
|
-
_super.prototype._prepareChildren.call(this);
|
|
305
|
-
var projection = this.get("projection");
|
|
306
|
-
var w = this.innerWidth();
|
|
307
|
-
var h = this.innerHeight();
|
|
308
|
-
if (this.isDirty("projection")) {
|
|
309
|
-
this._makeGeoPath();
|
|
310
|
-
this.markDirtyProjection();
|
|
311
|
-
this._fitMap();
|
|
312
|
-
projection.scale(this.getPrivate("mapScale") * this.get("zoomLevel", 1));
|
|
313
|
-
if (projection.rotate) {
|
|
314
|
-
projection.rotate([this.get("rotationX", 0), this.get("rotationY", 0), this.get("rotationZ", 0)]);
|
|
240
|
+
const chartContainer = this.chartContainer;
|
|
241
|
+
const point = chartContainer._display.toLocal(event.point);
|
|
242
|
+
if ((wheelY == "zoom")) {
|
|
243
|
+
this._handleWheelZoom(wheelEvent.deltaY, point);
|
|
315
244
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
var hw = w / 2;
|
|
319
|
-
var hh = h / 2;
|
|
320
|
-
if (prev.invert) {
|
|
321
|
-
var centerLocation = prev.invert([hw, hh]);
|
|
322
|
-
if (centerLocation) {
|
|
323
|
-
var xy = projection(centerLocation);
|
|
324
|
-
if (xy) {
|
|
325
|
-
var translate = projection.translate();
|
|
326
|
-
var xx = hw - ((xy[0] - translate[0]));
|
|
327
|
-
var yy = hh - ((xy[1] - translate[1]));
|
|
328
|
-
projection.translate([xx, yy]);
|
|
329
|
-
this.setRaw("translateX", xx);
|
|
330
|
-
this.setRaw("translateY", yy);
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
}
|
|
245
|
+
else if (wheelY == "rotateY") {
|
|
246
|
+
this._handleWheelRotateY(wheelEvent.deltaY / 5 * wheelSensitivity, wheelDuration, wheelEasing);
|
|
334
247
|
}
|
|
248
|
+
else if (wheelY == "rotateX") {
|
|
249
|
+
this._handleWheelRotateX(wheelEvent.deltaY / 5 * wheelSensitivity, wheelDuration, wheelEasing);
|
|
250
|
+
}
|
|
251
|
+
if ((wheelX == "zoom")) {
|
|
252
|
+
this._handleWheelZoom(wheelEvent.deltaX, point);
|
|
253
|
+
}
|
|
254
|
+
else if (wheelX == "rotateY") {
|
|
255
|
+
this._handleWheelRotateY(wheelEvent.deltaX / 5 * wheelSensitivity, wheelDuration, wheelEasing);
|
|
256
|
+
}
|
|
257
|
+
else if (wheelX == "rotateX") {
|
|
258
|
+
this._handleWheelRotateX(wheelEvent.deltaX / 5 * wheelSensitivity, wheelDuration, wheelEasing);
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
this._disposers.push(this._wheelDp);
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
if (this._wheelDp) {
|
|
265
|
+
this._wheelDp.dispose();
|
|
335
266
|
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
_prepareChildren() {
|
|
270
|
+
super._prepareChildren();
|
|
271
|
+
const projection = this.get("projection");
|
|
272
|
+
const w = this.innerWidth();
|
|
273
|
+
const h = this.innerHeight();
|
|
274
|
+
if (this.isDirty("projection")) {
|
|
275
|
+
this._makeGeoPath();
|
|
276
|
+
this.markDirtyProjection();
|
|
277
|
+
this._fitMap();
|
|
278
|
+
projection.scale(this.getPrivate("mapScale") * this.get("zoomLevel", 1));
|
|
279
|
+
if (projection.rotate) {
|
|
280
|
+
projection.rotate([this.get("rotationX", 0), this.get("rotationY", 0), this.get("rotationZ", 0)]);
|
|
281
|
+
}
|
|
282
|
+
let prev = this._prevSettings.projection;
|
|
283
|
+
if (prev && prev != projection) {
|
|
284
|
+
let hw = w / 2;
|
|
285
|
+
let hh = h / 2;
|
|
286
|
+
if (prev.invert) {
|
|
287
|
+
let centerLocation = prev.invert([hw, hh]);
|
|
288
|
+
if (centerLocation) {
|
|
289
|
+
let xy = projection(centerLocation);
|
|
357
290
|
if (xy) {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
291
|
+
let translate = projection.translate();
|
|
292
|
+
let xx = hw - ((xy[0] - translate[0]));
|
|
293
|
+
let yy = hh - ((xy[1] - translate[1]));
|
|
361
294
|
projection.translate([xx, yy]);
|
|
362
295
|
this.setRaw("translateX", xx);
|
|
363
296
|
this.setRaw("translateY", yy);
|
|
364
|
-
this._centerX = translate[0];
|
|
365
|
-
this._centerY = translate[1];
|
|
366
297
|
}
|
|
367
298
|
}
|
|
368
|
-
this.markDirtyProjection();
|
|
369
|
-
var geoPath_1 = this.getPrivate("geoPath");
|
|
370
|
-
this._mapBounds = geoPath_1.bounds(this._geometryColection);
|
|
371
299
|
}
|
|
372
300
|
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
301
|
+
}
|
|
302
|
+
if (this.isDirty("wheelX") || this.isDirty("wheelY")) {
|
|
303
|
+
this._handleSetWheel();
|
|
304
|
+
}
|
|
305
|
+
var previousGeometries = this._geometryColection.geometries;
|
|
306
|
+
if (this._dirtyGeometries) {
|
|
307
|
+
this._geometryColection.geometries = [];
|
|
308
|
+
this.series.each((series) => {
|
|
309
|
+
$array.pushAll(this._geometryColection.geometries, series._geometries);
|
|
310
|
+
});
|
|
311
|
+
this._fitMap();
|
|
312
|
+
}
|
|
313
|
+
if (previousGeometries.length != 0 && (w != this._pw || h != this._ph || this._dirtyGeometries)) {
|
|
314
|
+
if (w > 0 && h > 0) {
|
|
315
|
+
let hw = w / 2;
|
|
316
|
+
let hh = h / 2;
|
|
317
|
+
projection.fitSize([w, h], this._geometryColection);
|
|
318
|
+
const newScale = projection.scale();
|
|
319
|
+
this.setPrivateRaw("mapScale", newScale);
|
|
320
|
+
projection.scale(newScale * this.get("zoomLevel", 1));
|
|
321
|
+
if (this._centerLocation) {
|
|
322
|
+
let xy = projection(this._centerLocation);
|
|
323
|
+
if (xy) {
|
|
324
|
+
let translate = projection.translate();
|
|
325
|
+
let xx = hw - ((xy[0] - translate[0]));
|
|
326
|
+
let yy = hh - ((xy[1] - translate[1]));
|
|
327
|
+
projection.translate([xx, yy]);
|
|
328
|
+
this.setRaw("translateX", xx);
|
|
329
|
+
this.setRaw("translateY", yy);
|
|
330
|
+
this._centerX = translate[0];
|
|
331
|
+
this._centerY = translate[1];
|
|
386
332
|
}
|
|
387
|
-
this.setRaw("zoomControl", zoomControl);
|
|
388
333
|
}
|
|
389
|
-
}
|
|
390
|
-
if (this.isDirty("zoomLevel")) {
|
|
391
|
-
projection.scale(this.getPrivate("mapScale") * this.get("zoomLevel", 1));
|
|
392
334
|
this.markDirtyProjection();
|
|
393
|
-
this.
|
|
394
|
-
|
|
395
|
-
if (series.get("autoScale")) {
|
|
396
|
-
$array.each(series.dataItems, function (dataItem) {
|
|
397
|
-
var bullets = dataItem.bullets;
|
|
398
|
-
if (bullets) {
|
|
399
|
-
$array.each(bullets, function (bullet) {
|
|
400
|
-
var sprite = bullet.get("sprite");
|
|
401
|
-
if (sprite) {
|
|
402
|
-
sprite.set("scale", _this.get("zoomLevel"));
|
|
403
|
-
}
|
|
404
|
-
});
|
|
405
|
-
}
|
|
406
|
-
});
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
});
|
|
335
|
+
const geoPath = this.getPrivate("geoPath");
|
|
336
|
+
this._mapBounds = geoPath.bounds(this._geometryColection);
|
|
410
337
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
338
|
+
}
|
|
339
|
+
this._pw = w;
|
|
340
|
+
this._ph = h;
|
|
341
|
+
if (this.isDirty("zoomControl")) {
|
|
342
|
+
const previous = this._prevSettings.zoomControl;
|
|
343
|
+
const zoomControl = this.get("zoomControl");
|
|
344
|
+
if (zoomControl !== previous) {
|
|
345
|
+
this._disposeProperty("zoomControl");
|
|
346
|
+
if (previous) {
|
|
347
|
+
previous.dispose();
|
|
419
348
|
}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
349
|
+
if (zoomControl) {
|
|
350
|
+
zoomControl.setPrivate("chart", this);
|
|
351
|
+
this.children.push(zoomControl);
|
|
352
|
+
}
|
|
353
|
+
this.setRaw("zoomControl", zoomControl);
|
|
423
354
|
}
|
|
424
355
|
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
var geoPath_2 = this.getPrivate("geoPath");
|
|
443
|
-
this._mapBounds = geoPath_2.bounds(this._geometryColection);
|
|
444
|
-
this._geoCentroid = $mapUtils.getGeoCentroid(this._geometryColection);
|
|
445
|
-
var bounds = $mapUtils.getGeoBounds(this._geometryColection);
|
|
446
|
-
this._geoBounds = bounds;
|
|
447
|
-
if (this._geometryColection.geometries.length > 0) {
|
|
448
|
-
bounds.left = $math.round(this._geoBounds.left, 3);
|
|
449
|
-
bounds.right = $math.round(this._geoBounds.right, 3);
|
|
450
|
-
bounds.top = $math.round(this._geoBounds.top, 3);
|
|
451
|
-
bounds.bottom = $math.round(this._geoBounds.bottom, 3);
|
|
452
|
-
var prevGeoBounds = this._prevGeoBounds;
|
|
453
|
-
if (prevGeoBounds && !$utils.sameBounds(bounds, prevGeoBounds)) {
|
|
454
|
-
this._dispatchBounds = true;
|
|
455
|
-
this._prevGeoBounds = bounds;
|
|
356
|
+
if (this.isDirty("zoomLevel")) {
|
|
357
|
+
projection.scale(this.getPrivate("mapScale") * this.get("zoomLevel", 1));
|
|
358
|
+
this.markDirtyProjection();
|
|
359
|
+
this.series.each((series) => {
|
|
360
|
+
if (series.isType("MapPointSeries")) {
|
|
361
|
+
if (series.get("autoScale")) {
|
|
362
|
+
$array.each(series.dataItems, (dataItem) => {
|
|
363
|
+
const bullets = dataItem.bullets;
|
|
364
|
+
if (bullets) {
|
|
365
|
+
$array.each(bullets, (bullet) => {
|
|
366
|
+
const sprite = bullet.get("sprite");
|
|
367
|
+
if (sprite) {
|
|
368
|
+
sprite.set("scale", this.get("zoomLevel"));
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
});
|
|
456
373
|
}
|
|
457
374
|
}
|
|
458
|
-
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
if (this.isDirty("translateX") || this.isDirty("translateY")) {
|
|
378
|
+
projection.translate([this.get("translateX", this.width() / 2), this.get("translateY", this.height() / 2)]);
|
|
379
|
+
this.markDirtyProjection();
|
|
380
|
+
}
|
|
381
|
+
if (projection.rotate) {
|
|
382
|
+
if (this.isDirty("rotationX") || this.isDirty("rotationY") || this.isDirty("rotationZ")) {
|
|
383
|
+
projection.rotate([this.get("rotationX", 0), this.get("rotationY", 0), this.get("rotationZ", 0)]);
|
|
384
|
+
this.markDirtyProjection();
|
|
459
385
|
}
|
|
460
386
|
}
|
|
461
|
-
|
|
387
|
+
if (this.isDirty("pinchZoom") || this.get("panX") || this.get("panY")) {
|
|
388
|
+
this._setUpTouch();
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
_fitMap() {
|
|
392
|
+
const projection = this.get("projection");
|
|
393
|
+
let w = this.innerWidth();
|
|
394
|
+
let h = this.innerHeight();
|
|
395
|
+
if (w > 0 && h > 0) {
|
|
396
|
+
projection.fitSize([w, h], this._geometryColection);
|
|
397
|
+
this.setPrivateRaw("mapScale", projection.scale());
|
|
398
|
+
const translate = projection.translate();
|
|
399
|
+
this.setRaw("translateX", translate[0]);
|
|
400
|
+
this.setRaw("translateY", translate[1]);
|
|
401
|
+
this._centerX = translate[0];
|
|
402
|
+
this._centerY = translate[1];
|
|
403
|
+
const geoPath = this.getPrivate("geoPath");
|
|
404
|
+
this._mapBounds = geoPath.bounds(this._geometryColection);
|
|
405
|
+
this._geoCentroid = $mapUtils.getGeoCentroid(this._geometryColection);
|
|
406
|
+
const bounds = $mapUtils.getGeoBounds(this._geometryColection);
|
|
407
|
+
this._geoBounds = bounds;
|
|
408
|
+
if (this._geometryColection.geometries.length > 0) {
|
|
409
|
+
bounds.left = $math.round(this._geoBounds.left, 3);
|
|
410
|
+
bounds.right = $math.round(this._geoBounds.right, 3);
|
|
411
|
+
bounds.top = $math.round(this._geoBounds.top, 3);
|
|
412
|
+
bounds.bottom = $math.round(this._geoBounds.bottom, 3);
|
|
413
|
+
const prevGeoBounds = this._prevGeoBounds;
|
|
414
|
+
if (prevGeoBounds && !$utils.sameBounds(bounds, prevGeoBounds)) {
|
|
415
|
+
this._dispatchBounds = true;
|
|
416
|
+
this._prevGeoBounds = bounds;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
this._mapFitted = true;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
462
422
|
/**
|
|
463
423
|
* Returns geographical coordinates for calculated or manual center of the
|
|
464
424
|
* map.
|
|
465
425
|
*/
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
var top_1 = bounds[0][1];
|
|
477
|
-
var right = bounds[1][0];
|
|
478
|
-
var bottom = bounds[1][1];
|
|
479
|
-
homeGeoPoint = this.invert({ x: left + (right - left) / 2, y: top_1 + (bottom - top_1) / 2 });
|
|
480
|
-
}
|
|
481
|
-
return homeGeoPoint;
|
|
426
|
+
homeGeoPoint() {
|
|
427
|
+
let homeGeoPoint = this.get("homeGeoPoint");
|
|
428
|
+
if (!homeGeoPoint) {
|
|
429
|
+
const geoPath = this.getPrivate("geoPath");
|
|
430
|
+
const bounds = geoPath.bounds(this._geometryColection);
|
|
431
|
+
const left = bounds[0][0];
|
|
432
|
+
const top = bounds[0][1];
|
|
433
|
+
const right = bounds[1][0];
|
|
434
|
+
const bottom = bounds[1][1];
|
|
435
|
+
homeGeoPoint = this.invert({ x: left + (right - left) / 2, y: top + (bottom - top) / 2 });
|
|
482
436
|
}
|
|
483
|
-
|
|
437
|
+
return homeGeoPoint;
|
|
438
|
+
}
|
|
484
439
|
/**
|
|
485
440
|
* Repositions the map to the "home" zoom level and center coordinates.
|
|
486
441
|
*
|
|
487
442
|
* @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Resetting_position_level} for more info
|
|
488
443
|
* @param duration Animation duration in milliseconds
|
|
489
444
|
*/
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
configurable: true,
|
|
501
|
-
writable: true,
|
|
502
|
-
value: function () {
|
|
503
|
-
var projection = this.get("projection");
|
|
504
|
-
if (projection.invert) {
|
|
505
|
-
var w = this.innerWidth();
|
|
506
|
-
var h = this.innerHeight();
|
|
507
|
-
if (w > 0 && h > 0) {
|
|
508
|
-
this._centerLocation = projection.invert([this.innerWidth() / 2, this.innerHeight() / 2]);
|
|
509
|
-
}
|
|
445
|
+
goHome(duration) {
|
|
446
|
+
this.zoomToGeoPoint(this.homeGeoPoint(), this.get("homeZoomLevel", 1), true, duration);
|
|
447
|
+
}
|
|
448
|
+
_updateChildren() {
|
|
449
|
+
const projection = this.get("projection");
|
|
450
|
+
if (projection.invert) {
|
|
451
|
+
let w = this.innerWidth();
|
|
452
|
+
let h = this.innerHeight();
|
|
453
|
+
if (w > 0 && h > 0) {
|
|
454
|
+
this._centerLocation = projection.invert([this.innerWidth() / 2, this.innerHeight() / 2]);
|
|
510
455
|
}
|
|
511
|
-
_super.prototype._updateChildren.call(this);
|
|
512
456
|
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
if (this.
|
|
521
|
-
this.
|
|
522
|
-
var type = "geoboundschanged";
|
|
523
|
-
if (this.events.isEnabled(type)) {
|
|
524
|
-
this.events.dispatch(type, { type: type, target: this });
|
|
525
|
-
}
|
|
457
|
+
super._updateChildren();
|
|
458
|
+
}
|
|
459
|
+
_afterChanged() {
|
|
460
|
+
super._afterChanged();
|
|
461
|
+
if (this._dispatchBounds) {
|
|
462
|
+
this._dispatchBounds = false;
|
|
463
|
+
const type = "geoboundschanged";
|
|
464
|
+
if (this.events.isEnabled(type)) {
|
|
465
|
+
this.events.dispatch(type, { type: type, target: this });
|
|
526
466
|
}
|
|
527
467
|
}
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
writable: true,
|
|
533
|
-
value: function () {
|
|
534
|
-
if (!this.chartContainer._display.cancelTouch) {
|
|
535
|
-
this.chartContainer._display.cancelTouch = (this.get("pinchZoom") || this.get("panX") || this.get("panY")) ? true : false;
|
|
536
|
-
}
|
|
468
|
+
}
|
|
469
|
+
_setUpTouch() {
|
|
470
|
+
if (!this.chartContainer._display.cancelTouch) {
|
|
471
|
+
this.chartContainer._display.cancelTouch = (this.get("pinchZoom") || this.get("panX") || this.get("panY")) ? true : false;
|
|
537
472
|
}
|
|
538
|
-
}
|
|
473
|
+
}
|
|
539
474
|
/**
|
|
540
475
|
* @ignore
|
|
541
476
|
*/
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
value: function () {
|
|
547
|
-
this._dirtyGeometries = true;
|
|
548
|
-
this.markDirty();
|
|
549
|
-
}
|
|
550
|
-
});
|
|
477
|
+
markDirtyGeometries() {
|
|
478
|
+
this._dirtyGeometries = true;
|
|
479
|
+
this.markDirty();
|
|
480
|
+
}
|
|
551
481
|
/**
|
|
552
482
|
* @ignore
|
|
553
483
|
*/
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
484
|
+
markDirtyProjection() {
|
|
485
|
+
this.series.each((series) => {
|
|
486
|
+
series.markDirtyProjection();
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
_afterNew() {
|
|
490
|
+
this._defaultThemes.push(MapChartDefaultTheme.new(this._root));
|
|
491
|
+
this._settings.themeTags = $utils.mergeTags(this._settings.themeTags, ["map"]);
|
|
492
|
+
this.children.push(this.bulletsContainer);
|
|
493
|
+
super._afterNew();
|
|
494
|
+
this._makeGeoPath();
|
|
495
|
+
this.chartContainer.children.push(this.seriesContainer);
|
|
496
|
+
if (this.get("translateX") == null) {
|
|
497
|
+
this.set("translateX", this.width() / 2);
|
|
562
498
|
}
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
499
|
+
if (this.get("translateY") == null) {
|
|
500
|
+
this.set("translateY", this.height() / 2);
|
|
501
|
+
}
|
|
502
|
+
// Setting trasnparent background so that full body of the plot container
|
|
503
|
+
// is interactive
|
|
504
|
+
this.chartContainer.set("interactive", true);
|
|
505
|
+
this.chartContainer.set("interactiveChildren", false);
|
|
506
|
+
this.chartContainer.set("background", Rectangle.new(this._root, {
|
|
507
|
+
themeTags: ["map", "background"],
|
|
508
|
+
fill: Color.fromHex(0x000000),
|
|
509
|
+
fillOpacity: 0
|
|
510
|
+
}));
|
|
511
|
+
this._disposers.push(this.chartContainer.events.on("pointerdown", (event) => {
|
|
512
|
+
this._handleChartDown(event);
|
|
513
|
+
}));
|
|
514
|
+
this._disposers.push(this.chartContainer.events.on("globalpointerup", (event) => {
|
|
515
|
+
this._handleChartUp(event);
|
|
516
|
+
}));
|
|
517
|
+
this._disposers.push(this.chartContainer.events.on("globalpointermove", (event) => {
|
|
518
|
+
this._handleChartMove(event);
|
|
519
|
+
}));
|
|
520
|
+
let license = false;
|
|
521
|
+
for (let i = 0; i < registry.licenses.length; i++) {
|
|
522
|
+
if (registry.licenses[i].match(/^AM5M.{5,}/i)) {
|
|
523
|
+
license = true;
|
|
578
524
|
}
|
|
579
|
-
|
|
580
|
-
|
|
525
|
+
}
|
|
526
|
+
if (!license) {
|
|
527
|
+
this._root._showBranding();
|
|
528
|
+
}
|
|
529
|
+
this._setUpTouch();
|
|
530
|
+
}
|
|
531
|
+
_handleChartDown(event) {
|
|
532
|
+
this._downZoomLevel = this.get("zoomLevel", 1);
|
|
533
|
+
let count = $object.keys(this.chartContainer._downPoints).length;
|
|
534
|
+
if (count == 1) {
|
|
535
|
+
// workaround to solve a problem when events are added to some children of chart container (rotation stops working)
|
|
536
|
+
const downPoint = this.chartContainer._downPoints[1];
|
|
537
|
+
if (downPoint && (downPoint.x == event.point.x && downPoint.y == event.point.y)) {
|
|
538
|
+
count = 0;
|
|
581
539
|
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
this.
|
|
585
|
-
this.
|
|
586
|
-
this.
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
this._disposers.push(this.chartContainer.events.on("globalpointerup", function (event) {
|
|
595
|
-
_this._handleChartUp(event);
|
|
596
|
-
}));
|
|
597
|
-
this._disposers.push(this.chartContainer.events.on("globalpointermove", function (event) {
|
|
598
|
-
_this._handleChartMove(event);
|
|
599
|
-
}));
|
|
600
|
-
var license = false;
|
|
601
|
-
for (var i = 0; i < registry.licenses.length; i++) {
|
|
602
|
-
if (registry.licenses[i].match(/^AM5M.{5,}/i)) {
|
|
603
|
-
license = true;
|
|
540
|
+
}
|
|
541
|
+
if (count > 0) {
|
|
542
|
+
this._downTranslateX = this.get("translateX");
|
|
543
|
+
this._downTranslateY = this.get("translateY");
|
|
544
|
+
this._downRotationX = this.get("rotationX");
|
|
545
|
+
this._downRotationY = this.get("rotationY");
|
|
546
|
+
this._downRotationZ = this.get("rotationZ");
|
|
547
|
+
const downId = this.chartContainer._getDownPointId();
|
|
548
|
+
if (downId) {
|
|
549
|
+
let movePoint = this._movePoints[downId];
|
|
550
|
+
if (movePoint) {
|
|
551
|
+
this.chartContainer._downPoints[downId] = movePoint;
|
|
604
552
|
}
|
|
605
553
|
}
|
|
606
|
-
if (!license) {
|
|
607
|
-
this._root._showBranding();
|
|
608
|
-
}
|
|
609
|
-
this._setUpTouch();
|
|
610
554
|
}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
if (count == 1) {
|
|
620
|
-
// workaround to solve a problem when events are added to some children of chart container (rotation stops working)
|
|
621
|
-
var downPoint = this.chartContainer._downPoints[1];
|
|
622
|
-
if (downPoint && (downPoint.x == event.point.x && downPoint.y == event.point.y)) {
|
|
623
|
-
count = 0;
|
|
555
|
+
else if (count == 0) {
|
|
556
|
+
let bg = this.chartContainer.get("background");
|
|
557
|
+
if (bg) {
|
|
558
|
+
bg.events.enableType("click");
|
|
559
|
+
}
|
|
560
|
+
if (this.get("panX") || this.get("panY")) {
|
|
561
|
+
if (this._za) {
|
|
562
|
+
this._za.stop();
|
|
624
563
|
}
|
|
625
|
-
|
|
626
|
-
|
|
564
|
+
if (this._txa) {
|
|
565
|
+
this._txa.stop();
|
|
566
|
+
}
|
|
567
|
+
if (this._tya) {
|
|
568
|
+
this._tya.stop();
|
|
569
|
+
}
|
|
570
|
+
if (this._rxa) {
|
|
571
|
+
this._rxa.stop();
|
|
572
|
+
}
|
|
573
|
+
if (this._rya) {
|
|
574
|
+
this._rya.stop();
|
|
575
|
+
}
|
|
576
|
+
const downPoint = this.chartContainer._display.toLocal(event.point);
|
|
627
577
|
this._downTranslateX = this.get("translateX");
|
|
628
578
|
this._downTranslateY = this.get("translateY");
|
|
629
579
|
this._downRotationX = this.get("rotationX");
|
|
630
580
|
this._downRotationY = this.get("rotationY");
|
|
631
581
|
this._downRotationZ = this.get("rotationZ");
|
|
632
|
-
|
|
633
|
-
if (
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
}
|
|
640
|
-
else if (count == 0) {
|
|
641
|
-
var bg = this.chartContainer.get("background");
|
|
642
|
-
if (bg) {
|
|
643
|
-
bg.events.enableType("click");
|
|
644
|
-
}
|
|
645
|
-
if (this.get("panX") || this.get("panY")) {
|
|
646
|
-
if (this._za) {
|
|
647
|
-
this._za.stop();
|
|
648
|
-
}
|
|
649
|
-
if (this._txa) {
|
|
650
|
-
this._txa.stop();
|
|
651
|
-
}
|
|
652
|
-
if (this._tya) {
|
|
653
|
-
this._tya.stop();
|
|
654
|
-
}
|
|
655
|
-
if (this._rxa) {
|
|
656
|
-
this._rxa.stop();
|
|
657
|
-
}
|
|
658
|
-
if (this._rya) {
|
|
659
|
-
this._rya.stop();
|
|
660
|
-
}
|
|
661
|
-
var downPoint = this.chartContainer._display.toLocal(event.point);
|
|
662
|
-
this._downTranslateX = this.get("translateX");
|
|
663
|
-
this._downTranslateY = this.get("translateY");
|
|
664
|
-
this._downRotationX = this.get("rotationX");
|
|
665
|
-
this._downRotationY = this.get("rotationY");
|
|
666
|
-
this._downRotationZ = this.get("rotationZ");
|
|
667
|
-
var projection = this.get("projection");
|
|
668
|
-
if (projection.invert) {
|
|
669
|
-
var l0 = projection.invert([downPoint.x, downPoint.y]);
|
|
670
|
-
var l1 = projection.invert([downPoint.x + 1, downPoint.y + 1]);
|
|
671
|
-
if (l0 && l1) {
|
|
672
|
-
this._pLon = Math.abs(l1[0] - l0[0]);
|
|
673
|
-
this._pLat = Math.abs(l1[1] - l0[1]);
|
|
674
|
-
}
|
|
582
|
+
let projection = this.get("projection");
|
|
583
|
+
if (projection.invert) {
|
|
584
|
+
let l0 = projection.invert([downPoint.x, downPoint.y]);
|
|
585
|
+
let l1 = projection.invert([downPoint.x + 1, downPoint.y + 1]);
|
|
586
|
+
if (l0 && l1) {
|
|
587
|
+
this._pLon = Math.abs(l1[0] - l0[0]);
|
|
588
|
+
this._pLat = Math.abs(l1[1] - l0[1]);
|
|
675
589
|
}
|
|
676
590
|
}
|
|
677
591
|
}
|
|
678
592
|
}
|
|
679
|
-
}
|
|
593
|
+
}
|
|
680
594
|
/**
|
|
681
595
|
* Converts screen coordinates (X and Y) within chart to latitude and
|
|
682
596
|
* longitude.
|
|
@@ -684,164 +598,138 @@ var MapChart = /** @class */ (function (_super) {
|
|
|
684
598
|
* @param point Screen coordinates
|
|
685
599
|
* @return Geographical coordinates
|
|
686
600
|
*/
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
if (projection.invert) {
|
|
694
|
-
var ll = projection.invert([point.x, point.y]);
|
|
695
|
-
if (ll) {
|
|
696
|
-
return { longitude: ll[0], latitude: ll[1] };
|
|
697
|
-
}
|
|
601
|
+
invert(point) {
|
|
602
|
+
let projection = this.get("projection");
|
|
603
|
+
if (projection.invert) {
|
|
604
|
+
const ll = projection.invert([point.x, point.y]);
|
|
605
|
+
if (ll) {
|
|
606
|
+
return { longitude: ll[0], latitude: ll[1] };
|
|
698
607
|
}
|
|
699
|
-
return { longitude: 0, latitude: 0 };
|
|
700
608
|
}
|
|
701
|
-
|
|
609
|
+
return { longitude: 0, latitude: 0 };
|
|
610
|
+
}
|
|
702
611
|
/**
|
|
703
612
|
* Converts latitude/longitude to screen coordinates (X and Y).
|
|
704
613
|
*
|
|
705
614
|
* @param point Geographical coordinates
|
|
706
615
|
* @return Screen coordinates
|
|
707
616
|
*/
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
var projection = this.get("projection");
|
|
714
|
-
var xy = projection([point.longitude, point.latitude]);
|
|
715
|
-
if (xy) {
|
|
716
|
-
return { x: xy[0], y: xy[1] };
|
|
717
|
-
}
|
|
718
|
-
return { x: 0, y: 0 };
|
|
617
|
+
convert(point) {
|
|
618
|
+
let projection = this.get("projection");
|
|
619
|
+
const xy = projection([point.longitude, point.latitude]);
|
|
620
|
+
if (xy) {
|
|
621
|
+
return { x: xy[0], y: xy[1] };
|
|
719
622
|
}
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
var downCenter = { x: downPoint0.x + (downPoint1.x - downPoint0.x) / 2, y: downPoint0.y + (downPoint1.y - downPoint0.y) / 2 };
|
|
764
|
-
var tx = this._downTranslateX || 0;
|
|
765
|
-
var ty = this._downTranslateY || 0;
|
|
766
|
-
var zoomLevel = this._downZoomLevel;
|
|
767
|
-
var xx = moveCenter.x - (-tx + downCenter.x) / zoomLevel * level;
|
|
768
|
-
var yy = moveCenter.y - (-ty + downCenter.y) / zoomLevel * level;
|
|
769
|
-
this.set("zoomLevel", level);
|
|
770
|
-
this.set("translateX", xx);
|
|
771
|
-
this.set("translateY", yy);
|
|
772
|
-
}
|
|
623
|
+
return { x: 0, y: 0 };
|
|
624
|
+
}
|
|
625
|
+
_handleChartUp(_event) {
|
|
626
|
+
this.chartContainer._downPoints = {};
|
|
627
|
+
}
|
|
628
|
+
_handlePinch() {
|
|
629
|
+
const chartContainer = this.chartContainer;
|
|
630
|
+
let i = 0;
|
|
631
|
+
let downPoints = [];
|
|
632
|
+
let movePoints = [];
|
|
633
|
+
$object.each(chartContainer._downPoints, (k, point) => {
|
|
634
|
+
downPoints[i] = point;
|
|
635
|
+
let movePoint = this._movePoints[k];
|
|
636
|
+
if (movePoint) {
|
|
637
|
+
movePoints[i] = movePoint;
|
|
638
|
+
}
|
|
639
|
+
i++;
|
|
640
|
+
});
|
|
641
|
+
if (downPoints.length > 1 && movePoints.length > 1) {
|
|
642
|
+
const display = chartContainer._display;
|
|
643
|
+
let downPoint0 = downPoints[0];
|
|
644
|
+
let downPoint1 = downPoints[1];
|
|
645
|
+
let movePoint0 = movePoints[0];
|
|
646
|
+
let movePoint1 = movePoints[1];
|
|
647
|
+
if (downPoint0 && downPoint1 && movePoint0 && movePoint1) {
|
|
648
|
+
downPoint0 = display.toLocal(downPoint0);
|
|
649
|
+
downPoint1 = display.toLocal(downPoint1);
|
|
650
|
+
movePoint0 = display.toLocal(movePoint0);
|
|
651
|
+
movePoint1 = display.toLocal(movePoint1);
|
|
652
|
+
let initialDistance = Math.hypot(downPoint1.x - downPoint0.x, downPoint1.y - downPoint0.y);
|
|
653
|
+
let currentDistance = Math.hypot(movePoint1.x - movePoint0.x, movePoint1.y - movePoint0.y);
|
|
654
|
+
let level = currentDistance / initialDistance * this._downZoomLevel;
|
|
655
|
+
level = $math.fitToRange(level, this.get("minZoomLevel", 1), this.get("maxZoomLevel", 32));
|
|
656
|
+
let moveCenter = { x: movePoint0.x + (movePoint1.x - movePoint0.x) / 2, y: movePoint0.y + (movePoint1.y - movePoint0.y) / 2 };
|
|
657
|
+
let downCenter = { x: downPoint0.x + (downPoint1.x - downPoint0.x) / 2, y: downPoint0.y + (downPoint1.y - downPoint0.y) / 2 };
|
|
658
|
+
let tx = this._downTranslateX || 0;
|
|
659
|
+
let ty = this._downTranslateY || 0;
|
|
660
|
+
let zoomLevel = this._downZoomLevel;
|
|
661
|
+
let xx = moveCenter.x - (-tx + downCenter.x) / zoomLevel * level;
|
|
662
|
+
let yy = moveCenter.y - (-ty + downCenter.y) / zoomLevel * level;
|
|
663
|
+
this.set("zoomLevel", level);
|
|
664
|
+
this.set("translateX", xx);
|
|
665
|
+
this.set("translateY", yy);
|
|
773
666
|
}
|
|
774
667
|
}
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
this._movePoints[pointerId] = event.point;
|
|
789
|
-
if ($object.keys(chartContainer._downPoints).length > 1) {
|
|
790
|
-
this._handlePinch();
|
|
791
|
-
return;
|
|
792
|
-
}
|
|
668
|
+
}
|
|
669
|
+
_handleChartMove(event) {
|
|
670
|
+
const chartContainer = this.chartContainer;
|
|
671
|
+
let downPoint = chartContainer._getDownPoint();
|
|
672
|
+
const downPointId = chartContainer._getDownPointId();
|
|
673
|
+
const originalEvent = event.originalEvent;
|
|
674
|
+
const pointerId = originalEvent.pointerId;
|
|
675
|
+
if (this.get("pinchZoom")) {
|
|
676
|
+
if (pointerId) {
|
|
677
|
+
this._movePoints[pointerId] = event.point;
|
|
678
|
+
if ($object.keys(chartContainer._downPoints).length > 1) {
|
|
679
|
+
this._handlePinch();
|
|
680
|
+
return;
|
|
793
681
|
}
|
|
794
682
|
}
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
683
|
+
}
|
|
684
|
+
if (downPointId && pointerId && pointerId != downPointId) {
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
else {
|
|
688
|
+
if (downPoint) {
|
|
689
|
+
const panX = this.get("panX");
|
|
690
|
+
const panY = this.get("panY");
|
|
691
|
+
if (panX != "none" || panY != "none") {
|
|
692
|
+
const display = chartContainer._display;
|
|
693
|
+
let local = display.toLocal(event.point);
|
|
694
|
+
downPoint = display.toLocal(downPoint);
|
|
695
|
+
let x = this._downTranslateX;
|
|
696
|
+
let y = this._downTranslateY;
|
|
697
|
+
if (Math.hypot(downPoint.x - local.x, downPoint.y - local.y) > 5) {
|
|
698
|
+
let bg = chartContainer.get("background");
|
|
699
|
+
if (bg) {
|
|
700
|
+
bg.events.disableType("click");
|
|
701
|
+
}
|
|
702
|
+
if ($type.isNumber(x) && $type.isNumber(y)) {
|
|
703
|
+
let projection = this.get("projection");
|
|
704
|
+
const zoomLevel = this.get("zoomLevel", 1);
|
|
705
|
+
const maxPanOut = this.get("maxPanOut", 0.4);
|
|
706
|
+
const bounds = this._mapBounds;
|
|
707
|
+
const w = this.width();
|
|
708
|
+
const h = this.height();
|
|
709
|
+
const ww = bounds[1][0] - bounds[0][0];
|
|
710
|
+
const hh = bounds[1][1] - bounds[0][1];
|
|
711
|
+
if (panX == "translateX") {
|
|
712
|
+
x += local.x - downPoint.x;
|
|
713
|
+
const cx = w / 2 - (w / 2 - this._centerX) * zoomLevel;
|
|
714
|
+
x = Math.min(x, cx + ww * maxPanOut * zoomLevel);
|
|
715
|
+
x = Math.max(x, cx - ww * maxPanOut * zoomLevel);
|
|
812
716
|
}
|
|
813
|
-
if (
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
y += local.y - downPoint.y;
|
|
830
|
-
var cy = h / 2 - (h / 2 - this._centerY) * zoomLevel;
|
|
831
|
-
y = Math.min(y, cy + hh * maxPanOut * zoomLevel);
|
|
832
|
-
y = Math.max(y, cy - hh * maxPanOut * zoomLevel);
|
|
833
|
-
}
|
|
834
|
-
this.set("translateX", x);
|
|
835
|
-
this.set("translateY", y);
|
|
836
|
-
if (projection.invert) {
|
|
837
|
-
var downLocation = projection.invert([downPoint.x, downPoint.y]);
|
|
838
|
-
if (location && downLocation) {
|
|
839
|
-
if (panX == "rotateX") {
|
|
840
|
-
this.set("rotationX", this._downRotationX - (downPoint.x - local.x) * this._pLon);
|
|
841
|
-
}
|
|
842
|
-
if (panY == "rotateY") {
|
|
843
|
-
this.set("rotationY", this._downRotationY + (downPoint.y - local.y) * this._pLat);
|
|
844
|
-
}
|
|
717
|
+
if (panY == "translateY") {
|
|
718
|
+
y += local.y - downPoint.y;
|
|
719
|
+
const cy = h / 2 - (h / 2 - this._centerY) * zoomLevel;
|
|
720
|
+
y = Math.min(y, cy + hh * maxPanOut * zoomLevel);
|
|
721
|
+
y = Math.max(y, cy - hh * maxPanOut * zoomLevel);
|
|
722
|
+
}
|
|
723
|
+
this.set("translateX", x);
|
|
724
|
+
this.set("translateY", y);
|
|
725
|
+
if (projection.invert) {
|
|
726
|
+
let downLocation = projection.invert([downPoint.x, downPoint.y]);
|
|
727
|
+
if (location && downLocation) {
|
|
728
|
+
if (panX == "rotateX") {
|
|
729
|
+
this.set("rotationX", this._downRotationX - (downPoint.x - local.x) * this._pLon);
|
|
730
|
+
}
|
|
731
|
+
if (panY == "rotateY") {
|
|
732
|
+
this.set("rotationY", this._downRotationY + (downPoint.y - local.y) * this._pLat);
|
|
845
733
|
}
|
|
846
734
|
}
|
|
847
735
|
}
|
|
@@ -850,77 +738,57 @@ var MapChart = /** @class */ (function (_super) {
|
|
|
850
738
|
}
|
|
851
739
|
}
|
|
852
740
|
}
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
741
|
+
}
|
|
742
|
+
_handleWheelRotateY(delta, duration, easing) {
|
|
743
|
+
this._rya = this.animate({ key: "rotationY", to: this.get("rotationY", 0) - delta, duration: duration, easing: easing });
|
|
744
|
+
}
|
|
745
|
+
_handleWheelRotateX(delta, duration, easing) {
|
|
746
|
+
this._rxa = this.animate({ key: "rotationX", to: this.get("rotationX", 0) - delta, duration: duration, easing: easing });
|
|
747
|
+
}
|
|
748
|
+
_handleWheelZoom(delta, point) {
|
|
749
|
+
let step = this.get("zoomStep", 2);
|
|
750
|
+
let zoomLevel = this.get("zoomLevel", 1);
|
|
751
|
+
let newZoomLevel = zoomLevel;
|
|
752
|
+
if (delta > 0) {
|
|
753
|
+
newZoomLevel = zoomLevel / step;
|
|
860
754
|
}
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
enumerable: false,
|
|
864
|
-
configurable: true,
|
|
865
|
-
writable: true,
|
|
866
|
-
value: function (delta, duration, easing) {
|
|
867
|
-
this._rxa = this.animate({ key: "rotationX", to: this.get("rotationX", 0) - delta, duration: duration, easing: easing });
|
|
755
|
+
else if (delta < 0) {
|
|
756
|
+
newZoomLevel = zoomLevel * step;
|
|
868
757
|
}
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
enumerable: false,
|
|
872
|
-
configurable: true,
|
|
873
|
-
writable: true,
|
|
874
|
-
value: function (delta, point) {
|
|
875
|
-
var step = this.get("zoomStep", 2);
|
|
876
|
-
var zoomLevel = this.get("zoomLevel", 1);
|
|
877
|
-
var newZoomLevel = zoomLevel;
|
|
878
|
-
if (delta > 0) {
|
|
879
|
-
newZoomLevel = zoomLevel / step;
|
|
880
|
-
}
|
|
881
|
-
else if (delta < 0) {
|
|
882
|
-
newZoomLevel = zoomLevel * step;
|
|
883
|
-
}
|
|
884
|
-
if (newZoomLevel != zoomLevel) {
|
|
885
|
-
this.zoomToPoint(point, newZoomLevel);
|
|
886
|
-
}
|
|
758
|
+
if (newZoomLevel != zoomLevel) {
|
|
759
|
+
this.zoomToPoint(point, newZoomLevel);
|
|
887
760
|
}
|
|
888
|
-
}
|
|
761
|
+
}
|
|
889
762
|
/**
|
|
890
763
|
* Zoom the map to geographical bounds.
|
|
891
764
|
*
|
|
892
765
|
* @param geoBounds Bounds
|
|
893
766
|
* @param duration Animation duration in milliseconds
|
|
894
767
|
*/
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
p0.y = mapBounds[0][1];
|
|
910
|
-
}
|
|
911
|
-
if (p1.y > mapBounds[1][1]) {
|
|
912
|
-
p1.y = mapBounds[1][1];
|
|
913
|
-
}
|
|
914
|
-
var zl = this.get("zoomLevel", 1);
|
|
915
|
-
var bounds = { left: p0.x, right: p1.x, top: p0.y, bottom: p1.y };
|
|
916
|
-
var seriesContainer = this.seriesContainer;
|
|
917
|
-
var zoomLevel = .9 * Math.min(seriesContainer.innerWidth() / (bounds.right - bounds.left) * zl, seriesContainer.innerHeight() / (bounds.bottom - bounds.top) * zl);
|
|
918
|
-
var x = bounds.left + (bounds.right - bounds.left) / 2;
|
|
919
|
-
var y = bounds.top + (bounds.bottom - bounds.top) / 2;
|
|
920
|
-
var geoPoint = this.invert({ x: x, y: y });
|
|
921
|
-
return this.zoomToGeoPoint(geoPoint, zoomLevel, true, duration);
|
|
768
|
+
zoomToGeoBounds(geoBounds, duration) {
|
|
769
|
+
if (geoBounds.right < geoBounds.left) {
|
|
770
|
+
geoBounds.right = 180;
|
|
771
|
+
geoBounds.left = -180;
|
|
772
|
+
}
|
|
773
|
+
const geoPath = this.getPrivate("geoPath");
|
|
774
|
+
const mapBounds = geoPath.bounds(this._geometryColection);
|
|
775
|
+
let p0 = this.convert({ longitude: geoBounds.left, latitude: geoBounds.top });
|
|
776
|
+
let p1 = this.convert({ longitude: geoBounds.right, latitude: geoBounds.bottom });
|
|
777
|
+
if (p0.y < mapBounds[0][1]) {
|
|
778
|
+
p0.y = mapBounds[0][1];
|
|
779
|
+
}
|
|
780
|
+
if (p1.y > mapBounds[1][1]) {
|
|
781
|
+
p1.y = mapBounds[1][1];
|
|
922
782
|
}
|
|
923
|
-
|
|
783
|
+
let zl = this.get("zoomLevel", 1);
|
|
784
|
+
let bounds = { left: p0.x, right: p1.x, top: p0.y, bottom: p1.y };
|
|
785
|
+
let seriesContainer = this.seriesContainer;
|
|
786
|
+
let zoomLevel = .9 * Math.min(seriesContainer.innerWidth() / (bounds.right - bounds.left) * zl, seriesContainer.innerHeight() / (bounds.bottom - bounds.top) * zl);
|
|
787
|
+
let x = bounds.left + (bounds.right - bounds.left) / 2;
|
|
788
|
+
let y = bounds.top + (bounds.bottom - bounds.top) / 2;
|
|
789
|
+
let geoPoint = this.invert({ x, y });
|
|
790
|
+
return this.zoomToGeoPoint(geoPoint, zoomLevel, true, duration);
|
|
791
|
+
}
|
|
924
792
|
/**
|
|
925
793
|
* Zooms the map to specific screen point.
|
|
926
794
|
*
|
|
@@ -929,44 +797,39 @@ var MapChart = /** @class */ (function (_super) {
|
|
|
929
797
|
* @param center Center the map
|
|
930
798
|
* @param duration Duration of the animation in milliseconds
|
|
931
799
|
*/
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
writable: true,
|
|
936
|
-
value: function (point, level, center, duration) {
|
|
937
|
-
if (level) {
|
|
938
|
-
level = $math.fitToRange(level, this.get("minZoomLevel", 1), this.get("maxZoomLevel", 32));
|
|
939
|
-
}
|
|
940
|
-
if (!$type.isNumber(duration)) {
|
|
941
|
-
duration = this.get("animationDuration", 0);
|
|
942
|
-
}
|
|
943
|
-
var easing = this.get("animationEasing");
|
|
944
|
-
var zoomLevel = this.get("zoomLevel", 1);
|
|
945
|
-
if (this.get("centerMapOnZoomOut") && level == this.get("homeZoomLevel", 1)) {
|
|
946
|
-
point = this.convert(this.homeGeoPoint());
|
|
947
|
-
center = true;
|
|
948
|
-
}
|
|
949
|
-
var x = point.x;
|
|
950
|
-
var y = point.y;
|
|
951
|
-
var tx = this.get("translateX", 0);
|
|
952
|
-
var ty = this.get("translateY", 0);
|
|
953
|
-
var cx = x;
|
|
954
|
-
var cy = y;
|
|
955
|
-
if (center) {
|
|
956
|
-
cx = this.width() / 2;
|
|
957
|
-
cy = this.height() / 2;
|
|
958
|
-
}
|
|
959
|
-
var xx = cx - ((x - tx) / zoomLevel * level);
|
|
960
|
-
var yy = cy - ((y - ty) / zoomLevel * level);
|
|
961
|
-
this._txa = this.animate({ key: "translateX", to: xx, duration: duration, easing: easing });
|
|
962
|
-
this._tya = this.animate({ key: "translateY", to: yy, duration: duration, easing: easing });
|
|
963
|
-
this._za = this.animate({ key: "zoomLevel", to: level, duration: duration, easing: easing });
|
|
964
|
-
if (zoomLevel != level) {
|
|
965
|
-
this._root.readerAlert(this._t("Zoom level changed to %1", this._root.locale, $type.numberToString(level)));
|
|
966
|
-
}
|
|
967
|
-
return this._za;
|
|
800
|
+
zoomToPoint(point, level, center, duration) {
|
|
801
|
+
if (level) {
|
|
802
|
+
level = $math.fitToRange(level, this.get("minZoomLevel", 1), this.get("maxZoomLevel", 32));
|
|
968
803
|
}
|
|
969
|
-
|
|
804
|
+
if (!$type.isNumber(duration)) {
|
|
805
|
+
duration = this.get("animationDuration", 0);
|
|
806
|
+
}
|
|
807
|
+
const easing = this.get("animationEasing");
|
|
808
|
+
const zoomLevel = this.get("zoomLevel", 1);
|
|
809
|
+
if (this.get("centerMapOnZoomOut") && level == this.get("homeZoomLevel", 1)) {
|
|
810
|
+
point = this.convert(this.homeGeoPoint());
|
|
811
|
+
center = true;
|
|
812
|
+
}
|
|
813
|
+
let x = point.x;
|
|
814
|
+
let y = point.y;
|
|
815
|
+
let tx = this.get("translateX", 0);
|
|
816
|
+
let ty = this.get("translateY", 0);
|
|
817
|
+
let cx = x;
|
|
818
|
+
let cy = y;
|
|
819
|
+
if (center) {
|
|
820
|
+
cx = this.width() / 2;
|
|
821
|
+
cy = this.height() / 2;
|
|
822
|
+
}
|
|
823
|
+
let xx = cx - ((x - tx) / zoomLevel * level);
|
|
824
|
+
let yy = cy - ((y - ty) / zoomLevel * level);
|
|
825
|
+
this._txa = this.animate({ key: "translateX", to: xx, duration: duration, easing: easing });
|
|
826
|
+
this._tya = this.animate({ key: "translateY", to: yy, duration: duration, easing: easing });
|
|
827
|
+
this._za = this.animate({ key: "zoomLevel", to: level, duration: duration, easing: easing });
|
|
828
|
+
if (zoomLevel != level) {
|
|
829
|
+
this._root.readerAlert(this._t("Zoom level changed to %1", this._root.locale, $type.numberToString(level)));
|
|
830
|
+
}
|
|
831
|
+
return this._za;
|
|
832
|
+
}
|
|
970
833
|
/**
|
|
971
834
|
* Zooms the map to specific geographical point.
|
|
972
835
|
*
|
|
@@ -975,78 +838,51 @@ var MapChart = /** @class */ (function (_super) {
|
|
|
975
838
|
* @param center Center the map
|
|
976
839
|
* @param duration Duration of the animation in milliseconds
|
|
977
840
|
*/
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
value: function (geoPoint, level, center, duration) {
|
|
983
|
-
var xy = this.convert(geoPoint);
|
|
984
|
-
if (xy) {
|
|
985
|
-
return this.zoomToPoint(xy, level, center, duration);
|
|
986
|
-
}
|
|
841
|
+
zoomToGeoPoint(geoPoint, level, center, duration) {
|
|
842
|
+
let xy = this.convert(geoPoint);
|
|
843
|
+
if (xy) {
|
|
844
|
+
return this.zoomToPoint(xy, level, center, duration);
|
|
987
845
|
}
|
|
988
|
-
}
|
|
846
|
+
}
|
|
989
847
|
/**
|
|
990
848
|
* Zooms the map in.
|
|
991
849
|
*/
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
writable: true,
|
|
996
|
-
value: function () {
|
|
997
|
-
return this.zoomToPoint({ x: this.width() / 2, y: this.height() / 2 }, this.get("zoomLevel", 1) * this.get("zoomStep", 2));
|
|
998
|
-
}
|
|
999
|
-
});
|
|
850
|
+
zoomIn() {
|
|
851
|
+
return this.zoomToPoint({ x: this.width() / 2, y: this.height() / 2 }, this.get("zoomLevel", 1) * this.get("zoomStep", 2));
|
|
852
|
+
}
|
|
1000
853
|
/**
|
|
1001
854
|
* Zooms the map out.
|
|
1002
855
|
*/
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
}
|
|
1011
|
-
Object.defineProperty(MapChart.prototype, "_clearDirty", {
|
|
1012
|
-
enumerable: false,
|
|
1013
|
-
configurable: true,
|
|
1014
|
-
writable: true,
|
|
1015
|
-
value: function () {
|
|
1016
|
-
_super.prototype._clearDirty.call(this);
|
|
1017
|
-
this._dirtyGeometries = false;
|
|
1018
|
-
this._mapFitted = false;
|
|
1019
|
-
}
|
|
1020
|
-
});
|
|
856
|
+
zoomOut() {
|
|
857
|
+
return this.zoomToPoint({ x: this.width() / 2, y: this.height() / 2 }, this.get("zoomLevel", 1) / this.get("zoomStep", 2));
|
|
858
|
+
}
|
|
859
|
+
_clearDirty() {
|
|
860
|
+
super._clearDirty();
|
|
861
|
+
this._dirtyGeometries = false;
|
|
862
|
+
this._mapFitted = false;
|
|
863
|
+
}
|
|
1021
864
|
/**
|
|
1022
865
|
* Returns area of a mapPolygon in square pixels.
|
|
1023
866
|
*/
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
var geoPath = this.getPrivate("geoPath");
|
|
1030
|
-
var geometry = dataItem.get("geometry");
|
|
1031
|
-
if (geometry) {
|
|
1032
|
-
return geoPath.area(geometry);
|
|
1033
|
-
}
|
|
1034
|
-
return 0;
|
|
867
|
+
getArea(dataItem) {
|
|
868
|
+
const geoPath = this.getPrivate("geoPath");
|
|
869
|
+
const geometry = dataItem.get("geometry");
|
|
870
|
+
if (geometry) {
|
|
871
|
+
return geoPath.area(geometry);
|
|
1035
872
|
}
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
}
|
|
1051
|
-
export { MapChart };
|
|
873
|
+
return 0;
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
Object.defineProperty(MapChart, "className", {
|
|
877
|
+
enumerable: true,
|
|
878
|
+
configurable: true,
|
|
879
|
+
writable: true,
|
|
880
|
+
value: "MapChart"
|
|
881
|
+
});
|
|
882
|
+
Object.defineProperty(MapChart, "classNames", {
|
|
883
|
+
enumerable: true,
|
|
884
|
+
configurable: true,
|
|
885
|
+
writable: true,
|
|
886
|
+
value: SerialChart.classNames.concat([MapChart.className])
|
|
887
|
+
});
|
|
1052
888
|
//# sourceMappingURL=MapChart.js.map
|