@visactor/vchart 2.0.4-alpha.0 → 2.0.4-alpha.1

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 (58) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +47 -34
  3. package/build/index.js +58 -33
  4. package/build/index.min.js +2 -2
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/animation/index.d.ts +2 -2
  7. package/cjs/animation/index.js +6 -1
  8. package/cjs/animation/index.js.map +1 -1
  9. package/cjs/chart/index.d.ts +1 -0
  10. package/cjs/chart/index.js +10 -1
  11. package/cjs/chart/index.js.map +1 -1
  12. package/cjs/chart/range-area/range-area-transformer.js +1 -2
  13. package/cjs/chart/range-area/range-area-transformer.js.map +1 -1
  14. package/cjs/constant/attribute.js +2 -1
  15. package/cjs/constant/label.js +1 -2
  16. package/cjs/constant/waterfall.js +2 -1
  17. package/cjs/constant/word-cloud.js +1 -1
  18. package/cjs/core/expression-function.js +1 -2
  19. package/cjs/core/index.d.ts +1 -1
  20. package/cjs/core/index.js +1 -1
  21. package/cjs/core/index.js.map +1 -1
  22. package/cjs/core/vchart.js +1 -1
  23. package/cjs/index.d.ts +1 -0
  24. package/cjs/index.js +3 -2
  25. package/cjs/index.js.map +1 -1
  26. package/cjs/mark/index.d.ts +4 -3
  27. package/cjs/mark/index.js +15 -1
  28. package/cjs/mark/index.js.map +1 -1
  29. package/cjs/series/index.d.ts +1 -0
  30. package/cjs/series/index.js +1 -1
  31. package/cjs/series/index.js.map +1 -1
  32. package/esm/animation/index.d.ts +2 -2
  33. package/esm/animation/index.js +1 -1
  34. package/esm/animation/index.js.map +1 -1
  35. package/esm/chart/index.d.ts +1 -0
  36. package/esm/chart/index.js +2 -0
  37. package/esm/chart/index.js.map +1 -1
  38. package/esm/chart/range-area/range-area-transformer.js +1 -2
  39. package/esm/chart/range-area/range-area-transformer.js.map +1 -1
  40. package/esm/constant/attribute.js +2 -1
  41. package/esm/constant/label.js +1 -2
  42. package/esm/constant/waterfall.js +2 -1
  43. package/esm/constant/word-cloud.js +1 -1
  44. package/esm/core/expression-function.js +1 -2
  45. package/esm/core/index.d.ts +1 -1
  46. package/esm/core/index.js +1 -1
  47. package/esm/core/index.js.map +1 -1
  48. package/esm/core/vchart.js +1 -1
  49. package/esm/index.d.ts +1 -0
  50. package/esm/index.js +2 -0
  51. package/esm/index.js.map +1 -1
  52. package/esm/mark/index.d.ts +4 -3
  53. package/esm/mark/index.js +4 -2
  54. package/esm/mark/index.js.map +1 -1
  55. package/esm/series/index.d.ts +1 -0
  56. package/esm/series/index.js +2 -0
  57. package/esm/series/index.js.map +1 -1
  58. package/package.json +7 -7
package/build/index.es.js CHANGED
@@ -9493,7 +9493,8 @@ const DefaultRectAttribute = Object.assign(Object.assign({}, DefaultAttribute),
9493
9493
  y1: 0,
9494
9494
  strokeBoundsBuffer: 0,
9495
9495
  cornerRadius: 0,
9496
- cornerType: "round"
9496
+ cornerType: "round",
9497
+ drawStrokeWhenZeroWH: !1
9497
9498
  });
9498
9499
  Object.assign(Object.assign({}, DefaultAttribute), {
9499
9500
  width: 0,
@@ -9502,7 +9503,8 @@ Object.assign(Object.assign({}, DefaultAttribute), {
9502
9503
  y1: 0,
9503
9504
  cornerRadius: 0,
9504
9505
  length: 0,
9505
- cornerType: "round"
9506
+ cornerType: "round",
9507
+ drawStrokeWhenZeroWH: !1
9506
9508
  });
9507
9509
  const DefaultSymbolAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
9508
9510
  symbolType: "circle",
@@ -14175,7 +14177,7 @@ class Graphic extends Node {
14175
14177
  });
14176
14178
  }
14177
14179
  setAttributes(params, forceUpdateTag = !1, context) {
14178
- (params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._setAttributes(params, forceUpdateTag, context);
14180
+ params && ((params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._setAttributes(params, forceUpdateTag, context));
14179
14181
  }
14180
14182
  _setAttributes(params, forceUpdateTag = !1, context) {
14181
14183
  const keys = Object.keys(params);
@@ -15000,8 +15002,8 @@ function rectFillVisible(opacity, fillOpacity, width, height, fill) {
15000
15002
  function strokeVisible(opacity, strokeOpacity) {
15001
15003
  return opacity * strokeOpacity > 0;
15002
15004
  }
15003
- function rectStrokeVisible(opacity, strokeOpacity, width, height) {
15004
- return opacity * strokeOpacity > 0 && 0 !== width && 0 !== height;
15005
+ function rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH) {
15006
+ return drawStrokeWhenZeroWH ? opacity * strokeOpacity > 0 : opacity * strokeOpacity > 0 && 0 !== width && 0 !== height;
15005
15007
  }
15006
15008
  function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
15007
15009
  const x10 = x1 - x0,
@@ -16371,14 +16373,10 @@ class Glyph extends Graphic {
16371
16373
  attrs && (Object.assign(stateAttrs, attrs.attributes), (null === (_a = attrs.subAttributes) || void 0 === _a ? void 0 : _a.length) && subAttrs.forEach((subAttrs, index) => {
16372
16374
  Object.assign(subAttrs, attrs.subAttributes[index]);
16373
16375
  }));
16374
- }), this.subGraphic.forEach((graphic, index) => {
16375
- graphic.updateNormalAttrs(subAttrs[index]), graphic.applyStateAttrs(subAttrs[index], states, hasAnimation);
16376
16376
  }), this.updateNormalAttrs(stateAttrs), this.currentStates = states, this.applyStateAttrs(stateAttrs, states, hasAnimation);
16377
16377
  }
16378
16378
  clearStates(hasAnimation) {
16379
- this.stopStateAnimates(), this.hasState() && this.normalAttrs ? (this.currentStates = [], this.subGraphic.forEach(graphic => {
16380
- graphic.applyStateAttrs(graphic.normalAttrs, this.currentStates, hasAnimation, !0), graphic.normalAttrs = null;
16381
- }), this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
16379
+ this.stopStateAnimates(), this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
16382
16380
  }
16383
16381
  clone() {
16384
16382
  const glyph = new Glyph(Object.assign({}, this.attribute));
@@ -19637,7 +19635,8 @@ let DefaultCanvasRectRender = class extends BaseRender {
19637
19635
  y1: y1,
19638
19636
  x: originX = rectAttribute.x,
19639
19637
  y: originY = rectAttribute.y,
19640
- fillStrokeOrder = rectAttribute.fillStrokeOrder
19638
+ fillStrokeOrder = rectAttribute.fillStrokeOrder,
19639
+ drawStrokeWhenZeroWH = rectAttribute.drawStrokeWhenZeroWH
19641
19640
  } = rect.attribute;
19642
19641
  let {
19643
19642
  width: width,
@@ -19645,7 +19644,7 @@ let DefaultCanvasRectRender = class extends BaseRender {
19645
19644
  } = rect.attribute;
19646
19645
  width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0;
19647
19646
  const fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
19648
- sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
19647
+ sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH),
19649
19648
  doFill = runFill(fill, background),
19650
19649
  doStroke = runStroke(stroke, lineWidth);
19651
19650
  if (!rect.valid || !visible) return;
@@ -21703,13 +21702,13 @@ class Stage extends Group$1 {
21703
21702
  this._skipRender > 1 && this.renderNextFrame(), this._skipRender = 0;
21704
21703
  } else this._skipRender = 1;
21705
21704
  }, this.beforeRender = stage => {
21706
- this._beforeRender && this._beforeRender(stage);
21705
+ this._beforeRenderList.forEach(cb => cb(stage));
21707
21706
  }, this.afterClearScreen = drawParams => {
21708
21707
  this._afterClearScreen && this._afterClearScreen(drawParams);
21709
21708
  }, this.afterClearRect = drawParams => {
21710
21709
  this._afterClearRect && this._afterClearRect(drawParams);
21711
21710
  }, this.afterRender = stage => {
21712
- this.renderCount++, this._afterRender && this._afterRender(stage), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
21711
+ this.renderCount++, this._afterRenderList.forEach(cb => cb(stage)), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
21713
21712
  }, this.afterTickCb = () => {
21714
21713
  this.tickedBeforeRender = !0, "rendering" !== this.state && this.renderNextFrame();
21715
21714
  }, this.params = params, this.theme = new Theme(), this.hooks = {
@@ -21717,7 +21716,7 @@ class Stage extends Group$1 {
21717
21716
  afterRender: new SyncHook(["stage"]),
21718
21717
  afterClearScreen: new SyncHook(["stage"]),
21719
21718
  afterClearRect: new SyncHook(["stage"])
21720
- }, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.graphicService = container.get(GraphicService), this.pluginService.active(this, params), this.window.create({
21719
+ }, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.graphicService = container.get(GraphicService), this.pluginService.active(this, params), this._beforeRenderList = [], this._afterRenderList = [], this.window.create({
21721
21720
  width: params.width,
21722
21721
  height: params.height,
21723
21722
  viewBox: params.viewBox,
@@ -21728,7 +21727,7 @@ class Stage extends Group$1 {
21728
21727
  canvas: params.canvas
21729
21728
  }), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
21730
21729
  main: !0
21731
- })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this.hooks.afterClearScreen.tap("constructor", this.afterClearScreen), this.hooks.afterClearRect.tap("constructor", this.afterClearRect), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this._afterClearScreen = params.afterClearScreen, this._afterClearRect = params.afterClearRect, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
21730
+ })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), params.beforeRender && this._beforeRenderList.push(params.beforeRender), params.afterRender && this._afterRenderList.push(params.afterRender), this.hooks.afterClearScreen.tap("constructor", this.afterClearScreen), this.hooks.afterClearRect.tap("constructor", this.afterClearRect), this._afterClearScreen = params.afterClearScreen, this._afterClearRect = params.afterClearRect, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
21732
21731
  tickRenderMode: "effect"
21733
21732
  }), this.optmize(params.optimize), params.background && isString$1(this._background) && this._background.includes("/") && this.setAttributes({
21734
21733
  background: this._background
@@ -21843,10 +21842,16 @@ class Stage extends Group$1 {
21843
21842
  options.enableView3dTransform && this.enableView3dTransform();
21844
21843
  }
21845
21844
  setBeforeRender(cb) {
21846
- this._beforeRender = cb;
21845
+ this._beforeRenderList.push(cb);
21846
+ }
21847
+ removeBeforeRender(cb) {
21848
+ this._beforeRenderList = this._beforeRenderList.filter(c => c !== cb);
21847
21849
  }
21848
21850
  setAfterRender(cb) {
21849
- this._afterRender = cb;
21851
+ this._afterRenderList.push(cb);
21852
+ }
21853
+ removeAfterRender(cb) {
21854
+ this._afterRenderList = this._afterRenderList.filter(c => c !== cb);
21850
21855
  }
21851
21856
  afterNextRender(cb) {
21852
21857
  this._afterNextRenderCbs || (this._afterNextRenderCbs = []), this._afterNextRenderCbs.push(cb);
@@ -31713,6 +31718,7 @@ class Step {
31713
31718
  return this.getEndProps();
31714
31719
  }
31715
31720
  stop() {}
31721
+ release() {}
31716
31722
  }
31717
31723
  class WaitStep extends Step {
31718
31724
  constructor(type, props, duration, easing) {
@@ -31930,7 +31936,9 @@ class Animate {
31930
31936
  this.status !== AnimateStatus.END && this.onEnd(), this.status = AnimateStatus.END, this.target && ("start" === type ? this.target.setAttributes(this._startProps) : "end" === type ? this.target.setAttributes(this._endProps) : type && this.target.setAttributes(type));
31931
31937
  }
31932
31938
  release() {
31933
- this.status = AnimateStatus.END, this._onRemove && this._onRemove.forEach(cb => cb()), this._onStart = [], this._onFrame = [], this._onEnd = [], this._onRemove = [];
31939
+ this.status = AnimateStatus.END, this._onRemove && this._onRemove.forEach(cb => cb()), this._onStart = [], this._onFrame = [], this._onEnd = [], this._onRemove = [], this.forEachStep(step => {
31940
+ step.release();
31941
+ });
31934
31942
  }
31935
31943
  getDuration() {
31936
31944
  return this._duration;
@@ -32004,6 +32012,10 @@ class Animate {
32004
32012
  getLoop() {
32005
32013
  return this._loopCount;
32006
32014
  }
32015
+ forEachStep(cb) {
32016
+ let step = this._firstStep;
32017
+ for (; step;) cb(step), step = step.next;
32018
+ }
32007
32019
  }
32008
32020
 
32009
32021
  const performanceRAF = new PerformanceRAF();
@@ -32283,6 +32295,9 @@ class AnimateExecutor {
32283
32295
  constructor(target) {
32284
32296
  this._animates = [], this._startCallbacks = [], this._endCallbacks = [], this._started = !1, this._activeCount = 0, this._target = target;
32285
32297
  }
32298
+ get started() {
32299
+ return this._started;
32300
+ }
32286
32301
  onStart(cb) {
32287
32302
  cb ? (this._startCallbacks.push(cb), this._started && this._activeCount > 0 && cb()) : this._startCallbacks.forEach(cb => {
32288
32303
  cb();
@@ -32423,14 +32438,14 @@ class AnimateExecutor {
32423
32438
  return delayAfterValue > 0 && (totalDelay += delayAfterValue), totalDelay > 0 && animate.wait(totalDelay), loop && loop > 0 && animate.loop(loop), bounce && animate.bounce(!0), animate;
32424
32439
  }
32425
32440
  _handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
32426
- var _a, _b, _c, _d;
32441
+ var _a, _b, _c, _d, _e, _f;
32427
32442
  if (custom && customType) {
32428
32443
  const customParams = Object.assign({
32429
- width: graphic.stage.width,
32430
- height: graphic.stage.height,
32444
+ width: (null === (_a = graphic.stage) || void 0 === _a ? void 0 : _a.width) || 0,
32445
+ height: (null === (_b = graphic.stage) || void 0 === _b ? void 0 : _b.height) || 0,
32431
32446
  group: this._target.parent
32432
32447
  }, this.resolveValue(customParameters, graphic)),
32433
- objOptions = isFunction$1(options) ? options.call(null, null !== (_b = customParams && (null === (_a = customParams.data) || void 0 === _a ? void 0 : _a[0])) && void 0 !== _b ? _b : null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, customParams) : options;
32448
+ objOptions = isFunction$1(options) ? options.call(null, null !== (_d = customParams && (null === (_c = customParams.data) || void 0 === _c ? void 0 : _c[0])) && void 0 !== _d ? _d : null === (_f = null === (_e = graphic.context) || void 0 === _e ? void 0 : _e.data) || void 0 === _f ? void 0 : _f[0], graphic, customParams) : options;
32434
32449
  customParams.options = objOptions, customParams.controlOptions = controlOptions, 1 === customType ? this.createCustomAnimation(animate, custom, from, props, duration, easing, customParams) : 2 === customType && this.createCustomInterpolatorAnimation(animate, custom, props, duration, easing, customParams);
32435
32450
  } else "to" === type ? animate.to(props, duration, easing) : "from" === type && animate.from(props, duration, easing);
32436
32451
  }
@@ -32650,7 +32665,7 @@ class AnimationStateManager {
32650
32665
  reApplyState(state) {
32651
32666
  var _a;
32652
32667
  const stateInfo = null === (_a = this.stateList) || void 0 === _a ? void 0 : _a.find(stateInfo => stateInfo.state === state);
32653
- if (stateInfo) {
32668
+ if (stateInfo && stateInfo.executor.started) {
32654
32669
  const stateList = this.stateList.slice();
32655
32670
  stateInfo.executor.stop(), this.stateList = stateList, stateInfo.executor.execute(stateInfo.animationConfig);
32656
32671
  }
@@ -33694,7 +33709,7 @@ class GrowAngleBase extends ACustomAnimate {
33694
33709
  }
33695
33710
  class GrowAngleIn extends GrowAngleBase {
33696
33711
  onBind() {
33697
- var _a, _b;
33712
+ var _a, _b, _c;
33698
33713
  super.onBind();
33699
33714
  const {
33700
33715
  from: from,
@@ -33703,7 +33718,7 @@ class GrowAngleIn extends GrowAngleBase {
33703
33718
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
33704
33719
  this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
33705
33720
  const finalAttribute = this.target.getFinalAttribute();
33706
- finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs), this.determineUpdateFunction();
33721
+ finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs), this.determineUpdateFunction();
33707
33722
  }
33708
33723
  }
33709
33724
  class GrowAngleOut extends GrowAngleBase {
@@ -34311,7 +34326,7 @@ class GrowPointsBase extends ACustomAnimate {
34311
34326
  }
34312
34327
  class GrowRadiusIn extends GrowPointsBase {
34313
34328
  onBind() {
34314
- var _a, _b;
34329
+ var _a, _b, _c;
34315
34330
  super.onBind();
34316
34331
  const {
34317
34332
  from: from,
@@ -34320,7 +34335,7 @@ class GrowRadiusIn extends GrowPointsBase {
34320
34335
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
34321
34336
  this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
34322
34337
  const finalAttribute = this.target.getFinalAttribute();
34323
- finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
34338
+ finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
34324
34339
  }
34325
34340
  }
34326
34341
  class GrowRadiusOut extends GrowPointsBase {
@@ -34435,7 +34450,7 @@ class GrowWidthIn extends ACustomAnimate {
34435
34450
  super(from, to, duration, easing, params);
34436
34451
  }
34437
34452
  onBind() {
34438
- var _a, _b;
34453
+ var _a, _b, _c;
34439
34454
  super.onBind();
34440
34455
  const {
34441
34456
  from: from,
@@ -34444,7 +34459,7 @@ class GrowWidthIn extends ACustomAnimate {
34444
34459
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
34445
34460
  this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
34446
34461
  const finalAttribute = this.target.getFinalAttribute();
34447
- finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
34462
+ finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
34448
34463
  }
34449
34464
  onEnd(cb) {
34450
34465
  super.onEnd(cb);
@@ -56926,7 +56941,7 @@ const lookup = (data, opt) => {
56926
56941
  });
56927
56942
  };
56928
56943
 
56929
- const version = "2.0.4-alpha.0";
56944
+ const version = "2.0.4-alpha.1";
56930
56945
 
56931
56946
  const addVChartProperty = (data, op) => {
56932
56947
  const context = op.beforeCall();
@@ -88174,8 +88189,6 @@ class RangeAreaChartSpecTransformer extends CartesianChartSpecTransformer {
88174
88189
  var _a, _b;
88175
88190
  const series = super._getDefaultSeriesSpec(spec);
88176
88191
  series.area = spec.area;
88177
- series.point = spec.point;
88178
- series.line = spec.line;
88179
88192
  if (spec.direction === "horizontal") {
88180
88193
  series.xField = (_a = spec.xField) !== null && _a !== void 0 ? _a : [spec.minField, spec.maxField];
88181
88194
  }
@@ -100234,4 +100247,4 @@ function registerSequentialAnimate() {
100234
100247
  mixin(BaseMark, SequentialAnimate);
100235
100248
  }
100236
100249
 
100237
- export { ArcMark, AreaChart, AreaMark, AreaSeries, AttributeLevel, AxisSyncPlugin, BandAxisMixin, BarChart, BarChartSpecTransformer, BarSeries, BarSeriesSpecTransformer, BaseArcMark, BaseChart, BaseChartSpecTransformer, BaseComponent, BaseComponentSpecTransformer, BaseHistogramChart, BaseMark, BasePieChart, BasePieChartSpecTransformer, BasePieSeries, BasePlugin, BasePolygonMark, BaseSeries, BaseSeriesSpecTransformer, BaseSeriesTooltipHelper, BaseWordCloudChart, BaseWordCloudChartSpecTransformer, BaseWordCloudSeries, BoxPlotChart, BoxPlotSeries, Brush, CanvasTooltipHandler, CartesianAxis, CartesianBandAxis, CartesianChartSpecTransformer, CartesianCrossHair, CartesianLinearAxis, CartesianLogAxis, CartesianMarkArea, CartesianMarkLine, CartesianMarkPoint, CartesianSeries, CartesianSymlogAxis, CartesianTimeAxis, ChartEvent, CirclePackingChart, CirclePackingSeries, CircularProgressChart, CircularProgressSeries, CommonChart, CommonChartSpecTransformer, CompilableData, ComponentMark, ContinuousLegend, CorrelationChart, CorrelationSeries, CustomMark, DEFAULT_ANIMATION_CONFIG, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_WIDTH, DEFAULT_CLOSE_STROKE_JOIN, DEFAULT_DATA_INDEX, DEFAULT_DATA_KEY, DEFAULT_DATA_SERIES_FIELD, DEFAULT_KEY, DEFAULT_LAYOUT_RECT_LEVEL, DEFAULT_LAYOUT_RECT_LEVEL_MIN, DEFAULT_LINEAR_INTERPOLATE, DEFAULT_MEASURE_CANVAS_ID, DEFAULT_SERIES_STYLE_NAME, DEFAULT_SMOOTH_INTERPOLATE, DataZoom, DimensionClickEvent, DimensionEventEnum, DimensionHoverEvent, Direction, DiscreteLegend, DomTooltipHandler, DotSeries, ElementHighlight, ElementSelect, Event$1 as Event, Factory, FormatterPlugin, FunnelChart, FunnelChartSpecTransformer, FunnelSeries, FunnelSeriesSpecTransformer, GaugeChart, GaugePointerSeries, GaugeSeries, GeoCoordinate, GeoMarkPoint, GeoSeries, GridLayout, GroupMark, HeatmapChart, HeatmapSeries, HistogramChart, HistogramChartSpecTransformer, ImageMark, Indicator, Label, Layout$1 as Layout, LayoutLevel, LayoutZIndex, LineChart, LineMark, LineSeries, LinearAxisMixin, LinearProgressChart, LinearProgressSeries, LinkSeries, LiquidChart, LiquidSeries, MOSAIC_CAT_END_PERCENT, MOSAIC_CAT_START_PERCENT, MOSAIC_VALUE_END_PERCENT, MOSAIC_VALUE_START_PERCENT, ManualTicker, MapChart, MapSeries, MarkTypeEnum, MediaQuery, MosaicChart, MosaicSeries, PREFIX, PathMark, PieChart, PieSeries, PieSeriesSpecTransformer, Player, PolarAxis, PolarBandAxis, PolarCrossHair, PolarLinearAxis, PolarMarkArea, PolarMarkLine, PolarMarkPoint, PolarSeries, PolygonMark, PositionEnum, ProgressLikeSeries, RadarChart, RadarSeries, RangeAreaChart, RangeAreaSeries, RangeColumnChart, RangeColumnSeries, RangeColumnSeriesSpecTransformer, RectMark, RenderModeEnum, RippleMark, RoseChart, RoseLikeSeries, RoseSeries, RuleMark, SEGMENT_FIELD_END, SEGMENT_FIELD_START, STACK_FIELD_END, STACK_FIELD_END_OffsetSilhouette, STACK_FIELD_END_PERCENT, STACK_FIELD_KEY, STACK_FIELD_START, STACK_FIELD_START_OffsetSilhouette, STACK_FIELD_START_PERCENT, STACK_FIELD_TOTAL, STACK_FIELD_TOTAL_BOTTOM, STACK_FIELD_TOTAL_PERCENT, STACK_FIELD_TOTAL_TOP, STATE_VALUE_ENUM, SankeyChart, SankeySeries, ScatterChart, ScatterSeries, ScrollBar, SequenceChart, SeriesMarkNameEnum, SeriesTypeEnum, SeriesTypeForThemeEnum, StreamLight, SunburstChart, SunburstSeries, SymbolMark, TextMark, ThemeManager, Title, Tooltip, TooltipResult, TotalLabel, TransformLevel, TreemapChart, TreemapSeries, USER_LAYOUT_RECT_LEVEL, VChart, VennChart, VennSeries, WaterfallChart, WaterfallSeries, WordCloudChart, WordCloudSeries, alternatingWave, animationConfig, barGrowIn, barGrowOut, barPresetAnimation, baseSeriesMark, boundsInRect, builtinThemes, calcLayoutNumber, calcPadding, centerToCorner, columnCenterToEdge, columnEdgeToCenter, columnLeftToRight, columnRightToLeft, computeActualDataScheme, convertPoint, cornerToCenter, createArc, createArea, createGroup, createLine, createRect, createRichText, createSymbol, createText, darkTheme, dataScheme, VChart as default, defaultThemeName, diagonalCenterToEdge, diagonalTopLeftToBottomRight, findMarkGraphic, functionTransform, getActualColor, getActualNumValue, getCartesianCrosshairRect, getCartesianDimensionInfo, getColorSchemeBySeries, getCombinedSizeOfRegions, getDataScheme, getDatumOfGraphic, getDiffAttributesOfGraphic, getDimensionInfoByValue, getFieldAlias, getFunnelTheme, getMergedTheme, getPolarDimensionInfo, getRegionStackGroup, getSpecInfo, getTheme, hasThemeMerged, isCollectionMark, isColorKey, isPercent, isPercentOffset, isProgressiveDataColorScheme, isTokenKey, isValidOrient, isXAxis, isYAxis, isZAxis, lightTheme, lookup, measureText, mergeFields, normalizeLayoutPaddingSpec, particleEffect, pieDisappear, pieEnter, pieExit, piePresetAnimation, pulseWave, queryColorFromColorScheme, queryToken, randomOpacity, registerAllEnv, registerAllMarks, registerAnimate, registerArcAnimation, registerArcMark, registerAreaChart, registerAreaMark, registerAreaSeries, registerBarChart, registerBarSeries, registerBoxplotChart, registerBoxplotSeries, registerBrowserEnv, registerBrush, registerCanvasTooltipHandler, registerCartesianBandAxis, registerCartesianCrossHair, registerCartesianLinearAxis, registerCartesianLogAxis, registerCartesianSymlogAxis, registerCartesianTimeAxis, registerChartPlugin, registerCirclePackingChart, registerCirclePackingSeries, registerCircularProgressChart, registerCircularProgressSeries, registerCommonChart, registerComponentMark, registerContinuousLegend, registerCorrelationChart, registerCustomAnimate, registerCustomMark, registerDataSetInstanceParser, registerDataSetInstanceTransform, registerDataZoom, registerDimensionEvents, registerDimensionHover, registerDimensionTooltipProcessor, registerDiscreteLegend, registerDomTooltipHandler, registerDotSeries, registerDragPlugin, registerElementActive, registerElementActiveByLegend, registerElementHighlight, registerElementHighlightByGroup, registerElementHighlightByKey, registerElementHighlightByLegend, registerElementHighlightByName, registerElementSelect, registerFormatPlugin, registerFunnelChart, registerFunnelSeries, registerGaugeChart, registerGaugePointerSeries, registerGaugeSeries, registerGeoCoordinate, registerGeoMarkPoint, registerGesturePlugin, registerGridLayout, registerGroupMark, registerGroupTooltipProcessor, registerHarmonyEnv, registerHeatmapChart, registerHeatmapSeries, registerHistogramChart, registerHtmlAttributePlugin, registerImageMark, registerIndicator, registerLabel, registerLarkEnv, registerLineChart, registerLineMark, registerLineSeries, registerLinearProgressChart, registerLinearProgressSeries, registerLinkSeries, registerLiquidChart, registerLiquidSeries, registerLynxEnv, registerMapChart, registerMapSeries, registerMarkArea, registerMarkFilterTransform, registerMarkLine, registerMarkMapTransform, registerMarkPoint, registerMarkTooltipProcessor, registerMediaQuery, registerMosaicChart, registerMosaicSeries, registerNodeEnv, registerPathMark, registerPieChart, registerPieSeries, registerPlayer, registerPolarBandAxis, registerPolarCrossHair, registerPolarLinearAxis, registerPolarMarkArea, registerPolarMarkLine, registerPolarMarkPoint, registerPolygonAnimation, registerPolygonMark, registerPoptip, registerRadarChart, registerRadarSeries, registerRangeAreaChart, registerRangeAreaSeries, registerRangeColumnChart, registerRangeColumnSeries, registerReactAttributePlugin, registerRectAnimation, registerRectMark, registerRippleMark, registerRoseChart, registerRoseSeries, registerRuleMark, registerSankeyChart, registerSankeySeries, registerScatterChart, registerScatterSeries, registerScrollBar, registerSequenceChart, registerSequentialAnimate, registerStateTransition, registerSunBurstSeries, registerSunburstChart, registerSymbolMark, registerTTEnv, registerTaroEnv, registerTextMark, registerTheme, registerTitle, registerTooltip, registerTotalLabel, registerTreemapChart, registerTreemapSeries, registerAnimate$1 as registerVRenderAnimate, registerVennChart, registerVennSeries, registerWXEnv, registerWaterfallChart, registerWaterfallSeries, registerWordCloudChart, registerWordCloudSeries, registerWordCloudShapeChart, removeTheme, rippleEffect, rotationScan, rowBottomToTop, rowCenterToEdge, rowEdgeToCenter, rowTopToBottom, shouldMarkDoMorph, snakeWave, sortStackValueGroup, specTransform, spiralEffect, stack, stackGroup, stackMosaic, stackMosaicTotal, stackOffsetSilhouette, stackTotal, themeExist, themes, token, transformColorSchemeToStandardStruct, transformToGraphic, userAnimationConfig, version, vglobal, warn };
100250
+ export { ArcMark, AreaChart, AreaMark, AreaSeries, AttributeLevel, AxisSyncPlugin, BandAxisMixin, BarChart, BarChartSpecTransformer, BarSeries, BarSeriesSpecTransformer, BaseArcMark, BaseChart, BaseChartSpecTransformer, BaseComponent, BaseComponentSpecTransformer, BaseHistogramChart, BaseMark, BasePieChart, BasePieChartSpecTransformer, BasePieSeries, BasePlugin, BasePolygonMark, BaseSeries, BaseSeriesSpecTransformer, BaseSeriesTooltipHelper, BaseWordCloudChart, BaseWordCloudChartSpecTransformer, BaseWordCloudSeries, BoxPlotChart, BoxPlotSeries, Brush, CanvasTooltipHandler, CartesianAxis, CartesianBandAxis, CartesianChartSpecTransformer, CartesianCrossHair, CartesianLinearAxis, CartesianLogAxis, CartesianMarkArea, CartesianMarkLine, CartesianMarkPoint, CartesianSeries, CartesianSymlogAxis, CartesianTimeAxis, ChartEvent, CirclePackingChart, CirclePackingSeries, CircularProgressChart, CircularProgressSeries, CommonChart, CommonChartSpecTransformer, CompilableData, ComponentMark, ContinuousLegend, CorrelationChart, CorrelationSeries, CustomMark, DEFAULT_ANIMATION_CONFIG, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_WIDTH, DEFAULT_CLOSE_STROKE_JOIN, DEFAULT_DATA_INDEX, DEFAULT_DATA_KEY, DEFAULT_DATA_SERIES_FIELD, DEFAULT_KEY, DEFAULT_LAYOUT_RECT_LEVEL, DEFAULT_LAYOUT_RECT_LEVEL_MIN, DEFAULT_LINEAR_INTERPOLATE, DEFAULT_MEASURE_CANVAS_ID, DEFAULT_SERIES_STYLE_NAME, DEFAULT_SMOOTH_INTERPOLATE, DataZoom, DimensionClickEvent, DimensionEventEnum, DimensionHoverEvent, Direction, DiscreteLegend, DomTooltipHandler, DotSeries, ElementHighlight, ElementSelect, Event$1 as Event, Factory, FormatterPlugin, FunnelChart, FunnelChartSpecTransformer, FunnelSeries, FunnelSeriesSpecTransformer, GaugeChart, GaugePointerSeries, GaugeSeries, GeoCoordinate, GeoMarkPoint, GeoSeries, GlyphMark, GridLayout, GroupMark, HeatmapChart, HeatmapSeries, HistogramChart, HistogramChartSpecTransformer, ImageMark, Indicator, Label, Layout$1 as Layout, LayoutLevel, LayoutZIndex, LineChart, LineMark, LineSeries, LinearAxisMixin, LinearProgressChart, LinearProgressSeries, LinkSeries, LiquidChart, LiquidSeries, MOSAIC_CAT_END_PERCENT, MOSAIC_CAT_START_PERCENT, MOSAIC_VALUE_END_PERCENT, MOSAIC_VALUE_START_PERCENT, ManualTicker, MapChart, MapSeries, MarkTypeEnum, MediaQuery, MosaicChart, MosaicSeries, PREFIX, PathMark, PieChart, PieSeries, PieSeriesSpecTransformer, Player, PolarAxis, PolarBandAxis, PolarCrossHair, PolarLinearAxis, PolarMarkArea, PolarMarkLine, PolarMarkPoint, PolarSeries, PolygonMark, PositionEnum, ProgressLikeSeries, RadarChart, RadarSeries, RangeAreaChart, RangeAreaSeries, RangeColumnChart, RangeColumnSeries, RangeColumnSeriesSpecTransformer, RectMark, RenderModeEnum, RippleMark, RoseChart, RoseLikeSeries, RoseSeries, RuleMark, SEGMENT_FIELD_END, SEGMENT_FIELD_START, STACK_FIELD_END, STACK_FIELD_END_OffsetSilhouette, STACK_FIELD_END_PERCENT, STACK_FIELD_KEY, STACK_FIELD_START, STACK_FIELD_START_OffsetSilhouette, STACK_FIELD_START_PERCENT, STACK_FIELD_TOTAL, STACK_FIELD_TOTAL_BOTTOM, STACK_FIELD_TOTAL_PERCENT, STACK_FIELD_TOTAL_TOP, STATE_VALUE_ENUM, SankeyChart, SankeySeries, ScatterChart, ScatterSeries, ScrollBar, SequenceChart, SeriesMarkNameEnum, SeriesTypeEnum, SeriesTypeForThemeEnum, StreamLight, SunburstChart, SunburstSeries, SymbolMark, TextMark, ThemeManager, Title, Tooltip, TooltipResult, TotalLabel, TransformLevel, TreemapChart, TreemapSeries, USER_LAYOUT_RECT_LEVEL, VChart, VennChart, VennSeries, WaterfallChart, WaterfallSeries, WordCloudChart, WordCloudSeries, alternatingWave, animationConfig, barGrowIn, barGrowOut, barPresetAnimation, baseSeriesMark, boundsInRect, builtinThemes, calcLayoutNumber, calcPadding, centerToCorner, columnCenterToEdge, columnEdgeToCenter, columnLeftToRight, columnRightToLeft, computeActualDataScheme, convertPoint, cornerToCenter, createArc, createArea, createGroup, createLine, createRect, createRichText, createScale, createScaleWithSpec, createSymbol, createText, darkTheme, dataScheme, VChart as default, defaultThemeName, diagonalCenterToEdge, diagonalTopLeftToBottomRight, findMarkGraphic, functionTransform, getActualColor, getActualNumValue, getCartesianCrosshairRect, getCartesianDimensionInfo, getColorSchemeBySeries, getCombinedSizeOfRegions, getDataScheme, getDatumOfGraphic, getDiffAttributesOfGraphic, getDimensionInfoByValue, getFieldAlias, getFunnelTheme, getGroupAnimationParams, getMergedTheme, getPolarDimensionInfo, getRegionStackGroup, getSpecInfo, getTheme, hasThemeMerged, isCollectionMark, isColorKey, isPercent, isPercentOffset, isPolarAxisSeries, isProgressiveDataColorScheme, isSpecValueWithScale, isTokenKey, isValidOrient, isValueInScaleDomain, isXAxis, isYAxis, isZAxis, lightTheme, lookup, measureText, mergeFields, normalizeLayoutPaddingSpec, particleEffect, pieDisappear, pieEnter, pieExit, piePresetAnimation, pulseWave, queryColorFromColorScheme, queryToken, randomOpacity, registerAllEnv, registerAllMarks, registerAnimate, registerArcAnimation, registerArcMark, registerAreaChart, registerAreaMark, registerAreaSeries, registerBarChart, registerBarSeries, registerBoxplotChart, registerBoxplotSeries, registerBrowserEnv, registerBrush, registerCanvasTooltipHandler, registerCartesianBandAxis, registerCartesianCrossHair, registerCartesianLinearAxis, registerCartesianLogAxis, registerCartesianSymlogAxis, registerCartesianTimeAxis, registerChartPlugin, registerCirclePackingChart, registerCirclePackingSeries, registerCircularProgressChart, registerCircularProgressSeries, registerCommonChart, registerComponentMark, registerContinuousLegend, registerCorrelationChart, registerCustomAnimate, registerCustomMark, registerDataSetInstanceParser, registerDataSetInstanceTransform, registerDataZoom, registerDimensionEvents, registerDimensionHover, registerDimensionTooltipProcessor, registerDiscreteLegend, registerDomTooltipHandler, registerDotSeries, registerDragPlugin, registerElementActive, registerElementActiveByLegend, registerElementHighlight, registerElementHighlightByGroup, registerElementHighlightByKey, registerElementHighlightByLegend, registerElementHighlightByName, registerElementSelect, registerFormatPlugin, registerFunnelChart, registerFunnelSeries, registerGaugeChart, registerGaugePointerSeries, registerGaugeSeries, registerGeoCoordinate, registerGeoMarkPoint, registerGesturePlugin, registerGlyphMark, registerGridLayout, registerGroupMark, registerGroupTooltipProcessor, registerHarmonyEnv, registerHeatmapChart, registerHeatmapSeries, registerHistogramChart, registerHtmlAttributePlugin, registerImageMark, registerIndicator, registerLabel, registerLarkEnv, registerLineChart, registerLineMark, registerLineSeries, registerLinearProgressChart, registerLinearProgressSeries, registerLinkSeries, registerLiquidChart, registerLiquidSeries, registerLynxEnv, registerMapChart, registerMapSeries, registerMarkArea, registerMarkFilterTransform, registerMarkLine, registerMarkMapTransform, registerMarkPoint, registerMarkTooltipProcessor, registerMediaQuery, registerMosaicChart, registerMosaicSeries, registerNodeEnv, registerPathMark, registerPieChart, registerPieSeries, registerPlayer, registerPolarBandAxis, registerPolarCrossHair, registerPolarLinearAxis, registerPolarMarkArea, registerPolarMarkLine, registerPolarMarkPoint, registerPolygonAnimation, registerPolygonMark, registerPoptip, registerRadarChart, registerRadarSeries, registerRangeAreaChart, registerRangeAreaSeries, registerRangeColumnChart, registerRangeColumnSeries, registerReactAttributePlugin, registerRectAnimation, registerRectMark, registerRippleMark, registerRoseChart, registerRoseSeries, registerRuleMark, registerSankeyChart, registerSankeySeries, registerScaleInOutAnimation, registerScatterChart, registerScatterSeries, registerScrollBar, registerSequenceChart, registerSequentialAnimate, registerStateTransition, registerSunBurstSeries, registerSunburstChart, registerSymbolMark, registerTTEnv, registerTaroEnv, registerTextMark, registerTheme, registerTitle, registerTooltip, registerTotalLabel, registerTreemapChart, registerTreemapSeries, registerAnimate$1 as registerVRenderAnimate, registerVennChart, registerVennSeries, registerWXEnv, registerWaterfallChart, registerWaterfallSeries, registerWordCloudChart, registerWordCloudSeries, registerWordCloudShapeChart, removeTheme, rippleEffect, rotationScan, rowBottomToTop, rowCenterToEdge, rowEdgeToCenter, rowTopToBottom, setDefaultCrosshairForCartesianChart, shouldMarkDoMorph, snakeWave, sortDataInAxisHelper, sortStackValueGroup, specTransform, spiralEffect, stack, stackGroup, stackMosaic, stackMosaicTotal, stackOffsetSilhouette, stackTotal, themeExist, themes, token, transformColorSchemeToStandardStruct, transformToGraphic, userAnimationConfig, valueInScaleRange, version, vglobal, warn };
package/build/index.js CHANGED
@@ -9499,7 +9499,8 @@
9499
9499
  y1: 0,
9500
9500
  strokeBoundsBuffer: 0,
9501
9501
  cornerRadius: 0,
9502
- cornerType: "round"
9502
+ cornerType: "round",
9503
+ drawStrokeWhenZeroWH: !1
9503
9504
  });
9504
9505
  Object.assign(Object.assign({}, DefaultAttribute), {
9505
9506
  width: 0,
@@ -9508,7 +9509,8 @@
9508
9509
  y1: 0,
9509
9510
  cornerRadius: 0,
9510
9511
  length: 0,
9511
- cornerType: "round"
9512
+ cornerType: "round",
9513
+ drawStrokeWhenZeroWH: !1
9512
9514
  });
9513
9515
  const DefaultSymbolAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
9514
9516
  symbolType: "circle",
@@ -14181,7 +14183,7 @@
14181
14183
  });
14182
14184
  }
14183
14185
  setAttributes(params, forceUpdateTag = !1, context) {
14184
- (params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._setAttributes(params, forceUpdateTag, context);
14186
+ params && ((params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._setAttributes(params, forceUpdateTag, context));
14185
14187
  }
14186
14188
  _setAttributes(params, forceUpdateTag = !1, context) {
14187
14189
  const keys = Object.keys(params);
@@ -15006,8 +15008,8 @@
15006
15008
  function strokeVisible(opacity, strokeOpacity) {
15007
15009
  return opacity * strokeOpacity > 0;
15008
15010
  }
15009
- function rectStrokeVisible(opacity, strokeOpacity, width, height) {
15010
- return opacity * strokeOpacity > 0 && 0 !== width && 0 !== height;
15011
+ function rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH) {
15012
+ return drawStrokeWhenZeroWH ? opacity * strokeOpacity > 0 : opacity * strokeOpacity > 0 && 0 !== width && 0 !== height;
15011
15013
  }
15012
15014
  function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
15013
15015
  const x10 = x1 - x0,
@@ -16377,14 +16379,10 @@
16377
16379
  attrs && (Object.assign(stateAttrs, attrs.attributes), (null === (_a = attrs.subAttributes) || void 0 === _a ? void 0 : _a.length) && subAttrs.forEach((subAttrs, index) => {
16378
16380
  Object.assign(subAttrs, attrs.subAttributes[index]);
16379
16381
  }));
16380
- }), this.subGraphic.forEach((graphic, index) => {
16381
- graphic.updateNormalAttrs(subAttrs[index]), graphic.applyStateAttrs(subAttrs[index], states, hasAnimation);
16382
16382
  }), this.updateNormalAttrs(stateAttrs), this.currentStates = states, this.applyStateAttrs(stateAttrs, states, hasAnimation);
16383
16383
  }
16384
16384
  clearStates(hasAnimation) {
16385
- this.stopStateAnimates(), this.hasState() && this.normalAttrs ? (this.currentStates = [], this.subGraphic.forEach(graphic => {
16386
- graphic.applyStateAttrs(graphic.normalAttrs, this.currentStates, hasAnimation, !0), graphic.normalAttrs = null;
16387
- }), this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
16385
+ this.stopStateAnimates(), this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
16388
16386
  }
16389
16387
  clone() {
16390
16388
  const glyph = new Glyph(Object.assign({}, this.attribute));
@@ -19643,7 +19641,8 @@
19643
19641
  y1: y1,
19644
19642
  x: originX = rectAttribute.x,
19645
19643
  y: originY = rectAttribute.y,
19646
- fillStrokeOrder = rectAttribute.fillStrokeOrder
19644
+ fillStrokeOrder = rectAttribute.fillStrokeOrder,
19645
+ drawStrokeWhenZeroWH = rectAttribute.drawStrokeWhenZeroWH
19647
19646
  } = rect.attribute;
19648
19647
  let {
19649
19648
  width: width,
@@ -19651,7 +19650,7 @@
19651
19650
  } = rect.attribute;
19652
19651
  width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0;
19653
19652
  const fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
19654
- sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
19653
+ sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH),
19655
19654
  doFill = runFill(fill, background),
19656
19655
  doStroke = runStroke(stroke, lineWidth);
19657
19656
  if (!rect.valid || !visible) return;
@@ -21709,13 +21708,13 @@
21709
21708
  this._skipRender > 1 && this.renderNextFrame(), this._skipRender = 0;
21710
21709
  } else this._skipRender = 1;
21711
21710
  }, this.beforeRender = stage => {
21712
- this._beforeRender && this._beforeRender(stage);
21711
+ this._beforeRenderList.forEach(cb => cb(stage));
21713
21712
  }, this.afterClearScreen = drawParams => {
21714
21713
  this._afterClearScreen && this._afterClearScreen(drawParams);
21715
21714
  }, this.afterClearRect = drawParams => {
21716
21715
  this._afterClearRect && this._afterClearRect(drawParams);
21717
21716
  }, this.afterRender = stage => {
21718
- this.renderCount++, this._afterRender && this._afterRender(stage), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
21717
+ this.renderCount++, this._afterRenderList.forEach(cb => cb(stage)), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
21719
21718
  }, this.afterTickCb = () => {
21720
21719
  this.tickedBeforeRender = !0, "rendering" !== this.state && this.renderNextFrame();
21721
21720
  }, this.params = params, this.theme = new Theme(), this.hooks = {
@@ -21723,7 +21722,7 @@
21723
21722
  afterRender: new SyncHook(["stage"]),
21724
21723
  afterClearScreen: new SyncHook(["stage"]),
21725
21724
  afterClearRect: new SyncHook(["stage"])
21726
- }, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.graphicService = container.get(GraphicService), this.pluginService.active(this, params), this.window.create({
21725
+ }, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.graphicService = container.get(GraphicService), this.pluginService.active(this, params), this._beforeRenderList = [], this._afterRenderList = [], this.window.create({
21727
21726
  width: params.width,
21728
21727
  height: params.height,
21729
21728
  viewBox: params.viewBox,
@@ -21734,7 +21733,7 @@
21734
21733
  canvas: params.canvas
21735
21734
  }), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
21736
21735
  main: !0
21737
- })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this.hooks.afterClearScreen.tap("constructor", this.afterClearScreen), this.hooks.afterClearRect.tap("constructor", this.afterClearRect), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this._afterClearScreen = params.afterClearScreen, this._afterClearRect = params.afterClearRect, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
21736
+ })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), params.beforeRender && this._beforeRenderList.push(params.beforeRender), params.afterRender && this._afterRenderList.push(params.afterRender), this.hooks.afterClearScreen.tap("constructor", this.afterClearScreen), this.hooks.afterClearRect.tap("constructor", this.afterClearRect), this._afterClearScreen = params.afterClearScreen, this._afterClearRect = params.afterClearRect, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
21738
21737
  tickRenderMode: "effect"
21739
21738
  }), this.optmize(params.optimize), params.background && isString$1(this._background) && this._background.includes("/") && this.setAttributes({
21740
21739
  background: this._background
@@ -21849,10 +21848,16 @@
21849
21848
  options.enableView3dTransform && this.enableView3dTransform();
21850
21849
  }
21851
21850
  setBeforeRender(cb) {
21852
- this._beforeRender = cb;
21851
+ this._beforeRenderList.push(cb);
21852
+ }
21853
+ removeBeforeRender(cb) {
21854
+ this._beforeRenderList = this._beforeRenderList.filter(c => c !== cb);
21853
21855
  }
21854
21856
  setAfterRender(cb) {
21855
- this._afterRender = cb;
21857
+ this._afterRenderList.push(cb);
21858
+ }
21859
+ removeAfterRender(cb) {
21860
+ this._afterRenderList = this._afterRenderList.filter(c => c !== cb);
21856
21861
  }
21857
21862
  afterNextRender(cb) {
21858
21863
  this._afterNextRenderCbs || (this._afterNextRenderCbs = []), this._afterNextRenderCbs.push(cb);
@@ -31719,6 +31724,7 @@
31719
31724
  return this.getEndProps();
31720
31725
  }
31721
31726
  stop() {}
31727
+ release() {}
31722
31728
  }
31723
31729
  class WaitStep extends Step {
31724
31730
  constructor(type, props, duration, easing) {
@@ -31936,7 +31942,9 @@
31936
31942
  this.status !== AnimateStatus.END && this.onEnd(), this.status = AnimateStatus.END, this.target && ("start" === type ? this.target.setAttributes(this._startProps) : "end" === type ? this.target.setAttributes(this._endProps) : type && this.target.setAttributes(type));
31937
31943
  }
31938
31944
  release() {
31939
- this.status = AnimateStatus.END, this._onRemove && this._onRemove.forEach(cb => cb()), this._onStart = [], this._onFrame = [], this._onEnd = [], this._onRemove = [];
31945
+ this.status = AnimateStatus.END, this._onRemove && this._onRemove.forEach(cb => cb()), this._onStart = [], this._onFrame = [], this._onEnd = [], this._onRemove = [], this.forEachStep(step => {
31946
+ step.release();
31947
+ });
31940
31948
  }
31941
31949
  getDuration() {
31942
31950
  return this._duration;
@@ -32010,6 +32018,10 @@
32010
32018
  getLoop() {
32011
32019
  return this._loopCount;
32012
32020
  }
32021
+ forEachStep(cb) {
32022
+ let step = this._firstStep;
32023
+ for (; step;) cb(step), step = step.next;
32024
+ }
32013
32025
  }
32014
32026
 
32015
32027
  const performanceRAF = new PerformanceRAF();
@@ -32289,6 +32301,9 @@
32289
32301
  constructor(target) {
32290
32302
  this._animates = [], this._startCallbacks = [], this._endCallbacks = [], this._started = !1, this._activeCount = 0, this._target = target;
32291
32303
  }
32304
+ get started() {
32305
+ return this._started;
32306
+ }
32292
32307
  onStart(cb) {
32293
32308
  cb ? (this._startCallbacks.push(cb), this._started && this._activeCount > 0 && cb()) : this._startCallbacks.forEach(cb => {
32294
32309
  cb();
@@ -32429,14 +32444,14 @@
32429
32444
  return delayAfterValue > 0 && (totalDelay += delayAfterValue), totalDelay > 0 && animate.wait(totalDelay), loop && loop > 0 && animate.loop(loop), bounce && animate.bounce(!0), animate;
32430
32445
  }
32431
32446
  _handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
32432
- var _a, _b, _c, _d;
32447
+ var _a, _b, _c, _d, _e, _f;
32433
32448
  if (custom && customType) {
32434
32449
  const customParams = Object.assign({
32435
- width: graphic.stage.width,
32436
- height: graphic.stage.height,
32450
+ width: (null === (_a = graphic.stage) || void 0 === _a ? void 0 : _a.width) || 0,
32451
+ height: (null === (_b = graphic.stage) || void 0 === _b ? void 0 : _b.height) || 0,
32437
32452
  group: this._target.parent
32438
32453
  }, this.resolveValue(customParameters, graphic)),
32439
- objOptions = isFunction$1(options) ? options.call(null, null !== (_b = customParams && (null === (_a = customParams.data) || void 0 === _a ? void 0 : _a[0])) && void 0 !== _b ? _b : null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, customParams) : options;
32454
+ objOptions = isFunction$1(options) ? options.call(null, null !== (_d = customParams && (null === (_c = customParams.data) || void 0 === _c ? void 0 : _c[0])) && void 0 !== _d ? _d : null === (_f = null === (_e = graphic.context) || void 0 === _e ? void 0 : _e.data) || void 0 === _f ? void 0 : _f[0], graphic, customParams) : options;
32440
32455
  customParams.options = objOptions, customParams.controlOptions = controlOptions, 1 === customType ? this.createCustomAnimation(animate, custom, from, props, duration, easing, customParams) : 2 === customType && this.createCustomInterpolatorAnimation(animate, custom, props, duration, easing, customParams);
32441
32456
  } else "to" === type ? animate.to(props, duration, easing) : "from" === type && animate.from(props, duration, easing);
32442
32457
  }
@@ -32656,7 +32671,7 @@
32656
32671
  reApplyState(state) {
32657
32672
  var _a;
32658
32673
  const stateInfo = null === (_a = this.stateList) || void 0 === _a ? void 0 : _a.find(stateInfo => stateInfo.state === state);
32659
- if (stateInfo) {
32674
+ if (stateInfo && stateInfo.executor.started) {
32660
32675
  const stateList = this.stateList.slice();
32661
32676
  stateInfo.executor.stop(), this.stateList = stateList, stateInfo.executor.execute(stateInfo.animationConfig);
32662
32677
  }
@@ -33700,7 +33715,7 @@
33700
33715
  }
33701
33716
  class GrowAngleIn extends GrowAngleBase {
33702
33717
  onBind() {
33703
- var _a, _b;
33718
+ var _a, _b, _c;
33704
33719
  super.onBind();
33705
33720
  const {
33706
33721
  from: from,
@@ -33709,7 +33724,7 @@
33709
33724
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
33710
33725
  this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
33711
33726
  const finalAttribute = this.target.getFinalAttribute();
33712
- finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs), this.determineUpdateFunction();
33727
+ finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs), this.determineUpdateFunction();
33713
33728
  }
33714
33729
  }
33715
33730
  class GrowAngleOut extends GrowAngleBase {
@@ -34317,7 +34332,7 @@
34317
34332
  }
34318
34333
  class GrowRadiusIn extends GrowPointsBase {
34319
34334
  onBind() {
34320
- var _a, _b;
34335
+ var _a, _b, _c;
34321
34336
  super.onBind();
34322
34337
  const {
34323
34338
  from: from,
@@ -34326,7 +34341,7 @@
34326
34341
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
34327
34342
  this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
34328
34343
  const finalAttribute = this.target.getFinalAttribute();
34329
- finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
34344
+ finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
34330
34345
  }
34331
34346
  }
34332
34347
  class GrowRadiusOut extends GrowPointsBase {
@@ -34441,7 +34456,7 @@
34441
34456
  super(from, to, duration, easing, params);
34442
34457
  }
34443
34458
  onBind() {
34444
- var _a, _b;
34459
+ var _a, _b, _c;
34445
34460
  super.onBind();
34446
34461
  const {
34447
34462
  from: from,
@@ -34450,7 +34465,7 @@
34450
34465
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
34451
34466
  this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
34452
34467
  const finalAttribute = this.target.getFinalAttribute();
34453
- finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
34468
+ finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
34454
34469
  }
34455
34470
  onEnd(cb) {
34456
34471
  super.onEnd(cb);
@@ -56932,7 +56947,7 @@
56932
56947
  });
56933
56948
  };
56934
56949
 
56935
- const version = "2.0.4-alpha.0";
56950
+ const version = "2.0.4-alpha.1";
56936
56951
 
56937
56952
  const addVChartProperty = (data, op) => {
56938
56953
  const context = op.beforeCall();
@@ -88180,8 +88195,6 @@
88180
88195
  var _a, _b;
88181
88196
  const series = super._getDefaultSeriesSpec(spec);
88182
88197
  series.area = spec.area;
88183
- series.point = spec.point;
88184
- series.line = spec.line;
88185
88198
  if (spec.direction === "horizontal") {
88186
88199
  series.xField = (_a = spec.xField) !== null && _a !== void 0 ? _a : [spec.minField, spec.maxField];
88187
88200
  }
@@ -100331,6 +100344,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
100331
100344
  exports.GeoCoordinate = GeoCoordinate;
100332
100345
  exports.GeoMarkPoint = GeoMarkPoint;
100333
100346
  exports.GeoSeries = GeoSeries;
100347
+ exports.GlyphMark = GlyphMark;
100334
100348
  exports.GridLayout = GridLayout;
100335
100349
  exports.GroupMark = GroupMark;
100336
100350
  exports.HeatmapChart = HeatmapChart;
@@ -100451,6 +100465,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
100451
100465
  exports.createLine = createLine;
100452
100466
  exports.createRect = createRect;
100453
100467
  exports.createRichText = createRichText;
100468
+ exports.createScale = createScale;
100469
+ exports.createScaleWithSpec = createScaleWithSpec;
100454
100470
  exports.createSymbol = createSymbol;
100455
100471
  exports.createText = createText;
100456
100472
  exports.darkTheme = darkTheme;
@@ -100473,6 +100489,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
100473
100489
  exports.getDimensionInfoByValue = getDimensionInfoByValue;
100474
100490
  exports.getFieldAlias = getFieldAlias;
100475
100491
  exports.getFunnelTheme = getFunnelTheme;
100492
+ exports.getGroupAnimationParams = getGroupAnimationParams;
100476
100493
  exports.getMergedTheme = getMergedTheme;
100477
100494
  exports.getPolarDimensionInfo = getPolarDimensionInfo;
100478
100495
  exports.getRegionStackGroup = getRegionStackGroup;
@@ -100483,9 +100500,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
100483
100500
  exports.isColorKey = isColorKey;
100484
100501
  exports.isPercent = isPercent;
100485
100502
  exports.isPercentOffset = isPercentOffset;
100503
+ exports.isPolarAxisSeries = isPolarAxisSeries;
100486
100504
  exports.isProgressiveDataColorScheme = isProgressiveDataColorScheme;
100505
+ exports.isSpecValueWithScale = isSpecValueWithScale;
100487
100506
  exports.isTokenKey = isTokenKey;
100488
100507
  exports.isValidOrient = isValidOrient;
100508
+ exports.isValueInScaleDomain = isValueInScaleDomain;
100489
100509
  exports.isXAxis = isXAxis;
100490
100510
  exports.isYAxis = isYAxis;
100491
100511
  exports.isZAxis = isZAxis;
@@ -100562,6 +100582,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
100562
100582
  exports.registerGeoCoordinate = registerGeoCoordinate;
100563
100583
  exports.registerGeoMarkPoint = registerGeoMarkPoint;
100564
100584
  exports.registerGesturePlugin = registerGesturePlugin;
100585
+ exports.registerGlyphMark = registerGlyphMark;
100565
100586
  exports.registerGridLayout = registerGridLayout;
100566
100587
  exports.registerGroupMark = registerGroupMark;
100567
100588
  exports.registerGroupTooltipProcessor = registerGroupTooltipProcessor;
@@ -100623,6 +100644,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
100623
100644
  exports.registerRuleMark = registerRuleMark;
100624
100645
  exports.registerSankeyChart = registerSankeyChart;
100625
100646
  exports.registerSankeySeries = registerSankeySeries;
100647
+ exports.registerScaleInOutAnimation = registerScaleInOutAnimation;
100626
100648
  exports.registerScatterChart = registerScatterChart;
100627
100649
  exports.registerScatterSeries = registerScatterSeries;
100628
100650
  exports.registerScrollBar = registerScrollBar;
@@ -100657,8 +100679,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
100657
100679
  exports.rowCenterToEdge = rowCenterToEdge;
100658
100680
  exports.rowEdgeToCenter = rowEdgeToCenter;
100659
100681
  exports.rowTopToBottom = rowTopToBottom;
100682
+ exports.setDefaultCrosshairForCartesianChart = setDefaultCrosshairForCartesianChart;
100660
100683
  exports.shouldMarkDoMorph = shouldMarkDoMorph;
100661
100684
  exports.snakeWave = snakeWave;
100685
+ exports.sortDataInAxisHelper = sortDataInAxisHelper;
100662
100686
  exports.sortStackValueGroup = sortStackValueGroup;
100663
100687
  exports.specTransform = specTransform;
100664
100688
  exports.spiralEffect = spiralEffect;
@@ -100674,6 +100698,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
100674
100698
  exports.transformColorSchemeToStandardStruct = transformColorSchemeToStandardStruct;
100675
100699
  exports.transformToGraphic = transformToGraphic;
100676
100700
  exports.userAnimationConfig = userAnimationConfig;
100701
+ exports.valueInScaleRange = valueInScaleRange;
100677
100702
  exports.version = version;
100678
100703
  exports.vglobal = vglobal;
100679
100704
  exports.warn = warn;