@visactor/vchart 1.13.9-alpha.1 → 1.13.9-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es5/index.js +1 -1
- package/build/index.es.js +243 -244
- package/build/index.js +243 -244
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/component/marker/mark-area/base-mark-area.js +17 -27
- package/cjs/component/marker/mark-area/base-mark-area.js.map +1 -1
- package/cjs/component/marker/mark-area/interface/theme.d.ts +3 -4
- package/cjs/component/marker/mark-area/interface/theme.js.map +1 -1
- package/cjs/component/marker/mark-line/base-mark-line.js +20 -31
- package/cjs/component/marker/mark-line/base-mark-line.js.map +1 -1
- package/cjs/component/marker/mark-line/cartesian-mark-line.js +16 -20
- package/cjs/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/cjs/component/marker/mark-line/interface/theme.d.ts +3 -4
- package/cjs/component/marker/mark-line/interface/theme.js.map +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/esm/component/marker/mark-area/base-mark-area.js +16 -27
- package/esm/component/marker/mark-area/base-mark-area.js.map +1 -1
- package/esm/component/marker/mark-area/interface/theme.d.ts +3 -4
- package/esm/component/marker/mark-area/interface/theme.js.map +1 -1
- package/esm/component/marker/mark-line/base-mark-line.js +19 -30
- package/esm/component/marker/mark-line/base-mark-line.js.map +1 -1
- package/esm/component/marker/mark-line/cartesian-mark-line.js +16 -20
- package/esm/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/esm/component/marker/mark-line/interface/theme.d.ts +3 -4
- package/esm/component/marker/mark-line/interface/theme.js.map +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/package.json +15 -15
package/build/index.js
CHANGED
|
@@ -31431,6 +31431,10 @@
|
|
|
31431
31431
|
const SCROLLBAR_EVENT$1 = "scrollDrag";
|
|
31432
31432
|
const SCROLLBAR_END_EVENT$1 = "scrollUp";
|
|
31433
31433
|
|
|
31434
|
+
function getEndTriggersOfDrag() {
|
|
31435
|
+
return "browser" === vglobal.env ? ["pointerup", "pointerleave"] : ["pointerup", "pointerleave", "pointerupoutside"];
|
|
31436
|
+
}
|
|
31437
|
+
|
|
31434
31438
|
const delayMap$3 = {
|
|
31435
31439
|
debounce: debounce,
|
|
31436
31440
|
throttle: throttle
|
|
@@ -31463,6 +31467,7 @@
|
|
|
31463
31467
|
}
|
|
31464
31468
|
this.setScrollRange([currentScrollValue - (range[1] - range[0]) / 2, currentScrollValue + (range[1] - range[0]) / 2], !1), this.stage && !this.stage.autoRender && this.stage.renderNextFrame();
|
|
31465
31469
|
}, this._onSliderPointerDown = e => {
|
|
31470
|
+
this._clearDragEvents();
|
|
31466
31471
|
const {
|
|
31467
31472
|
stopSliderDownPropagation = !0
|
|
31468
31473
|
} = this.attribute;
|
|
@@ -31477,11 +31482,14 @@
|
|
|
31477
31482
|
this._prePos = "horizontal" === direction ? x : y, this._dispatchEvent(SCROLLBAR_START_EVENT, {
|
|
31478
31483
|
pos: this._prePos,
|
|
31479
31484
|
event: e
|
|
31480
|
-
})
|
|
31481
|
-
|
|
31482
|
-
|
|
31485
|
+
});
|
|
31486
|
+
const triggers = getEndTriggersOfDrag(),
|
|
31487
|
+
obj = "browser" === vglobal.env ? vglobal : this.stage;
|
|
31488
|
+
obj.addEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
|
|
31483
31489
|
capture: !0
|
|
31484
|
-
}),
|
|
31490
|
+
}), triggers.forEach(trigger => {
|
|
31491
|
+
obj.addEventListener(trigger, this._onSliderPointerUp);
|
|
31492
|
+
});
|
|
31485
31493
|
}, this._computeScrollValue = e => {
|
|
31486
31494
|
const {
|
|
31487
31495
|
direction: direction
|
|
@@ -31518,11 +31526,7 @@
|
|
|
31518
31526
|
this._dispatchEvent(SCROLLBAR_END_EVENT$1, {
|
|
31519
31527
|
pre: preRange,
|
|
31520
31528
|
value: clampRange$1(range, limitRange[0], limitRange[1])
|
|
31521
|
-
}),
|
|
31522
|
-
capture: !0
|
|
31523
|
-
}), vglobal.removeEventListener("pointerup", this._onSliderPointerUp)) : (this.stage.removeEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
|
|
31524
|
-
capture: !0
|
|
31525
|
-
}), this.stage.removeEventListener("pointerup", this._onSliderPointerUp), this.stage.removeEventListener("pointerupoutside", this._onSliderPointerUp));
|
|
31529
|
+
}), this._clearDragEvents();
|
|
31526
31530
|
};
|
|
31527
31531
|
}
|
|
31528
31532
|
setScrollRange(range) {
|
|
@@ -31671,6 +31675,15 @@
|
|
|
31671
31675
|
sliderSize = this._sliderSize;
|
|
31672
31676
|
return "horizontal" === direction ? clampRange$1([x1 + min * width, x1 + max * width], x1, width - sliderSize) : clampRange$1([y1 + min * height, y1 + max * height], y1, height - sliderSize);
|
|
31673
31677
|
}
|
|
31678
|
+
_clearDragEvents() {
|
|
31679
|
+
const triggers = getEndTriggersOfDrag(),
|
|
31680
|
+
obj = "browser" === vglobal.env ? vglobal : this.stage;
|
|
31681
|
+
obj.removeEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
|
|
31682
|
+
capture: !0
|
|
31683
|
+
}), triggers.forEach(trigger => {
|
|
31684
|
+
obj.removeEventListener(trigger, this._onSliderPointerUp);
|
|
31685
|
+
});
|
|
31686
|
+
}
|
|
31674
31687
|
_reset() {
|
|
31675
31688
|
this._sliderRenderBounds = null, this._sliderLimitRange = null;
|
|
31676
31689
|
}
|
|
@@ -39830,26 +39843,17 @@
|
|
|
39830
39843
|
l.animate().wait(delay + startSymbolDuration + index * stepDuration).to({
|
|
39831
39844
|
clipRange: 1
|
|
39832
39845
|
}, stepDuration, easing);
|
|
39833
|
-
}), graphicFadeIn(line.endSymbol, delay + startSymbolDuration + lineDuration, endSymbolDuration, easing),
|
|
39834
|
-
const delayTime = delay + startSymbolDuration + lineDuration + endSymbolDuration;
|
|
39835
|
-
graphicFadeIn(labelNode.getTextShape(), delayTime, labelDuration, easing), graphicFadeIn(labelNode.getBgRect(), delayTime, labelDuration, easing);
|
|
39836
|
-
});
|
|
39846
|
+
}), graphicFadeIn(line.endSymbol, delay + startSymbolDuration + lineDuration, endSymbolDuration, easing), graphicFadeIn(label.getTextShape(), delay + startSymbolDuration + lineDuration + endSymbolDuration, labelDuration, easing), graphicFadeIn(label.getBgRect(), delay + startSymbolDuration + lineDuration + endSymbolDuration, labelDuration, easing);
|
|
39837
39847
|
}
|
|
39838
39848
|
|
|
39839
39849
|
function commonLineFadeIn(line, label, duration, delay, easing) {
|
|
39840
|
-
segmentFadeIn(line, delay, duration, easing),
|
|
39841
|
-
tagFadeIn(labelNode, delay, duration, easing);
|
|
39842
|
-
});
|
|
39850
|
+
segmentFadeIn(line, delay, duration, easing), tagFadeIn(label, delay, duration, easing);
|
|
39843
39851
|
}
|
|
39844
39852
|
function areaFadeIn(area, label, duration, delay, easing) {
|
|
39845
|
-
graphicFadeIn(area, delay, duration, easing),
|
|
39846
|
-
tagFadeIn(labelNode, delay, duration, easing);
|
|
39847
|
-
});
|
|
39853
|
+
graphicFadeIn(area, delay, duration, easing), tagFadeIn(label, delay, duration, easing);
|
|
39848
39854
|
}
|
|
39849
39855
|
function arcAreaFadeIn(area, label, duration, delay, easing) {
|
|
39850
|
-
graphicFadeIn(area, delay, duration, easing),
|
|
39851
|
-
tagFadeIn(labelNode, delay, duration, easing);
|
|
39852
|
-
});
|
|
39856
|
+
graphicFadeIn(area, delay, duration, easing), tagFadeIn(label, delay, duration, easing);
|
|
39853
39857
|
}
|
|
39854
39858
|
function pointFadeIn(itemLine, decorativeLine, item, duration, delay, easing) {
|
|
39855
39859
|
var _a;
|
|
@@ -39857,19 +39861,13 @@
|
|
|
39857
39861
|
}
|
|
39858
39862
|
|
|
39859
39863
|
function commonLineFadeOut(line, label, duration, delay, easing) {
|
|
39860
|
-
segmentFadeOut(line, delay, duration, easing),
|
|
39861
|
-
tagFadeOut(labelNode, delay, duration, easing);
|
|
39862
|
-
});
|
|
39864
|
+
segmentFadeOut(line, delay, duration, easing), tagFadeOut(label, delay, duration, easing);
|
|
39863
39865
|
}
|
|
39864
39866
|
function areaFadeOut(area, label, duration, delay, easing) {
|
|
39865
|
-
graphicFadeOut(area, delay, duration, easing),
|
|
39866
|
-
tagFadeOut(labelNode, delay, duration, easing);
|
|
39867
|
-
});
|
|
39867
|
+
graphicFadeOut(area, delay, duration, easing), tagFadeOut(label, delay, duration, easing);
|
|
39868
39868
|
}
|
|
39869
39869
|
function arcAreaFadeOut(area, label, duration, delay, easing) {
|
|
39870
|
-
graphicFadeOut(area, delay, duration, easing),
|
|
39871
|
-
tagFadeOut(labelNode, delay, duration, easing);
|
|
39872
|
-
});
|
|
39870
|
+
graphicFadeOut(area, delay, duration, easing), tagFadeOut(label, delay, duration, easing);
|
|
39873
39871
|
}
|
|
39874
39872
|
function pointFadeOut(itemLine, decorativeLine, item, duration, delay, easing) {
|
|
39875
39873
|
var _a;
|
|
@@ -40041,57 +40039,6 @@
|
|
|
40041
40039
|
delay: 0
|
|
40042
40040
|
};
|
|
40043
40041
|
|
|
40044
|
-
class MarkLabelMixin {
|
|
40045
|
-
getLabel() {
|
|
40046
|
-
return this._label;
|
|
40047
|
-
}
|
|
40048
|
-
_addMarkLabels(container, labelName, defaultLabelAttrs) {
|
|
40049
|
-
const {
|
|
40050
|
-
label: label,
|
|
40051
|
-
state: state
|
|
40052
|
-
} = this.attribute,
|
|
40053
|
-
labelStates = array(null == state ? void 0 : state.label),
|
|
40054
|
-
labelBackgroundStates = array(null == state ? void 0 : state.labelBackground),
|
|
40055
|
-
labelShapes = array(label).map((labelAttrs, index) => {
|
|
40056
|
-
var _a, _b;
|
|
40057
|
-
const finalLabelAttrs = merge$1({}, defaultLabelAttrs, labelAttrs),
|
|
40058
|
-
markLabel = new Tag(Object.assign(Object.assign({}, finalLabelAttrs), {
|
|
40059
|
-
state: {
|
|
40060
|
-
panel: merge$1({}, DEFAULT_STATES$2, null !== (_a = labelBackgroundStates[index]) && void 0 !== _a ? _a : last(labelBackgroundStates)),
|
|
40061
|
-
text: merge$1({}, DEFAULT_STATES$2, null !== (_b = labelStates[index]) && void 0 !== _b ? _b : last(labelStates))
|
|
40062
|
-
}
|
|
40063
|
-
}));
|
|
40064
|
-
return markLabel.name = labelName, container.add(markLabel), this.setLabelPos(markLabel, finalLabelAttrs), markLabel;
|
|
40065
|
-
});
|
|
40066
|
-
this._label = 1 === array(labelShapes).length ? labelShapes[0] : labelShapes;
|
|
40067
|
-
}
|
|
40068
|
-
_updateMarkLabels(defaultLabelAttrs) {
|
|
40069
|
-
const {
|
|
40070
|
-
label: label,
|
|
40071
|
-
state: state
|
|
40072
|
-
} = this.attribute,
|
|
40073
|
-
labelShapes = array(this._label),
|
|
40074
|
-
labelStates = array(null == state ? void 0 : state.label),
|
|
40075
|
-
labelBackgroundStates = array(null == state ? void 0 : state.labelBackground);
|
|
40076
|
-
if (labelShapes.length) {
|
|
40077
|
-
const labels = array(label);
|
|
40078
|
-
labelShapes.forEach((labelItem, index) => {
|
|
40079
|
-
var _a, _b;
|
|
40080
|
-
const finalLabelAttrs = merge$1({}, defaultLabelAttrs, labels[index]);
|
|
40081
|
-
labelItem.setAttributes(Object.assign(Object.assign({
|
|
40082
|
-
dx: 0,
|
|
40083
|
-
dy: 0
|
|
40084
|
-
}, finalLabelAttrs), {
|
|
40085
|
-
state: {
|
|
40086
|
-
panel: merge$1({}, DEFAULT_STATES$2, null !== (_a = labelBackgroundStates[index]) && void 0 !== _a ? _a : last(labelBackgroundStates)),
|
|
40087
|
-
text: merge$1({}, DEFAULT_STATES$2, null !== (_b = labelStates[index]) && void 0 !== _b ? _b : last(labelStates))
|
|
40088
|
-
}
|
|
40089
|
-
})), this.setLabelPos(labelItem, finalLabelAttrs);
|
|
40090
|
-
});
|
|
40091
|
-
}
|
|
40092
|
-
}
|
|
40093
|
-
}
|
|
40094
|
-
|
|
40095
40042
|
class MarkCommonLine extends Marker {
|
|
40096
40043
|
constructor() {
|
|
40097
40044
|
super(...arguments), this.name = "markCommonLine", this.defaultUpdateAnimation = DefaultUpdateMarkLineAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
|
|
@@ -40099,20 +40046,24 @@
|
|
|
40099
40046
|
getLine() {
|
|
40100
40047
|
return this._line;
|
|
40101
40048
|
}
|
|
40102
|
-
|
|
40049
|
+
getLabel() {
|
|
40050
|
+
return this._label;
|
|
40051
|
+
}
|
|
40052
|
+
setLabelPos() {
|
|
40103
40053
|
const {
|
|
40054
|
+
label = {},
|
|
40104
40055
|
limitRect: limitRect
|
|
40105
40056
|
} = this.attribute,
|
|
40106
40057
|
{
|
|
40107
40058
|
position: position,
|
|
40108
40059
|
confine: confine,
|
|
40109
40060
|
autoRotate: autoRotate
|
|
40110
|
-
} =
|
|
40111
|
-
labelPoint = this.getPointAttrByPosition(position
|
|
40061
|
+
} = label,
|
|
40062
|
+
labelPoint = this.getPointAttrByPosition(position),
|
|
40112
40063
|
labelAngle = position.toString().toLocaleLowerCase().includes("start") ? this._line.getStartAngle() || 0 : this._line.getEndAngle() || 0;
|
|
40113
|
-
if (
|
|
40114
|
-
angle: autoRotate ? this.getRotateByAngle(labelPoint.angle
|
|
40115
|
-
textStyle: Object.assign(Object.assign({}, this.getTextStyle(position, labelAngle, autoRotate)),
|
|
40064
|
+
if (this._label.setAttributes(Object.assign(Object.assign({}, labelPoint.position), {
|
|
40065
|
+
angle: autoRotate ? this.getRotateByAngle(labelPoint.angle) : 0,
|
|
40066
|
+
textStyle: Object.assign(Object.assign({}, this.getTextStyle(position, labelAngle, autoRotate)), label.textStyle)
|
|
40116
40067
|
})), limitRect && confine) {
|
|
40117
40068
|
const {
|
|
40118
40069
|
x: x,
|
|
@@ -40120,7 +40071,7 @@
|
|
|
40120
40071
|
width: width,
|
|
40121
40072
|
height: height
|
|
40122
40073
|
} = limitRect;
|
|
40123
|
-
limitShapeInBounds(
|
|
40074
|
+
limitShapeInBounds(this._label, {
|
|
40124
40075
|
x1: x,
|
|
40125
40076
|
y1: y,
|
|
40126
40077
|
x2: x + width,
|
|
@@ -40129,14 +40080,36 @@
|
|
|
40129
40080
|
}
|
|
40130
40081
|
}
|
|
40131
40082
|
initMarker(container) {
|
|
40132
|
-
const
|
|
40133
|
-
|
|
40083
|
+
const {
|
|
40084
|
+
label: label,
|
|
40085
|
+
state: state
|
|
40086
|
+
} = this.attribute,
|
|
40087
|
+
line = this.createSegment();
|
|
40088
|
+
line.name = "mark-common-line-line", this._line = line, container.add(line);
|
|
40089
|
+
const markLabel = new Tag(Object.assign(Object.assign({}, label), {
|
|
40090
|
+
state: {
|
|
40091
|
+
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
40092
|
+
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
40093
|
+
}
|
|
40094
|
+
}));
|
|
40095
|
+
markLabel.name = "mark-common-line-label", this._label = markLabel, container.add(markLabel), this.setLabelPos();
|
|
40134
40096
|
}
|
|
40135
40097
|
updateMarker() {
|
|
40136
|
-
|
|
40098
|
+
const {
|
|
40099
|
+
label: label,
|
|
40100
|
+
state: state
|
|
40101
|
+
} = this.attribute;
|
|
40102
|
+
this.setLineAttributes(), this._label && (this._label.setAttributes(Object.assign(Object.assign({
|
|
40103
|
+
dx: 0,
|
|
40104
|
+
dy: 0
|
|
40105
|
+
}, label), {
|
|
40106
|
+
state: {
|
|
40107
|
+
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
40108
|
+
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
40109
|
+
}
|
|
40110
|
+
})), this.setLabelPos());
|
|
40137
40111
|
}
|
|
40138
40112
|
}
|
|
40139
|
-
mixin(MarkCommonLine, MarkLabelMixin);
|
|
40140
40113
|
|
|
40141
40114
|
const FUZZY_EQUAL_DELTA = .001;
|
|
40142
40115
|
const DEFAULT_MARK_LINE_THEME = {
|
|
@@ -40325,7 +40298,6 @@
|
|
|
40325
40298
|
lineWidth: 0
|
|
40326
40299
|
},
|
|
40327
40300
|
label: {
|
|
40328
|
-
autoRotate: !0,
|
|
40329
40301
|
position: IMarkCommonArcLabelPosition.arcOuterMiddle,
|
|
40330
40302
|
refX: 0,
|
|
40331
40303
|
refY: 0,
|
|
@@ -40380,7 +40352,6 @@
|
|
|
40380
40352
|
const DEFAULT_MARK_ARC_AREA_THEME = {
|
|
40381
40353
|
interactive: !0,
|
|
40382
40354
|
label: {
|
|
40383
|
-
autoRotate: !0,
|
|
40384
40355
|
position: IMarkCommonArcLabelPosition.arcOuterMiddle,
|
|
40385
40356
|
textStyle: {
|
|
40386
40357
|
fill: "#fff",
|
|
@@ -40636,12 +40607,15 @@
|
|
|
40636
40607
|
constructor(attributes, options) {
|
|
40637
40608
|
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkLine.defaultAttributes, attributes)), this.name = "markLine";
|
|
40638
40609
|
}
|
|
40639
|
-
getPointAttrByPosition(position
|
|
40610
|
+
getPointAttrByPosition(position) {
|
|
40640
40611
|
var _a;
|
|
40641
40612
|
const {
|
|
40613
|
+
label = {}
|
|
40614
|
+
} = this.attribute,
|
|
40615
|
+
{
|
|
40642
40616
|
refX = 0,
|
|
40643
40617
|
refY = 0
|
|
40644
|
-
} =
|
|
40618
|
+
} = label,
|
|
40645
40619
|
points = this._line.getMainSegmentPoints(),
|
|
40646
40620
|
lineEndAngle = null !== (_a = this._line.getEndAngle()) && void 0 !== _a ? _a : 0,
|
|
40647
40621
|
labelAngle = (lineEndAngle),
|
|
@@ -40667,9 +40641,9 @@
|
|
|
40667
40641
|
angle: labelAngle
|
|
40668
40642
|
};
|
|
40669
40643
|
}
|
|
40670
|
-
getRotateByAngle(angle
|
|
40644
|
+
getRotateByAngle(angle) {
|
|
40671
40645
|
var _a;
|
|
40672
|
-
return (isPostiveXAxis(angle) ? angle : angle - Math.PI) + (null !== (_a =
|
|
40646
|
+
return (isPostiveXAxis(angle) ? angle : angle - Math.PI) + (null !== (_a = this.attribute.label.refAngle) && void 0 !== _a ? _a : 0);
|
|
40673
40647
|
}
|
|
40674
40648
|
getTextStyle(position, labelAngle, autoRotate) {
|
|
40675
40649
|
return fuzzyEqualNumber(Math.abs(labelAngle), Math.PI / 2, FUZZY_EQUAL_DELTA) || fuzzyEqualNumber(Math.abs(labelAngle), 3 * Math.PI / 2, FUZZY_EQUAL_DELTA) ? getTextAlignAttrOfVerticalDir(autoRotate, labelAngle, position) : isPostiveXAxis(labelAngle) ? DEFAULT_CARTESIAN_MARK_LINE_TEXT_STYLE_MAP.postiveXAxis[position] : DEFAULT_CARTESIAN_MARK_LINE_TEXT_STYLE_MAP.negativeXAxis[position];
|
|
@@ -40735,12 +40709,6 @@
|
|
|
40735
40709
|
});else if (!isValidNumber$1(point.x) || !isValidNumber$1(point.y)) return void (validFlag = !1);
|
|
40736
40710
|
}), validFlag;
|
|
40737
40711
|
}
|
|
40738
|
-
addMarkLineLabels(container) {
|
|
40739
|
-
this._addMarkLabels(container, "mark-common-line-label", MarkLine.defaultAttributes.label);
|
|
40740
|
-
}
|
|
40741
|
-
updateMarkLineLabels() {
|
|
40742
|
-
this._updateMarkLabels(MarkLine.defaultAttributes.label);
|
|
40743
|
-
}
|
|
40744
40712
|
}
|
|
40745
40713
|
MarkLine.defaultAttributes = DEFAULT_MARK_LINE_THEME;
|
|
40746
40714
|
|
|
@@ -40755,6 +40723,9 @@
|
|
|
40755
40723
|
getArea() {
|
|
40756
40724
|
return this._area;
|
|
40757
40725
|
}
|
|
40726
|
+
getLabel() {
|
|
40727
|
+
return this._label;
|
|
40728
|
+
}
|
|
40758
40729
|
constructor(attributes, options) {
|
|
40759
40730
|
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArea.defaultAttributes, attributes)), this.name = "markArea", this.defaultUpdateAnimation = DefaultUpdateMarkAreaAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
|
|
40760
40731
|
}
|
|
@@ -40771,21 +40742,24 @@
|
|
|
40771
40742
|
};
|
|
40772
40743
|
return (position.includes("left") || position.includes("Left")) && (result.x = x1), (position.includes("right") || position.includes("Right")) && (result.x = x2), (position.includes("top") || position.includes("Top")) && (result.y = y1), (position.includes("bottom") || position.includes("Bottom")) && (result.y = y2), result;
|
|
40773
40744
|
}
|
|
40774
|
-
setLabelPos(
|
|
40745
|
+
setLabelPos() {
|
|
40775
40746
|
var _a;
|
|
40776
|
-
if (this._area) {
|
|
40777
|
-
const
|
|
40747
|
+
if (this._label && this._area) {
|
|
40748
|
+
const {
|
|
40749
|
+
label = {}
|
|
40750
|
+
} = this.attribute,
|
|
40751
|
+
labelPosition = null !== (_a = label.position) && void 0 !== _a ? _a : "middle",
|
|
40778
40752
|
labelPoint = this.getPointAttrByPosition(labelPosition);
|
|
40779
|
-
if (
|
|
40780
|
-
textStyle: Object.assign(Object.assign({}, DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP[labelPosition]),
|
|
40781
|
-
})), this.attribute.limitRect &&
|
|
40753
|
+
if (this._label.setAttributes(Object.assign(Object.assign({}, labelPoint), {
|
|
40754
|
+
textStyle: Object.assign(Object.assign({}, DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP[labelPosition]), label.textStyle)
|
|
40755
|
+
})), this.attribute.limitRect && label.confine) {
|
|
40782
40756
|
const {
|
|
40783
40757
|
x: x,
|
|
40784
40758
|
y: y,
|
|
40785
40759
|
width: width,
|
|
40786
40760
|
height: height
|
|
40787
40761
|
} = this.attribute.limitRect;
|
|
40788
|
-
limitShapeInBounds(
|
|
40762
|
+
limitShapeInBounds(this._label, {
|
|
40789
40763
|
x1: x,
|
|
40790
40764
|
y1: y,
|
|
40791
40765
|
x2: x + width,
|
|
@@ -40797,23 +40771,40 @@
|
|
|
40797
40771
|
initMarker(container) {
|
|
40798
40772
|
const {
|
|
40799
40773
|
points: points,
|
|
40774
|
+
label: label,
|
|
40800
40775
|
areaStyle: areaStyle,
|
|
40801
40776
|
state: state
|
|
40802
40777
|
} = this.attribute,
|
|
40803
40778
|
area = graphicCreator.polygon(Object.assign({
|
|
40804
40779
|
points: points
|
|
40805
40780
|
}, areaStyle));
|
|
40806
|
-
area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area), area.name = "mark-area-polygon", this._area = area, container.add(area)
|
|
40781
|
+
area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area), area.name = "mark-area-polygon", this._area = area, container.add(area);
|
|
40782
|
+
const markLabel = new Tag(Object.assign(Object.assign({}, label), {
|
|
40783
|
+
state: {
|
|
40784
|
+
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
40785
|
+
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
40786
|
+
}
|
|
40787
|
+
}));
|
|
40788
|
+
markLabel.name = "mark-area-label", this._label = markLabel, container.add(markLabel), this.setLabelPos();
|
|
40807
40789
|
}
|
|
40808
40790
|
updateMarker() {
|
|
40809
40791
|
const {
|
|
40810
40792
|
points: points,
|
|
40793
|
+
label: label,
|
|
40811
40794
|
areaStyle: areaStyle,
|
|
40812
40795
|
state: state
|
|
40813
40796
|
} = this.attribute;
|
|
40814
40797
|
this._area && (this._area.setAttributes(Object.assign({
|
|
40815
40798
|
points: points
|
|
40816
|
-
}, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this.
|
|
40799
|
+
}, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this._label && this._label.setAttributes(Object.assign(Object.assign({
|
|
40800
|
+
dx: 0,
|
|
40801
|
+
dy: 0
|
|
40802
|
+
}, label), {
|
|
40803
|
+
state: {
|
|
40804
|
+
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
40805
|
+
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
40806
|
+
}
|
|
40807
|
+
})), this.setLabelPos();
|
|
40817
40808
|
}
|
|
40818
40809
|
isValidPoints() {
|
|
40819
40810
|
const {
|
|
@@ -40826,7 +40817,7 @@
|
|
|
40826
40817
|
}), validFlag;
|
|
40827
40818
|
}
|
|
40828
40819
|
}
|
|
40829
|
-
MarkArea.defaultAttributes = DEFAULT_MARK_AREA_THEME
|
|
40820
|
+
MarkArea.defaultAttributes = DEFAULT_MARK_AREA_THEME;
|
|
40830
40821
|
|
|
40831
40822
|
loadMarkArcLineComponent();
|
|
40832
40823
|
function registerMarkArcLineAnimate() {
|
|
@@ -40837,19 +40828,24 @@
|
|
|
40837
40828
|
MarkArcLine._animate && this._animationConfig && MarkArcLine._animate(this._line, this._label, this._animationConfig, state);
|
|
40838
40829
|
}
|
|
40839
40830
|
constructor(attributes, options) {
|
|
40840
|
-
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcLine.defaultAttributes, attributes
|
|
40831
|
+
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcLine.defaultAttributes, attributes, {
|
|
40832
|
+
label: {
|
|
40833
|
+
autoRotate: !0
|
|
40834
|
+
}
|
|
40835
|
+
})), this.name = "markArcLine";
|
|
40841
40836
|
}
|
|
40842
|
-
getPointAttrByPosition(direction
|
|
40837
|
+
getPointAttrByPosition(direction) {
|
|
40843
40838
|
const {
|
|
40844
40839
|
center: center,
|
|
40845
40840
|
radius: radius,
|
|
40846
40841
|
startAngle: startAngle,
|
|
40847
|
-
endAngle: endAngle
|
|
40842
|
+
endAngle: endAngle,
|
|
40843
|
+
label: label
|
|
40848
40844
|
} = this.attribute,
|
|
40849
40845
|
{
|
|
40850
40846
|
refX = 0,
|
|
40851
40847
|
refY = 0
|
|
40852
|
-
} =
|
|
40848
|
+
} = label;
|
|
40853
40849
|
let angle;
|
|
40854
40850
|
switch (direction) {
|
|
40855
40851
|
case IMarkCommonArcLabelPosition.arcInnerStart:
|
|
@@ -40879,9 +40875,9 @@
|
|
|
40879
40875
|
getTextStyle(position) {
|
|
40880
40876
|
return DEFAULT_POLAR_MARKER_TEXT_STYLE_MAP[position];
|
|
40881
40877
|
}
|
|
40882
|
-
getRotateByAngle(angle
|
|
40878
|
+
getRotateByAngle(angle) {
|
|
40883
40879
|
var _a;
|
|
40884
|
-
return angle - Math.PI / 2 + (null !== (_a =
|
|
40880
|
+
return angle - Math.PI / 2 + (null !== (_a = this.attribute.label.refAngle) && void 0 !== _a ? _a : 0);
|
|
40885
40881
|
}
|
|
40886
40882
|
createSegment() {
|
|
40887
40883
|
const {
|
|
@@ -40938,12 +40934,6 @@
|
|
|
40938
40934
|
isValidPoints() {
|
|
40939
40935
|
return !0;
|
|
40940
40936
|
}
|
|
40941
|
-
addMarkLineLabels(container) {
|
|
40942
|
-
this._addMarkLabels(container, "mark-common-line-label", MarkArcLine.defaultAttributes.label);
|
|
40943
|
-
}
|
|
40944
|
-
updateMarkLineLabels() {
|
|
40945
|
-
this._updateMarkLabels(MarkArcLine.defaultAttributes.label);
|
|
40946
|
-
}
|
|
40947
40937
|
}
|
|
40948
40938
|
MarkArcLine.defaultAttributes = DEFAULT_MARK_ARC_LINE_THEME;
|
|
40949
40939
|
|
|
@@ -40958,21 +40948,29 @@
|
|
|
40958
40948
|
getArea() {
|
|
40959
40949
|
return this._area;
|
|
40960
40950
|
}
|
|
40951
|
+
getLabel() {
|
|
40952
|
+
return this._label;
|
|
40953
|
+
}
|
|
40961
40954
|
constructor(attributes, options) {
|
|
40962
|
-
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcArea.defaultAttributes, attributes
|
|
40955
|
+
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcArea.defaultAttributes, attributes, {
|
|
40956
|
+
label: {
|
|
40957
|
+
autoRotate: !0
|
|
40958
|
+
}
|
|
40959
|
+
})), this.name = "markArcArea", this.defaultUpdateAnimation = DefaultUpdateMarkAreaAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
|
|
40963
40960
|
}
|
|
40964
|
-
getPointAttrByPosition(position
|
|
40961
|
+
getPointAttrByPosition(position) {
|
|
40965
40962
|
const {
|
|
40966
40963
|
center: center,
|
|
40967
40964
|
innerRadius: innerRadius,
|
|
40968
40965
|
outerRadius: outerRadius,
|
|
40969
40966
|
startAngle: startAngle,
|
|
40970
|
-
endAngle: endAngle
|
|
40967
|
+
endAngle: endAngle,
|
|
40968
|
+
label: label
|
|
40971
40969
|
} = this.attribute,
|
|
40972
40970
|
{
|
|
40973
40971
|
refX = 0,
|
|
40974
40972
|
refY = 0
|
|
40975
|
-
} =
|
|
40973
|
+
} = label;
|
|
40976
40974
|
let radius, angle;
|
|
40977
40975
|
switch (position) {
|
|
40978
40976
|
case IMarkCommonArcLabelPosition.center:
|
|
@@ -41007,25 +41005,28 @@
|
|
|
41007
41005
|
angle: angle
|
|
41008
41006
|
};
|
|
41009
41007
|
}
|
|
41010
|
-
setLabelPos(
|
|
41008
|
+
setLabelPos() {
|
|
41011
41009
|
var _a;
|
|
41012
|
-
if (this._area) {
|
|
41010
|
+
if (this._label && this._area) {
|
|
41013
41011
|
const {
|
|
41012
|
+
label = {}
|
|
41013
|
+
} = this.attribute,
|
|
41014
|
+
{
|
|
41014
41015
|
position: labelPosition = "arcInnerMiddle",
|
|
41015
41016
|
autoRotate: autoRotate
|
|
41016
|
-
} =
|
|
41017
|
-
labelAttr = this.getPointAttrByPosition(labelPosition
|
|
41018
|
-
if (
|
|
41019
|
-
angle: autoRotate ? labelAttr.angle - Math.PI / 2 + (null !== (_a =
|
|
41020
|
-
textStyle: Object.assign(Object.assign({}, DEFAULT_POLAR_MARKER_TEXT_STYLE_MAP[labelPosition]),
|
|
41021
|
-
})), this.attribute.limitRect &&
|
|
41017
|
+
} = label,
|
|
41018
|
+
labelAttr = this.getPointAttrByPosition(labelPosition);
|
|
41019
|
+
if (this._label.setAttributes(Object.assign(Object.assign({}, labelAttr.position), {
|
|
41020
|
+
angle: autoRotate ? labelAttr.angle - Math.PI / 2 + (null !== (_a = label.refAngle) && void 0 !== _a ? _a : 0) : 0,
|
|
41021
|
+
textStyle: Object.assign(Object.assign({}, DEFAULT_POLAR_MARKER_TEXT_STYLE_MAP[labelPosition]), label.textStyle)
|
|
41022
|
+
})), this.attribute.limitRect && label.confine) {
|
|
41022
41023
|
const {
|
|
41023
41024
|
x: x,
|
|
41024
41025
|
y: y,
|
|
41025
41026
|
width: width,
|
|
41026
41027
|
height: height
|
|
41027
41028
|
} = this.attribute.limitRect;
|
|
41028
|
-
limitShapeInBounds(
|
|
41029
|
+
limitShapeInBounds(this._label, {
|
|
41029
41030
|
x1: x,
|
|
41030
41031
|
y1: y,
|
|
41031
41032
|
x2: x + width,
|
|
@@ -41042,6 +41043,7 @@
|
|
|
41042
41043
|
startAngle: startAngle,
|
|
41043
41044
|
endAngle: endAngle,
|
|
41044
41045
|
areaStyle: areaStyle,
|
|
41046
|
+
label: label,
|
|
41045
41047
|
state: state
|
|
41046
41048
|
} = this.attribute,
|
|
41047
41049
|
area = graphicCreator.arc(Object.assign({
|
|
@@ -41052,7 +41054,14 @@
|
|
|
41052
41054
|
startAngle: startAngle,
|
|
41053
41055
|
endAngle: endAngle
|
|
41054
41056
|
}, areaStyle));
|
|
41055
|
-
area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area), area.name = "polar-mark-area-area", this._area = area, container.add(area)
|
|
41057
|
+
area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area), area.name = "polar-mark-area-area", this._area = area, container.add(area);
|
|
41058
|
+
const markLabel = new Tag(Object.assign(Object.assign({}, label), {
|
|
41059
|
+
state: {
|
|
41060
|
+
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
41061
|
+
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
41062
|
+
}
|
|
41063
|
+
}));
|
|
41064
|
+
markLabel.name = "mark-area-label", this._label = markLabel, container.add(markLabel), this.setLabelPos();
|
|
41056
41065
|
}
|
|
41057
41066
|
updateMarker() {
|
|
41058
41067
|
const {
|
|
@@ -41072,13 +41081,21 @@
|
|
|
41072
41081
|
outerRadius: outerRadius,
|
|
41073
41082
|
startAngle: startAngle,
|
|
41074
41083
|
endAngle: endAngle
|
|
41075
|
-
}, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this.
|
|
41084
|
+
}, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this._label && (this._label.setAttributes(Object.assign(Object.assign({
|
|
41085
|
+
dx: 0,
|
|
41086
|
+
dy: 0
|
|
41087
|
+
}, label), {
|
|
41088
|
+
state: {
|
|
41089
|
+
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
41090
|
+
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
41091
|
+
}
|
|
41092
|
+
})), this.setLabelPos());
|
|
41076
41093
|
}
|
|
41077
41094
|
isValidPoints() {
|
|
41078
41095
|
return !0;
|
|
41079
41096
|
}
|
|
41080
41097
|
}
|
|
41081
|
-
MarkArcArea.defaultAttributes = DEFAULT_MARK_ARC_AREA_THEME
|
|
41098
|
+
MarkArcArea.defaultAttributes = DEFAULT_MARK_ARC_AREA_THEME;
|
|
41082
41099
|
|
|
41083
41100
|
loadMarkPointComponent();
|
|
41084
41101
|
function registerMarkPointAnimate() {
|
|
@@ -42598,16 +42615,19 @@
|
|
|
42598
42615
|
} = this.attribute;
|
|
42599
42616
|
tooltip && tooltip.alwaysShow || (this._tooltipState = null, this._tooltipShape && this._tooltipShape.setAttribute("visible", !1), this._tooltipText && this._tooltipText.setAttribute("visible", !1), this._dispatchTooltipEvent("sliderTooltipHide"));
|
|
42600
42617
|
}, this._onHandlerPointerdown = e => {
|
|
42601
|
-
e.stopPropagation(), this._isChanging = !0;
|
|
42618
|
+
e.stopPropagation(), this._clearAllDragEvents(), this._isChanging = !0;
|
|
42602
42619
|
const {
|
|
42603
42620
|
x: x,
|
|
42604
42621
|
y: y
|
|
42605
42622
|
} = this.stage.eventPointTransform(e);
|
|
42606
|
-
this._currentHandler = e.target, this._prePos = this._isHorizontal ? x : y
|
|
42607
|
-
|
|
42608
|
-
|
|
42623
|
+
this._currentHandler = e.target, this._prePos = this._isHorizontal ? x : y;
|
|
42624
|
+
const triggers = getEndTriggersOfDrag(),
|
|
42625
|
+
obj = "browser" === vglobal.env ? vglobal : this.stage;
|
|
42626
|
+
obj.addEventListener("pointermove", this._onHandlerPointerMove, {
|
|
42609
42627
|
capture: !0
|
|
42610
|
-
}),
|
|
42628
|
+
}), triggers.forEach(trigger => {
|
|
42629
|
+
obj.addEventListener(trigger, this._onHandlerPointerUp);
|
|
42630
|
+
});
|
|
42611
42631
|
}, this._onHandlerPointerMove = e => {
|
|
42612
42632
|
var _a, _b;
|
|
42613
42633
|
e.stopPropagation(), this._isChanging = !0;
|
|
@@ -42631,22 +42651,21 @@
|
|
|
42631
42651
|
currentValue = this.calculateValueByPos(newPos);
|
|
42632
42652
|
"text" === this._currentHandler.type ? this._updateHandlerText(this._currentHandler, newPos, currentValue) : this._updateHandler(this._currentHandler, newPos, currentValue), this._updateTrack(), this._prePos = currentPos, this._dispatchChangeEvent();
|
|
42633
42653
|
}, this._onHandlerPointerUp = e => {
|
|
42634
|
-
e.preventDefault(), this._isChanging = !1, this._currentHandler = null,
|
|
42635
|
-
capture: !0
|
|
42636
|
-
}), vglobal.removeEventListener("pointerup", this._onHandlerPointerUp)) : (this.stage.removeEventListener("pointermove", this._onHandlerPointerMove, {
|
|
42637
|
-
capture: !0
|
|
42638
|
-
}), this.stage.removeEventListener("pointerup", this._onHandlerPointerUp), this.stage.removeEventListener("pointerupoutside", this._onHandlerPointerUp));
|
|
42654
|
+
e.preventDefault(), this._isChanging = !1, this._currentHandler = null, this._clearAllDragEvents();
|
|
42639
42655
|
}, this._onTrackPointerdown = e => {
|
|
42640
|
-
e.stopPropagation(), this._isChanging = !0;
|
|
42656
|
+
e.stopPropagation(), this._clearAllDragEvents(), this._isChanging = !0;
|
|
42641
42657
|
const {
|
|
42642
42658
|
x: x,
|
|
42643
42659
|
y: y
|
|
42644
42660
|
} = this.stage.eventPointTransform(e);
|
|
42645
|
-
this._prePos = this._isHorizontal ? x : y
|
|
42646
|
-
|
|
42647
|
-
|
|
42661
|
+
this._prePos = this._isHorizontal ? x : y;
|
|
42662
|
+
const triggers = getEndTriggersOfDrag(),
|
|
42663
|
+
obj = "browser" === vglobal.env ? vglobal : this.stage;
|
|
42664
|
+
obj.addEventListener("pointermove", this._onTrackPointerMove, {
|
|
42648
42665
|
capture: !0
|
|
42649
|
-
}),
|
|
42666
|
+
}), triggers.forEach(trigger => {
|
|
42667
|
+
obj.addEventListener(trigger, this._onTrackPointerUp);
|
|
42668
|
+
});
|
|
42650
42669
|
}, this._onTrackPointerMove = e => {
|
|
42651
42670
|
e.stopPropagation(), this._isChanging = !0;
|
|
42652
42671
|
const {
|
|
@@ -42689,13 +42708,9 @@
|
|
|
42689
42708
|
}
|
|
42690
42709
|
this._prePos = currentPos, this._dispatchChangeEvent();
|
|
42691
42710
|
}, this._onTrackPointerUp = e => {
|
|
42692
|
-
e.preventDefault(), this._isChanging = !1,
|
|
42693
|
-
capture: !0
|
|
42694
|
-
}), vglobal.removeEventListener("pointerup", this._onTrackPointerUp)) : (this.stage.removeEventListener("pointermove", this._onTrackPointerMove, {
|
|
42695
|
-
capture: !0
|
|
42696
|
-
}), this.stage.removeEventListener("pointerup", this._onTrackPointerUp), this.stage.removeEventListener("pointerupoutside", this._onTrackPointerUp));
|
|
42711
|
+
e.preventDefault(), this._isChanging = !1, this._clearAllDragEvents();
|
|
42697
42712
|
}, this._onRailPointerDown = e => {
|
|
42698
|
-
e.stopPropagation(), this._isChanging = !0;
|
|
42713
|
+
e.stopPropagation(), this._clearAllDragEvents(), this._isChanging = !0;
|
|
42699
42714
|
const {
|
|
42700
42715
|
railWidth: railWidth,
|
|
42701
42716
|
railHeight: railHeight,
|
|
@@ -43021,6 +43036,19 @@
|
|
|
43021
43036
|
_bindTooltipEvents() {
|
|
43022
43037
|
this.attribute.disableTriggerEvent || (this._mainContainer.addEventListener("pointerenter", this._onTooltipShow), this._mainContainer.addEventListener("pointermove", this._onTooltipUpdate), this._mainContainer.addEventListener("pointerleave", this._onTooltipHide));
|
|
43023
43038
|
}
|
|
43039
|
+
_clearAllDragEvents() {
|
|
43040
|
+
const triggers = getEndTriggersOfDrag(),
|
|
43041
|
+
obj = "browser" === vglobal.env ? vglobal : this.stage;
|
|
43042
|
+
obj.removeEventListener("pointermove", this._onHandlerPointerMove, {
|
|
43043
|
+
capture: !0
|
|
43044
|
+
}), triggers.forEach(trigger => {
|
|
43045
|
+
obj.removeEventListener(trigger, this._onHandlerPointerUp);
|
|
43046
|
+
}), obj.removeEventListener("pointermove", this._onTrackPointerMove, {
|
|
43047
|
+
capture: !0
|
|
43048
|
+
}), triggers.forEach(trigger => {
|
|
43049
|
+
obj.removeEventListener(trigger, this._onTrackPointerUp);
|
|
43050
|
+
});
|
|
43051
|
+
}
|
|
43024
43052
|
_updateTrack() {
|
|
43025
43053
|
const {
|
|
43026
43054
|
inverse: inverse,
|
|
@@ -63658,7 +63686,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63658
63686
|
};
|
|
63659
63687
|
registerVChartCore();
|
|
63660
63688
|
|
|
63661
|
-
const version = "1.13.9-alpha.
|
|
63689
|
+
const version = "1.13.9-alpha.3";
|
|
63662
63690
|
|
|
63663
63691
|
const addVChartProperty = (data, op) => {
|
|
63664
63692
|
const context = op.beforeCall();
|
|
@@ -98029,14 +98057,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98029
98057
|
return 'cartesian';
|
|
98030
98058
|
}
|
|
98031
98059
|
_createMarkerComponent() {
|
|
98032
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
98033
|
-
const { startSymbol = {}, endSymbol = {} } = this._spec;
|
|
98034
|
-
const label = array((_a = this._spec.label) !== null && _a !== void 0 ? _a : {});
|
|
98060
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
98061
|
+
const { label = {}, startSymbol = {}, endSymbol = {} } = this._spec;
|
|
98035
98062
|
const markLineAttrs = {
|
|
98036
98063
|
zIndex: this.layoutZIndex,
|
|
98037
|
-
interactive: (
|
|
98038
|
-
hover: (
|
|
98039
|
-
select: (
|
|
98064
|
+
interactive: (_a = this._spec.interactive) !== null && _a !== void 0 ? _a : true,
|
|
98065
|
+
hover: (_b = this._spec.interactive) !== null && _b !== void 0 ? _b : true,
|
|
98066
|
+
select: (_c = this._spec.interactive) !== null && _c !== void 0 ? _c : true,
|
|
98040
98067
|
points: [
|
|
98041
98068
|
{ x: 0, y: 0 },
|
|
98042
98069
|
{ x: 0, y: 0 }
|
|
@@ -98048,25 +98075,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98048
98075
|
radius: 0,
|
|
98049
98076
|
startAngle: 0,
|
|
98050
98077
|
endAngle: 0,
|
|
98051
|
-
lineStyle: transformStyle(transformToGraphic((
|
|
98052
|
-
clipInRange: (
|
|
98053
|
-
label: label.
|
|
98054
|
-
return transformLabelAttributes(labelItem, this._markerData, this._markAttributeContext);
|
|
98055
|
-
}),
|
|
98078
|
+
lineStyle: transformStyle(transformToGraphic((_d = this._spec.line) === null || _d === void 0 ? void 0 : _d.style), this._markerData, this._markAttributeContext),
|
|
98079
|
+
clipInRange: (_e = this._spec.clip) !== null && _e !== void 0 ? _e : false,
|
|
98080
|
+
label: transformLabelAttributes(label, this._markerData, this._markAttributeContext),
|
|
98056
98081
|
state: {
|
|
98057
|
-
line: transformState((
|
|
98058
|
-
lineStartSymbol: transformState((
|
|
98059
|
-
lineEndSymbol: transformState((
|
|
98060
|
-
label: label.
|
|
98061
|
-
|
|
98062
|
-
return transformState((_a = labelItem.state) !== null && _a !== void 0 ? _a : {}, this._markerData, this._markAttributeContext);
|
|
98063
|
-
}),
|
|
98064
|
-
labelBackground: label.map(labelItem => {
|
|
98065
|
-
var _a, _b;
|
|
98066
|
-
return transformState((_b = (_a = labelItem.labelBackground) === null || _a === void 0 ? void 0 : _a.state) !== null && _b !== void 0 ? _b : {}, this._markerData, this._markAttributeContext);
|
|
98067
|
-
})
|
|
98082
|
+
line: transformState((_g = (_f = this._spec.line) === null || _f === void 0 ? void 0 : _f.state) !== null && _g !== void 0 ? _g : {}, this._markerData, this._markAttributeContext),
|
|
98083
|
+
lineStartSymbol: transformState((_j = (_h = this._spec.startSymbol) === null || _h === void 0 ? void 0 : _h.state) !== null && _j !== void 0 ? _j : {}, this._markerData, this._markAttributeContext),
|
|
98084
|
+
lineEndSymbol: transformState((_l = (_k = this._spec.endSymbol) === null || _k === void 0 ? void 0 : _k.state) !== null && _l !== void 0 ? _l : {}, this._markerData, this._markAttributeContext),
|
|
98085
|
+
label: transformState((_p = (_o = (_m = this._spec) === null || _m === void 0 ? void 0 : _m.label) === null || _o === void 0 ? void 0 : _o.state) !== null && _p !== void 0 ? _p : {}, this._markerData, this._markAttributeContext),
|
|
98086
|
+
labelBackground: transformState((_t = (_s = (_r = (_q = this._spec) === null || _q === void 0 ? void 0 : _q.label) === null || _r === void 0 ? void 0 : _r.labelBackground) === null || _s === void 0 ? void 0 : _s.state) !== null && _t !== void 0 ? _t : {}, this._markerData, this._markAttributeContext)
|
|
98068
98087
|
},
|
|
98069
|
-
animation: (
|
|
98088
|
+
animation: (_u = this._spec.animation) !== null && _u !== void 0 ? _u : false,
|
|
98070
98089
|
animationEnter: this._spec.animationEnter,
|
|
98071
98090
|
animationExit: this._spec.animationExit,
|
|
98072
98091
|
animationUpdate: this._spec.animationUpdate
|
|
@@ -98091,7 +98110,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98091
98110
|
return markLine;
|
|
98092
98111
|
}
|
|
98093
98112
|
_getUpdateMarkerAttrs() {
|
|
98094
|
-
var _a, _b;
|
|
98113
|
+
var _a, _b, _c, _d;
|
|
98095
98114
|
const spec = this._spec;
|
|
98096
98115
|
const data = this._markerData;
|
|
98097
98116
|
const startRelativeSeries = this._startRelativeSeries;
|
|
@@ -98101,7 +98120,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98101
98120
|
const seriesData = relativeSeries.getViewData().latestData;
|
|
98102
98121
|
const dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
|
|
98103
98122
|
let limitRect;
|
|
98104
|
-
if (spec.clip ||
|
|
98123
|
+
if (spec.clip || ((_a = spec.label) === null || _a === void 0 ? void 0 : _a.confine)) {
|
|
98105
98124
|
const { minX, maxX, minY, maxY } = computeClipRange([
|
|
98106
98125
|
startRelativeSeries.getRegion(),
|
|
98107
98126
|
endRelativeSeries.getRegion(),
|
|
@@ -98114,13 +98133,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98114
98133
|
height: maxY - minY
|
|
98115
98134
|
};
|
|
98116
98135
|
}
|
|
98117
|
-
const markerComponentAttr = (
|
|
98118
|
-
const
|
|
98119
|
-
|
|
98120
|
-
|
|
98121
|
-
const specLabel = specLabels[index] || {};
|
|
98122
|
-
return Object.assign(Object.assign({}, prevLabel), { text: specLabel.formatMethod ? specLabel.formatMethod(dataPoints, seriesData) : prevLabel === null || prevLabel === void 0 ? void 0 : prevLabel.text });
|
|
98123
|
-
});
|
|
98136
|
+
const markerComponentAttr = (_c = (_b = this._markerComponent) === null || _b === void 0 ? void 0 : _b.attribute) !== null && _c !== void 0 ? _c : {};
|
|
98137
|
+
const labelAttrs = Object.assign(Object.assign({}, markerComponentAttr.label), { text: this._spec.label.formatMethod
|
|
98138
|
+
? this._spec.label.formatMethod(dataPoints, seriesData)
|
|
98139
|
+
: (_d = markerComponentAttr.label) === null || _d === void 0 ? void 0 : _d.text });
|
|
98124
98140
|
return Object.assign(Object.assign({}, pointsAttr), { label: labelAttrs, limitRect, dx: this._layoutOffsetX, dy: this._layoutOffsetY });
|
|
98125
98141
|
}
|
|
98126
98142
|
_markerLayout() {
|
|
@@ -98222,7 +98238,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98222
98238
|
return { points };
|
|
98223
98239
|
}
|
|
98224
98240
|
_markerLayout() {
|
|
98225
|
-
var _a, _b, _c, _d, _e;
|
|
98241
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
98226
98242
|
const updateAttrs = this._getUpdateMarkerAttrs();
|
|
98227
98243
|
if (this._spec.type === 'type-step') {
|
|
98228
98244
|
const startRelativeSeries = this._startRelativeSeries;
|
|
@@ -98249,7 +98265,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98249
98265
|
else {
|
|
98250
98266
|
expandDistanceValue = expandDistance;
|
|
98251
98267
|
}
|
|
98252
|
-
const { points, limitRect } = updateAttrs;
|
|
98268
|
+
const { points, label, limitRect } = updateAttrs;
|
|
98253
98269
|
const joinPoints = getInsertPoints(points[0], points[1], connectDirection, expandDistanceValue);
|
|
98254
98270
|
let labelPositionAttrs;
|
|
98255
98271
|
if (multiSegment && isValid$1(mainSegmentIndex)) {
|
|
@@ -98263,10 +98279,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98263
98279
|
else {
|
|
98264
98280
|
labelPositionAttrs = Object.assign(Object.assign({ position: 'start', autoRotate: false }, getTextOffset(points[0], points[1], connectDirection, expandDistanceValue)), { refX: 0, refY: 0 });
|
|
98265
98281
|
}
|
|
98266
|
-
|
|
98267
|
-
|
|
98268
|
-
|
|
98269
|
-
(
|
|
98282
|
+
if (isValidNumber$1((_a = this._spec.label) === null || _a === void 0 ? void 0 : _a.refX)) {
|
|
98283
|
+
labelPositionAttrs.refX += this._spec.label.refX;
|
|
98284
|
+
}
|
|
98285
|
+
if (isValidNumber$1((_b = this._spec.label) === null || _b === void 0 ? void 0 : _b.refY)) {
|
|
98286
|
+
labelPositionAttrs.refY += this._spec.label.refY;
|
|
98287
|
+
}
|
|
98288
|
+
if (isValidNumber$1((_c = this._spec.label) === null || _c === void 0 ? void 0 : _c.dx)) {
|
|
98289
|
+
labelPositionAttrs.dx = (labelPositionAttrs.dx || 0) + this._spec.label.dx;
|
|
98290
|
+
}
|
|
98291
|
+
if (isValidNumber$1((_d = this._spec.label) === null || _d === void 0 ? void 0 : _d.dy)) {
|
|
98292
|
+
labelPositionAttrs.dy = (labelPositionAttrs.dy || 0) + this._spec.label.dy;
|
|
98293
|
+
}
|
|
98294
|
+
const markerComponentAttr = (_f = (_e = this._markerComponent) === null || _e === void 0 ? void 0 : _e.attribute) !== null && _f !== void 0 ? _f : {};
|
|
98295
|
+
(_g = this._markerComponent) === null || _g === void 0 ? void 0 : _g.setAttributes({
|
|
98270
98296
|
points: multiSegment
|
|
98271
98297
|
? [
|
|
98272
98298
|
[joinPoints[0], joinPoints[1]],
|
|
@@ -98274,22 +98300,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98274
98300
|
[joinPoints[2], joinPoints[3]]
|
|
98275
98301
|
]
|
|
98276
98302
|
: joinPoints,
|
|
98277
|
-
label: label.
|
|
98278
|
-
var _a;
|
|
98279
|
-
if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.refX)) {
|
|
98280
|
-
labelPositionAttrs.refX += labelItem.refX;
|
|
98281
|
-
}
|
|
98282
|
-
if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.refY)) {
|
|
98283
|
-
labelPositionAttrs.refY += labelItem.refY;
|
|
98284
|
-
}
|
|
98285
|
-
if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.dx)) {
|
|
98286
|
-
labelPositionAttrs.dx = (labelPositionAttrs.dx || 0) + labelItem.dx;
|
|
98287
|
-
}
|
|
98288
|
-
if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.dy)) {
|
|
98289
|
-
labelPositionAttrs.dy = (labelPositionAttrs.dy || 0) + labelItem.dy;
|
|
98290
|
-
}
|
|
98291
|
-
return Object.assign(Object.assign(Object.assign({}, labelItem), labelPositionAttrs), { textStyle: Object.assign(Object.assign({}, (_a = prevLabelAttrs[index]) === null || _a === void 0 ? void 0 : _a.textStyle), { textAlign: 'center', textBaseline: 'middle' }) });
|
|
98292
|
-
}),
|
|
98303
|
+
label: Object.assign(Object.assign(Object.assign({}, label), labelPositionAttrs), { textStyle: Object.assign(Object.assign({}, markerComponentAttr.label.textStyle), { textAlign: 'center', textBaseline: 'middle' }) }),
|
|
98293
98304
|
limitRect,
|
|
98294
98305
|
multiSegment,
|
|
98295
98306
|
mainSegmentIndex,
|
|
@@ -98298,7 +98309,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98298
98309
|
});
|
|
98299
98310
|
}
|
|
98300
98311
|
else {
|
|
98301
|
-
(
|
|
98312
|
+
(_h = this._markerComponent) === null || _h === void 0 ? void 0 : _h.setAttributes(updateAttrs);
|
|
98302
98313
|
}
|
|
98303
98314
|
}
|
|
98304
98315
|
_computeOptions() {
|
|
@@ -98652,8 +98663,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98652
98663
|
return 'cartesian';
|
|
98653
98664
|
}
|
|
98654
98665
|
_createMarkerComponent() {
|
|
98655
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
98656
|
-
const label =
|
|
98666
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
98667
|
+
const label = (_a = this._spec.label) !== null && _a !== void 0 ? _a : {};
|
|
98657
98668
|
const markAreaAttrs = {
|
|
98658
98669
|
zIndex: this.layoutZIndex,
|
|
98659
98670
|
interactive: (_b = this._spec.interactive) !== null && _b !== void 0 ? _b : true,
|
|
@@ -98675,20 +98686,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98675
98686
|
endAngle: 0,
|
|
98676
98687
|
areaStyle: transformStyle(transformToGraphic((_e = this._spec.area) === null || _e === void 0 ? void 0 : _e.style), this._markerData, this._markAttributeContext),
|
|
98677
98688
|
clipInRange: (_f = this._spec.clip) !== null && _f !== void 0 ? _f : false,
|
|
98678
|
-
label: label.
|
|
98679
|
-
return transformLabelAttributes(labelItem, this._markerData, this._markAttributeContext);
|
|
98680
|
-
}),
|
|
98689
|
+
label: transformLabelAttributes(label, this._markerData, this._markAttributeContext),
|
|
98681
98690
|
state: {
|
|
98682
98691
|
area: transformState((_g = this._spec.area) === null || _g === void 0 ? void 0 : _g.state, this._markerData, this._markAttributeContext),
|
|
98683
|
-
label:
|
|
98684
|
-
|
|
98685
|
-
}),
|
|
98686
|
-
labelBackground: label.map((labelItem) => {
|
|
98687
|
-
var _a;
|
|
98688
|
-
return transformState((_a = labelItem.labelBackground) === null || _a === void 0 ? void 0 : _a.state, this._markerData, this._markAttributeContext);
|
|
98689
|
-
})
|
|
98692
|
+
label: transformState((_h = this._spec.label) === null || _h === void 0 ? void 0 : _h.state, this._markerData, this._markAttributeContext),
|
|
98693
|
+
labelBackground: transformState((_l = (_k = (_j = this._spec) === null || _j === void 0 ? void 0 : _j.label) === null || _k === void 0 ? void 0 : _k.labelBackground) === null || _l === void 0 ? void 0 : _l.state, this._markerData, this._markAttributeContext)
|
|
98690
98694
|
},
|
|
98691
|
-
animation: (
|
|
98695
|
+
animation: (_m = this._spec.animation) !== null && _m !== void 0 ? _m : false,
|
|
98692
98696
|
animationEnter: this._spec.animationEnter,
|
|
98693
98697
|
animationExit: this._spec.animationExit,
|
|
98694
98698
|
animationUpdate: this._spec.animationUpdate
|
|
@@ -98697,7 +98701,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98697
98701
|
return markArea;
|
|
98698
98702
|
}
|
|
98699
98703
|
_markerLayout() {
|
|
98700
|
-
var _a;
|
|
98704
|
+
var _a, _b, _c, _d;
|
|
98701
98705
|
const spec = this._spec;
|
|
98702
98706
|
const data = this._markerData;
|
|
98703
98707
|
const startRelativeSeries = this._startRelativeSeries;
|
|
@@ -98711,7 +98715,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98711
98715
|
: data.latestData
|
|
98712
98716
|
: seriesData;
|
|
98713
98717
|
let limitRect;
|
|
98714
|
-
if (spec.clip ||
|
|
98718
|
+
if (spec.clip || ((_a = spec.label) === null || _a === void 0 ? void 0 : _a.confine)) {
|
|
98715
98719
|
const { minX, maxX, minY, maxY } = computeClipRange([
|
|
98716
98720
|
startRelativeSeries.getRegion(),
|
|
98717
98721
|
endRelativeSeries.getRegion(),
|
|
@@ -98725,15 +98729,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98725
98729
|
};
|
|
98726
98730
|
}
|
|
98727
98731
|
if (this._markerComponent) {
|
|
98728
|
-
|
|
98729
|
-
|
|
98730
|
-
|
|
98731
|
-
|
|
98732
|
-
return Object.assign(Object.assign({}, prevLabel), { text: specLabel.formatMethod
|
|
98733
|
-
?
|
|
98734
|
-
specLabel.formatMethod(dataPoints, seriesData)
|
|
98735
|
-
: prevLabel === null || prevLabel === void 0 ? void 0 : prevLabel.text });
|
|
98736
|
-
}), limitRect, dx: this._layoutOffsetX, dy: this._layoutOffsetY }));
|
|
98732
|
+
this._markerComponent.setAttributes(Object.assign(Object.assign({}, pointsAttr), { label: Object.assign(Object.assign({}, (_b = this._markerComponent.attribute) === null || _b === void 0 ? void 0 : _b.label), { text: this._spec.label.formatMethod
|
|
98733
|
+
?
|
|
98734
|
+
this._spec.label.formatMethod(dataPoints, seriesData)
|
|
98735
|
+
: (_d = (_c = this._markerComponent.attribute) === null || _c === void 0 ? void 0 : _c.label) === null || _d === void 0 ? void 0 : _d.text }), limitRect, dx: this._layoutOffsetX, dy: this._layoutOffsetY }));
|
|
98737
98736
|
}
|
|
98738
98737
|
}
|
|
98739
98738
|
_initDataView() {
|