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