@visactor/react-vchart 2.0.14-alpha.1 → 2.0.14
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 +152 -84
- package/build/index.min.js +3 -3
- package/cjs/charts/CommonChart.js +1 -1
- package/cjs/charts/CommonChart.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/esm/charts/CommonChart.js +2 -2
- package/esm/charts/CommonChart.js.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/package.json +6 -6
package/build/index.js
CHANGED
|
@@ -25145,7 +25145,7 @@
|
|
|
25145
25145
|
return !!this._inuse;
|
|
25146
25146
|
}
|
|
25147
25147
|
set inuse(use) {
|
|
25148
|
-
use !== !!this._inuse && (this._inuse = use, use ? (this.nativeContext.save(), this.reset()) : this.nativeContext.restore());
|
|
25148
|
+
use !== !!this._inuse && (this._inuse = use, use ? (this.nativeContext.save(), this.reset()) : (this.nativeContext.restore(), this._font = ""));
|
|
25149
25149
|
}
|
|
25150
25150
|
constructor(canvas, dpr) {
|
|
25151
25151
|
this.fillAttributes = Object.assign(Object.assign({}, DefaultFillStyle), {
|
|
@@ -27530,14 +27530,20 @@
|
|
|
27530
27530
|
x: x,
|
|
27531
27531
|
y: y
|
|
27532
27532
|
} = this.stage.eventPointTransform(e);
|
|
27533
|
-
let
|
|
27534
|
-
|
|
27533
|
+
let currentPos,
|
|
27534
|
+
currentScrollValue = 0,
|
|
27535
27535
|
delta = 0;
|
|
27536
27536
|
const {
|
|
27537
|
-
|
|
27538
|
-
|
|
27539
|
-
|
|
27540
|
-
|
|
27537
|
+
width: width,
|
|
27538
|
+
height: height
|
|
27539
|
+
} = this.getSliderRenderBounds(),
|
|
27540
|
+
track = "vertical" === direction ? height : width,
|
|
27541
|
+
travel = Math.max(track - this._sliderSize, 0),
|
|
27542
|
+
{
|
|
27543
|
+
range: range
|
|
27544
|
+
} = this.attribute,
|
|
27545
|
+
ratio = clamp$1(range[1] - range[0], 0, 1);
|
|
27546
|
+
return "vertical" === direction ? (currentPos = y, delta = currentPos - this._prePos) : (currentPos = x, delta = currentPos - this._prePos), currentScrollValue = travel > 0 && ratio < 1 ? delta / travel * (1 - ratio) : 0, [currentPos, currentScrollValue];
|
|
27541
27547
|
}, this._onSliderPointerMove = e => {
|
|
27542
27548
|
const {
|
|
27543
27549
|
stopSliderMovePropagation = !0
|
|
@@ -27681,15 +27687,24 @@
|
|
|
27681
27687
|
}
|
|
27682
27688
|
_getSliderPos(range) {
|
|
27683
27689
|
const {
|
|
27684
|
-
direction: direction
|
|
27690
|
+
direction: direction,
|
|
27691
|
+
minSliderSize = 0
|
|
27685
27692
|
} = this.attribute,
|
|
27686
27693
|
{
|
|
27687
27694
|
width: width,
|
|
27688
27695
|
height: height,
|
|
27689
27696
|
x1: x1,
|
|
27690
27697
|
y1: y1
|
|
27691
|
-
} = this.getSliderRenderBounds()
|
|
27692
|
-
|
|
27698
|
+
} = this.getSliderRenderBounds(),
|
|
27699
|
+
track = "horizontal" === direction ? width : height,
|
|
27700
|
+
origin = "horizontal" === direction ? x1 : y1,
|
|
27701
|
+
start = clamp$1(range[0], 0, 1),
|
|
27702
|
+
end = clamp$1(range[1], 0, 1),
|
|
27703
|
+
ratio = clamp$1(end - start, 0, 1),
|
|
27704
|
+
L = Math.max(ratio * track, minSliderSize),
|
|
27705
|
+
T = Math.max(track - L, 0),
|
|
27706
|
+
pStart = origin + start / Math.max(1 - ratio, 1e-12) * T;
|
|
27707
|
+
return [pStart, pStart + L];
|
|
27693
27708
|
}
|
|
27694
27709
|
_getScrollRange() {
|
|
27695
27710
|
if (this._sliderLimitRange) return this._sliderLimitRange;
|
|
@@ -27729,6 +27744,7 @@
|
|
|
27729
27744
|
direction: "horizontal",
|
|
27730
27745
|
round: !0,
|
|
27731
27746
|
sliderSize: 20,
|
|
27747
|
+
minSliderSize: 0,
|
|
27732
27748
|
sliderStyle: {
|
|
27733
27749
|
fill: "rgba(0, 0, 0, .5)"
|
|
27734
27750
|
},
|
|
@@ -31688,7 +31704,7 @@
|
|
|
31688
31704
|
}
|
|
31689
31705
|
class AStageAnimate extends ACustomAnimate {
|
|
31690
31706
|
constructor(customFrom, customTo, duration, easing, params) {
|
|
31691
|
-
super(customFrom, customTo, duration, easing, params), this.willCallBeforeStageRender = !0, this.willCallAfterStageRender = !0, this._beforeStageRender = () => {
|
|
31707
|
+
super(customFrom, customTo, duration, easing, params), this.willCallBeforeStageRender = !0, this.willCallAfterStageRender = !0, this.checkStatusAfterRender = !0, this._beforeStageRender = () => {
|
|
31692
31708
|
if (!this.willCallBeforeStageRender) return;
|
|
31693
31709
|
this.willCallBeforeStageRender = !1;
|
|
31694
31710
|
const stage = this.target.stage,
|
|
@@ -31701,7 +31717,7 @@
|
|
|
31701
31717
|
const stage = this.target.stage,
|
|
31702
31718
|
canvas = stage.window.getContext().canvas.nativeCanvas,
|
|
31703
31719
|
outputCanvas = this.afterStageRender(stage, canvas);
|
|
31704
|
-
outputCanvas && this.renderToStage(stage, outputCanvas);
|
|
31720
|
+
outputCanvas && this.renderToStage(stage, outputCanvas), this.checkStatusAfterRender && this.animate.status === AnimateStatus.END && this.animate.timeline.removeAnimate(this.animate);
|
|
31705
31721
|
}, this.props = {};
|
|
31706
31722
|
}
|
|
31707
31723
|
beforeStageRender(stage, canvas) {
|
|
@@ -44442,6 +44458,8 @@
|
|
|
44442
44458
|
let Brush$2 = class Brush extends AbstractComponent {
|
|
44443
44459
|
constructor(attributes, options) {
|
|
44444
44460
|
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, Brush.defaultAttributes, attributes)), this.name = "brush", this._activeBrushState = !1, this._activeDrawState = !1, this._cacheDrawPoints = [], this._activeMoveState = !1, this._operatingMaskMoveDx = 0, this._operatingMaskMoveDy = 0, this._operatingMaskMoveRangeX = [-1 / 0, 1 / 0], this._operatingMaskMoveRangeY = [-1 / 0, 1 / 0], this._brushMaskAABBBoundsDict = {}, this._firstUpdate = !0, this._onBrushStart = e => {
|
|
44461
|
+
if (!1 === this.attribute.interactive) return;
|
|
44462
|
+
if (!1 === this._beforeBrushEvent(e)) return;
|
|
44445
44463
|
const {
|
|
44446
44464
|
updateTrigger = DEFAULT_BRUSH_ATTRIBUTES.updateTrigger,
|
|
44447
44465
|
endTrigger = DEFAULT_BRUSH_ATTRIBUTES.endTrigger,
|
|
@@ -44449,11 +44467,11 @@
|
|
|
44449
44467
|
} = this.attribute;
|
|
44450
44468
|
array(updateTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushingWithDelay)), array(endTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushEnd)), e.stopPropagation(), this._firstUpdate = !0, this._activeMoveState = brushMoved && this._isPosInBrushMask(e), this._activeDrawState = !this._activeMoveState, this._startPos = this.eventPosToStagePos(e), this._cacheDrawPoints = [this._startPos];
|
|
44451
44469
|
}, this._onBrushing = e => {
|
|
44452
|
-
this._outOfInteractiveRange(e) || (e.stopPropagation(), this._firstUpdate ? (this._activeDrawState && this._initDraw(e), this._activeMoveState && this._initMove(e), this._firstUpdate = !1) : (this._activeDrawState && this._drawing(e), this._activeMoveState && this._moving(e)));
|
|
44470
|
+
!1 !== this.attribute.interactive && !1 !== this._beforeBrushEvent(e) && (this._outOfInteractiveRange(e) || (e.stopPropagation(), this._firstUpdate ? (this._activeDrawState && this._initDraw(e), this._activeMoveState && this._initMove(e), this._firstUpdate = !1) : (this._activeDrawState && this._drawing(e), this._activeMoveState && this._moving(e))));
|
|
44453
44471
|
}, this._onBrushingWithDelay = 0 === this.attribute.delayTime ? this._onBrushing : delayMap$1[this.attribute.delayType](this._onBrushing, this.attribute.delayTime), this._onBrushEnd = e => {
|
|
44454
|
-
this._releaseBrushUpdateEvents(), e.preventDefault(), this._activeDrawState && this._drawEnd(e), this._activeMoveState && this._moveEnd(e), this._activeDrawState = !1, this._activeMoveState = !1;
|
|
44472
|
+
!1 !== this.attribute.interactive && (this._releaseBrushUpdateEvents(), e.preventDefault(), this._activeDrawState && this._drawEnd(e), this._activeMoveState && this._moveEnd(e), this._activeDrawState = !1, this._activeMoveState = !1);
|
|
44455
44473
|
}, this._onBrushClear = e => {
|
|
44456
|
-
e.preventDefault(), this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(IOperateType.brushClear, e)), this._activeDrawState = !1, this._activeMoveState = !1;
|
|
44474
|
+
!1 !== this.attribute.interactive && !1 !== this._beforeBrushEvent(e) && (e.preventDefault(), this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(IOperateType.brushClear, e)), this._activeDrawState = !1, this._activeMoveState = !1);
|
|
44457
44475
|
};
|
|
44458
44476
|
}
|
|
44459
44477
|
_bindBrushEvents() {
|
|
@@ -44465,6 +44483,7 @@
|
|
|
44465
44483
|
array(trigger).forEach(t => this.stage.addEventListener(t, this._onBrushStart)), array(resetTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushClear));
|
|
44466
44484
|
}
|
|
44467
44485
|
_initDraw(e) {
|
|
44486
|
+
if (!1 === this.attribute.interactive) return;
|
|
44468
44487
|
const {
|
|
44469
44488
|
brushMode: brushMode
|
|
44470
44489
|
} = this.attribute,
|
|
@@ -44473,6 +44492,7 @@
|
|
|
44473
44492
|
}
|
|
44474
44493
|
_initMove(e) {
|
|
44475
44494
|
var _a, _b;
|
|
44495
|
+
if (!1 === this.attribute.interactive) return;
|
|
44476
44496
|
this._cacheMovePoint = this.eventPosToStagePos(e), this._operatingMaskMoveDx = null !== (_a = this._operatingMask.attribute.dx) && void 0 !== _a ? _a : 0, this._operatingMaskMoveDy = null !== (_b = this._operatingMask.attribute.dy) && void 0 !== _b ? _b : 0;
|
|
44477
44497
|
const {
|
|
44478
44498
|
interactiveRange: interactiveRange
|
|
@@ -44497,6 +44517,7 @@
|
|
|
44497
44517
|
}
|
|
44498
44518
|
_drawing(e) {
|
|
44499
44519
|
var _a;
|
|
44520
|
+
if (!1 === this.attribute.interactive) return;
|
|
44500
44521
|
const pos = this.eventPosToStagePos(e),
|
|
44501
44522
|
{
|
|
44502
44523
|
brushType: brushType,
|
|
@@ -44521,6 +44542,7 @@
|
|
|
44521
44542
|
(Math.abs(x2 - x1) > sizeThreshold || Math.abs(y1 - y2) > sizeThreshold) && (1 !== Object.keys(this._brushMaskAABBBoundsDict).length || this._activeBrushState ? this._dispatchBrushEvent(IOperateType.drawing, e) : (this._activeBrushState = !0, this._dispatchBrushEvent(IOperateType.brushActive, e)));
|
|
44522
44543
|
}
|
|
44523
44544
|
_moving(e) {
|
|
44545
|
+
if (!1 === this.attribute.interactive) return;
|
|
44524
44546
|
const startPos = this._cacheMovePoint,
|
|
44525
44547
|
pos = this.eventPosToStagePos(e);
|
|
44526
44548
|
if (pos.x === (null == startPos ? void 0 : startPos.x) && pos.y === (null == startPos ? void 0 : startPos.y)) return;
|
|
@@ -44534,6 +44556,7 @@
|
|
|
44534
44556
|
}), this._brushMaskAABBBoundsDict[this._operatingMask.name] = this._operatingMask.AABBBounds, this._dispatchBrushEvent(IOperateType.moving, e);
|
|
44535
44557
|
}
|
|
44536
44558
|
_drawEnd(e) {
|
|
44559
|
+
if (!1 === this.attribute.interactive) return;
|
|
44537
44560
|
const {
|
|
44538
44561
|
removeOnClick = !0,
|
|
44539
44562
|
sizeThreshold = DEFAULT_SIZE_THRESHOLD
|
|
@@ -44551,7 +44574,7 @@
|
|
|
44551
44574
|
}
|
|
44552
44575
|
}
|
|
44553
44576
|
_moveEnd(e) {
|
|
44554
|
-
this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(IOperateType.moveEnd, e);
|
|
44577
|
+
!1 !== this.attribute.interactive && (this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(IOperateType.moveEnd, e));
|
|
44555
44578
|
}
|
|
44556
44579
|
render() {
|
|
44557
44580
|
this._bindBrushEvents();
|
|
@@ -44658,6 +44681,10 @@
|
|
|
44658
44681
|
pos = this.eventPosToStagePos(e);
|
|
44659
44682
|
return pos.x > maxX || pos.x < minX || pos.y > maxY || pos.y < minY;
|
|
44660
44683
|
}
|
|
44684
|
+
_beforeBrushEvent(e) {
|
|
44685
|
+
var _a, _b;
|
|
44686
|
+
return null === (_b = (_a = this.attribute).beforeBrushChange) || void 0 === _b ? void 0 : _b.call(_a, e);
|
|
44687
|
+
}
|
|
44661
44688
|
_dispatchBrushEvent(operateType, e) {
|
|
44662
44689
|
this._dispatchEvent(operateType, {
|
|
44663
44690
|
operateMask: this._operatingMask,
|
|
@@ -46463,7 +46490,7 @@
|
|
|
46463
46490
|
ComposedEventCtor = Factory.getComposedEvent(eType);
|
|
46464
46491
|
if (ComposedEventCtor) {
|
|
46465
46492
|
const composedEvent = new ComposedEventCtor(this._eventDispatcher, this._mode);
|
|
46466
|
-
composedEvent.register(eType, handler), this._composedEventMap.set(callback, {
|
|
46493
|
+
composedEvent.register(eType, handler), this._composedEventMap.set(handler.callback, {
|
|
46467
46494
|
eventType: eType,
|
|
46468
46495
|
event: composedEvent
|
|
46469
46496
|
});
|
|
@@ -47068,6 +47095,9 @@
|
|
|
47068
47095
|
getRootGroup() {
|
|
47069
47096
|
return this._rootGroup;
|
|
47070
47097
|
}
|
|
47098
|
+
getOption() {
|
|
47099
|
+
return this._option;
|
|
47100
|
+
}
|
|
47071
47101
|
constructor(container, option) {
|
|
47072
47102
|
this._count = 0, this._rootMarks = [], this._viewListeners = new Map(), this._windowListeners = new Map(), this._canvasListeners = new Map(), this.isInited = !1, this._released = !1, this._compileChart = null, this.handleLayoutEnd = () => {
|
|
47073
47103
|
var _a, _b;
|
|
@@ -50686,8 +50716,8 @@
|
|
|
50686
50716
|
}) : "none" !== evt.type && this.options.event.off(evt.type, evt.handler));
|
|
50687
50717
|
});
|
|
50688
50718
|
}
|
|
50689
|
-
start(g) {}
|
|
50690
|
-
reset(g) {}
|
|
50719
|
+
start(g, e) {}
|
|
50720
|
+
reset(g, e) {}
|
|
50691
50721
|
dispatchEvent(type, params) {
|
|
50692
50722
|
this.options.event && (this.options.event.emit(`${this.type}:${type}`, params), "start" === type && this.options.onStart ? this.options.onStart(params) : "reset" === type && this.options.onReset ? this.options.onReset(params) : "update" === type && this.options.onUpdate ? this.options.onUpdate(params) : "end" === type && this.options.onEnd && this.options.onEnd(params));
|
|
50693
50723
|
}
|
|
@@ -50701,18 +50731,18 @@
|
|
|
50701
50731
|
};
|
|
50702
50732
|
class ElementHighlight extends BaseTrigger {
|
|
50703
50733
|
constructor(options) {
|
|
50704
|
-
super(options), this.type = "element-highlight", this.resetAll =
|
|
50734
|
+
super(options), this.type = "element-highlight", this.resetAll = e => {
|
|
50705
50735
|
const {
|
|
50706
50736
|
highlightState: highlightState,
|
|
50707
50737
|
blurState: blurState,
|
|
50708
50738
|
interaction: interaction
|
|
50709
50739
|
} = this.options;
|
|
50710
|
-
this._lastGraphic && (interaction.clearAllStatesOfTrigger(this, highlightState, blurState), this.dispatchEvent("reset", {
|
|
50740
|
+
this._lastGraphic && (interaction.clearAllStatesOfTrigger(this, highlightState, blurState), this.dispatchEvent("reset", Object.assign({
|
|
50711
50741
|
graphics: [this._lastGraphic],
|
|
50712
50742
|
options: this.options
|
|
50713
|
-
}), this._lastGraphic = null, interaction.setStatedGraphics(this, []));
|
|
50743
|
+
}, e)), this._lastGraphic = null, interaction.setStatedGraphics(this, []));
|
|
50714
50744
|
}, this.handleStart = e => {
|
|
50715
|
-
this.start(e.item);
|
|
50745
|
+
this.start(e.item, e);
|
|
50716
50746
|
}, this.handleReset = e => {
|
|
50717
50747
|
const {
|
|
50718
50748
|
interaction: interaction
|
|
@@ -50721,7 +50751,7 @@
|
|
|
50721
50751
|
if (!statedGraphics || !statedGraphics.length) return;
|
|
50722
50752
|
const markGraphic = e.item,
|
|
50723
50753
|
hasActiveElement = markGraphic && this._markSet.getMarkInId(markGraphic.context.markId);
|
|
50724
|
-
(this._resetType.includes("view") && !hasActiveElement || this._resetType.includes("self") && hasActiveElement) && this.resetAll();
|
|
50754
|
+
(this._resetType.includes("view") && !hasActiveElement || this._resetType.includes("self") && hasActiveElement) && this.resetAll(e);
|
|
50725
50755
|
}, this.options = Object.assign({}, defaultOptions$6, options), this.updateMarkIdByState([this.options.highlightState, this.options.blurState]);
|
|
50726
50756
|
}
|
|
50727
50757
|
getStartState() {
|
|
@@ -50742,7 +50772,7 @@
|
|
|
50742
50772
|
handler: this.handleReset
|
|
50743
50773
|
}), events;
|
|
50744
50774
|
}
|
|
50745
|
-
start(markGraphic) {
|
|
50775
|
+
start(markGraphic, e) {
|
|
50746
50776
|
if (markGraphic && this._markSet.getMarkInId(markGraphic.context.markId)) {
|
|
50747
50777
|
const {
|
|
50748
50778
|
highlightState: highlightState,
|
|
@@ -50751,14 +50781,14 @@
|
|
|
50751
50781
|
} = this.options;
|
|
50752
50782
|
if (this._lastGraphic === markGraphic) return;
|
|
50753
50783
|
const newStatedGraphics = interaction.updateStates(this, [markGraphic], interaction.getStatedGraphics(this), highlightState, blurState);
|
|
50754
|
-
interaction.setStatedGraphics(this, newStatedGraphics), this._lastGraphic = markGraphic, this.dispatchEvent("start", {
|
|
50784
|
+
interaction.setStatedGraphics(this, newStatedGraphics), this._lastGraphic = markGraphic, this.dispatchEvent("start", Object.assign({
|
|
50755
50785
|
graphics: newStatedGraphics,
|
|
50756
50786
|
options: this.options
|
|
50757
|
-
});
|
|
50758
|
-
} else this._lastGraphic && "view" === this._resetType && this.resetAll();
|
|
50787
|
+
}, e));
|
|
50788
|
+
} else this._lastGraphic && "view" === this._resetType && this.resetAll(e);
|
|
50759
50789
|
}
|
|
50760
|
-
reset(markGraphic) {
|
|
50761
|
-
markGraphic ? this._markSet.getMarkInId(markGraphic.context.markId) && markGraphic.removeState([this.options.highlightState, this.options.blurState]) : this.resetAll();
|
|
50790
|
+
reset(markGraphic, e) {
|
|
50791
|
+
markGraphic ? this._markSet.getMarkInId(markGraphic.context.markId) && markGraphic.removeState([this.options.highlightState, this.options.blurState]) : this.resetAll(e);
|
|
50762
50792
|
}
|
|
50763
50793
|
}
|
|
50764
50794
|
ElementHighlight.type = "element-highlight", ElementHighlight.defaultOptions = defaultOptions$6;
|
|
@@ -50772,19 +50802,19 @@
|
|
|
50772
50802
|
};
|
|
50773
50803
|
class ElementSelect extends BaseTrigger {
|
|
50774
50804
|
constructor(options) {
|
|
50775
|
-
super(options), this.type = "element-select", this._resetType = [], this.resetAll =
|
|
50805
|
+
super(options), this.type = "element-select", this._resetType = [], this.resetAll = e => {
|
|
50776
50806
|
const {
|
|
50777
50807
|
state: state,
|
|
50778
50808
|
reverseState: reverseState,
|
|
50779
50809
|
interaction: interaction
|
|
50780
50810
|
} = this.options,
|
|
50781
50811
|
statedGraphics = interaction.getStatedGraphics(this);
|
|
50782
|
-
statedGraphics && statedGraphics.length && (interaction.clearAllStatesOfTrigger(this, state, reverseState), this.dispatchEvent("reset", {
|
|
50812
|
+
statedGraphics && statedGraphics.length && (interaction.clearAllStatesOfTrigger(this, state, reverseState), this.dispatchEvent("reset", Object.assign({
|
|
50783
50813
|
graphics: statedGraphics,
|
|
50784
50814
|
options: this.options
|
|
50785
|
-
}), interaction.setStatedGraphics(this, []));
|
|
50815
|
+
}, e)), interaction.setStatedGraphics(this, []));
|
|
50786
50816
|
}, this.handleStart = e => {
|
|
50787
|
-
this.start(e.item);
|
|
50817
|
+
this.start(e.item, e);
|
|
50788
50818
|
}, this.handleReset = e => {
|
|
50789
50819
|
const {
|
|
50790
50820
|
interaction: interaction
|
|
@@ -50793,7 +50823,7 @@
|
|
|
50793
50823
|
if (!statedGraphics || !statedGraphics.length) return;
|
|
50794
50824
|
const markGraphic = e.item,
|
|
50795
50825
|
hasActiveElement = markGraphic && this._markSet.getMarkInId(markGraphic.context.markId);
|
|
50796
|
-
(this._resetType.includes("view") && !hasActiveElement || this._resetType.includes("self") && hasActiveElement) && this.resetAll();
|
|
50826
|
+
(this._resetType.includes("view") && !hasActiveElement || this._resetType.includes("self") && hasActiveElement) && this.resetAll(e);
|
|
50797
50827
|
}, this.options = Object.assign({}, defaultOptions$5, options), this.updateMarkIdByState([this.options.state, this.options.reverseState]);
|
|
50798
50828
|
}
|
|
50799
50829
|
getStartState() {
|
|
@@ -50820,7 +50850,7 @@
|
|
|
50820
50850
|
});
|
|
50821
50851
|
}), this._resetType = resetType, events;
|
|
50822
50852
|
}
|
|
50823
|
-
start(markGraphic) {
|
|
50853
|
+
start(markGraphic, e) {
|
|
50824
50854
|
const {
|
|
50825
50855
|
state: state,
|
|
50826
50856
|
reverseState: reverseState,
|
|
@@ -50832,22 +50862,22 @@
|
|
|
50832
50862
|
if (markGraphic.hasState(state)) {
|
|
50833
50863
|
if (this._resetType.includes("self")) {
|
|
50834
50864
|
const newStatedGraphics = statedGraphics && statedGraphics.filter(g => g !== markGraphic);
|
|
50835
|
-
newStatedGraphics && newStatedGraphics.length ? interaction.setStatedGraphics(this, interaction.updateStates(this, newStatedGraphics, statedGraphics, state, reverseState)) : this.resetAll();
|
|
50865
|
+
newStatedGraphics && newStatedGraphics.length ? interaction.setStatedGraphics(this, interaction.updateStates(this, newStatedGraphics, statedGraphics, state, reverseState)) : this.resetAll(e);
|
|
50836
50866
|
}
|
|
50837
50867
|
} else {
|
|
50838
50868
|
this._timer && clearTimeout(this._timer), markGraphic.addState(state, !0);
|
|
50839
50869
|
const newStatedGraphics = this.options.interaction.updateStates(this, isMultiple && statedGraphics ? [...statedGraphics, markGraphic] : [markGraphic], statedGraphics, state, reverseState);
|
|
50840
|
-
interaction.setStatedGraphics(this, newStatedGraphics), this.dispatchEvent("start", {
|
|
50870
|
+
interaction.setStatedGraphics(this, newStatedGraphics), this.dispatchEvent("start", Object.assign({
|
|
50841
50871
|
graphics: newStatedGraphics,
|
|
50842
50872
|
options: this.options
|
|
50843
|
-
}), this._resetType.includes("timeout") && (this._timer = setTimeout(() => {
|
|
50844
|
-
this.resetAll();
|
|
50873
|
+
}, e)), this._resetType.includes("timeout") && (this._timer = setTimeout(() => {
|
|
50874
|
+
this.resetAll(e);
|
|
50845
50875
|
}, this.options.triggerOff));
|
|
50846
50876
|
}
|
|
50847
|
-
} else this._resetType.includes("view") && statedGraphics && statedGraphics.length && this.resetAll();
|
|
50877
|
+
} else this._resetType.includes("view") && statedGraphics && statedGraphics.length && this.resetAll(e);
|
|
50848
50878
|
}
|
|
50849
|
-
reset(markGraphic) {
|
|
50850
|
-
markGraphic ? this._markSet.getMarkInId(markGraphic.context.markId) && markGraphic.removeState([this.options.state, this.options.reverseState]) : this.resetAll();
|
|
50879
|
+
reset(markGraphic, e) {
|
|
50880
|
+
markGraphic ? this._markSet.getMarkInId(markGraphic.context.markId) && markGraphic.removeState([this.options.state, this.options.reverseState]) : this.resetAll(e);
|
|
50851
50881
|
}
|
|
50852
50882
|
}
|
|
50853
50883
|
ElementSelect.type = "element-select", ElementSelect.defaultOptions = defaultOptions$5;
|
|
@@ -50992,7 +51022,7 @@
|
|
|
50992
51022
|
optimize: {
|
|
50993
51023
|
disableCheckGraphicWidthOutRange: !0
|
|
50994
51024
|
}
|
|
50995
|
-
}, this._observer = null, this._context = {}, this._renderState = RenderStateEnum.render, this._doResize = () => {
|
|
51025
|
+
}, this._observer = null, this._context = {}, this._renderState = RenderStateEnum.render, this._disableDimensionHoverEvent = !1, this._doResize = () => {
|
|
50996
51026
|
const {
|
|
50997
51027
|
width: width,
|
|
50998
51028
|
height: height
|
|
@@ -51592,6 +51622,15 @@
|
|
|
51592
51622
|
var _a;
|
|
51593
51623
|
return null === (_a = this._chart) || void 0 === _a ? void 0 : _a.setDimensionIndex(value, opt);
|
|
51594
51624
|
}
|
|
51625
|
+
disableDimensionHoverEvent(value) {
|
|
51626
|
+
return void 0 !== value && (this._disableDimensionHoverEvent = value), this._disableDimensionHoverEvent;
|
|
51627
|
+
}
|
|
51628
|
+
disableCrossHair(value = !0) {
|
|
51629
|
+
this.getChart().getComponentsByKey("crosshair").forEach(crosshair => crosshair.enable = !value);
|
|
51630
|
+
}
|
|
51631
|
+
disableTooltip(value = !0) {
|
|
51632
|
+
this.getChart().getComponentsByKey("tooltip").forEach(tooltip => tooltip.enable = !value);
|
|
51633
|
+
}
|
|
51595
51634
|
showCrosshair(cb) {
|
|
51596
51635
|
var _a;
|
|
51597
51636
|
null === (_a = this._chart) || void 0 === _a || _a.showCrosshair(cb);
|
|
@@ -53654,7 +53693,8 @@
|
|
|
53654
53693
|
class DimensionHoverEvent extends DimensionEvent {
|
|
53655
53694
|
constructor() {
|
|
53656
53695
|
super(...arguments), this._cacheDimensionInfo = null, this.onMouseMove = params => {
|
|
53657
|
-
|
|
53696
|
+
var _a, _b, _c, _d;
|
|
53697
|
+
if (!params || (null === (_d = null === (_c = null === (_b = null === (_a = params.chart) || void 0 === _a ? void 0 : _a.getOption()) || void 0 === _b ? void 0 : _b.globalInstance) || void 0 === _c ? void 0 : _c.disableDimensionHoverEvent) || void 0 === _d ? void 0 : _d.call(_c))) return;
|
|
53658
53698
|
const x = params.event.viewX,
|
|
53659
53699
|
y = params.event.viewY,
|
|
53660
53700
|
targetDimensionInfo = this.getTargetDimensionInfo(x, y);
|
|
@@ -53669,7 +53709,8 @@
|
|
|
53669
53709
|
dimensionInfo: targetDimensionInfo.slice()
|
|
53670
53710
|
})), this._cacheDimensionInfo = targetDimensionInfo);
|
|
53671
53711
|
}, this.onMouseOut = params => {
|
|
53672
|
-
|
|
53712
|
+
var _a, _b, _c, _d;
|
|
53713
|
+
params && !(null === (_d = null === (_c = null === (_b = null === (_a = params.chart) || void 0 === _a ? void 0 : _a.getOption()) || void 0 === _b ? void 0 : _b.globalInstance) || void 0 === _c ? void 0 : _c.disableDimensionHoverEvent) || void 0 === _d ? void 0 : _d.call(_c)) && (this._callback.call(null, Object.assign(Object.assign({}, params), {
|
|
53673
53714
|
action: "leave",
|
|
53674
53715
|
dimensionInfo: this._cacheDimensionInfo ? this._cacheDimensionInfo.slice() : []
|
|
53675
53716
|
})), this._cacheDimensionInfo = null);
|
|
@@ -58852,7 +58893,7 @@
|
|
|
58852
58893
|
}
|
|
58853
58894
|
shouldHandleTooltip(params, info) {
|
|
58854
58895
|
var _a, _b;
|
|
58855
|
-
return !isNil$1(info) && isActiveTypeVisible(this.activeType, null === (_b = null === (_a = params.model) || void 0 === _a ? void 0 : _a.tooltipHelper) || void 0 === _b ? void 0 : _b.spec);
|
|
58896
|
+
return !!this.component.enable && !isNil$1(info) && isActiveTypeVisible(this.activeType, null === (_b = null === (_a = params.model) || void 0 === _a ? void 0 : _a.tooltipHelper) || void 0 === _b ? void 0 : _b.spec);
|
|
58856
58897
|
}
|
|
58857
58898
|
clearCache() {
|
|
58858
58899
|
this._cacheActiveSpec = void 0;
|
|
@@ -77702,7 +77743,7 @@
|
|
|
77702
77743
|
|
|
77703
77744
|
let Tooltip$1 = class Tooltip extends BaseComponent {
|
|
77704
77745
|
constructor() {
|
|
77705
|
-
super(...arguments), this.layoutZIndex = 1, this.type = ComponentTypeEnum.tooltip, this.name = ComponentTypeEnum.tooltip, this.transformerConstructor = TooltipSpecTransformer, this.specKey = "tooltip", this.layoutType = "none", this._isReleased = !1, this._alwaysShow = !1, this._eventList = [], this._isTooltipShown = !1, this._clickLock = !1, this._mountEvent = (eType, query, callback) => {
|
|
77746
|
+
super(...arguments), this.layoutZIndex = 1, this.type = ComponentTypeEnum.tooltip, this.name = ComponentTypeEnum.tooltip, this.transformerConstructor = TooltipSpecTransformer, this.specKey = "tooltip", this.layoutType = "none", this._isReleased = !1, this.enable = !0, this._alwaysShow = !1, this._eventList = [], this._isTooltipShown = !1, this._clickLock = !1, this._mountEvent = (eType, query, callback) => {
|
|
77706
77747
|
this.event.on(eType, query, callback), this._eventList.push({
|
|
77707
77748
|
eventType: eType,
|
|
77708
77749
|
handler: callback
|
|
@@ -77803,7 +77844,7 @@
|
|
|
77803
77844
|
processor.clearCache();
|
|
77804
77845
|
});
|
|
77805
77846
|
const handler = null !== (_c = this._spec.handler) && void 0 !== _c ? _c : this.tooltipHandler;
|
|
77806
|
-
if (handler.hideTooltip) {
|
|
77847
|
+
if (null == handler ? void 0 : handler.hideTooltip) {
|
|
77807
77848
|
const result = handler.hideTooltip.call(handler, params);
|
|
77808
77849
|
return result || (this._isTooltipShown = !1), result;
|
|
77809
77850
|
}
|
|
@@ -77862,7 +77903,7 @@
|
|
|
77862
77903
|
_initEventOfTooltipContent() {
|
|
77863
77904
|
var _a, _b;
|
|
77864
77905
|
if (!this._needInitEventOfTooltip) return;
|
|
77865
|
-
const container = null === (_b = (_a = this.tooltipHandler).getRootDom) || void 0 === _b ? void 0 : _b.call(_a);
|
|
77906
|
+
const container = null === (_b = null === (_a = this.tooltipHandler) || void 0 === _a ? void 0 : _a.getRootDom) || void 0 === _b ? void 0 : _b.call(_a);
|
|
77866
77907
|
container && (container.addEventListener("pointerenter", () => {
|
|
77867
77908
|
var _a;
|
|
77868
77909
|
if (!this._enterable) return;
|
|
@@ -77939,7 +77980,7 @@
|
|
|
77939
77980
|
if (super.reInit(spec), this.tooltipHandler) {
|
|
77940
77981
|
const renderMode = null !== (_a = this._spec.renderMode) && void 0 !== _a ? _a : "html",
|
|
77941
77982
|
newEnterable = this._spec.enterable && "html" === renderMode;
|
|
77942
|
-
newEnterable && !this._enterable && (this._needInitEventOfTooltip = !0), this._enterable = newEnterable, null === (_c = (_b = this.tooltipHandler).reInit) || void 0 === _c || _c.call(_b);
|
|
77983
|
+
newEnterable && !this._enterable && (this._needInitEventOfTooltip = !0), this._enterable = newEnterable, null === (_c = null === (_b = this.tooltipHandler) || void 0 === _b ? void 0 : _b.reInit) || void 0 === _c || _c.call(_b);
|
|
77943
77984
|
} else this._initHandler();
|
|
77944
77985
|
}
|
|
77945
77986
|
showTooltip(datum, options) {
|
|
@@ -79223,7 +79264,13 @@
|
|
|
79223
79264
|
} = params;
|
|
79224
79265
|
let value = this._isHorizontal ? scrollX : scrollY;
|
|
79225
79266
|
const active = this._isHorizontal ? abs$1(scrollX / scrollY) >= .5 : abs$1(scrollY / scrollX) >= .5;
|
|
79226
|
-
this._scrollAttr.reverse || (value = -value), active
|
|
79267
|
+
if (this._scrollAttr.reverse || (value = -value), active) {
|
|
79268
|
+
const scrollStep = this._spec.scrollStep;
|
|
79269
|
+
if (isValidNumber$1(scrollStep)) {
|
|
79270
|
+
value = (value > 0 ? 1 : -1) * (scrollStep * (this.getState().end - this.getState().start) / 1);
|
|
79271
|
+
}
|
|
79272
|
+
this.handleChartMove(value, null !== (_a = this._scrollAttr.rate) && void 0 !== _a ? _a : 1);
|
|
79273
|
+
}
|
|
79227
79274
|
const hasChange = 0 !== this.getState().start && 1 !== this.getState().end;
|
|
79228
79275
|
return active && hasChange;
|
|
79229
79276
|
}, this.handleChartDrag = (delta, e) => {
|
|
@@ -80193,7 +80240,7 @@
|
|
|
80193
80240
|
return !1 === this._visible ? 0 : isNumber$1(this._spec.height) ? this._spec.height : this._isHorizontal ? SCROLL_BAR_DEFAULT_SIZE : this.getLayoutRect().height;
|
|
80194
80241
|
}
|
|
80195
80242
|
_getAttrs() {
|
|
80196
|
-
var _a, _b, _c, _d, _e, _f;
|
|
80243
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
80197
80244
|
return Object.assign({
|
|
80198
80245
|
zIndex: this.layoutZIndex,
|
|
80199
80246
|
x: this.getLayoutStartPoint().x,
|
|
@@ -80204,7 +80251,8 @@
|
|
|
80204
80251
|
direction: this._isHorizontal ? "horizontal" : "vertical",
|
|
80205
80252
|
delayType: null === (_a = this._spec) || void 0 === _a ? void 0 : _a.delayType,
|
|
80206
80253
|
delayTime: isValid$1(null === (_b = this._spec) || void 0 === _b ? void 0 : _b.delayType) ? null !== (_d = null === (_c = this._spec) || void 0 === _c ? void 0 : _c.delayTime) && void 0 !== _d ? _d : 30 : 0,
|
|
80207
|
-
realTime: null === (_f = null === (_e = this._spec) || void 0 === _e ? void 0 : _e.realTime) || void 0 === _f || _f
|
|
80254
|
+
realTime: null === (_f = null === (_e = this._spec) || void 0 === _e ? void 0 : _e.realTime) || void 0 === _f || _f,
|
|
80255
|
+
minSliderSize: null === (_g = this._spec) || void 0 === _g ? void 0 : _g.minSliderSize
|
|
80208
80256
|
}, this._getComponentAttrs());
|
|
80209
80257
|
}
|
|
80210
80258
|
_createOrUpdateComponent() {
|
|
@@ -81858,7 +81906,7 @@
|
|
|
81858
81906
|
};
|
|
81859
81907
|
}
|
|
81860
81908
|
_getTitleAttrs() {
|
|
81861
|
-
var _a, _b, _c, _d, _e, _f
|
|
81909
|
+
var _a, _b, _c, _d, _e, _f;
|
|
81862
81910
|
if (!1 === this._spec.visible) return {
|
|
81863
81911
|
visible: !1
|
|
81864
81912
|
};
|
|
@@ -81866,30 +81914,35 @@
|
|
|
81866
81914
|
titleWidth = calcLayoutNumber(this._spec.width, layoutRect.width, null, layoutRect.width),
|
|
81867
81915
|
titleMaxWidth = calcLayoutNumber(this._spec.maxWidth, layoutRect.width, null, layoutRect.width),
|
|
81868
81916
|
maxWidth = Math.max(Math.min(titleWidth, titleMaxWidth, layoutRect.width), 0),
|
|
81917
|
+
hasText = isValid$1(this._spec.text) && "" !== this._spec.text,
|
|
81918
|
+
hasSubtext = isValid$1(this._spec.subtext) && "" !== this._spec.subtext,
|
|
81869
81919
|
attrs = Object.assign(Object.assign({}, pickWithout(this._spec, ["padding"])), {
|
|
81870
81920
|
textType: null !== (_a = this._spec.textType) && void 0 !== _a ? _a : "text",
|
|
81871
|
-
text:
|
|
81872
|
-
subtextType: null !== (
|
|
81873
|
-
subtext:
|
|
81874
|
-
x: null !== (
|
|
81875
|
-
y: null !== (
|
|
81921
|
+
text: hasText ? this._spec.text : void 0,
|
|
81922
|
+
subtextType: null !== (_b = this._spec.subtextType) && void 0 !== _b ? _b : "text",
|
|
81923
|
+
subtext: hasSubtext ? this._spec.subtext : void 0,
|
|
81924
|
+
x: null !== (_c = this._spec.x) && void 0 !== _c ? _c : 0,
|
|
81925
|
+
y: null !== (_d = this._spec.y) && void 0 !== _d ? _d : 0,
|
|
81876
81926
|
height: this._spec.height,
|
|
81877
81927
|
minWidth: this._spec.minWidth,
|
|
81878
81928
|
maxWidth: maxWidth,
|
|
81879
81929
|
minHeight: this._spec.minHeight,
|
|
81880
81930
|
maxHeight: this._spec.maxHeight,
|
|
81881
81931
|
padding: this._spec.innerPadding,
|
|
81882
|
-
align: null !== (
|
|
81883
|
-
verticalAlign: null !== (
|
|
81932
|
+
align: null !== (_e = this._spec.align) && void 0 !== _e ? _e : "left",
|
|
81933
|
+
verticalAlign: null !== (_f = this._spec.verticalAlign) && void 0 !== _f ? _f : "top",
|
|
81884
81934
|
textStyle: Object.assign({
|
|
81885
|
-
width: maxWidth,
|
|
81886
81935
|
maxLineWidth: maxWidth
|
|
81887
81936
|
}, this._spec.textStyle),
|
|
81888
81937
|
subtextStyle: Object.assign({
|
|
81889
81938
|
maxLineWidth: maxWidth
|
|
81890
81939
|
}, this._spec.subtextStyle)
|
|
81891
81940
|
});
|
|
81892
|
-
|
|
81941
|
+
if (hasText && (attrs.textStyle.width = maxWidth), hasSubtext && (attrs.subtextStyle.width = maxWidth), isValid$1(this._spec.width)) {
|
|
81942
|
+
const clampedWidth = Math.max(Math.min(titleWidth, layoutRect.width), 0);
|
|
81943
|
+
hasText ? attrs.textStyle.width = clampedWidth : delete attrs.textStyle.width, hasSubtext && (attrs.subtextStyle.width = clampedWidth);
|
|
81944
|
+
}
|
|
81945
|
+
return attrs;
|
|
81893
81946
|
}
|
|
81894
81947
|
_createOrUpdateTitleComponent(attrs) {
|
|
81895
81948
|
if (this._titleComponent) isEqual(attrs, this._cacheAttrs) || this._titleComponent.setAttributes(attrs);else {
|
|
@@ -83526,6 +83579,9 @@
|
|
|
83526
83579
|
brushComponent = this._brushComponents[componentIndex];
|
|
83527
83580
|
brushComponent.setAttributes(interactiveAttr), this._initMarkBrushState(componentIndex, ""), brushComponent.children[0].removeAllChild();
|
|
83528
83581
|
}
|
|
83582
|
+
_shouldEnableInteractive() {
|
|
83583
|
+
return !1 !== this.getOption().getCompiler().getOption().interactive;
|
|
83584
|
+
}
|
|
83529
83585
|
_createBrushComponent(region, componentIndex) {
|
|
83530
83586
|
var _a, _b;
|
|
83531
83587
|
const interactiveAttr = this._getBrushInteractiveAttr(region),
|
|
@@ -83536,32 +83592,32 @@
|
|
|
83536
83592
|
disableTriggerEvent: this._option.disableTriggerEvent
|
|
83537
83593
|
}));
|
|
83538
83594
|
brush.id = null !== (_b = this._spec.id) && void 0 !== _b ? _b : `brush-${this.id}`, this.getContainer().add(brush), this._brushComponents.push(brush), this._cacheInteractiveRangeAttrs.push(interactiveAttr), brush.addEventListener(IOperateType.brushActive, e => {
|
|
83539
|
-
this._initMarkBrushState(componentIndex, "outOfBrush"), this._emitEvent(ChartEvent.brushActive, region);
|
|
83595
|
+
this._initMarkBrushState(componentIndex, "outOfBrush"), this._emitEvent(ChartEvent.brushActive, region, e);
|
|
83540
83596
|
}), brush.addEventListener(IOperateType.drawStart, e => {
|
|
83541
|
-
this._setRegionMarkPickable(region, !0), this._emitEvent(ChartEvent.brushStart, region);
|
|
83597
|
+
this._spec.disableDimensionHoverWhenBrushing && this._option.globalInstance.disableDimensionHoverEvent(!0), this._setRegionMarkPickable(region, !0), this._emitEvent(ChartEvent.brushStart, region, e);
|
|
83542
83598
|
}), brush.addEventListener(IOperateType.moveStart, e => {
|
|
83543
|
-
this._setRegionMarkPickable(region, !0), this._emitEvent(ChartEvent.brushStart, region);
|
|
83599
|
+
this._spec.disableDimensionHoverWhenBrushing && this._option.globalInstance.disableDimensionHoverEvent(!0), this._setRegionMarkPickable(region, !0), this._emitEvent(ChartEvent.brushStart, region, e);
|
|
83544
83600
|
}), brush.addEventListener(IOperateType.drawing, e => {
|
|
83545
|
-
this._setRegionMarkPickable(region, !1), this._handleBrushChange(region, e), this._emitEvent(ChartEvent.brushChange, region);
|
|
83601
|
+
this._setRegionMarkPickable(region, !1), this._handleBrushChange(region, e), this._emitEvent(ChartEvent.brushChange, region, e);
|
|
83546
83602
|
}), brush.addEventListener(IOperateType.moving, e => {
|
|
83547
|
-
this._setRegionMarkPickable(region, !1), this._handleBrushChange(region, e), this._emitEvent(ChartEvent.brushChange, region);
|
|
83603
|
+
this._setRegionMarkPickable(region, !1), this._handleBrushChange(region, e), this._emitEvent(ChartEvent.brushChange, region, e);
|
|
83548
83604
|
}), brush.addEventListener(IOperateType.brushClear, e => {
|
|
83549
|
-
this._setRegionMarkPickable(region, !0), this._initMarkBrushState(componentIndex, ""), this._emitEvent(ChartEvent.brushClear, region);
|
|
83605
|
+
this._spec.disableDimensionHoverWhenBrushing && this._option.globalInstance.disableDimensionHoverEvent(!1), this._setRegionMarkPickable(region, !0), this._initMarkBrushState(componentIndex, ""), this._emitEvent(ChartEvent.brushClear, region, e);
|
|
83550
83606
|
}), brush.addEventListener(IOperateType.drawEnd, e => {
|
|
83551
83607
|
var _a;
|
|
83552
|
-
this._setRegionMarkPickable(region, !0);
|
|
83608
|
+
this._spec.disableDimensionHoverWhenBrushing && this._option.globalInstance.disableDimensionHoverEvent(!1), this._setRegionMarkPickable(region, !0);
|
|
83553
83609
|
const {
|
|
83554
83610
|
operateMask: operateMask
|
|
83555
83611
|
} = e.detail,
|
|
83556
83612
|
{
|
|
83557
83613
|
updateElementsState = !0
|
|
83558
83614
|
} = this._spec;
|
|
83559
|
-
if (null === (_a = this._spec) || void 0 === _a ? void 0 : _a.onBrushEnd) !0 === this._spec.onBrushEnd(e) ? (this.clearGraphic(), this._initMarkBrushState(componentIndex, ""), this._emitEvent(ChartEvent.brushClear, region)) : (this._spec.onBrushEnd(e), this._emitEvent(ChartEvent.brushEnd, region));else {
|
|
83615
|
+
if (null === (_a = this._spec) || void 0 === _a ? void 0 : _a.onBrushEnd) !0 === this._spec.onBrushEnd(e) ? (this.clearGraphic(), this._initMarkBrushState(componentIndex, ""), this._emitEvent(ChartEvent.brushClear, region, e)) : (this._spec.onBrushEnd(e), this._emitEvent(ChartEvent.brushEnd, region, e));else {
|
|
83560
83616
|
const inBrushData = this._extendDataInBrush(this._inBrushElementsMap);
|
|
83561
|
-
(!this._spec.zoomWhenEmpty && inBrushData.length > 0 || !updateElementsState) && this._setAxisAndDataZoom(operateMask, region), this._emitEvent(ChartEvent.brushEnd, region);
|
|
83617
|
+
(!this._spec.zoomWhenEmpty && inBrushData.length > 0 || !updateElementsState) && this._setAxisAndDataZoom(operateMask, region), this._emitEvent(ChartEvent.brushEnd, region, e);
|
|
83562
83618
|
}
|
|
83563
83619
|
}), brush.addEventListener(IOperateType.moveEnd, e => {
|
|
83564
|
-
this._setRegionMarkPickable(region, !0);
|
|
83620
|
+
this._spec.disableDimensionHoverWhenBrushing && this._option.globalInstance.disableDimensionHoverEvent(!1), this._setRegionMarkPickable(region, !0);
|
|
83565
83621
|
const {
|
|
83566
83622
|
operateMask: operateMask
|
|
83567
83623
|
} = e.detail,
|
|
@@ -83569,7 +83625,7 @@
|
|
|
83569
83625
|
updateElementsState = !0
|
|
83570
83626
|
} = this._spec,
|
|
83571
83627
|
inBrushData = this._extendDataInBrush(this._inBrushElementsMap);
|
|
83572
|
-
(!this._spec.zoomWhenEmpty && inBrushData.length > 0 || updateElementsState) && this._setAxisAndDataZoom(operateMask, region), this._emitEvent(ChartEvent.brushEnd, region);
|
|
83628
|
+
(!this._spec.zoomWhenEmpty && inBrushData.length > 0 || updateElementsState) && this._setAxisAndDataZoom(operateMask, region), this._emitEvent(ChartEvent.brushEnd, region, e);
|
|
83573
83629
|
});
|
|
83574
83630
|
}
|
|
83575
83631
|
_getBrushInteractiveAttr(region) {
|
|
@@ -83587,7 +83643,8 @@
|
|
|
83587
83643
|
maxX: seriesRegionEndX
|
|
83588
83644
|
},
|
|
83589
83645
|
xRange: [seriesRegionStartX, seriesRegionEndX],
|
|
83590
|
-
yRange: [seriesRegionStartY, seriesRegionEndY]
|
|
83646
|
+
yRange: [seriesRegionStartY, seriesRegionEndY],
|
|
83647
|
+
interactive: this._shouldEnableInteractive()
|
|
83591
83648
|
};
|
|
83592
83649
|
}
|
|
83593
83650
|
_transformBrushedMarkAttr(brushedStyle) {
|
|
@@ -83596,11 +83653,12 @@
|
|
|
83596
83653
|
}
|
|
83597
83654
|
_handleBrushChange(region, e) {
|
|
83598
83655
|
const {
|
|
83599
|
-
|
|
83600
|
-
|
|
83601
|
-
|
|
83602
|
-
|
|
83603
|
-
|
|
83656
|
+
operateMask: operateMask
|
|
83657
|
+
} = e.detail;
|
|
83658
|
+
this._operateMask = operateMask;
|
|
83659
|
+
const {
|
|
83660
|
+
updateElementsState = !0
|
|
83661
|
+
} = this._spec;
|
|
83604
83662
|
updateElementsState && (this._reconfigItem(operateMask, region), this._reconfigLinkedItem(operateMask, region));
|
|
83605
83663
|
}
|
|
83606
83664
|
_extendDataInBrush(elementsMap) {
|
|
@@ -83615,7 +83673,7 @@
|
|
|
83615
83673
|
for (const elementKey in elementsMap) data.push(null === (_b = null === (_a = elementsMap[elementKey].context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0]);
|
|
83616
83674
|
return data;
|
|
83617
83675
|
}
|
|
83618
|
-
_emitEvent(eventType, region) {
|
|
83676
|
+
_emitEvent(eventType, region, e) {
|
|
83619
83677
|
var _a;
|
|
83620
83678
|
this.event.emit(eventType, {
|
|
83621
83679
|
model: this,
|
|
@@ -83632,7 +83690,8 @@
|
|
|
83632
83690
|
linkedOutOfBrushElementsMap: this._linkedOutOfBrushElementsMap,
|
|
83633
83691
|
zoomRecord: this._zoomRecord
|
|
83634
83692
|
},
|
|
83635
|
-
vchart: null === (_a = this._option) || void 0 === _a ? void 0 : _a.globalInstance
|
|
83693
|
+
vchart: null === (_a = this._option) || void 0 === _a ? void 0 : _a.globalInstance,
|
|
83694
|
+
event: e
|
|
83636
83695
|
});
|
|
83637
83696
|
}
|
|
83638
83697
|
_reconfigItem(operateMask, region) {
|
|
@@ -83829,6 +83888,11 @@
|
|
|
83829
83888
|
}), this._brushComponents = null;
|
|
83830
83889
|
}
|
|
83831
83890
|
}
|
|
83891
|
+
clearBrushStateAndMask() {
|
|
83892
|
+
this._relativeRegions.forEach((region, componentIndex) => {
|
|
83893
|
+
this._initMarkBrushState(componentIndex, ""), this._brushComponents[componentIndex].children[0].removeAllChild();
|
|
83894
|
+
});
|
|
83895
|
+
}
|
|
83832
83896
|
};
|
|
83833
83897
|
Brush$1.type = ComponentTypeEnum.brush, Brush$1.builtInTheme = {
|
|
83834
83898
|
brush: brush
|
|
@@ -88159,6 +88223,10 @@
|
|
|
88159
88223
|
type: 'common',
|
|
88160
88224
|
vchartConstructor: VChart$1
|
|
88161
88225
|
}, [
|
|
88226
|
+
registerAnimate,
|
|
88227
|
+
registerReactAttributePlugin,
|
|
88228
|
+
registerTooltip,
|
|
88229
|
+
registerDomTooltipHandler,
|
|
88162
88230
|
registerCommonChart,
|
|
88163
88231
|
registerCartesianLinearAxis,
|
|
88164
88232
|
registerCartesianBandAxis,
|
|
@@ -88616,7 +88684,7 @@
|
|
|
88616
88684
|
|
|
88617
88685
|
const VChartSimple = createChart('VChartSimple');
|
|
88618
88686
|
|
|
88619
|
-
const version = "2.0.
|
|
88687
|
+
const version = "2.0.14";
|
|
88620
88688
|
|
|
88621
88689
|
exports.Area = Area;
|
|
88622
88690
|
exports.AreaChart = AreaChart;
|