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

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 (255) hide show
  1. package/build/index.js +513 -234
  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/legend/interface.d.ts +2 -2
  28. package/cjs/component/legend/interface.js.map +1 -1
  29. package/cjs/component/marker/base-marker.d.ts +3 -3
  30. package/cjs/component/marker/base-marker.js +4 -2
  31. package/cjs/component/marker/base-marker.js.map +1 -1
  32. package/cjs/component/marker/interface.d.ts +3 -2
  33. package/cjs/component/marker/interface.js.map +1 -1
  34. package/cjs/component/marker/mark-area/interface/spec.d.ts +9 -9
  35. package/cjs/component/marker/mark-area/interface/spec.js.map +1 -1
  36. package/cjs/component/marker/mark-area/mark-area.js +7 -3
  37. package/cjs/component/marker/mark-area/mark-area.js.map +1 -1
  38. package/cjs/component/marker/mark-line/interface/spec.d.ts +5 -5
  39. package/cjs/component/marker/mark-line/interface/spec.js.map +1 -1
  40. package/cjs/component/marker/mark-line/mark-line.js +7 -3
  41. package/cjs/component/marker/mark-line/mark-line.js.map +1 -1
  42. package/cjs/component/marker/mark-point/mark-point.js +9 -3
  43. package/cjs/component/marker/mark-point/mark-point.js.map +1 -1
  44. package/cjs/component/title/interface/theme.d.ts +1 -1
  45. package/cjs/component/title/interface/theme.js.map +1 -1
  46. package/cjs/component/tooltip/handler/base.js +9 -9
  47. package/cjs/component/tooltip/handler/base.js.map +1 -1
  48. package/cjs/component/tooltip/handler/dom/interface.d.ts +1 -0
  49. package/cjs/component/tooltip/handler/dom/interface.js.map +1 -1
  50. package/cjs/component/tooltip/handler/dom/util.js +1 -1
  51. package/cjs/component/tooltip/handler/dom/util.js.map +1 -1
  52. package/cjs/component/tooltip/interface/spec.d.ts +1 -0
  53. package/cjs/component/tooltip/interface/spec.js.map +1 -1
  54. package/cjs/component/tooltip/processor/base.d.ts +3 -0
  55. package/cjs/component/tooltip/processor/base.js +40 -1
  56. package/cjs/component/tooltip/processor/base.js.map +1 -1
  57. package/cjs/component/tooltip/processor/dimension-tooltip.d.ts +0 -1
  58. package/cjs/component/tooltip/processor/dimension-tooltip.js +8 -43
  59. package/cjs/component/tooltip/processor/dimension-tooltip.js.map +1 -1
  60. package/cjs/component/tooltip/processor/interface.d.ts +1 -0
  61. package/cjs/component/tooltip/processor/interface.js.map +1 -1
  62. package/cjs/component/tooltip/processor/mark-tooltip.js +4 -2
  63. package/cjs/component/tooltip/processor/mark-tooltip.js.map +1 -1
  64. package/cjs/component/tooltip/tooltip.js +5 -1
  65. package/cjs/component/tooltip/tooltip.js.map +1 -1
  66. package/cjs/constant/event.d.ts +2 -1
  67. package/cjs/constant/event.js +1 -1
  68. package/cjs/constant/event.js.map +1 -1
  69. package/cjs/core/index.d.ts +1 -1
  70. package/cjs/core/index.js +1 -1
  71. package/cjs/core/index.js.map +1 -1
  72. package/cjs/core/interface.d.ts +2 -2
  73. package/cjs/core/interface.js.map +1 -1
  74. package/cjs/core/vchart.d.ts +2 -2
  75. package/cjs/data/transforms/lookup.d.ts +2 -0
  76. package/cjs/data/transforms/lookup.js +4 -1
  77. package/cjs/data/transforms/lookup.js.map +1 -1
  78. package/cjs/data/transforms/map.d.ts +1 -0
  79. package/cjs/data/transforms/map.js +7 -3
  80. package/cjs/data/transforms/map.js.map +1 -1
  81. package/cjs/data/transforms/tick-data/continuous.js +2 -0
  82. package/cjs/data/transforms/tick-data/continuous.js.map +1 -1
  83. package/cjs/data/transforms/tick-data/discrete/linear.js +26 -2
  84. package/cjs/data/transforms/tick-data/discrete/linear.js.map +1 -1
  85. package/cjs/event/events/dimension/util/common.js +14 -3
  86. package/cjs/event/events/dimension/util/common.js.map +1 -1
  87. package/cjs/event/interface.d.ts +1 -0
  88. package/cjs/event/interface.js.map +1 -1
  89. package/cjs/plugin/components/axis-label-overlap-plugin.js +20 -2
  90. package/cjs/plugin/components/axis-label-overlap-plugin.js.map +1 -1
  91. package/cjs/series/bar/bar.d.ts +3 -2
  92. package/cjs/series/bar/bar.js +29 -16
  93. package/cjs/series/bar/bar.js.map +1 -1
  94. package/cjs/series/bar/interface.d.ts +5 -3
  95. package/cjs/series/bar/interface.js.map +1 -1
  96. package/cjs/series/base/base-series.d.ts +1 -0
  97. package/cjs/series/base/base-series.js +28 -18
  98. package/cjs/series/base/base-series.js.map +1 -1
  99. package/cjs/series/circle-packing/circle-packing.d.ts +2 -0
  100. package/cjs/series/circle-packing/circle-packing.js +1 -0
  101. package/cjs/series/circle-packing/circle-packing.js.map +1 -1
  102. package/cjs/series/geo/geo.js +2 -2
  103. package/cjs/series/geo/geo.js.map +1 -1
  104. package/cjs/series/map/map.js +8 -5
  105. package/cjs/series/map/map.js.map +1 -1
  106. package/cjs/series/pie/pie.d.ts +3 -0
  107. package/cjs/series/pie/pie.js +28 -23
  108. package/cjs/series/pie/pie.js.map +1 -1
  109. package/cjs/series/radar/radar.js +2 -2
  110. package/cjs/series/radar/radar.js.map +1 -1
  111. package/cjs/series/range-column/range-column.js +15 -29
  112. package/cjs/series/range-column/range-column.js.map +1 -1
  113. package/cjs/series/sankey/sankey.d.ts +2 -0
  114. package/cjs/series/sankey/sankey.js +1 -0
  115. package/cjs/series/sankey/sankey.js.map +1 -1
  116. package/cjs/series/sunburst/sunburst.d.ts +2 -0
  117. package/cjs/series/sunburst/sunburst.js +1 -0
  118. package/cjs/series/sunburst/sunburst.js.map +1 -1
  119. package/cjs/theme/buildin-theme/light/component/title.js +2 -2
  120. package/cjs/theme/buildin-theme/light/component/title.js.map +1 -1
  121. package/cjs/theme/buildin-theme/light/index.js +2 -1
  122. package/cjs/theme/buildin-theme/light/index.js.map +1 -1
  123. package/cjs/theme/interface.d.ts +1 -0
  124. package/cjs/theme/interface.js.map +1 -1
  125. package/cjs/typings/spec/common.d.ts +2 -0
  126. package/cjs/typings/spec/common.js.map +1 -1
  127. package/cjs/typings/tooltip/handler.d.ts +0 -1
  128. package/cjs/typings/tooltip/handler.js.map +1 -1
  129. package/esm/chart/bar/bar-3d.d.ts +1 -0
  130. package/esm/chart/bar/bar-3d.js +8 -0
  131. package/esm/chart/bar/bar-3d.js.map +1 -1
  132. package/esm/chart/bar/bar.js +2 -1
  133. package/esm/chart/bar/bar.js.map +1 -1
  134. package/esm/chart/base-chart.js +5 -4
  135. package/esm/chart/base-chart.js.map +1 -1
  136. package/esm/chart/range-column/range-column-3d.js +3 -1
  137. package/esm/chart/range-column/range-column-3d.js.map +1 -1
  138. package/esm/chart/range-column/range-column.js +3 -1
  139. package/esm/chart/range-column/range-column.js.map +1 -1
  140. package/esm/component/axis/cartesian/axis.js +4 -3
  141. package/esm/component/axis/cartesian/axis.js.map +1 -1
  142. package/esm/component/axis/cartesian/band-axis.d.ts +1 -0
  143. package/esm/component/axis/cartesian/band-axis.js +2 -1
  144. package/esm/component/axis/cartesian/band-axis.js.map +1 -1
  145. package/esm/component/axis/cartesian/interface/common.d.ts +1 -0
  146. package/esm/component/axis/cartesian/interface/common.js.map +1 -1
  147. package/esm/component/axis/interface.js.map +1 -1
  148. package/esm/component/axis/mixin/band-axis-mixin.js.map +1 -1
  149. package/esm/component/geo/geo-coordinate.js +4 -2
  150. package/esm/component/geo/geo-coordinate.js.map +1 -1
  151. package/esm/component/label/bar.js +13 -5
  152. package/esm/component/label/bar.js.map +1 -1
  153. package/esm/component/legend/interface.d.ts +2 -2
  154. package/esm/component/legend/interface.js.map +1 -1
  155. package/esm/component/marker/base-marker.d.ts +3 -3
  156. package/esm/component/marker/base-marker.js +5 -3
  157. package/esm/component/marker/base-marker.js.map +1 -1
  158. package/esm/component/marker/interface.d.ts +3 -2
  159. package/esm/component/marker/interface.js.map +1 -1
  160. package/esm/component/marker/mark-area/interface/spec.d.ts +9 -9
  161. package/esm/component/marker/mark-area/interface/spec.js.map +1 -1
  162. package/esm/component/marker/mark-area/mark-area.js +7 -3
  163. package/esm/component/marker/mark-area/mark-area.js.map +1 -1
  164. package/esm/component/marker/mark-line/interface/spec.d.ts +5 -5
  165. package/esm/component/marker/mark-line/interface/spec.js.map +1 -1
  166. package/esm/component/marker/mark-line/mark-line.js +7 -3
  167. package/esm/component/marker/mark-line/mark-line.js.map +1 -1
  168. package/esm/component/marker/mark-point/mark-point.js +9 -3
  169. package/esm/component/marker/mark-point/mark-point.js.map +1 -1
  170. package/esm/component/title/interface/theme.d.ts +1 -1
  171. package/esm/component/title/interface/theme.js.map +1 -1
  172. package/esm/component/tooltip/handler/base.js +8 -8
  173. package/esm/component/tooltip/handler/base.js.map +1 -1
  174. package/esm/component/tooltip/handler/dom/interface.d.ts +1 -0
  175. package/esm/component/tooltip/handler/dom/interface.js.map +1 -1
  176. package/esm/component/tooltip/handler/dom/util.js +1 -1
  177. package/esm/component/tooltip/handler/dom/util.js.map +1 -1
  178. package/esm/component/tooltip/interface/spec.d.ts +1 -0
  179. package/esm/component/tooltip/interface/spec.js.map +1 -1
  180. package/esm/component/tooltip/processor/base.d.ts +3 -0
  181. package/esm/component/tooltip/processor/base.js +43 -0
  182. package/esm/component/tooltip/processor/base.js.map +1 -1
  183. package/esm/component/tooltip/processor/dimension-tooltip.d.ts +0 -1
  184. package/esm/component/tooltip/processor/dimension-tooltip.js +8 -47
  185. package/esm/component/tooltip/processor/dimension-tooltip.js.map +1 -1
  186. package/esm/component/tooltip/processor/interface.d.ts +1 -0
  187. package/esm/component/tooltip/processor/interface.js.map +1 -1
  188. package/esm/component/tooltip/processor/mark-tooltip.js +4 -2
  189. package/esm/component/tooltip/processor/mark-tooltip.js.map +1 -1
  190. package/esm/component/tooltip/tooltip.js +5 -1
  191. package/esm/component/tooltip/tooltip.js.map +1 -1
  192. package/esm/constant/event.d.ts +2 -1
  193. package/esm/constant/event.js +1 -1
  194. package/esm/constant/event.js.map +1 -1
  195. package/esm/core/index.d.ts +1 -1
  196. package/esm/core/index.js +1 -1
  197. package/esm/core/index.js.map +1 -1
  198. package/esm/core/interface.d.ts +2 -2
  199. package/esm/core/interface.js.map +1 -1
  200. package/esm/core/vchart.d.ts +2 -2
  201. package/esm/data/transforms/lookup.d.ts +2 -0
  202. package/esm/data/transforms/lookup.js +5 -2
  203. package/esm/data/transforms/lookup.js.map +1 -1
  204. package/esm/data/transforms/map.d.ts +1 -0
  205. package/esm/data/transforms/map.js +4 -2
  206. package/esm/data/transforms/map.js.map +1 -1
  207. package/esm/data/transforms/tick-data/continuous.js +2 -0
  208. package/esm/data/transforms/tick-data/continuous.js.map +1 -1
  209. package/esm/data/transforms/tick-data/discrete/linear.js +24 -2
  210. package/esm/data/transforms/tick-data/discrete/linear.js.map +1 -1
  211. package/esm/event/events/dimension/util/common.js +14 -3
  212. package/esm/event/events/dimension/util/common.js.map +1 -1
  213. package/esm/event/interface.d.ts +1 -0
  214. package/esm/event/interface.js.map +1 -1
  215. package/esm/plugin/components/axis-label-overlap-plugin.js +20 -2
  216. package/esm/plugin/components/axis-label-overlap-plugin.js.map +1 -1
  217. package/esm/series/bar/bar.d.ts +3 -2
  218. package/esm/series/bar/bar.js +27 -13
  219. package/esm/series/bar/bar.js.map +1 -1
  220. package/esm/series/bar/interface.d.ts +5 -3
  221. package/esm/series/bar/interface.js.map +1 -1
  222. package/esm/series/base/base-series.d.ts +1 -0
  223. package/esm/series/base/base-series.js +28 -18
  224. package/esm/series/base/base-series.js.map +1 -1
  225. package/esm/series/circle-packing/circle-packing.d.ts +2 -0
  226. package/esm/series/circle-packing/circle-packing.js +1 -0
  227. package/esm/series/circle-packing/circle-packing.js.map +1 -1
  228. package/esm/series/geo/geo.js +2 -2
  229. package/esm/series/geo/geo.js.map +1 -1
  230. package/esm/series/map/map.js +10 -7
  231. package/esm/series/map/map.js.map +1 -1
  232. package/esm/series/pie/pie.d.ts +3 -0
  233. package/esm/series/pie/pie.js +27 -23
  234. package/esm/series/pie/pie.js.map +1 -1
  235. package/esm/series/radar/radar.js +2 -2
  236. package/esm/series/radar/radar.js.map +1 -1
  237. package/esm/series/range-column/range-column.js +14 -27
  238. package/esm/series/range-column/range-column.js.map +1 -1
  239. package/esm/series/sankey/sankey.d.ts +2 -0
  240. package/esm/series/sankey/sankey.js +1 -0
  241. package/esm/series/sankey/sankey.js.map +1 -1
  242. package/esm/series/sunburst/sunburst.d.ts +2 -0
  243. package/esm/series/sunburst/sunburst.js +1 -0
  244. package/esm/series/sunburst/sunburst.js.map +1 -1
  245. package/esm/theme/buildin-theme/light/component/title.js +2 -2
  246. package/esm/theme/buildin-theme/light/component/title.js.map +1 -1
  247. package/esm/theme/buildin-theme/light/index.js +2 -1
  248. package/esm/theme/buildin-theme/light/index.js.map +1 -1
  249. package/esm/theme/interface.d.ts +1 -0
  250. package/esm/theme/interface.js.map +1 -1
  251. package/esm/typings/spec/common.d.ts +2 -0
  252. package/esm/typings/spec/common.js.map +1 -1
  253. package/esm/typings/tooltip/handler.d.ts +0 -1
  254. package/esm/typings/tooltip/handler.js.map +1 -1
  255. package/package.json +1 -1
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) {
@@ -51670,6 +51690,7 @@
51670
51690
  ChartEvent["legendItemUnHover"] = "legendItemUnHover";
51671
51691
  ChartEvent["tooltipShow"] = "tooltipShow";
51672
51692
  ChartEvent["tooltipHide"] = "tooltipHide";
51693
+ ChartEvent["tooltipRelease"] = "tooltipRelease";
51673
51694
  })(ChartEvent || (ChartEvent = {}));
51674
51695
  var Event_Source_Type;
51675
51696
  (function (Event_Source_Type) {
@@ -52785,12 +52806,12 @@
52785
52806
  },
52786
52807
  textStyle: {
52787
52808
  fontSize: THEME_CONSTANTS.TITLE_FONT_SIZE,
52788
- fontColor: { type: 'palette', key: 'titleFontColor' }
52809
+ fill: { type: 'palette', key: 'titleFontColor' }
52789
52810
  },
52790
52811
  subtextStyle: {
52791
52812
  fontSize: THEME_CONSTANTS.LABEL_FONT_SIZE,
52792
52813
  lineHeight: THEME_CONSTANTS.TITLE_FONT_SIZE,
52793
- fontColor: { type: 'palette', key: 'labelFontColor' }
52814
+ fill: { type: 'palette', key: 'labelFontColor' }
52794
52815
  }
52795
52816
  };
52796
52817
 
@@ -52913,7 +52934,8 @@
52913
52934
  mark: markByType,
52914
52935
  markByName,
52915
52936
  series,
52916
- component
52937
+ component,
52938
+ animationThreshold: 2000
52917
52939
  };
52918
52940
 
52919
52941
  const buildinThemeMap = new Map([
@@ -53306,14 +53328,43 @@
53306
53328
  });
53307
53329
  }
53308
53330
  else {
53309
- data.push({
53310
- series,
53311
- datum: viewData.filter((datum) => datum[dimensionField[0]]?.toString() === value?.toString() ||
53312
- (isValid(datum[dimensionField[0]]) &&
53313
- isValid(datum[dimensionField[1]]) &&
53314
- value >= datum[dimensionField[0]] &&
53315
- value < datum[dimensionField[1]]))
53316
- });
53331
+ if (isValid(dimensionField[1])) {
53332
+ data.push({
53333
+ series,
53334
+ datum: viewData.filter((datum) => {
53335
+ if (datum[dimensionField[0]]?.toString() === value?.toString()) {
53336
+ return true;
53337
+ }
53338
+ return (isValid(datum[dimensionField[0]]) &&
53339
+ isValid(datum[dimensionField[1]]) &&
53340
+ value >= datum[dimensionField[0]] &&
53341
+ value < datum[dimensionField[1]]);
53342
+ })
53343
+ });
53344
+ }
53345
+ else {
53346
+ let minDelta = Infinity;
53347
+ let minDatums = [];
53348
+ let deltaSign = 0;
53349
+ viewData.forEach((datum) => {
53350
+ if (isValid(datum[dimensionField[0]])) {
53351
+ const delta = Math.abs(datum[dimensionField[0]] - value);
53352
+ const sign = Math.sign(datum[dimensionField[0]] - value);
53353
+ if (delta < minDelta) {
53354
+ minDelta = delta;
53355
+ minDatums = [datum];
53356
+ deltaSign = sign;
53357
+ }
53358
+ else if (delta === minDelta && sign === deltaSign) {
53359
+ minDatums.push(datum);
53360
+ }
53361
+ }
53362
+ });
53363
+ data.push({
53364
+ series,
53365
+ datum: minDatums
53366
+ });
53367
+ }
53317
53368
  }
53318
53369
  }
53319
53370
  }
@@ -58239,7 +58290,7 @@
58239
58290
  VChart.useMark([ComponentMark, GroupMark, ImageMark]);
58240
58291
  Factory.registerRegion('region', Region);
58241
58292
  Factory.registerLayout('base', Layout);
58242
- const version = "1.2.0-beta.4";
58293
+ const version = "1.2.0-beta.6";
58243
58294
  Logger.getInstance(LoggerLevel.Error);
58244
58295
 
58245
58296
  var SeriesMarkNameEnum;
@@ -58825,12 +58876,12 @@
58825
58876
  init(options = {}) {
58826
58877
  this.initRegion();
58827
58878
  this.initSeries();
58828
- this.updateGlobalScaleDomain();
58829
58879
  this.initComponent();
58830
58880
  this.initEvent();
58831
58881
  this._stack.init();
58832
58882
  this._series.forEach(s => s.getRawData()?.markRunning());
58833
58883
  this._series.forEach(s => s.fillData());
58884
+ this.updateGlobalScaleDomain();
58834
58885
  }
58835
58886
  onResize(width, height) {
58836
58887
  const canvasRect = {
@@ -59431,6 +59482,7 @@
59431
59482
  label: spec.label,
59432
59483
  seriesStyle: spec.seriesStyle,
59433
59484
  animation: spec.animation,
59485
+ animationThreshold: spec.animationThreshold ?? this._theme.animationThreshold,
59434
59486
  animationAppear: spec.animationAppear,
59435
59487
  animationDisappear: spec.animationDisappear,
59436
59488
  animationEnter: spec.animationEnter,
@@ -61208,6 +61260,7 @@
61208
61260
  }
61209
61261
  initData() {
61210
61262
  this._rawData = this._spec.data;
61263
+ this._rawData?.target.addListener('change', this.rawDataUpdate.bind(this));
61211
61264
  this._addDataIndexAndKey();
61212
61265
  if (this._rawData) {
61213
61266
  this._viewDataFilter = dataViewFromDataView(this._rawData, this._dataSet, {
@@ -61253,7 +61306,6 @@
61253
61306
  const rawDataName = `${PREFIX}_series_${this.id}_rawDataStatic`;
61254
61307
  this._rawDataStatistics = this.createStatisticalData(rawDataName, this._rawData, this._option.globalScale.getStatisticalFields);
61255
61308
  this._rawData.target.removeListener('change', this._rawDataStatistics.reRunAllTransform);
61256
- this._rawDataStatistics.reRunAllTransform();
61257
61309
  }
61258
61310
  _statisticViewData() {
61259
61311
  const viewDataName = `${PREFIX}_series_${this.id}_viewDataStatic`;
@@ -61304,8 +61356,17 @@
61304
61356
  }
61305
61357
  }, false);
61306
61358
  }
61359
+ _noAnimationDataKey(datum, index, context) {
61360
+ return index;
61361
+ }
61307
61362
  generateDefaultDataKey(dataKey, datum, index, context) {
61308
61363
  if (isNil(dataKey)) {
61364
+ if (this._spec.animation === false) {
61365
+ const v = this._noAnimationDataKey(datum, index, context);
61366
+ if (v !== undefined) {
61367
+ return v;
61368
+ }
61369
+ }
61309
61370
  const { keyMap } = context;
61310
61371
  const seriesDataKey = this._getSeriesDataKey(datum);
61311
61372
  if (keyMap.get(seriesDataKey) === undefined) {
@@ -61346,8 +61407,8 @@
61346
61407
  this._rawData.updateRawData(d);
61347
61408
  }
61348
61409
  rawDataUpdate(d) {
61349
- this.event.emit(ChartEvent.rawDataUpdate, { model: this });
61350
61410
  this._rawDataStatistics?.reRunAllTransform();
61411
+ this.event.emit(ChartEvent.rawDataUpdate, { model: this });
61351
61412
  }
61352
61413
  rawDataStatisticsUpdate(d) {
61353
61414
  this.event.emit(ChartEvent.rawDataStatisticsUpdate, { model: this });
@@ -61488,13 +61549,25 @@
61488
61549
  }
61489
61550
  afterInitMark() {
61490
61551
  this.event.emit(ChartEvent.afterInitMark, { model: this });
61491
- this._rawDataStatistics?.reRunAllTransform();
61492
61552
  this.setSeriesField(this._spec.seriesField);
61553
+ let animationThreshold = this._spec.animationThreshold ?? Number.MAX_SAFE_INTEGER;
61493
61554
  this.getMarks().forEach(m => {
61494
61555
  if (m.stateStyle?.normal?.lineWidth) {
61495
61556
  m.setAttribute('stroke', this.getColorAttribute(), 'normal', AttributeLevel.Base_Series);
61496
61557
  }
61558
+ const config = m.getProgressiveConfig();
61559
+ if (config) {
61560
+ if (config.large && config.largeThreshold) {
61561
+ animationThreshold = Math.min(animationThreshold, config.largeThreshold);
61562
+ }
61563
+ if (config.progressiveThreshold) {
61564
+ animationThreshold = Math.min(animationThreshold, config.progressiveThreshold);
61565
+ }
61566
+ }
61497
61567
  });
61568
+ if (this._rawData?.latestData?.length >= animationThreshold) {
61569
+ this._spec.animation = false;
61570
+ }
61498
61571
  }
61499
61572
  getMarksWithoutRoot() {
61500
61573
  return this.getMarks().filter(m => !m.name.includes('seriesGroup'));
@@ -61510,7 +61583,6 @@
61510
61583
  }
61511
61584
  initEvent() {
61512
61585
  this._trigger.init();
61513
- this._rawData?.target.addListener('change', this.rawDataUpdate.bind(this));
61514
61586
  this._data?.getDataView()?.target.addListener('change', this.viewDataUpdate.bind(this));
61515
61587
  this._viewDataStatistics?.target.addListener('change', this.viewDataStatisticsUpdate.bind(this));
61516
61588
  this._rawDataStatistics?.target.addListener('change', this.rawDataStatisticsUpdate.bind(this));
@@ -61595,8 +61667,7 @@
61595
61667
  });
61596
61668
  }
61597
61669
  getSeriesInfoInField(field) {
61598
- const keys = this._rawDataStatistics.latestData[field]?.values;
61599
- return this._getSeriesInfo(field, keys);
61670
+ return this._getSeriesInfo(field, this._rawDataStatistics.latestData[field]?.values ?? []);
61600
61671
  }
61601
61672
  getSeriesInfoList() {
61602
61673
  return this._getSeriesInfo(this._seriesField ?? DEFAULT_DATA_SERIES_FIELD, this.getSeriesKeys());
@@ -63184,7 +63255,7 @@
63184
63255
  }
63185
63256
 
63186
63257
  VChart.useMark([RectMark, TextMark]);
63187
- const DefaultBandWidth$3 = 6;
63258
+ const DefaultBandWidth$2 = 6;
63188
63259
  class BarSeries extends CartesianSeries {
63189
63260
  static type = SeriesTypeEnum.bar;
63190
63261
  type = SeriesTypeEnum.bar;
@@ -63255,31 +63326,17 @@
63255
63326
  this.setMarkStyle(this._rectMark, {
63256
63327
  x: (datum) => valueInScaleRange(this.dataToPositionX(datum), xScale),
63257
63328
  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)
63329
+ y: (datum) => this._getPosition(this.direction, datum),
63330
+ height: () => this._getBarWidth(this._yAxisHelper)
63267
63331
  }, 'normal', AttributeLevel.Series);
63268
63332
  }
63269
63333
  else {
63270
63334
  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
- },
63335
+ x: (datum) => this._getPosition(this.direction, datum),
63279
63336
  y: (datum) => valueInScaleRange(this.dataToPositionY(datum), yScale),
63280
63337
  y1: (datum) => valueInScaleRange(this.dataToPositionY1(datum), yScale),
63281
63338
  width: () => {
63282
- return this.getBarWidth(this._xAxisHelper);
63339
+ return this._getBarWidth(this._xAxisHelper);
63283
63340
  }
63284
63341
  }, 'normal', AttributeLevel.Series);
63285
63342
  }
@@ -63311,9 +63368,9 @@
63311
63368
  };
63312
63369
  this._rectMark.setAnimationConfig(animationConfig(DEFAULT_MARK_ANIMATION.bar(animationParams, appearPreset), userAnimationConfig(this._barMarkName, this._spec), { dataIndex }));
63313
63370
  }
63314
- getBarWidth(axisHelper) {
63371
+ _getBarWidth(axisHelper) {
63315
63372
  const hasBarWidth = this._spec.barWidth !== undefined;
63316
- const bandWidth = axisHelper.getBandwidth?.(this._groups ? this._groups.fields.length - 1 : 0) ?? DefaultBandWidth$3;
63373
+ const bandWidth = axisHelper.getBandwidth?.(this._groups ? this._groups.fields.length - 1 : 0) ?? DefaultBandWidth$2;
63317
63374
  if (hasBarWidth) {
63318
63375
  return getActualNumValue(this._spec.barWidth, bandWidth);
63319
63376
  }
@@ -63328,6 +63385,50 @@
63328
63385
  }
63329
63386
  return width;
63330
63387
  }
63388
+ _getPosition(direction, datum) {
63389
+ let axisHelper;
63390
+ let sizeAttribute;
63391
+ let dataToPosition;
63392
+ if (direction === Direction$2.horizontal) {
63393
+ axisHelper = this.getYAxisHelper();
63394
+ sizeAttribute = 'height';
63395
+ dataToPosition = this.dataToPositionY.bind(this);
63396
+ }
63397
+ else {
63398
+ axisHelper = this.getXAxisHelper();
63399
+ sizeAttribute = 'width';
63400
+ dataToPosition = this.dataToPositionX.bind(this);
63401
+ }
63402
+ const scale = axisHelper.getScale(0);
63403
+ const size = this._rectMark.getAttribute(sizeAttribute, datum);
63404
+ const bandWidth = axisHelper.getBandwidth?.(this._groups ? this._groups.fields.length - 1 : 0) ?? DefaultBandWidth$2;
63405
+ if (this._groups?.fields?.length > 1 && isValid(this._spec.barGapInGroup)) {
63406
+ const groupFields = this._groups.fields;
63407
+ const barInGroup = array(this._spec.barGapInGroup);
63408
+ let totalWidth = 0;
63409
+ let offSet = 0;
63410
+ for (let index = groupFields.length - 1; index >= 1; index--) {
63411
+ const groupField = groupFields[index];
63412
+ const groupValues = this.getViewDataStatistics()?.latestData?.[groupField]?.values ?? [];
63413
+ const groupCount = groupValues.length;
63414
+ const gap = getActualNumValue(barInGroup[index - 1] ?? last(barInGroup), bandWidth);
63415
+ const i = groupValues.indexOf(datum[groupField]);
63416
+ if (index === groupFields.length - 1) {
63417
+ totalWidth += groupCount * size + (groupCount - 1) * gap;
63418
+ offSet += i * (size + gap);
63419
+ }
63420
+ else {
63421
+ offSet += i * (totalWidth + gap);
63422
+ totalWidth += totalWidth + (groupCount - 1) * gap;
63423
+ }
63424
+ }
63425
+ const center = scale.scale(datum[groupFields[0]]) + axisHelper.getBandwidth(0) / 2;
63426
+ return center - totalWidth / 2 + offSet;
63427
+ }
63428
+ const continuous = isContinuous(scale.type || 'band');
63429
+ const pos = dataToPosition(datum);
63430
+ return pos + (bandWidth - size) * 0.5 + (continuous ? -bandWidth / 2 : 0);
63431
+ }
63331
63432
  updateSpec(spec) {
63332
63433
  const { direction } = this._spec;
63333
63434
  const result = super.updateSpec(spec);
@@ -64580,7 +64681,6 @@
64580
64681
  }
64581
64682
  }
64582
64683
 
64583
- const DefaultBandWidth$2 = 6;
64584
64684
  class RangeColumnSeries extends BarSeries {
64585
64685
  static type = SeriesTypeEnum.rangeColumn;
64586
64686
  type = SeriesTypeEnum.rangeColumn;
@@ -64617,14 +64717,7 @@
64617
64717
  }
64618
64718
  }
64619
64719
  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
- }
64720
+ super.initMarkStyle();
64628
64721
  const minLabelMark = this._minLabelMark;
64629
64722
  const minLabelSpec = this._spec.label?.minLabel;
64630
64723
  if (minLabelMark) {
@@ -64716,27 +64809,13 @@
64716
64809
  x1: (datum) => valueInScaleRange(dataToPosition(this.getDatumPositionValues(datum, this._spec.xField[1]), {
64717
64810
  bandPosition: this._bandPosition
64718
64811
  }), 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)
64812
+ y: (datum) => this._getPosition(this.direction, datum),
64813
+ height: () => this._getBarWidth(this._yAxisHelper)
64728
64814
  }, 'normal', AttributeLevel.Series);
64729
64815
  }
64730
64816
  else {
64731
64817
  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
- },
64818
+ x: (datum) => this._getPosition(this.direction, datum),
64740
64819
  y: (datum) => valueInScaleRange(dataToPosition(this.getDatumPositionValues(datum, this._spec.yField[0]), {
64741
64820
  bandPosition: this._bandPosition
64742
64821
  }), yScale),
@@ -64744,7 +64823,7 @@
64744
64823
  bandPosition: this._bandPosition
64745
64824
  }), yScale),
64746
64825
  width: () => {
64747
- return this.getBarWidth(this._xAxisHelper);
64826
+ return this._getBarWidth(this._xAxisHelper);
64748
64827
  }
64749
64828
  }, 'normal', AttributeLevel.Series);
64750
64829
  }
@@ -65151,7 +65230,13 @@
65151
65230
  return map;
65152
65231
  }, new Map());
65153
65232
  let set;
65154
- if (values) {
65233
+ if (isFunction(opt.set)) {
65234
+ set = function (d) {
65235
+ const v = index.get(d[key]);
65236
+ opt.set(d, v);
65237
+ };
65238
+ }
65239
+ else if (values) {
65155
65240
  const m = values.length;
65156
65241
  set = function (d) {
65157
65242
  const v = index.get(d[key]);
@@ -65319,8 +65404,8 @@
65319
65404
  }
65320
65405
  getSeriesKeys() {
65321
65406
  if (this._seriesField) {
65322
- return (this._mapViewDataStatistics?.latestData[this._seriesField]?.values ??
65323
- this._rawDataStatistics?.latestData[this._seriesField].values ??
65407
+ return (this._rawDataStatistics?.latestData?.[this._seriesField]?.values ??
65408
+ this._mapViewDataStatistics?.latestData[this._seriesField]?.values ??
65324
65409
  []);
65325
65410
  }
65326
65411
  if (this.name) {
@@ -65338,15 +65423,16 @@
65338
65423
  }
65339
65424
  }
65340
65425
 
65426
+ const DEFAULT_MAP_LOOK_UP_KEY = `${PREFIX}_MAP_LOOK_UP_KEY`;
65341
65427
  const map = (data, opt) => {
65342
65428
  if (data.features) {
65343
65429
  data.features.forEach((f, index) => {
65344
65430
  f[DEFAULT_DATA_INDEX] = index;
65345
65431
  if (opt.nameMap) {
65346
- f.name = opt.nameMap[f.properties?.[opt.nameProperty]];
65432
+ f[DEFAULT_MAP_LOOK_UP_KEY] = opt.nameMap[f.properties?.[opt.nameProperty]];
65347
65433
  }
65348
65434
  else {
65349
- f.name = f.properties?.[opt.nameProperty];
65435
+ f[DEFAULT_MAP_LOOK_UP_KEY] = f.properties?.[opt.nameProperty];
65350
65436
  }
65351
65437
  });
65352
65438
  }
@@ -65434,10 +65520,17 @@
65434
65520
  type: 'lookup',
65435
65521
  options: {
65436
65522
  from: () => this._data?.getLatestData(),
65437
- key: 'name',
65523
+ key: DEFAULT_MAP_LOOK_UP_KEY,
65438
65524
  fields: this._nameField,
65439
- values: [this.nameField, this.valueField, this._seriesField ?? DEFAULT_DATA_SERIES_FIELD, DEFAULT_DATA_KEY],
65440
- as: [this.nameField, this.valueField, this._seriesField ?? DEFAULT_DATA_SERIES_FIELD, DEFAULT_DATA_KEY]
65525
+ set: (feature, datum) => {
65526
+ if (datum) {
65527
+ Object.keys(datum).forEach(key => {
65528
+ if (!(key in feature)) {
65529
+ feature[key] = datum[key];
65530
+ }
65531
+ });
65532
+ }
65533
+ }
65441
65534
  }
65442
65535
  });
65443
65536
  this._data?.getDataView().target.addListener('change', mapData.reRunAllTransform);
@@ -66795,12 +66888,6 @@
66795
66888
  padAngle: this._padAngle,
66796
66889
  centerOffset: this._centerOffset
66797
66890
  }, '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
66891
  this._trigger.registerMark(pieMark);
66805
66892
  this._tooltipHelper?.activeTriggerSet.mark.add(pieMark);
66806
66893
  }
@@ -66835,6 +66922,17 @@
66835
66922
  this._trigger.registerMark(labelLineMark);
66836
66923
  }
66837
66924
  }
66925
+ initMarkStyleWithSpec(mark, spec, key) {
66926
+ super.initMarkStyleWithSpec(mark, spec, key);
66927
+ if (mark.name === this._pieMarkName) {
66928
+ const pieSpec = this.getSpec()[mark.name];
66929
+ if (pieSpec) {
66930
+ for (const state in pieSpec.state || {}) {
66931
+ this.setMarkStyle(mark, this.generateRadiusStyle(pieSpec.state[state]), state, AttributeLevel.User_Mark);
66932
+ }
66933
+ }
66934
+ }
66935
+ }
66838
66936
  afterInitMark() {
66839
66937
  super.afterInitMark();
66840
66938
  this._trigger.setStateKeys([this._seriesField, ...this._radiusField]);
@@ -67033,6 +67131,9 @@
67033
67131
  }
67034
67132
  setValueFieldToPercent() {
67035
67133
  }
67134
+ _noAnimationDataKey(datum, index) {
67135
+ return index;
67136
+ }
67036
67137
  }
67037
67138
  class PieSeries extends BasePieSeries {
67038
67139
  static type = SeriesTypeEnum.pie;
@@ -67562,13 +67663,13 @@
67562
67663
  if (!datum || !this.angleAxisHelper || !this.radiusAxisHelper) {
67563
67664
  return Number.NaN;
67564
67665
  }
67565
- return this.valueToPosition(this.getDatumPositionValues(datum, this._angleField), this._stack ? this.getDatumPositionValues(datum, this._innerRadiusField) : 0).x;
67666
+ return this.valueToPosition(this.getDatumPositionValues(datum, this._angleField), this._stack ? this.getDatumPositionValues(datum, this._innerRadiusField) : this.radiusScale.domain()[0]).x;
67566
67667
  },
67567
67668
  y1: (datum) => {
67568
67669
  if (!datum || !this.angleAxisHelper || !this.radiusAxisHelper) {
67569
67670
  return Number.NaN;
67570
67671
  }
67571
- const value = this.valueToPosition(this.getDatumPositionValues(datum, this._angleField), this._stack ? this.getDatumPositionValues(datum, this._innerRadiusField) : 0).y;
67672
+ const value = this.valueToPosition(this.getDatumPositionValues(datum, this._angleField), this._stack ? this.getDatumPositionValues(datum, this._innerRadiusField) : this.radiusScale.domain()[0]).y;
67572
67673
  return value;
67573
67674
  },
67574
67675
  fill: this.getColorAttribute(),
@@ -69624,8 +69725,9 @@
69624
69725
  let fontSize = options.fontSize ? field$1(options.fontSize) : 14;
69625
69726
  const fontSizeRange = options.fontSizeRange;
69626
69727
  if (fontSizeRange && !isNumber(fontSize)) {
69627
- const fsize = fontSize;
69628
- fontSize = datum => sqrtScale(fsize(datum), extent$1(fsize, data), fontSizeRange);
69728
+ const fsize = fontSize,
69729
+ fontSizeSqrtScale = generateSqrtScale(extent$1(fsize, data), fontSizeRange);
69730
+ fontSize = datum => fontSizeSqrtScale(fsize(datum));
69629
69731
  }
69630
69732
  let Layout = CloudLayout;
69631
69733
  "fast" === options.layoutType ? Layout = FastLayout : "grid" === options.layoutType && (Layout = GridLayout$1);
@@ -69661,7 +69763,15 @@
69661
69763
  } : layout.output();
69662
69764
  };
69663
69765
  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],
69766
+ sqrt = x => x < 0 ? -Math.sqrt(-x) : Math.sqrt(x),
69767
+ generateSqrtScale = (domain, range) => {
69768
+ if (domain[0] === domain[1]) return datum => range[0];
69769
+ const s0 = sqrt(domain[0]),
69770
+ s1 = sqrt(domain[1]),
69771
+ min = Math.min(s0, s1),
69772
+ max = Math.max(s0, s1);
69773
+ return datum => (sqrt(datum) - min) / (max - min) * (range[1] - range[0]) + range[0];
69774
+ },
69665
69775
  extent$1 = (field, data) => {
69666
69776
  let min = 1 / 0,
69667
69777
  max = -1 / 0;
@@ -73349,6 +73459,9 @@
73349
73459
  setValueFieldToPercent() {
73350
73460
  return;
73351
73461
  }
73462
+ _noAnimationDataKey(datum, index) {
73463
+ return undefined;
73464
+ }
73352
73465
  }
73353
73466
  mixin(SunburstSeries, Drillable);
73354
73467
 
@@ -73575,6 +73688,9 @@
73575
73688
  super.onLayoutEnd(ctx);
73576
73689
  this._rawData.reRunAllTransform();
73577
73690
  }
73691
+ _noAnimationDataKey(datum, index) {
73692
+ return undefined;
73693
+ }
73578
73694
  }
73579
73695
  mixin(CirclePackingSeries, Drillable);
73580
73696
 
@@ -75011,6 +75127,9 @@
75011
75127
  getDefaultShapeType() {
75012
75128
  return 'square';
75013
75129
  }
75130
+ _noAnimationDataKey(datum, index) {
75131
+ return undefined;
75132
+ }
75014
75133
  }
75015
75134
 
75016
75135
  const treemap = (data, op) => {
@@ -76103,7 +76222,8 @@
76103
76222
  ...super._getDefaultSeriesSpec(spec),
76104
76223
  barWidth: spec.barWidth,
76105
76224
  barMaxWidth: spec.barMaxWidth,
76106
- barMinWidth: spec.barMinWidth
76225
+ barMinWidth: spec.barMinWidth,
76226
+ barGapInGroup: spec.barGapInGroup
76107
76227
  };
76108
76228
  }
76109
76229
  transformSpec(spec) {
@@ -76118,6 +76238,15 @@
76118
76238
  static view = 'singleDefault';
76119
76239
  type = ChartTypeEnum.bar3d;
76120
76240
  seriesType = SeriesTypeEnum.bar3d;
76241
+ _getDefaultSeriesSpec(spec) {
76242
+ return {
76243
+ ...super._getDefaultSeriesSpec(spec),
76244
+ barWidth: spec.barWidth,
76245
+ barMaxWidth: spec.barMaxWidth,
76246
+ barMinWidth: spec.barMinWidth,
76247
+ barGapInGroup: spec.barGapInGroup
76248
+ };
76249
+ }
76121
76250
  }
76122
76251
 
76123
76252
  VChart.useSeries([BoxPlotSeries]);
@@ -76981,7 +77110,8 @@
76981
77110
  seriesType = SeriesTypeEnum.rangeColumn;
76982
77111
  _getDefaultSeriesSpec(spec) {
76983
77112
  const series = {
76984
- ...super._getDefaultSeriesSpec(spec)
77113
+ ...super._getDefaultSeriesSpec(spec),
77114
+ barGapInGroup: spec.barGapInGroup
76985
77115
  };
76986
77116
  series.bar = spec.bar;
76987
77117
  if (spec.direction === Direction$2.horizontal) {
@@ -77006,7 +77136,8 @@
77006
77136
  seriesType = SeriesTypeEnum.rangeColumn3d;
77007
77137
  _getDefaultSeriesSpec(spec) {
77008
77138
  const series = {
77009
- ...super._getDefaultSeriesSpec(spec)
77139
+ ...super._getDefaultSeriesSpec(spec),
77140
+ barGapInGroup: spec.barGapInGroup
77010
77141
  };
77011
77142
  series.bar3d = spec.bar3d;
77012
77143
  if (spec.direction === Direction$2.horizontal) {
@@ -79635,42 +79766,83 @@
79635
79766
  function labelFlush(axisLabels, axis) {
79636
79767
  const { width, height } = axis.getLayoutRect();
79637
79768
  const isX = isXAxis(axis.layoutOrient);
79769
+ const isInverse = axis.getSpec().inverse === true;
79638
79770
  const first = axisLabels[0];
79639
79771
  const last$1 = last(axisLabels);
79640
79772
  if (isX) {
79641
- const start = 0;
79642
- const end = width;
79643
- const startBound = first.AABBBounds.x1;
79644
- const endBound = last$1.AABBBounds.x2;
79645
- if (startBound < start) {
79646
- first.setAttributes({
79647
- x: start,
79648
- textAlign: 'left'
79649
- });
79773
+ if (isInverse) {
79774
+ const start = width;
79775
+ const end = 0;
79776
+ const startBound = first.AABBBounds.x2;
79777
+ const endBound = last$1.AABBBounds.x1;
79778
+ if (startBound > start) {
79779
+ first.setAttributes({
79780
+ x: start,
79781
+ textAlign: 'right'
79782
+ });
79783
+ }
79784
+ if (endBound < end) {
79785
+ last$1.setAttributes({
79786
+ x: end,
79787
+ textAlign: 'left'
79788
+ });
79789
+ }
79650
79790
  }
79651
- if (endBound > end) {
79652
- last$1.setAttributes({
79653
- x: end,
79654
- textAlign: 'right'
79655
- });
79791
+ else {
79792
+ const start = 0;
79793
+ const end = width;
79794
+ const startBound = first.AABBBounds.x1;
79795
+ const endBound = last$1.AABBBounds.x2;
79796
+ if (startBound < start) {
79797
+ first.setAttributes({
79798
+ x: start,
79799
+ textAlign: 'left'
79800
+ });
79801
+ }
79802
+ if (endBound > end) {
79803
+ last$1.setAttributes({
79804
+ x: end,
79805
+ textAlign: 'right'
79806
+ });
79807
+ }
79656
79808
  }
79657
79809
  }
79658
79810
  else {
79659
- const start = height;
79660
- const end = 0;
79661
- const startBound = first.AABBBounds.y2;
79662
- const endBound = last$1.AABBBounds.y1;
79663
- if (startBound > start) {
79664
- first.setAttributes({
79665
- y: start,
79666
- textBaseline: 'bottom'
79667
- });
79811
+ if (isInverse) {
79812
+ const startBound = first.AABBBounds.y1;
79813
+ const endBound = last$1.AABBBounds.y2;
79814
+ const start = 0;
79815
+ const end = height;
79816
+ if (startBound < start) {
79817
+ first.setAttributes({
79818
+ y: start,
79819
+ textBaseline: 'top'
79820
+ });
79821
+ }
79822
+ if (endBound > end) {
79823
+ last$1.setAttributes({
79824
+ y: end,
79825
+ textBaseline: 'bottom'
79826
+ });
79827
+ }
79668
79828
  }
79669
- if (endBound < end) {
79670
- last$1.setAttributes({
79671
- y: end,
79672
- textBaseline: 'top'
79673
- });
79829
+ else {
79830
+ const start = height;
79831
+ const end = 0;
79832
+ const startBound = first.AABBBounds.y2;
79833
+ const endBound = last$1.AABBBounds.y1;
79834
+ if (startBound > start) {
79835
+ first.setAttributes({
79836
+ y: start,
79837
+ textBaseline: 'bottom'
79838
+ });
79839
+ }
79840
+ if (endBound < end) {
79841
+ last$1.setAttributes({
79842
+ y: end,
79843
+ textBaseline: 'top'
79844
+ });
79845
+ }
79674
79846
  }
79675
79847
  }
79676
79848
  }
@@ -80164,6 +80336,11 @@
80164
80336
  if (!isContinuous(scale.type)) {
80165
80337
  return convertDomainToTickData(scale.domain());
80166
80338
  }
80339
+ const range = scale.range();
80340
+ const rangeSize = Math.abs(range[range.length - 1] - range[0]);
80341
+ if (rangeSize < 2) {
80342
+ return convertDomainToTickData([scale.domain()[0]]);
80343
+ }
80167
80344
  const { tickCount, forceTickCount, tickStep } = op;
80168
80345
  let scaleTicks;
80169
80346
  if (isValid(tickStep)) {
@@ -80216,8 +80393,20 @@
80216
80393
  };
80217
80394
 
80218
80395
  const linearDiscreteTicks = (scale, op) => {
80396
+ const domain = scale.domain();
80397
+ if (!domain.length) {
80398
+ return [];
80399
+ }
80219
80400
  const { tickCount, forceTickCount, tickStep, labelGap = 4, axisOrientType } = op;
80220
80401
  const isHorizontal = ['bottom', 'top'].includes(axisOrientType);
80402
+ const range = scale.range();
80403
+ const rangeSize = Math.abs(range[range.length - 1] - range[0]);
80404
+ if (rangeSize < 2) {
80405
+ if (op.labelLastVisible) {
80406
+ return convertDomainToTickData([domain[domain.length - 1]]);
80407
+ }
80408
+ return convertDomainToTickData([domain[0]]);
80409
+ }
80221
80410
  let scaleTicks;
80222
80411
  if (isValid(tickStep)) {
80223
80412
  scaleTicks = scale.stepTicks(tickStep);
@@ -80229,9 +80418,47 @@
80229
80418
  scaleTicks = scale.ticks(tickCount);
80230
80419
  }
80231
80420
  else if (op.sampling) {
80232
- const domain = scale.domain();
80233
- const range = scale.range();
80234
- const labelBoundsList = getCartesianLabelBounds(scale, domain, op);
80421
+ let labelBoundsList;
80422
+ const fontSize = (op.labelStyle.fontSize ?? 12) + 2;
80423
+ if (domain.length <= rangeSize / fontSize) {
80424
+ labelBoundsList = getCartesianLabelBounds(scale, domain, op);
80425
+ }
80426
+ else {
80427
+ const tempDomain = [domain[0], domain[Math.floor(domain.length / 2)], domain[domain.length - 1]];
80428
+ const tempList = getCartesianLabelBounds(scale, tempDomain, op);
80429
+ let maxBounds = null;
80430
+ let maxBoundsIndex = 0;
80431
+ tempList.forEach((current, index) => {
80432
+ if (!maxBounds) {
80433
+ maxBounds = current;
80434
+ maxBoundsIndex = index;
80435
+ return;
80436
+ }
80437
+ if (isHorizontal) {
80438
+ if (maxBounds.width() < current.width()) {
80439
+ maxBounds = current;
80440
+ maxBoundsIndex = index;
80441
+ }
80442
+ }
80443
+ else if (maxBounds.height() < current.height()) {
80444
+ maxBounds = current;
80445
+ maxBoundsIndex = index;
80446
+ }
80447
+ });
80448
+ const maxBoundsDomainIndex = maxBoundsIndex === 0 ? 0 : maxBoundsIndex === 2 ? domain.length - 1 : Math.floor(domain.length / 2);
80449
+ const maxBoundsPos = scale.scale(domain[maxBoundsDomainIndex]);
80450
+ labelBoundsList = new Array(domain.length);
80451
+ for (let i = 0; i < labelBoundsList.length; i++) {
80452
+ labelBoundsList[i] = maxBounds.clone();
80453
+ const currentPos = scale.scale(domain[i]);
80454
+ if (isHorizontal) {
80455
+ labelBoundsList[i].translate(currentPos - maxBoundsPos, 0);
80456
+ }
80457
+ else {
80458
+ labelBoundsList[i].translate(0, currentPos - maxBoundsPos);
80459
+ }
80460
+ }
80461
+ }
80235
80462
  const domainLengthList = labelBoundsList.map(b => {
80236
80463
  return isHorizontal ? b.width() : b.height();
80237
80464
  });
@@ -80964,7 +81191,8 @@
80964
81191
  getScale,
80965
81192
  getStatisticsDomain: () => this.getStatisticsDomain(),
80966
81193
  getAxisType: () => this.type,
80967
- getAxisId: () => this.id
81194
+ getAxisId: () => this.id,
81195
+ isInverse: () => this._spec.inverse === true
80968
81196
  };
80969
81197
  }
80970
81198
  afterCompile() {
@@ -81169,7 +81397,7 @@
81169
81397
  }
81170
81398
  _getTitleLimit(isX) {
81171
81399
  if (this._spec.title.visible && isNil(this._spec.title.style?.maxLineWidth)) {
81172
- const angle = this._spec.title.style?.angle || 0;
81400
+ const angle = this._axisStyle.title?.angle ?? this._spec.title.style?.angle ?? 0;
81173
81401
  if (isX) {
81174
81402
  const width = this.getLayoutRect().width;
81175
81403
  const cosValue = Math.abs(Math.cos(angle));
@@ -81673,7 +81901,8 @@
81673
81901
  getBandwidth,
81674
81902
  getStatisticsDomain: () => this.getStatisticsDomain(),
81675
81903
  getAxisType: () => this.type,
81676
- getAxisId: () => this.id
81904
+ getAxisId: () => this.id,
81905
+ isInverse: () => this._spec.inverse
81677
81906
  };
81678
81907
  }
81679
81908
  dataToPosition(values, cfg = {}) {
@@ -83539,7 +83768,8 @@
83539
83768
  return this.dataToLongitude(values[0]);
83540
83769
  },
83541
83770
  getAxisType: () => this.type,
83542
- getAxisId: () => this.id
83771
+ getAxisId: () => this.id,
83772
+ isInverse: () => false
83543
83773
  });
83544
83774
  s.setYAxisHelper({
83545
83775
  ...helper,
@@ -83547,7 +83777,8 @@
83547
83777
  return this.dataToLatitude(values[0]);
83548
83778
  },
83549
83779
  getAxisType: () => this.type,
83550
- getAxisId: () => this.id
83780
+ getAxisId: () => this.id,
83781
+ isInverse: () => false
83551
83782
  });
83552
83783
  this._longitudeField && s.setFieldX(this._longitudeField);
83553
83784
  this._latitudeField && s.setFieldY(this._latitudeField);
@@ -85493,6 +85724,9 @@
85493
85724
  _processSpecX(specX) {
85494
85725
  const relativeSeries = this._relativeSeries;
85495
85726
  let processType;
85727
+ if (isFunction(specX)) {
85728
+ specX = specX(this._relativeSeries.getData().getLatestData(), this._startRelativeSeries.getData().getLatestData(), this._endRelativeSeries.getData().getLatestData());
85729
+ }
85496
85730
  if (this._isSpecAggrOrRege(specX)) {
85497
85731
  processType = specX;
85498
85732
  return {
@@ -85507,6 +85741,9 @@
85507
85741
  _processSpecY(specY) {
85508
85742
  const relativeSeries = this._relativeSeries;
85509
85743
  let processType;
85744
+ if (isFunction(specY)) {
85745
+ specY = specY(this._relativeSeries.getData().getLatestData(), this._startRelativeSeries.getData().getLatestData(), this._endRelativeSeries.getData().getLatestData());
85746
+ }
85510
85747
  if (this._isSpecAggrOrRege(specY)) {
85511
85748
  processType = specY;
85512
85749
  return {
@@ -85690,8 +85927,15 @@
85690
85927
  else if (isPositionLayout) {
85691
85928
  points = spec.positions;
85692
85929
  }
85930
+ const dataPoints = data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
85693
85931
  this._markerComponent?.setAttributes({
85694
- points: points
85932
+ points: points,
85933
+ label: {
85934
+ ...this._markerComponent.attribute?.label,
85935
+ text: this._spec.label.formatMethod
85936
+ ? this._spec.label.formatMethod(dataPoints)
85937
+ : this._markerComponent.attribute?.label?.text
85938
+ }
85695
85939
  });
85696
85940
  }
85697
85941
  _initDataView() {
@@ -85847,8 +86091,15 @@
85847
86091
  else if (isPositionLayout) {
85848
86092
  points = spec.positions;
85849
86093
  }
86094
+ const dataPoints = data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
85850
86095
  this._markerComponent?.setAttributes({
85851
- points: points
86096
+ points: points,
86097
+ label: {
86098
+ ...this._markerComponent.attribute?.label,
86099
+ text: this._spec.label.formatMethod
86100
+ ? this._spec.label.formatMethod(dataPoints)
86101
+ : this._markerComponent.attribute?.label?.text
86102
+ }
85852
86103
  });
85853
86104
  }
85854
86105
  _initDataView() {
@@ -85957,8 +86208,18 @@
85957
86208
  else if (isPositionLayout) {
85958
86209
  point = spec.position;
85959
86210
  }
86211
+ const dataPoints = data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
85960
86212
  this._markerComponent?.setAttributes({
85961
- position: point
86213
+ position: point,
86214
+ itemContent: {
86215
+ ...this._markerComponent.attribute?.itemContent,
86216
+ textStyle: {
86217
+ ...this._markerComponent.attribute?.itemContent?.textStyle,
86218
+ text: this._spec.itemContent.text?.formatMethod
86219
+ ? this._spec.itemContent.text.formatMethod(dataPoints)
86220
+ : this._markerComponent.attribute?.itemContent?.textStyle?.text
86221
+ }
86222
+ }
85962
86223
  });
85963
86224
  }
85964
86225
  _initDataView() {
@@ -86643,9 +86904,8 @@
86643
86904
  this._cacheViewSpec = undefined;
86644
86905
  this._cacheActualTooltip = undefined;
86645
86906
  const spec = this._component.getSpec();
86646
- if (spec.handler?.hideTooltip) {
86647
- spec.handler?.hideTooltip(params);
86648
- return TooltipResult.success;
86907
+ if (spec.handler) {
86908
+ return spec.handler.hideTooltip?.(params) ?? TooltipResult.success;
86649
86909
  }
86650
86910
  this._updateTooltip(false, params);
86651
86911
  return TooltipResult.success;
@@ -86664,8 +86924,8 @@
86664
86924
  if (spec.visible === false) {
86665
86925
  return TooltipResult.failed;
86666
86926
  }
86667
- if (spec.handler?.showTooltip) {
86668
- return spec.handler?.showTooltip(activeType, data, params) ?? TooltipResult.success;
86927
+ if (spec.handler) {
86928
+ return spec.handler.showTooltip?.(activeType, data, params) ?? TooltipResult.success;
86669
86929
  }
86670
86930
  const pattern = spec[activeType];
86671
86931
  if (!pattern) {
@@ -86693,8 +86953,8 @@
86693
86953
  changeTooltipPosition;
86694
86954
  _changeTooltipPosition = (changePositionOnly, actualTooltip, spec, activeType, data, params) => {
86695
86955
  const event = params.event;
86696
- if (spec.handler?.showTooltip) {
86697
- return spec.handler.showTooltip(activeType, data, params) ?? TooltipResult.success;
86956
+ if (spec.handler) {
86957
+ return spec.handler.showTooltip?.(activeType, data, params) ?? TooltipResult.success;
86698
86958
  }
86699
86959
  const pattern = spec[activeType];
86700
86960
  if (!pattern) {
@@ -86725,8 +86985,8 @@
86725
86985
  this._cacheViewSpec = undefined;
86726
86986
  this._cacheActualTooltip = undefined;
86727
86987
  const spec = this._component.getSpec();
86728
- if (spec.handler?.release) {
86729
- spec.handler?.release();
86988
+ if (spec.handler) {
86989
+ spec.handler.release?.();
86730
86990
  return;
86731
86991
  }
86732
86992
  this._removeTooltip();
@@ -86991,7 +87251,7 @@
86991
87251
  const styles = {
86992
87252
  panel: {
86993
87253
  width: getPixelPropertyStr((attributeCache?.panel?.width ?? 0) + lineWidth * 2),
86994
- height: getPixelPropertyStr((attributeCache?.panel?.height ?? 0) + lineWidth * 2),
87254
+ minHeight: getPixelPropertyStr((attributeCache?.panel?.height ?? 0) + lineWidth * 2),
86995
87255
  paddingBottom: getPixelPropertyStr(padding.bottom),
86996
87256
  paddingLeft: getPixelPropertyStr(padding.left),
86997
87257
  paddingRight: getPixelPropertyStr(padding.right),
@@ -87890,33 +88150,24 @@
87890
88150
  }
87891
88151
  return TooltipResult.failed;
87892
88152
  };
87893
- }
87894
-
87895
- class DimensionTooltipProcessor extends BaseTooltipProcessor {
87896
- activeType = 'dimension';
87897
- showTooltip(info, params, changePositionOnly) {
87898
- const newParams = {
87899
- ...params,
87900
- dimensionInfo: this._preprocessDimensionInfo(info),
87901
- changePositionOnly
87902
- };
87903
- return this._showTooltipByHandler(info, newParams);
87904
- }
87905
- shouldHandleTooltip(params, mouseEventData) {
87906
- const { tooltipInfo: info } = mouseEventData;
87907
- if (isNil(info)) {
87908
- return false;
87909
- }
87910
- const helper = params.model?.tooltipHelper;
87911
- const activeType = helper?.activeType ?? this.component.getSpec().activeType;
87912
- if (!activeType.includes('dimension')) {
87913
- return false;
88153
+ _preprocessDimensionInfo(dimensionInfo) {
88154
+ const newDimensionInfo = [];
88155
+ dimensionInfo?.forEach(info => {
88156
+ const di = {
88157
+ ...info,
88158
+ data: info.data.filter(({ series }) => series.getSpec()?.tooltip?.visible !== false)
88159
+ };
88160
+ if (di.data.length > 0) {
88161
+ newDimensionInfo.push(di);
88162
+ }
88163
+ });
88164
+ if (newDimensionInfo.length > 0) {
88165
+ return newDimensionInfo;
87914
88166
  }
87915
- return true;
88167
+ return undefined;
87916
88168
  }
87917
- getMouseEventData(params) {
88169
+ _getDimensionInfo(params) {
87918
88170
  let targetDimensionInfo;
87919
- let ignore;
87920
88171
  const x = params.event.viewX;
87921
88172
  const y = params.event.viewY;
87922
88173
  const chart = this.component.getChart();
@@ -87953,42 +88204,51 @@
87953
88204
  })[0] ?? targetDimensionInfo[0];
87954
88205
  targetDimensionInfo = [dimensionAxisInfo];
87955
88206
  }
87956
- if ([...(this.component.getOption().getAllSeries() ?? [])].some(model => {
87957
- const ignoreTriggers = model.tooltipHelper?.ignoreTriggerSet.dimension;
87958
- return (params.model && ignoreTriggers?.has(params.model)) || (params.mark && ignoreTriggers?.has(params.mark));
87959
- })) {
87960
- ignore = true;
87961
- }
87962
- return {
87963
- tooltipInfo: targetDimensionInfo,
87964
- ignore
88207
+ return targetDimensionInfo;
88208
+ }
88209
+ }
88210
+
88211
+ class DimensionTooltipProcessor extends BaseTooltipProcessor {
88212
+ activeType = 'dimension';
88213
+ showTooltip(info, params, changePositionOnly) {
88214
+ const newParams = {
88215
+ ...params,
88216
+ dimensionInfo: this._preprocessDimensionInfo(info),
88217
+ changePositionOnly
87965
88218
  };
88219
+ return this._showTooltipByHandler(info, newParams);
87966
88220
  }
87967
- _preprocessDimensionInfo(dimensionInfo) {
87968
- const newDimensionInfo = [];
87969
- dimensionInfo?.forEach(info => {
87970
- const di = {
87971
- ...info,
87972
- data: info.data.filter(({ series }) => series.getSpec()?.tooltip?.visible !== false)
87973
- };
87974
- if (di.data.length > 0) {
87975
- newDimensionInfo.push(di);
87976
- }
87977
- });
87978
- if (newDimensionInfo.length > 0) {
87979
- return newDimensionInfo;
88221
+ shouldHandleTooltip(params, mouseEventData) {
88222
+ const { tooltipInfo: info } = mouseEventData;
88223
+ if (isNil(info)) {
88224
+ return false;
87980
88225
  }
87981
- return undefined;
88226
+ const helper = params.model?.tooltipHelper;
88227
+ const activeType = helper?.activeType ?? this.component.getSpec().activeType;
88228
+ if (!activeType.includes('dimension')) {
88229
+ return false;
88230
+ }
88231
+ return true;
88232
+ }
88233
+ getMouseEventData(params) {
88234
+ return {
88235
+ tooltipInfo: this._getDimensionInfo(params),
88236
+ ignore: [...(this.component.getOption().getAllSeries() ?? [])].some(model => {
88237
+ const ignoreTriggers = model.tooltipHelper?.ignoreTriggerSet.dimension;
88238
+ return (params.model && ignoreTriggers?.has(params.model)) || (params.mark && ignoreTriggers?.has(params.mark));
88239
+ })
88240
+ };
87982
88241
  }
87983
88242
  }
87984
88243
 
87985
88244
  class MarkTooltipProcessor extends BaseTooltipProcessor {
87986
88245
  activeType = 'mark';
87987
88246
  showTooltip(info, params, changePositionOnly) {
87988
- const { datum, series } = info;
88247
+ const { datum, series, dimensionInfo } = info;
87989
88248
  const tooltipData = [{ datum: [datum], series }];
87990
88249
  const newParams = {
87991
88250
  ...params,
88251
+ dimensionInfo: this._preprocessDimensionInfo(dimensionInfo),
87992
88252
  changePositionOnly
87993
88253
  };
87994
88254
  return this._showTooltipByHandler(tooltipData, newParams);
@@ -88016,7 +88276,8 @@
88016
88276
  info = {
88017
88277
  mark: params.mark,
88018
88278
  datum: params.datum,
88019
- series
88279
+ series,
88280
+ dimensionInfo: this._getDimensionInfo(params)
88020
88281
  };
88021
88282
  }
88022
88283
  else if (ignoreTriggers?.has(params.model) || ignoreTriggers?.has(params.mark)) {
@@ -88081,6 +88342,9 @@
88081
88342
  this._initEvent();
88082
88343
  }
88083
88344
  release() {
88345
+ this.event.emit(ChartEvent.tooltipRelease, {
88346
+ tooltip: this
88347
+ });
88084
88348
  super.release();
88085
88349
  this._eventList.forEach(({ eventType, handler }) => {
88086
88350
  this.event.off(eventType, handler);
@@ -88134,6 +88398,9 @@
88134
88398
  if (this._alwaysShow) {
88135
88399
  return;
88136
88400
  }
88401
+ if (!this._isTooltipShown && !this.tooltipHandler?.isTooltipShown?.()) {
88402
+ return;
88403
+ }
88137
88404
  const { clientX, clientY } = params.event;
88138
88405
  if (isTrueBrowser(this._option.mode) &&
88139
88406
  (this._isPointerInChart({ x: clientX, y: clientY }) || this._isPointerOnTooltip(params))) {
@@ -88382,16 +88649,19 @@
88382
88649
  const { series, baseMark } = labelInfo;
88383
88650
  const labelSpec = baseMark.getLabelSpec() ?? {};
88384
88651
  const labelPosition = labelSpec.position ?? 'outside';
88652
+ const direction = series.direction ?? 'vertical';
88653
+ const isInverse = series.direction === 'horizontal'
88654
+ ? series.getXAxisHelper()?.isInverse()
88655
+ : series.getYAxisHelper()?.isInverse();
88385
88656
  let position = labelPosition;
88386
88657
  if (position !== 'inside') {
88387
88658
  position = (data) => {
88388
88659
  const { data: datum } = data;
88389
88660
  const dataField = series.getMeasureField()[0];
88390
88661
  if (labelPosition === 'outside') {
88391
- if (series.direction === 'horizontal') {
88392
- return datum?.[dataField] >= 0 ? 'right' : 'left';
88393
- }
88394
- return datum?.[dataField] >= 0 ? 'top' : 'bottom';
88662
+ const positionMap = { vertical: ['top', 'bottom'], horizontal: ['right', 'left'] };
88663
+ const index = (datum?.[dataField] >= 0 && isInverse) || (datum?.[dataField] < 0 && !isInverse) ? 1 : 0;
88664
+ return positionMap[direction][index];
88395
88665
  }
88396
88666
  if (labelPosition === 'inside-bottom') {
88397
88667
  return series.direction === 'horizontal' ? 'inside-left' : 'inside-bottom';
@@ -88424,6 +88694,15 @@
88424
88694
  position: (data) => {
88425
88695
  const { data: datum } = data;
88426
88696
  const dataField = series.getMeasureField()[0];
88697
+ const isInverse = series.direction === 'horizontal'
88698
+ ? series.getXAxisHelper()?.isInverse()
88699
+ : series.getYAxisHelper()?.isInverse();
88700
+ if (isInverse) {
88701
+ if (datum?.[dataField] >= 0) {
88702
+ return series.direction === 'horizontal' ? ['left', 'inside-left'] : ['bottom', 'inside-bottom'];
88703
+ }
88704
+ return series.direction === 'horizontal' ? ['right', 'inside-right'] : ['top', 'inside-top'];
88705
+ }
88427
88706
  if (datum?.[dataField] >= 0) {
88428
88707
  return series.direction === 'horizontal' ? ['right', 'inside-right'] : ['top', 'inside-top'];
88429
88708
  }