@amcharts/amcharts5 5.2.10 → 5.2.13

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 (233) hide show
  1. package/.internal/charts/hierarchy/Hierarchy.d.ts +1 -1
  2. package/.internal/charts/hierarchy/Hierarchy.d.ts.map +1 -1
  3. package/.internal/charts/hierarchy/Hierarchy.js +6 -4
  4. package/.internal/charts/hierarchy/Hierarchy.js.map +1 -1
  5. package/.internal/charts/hierarchy/LinkedHierarchy.d.ts.map +1 -1
  6. package/.internal/charts/hierarchy/LinkedHierarchy.js +0 -1
  7. package/.internal/charts/hierarchy/LinkedHierarchy.js.map +1 -1
  8. package/.internal/charts/pie/PieChart.d.ts +1 -1
  9. package/.internal/charts/pie/PieChart.d.ts.map +1 -1
  10. package/.internal/charts/pie/PieChart.js.map +1 -1
  11. package/.internal/charts/pie/PieSeries.d.ts.map +1 -1
  12. package/.internal/charts/pie/PieSeries.js +52 -44
  13. package/.internal/charts/pie/PieSeries.js.map +1 -1
  14. package/.internal/charts/stock/StockChartDefaultTheme.d.ts.map +1 -1
  15. package/.internal/charts/stock/StockChartDefaultTheme.js +14 -2
  16. package/.internal/charts/stock/StockChartDefaultTheme.js.map +1 -1
  17. package/.internal/charts/stock/indicators/MovingAverage.d.ts +1 -1
  18. package/.internal/charts/stock/indicators/MovingAverage.js.map +1 -1
  19. package/.internal/charts/stock/indicators/VWAP.d.ts +33 -0
  20. package/.internal/charts/stock/indicators/VWAP.d.ts.map +1 -0
  21. package/.internal/charts/stock/indicators/VWAP.js +151 -0
  22. package/.internal/charts/stock/indicators/VWAP.js.map +1 -0
  23. package/.internal/charts/stock/toolbar/IndicatorControl.d.ts +1 -1
  24. package/.internal/charts/stock/toolbar/IndicatorControl.d.ts.map +1 -1
  25. package/.internal/charts/stock/toolbar/IndicatorControl.js +9 -0
  26. package/.internal/charts/stock/toolbar/IndicatorControl.js.map +1 -1
  27. package/.internal/charts/xy/XYChart.d.ts +16 -0
  28. package/.internal/charts/xy/XYChart.d.ts.map +1 -1
  29. package/.internal/charts/xy/XYChart.js +14 -0
  30. package/.internal/charts/xy/XYChart.js.map +1 -1
  31. package/.internal/charts/xy/XYCursor.d.ts +7 -1
  32. package/.internal/charts/xy/XYCursor.d.ts.map +1 -1
  33. package/.internal/charts/xy/XYCursor.js.map +1 -1
  34. package/.internal/charts/xy/axes/CategoryAxis.d.ts.map +1 -1
  35. package/.internal/charts/xy/axes/CategoryAxis.js +1 -0
  36. package/.internal/charts/xy/axes/CategoryAxis.js.map +1 -1
  37. package/.internal/charts/xy/axes/DateAxis.d.ts +1 -0
  38. package/.internal/charts/xy/axes/DateAxis.d.ts.map +1 -1
  39. package/.internal/charts/xy/axes/DateAxis.js +8 -0
  40. package/.internal/charts/xy/axes/DateAxis.js.map +1 -1
  41. package/.internal/charts/xy/axes/ValueAxis.d.ts +1 -0
  42. package/.internal/charts/xy/axes/ValueAxis.d.ts.map +1 -1
  43. package/.internal/charts/xy/axes/ValueAxis.js +15 -7
  44. package/.internal/charts/xy/axes/ValueAxis.js.map +1 -1
  45. package/.internal/charts/xy/series/BaseColumnSeries.d.ts.map +1 -1
  46. package/.internal/charts/xy/series/BaseColumnSeries.js +1 -1
  47. package/.internal/charts/xy/series/BaseColumnSeries.js.map +1 -1
  48. package/.internal/charts/xy/series/LineSeries.d.ts.map +1 -1
  49. package/.internal/charts/xy/series/LineSeries.js +10 -4
  50. package/.internal/charts/xy/series/LineSeries.js.map +1 -1
  51. package/.internal/core/Classes.d.ts +2 -0
  52. package/.internal/core/Classes.d.ts.map +1 -1
  53. package/.internal/core/Classes.js.map +1 -1
  54. package/.internal/core/Root.d.ts +7 -0
  55. package/.internal/core/Root.d.ts.map +1 -1
  56. package/.internal/core/Root.js +154 -0
  57. package/.internal/core/Root.js.map +1 -1
  58. package/.internal/core/render/Container.d.ts +10 -0
  59. package/.internal/core/render/Container.d.ts.map +1 -1
  60. package/.internal/core/render/Container.js +58 -4
  61. package/.internal/core/render/Container.js.map +1 -1
  62. package/.internal/core/render/HorizontalLayout.d.ts.map +1 -1
  63. package/.internal/core/render/HorizontalLayout.js +18 -15
  64. package/.internal/core/render/HorizontalLayout.js.map +1 -1
  65. package/.internal/core/render/Label.d.ts.map +1 -1
  66. package/.internal/core/render/Label.js +18 -2
  67. package/.internal/core/render/Label.js.map +1 -1
  68. package/.internal/core/render/Sprite.d.ts +21 -0
  69. package/.internal/core/render/Sprite.d.ts.map +1 -1
  70. package/.internal/core/render/Sprite.js +45 -21
  71. package/.internal/core/render/Sprite.js.map +1 -1
  72. package/.internal/core/render/Tooltip.d.ts +6 -0
  73. package/.internal/core/render/Tooltip.d.ts.map +1 -1
  74. package/.internal/core/render/Tooltip.js +4 -0
  75. package/.internal/core/render/Tooltip.js.map +1 -1
  76. package/.internal/core/render/VerticalLayout.d.ts.map +1 -1
  77. package/.internal/core/render/VerticalLayout.js +18 -15
  78. package/.internal/core/render/VerticalLayout.js.map +1 -1
  79. package/.internal/core/render/gradients/RadialGradient.d.ts.map +1 -1
  80. package/.internal/core/render/gradients/RadialGradient.js +9 -0
  81. package/.internal/core/render/gradients/RadialGradient.js.map +1 -1
  82. package/.internal/core/util/Entity.d.ts +1 -0
  83. package/.internal/core/util/Entity.d.ts.map +1 -1
  84. package/.internal/core/util/Entity.js +15 -4
  85. package/.internal/core/util/Entity.js.map +1 -1
  86. package/.internal/core/util/Modal.d.ts +13 -0
  87. package/.internal/core/util/Modal.d.ts.map +1 -1
  88. package/.internal/core/util/Modal.js +13 -0
  89. package/.internal/core/util/Modal.js.map +1 -1
  90. package/CHANGELOG.md +39 -0
  91. package/examples/javascript/flow-chord/package.json +1 -1
  92. package/examples/javascript/flow-chord-directed/package.json +1 -1
  93. package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
  94. package/examples/javascript/flow-sankey/package.json +1 -1
  95. package/examples/javascript/gauge/package.json +1 -1
  96. package/examples/javascript/gauge-bands/package.json +1 -1
  97. package/examples/javascript/hierarchy-force-directed/package.json +1 -1
  98. package/examples/javascript/hierarchy-pack/package.json +1 -1
  99. package/examples/javascript/hierarchy-partition/package.json +1 -1
  100. package/examples/javascript/hierarchy-sunburst/package.json +1 -1
  101. package/examples/javascript/hierarchy-tree/package.json +1 -1
  102. package/examples/javascript/hierarchy-treemap/package.json +1 -1
  103. package/examples/javascript/json/package.json +1 -1
  104. package/examples/javascript/map-animating-along-lines/package.json +1 -1
  105. package/examples/javascript/map-day-and-night/package.json +1 -1
  106. package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
  107. package/examples/javascript/map-globe-with-projected-circles/index.js +1 -1
  108. package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
  109. package/examples/javascript/map-with-bubbles/index.js +1 -1
  110. package/examples/javascript/map-with-bubbles/package.json +1 -1
  111. package/examples/javascript/map-zoom-to-country/package.json +1 -1
  112. package/examples/javascript/misc-40-charts/package.json +1 -1
  113. package/examples/javascript/misc-microchart-grid/package.json +1 -1
  114. package/examples/javascript/pie-chart/package.json +1 -1
  115. package/examples/javascript/pie-donut-chart/package.json +1 -1
  116. package/examples/javascript/pie-variable-radius/package.json +1 -1
  117. package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
  118. package/examples/javascript/radar-heat-map/package.json +1 -1
  119. package/examples/javascript/radar-line/package.json +1 -1
  120. package/examples/javascript/radar-time-line/index.js +1 -1
  121. package/examples/javascript/radar-time-line/package.json +1 -1
  122. package/examples/javascript/sliced-funnel/package.json +1 -1
  123. package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
  124. package/examples/javascript/sliced-pyramid/package.json +1 -1
  125. package/examples/javascript/stock-chart/package.json +1 -1
  126. package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
  127. package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
  128. package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
  129. package/examples/javascript/stock-chart-intraday/package.json +1 -1
  130. package/examples/javascript/stock-chart-live/package.json +1 -1
  131. package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
  132. package/examples/javascript/venn-diagram/package.json +1 -1
  133. package/examples/javascript/wordcloud-with-data/package.json +1 -1
  134. package/examples/javascript/wordcloud-with-text/package.json +1 -1
  135. package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
  136. package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  137. package/examples/javascript/xy-bubble/index.js +1 -1
  138. package/examples/javascript/xy-bubble/package.json +1 -1
  139. package/examples/javascript/xy-candlestick/package.json +1 -1
  140. package/examples/javascript/xy-clustered-column/package.json +1 -1
  141. package/examples/javascript/xy-column/package.json +1 -1
  142. package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
  143. package/examples/javascript/xy-data-grouping/package.json +1 -1
  144. package/examples/javascript/xy-draggable-range/package.json +1 -1
  145. package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  146. package/examples/javascript/xy-dumbbell plot/package.json +1 -1
  147. package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
  148. package/examples/javascript/xy-line/package.json +1 -1
  149. package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
  150. package/examples/javascript/xy-live-data/package.json +1 -1
  151. package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
  152. package/examples/javascript/xy-ohlc/package.json +1 -1
  153. package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
  154. package/examples/javascript/xy-smoothed-line/package.json +1 -1
  155. package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
  156. package/examples/javascript/xy-stacked-column/package.json +1 -1
  157. package/examples/javascript/xy-stacked-step/package.json +1 -1
  158. package/examples/javascript/xy-stock/package.json +1 -1
  159. package/examples/javascript/xy-stock-comparing/package.json +1 -1
  160. package/examples/typescript/flow-chord/package.json +1 -1
  161. package/examples/typescript/flow-chord-directed/package.json +1 -1
  162. package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
  163. package/examples/typescript/flow-sankey/package.json +1 -1
  164. package/examples/typescript/gauge/package.json +1 -1
  165. package/examples/typescript/gauge-bands/package.json +1 -1
  166. package/examples/typescript/hierarchy-force-directed/package.json +1 -1
  167. package/examples/typescript/hierarchy-pack/package.json +1 -1
  168. package/examples/typescript/hierarchy-partition/package.json +1 -1
  169. package/examples/typescript/hierarchy-sunburst/package.json +1 -1
  170. package/examples/typescript/hierarchy-tree/package.json +1 -1
  171. package/examples/typescript/hierarchy-treemap/package.json +1 -1
  172. package/examples/typescript/json/package.json +1 -1
  173. package/examples/typescript/map-animating-along-lines/package.json +1 -1
  174. package/examples/typescript/map-day-and-night/package.json +1 -1
  175. package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
  176. package/examples/typescript/map-globe-with-projected-circles/index.ts +1 -1
  177. package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
  178. package/examples/typescript/map-with-bubbles/index.ts +1 -1
  179. package/examples/typescript/map-with-bubbles/package.json +1 -1
  180. package/examples/typescript/map-zoom-to-country/package.json +1 -1
  181. package/examples/typescript/misc-40-charts/package.json +1 -1
  182. package/examples/typescript/misc-microchart-grid/package.json +1 -1
  183. package/examples/typescript/pie-chart/package.json +1 -1
  184. package/examples/typescript/pie-donut-chart/package.json +1 -1
  185. package/examples/typescript/pie-variable-radius/package.json +1 -1
  186. package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
  187. package/examples/typescript/radar-heat-map/package.json +1 -1
  188. package/examples/typescript/radar-line/package.json +1 -1
  189. package/examples/typescript/radar-time-line/index.ts +1 -1
  190. package/examples/typescript/radar-time-line/package.json +1 -1
  191. package/examples/typescript/sliced-funnel/package.json +1 -1
  192. package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
  193. package/examples/typescript/sliced-pyramid/package.json +1 -1
  194. package/examples/typescript/stock-chart/package.json +1 -1
  195. package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
  196. package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
  197. package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
  198. package/examples/typescript/stock-chart-intraday/package.json +1 -1
  199. package/examples/typescript/stock-chart-live/package.json +1 -1
  200. package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
  201. package/examples/typescript/venn-diagram/package.json +1 -1
  202. package/examples/typescript/wordcloud-with-data/package.json +1 -1
  203. package/examples/typescript/wordcloud-with-text/package.json +1 -1
  204. package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
  205. package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  206. package/examples/typescript/xy-bubble/index.ts +1 -1
  207. package/examples/typescript/xy-bubble/package.json +1 -1
  208. package/examples/typescript/xy-candlestick/package.json +1 -1
  209. package/examples/typescript/xy-clustered-column/package.json +1 -1
  210. package/examples/typescript/xy-column/package.json +1 -1
  211. package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
  212. package/examples/typescript/xy-data-grouping/package.json +1 -1
  213. package/examples/typescript/xy-draggable-range/package.json +1 -1
  214. package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  215. package/examples/typescript/xy-dumbbell plot/package.json +1 -1
  216. package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
  217. package/examples/typescript/xy-line/package.json +1 -1
  218. package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
  219. package/examples/typescript/xy-live-data/package.json +1 -1
  220. package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
  221. package/examples/typescript/xy-ohlc/package.json +1 -1
  222. package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
  223. package/examples/typescript/xy-smoothed-line/package.json +1 -1
  224. package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
  225. package/examples/typescript/xy-stacked-column/package.json +1 -1
  226. package/examples/typescript/xy-stacked-step/package.json +1 -1
  227. package/examples/typescript/xy-stock/package.json +1 -1
  228. package/examples/typescript/xy-stock-comparing/package.json +1 -1
  229. package/package.json +1 -1
  230. package/stock.d.ts +1 -0
  231. package/stock.d.ts.map +1 -1
  232. package/stock.js +1 -0
  233. package/stock.js.map +1 -1
@@ -673,19 +673,22 @@ var Sprite = /** @class */ (function (_super) {
673
673
  }
674
674
  display.cancelTouch = draggable ? true : false;
675
675
  }
676
- if (this.isDirty("tooltipText")) {
676
+ if (this.isDirty("tooltipText") || this.isDirty("tooltipHTML")) {
677
677
  var tooltipText = this.get("tooltipText");
678
- if (tooltipText) {
679
- this._tooltipDp = new MultiDisposer([
680
- events.on("pointerover", function () {
681
- _this.showTooltip();
682
- }),
683
- events.on("pointerout", function () {
684
- if (_this.get("showTooltipOn") != "always") {
685
- _this.hideTooltip();
686
- }
687
- })
688
- ]);
678
+ var tooltipHTML = this.get("tooltipHTML");
679
+ if (tooltipText || tooltipHTML) {
680
+ if (!this._tooltipDp) {
681
+ this._tooltipDp = new MultiDisposer([
682
+ events.on("pointerover", function () {
683
+ _this.showTooltip();
684
+ }),
685
+ events.on("pointerout", function () {
686
+ if (_this.get("showTooltipOn") != "always") {
687
+ _this.hideTooltip();
688
+ }
689
+ })
690
+ ]);
691
+ }
689
692
  }
690
693
  else {
691
694
  if (this._tooltipDp) {
@@ -750,7 +753,7 @@ var Sprite = /** @class */ (function (_super) {
750
753
  }
751
754
  this._sizeDirty = true;
752
755
  }
753
- if (this.isDirty("maxWidth") || this.isDirty("maxHeight") || this.isPrivateDirty("width") || this.isPrivateDirty("height") || this.isDirty("minWidth") || this.isDirty("minHeight") || this.isPrivateDirty("maxWidth") || this.isPrivateDirty("maxHeight")) {
756
+ if (this.isDirty("maxWidth") || this.isDirty("maxHeight") || this.isPrivateDirty("width") || this.isPrivateDirty("height") || this.isDirty("minWidth") || this.isDirty("minHeight") || this.isPrivateDirty("maxWidth") || this.isPrivateDirty("maxHeight") || this.isPrivateDirty("minWidth") || this.isPrivateDirty("minHeight")) {
754
757
  this.markDirtyBounds();
755
758
  this._sizeDirty = true;
756
759
  }
@@ -826,7 +829,7 @@ var Sprite = /** @class */ (function (_super) {
826
829
  if (!_this.getPrivate("touchHovering")) {
827
830
  _this.setTimeout(function () {
828
831
  _this._handleOver();
829
- if (_this.get("tooltipText")) {
832
+ if (_this.get("tooltipText") || _this.get("tooltipHTML")) {
830
833
  _this.showTooltip();
831
834
  }
832
835
  _this.setPrivateRaw("touchHovering", true);
@@ -845,7 +848,7 @@ var Sprite = /** @class */ (function (_super) {
845
848
  if ($utils.isTouchEvent(ev.originalEvent)) {
846
849
  if (_this.getPrivate("touchHovering")) {
847
850
  _this._handleOut();
848
- if (_this.get("tooltipText")) {
851
+ if (_this.get("tooltipText") || _this.get("tooltipHTML")) {
849
852
  _this.hideTooltip();
850
853
  }
851
854
  }
@@ -1285,8 +1288,8 @@ var Sprite = /** @class */ (function (_super) {
1285
1288
  configurable: true,
1286
1289
  writable: true,
1287
1290
  value: function (bounds) {
1288
- var minWidth = this.get("minWidth");
1289
- var minHeight = this.get("minHeight");
1291
+ var minWidth = this.get("minWidth", this.getPrivate("minWidth"));
1292
+ var minHeight = this.get("minHeight", this.getPrivate("minHeight"));
1290
1293
  if ($type.isNumber(minWidth)) {
1291
1294
  if (bounds.right - bounds.left < minWidth) {
1292
1295
  bounds.right = bounds.left + minWidth;
@@ -1363,7 +1366,8 @@ var Sprite = /** @class */ (function (_super) {
1363
1366
  value: function (point) {
1364
1367
  var tooltip = this.getTooltip();
1365
1368
  var tooltipText = this.get("tooltipText");
1366
- if (tooltipText && tooltip) {
1369
+ var tooltipHTML = this.get("tooltipHTML");
1370
+ if ((tooltipText || tooltipHTML) && tooltip) {
1367
1371
  var tooltipPosition = this.get("tooltipPosition");
1368
1372
  var tooltipTarget = this.getPrivate("tooltipTarget", this);
1369
1373
  if (tooltipPosition == "fixed" || !point) {
@@ -1378,7 +1382,12 @@ var Sprite = /** @class */ (function (_super) {
1378
1382
  if (!tooltip.get("y")) {
1379
1383
  tooltip.set("y", point.y);
1380
1384
  }
1381
- tooltip.label.set("text", tooltipText);
1385
+ if (tooltipText) {
1386
+ tooltip.label.set("text", tooltipText);
1387
+ }
1388
+ if (tooltipHTML) {
1389
+ tooltip.label.set("html", tooltipHTML);
1390
+ }
1382
1391
  var dataItem = this.dataItem;
1383
1392
  if (dataItem) {
1384
1393
  tooltip.label._setDataItem(dataItem);
@@ -1939,6 +1948,21 @@ var Sprite = /** @class */ (function (_super) {
1939
1948
  return this._parent ? (this._parent.isVisibleDeep() && this.isVisible()) : this.isVisible();
1940
1949
  }
1941
1950
  });
1951
+ /**
1952
+ * Returns an actual opacity of the element, taking into account all parents.
1953
+ *
1954
+ * @return Opacity
1955
+ * @since 5.2.11
1956
+ */
1957
+ Object.defineProperty(Sprite.prototype, "compositeOpacity", {
1958
+ enumerable: false,
1959
+ configurable: true,
1960
+ writable: true,
1961
+ value: function () {
1962
+ var opacity = this.get("opacity", 1);
1963
+ return this._parent ? (this._parent.compositeOpacity() * opacity) : opacity;
1964
+ }
1965
+ });
1942
1966
  /**
1943
1967
  * Returns width of this element in pixels.
1944
1968
  *
@@ -1951,7 +1975,7 @@ var Sprite = /** @class */ (function (_super) {
1951
1975
  value: function () {
1952
1976
  var width = this.get("width");
1953
1977
  var maxWidth = this.get("maxWidth", this.getPrivate("maxWidth"));
1954
- var minWidth = this.get("minWidth");
1978
+ var minWidth = this.get("minWidth", this.getPrivate("minWidth"));
1955
1979
  var privateWidth = this.getPrivate("width");
1956
1980
  var w = 0;
1957
1981
  if ($type.isNumber(privateWidth)) {
@@ -2053,7 +2077,7 @@ var Sprite = /** @class */ (function (_super) {
2053
2077
  value: function () {
2054
2078
  var height = this.get("height");
2055
2079
  var maxHeight = this.get("maxHeight", this.getPrivate("maxHeight"));
2056
- var minHeight = this.get("minHeight");
2080
+ var minHeight = this.get("minHeight", this.getPrivate("minHeight"));
2057
2081
  var privateHeight = this.getPrivate("height");
2058
2082
  var h = 0;
2059
2083
  if ($type.isNumber(privateHeight)) {