@amcharts/amcharts5 5.0.19 → 5.0.20

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 (141) hide show
  1. package/.internal/charts/xy/XYChart.d.ts +1 -1
  2. package/.internal/charts/xy/XYChart.d.ts.map +1 -1
  3. package/.internal/charts/xy/XYChart.js.map +1 -1
  4. package/.internal/charts/xy/series/XYSeries.d.ts.map +1 -1
  5. package/.internal/charts/xy/series/XYSeries.js +4 -1
  6. package/.internal/charts/xy/series/XYSeries.js.map +1 -1
  7. package/.internal/core/render/GridLayout.d.ts.map +1 -1
  8. package/.internal/core/render/GridLayout.js +2 -2
  9. package/.internal/core/render/GridLayout.js.map +1 -1
  10. package/.internal/core/render/Sprite.d.ts +2 -2
  11. package/.internal/core/render/Sprite.d.ts.map +1 -1
  12. package/.internal/core/render/Sprite.js +22 -15
  13. package/.internal/core/render/Sprite.js.map +1 -1
  14. package/.internal/core/render/backend/CanvasRenderer.d.ts +7 -4
  15. package/.internal/core/render/backend/CanvasRenderer.d.ts.map +1 -1
  16. package/.internal/core/render/backend/CanvasRenderer.js +57 -30
  17. package/.internal/core/render/backend/CanvasRenderer.js.map +1 -1
  18. package/.internal/core/util/Time.d.ts +7 -6
  19. package/.internal/core/util/Time.d.ts.map +1 -1
  20. package/.internal/core/util/Time.js +7 -6
  21. package/.internal/core/util/Time.js.map +1 -1
  22. package/.internal/plugins/sliceGrouper/SliceGrouper.d.ts +1 -0
  23. package/.internal/plugins/sliceGrouper/SliceGrouper.d.ts.map +1 -1
  24. package/.internal/plugins/sliceGrouper/SliceGrouper.js +11 -1
  25. package/.internal/plugins/sliceGrouper/SliceGrouper.js.map +1 -1
  26. package/CHANGELOG.md +10 -0
  27. package/examples/javascript/flow-chord/package.json +1 -1
  28. package/examples/javascript/flow-chord-directed/package.json +1 -1
  29. package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
  30. package/examples/javascript/flow-sankey/package.json +1 -1
  31. package/examples/javascript/gauge/package.json +1 -1
  32. package/examples/javascript/gauge-bands/package.json +1 -1
  33. package/examples/javascript/hierarchy-force-directed/package.json +1 -1
  34. package/examples/javascript/hierarchy-pack/package.json +1 -1
  35. package/examples/javascript/hierarchy-partition/package.json +1 -1
  36. package/examples/javascript/hierarchy-sunburst/package.json +1 -1
  37. package/examples/javascript/hierarchy-tree/package.json +1 -1
  38. package/examples/javascript/hierarchy-treemap/package.json +1 -1
  39. package/examples/javascript/map-animating-along-lines/package.json +1 -1
  40. package/examples/javascript/map-day-and-night/package.json +1 -1
  41. package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
  42. package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
  43. package/examples/javascript/map-with-bubbles/package.json +1 -1
  44. package/examples/javascript/map-zoom-to-country/package.json +1 -1
  45. package/examples/javascript/misc-40-charts/package.json +1 -1
  46. package/examples/javascript/misc-microchart-grid/package.json +1 -1
  47. package/examples/javascript/pie-chart/package.json +1 -1
  48. package/examples/javascript/pie-donut-chart/package.json +1 -1
  49. package/examples/javascript/pie-variable-radius/package.json +1 -1
  50. package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
  51. package/examples/javascript/radar-heat-map/package.json +1 -1
  52. package/examples/javascript/radar-line/package.json +1 -1
  53. package/examples/javascript/radar-time-line/package.json +1 -1
  54. package/examples/javascript/sliced-funnel/package.json +1 -1
  55. package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
  56. package/examples/javascript/sliced-pyramid/package.json +1 -1
  57. package/examples/javascript/venn-diagram/package.json +1 -1
  58. package/examples/javascript/wordcloud-with-data/package.json +1 -1
  59. package/examples/javascript/wordcloud-with-text/package.json +1 -1
  60. package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
  61. package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  62. package/examples/javascript/xy-bubble/package.json +1 -1
  63. package/examples/javascript/xy-candlestick/package.json +1 -1
  64. package/examples/javascript/xy-clustered-column/package.json +1 -1
  65. package/examples/javascript/xy-column/package.json +1 -1
  66. package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
  67. package/examples/javascript/xy-data-grouping/package.json +1 -1
  68. package/examples/javascript/xy-draggable-range/package.json +1 -1
  69. package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  70. package/examples/javascript/xy-dumbbell plot/package.json +1 -1
  71. package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
  72. package/examples/javascript/xy-line/package.json +1 -1
  73. package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
  74. package/examples/javascript/xy-live-data/package.json +1 -1
  75. package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
  76. package/examples/javascript/xy-ohlc/package.json +1 -1
  77. package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
  78. package/examples/javascript/xy-smoothed-line/package.json +1 -1
  79. package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
  80. package/examples/javascript/xy-stacked-column/package.json +1 -1
  81. package/examples/javascript/xy-stacked-step/package.json +1 -1
  82. package/examples/javascript/xy-stock/package.json +1 -1
  83. package/examples/javascript/xy-stock-comparing/package.json +1 -1
  84. package/examples/typescript/flow-chord/package.json +1 -1
  85. package/examples/typescript/flow-chord-directed/package.json +1 -1
  86. package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
  87. package/examples/typescript/flow-sankey/package.json +1 -1
  88. package/examples/typescript/gauge/package.json +1 -1
  89. package/examples/typescript/gauge-bands/package.json +1 -1
  90. package/examples/typescript/hierarchy-force-directed/package.json +1 -1
  91. package/examples/typescript/hierarchy-pack/package.json +1 -1
  92. package/examples/typescript/hierarchy-partition/package.json +1 -1
  93. package/examples/typescript/hierarchy-sunburst/package.json +1 -1
  94. package/examples/typescript/hierarchy-tree/package.json +1 -1
  95. package/examples/typescript/hierarchy-treemap/package.json +1 -1
  96. package/examples/typescript/map-animating-along-lines/package.json +1 -1
  97. package/examples/typescript/map-day-and-night/package.json +1 -1
  98. package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
  99. package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
  100. package/examples/typescript/map-with-bubbles/package.json +1 -1
  101. package/examples/typescript/map-zoom-to-country/package.json +1 -1
  102. package/examples/typescript/misc-40-charts/package.json +1 -1
  103. package/examples/typescript/misc-microchart-grid/package.json +1 -1
  104. package/examples/typescript/pie-chart/package.json +1 -1
  105. package/examples/typescript/pie-donut-chart/package.json +1 -1
  106. package/examples/typescript/pie-variable-radius/package.json +1 -1
  107. package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
  108. package/examples/typescript/radar-heat-map/package.json +1 -1
  109. package/examples/typescript/radar-line/package.json +1 -1
  110. package/examples/typescript/radar-time-line/package.json +1 -1
  111. package/examples/typescript/sliced-funnel/package.json +1 -1
  112. package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
  113. package/examples/typescript/sliced-pyramid/package.json +1 -1
  114. package/examples/typescript/venn-diagram/package.json +1 -1
  115. package/examples/typescript/wordcloud-with-data/package.json +1 -1
  116. package/examples/typescript/wordcloud-with-text/package.json +1 -1
  117. package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
  118. package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  119. package/examples/typescript/xy-bubble/package.json +1 -1
  120. package/examples/typescript/xy-candlestick/package.json +1 -1
  121. package/examples/typescript/xy-clustered-column/package.json +1 -1
  122. package/examples/typescript/xy-column/package.json +1 -1
  123. package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
  124. package/examples/typescript/xy-data-grouping/package.json +1 -1
  125. package/examples/typescript/xy-draggable-range/package.json +1 -1
  126. package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  127. package/examples/typescript/xy-dumbbell plot/package.json +1 -1
  128. package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
  129. package/examples/typescript/xy-line/package.json +1 -1
  130. package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
  131. package/examples/typescript/xy-live-data/package.json +1 -1
  132. package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
  133. package/examples/typescript/xy-ohlc/package.json +1 -1
  134. package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
  135. package/examples/typescript/xy-smoothed-line/package.json +1 -1
  136. package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
  137. package/examples/typescript/xy-stacked-column/package.json +1 -1
  138. package/examples/typescript/xy-stacked-step/package.json +1 -1
  139. package/examples/typescript/xy-stock/package.json +1 -1
  140. package/examples/typescript/xy-stock-comparing/package.json +1 -1
  141. package/package.json +1 -1
@@ -9,6 +9,7 @@ import * as $utils from "../util/Utils";
9
9
  import * as $array from "../util/Array";
10
10
  import * as $type from "../util/Type";
11
11
  import * as $object from "../util/Object";
12
+ import * as $math from "../util/Math";
12
13
  //import { populateString } from "../util/PopulateString";
13
14
  /**
14
15
  * An [[EventDispatcher]] for [[Sprite]].
@@ -1034,6 +1035,12 @@ var Sprite = /** @class */ (function (_super) {
1034
1035
  value: function (e) {
1035
1036
  var dragEvent = this._dragEvent;
1036
1037
  if (dragEvent) {
1038
+ var angle = 0;
1039
+ var parent_3 = this.parent;
1040
+ while (parent_3 != null) {
1041
+ angle += parent_3.get("rotation", 0);
1042
+ parent_3 = parent_3.parent;
1043
+ }
1037
1044
  var x = e.point.x - dragEvent.point.x;
1038
1045
  var y = e.point.y - dragEvent.point.y;
1039
1046
  var events = this.events;
@@ -1057,8 +1064,8 @@ var Sprite = /** @class */ (function (_super) {
1057
1064
  }
1058
1065
  if (this._isDragging) {
1059
1066
  var dragPoint = this._dragPoint;
1060
- this.set("x", dragPoint.x + x);
1061
- this.set("y", dragPoint.y + y);
1067
+ this.set("x", dragPoint.x + x * $math.cos(angle) + y * $math.sin(angle));
1068
+ this.set("y", dragPoint.y + y * $math.cos(angle) - x * $math.sin(angle));
1062
1069
  var type = "dragged";
1063
1070
  if (events.isEnabled(type)) {
1064
1071
  events.dispatch(type, {
@@ -1157,10 +1164,10 @@ var Sprite = /** @class */ (function (_super) {
1157
1164
  this._root._addDirtyBounds(this);
1158
1165
  display.isMeasured = true;
1159
1166
  display.invalidateBounds();
1160
- var parent_3 = this.parent;
1161
- if (parent_3 && this.get("position") != "absolute") {
1162
- if (parent_3.get("width") == null || parent_3.get("height") == null || parent_3.get("layout")) {
1163
- parent_3.markDirtyBounds();
1167
+ var parent_4 = this.parent;
1168
+ if (parent_4 && this.get("position") != "absolute") {
1169
+ if (parent_4.get("width") == null || parent_4.get("height") == null || parent_4.get("layout")) {
1170
+ parent_4.markDirtyBounds();
1164
1171
  }
1165
1172
  }
1166
1173
  if (this.get("focusable") && this.isFocus()) {
@@ -1407,9 +1414,9 @@ var Sprite = /** @class */ (function (_super) {
1407
1414
  value: function () {
1408
1415
  var tooltip = this.get("tooltip");
1409
1416
  if (!tooltip) {
1410
- var parent_4 = this.parent;
1411
- if (parent_4) {
1412
- return parent_4.getTooltip();
1417
+ var parent_5 = this.parent;
1418
+ if (parent_5) {
1419
+ return parent_5.getTooltip();
1413
1420
  }
1414
1421
  }
1415
1422
  else {
@@ -1902,9 +1909,9 @@ var Sprite = /** @class */ (function (_super) {
1902
1909
  }
1903
1910
  else {
1904
1911
  if (width instanceof Percent) {
1905
- var parent_5 = this.parent;
1906
- if (parent_5) {
1907
- w = parent_5.innerWidth() * width.value;
1912
+ var parent_6 = this.parent;
1913
+ if (parent_6) {
1914
+ w = parent_6.innerWidth() * width.value;
1908
1915
  }
1909
1916
  else {
1910
1917
  w = this._root.width() * width.value;
@@ -2004,9 +2011,9 @@ var Sprite = /** @class */ (function (_super) {
2004
2011
  }
2005
2012
  else {
2006
2013
  if (height instanceof Percent) {
2007
- var parent_6 = this.parent;
2008
- if (parent_6) {
2009
- h = parent_6.innerHeight() * height.value;
2014
+ var parent_7 = this.parent;
2015
+ if (parent_7) {
2016
+ h = parent_7.innerHeight() * height.value;
2010
2017
  }
2011
2018
  else {
2012
2019
  h = this._root.height() * height.value;