@visactor/vchart 1.6.0 → 1.6.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.js +466 -456
  3. package/build/index.min.js +1 -1
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/chart/map/map.js +1 -0
  6. package/cjs/chart/map/map.js.map +1 -1
  7. package/cjs/chart/stack.js +2 -1
  8. package/cjs/compile/grammar-item.js +1 -2
  9. package/cjs/compile/mark/compilable-mark.js +2 -2
  10. package/cjs/compile/mark/compilable-mark.js.map +1 -1
  11. package/cjs/component/axis/base-axis.d.ts +1 -1
  12. package/cjs/component/axis/base-axis.js +3 -2
  13. package/cjs/component/axis/base-axis.js.map +1 -1
  14. package/cjs/component/axis/cartesian/axis.js +25 -12
  15. package/cjs/component/axis/cartesian/axis.js.map +1 -1
  16. package/cjs/component/axis/cartesian/time-axis.d.ts +1 -1
  17. package/cjs/component/axis/cartesian/time-axis.js +4 -4
  18. package/cjs/component/axis/cartesian/time-axis.js.map +1 -1
  19. package/cjs/component/axis/mixin/band-axis-mixin.js +2 -1
  20. package/cjs/component/axis/mixin/band-axis-mixin.js.map +1 -1
  21. package/cjs/component/axis/mixin/linear-axis-mixin.js +4 -2
  22. package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  23. package/cjs/component/axis/polar/axis.d.ts +1 -1
  24. package/cjs/component/axis/polar/axis.js +14 -8
  25. package/cjs/component/axis/polar/axis.js.map +1 -1
  26. package/cjs/component/axis/polar/band-axis.d.ts +1 -1
  27. package/cjs/component/axis/polar/band-axis.js +2 -1
  28. package/cjs/component/axis/polar/band-axis.js.map +1 -1
  29. package/cjs/component/label/interface.d.ts +5 -1
  30. package/cjs/component/label/interface.js.map +1 -1
  31. package/cjs/component/label/util.d.ts +2 -1
  32. package/cjs/component/label/util.js +3 -1
  33. package/cjs/component/label/util.js.map +1 -1
  34. package/cjs/component/marker/mark-point/interface/spec.d.ts +2 -2
  35. package/cjs/component/marker/mark-point/interface/spec.js.map +1 -1
  36. package/cjs/component/marker/mark-point/interface/theme.d.ts +5 -5
  37. package/cjs/component/marker/mark-point/interface/theme.js.map +1 -1
  38. package/cjs/component/tooltip/handler/base.d.ts +1 -1
  39. package/cjs/component/tooltip/handler/base.js +6 -4
  40. package/cjs/component/tooltip/handler/base.js.map +1 -1
  41. package/cjs/core/index.d.ts +1 -1
  42. package/cjs/core/index.js +1 -1
  43. package/cjs/core/index.js.map +1 -1
  44. package/cjs/series/heatmap/heatmap.js +4 -3
  45. package/cjs/series/heatmap/heatmap.js.map +1 -1
  46. package/cjs/series/pie/pie.js +3 -3
  47. package/cjs/series/pie/pie.js.map +1 -1
  48. package/cjs/theme/builtin/common/component/axis/cartesian-axis.js +2 -2
  49. package/cjs/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -1
  50. package/cjs/theme/builtin/common/component/axis/common-axis.js +1 -1
  51. package/cjs/theme/builtin/common/component/axis/common-axis.js.map +1 -1
  52. package/cjs/theme/builtin/common/component/crosshair.js +5 -5
  53. package/cjs/theme/builtin/common/component/crosshair.js.map +1 -1
  54. package/cjs/theme/builtin/common/component/data-zoom.js +10 -10
  55. package/cjs/theme/builtin/common/component/data-zoom.js.map +1 -1
  56. package/cjs/theme/builtin/common/component/indicator.js +1 -1
  57. package/cjs/theme/builtin/common/component/indicator.js.map +1 -1
  58. package/cjs/theme/builtin/common/component/legend/color-legend.js +3 -4
  59. package/cjs/theme/builtin/common/component/legend/color-legend.js.map +1 -1
  60. package/cjs/theme/builtin/common/component/legend/discrete-legend.js +2 -2
  61. package/cjs/theme/builtin/common/component/legend/discrete-legend.js.map +1 -1
  62. package/cjs/theme/builtin/common/component/legend/size-legend.js +6 -6
  63. package/cjs/theme/builtin/common/component/legend/size-legend.js.map +1 -1
  64. package/cjs/theme/builtin/common/component/map-label.js.map +1 -1
  65. package/cjs/theme/builtin/common/component/mark-area.js.map +1 -1
  66. package/cjs/theme/builtin/common/component/mark-line.js +9 -9
  67. package/cjs/theme/builtin/common/component/mark-line.js.map +1 -1
  68. package/cjs/theme/builtin/common/component/mark-point.js +15 -3
  69. package/cjs/theme/builtin/common/component/mark-point.js.map +1 -1
  70. package/cjs/theme/builtin/common/component/player.js +7 -7
  71. package/cjs/theme/builtin/common/component/player.js.map +1 -1
  72. package/cjs/theme/builtin/common/component/poptip.js +3 -4
  73. package/cjs/theme/builtin/common/component/poptip.js.map +1 -1
  74. package/cjs/theme/builtin/common/component/scroll-bar.js +1 -1
  75. package/cjs/theme/builtin/common/component/scroll-bar.js.map +1 -1
  76. package/cjs/theme/builtin/common/component/title.js +1 -1
  77. package/cjs/theme/builtin/common/component/title.js.map +1 -1
  78. package/cjs/theme/builtin/common/component/tooltip.js +3 -4
  79. package/cjs/theme/builtin/common/component/tooltip.js.map +1 -1
  80. package/cjs/theme/builtin/common/component/total-label.js.map +1 -1
  81. package/cjs/theme/builtin/common/mark.js.map +1 -1
  82. package/cjs/theme/builtin/common/series/rangeColumn.js +1 -1
  83. package/cjs/theme/builtin/common/series/rangeColumn.js.map +1 -1
  84. package/cjs/theme/builtin/dark/color-scheme.js +19 -12
  85. package/cjs/theme/builtin/dark/color-scheme.js.map +1 -1
  86. package/cjs/theme/builtin/light/color-scheme.js +18 -11
  87. package/cjs/theme/builtin/light/color-scheme.js.map +1 -1
  88. package/cjs/theme/color-scheme/builtin/interface.d.ts +16 -9
  89. package/cjs/theme/color-scheme/builtin/interface.js.map +1 -1
  90. package/cjs/util/math.js +10 -2
  91. package/cjs/util/math.js.map +1 -1
  92. package/esm/chart/map/map.js +1 -0
  93. package/esm/chart/map/map.js.map +1 -1
  94. package/esm/chart/stack.js +2 -1
  95. package/esm/compile/grammar-item.js +1 -2
  96. package/esm/compile/mark/compilable-mark.js +2 -2
  97. package/esm/compile/mark/compilable-mark.js.map +1 -1
  98. package/esm/component/axis/base-axis.d.ts +1 -1
  99. package/esm/component/axis/base-axis.js +4 -3
  100. package/esm/component/axis/base-axis.js.map +1 -1
  101. package/esm/component/axis/cartesian/axis.js +23 -10
  102. package/esm/component/axis/cartesian/axis.js.map +1 -1
  103. package/esm/component/axis/cartesian/time-axis.d.ts +1 -1
  104. package/esm/component/axis/cartesian/time-axis.js +4 -4
  105. package/esm/component/axis/cartesian/time-axis.js.map +1 -1
  106. package/esm/component/axis/mixin/band-axis-mixin.js +2 -1
  107. package/esm/component/axis/mixin/band-axis-mixin.js.map +1 -1
  108. package/esm/component/axis/mixin/linear-axis-mixin.js +4 -2
  109. package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  110. package/esm/component/axis/polar/axis.d.ts +1 -1
  111. package/esm/component/axis/polar/axis.js +13 -8
  112. package/esm/component/axis/polar/axis.js.map +1 -1
  113. package/esm/component/axis/polar/band-axis.d.ts +1 -1
  114. package/esm/component/axis/polar/band-axis.js +2 -1
  115. package/esm/component/axis/polar/band-axis.js.map +1 -1
  116. package/esm/component/label/interface.d.ts +5 -1
  117. package/esm/component/label/interface.js.map +1 -1
  118. package/esm/component/label/util.d.ts +2 -1
  119. package/esm/component/label/util.js +3 -1
  120. package/esm/component/label/util.js.map +1 -1
  121. package/esm/component/marker/mark-point/interface/spec.d.ts +2 -2
  122. package/esm/component/marker/mark-point/interface/spec.js.map +1 -1
  123. package/esm/component/marker/mark-point/interface/theme.d.ts +5 -5
  124. package/esm/component/marker/mark-point/interface/theme.js.map +1 -1
  125. package/esm/component/tooltip/handler/base.d.ts +1 -1
  126. package/esm/component/tooltip/handler/base.js +6 -4
  127. package/esm/component/tooltip/handler/base.js.map +1 -1
  128. package/esm/core/index.d.ts +1 -1
  129. package/esm/core/index.js +1 -1
  130. package/esm/core/index.js.map +1 -1
  131. package/esm/series/heatmap/heatmap.js +3 -1
  132. package/esm/series/heatmap/heatmap.js.map +1 -1
  133. package/esm/series/pie/pie.js +3 -3
  134. package/esm/series/pie/pie.js.map +1 -1
  135. package/esm/theme/builtin/common/component/axis/cartesian-axis.js +2 -2
  136. package/esm/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -1
  137. package/esm/theme/builtin/common/component/axis/common-axis.js +1 -1
  138. package/esm/theme/builtin/common/component/axis/common-axis.js.map +1 -1
  139. package/esm/theme/builtin/common/component/crosshair.js +5 -5
  140. package/esm/theme/builtin/common/component/crosshair.js.map +1 -1
  141. package/esm/theme/builtin/common/component/data-zoom.js +10 -10
  142. package/esm/theme/builtin/common/component/data-zoom.js.map +1 -1
  143. package/esm/theme/builtin/common/component/indicator.js +1 -1
  144. package/esm/theme/builtin/common/component/indicator.js.map +1 -1
  145. package/esm/theme/builtin/common/component/legend/color-legend.js +3 -4
  146. package/esm/theme/builtin/common/component/legend/color-legend.js.map +1 -1
  147. package/esm/theme/builtin/common/component/legend/discrete-legend.js +2 -2
  148. package/esm/theme/builtin/common/component/legend/discrete-legend.js.map +1 -1
  149. package/esm/theme/builtin/common/component/legend/size-legend.js +6 -6
  150. package/esm/theme/builtin/common/component/legend/size-legend.js.map +1 -1
  151. package/esm/theme/builtin/common/component/map-label.js.map +1 -1
  152. package/esm/theme/builtin/common/component/mark-area.js.map +1 -1
  153. package/esm/theme/builtin/common/component/mark-line.js +9 -9
  154. package/esm/theme/builtin/common/component/mark-line.js.map +1 -1
  155. package/esm/theme/builtin/common/component/mark-point.js +15 -3
  156. package/esm/theme/builtin/common/component/mark-point.js.map +1 -1
  157. package/esm/theme/builtin/common/component/player.js +7 -7
  158. package/esm/theme/builtin/common/component/player.js.map +1 -1
  159. package/esm/theme/builtin/common/component/poptip.js +3 -4
  160. package/esm/theme/builtin/common/component/poptip.js.map +1 -1
  161. package/esm/theme/builtin/common/component/scroll-bar.js +1 -1
  162. package/esm/theme/builtin/common/component/scroll-bar.js.map +1 -1
  163. package/esm/theme/builtin/common/component/title.js +1 -1
  164. package/esm/theme/builtin/common/component/title.js.map +1 -1
  165. package/esm/theme/builtin/common/component/tooltip.js +3 -4
  166. package/esm/theme/builtin/common/component/tooltip.js.map +1 -1
  167. package/esm/theme/builtin/common/component/total-label.js.map +1 -1
  168. package/esm/theme/builtin/common/mark.js.map +1 -1
  169. package/esm/theme/builtin/common/series/rangeColumn.js +1 -1
  170. package/esm/theme/builtin/common/series/rangeColumn.js.map +1 -1
  171. package/esm/theme/builtin/dark/color-scheme.js +19 -12
  172. package/esm/theme/builtin/dark/color-scheme.js.map +1 -1
  173. package/esm/theme/builtin/light/color-scheme.js +18 -11
  174. package/esm/theme/builtin/light/color-scheme.js.map +1 -1
  175. package/esm/theme/color-scheme/builtin/interface.d.ts +16 -9
  176. package/esm/theme/color-scheme/builtin/interface.js.map +1 -1
  177. package/esm/util/math.js +10 -2
  178. package/esm/util/math.js.map +1 -1
  179. package/package.json +11 -11
package/build/index.js CHANGED
@@ -6889,24 +6889,31 @@
6889
6889
  palette: {
6890
6890
  backgroundColor: '#ffffff',
6891
6891
  borderColor: '#e3e5e8',
6892
- shadowColor: '#21252c',
6892
+ shadowColor: 'rgba(33,37,44,0.1)',
6893
+ hoverBackgroundColor: '#f1f2f5',
6894
+ sliderRailColor: '#f1f3f4',
6895
+ sliderHandleColor: '#ffffff',
6896
+ sliderTrackColor: '#0040ff',
6897
+ popupBackgroundColor: '#ffffff',
6893
6898
  primaryFontColor: '#21252c',
6894
6899
  secondaryFontColor: '#606773',
6895
- axisFontColor: '#89909d',
6900
+ tertiaryFontColor: '#89909d',
6901
+ axisLabelFontColor: '#89909d',
6896
6902
  disableFontColor: '#bcc1cb',
6897
- labelReverseFontColor: '#ffffff',
6903
+ axisMarkerFontColor: '#ffffff',
6898
6904
  axisGridColor: '#f1f2f5',
6899
6905
  axisDomainColor: '#d9dde4',
6900
- dataZoomHandlerStrokeColor: '#aeb5be',
6901
- dataZoomHandlerFillColor: '#ffffff',
6902
- dataZoomBackgroundColor: '#f1f3f4',
6906
+ dataZoomHandleStrokeColor: '#aeb5be',
6903
6907
  dataZoomChartColor: '#c9ced8',
6904
- dataZoomSelectedColor: '#0040ff',
6908
+ playerControllerColor: '#0040ff',
6905
6909
  scrollBarSliderColor: '#000000',
6906
- tooltipBackgroundColor: '#ffffff',
6907
- markLabelBackgroundColor: '#ffc528',
6908
- titleFontColor: '#21252c',
6909
- labelFontColor: '#89909d'
6910
+ axisMarkerBackgroundColor: '#21252c',
6911
+ markLabelBackgroundColor: '#f1f2f5',
6912
+ markLineStrokeColor: '#606773',
6913
+ dangerColor: '#e33232',
6914
+ warningColor: '#ffc528',
6915
+ successColor: '#07a35a',
6916
+ infoColor: '#3073f2'
6910
6917
  }
6911
6918
  }
6912
6919
  };
@@ -7674,9 +7681,6 @@
7674
7681
  return encoder.scale && (dependencies = isGrammar(encoder.scale) ? [encoder.scale] : array(view.getScaleById(encoder.scale))), dependencies.concat(parseFunctionType(encoder, view));
7675
7682
  }
7676
7683
 
7677
- function parseXY(val) {
7678
- return null === val ? 0 : val;
7679
- }
7680
7684
  function isValidPointsChannel(channels, markType) {
7681
7685
  switch (markType) {
7682
7686
  case "line":
@@ -7710,8 +7714,8 @@
7710
7714
  return items.some(item => isValidPointsChannel(Object.keys(item.nextAttrs), "line")) ? items.map((item, index) => {
7711
7715
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
7712
7716
  const attrs = item.nextAttrs,
7713
- x = parseXY(null !== (_a = attrs.x) && void 0 !== _a ? _a : null === (_b = null == lastPoints ? void 0 : lastPoints[index]) || void 0 === _b ? void 0 : _b.x),
7714
- y = parseXY(null !== (_c = attrs.y) && void 0 !== _c ? _c : null === (_d = null == lastPoints ? void 0 : lastPoints[index]) || void 0 === _d ? void 0 : _d.y),
7717
+ x = null !== (_a = attrs.x) && void 0 !== _a ? _a : null === (_b = null == lastPoints ? void 0 : lastPoints[index]) || void 0 === _b ? void 0 : _b.x,
7718
+ y = null !== (_c = attrs.y) && void 0 !== _c ? _c : null === (_d = null == lastPoints ? void 0 : lastPoints[index]) || void 0 === _d ? void 0 : _d.y,
7715
7719
  defined = null !== (_e = attrs.defined) && void 0 !== _e ? _e : null === (_f = null == lastPoints ? void 0 : lastPoints[index]) || void 0 === _f ? void 0 : _f.defined,
7716
7720
  point = {
7717
7721
  x: x,
@@ -7719,8 +7723,8 @@
7719
7723
  context: item.key
7720
7724
  };
7721
7725
  if (isArea) {
7722
- const x1 = parseXY(null !== (_g = attrs.x1) && void 0 !== _g ? _g : null === (_h = null == lastPoints ? void 0 : lastPoints[index]) || void 0 === _h ? void 0 : _h.x1),
7723
- y1 = parseXY(null !== (_j = attrs.y1) && void 0 !== _j ? _j : null === (_k = null == lastPoints ? void 0 : lastPoints[index]) || void 0 === _k ? void 0 : _k.y1);
7726
+ const x1 = null !== (_g = attrs.x1) && void 0 !== _g ? _g : null === (_h = null == lastPoints ? void 0 : lastPoints[index]) || void 0 === _h ? void 0 : _h.x1,
7727
+ y1 = null !== (_j = attrs.y1) && void 0 !== _j ? _j : null === (_k = null == lastPoints ? void 0 : lastPoints[index]) || void 0 === _k ? void 0 : _k.y1;
7724
7728
  point.x1 = x1, point.y1 = y1;
7725
7729
  }
7726
7730
  return !1 === defined && (point.defined = !1), point;
@@ -7732,10 +7736,10 @@
7732
7736
  return items.forEach((item, index) => {
7733
7737
  var _a, _b, _c, _d;
7734
7738
  const attrs = item.nextAttrs,
7735
- x = parseXY(null !== (_a = attrs.x) && void 0 !== _a ? _a : null == lastPoints ? void 0 : lastPoints[4 * index]),
7736
- y = parseXY(null !== (_b = attrs.y) && void 0 !== _b ? _b : null == lastPoints ? void 0 : lastPoints[4 * index + 1]),
7737
- width = parseXY(null !== (_c = attrs.width) && void 0 !== _c ? _c : null == lastPoints ? void 0 : lastPoints[4 * index + 2]),
7738
- y1 = parseXY(null !== (_d = attrs.y1) && void 0 !== _d ? _d : null == lastPoints ? void 0 : lastPoints[4 * index + 3]);
7739
+ x = null !== (_a = attrs.x) && void 0 !== _a ? _a : null == lastPoints ? void 0 : lastPoints[4 * index],
7740
+ y = null !== (_b = attrs.y) && void 0 !== _b ? _b : null == lastPoints ? void 0 : lastPoints[4 * index + 1],
7741
+ width = null !== (_c = attrs.width) && void 0 !== _c ? _c : null == lastPoints ? void 0 : lastPoints[4 * index + 2],
7742
+ y1 = null !== (_d = attrs.y1) && void 0 !== _d ? _d : null == lastPoints ? void 0 : lastPoints[4 * index + 3];
7739
7743
  arr[4 * index] = x, arr[4 * index + 1] = y, arr[4 * index + 2] = width, arr[4 * index + 3] = y1 - y;
7740
7744
  }), arr;
7741
7745
  }
@@ -7745,191 +7749,11 @@
7745
7749
  return items.forEach((item, index) => {
7746
7750
  var _a, _b;
7747
7751
  const attrs = item.nextAttrs,
7748
- x = parseXY(null !== (_a = attrs.x) && void 0 !== _a ? _a : null == lastPoints ? void 0 : lastPoints[2 * index]),
7749
- y = parseXY(null !== (_b = attrs.y) && void 0 !== _b ? _b : null == lastPoints ? void 0 : lastPoints[2 * index + 1]);
7752
+ x = null !== (_a = attrs.x) && void 0 !== _a ? _a : null == lastPoints ? void 0 : lastPoints[2 * index],
7753
+ y = null !== (_b = attrs.y) && void 0 !== _b ? _b : null == lastPoints ? void 0 : lastPoints[2 * index + 1];
7750
7754
  arr[2 * index] = x, arr[2 * index + 1] = y;
7751
7755
  }), arr;
7752
7756
  }
7753
-
7754
- const commonAttributes = ["fillOpacity", "x", "y", "dx", "dy"];
7755
- const transformCommonAttribute = (graphicAttributes, changedKey, nextAttrs) => {
7756
- var _a;
7757
- return "fillOpacity" === changedKey ? (graphicAttributes.fillOpacity = null !== (_a = nextAttrs.fillOpacity) && void 0 !== _a ? _a : 1, ["fillOpacity"]) : "x" === changedKey ? (graphicAttributes.x = parseXY(nextAttrs.x), ["x"]) : "y" === changedKey ? (graphicAttributes.y = parseXY(nextAttrs.y), ["y"]) : "dx" === changedKey ? (graphicAttributes.dx = parseXY(nextAttrs.dx), ["dx"]) : "dy" === changedKey ? (graphicAttributes.dy = parseXY(nextAttrs.dy), ["dy"]) : [];
7758
- };
7759
-
7760
- function isPointsMarkType(markType) {
7761
- return [GrammarMarkType.line, GrammarMarkType.area, GrammarMarkType.largeRects, GrammarMarkType.largeSymbols].includes(markType);
7762
- }
7763
- function storeOriginAttributes(name, channels, graphicAttributes, nextAttrs, element, markName) {
7764
- var _a;
7765
- const prevStoredAttrs = null !== (_a = element.getGraphicAttribute(name, !1, markName)) && void 0 !== _a ? _a : {},
7766
- storedAttrs = {};
7767
- return channels.forEach(channel => {
7768
- var _a;
7769
- storedAttrs[channel] = null !== (_a = nextAttrs[channel]) && void 0 !== _a ? _a : prevStoredAttrs[channel];
7770
- }), graphicAttributes[name] = storedAttrs, storedAttrs;
7771
- }
7772
- const transformsByType = {
7773
- [GrammarMarkType.largeRects]: [{
7774
- channels: ["x", "y", "y1", "x1", "width", "height"],
7775
- transform: (graphicAttributes, nextAttrs, storedAttrs) => {
7776
- graphicAttributes.x = 0, graphicAttributes.y = 0;
7777
- }
7778
- }],
7779
- [GrammarMarkType.largeSymbols]: [{
7780
- channels: ["x", "y", "size"],
7781
- transform: (graphicAttributes, nextAttrs, storedAttrs) => {
7782
- graphicAttributes.x = 0, graphicAttributes.y = 0;
7783
- }
7784
- }],
7785
- [GrammarMarkType.area]: [{
7786
- channels: ["x", "y", "x1", "y1"],
7787
- transform: (graphicAttributes, nextAttrs, storedAttrs) => {
7788
- graphicAttributes.x = 0, graphicAttributes.y = 0, graphicAttributes.x1 = 0, graphicAttributes.y1 = 0;
7789
- }
7790
- }],
7791
- [GrammarMarkType.line]: [{
7792
- channels: ["x", "y", "defined", "enableSegments"],
7793
- transform: (graphicAttributes, nextAttrs, storedAttrs) => {
7794
- graphicAttributes.x = 0, graphicAttributes.y = 0;
7795
- }
7796
- }],
7797
- [GrammarMarkType.rect]: [{
7798
- channels: ["x", "y", "x1", "y1", "width", "height"],
7799
- transform: (graphicAttributes, nextAttrs, storedAttrs) => {
7800
- var _a, _b, _c, _d, _e, _f, _g, _h;
7801
- isValidNumber$1(nextAttrs.width) || !isValidNumber$1(nextAttrs.x1) && isValidNumber$1(storedAttrs.width) ? (graphicAttributes.x = Math.min(null !== (_a = storedAttrs.x) && void 0 !== _a ? _a : 0, null !== (_b = storedAttrs.x1) && void 0 !== _b ? _b : 1 / 0), graphicAttributes.width = storedAttrs.width) : isValidNumber$1(nextAttrs.x1) || !isValidNumber$1(nextAttrs.width) && isValidNumber$1(storedAttrs.x1) ? (graphicAttributes.x = Math.min(storedAttrs.x, storedAttrs.x1), graphicAttributes.width = Math.abs(storedAttrs.x1 - storedAttrs.x)) : (graphicAttributes.x = Math.min(null !== (_c = storedAttrs.x) && void 0 !== _c ? _c : 0, null !== (_d = storedAttrs.x1) && void 0 !== _d ? _d : 1 / 0), graphicAttributes.width = storedAttrs.width), isValidNumber$1(nextAttrs.height) || !isValidNumber$1(nextAttrs.y1) && isValidNumber$1(storedAttrs.height) ? (graphicAttributes.y = Math.min(null !== (_e = storedAttrs.y) && void 0 !== _e ? _e : 0, null !== (_f = storedAttrs.y1) && void 0 !== _f ? _f : 1 / 0), graphicAttributes.height = storedAttrs.height) : isValidNumber$1(nextAttrs.y1) || !isValidNumber$1(nextAttrs.height) && isValidNumber$1(storedAttrs.y1) ? (graphicAttributes.y = Math.min(storedAttrs.y, storedAttrs.y1), graphicAttributes.height = Math.abs(storedAttrs.y1 - storedAttrs.y)) : (graphicAttributes.y = Math.min(null !== (_g = storedAttrs.y) && void 0 !== _g ? _g : 0, null !== (_h = storedAttrs.y1) && void 0 !== _h ? _h : 1 / 0), graphicAttributes.height = storedAttrs.height);
7802
- },
7803
- storedAttrs: "sizeAttrs"
7804
- }],
7805
- rect3d: [{
7806
- channels: ["x", "y", "z", "x1", "y1", "width", "height", "length"],
7807
- transform: (graphicAttributes, nextAttrs, storedAttrs) => {
7808
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
7809
- isValidNumber$1(nextAttrs.width) || !isValidNumber$1(nextAttrs.x1) && isValidNumber$1(storedAttrs.width) ? (graphicAttributes.x = Math.min(null !== (_a = storedAttrs.x) && void 0 !== _a ? _a : 0, null !== (_b = storedAttrs.x1) && void 0 !== _b ? _b : 1 / 0), graphicAttributes.width = storedAttrs.width) : isValidNumber$1(nextAttrs.x1) || !isValidNumber$1(nextAttrs.width) && isValidNumber$1(storedAttrs.x1) ? (graphicAttributes.x = Math.min(storedAttrs.x, storedAttrs.x1), graphicAttributes.width = Math.abs(storedAttrs.x1 - storedAttrs.x)) : (graphicAttributes.x = Math.min(null !== (_c = storedAttrs.x) && void 0 !== _c ? _c : 0, null !== (_d = storedAttrs.x1) && void 0 !== _d ? _d : 1 / 0), graphicAttributes.width = storedAttrs.width), isValidNumber$1(nextAttrs.height) || !isValidNumber$1(nextAttrs.y1) && isValidNumber$1(storedAttrs.height) ? (graphicAttributes.y = Math.min(null !== (_e = storedAttrs.y) && void 0 !== _e ? _e : 0, null !== (_f = storedAttrs.y1) && void 0 !== _f ? _f : 1 / 0), graphicAttributes.height = storedAttrs.height) : isValidNumber$1(nextAttrs.y1) || !isValidNumber$1(nextAttrs.height) && isValidNumber$1(storedAttrs.y1) ? (graphicAttributes.y = Math.min(storedAttrs.y, storedAttrs.y1), graphicAttributes.height = Math.abs(storedAttrs.y1 - storedAttrs.y)) : (graphicAttributes.y = Math.min(null !== (_g = storedAttrs.y) && void 0 !== _g ? _g : 0, null !== (_h = storedAttrs.y1) && void 0 !== _h ? _h : 1 / 0), graphicAttributes.height = storedAttrs.height), isValidNumber$1(nextAttrs.length) || !isValidNumber$1(nextAttrs.z1) && isValidNumber$1(storedAttrs.length) ? (graphicAttributes.z = Math.min(null !== (_j = storedAttrs.z) && void 0 !== _j ? _j : 0, null !== (_k = storedAttrs.z1) && void 0 !== _k ? _k : 1 / 0), graphicAttributes.length = storedAttrs.length) : isValidNumber$1(nextAttrs.z1) || !isValidNumber$1(nextAttrs.length) && isValidNumber$1(storedAttrs.z1) ? (graphicAttributes.z = Math.min(storedAttrs.z, storedAttrs.z1), graphicAttributes.length = Math.abs(storedAttrs.z1 - storedAttrs.z)) : (graphicAttributes.z = Math.min(null !== (_l = storedAttrs.z) && void 0 !== _l ? _l : 0, null !== (_m = storedAttrs.z1) && void 0 !== _m ? _m : 1 / 0), graphicAttributes.length = storedAttrs.length);
7810
- },
7811
- storedAttrs: "sizeAttrs"
7812
- }],
7813
- [GrammarMarkType.text]: [{
7814
- channels: ["text", "limit", "autoLimit", "maxLineWidth"],
7815
- transform: (graphicAttributes, nextAttrs, storedAttrs) => {
7816
- var _a, _b, _c, _d;
7817
- const limit = null !== (_a = storedAttrs.limit) && void 0 !== _a ? _a : 1 / 0,
7818
- autoLimit = null !== (_b = storedAttrs.autoLimit) && void 0 !== _b ? _b : 1 / 0,
7819
- maxWidth = Math.min(limit, autoLimit),
7820
- isTextConfig = isPlainObject$1(storedAttrs.text) && !isNil$1(storedAttrs.text.text),
7821
- text = isTextConfig ? storedAttrs.text.text : storedAttrs.text;
7822
- graphicAttributes.maxLineWidth = maxWidth === 1 / 0 ? storedAttrs.maxLineWidth : maxWidth, isTextConfig ? "html" === storedAttrs.text.type ? (graphicAttributes.html = {
7823
- dom: text,
7824
- width: null !== (_c = nextAttrs.width) && void 0 !== _c ? _c : maxWidth,
7825
- height: null !== (_d = nextAttrs.height) && void 0 !== _d ? _d : nextAttrs.fontSize,
7826
- anchorType: "position"
7827
- }, graphicAttributes.text = "") : "rich" === storedAttrs.text.type ? graphicAttributes.textConfig = text : graphicAttributes.text = text : graphicAttributes.text = text;
7828
- },
7829
- storedAttrs: "limitAttrs"
7830
- }],
7831
- [GrammarMarkType.rule]: [{
7832
- channels: ["x", "y", "x1", "y1"],
7833
- transform: (graphicAttributes, nextAttrs, storedAttrs) => {
7834
- const points = getRulePoints(storedAttrs);
7835
- graphicAttributes.points = points, graphicAttributes.x = 0, graphicAttributes.y = 0;
7836
- },
7837
- storedAttrs: "pointAttrs"
7838
- }],
7839
- [GrammarMarkType.symbol]: [{
7840
- channels: ["shape", "symbolType"],
7841
- transform: (graphicAttributes, nextAttrs, storedAttrs) => {
7842
- var _a;
7843
- graphicAttributes.symbolType = null !== (_a = nextAttrs.shape) && void 0 !== _a ? _a : nextAttrs.symbolType;
7844
- }
7845
- }, {
7846
- channels: ["image", "fill", "background"],
7847
- transform: (graphicAttributes, nextAttrs, storedAttrs) => {
7848
- nextAttrs.image ? (graphicAttributes.background = nextAttrs.image, graphicAttributes.fill = !1) : storedAttrs.image ? (graphicAttributes.background = storedAttrs.image, graphicAttributes.fill = !1) : (graphicAttributes.fill = storedAttrs.fill, graphicAttributes.background = storedAttrs.background);
7849
- },
7850
- storedAttrs: "imageAttrs"
7851
- }],
7852
- [GrammarMarkType.richtext]: [{
7853
- channels: ["text", "textConfig"],
7854
- transform: (graphicAttributes, nextAttrs, storedAttrs) => {
7855
- var _a, _b, _c, _d;
7856
- graphicAttributes.text = null, "rich" === (null === (_a = nextAttrs.text) || void 0 === _a ? void 0 : _a.type) ? graphicAttributes.textConfig = nextAttrs.text.text : "html" === (null === (_b = nextAttrs.textConfig) || void 0 === _b ? void 0 : _b.type) ? (graphicAttributes.html = {
7857
- dom: nextAttrs.textConfig.text,
7858
- width: nextAttrs.width,
7859
- height: null !== (_c = nextAttrs.height) && void 0 !== _c ? _c : nextAttrs.fontSize,
7860
- anchorType: "position"
7861
- }, graphicAttributes.text = "") : "rich" === (null === (_d = nextAttrs.textConfig) || void 0 === _d ? void 0 : _d.type) ? graphicAttributes.textConfig = nextAttrs.textConfig.text : graphicAttributes.textConfig = nextAttrs.textConfig;
7862
- }
7863
- }]
7864
- };
7865
- function cloneTransformAttributes(markType, attributes) {
7866
- var _a;
7867
- return (null !== (_a = transformsByType[markType]) && void 0 !== _a ? _a : []).reduce((clonedAttributes, transform) => (transform.channels.forEach(channel => {
7868
- has$1(attributes, channel) && (clonedAttributes[channel] = attributes[channel]);
7869
- }), clonedAttributes), {});
7870
- }
7871
- const transformAttributes = (markType, nextAttrs, element, markName) => {
7872
- const graphicAttributes = {},
7873
- changedKeys = nextAttrs ? Object.keys(nextAttrs) : [],
7874
- transforms = isString$1(markType) ? transformsByType[markType] : markType;
7875
- if (null == transforms ? void 0 : transforms.length) {
7876
- const tags = [];
7877
- changedKeys.forEach(key => {
7878
- let isTransformed = !1;
7879
- transforms.forEach((transform, index) => {
7880
- if (transform.channels.includes(key)) {
7881
- if (!tags[index]) if (transform.storedAttrs) {
7882
- const storedAttrs = storeOriginAttributes(transform.storedAttrs, transform.channels, graphicAttributes, nextAttrs, element, markName);
7883
- transform.transform(graphicAttributes, nextAttrs, storedAttrs);
7884
- } else transform.transform(graphicAttributes, nextAttrs, null);
7885
- tags[index] = !0, isTransformed = !0;
7886
- }
7887
- }), isTransformed || (commonAttributes.includes(key) ? transformCommonAttribute(graphicAttributes, key, nextAttrs) : graphicAttributes[key] = nextAttrs[key]);
7888
- });
7889
- } else changedKeys.forEach(key => {
7890
- commonAttributes.includes(key) ? transformCommonAttribute(graphicAttributes, key, nextAttrs) : graphicAttributes[key] = nextAttrs[key];
7891
- });
7892
- return graphicAttributes;
7893
- };
7894
- const isStopsEqual = (prev, next) => {
7895
- var _a, _b;
7896
- if (prev === next) return !0;
7897
- const prevLength = null !== (_a = prev && prev.length) && void 0 !== _a ? _a : 0;
7898
- return prevLength === (null !== (_b = next && next.length) && void 0 !== _b ? _b : 0) && 0 !== prevLength && prev.every((prevEntry, prevIndex) => !prevEntry && !next[prevIndex] || prevEntry && next[prevIndex] && prevEntry.color === next[prevIndex].color && prevEntry.offset === next[prevIndex].offset);
7899
- },
7900
- isColorAttrEqual = (prev, next) => {
7901
- if (prev === next) return !0;
7902
- if (typeof prev != typeof next) return !1;
7903
- if (isString$1(prev)) return !1;
7904
- if (prev.gradient !== next.gradient) return !1;
7905
- const prevKeys = Object.keys(prev),
7906
- nextKeys = Object.keys(next);
7907
- return prevKeys.length === nextKeys.length && prevKeys.every(key => "stops" === key ? isStopsEqual(prev[key], next[key]) : prev[key] === next[key]);
7908
- },
7909
- isLineDashEqual = (prev, next) => prev.length === next.length && prev.join("-") === next.join("-"),
7910
- isSegmentAttrEqual = (prev, next, key) => !(!isNil$1(prev) || !isNil$1(next)) || !isNil$1(prev) && !isNil$1(next) && ("lineDash" === key ? isLineDashEqual(prev, next) : "stroke" === key || "fill" === key ? isColorAttrEqual(prev, next) : prev === next),
7911
- fillAttrs = ["fill", "fillOpacity", "background", "texture", "texturePadding", "textureSize", "textureColor"],
7912
- strokeAttrs = ["stroke", "strokeOpacity", "lineDash", "lineDashOffset", "lineCap", "lineJoin", "lineWidth", "miterLimit"],
7913
- areaAttrs = fillAttrs.concat(strokeAttrs);
7914
- function getLineSegmentConfigs(items, points, element) {
7915
- var _a;
7916
- if (!items || items.length <= 1) return null;
7917
- const checkAttributes = "area" === (null === (_a = null == element ? void 0 : element.mark) || void 0 === _a ? void 0 : _a.markType) ? areaAttrs : strokeAttrs,
7918
- segments = [];
7919
- let prevSegmentAttrs = null;
7920
- return items.forEach((item, index) => {
7921
- prevSegmentAttrs && checkAttributes.every(key => isSegmentAttrEqual(prevSegmentAttrs[key], item[key], key)) || (segments.length && (segments[segments.length - 1].endIndex = index), prevSegmentAttrs = item, segments.push({
7922
- attrs: prevSegmentAttrs,
7923
- startIndex: index
7924
- }));
7925
- }), segments.length >= 2 ? segments.map(entry => {
7926
- const res = transformAttributes(GrammarMarkType.line, entry.attrs, element);
7927
- return res.points = points.slice(entry.startIndex, isNil$1(entry.endIndex) ? points.length : entry.endIndex), res;
7928
- }) : null;
7929
- }
7930
- function getLinePointsFromSegments(segments) {
7931
- return segments ? segments.reduce((points, segment) => points.concat(segment.points), []) : null;
7932
- }
7933
7757
  function isPositionOrSizeChannel(type, channel) {
7934
7758
  if (["x", "y", "dx", "dy"].includes(channel)) return !0;
7935
7759
  switch (type) {
@@ -7957,6 +7781,9 @@
7957
7781
  }
7958
7782
  return !1;
7959
7783
  }
7784
+ function isPointsMarkType(markType) {
7785
+ return [GrammarMarkType.line, GrammarMarkType.area, GrammarMarkType.largeRects, GrammarMarkType.largeSymbols].includes(markType);
7786
+ }
7960
7787
 
7961
7788
  class GlyphMeta {
7962
7789
  constructor(marks, encoders, defaultEncoder, progressiveChannels) {
@@ -7999,6 +7826,16 @@
7999
7826
  if (!Factory._plotMarks[type]) return null;
8000
7827
  return new (Factory._plotMarks[type])(id);
8001
7828
  }
7829
+ static registerMark(key, mark) {
7830
+ Factory._marks[key] = mark;
7831
+ }
7832
+ static createMark(type, view, group) {
7833
+ if (!Factory._marks[type]) return null;
7834
+ return new (Factory._marks[type])(view, type, group);
7835
+ }
7836
+ static hasMark(type) {
7837
+ return !!Factory._marks[type];
7838
+ }
8002
7839
  static registerComponent(key, component) {
8003
7840
  Factory._components[key] = component;
8004
7841
  }
@@ -8052,7 +7889,7 @@
8052
7889
  return Ctor ? new Ctor(view, options) : null;
8053
7890
  }
8054
7891
  };
8055
- Factory$1._plotMarks = {}, Factory$1._components = {}, Factory$1._graphicComponents = {}, Factory$1._transforms = {}, Factory$1._grammars = {}, Factory$1._glyphs = {}, Factory$1._animations = {}, Factory$1._interactions = {}, Factory$1.registerGlyph = (glyphType, marks, encoders, defaultEncoder, progressiveChannels) => (Factory$1._glyphs[glyphType] = new GlyphMeta(marks, encoders, defaultEncoder, progressiveChannels), Factory$1._glyphs[glyphType]), Factory$1.registerAnimationType = (animationType, animation) => {
7892
+ Factory$1._plotMarks = {}, Factory$1._marks = {}, Factory$1._components = {}, Factory$1._graphicComponents = {}, Factory$1._transforms = {}, Factory$1._grammars = {}, Factory$1._glyphs = {}, Factory$1._animations = {}, Factory$1._interactions = {}, Factory$1.registerGlyph = (glyphType, marks, encoders, defaultEncoder, progressiveChannels) => (Factory$1._glyphs[glyphType] = new GlyphMeta(marks, encoders, defaultEncoder, progressiveChannels), Factory$1._glyphs[glyphType]), Factory$1.registerAnimationType = (animationType, animation) => {
8056
7893
  Factory$1._animations[animationType] = animation;
8057
7894
  }, Factory$1.getAnimationType = animationType => Factory$1._animations[animationType], Factory$1.registerInteraction = (interactionType, interaction) => {
8058
7895
  Factory$1._interactions[interactionType] = interaction;
@@ -26288,6 +26125,184 @@
26288
26125
  graphicItem && (graphicItem[BridgeElementKey] = null, graphicItem.release(), graphicItem.parent && graphicItem.parent.removeChild(graphicItem));
26289
26126
  };
26290
26127
 
26128
+ const commonAttributes = ["fillOpacity"];
26129
+ const transformCommonAttribute = (graphicAttributes, changedKey, nextAttrs) => {
26130
+ var _a;
26131
+ return "fillOpacity" === changedKey ? (graphicAttributes.fillOpacity = null !== (_a = nextAttrs.fillOpacity) && void 0 !== _a ? _a : 1, ["fillOpacity"]) : [];
26132
+ };
26133
+
26134
+ function storeOriginAttributes(name, channels, graphicAttributes, nextAttrs, element, markName) {
26135
+ var _a;
26136
+ const prevStoredAttrs = null !== (_a = element.getGraphicAttribute(name, !1, markName)) && void 0 !== _a ? _a : {},
26137
+ storedAttrs = {};
26138
+ return channels.forEach(channel => {
26139
+ var _a;
26140
+ storedAttrs[channel] = null !== (_a = nextAttrs[channel]) && void 0 !== _a ? _a : prevStoredAttrs[channel];
26141
+ }), graphicAttributes[name] = storedAttrs, storedAttrs;
26142
+ }
26143
+ const transformsByType = {
26144
+ [GrammarMarkType.largeRects]: [{
26145
+ channels: ["x", "y", "y1", "x1", "width", "height"],
26146
+ transform: (graphicAttributes, nextAttrs, storedAttrs) => {
26147
+ graphicAttributes.x = 0, graphicAttributes.y = 0;
26148
+ }
26149
+ }],
26150
+ [GrammarMarkType.largeSymbols]: [{
26151
+ channels: ["x", "y", "size"],
26152
+ transform: (graphicAttributes, nextAttrs, storedAttrs) => {
26153
+ graphicAttributes.x = 0, graphicAttributes.y = 0;
26154
+ }
26155
+ }],
26156
+ [GrammarMarkType.area]: [{
26157
+ channels: ["x", "y", "x1", "y1"],
26158
+ transform: (graphicAttributes, nextAttrs, storedAttrs) => {
26159
+ graphicAttributes.x = 0, graphicAttributes.y = 0, graphicAttributes.x1 = 0, graphicAttributes.y1 = 0;
26160
+ }
26161
+ }],
26162
+ [GrammarMarkType.line]: [{
26163
+ channels: ["x", "y", "defined", "enableSegments"],
26164
+ transform: (graphicAttributes, nextAttrs, storedAttrs) => {
26165
+ graphicAttributes.x = 0, graphicAttributes.y = 0;
26166
+ }
26167
+ }],
26168
+ [GrammarMarkType.rect]: [{
26169
+ channels: ["x", "y", "x1", "y1", "width", "height"],
26170
+ transform: (graphicAttributes, nextAttrs, storedAttrs) => {
26171
+ var _a, _b, _c, _d, _e, _f, _g, _h;
26172
+ isValidNumber$1(nextAttrs.width) || !isValidNumber$1(nextAttrs.x1) && isValidNumber$1(storedAttrs.width) ? (graphicAttributes.x = Math.min(null !== (_a = storedAttrs.x) && void 0 !== _a ? _a : 0, null !== (_b = storedAttrs.x1) && void 0 !== _b ? _b : 1 / 0), graphicAttributes.width = storedAttrs.width) : isValidNumber$1(nextAttrs.x1) || !isValidNumber$1(nextAttrs.width) && isValidNumber$1(storedAttrs.x1) ? (graphicAttributes.x = Math.min(storedAttrs.x, storedAttrs.x1), graphicAttributes.width = Math.abs(storedAttrs.x1 - storedAttrs.x)) : (graphicAttributes.x = Math.min(null !== (_c = storedAttrs.x) && void 0 !== _c ? _c : 0, null !== (_d = storedAttrs.x1) && void 0 !== _d ? _d : 1 / 0), graphicAttributes.width = storedAttrs.width), isValidNumber$1(nextAttrs.height) || !isValidNumber$1(nextAttrs.y1) && isValidNumber$1(storedAttrs.height) ? (graphicAttributes.y = Math.min(null !== (_e = storedAttrs.y) && void 0 !== _e ? _e : 0, null !== (_f = storedAttrs.y1) && void 0 !== _f ? _f : 1 / 0), graphicAttributes.height = storedAttrs.height) : isValidNumber$1(nextAttrs.y1) || !isValidNumber$1(nextAttrs.height) && isValidNumber$1(storedAttrs.y1) ? (graphicAttributes.y = Math.min(storedAttrs.y, storedAttrs.y1), graphicAttributes.height = Math.abs(storedAttrs.y1 - storedAttrs.y)) : (graphicAttributes.y = Math.min(null !== (_g = storedAttrs.y) && void 0 !== _g ? _g : 0, null !== (_h = storedAttrs.y1) && void 0 !== _h ? _h : 1 / 0), graphicAttributes.height = storedAttrs.height);
26173
+ },
26174
+ storedAttrs: "sizeAttrs"
26175
+ }],
26176
+ rect3d: [{
26177
+ channels: ["x", "y", "z", "x1", "y1", "width", "height", "length"],
26178
+ transform: (graphicAttributes, nextAttrs, storedAttrs) => {
26179
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
26180
+ isValidNumber$1(nextAttrs.width) || !isValidNumber$1(nextAttrs.x1) && isValidNumber$1(storedAttrs.width) ? (graphicAttributes.x = Math.min(null !== (_a = storedAttrs.x) && void 0 !== _a ? _a : 0, null !== (_b = storedAttrs.x1) && void 0 !== _b ? _b : 1 / 0), graphicAttributes.width = storedAttrs.width) : isValidNumber$1(nextAttrs.x1) || !isValidNumber$1(nextAttrs.width) && isValidNumber$1(storedAttrs.x1) ? (graphicAttributes.x = Math.min(storedAttrs.x, storedAttrs.x1), graphicAttributes.width = Math.abs(storedAttrs.x1 - storedAttrs.x)) : (graphicAttributes.x = Math.min(null !== (_c = storedAttrs.x) && void 0 !== _c ? _c : 0, null !== (_d = storedAttrs.x1) && void 0 !== _d ? _d : 1 / 0), graphicAttributes.width = storedAttrs.width), isValidNumber$1(nextAttrs.height) || !isValidNumber$1(nextAttrs.y1) && isValidNumber$1(storedAttrs.height) ? (graphicAttributes.y = Math.min(null !== (_e = storedAttrs.y) && void 0 !== _e ? _e : 0, null !== (_f = storedAttrs.y1) && void 0 !== _f ? _f : 1 / 0), graphicAttributes.height = storedAttrs.height) : isValidNumber$1(nextAttrs.y1) || !isValidNumber$1(nextAttrs.height) && isValidNumber$1(storedAttrs.y1) ? (graphicAttributes.y = Math.min(storedAttrs.y, storedAttrs.y1), graphicAttributes.height = Math.abs(storedAttrs.y1 - storedAttrs.y)) : (graphicAttributes.y = Math.min(null !== (_g = storedAttrs.y) && void 0 !== _g ? _g : 0, null !== (_h = storedAttrs.y1) && void 0 !== _h ? _h : 1 / 0), graphicAttributes.height = storedAttrs.height), isValidNumber$1(nextAttrs.length) || !isValidNumber$1(nextAttrs.z1) && isValidNumber$1(storedAttrs.length) ? (graphicAttributes.z = Math.min(null !== (_j = storedAttrs.z) && void 0 !== _j ? _j : 0, null !== (_k = storedAttrs.z1) && void 0 !== _k ? _k : 1 / 0), graphicAttributes.length = storedAttrs.length) : isValidNumber$1(nextAttrs.z1) || !isValidNumber$1(nextAttrs.length) && isValidNumber$1(storedAttrs.z1) ? (graphicAttributes.z = Math.min(storedAttrs.z, storedAttrs.z1), graphicAttributes.length = Math.abs(storedAttrs.z1 - storedAttrs.z)) : (graphicAttributes.z = Math.min(null !== (_l = storedAttrs.z) && void 0 !== _l ? _l : 0, null !== (_m = storedAttrs.z1) && void 0 !== _m ? _m : 1 / 0), graphicAttributes.length = storedAttrs.length);
26181
+ },
26182
+ storedAttrs: "sizeAttrs"
26183
+ }],
26184
+ [GrammarMarkType.text]: [{
26185
+ channels: ["text", "limit", "autoLimit", "maxLineWidth"],
26186
+ transform: (graphicAttributes, nextAttrs, storedAttrs) => {
26187
+ var _a, _b, _c, _d;
26188
+ const limit = null !== (_a = storedAttrs.limit) && void 0 !== _a ? _a : 1 / 0,
26189
+ autoLimit = null !== (_b = storedAttrs.autoLimit) && void 0 !== _b ? _b : 1 / 0,
26190
+ maxWidth = Math.min(limit, autoLimit),
26191
+ isTextConfig = isPlainObject$1(storedAttrs.text) && !isNil$1(storedAttrs.text.text),
26192
+ text = isTextConfig ? storedAttrs.text.text : storedAttrs.text;
26193
+ graphicAttributes.maxLineWidth = maxWidth === 1 / 0 ? storedAttrs.maxLineWidth : maxWidth, isTextConfig ? "html" === storedAttrs.text.type ? (graphicAttributes.html = {
26194
+ dom: text,
26195
+ width: null !== (_c = nextAttrs.width) && void 0 !== _c ? _c : maxWidth,
26196
+ height: null !== (_d = nextAttrs.height) && void 0 !== _d ? _d : nextAttrs.fontSize,
26197
+ anchorType: "position"
26198
+ }, graphicAttributes.text = "") : "rich" === storedAttrs.text.type ? graphicAttributes.textConfig = text : graphicAttributes.text = text : graphicAttributes.text = text;
26199
+ },
26200
+ storedAttrs: "limitAttrs"
26201
+ }],
26202
+ [GrammarMarkType.rule]: [{
26203
+ channels: ["x", "y", "x1", "y1"],
26204
+ transform: (graphicAttributes, nextAttrs, storedAttrs) => {
26205
+ const points = getRulePoints(storedAttrs);
26206
+ graphicAttributes.points = points, graphicAttributes.x = 0, graphicAttributes.y = 0;
26207
+ },
26208
+ storedAttrs: "pointAttrs"
26209
+ }],
26210
+ [GrammarMarkType.symbol]: [{
26211
+ channels: ["shape", "symbolType"],
26212
+ transform: (graphicAttributes, nextAttrs, storedAttrs) => {
26213
+ var _a;
26214
+ graphicAttributes.symbolType = null !== (_a = nextAttrs.shape) && void 0 !== _a ? _a : nextAttrs.symbolType;
26215
+ }
26216
+ }, {
26217
+ channels: ["image", "fill", "background"],
26218
+ transform: (graphicAttributes, nextAttrs, storedAttrs) => {
26219
+ nextAttrs.image ? (graphicAttributes.background = nextAttrs.image, graphicAttributes.fill = !1) : storedAttrs.image ? (graphicAttributes.background = storedAttrs.image, graphicAttributes.fill = !1) : (graphicAttributes.fill = storedAttrs.fill, graphicAttributes.background = storedAttrs.background);
26220
+ },
26221
+ storedAttrs: "imageAttrs"
26222
+ }],
26223
+ [GrammarMarkType.richtext]: [{
26224
+ channels: ["text", "textConfig"],
26225
+ transform: (graphicAttributes, nextAttrs, storedAttrs) => {
26226
+ var _a, _b, _c, _d;
26227
+ graphicAttributes.text = null, "rich" === (null === (_a = nextAttrs.text) || void 0 === _a ? void 0 : _a.type) ? graphicAttributes.textConfig = nextAttrs.text.text : "html" === (null === (_b = nextAttrs.textConfig) || void 0 === _b ? void 0 : _b.type) ? (graphicAttributes.html = {
26228
+ dom: nextAttrs.textConfig.text,
26229
+ width: nextAttrs.width,
26230
+ height: null !== (_c = nextAttrs.height) && void 0 !== _c ? _c : nextAttrs.fontSize,
26231
+ anchorType: "position"
26232
+ }, graphicAttributes.text = "") : "rich" === (null === (_d = nextAttrs.textConfig) || void 0 === _d ? void 0 : _d.type) ? graphicAttributes.textConfig = nextAttrs.textConfig.text : graphicAttributes.textConfig = nextAttrs.textConfig;
26233
+ }
26234
+ }]
26235
+ };
26236
+ function cloneTransformAttributes(markType, attributes) {
26237
+ var _a;
26238
+ return (null !== (_a = transformsByType[markType]) && void 0 !== _a ? _a : []).reduce((clonedAttributes, transform) => (transform.channels.forEach(channel => {
26239
+ has$1(attributes, channel) && (clonedAttributes[channel] = attributes[channel]);
26240
+ }), clonedAttributes), {});
26241
+ }
26242
+ const transformAttributes = (markType, nextAttrs, element, markName) => {
26243
+ const graphicAttributes = {},
26244
+ changedKeys = nextAttrs ? Object.keys(nextAttrs) : [],
26245
+ transforms = isString$1(markType) ? transformsByType[markType] : markType;
26246
+ if (null == transforms ? void 0 : transforms.length) {
26247
+ const tags = [];
26248
+ changedKeys.forEach(key => {
26249
+ let isTransformed = !1;
26250
+ transforms.forEach((transform, index) => {
26251
+ if (transform.channels.includes(key)) {
26252
+ if (!tags[index]) if (transform.storedAttrs) {
26253
+ const storedAttrs = storeOriginAttributes(transform.storedAttrs, transform.channels, graphicAttributes, nextAttrs, element, markName);
26254
+ transform.transform(graphicAttributes, nextAttrs, storedAttrs);
26255
+ } else transform.transform(graphicAttributes, nextAttrs, null);
26256
+ tags[index] = !0, isTransformed = !0;
26257
+ }
26258
+ }), isTransformed || (commonAttributes.includes(key) ? transformCommonAttribute(graphicAttributes, key, nextAttrs) : graphicAttributes[key] = nextAttrs[key]);
26259
+ });
26260
+ } else changedKeys.forEach(key => {
26261
+ commonAttributes.includes(key) ? transformCommonAttribute(graphicAttributes, key, nextAttrs) : graphicAttributes[key] = nextAttrs[key];
26262
+ });
26263
+ return graphicAttributes;
26264
+ };
26265
+
26266
+ const isStopsEqual = (prev, next) => {
26267
+ var _a, _b;
26268
+ if (prev === next) return !0;
26269
+ const prevLength = null !== (_a = prev && prev.length) && void 0 !== _a ? _a : 0;
26270
+ return prevLength === (null !== (_b = next && next.length) && void 0 !== _b ? _b : 0) && 0 !== prevLength && prev.every((prevEntry, prevIndex) => !prevEntry && !next[prevIndex] || prevEntry && next[prevIndex] && prevEntry.color === next[prevIndex].color && prevEntry.offset === next[prevIndex].offset);
26271
+ },
26272
+ isColorAttrEqual = (prev, next) => {
26273
+ if (prev === next) return !0;
26274
+ if (typeof prev != typeof next) return !1;
26275
+ if (isString$1(prev)) return !1;
26276
+ if (prev.gradient !== next.gradient) return !1;
26277
+ const prevKeys = Object.keys(prev),
26278
+ nextKeys = Object.keys(next);
26279
+ return prevKeys.length === nextKeys.length && prevKeys.every(key => "stops" === key ? isStopsEqual(prev[key], next[key]) : prev[key] === next[key]);
26280
+ },
26281
+ isLineDashEqual = (prev, next) => prev.length === next.length && prev.join("-") === next.join("-"),
26282
+ isSegmentAttrEqual = (prev, next, key) => !(!isNil$1(prev) || !isNil$1(next)) || !isNil$1(prev) && !isNil$1(next) && ("lineDash" === key ? isLineDashEqual(prev, next) : "stroke" === key || "fill" === key ? isColorAttrEqual(prev, next) : prev === next),
26283
+ fillAttrs = ["fill", "fillOpacity", "background", "texture", "texturePadding", "textureSize", "textureColor"],
26284
+ strokeAttrs = ["stroke", "strokeOpacity", "lineDash", "lineDashOffset", "lineCap", "lineJoin", "lineWidth", "miterLimit"],
26285
+ areaAttrs = fillAttrs.concat(strokeAttrs);
26286
+ function getLineSegmentConfigs(items, points, element) {
26287
+ var _a;
26288
+ if (!items || items.length <= 1) return null;
26289
+ const checkAttributes = "area" === (null === (_a = null == element ? void 0 : element.mark) || void 0 === _a ? void 0 : _a.markType) ? areaAttrs : strokeAttrs,
26290
+ segments = [];
26291
+ let prevSegmentAttrs = null;
26292
+ return items.forEach((item, index) => {
26293
+ prevSegmentAttrs && checkAttributes.every(key => isSegmentAttrEqual(prevSegmentAttrs[key], item[key], key)) || (segments.length && (segments[segments.length - 1].endIndex = index), prevSegmentAttrs = item, segments.push({
26294
+ attrs: prevSegmentAttrs,
26295
+ startIndex: index
26296
+ }));
26297
+ }), segments.length >= 2 ? segments.map(entry => {
26298
+ const res = transformAttributes(GrammarMarkType.line, entry.attrs, element);
26299
+ return res.points = points.slice(entry.startIndex, isNil$1(entry.endIndex) ? points.length : entry.endIndex), res;
26300
+ }) : null;
26301
+ }
26302
+ function getLinePointsFromSegments(segments) {
26303
+ return segments ? segments.reduce((points, segment) => points.concat(segment.points), []) : null;
26304
+ }
26305
+
26291
26306
  let Element$1 = class Element {
26292
26307
  constructor(mark) {
26293
26308
  this.data = null, this.states = [], this.diffState = DiffState.enter, this.isReserved = !1, this.runtimeStatesEncoder = null, this.items = [], this.getStateAttrs = (stateName, nextStates) => {
@@ -41499,7 +41514,7 @@
41499
41514
  title: viewOptions.rendererTitle,
41500
41515
  beforeRender: viewOptions.beforeRender,
41501
41516
  afterRender: viewOptions.afterRender,
41502
- disableDirtyBounds: !!viewOptions.disableDirtyBounds,
41517
+ disableDirtyBounds: !0,
41503
41518
  autoRender: !0,
41504
41519
  pluginList: viewOptions.pluginList,
41505
41520
  enableHtmlAttribute: viewOptions.enableHtmlAttribute
@@ -41980,7 +41995,7 @@
41980
41995
  value: null !== (_b = option[SIGNAL_HEIGHT]) && void 0 !== _b ? _b : 0
41981
41996
  }, {
41982
41997
  id: SIGNAL_PADDING,
41983
- value: normalizePadding(null !== (_d = null !== (_c = option[SIGNAL_PADDING]) && void 0 !== _c ? _c : config[SIGNAL_PADDING]) && void 0 !== _d ? _d : theme.padding)
41998
+ value: normalizePadding(null !== (_d = null !== (_c = option[SIGNAL_PADDING]) && void 0 !== _c ? _c : config[SIGNAL_PADDING]) && void 0 !== _d ? _d : null == theme ? void 0 : theme.padding)
41984
41999
  }, {
41985
42000
  id: SIGNAL_VIEW_WIDTH,
41986
42001
  update: {
@@ -43203,7 +43218,7 @@
43203
43218
  const currentData = null != data ? data : DefaultMarkData;
43204
43219
  isCollectionMark || this.differ.setCurrentData(groupData(currentData, datum => `${groupKeyGetter(datum)}-${keyGetter(datum)}`, void 0)), this.differ.doDiff(), enterElements.forEach(element => {
43205
43220
  this.elementMap.delete(isCollectionMark ? element.groupKey : `${element.groupKey}-${element.key}`), element.remove(), element.release();
43206
- }), this.elements = elements, sort && this.elements.sort((elementA, elementB) => sort(elementA.getDatum(), elementB.getDatum()));
43221
+ }), this.elements = elements, sort && this.elements.length >= 2 && this.elements.sort((elementA, elementB) => sort(elementA.getDatum(), elementB.getDatum()));
43207
43222
  }
43208
43223
  evaluateState(elements, stateSpec, parameters) {
43209
43224
  stateSpec && elements.forEach(element => {
@@ -44401,7 +44416,7 @@
44401
44416
 
44402
44417
  class ViewAnimate {
44403
44418
  constructor(view) {
44404
- this._animations = [], this._additionalAnimateMarks = [], this._onAnimationStart = event => {
44419
+ this._animations = [], this._additionalAnimateMarks = [], this.isEnabled = !0, this._onAnimationStart = event => {
44405
44420
  this._additionalAnimateMarks = this._additionalAnimateMarks.filter(mark => {
44406
44421
  var _a;
44407
44422
  return null === (_a = null == mark ? void 0 : mark.animate) || void 0 === _a ? void 0 : _a.isAnimating();
@@ -44444,13 +44459,13 @@
44444
44459
  }), this;
44445
44460
  }
44446
44461
  enable() {
44447
- return this._view.traverseMarkTree(mark => {
44462
+ return this.isEnabled = !0, this._view.traverseMarkTree(mark => {
44448
44463
  var _a, _b;
44449
44464
  null === (_b = null === (_a = mark.animate) || void 0 === _a ? void 0 : _a.enable) || void 0 === _b || _b.call(_a);
44450
44465
  }), this;
44451
44466
  }
44452
44467
  disable() {
44453
- return this._view.traverseMarkTree(mark => {
44468
+ return this.isEnabled = !1, this._view.traverseMarkTree(mark => {
44454
44469
  var _a, _b;
44455
44470
  null === (_b = null === (_a = mark.animate) || void 0 === _a ? void 0 : _a.disable) || void 0 === _b || _b.call(_a);
44456
44471
  }), this._additionalAnimateMarks.forEach(mark => {
@@ -44477,9 +44492,9 @@
44477
44492
  });
44478
44493
  }
44479
44494
  animate() {
44480
- return this._view.traverseMarkTree(mark => {
44495
+ return this.isEnabled ? (this._view.traverseMarkTree(mark => {
44481
44496
  mark.isUpdated && mark.animate && mark.animate.animate(), mark.cleanExitElements(), mark.isUpdated = !1;
44482
- }, null, !0), this;
44497
+ }, null, !0), this) : this;
44483
44498
  }
44484
44499
  animateAddition(additionMark) {
44485
44500
  return additionMark.animate.animate(), this._additionalAnimateMarks.push(additionMark), this;
@@ -44489,120 +44504,6 @@
44489
44504
  }
44490
44505
  }
44491
44506
 
44492
- class Interval extends Mark {
44493
- encodeState(state, channel, value) {
44494
- return super.encodeState(state, channel, value), this._updateComponentEncoders(state), this;
44495
- }
44496
- _updateComponentEncoders(state) {
44497
- this._encoders || (this._encoders = {});
44498
- const userEncoder = this.spec.encode[state];
44499
- if (userEncoder && "update" === state) {
44500
- const params = this.parameters(),
44501
- scales = isFunctionType(userEncoder) ? null : Object.keys(userEncoder).reduce((res, channel) => (isScaleEncode(userEncoder[channel]) && (res[channel] = getGrammarOutput(userEncoder[channel].scale, params)), res), {});
44502
- this._encoders[state] = {
44503
- callback: (datum, element, parameters) => {
44504
- var _a, _b, _c;
44505
- const userEncodeRes = invokeEncoder(userEncoder, datum, element, parameters);
44506
- if (this.disableCoordinateTransform = !1, scales && scales.x && scales.x.type === ScaleEnum.Band) {
44507
- if (!isNil$1(scales.y)) {
44508
- const domain = scales.y.domain(),
44509
- min = Math.min.apply(null, domain),
44510
- max = Math.max.apply(null, domain),
44511
- baseValue = min > 0 ? min : max < 0 ? max : 0;
44512
- userEncodeRes.y1 = scales.y.scale(baseValue);
44513
- }
44514
- const bandWidth = scales.x.bandwidth();
44515
- userEncodeRes.x = userEncodeRes.x + bandWidth / 4, userEncodeRes.x1 = userEncodeRes.x + bandWidth / 2;
44516
- } else if (scales && scales.y && scales.y.type === ScaleEnum.Band) {
44517
- if (!isNil$1(scales.x)) {
44518
- const domain = scales.x.domain(),
44519
- min = Math.min.apply(null, domain),
44520
- max = Math.max.apply(null, domain),
44521
- baseValue = min > 0 ? min : max < 0 ? max : 0;
44522
- userEncodeRes.x1 = scales.x.scale(baseValue);
44523
- }
44524
- const bandWidth = scales.y.bandwidth();
44525
- userEncodeRes.y = userEncodeRes.y + bandWidth / 4, userEncodeRes.y1 = userEncodeRes.y + bandWidth / 2;
44526
- }
44527
- if (scales) {
44528
- const coord = (null !== (_b = this.view.getScaleById(null === (_a = userEncoder.x) || void 0 === _a ? void 0 : _a.scale)) && void 0 !== _b ? _b : this.view.getScaleById(null === (_c = userEncoder.y) || void 0 === _c ? void 0 : _c.scale)).getCoordinate();
44529
- if (coord && "polar" === coord.type) {
44530
- this.disableCoordinateTransform = !0;
44531
- const origin = coord.origin();
44532
- userEncodeRes.cx = origin.x, userEncodeRes.cy = origin.y;
44533
- }
44534
- }
44535
- return userEncodeRes;
44536
- }
44537
- };
44538
- } else this._encoders[state] = userEncoder;
44539
- }
44540
- _getEncoders() {
44541
- var _a;
44542
- return null !== (_a = this._encoders) && void 0 !== _a ? _a : {};
44543
- }
44544
- getAttributeTransforms() {
44545
- return this.coord && "polar" === this.coord.output().type ? [{
44546
- channels: ["x", "y", "x1", "y1", "cx", "cy"],
44547
- transform: (graphicAttributes, nextAttrs, storedAttrs) => {
44548
- graphicAttributes.x = storedAttrs.cx, graphicAttributes.y = storedAttrs.cy, this.coord.output().isTransposed() ? (graphicAttributes.startAngle = storedAttrs.y, graphicAttributes.endAngle = storedAttrs.y1, graphicAttributes.innerRadius = storedAttrs.x, graphicAttributes.outerRadius = storedAttrs.x1) : (graphicAttributes.startAngle = storedAttrs.x, graphicAttributes.endAngle = storedAttrs.x1, graphicAttributes.innerRadius = storedAttrs.y, graphicAttributes.outerRadius = storedAttrs.y1);
44549
- },
44550
- storedAttrs: "sizeAttrs"
44551
- }] : transformsByType.rect;
44552
- }
44553
- addGraphicItem(attrs, groupKey) {
44554
- const graphicItem = createGraphicItem(this, this.coord && "polar" === this.coord.output().type ? GrammarMarkType.arc : GrammarMarkType.rect, attrs);
44555
- return super.addGraphicItem(attrs, groupKey, graphicItem);
44556
- }
44557
- release() {
44558
- super.release(), this._encoders = null;
44559
- }
44560
- }
44561
-
44562
- class Cell extends Mark {
44563
- encodeState(state, channel, value) {
44564
- return super.encodeState(state, channel, value), this._updateComponentEncoders(state), this;
44565
- }
44566
- _updateComponentEncoders(state) {
44567
- this._encoders || (this._encoders = {});
44568
- const userEncoder = this.spec.encode[state];
44569
- if (userEncoder && "update" === state) {
44570
- const params = this.parameters(),
44571
- scales = isFunctionType(userEncoder) ? null : Object.keys(userEncoder).reduce((res, channel) => (isScaleEncode(userEncoder[channel]) && (res[channel] = getGrammarOutput(userEncoder[channel].scale, params)), res), {});
44572
- this._encoders[state] = {
44573
- callback: (datum, element, parameters) => {
44574
- const userEncodeRes = invokeEncoder(userEncoder, datum, element, parameters);
44575
- if (isNil$1(userEncodeRes.size)) {
44576
- const sizeX = scales.x ? getBandWidthOfScale(scales.x) : void 0,
44577
- sizeY = scales.y ? getBandWidthOfScale(scales.y) : void 0;
44578
- isNil$1(sizeX) && isNil$1(sizeY) ? userEncodeRes.size = 10 : isNil$1(sizeX) ? userEncodeRes.size = sizeY : isNil$1(sizeY) && (userEncodeRes.size = sizeX), userEncodeRes.size = [sizeX, sizeY];
44579
- }
44580
- return isNil$1(userEncodeRes.shape) && (userEncodeRes.shape = "rect"), userEncodeRes;
44581
- }
44582
- };
44583
- } else this._encoders[state] = userEncoder;
44584
- }
44585
- _getEncoders() {
44586
- var _a;
44587
- return null !== (_a = this._encoders) && void 0 !== _a ? _a : {};
44588
- }
44589
- getAttributeTransforms() {
44590
- return [{
44591
- channels: ["size", "padding"],
44592
- transform: (graphicAttributes, nextAttrs, storedAttrs) => {
44593
- if (isNumber$2(storedAttrs.padding) && storedAttrs.padding > 0) graphicAttributes.size = isArray$1(storedAttrs.size) ? storedAttrs.size.map(entry => Math.max(entry - storedAttrs.padding, 1)) : Math.max(storedAttrs.size - storedAttrs.padding, 1);else if (isArray$1(storedAttrs.padding) && 2 === storedAttrs.padding.length) {
44594
- const arraySize = isArray$1(storedAttrs.size) ? storedAttrs.size : [storedAttrs.size, storedAttrs.size];
44595
- graphicAttributes.size = [Math.max(arraySize[0] - storedAttrs.padding[0], 1), Math.max(arraySize[1] - storedAttrs.padding[1], 1)];
44596
- } else graphicAttributes.size = storedAttrs.size;
44597
- },
44598
- storedAttrs: "paddingAttrs"
44599
- }].concat(transformsByType.symbol);
44600
- }
44601
- release() {
44602
- super.release(), this._encoders = null;
44603
- }
44604
- }
44605
-
44606
44507
  class Text extends Mark {
44607
44508
  addGraphicItem(initAttrs, groupKey) {
44608
44509
  const textConfig = null == initAttrs ? void 0 : initAttrs.text,
@@ -44618,6 +44519,7 @@
44618
44519
  super.release();
44619
44520
  }
44620
44521
  }
44522
+ Text.markType = GrammarMarkType.text;
44621
44523
 
44622
44524
  const axis = {
44623
44525
  label: {
@@ -45426,17 +45328,11 @@
45426
45328
  case GrammarMarkType.component:
45427
45329
  mark = Factory$1.hasComponent(null == markOptions ? void 0 : markOptions.componentType) ? Factory$1.createComponent(null == markOptions ? void 0 : markOptions.componentType, this, groupMark, null == markOptions ? void 0 : markOptions.mode) : new Component(this, null == markOptions ? void 0 : markOptions.componentType, groupMark, null == markOptions ? void 0 : markOptions.mode);
45428
45330
  break;
45429
- case GrammarMarkType.interval:
45430
- mark = new Interval(this, type, groupMark);
45431
- break;
45432
- case GrammarMarkType.cell:
45433
- mark = new Cell(this, type, groupMark);
45434
- break;
45435
45331
  case GrammarMarkType.text:
45436
45332
  mark = new Text(this, type, groupMark);
45437
45333
  break;
45438
45334
  default:
45439
- mark = new Mark(this, type, groupMark);
45335
+ mark = Factory$1.hasMark(type) ? Factory$1.createMark(type, this, groupMark) : new Mark(this, type, groupMark);
45440
45336
  }
45441
45337
  return this.grammars.record(mark), this._dataflow.add(mark), mark;
45442
45338
  }
@@ -45556,7 +45452,7 @@
45556
45452
  return this.removeAllInteractions(), this.removeAllGrammars(), this.parseSpec(spec);
45557
45453
  }
45558
45454
  parseBuiltIn() {
45559
- builtInSignals(this._options, this._config, this.getCurrentTheme()).map(signalSpec => {
45455
+ builtInSignals(this._options, this._config, this.getCurrentTheme()).forEach(signalSpec => {
45560
45456
  const signal = this.signal().parse(signalSpec);
45561
45457
  signalSpec.value && signal.set(signalSpec.value);
45562
45458
  });
@@ -45592,8 +45488,8 @@
45592
45488
  });
45593
45489
  }
45594
45490
  theme(theme) {
45595
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
45596
- return isString$1(theme) ? this._theme = null !== (_a = ThemeManager$1.getTheme(theme)) && void 0 !== _a ? _a : ThemeManager$1.getDefaultTheme() : this._theme = theme, this.background(null !== (_d = null !== (_c = null === (_b = this._spec) || void 0 === _b ? void 0 : _b.background) && void 0 !== _c ? _c : this._options.background) && void 0 !== _d ? _d : this._theme.background), this.padding(null !== (_g = null !== (_f = null === (_e = this._spec) || void 0 === _e ? void 0 : _e.padding) && void 0 !== _f ? _f : this._options.padding) && void 0 !== _g ? _g : this._theme.padding), null === (_j = null === (_h = this.renderer.stage()) || void 0 === _h ? void 0 : _h.setTheme) || void 0 === _j || _j.call(_h, Object.assign({}, this._theme.marks)), this;
45491
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
45492
+ return isString$1(theme) ? this._theme = null !== (_a = ThemeManager$1.getTheme(theme)) && void 0 !== _a ? _a : ThemeManager$1.getDefaultTheme() : this._theme = theme, this._theme ? (this.background(null !== (_d = null !== (_c = null === (_b = this._spec) || void 0 === _b ? void 0 : _b.background) && void 0 !== _c ? _c : this._options.background) && void 0 !== _d ? _d : this._theme.background), this.padding(null !== (_g = null !== (_f = null === (_e = this._spec) || void 0 === _e ? void 0 : _e.padding) && void 0 !== _f ? _f : this._options.padding) && void 0 !== _g ? _g : this._theme.padding), null === (_j = null === (_h = this.renderer.stage()) || void 0 === _h ? void 0 : _h.setTheme) || void 0 === _j || _j.call(_h, Object.assign({}, this._theme.marks))) : (this.background(null !== (_l = null === (_k = this._spec) || void 0 === _k ? void 0 : _k.background) && void 0 !== _l ? _l : this._options.background), this.padding(null !== (_o = null === (_m = this._spec) || void 0 === _m ? void 0 : _m.padding) && void 0 !== _o ? _o : this._options.padding)), this;
45597
45493
  }
45598
45494
  getCurrentTheme() {
45599
45495
  return this._theme;
@@ -45718,7 +45614,7 @@
45718
45614
  const normalizedRunningConfig = normalizeRunningConfig(runningConfig);
45719
45615
  this.reuseCachedGrammars(normalizedRunningConfig);
45720
45616
  const grammarWillDetach = this._cachedGrammars.size() > 0;
45721
- this.detachCachedGrammar();
45617
+ grammarWillDetach && this.detachCachedGrammar();
45722
45618
  const hasResize = this._resizeRenderer(),
45723
45619
  hasUpdate = this._dataflow.hasCommitted();
45724
45620
  return grammarWillDetach || hasUpdate || this._layoutState || hasResize ? (this.clearProgressive(), yield this._dataflow.evaluate(), this._needBuildLayoutTree && (this.buildLayoutTree(), this._needBuildLayoutTree = !1), this._layoutState && (this._layoutState = LayoutState.layouting, this.doLayout(), this._dataflow.hasCommitted() && (this._layoutState = LayoutState.reevaluate, yield this._dataflow.evaluate()), this._layoutState = LayoutState.after, (null === (_a = this._layoutMarks) || void 0 === _a ? void 0 : _a.length) && this.handleLayoutEnd()), this._layoutState = null, this.findProgressiveMarks(), this._resizeRenderer(), this.doRender(!1), null === (_b = this._willMorphMarks) || void 0 === _b || _b.forEach(morphMarks => {
@@ -45731,7 +45627,7 @@
45731
45627
  const normalizedRunningConfig = normalizeRunningConfig(runningConfig);
45732
45628
  this.reuseCachedGrammars(normalizedRunningConfig);
45733
45629
  const grammarWillDetach = this._cachedGrammars.size() > 0;
45734
- this.detachCachedGrammar();
45630
+ grammarWillDetach && this.detachCachedGrammar();
45735
45631
  const hasResize = this._resizeRenderer(),
45736
45632
  hasUpdate = this._dataflow.hasCommitted();
45737
45633
  return grammarWillDetach || hasUpdate || this._layoutState || hasResize ? (this.clearProgressive(), this._dataflow.evaluateSync(), this._needBuildLayoutTree && (this.buildLayoutTree(), this._needBuildLayoutTree = !1), this._layoutState && (this._layoutState = LayoutState.layouting, this.doLayout(), this._dataflow.hasCommitted() && (this._layoutState = LayoutState.reevaluate, this._dataflow.evaluateSync()), this._layoutState = LayoutState.after, (null === (_a = this._layoutMarks) || void 0 === _a ? void 0 : _a.length) && this.handleLayoutEnd()), this._layoutState = null, this.findProgressiveMarks(), this._resizeRenderer(), this.doRender(!0), null === (_b = this._willMorphMarks) || void 0 === _b || _b.forEach(morphMarks => {
@@ -45972,12 +45868,9 @@
45972
45868
  }
45973
45869
  initialize() {
45974
45870
  var _a;
45975
- this.grammars = new RecordedGrammars(grammar => grammar.id(), (key, grammar) => this.logger.warn(`Grammar id '${key}' has been occupied`, grammar)), this._cachedGrammars = new RecordedTreeGrammars(grammar => grammar.id()), this._options.logger && Logger.setInstance(this._options.logger), this.logger = Logger.getInstance(null !== (_a = this._options.logLevel) && void 0 !== _a ? _a : 0), this._dataflow = new Dataflow(), this.animate = new ViewAnimate(this), this._morph = new Morph(), this._theme = ThemeManager$1.getDefaultTheme(), this._options.hooks && (Object.keys(this._options.hooks).forEach(key => {
45871
+ this.grammars = new RecordedGrammars(grammar => grammar.id(), (key, grammar) => this.logger.warn(`Grammar id '${key}' has been occupied`, grammar)), this._cachedGrammars = new RecordedTreeGrammars(grammar => grammar.id()), this._options.logger && Logger.setInstance(this._options.logger), this.logger = Logger.getInstance(null !== (_a = this._options.logLevel) && void 0 !== _a ? _a : 0), this._dataflow = new Dataflow(), this.animate = new ViewAnimate(this), this._morph = new Morph(), this._options.hooks && (Object.keys(this._options.hooks).forEach(key => {
45976
45872
  this.on(key, this._options.hooks[key]);
45977
- }), this.hooks = this._options.hooks), this.container = null, this.renderer = null, this._eventListeners = [], this._eventConfig = initializeEventConfig(this._options.eventConfig), this._theme = ThemeManager$1.getDefaultTheme(), this.parseBuiltIn(), configureEnvironment(this._options), this.initializeRenderer(), this._eventConfig.disable || this.initEvent(), this._bindResizeEvent(), this._currentDataflow = null, this._needBuildLayoutTree = !0, this._layoutState = LayoutState.before, this.theme(this._theme);
45978
- }
45979
- normalBrowserEnv() {
45980
- return "browser" === this._options.mode;
45873
+ }), this.hooks = this._options.hooks), this.container = null, this.renderer = null, this._eventListeners = [], this._eventConfig = initializeEventConfig(this._options.eventConfig), this._theme = this._options.disableTheme ? null : ThemeManager$1.getDefaultTheme(), this.parseBuiltIn(), configureEnvironment(this._options), this.initializeRenderer(), this._eventConfig.disable || this.initEvent(), this._bindResizeEvent(), this._currentDataflow = null, this._needBuildLayoutTree = !0, this._layoutState = LayoutState.before, this.theme(this._theme);
45981
45874
  }
45982
45875
  pauseProgressive() {
45983
45876
  return !1;
@@ -47935,15 +47828,16 @@
47935
47828
  });
47936
47829
 
47937
47830
  const moveIn = (element, options, animationParameters) => {
47938
- var _a, _b, _c, _d, _e;
47831
+ var _a, _b, _c;
47939
47832
  const offset = null !== (_a = null == options ? void 0 : options.offset) && void 0 !== _a ? _a : 0,
47940
47833
  groupBounds = animationParameters.group ? animationParameters.group.getBounds() : null,
47941
47834
  groupWidth = null !== (_b = null == groupBounds ? void 0 : groupBounds.width()) && void 0 !== _b ? _b : animationParameters.width,
47942
47835
  groupHeight = null !== (_c = null == groupBounds ? void 0 : groupBounds.height()) && void 0 !== _c ? _c : animationParameters.height,
47943
47836
  changedX = ("negative" === (null == options ? void 0 : options.orient) ? groupWidth : 0) + offset,
47944
47837
  changedY = ("negative" === (null == options ? void 0 : options.orient) ? groupHeight : 0) + offset,
47945
- fromX = isValidNumber$1(null === (_d = null == options ? void 0 : options.point) || void 0 === _d ? void 0 : _d.x) ? options.point.x : changedX,
47946
- fromY = isValidNumber$1(null === (_e = null == options ? void 0 : options.point) || void 0 === _e ? void 0 : _e.y) ? options.point.y : changedY;
47838
+ point = isFunction$1(null == options ? void 0 : options.point) ? options.point.call(null, element.getDatum(), element, animationParameters) : null == options ? void 0 : options.point,
47839
+ fromX = isValidNumber$1(null == point ? void 0 : point.x) ? point.x : changedX,
47840
+ fromY = isValidNumber$1(null == point ? void 0 : point.y) ? point.y : changedY;
47947
47841
  switch (null == options ? void 0 : options.direction) {
47948
47842
  case "x":
47949
47843
  return {
@@ -47977,15 +47871,16 @@
47977
47871
  }
47978
47872
  };
47979
47873
  const moveOut = (element, options, animationParameters) => {
47980
- var _a, _b, _c, _d, _e;
47874
+ var _a, _b, _c;
47981
47875
  const offset = null !== (_a = null == options ? void 0 : options.offset) && void 0 !== _a ? _a : 0,
47982
47876
  groupBounds = animationParameters.group ? animationParameters.group.getBounds() : null,
47983
47877
  groupWidth = null !== (_b = null == groupBounds ? void 0 : groupBounds.width()) && void 0 !== _b ? _b : animationParameters.width,
47984
47878
  groupHeight = null !== (_c = null == groupBounds ? void 0 : groupBounds.height()) && void 0 !== _c ? _c : animationParameters.height,
47985
47879
  changedX = ("negative" === (null == options ? void 0 : options.orient) ? groupWidth : 0) + offset,
47986
47880
  changedY = ("negative" === (null == options ? void 0 : options.orient) ? groupHeight : 0) + offset,
47987
- fromX = isValidNumber$1(null === (_d = null == options ? void 0 : options.point) || void 0 === _d ? void 0 : _d.x) ? options.point.x : changedX,
47988
- fromY = isValidNumber$1(null === (_e = null == options ? void 0 : options.point) || void 0 === _e ? void 0 : _e.y) ? options.point.y : changedY;
47881
+ point = isFunction$1(null == options ? void 0 : options.point) ? options.point.call(null, element.getDatum(), element, animationParameters) : null == options ? void 0 : options.point,
47882
+ fromX = isValidNumber$1(null == point ? void 0 : point.x) ? point.x : changedX,
47883
+ fromY = isValidNumber$1(null == point ? void 0 : point.y) ? point.y : changedY;
47989
47884
  switch (null == options ? void 0 : options.direction) {
47990
47885
  case "x":
47991
47886
  return {
@@ -48210,6 +48105,54 @@
48210
48105
  Factory$1.registerAnimationType("update", update);
48211
48106
  };
48212
48107
 
48108
+ class Cell extends Mark {
48109
+ encodeState(state, channel, value) {
48110
+ return super.encodeState(state, channel, value), this._updateComponentEncoders(state), this;
48111
+ }
48112
+ _updateComponentEncoders(state) {
48113
+ this._encoders || (this._encoders = {});
48114
+ const userEncoder = this.spec.encode[state];
48115
+ if (userEncoder && "update" === state) {
48116
+ const params = this.parameters(),
48117
+ scales = isFunctionType(userEncoder) ? null : Object.keys(userEncoder).reduce((res, channel) => (isScaleEncode(userEncoder[channel]) && (res[channel] = getGrammarOutput(userEncoder[channel].scale, params)), res), {});
48118
+ this._encoders[state] = {
48119
+ callback: (datum, element, parameters) => {
48120
+ const userEncodeRes = invokeEncoder(userEncoder, datum, element, parameters);
48121
+ if (isNil$1(userEncodeRes.size)) {
48122
+ const sizeX = scales.x ? getBandWidthOfScale(scales.x) : void 0,
48123
+ sizeY = scales.y ? getBandWidthOfScale(scales.y) : void 0;
48124
+ isNil$1(sizeX) && isNil$1(sizeY) ? userEncodeRes.size = 10 : isNil$1(sizeX) ? userEncodeRes.size = sizeY : isNil$1(sizeY) && (userEncodeRes.size = sizeX), userEncodeRes.size = [sizeX, sizeY];
48125
+ }
48126
+ return isNil$1(userEncodeRes.shape) && (userEncodeRes.shape = "rect"), userEncodeRes;
48127
+ }
48128
+ };
48129
+ } else this._encoders[state] = userEncoder;
48130
+ }
48131
+ _getEncoders() {
48132
+ var _a;
48133
+ return null !== (_a = this._encoders) && void 0 !== _a ? _a : {};
48134
+ }
48135
+ getAttributeTransforms() {
48136
+ return [{
48137
+ channels: ["size", "padding"],
48138
+ transform: (graphicAttributes, nextAttrs, storedAttrs) => {
48139
+ if (isNumber$2(storedAttrs.padding) && storedAttrs.padding > 0) graphicAttributes.size = isArray$1(storedAttrs.size) ? storedAttrs.size.map(entry => Math.max(entry - storedAttrs.padding, 1)) : Math.max(storedAttrs.size - storedAttrs.padding, 1);else if (isArray$1(storedAttrs.padding) && 2 === storedAttrs.padding.length) {
48140
+ const arraySize = isArray$1(storedAttrs.size) ? storedAttrs.size : [storedAttrs.size, storedAttrs.size];
48141
+ graphicAttributes.size = [Math.max(arraySize[0] - storedAttrs.padding[0], 1), Math.max(arraySize[1] - storedAttrs.padding[1], 1)];
48142
+ } else graphicAttributes.size = storedAttrs.size;
48143
+ },
48144
+ storedAttrs: "paddingAttrs"
48145
+ }].concat(transformsByType.symbol);
48146
+ }
48147
+ release() {
48148
+ super.release(), this._encoders = null;
48149
+ }
48150
+ }
48151
+ Cell.markType = GrammarMarkType.cell;
48152
+ const registerCellMark = () => {
48153
+ Factory$1.registerMark(GrammarMarkType.cell, Cell);
48154
+ };
48155
+
48213
48156
  const BASE_EVENTS = [
48214
48157
  'pointerdown',
48215
48158
  'pointerup',
@@ -48461,7 +48404,7 @@
48461
48404
  offset: 5,
48462
48405
  position: 'inside',
48463
48406
  style: {
48464
- fill: { type: 'palette', key: 'labelReverseFontColor' }
48407
+ fill: { type: 'palette', key: 'axisMarkerFontColor' }
48465
48408
  },
48466
48409
  minLabel: {
48467
48410
  position: minMaxPositionEnum.end
@@ -48692,7 +48635,7 @@
48692
48635
  visible: false,
48693
48636
  style: {
48694
48637
  fontSize: THEME_CONSTANTS.l5FontSize,
48695
- fill: { type: 'palette', key: 'axisFontColor' },
48638
+ fill: { type: 'palette', key: 'axisLabelFontColor' },
48696
48639
  fontWeight: 'normal',
48697
48640
  fillOpacity: 1
48698
48641
  }
@@ -48712,7 +48655,7 @@
48712
48655
  visible: false,
48713
48656
  style: {
48714
48657
  fontSize: THEME_CONSTANTS.l5FontSize,
48715
- fill: { type: 'palette', key: 'axisFontColor' },
48658
+ fill: { type: 'palette', key: 'axisLabelFontColor' },
48716
48659
  fontWeight: 'normal',
48717
48660
  fillOpacity: 1
48718
48661
  }
@@ -48769,7 +48712,7 @@
48769
48712
  space: 10,
48770
48713
  style: {
48771
48714
  fontSize: THEME_CONSTANTS.l5FontSize,
48772
- fill: { type: 'palette', key: 'axisFontColor' },
48715
+ fill: { type: 'palette', key: 'axisLabelFontColor' },
48773
48716
  fontWeight: 'normal',
48774
48717
  fillOpacity: 1
48775
48718
  }
@@ -48845,7 +48788,7 @@
48845
48788
  visible: false,
48846
48789
  style: {
48847
48790
  fontWeight: 'normal',
48848
- fill: { type: 'palette', key: 'labelReverseFontColor' },
48791
+ fill: { type: 'palette', key: 'axisMarkerFontColor' },
48849
48792
  fontSize: THEME_CONSTANTS.l5FontSize
48850
48793
  },
48851
48794
  labelBackground: {
@@ -48856,9 +48799,9 @@
48856
48799
  right: 2
48857
48800
  },
48858
48801
  style: {
48859
- fill: { type: 'palette', key: 'primaryFontColor' },
48802
+ fill: { type: 'palette', key: 'axisMarkerBackgroundColor' },
48860
48803
  outerBorder: {
48861
- stroke: { type: 'palette', key: 'primaryFontColor' },
48804
+ stroke: { type: 'palette', key: 'axisMarkerBackgroundColor' },
48862
48805
  distance: 0,
48863
48806
  lineWidth: 3
48864
48807
  },
@@ -48885,7 +48828,7 @@
48885
48828
  type: 'line',
48886
48829
  visible: true,
48887
48830
  style: {
48888
- stroke: { type: 'palette', key: 'secondaryFontColor' },
48831
+ stroke: { type: 'palette', key: 'markLineStrokeColor' },
48889
48832
  opacity: 0.7,
48890
48833
  lineDash: [2, 3]
48891
48834
  }
@@ -48911,15 +48854,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
48911
48854
  background: {
48912
48855
  size: 6,
48913
48856
  style: {
48914
- stroke: { type: 'palette', key: 'dataZoomHandlerStrokeColor' },
48857
+ stroke: { type: 'palette', key: 'dataZoomHandleStrokeColor' },
48915
48858
  cornerRadius: 2
48916
48859
  }
48917
48860
  },
48918
48861
  icon: {
48919
48862
  style: {
48920
48863
  size: 4,
48921
- fill: { type: 'palette', key: 'dataZoomHandlerFillColor' },
48922
- stroke: { type: 'palette', key: 'dataZoomHandlerStrokeColor' },
48864
+ fill: { type: 'palette', key: 'sliderHandleColor' },
48865
+ stroke: { type: 'palette', key: 'dataZoomHandleStrokeColor' },
48923
48866
  symbolType: 'M 0.3 -0.5 C 0.41 -0.5 0.5 -0.41 0.5 -0.3 C 0.5 -0.3 0.5 0.3 0.5 0.3 C 0.5 0.41 0.41 0.5 0.3 0.5 C 0.3 0.5 -0.3 0.5 -0.3 0.5 C -0.41 0.5 -0.5 0.41 -0.5 0.3 C -0.5 0.3 -0.5 -0.3 -0.5 -0.3 C -0.5 -0.41 -0.41 -0.5 -0.3 -0.5 C -0.3 -0.5 0.3 -0.5 0.3 -0.5 Z',
48924
48867
  lineWidth: 0.5
48925
48868
  }
@@ -48928,16 +48871,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
48928
48871
  background: {
48929
48872
  size: 20,
48930
48873
  style: {
48931
- fill: { type: 'palette', key: 'dataZoomBackgroundColor' },
48874
+ fill: { type: 'palette', key: 'sliderRailColor' },
48932
48875
  lineWidth: 0
48933
48876
  }
48934
48877
  },
48935
48878
  selectedBackground: {
48936
48879
  style: {
48937
- fill: { type: 'palette', key: 'dataZoomSelectedColor' },
48880
+ fill: { type: 'palette', key: 'sliderTrackColor' },
48938
48881
  fillOpacity: 0.1,
48939
48882
  outerBorder: {
48940
- stroke: { type: 'palette', key: 'dataZoomSelectedColor' },
48883
+ stroke: { type: 'palette', key: 'sliderTrackColor' },
48941
48884
  strokeOpacity: 0.2,
48942
48885
  distance: -0.5,
48943
48886
  lineWidth: 1
@@ -48963,10 +48906,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
48963
48906
  startHandler: {
48964
48907
  style: {
48965
48908
  symbolType: DataZoomHandlerSymbolType,
48966
- fill: { type: 'palette', key: 'dataZoomHandlerFillColor' },
48909
+ fill: { type: 'palette', key: 'sliderHandleColor' },
48967
48910
  scaleX: 1.2,
48968
48911
  scaleY: 1.2,
48969
- stroke: { type: 'palette', key: 'dataZoomHandlerStrokeColor' },
48912
+ stroke: { type: 'palette', key: 'dataZoomHandleStrokeColor' },
48970
48913
  lineWidth: 1,
48971
48914
  zIndex: 100
48972
48915
  }
@@ -48974,10 +48917,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
48974
48917
  endHandler: {
48975
48918
  style: {
48976
48919
  symbolType: DataZoomHandlerSymbolType,
48977
- fill: { type: 'palette', key: 'dataZoomHandlerFillColor' },
48920
+ fill: { type: 'palette', key: 'sliderHandleColor' },
48978
48921
  scaleX: 1.2,
48979
48922
  scaleY: 1.2,
48980
- stroke: { type: 'palette', key: 'dataZoomHandlerStrokeColor' },
48923
+ stroke: { type: 'palette', key: 'dataZoomHandleStrokeColor' },
48981
48924
  lineWidth: 1,
48982
48925
  zIndex: 100
48983
48926
  }
@@ -49032,7 +48975,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49032
48975
  visible: true,
49033
48976
  style: {
49034
48977
  fontSize: THEME_CONSTANTS.l2FontSize,
49035
- fill: { type: 'palette', key: 'secondaryFontColor' },
48978
+ fill: { type: 'palette', key: 'tertiaryFontColor' },
49036
48979
  fontWeight: 'normal',
49037
48980
  fillOpacity: 1,
49038
48981
  textBaseline: 'top',
@@ -49100,7 +49043,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49100
49043
  shadowBlur: 12,
49101
49044
  shadowOffsetX: 0,
49102
49045
  shadowOffsetY: 4,
49103
- shadowColor: { type: 'palette', key: 'shadowColor', a: 0.3 }
49046
+ shadowColor: { type: 'palette', key: 'shadowColor' }
49104
49047
  }
49105
49048
  };
49106
49049
  const colorLegend$1 = {
@@ -49108,14 +49051,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49108
49051
  width: 200,
49109
49052
  height: 8,
49110
49053
  style: {
49111
- fill: { type: 'palette', key: 'dataZoomBackgroundColor' }
49054
+ fill: { type: 'palette', key: 'sliderRailColor' }
49112
49055
  }
49113
49056
  }, handler: handlerTheme$2 }),
49114
49057
  vertical: Object.assign(Object.assign({}, DEFAULT_CONTINUOUS_LEGEND_THEME$1), { rail: {
49115
49058
  width: 8,
49116
49059
  height: 200,
49117
49060
  style: {
49118
- fill: { type: 'palette', key: 'dataZoomBackgroundColor' }
49061
+ fill: { type: 'palette', key: 'sliderRailColor' }
49119
49062
  }
49120
49063
  }, handler: handlerTheme$2 })
49121
49064
  };
@@ -49143,10 +49086,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49143
49086
  background: {
49144
49087
  state: {
49145
49088
  selectedHover: {
49146
- fill: { type: 'palette', key: 'axisGridColor' }
49089
+ fill: { type: 'palette', key: 'hoverBackgroundColor' }
49147
49090
  },
49148
49091
  unSelectedHover: {
49149
- fill: { type: 'palette', key: 'axisGridColor' }
49092
+ fill: { type: 'palette', key: 'hoverBackgroundColor' }
49150
49093
  }
49151
49094
  }
49152
49095
  },
@@ -49190,9 +49133,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49190
49133
  outerBorder: {
49191
49134
  lineWidth: 2,
49192
49135
  distance: 0.8,
49193
- stroke: { type: 'palette', key: 'dataZoomSelectedColor' }
49136
+ stroke: { type: 'palette', key: 'sliderTrackColor' }
49194
49137
  },
49195
- fill: { type: 'palette', key: 'dataZoomHandlerFillColor' }
49138
+ fill: { type: 'palette', key: 'sliderHandleColor' }
49196
49139
  }
49197
49140
  };
49198
49141
  const sizeLegend$1 = {
@@ -49200,26 +49143,26 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49200
49143
  fill: { type: 'palette', key: 'dataZoomChartColor' }
49201
49144
  }, track: {
49202
49145
  style: {
49203
- fill: { type: 'palette', key: 'dataZoomSelectedColor', a: 0.8 }
49146
+ fill: { type: 'palette', key: 'sliderTrackColor', a: 0.8 }
49204
49147
  }
49205
49148
  }, rail: {
49206
49149
  width: 200,
49207
49150
  height: 4,
49208
49151
  style: {
49209
- fill: { type: 'palette', key: 'dataZoomBackgroundColor' }
49152
+ fill: { type: 'palette', key: 'sliderRailColor' }
49210
49153
  }
49211
49154
  }, handler: handlerTheme$1 }),
49212
49155
  vertical: Object.assign(Object.assign({}, DEFAULT_CONTINUOUS_LEGEND_THEME$1), { sizeBackground: {
49213
49156
  fill: { type: 'palette', key: 'dataZoomChartColor' }
49214
49157
  }, track: {
49215
49158
  style: {
49216
- fill: { type: 'palette', key: 'dataZoomSelectedColor', a: 0.8 }
49159
+ fill: { type: 'palette', key: 'sliderTrackColor', a: 0.8 }
49217
49160
  }
49218
49161
  }, rail: {
49219
49162
  width: 4,
49220
49163
  height: 200,
49221
49164
  style: {
49222
- fill: { type: 'palette', key: 'dataZoomBackgroundColor' }
49165
+ fill: { type: 'palette', key: 'sliderRailColor' }
49223
49166
  }
49224
49167
  }, handler: handlerTheme$1 })
49225
49168
  };
@@ -49298,7 +49241,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49298
49241
  line: {
49299
49242
  style: {
49300
49243
  lineDash: [3, 3],
49301
- stroke: { type: 'palette', key: 'primaryFontColor' }
49244
+ stroke: { type: 'palette', key: 'markLineStrokeColor' }
49302
49245
  }
49303
49246
  },
49304
49247
  startSymbol: {
@@ -49306,9 +49249,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49306
49249
  symbolType: 'triangle',
49307
49250
  size: 10,
49308
49251
  style: {
49252
+ fill: { type: 'palette', key: 'markLineStrokeColor' },
49309
49253
  stroke: null,
49310
- lineWidth: 0,
49311
- fill: { type: 'palette', key: 'primaryFontColor' }
49254
+ lineWidth: 0
49312
49255
  }
49313
49256
  },
49314
49257
  endSymbol: {
@@ -49316,9 +49259,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49316
49259
  symbolType: 'triangle',
49317
49260
  size: 10,
49318
49261
  style: {
49262
+ fill: { type: 'palette', key: 'markLineStrokeColor' },
49319
49263
  stroke: null,
49320
- lineWidth: 0,
49321
- fill: { type: 'palette', key: 'primaryFontColor' }
49264
+ lineWidth: 0
49322
49265
  }
49323
49266
  },
49324
49267
  label: {
@@ -49353,12 +49296,21 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49353
49296
  size: 5,
49354
49297
  visible: true,
49355
49298
  style: {
49356
- fill: { type: 'palette', key: 'primaryFontColor' }
49299
+ fill: { type: 'palette', key: 'markLineStrokeColor' },
49300
+ stroke: null,
49301
+ lineWidth: 0
49302
+ }
49303
+ },
49304
+ endSymbol: {
49305
+ style: {
49306
+ fill: { type: 'palette', key: 'markLineStrokeColor' },
49307
+ stroke: null,
49308
+ lineWidth: 0
49357
49309
  }
49358
49310
  },
49359
49311
  line: {
49360
49312
  style: {
49361
- stroke: { type: 'palette', key: 'primaryFontColor' }
49313
+ stroke: { type: 'palette', key: 'markLineStrokeColor' }
49362
49314
  }
49363
49315
  }
49364
49316
  },
@@ -49377,17 +49329,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49377
49329
  slider: {
49378
49330
  space: 10,
49379
49331
  trackStyle: {
49380
- fill: { type: 'palette', key: 'dataZoomSelectedColor' },
49332
+ fill: { type: 'palette', key: 'sliderTrackColor' },
49381
49333
  fillOpacity: 0.8
49382
49334
  },
49383
49335
  railStyle: {
49384
- fill: { type: 'palette', key: 'dataZoomBackgroundColor' }
49336
+ fill: { type: 'palette', key: 'sliderRailColor' }
49385
49337
  },
49386
49338
  handlerStyle: {
49387
49339
  size: 15,
49388
49340
  stroke: { type: 'palette', key: 'backgroundColor' },
49389
49341
  lineWidth: 2,
49390
- fill: { type: 'palette', key: 'dataZoomSelectedColor' }
49342
+ fill: { type: 'palette', key: 'playerControllerColor' }
49391
49343
  }
49392
49344
  },
49393
49345
  controller: {
@@ -49396,7 +49348,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49396
49348
  space: 0,
49397
49349
  style: {
49398
49350
  size: 25,
49399
- fill: { type: 'palette', key: 'dataZoomSelectedColor' },
49351
+ fill: { type: 'palette', key: 'playerControllerColor' },
49400
49352
  fillOpacity: 0.8
49401
49353
  }
49402
49354
  },
@@ -49405,7 +49357,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49405
49357
  space: 0,
49406
49358
  style: {
49407
49359
  size: 25,
49408
- fill: { type: 'palette', key: 'dataZoomSelectedColor' },
49360
+ fill: { type: 'palette', key: 'playerControllerColor' },
49409
49361
  fillOpacity: 0.8
49410
49362
  }
49411
49363
  },
@@ -49415,7 +49367,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49415
49367
  position: 'start',
49416
49368
  style: {
49417
49369
  size: 12,
49418
- fill: { type: 'palette', key: 'dataZoomSelectedColor' },
49370
+ fill: { type: 'palette', key: 'playerControllerColor' },
49419
49371
  fillOpacity: 0.8
49420
49372
  }
49421
49373
  },
@@ -49425,7 +49377,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49425
49377
  position: 'end',
49426
49378
  style: {
49427
49379
  size: 12,
49428
- fill: { type: 'palette', key: 'dataZoomSelectedColor' },
49380
+ fill: { type: 'palette', key: 'playerControllerColor' },
49429
49381
  fillOpacity: 0.8
49430
49382
  }
49431
49383
  }
@@ -49445,7 +49397,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49445
49397
  subtextStyle: {
49446
49398
  fontSize: THEME_CONSTANTS.l4FontSize,
49447
49399
  lineHeight: THEME_CONSTANTS.l4LineHeight,
49448
- fill: { type: 'palette', key: 'secondaryFontColor' }
49400
+ fill: { type: 'palette', key: 'tertiaryFontColor' }
49449
49401
  }
49450
49402
  };
49451
49403
 
@@ -49461,9 +49413,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49461
49413
  right: 10,
49462
49414
  bottom: 10
49463
49415
  },
49464
- backgroundColor: { type: 'palette', key: 'tooltipBackgroundColor' },
49416
+ backgroundColor: { type: 'palette', key: 'popupBackgroundColor' },
49465
49417
  border: {
49466
- color: { type: 'palette', key: 'tooltipBackgroundColor' },
49418
+ color: { type: 'palette', key: 'popupBackgroundColor' },
49467
49419
  width: 0,
49468
49420
  radius: 3
49469
49421
  },
@@ -49472,7 +49424,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49472
49424
  y: 4,
49473
49425
  blur: 12,
49474
49426
  spread: 0,
49475
- color: { type: 'palette', key: 'shadowColor', a: 0.1 }
49427
+ color: { type: 'palette', key: 'shadowColor' }
49476
49428
  }
49477
49429
  },
49478
49430
  spaceRow: 6,
@@ -49518,17 +49470,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49518
49470
  },
49519
49471
  contentStyle: {
49520
49472
  fontSize: THEME_CONSTANTS.l5FontSize,
49521
- fill: { type: 'palette', key: 'secondaryFontColor' }
49473
+ fill: { type: 'palette', key: 'primaryFontColor' }
49522
49474
  },
49523
49475
  panel: {
49524
49476
  visible: true,
49525
- fill: { type: 'palette', key: 'tooltipBackgroundColor' },
49477
+ fill: { type: 'palette', key: 'popupBackgroundColor' },
49526
49478
  cornerRadius: 3,
49527
49479
  lineWidth: 0,
49528
49480
  shadowBlur: 12,
49529
49481
  shadowOffsetX: 0,
49530
49482
  shadowOffsetY: 4,
49531
- shadowColor: { type: 'palette', key: 'shadowColor', a: 0.1 },
49483
+ shadowColor: { type: 'palette', key: 'shadowColor' },
49532
49484
  size: 0,
49533
49485
  space: 12
49534
49486
  }
@@ -49553,7 +49505,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
49553
49505
  slider: {
49554
49506
  style: {
49555
49507
  fill: { type: 'palette', key: 'scrollBarSliderColor' },
49556
- fillOpacity: 0.5
49508
+ fillOpacity: 0.3
49557
49509
  }
49558
49510
  }
49559
49511
  };
@@ -50044,24 +49996,31 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
50044
49996
  palette: {
50045
49997
  backgroundColor: '#202226',
50046
49998
  borderColor: '#404349',
50047
- shadowColor: '#000000',
49999
+ shadowColor: 'rgba(0,0,0,0.1)',
50000
+ hoverBackgroundColor: '#404349',
50001
+ sliderRailColor: '#404349',
50002
+ sliderHandleColor: '#202226',
50003
+ sliderTrackColor: '#4284FF',
50004
+ popupBackgroundColor: '#404349',
50048
50005
  primaryFontColor: '#fdfdfd',
50049
- secondaryFontColor: '#888c93',
50050
- axisFontColor: '#bbbdc3',
50006
+ secondaryFontColor: '#bbbdc3',
50007
+ tertiaryFontColor: '#888c93',
50008
+ axisLabelFontColor: '#888c93',
50051
50009
  disableFontColor: '#55595f',
50052
- labelReverseFontColor: '#202226',
50010
+ axisMarkerFontColor: '#202226',
50053
50011
  axisGridColor: '#404349',
50054
50012
  axisDomainColor: '#4b4f54',
50055
- dataZoomHandlerStrokeColor: '#888c93',
50056
- dataZoomHandlerFillColor: '#202226',
50057
- dataZoomBackgroundColor: '#404349',
50013
+ dataZoomHandleStrokeColor: '#bbbdc3',
50058
50014
  dataZoomChartColor: '#55595F',
50059
- dataZoomSelectedColor: '#4284FF',
50015
+ playerControllerColor: '#4284FF',
50060
50016
  scrollBarSliderColor: '#ffffff',
50061
- tooltipBackgroundColor: '#404349',
50062
- markLabelBackgroundColor: '#f0bd30',
50063
- titleFontColor: '#fdfdfd',
50064
- labelFontColor: '#bbbdc3'
50017
+ axisMarkerBackgroundColor: '#fdfdfd',
50018
+ markLabelBackgroundColor: '#404349',
50019
+ markLineStrokeColor: '#bbbdc3',
50020
+ dangerColor: '#eb4b4b',
50021
+ warningColor: '#f0bd30',
50022
+ successColor: '#14b267',
50023
+ infoColor: '#4284ff'
50065
50024
  }
50066
50025
  }
50067
50026
  };
@@ -50897,10 +50856,30 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
50897
50856
  return bounds.x1 > x || bounds.x2 < x || bounds.y1 > y || bounds.y2 < y;
50898
50857
  }
50899
50858
  function min(data, field) {
50900
- return minInArray(data.map(d => +d[field]).filter(d => isValidNumber$1(d)));
50859
+ const dataArray = [];
50860
+ data.forEach(d => {
50861
+ const value = +d[field];
50862
+ if (isValidNumber$1(value)) {
50863
+ dataArray.push(value);
50864
+ }
50865
+ });
50866
+ if (dataArray.length === 0) {
50867
+ return null;
50868
+ }
50869
+ return minInArray(dataArray);
50901
50870
  }
50902
50871
  function max(data, field) {
50903
- return maxInArray(data.map(d => +d[field]).filter(d => isValidNumber$1(d)));
50872
+ const dataArray = [];
50873
+ data.forEach(d => {
50874
+ const value = +d[field];
50875
+ if (isValidNumber$1(value)) {
50876
+ dataArray.push(value);
50877
+ }
50878
+ });
50879
+ if (dataArray.length === 0) {
50880
+ return null;
50881
+ }
50882
+ return maxInArray(dataArray);
50904
50883
  }
50905
50884
  function sum(data, field) {
50906
50885
  return data.reduce((pre, _cur) => {
@@ -55937,7 +55916,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
55937
55916
  return;
55938
55917
  }
55939
55918
  const { enterStyles } = this._separateStyle();
55940
- this._product.encodeState(this._facet ? 'group' : 'enter', enterStyles);
55919
+ this._product.encodeState('group', enterStyles);
55941
55920
  }
55942
55921
  _separateStyle() {
55943
55922
  const _a = this.stateStyle, _b = STATE_VALUE_ENUM.STATE_NORMAL, normalStyle = _a[_b]; __rest$8(_a, [typeof _b === "symbol" ? _b : _b + ""]);
@@ -55966,7 +55945,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
55966
55945
  const _a = this.stateStyle, _b = STATE_VALUE_ENUM.STATE_NORMAL; _a[_b]; const temp = __rest$8(_a, [typeof _b === "symbol" ? _b : _b + ""]);
55967
55946
  const { enterStyles, updateStyles } = this._separateStyle();
55968
55947
  this._product.encode(updateStyles);
55969
- this._product.encodeState(this._facet ? 'group' : 'enter', enterStyles);
55948
+ this._product.encodeState('group', enterStyles);
55970
55949
  Object.keys(temp).forEach(state => {
55971
55950
  const styles = {};
55972
55951
  Object.keys(temp[state]).forEach(key => {
@@ -57812,7 +57791,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
57812
57791
  };
57813
57792
  registerVChartCore();
57814
57793
 
57815
- const version = "1.6.0";
57794
+ const version = "1.6.1-alpha.0";
57816
57795
 
57817
57796
  class ChartData {
57818
57797
  get dataList() {
@@ -64767,7 +64746,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64767
64746
  this.seriesType = exports.SeriesTypeEnum.map;
64768
64747
  }
64769
64748
  _getDefaultSeriesSpec(spec) {
64770
- const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { type: spec.type, nameField: spec.nameField, valueField: spec.valueField, seriesField: spec.seriesField, map: spec.map, nameProperty: spec.nameProperty, nameMap: spec.nameMap, area: spec.area, defaultFillColor: spec.defaultFillColor });
64749
+ const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { type: spec.type, nameField: spec.nameField, valueField: spec.valueField, seriesField: spec.seriesField, map: spec.map, nameProperty: spec.nameProperty, centroidProperty: spec.centroidProperty, nameMap: spec.nameMap, area: spec.area, defaultFillColor: spec.defaultFillColor });
64771
64750
  return series;
64772
64751
  }
64773
64752
  isValidSeries(type) {
@@ -65518,7 +65497,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65518
65497
  var _a, _b, _c;
65519
65498
  const animationParams = {
65520
65499
  growFrom: (datum, element, state) => {
65521
- var _a, _b;
65500
+ var _a;
65522
65501
  if (state === AnimationStateEnum.appear) {
65523
65502
  return this._startAngle;
65524
65503
  }
@@ -65535,11 +65514,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65535
65514
  if (markElements.find(e => { var _a; return ((_a = e.data[0]) === null || _a === void 0 ? void 0 : _a[DEFAULT_DATA_INDEX]) > dataIndex; }) === undefined) {
65536
65515
  return this._endAngle;
65537
65516
  }
65538
- const prevMarkElement = markElements.findLast(e => { var _a; return ((_a = e.data[0]) === null || _a === void 0 ? void 0 : _a[DEFAULT_DATA_INDEX]) < dataIndex; });
65517
+ const prevMarkElement = [...markElements].reverse().find(e => { var _a; return ((_a = e.data[0]) === null || _a === void 0 ? void 0 : _a[DEFAULT_DATA_INDEX]) < dataIndex; });
65539
65518
  if (outState.includes(state)) {
65540
- return (_a = prevMarkElement === null || prevMarkElement === void 0 ? void 0 : prevMarkElement.getGraphicItem().nextAttrs) === null || _a === void 0 ? void 0 : _a.endAngle;
65519
+ return (_a = prevMarkElement === null || prevMarkElement === void 0 ? void 0 : prevMarkElement.getNextGraphicAttributes()) === null || _a === void 0 ? void 0 : _a.endAngle;
65541
65520
  }
65542
- return (_b = prevMarkElement === null || prevMarkElement === void 0 ? void 0 : prevMarkElement.getGraphicItem().prevAttrs) === null || _b === void 0 ? void 0 : _b.endAngle;
65521
+ return prevMarkElement === null || prevMarkElement === void 0 ? void 0 : prevMarkElement.getGraphicAttribute('endAngle', true);
65543
65522
  }
65544
65523
  };
65545
65524
  const appearPreset = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.animationAppear) === null || _b === void 0 ? void 0 : _b.preset;
@@ -75368,7 +75347,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
75368
75347
  const attr = labelMark.getAttribute(key, datum);
75369
75348
  textAttribute[key] = attr;
75370
75349
  if (key === 'text' && formatMethod) {
75371
- textAttribute[key] = formatMethod(textAttribute[key], datum);
75350
+ textAttribute[key] = formatMethod(textAttribute[key], datum, { series });
75372
75351
  }
75373
75352
  }
75374
75353
  return textAttribute;
@@ -78545,6 +78524,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
78545
78524
  HeatmapSeries.type = exports.SeriesTypeEnum.heatmap;
78546
78525
  HeatmapSeries.mark = heatmapSeriesMark;
78547
78526
  const registerHeatmapSeries = () => {
78527
+ registerCellMark();
78548
78528
  Factory.registerMark(CellMark.type, CellMark);
78549
78529
  Factory.registerMark(TextMark.type, TextMark);
78550
78530
  Factory.registerSeries(HeatmapSeries.type, HeatmapSeries);
@@ -79503,9 +79483,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
79503
79483
  }
79504
79484
  updateScaleDomain() {
79505
79485
  }
79506
- computeData() {
79507
- this._tickData.getDataView().reRunAllTransform();
79508
- this._tickData.updateData();
79486
+ computeData(updateType) {
79487
+ if (updateType === 'force' || !isEqual$1(this._scale.range(), [0, 1])) {
79488
+ this._tickData.getDataView().reRunAllTransform();
79489
+ this._tickData.updateData();
79490
+ }
79509
79491
  }
79510
79492
  initScales() {
79511
79493
  this._scales = [this._scale];
@@ -79731,8 +79713,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
79731
79713
  this._tick = undefined;
79732
79714
  this._layoutCache = { width: 0, height: 0, _lastComputeOutBounds: { x1: 0, x2: 0, y1: 0, y2: 0 } };
79733
79715
  this.effect = {
79734
- scaleUpdate: () => {
79735
- this.computeData();
79716
+ scaleUpdate: params => {
79717
+ this.computeData(params === null || params === void 0 ? void 0 : params.value);
79736
79718
  eachSeries(this._regions, s => {
79737
79719
  if (isXAxis(this.getOrient())) {
79738
79720
  s.setXAxisHelper(this.axisHelper());
@@ -80015,7 +79997,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80015
79997
  onLayoutEnd(ctx) {
80016
79998
  const isRangeChange = this.updateScaleRange();
80017
79999
  if (isRangeChange) {
80018
- this.event.emit(ChartEvent.scaleUpdate, { model: this });
80000
+ this.event.emit(ChartEvent.scaleUpdate, { model: this, value: 'range' });
80019
80001
  }
80020
80002
  else {
80021
80003
  this.updateSeriesScale();
@@ -80150,8 +80132,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80150
80132
  }
80151
80133
  this._verticalLimitSize = isXAxis(this.getOrient()) ? rect.height : rect.width;
80152
80134
  this.setLayoutRect(rect);
80153
- this.updateScaleRange();
80154
- this.computeData();
80135
+ const isChanged = this.updateScaleRange();
80136
+ if (isChanged) {
80137
+ this.computeData('range');
80138
+ }
80155
80139
  const context = { skipLayout: false };
80156
80140
  const isX = isXAxis(this.getOrient());
80157
80141
  if (this.pluginService) {
@@ -80164,29 +80148,35 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80164
80148
  });
80165
80149
  }
80166
80150
  const product = this._axisMark.getProduct();
80167
- this._latestBounds = product.getBounds();
80151
+ let hasBounds = false;
80168
80152
  {
80169
80153
  const attrs = this._getUpdateAttribute(true);
80170
80154
  const axisComponent = product.getGroupGraphicItem();
80171
- const updateBounds = axisComponent.getBoundsWithoutRender(mergeSpec(Object.assign({}, this.getLayoutStartPoint()), this._axisStyle, attrs));
80155
+ const spec = mergeSpec(Object.assign({}, this.getLayoutStartPoint()), this._axisStyle, attrs, { line: { visible: false } });
80156
+ const updateBounds = axisComponent.getBoundsWithoutRender(spec);
80172
80157
  if (isFinite(updateBounds.width())) {
80173
80158
  result = this._appendAxisUnit(updateBounds, isX);
80159
+ hasBounds = true;
80174
80160
  this._latestBounds = updateBounds;
80175
80161
  }
80176
80162
  }
80163
+ if (!hasBounds) {
80164
+ this._latestBounds = product.getBounds();
80165
+ }
80177
80166
  return result;
80178
80167
  }
80179
80168
  updateLayoutAttribute() {
80180
80169
  if (!this.visible) {
80181
80170
  return;
80182
80171
  }
80172
+ const startPoint = this.getLayoutStartPoint();
80183
80173
  const _a = this._getUpdateAttribute(false), { grid: updateGridAttrs } = _a, updateAxisAttrs = __rest$8(_a, ["grid"]);
80184
80174
  const axisProduct = this._axisMark.getProduct();
80185
- const axisAttrs = mergeSpec(Object.assign({}, this.getLayoutStartPoint()), this._axisStyle, updateAxisAttrs);
80175
+ const axisAttrs = mergeSpec({ x: startPoint.x, y: startPoint.y }, this._axisStyle, updateAxisAttrs);
80186
80176
  axisProduct.encode(axisAttrs);
80187
80177
  if (this._gridMark) {
80188
80178
  const gridProduct = this._gridMark.getProduct();
80189
- gridProduct.encode(mergeSpec(Object.assign({}, this.getLayoutStartPoint()), this._getGridAttributes(), updateGridAttrs));
80179
+ gridProduct.encode(mergeSpec({ x: startPoint.x, y: startPoint.y }, this._getGridAttributes(), updateGridAttrs));
80190
80180
  }
80191
80181
  super.updateLayoutAttribute();
80192
80182
  }
@@ -80555,7 +80545,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80555
80545
  this.niceDomain(domain);
80556
80546
  this._scale.domain(domain, this._nice);
80557
80547
  this.setScaleNice();
80558
- this.event.emit(ChartEvent.scaleUpdate, { model: this });
80548
+ this.event.emit(ChartEvent.scaleUpdate, { model: this, value: 'domain' });
80559
80549
  }
80560
80550
  extendDomain(domain) {
80561
80551
  let temp;
@@ -80604,7 +80594,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80604
80594
  this._scale.domain(domain, this._nice);
80605
80595
  this.setScaleNice();
80606
80596
  this.event.emit(ChartEvent.scaleDomainUpdate, { model: this });
80607
- this.event.emit(ChartEvent.scaleUpdate, { model: this });
80597
+ this.event.emit(ChartEvent.scaleUpdate, { model: this, value: 'domain' });
80608
80598
  }
80609
80599
  }
80610
80600
 
@@ -80729,7 +80719,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80729
80719
  }
80730
80720
  this.transformScaleDomain();
80731
80721
  this.event.emit(ChartEvent.scaleDomainUpdate, { model: this });
80732
- this.event.emit(ChartEvent.scaleUpdate, { model: this });
80722
+ this.event.emit(ChartEvent.scaleUpdate, { model: this, value: 'domain' });
80733
80723
  }
80734
80724
  }
80735
80725
 
@@ -80811,8 +80801,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80811
80801
  this.type = ComponentTypeEnum.cartesianTimeAxis;
80812
80802
  this._zero = false;
80813
80803
  this.effect = {
80814
- scaleUpdate: () => {
80815
- this.computeData();
80804
+ scaleUpdate: params => {
80805
+ this.computeData(params === null || params === void 0 ? void 0 : params.value);
80816
80806
  eachSeries(this._regions, s => {
80817
80807
  if (isXAxis(this.getOrient())) {
80818
80808
  s.setXAxisHelper(this.axisHelper());
@@ -80860,8 +80850,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80860
80850
  this._layerTickData = new CompilableData(this._option, layerTickData);
80861
80851
  }
80862
80852
  }
80863
- computeData() {
80864
- super.computeData();
80853
+ computeData(updateType) {
80854
+ super.computeData(updateType);
80865
80855
  if (this._layerTickData) {
80866
80856
  this._layerTickData.getDataView().reRunAllTransform();
80867
80857
  this._layerTickData.updateData();
@@ -80983,8 +80973,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80983
80973
  this._orient = 'radius';
80984
80974
  this._groupScales = [];
80985
80975
  this.effect = {
80986
- scaleUpdate: () => {
80987
- this.computeData();
80976
+ scaleUpdate: param => {
80977
+ this.computeData(param === null || param === void 0 ? void 0 : param.value);
80988
80978
  eachSeries(this._regions, s => {
80989
80979
  if (this.getOrient() === 'radius') {
80990
80980
  s.radiusAxisHelper = this.axisHelper();
@@ -81094,9 +81084,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81094
81084
  super.setLayoutStartPosition(startPoint);
81095
81085
  }
81096
81086
  onLayoutEnd(ctx) {
81097
- this.updateScaleRange();
81098
- this.updateSeriesScale();
81099
- this.event.emit(ChartEvent.scaleUpdate, { model: this });
81087
+ const isChanged = this.updateScaleRange();
81088
+ if (isChanged) {
81089
+ this.updateSeriesScale();
81090
+ this.event.emit(ChartEvent.scaleUpdate, { model: this, value: 'range' });
81091
+ }
81100
81092
  super.onLayoutEnd(ctx);
81101
81093
  }
81102
81094
  onRender(ctx) {
@@ -81147,14 +81139,21 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81147
81139
  }
81148
81140
  updateScaleRange() {
81149
81141
  const inverse = this._spec.inverse;
81142
+ const prevRange = this._scale.range();
81143
+ let newRange;
81150
81144
  if (this.getOrient() === 'radius') {
81151
- this._scale.range(inverse
81145
+ newRange = inverse
81152
81146
  ? [this.computeLayoutOuterRadius(), this.computeLayoutInnerRadius()]
81153
- : [this.computeLayoutInnerRadius(), this.computeLayoutOuterRadius()]);
81147
+ : [this.computeLayoutInnerRadius(), this.computeLayoutOuterRadius()];
81154
81148
  }
81155
81149
  else {
81156
- this._scale.range(inverse ? [this._endAngle, this._startAngle] : [this._startAngle, this._endAngle]);
81150
+ newRange = inverse ? [this._endAngle, this._startAngle] : [this._startAngle, this._endAngle];
81157
81151
  }
81152
+ if (prevRange && newRange && prevRange[0] === newRange[0] && prevRange[1] === newRange[1]) {
81153
+ return false;
81154
+ }
81155
+ this._scale.range(newRange);
81156
+ return true;
81158
81157
  }
81159
81158
  collectData(depth) {
81160
81159
  const data = [];
@@ -81281,6 +81280,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81281
81280
  return this.computeLayoutInnerRadius();
81282
81281
  }
81283
81282
  tickValues() {
81283
+ const latestData = this._tickData.getLatestData();
81284
+ if (latestData && !isArray$1(latestData)) {
81285
+ this.computeData('force');
81286
+ }
81284
81287
  return this._tickData.getLatestData() || [];
81285
81288
  }
81286
81289
  updateLayoutAttribute() {
@@ -81451,8 +81454,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81451
81454
  return this.computeBandDomain(data);
81452
81455
  }
81453
81456
  updateScaleRange() {
81454
- super.updateScaleRange();
81457
+ const isChanged = super.updateScaleRange();
81455
81458
  this.updateGroupScaleRange();
81459
+ return isChanged;
81456
81460
  }
81457
81461
  axisHelper() {
81458
81462
  const helper = super.axisHelper();
@@ -82893,7 +82897,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
82893
82897
  this._cacheActualTooltip = undefined;
82894
82898
  }
82895
82899
  if (changePositionOnly && this._cacheViewSpec && this._cacheActualTooltip) {
82896
- return this.changeTooltipPosition(changePositionOnly, this._cacheActualTooltip, this._cacheViewSpec, activeType, data, params);
82900
+ return this.changeTooltipPosition(changePositionOnly, data, params);
82897
82901
  }
82898
82902
  return this.changeTooltip(true, params, changePositionOnly, activeType, data);
82899
82903
  };
@@ -82946,14 +82950,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
82946
82950
  return TooltipResult.failed;
82947
82951
  }
82948
82952
  this._cacheActualTooltip = actualTooltip;
82949
- return this._changeTooltipPosition(!!changePositionOnly, actualTooltip, spec, activeType, data, params);
82953
+ return this._changeTooltipPosition(!!changePositionOnly, data, params);
82950
82954
  };
82951
- this._changeTooltipPosition = (changePositionOnly, actualTooltip, spec, activeType, data, params) => {
82955
+ this._changeTooltipPosition = (changePositionOnly, data, params) => {
82952
82956
  var _a, _b, _c;
82953
82957
  if (this._isReleased) {
82954
82958
  return TooltipResult.failed;
82955
82959
  }
82956
82960
  const event = params.event;
82961
+ const spec = this._cacheViewSpec;
82962
+ const actualTooltip = this._cacheActualTooltip;
82963
+ if (!spec || !actualTooltip) {
82964
+ return TooltipResult.failed;
82965
+ }
82966
+ const activeType = actualTooltip.activeType;
82957
82967
  if (spec.handler) {
82958
82968
  return (_c = (_b = (_a = spec.handler).showTooltip) === null || _b === void 0 ? void 0 : _b.call(_a, activeType, data, params)) !== null && _c !== void 0 ? _c : TooltipResult.success;
82959
82969
  }