@visactor/vtable 0.9.3-alpha.5 → 0.9.3-alpha.7

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 (165) hide show
  1. package/cjs/ListTable.d.ts +2 -1
  2. package/cjs/ListTable.js +3 -2
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.d.ts +1 -0
  5. package/cjs/PivotChart.js +8 -7
  6. package/cjs/PivotChart.js.map +1 -1
  7. package/cjs/PivotTable.d.ts +1 -0
  8. package/cjs/PivotTable.js +5 -3
  9. package/cjs/PivotTable.js.map +1 -1
  10. package/cjs/components/axis/get-axis-attributes.js +1 -1
  11. package/cjs/components/axis/get-axis-attributes.js.map +1 -1
  12. package/cjs/components/axis/get-axis-component-size.d.ts +2 -1
  13. package/cjs/components/axis/get-axis-component-size.js +55 -15
  14. package/cjs/components/axis/get-axis-component-size.js.map +1 -1
  15. package/cjs/components/legend/get-legend-attributes.js +1 -1
  16. package/cjs/components/legend/get-legend-attributes.js.map +1 -1
  17. package/cjs/components/legend/legend.d.ts +2 -0
  18. package/cjs/components/legend/legend.js +13 -3
  19. package/cjs/components/legend/legend.js.map +1 -1
  20. package/cjs/components/title/title.d.ts +3 -0
  21. package/cjs/components/title/title.js +22 -3
  22. package/cjs/components/title/title.js.map +1 -1
  23. package/cjs/core/BaseTable.d.ts +4 -3
  24. package/cjs/core/BaseTable.js +13 -16
  25. package/cjs/core/BaseTable.js.map +1 -1
  26. package/cjs/dataset/dataset.js +11 -4
  27. package/cjs/dataset/dataset.js.map +1 -1
  28. package/cjs/event/listener/container-dom.js +1 -1
  29. package/cjs/event/listener/container-dom.js.map +1 -1
  30. package/cjs/event/listener/scroll-bar.js +2 -0
  31. package/cjs/event/listener/scroll-bar.js.map +1 -1
  32. package/cjs/event/scroll.js +8 -4
  33. package/cjs/event/scroll.js.map +1 -1
  34. package/cjs/index.d.ts +1 -1
  35. package/cjs/index.js +1 -1
  36. package/cjs/index.js.map +1 -1
  37. package/cjs/layout/chart-helper/get-axis-config.js +27 -9
  38. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
  39. package/cjs/layout/chart-helper/get-chart-spec.js +21 -8
  40. package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
  41. package/cjs/render/layout/text.js +1 -0
  42. package/cjs/render/layout/text.js.map +1 -1
  43. package/cjs/scenegraph/graphic/chart.js +3 -1
  44. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  45. package/cjs/scenegraph/graphic/contributions/chart-render.js +1 -1
  46. package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  47. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +6 -3
  48. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  49. package/cjs/scenegraph/graphic/text.js +6 -4
  50. package/cjs/scenegraph/graphic/text.js.map +1 -1
  51. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  52. package/cjs/scenegraph/group-creater/progress/proxy.js +7 -19
  53. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  54. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +1 -0
  55. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  56. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +22 -17
  57. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  58. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js +7 -6
  59. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
  60. package/cjs/scenegraph/layout/compute-col-width.js +6 -4
  61. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  62. package/cjs/scenegraph/layout/compute-row-height.d.ts +1 -1
  63. package/cjs/scenegraph/layout/compute-row-height.js +40 -16
  64. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  65. package/cjs/scenegraph/layout/update-height.js +1 -1
  66. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  67. package/cjs/scenegraph/layout/update-width.js +6 -2
  68. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  69. package/cjs/scenegraph/refresh-node/update-chart.js +2 -2
  70. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  71. package/cjs/scenegraph/scenegraph.js +7 -6
  72. package/cjs/scenegraph/scenegraph.js.map +1 -1
  73. package/cjs/scenegraph/utils/measure-text.js +9 -8
  74. package/cjs/scenegraph/utils/measure-text.js.map +1 -1
  75. package/cjs/scenegraph/utils/text-icon-layout.js +1 -1
  76. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  77. package/cjs/state/state.d.ts +1 -0
  78. package/cjs/state/state.js +4 -2
  79. package/cjs/state/state.js.map +1 -1
  80. package/cjs/ts-types/base-table.d.ts +3 -2
  81. package/cjs/ts-types/base-table.js.map +1 -1
  82. package/dist/vtable.js +506 -231
  83. package/dist/vtable.min.js +3 -3
  84. package/es/ListTable.d.ts +2 -1
  85. package/es/ListTable.js +3 -2
  86. package/es/ListTable.js.map +1 -1
  87. package/es/PivotChart.d.ts +1 -0
  88. package/es/PivotChart.js +8 -7
  89. package/es/PivotChart.js.map +1 -1
  90. package/es/PivotTable.d.ts +1 -0
  91. package/es/PivotTable.js +5 -3
  92. package/es/PivotTable.js.map +1 -1
  93. package/es/components/axis/get-axis-attributes.js +1 -1
  94. package/es/components/axis/get-axis-attributes.js.map +1 -1
  95. package/es/components/axis/get-axis-component-size.d.ts +2 -1
  96. package/es/components/axis/get-axis-component-size.js +53 -13
  97. package/es/components/axis/get-axis-component-size.js.map +1 -1
  98. package/es/components/legend/get-legend-attributes.js +1 -1
  99. package/es/components/legend/get-legend-attributes.js.map +1 -1
  100. package/es/components/legend/legend.d.ts +2 -0
  101. package/es/components/legend/legend.js +13 -3
  102. package/es/components/legend/legend.js.map +1 -1
  103. package/es/components/title/title.d.ts +3 -0
  104. package/es/components/title/title.js +22 -3
  105. package/es/components/title/title.js.map +1 -1
  106. package/es/core/BaseTable.d.ts +4 -3
  107. package/es/core/BaseTable.js +13 -16
  108. package/es/core/BaseTable.js.map +1 -1
  109. package/es/dataset/dataset.js +11 -3
  110. package/es/dataset/dataset.js.map +1 -1
  111. package/es/event/listener/container-dom.js +1 -1
  112. package/es/event/listener/container-dom.js.map +1 -1
  113. package/es/event/listener/scroll-bar.js +2 -0
  114. package/es/event/listener/scroll-bar.js.map +1 -1
  115. package/es/event/scroll.js +4 -1
  116. package/es/event/scroll.js.map +1 -1
  117. package/es/index.d.ts +1 -1
  118. package/es/index.js +1 -1
  119. package/es/index.js.map +1 -1
  120. package/es/layout/chart-helper/get-axis-config.js +27 -9
  121. package/es/layout/chart-helper/get-axis-config.js.map +1 -1
  122. package/es/layout/chart-helper/get-chart-spec.js +22 -5
  123. package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
  124. package/es/render/layout/text.js +1 -0
  125. package/es/render/layout/text.js.map +1 -1
  126. package/es/scenegraph/graphic/chart.js +3 -1
  127. package/es/scenegraph/graphic/chart.js.map +1 -1
  128. package/es/scenegraph/graphic/contributions/chart-render.js +1 -1
  129. package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  130. package/es/scenegraph/graphic/contributions/group-contribution-render.js +7 -2
  131. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  132. package/es/scenegraph/graphic/text.js +6 -4
  133. package/es/scenegraph/graphic/text.js.map +1 -1
  134. package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  135. package/es/scenegraph/group-creater/progress/proxy.js +7 -18
  136. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  137. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +1 -0
  138. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  139. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +21 -17
  140. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  141. package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js +7 -6
  142. package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
  143. package/es/scenegraph/layout/compute-col-width.js +6 -4
  144. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  145. package/es/scenegraph/layout/compute-row-height.d.ts +1 -1
  146. package/es/scenegraph/layout/compute-row-height.js +43 -15
  147. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  148. package/es/scenegraph/layout/update-height.js +1 -1
  149. package/es/scenegraph/layout/update-height.js.map +1 -1
  150. package/es/scenegraph/layout/update-width.js +6 -2
  151. package/es/scenegraph/layout/update-width.js.map +1 -1
  152. package/es/scenegraph/refresh-node/update-chart.js +2 -2
  153. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  154. package/es/scenegraph/scenegraph.js +7 -5
  155. package/es/scenegraph/scenegraph.js.map +1 -1
  156. package/es/scenegraph/utils/measure-text.js +10 -9
  157. package/es/scenegraph/utils/measure-text.js.map +1 -1
  158. package/es/scenegraph/utils/text-icon-layout.js +1 -1
  159. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  160. package/es/state/state.d.ts +1 -0
  161. package/es/state/state.js +5 -1
  162. package/es/state/state.js.map +1 -1
  163. package/es/ts-types/base-table.d.ts +3 -2
  164. package/es/ts-types/base-table.js.map +1 -1
  165. package/package.json +6 -6
package/dist/vtable.js CHANGED
@@ -12735,11 +12735,13 @@
12735
12735
  return console.error("暂不支持该函数"), nodes;
12736
12736
  }
12737
12737
  insertBefore(newNode, referenceNode) {
12738
+ if (!referenceNode) return this.appendChild(newNode);
12738
12739
  if (this._uid === newNode._uid) return null;
12739
12740
  if (newNode.isAncestorsOf(this)) throw new Error("【Node::insertBefore】不能将父辈元素insert为子元素");
12740
12741
  return referenceNode.parent !== this ? null : (newNode.parent && newNode.parent.removeChild(newNode), newNode.parent = this, newNode._prev = referenceNode._prev, referenceNode._prev ? referenceNode._prev._next = newNode : this._firstChild = newNode, referenceNode._prev = newNode, newNode._next = referenceNode, this._idMap || (this._idMap = new Map()), this._idMap.set(newNode._uid, newNode), this._structEdit = !0, this.setCount(newNode.count), newNode);
12741
12742
  }
12742
12743
  insertAfter(newNode, referenceNode) {
12744
+ if (!referenceNode) return this.appendChild(newNode);
12743
12745
  if (this._uid === newNode._uid) return null;
12744
12746
  if (newNode.isAncestorsOf(this)) throw new Error("【Node::insertAfter】不能将父辈元素insert为子元素");
12745
12747
  return referenceNode.parent !== this ? null : (newNode.parent && newNode.parent.removeChild(newNode), newNode.parent = this, referenceNode._next ? (referenceNode._next._prev = newNode, newNode._next = referenceNode._next) : this._lastChild = newNode, referenceNode._next = newNode, newNode._prev = referenceNode, this._idMap || (this._idMap = new Map()), this._idMap.set(newNode._uid, newNode), this._structEdit = !0, this.setCount(newNode.count), newNode);
@@ -14297,6 +14299,24 @@
14297
14299
  }
14298
14300
  return attr[key];
14299
14301
  }
14302
+ class RafBasedSTO {
14303
+ constructor() {
14304
+ this.durations = [], this.timeout = RafBasedSTO.TimeOut, this.lastDate = 0, this.durationsListThreshold = 30;
14305
+ }
14306
+ call(cb) {
14307
+ return this.lastDate = Date.now(), setTimeout(() => {
14308
+ this.appendDuration(Date.now() - this.lastDate), cb(0);
14309
+ }, this.timeout, !0);
14310
+ }
14311
+ clear(h) {
14312
+ clearTimeout(h);
14313
+ }
14314
+ appendDuration(d) {
14315
+ this.durations.push(d), this.durations.length > this.durationsListThreshold && this.durations.shift(), this.timeout = Math.min(Math.max(this.durations.reduce((a, b) => a + b, 0) / this.durations.length, 1e3 / 60), 1e3 / 30);
14316
+ }
14317
+ }
14318
+ RafBasedSTO.TimeOut = 1e3 / 60;
14319
+ const rafBasedSto = new RafBasedSTO();
14300
14320
 
14301
14321
  var Direction;
14302
14322
  !function (Direction) {
@@ -15790,18 +15810,18 @@
15790
15810
  bind(DefaultGlobal).toSelf().inSingletonScope(), bind(Global).toService(DefaultGlobal), bind(DefaultWindow).to(DefaultWindow), bind(Window).toService(DefaultWindow), bind(DefaultGraphicUtil).toSelf().inSingletonScope(), bind(GraphicUtil).toService(DefaultGraphicUtil), bind(DefaultTransformUtil).toSelf().inSingletonScope(), bind(TransformUtil).toService(DefaultTransformUtil), bind(DefaultLayerService).toSelf().inSingletonScope(), bind(LayerService).toService(DefaultLayerService);
15791
15811
  });
15792
15812
 
15793
- function runFill(fill) {
15794
- return !!fill;
15813
+ function runFill(fill, background) {
15814
+ return !(!fill && !background);
15795
15815
  }
15796
15816
  function runStroke(stroke, lineWidth) {
15797
15817
  let s;
15798
15818
  return s = isArray$3(stroke) ? stroke.some(item => item || void 0 === item) : !!stroke, s && lineWidth > 0;
15799
15819
  }
15800
- function fillVisible(opacity, fillOpacity) {
15801
- return opacity * fillOpacity > 0;
15820
+ function fillVisible(opacity, fillOpacity, fill) {
15821
+ return fill && opacity * fillOpacity > 0;
15802
15822
  }
15803
- function rectFillVisible(opacity, fillOpacity, width, height) {
15804
- return opacity * fillOpacity > 0 && width > 0 && height > 0;
15823
+ function rectFillVisible(opacity, fillOpacity, width, height, fill) {
15824
+ return fill && opacity * fillOpacity > 0 && width > 0 && height > 0;
15805
15825
  }
15806
15826
  function strokeVisible(opacity, strokeOpacity) {
15807
15827
  return opacity * strokeOpacity > 0;
@@ -15821,7 +15841,7 @@
15821
15841
  strokeOpacity = themeAttributes.strokeOpacity,
15822
15842
  visible = themeAttributes.visible
15823
15843
  } = graphic.attribute,
15824
- fVisible = fillVisible(opacity, fillOpacity),
15844
+ fVisible = fillVisible(opacity, fillOpacity, fill),
15825
15845
  sVisible = strokeVisible(opacity, strokeOpacity),
15826
15846
  doFill = runFill(fill),
15827
15847
  doStroke = runStroke(stroke, lineWidth);
@@ -16183,12 +16203,12 @@
16183
16203
  x: originX = arcAttribute.x,
16184
16204
  y: originY = arcAttribute.y
16185
16205
  } = arc.attribute,
16186
- fVisible = fillVisible(opacity, fillOpacity),
16206
+ fVisible = fillVisible(opacity, fillOpacity, fill),
16187
16207
  sVisible = strokeVisible(opacity, strokeOpacity),
16188
- doFill = runFill(fill),
16208
+ doFill = runFill(fill, background),
16189
16209
  doStroke = runStroke(stroke, lineWidth);
16190
16210
  if (!arc.valid || !visible) return;
16191
- if (!(doFill || doStroke || background)) return;
16211
+ if (!doFill && !doStroke) return;
16192
16212
  if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
16193
16213
  const {
16194
16214
  outerRadius = arcAttribute.outerRadius,
@@ -16201,7 +16221,7 @@
16201
16221
  isFullStroke: isFullStroke,
16202
16222
  stroke: arrayStroke
16203
16223
  } = parseStroke(stroke);
16204
- if (doFill || isFullStroke || background) {
16224
+ if (doFill || isFullStroke) {
16205
16225
  if (context.beginPath(), drawArcPath$1(arc, context, x, y, outerRadius, innerRadius), !this._arcBeforeRenderContribitions) {
16206
16226
  this._arcBeforeRenderContribitions = [], this._arcAfterRenderContribitions = [];
16207
16227
  const contributions = this.arcRenderContribitions.getContributions() || [];
@@ -16325,11 +16345,11 @@
16325
16345
  x: originX = circleAttribute.x,
16326
16346
  y: originY = circleAttribute.y
16327
16347
  } = circle.attribute,
16328
- fVisible = fillVisible(opacity, fillOpacity),
16348
+ fVisible = fillVisible(opacity, fillOpacity, fill),
16329
16349
  sVisible = strokeVisible(opacity, strokeOpacity),
16330
- doFill = runFill(fill),
16350
+ doFill = runFill(fill, background),
16331
16351
  doStroke = runStroke(stroke, lineWidth);
16332
- circle.valid && visible && (doFill || doStroke || background) && (fVisible || sVisible || fillCb || strokeCb || background) && (context.beginPath(), context.arc(x, y, radius, startAngle, endAngle), context.closePath(), this._circleRenderContribitions || (this._circleRenderContribitions = this.circleRenderContribitions.getContributions() || [], this._circleRenderContribitions.sort((a, b) => b.order - a.order)), this._circleRenderContribitions.forEach(c => {
16352
+ circle.valid && visible && (doFill || doStroke) && (fVisible || sVisible || fillCb || strokeCb || background) && (context.beginPath(), context.arc(x, y, radius, startAngle, endAngle), context.closePath(), this._circleRenderContribitions || (this._circleRenderContribitions = this.circleRenderContribitions.getContributions() || [], this._circleRenderContribitions.sort((a, b) => b.order - a.order)), this._circleRenderContribitions.forEach(c => {
16333
16353
  c.time === BaseRenderContributionTime.beforeFillStroke && c.drawShape(circle, context, x, y, doFill, doStroke, fVisible, sVisible, circleAttribute, drawContext, fillCb, strokeCb);
16334
16354
  }), context.setShadowStyle && context.setShadowStyle(circle, circle.attribute, circleAttribute), doFill && (fillCb ? fillCb(context, circle.attribute, circleAttribute) : fVisible && (context.setCommonStyle(circle, circle.attribute, originX - x, originY - y, circleAttribute), context.fill())), doStroke && (strokeCb ? strokeCb(context, circle.attribute, circleAttribute) : sVisible && (context.setStrokeStyle(circle, circle.attribute, originX - x, originY - y, circleAttribute), context.stroke())), this._circleRenderContribitions.forEach(c => {
16335
16355
  c.time === BaseRenderContributionTime.afterFillStroke && c.drawShape(circle, context, x, y, doFill, doStroke, fVisible, sVisible, circleAttribute, drawContext, fillCb, strokeCb);
@@ -16435,7 +16455,8 @@
16435
16455
  return "end" === textAlign || "right" === textAlign ? -width : "center" === textAlign ? -width / 2 : 0;
16436
16456
  }
16437
16457
  function textLayoutOffsetY(baseline, lineHeight, fontSize) {
16438
- return "middle" === baseline ? -lineHeight / 2 : "top" === baseline ? 0 : "bottom" === baseline ? -lineHeight : baseline && "alphabetic" !== baseline ? 0 : (fontSize || (fontSize = lineHeight), -(lineHeight - fontSize) / 2 - .79 * fontSize);
16458
+ let buf = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
16459
+ return "middle" === baseline ? -lineHeight / 2 : "top" === baseline ? 0 : "bottom" === baseline ? buf - lineHeight : baseline && "alphabetic" !== baseline ? 0 : (fontSize || (fontSize = lineHeight), -(lineHeight - fontSize) / 2 - .79 * fontSize);
16439
16460
  }
16440
16461
 
16441
16462
  class CanvasTextLayout {
@@ -16586,8 +16607,7 @@
16586
16607
  const textTheme = getTheme(this).text,
16587
16608
  textMeasure = application.graphicUtil.textMeasure;
16588
16609
  let width, str;
16589
- const buf = 2,
16590
- attribute = this.attribute,
16610
+ const attribute = this.attribute,
16591
16611
  {
16592
16612
  maxLineWidth = textTheme.maxLineWidth,
16593
16613
  ellipsis = textTheme.ellipsis,
@@ -16596,8 +16616,11 @@
16596
16616
  fontSize = textTheme.fontSize,
16597
16617
  fontWeight = textTheme.fontWeight,
16598
16618
  stroke = textTheme.stroke,
16599
- lineHeight = null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf,
16600
16619
  lineWidth = textTheme.lineWidth
16620
+ } = attribute,
16621
+ buf = Math.max(2, .075 * fontSize),
16622
+ {
16623
+ lineHeight = null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf
16601
16624
  } = attribute;
16602
16625
  if (!this.shouldUpdateShape() && this.cache) {
16603
16626
  width = this.cache.clipedWidth;
@@ -16627,7 +16650,7 @@
16627
16650
  }), this.cache.clipedText = text.toString(), this.cache.clipedWidth = width;
16628
16651
  this.clearUpdateShapeTag();
16629
16652
  const dx = textDrawOffsetX(textAlign, width),
16630
- dy = textLayoutOffsetY(textBaseline, lineHeight, fontSize);
16653
+ dy = textLayoutOffsetY(textBaseline, lineHeight, fontSize, 0);
16631
16654
  return this._AABBBounds.set(dx, dy, dx + width, dy + lineHeight), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
16632
16655
  }
16633
16656
  updateMultilineAABBBounds(text) {
@@ -18904,7 +18927,18 @@
18904
18927
  Array.isArray(text) ? graphic.updateMultilineAABBBounds(text) : graphic.updateSingallineAABBBounds(text);
18905
18928
  const tb1 = this.tempAABBBounds1,
18906
18929
  tb2 = this.tempAABBBounds2;
18907
- return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), transformBoundsWithMatrix(aabbBounds, aabbBounds, graphic.transMatrix), aabbBounds;
18930
+ tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2);
18931
+ const {
18932
+ scaleX = textTheme.scaleX,
18933
+ scaleY = textTheme.scaleY,
18934
+ shadowBlur = textTheme.shadowBlur,
18935
+ strokeBoundsBuffer = textTheme.strokeBoundsBuffer
18936
+ } = attribute;
18937
+ if (shadowBlur) {
18938
+ const shadowBlurHalfWidth = shadowBlur / Math.abs(scaleX + scaleY);
18939
+ boundStroke(tb1, shadowBlurHalfWidth, !0, strokeBoundsBuffer), aabbBounds.union(tb1);
18940
+ }
18941
+ return this.combindShadowAABBBounds(aabbBounds, graphic), transformBoundsWithMatrix(aabbBounds, aabbBounds, graphic.transMatrix), aabbBounds;
18908
18942
  }
18909
18943
  updatePathAABBBounds(attribute, pathTheme, aabbBounds, graphic) {
18910
18944
  this.updatePathProxyAABBBounds(aabbBounds, graphic) || this.updatePathAABBBoundsImprecise(attribute, pathTheme, aabbBounds, graphic);
@@ -19071,10 +19105,14 @@
19071
19105
  return aabbBounds.set(-outerRadius, -outerRadius, outerRadius, outerRadius), aabbBounds;
19072
19106
  }
19073
19107
  updateArcAABBBoundsAccurate(attribute, arcTheme, aabbBounds, graphic) {
19074
- const {
19108
+ let {
19075
19109
  outerRadius = arcTheme.outerRadius,
19076
19110
  innerRadius = arcTheme.innerRadius
19077
19111
  } = attribute;
19112
+ if (outerRadius < innerRadius) {
19113
+ const temp = outerRadius;
19114
+ outerRadius = innerRadius, innerRadius = temp;
19115
+ }
19078
19116
  let {
19079
19117
  endAngle = arcTheme.endAngle,
19080
19118
  startAngle = arcTheme.startAngle
@@ -19197,7 +19235,7 @@
19197
19235
  return isArray$3(text) ? !text.every(t => null == t || "" === t) : null != text && "" !== text;
19198
19236
  }
19199
19237
  updateMultilineAABBBounds(text) {
19200
- var _a;
19238
+ var _a, _b, _c;
19201
19239
  const textTheme = getTheme(this).text,
19202
19240
  {
19203
19241
  fontFamily = textTheme.fontFamily,
@@ -19236,6 +19274,10 @@
19236
19274
  break;
19237
19275
  }
19238
19276
  const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth);
19277
+ if ("" !== str && "" === clip.str) if (ellipsis) {
19278
+ const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis);
19279
+ clip.str = null !== (_b = clipEllipsis.str) && void 0 !== _b ? _b : "", clip.width = null !== (_c = clipEllipsis.width) && void 0 !== _c ? _c : 0;
19280
+ } else clip.str = "", clip.width = 0;
19239
19281
  if (linesLayout.push({
19240
19282
  str: clip.str,
19241
19283
  width: clip.width
@@ -19452,6 +19494,7 @@
19452
19494
  BaseRender = __decorate$1u([injectable()], BaseRender);
19453
19495
 
19454
19496
  function drawSegments(path, segPath, percent, clipRangeByDimension, params) {
19497
+ if (!segPath) return;
19455
19498
  const {
19456
19499
  offsetX = 0,
19457
19500
  offsetY = 0,
@@ -19554,6 +19597,7 @@
19554
19597
  }
19555
19598
  drawSegmentItem(context, cache, fill, stroke, fillOpacity, strokeOpacity, attribute, defaultAttribute, clipRange, clipRangeByDimension, offsetX, offsetY, line, fillCb, strokeCb) {
19556
19599
  var _a;
19600
+ if (!cache) return;
19557
19601
  context.beginPath();
19558
19602
  const z = null !== (_a = this.z) && void 0 !== _a ? _a : 0;
19559
19603
  drawSegments(context.camera ? context : context.nativeContext, cache, clipRange, clipRangeByDimension, {
@@ -19578,7 +19622,7 @@
19578
19622
  lineWidth = lineAttribute.lineWidth,
19579
19623
  visible = lineAttribute.visible
19580
19624
  } = line.attribute,
19581
- fVisible = fillVisible(opacity, fillOpacity),
19625
+ fVisible = fillVisible(opacity, fillOpacity, fill),
19582
19626
  sVisible = strokeVisible(opacity, strokeOpacity),
19583
19627
  doFill = runFill(fill),
19584
19628
  doStroke = runStroke(stroke, lineWidth);
@@ -19759,12 +19803,13 @@
19759
19803
  opacity = areaAttribute.opacity,
19760
19804
  visible = areaAttribute.visible,
19761
19805
  z = areaAttribute.z,
19806
+ background: background,
19762
19807
  stroke = area.attribute.stroke,
19763
19808
  lineWidth = areaAttribute.lineWidth,
19764
19809
  strokeOpacity = areaAttribute.strokeOpacity
19765
19810
  } = area.attribute,
19766
- fVisible = fillVisible(opacity, fillOpacity),
19767
- doFill = runFill(fill),
19811
+ fVisible = fillVisible(opacity, fillOpacity, fill),
19812
+ doFill = runFill(fill, background),
19768
19813
  doStroke = runStroke(stroke, lineWidth),
19769
19814
  sVisible = strokeVisible(opacity, strokeOpacity);
19770
19815
  if (!area.valid || !visible) return;
@@ -19865,6 +19910,7 @@
19865
19910
  drawPathProxy(area, context, x, y, drawContext, params) || this.drawShape(area, context, x, y, drawContext, params), context.highPerformanceRestore();
19866
19911
  }
19867
19912
  drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb) {
19913
+ if (!cache) return;
19868
19914
  context.beginPath();
19869
19915
  drawAreaSegments(context.camera ? context : context.nativeContext, cache, clipRange, {
19870
19916
  offsetX: offsetX,
@@ -19879,21 +19925,21 @@
19879
19925
  x: originX = 0,
19880
19926
  x: originY = 0
19881
19927
  } = attribute;
19882
- if (!1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(area, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.fill())), !1 !== stroke) if (strokeCb) strokeCb(context, attribute, defaultAttribute);else {
19928
+ if (!1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(area, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.fill())), this._areaRenderContribitions || (this._areaRenderContribitions = this.areaRenderContribitions.getContributions() || []), this._areaRenderContribitions.forEach(c => {
19929
+ c.time === BaseRenderContributionTime.afterFillStroke && c.drawShape(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, defaultAttribute, drawContext, fillCb, null, {
19930
+ attribute: attribute
19931
+ });
19932
+ }), !1 !== stroke) if (strokeCb) strokeCb(context, attribute, defaultAttribute);else {
19883
19933
  const {
19884
19934
  stroke: stroke
19885
19935
  } = attribute;
19886
- isArray$3(stroke) && stroke[0] && !1 === stroke[1] && (context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, cache.top, clipRange, "auto", {
19936
+ isArray$3(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1] && (context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, stroke[0] ? cache.top : cache.bottom, clipRange, "auto", {
19887
19937
  offsetX: offsetX,
19888
19938
  offsetY: offsetY,
19889
19939
  offsetZ: offsetZ
19890
19940
  })), context.setStrokeStyle(area, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.stroke();
19891
19941
  }
19892
- return this._areaRenderContribitions || (this._areaRenderContribitions = this.areaRenderContribitions.getContributions() || []), this._areaRenderContribitions.forEach(c => {
19893
- c.time === BaseRenderContributionTime.afterFillStroke && c.drawShape(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, defaultAttribute, drawContext, fillCb, null, {
19894
- attribute: attribute
19895
- });
19896
- }), !1;
19942
+ return !1;
19897
19943
  }
19898
19944
  };
19899
19945
  DefaultCanvasAreaRender = __decorate$1s([injectable(), __param$L(0, inject(ContributionProvider)), __param$L(0, named(AreaRenderContribution)), __metadata$_("design:paramtypes", [Object])], DefaultCanvasAreaRender);
@@ -19933,11 +19979,11 @@
19933
19979
  y: originY = pathAttribute.y
19934
19980
  } = path.attribute,
19935
19981
  z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
19936
- fVisible = fillVisible(opacity, fillOpacity),
19982
+ fVisible = fillVisible(opacity, fillOpacity, fill),
19937
19983
  sVisible = strokeVisible(opacity, strokeOpacity),
19938
- doFill = runFill(fill),
19984
+ doFill = runFill(fill, background),
19939
19985
  doStroke = runStroke(stroke, lineWidth);
19940
- if (path.valid && visible && (doFill || doStroke || background) && (fVisible || sVisible || fillCb || strokeCb || background)) {
19986
+ if (path.valid && visible && (doFill || doStroke) && (fVisible || sVisible || fillCb || strokeCb || background)) {
19941
19987
  if (context.beginPath(), path.pathShape) renderCommandList(path.pathShape.commandList, context, x, y, 1, 1, z);else {
19942
19988
  const path2D = null !== (_b = path.attribute.path) && void 0 !== _b ? _b : pathAttribute.path;
19943
19989
  renderCommandList(path2D.commandList, context, x, y, 1, 1, z);
@@ -20059,12 +20105,12 @@
20059
20105
  x: originX = rectAttribute.x,
20060
20106
  y: originY = rectAttribute.y
20061
20107
  } = rect.attribute,
20062
- fVisible = rectFillVisible(opacity, fillOpacity, width, height),
20108
+ fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
20063
20109
  sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
20064
- doFill = runFill(fill),
20110
+ doFill = runFill(fill, background),
20065
20111
  doStroke = runStroke(stroke, lineWidth);
20066
20112
  if (!rect.valid || !visible) return;
20067
- if (!(doFill || doStroke || background)) return;
20113
+ if (!doFill && !doStroke) return;
20068
20114
  if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
20069
20115
  0 === cornerRadius || isArray$3(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius)), this._rectRenderContribitions || (this._rectRenderContribitions = this.rectRenderContribitions.getContributions() || [], this._rectRenderContribitions.sort((a, b) => b.order - a.order));
20070
20116
  const doFillOrStroke = {
@@ -20134,12 +20180,12 @@
20134
20180
  scaleX = symbolAttribute.scaleX,
20135
20181
  scaleY = symbolAttribute.scaleY
20136
20182
  } = symbol.attribute,
20137
- fVisible = fillVisible(opacity, fillOpacity),
20183
+ fVisible = fillVisible(opacity, fillOpacity, fill),
20138
20184
  sVisible = strokeVisible(opacity, strokeOpacity),
20139
- doFill = runFill(fill),
20185
+ doFill = runFill(fill, background),
20140
20186
  doStroke = runStroke(stroke, lineWidth);
20141
20187
  if (!symbol.valid || !visible) return;
20142
- if (!(doFill || doStroke || background)) return;
20188
+ if (!doFill && !doStroke) return;
20143
20189
  if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
20144
20190
  const parsedPath = symbol.getParsedPath();
20145
20191
  if (!parsedPath) return;
@@ -20217,7 +20263,7 @@
20217
20263
  y: originY = textAttribute.y
20218
20264
  } = text.attribute,
20219
20265
  lineHeight = null !== (_a = text.attribute.lineHeight) && void 0 !== _a ? _a : fontSize,
20220
- fVisible = fillVisible(opacity, fillOpacity),
20266
+ fVisible = fillVisible(opacity, fillOpacity, fill),
20221
20267
  sVisible = strokeVisible(opacity, strokeOpacity),
20222
20268
  doFill = runFill(fill),
20223
20269
  doStroke = runStroke(stroke, lineWidth);
@@ -20430,11 +20476,11 @@
20430
20476
  x: originX = polygonAttribute.x,
20431
20477
  y: originY = polygonAttribute.y
20432
20478
  } = polygon.attribute,
20433
- fVisible = fillVisible(opacity, fillOpacity),
20479
+ fVisible = fillVisible(opacity, fillOpacity, fill),
20434
20480
  sVisible = strokeVisible(opacity, strokeOpacity),
20435
- doFill = runFill(fill),
20481
+ doFill = runFill(fill, background),
20436
20482
  doStroke = runStroke(stroke, lineWidth);
20437
- polygon.valid && visible && (doFill || doStroke || background) && (fVisible || sVisible || fillCb || strokeCb || background) && (context.beginPath(), cornerRadius <= 0 || isArray$3(cornerRadius) && cornerRadius.every(num => 0 === num) ? drawPolygon(context.camera ? context : context.nativeContext, points, x, y) : drawRoundedPolygon(context.camera ? context : context.nativeContext, points, x, y, cornerRadius), context.closePath(), this._polygonRenderContribitions || (this._polygonRenderContribitions = this.polygonRenderContribitions.getContributions() || [], this._polygonRenderContribitions.sort((a, b) => b.order - a.order)), this._polygonRenderContribitions.forEach(c => {
20483
+ polygon.valid && visible && (doFill || doStroke) && (fVisible || sVisible || fillCb || strokeCb || background) && (context.beginPath(), cornerRadius <= 0 || isArray$3(cornerRadius) && cornerRadius.every(num => 0 === num) ? drawPolygon(context.camera ? context : context.nativeContext, points, x, y) : drawRoundedPolygon(context.camera ? context : context.nativeContext, points, x, y, cornerRadius), context.closePath(), this._polygonRenderContribitions || (this._polygonRenderContribitions = this.polygonRenderContribitions.getContributions() || [], this._polygonRenderContribitions.sort((a, b) => b.order - a.order)), this._polygonRenderContribitions.forEach(c => {
20438
20484
  c.time === BaseRenderContributionTime.beforeFillStroke && c.drawShape(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb);
20439
20485
  }), context.setShadowStyle && context.setShadowStyle(polygon, polygon.attribute, polygonAttribute), doFill && (fillCb ? fillCb(context, polygon.attribute, polygonAttribute) : fillOpacity && (context.setCommonStyle(polygon, polygon.attribute, originX - x, originY - y, polygonAttribute), context.fill())), doStroke && (strokeCb ? strokeCb(context, polygon.attribute, polygonAttribute) : strokeOpacity && (context.setStrokeStyle(polygon, polygon.attribute, originX - x, originY - y, polygonAttribute), context.stroke())), this._polygonRenderContribitions.forEach(c => {
20440
20486
  c.time === BaseRenderContributionTime.afterFillStroke && c.drawShape(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb);
@@ -20493,7 +20539,7 @@
20493
20539
  repeatY = imageAttribute.repeatY,
20494
20540
  image: url
20495
20541
  } = image.attribute,
20496
- fVisible = fillVisible(opacity, fillOpacity),
20542
+ fVisible = fillVisible(opacity, fillOpacity, fill),
20497
20543
  doFill = runFill(fill);
20498
20544
  if (image.valid && visible && doFill && (fVisible || fillCb)) {
20499
20545
  if (this._imageRenderContribitions || (this._imageRenderContribitions = this.imageRenderContribitions.getContributions() || []), this._imageRenderContribitions.forEach(c => {
@@ -23016,12 +23062,12 @@
23016
23062
  }
23017
23063
  getRequestAnimationFrame() {
23018
23064
  return function (callback) {
23019
- return setTimeout(callback, 1e3 / 60, !0);
23065
+ return rafBasedSto.call(callback);
23020
23066
  };
23021
23067
  }
23022
23068
  getCancelAnimationFrame() {
23023
23069
  return h => {
23024
- clearTimeout(h);
23070
+ rafBasedSto.clear(h);
23025
23071
  };
23026
23072
  }
23027
23073
  addEventListener(type, listener, options) {
@@ -23276,12 +23322,12 @@
23276
23322
  }
23277
23323
  getRequestAnimationFrame() {
23278
23324
  return function (callback) {
23279
- return setTimeout(callback, 1e3 / 60, !0);
23325
+ return rafBasedSto.call(callback);
23280
23326
  };
23281
23327
  }
23282
23328
  getCancelAnimationFrame() {
23283
23329
  return h => {
23284
- clearTimeout(h);
23330
+ rafBasedSto.clear(h);
23285
23331
  };
23286
23332
  }
23287
23333
  addEventListener(type, listener, options) {
@@ -23372,12 +23418,12 @@
23372
23418
  }
23373
23419
  getRequestAnimationFrame() {
23374
23420
  return function (callback) {
23375
- return setTimeout(callback, 1e3 / 60, !0);
23421
+ return rafBasedSto.call(callback);
23376
23422
  };
23377
23423
  }
23378
23424
  getCancelAnimationFrame() {
23379
23425
  return h => {
23380
- clearTimeout(h);
23426
+ rafBasedSto.clear(h);
23381
23427
  };
23382
23428
  }
23383
23429
  addEventListener(type, listener, options) {}
@@ -23483,12 +23529,12 @@
23483
23529
  }
23484
23530
  getRequestAnimationFrame() {
23485
23531
  return function (callback) {
23486
- return setTimeout(callback, 1e3 / 60, !0);
23532
+ return rafBasedSto.call(callback);
23487
23533
  };
23488
23534
  }
23489
23535
  getCancelAnimationFrame() {
23490
23536
  return h => {
23491
- clearTimeout(h);
23537
+ rafBasedSto.clear(h);
23492
23538
  };
23493
23539
  }
23494
23540
  addEventListener(type, listener, options) {
@@ -25612,13 +25658,13 @@
25612
25658
  lineWidth = groupAttribute.lineWidth,
25613
25659
  visible = groupAttribute.visible
25614
25660
  } = group.attribute,
25615
- fVisible = rectFillVisible(opacity, fillOpacity, width, height),
25661
+ fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
25616
25662
  sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
25617
- doFill = runFill(fill),
25663
+ doFill = runFill(fill, background),
25618
25664
  doStroke = runStroke(stroke, lineWidth);
25619
25665
  if (!group.valid || !visible) return;
25620
25666
  if (!clip) {
25621
- if (!(doFill || doStroke || background)) return;
25667
+ if (!doFill && !doStroke) return;
25622
25668
  if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
25623
25669
  }
25624
25670
  if (path && path.length && drawContext.drawContribution) {
@@ -25700,7 +25746,7 @@
25700
25746
  lineWidth = lineAttribute.lineWidth,
25701
25747
  visible = lineAttribute.visible
25702
25748
  } = line.attribute,
25703
- fVisible = fillVisible(opacity, fillOpacity),
25749
+ fVisible = fillVisible(opacity, fillOpacity, fill),
25704
25750
  sVisible = strokeVisible(opacity, strokeOpacity),
25705
25751
  doFill = runFill(fill),
25706
25752
  doStroke = runStroke(stroke, lineWidth);
@@ -25750,7 +25796,7 @@
25750
25796
  opacity = areaAttribute.opacity,
25751
25797
  visible = areaAttribute.visible
25752
25798
  } = area.attribute,
25753
- fVisible = fillVisible(opacity, fillOpacity),
25799
+ fVisible = fillVisible(opacity, fillOpacity, fill),
25754
25800
  doFill = runFill(fill);
25755
25801
  if (!area.valid || !visible) return;
25756
25802
  if (!doFill) return;
@@ -25940,7 +25986,7 @@
25940
25986
  visible = rectAttribute.visible
25941
25987
  } = rect.attribute,
25942
25988
  z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
25943
- fVisible = rectFillVisible(opacity, fillOpacity, width, height),
25989
+ fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
25944
25990
  sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
25945
25991
  doFill = runFill(fill),
25946
25992
  doStroke = runStroke(stroke, lineWidth);
@@ -26068,7 +26114,7 @@
26068
26114
  visible = richtextAttribute.visible
26069
26115
  } = richtext.attribute;
26070
26116
  if (!richtext.valid || !visible) return;
26071
- if (!fillVisible(opacity, fillOpacity)) return;
26117
+ if (!fillVisible(opacity, fillOpacity, !0)) return;
26072
26118
  context.translate(x, y);
26073
26119
  richtext.getFrameCache().draw(context, this.drawIcon);
26074
26120
  }
@@ -26228,13 +26274,13 @@
26228
26274
  strokeOpacity = arcAttribute.strokeOpacity,
26229
26275
  visible = arcAttribute.visible
26230
26276
  } = arc.attribute,
26231
- fVisible = fillVisible(opacity, fillOpacity),
26277
+ fVisible = fillVisible(opacity, fillOpacity, fill),
26232
26278
  sVisible = strokeVisible(opacity, strokeOpacity),
26233
- doFill = runFill(fill),
26279
+ doFill = runFill(fill, background),
26234
26280
  doStroke = runStroke(stroke, lineWidth),
26235
26281
  z = null !== (_a = this.z) && void 0 !== _a ? _a : 0;
26236
26282
  if (!arc.valid || !visible) return;
26237
- if (!(doFill || doStroke || background)) return;
26283
+ if (!doFill && !doStroke) return;
26238
26284
  if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
26239
26285
  const {
26240
26286
  outerRadius = arcAttribute.outerRadius,
@@ -26321,7 +26367,7 @@
26321
26367
  face = [!0, !0, !0, !0, !0, !0]
26322
26368
  } = pyramid3d.attribute,
26323
26369
  z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
26324
- fVisible = fillVisible(opacity, fillOpacity),
26370
+ fVisible = fillVisible(opacity, fillOpacity, fill),
26325
26371
  sVisible = strokeVisible(opacity, strokeOpacity),
26326
26372
  doFill = runFill(fill),
26327
26373
  doStroke = runStroke(stroke, lineWidth);
@@ -27953,7 +27999,7 @@
27953
27999
  return this.viewBox.height();
27954
28000
  }
27955
28001
  }
27956
- })), params.autoRender && this.enableAutoRender(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.ticker = params.ticker || defaultTicker, !1 !== params.interactiveLayer && this.initInteractiveLayer();
28002
+ })), params.autoRender && this.enableAutoRender(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.ticker = params.ticker || defaultTicker, this.supportInteractiveLayer = !1 !== params.interactiveLayer;
27957
28003
  }
27958
28004
  get3dOptions(options) {
27959
28005
  const {
@@ -28089,8 +28135,8 @@
28089
28135
  removeLayer(ILayerId) {
28090
28136
  return this.removeChild(this.findChildByUid(ILayerId));
28091
28137
  }
28092
- initInteractiveLayer() {
28093
- this.interactiveLayer = this.createLayer(), this.interactiveLayer.name = "_builtin_interactive";
28138
+ tryInitInteractiveLayer() {
28139
+ this.supportInteractiveLayer && !this.interactiveLayer && (this.interactiveLayer = this.createLayer(), this.interactiveLayer.name = "_builtin_interactive");
28094
28140
  }
28095
28141
  clearViewBox(color) {
28096
28142
  this.window.clearViewBox(this._viewBox, color);
@@ -29010,6 +29056,9 @@
29010
29056
  line.name = "line", line.id = this._getNodeId("line"), isEmpty(null == state ? void 0 : state.line) || (line.states = state.line), this.line = line, this.add(line);
29011
29057
  }
29012
29058
  renderSymbol(attribute, dim) {
29059
+ const {
29060
+ autoRotate = !0
29061
+ } = attribute;
29013
29062
  let symbol;
29014
29063
  if (null == attribute ? void 0 : attribute.visible) {
29015
29064
  const startAngle = this._startAngle,
@@ -29038,7 +29087,7 @@
29038
29087
  }, rotate = endAngle + Math.PI / 2), symbol = createSymbol(Object.assign(Object.assign(Object.assign({}, position), {
29039
29088
  symbolType: symbolType,
29040
29089
  size: size,
29041
- angle: rotate + refAngle,
29090
+ angle: autoRotate ? rotate + refAngle : 0,
29042
29091
  strokeBoundsBuffer: 0
29043
29092
  }), style)), symbol.name = `${dim}-symbol`, symbol.id = this._getNodeId(`${dim}-symbol`), isEmpty(null == state ? void 0 : state.symbol) || (symbol.states = state.symbol), this.add(symbol);
29044
29093
  }
@@ -29059,6 +29108,7 @@
29059
29108
  },
29060
29109
  startSymbol: {
29061
29110
  visible: !1,
29111
+ autoRotate: !0,
29062
29112
  symbolType: "triangle",
29063
29113
  size: 12,
29064
29114
  refX: 0,
@@ -29071,6 +29121,7 @@
29071
29121
  },
29072
29122
  endSymbol: {
29073
29123
  visible: !1,
29124
+ autoRotate: !0,
29074
29125
  symbolType: "triangle",
29075
29126
  size: 12,
29076
29127
  refX: 0,
@@ -29361,7 +29412,7 @@
29361
29412
  }
29362
29413
  getTextAlign(vector) {
29363
29414
  let align = "center";
29364
- return isNumberClose(vector[0], 0) ? align = "center" : vector[0] > 0 ? align = "start" : vector[0] < 0 && (align = "end"), align;
29415
+ return isNumberClose(vector[0], 0) ? isNumberClose(vector[1], 0) ? Object.is(vector[1], -0) ? align = "start" : Object.is(vector[0], -0) && (align = "end") : align = "center" : vector[0] > 0 ? align = "start" : vector[0] < 0 && (align = "end"), align;
29365
29416
  }
29366
29417
  getTickLineItems() {
29367
29418
  const {
@@ -29470,7 +29521,7 @@
29470
29521
  layer > 0 && (0 === axisVector[1] ? offset += (this.axisLabelLayerSize[layer - 1].height + get$4(this.attribute, "label.space", 4)) * layer : offset += (this.axisLabelLayerSize[layer - 1].width + get$4(this.attribute, "label.space", 4)) * layer);
29471
29522
  const point = this.getVerticalCoord(tickDatum.point, offset, inside),
29472
29523
  vector = this.getVerticalVector(offset, inside, point),
29473
- text = formatMethod ? formatMethod(tickDatum.label, tickDatum, index, tickData, layer) : tickDatum.label;
29524
+ text = formatMethod ? formatMethod(`${tickDatum.label}`, tickDatum, index, tickData, layer) : tickDatum.label;
29474
29525
  let {
29475
29526
  style: textStyle
29476
29527
  } = tagAttributes;
@@ -29645,10 +29696,12 @@
29645
29696
  orient: orient
29646
29697
  } = config;
29647
29698
  !isEmpty(labels) && isValidNumber(limitLength) && labels.forEach(label => {
29648
- const limitLabelLength = 0 === label.attribute.angle || isNil(label.attribute.angle) ? "top" === orient || "bottom" === orient ? null : limitLength : Math.abs(limitLength / Math.sin(label.attribute.angle));
29649
- label.setAttributes({
29699
+ if (("top" === orient || "bottom" === orient) && Math.floor(label.AABBBounds.height()) <= limitLength) return;
29700
+ if (("left" === orient || "right" === orient) && Math.floor(label.AABBBounds.width()) <= limitLength) return;
29701
+ let limitLabelLength = 0 === label.attribute.angle || isNil(label.attribute.angle) ? "top" === orient || "bottom" === orient ? null : limitLength : Math.abs(limitLength / Math.sin(label.attribute.angle));
29702
+ isValidNumber(label.attribute.maxLineWidth) && (limitLabelLength = isValidNumber(limitLabelLength) ? Math.min(label.attribute.maxLineWidth, limitLabelLength) : label.attribute.maxLineWidth), label.setAttributes({
29650
29703
  maxLineWidth: limitLabelLength,
29651
- ellipsis: ellipsis
29704
+ ellipsis: label.attribute.ellipsis || ellipsis
29652
29705
  });
29653
29706
  });
29654
29707
  }
@@ -29913,7 +29966,7 @@
29913
29966
  verticalFactor = 1
29914
29967
  } = this.attribute,
29915
29968
  factor = (inside ? 1 : -1) * verticalFactor;
29916
- return isNumberClose(vector[1], 0) ? base = isNumberClose(vector[0], 0) ? 1 === factor ? "bottom" : "top" : "middle" : vector[1] > 0 ? base = "top" : vector[1] < 0 && (base = "bottom"), base;
29969
+ return isNumberClose(vector[1], 0) ? base = !isNumberClose(vector[0], 0) || Object.is(vector[0], -0) || Object.is(vector[1], -0) ? "middle" : 1 === factor ? "bottom" : "top" : vector[1] > 0 ? base = "top" : vector[1] < 0 && (base = "bottom"), base;
29917
29970
  }
29918
29971
  handleLabelsOverlap(labelShapes, labelData, layer, layerCount) {
29919
29972
  var _a, _b, _c;
@@ -30409,7 +30462,7 @@
30409
30462
  const innerGroupBounds = innerGroup.AABBBounds,
30410
30463
  innerGroupWidth = innerGroupBounds.width(),
30411
30464
  innerGroupHeight = innerGroupBounds.height(),
30412
- itemGroupWidth = this._itemWidthByUser || innerGroupWidth + parsedPadding[1] + parsedPadding[3],
30465
+ itemGroupWidth = isValid(this.attribute.item.width) ? this.attribute.item.width : innerGroupWidth + parsedPadding[1] + parsedPadding[3],
30413
30466
  itemGroupHeight = this._itemHeightByUser || innerGroupHeight + parsedPadding[0] + parsedPadding[2];
30414
30467
  return itemGroup.attribute.width = itemGroupWidth, itemGroup.attribute.height = itemGroupHeight, innerGroup.translateTo(-innerGroupBounds.x1 + parsedPadding[3], -innerGroupBounds.y1 + parsedPadding[0]), itemGroup;
30415
30468
  }
@@ -31360,7 +31413,7 @@
31360
31413
  },
31361
31414
  label: {
31362
31415
  visible: true,
31363
- space: 0,
31416
+ space: 1,
31364
31417
  style: {
31365
31418
  fontSize: THEME_CONSTANTS.LABEL_FONT_SIZE,
31366
31419
  fill: '#89909D',
@@ -39084,34 +39137,35 @@
39084
39137
  fontSize: DEFAULT_TEXT_FONT_SIZE
39085
39138
  },
39086
39139
  getTextBounds: useNaiveCanvas ? undefined : getTextBounds,
39087
- specialCharSet: `-/: .,@%'"~${TextMeasure.ALPHABET_CHAR_SET}${TextMeasure.ALPHABET_CHAR_SET.toUpperCase()}`,
39140
+ specialCharSet: `{}()//&-/: .,@%'"~${TextMeasure.ALPHABET_CHAR_SET}${TextMeasure.ALPHABET_CHAR_SET.toUpperCase()}`,
39088
39141
  ...(option ?? {})
39089
39142
  }, textSpec);
39090
39143
  };
39091
39144
  const fastTextMeasureCache = new Map();
39092
- function getFastTextMeasure(fontSize, fontFamily) {
39093
- const key = `${fontSize}-${fontFamily}`;
39145
+ function getFastTextMeasure(fontSize, fontWeight, fontFamily) {
39146
+ const key = `${fontSize}-${fontWeight}-${fontFamily}`;
39094
39147
  const cache = fastTextMeasureCache.get(key);
39095
39148
  if (cache) {
39096
39149
  return cache;
39097
39150
  }
39098
39151
  const fastTextMeasure = initTextMeasure({
39099
39152
  fontSize,
39100
- fontFamily
39153
+ fontFamily,
39154
+ fontWeight
39101
39155
  });
39102
39156
  fastTextMeasureCache.set(key, fastTextMeasure);
39103
39157
  return fastTextMeasure;
39104
39158
  }
39105
39159
  class TextMeasureTool {
39106
39160
  measureText(text, options) {
39107
- const { fontSize, fontFamily } = options;
39108
- const fastTextMeasure = getFastTextMeasure(fontSize, fontFamily);
39161
+ const { fontSize, fontFamily, fontWeight } = options;
39162
+ const fastTextMeasure = getFastTextMeasure(fontSize, fontWeight, fontFamily);
39109
39163
  const textMeasure = fastTextMeasure.measure(text);
39110
39164
  return textMeasure;
39111
39165
  }
39112
39166
  measureTextWidth(text, options) {
39113
- const { fontSize, fontFamily = 'sans-serif' } = options;
39114
- const fastTextMeasure = getFastTextMeasure(fontSize, fontFamily);
39167
+ const { fontSize, fontFamily = 'sans-serif', fontWeight = 'normal' } = options;
39168
+ const fastTextMeasure = getFastTextMeasure(fontSize, fontWeight, fontFamily);
39115
39169
  const textMeasure = fastTextMeasure.measure(text);
39116
39170
  return textMeasure.width;
39117
39171
  }
@@ -39192,7 +39246,7 @@
39192
39246
  let width;
39193
39247
  let str;
39194
39248
  const attribute = this.attribute;
39195
- const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, fontFamily = textTheme.fontFamily, stroke = textTheme.stroke, lineHeight = attribute.lineHeight ?? attribute.fontSize ?? textTheme.fontSize, lineWidth = textTheme.lineWidth } = attribute;
39249
+ const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, fontFamily = textTheme.fontFamily, fontWeight = textTheme.fontWeight, stroke = textTheme.stroke, lineHeight = attribute.lineHeight ?? attribute.fontSize ?? textTheme.fontSize, lineWidth = textTheme.lineWidth } = attribute;
39196
39250
  if (!this.shouldUpdateShape() && this.cache) {
39197
39251
  width = this.cache.clipedWidth;
39198
39252
  const dx = textDrawOffsetX(textAlign, width);
@@ -39219,7 +39273,7 @@
39219
39273
  this.cache.clipedWidth = width;
39220
39274
  }
39221
39275
  else {
39222
- width = textMeasure.measureTextWidth(text.toString(), { fontSize, fontFamily });
39276
+ width = textMeasure.measureTextWidth(text.toString(), { fontSize, fontFamily, fontWeight });
39223
39277
  this.cache.clipedText = text.toString();
39224
39278
  this.cache.clipedWidth = width;
39225
39279
  }
@@ -39234,7 +39288,7 @@
39234
39288
  }
39235
39289
  updateMultilineAABBBounds(text) {
39236
39290
  const textTheme = getTheme(this).text;
39237
- const { fontFamily = textTheme.fontFamily, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, lineHeight = this.attribute.lineHeight ?? this.attribute.fontSize ?? textTheme.fontSize, ellipsis = textTheme.ellipsis, maxLineWidth, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, heightLimit = -1, lineClamp = textTheme.lineClamp, autoWrapText = textTheme.autoWrapText } = this.attribute;
39291
+ const { fontFamily = textTheme.fontFamily, textAlign = textTheme.textAlign, fontWeight = textTheme.fontWeight, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, lineHeight = this.attribute.lineHeight ?? this.attribute.fontSize ?? textTheme.fontSize, ellipsis = textTheme.ellipsis, maxLineWidth, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, heightLimit = -1, lineClamp = textTheme.lineClamp, autoWrapText = textTheme.autoWrapText } = this.attribute;
39238
39292
  if (!this.shouldUpdateShape() && this.cache?.layoutData) {
39239
39293
  const bbox = this.cache.layoutData.bbox;
39240
39294
  this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);
@@ -39283,7 +39337,7 @@
39283
39337
  const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth);
39284
39338
  if (str !== '' && clip.str === '') {
39285
39339
  clip.str = str.substring(0, 1);
39286
- clip.width = textMeasure.measureTextWidth(clip.str, { fontSize, fontFamily });
39340
+ clip.width = textMeasure.measureTextWidth(clip.str, { fontSize, fontFamily, fontWeight });
39287
39341
  }
39288
39342
  linesLayout.push({
39289
39343
  str: clip.str,
@@ -39969,7 +40023,7 @@
39969
40023
  cellContent.updateHeight(newHeight);
39970
40024
  }
39971
40025
  cellGroup.forEachChildren((child) => {
39972
- if (child.type === 'rect') ;
40026
+ if (child.type === 'rect' || child.type === 'chart') ;
39973
40027
  else if (child.name === 'mark') {
39974
40028
  child.setAttribute('y', 0);
39975
40029
  }
@@ -40300,7 +40354,7 @@
40300
40354
  }
40301
40355
  else {
40302
40356
  rowStart = row + 1;
40303
- rowEnd = scene.bodyRowEnd;
40357
+ rowEnd = scene.bodyRowEnd - scene.table.bottomFrozenRowCount;
40304
40358
  }
40305
40359
  for (let rowIndex = rowStart; rowIndex <= rowEnd; rowIndex++) {
40306
40360
  for (let colIndex = 0; colIndex < scene.table.colCount; colIndex++) {
@@ -40611,6 +40665,9 @@
40611
40665
  let maxHeight = 0;
40612
40666
  for (let col = 0; col < scene.table.colCount; col++) {
40613
40667
  const cell = scene.highPerformanceGetCell(col, row);
40668
+ if (cell.role === 'empty') {
40669
+ return;
40670
+ }
40614
40671
  let cellHeight = getCleanCellHeight(cell, scene);
40615
40672
  const mergeInfo = getCellMergeInfo(scene.table, col, row);
40616
40673
  if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {
@@ -40621,6 +40678,9 @@
40621
40678
  for (let col = 0; col < scene.table.colCount; col++) {
40622
40679
  let distHeight = maxHeight;
40623
40680
  const cell = scene.highPerformanceGetCell(col, row);
40681
+ if (cell.role === 'empty') {
40682
+ return;
40683
+ }
40624
40684
  const mergeInfo = getCellMergeInfo(scene.table, col, row);
40625
40685
  if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {
40626
40686
  for (let rowIndex = mergeInfo.start.row; rowIndex <= mergeInfo.end.row; rowIndex++) {
@@ -41648,7 +41708,8 @@
41648
41708
  canvasControled: false,
41649
41709
  viewBox: { x1: 0, x2: 0, y1: 0, y2: 0 },
41650
41710
  interactive: false,
41651
- animation: false
41711
+ animation: false,
41712
+ autoFit: false
41652
41713
  });
41653
41714
  this.chartInstance.renderSync();
41654
41715
  }
@@ -41683,6 +41744,7 @@
41683
41744
  },
41684
41745
  animation: false,
41685
41746
  interactive: true,
41747
+ autoFit: false,
41686
41748
  beforeRender: (stage) => {
41687
41749
  const ctx = stage.window.getContext();
41688
41750
  ctx.inuse = true;
@@ -41788,7 +41850,7 @@
41788
41850
  x2: viewBox.x2 - chart.getRootNode().table.scrollLeft,
41789
41851
  y1: viewBox.y1 - chart.getRootNode().table.scrollTop,
41790
41852
  y2: viewBox.y2 - chart.getRootNode().table.scrollTop
41791
- });
41853
+ }, false);
41792
41854
  if (typeof dataId === 'string') {
41793
41855
  chartInstance.updateDataSync(dataId, data ?? []);
41794
41856
  }
@@ -42282,10 +42344,12 @@
42282
42344
  drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
42283
42345
  if (group.role === 'cell') {
42284
42346
  const table = group.stage.table;
42285
- const hoverColor = getCellHoverColor(group, table);
42286
- if (hoverColor) {
42287
- group.oldColor = group.attribute.fill;
42288
- group.attribute.fill = hoverColor;
42347
+ if (table.stateManeger.interactionState !== InteractionState.scrolling) {
42348
+ const hoverColor = getCellHoverColor(group, table);
42349
+ if (hoverColor) {
42350
+ group.oldColor = group.attribute.fill;
42351
+ group.attribute.fill = hoverColor;
42352
+ }
42289
42353
  }
42290
42354
  }
42291
42355
  }
@@ -42440,7 +42504,9 @@
42440
42504
  ? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
42441
42505
  : layout.dataset.collectedValues[defaultKey];
42442
42506
  const index = layout.getRecordIndexByCol(col);
42443
- const range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
42507
+ const range = data
42508
+ ? data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]]
42509
+ : { max: 1, min: 0 };
42444
42510
  const axisOption = getAxisOption(col, row, 'top', layout);
42445
42511
  if (axisOption?.visible === false) {
42446
42512
  return;
@@ -42468,7 +42534,7 @@
42468
42534
  ? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
42469
42535
  : layout.dataset.collectedValues[defaultKey];
42470
42536
  const index = layout.getRecordIndexByCol(col);
42471
- const range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
42537
+ const range = data?.[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]] ?? { min: 0, max: 1 };
42472
42538
  let indicatorInfo = null;
42473
42539
  indicatorKeys.forEach(key => {
42474
42540
  const info = layout.getIndicatorInfo(key);
@@ -42483,8 +42549,7 @@
42483
42549
  return merge$2({
42484
42550
  title: {
42485
42551
  visible: true,
42486
- text: indicatorInfo?.caption,
42487
- autoRotate: true
42552
+ text: indicatorInfo?.caption
42488
42553
  },
42489
42554
  range: range
42490
42555
  }, axisOption, {
@@ -42511,7 +42576,10 @@
42511
42576
  return;
42512
42577
  }
42513
42578
  return merge$2({
42514
- domain: Array.from(domain).reverse()
42579
+ domain: Array.from(domain).reverse(),
42580
+ title: {
42581
+ autoRotate: true
42582
+ }
42515
42583
  }, axisOption, {
42516
42584
  orient: 'left',
42517
42585
  type: 'band'
@@ -42532,7 +42600,7 @@
42532
42600
  ? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
42533
42601
  : layout.dataset.collectedValues[defaultKey];
42534
42602
  const index = layout.getRecordIndexByRow(row);
42535
- const range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
42603
+ const range = data?.[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]] ?? { min: 0, max: 1 };
42536
42604
  let indicatorInfo = null;
42537
42605
  indicatorKeys.forEach(key => {
42538
42606
  const info = layout.getIndicatorInfo(key);
@@ -42575,13 +42643,16 @@
42575
42643
  ? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
42576
42644
  : layout.dataset.collectedValues[defaultKey];
42577
42645
  const index = layout.getRecordIndexByRow(row);
42578
- const range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
42646
+ const range = data?.[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]] ?? { min: 0, max: 1 };
42579
42647
  const axisOption = getAxisOption(col, row, 'right', layout);
42580
42648
  if (axisOption?.visible === false) {
42581
42649
  return;
42582
42650
  }
42583
42651
  return merge$2({
42584
- range: range
42652
+ range: range,
42653
+ title: {
42654
+ autoRotate: true
42655
+ }
42585
42656
  }, axisOption, {
42586
42657
  orient: 'right',
42587
42658
  type: 'linear',
@@ -42600,7 +42671,7 @@
42600
42671
  const data = layout.dataset.collectedValues[columnDimensionKey];
42601
42672
  const recordCol = layout.getRecordIndexByCol(col);
42602
42673
  const colPath = layout.getColKeysPath()[recordCol];
42603
- const domain = data[colPath[colPath.length - 1]];
42674
+ const domain = data?.[colPath[colPath.length - 1]] ?? [];
42604
42675
  const axisOption = getAxisOption(col, row, 'bottom', layout);
42605
42676
  if (axisOption?.visible === false) {
42606
42677
  return;
@@ -42668,7 +42739,7 @@
42668
42739
  return false;
42669
42740
  }
42670
42741
 
42671
- function computeAxisConpomentWidth(config, table) {
42742
+ function computeAxisComponentWidth(config, table) {
42672
42743
  const attribute = merge$2({}, commonAxis, config);
42673
42744
  const tickWidth = attribute.tick.width ?? 4;
42674
42745
  let labelWidth = 0;
@@ -42676,8 +42747,12 @@
42676
42747
  if (attribute.type === 'band') {
42677
42748
  const domain = attribute.domain;
42678
42749
  domain.forEach((text) => {
42750
+ if (attribute.label.formatMethod) {
42751
+ text = attribute.label.formatMethod(text);
42752
+ }
42679
42753
  labelWidth = Math.max(labelWidth, table.measureText(text, {
42680
42754
  fontSize: attribute.label?.style?.fontSize,
42755
+ fontWeight: attribute.label?.style?.fontWeight,
42681
42756
  fontFamily: attribute.label?.style?.fontFamily
42682
42757
  }).width);
42683
42758
  });
@@ -42689,8 +42764,12 @@
42689
42764
  const minString = formatDecimal(minNumber);
42690
42765
  const maxString = formatDecimal(maxNumber);
42691
42766
  [minString, maxString].forEach(text => {
42767
+ if (attribute.label.formatMethod) {
42768
+ text = attribute.label.formatMethod(text);
42769
+ }
42692
42770
  labelWidth = Math.max(labelWidth, table.measureText(text, {
42693
42771
  fontSize: attribute.label?.style?.fontSize,
42772
+ fontWeight: attribute.label?.style?.fontWeight,
42694
42773
  fontFamily: attribute.label?.style?.fontFamily
42695
42774
  }).width + 2);
42696
42775
  });
@@ -42699,10 +42778,11 @@
42699
42778
  }
42700
42779
  let titleWidth = 0;
42701
42780
  if (attribute.title.visible && attribute.title.text) {
42702
- if (attribute.title.autoRotate) {
42781
+ if ((config.orient === 'left' || config.orient === 'right') && attribute.title.autoRotate) {
42703
42782
  titleWidth =
42704
42783
  table.measureText(attribute.title.text, {
42705
42784
  fontSize: attribute.title?.style?.fontSize,
42785
+ fontWeight: attribute.title?.style?.fontWeight,
42706
42786
  fontFamily: attribute.title?.style?.fontFamily
42707
42787
  }).height + 2;
42708
42788
  }
@@ -42710,6 +42790,7 @@
42710
42790
  titleWidth =
42711
42791
  table.measureText(attribute.title.text, {
42712
42792
  fontSize: attribute.title?.style?.fontSize,
42793
+ fontWeight: attribute.title?.style?.fontWeight,
42713
42794
  fontFamily: attribute.title?.style?.fontFamily
42714
42795
  }).width + 2;
42715
42796
  }
@@ -42717,6 +42798,61 @@
42717
42798
  }
42718
42799
  return tickWidth + labelWidth + titleWidth;
42719
42800
  }
42801
+ function computeAxisComponentHeight(config, table) {
42802
+ const attribute = merge$2({}, commonAxis, config);
42803
+ const tickHeight = attribute.tick.width ?? 4;
42804
+ let labelHeight = 0;
42805
+ if (attribute.label.visible) {
42806
+ if (attribute.type === 'band') {
42807
+ const domain = attribute.domain;
42808
+ domain.forEach((text) => {
42809
+ if (attribute.label.formatMethod) {
42810
+ text = attribute.label.formatMethod(text);
42811
+ }
42812
+ labelHeight = Math.max(labelHeight, table.measureText(text, {
42813
+ fontSize: attribute.label?.style?.fontSize,
42814
+ fontFamily: attribute.label?.style?.fontFamily
42815
+ }).height);
42816
+ });
42817
+ }
42818
+ else {
42819
+ const range = attribute.range;
42820
+ const minNumber = Math.abs(range.min) > 1 ? Math.round(range.min) : range.min;
42821
+ const maxNumber = Math.abs(range.max) > 1 ? Math.round(range.max) : range.max;
42822
+ const minString = formatDecimal(minNumber);
42823
+ const maxString = formatDecimal(maxNumber);
42824
+ [minString, maxString].forEach(text => {
42825
+ if (attribute.label.formatMethod) {
42826
+ text = attribute.label.formatMethod(text);
42827
+ }
42828
+ labelHeight = Math.max(labelHeight, table.measureText(text, {
42829
+ fontSize: attribute.label?.style?.fontSize,
42830
+ fontFamily: attribute.label?.style?.fontFamily
42831
+ }).height + 2);
42832
+ });
42833
+ }
42834
+ labelHeight += attribute.label.space ?? 4;
42835
+ }
42836
+ let titleHeight = 0;
42837
+ if (attribute.title.visible && attribute.title.text) {
42838
+ if ((config.orient === 'bottom' || config.orient === 'top') && attribute.title.autoRotate) {
42839
+ titleHeight =
42840
+ table.measureText(attribute.title.text, {
42841
+ fontSize: attribute.title?.style?.fontSize,
42842
+ fontFamily: attribute.title?.style?.fontFamily
42843
+ }).width + 2;
42844
+ }
42845
+ else {
42846
+ titleHeight =
42847
+ table.measureText(attribute.title.text, {
42848
+ fontSize: attribute.title?.style?.fontSize,
42849
+ fontFamily: attribute.title?.style?.fontFamily
42850
+ }).height + 2;
42851
+ }
42852
+ titleHeight += attribute.title.space ?? 4;
42853
+ }
42854
+ return tickHeight + labelHeight + titleHeight;
42855
+ }
42720
42856
  function formatDecimal(number) {
42721
42857
  if (typeof number !== 'number') {
42722
42858
  number = Number(number);
@@ -42725,6 +42861,7 @@
42725
42861
  }
42726
42862
 
42727
42863
  function computeColsWidth(table, colStart, colEnd, update) {
42864
+ typeof window !== 'undefined' ? window.performance.now() : 0;
42728
42865
  colStart = colStart ?? 0;
42729
42866
  colEnd = colEnd ?? table.colCount - 1;
42730
42867
  if (colStart === 0 && colEnd === table.colCount - 1) {
@@ -42882,7 +43019,7 @@
42882
43019
  const layout = table.internalProps.layoutMap;
42883
43020
  const axisConfig = getAxisConfigInPivotChart(col, row, layout);
42884
43021
  if (axisConfig) {
42885
- const axisWidth = computeAxisConpomentWidth(axisConfig, table);
43022
+ const axisWidth = computeAxisComponentWidth(axisConfig, table);
42886
43023
  if (typeof axisWidth === 'number') {
42887
43024
  maxWidth = Math.max(axisWidth, maxWidth);
42888
43025
  continue;
@@ -43004,12 +43141,14 @@
43004
43141
  const paddingWidth = padding[1] + padding[3];
43005
43142
  const fontSize = getProp('fontSize', actStyle, col, row, table);
43006
43143
  const fontFamily = getProp('fontFamily', actStyle, col, row, table);
43144
+ const fontWeight = getProp('fontWeight', actStyle, col, row, table);
43007
43145
  const lines = validToString(cellValue).split('\n') || [];
43008
43146
  if (lines.length >= 1) {
43009
43147
  lines.forEach((line) => {
43010
43148
  const width = table.measureText(line.slice(0, table.options.maxCharactersNumber || 200), {
43011
43149
  fontSize,
43012
- fontFamily
43150
+ fontFamily,
43151
+ fontWeight
43013
43152
  }).width;
43014
43153
  maxWidth = Math.max((width + paddingWidth + 4 + iconWidth) / spanCol, maxWidth);
43015
43154
  });
@@ -43041,19 +43180,14 @@
43041
43180
  height: 0,
43042
43181
  textConfig: []
43043
43182
  });
43044
- function computeRowsHeight(table, rowStart, rowEnd) {
43045
- const time = typeof window !== 'undefined' ? window.performance.now() : 0;
43183
+ function computeRowsHeight(table, rowStart, rowEnd, isClearRowRangeHeightsMap = true) {
43184
+ typeof window !== 'undefined' ? window.performance.now() : 0;
43046
43185
  if (table.heightMode === 'autoHeight' || table.heightMode === 'adaptive') {
43047
43186
  rowStart = rowStart ?? 0;
43048
43187
  rowEnd = rowEnd ?? table.rowCount - 1;
43049
- if (rowStart === 0 && rowEnd === table.rowCount - 1) {
43188
+ if ((rowStart === 0 && rowEnd === table.rowCount - 1) || isClearRowRangeHeightsMap) {
43050
43189
  table._clearRowRangeHeightsMap();
43051
43190
  }
43052
- else {
43053
- for (let row = rowStart; row <= rowEnd; row++) {
43054
- table._clearRowRangeHeightsMap(row);
43055
- }
43056
- }
43057
43191
  for (let row = rowStart; row < table.columnHeaderLevelCount; row++) {
43058
43192
  const height = computeRowHeight(row, 0, table.colCount - 1, table);
43059
43193
  table.setRowHeight(row, height);
@@ -43061,24 +43195,31 @@
43061
43195
  if (rowEnd < table.columnHeaderLevelCount) {
43062
43196
  return;
43063
43197
  }
43064
- if (!table.internalProps.transpose &&
43065
- !(table.isPivotTable() && table.internalProps.layoutMap.indicatorsAsCol) &&
43198
+ if (!(table.internalProps.transpose ||
43199
+ (table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol)) &&
43066
43200
  checkFixedStyleAndNoWrap(table)) {
43067
43201
  const height = computeRowHeight(table.columnHeaderLevelCount, 0, table.colCount - 1, table);
43068
- fillRowsHeight(height, table.columnHeaderLevelCount, table.rowCount - 1, table);
43202
+ fillRowsHeight(height, table.columnHeaderLevelCount, table.rowCount - 1 - table.bottomFrozenRowCount, table);
43203
+ for (let row = table.rowCount - table.bottomFrozenRowCount; row <= rowEnd; row++) {
43204
+ const height = computeRowHeight(row, 0, table.colCount - 1, table);
43205
+ table.setRowHeight(row, height);
43206
+ }
43069
43207
  }
43070
- else if ((table.internalProps.transpose ||
43071
- (table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol)) &&
43072
- checkFixedStyleAndNoWrap(table)) {
43208
+ else if (table.internalProps.transpose ||
43209
+ (table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol)) {
43073
43210
  for (let row = Math.max(rowStart, table.columnHeaderLevelCount); row <= rowEnd; row++) {
43074
- table._clearRowRangeHeightsMap(row);
43075
- const height = computeRowHeight(row, 0, table.rowHeaderLevelCount, table);
43211
+ let height;
43212
+ if (checkFixedStyleAndNoWrapForTranspose(table, row)) {
43213
+ height = computeRowHeight(row, 0, table.rowHeaderLevelCount, table);
43214
+ }
43215
+ else {
43216
+ height = computeRowHeight(row, 0, table.colCount - 1, table);
43217
+ }
43076
43218
  table.setRowHeight(row, height);
43077
43219
  }
43078
43220
  }
43079
43221
  else {
43080
43222
  for (let row = Math.max(rowStart, table.columnHeaderLevelCount); row <= rowEnd; row++) {
43081
- table._clearRowRangeHeightsMap(row);
43082
43223
  const height = computeRowHeight(row, 0, table.colCount - 1, table);
43083
43224
  table.setRowHeight(row, height);
43084
43225
  }
@@ -43104,11 +43245,12 @@
43104
43245
  table.setRowHeight(row, rowHeight, false);
43105
43246
  }
43106
43247
  }
43107
- console.log('computeRowsHeight time:', (typeof window !== 'undefined' ? window.performance.now() : 0) - time);
43108
43248
  }
43109
43249
  function computeRowHeight(row, startCol, endCol, table) {
43110
43250
  let maxHeight = 0;
43111
- if (table.isPivotChart() && row >= table.columnHeaderLevelCount) {
43251
+ if (table.isPivotChart() &&
43252
+ row >= table.columnHeaderLevelCount &&
43253
+ row < table.rowCount - table.bottomFrozenRowCount) {
43112
43254
  if (table.internalProps.layoutMap.indicatorsAsCol) {
43113
43255
  const optimunHeight = table.internalProps.layoutMap.getOptimunHeightForChart(row);
43114
43256
  if (optimunHeight > 0) {
@@ -43125,6 +43267,17 @@
43125
43267
  maxHeight = Math.max(customHeight, maxHeight);
43126
43268
  continue;
43127
43269
  }
43270
+ if (table.isPivotChart()) {
43271
+ const layout = table.internalProps.layoutMap;
43272
+ const axisConfig = getAxisConfigInPivotChart(col, row, layout);
43273
+ if (axisConfig) {
43274
+ const axisWidth = computeAxisComponentHeight(axisConfig, table);
43275
+ if (typeof axisWidth === 'number') {
43276
+ maxHeight = Math.max(axisWidth, maxHeight);
43277
+ continue;
43278
+ }
43279
+ }
43280
+ }
43128
43281
  const textHeight = computeTextHeight(col, row, table);
43129
43282
  maxHeight = Math.max(textHeight, maxHeight);
43130
43283
  }
@@ -43133,14 +43286,16 @@
43133
43286
  function checkFixedStyleAndNoWrap(table) {
43134
43287
  const { layoutMap } = table.internalProps;
43135
43288
  const row = table.columnHeaderLevelCount;
43289
+ if (table.internalProps.autoWrapText &&
43290
+ (table.options.heightMode === 'autoHeight' || table.options.heightMode === 'adaptive')) {
43291
+ return false;
43292
+ }
43136
43293
  for (let col = 0; col < table.colCount; col++) {
43137
- const isHeader = layoutMap.isHeader(col, row);
43138
- const cellDefine = isHeader ? layoutMap.getHeader(col, row) : layoutMap.getBody(col, row);
43294
+ const cellDefine = layoutMap.getBody(col, row);
43139
43295
  if (typeof cellDefine.style === 'function' ||
43140
43296
  typeof cellDefine.icon === 'function' ||
43141
- typeof cellDefine.headerIcon === 'function' ||
43142
- (isHeader ? cellDefine.define?.headerCustomRender : cellDefine.define?.customRender) ||
43143
- (isHeader ? typeof cellDefine.define?.headerIcon === 'function' : typeof cellDefine.define?.icon === 'function')) {
43297
+ cellDefine.define?.customRender ||
43298
+ typeof cellDefine.define?.icon === 'function') {
43144
43299
  return false;
43145
43300
  }
43146
43301
  const cellStyle = table._getCellStyle(col, row);
@@ -43153,6 +43308,28 @@
43153
43308
  }
43154
43309
  return true;
43155
43310
  }
43311
+ function checkFixedStyleAndNoWrapForTranspose(table, row) {
43312
+ const { layoutMap } = table.internalProps;
43313
+ if (table.internalProps.autoWrapText &&
43314
+ (table.options.heightMode === 'autoHeight' || table.options.heightMode === 'adaptive')) {
43315
+ return false;
43316
+ }
43317
+ const cellDefine = layoutMap.getBody(table.rowHeaderLevelCount, row);
43318
+ if (typeof cellDefine.style === 'function' ||
43319
+ typeof cellDefine.icon === 'function' ||
43320
+ cellDefine.define?.customRender ||
43321
+ typeof cellDefine.define?.icon === 'function') {
43322
+ return false;
43323
+ }
43324
+ const cellStyle = table._getCellStyle(table.rowHeaderLevelCount, row);
43325
+ if (typeof cellStyle.padding === 'function' ||
43326
+ typeof cellStyle.fontSize === 'function' ||
43327
+ typeof cellStyle.lineHeight === 'function' ||
43328
+ cellStyle.autoWrapText === true) {
43329
+ return false;
43330
+ }
43331
+ return true;
43332
+ }
43156
43333
  function fillRowsHeight(height, startRow, endRow, table) {
43157
43334
  for (let row = startRow; row <= endRow; row++) {
43158
43335
  table.setRowHeight(row, height);
@@ -43267,7 +43444,8 @@
43267
43444
  fontSize,
43268
43445
  fontStyle,
43269
43446
  fontWeight,
43270
- fontFamily
43447
+ fontFamily,
43448
+ lineHeight
43271
43449
  });
43272
43450
  maxHeight = utilTextMark.AABBBounds.height();
43273
43451
  }
@@ -43990,6 +44168,9 @@
43990
44168
  colGroup.needUpdate = true;
43991
44169
  }
43992
44170
  function updateColGroupContent(colGroup, proxy) {
44171
+ if (!colGroup) {
44172
+ return;
44173
+ }
43993
44174
  let cellGroup = colGroup.firstChild;
43994
44175
  while (cellGroup) {
43995
44176
  const newCellGroup = proxy.updateCellGroupContent(cellGroup);
@@ -44084,13 +44265,13 @@
44084
44265
  if (direction === 'up') {
44085
44266
  for (let col = colStart; col <= colEnd; col++) {
44086
44267
  for (let row = rowStart; row <= rowEnd; row++) {
44087
- const cellGroup = table.scenegraph.getCell(col, row);
44268
+ const cellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
44088
44269
  if (!cellGroup.row) {
44089
44270
  continue;
44090
44271
  }
44091
44272
  let y;
44092
44273
  if (cellGroup._prev) {
44093
- y = (cellGroup._prev?.attribute.y ?? 0) + (cellGroup._prev?.attribute.height ?? 0);
44274
+ y = cellGroup._prev?.attribute.y + table.getRowHeight(cellGroup._prev.row);
44094
44275
  }
44095
44276
  else {
44096
44277
  y = table.getRowsHeight(table.columnHeaderLevelCount, cellGroup.row - 1);
@@ -44102,22 +44283,26 @@
44102
44283
  else {
44103
44284
  for (let col = colStart; col <= colEnd; col++) {
44104
44285
  for (let row = rowEnd; row >= rowStart; row--) {
44105
- const cellGroup = table.scenegraph.getCell(col, row);
44286
+ const cellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
44106
44287
  if (!cellGroup.row) {
44107
44288
  continue;
44108
44289
  }
44109
44290
  let y;
44110
44291
  if (cellGroup._next) {
44111
- y = (cellGroup._next?.attribute.y ?? 0) - (cellGroup.attribute.height ?? 0);
44292
+ y = cellGroup._next?.attribute.y - table.getRowHeight(cellGroup.row);
44112
44293
  }
44113
44294
  else {
44114
- y = table.getRowsHeight(table.columnHeaderLevelCount, cellGroup.row) - (cellGroup.attribute.height ?? 0);
44115
- console.log('估计位置', table.getRowsHeight(table.columnHeaderLevelCount, cellGroup.row));
44295
+ y = table.getRowsHeight(table.columnHeaderLevelCount, cellGroup.row - 1);
44116
44296
  }
44117
44297
  cellGroup.setAttribute('y', y);
44118
44298
  }
44119
44299
  }
44120
44300
  }
44301
+ const totalActualBodyRowCount = Math.min(table.scenegraph.proxy.rowLimit, table.scenegraph.proxy.bodyBottomRow - table.scenegraph.proxy.bodyTopRow + 1);
44302
+ const totalBodyHeight = table.getRowsHeight(table.columnHeaderLevelCount, table.columnHeaderLevelCount + totalActualBodyRowCount);
44303
+ const totalHeight = table.getRowsHeight(table.columnHeaderLevelCount, table.rowCount - 1);
44304
+ table.scenegraph.proxy.yLimitTop = totalBodyHeight / 2;
44305
+ table.scenegraph.proxy.yLimitBottom = totalHeight - totalBodyHeight / 2;
44121
44306
  }
44122
44307
 
44123
44308
  async function dynamicSetY(y, proxy) {
@@ -44126,22 +44311,23 @@
44126
44311
  return;
44127
44312
  }
44128
44313
  const screenTopRow = screenTop.row;
44314
+ const screenTopY = screenTop.top;
44129
44315
  proxy.screenTopRow = screenTopRow;
44130
44316
  const deltaRow = screenTopRow - proxy.referenceRow;
44131
44317
  if (deltaRow > 0) {
44132
- moveCell(deltaRow, 'up', screenTopRow, proxy);
44133
- proxy.updateBody(y);
44318
+ moveCell(deltaRow, 'up', screenTopRow, screenTopY, proxy);
44319
+ proxy.updateBody(y - proxy.deltaY);
44134
44320
  }
44135
44321
  else if (deltaRow < 0) {
44136
- moveCell(-deltaRow, 'down', screenTopRow, proxy);
44137
- proxy.updateBody(y);
44322
+ moveCell(-deltaRow, 'down', screenTopRow, screenTopY, proxy);
44323
+ proxy.updateBody(y - proxy.deltaY);
44138
44324
  }
44139
44325
  else {
44140
- proxy.updateBody(y);
44326
+ proxy.updateBody(y - proxy.deltaY);
44141
44327
  }
44142
44328
  proxy.table.scenegraph.updateNextFrame();
44143
44329
  }
44144
- async function moveCell(count, direction, screenTopRow, proxy) {
44330
+ async function moveCell(count, direction, screenTopRow, screenTopY, proxy) {
44145
44331
  if (direction === 'up' && proxy.rowEnd + count > proxy.bodyBottomRow) {
44146
44332
  count = proxy.bodyBottomRow - proxy.rowEnd;
44147
44333
  }
@@ -44153,28 +44339,39 @@
44153
44339
  const endRow = direction === 'up' ? proxy.rowStart + count - 1 : proxy.rowEnd;
44154
44340
  updatePartRowPosition(startRow, endRow, direction, proxy);
44155
44341
  const distStartRow = direction === 'up' ? proxy.rowEnd + 1 : proxy.rowStart - count;
44156
- direction === 'up' ? proxy.rowEnd + count : proxy.rowStart - 1;
44157
- const syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);
44158
- const syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);
44342
+ const distEndRow = direction === 'up' ? proxy.rowEnd + count : proxy.rowStart - 1;
44343
+ let syncTopRow;
44344
+ let syncBottomRow;
44159
44345
  if (proxy.table.heightMode === 'autoHeight') {
44160
- computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);
44346
+ syncTopRow = distStartRow;
44347
+ syncBottomRow = distEndRow;
44161
44348
  }
44349
+ else {
44350
+ const topRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);
44351
+ const BottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);
44352
+ syncTopRow = Math.max(distStartRow, topRow);
44353
+ syncBottomRow = Math.min(distEndRow, BottomRow);
44354
+ }
44355
+ computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);
44162
44356
  proxy.rowStart = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;
44163
44357
  proxy.rowEnd = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;
44164
44358
  checkFirstRowMerge(syncTopRow, proxy);
44165
44359
  updateRowContent(syncTopRow, syncBottomRow, proxy);
44166
44360
  if (proxy.table.heightMode === 'autoHeight') {
44167
44361
  updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, direction);
44362
+ const cellGroup = proxy.table.scenegraph.highPerformanceGetCell(proxy.bodyLeftCol, screenTopRow, true);
44363
+ const delaY = screenTopY - (cellGroup.attribute.y + proxy.table.getFrozenRowsHeight() + proxy.table.scenegraph.proxy.deltaY);
44364
+ proxy.table.scenegraph.proxy.deltaY += delaY;
44168
44365
  }
44169
44366
  proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;
44170
44367
  proxy.totalRow = direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count;
44171
44368
  proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);
44172
44369
  proxy.rowUpdatePos = distStartRow;
44173
44370
  proxy.rowUpdateDirection = direction;
44174
- console.log('move end proxy', proxy.rowStart, proxy.rowEnd);
44175
- console.log('move end cell', proxy.table.scenegraph.bodyGroup.firstChild.firstChild.row, proxy.table.scenegraph.bodyGroup.firstChild.lastChild.row);
44176
44371
  proxy.table.scenegraph.updateNextFrame();
44177
- await proxy.progress();
44372
+ if (proxy.table.heightMode !== 'autoHeight') {
44373
+ await proxy.progress();
44374
+ }
44178
44375
  }
44179
44376
  else {
44180
44377
  const distStartRow = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;
@@ -44191,25 +44388,20 @@
44191
44388
  syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);
44192
44389
  syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);
44193
44390
  }
44194
- console.log('更新同步范围', syncTopRow, syncBottomRow);
44195
- if (proxy.table.heightMode === 'autoHeight') {
44196
- computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);
44197
- }
44391
+ computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);
44198
44392
  proxy.rowStart = distStartRow;
44199
44393
  proxy.rowEnd = distEndRow;
44200
44394
  checkFirstRowMerge(syncTopRow, proxy);
44201
44395
  updateRowContent(syncTopRow, syncBottomRow, proxy);
44202
- console.log('updateAutoRow', distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up');
44203
44396
  if (proxy.table.heightMode === 'autoHeight') {
44204
44397
  updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up');
44205
44398
  }
44399
+ proxy.table.scenegraph.proxy.deltaY = 0;
44206
44400
  proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;
44207
44401
  proxy.totalRow = direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count;
44208
44402
  proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);
44209
44403
  proxy.rowUpdatePos = proxy.rowStart;
44210
44404
  proxy.rowUpdateDirection = distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up';
44211
- console.log('move total end proxy', proxy.rowStart, proxy.rowEnd);
44212
- console.log('move total end cell', proxy.table.scenegraph.bodyGroup.firstChild.firstChild.row, proxy.table.scenegraph.bodyGroup.firstChild.lastChild.row);
44213
44405
  proxy.table.scenegraph.updateNextFrame();
44214
44406
  if (proxy.table.heightMode !== 'autoHeight') {
44215
44407
  await proxy.progress();
@@ -44337,6 +44529,7 @@
44337
44529
  rowUpdatePos;
44338
44530
  rowUpdateDirection;
44339
44531
  screenTopRow = 0;
44532
+ deltaY = 0;
44340
44533
  colLimit = 1000;
44341
44534
  bodyLeftCol;
44342
44535
  bodyRightCol;
@@ -44360,6 +44553,12 @@
44360
44553
  this.rowLimit = 100;
44361
44554
  this.colLimit = 100;
44362
44555
  }
44556
+ else if (this.table.heightMode === 'autoHeight') {
44557
+ this.rowLimit = 100;
44558
+ }
44559
+ else if (this.table.widthMode === 'autoWidth') {
44560
+ this.colLimit = 100;
44561
+ }
44363
44562
  if (this.table.internalProps.transpose) {
44364
44563
  this.mode = 'row';
44365
44564
  }
@@ -44407,26 +44606,6 @@
44407
44606
  async createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin) {
44408
44607
  await createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, this);
44409
44608
  }
44410
- async createColGroupForFirstScreen(rowHeaderGroup, bodyGroup, xOrigin, yOrigin, table) {
44411
- this.setParamsForRow();
44412
- this.setParamsForColumn();
44413
- computeRowsHeight(table, this.table.columnHeaderLevelCount, Math.min(this.firstScreenRowLimit, table.rowCount - 1));
44414
- createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.rowHeaderLevelCount - 1, table.columnHeaderLevelCount, table.rowCount - 1, 'rowHeader', table, this.firstScreenRowLimit);
44415
- createColGroup(bodyGroup, xOrigin, yOrigin, table.rowHeaderLevelCount, table.colCount - 1, table.columnHeaderLevelCount, table.rowCount - 1, 'body', table, this.firstScreenRowLimit);
44416
- if (!bodyGroup.firstChild) {
44417
- this.currentRow = this.totalRow;
44418
- this.rowEnd = this.currentRow;
44419
- this.rowUpdatePos = this.rowEnd;
44420
- this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2);
44421
- }
44422
- else {
44423
- this.currentRow = bodyGroup.firstChild?.rowNumber ?? this.totalRow;
44424
- this.rowEnd = this.currentRow;
44425
- this.rowUpdatePos = this.rowEnd;
44426
- this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2);
44427
- await this.progress();
44428
- }
44429
- }
44430
44609
  async progress() {
44431
44610
  return new Promise((resolve, reject) => {
44432
44611
  setTimeout(async () => {
@@ -44466,7 +44645,7 @@
44466
44645
  }
44467
44646
  createRowCellGroup(onceCount) {
44468
44647
  const endRow = Math.min(this.totalRow, this.currentRow + onceCount);
44469
- computeRowsHeight(this.table, this.currentRow + 1, endRow);
44648
+ computeRowsHeight(this.table, this.currentRow + 1, endRow, false);
44470
44649
  if (this.table.rowHeaderLevelCount) {
44471
44650
  let maxHeight = 0;
44472
44651
  for (let col = 0; col < this.table.rowHeaderLevelCount; col++) {
@@ -44572,7 +44751,7 @@
44572
44751
  updateCellGroups(count) {
44573
44752
  const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);
44574
44753
  if (this.table.heightMode === 'autoHeight') {
44575
- computeRowsHeight(this.table, this.rowUpdatePos, distRow);
44754
+ computeRowsHeight(this.table, this.rowUpdatePos, distRow, false);
44576
44755
  }
44577
44756
  updateRowContent(this.rowUpdatePos, distRow, this);
44578
44757
  if (this.table.heightMode === 'autoHeight') {
@@ -44621,9 +44800,7 @@
44621
44800
  syncBottomRow = Math.min(this.bodyBottomRow, this.screenTopRow + this.screenRowCount * 3);
44622
44801
  }
44623
44802
  console.log('sort更新同步范围', syncTopRow, syncBottomRow);
44624
- if (this.table.heightMode === 'autoHeight') {
44625
- computeRowsHeight(this.table, syncTopRow, syncBottomRow);
44626
- }
44803
+ computeRowsHeight(this.table, syncTopRow, syncBottomRow);
44627
44804
  for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {
44628
44805
  for (let row = syncTopRow; row <= syncBottomRow; row++) {
44629
44806
  const cellGroup = this.highPerformanceGetCell(col, row);
@@ -45302,7 +45479,6 @@
45302
45479
  cellNode.children.forEach((node) => {
45303
45480
  if (node.type === 'chart') {
45304
45481
  node.cacheCanvas = null;
45305
- node.addUpdateBoundTag();
45306
45482
  }
45307
45483
  });
45308
45484
  });
@@ -45323,7 +45499,6 @@
45323
45499
  const chartSpec = node.attribute.spec;
45324
45500
  chartSpec.axes = newAxes;
45325
45501
  node.setAttribute('spec', chartSpec);
45326
- node.addUpdateBoundTag();
45327
45502
  }
45328
45503
  });
45329
45504
  });
@@ -45700,6 +45875,11 @@
45700
45875
  this.rowHeaderGroup.clear();
45701
45876
  this.cornerHeaderGroup.clear();
45702
45877
  this.bodyGroup.clear();
45878
+ this.bottomFrozenGroup.clear();
45879
+ this.rightFrozenGroup.clear();
45880
+ this.rightTopCellGroup.clear();
45881
+ this.rightBottomCellGroup.clear();
45882
+ this.leftBottomCellGroup.clear();
45703
45883
  this.colHeaderGroup.setAttributes({
45704
45884
  x: 0,
45705
45885
  y: 0,
@@ -46055,15 +46235,16 @@
46055
46235
  }
46056
46236
  resize() {
46057
46237
  this.recalculateColWidths();
46058
- if (this.table.heightMode === 'autoHeight') {
46059
- this.recalculateRowHeights();
46060
- }
46238
+ this.recalculateRowHeights();
46061
46239
  this.dealWidthMode();
46062
46240
  this.dealHeightMode();
46063
46241
  this.dealFrozen();
46064
46242
  this.updateTableSize();
46065
46243
  this.updateBorderSizeAndPosition();
46066
46244
  this.component.updateScrollBar();
46245
+ if (this.table.widthMode === 'adaptive' || this.table.heightMode === 'adaptive') {
46246
+ this.updateChartSize(this.table.rowHeaderLevelCount);
46247
+ }
46067
46248
  this.updateNextFrame();
46068
46249
  }
46069
46250
  updateTableSize() {
@@ -46570,9 +46751,7 @@
46570
46751
  updateRow(removeCells, addCells) {
46571
46752
  updateRow(removeCells, addCells, this.table);
46572
46753
  this.recalculateColWidths();
46573
- if (this.table.heightMode === 'autoHeight') {
46574
- this.recalculateRowHeights();
46575
- }
46754
+ this.recalculateRowHeights();
46576
46755
  this.table.stateManeger.checkFrozen();
46577
46756
  this.updateNextFrame();
46578
46757
  }
@@ -47309,6 +47488,9 @@
47309
47488
  sparkLine;
47310
47489
  _clearVerticalScrollBar;
47311
47490
  _clearHorizontalScrollBar;
47491
+ resetInteractionState = debounce(() => {
47492
+ this.updateInteractionState(InteractionState.default);
47493
+ }, 100);
47312
47494
  constructor(table) {
47313
47495
  this.table = table;
47314
47496
  this.initState();
@@ -48598,10 +48780,16 @@
48598
48780
  const throttleVerticalWheel = throttle(stateManeger.updateVerticalScrollBar, 20);
48599
48781
  const throttleHorizontalWheel = throttle(stateManeger.updateHorizontalScrollBar, 20);
48600
48782
  scenegraph.component.vScrollBar.addEventListener('scroll', (e) => {
48783
+ if (stateManeger.interactionState !== InteractionState.scrolling) {
48784
+ stateManeger.updateInteractionState(InteractionState.scrolling);
48785
+ }
48601
48786
  const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
48602
48787
  throttleVerticalWheel(ratio, e);
48603
48788
  });
48604
48789
  scenegraph.component.hScrollBar.addEventListener('scroll', (e) => {
48790
+ if (stateManeger.interactionState !== InteractionState.scrolling) {
48791
+ stateManeger.updateInteractionState(InteractionState.scrolling);
48792
+ }
48605
48793
  const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
48606
48794
  throttleHorizontalWheel(ratio);
48607
48795
  });
@@ -48614,6 +48802,11 @@
48614
48802
  deltaY = 0;
48615
48803
  }
48616
48804
  const [optimizedDeltaX, optimizedDeltaY] = optimizeScrollXY(deltaX, deltaY, { horizontal: 1, vertical: 1 });
48805
+ if (optimizedDeltaX || optimizedDeltaY) {
48806
+ if (state.interactionState !== InteractionState.scrolling) {
48807
+ state.updateInteractionState(InteractionState.scrolling);
48808
+ }
48809
+ }
48617
48810
  if (optimizedDeltaX) {
48618
48811
  state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX);
48619
48812
  state.showHorizontalScrollBar(true);
@@ -48622,6 +48815,7 @@
48622
48815
  state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY);
48623
48816
  state.showVerticalScrollBar(true);
48624
48817
  }
48818
+ state.resetInteractionState();
48625
48819
  if (event.cancelable &&
48626
48820
  ((deltaY !== 0 && isVerticalScrollable(deltaY, state)) || (deltaX !== 0 && isHorizontalScrollable(deltaX, state)))) {
48627
48821
  event.preventDefault();
@@ -48711,7 +48905,7 @@
48711
48905
  handler.on(table.getElement(), 'contextmenu', (e) => {
48712
48906
  e.preventDefault();
48713
48907
  });
48714
- handler.on(table.getParentElement(), 'resize', () => {
48908
+ handler.on(table.getContainer(), 'resize', () => {
48715
48909
  table.resize();
48716
48910
  });
48717
48911
  }
@@ -51404,7 +51598,7 @@
51404
51598
  }
51405
51599
  }
51406
51600
  },
51407
- allowAllCanceled: false,
51601
+ allowAllCanceled: true,
51408
51602
  visible: true
51409
51603
  };
51410
51604
  function getLegendAttributes(spec, rect) {
@@ -51473,6 +51667,19 @@
51473
51667
  legend.name = 'legend';
51474
51668
  this.legendComponent = legend;
51475
51669
  this.table.scenegraph.stage.defaultLayer.appendChild(legend);
51670
+ this.adjustTableSize(attrs);
51671
+ }
51672
+ resize() {
51673
+ if (!this.legendComponent) {
51674
+ return;
51675
+ }
51676
+ this.legendComponent.setAttributes({
51677
+ width: this.table.tableNoFrameWidth,
51678
+ height: this.table.tableNoFrameHeight
51679
+ });
51680
+ this.adjustTableSize(this.legendComponent.attribute);
51681
+ }
51682
+ adjustTableSize(attrs) {
51476
51683
  let width = isFinite(this.legendComponent.AABBBounds.width()) ? this.legendComponent.AABBBounds.width() : 0;
51477
51684
  let height = isFinite(this.legendComponent.AABBBounds.height()) ? this.legendComponent.AABBBounds.height() : 0;
51478
51685
  const rectWidth = this.table.tableNoFrameWidth;
@@ -51589,7 +51796,7 @@
51589
51796
  };
51590
51797
  }
51591
51798
  release() {
51592
- this.table.scenegraph.stage.defaultLayer.removeChild(this.legendComponent);
51799
+ this.legendComponent && this.table.scenegraph.stage.defaultLayer.removeChild(this.legendComponent);
51593
51800
  this.legendComponent = null;
51594
51801
  }
51595
51802
  }
@@ -51616,6 +51823,35 @@
51616
51823
  this.table.scenegraph.stage.defaultLayer.appendChild(title);
51617
51824
  this._titleComponent = title;
51618
51825
  }
51826
+ this._adjustTableSize(this._titleComponent.attribute);
51827
+ return this._titleComponent;
51828
+ }
51829
+ resize() {
51830
+ if (!this._titleComponent) {
51831
+ return;
51832
+ }
51833
+ const padding = getQuadProps(this._titleOption.padding ?? 10);
51834
+ const realWidth = this._titleOption.width ?? this.table.tableNoFrameWidth - padding[1] - padding[3];
51835
+ this._titleComponent.setAttributes({
51836
+ x: this._titleOption.x ?? this._titleOption.orient === 'right'
51837
+ ? this.table.tableX + this.table.tableNoFrameWidth
51838
+ : this.table.tableX,
51839
+ y: this._titleOption.y ?? this._titleOption.orient === 'bottom'
51840
+ ? this.table.tableY + this.table.tableNoFrameHeight
51841
+ : this.table.tableY,
51842
+ width: realWidth,
51843
+ textStyle: {
51844
+ width: realWidth,
51845
+ ...this._titleOption.textStyle
51846
+ },
51847
+ subtextStyle: {
51848
+ width: realWidth,
51849
+ ...this._titleOption.subtextStyle
51850
+ }
51851
+ });
51852
+ this._adjustTableSize(this._titleComponent.attribute);
51853
+ }
51854
+ _adjustTableSize(attrs) {
51619
51855
  let width = isFinite(this._titleComponent.AABBBounds.width()) ? this._titleComponent.AABBBounds.width() : 0;
51620
51856
  const height = isFinite(this._titleComponent.AABBBounds.height()) ? this._titleComponent.AABBBounds.height() : 0;
51621
51857
  const rectWidth = this.table.tableNoFrameWidth;
@@ -51659,7 +51895,6 @@
51659
51895
  : this.table.tableY
51660
51896
  });
51661
51897
  }
51662
- return this._titleComponent;
51663
51898
  }
51664
51899
  release() {
51665
51900
  this.table.scenegraph.stage.defaultLayer.removeChild(this._titleComponent);
@@ -51730,15 +51965,21 @@
51730
51965
  return TABLE_EVENT_TYPE;
51731
51966
  }
51732
51967
  options;
51733
- version = "0.9.3-alpha.5";
51968
+ version = "0.9.3-alpha.7";
51734
51969
  pagerConf;
51735
51970
  id = `VTable${Date.now()}`;
51736
51971
  headerStyleCache;
51737
51972
  bodyStyleCache;
51738
- constructor(options = {}) {
51973
+ container;
51974
+ constructor(container, options = {}) {
51739
51975
  super();
51740
- const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, keyboardOptions, parentElement, columnResizeMode, dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio } = options;
51976
+ if (!container) {
51977
+ throw new Error("vtable's container is undefined");
51978
+ }
51979
+ const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, keyboardOptions, columnResizeMode, dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio } = options;
51980
+ this.container = container;
51741
51981
  this.options = options;
51982
+ this.options.container = container;
51742
51983
  this._widthMode = widthMode;
51743
51984
  this._heightMode = heightMode;
51744
51985
  this._autoFillWidth = autoFillWidth;
@@ -51795,9 +52036,9 @@
51795
52036
  internalProps.cellTextOverflows = {};
51796
52037
  internalProps.focusedTable = false;
51797
52038
  internalProps.theme = themes.of(options.theme ?? themes.DEFAULT);
51798
- if (parentElement) {
51799
- parentElement.innerHTML = '';
51800
- parentElement.appendChild(internalProps.element);
52039
+ if (container) {
52040
+ container.innerHTML = '';
52041
+ container.appendChild(internalProps.element);
51801
52042
  this._updateSize();
51802
52043
  }
51803
52044
  else {
@@ -51850,8 +52091,8 @@
51850
52091
  this.bodyStyleCache = new Map();
51851
52092
  }
51852
52093
  throttleInvalidate = throttle2(this.render.bind(this), 200);
51853
- getParentElement() {
51854
- return this.options.parentElement;
52094
+ getContainer() {
52095
+ return this.container;
51855
52096
  }
51856
52097
  getElement() {
51857
52098
  return this.internalProps.element;
@@ -51861,6 +52102,12 @@
51861
52102
  }
51862
52103
  resize() {
51863
52104
  this._updateSize();
52105
+ if (this.internalProps.legends) {
52106
+ this.internalProps.legends.resize();
52107
+ }
52108
+ if (this.internalProps.title) {
52109
+ this.internalProps.title.resize();
52110
+ }
51864
52111
  this.scenegraph.resize();
51865
52112
  }
51866
52113
  get rowCount() {
@@ -52166,12 +52413,6 @@
52166
52413
  this._clearRowRangeHeightsMap(row);
52167
52414
  }
52168
52415
  }
52169
- fillRowsHeight(rowStart, rowEnd, rowHeight) {
52170
- for (let row = rowStart; row <= rowEnd; row++) {
52171
- this.rowHeightsMap.put(row, Math.round(rowHeight));
52172
- this._rowRangeHeightsMap.set(`$0$${row}`, Math.round((this._rowRangeHeightsMap.get(`$0$${row - 1}`) ?? 0) + rowHeight));
52173
- }
52174
- }
52175
52416
  getRowsHeight(startRow, endRow) {
52176
52417
  const cachedRowHeight = this._rowRangeHeightsMap.get(`$${startRow}$${endRow}`);
52177
52418
  if (cachedRowHeight !== null && cachedRowHeight !== undefined) {
@@ -53803,6 +54044,7 @@
53803
54044
  numberFormat: numberFormat
53804
54045
  });
53805
54046
 
54047
+ const NO_AXISID_FRO_VTABLE = 'NO_AXISID_FRO_VTABLE';
53806
54048
  function getRawChartSpec(col, row, layout) {
53807
54049
  const paths = layout.getCellHeaderPaths(col, row);
53808
54050
  let indicatorObj;
@@ -53840,7 +54082,7 @@
53840
54082
  const data = layout.dataset.collectedValues[key + (isZeroAlign ? '_align' : '')]
53841
54083
  ? layout.dataset.collectedValues[key + (isZeroAlign ? '_align' : '')]
53842
54084
  : layout.dataset.collectedValues[key];
53843
- const range = data[layout.getColKeysPath()[colIndex][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
54085
+ const range = data?.[layout.getColKeysPath()[colIndex][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]] ?? { min: 0, max: 1 };
53844
54086
  const axisOption = getAxisOption(col, row, index === 0 ? 'bottom' : 'top', layout);
53845
54087
  if (axisOption?.zero) {
53846
54088
  range.min = Math.min(range.min, 0);
@@ -53854,7 +54096,8 @@
53854
54096
  label: { visible: false },
53855
54097
  title: { visible: false },
53856
54098
  seriesIndex: index,
53857
- height: -1
54099
+ height: -1,
54100
+ sync: { axisId: NO_AXISID_FRO_VTABLE }
53858
54101
  }));
53859
54102
  });
53860
54103
  let rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, col)[0];
@@ -53890,7 +54133,7 @@
53890
54133
  const data = layout.dataset.collectedValues[key + (isZeroAlign ? '_align' : '')]
53891
54134
  ? layout.dataset.collectedValues[key + (isZeroAlign ? '_align' : '')]
53892
54135
  : layout.dataset.collectedValues[key];
53893
- const range = data[layout.getRowKeysPath()[rowIndex][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
54136
+ const range = data?.[layout.getRowKeysPath()[rowIndex][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]] ?? { min: 0, max: 1 };
53894
54137
  const axisOption = getAxisOption(col, row, index === 0 ? 'left' : 'right', layout);
53895
54138
  if (axisOption?.zero) {
53896
54139
  range.min = Math.min(range.min, 0);
@@ -53904,7 +54147,8 @@
53904
54147
  label: { visible: false },
53905
54148
  title: { visible: false },
53906
54149
  seriesIndex: index,
53907
- width: -1
54150
+ width: -1,
54151
+ sync: { axisId: NO_AXISID_FRO_VTABLE }
53908
54152
  }));
53909
54153
  });
53910
54154
  let columnDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.columnHeaderLevelCount)[0];
@@ -53914,7 +54158,7 @@
53914
54158
  const data = layout.dataset.cacheCollectedValues[columnDimensionKey] || layout.dataset.collectedValues[columnDimensionKey];
53915
54159
  const recordCol = layout.getRecordIndexByCol(col);
53916
54160
  const colPath = layout.getColKeysPath()[recordCol];
53917
- const domain = data[colPath[colPath.length - 1]];
54161
+ const domain = data?.[colPath[colPath.length - 1]] ?? [];
53918
54162
  const axisOption = getAxisOption(col, row, 'bottom', layout);
53919
54163
  axes.push(merge$2({
53920
54164
  domain: Array.from(domain)
@@ -54615,8 +54859,17 @@
54615
54859
 
54616
54860
  class ListTable extends BaseTable {
54617
54861
  showHeader = true;
54618
- constructor(options = {}) {
54619
- super(options);
54862
+ constructor(container, options) {
54863
+ if (!(container instanceof HTMLElement)) {
54864
+ options = container;
54865
+ if (container.container) {
54866
+ container = container.container;
54867
+ }
54868
+ else {
54869
+ container = null;
54870
+ }
54871
+ }
54872
+ super(container, options);
54620
54873
  const internalProps = this.internalProps;
54621
54874
  this.pagerConf = options.pagerConf;
54622
54875
  internalProps.sortState = options.sortState;
@@ -58757,6 +59010,7 @@
58757
59010
  this.collectedValues = {};
58758
59011
  this.processRecords();
58759
59012
  this.processCollectedValuesWithSumBy();
59013
+ this.processCollectedValuesWithSortBy();
58760
59014
  if (this.dataConfig.isPivotChart) {
58761
59015
  this.dealWithZeroAlign();
58762
59016
  }
@@ -59127,9 +59381,10 @@
59127
59381
  const collectedValue2 = this.collectedValues[indicator2];
59128
59382
  this.collectedValues[indicator1 + '_align'] = {};
59129
59383
  this.collectedValues[indicator2 + '_align'] = {};
59130
- for (const key in collectedValue1) {
59131
- const range1 = collectedValue1[key];
59132
- const range2 = collectedValue2[key];
59384
+ const toAlignCollectedValue = collectedValue1 || collectedValue2;
59385
+ for (const key in toAlignCollectedValue) {
59386
+ const range1 = collectedValue1?.[key] ?? { min: 0, max: 1 };
59387
+ const range2 = collectedValue2?.[key] ?? { min: 0, max: 1 };
59133
59388
  const newRanges = getNewRangeToAlign(range1, range2);
59134
59389
  if (!newRanges) {
59135
59390
  this.collectedValues[indicator1 + '_align'][key] = {
@@ -59180,8 +59435,17 @@
59180
59435
  pivotSortState;
59181
59436
  dataset;
59182
59437
  flatDataToObjects;
59183
- constructor(options) {
59184
- super(options);
59438
+ constructor(container, options) {
59439
+ if (!(container instanceof HTMLElement)) {
59440
+ options = container;
59441
+ if (container.container) {
59442
+ container = container.container;
59443
+ }
59444
+ else {
59445
+ container = null;
59446
+ }
59447
+ }
59448
+ super(container, options);
59185
59449
  if (options.layout) {
59186
59450
  Object.assign(options, options.layout);
59187
59451
  }
@@ -59621,8 +59885,17 @@
59621
59885
  _selectedDimensionInChart = [];
59622
59886
  _chartEventMap = {};
59623
59887
  _axes;
59624
- constructor(options) {
59625
- super(options);
59888
+ constructor(container, options) {
59889
+ if (!(container instanceof HTMLElement)) {
59890
+ options = container;
59891
+ if (container.container) {
59892
+ container = container.container;
59893
+ }
59894
+ else {
59895
+ container = null;
59896
+ }
59897
+ }
59898
+ super(container, options);
59626
59899
  if (options.layout) {
59627
59900
  Object.assign(options, options.layout);
59628
59901
  }
@@ -59705,6 +59978,7 @@
59705
59978
  super.updateOption(options);
59706
59979
  this.setCustomStateNameToSpec();
59707
59980
  internalProps.dataConfig = {};
59981
+ this._axes = isArray$3(options.axes) ? options.axes : [];
59708
59982
  if (options.rows || options.columns) {
59709
59983
  const rowKeys = options.rows.reduce((keys, rowObj) => {
59710
59984
  if (typeof rowObj === 'string') {
@@ -60194,11 +60468,11 @@
60194
60468
  });
60195
60469
  }
60196
60470
  onVChartEvent(type, query, callback) {
60197
- if (query) {
60198
- this._chartEventMap[type] = { callback, query };
60471
+ if (typeof query === 'function') {
60472
+ this._chartEventMap[type] = { callback: query };
60199
60473
  }
60200
60474
  else {
60201
- this._chartEventMap[type] = { callback };
60475
+ this._chartEventMap[type] = { callback, query };
60202
60476
  }
60203
60477
  }
60204
60478
  offVChartEvent(type) {
@@ -60256,7 +60530,7 @@
60256
60530
  x2: viewBox.x2 - chartNode.getRootNode().table.scrollLeft,
60257
60531
  y1: viewBox.y1 - chartNode.getRootNode().table.scrollTop,
60258
60532
  y2: viewBox.y2 - chartNode.getRootNode().table.scrollTop
60259
- });
60533
+ }, false);
60260
60534
  chartInstance.updateDataSync(dataId, data);
60261
60535
  position = chartInstance.convertDatumToPosition(datum);
60262
60536
  this.render();
@@ -60835,6 +61109,7 @@
60835
61109
  getSize(table) {
60836
61110
  const { width, height } = table.measureText(this.text, {
60837
61111
  fontSize: this.fontSize,
61112
+ fontWeight: this.fontWeight,
60838
61113
  fontFamily: this.fontFamily
60839
61114
  });
60840
61115
  this.width = width;
@@ -60893,7 +61168,7 @@
60893
61168
  percentCalc: percentCalc
60894
61169
  });
60895
61170
 
60896
- const version = "0.9.3-alpha.5";
61171
+ const version = "0.9.3-alpha.7";
60897
61172
  function getIcons() {
60898
61173
  return get$1();
60899
61174
  }