@visactor/react-vchart 2.0.20-alpha.1 → 2.0.20-alpha.3

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.
package/build/index.js CHANGED
@@ -20641,9 +20641,10 @@
20641
20641
  }), context.highPerformanceRestore(), context.setTransformForCurrent();
20642
20642
  } else {
20643
20643
  const {
20644
- backgroundCornerRadius: backgroundCornerRadius
20644
+ backgroundCornerRadius: backgroundCornerRadius,
20645
+ backgroundOpacity = 1
20645
20646
  } = graphic.attribute;
20646
- context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = background, backgroundCornerRadius ? (createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, !0), context.fill()) : context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
20647
+ context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.globalAlpha = backgroundOpacity, context.fillStyle = background, backgroundCornerRadius ? (createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, !0), context.fill()) : context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
20647
20648
  }
20648
20649
  shouldReCalBounds && boundsAllocate.free(b), restore();
20649
20650
  }
@@ -37417,8 +37418,9 @@
37417
37418
  const label = labels[i];
37418
37419
  if (!label) continue;
37419
37420
  const baseMark = this.getRelatedGraphic(label.attribute);
37420
- let backgroundColor = baseMark.getAttributes(!0).fill,
37421
- foregroundColor = label.attribute.fill;
37421
+ let backgroundColor = baseMark.getAttributes(!0).fill;
37422
+ const backgroundOpacity = baseMark.getAttributes(!0).fillOpacity;
37423
+ let foregroundColor = label.attribute.fill;
37422
37424
  if (isObject$2(backgroundColor) && backgroundColor.gradient) {
37423
37425
  const firstStopColor = null === (_g = null === (_f = backgroundColor.stops) || void 0 === _f ? void 0 : _f[0]) || void 0 === _g ? void 0 : _g.color;
37424
37426
  firstStopColor && (backgroundColor = firstStopColor, foregroundColor = firstStopColor);
@@ -37432,11 +37434,26 @@
37432
37434
  if (fill && label.setAttributes({
37433
37435
  fill: fill
37434
37436
  }), 0 === label.attribute.lineWidth || 0 === label.attribute.strokeOpacity) continue;
37435
- const stroke = smartInvertStrategy(strokeStrategy, backgroundColor, invertColor, similarColor);
37436
- stroke && label.setAttributes({
37437
- stroke: stroke
37438
- });
37437
+ if ("background" === interactInvertType) label.setAttributes({
37438
+ stroke: !1
37439
+ });else {
37440
+ const stroke = smartInvertStrategy(strokeStrategy, backgroundColor, invertColor, similarColor);
37441
+ stroke && label.setAttributes({
37442
+ stroke: stroke
37443
+ });
37444
+ }
37439
37445
  } else if (isIntersect && "none" !== interactInvertType) {
37446
+ if ("background" === interactInvertType) {
37447
+ const fill = smartInvertStrategy(fillStrategy, backgroundColor, invertColor, similarColor);
37448
+ fill && label.setAttributes({
37449
+ fill: fill
37450
+ }), label.setAttributes({
37451
+ stroke: !1,
37452
+ background: backgroundColor,
37453
+ backgroundOpacity: backgroundOpacity
37454
+ });
37455
+ continue;
37456
+ }
37440
37457
  if (0 === label.attribute.lineWidth || 0 === label.attribute.strokeOpacity) continue;
37441
37458
  if (label.attribute.stroke) {
37442
37459
  label.setAttributes({
@@ -37453,6 +37470,9 @@
37453
37470
  stroke: stroke
37454
37471
  });
37455
37472
  }
37473
+ !1 === isInside && "background" === interactInvertType && label.setAttributes({
37474
+ background: null
37475
+ });
37456
37476
  }
37457
37477
  }
37458
37478
  _canPlaceInside(textBound, shapeBound) {
@@ -42996,7 +43016,31 @@
42996
43016
  return graphicCreator.symbol(style);
42997
43017
  }
42998
43018
  _renderHandlerText(value, position) {
42999
- var _a, _b, _c;
43019
+ return graphicCreator.text(this._getHandlerTextAttributes(value, position));
43020
+ }
43021
+ _getHandlerPosition(isStart) {
43022
+ return this.attribute.range && isStart ? "start" : "end";
43023
+ }
43024
+ _getHandlerTextStyle(value, position) {
43025
+ const {
43026
+ align: align,
43027
+ handlerSize = 14,
43028
+ handlerText = {},
43029
+ railHeight: railHeight,
43030
+ railWidth: railWidth,
43031
+ slidable: slidable
43032
+ } = this.attribute;
43033
+ return isFunction$1(handlerText.style) ? handlerText.style(value, position, {
43034
+ layout: this.attribute.layout,
43035
+ align: align,
43036
+ railWidth: railWidth,
43037
+ railHeight: railHeight,
43038
+ handlerSize: handlerSize,
43039
+ slidable: slidable
43040
+ }) : handlerText.style;
43041
+ }
43042
+ _getHandlerTextAttributes(value, position) {
43043
+ var _a, _b;
43000
43044
  const {
43001
43045
  align: align,
43002
43046
  handlerSize = 14,
@@ -43008,13 +43052,13 @@
43008
43052
  isHorizontal = this._isHorizontal,
43009
43053
  pos = this.calculatePosByValue(value, position),
43010
43054
  textSpace = null !== (_a = handlerText.space) && void 0 !== _a ? _a : 4,
43055
+ handlerTextStyle = this._getHandlerTextStyle(value, position),
43011
43056
  textStyle = {
43012
43057
  text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_b = handlerText.precision) && void 0 !== _b ? _b : 0),
43013
- lineHeight: null === (_c = handlerText.style) || void 0 === _c ? void 0 : _c.lineHeight,
43058
+ lineHeight: null == handlerTextStyle ? void 0 : handlerTextStyle.lineHeight,
43014
43059
  cursor: !1 === slidable ? "default" : getDefaultCursor(isHorizontal)
43015
43060
  };
43016
- isHorizontal ? "top" === align ? (textStyle.textBaseline = "bottom", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight - handlerSize) / 2 - textSpace) : (textStyle.textBaseline = "top", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight + handlerSize) / 2 + textSpace) : "left" === align ? (textStyle.textBaseline = "middle", textStyle.textAlign = "end", textStyle.x = (railWidth - handlerSize) / 2 - textSpace, textStyle.y = pos) : (textStyle.textBaseline = "middle", textStyle.textAlign = "start", textStyle.x = (railWidth + handlerSize) / 2 + textSpace, textStyle.y = pos);
43017
- return graphicCreator.text(Object.assign(Object.assign({}, textStyle), handlerText.style));
43061
+ return isHorizontal ? "top" === align ? (textStyle.textBaseline = "bottom", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight - handlerSize) / 2 - textSpace) : (textStyle.textBaseline = "top", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight + handlerSize) / 2 + textSpace) : "left" === align ? (textStyle.textBaseline = "middle", textStyle.textAlign = "end", textStyle.x = (railWidth - handlerSize) / 2 - textSpace, textStyle.y = pos) : (textStyle.textBaseline = "middle", textStyle.textAlign = "start", textStyle.x = (railWidth + handlerSize) / 2 + textSpace, textStyle.y = pos), Object.assign(Object.assign({}, textStyle), handlerTextStyle);
43018
43062
  }
43019
43063
  _renderTooltip() {
43020
43064
  var _a;
@@ -43142,31 +43186,19 @@
43142
43186
  }
43143
43187
  }
43144
43188
  _updateHandler(handler, position, value) {
43145
- var _a;
43146
43189
  const isHorizontal = this._isHorizontal;
43147
43190
  handler.setAttribute(isHorizontal ? "x" : "y", position);
43148
43191
  const updateHandlerText = handler.name === SLIDER_ELEMENT_NAME.startHandler ? this._startHandlerText : this._endHandlerText;
43149
43192
  if (updateHandlerText) {
43150
- const {
43151
- handlerText = {}
43152
- } = this.attribute;
43153
- updateHandlerText.setAttributes({
43154
- text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_a = handlerText.precision) && void 0 !== _a ? _a : 0),
43155
- [isHorizontal ? "x" : "y"]: position
43156
- });
43193
+ const handlerPosition = this._getHandlerPosition(handler.name === SLIDER_ELEMENT_NAME.startHandler);
43194
+ updateHandlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
43157
43195
  }
43158
43196
  handler.name === SLIDER_ELEMENT_NAME.startHandler ? (this._currentValue.startValue = value, this._currentValue.startPos = position) : (this._currentValue.endValue = value, this._currentValue.endPos = position);
43159
43197
  }
43160
43198
  _updateHandlerText(handlerText, position, value) {
43161
- var _a;
43162
43199
  const isHorizontal = this._isHorizontal,
43163
- {
43164
- handlerText: handlerTextAttr = {}
43165
- } = this.attribute;
43166
- handlerText.setAttributes({
43167
- [isHorizontal ? "x" : "y"]: position,
43168
- text: handlerTextAttr.formatter ? handlerTextAttr.formatter(value) : value.toFixed(null !== (_a = handlerTextAttr.precision) && void 0 !== _a ? _a : 0)
43169
- });
43200
+ handlerPosition = this._getHandlerPosition(handlerText.name === SLIDER_ELEMENT_NAME.startHandlerText);
43201
+ handlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
43170
43202
  const updateHandler = handlerText.name === SLIDER_ELEMENT_NAME.startHandlerText ? this._startHandler : this._endHandler;
43171
43203
  updateHandler && updateHandler.setAttributes({
43172
43204
  [isHorizontal ? "x" : "y"]: position
@@ -50165,7 +50197,7 @@
50165
50197
  (null === (_c = this.renderContext) || void 0 === _c ? void 0 : _c.progressive) ? (this._graphicMap.clear(), this._runProgressiveStep()) : (this._runJoin(markData), this._runState(this._graphics), this._runEncoder(this._graphics), this._runEncoderTransform(this._graphics, !1), this._runApplyGraphic(this._graphics)), this._updateAttrsOfGroup();
50166
50198
  }
50167
50199
  render() {
50168
- this.isCommited() && (!this.getVisible() || this._skipBeforeLayouted && this.getCompiler().getLayoutState() === LayoutState.before || (log(`render mark: ${this.getProductId()}, type is ${this.type}`), this.renderInner()), this.uncommit());
50200
+ this.isCommited() && (!this.getVisible() || this._skipBeforeLayouted && this.getCompiler().getLayoutState() === LayoutState.before || (this._product || this._initProduct(), log(`render mark: ${this.getProductId()}, type is ${this.type}`), this.renderInner()), this.uncommit());
50169
50201
  }
50170
50202
  updateMarkState(key) {
50171
50203
  if (!this._product) return;
@@ -54921,6 +54953,9 @@
54921
54953
  getTickData(index = 0) {
54922
54954
  return this._tickData[index];
54923
54955
  }
54956
+ getVisible() {
54957
+ return this._visible;
54958
+ }
54924
54959
  get visible() {
54925
54960
  return this._visible;
54926
54961
  }
@@ -54931,10 +54966,14 @@
54931
54966
  return this._coordinateType;
54932
54967
  }
54933
54968
  constructor(spec, options) {
54934
- var _a;
54935
- super(spec, options), this.specKey = "axes", this._scales = [], this._tickData = [], this._visible = !0, this._tick = void 0, this._onTickDataChange = tickData => {
54969
+ var _a, _b;
54970
+ super(spec, options), this.specKey = "axes", this._scales = [], this._tickData = [], this._visible = !0, this._specVisible = !0, this._hideWhenEmpty = !1, this._tick = void 0, this._onTickDataChange = tickData => {
54936
54971
  this._forceLayout(), null == tickData || tickData.updateData();
54937
- }, this._visible = null === (_a = spec.visible) || void 0 === _a || _a, this._coordinateType = "none";
54972
+ }, this._specVisible = null === (_a = spec.visible) || void 0 === _a || _a, this._hideWhenEmpty = null !== (_b = spec.hideWhenEmpty) && void 0 !== _b && _b, this._visible = this._specVisible, this._coordinateType = "none";
54973
+ }
54974
+ setAttrFromSpec() {
54975
+ var _a, _b;
54976
+ super.setAttrFromSpec(), this._specVisible = null === (_a = this._spec.visible) || void 0 === _a || _a, this._hideWhenEmpty = null !== (_b = this._spec.hideWhenEmpty) && void 0 !== _b && _b, this._visible = this._specVisible, this._scale && this._refreshVisibilityByData();
54938
54977
  }
54939
54978
  getVRenderComponents() {
54940
54979
  var _a, _b;
@@ -54942,7 +54981,7 @@
54942
54981
  }
54943
54982
  created() {
54944
54983
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
54945
- if (super.created(), this.setSeriesAndRegionsFromSpec(), this.initEvent(), this.initScales(), this.updateSeriesScale(), this._shouldComputeTickData() && this._initData(), this._visible) {
54984
+ if (super.created(), this.setSeriesAndRegionsFromSpec(), this.initEvent(), this.initScales(), this.updateSeriesScale(), this._refreshVisibilityByData(), this._shouldComputeTickData() && this._initData(), this._specVisible) {
54946
54985
  const axisMark = this._createMark({
54947
54986
  type: "component",
54948
54987
  name: `axis-${this.getOrient()}`
@@ -54971,7 +55010,7 @@
54971
55010
  interactive: !1
54972
55011
  }), this._marks.addMark(gridMark), this._gridMark = gridMark;
54973
55012
  }
54974
- if ((null === (_h = this._option.globalInstance) || void 0 === _h ? void 0 : _h.isAnimationEnable()) && !1 !== get$1(this._option.getChart().getSpec(), "animation") && !0 === this._spec.animation) {
55013
+ if (this._syncComponentVisibility(), (null === (_h = this._option.globalInstance) || void 0 === _h ? void 0 : _h.isAnimationEnable()) && !1 !== get$1(this._option.getChart().getSpec(), "animation") && !0 === this._spec.animation) {
54975
55014
  const axisAnimateConfig = animationConfig(null === (_j = Factory.getAnimationInKey("axis")) || void 0 === _j ? void 0 : _j(), {
54976
55015
  appear: null !== (_l = null !== (_k = this._spec.animationAppear) && void 0 !== _k ? _k : get$1(this._option.getChart().getSpec(), "animationAppear.axis")) && void 0 !== _l ? _l : get$1(this._option.getChart().getSpec(), "animationAppear"),
54977
55016
  disappear: null !== (_o = null !== (_m = this._spec.animationDisappear) && void 0 !== _m ? _m : get$1(this._option.getChart().getSpec(), "animationDisappear.axis")) && void 0 !== _o ? _o : get$1(this._option.getChart().getSpec(), "animationDisappear"),
@@ -54986,7 +55025,7 @@
54986
55025
  }
54987
55026
  }
54988
55027
  _shouldComputeTickData() {
54989
- return this.getVisible() || this._spec.forceInitTick;
55028
+ return this._specVisible && (this.getVisible() || this._spec.forceInitTick || this._hideWhenEmpty);
54990
55029
  }
54991
55030
  _initData() {
54992
55031
  const tickData = this._initTickDataSet(this._tickTransformOption()),
@@ -54997,7 +55036,7 @@
54997
55036
  }
54998
55037
  collectData(depth, rawData) {
54999
55038
  const data = [];
55000
- return eachSeries(this._regions, s => {
55039
+ return this._regions && eachSeries(this._regions, s => {
55001
55040
  var _a;
55002
55041
  let field = this.collectSeriesField(depth, s);
55003
55042
  if (field = isArray$1(field) ? isContinuous(this._scale.type) ? field : [field[0]] : [field], depth || (this._dataFieldText = s.getFieldAlias(field[0])), field) {
@@ -55073,6 +55112,22 @@
55073
55112
  });
55074
55113
  }
55075
55114
  updateScaleDomain() {}
55115
+ _hasCollectedSeriesData() {
55116
+ return this.collectData(0).length > 0;
55117
+ }
55118
+ _refreshVisibilityByData() {
55119
+ const nextVisible = this._specVisible && (!this._hideWhenEmpty || this._hasCollectedSeriesData()),
55120
+ changed = this._visible !== nextVisible;
55121
+ return this._visible = nextVisible, (this._axisMark || this._gridMark) && this._syncComponentVisibility(), changed && this._forceLayout(), changed;
55122
+ }
55123
+ _syncComponentVisibility() {
55124
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
55125
+ null === (_a = this._axisMark) || void 0 === _a || _a.setVisible(this._visible), null === (_b = this._gridMark) || void 0 === _b || _b.setVisible(this._visible && !1 !== (null === (_c = this._spec.grid) || void 0 === _c ? void 0 : _c.visible)), null === (_g = null === (_f = null === (_e = null === (_d = this._axisMark) || void 0 === _d ? void 0 : _d.getComponent) || void 0 === _e ? void 0 : _e.call(_d)) || void 0 === _f ? void 0 : _f.setAttributes) || void 0 === _g || _g.call(_f, {
55126
+ visibleAll: this._visible
55127
+ }), null === (_l = null === (_k = null === (_j = null === (_h = this._gridMark) || void 0 === _h ? void 0 : _h.getComponent) || void 0 === _j ? void 0 : _j.call(_h)) || void 0 === _k ? void 0 : _k.setAttributes) || void 0 === _l || _l.call(_k, {
55128
+ visibleAll: this._visible && !1 !== (null === (_m = this._spec.grid) || void 0 === _m ? void 0 : _m.visible)
55129
+ });
55130
+ }
55076
55131
  _clearRawDomain() {}
55077
55132
  onLayoutEnd() {
55078
55133
  this.updateScaleRange();
@@ -55421,6 +55476,7 @@
55421
55476
  }
55422
55477
  return result.width = Math.ceil(result.width), result.height = Math.ceil(result.height), this._layout.setRectInSpec(this._layoutCacheProcessing(result));
55423
55478
  }, this._transformLayoutPadding = padding => ("left" === this.layoutOrient || "right" === this.layoutOrient ? (padding.top = 0, padding.bottom = 0) : "top" !== this.layoutOrient && "bottom" !== this.layoutOrient || (padding.left = 0, padding.right = 0), padding), this._updateAxisLayout = () => {
55479
+ if (!this._visible) return void this._syncComponentVisibility();
55424
55480
  const startPoint = this.getLayoutStartPoint(),
55425
55481
  _a = this._getUpdateAttribute(!1),
55426
55482
  {
@@ -55434,7 +55490,7 @@
55434
55490
  this._axisMark.setSimpleStyle(axisAttrs), this._gridMark && this._gridMark.setSimpleStyle(mergeSpec({
55435
55491
  x: startPoint.x,
55436
55492
  y: startPoint.y
55437
- }, this._getGridAttributes(), updateGridAttrs));
55493
+ }, this._getGridAttributes(), updateGridAttrs)), this._syncComponentVisibility();
55438
55494
  }, this._fixAxisOnZero = () => {
55439
55495
  const {
55440
55496
  onZero: onZero,
@@ -55562,7 +55618,7 @@
55562
55618
  }
55563
55619
  setAttrFromSpec() {
55564
55620
  var _a;
55565
- if (super.setAttrFromSpec(), this.visible) {
55621
+ if (super.setAttrFromSpec(), this._specVisible) {
55566
55622
  isXAxis(this.getOrient()) ? isUndefined$1(this._spec.maxHeight) && (this._spec.maxHeight = "30%") : isUndefined$1(this._spec.maxWidth) && (this._spec.maxWidth = "30%");
55567
55623
  const axisStyle = this._getAxisAttributes();
55568
55624
  axisStyle.label.formatMethod = this._getLabelFormatMethod(), axisStyle.verticalFactor = "top" === this.getOrient() || "right" === this.getOrient() ? -1 : 1, this._axisStyle = axisStyle;
@@ -55787,7 +55843,7 @@
55787
55843
  })] : [];
55788
55844
  }
55789
55845
  initEvent() {
55790
- super.initEvent(), this.visible && (this.event.on(ChartEvent.layoutEnd, this._updateAxisLayout), this.event.on(ChartEvent.layoutEnd, this._fixAxisOnZero), this.event.on(ChartEvent.layoutRectUpdate, () => {
55846
+ super.initEvent(), this._specVisible && (this.event.on(ChartEvent.layoutEnd, this._updateAxisLayout), this.event.on(ChartEvent.layoutEnd, this._fixAxisOnZero), this.event.on(ChartEvent.layoutRectUpdate, () => {
55791
55847
  this._clearLayoutCache();
55792
55848
  }));
55793
55849
  }
@@ -56125,7 +56181,7 @@
56125
56181
  if (domain = null != domain ? domain : this._scale.domain(), this.extendDomain(domain), this.includeZero(domain), this.setDomainMinMax(domain), this.niceDomain(domain), this._scale.domain(domain, this._nice), this._nice) {
56126
56182
  !this.setScaleNice() && this._scale.rescale();
56127
56183
  }
56128
- this._updateNiceLabelFormatter(domain), this._domainAfterSpec = this._scale.domain(), this.event.emit(ChartEvent.scaleDomainUpdate, {
56184
+ this._updateNiceLabelFormatter(domain), this._domainAfterSpec = this._scale.domain(), this._refreshVisibilityByData(), this.event.emit(ChartEvent.scaleDomainUpdate, {
56129
56185
  model: this
56130
56186
  }), this.event.emit(ChartEvent.scaleUpdate, {
56131
56187
  model: this,
@@ -56514,7 +56570,7 @@
56514
56570
  domain = this.computeBandDomain(data);
56515
56571
  this._scales[i].domain(domain.sort((a, b) => this._rawDomainIndex[i][a] - this._rawDomainIndex[i][b]));
56516
56572
  }
56517
- this.transformScaleDomain(), this.event.emit(ChartEvent.scaleDomainUpdate, {
56573
+ this.transformScaleDomain(), this._refreshVisibilityByData(), this.event.emit(ChartEvent.scaleDomainUpdate, {
56518
56574
  model: this
56519
56575
  }), this.event.emit(ChartEvent.scaleUpdate, {
56520
56576
  model: this,
@@ -63872,7 +63928,9 @@
63872
63928
  x: calcLayoutNumber(null === (_a = this._spec) || void 0 === _a ? void 0 : _a.centerX, layoutRect.width, layoutRect, layoutRect.width / 2),
63873
63929
  y: calcLayoutNumber(null === (_b = this._spec) || void 0 === _b ? void 0 : _b.centerY, layoutRect.height, layoutRect, layoutRect.height / 2)
63874
63930
  };
63875
- }, this._startAngle = POLAR_START_RADIAN, this._endAngle = POLAR_END_RADIAN, this._pieMark = null, this._labelMark = null, this._labelLineMark = null, this._emptyArcMark = null, this.dataToCentralPosition = datum => {
63931
+ }, this._startAngle = POLAR_START_RADIAN, this._endAngle = POLAR_END_RADIAN, this._pieMark = null, this._labelMark = null, this._labelLineMark = null, this._emptyArcMark = null, this._pendingViewDataLabelUpdate = !1, this.flushViewDataLabelUpdate = () => {
63932
+ this._pendingViewDataLabelUpdate && (this._pendingViewDataLabelUpdate = !1, this._viewDataLabel.getDataView().reRunAllTransform());
63933
+ }, this.dataToCentralPosition = datum => {
63876
63934
  const angle = datum[ARC_MIDDLE_ANGLE];
63877
63935
  if (isNil$1(angle)) return null;
63878
63936
  const radius = this.computeDatumRadius(datum),
@@ -64006,11 +64064,11 @@
64006
64064
  }
64007
64065
  initEvent() {
64008
64066
  var _a;
64009
- super.initEvent(), null === (_a = this._viewDataLabel.getDataView()) || void 0 === _a || _a.target.addListener("change", this.viewDataLabelUpdate.bind(this));
64067
+ super.initEvent(), null === (_a = this._viewDataLabel.getDataView()) || void 0 === _a || _a.target.addListener("change", this.viewDataLabelUpdate.bind(this)), this.event.on(ChartEvent.afterRender, this.flushViewDataLabelUpdate);
64010
64068
  }
64011
64069
  initGroups() {}
64012
64070
  onLayoutEnd() {
64013
- this._viewDataLabel.getDataView().reRunAllTransform(), this.onMarkPositionUpdate(), super.onLayoutEnd();
64071
+ this._pendingViewDataLabelUpdate = !0, this.onMarkPositionUpdate(), super.onLayoutEnd();
64014
64072
  }
64015
64073
  getDimensionField() {
64016
64074
  return this._seriesField ? [this._seriesField] : [];
@@ -64330,7 +64388,7 @@
64330
64388
  }, this.getRefLayoutRect = () => this.getRegions()[0].getLayoutRect(), this._coordinateType = "polar";
64331
64389
  }
64332
64390
  setAttrFromSpec() {
64333
- super.setAttrFromSpec(), this.visible && (this._axisStyle = this._getAxisAttributes(), this._gridStyle = this._getGridAttributes()), this._tick = this._spec.tick, this._orient = "angle" === this._spec.orient ? "angle" : "radius", this._center = this._spec.center, this._startAngle = degreeToRadian(this._spec.startAngle), this._endAngle = degreeToRadian(this._spec.endAngle), this._inverse = this._spec.inverse;
64391
+ super.setAttrFromSpec(), this._specVisible && (this._axisStyle = this._getAxisAttributes(), this._gridStyle = this._getGridAttributes()), this._tick = this._spec.tick, this._orient = "angle" === this._spec.orient ? "angle" : "radius", this._center = this._spec.center, this._startAngle = degreeToRadian(this._spec.startAngle), this._endAngle = degreeToRadian(this._spec.endAngle), this._inverse = this._spec.inverse;
64334
64392
  }
64335
64393
  _tickTransformOption() {
64336
64394
  var _a;
@@ -77150,6 +77208,12 @@
77150
77208
  }
77151
77209
  return t;
77152
77210
  };
77211
+ function transformHandlerText(handlerText) {
77212
+ if (!handlerText) return handlerText;
77213
+ const nextHandlerText = Object.assign({}, handlerText),
77214
+ handlerTextStyle = handlerText.style;
77215
+ return isFunction$1(handlerTextStyle) ? nextHandlerText.style = (value, position, context) => transformToGraphic(handlerTextStyle(value, position, context)) : isEmpty(handlerTextStyle) || (nextHandlerText.style = transformToGraphic(handlerTextStyle)), nextHandlerText;
77216
+ }
77153
77217
  function getContinuousLegendAttributes(spec) {
77154
77218
  const _a = mergeSpec({}, spec),
77155
77219
  {
@@ -77180,7 +77244,7 @@
77180
77244
  attrs = __rest$6(_a, ["title", "handler", "rail", "track", "startText", "endText", "handlerText", "sizeBackground", "background", "type", "id", "visible", "orient", "position", "data", "defaultSelected", "field", "filter", "regionId", "regionIndex", "seriesIndex", "seriesId", "padding"]);
77181
77245
  return title.visible ? attrs.title = transformLegendTitleAttributes(title) : attrs.title = {
77182
77246
  visible: !1
77183
- }, attrs.showHandler = !1 !== handler.visible, isEmpty(handler.style) || (attrs.handlerStyle = transformToGraphic(handler.style)), isValid$1(rail.width) && (attrs.railWidth = rail.width), isValid$1(rail.height) && (attrs.railHeight = rail.height), isEmpty(rail.style) || (attrs.railStyle = transformToGraphic(rail.style)), isEmpty(track.style) || (attrs.trackStyle = transformToGraphic(track.style)), attrs.startText = transformComponentStyle(startText), attrs.endText = transformComponentStyle(endText), attrs.handlerText = transformComponentStyle(handlerText), isEmpty(sizeBackground) || (attrs.sizeBackground = transformToGraphic(sizeBackground)), background.visible && !isEmpty(background.style) && (mergeSpec(attrs, background.style), isValid$1(background.padding) && (attrs.padding = background.padding)), attrs;
77247
+ }, attrs.showHandler = !1 !== handler.visible, isEmpty(handler.style) || (attrs.handlerStyle = transformToGraphic(handler.style)), isValid$1(rail.width) && (attrs.railWidth = rail.width), isValid$1(rail.height) && (attrs.railHeight = rail.height), isEmpty(rail.style) || (attrs.railStyle = transformToGraphic(rail.style)), isEmpty(track.style) || (attrs.trackStyle = transformToGraphic(track.style)), attrs.startText = transformComponentStyle(startText), attrs.endText = transformComponentStyle(endText), attrs.handlerText = transformHandlerText(handlerText), isEmpty(sizeBackground) || (attrs.sizeBackground = transformToGraphic(sizeBackground)), background.visible && !isEmpty(background.style) && (mergeSpec(attrs, background.style), isValid$1(background.padding) && (attrs.padding = background.padding)), attrs;
77184
77248
  }
77185
77249
  function isContinuousLegend(type) {
77186
77250
  return "color" === type || "size" === type;