@visactor/vchart 1.2.0-beta.4 → 1.2.0-beta.5

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 (167) hide show
  1. package/build/index.js +321 -133
  2. package/build/index.min.js +1 -1
  3. package/cjs/chart/bar/bar-3d.d.ts +1 -0
  4. package/cjs/chart/bar/bar-3d.js +8 -0
  5. package/cjs/chart/bar/bar-3d.js.map +1 -1
  6. package/cjs/chart/bar/bar.js +2 -1
  7. package/cjs/chart/bar/bar.js.map +1 -1
  8. package/cjs/chart/base-chart.js +5 -4
  9. package/cjs/chart/base-chart.js.map +1 -1
  10. package/cjs/chart/range-column/range-column-3d.js +3 -1
  11. package/cjs/chart/range-column/range-column-3d.js.map +1 -1
  12. package/cjs/chart/range-column/range-column.js +3 -1
  13. package/cjs/chart/range-column/range-column.js.map +1 -1
  14. package/cjs/component/axis/cartesian/axis.js +4 -3
  15. package/cjs/component/axis/cartesian/axis.js.map +1 -1
  16. package/cjs/component/axis/cartesian/band-axis.d.ts +1 -0
  17. package/cjs/component/axis/cartesian/band-axis.js +2 -1
  18. package/cjs/component/axis/cartesian/band-axis.js.map +1 -1
  19. package/cjs/component/axis/cartesian/interface/common.d.ts +1 -0
  20. package/cjs/component/axis/cartesian/interface/common.js.map +1 -1
  21. package/cjs/component/axis/interface.js.map +1 -1
  22. package/cjs/component/axis/mixin/band-axis-mixin.js.map +1 -1
  23. package/cjs/component/geo/geo-coordinate.js +4 -2
  24. package/cjs/component/geo/geo-coordinate.js.map +1 -1
  25. package/cjs/component/label/bar.js +13 -5
  26. package/cjs/component/label/bar.js.map +1 -1
  27. package/cjs/component/marker/base-marker.d.ts +3 -3
  28. package/cjs/component/marker/base-marker.js +4 -2
  29. package/cjs/component/marker/base-marker.js.map +1 -1
  30. package/cjs/component/marker/interface.d.ts +3 -2
  31. package/cjs/component/marker/interface.js.map +1 -1
  32. package/cjs/component/marker/mark-area/interface/spec.d.ts +9 -9
  33. package/cjs/component/marker/mark-area/interface/spec.js.map +1 -1
  34. package/cjs/component/marker/mark-area/mark-area.js +7 -3
  35. package/cjs/component/marker/mark-area/mark-area.js.map +1 -1
  36. package/cjs/component/marker/mark-line/interface/spec.d.ts +5 -5
  37. package/cjs/component/marker/mark-line/interface/spec.js.map +1 -1
  38. package/cjs/component/marker/mark-line/mark-line.js +7 -3
  39. package/cjs/component/marker/mark-line/mark-line.js.map +1 -1
  40. package/cjs/component/marker/mark-point/mark-point.js +9 -3
  41. package/cjs/component/marker/mark-point/mark-point.js.map +1 -1
  42. package/cjs/component/title/interface/theme.d.ts +1 -1
  43. package/cjs/component/title/interface/theme.js.map +1 -1
  44. package/cjs/core/index.d.ts +1 -1
  45. package/cjs/core/index.js +1 -1
  46. package/cjs/core/index.js.map +1 -1
  47. package/cjs/data/transforms/tick-data/continuous.js +2 -0
  48. package/cjs/data/transforms/tick-data/continuous.js.map +1 -1
  49. package/cjs/data/transforms/tick-data/discrete/linear.js +26 -2
  50. package/cjs/data/transforms/tick-data/discrete/linear.js.map +1 -1
  51. package/cjs/series/bar/bar.d.ts +3 -2
  52. package/cjs/series/bar/bar.js +29 -16
  53. package/cjs/series/bar/bar.js.map +1 -1
  54. package/cjs/series/bar/interface.d.ts +5 -3
  55. package/cjs/series/bar/interface.js.map +1 -1
  56. package/cjs/series/base/base-series.d.ts +1 -0
  57. package/cjs/series/base/base-series.js +28 -18
  58. package/cjs/series/base/base-series.js.map +1 -1
  59. package/cjs/series/circle-packing/circle-packing.d.ts +2 -0
  60. package/cjs/series/circle-packing/circle-packing.js +1 -0
  61. package/cjs/series/circle-packing/circle-packing.js.map +1 -1
  62. package/cjs/series/geo/geo.js +2 -2
  63. package/cjs/series/geo/geo.js.map +1 -1
  64. package/cjs/series/pie/pie.d.ts +3 -0
  65. package/cjs/series/pie/pie.js +28 -23
  66. package/cjs/series/pie/pie.js.map +1 -1
  67. package/cjs/series/radar/radar.js +2 -2
  68. package/cjs/series/radar/radar.js.map +1 -1
  69. package/cjs/series/range-column/range-column.js +15 -29
  70. package/cjs/series/range-column/range-column.js.map +1 -1
  71. package/cjs/series/sankey/sankey.d.ts +2 -0
  72. package/cjs/series/sankey/sankey.js +1 -0
  73. package/cjs/series/sankey/sankey.js.map +1 -1
  74. package/cjs/series/sunburst/sunburst.d.ts +2 -0
  75. package/cjs/series/sunburst/sunburst.js +1 -0
  76. package/cjs/series/sunburst/sunburst.js.map +1 -1
  77. package/cjs/theme/buildin-theme/light/component/title.js +2 -2
  78. package/cjs/theme/buildin-theme/light/component/title.js.map +1 -1
  79. package/cjs/theme/buildin-theme/light/index.js +2 -1
  80. package/cjs/theme/buildin-theme/light/index.js.map +1 -1
  81. package/cjs/theme/interface.d.ts +1 -0
  82. package/cjs/theme/interface.js.map +1 -1
  83. package/cjs/typings/spec/common.d.ts +2 -0
  84. package/cjs/typings/spec/common.js.map +1 -1
  85. package/esm/chart/bar/bar-3d.d.ts +1 -0
  86. package/esm/chart/bar/bar-3d.js +8 -0
  87. package/esm/chart/bar/bar-3d.js.map +1 -1
  88. package/esm/chart/bar/bar.js +2 -1
  89. package/esm/chart/bar/bar.js.map +1 -1
  90. package/esm/chart/base-chart.js +5 -4
  91. package/esm/chart/base-chart.js.map +1 -1
  92. package/esm/chart/range-column/range-column-3d.js +3 -1
  93. package/esm/chart/range-column/range-column-3d.js.map +1 -1
  94. package/esm/chart/range-column/range-column.js +3 -1
  95. package/esm/chart/range-column/range-column.js.map +1 -1
  96. package/esm/component/axis/cartesian/axis.js +4 -3
  97. package/esm/component/axis/cartesian/axis.js.map +1 -1
  98. package/esm/component/axis/cartesian/band-axis.d.ts +1 -0
  99. package/esm/component/axis/cartesian/band-axis.js +2 -1
  100. package/esm/component/axis/cartesian/band-axis.js.map +1 -1
  101. package/esm/component/axis/cartesian/interface/common.d.ts +1 -0
  102. package/esm/component/axis/cartesian/interface/common.js.map +1 -1
  103. package/esm/component/axis/interface.js.map +1 -1
  104. package/esm/component/axis/mixin/band-axis-mixin.js.map +1 -1
  105. package/esm/component/geo/geo-coordinate.js +4 -2
  106. package/esm/component/geo/geo-coordinate.js.map +1 -1
  107. package/esm/component/label/bar.js +13 -5
  108. package/esm/component/label/bar.js.map +1 -1
  109. package/esm/component/marker/base-marker.d.ts +3 -3
  110. package/esm/component/marker/base-marker.js +5 -3
  111. package/esm/component/marker/base-marker.js.map +1 -1
  112. package/esm/component/marker/interface.d.ts +3 -2
  113. package/esm/component/marker/interface.js.map +1 -1
  114. package/esm/component/marker/mark-area/interface/spec.d.ts +9 -9
  115. package/esm/component/marker/mark-area/interface/spec.js.map +1 -1
  116. package/esm/component/marker/mark-area/mark-area.js +7 -3
  117. package/esm/component/marker/mark-area/mark-area.js.map +1 -1
  118. package/esm/component/marker/mark-line/interface/spec.d.ts +5 -5
  119. package/esm/component/marker/mark-line/interface/spec.js.map +1 -1
  120. package/esm/component/marker/mark-line/mark-line.js +7 -3
  121. package/esm/component/marker/mark-line/mark-line.js.map +1 -1
  122. package/esm/component/marker/mark-point/mark-point.js +9 -3
  123. package/esm/component/marker/mark-point/mark-point.js.map +1 -1
  124. package/esm/component/title/interface/theme.d.ts +1 -1
  125. package/esm/component/title/interface/theme.js.map +1 -1
  126. package/esm/core/index.d.ts +1 -1
  127. package/esm/core/index.js +1 -1
  128. package/esm/core/index.js.map +1 -1
  129. package/esm/data/transforms/tick-data/continuous.js +2 -0
  130. package/esm/data/transforms/tick-data/continuous.js.map +1 -1
  131. package/esm/data/transforms/tick-data/discrete/linear.js +24 -2
  132. package/esm/data/transforms/tick-data/discrete/linear.js.map +1 -1
  133. package/esm/series/bar/bar.d.ts +3 -2
  134. package/esm/series/bar/bar.js +27 -13
  135. package/esm/series/bar/bar.js.map +1 -1
  136. package/esm/series/bar/interface.d.ts +5 -3
  137. package/esm/series/bar/interface.js.map +1 -1
  138. package/esm/series/base/base-series.d.ts +1 -0
  139. package/esm/series/base/base-series.js +28 -18
  140. package/esm/series/base/base-series.js.map +1 -1
  141. package/esm/series/circle-packing/circle-packing.d.ts +2 -0
  142. package/esm/series/circle-packing/circle-packing.js +1 -0
  143. package/esm/series/circle-packing/circle-packing.js.map +1 -1
  144. package/esm/series/geo/geo.js +2 -2
  145. package/esm/series/geo/geo.js.map +1 -1
  146. package/esm/series/pie/pie.d.ts +3 -0
  147. package/esm/series/pie/pie.js +27 -23
  148. package/esm/series/pie/pie.js.map +1 -1
  149. package/esm/series/radar/radar.js +2 -2
  150. package/esm/series/radar/radar.js.map +1 -1
  151. package/esm/series/range-column/range-column.js +14 -27
  152. package/esm/series/range-column/range-column.js.map +1 -1
  153. package/esm/series/sankey/sankey.d.ts +2 -0
  154. package/esm/series/sankey/sankey.js +1 -0
  155. package/esm/series/sankey/sankey.js.map +1 -1
  156. package/esm/series/sunburst/sunburst.d.ts +2 -0
  157. package/esm/series/sunburst/sunburst.js +1 -0
  158. package/esm/series/sunburst/sunburst.js.map +1 -1
  159. package/esm/theme/buildin-theme/light/component/title.js +2 -2
  160. package/esm/theme/buildin-theme/light/component/title.js.map +1 -1
  161. package/esm/theme/buildin-theme/light/index.js +2 -1
  162. package/esm/theme/buildin-theme/light/index.js.map +1 -1
  163. package/esm/theme/interface.d.ts +1 -0
  164. package/esm/theme/interface.js.map +1 -1
  165. package/esm/typings/spec/common.d.ts +2 -0
  166. package/esm/typings/spec/common.js.map +1 -1
  167. package/package.json +2 -2
package/build/index.js CHANGED
@@ -870,7 +870,7 @@
870
870
  const max$3 = Math.max;
871
871
  const min$3 = Math.min;
872
872
  const sin$1 = Math.sin;
873
- const sqrt$2 = Math.sqrt;
873
+ const sqrt$3 = Math.sqrt;
874
874
  const pow$1 = Math.pow;
875
875
  function acos$1(x) {
876
876
  return x > 1 ? 0 : x < -1 ? pi$1 : Math.acos(x);
@@ -924,13 +924,13 @@
924
924
  }
925
925
  class PointService {
926
926
  static distancePP(p1, p2) {
927
- return sqrt$2(pow$1(p1.x - p2.x, 2) + pow$1(p1.y - p2.y, 2));
927
+ return sqrt$3(pow$1(p1.x - p2.x, 2) + pow$1(p1.y - p2.y, 2));
928
928
  }
929
929
  static distanceNN(x, y, x1, y1) {
930
- return sqrt$2(pow$1(x - x1, 2) + pow$1(y - y1, 2));
930
+ return sqrt$3(pow$1(x - x1, 2) + pow$1(y - y1, 2));
931
931
  }
932
932
  static distancePN(point, x, y) {
933
- return sqrt$2(pow$1(x - point.x, 2) + pow$1(y - point.y, 2));
933
+ return sqrt$3(pow$1(x - point.x, 2) + pow$1(y - point.y, 2));
934
934
  }
935
935
  static pointAtPP(p1, p2, t) {
936
936
  return new Point((p2.x - p1.x) * t + p1.x, (p2.y - p1.y) * t + p1.y);
@@ -2682,7 +2682,7 @@
2682
2682
  var sign$1 = Math.sign || function (x) {
2683
2683
  return x > 0 ? 1 : x < 0 ? -1 : 0;
2684
2684
  };
2685
- var sqrt$1 = Math.sqrt;
2685
+ var sqrt$2 = Math.sqrt;
2686
2686
  var tan = Math.tan;
2687
2687
  function acos(x) {
2688
2688
  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);
@@ -2797,7 +2797,7 @@
2797
2797
 
2798
2798
  // TODO return d
2799
2799
  function cartesianNormalizeInPlace(d) {
2800
- var l = sqrt$1(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
2800
+ var l = sqrt$2(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
2801
2801
  d[0] /= l, d[1] /= l, d[2] /= l;
2802
2802
  }
2803
2803
 
@@ -3452,7 +3452,7 @@
3452
3452
  uu = cartesianDot(u, u),
3453
3453
  t2 = w * w - uu * (cartesianDot(A, A) - 1);
3454
3454
  if (t2 < 0) return;
3455
- var t = sqrt$1(t2),
3455
+ var t = sqrt$2(t2),
3456
3456
  q = cartesianScale(u, (-w - t) / uu);
3457
3457
  cartesianAddInPlace(q, A);
3458
3458
  q = spherical(q);
@@ -3814,7 +3814,7 @@
3814
3814
  function centroidPointLine(x, y) {
3815
3815
  var dx = x - x0$1,
3816
3816
  dy = y - y0$1,
3817
- z = sqrt$1(dx * dx + dy * dy);
3817
+ z = sqrt$2(dx * dx + dy * dy);
3818
3818
  X1 += z * (x0$1 + x) / 2;
3819
3819
  Y1 += z * (y0$1 + y) / 2;
3820
3820
  Z1 += z;
@@ -3836,7 +3836,7 @@
3836
3836
  function centroidPointRing(x, y) {
3837
3837
  var dx = x - x0$1,
3838
3838
  dy = y - y0$1,
3839
- z = sqrt$1(dx * dx + dy * dy);
3839
+ z = sqrt$2(dx * dx + dy * dy);
3840
3840
  X1 += z * (x0$1 + x) / 2;
3841
3841
  Y1 += z * (y0$1 + y) / 2;
3842
3842
  Z1 += z;
@@ -3926,7 +3926,7 @@
3926
3926
  }
3927
3927
  function lengthPoint(x, y) {
3928
3928
  x0 -= x, y0 -= y;
3929
- lengthSum.add(sqrt$1(x0 * x0 + y0 * y0));
3929
+ lengthSum.add(sqrt$2(x0 * x0 + y0 * y0));
3930
3930
  x0 = x, y0 = y;
3931
3931
  }
3932
3932
  var pathMeasure = lengthStream;
@@ -4129,7 +4129,7 @@
4129
4129
  var a = a0 + a1,
4130
4130
  b = b0 + b1,
4131
4131
  c = c0 + c1,
4132
- m = sqrt$1(a * a + b * b + c * c),
4132
+ m = sqrt$2(a * a + b * b + c * c),
4133
4133
  phi2 = asin(c /= m),
4134
4134
  lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),
4135
4135
  p = project(lambda2, phi2),
@@ -4332,7 +4332,7 @@
4332
4332
  return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;
4333
4333
  };
4334
4334
  projection.precision = function (_) {
4335
- return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt$1(delta2);
4335
+ return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt$2(delta2);
4336
4336
  };
4337
4337
  projection.fitExtent = function (extent, object) {
4338
4338
  return fitExtent(projection, extent, object);
@@ -4395,9 +4395,9 @@
4395
4395
  // Are the parallels symmetrical around the Equator?
4396
4396
  if (abs(n) < epsilon) return cylindricalEqualAreaRaw(y0);
4397
4397
  var c = 1 + sy0 * (2 * n - sy0),
4398
- r0 = sqrt$1(c) / n;
4398
+ r0 = sqrt$2(c) / n;
4399
4399
  function project(x, y) {
4400
- var r = sqrt$1(c - 2 * n * sin(y)) / n;
4400
+ var r = sqrt$2(c - 2 * n * sin(y)) / n;
4401
4401
  return [r * sin(x *= n), r0 - r * cos(x)];
4402
4402
  }
4403
4403
  project.invert = function (x, y) {
@@ -4534,7 +4534,7 @@
4534
4534
  }
4535
4535
  function azimuthalInvert(angle) {
4536
4536
  return function (x, y) {
4537
- var z = sqrt$1(x * x + y * y),
4537
+ var z = sqrt$2(x * x + y * y),
4538
4538
  c = angle(z),
4539
4539
  sc = sin(c),
4540
4540
  cc = cos(c);
@@ -4543,7 +4543,7 @@
4543
4543
  }
4544
4544
 
4545
4545
  var azimuthalEqualAreaRaw = azimuthalRaw(function (cxcy) {
4546
- return sqrt$1(2 / (1 + cxcy));
4546
+ return sqrt$2(2 / (1 + cxcy));
4547
4547
  });
4548
4548
  azimuthalEqualAreaRaw.invert = azimuthalInvert(function (z) {
4549
4549
  return 2 * asin(z / 2);
@@ -4621,7 +4621,7 @@
4621
4621
  }
4622
4622
  project.invert = function (x, y) {
4623
4623
  var fy = f - y,
4624
- r = sign$1(n) * sqrt$1(x * x + fy * fy),
4624
+ r = sign$1(n) * sqrt$2(x * x + fy * fy),
4625
4625
  l = atan2(x, abs(fy)) * sign$1(fy);
4626
4626
  if (fy * n < 0) l -= pi * sign$1(x) * sign$1(fy);
4627
4627
  return [l / n, 2 * atan(pow(f / r, 1 / n)) - halfPi$1];
@@ -4654,7 +4654,7 @@
4654
4654
  var gy = g - y,
4655
4655
  l = atan2(x, abs(gy)) * sign$1(gy);
4656
4656
  if (gy * n < 0) l -= pi * sign$1(x) * sign$1(gy);
4657
- return [l / n, g - sign$1(n) * sqrt$1(x * x + gy * gy)];
4657
+ return [l / n, g - sign$1(n) * sqrt$2(x * x + gy * gy)];
4658
4658
  };
4659
4659
  return project;
4660
4660
  }
@@ -4666,7 +4666,7 @@
4666
4666
  A2 = -0.081106,
4667
4667
  A3 = 0.000893,
4668
4668
  A4 = 0.003796,
4669
- M = sqrt$1(3) / 2,
4669
+ M = sqrt$2(3) / 2,
4670
4670
  iterations = 12;
4671
4671
  function equalEarthRaw(lambda, phi) {
4672
4672
  var l = asin(M * sin(phi)),
@@ -8658,7 +8658,7 @@
8658
8658
  return x;
8659
8659
  }
8660
8660
  const generatePow = exponent => x => x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);
8661
- const sqrt = x => x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);
8661
+ const sqrt$1 = x => x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);
8662
8662
  const square$3 = x => x < 0 ? -x * x : x * x;
8663
8663
  const logNegative = x => -Math.log(-x);
8664
8664
  const expNegative = x => -Math.exp(-x);
@@ -9127,7 +9127,7 @@
9127
9127
  return new PowScale().domain(this._domain, !0).range(this._range, !0).unknown(this._unknown).clamp(this.clamp(), null, !0).interpolate(this._interpolate, !0).exponent(this._exponent);
9128
9128
  }
9129
9129
  rescale(slience) {
9130
- return slience || (1 === this._exponent ? (this.transformer = identity$1, this.untransformer = identity$1) : .5 === this._exponent ? (this.transformer = sqrt, this.untransformer = square$3) : (this.transformer = generatePow(this._exponent), this.untransformer = generatePow(1 / this._exponent)), super.rescale()), this;
9130
+ return slience || (1 === this._exponent ? (this.transformer = identity$1, this.untransformer = identity$1) : .5 === this._exponent ? (this.transformer = sqrt$1, this.untransformer = square$3) : (this.transformer = generatePow(this._exponent), this.untransformer = generatePow(1 / this._exponent)), super.rescale()), this;
9131
9131
  }
9132
9132
  exponent(_, slience) {
9133
9133
  return arguments.length ? (this._exponent = _, this.rescale(slience)) : this._exponent;
@@ -9249,7 +9249,7 @@
9249
9249
 
9250
9250
  class SqrtScale extends LinearScale {
9251
9251
  constructor() {
9252
- super(sqrt, square$3), this.type = ScaleEnum.Sqrt;
9252
+ super(sqrt$1, square$3), this.type = ScaleEnum.Sqrt;
9253
9253
  }
9254
9254
  clone() {
9255
9255
  return new SqrtScale().domain(this._domain, !0).range(this._range, !0).unknown(this._unknown).clamp(this.clamp(), null, !0).interpolate(this._interpolate);
@@ -19656,6 +19656,24 @@
19656
19656
  }
19657
19657
  return attr[key];
19658
19658
  }
19659
+ class RafBasedSTO {
19660
+ constructor() {
19661
+ this.durations = [], this.timeout = RafBasedSTO.TimeOut, this.lastDate = 0, this.durationsListThreshold = 30;
19662
+ }
19663
+ call(cb) {
19664
+ return this.lastDate = Date.now(), setTimeout(() => {
19665
+ this.appendDuration(Date.now() - this.lastDate), cb(0);
19666
+ }, this.timeout, !0);
19667
+ }
19668
+ clear(h) {
19669
+ clearTimeout(h);
19670
+ }
19671
+ appendDuration(d) {
19672
+ this.durations.push(d), this.durations.length > this.durationsListThreshold && this.durations.shift(), this.timeout = Math.max(this.durations.reduce((a, b) => a + b, 0) / this.durations.length, 1e3 / 60);
19673
+ }
19674
+ }
19675
+ RafBasedSTO.TimeOut = 1e3 / 60;
19676
+ const rafBasedSto = new RafBasedSTO();
19659
19677
 
19660
19678
  class IncreaseCount extends ACustomAnimate {
19661
19679
  constructor(from, to, duration, easing, params) {
@@ -22450,8 +22468,8 @@
22450
22468
  ay = yors - oc[1],
22451
22469
  bx = xore - oc[0],
22452
22470
  by = yore - oc[1],
22453
- kc = 1 / sin$1(acos$1((ax * bx + ay * by) / (sqrt$2(ax * ax + ay * ay) * sqrt$2(bx * bx + by * by))) / 2),
22454
- lc = sqrt$2(oc[0] * oc[0] + oc[1] * oc[1]);
22471
+ kc = 1 / sin$1(acos$1((ax * bx + ay * by) / (sqrt$3(ax * ax + ay * ay) * sqrt$3(bx * bx + by * by))) / 2),
22472
+ lc = sqrt$3(oc[0] * oc[0] + oc[1] * oc[1]);
22455
22473
  limitedIcr = min$3(maxInnerCornerRadius, (innerRadius - lc) / (kc - 1)), limitedOcr = min$3(maxOuterCornerRadius, (outerRadius - lc) / (kc + 1));
22456
22474
  }
22457
22475
  }
@@ -22669,8 +22687,8 @@
22669
22687
  ay = yors - oc[1],
22670
22688
  bx = xore - oc[0],
22671
22689
  by = yore - oc[1],
22672
- kc = 1 / sin$1(acos$1((ax * bx + ay * by) / (sqrt$2(ax * ax + ay * ay) * sqrt$2(bx * bx + by * by))) / 2),
22673
- lc = sqrt$2(oc[0] * oc[0] + oc[1] * oc[1]);
22690
+ kc = 1 / sin$1(acos$1((ax * bx + ay * by) / (sqrt$3(ax * ax + ay * ay) * sqrt$3(bx * bx + by * by))) / 2),
22691
+ lc = sqrt$3(oc[0] * oc[0] + oc[1] * oc[1]);
22674
22692
  limitedIcr = min$3(maxInnerCornerRadius, (innerRadius - lc) / (kc - 1)), limitedOcr = min$3(maxOuterCornerRadius, (outerRadius - lc) / (kc + 1));
22675
22693
  }
22676
22694
  }
@@ -23370,7 +23388,7 @@
23370
23388
  }
23371
23389
  var star$2 = new StarSymbol();
23372
23390
 
23373
- const sqrt3$1 = sqrt$2(3);
23391
+ const sqrt3$1 = sqrt$3(3);
23374
23392
  function arrow(ctx, r, transX, transY) {
23375
23393
  const triangleH = r,
23376
23394
  trangleBottomSide = triangleH / sqrt3$1,
@@ -23437,8 +23455,8 @@
23437
23455
  var stroke$1 = new StrokeSymbol();
23438
23456
 
23439
23457
  const c$1 = -.5,
23440
- s = sqrt$2(3) / 2,
23441
- k = 1 / sqrt$2(12);
23458
+ s = sqrt$3(3) / 2,
23459
+ k = 1 / sqrt$3(12);
23442
23460
  function wye(ctx, r, transX, transY) {
23443
23461
  const x0 = r / 2,
23444
23462
  y0 = r * k,
@@ -23534,7 +23552,7 @@
23534
23552
  }
23535
23553
  var triangleDown = new TriangleDownSymbol();
23536
23554
 
23537
- const sqrt3 = sqrt$2(3);
23555
+ const sqrt3 = sqrt$3(3);
23538
23556
  function thinTriangle(ctx, r, x, y) {
23539
23557
  const h = r * sqrt3;
23540
23558
  return ctx.moveTo(x, y + -h / 3 * 2), ctx.lineTo(r + x, y + h), ctx.lineTo(x - r, y + h), ctx.closePath(), !0;
@@ -24958,7 +24976,7 @@
24958
24976
  padAngle = arcTheme.padAngle
24959
24977
  } = this.attribute,
24960
24978
  {
24961
- padRadius = sqrt$2(outerRadius * outerRadius + innerRadius * innerRadius)
24979
+ padRadius = sqrt$3(outerRadius * outerRadius + innerRadius * innerRadius)
24962
24980
  } = this.attribute,
24963
24981
  deltaAngle = abs$1(endAngle - startAngle);
24964
24982
  let outerStartAngle = startAngle,
@@ -29793,12 +29811,12 @@
29793
29811
  }
29794
29812
  getRequestAnimationFrame() {
29795
29813
  return function (callback) {
29796
- return setTimeout(callback, 1e3 / 60, !0);
29814
+ return rafBasedSto.call(callback);
29797
29815
  };
29798
29816
  }
29799
29817
  getCancelAnimationFrame() {
29800
29818
  return h => {
29801
- clearTimeout(h);
29819
+ rafBasedSto.clear(h);
29802
29820
  };
29803
29821
  }
29804
29822
  addEventListener(type, listener, options) {
@@ -30053,12 +30071,12 @@
30053
30071
  }
30054
30072
  getRequestAnimationFrame() {
30055
30073
  return function (callback) {
30056
- return setTimeout(callback, 1e3 / 60, !0);
30074
+ return rafBasedSto.call(callback);
30057
30075
  };
30058
30076
  }
30059
30077
  getCancelAnimationFrame() {
30060
30078
  return h => {
30061
- clearTimeout(h);
30079
+ rafBasedSto.clear(h);
30062
30080
  };
30063
30081
  }
30064
30082
  addEventListener(type, listener, options) {
@@ -30149,12 +30167,12 @@
30149
30167
  }
30150
30168
  getRequestAnimationFrame() {
30151
30169
  return function (callback) {
30152
- return setTimeout(callback, 1e3 / 60, !0);
30170
+ return rafBasedSto.call(callback);
30153
30171
  };
30154
30172
  }
30155
30173
  getCancelAnimationFrame() {
30156
30174
  return h => {
30157
- clearTimeout(h);
30175
+ rafBasedSto.clear(h);
30158
30176
  };
30159
30177
  }
30160
30178
  addEventListener(type, listener, options) {}
@@ -30260,12 +30278,12 @@
30260
30278
  }
30261
30279
  getRequestAnimationFrame() {
30262
30280
  return function (callback) {
30263
- return setTimeout(callback, 1e3 / 60, !0);
30281
+ return rafBasedSto.call(callback);
30264
30282
  };
30265
30283
  }
30266
30284
  getCancelAnimationFrame() {
30267
30285
  return h => {
30268
- clearTimeout(h);
30286
+ rafBasedSto.clear(h);
30269
30287
  };
30270
30288
  }
30271
30289
  addEventListener(type, listener, options) {
@@ -34610,7 +34628,7 @@
34610
34628
  constructor(dir, color) {
34611
34629
  let ambient = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : .8;
34612
34630
  this.dir = dir, this.color = color, this.colorRgb = colorString.get(color).value, this.colorRgb[0] /= 255, this.colorRgb[1] /= 255, this.colorRgb[2] /= 255, this.ambient = ambient;
34613
- const length = sqrt$2(dir[0] * dir[0] + dir[1] * dir[1] + dir[2] * dir[2]);
34631
+ const length = sqrt$3(dir[0] * dir[0] + dir[1] * dir[1] + dir[2] * dir[2]);
34614
34632
  this.formatedDir = [dir[0] / length, dir[1] / length, dir[2] / length];
34615
34633
  }
34616
34634
  computeColor(normal, color) {
@@ -41284,6 +41302,7 @@
41284
41302
  x2: x2,
41285
41303
  y2: y2
41286
41304
  } = _ref;
41305
+ if (x2 < 0 || y2 < 0 || x1 > w || y1 > h) return !0;
41287
41306
  let start,
41288
41307
  end,
41289
41308
  indexStart,
@@ -41305,6 +41324,7 @@
41305
41324
  x2: x2,
41306
41325
  y2: y2
41307
41326
  } = _ref2;
41327
+ if (x2 < 0 || y2 < 0 || x1 > w || y1 > h) return;
41308
41328
  let start, end, indexStart, indexEnd, i;
41309
41329
  for (; y1 <= y2; ++y1) if (start = y1 * w + x1, end = y1 * w + x2, indexStart = start >>> 5, indexEnd = end >>> 5, indexStart === indexEnd) _set(indexStart, RIGHT0[31 & start] & RIGHT1[1 + (31 & end)]);else for (_set(indexStart, RIGHT0[31 & start]), _set(indexEnd, RIGHT1[1 + (31 & end)]), i = indexStart + 1; i < indexEnd; ++i) _set(i, 4294967295);
41310
41330
  },
@@ -49686,7 +49706,7 @@
49686
49706
  isSub = rangeSpec.isSubshaft,
49687
49707
  reversed = rangeSpec.reversed,
49688
49708
  coordinate = this.parameters()[coord];
49689
- return null == coordinate ? void 0 : coordinate.getVisiualPositionByDimension(dim, isSub, reversed);
49709
+ return null == coordinate ? void 0 : coordinate.getVisualPositionByDimension(dim, isSub, reversed);
49690
49710
  }
49691
49711
  return null;
49692
49712
  }
@@ -50121,7 +50141,7 @@
50121
50141
  res = this.isMainDimension(dim) ? [start.x, end.x] : [end.y, start.y];
50122
50142
  return reversed ? [res[1], res[0]] : res;
50123
50143
  }
50124
- getVisiualPositionByDimension(dim, isSubshaft, reversed) {
50144
+ getVisualPositionByDimension(dim, isSubshaft, reversed) {
50125
50145
  return this.isMainDimension(dim) ? isSubshaft ? "top" : "bottom" : isSubshaft ? "right" : "left";
50126
50146
  }
50127
50147
  getAxisPointsByDimension(dim, isSubshaft, reversed, baseValue) {
@@ -50268,7 +50288,7 @@
50268
50288
  const res = this.isMainDimension(dim) ? [this.startAngle, this.endAngle] : [this.innerRadius, this.outerRadius];
50269
50289
  return reversed ? [res[1], res[0]] : res;
50270
50290
  }
50271
- getVisiualPositionByDimension(dim, isSubshaft, reversed) {
50291
+ getVisualPositionByDimension(dim, isSubshaft, reversed) {
50272
50292
  return this.isMainDimension(dim) ? isSubshaft ? "inside" : "outside" : isSubshaft ? "end" : "start";
50273
50293
  }
50274
50294
  getAxisPointsByDimension(dim, isSubshaft, reversed, baseValue) {
@@ -52785,12 +52805,12 @@
52785
52805
  },
52786
52806
  textStyle: {
52787
52807
  fontSize: THEME_CONSTANTS.TITLE_FONT_SIZE,
52788
- fontColor: { type: 'palette', key: 'titleFontColor' }
52808
+ fill: { type: 'palette', key: 'titleFontColor' }
52789
52809
  },
52790
52810
  subtextStyle: {
52791
52811
  fontSize: THEME_CONSTANTS.LABEL_FONT_SIZE,
52792
52812
  lineHeight: THEME_CONSTANTS.TITLE_FONT_SIZE,
52793
- fontColor: { type: 'palette', key: 'labelFontColor' }
52813
+ fill: { type: 'palette', key: 'labelFontColor' }
52794
52814
  }
52795
52815
  };
52796
52816
 
@@ -52913,7 +52933,8 @@
52913
52933
  mark: markByType,
52914
52934
  markByName,
52915
52935
  series,
52916
- component
52936
+ component,
52937
+ animationThreshold: 2000
52917
52938
  };
52918
52939
 
52919
52940
  const buildinThemeMap = new Map([
@@ -58239,7 +58260,7 @@
58239
58260
  VChart.useMark([ComponentMark, GroupMark, ImageMark]);
58240
58261
  Factory.registerRegion('region', Region);
58241
58262
  Factory.registerLayout('base', Layout);
58242
- const version = "1.2.0-beta.4";
58263
+ const version = "1.2.0-beta.5";
58243
58264
  Logger.getInstance(LoggerLevel.Error);
58244
58265
 
58245
58266
  var SeriesMarkNameEnum;
@@ -58825,12 +58846,12 @@
58825
58846
  init(options = {}) {
58826
58847
  this.initRegion();
58827
58848
  this.initSeries();
58828
- this.updateGlobalScaleDomain();
58829
58849
  this.initComponent();
58830
58850
  this.initEvent();
58831
58851
  this._stack.init();
58832
58852
  this._series.forEach(s => s.getRawData()?.markRunning());
58833
58853
  this._series.forEach(s => s.fillData());
58854
+ this.updateGlobalScaleDomain();
58834
58855
  }
58835
58856
  onResize(width, height) {
58836
58857
  const canvasRect = {
@@ -59431,6 +59452,7 @@
59431
59452
  label: spec.label,
59432
59453
  seriesStyle: spec.seriesStyle,
59433
59454
  animation: spec.animation,
59455
+ animationThreshold: spec.animationThreshold ?? this._theme.animationThreshold,
59434
59456
  animationAppear: spec.animationAppear,
59435
59457
  animationDisappear: spec.animationDisappear,
59436
59458
  animationEnter: spec.animationEnter,
@@ -61208,6 +61230,7 @@
61208
61230
  }
61209
61231
  initData() {
61210
61232
  this._rawData = this._spec.data;
61233
+ this._rawData?.target.addListener('change', this.rawDataUpdate.bind(this));
61211
61234
  this._addDataIndexAndKey();
61212
61235
  if (this._rawData) {
61213
61236
  this._viewDataFilter = dataViewFromDataView(this._rawData, this._dataSet, {
@@ -61253,7 +61276,6 @@
61253
61276
  const rawDataName = `${PREFIX}_series_${this.id}_rawDataStatic`;
61254
61277
  this._rawDataStatistics = this.createStatisticalData(rawDataName, this._rawData, this._option.globalScale.getStatisticalFields);
61255
61278
  this._rawData.target.removeListener('change', this._rawDataStatistics.reRunAllTransform);
61256
- this._rawDataStatistics.reRunAllTransform();
61257
61279
  }
61258
61280
  _statisticViewData() {
61259
61281
  const viewDataName = `${PREFIX}_series_${this.id}_viewDataStatic`;
@@ -61304,8 +61326,17 @@
61304
61326
  }
61305
61327
  }, false);
61306
61328
  }
61329
+ _noAnimationDataKey(datum, index, context) {
61330
+ return index;
61331
+ }
61307
61332
  generateDefaultDataKey(dataKey, datum, index, context) {
61308
61333
  if (isNil(dataKey)) {
61334
+ if (this._spec.animation === false) {
61335
+ const v = this._noAnimationDataKey(datum, index, context);
61336
+ if (v !== undefined) {
61337
+ return v;
61338
+ }
61339
+ }
61309
61340
  const { keyMap } = context;
61310
61341
  const seriesDataKey = this._getSeriesDataKey(datum);
61311
61342
  if (keyMap.get(seriesDataKey) === undefined) {
@@ -61346,8 +61377,8 @@
61346
61377
  this._rawData.updateRawData(d);
61347
61378
  }
61348
61379
  rawDataUpdate(d) {
61349
- this.event.emit(ChartEvent.rawDataUpdate, { model: this });
61350
61380
  this._rawDataStatistics?.reRunAllTransform();
61381
+ this.event.emit(ChartEvent.rawDataUpdate, { model: this });
61351
61382
  }
61352
61383
  rawDataStatisticsUpdate(d) {
61353
61384
  this.event.emit(ChartEvent.rawDataStatisticsUpdate, { model: this });
@@ -61488,13 +61519,25 @@
61488
61519
  }
61489
61520
  afterInitMark() {
61490
61521
  this.event.emit(ChartEvent.afterInitMark, { model: this });
61491
- this._rawDataStatistics?.reRunAllTransform();
61492
61522
  this.setSeriesField(this._spec.seriesField);
61523
+ let animationThreshold = this._spec.animationThreshold ?? Number.MAX_SAFE_INTEGER;
61493
61524
  this.getMarks().forEach(m => {
61494
61525
  if (m.stateStyle?.normal?.lineWidth) {
61495
61526
  m.setAttribute('stroke', this.getColorAttribute(), 'normal', AttributeLevel.Base_Series);
61496
61527
  }
61528
+ const config = m.getProgressiveConfig();
61529
+ if (config) {
61530
+ if (config.large && config.largeThreshold) {
61531
+ animationThreshold = Math.min(animationThreshold, config.largeThreshold);
61532
+ }
61533
+ if (config.progressiveThreshold) {
61534
+ animationThreshold = Math.min(animationThreshold, config.progressiveThreshold);
61535
+ }
61536
+ }
61497
61537
  });
61538
+ if (this._rawData?.latestData?.length >= animationThreshold) {
61539
+ this._spec.animation = false;
61540
+ }
61498
61541
  }
61499
61542
  getMarksWithoutRoot() {
61500
61543
  return this.getMarks().filter(m => !m.name.includes('seriesGroup'));
@@ -61510,7 +61553,6 @@
61510
61553
  }
61511
61554
  initEvent() {
61512
61555
  this._trigger.init();
61513
- this._rawData?.target.addListener('change', this.rawDataUpdate.bind(this));
61514
61556
  this._data?.getDataView()?.target.addListener('change', this.viewDataUpdate.bind(this));
61515
61557
  this._viewDataStatistics?.target.addListener('change', this.viewDataStatisticsUpdate.bind(this));
61516
61558
  this._rawDataStatistics?.target.addListener('change', this.rawDataStatisticsUpdate.bind(this));
@@ -61595,8 +61637,7 @@
61595
61637
  });
61596
61638
  }
61597
61639
  getSeriesInfoInField(field) {
61598
- const keys = this._rawDataStatistics.latestData[field]?.values;
61599
- return this._getSeriesInfo(field, keys);
61640
+ return this._getSeriesInfo(field, this._rawDataStatistics.latestData[field]?.values ?? []);
61600
61641
  }
61601
61642
  getSeriesInfoList() {
61602
61643
  return this._getSeriesInfo(this._seriesField ?? DEFAULT_DATA_SERIES_FIELD, this.getSeriesKeys());
@@ -63184,7 +63225,7 @@
63184
63225
  }
63185
63226
 
63186
63227
  VChart.useMark([RectMark, TextMark]);
63187
- const DefaultBandWidth$3 = 6;
63228
+ const DefaultBandWidth$2 = 6;
63188
63229
  class BarSeries extends CartesianSeries {
63189
63230
  static type = SeriesTypeEnum.bar;
63190
63231
  type = SeriesTypeEnum.bar;
@@ -63255,31 +63296,17 @@
63255
63296
  this.setMarkStyle(this._rectMark, {
63256
63297
  x: (datum) => valueInScaleRange(this.dataToPositionX(datum), xScale),
63257
63298
  x1: (datum) => valueInScaleRange(this.dataToPositionX1(datum), xScale),
63258
- y: (datum) => {
63259
- const bandWidth = this.getYAxisHelper().getBandwidth?.(this._groups ? this._groups.fields.length - 1 : 0) ??
63260
- DefaultBandWidth$3;
63261
- const continuous = isContinuous(yScale.type || 'band');
63262
- const pos = this.dataToPositionY(datum);
63263
- const width = this._rectMark.getAttribute('height', datum);
63264
- return pos + (bandWidth - width) * 0.5 + (continuous ? -bandWidth / 2 : 0);
63265
- },
63266
- height: () => this.getBarWidth(this._yAxisHelper)
63299
+ y: (datum) => this._getPosition(this.direction, datum),
63300
+ height: () => this._getBarWidth(this._yAxisHelper)
63267
63301
  }, 'normal', AttributeLevel.Series);
63268
63302
  }
63269
63303
  else {
63270
63304
  this.setMarkStyle(this._rectMark, {
63271
- x: (datum) => {
63272
- const bandWidth = this.getXAxisHelper().getBandwidth?.(this._groups ? this._groups.fields.length - 1 : 0) ??
63273
- DefaultBandWidth$3;
63274
- const width = this._rectMark.getAttribute('width', datum);
63275
- const continuous = isContinuous(this.getXAxisHelper().getScale?.(0).type || 'band');
63276
- const pos = this.dataToPositionX(datum);
63277
- return pos + (bandWidth - width) / 2 + (continuous ? -bandWidth / 2 : 0);
63278
- },
63305
+ x: (datum) => this._getPosition(this.direction, datum),
63279
63306
  y: (datum) => valueInScaleRange(this.dataToPositionY(datum), yScale),
63280
63307
  y1: (datum) => valueInScaleRange(this.dataToPositionY1(datum), yScale),
63281
63308
  width: () => {
63282
- return this.getBarWidth(this._xAxisHelper);
63309
+ return this._getBarWidth(this._xAxisHelper);
63283
63310
  }
63284
63311
  }, 'normal', AttributeLevel.Series);
63285
63312
  }
@@ -63311,9 +63338,9 @@
63311
63338
  };
63312
63339
  this._rectMark.setAnimationConfig(animationConfig(DEFAULT_MARK_ANIMATION.bar(animationParams, appearPreset), userAnimationConfig(this._barMarkName, this._spec), { dataIndex }));
63313
63340
  }
63314
- getBarWidth(axisHelper) {
63341
+ _getBarWidth(axisHelper) {
63315
63342
  const hasBarWidth = this._spec.barWidth !== undefined;
63316
- const bandWidth = axisHelper.getBandwidth?.(this._groups ? this._groups.fields.length - 1 : 0) ?? DefaultBandWidth$3;
63343
+ const bandWidth = axisHelper.getBandwidth?.(this._groups ? this._groups.fields.length - 1 : 0) ?? DefaultBandWidth$2;
63317
63344
  if (hasBarWidth) {
63318
63345
  return getActualNumValue(this._spec.barWidth, bandWidth);
63319
63346
  }
@@ -63328,6 +63355,50 @@
63328
63355
  }
63329
63356
  return width;
63330
63357
  }
63358
+ _getPosition(direction, datum) {
63359
+ let axisHelper;
63360
+ let sizeAttribute;
63361
+ let dataToPosition;
63362
+ if (direction === Direction$2.horizontal) {
63363
+ axisHelper = this.getYAxisHelper();
63364
+ sizeAttribute = 'height';
63365
+ dataToPosition = this.dataToPositionY.bind(this);
63366
+ }
63367
+ else {
63368
+ axisHelper = this.getXAxisHelper();
63369
+ sizeAttribute = 'width';
63370
+ dataToPosition = this.dataToPositionX.bind(this);
63371
+ }
63372
+ const scale = axisHelper.getScale(0);
63373
+ const size = this._rectMark.getAttribute(sizeAttribute, datum);
63374
+ const bandWidth = axisHelper.getBandwidth?.(this._groups ? this._groups.fields.length - 1 : 0) ?? DefaultBandWidth$2;
63375
+ if (this._groups?.fields?.length > 1 && isValid(this._spec.barGapInGroup)) {
63376
+ const groupFields = this._groups.fields;
63377
+ const barInGroup = array(this._spec.barGapInGroup);
63378
+ let totalWidth = 0;
63379
+ let offSet = 0;
63380
+ for (let index = groupFields.length - 1; index >= 1; index--) {
63381
+ const groupField = groupFields[index];
63382
+ const groupValues = this.getViewDataStatistics()?.latestData?.[groupField]?.values ?? [];
63383
+ const groupCount = groupValues.length;
63384
+ const gap = getActualNumValue(barInGroup[index - 1] ?? last(barInGroup), bandWidth);
63385
+ const i = groupValues.indexOf(datum[groupField]);
63386
+ if (index === groupFields.length - 1) {
63387
+ totalWidth += groupCount * size + (groupCount - 1) * gap;
63388
+ offSet += i * (size + gap);
63389
+ }
63390
+ else {
63391
+ offSet += i * (totalWidth + gap);
63392
+ totalWidth += totalWidth + (groupCount - 1) * gap;
63393
+ }
63394
+ }
63395
+ const center = scale.scale(datum[groupFields[0]]) + axisHelper.getBandwidth(0) / 2;
63396
+ return center - totalWidth / 2 + offSet;
63397
+ }
63398
+ const continuous = isContinuous(scale.type || 'band');
63399
+ const pos = dataToPosition(datum);
63400
+ return pos + (bandWidth - size) * 0.5 + (continuous ? -bandWidth / 2 : 0);
63401
+ }
63331
63402
  updateSpec(spec) {
63332
63403
  const { direction } = this._spec;
63333
63404
  const result = super.updateSpec(spec);
@@ -64580,7 +64651,6 @@
64580
64651
  }
64581
64652
  }
64582
64653
 
64583
- const DefaultBandWidth$2 = 6;
64584
64654
  class RangeColumnSeries extends BarSeries {
64585
64655
  static type = SeriesTypeEnum.rangeColumn;
64586
64656
  type = SeriesTypeEnum.rangeColumn;
@@ -64617,14 +64687,7 @@
64617
64687
  }
64618
64688
  }
64619
64689
  initMarkStyle() {
64620
- const rectMark = this._rectMark;
64621
- if (rectMark) {
64622
- this.setMarkStyle(rectMark, {
64623
- fill: this.getColorAttribute()
64624
- }, 'normal', AttributeLevel.Series);
64625
- this._trigger.registerMark(rectMark);
64626
- this._tooltipHelper?.activeTriggerSet.mark.add(rectMark);
64627
- }
64690
+ super.initMarkStyle();
64628
64691
  const minLabelMark = this._minLabelMark;
64629
64692
  const minLabelSpec = this._spec.label?.minLabel;
64630
64693
  if (minLabelMark) {
@@ -64716,27 +64779,13 @@
64716
64779
  x1: (datum) => valueInScaleRange(dataToPosition(this.getDatumPositionValues(datum, this._spec.xField[1]), {
64717
64780
  bandPosition: this._bandPosition
64718
64781
  }), xScale),
64719
- y: (datum) => {
64720
- const bandWidth = this.getYAxisHelper().getBandwidth?.(this._groups ? this._groups.fields.length - 1 : 0) ??
64721
- DefaultBandWidth$2;
64722
- const continuous = isContinuous(yScale.type || 'band');
64723
- const pos = this.dataToPositionY(datum);
64724
- const width = this._rectMark.getAttribute('height', datum);
64725
- return pos + (bandWidth - width) * 0.5 + (continuous ? -bandWidth / 2 : 0);
64726
- },
64727
- height: () => this.getBarWidth(this._yAxisHelper)
64782
+ y: (datum) => this._getPosition(this.direction, datum),
64783
+ height: () => this._getBarWidth(this._yAxisHelper)
64728
64784
  }, 'normal', AttributeLevel.Series);
64729
64785
  }
64730
64786
  else {
64731
64787
  this.setMarkStyle(this._rectMark, {
64732
- x: (datum) => {
64733
- const bandWidth = this.getXAxisHelper().getBandwidth?.(this._groups ? this._groups.fields.length - 1 : 0) ??
64734
- DefaultBandWidth$2;
64735
- const width = this._rectMark.getAttribute('width', datum);
64736
- const continuous = isContinuous(this.getXAxisHelper().getScale?.(0).type || 'band');
64737
- const pos = this.dataToPositionX(datum);
64738
- return pos + (bandWidth - width) / 2 + (continuous ? -bandWidth / 2 : 0);
64739
- },
64788
+ x: (datum) => this._getPosition(this.direction, datum),
64740
64789
  y: (datum) => valueInScaleRange(dataToPosition(this.getDatumPositionValues(datum, this._spec.yField[0]), {
64741
64790
  bandPosition: this._bandPosition
64742
64791
  }), yScale),
@@ -64744,7 +64793,7 @@
64744
64793
  bandPosition: this._bandPosition
64745
64794
  }), yScale),
64746
64795
  width: () => {
64747
- return this.getBarWidth(this._xAxisHelper);
64796
+ return this._getBarWidth(this._xAxisHelper);
64748
64797
  }
64749
64798
  }, 'normal', AttributeLevel.Series);
64750
64799
  }
@@ -65319,8 +65368,8 @@
65319
65368
  }
65320
65369
  getSeriesKeys() {
65321
65370
  if (this._seriesField) {
65322
- return (this._mapViewDataStatistics?.latestData[this._seriesField]?.values ??
65323
- this._rawDataStatistics?.latestData[this._seriesField].values ??
65371
+ return (this._rawDataStatistics?.latestData?.[this._seriesField]?.values ??
65372
+ this._mapViewDataStatistics?.latestData[this._seriesField]?.values ??
65324
65373
  []);
65325
65374
  }
65326
65375
  if (this.name) {
@@ -66795,12 +66844,6 @@
66795
66844
  padAngle: this._padAngle,
66796
66845
  centerOffset: this._centerOffset
66797
66846
  }, 'normal', AttributeLevel.Series);
66798
- const pieSpec = this.getSpec()[pieMark.name];
66799
- if (pieSpec) {
66800
- for (const state in pieSpec.state || {}) {
66801
- this.setMarkStyle(pieMark, this.generateRadiusStyle(pieSpec.state[state]), state, AttributeLevel.User_Mark);
66802
- }
66803
- }
66804
66847
  this._trigger.registerMark(pieMark);
66805
66848
  this._tooltipHelper?.activeTriggerSet.mark.add(pieMark);
66806
66849
  }
@@ -66835,6 +66878,17 @@
66835
66878
  this._trigger.registerMark(labelLineMark);
66836
66879
  }
66837
66880
  }
66881
+ initMarkStyleWithSpec(mark, spec, key) {
66882
+ super.initMarkStyleWithSpec(mark, spec, key);
66883
+ if (mark.name === this._pieMarkName) {
66884
+ const pieSpec = this.getSpec()[mark.name];
66885
+ if (pieSpec) {
66886
+ for (const state in pieSpec.state || {}) {
66887
+ this.setMarkStyle(mark, this.generateRadiusStyle(pieSpec.state[state]), state, AttributeLevel.User_Mark);
66888
+ }
66889
+ }
66890
+ }
66891
+ }
66838
66892
  afterInitMark() {
66839
66893
  super.afterInitMark();
66840
66894
  this._trigger.setStateKeys([this._seriesField, ...this._radiusField]);
@@ -67033,6 +67087,9 @@
67033
67087
  }
67034
67088
  setValueFieldToPercent() {
67035
67089
  }
67090
+ _noAnimationDataKey(datum, index) {
67091
+ return index;
67092
+ }
67036
67093
  }
67037
67094
  class PieSeries extends BasePieSeries {
67038
67095
  static type = SeriesTypeEnum.pie;
@@ -67562,13 +67619,13 @@
67562
67619
  if (!datum || !this.angleAxisHelper || !this.radiusAxisHelper) {
67563
67620
  return Number.NaN;
67564
67621
  }
67565
- return this.valueToPosition(this.getDatumPositionValues(datum, this._angleField), this._stack ? this.getDatumPositionValues(datum, this._innerRadiusField) : 0).x;
67622
+ return this.valueToPosition(this.getDatumPositionValues(datum, this._angleField), this._stack ? this.getDatumPositionValues(datum, this._innerRadiusField) : this.radiusScale.domain()[0]).x;
67566
67623
  },
67567
67624
  y1: (datum) => {
67568
67625
  if (!datum || !this.angleAxisHelper || !this.radiusAxisHelper) {
67569
67626
  return Number.NaN;
67570
67627
  }
67571
- const value = this.valueToPosition(this.getDatumPositionValues(datum, this._angleField), this._stack ? this.getDatumPositionValues(datum, this._innerRadiusField) : 0).y;
67628
+ const value = this.valueToPosition(this.getDatumPositionValues(datum, this._angleField), this._stack ? this.getDatumPositionValues(datum, this._innerRadiusField) : this.radiusScale.domain()[0]).y;
67572
67629
  return value;
67573
67630
  },
67574
67631
  fill: this.getColorAttribute(),
@@ -69624,8 +69681,9 @@
69624
69681
  let fontSize = options.fontSize ? field$1(options.fontSize) : 14;
69625
69682
  const fontSizeRange = options.fontSizeRange;
69626
69683
  if (fontSizeRange && !isNumber(fontSize)) {
69627
- const fsize = fontSize;
69628
- fontSize = datum => sqrtScale(fsize(datum), extent$1(fsize, data), fontSizeRange);
69684
+ const fsize = fontSize,
69685
+ fontSizeSqrtScale = generateSqrtScale(extent$1(fsize, data), fontSizeRange);
69686
+ fontSize = datum => fontSizeSqrtScale(fsize(datum));
69629
69687
  }
69630
69688
  let Layout = CloudLayout;
69631
69689
  "fast" === options.layoutType ? Layout = FastLayout : "grid" === options.layoutType && (Layout = GridLayout$1);
@@ -69661,7 +69719,15 @@
69661
69719
  } : layout.output();
69662
69720
  };
69663
69721
  const field$1 = option => isString(option) || isNumber(option) || isFunction(option) ? option : datum => datum[option.field],
69664
- sqrtScale = (datum, domain, range) => (Math.sqrt(datum) - Math.sqrt(domain[0])) / (Math.sqrt(domain[1]) - Math.sqrt(domain[0])) * (range[1] - range[0]) + range[0],
69722
+ sqrt = x => x < 0 ? -Math.sqrt(-x) : Math.sqrt(x),
69723
+ generateSqrtScale = (domain, range) => {
69724
+ if (domain[0] === domain[1]) return datum => range[0];
69725
+ const s0 = sqrt(domain[0]),
69726
+ s1 = sqrt(domain[1]),
69727
+ min = Math.min(s0, s1),
69728
+ max = Math.max(s0, s1);
69729
+ return datum => (sqrt(datum) - min) / (max - min) * (range[1] - range[0]) + range[0];
69730
+ },
69665
69731
  extent$1 = (field, data) => {
69666
69732
  let min = 1 / 0,
69667
69733
  max = -1 / 0;
@@ -73349,6 +73415,9 @@
73349
73415
  setValueFieldToPercent() {
73350
73416
  return;
73351
73417
  }
73418
+ _noAnimationDataKey(datum, index) {
73419
+ return undefined;
73420
+ }
73352
73421
  }
73353
73422
  mixin(SunburstSeries, Drillable);
73354
73423
 
@@ -73575,6 +73644,9 @@
73575
73644
  super.onLayoutEnd(ctx);
73576
73645
  this._rawData.reRunAllTransform();
73577
73646
  }
73647
+ _noAnimationDataKey(datum, index) {
73648
+ return undefined;
73649
+ }
73578
73650
  }
73579
73651
  mixin(CirclePackingSeries, Drillable);
73580
73652
 
@@ -75011,6 +75083,9 @@
75011
75083
  getDefaultShapeType() {
75012
75084
  return 'square';
75013
75085
  }
75086
+ _noAnimationDataKey(datum, index) {
75087
+ return undefined;
75088
+ }
75014
75089
  }
75015
75090
 
75016
75091
  const treemap = (data, op) => {
@@ -76103,7 +76178,8 @@
76103
76178
  ...super._getDefaultSeriesSpec(spec),
76104
76179
  barWidth: spec.barWidth,
76105
76180
  barMaxWidth: spec.barMaxWidth,
76106
- barMinWidth: spec.barMinWidth
76181
+ barMinWidth: spec.barMinWidth,
76182
+ barGapInGroup: spec.barGapInGroup
76107
76183
  };
76108
76184
  }
76109
76185
  transformSpec(spec) {
@@ -76118,6 +76194,15 @@
76118
76194
  static view = 'singleDefault';
76119
76195
  type = ChartTypeEnum.bar3d;
76120
76196
  seriesType = SeriesTypeEnum.bar3d;
76197
+ _getDefaultSeriesSpec(spec) {
76198
+ return {
76199
+ ...super._getDefaultSeriesSpec(spec),
76200
+ barWidth: spec.barWidth,
76201
+ barMaxWidth: spec.barMaxWidth,
76202
+ barMinWidth: spec.barMinWidth,
76203
+ barGapInGroup: spec.barGapInGroup
76204
+ };
76205
+ }
76121
76206
  }
76122
76207
 
76123
76208
  VChart.useSeries([BoxPlotSeries]);
@@ -76981,7 +77066,8 @@
76981
77066
  seriesType = SeriesTypeEnum.rangeColumn;
76982
77067
  _getDefaultSeriesSpec(spec) {
76983
77068
  const series = {
76984
- ...super._getDefaultSeriesSpec(spec)
77069
+ ...super._getDefaultSeriesSpec(spec),
77070
+ barGapInGroup: spec.barGapInGroup
76985
77071
  };
76986
77072
  series.bar = spec.bar;
76987
77073
  if (spec.direction === Direction$2.horizontal) {
@@ -77006,7 +77092,8 @@
77006
77092
  seriesType = SeriesTypeEnum.rangeColumn3d;
77007
77093
  _getDefaultSeriesSpec(spec) {
77008
77094
  const series = {
77009
- ...super._getDefaultSeriesSpec(spec)
77095
+ ...super._getDefaultSeriesSpec(spec),
77096
+ barGapInGroup: spec.barGapInGroup
77010
77097
  };
77011
77098
  series.bar3d = spec.bar3d;
77012
77099
  if (spec.direction === Direction$2.horizontal) {
@@ -80164,6 +80251,11 @@
80164
80251
  if (!isContinuous(scale.type)) {
80165
80252
  return convertDomainToTickData(scale.domain());
80166
80253
  }
80254
+ const range = scale.range();
80255
+ const rangeSize = Math.abs(range[range.length - 1] - range[0]);
80256
+ if (rangeSize < 2) {
80257
+ return convertDomainToTickData([scale.domain()[0]]);
80258
+ }
80167
80259
  const { tickCount, forceTickCount, tickStep } = op;
80168
80260
  let scaleTicks;
80169
80261
  if (isValid(tickStep)) {
@@ -80216,8 +80308,20 @@
80216
80308
  };
80217
80309
 
80218
80310
  const linearDiscreteTicks = (scale, op) => {
80311
+ const domain = scale.domain();
80312
+ if (!domain.length) {
80313
+ return [];
80314
+ }
80219
80315
  const { tickCount, forceTickCount, tickStep, labelGap = 4, axisOrientType } = op;
80220
80316
  const isHorizontal = ['bottom', 'top'].includes(axisOrientType);
80317
+ const range = scale.range();
80318
+ const rangeSize = Math.abs(range[range.length - 1] - range[0]);
80319
+ if (rangeSize < 2) {
80320
+ if (op.labelLastVisible) {
80321
+ return convertDomainToTickData([domain[domain.length - 1]]);
80322
+ }
80323
+ return convertDomainToTickData([domain[0]]);
80324
+ }
80221
80325
  let scaleTicks;
80222
80326
  if (isValid(tickStep)) {
80223
80327
  scaleTicks = scale.stepTicks(tickStep);
@@ -80229,9 +80333,47 @@
80229
80333
  scaleTicks = scale.ticks(tickCount);
80230
80334
  }
80231
80335
  else if (op.sampling) {
80232
- const domain = scale.domain();
80233
- const range = scale.range();
80234
- const labelBoundsList = getCartesianLabelBounds(scale, domain, op);
80336
+ let labelBoundsList;
80337
+ const fontSize = (op.labelStyle.fontSize ?? 12) + 2;
80338
+ if (domain.length <= rangeSize / fontSize) {
80339
+ labelBoundsList = getCartesianLabelBounds(scale, domain, op);
80340
+ }
80341
+ else {
80342
+ const tempDomain = [domain[0], domain[Math.floor(domain.length / 2)], domain[domain.length - 1]];
80343
+ const tempList = getCartesianLabelBounds(scale, tempDomain, op);
80344
+ let maxBounds = null;
80345
+ let maxBoundsIndex = 0;
80346
+ tempList.forEach((current, index) => {
80347
+ if (!maxBounds) {
80348
+ maxBounds = current;
80349
+ maxBoundsIndex = index;
80350
+ return;
80351
+ }
80352
+ if (isHorizontal) {
80353
+ if (maxBounds.width() < current.width()) {
80354
+ maxBounds = current;
80355
+ maxBoundsIndex = index;
80356
+ }
80357
+ }
80358
+ else if (maxBounds.height() < current.height()) {
80359
+ maxBounds = current;
80360
+ maxBoundsIndex = index;
80361
+ }
80362
+ });
80363
+ const maxBoundsDomainIndex = maxBoundsIndex === 0 ? 0 : maxBoundsIndex === 2 ? domain.length - 1 : Math.floor(domain.length / 2);
80364
+ const maxBoundsPos = scale.scale(domain[maxBoundsDomainIndex]);
80365
+ labelBoundsList = new Array(domain.length);
80366
+ for (let i = 0; i < labelBoundsList.length; i++) {
80367
+ labelBoundsList[i] = maxBounds.clone();
80368
+ const currentPos = scale.scale(domain[i]);
80369
+ if (isHorizontal) {
80370
+ labelBoundsList[i].translate(currentPos - maxBoundsPos, 0);
80371
+ }
80372
+ else {
80373
+ labelBoundsList[i].translate(0, currentPos - maxBoundsPos);
80374
+ }
80375
+ }
80376
+ }
80235
80377
  const domainLengthList = labelBoundsList.map(b => {
80236
80378
  return isHorizontal ? b.width() : b.height();
80237
80379
  });
@@ -80964,7 +81106,8 @@
80964
81106
  getScale,
80965
81107
  getStatisticsDomain: () => this.getStatisticsDomain(),
80966
81108
  getAxisType: () => this.type,
80967
- getAxisId: () => this.id
81109
+ getAxisId: () => this.id,
81110
+ isInverse: () => this._spec.inverse === true
80968
81111
  };
80969
81112
  }
80970
81113
  afterCompile() {
@@ -81169,7 +81312,7 @@
81169
81312
  }
81170
81313
  _getTitleLimit(isX) {
81171
81314
  if (this._spec.title.visible && isNil(this._spec.title.style?.maxLineWidth)) {
81172
- const angle = this._spec.title.style?.angle || 0;
81315
+ const angle = this._axisStyle.title?.angle ?? this._spec.title.style?.angle ?? 0;
81173
81316
  if (isX) {
81174
81317
  const width = this.getLayoutRect().width;
81175
81318
  const cosValue = Math.abs(Math.cos(angle));
@@ -81673,7 +81816,8 @@
81673
81816
  getBandwidth,
81674
81817
  getStatisticsDomain: () => this.getStatisticsDomain(),
81675
81818
  getAxisType: () => this.type,
81676
- getAxisId: () => this.id
81819
+ getAxisId: () => this.id,
81820
+ isInverse: () => this._spec.inverse
81677
81821
  };
81678
81822
  }
81679
81823
  dataToPosition(values, cfg = {}) {
@@ -83539,7 +83683,8 @@
83539
83683
  return this.dataToLongitude(values[0]);
83540
83684
  },
83541
83685
  getAxisType: () => this.type,
83542
- getAxisId: () => this.id
83686
+ getAxisId: () => this.id,
83687
+ isInverse: () => false
83543
83688
  });
83544
83689
  s.setYAxisHelper({
83545
83690
  ...helper,
@@ -83547,7 +83692,8 @@
83547
83692
  return this.dataToLatitude(values[0]);
83548
83693
  },
83549
83694
  getAxisType: () => this.type,
83550
- getAxisId: () => this.id
83695
+ getAxisId: () => this.id,
83696
+ isInverse: () => false
83551
83697
  });
83552
83698
  this._longitudeField && s.setFieldX(this._longitudeField);
83553
83699
  this._latitudeField && s.setFieldY(this._latitudeField);
@@ -85493,6 +85639,9 @@
85493
85639
  _processSpecX(specX) {
85494
85640
  const relativeSeries = this._relativeSeries;
85495
85641
  let processType;
85642
+ if (isFunction(specX)) {
85643
+ specX = specX(this._relativeSeries.getData().getLatestData(), this._startRelativeSeries.getData().getLatestData(), this._endRelativeSeries.getData().getLatestData());
85644
+ }
85496
85645
  if (this._isSpecAggrOrRege(specX)) {
85497
85646
  processType = specX;
85498
85647
  return {
@@ -85507,6 +85656,9 @@
85507
85656
  _processSpecY(specY) {
85508
85657
  const relativeSeries = this._relativeSeries;
85509
85658
  let processType;
85659
+ if (isFunction(specY)) {
85660
+ specY = specY(this._relativeSeries.getData().getLatestData(), this._startRelativeSeries.getData().getLatestData(), this._endRelativeSeries.getData().getLatestData());
85661
+ }
85510
85662
  if (this._isSpecAggrOrRege(specY)) {
85511
85663
  processType = specY;
85512
85664
  return {
@@ -85690,8 +85842,15 @@
85690
85842
  else if (isPositionLayout) {
85691
85843
  points = spec.positions;
85692
85844
  }
85845
+ const dataPoints = data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
85693
85846
  this._markerComponent?.setAttributes({
85694
- points: points
85847
+ points: points,
85848
+ label: {
85849
+ ...this._markerComponent.attribute?.label,
85850
+ text: this._spec.label.formatMethod
85851
+ ? this._spec.label.formatMethod(dataPoints)
85852
+ : this._markerComponent.attribute?.label?.text
85853
+ }
85695
85854
  });
85696
85855
  }
85697
85856
  _initDataView() {
@@ -85847,8 +86006,15 @@
85847
86006
  else if (isPositionLayout) {
85848
86007
  points = spec.positions;
85849
86008
  }
86009
+ const dataPoints = data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
85850
86010
  this._markerComponent?.setAttributes({
85851
- points: points
86011
+ points: points,
86012
+ label: {
86013
+ ...this._markerComponent.attribute?.label,
86014
+ text: this._spec.label.formatMethod
86015
+ ? this._spec.label.formatMethod(dataPoints)
86016
+ : this._markerComponent.attribute?.label?.text
86017
+ }
85852
86018
  });
85853
86019
  }
85854
86020
  _initDataView() {
@@ -85957,8 +86123,18 @@
85957
86123
  else if (isPositionLayout) {
85958
86124
  point = spec.position;
85959
86125
  }
86126
+ const dataPoints = data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
85960
86127
  this._markerComponent?.setAttributes({
85961
- position: point
86128
+ position: point,
86129
+ itemContent: {
86130
+ ...this._markerComponent.attribute?.itemContent,
86131
+ textStyle: {
86132
+ ...this._markerComponent.attribute?.itemContent?.textStyle,
86133
+ text: this._spec.itemContent.text?.formatMethod
86134
+ ? this._spec.itemContent.text.formatMethod(dataPoints)
86135
+ : this._markerComponent.attribute?.itemContent?.textStyle?.text
86136
+ }
86137
+ }
85962
86138
  });
85963
86139
  }
85964
86140
  _initDataView() {
@@ -88382,16 +88558,19 @@
88382
88558
  const { series, baseMark } = labelInfo;
88383
88559
  const labelSpec = baseMark.getLabelSpec() ?? {};
88384
88560
  const labelPosition = labelSpec.position ?? 'outside';
88561
+ const direction = series.direction ?? 'vertical';
88562
+ const isInverse = series.direction === 'horizontal'
88563
+ ? series.getXAxisHelper()?.isInverse()
88564
+ : series.getYAxisHelper()?.isInverse();
88385
88565
  let position = labelPosition;
88386
88566
  if (position !== 'inside') {
88387
88567
  position = (data) => {
88388
88568
  const { data: datum } = data;
88389
88569
  const dataField = series.getMeasureField()[0];
88390
88570
  if (labelPosition === 'outside') {
88391
- if (series.direction === 'horizontal') {
88392
- return datum?.[dataField] >= 0 ? 'right' : 'left';
88393
- }
88394
- return datum?.[dataField] >= 0 ? 'top' : 'bottom';
88571
+ const positionMap = { vertical: ['top', 'bottom'], horizontal: ['right', 'left'] };
88572
+ const index = (datum?.[dataField] >= 0 && isInverse) || (datum?.[dataField] < 0 && !isInverse) ? 1 : 0;
88573
+ return positionMap[direction][index];
88395
88574
  }
88396
88575
  if (labelPosition === 'inside-bottom') {
88397
88576
  return series.direction === 'horizontal' ? 'inside-left' : 'inside-bottom';
@@ -88424,6 +88603,15 @@
88424
88603
  position: (data) => {
88425
88604
  const { data: datum } = data;
88426
88605
  const dataField = series.getMeasureField()[0];
88606
+ const isInverse = series.direction === 'horizontal'
88607
+ ? series.getXAxisHelper()?.isInverse()
88608
+ : series.getYAxisHelper()?.isInverse();
88609
+ if (isInverse) {
88610
+ if (datum?.[dataField] >= 0) {
88611
+ return series.direction === 'horizontal' ? ['left', 'inside-left'] : ['bottom', 'inside-bottom'];
88612
+ }
88613
+ return series.direction === 'horizontal' ? ['right', 'inside-right'] : ['top', 'inside-top'];
88614
+ }
88427
88615
  if (datum?.[dataField] >= 0) {
88428
88616
  return series.direction === 'horizontal' ? ['right', 'inside-right'] : ['top', 'inside-top'];
88429
88617
  }