@visactor/vchart 1.13.8 → 1.13.9-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es5/index.js +1 -1
- package/build/index.es.js +214 -189
- package/build/index.js +214 -189
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/component/marker/mark-area/base-mark-area.js +27 -17
- package/cjs/component/marker/mark-area/base-mark-area.js.map +1 -1
- package/cjs/component/marker/mark-area/interface/theme.d.ts +4 -3
- package/cjs/component/marker/mark-area/interface/theme.js.map +1 -1
- package/cjs/component/marker/mark-line/base-mark-line.js +31 -20
- package/cjs/component/marker/mark-line/base-mark-line.js.map +1 -1
- package/cjs/component/marker/mark-line/cartesian-mark-line.js +20 -16
- package/cjs/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/cjs/component/marker/mark-line/interface/theme.d.ts +4 -3
- package/cjs/component/marker/mark-line/interface/theme.js.map +1 -1
- package/cjs/constant/funnel.js +2 -1
- package/cjs/constant/sunburst.js +1 -2
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/interface.js +2 -1
- package/cjs/core/vchart.js +1 -2
- package/esm/component/marker/mark-area/base-mark-area.js +27 -16
- package/esm/component/marker/mark-area/base-mark-area.js.map +1 -1
- package/esm/component/marker/mark-area/interface/theme.d.ts +4 -3
- package/esm/component/marker/mark-area/interface/theme.js.map +1 -1
- package/esm/component/marker/mark-line/base-mark-line.js +30 -19
- package/esm/component/marker/mark-line/base-mark-line.js.map +1 -1
- package/esm/component/marker/mark-line/cartesian-mark-line.js +20 -16
- package/esm/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/esm/component/marker/mark-line/interface/theme.d.ts +4 -3
- package/esm/component/marker/mark-line/interface/theme.js.map +1 -1
- package/esm/constant/funnel.js +2 -1
- package/esm/constant/sunburst.js +1 -2
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/interface.js +2 -1
- package/esm/core/vchart.js +1 -2
- package/package.json +7 -7
package/build/index.js
CHANGED
|
@@ -39830,17 +39830,26 @@
|
|
|
39830
39830
|
l.animate().wait(delay + startSymbolDuration + index * stepDuration).to({
|
|
39831
39831
|
clipRange: 1
|
|
39832
39832
|
}, stepDuration, easing);
|
|
39833
|
-
}), graphicFadeIn(line.endSymbol, delay + startSymbolDuration + lineDuration, endSymbolDuration, easing),
|
|
39833
|
+
}), graphicFadeIn(line.endSymbol, delay + startSymbolDuration + lineDuration, endSymbolDuration, easing), array(label).forEach(labelNode => {
|
|
39834
|
+
const delayTime = delay + startSymbolDuration + lineDuration + endSymbolDuration;
|
|
39835
|
+
graphicFadeIn(labelNode.getTextShape(), delayTime, labelDuration, easing), graphicFadeIn(labelNode.getBgRect(), delayTime, labelDuration, easing);
|
|
39836
|
+
});
|
|
39834
39837
|
}
|
|
39835
39838
|
|
|
39836
39839
|
function commonLineFadeIn(line, label, duration, delay, easing) {
|
|
39837
|
-
segmentFadeIn(line, delay, duration, easing),
|
|
39840
|
+
segmentFadeIn(line, delay, duration, easing), array(label).forEach(labelNode => {
|
|
39841
|
+
tagFadeIn(labelNode, delay, duration, easing);
|
|
39842
|
+
});
|
|
39838
39843
|
}
|
|
39839
39844
|
function areaFadeIn(area, label, duration, delay, easing) {
|
|
39840
|
-
graphicFadeIn(area, delay, duration, easing),
|
|
39845
|
+
graphicFadeIn(area, delay, duration, easing), array(label).forEach(labelNode => {
|
|
39846
|
+
tagFadeIn(labelNode, delay, duration, easing);
|
|
39847
|
+
});
|
|
39841
39848
|
}
|
|
39842
39849
|
function arcAreaFadeIn(area, label, duration, delay, easing) {
|
|
39843
|
-
graphicFadeIn(area, delay, duration, easing),
|
|
39850
|
+
graphicFadeIn(area, delay, duration, easing), array(label).forEach(labelNode => {
|
|
39851
|
+
tagFadeIn(labelNode, delay, duration, easing);
|
|
39852
|
+
});
|
|
39844
39853
|
}
|
|
39845
39854
|
function pointFadeIn(itemLine, decorativeLine, item, duration, delay, easing) {
|
|
39846
39855
|
var _a;
|
|
@@ -39848,13 +39857,19 @@
|
|
|
39848
39857
|
}
|
|
39849
39858
|
|
|
39850
39859
|
function commonLineFadeOut(line, label, duration, delay, easing) {
|
|
39851
|
-
segmentFadeOut(line, delay, duration, easing),
|
|
39860
|
+
segmentFadeOut(line, delay, duration, easing), array(label).forEach(labelNode => {
|
|
39861
|
+
tagFadeOut(labelNode, delay, duration, easing);
|
|
39862
|
+
});
|
|
39852
39863
|
}
|
|
39853
39864
|
function areaFadeOut(area, label, duration, delay, easing) {
|
|
39854
|
-
graphicFadeOut(area, delay, duration, easing),
|
|
39865
|
+
graphicFadeOut(area, delay, duration, easing), array(label).forEach(labelNode => {
|
|
39866
|
+
tagFadeOut(labelNode, delay, duration, easing);
|
|
39867
|
+
});
|
|
39855
39868
|
}
|
|
39856
39869
|
function arcAreaFadeOut(area, label, duration, delay, easing) {
|
|
39857
|
-
graphicFadeOut(area, delay, duration, easing),
|
|
39870
|
+
graphicFadeOut(area, delay, duration, easing), array(label).forEach(labelNode => {
|
|
39871
|
+
tagFadeOut(labelNode, delay, duration, easing);
|
|
39872
|
+
});
|
|
39858
39873
|
}
|
|
39859
39874
|
function pointFadeOut(itemLine, decorativeLine, item, duration, delay, easing) {
|
|
39860
39875
|
var _a;
|
|
@@ -40026,6 +40041,57 @@
|
|
|
40026
40041
|
delay: 0
|
|
40027
40042
|
};
|
|
40028
40043
|
|
|
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
|
+
|
|
40029
40095
|
class MarkCommonLine extends Marker {
|
|
40030
40096
|
constructor() {
|
|
40031
40097
|
super(...arguments), this.name = "markCommonLine", this.defaultUpdateAnimation = DefaultUpdateMarkLineAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
|
|
@@ -40033,24 +40099,20 @@
|
|
|
40033
40099
|
getLine() {
|
|
40034
40100
|
return this._line;
|
|
40035
40101
|
}
|
|
40036
|
-
|
|
40037
|
-
return this._label;
|
|
40038
|
-
}
|
|
40039
|
-
setLabelPos() {
|
|
40102
|
+
setLabelPos(labelNode, labelAttrs) {
|
|
40040
40103
|
const {
|
|
40041
|
-
label = {},
|
|
40042
40104
|
limitRect: limitRect
|
|
40043
40105
|
} = this.attribute,
|
|
40044
40106
|
{
|
|
40045
40107
|
position: position,
|
|
40046
40108
|
confine: confine,
|
|
40047
40109
|
autoRotate: autoRotate
|
|
40048
|
-
} =
|
|
40049
|
-
labelPoint = this.getPointAttrByPosition(position),
|
|
40110
|
+
} = labelAttrs,
|
|
40111
|
+
labelPoint = this.getPointAttrByPosition(position, labelAttrs),
|
|
40050
40112
|
labelAngle = position.toString().toLocaleLowerCase().includes("start") ? this._line.getStartAngle() || 0 : this._line.getEndAngle() || 0;
|
|
40051
|
-
if (
|
|
40052
|
-
angle: autoRotate ? this.getRotateByAngle(labelPoint.angle) : 0,
|
|
40053
|
-
textStyle: Object.assign(Object.assign({}, this.getTextStyle(position, labelAngle, autoRotate)),
|
|
40113
|
+
if (labelNode.setAttributes(Object.assign(Object.assign({}, labelPoint.position), {
|
|
40114
|
+
angle: autoRotate ? this.getRotateByAngle(labelPoint.angle, labelAttrs) : 0,
|
|
40115
|
+
textStyle: Object.assign(Object.assign({}, this.getTextStyle(position, labelAngle, autoRotate)), labelAttrs.textStyle)
|
|
40054
40116
|
})), limitRect && confine) {
|
|
40055
40117
|
const {
|
|
40056
40118
|
x: x,
|
|
@@ -40058,7 +40120,7 @@
|
|
|
40058
40120
|
width: width,
|
|
40059
40121
|
height: height
|
|
40060
40122
|
} = limitRect;
|
|
40061
|
-
limitShapeInBounds(
|
|
40123
|
+
limitShapeInBounds(labelNode, {
|
|
40062
40124
|
x1: x,
|
|
40063
40125
|
y1: y,
|
|
40064
40126
|
x2: x + width,
|
|
@@ -40067,36 +40129,14 @@
|
|
|
40067
40129
|
}
|
|
40068
40130
|
}
|
|
40069
40131
|
initMarker(container) {
|
|
40070
|
-
const
|
|
40071
|
-
|
|
40072
|
-
state: state
|
|
40073
|
-
} = this.attribute,
|
|
40074
|
-
line = this.createSegment();
|
|
40075
|
-
line.name = "mark-common-line-line", this._line = line, container.add(line);
|
|
40076
|
-
const markLabel = new Tag(Object.assign(Object.assign({}, label), {
|
|
40077
|
-
state: {
|
|
40078
|
-
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
40079
|
-
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
40080
|
-
}
|
|
40081
|
-
}));
|
|
40082
|
-
markLabel.name = "mark-common-line-label", this._label = markLabel, container.add(markLabel), this.setLabelPos();
|
|
40132
|
+
const line = this.createSegment();
|
|
40133
|
+
line.name = "mark-common-line-line", this._line = line, container.add(line), this.addMarkLineLabels(container);
|
|
40083
40134
|
}
|
|
40084
40135
|
updateMarker() {
|
|
40085
|
-
|
|
40086
|
-
label: label,
|
|
40087
|
-
state: state
|
|
40088
|
-
} = this.attribute;
|
|
40089
|
-
this.setLineAttributes(), this._label && (this._label.setAttributes(Object.assign(Object.assign({
|
|
40090
|
-
dx: 0,
|
|
40091
|
-
dy: 0
|
|
40092
|
-
}, label), {
|
|
40093
|
-
state: {
|
|
40094
|
-
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
40095
|
-
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
40096
|
-
}
|
|
40097
|
-
})), this.setLabelPos());
|
|
40136
|
+
this.setLineAttributes(), this.updateMarkLineLabels();
|
|
40098
40137
|
}
|
|
40099
40138
|
}
|
|
40139
|
+
mixin(MarkCommonLine, MarkLabelMixin);
|
|
40100
40140
|
|
|
40101
40141
|
const FUZZY_EQUAL_DELTA = .001;
|
|
40102
40142
|
const DEFAULT_MARK_LINE_THEME = {
|
|
@@ -40285,6 +40325,7 @@
|
|
|
40285
40325
|
lineWidth: 0
|
|
40286
40326
|
},
|
|
40287
40327
|
label: {
|
|
40328
|
+
autoRotate: !0,
|
|
40288
40329
|
position: IMarkCommonArcLabelPosition.arcOuterMiddle,
|
|
40289
40330
|
refX: 0,
|
|
40290
40331
|
refY: 0,
|
|
@@ -40339,6 +40380,7 @@
|
|
|
40339
40380
|
const DEFAULT_MARK_ARC_AREA_THEME = {
|
|
40340
40381
|
interactive: !0,
|
|
40341
40382
|
label: {
|
|
40383
|
+
autoRotate: !0,
|
|
40342
40384
|
position: IMarkCommonArcLabelPosition.arcOuterMiddle,
|
|
40343
40385
|
textStyle: {
|
|
40344
40386
|
fill: "#fff",
|
|
@@ -40594,15 +40636,12 @@
|
|
|
40594
40636
|
constructor(attributes, options) {
|
|
40595
40637
|
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkLine.defaultAttributes, attributes)), this.name = "markLine";
|
|
40596
40638
|
}
|
|
40597
|
-
getPointAttrByPosition(position) {
|
|
40639
|
+
getPointAttrByPosition(position, labelAttrs) {
|
|
40598
40640
|
var _a;
|
|
40599
40641
|
const {
|
|
40600
|
-
label = {}
|
|
40601
|
-
} = this.attribute,
|
|
40602
|
-
{
|
|
40603
40642
|
refX = 0,
|
|
40604
40643
|
refY = 0
|
|
40605
|
-
} =
|
|
40644
|
+
} = labelAttrs,
|
|
40606
40645
|
points = this._line.getMainSegmentPoints(),
|
|
40607
40646
|
lineEndAngle = null !== (_a = this._line.getEndAngle()) && void 0 !== _a ? _a : 0,
|
|
40608
40647
|
labelAngle = (lineEndAngle),
|
|
@@ -40628,9 +40667,9 @@
|
|
|
40628
40667
|
angle: labelAngle
|
|
40629
40668
|
};
|
|
40630
40669
|
}
|
|
40631
|
-
getRotateByAngle(angle) {
|
|
40670
|
+
getRotateByAngle(angle, labelAttrs) {
|
|
40632
40671
|
var _a;
|
|
40633
|
-
return (isPostiveXAxis(angle) ? angle : angle - Math.PI) + (null !== (_a =
|
|
40672
|
+
return (isPostiveXAxis(angle) ? angle : angle - Math.PI) + (null !== (_a = labelAttrs.refAngle) && void 0 !== _a ? _a : 0);
|
|
40634
40673
|
}
|
|
40635
40674
|
getTextStyle(position, labelAngle, autoRotate) {
|
|
40636
40675
|
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];
|
|
@@ -40696,6 +40735,12 @@
|
|
|
40696
40735
|
});else if (!isValidNumber$1(point.x) || !isValidNumber$1(point.y)) return void (validFlag = !1);
|
|
40697
40736
|
}), validFlag;
|
|
40698
40737
|
}
|
|
40738
|
+
addMarkLineLabels(container) {
|
|
40739
|
+
this._addMarkLabels(container, "mark-common-line-label", MarkLine.defaultAttributes.label);
|
|
40740
|
+
}
|
|
40741
|
+
updateMarkLineLabels() {
|
|
40742
|
+
this._updateMarkLabels(MarkLine.defaultAttributes.label);
|
|
40743
|
+
}
|
|
40699
40744
|
}
|
|
40700
40745
|
MarkLine.defaultAttributes = DEFAULT_MARK_LINE_THEME;
|
|
40701
40746
|
|
|
@@ -40710,9 +40755,6 @@
|
|
|
40710
40755
|
getArea() {
|
|
40711
40756
|
return this._area;
|
|
40712
40757
|
}
|
|
40713
|
-
getLabel() {
|
|
40714
|
-
return this._label;
|
|
40715
|
-
}
|
|
40716
40758
|
constructor(attributes, options) {
|
|
40717
40759
|
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArea.defaultAttributes, attributes)), this.name = "markArea", this.defaultUpdateAnimation = DefaultUpdateMarkAreaAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
|
|
40718
40760
|
}
|
|
@@ -40729,24 +40771,21 @@
|
|
|
40729
40771
|
};
|
|
40730
40772
|
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;
|
|
40731
40773
|
}
|
|
40732
|
-
setLabelPos() {
|
|
40774
|
+
setLabelPos(labelNode, labelAttrs) {
|
|
40733
40775
|
var _a;
|
|
40734
|
-
if (this.
|
|
40735
|
-
const
|
|
40736
|
-
label = {}
|
|
40737
|
-
} = this.attribute,
|
|
40738
|
-
labelPosition = null !== (_a = label.position) && void 0 !== _a ? _a : "middle",
|
|
40776
|
+
if (this._area) {
|
|
40777
|
+
const labelPosition = null !== (_a = labelAttrs.position) && void 0 !== _a ? _a : "middle",
|
|
40739
40778
|
labelPoint = this.getPointAttrByPosition(labelPosition);
|
|
40740
|
-
if (
|
|
40741
|
-
textStyle: Object.assign(Object.assign({}, DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP[labelPosition]),
|
|
40742
|
-
})), this.attribute.limitRect &&
|
|
40779
|
+
if (labelNode.setAttributes(Object.assign(Object.assign({}, labelPoint), {
|
|
40780
|
+
textStyle: Object.assign(Object.assign({}, DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP[labelPosition]), labelAttrs.textStyle)
|
|
40781
|
+
})), this.attribute.limitRect && labelAttrs.confine) {
|
|
40743
40782
|
const {
|
|
40744
40783
|
x: x,
|
|
40745
40784
|
y: y,
|
|
40746
40785
|
width: width,
|
|
40747
40786
|
height: height
|
|
40748
40787
|
} = this.attribute.limitRect;
|
|
40749
|
-
limitShapeInBounds(
|
|
40788
|
+
limitShapeInBounds(labelNode, {
|
|
40750
40789
|
x1: x,
|
|
40751
40790
|
y1: y,
|
|
40752
40791
|
x2: x + width,
|
|
@@ -40758,40 +40797,23 @@
|
|
|
40758
40797
|
initMarker(container) {
|
|
40759
40798
|
const {
|
|
40760
40799
|
points: points,
|
|
40761
|
-
label: label,
|
|
40762
40800
|
areaStyle: areaStyle,
|
|
40763
40801
|
state: state
|
|
40764
40802
|
} = this.attribute,
|
|
40765
40803
|
area = graphicCreator.polygon(Object.assign({
|
|
40766
40804
|
points: points
|
|
40767
40805
|
}, areaStyle));
|
|
40768
|
-
area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area), area.name = "mark-area-polygon", this._area = area, container.add(area);
|
|
40769
|
-
const markLabel = new Tag(Object.assign(Object.assign({}, label), {
|
|
40770
|
-
state: {
|
|
40771
|
-
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
40772
|
-
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
40773
|
-
}
|
|
40774
|
-
}));
|
|
40775
|
-
markLabel.name = "mark-area-label", this._label = markLabel, container.add(markLabel), this.setLabelPos();
|
|
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), this._addMarkLabels(container, "mark-area-label", MarkArea.defaultAttributes.label);
|
|
40776
40807
|
}
|
|
40777
40808
|
updateMarker() {
|
|
40778
40809
|
const {
|
|
40779
40810
|
points: points,
|
|
40780
|
-
label: label,
|
|
40781
40811
|
areaStyle: areaStyle,
|
|
40782
40812
|
state: state
|
|
40783
40813
|
} = this.attribute;
|
|
40784
40814
|
this._area && (this._area.setAttributes(Object.assign({
|
|
40785
40815
|
points: points
|
|
40786
|
-
}, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this.
|
|
40787
|
-
dx: 0,
|
|
40788
|
-
dy: 0
|
|
40789
|
-
}, label), {
|
|
40790
|
-
state: {
|
|
40791
|
-
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
40792
|
-
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
40793
|
-
}
|
|
40794
|
-
})), this.setLabelPos();
|
|
40816
|
+
}, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this._updateMarkLabels(MarkArea.defaultAttributes.label);
|
|
40795
40817
|
}
|
|
40796
40818
|
isValidPoints() {
|
|
40797
40819
|
const {
|
|
@@ -40804,7 +40826,7 @@
|
|
|
40804
40826
|
}), validFlag;
|
|
40805
40827
|
}
|
|
40806
40828
|
}
|
|
40807
|
-
MarkArea.defaultAttributes = DEFAULT_MARK_AREA_THEME;
|
|
40829
|
+
MarkArea.defaultAttributes = DEFAULT_MARK_AREA_THEME, mixin(MarkArea, MarkLabelMixin);
|
|
40808
40830
|
|
|
40809
40831
|
loadMarkArcLineComponent();
|
|
40810
40832
|
function registerMarkArcLineAnimate() {
|
|
@@ -40815,24 +40837,19 @@
|
|
|
40815
40837
|
MarkArcLine._animate && this._animationConfig && MarkArcLine._animate(this._line, this._label, this._animationConfig, state);
|
|
40816
40838
|
}
|
|
40817
40839
|
constructor(attributes, options) {
|
|
40818
|
-
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcLine.defaultAttributes, attributes,
|
|
40819
|
-
label: {
|
|
40820
|
-
autoRotate: !0
|
|
40821
|
-
}
|
|
40822
|
-
})), this.name = "markArcLine";
|
|
40840
|
+
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcLine.defaultAttributes, attributes)), this.name = "markArcLine";
|
|
40823
40841
|
}
|
|
40824
|
-
getPointAttrByPosition(direction) {
|
|
40842
|
+
getPointAttrByPosition(direction, labelAttrs) {
|
|
40825
40843
|
const {
|
|
40826
40844
|
center: center,
|
|
40827
40845
|
radius: radius,
|
|
40828
40846
|
startAngle: startAngle,
|
|
40829
|
-
endAngle: endAngle
|
|
40830
|
-
label: label
|
|
40847
|
+
endAngle: endAngle
|
|
40831
40848
|
} = this.attribute,
|
|
40832
40849
|
{
|
|
40833
40850
|
refX = 0,
|
|
40834
40851
|
refY = 0
|
|
40835
|
-
} =
|
|
40852
|
+
} = labelAttrs;
|
|
40836
40853
|
let angle;
|
|
40837
40854
|
switch (direction) {
|
|
40838
40855
|
case IMarkCommonArcLabelPosition.arcInnerStart:
|
|
@@ -40862,9 +40879,9 @@
|
|
|
40862
40879
|
getTextStyle(position) {
|
|
40863
40880
|
return DEFAULT_POLAR_MARKER_TEXT_STYLE_MAP[position];
|
|
40864
40881
|
}
|
|
40865
|
-
getRotateByAngle(angle) {
|
|
40882
|
+
getRotateByAngle(angle, labelAttrs) {
|
|
40866
40883
|
var _a;
|
|
40867
|
-
return angle - Math.PI / 2 + (null !== (_a =
|
|
40884
|
+
return angle - Math.PI / 2 + (null !== (_a = labelAttrs.refAngle) && void 0 !== _a ? _a : 0);
|
|
40868
40885
|
}
|
|
40869
40886
|
createSegment() {
|
|
40870
40887
|
const {
|
|
@@ -40921,6 +40938,12 @@
|
|
|
40921
40938
|
isValidPoints() {
|
|
40922
40939
|
return !0;
|
|
40923
40940
|
}
|
|
40941
|
+
addMarkLineLabels(container) {
|
|
40942
|
+
this._addMarkLabels(container, "mark-common-line-label", MarkArcLine.defaultAttributes.label);
|
|
40943
|
+
}
|
|
40944
|
+
updateMarkLineLabels() {
|
|
40945
|
+
this._updateMarkLabels(MarkArcLine.defaultAttributes.label);
|
|
40946
|
+
}
|
|
40924
40947
|
}
|
|
40925
40948
|
MarkArcLine.defaultAttributes = DEFAULT_MARK_ARC_LINE_THEME;
|
|
40926
40949
|
|
|
@@ -40935,29 +40958,21 @@
|
|
|
40935
40958
|
getArea() {
|
|
40936
40959
|
return this._area;
|
|
40937
40960
|
}
|
|
40938
|
-
getLabel() {
|
|
40939
|
-
return this._label;
|
|
40940
|
-
}
|
|
40941
40961
|
constructor(attributes, options) {
|
|
40942
|
-
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcArea.defaultAttributes, attributes,
|
|
40943
|
-
label: {
|
|
40944
|
-
autoRotate: !0
|
|
40945
|
-
}
|
|
40946
|
-
})), this.name = "markArcArea", this.defaultUpdateAnimation = DefaultUpdateMarkAreaAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
|
|
40962
|
+
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcArea.defaultAttributes, attributes)), this.name = "markArcArea", this.defaultUpdateAnimation = DefaultUpdateMarkAreaAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
|
|
40947
40963
|
}
|
|
40948
|
-
getPointAttrByPosition(position) {
|
|
40964
|
+
getPointAttrByPosition(position, labelAttrs) {
|
|
40949
40965
|
const {
|
|
40950
40966
|
center: center,
|
|
40951
40967
|
innerRadius: innerRadius,
|
|
40952
40968
|
outerRadius: outerRadius,
|
|
40953
40969
|
startAngle: startAngle,
|
|
40954
|
-
endAngle: endAngle
|
|
40955
|
-
label: label
|
|
40970
|
+
endAngle: endAngle
|
|
40956
40971
|
} = this.attribute,
|
|
40957
40972
|
{
|
|
40958
40973
|
refX = 0,
|
|
40959
40974
|
refY = 0
|
|
40960
|
-
} =
|
|
40975
|
+
} = labelAttrs;
|
|
40961
40976
|
let radius, angle;
|
|
40962
40977
|
switch (position) {
|
|
40963
40978
|
case IMarkCommonArcLabelPosition.center:
|
|
@@ -40992,28 +41007,25 @@
|
|
|
40992
41007
|
angle: angle
|
|
40993
41008
|
};
|
|
40994
41009
|
}
|
|
40995
|
-
setLabelPos() {
|
|
41010
|
+
setLabelPos(labelNode, labelAttrs) {
|
|
40996
41011
|
var _a;
|
|
40997
|
-
if (this.
|
|
41012
|
+
if (this._area) {
|
|
40998
41013
|
const {
|
|
40999
|
-
label = {}
|
|
41000
|
-
} = this.attribute,
|
|
41001
|
-
{
|
|
41002
41014
|
position: labelPosition = "arcInnerMiddle",
|
|
41003
41015
|
autoRotate: autoRotate
|
|
41004
|
-
} =
|
|
41005
|
-
labelAttr = this.getPointAttrByPosition(labelPosition);
|
|
41006
|
-
if (
|
|
41007
|
-
angle: autoRotate ? labelAttr.angle - Math.PI / 2 + (null !== (_a =
|
|
41008
|
-
textStyle: Object.assign(Object.assign({}, DEFAULT_POLAR_MARKER_TEXT_STYLE_MAP[labelPosition]),
|
|
41009
|
-
})), this.attribute.limitRect &&
|
|
41016
|
+
} = labelAttrs,
|
|
41017
|
+
labelAttr = this.getPointAttrByPosition(labelPosition, labelAttrs);
|
|
41018
|
+
if (labelNode.setAttributes(Object.assign(Object.assign({}, labelAttr.position), {
|
|
41019
|
+
angle: autoRotate ? labelAttr.angle - Math.PI / 2 + (null !== (_a = labelAttrs.refAngle) && void 0 !== _a ? _a : 0) : 0,
|
|
41020
|
+
textStyle: Object.assign(Object.assign({}, DEFAULT_POLAR_MARKER_TEXT_STYLE_MAP[labelPosition]), labelAttrs.textStyle)
|
|
41021
|
+
})), this.attribute.limitRect && labelAttrs.confine) {
|
|
41010
41022
|
const {
|
|
41011
41023
|
x: x,
|
|
41012
41024
|
y: y,
|
|
41013
41025
|
width: width,
|
|
41014
41026
|
height: height
|
|
41015
41027
|
} = this.attribute.limitRect;
|
|
41016
|
-
limitShapeInBounds(
|
|
41028
|
+
limitShapeInBounds(labelNode, {
|
|
41017
41029
|
x1: x,
|
|
41018
41030
|
y1: y,
|
|
41019
41031
|
x2: x + width,
|
|
@@ -41030,7 +41042,6 @@
|
|
|
41030
41042
|
startAngle: startAngle,
|
|
41031
41043
|
endAngle: endAngle,
|
|
41032
41044
|
areaStyle: areaStyle,
|
|
41033
|
-
label: label,
|
|
41034
41045
|
state: state
|
|
41035
41046
|
} = this.attribute,
|
|
41036
41047
|
area = graphicCreator.arc(Object.assign({
|
|
@@ -41041,14 +41052,7 @@
|
|
|
41041
41052
|
startAngle: startAngle,
|
|
41042
41053
|
endAngle: endAngle
|
|
41043
41054
|
}, areaStyle));
|
|
41044
|
-
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);
|
|
41045
|
-
const markLabel = new Tag(Object.assign(Object.assign({}, label), {
|
|
41046
|
-
state: {
|
|
41047
|
-
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
41048
|
-
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
41049
|
-
}
|
|
41050
|
-
}));
|
|
41051
|
-
markLabel.name = "mark-area-label", this._label = markLabel, container.add(markLabel), this.setLabelPos();
|
|
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), this._addMarkLabels(container, "mark-area-label", MarkArcArea.defaultAttributes.label);
|
|
41052
41056
|
}
|
|
41053
41057
|
updateMarker() {
|
|
41054
41058
|
const {
|
|
@@ -41068,21 +41072,13 @@
|
|
|
41068
41072
|
outerRadius: outerRadius,
|
|
41069
41073
|
startAngle: startAngle,
|
|
41070
41074
|
endAngle: endAngle
|
|
41071
|
-
}, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this.
|
|
41072
|
-
dx: 0,
|
|
41073
|
-
dy: 0
|
|
41074
|
-
}, label), {
|
|
41075
|
-
state: {
|
|
41076
|
-
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
41077
|
-
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
41078
|
-
}
|
|
41079
|
-
})), this.setLabelPos());
|
|
41075
|
+
}, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this._updateMarkLabels(MarkArcArea.defaultAttributes.label);
|
|
41080
41076
|
}
|
|
41081
41077
|
isValidPoints() {
|
|
41082
41078
|
return !0;
|
|
41083
41079
|
}
|
|
41084
41080
|
}
|
|
41085
|
-
MarkArcArea.defaultAttributes = DEFAULT_MARK_ARC_AREA_THEME;
|
|
41081
|
+
MarkArcArea.defaultAttributes = DEFAULT_MARK_ARC_AREA_THEME, mixin(MarkArcArea, MarkLabelMixin);
|
|
41086
41082
|
|
|
41087
41083
|
loadMarkPointComponent();
|
|
41088
41084
|
function registerMarkPointAnimate() {
|
|
@@ -63662,7 +63658,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63662
63658
|
};
|
|
63663
63659
|
registerVChartCore();
|
|
63664
63660
|
|
|
63665
|
-
const version = "1.13.
|
|
63661
|
+
const version = "1.13.9-alpha.1";
|
|
63666
63662
|
|
|
63667
63663
|
const addVChartProperty = (data, op) => {
|
|
63668
63664
|
const context = op.beforeCall();
|
|
@@ -98033,13 +98029,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98033
98029
|
return 'cartesian';
|
|
98034
98030
|
}
|
|
98035
98031
|
_createMarkerComponent() {
|
|
98036
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o
|
|
98037
|
-
const {
|
|
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 : {});
|
|
98038
98035
|
const markLineAttrs = {
|
|
98039
98036
|
zIndex: this.layoutZIndex,
|
|
98040
|
-
interactive: (
|
|
98041
|
-
hover: (
|
|
98042
|
-
select: (
|
|
98037
|
+
interactive: (_b = this._spec.interactive) !== null && _b !== void 0 ? _b : true,
|
|
98038
|
+
hover: (_c = this._spec.interactive) !== null && _c !== void 0 ? _c : true,
|
|
98039
|
+
select: (_d = this._spec.interactive) !== null && _d !== void 0 ? _d : true,
|
|
98043
98040
|
points: [
|
|
98044
98041
|
{ x: 0, y: 0 },
|
|
98045
98042
|
{ x: 0, y: 0 }
|
|
@@ -98051,17 +98048,25 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98051
98048
|
radius: 0,
|
|
98052
98049
|
startAngle: 0,
|
|
98053
98050
|
endAngle: 0,
|
|
98054
|
-
lineStyle: transformStyle(transformToGraphic((
|
|
98055
|
-
clipInRange: (
|
|
98056
|
-
label:
|
|
98051
|
+
lineStyle: transformStyle(transformToGraphic((_e = this._spec.line) === null || _e === void 0 ? void 0 : _e.style), this._markerData, this._markAttributeContext),
|
|
98052
|
+
clipInRange: (_f = this._spec.clip) !== null && _f !== void 0 ? _f : false,
|
|
98053
|
+
label: label.map(labelItem => {
|
|
98054
|
+
return transformLabelAttributes(labelItem, this._markerData, this._markAttributeContext);
|
|
98055
|
+
}),
|
|
98057
98056
|
state: {
|
|
98058
|
-
line: transformState((
|
|
98059
|
-
lineStartSymbol: transformState((
|
|
98060
|
-
lineEndSymbol: transformState((
|
|
98061
|
-
label:
|
|
98062
|
-
|
|
98057
|
+
line: transformState((_h = (_g = this._spec.line) === null || _g === void 0 ? void 0 : _g.state) !== null && _h !== void 0 ? _h : {}, this._markerData, this._markAttributeContext),
|
|
98058
|
+
lineStartSymbol: transformState((_k = (_j = this._spec.startSymbol) === null || _j === void 0 ? void 0 : _j.state) !== null && _k !== void 0 ? _k : {}, this._markerData, this._markAttributeContext),
|
|
98059
|
+
lineEndSymbol: transformState((_m = (_l = this._spec.endSymbol) === null || _l === void 0 ? void 0 : _l.state) !== null && _m !== void 0 ? _m : {}, this._markerData, this._markAttributeContext),
|
|
98060
|
+
label: label.map(labelItem => {
|
|
98061
|
+
var _a;
|
|
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
|
+
})
|
|
98063
98068
|
},
|
|
98064
|
-
animation: (
|
|
98069
|
+
animation: (_o = this._spec.animation) !== null && _o !== void 0 ? _o : false,
|
|
98065
98070
|
animationEnter: this._spec.animationEnter,
|
|
98066
98071
|
animationExit: this._spec.animationExit,
|
|
98067
98072
|
animationUpdate: this._spec.animationUpdate
|
|
@@ -98086,7 +98091,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98086
98091
|
return markLine;
|
|
98087
98092
|
}
|
|
98088
98093
|
_getUpdateMarkerAttrs() {
|
|
98089
|
-
var _a, _b
|
|
98094
|
+
var _a, _b;
|
|
98090
98095
|
const spec = this._spec;
|
|
98091
98096
|
const data = this._markerData;
|
|
98092
98097
|
const startRelativeSeries = this._startRelativeSeries;
|
|
@@ -98096,7 +98101,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98096
98101
|
const seriesData = relativeSeries.getViewData().latestData;
|
|
98097
98102
|
const dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
|
|
98098
98103
|
let limitRect;
|
|
98099
|
-
if (spec.clip || (
|
|
98104
|
+
if (spec.clip || array(spec.label).some(labelCfg => labelCfg === null || labelCfg === void 0 ? void 0 : labelCfg.confine)) {
|
|
98100
98105
|
const { minX, maxX, minY, maxY } = computeClipRange([
|
|
98101
98106
|
startRelativeSeries.getRegion(),
|
|
98102
98107
|
endRelativeSeries.getRegion(),
|
|
@@ -98109,10 +98114,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98109
98114
|
height: maxY - minY
|
|
98110
98115
|
};
|
|
98111
98116
|
}
|
|
98112
|
-
const markerComponentAttr = (
|
|
98113
|
-
const
|
|
98114
|
-
|
|
98115
|
-
|
|
98117
|
+
const markerComponentAttr = (_b = (_a = this._markerComponent) === null || _a === void 0 ? void 0 : _a.attribute) !== null && _b !== void 0 ? _b : {};
|
|
98118
|
+
const prevLabelAttrs = array(markerComponentAttr.label);
|
|
98119
|
+
const specLabels = array(this._spec.label);
|
|
98120
|
+
const labelAttrs = prevLabelAttrs.map((prevLabel, index) => {
|
|
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
|
+
});
|
|
98116
98124
|
return Object.assign(Object.assign({}, pointsAttr), { label: labelAttrs, limitRect, dx: this._layoutOffsetX, dy: this._layoutOffsetY });
|
|
98117
98125
|
}
|
|
98118
98126
|
_markerLayout() {
|
|
@@ -98214,7 +98222,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98214
98222
|
return { points };
|
|
98215
98223
|
}
|
|
98216
98224
|
_markerLayout() {
|
|
98217
|
-
var _a, _b, _c, _d, _e
|
|
98225
|
+
var _a, _b, _c, _d, _e;
|
|
98218
98226
|
const updateAttrs = this._getUpdateMarkerAttrs();
|
|
98219
98227
|
if (this._spec.type === 'type-step') {
|
|
98220
98228
|
const startRelativeSeries = this._startRelativeSeries;
|
|
@@ -98241,7 +98249,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98241
98249
|
else {
|
|
98242
98250
|
expandDistanceValue = expandDistance;
|
|
98243
98251
|
}
|
|
98244
|
-
const { points,
|
|
98252
|
+
const { points, limitRect } = updateAttrs;
|
|
98245
98253
|
const joinPoints = getInsertPoints(points[0], points[1], connectDirection, expandDistanceValue);
|
|
98246
98254
|
let labelPositionAttrs;
|
|
98247
98255
|
if (multiSegment && isValid$1(mainSegmentIndex)) {
|
|
@@ -98255,20 +98263,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98255
98263
|
else {
|
|
98256
98264
|
labelPositionAttrs = Object.assign(Object.assign({ position: 'start', autoRotate: false }, getTextOffset(points[0], points[1], connectDirection, expandDistanceValue)), { refX: 0, refY: 0 });
|
|
98257
98265
|
}
|
|
98258
|
-
|
|
98259
|
-
|
|
98260
|
-
}
|
|
98261
|
-
|
|
98262
|
-
labelPositionAttrs.refY += this._spec.label.refY;
|
|
98263
|
-
}
|
|
98264
|
-
if (isValidNumber$1((_c = this._spec.label) === null || _c === void 0 ? void 0 : _c.dx)) {
|
|
98265
|
-
labelPositionAttrs.dx = (labelPositionAttrs.dx || 0) + this._spec.label.dx;
|
|
98266
|
-
}
|
|
98267
|
-
if (isValidNumber$1((_d = this._spec.label) === null || _d === void 0 ? void 0 : _d.dy)) {
|
|
98268
|
-
labelPositionAttrs.dy = (labelPositionAttrs.dy || 0) + this._spec.label.dy;
|
|
98269
|
-
}
|
|
98270
|
-
const markerComponentAttr = (_f = (_e = this._markerComponent) === null || _e === void 0 ? void 0 : _e.attribute) !== null && _f !== void 0 ? _f : {};
|
|
98271
|
-
(_g = this._markerComponent) === null || _g === void 0 ? void 0 : _g.setAttributes({
|
|
98266
|
+
const markerComponentAttr = (_b = (_a = this._markerComponent) === null || _a === void 0 ? void 0 : _a.attribute) !== null && _b !== void 0 ? _b : {};
|
|
98267
|
+
const prevLabelAttrs = array(markerComponentAttr.label);
|
|
98268
|
+
const label = array((_c = updateAttrs.label) !== null && _c !== void 0 ? _c : {});
|
|
98269
|
+
(_d = this._markerComponent) === null || _d === void 0 ? void 0 : _d.setAttributes({
|
|
98272
98270
|
points: multiSegment
|
|
98273
98271
|
? [
|
|
98274
98272
|
[joinPoints[0], joinPoints[1]],
|
|
@@ -98276,7 +98274,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98276
98274
|
[joinPoints[2], joinPoints[3]]
|
|
98277
98275
|
]
|
|
98278
98276
|
: joinPoints,
|
|
98279
|
-
label:
|
|
98277
|
+
label: label.map((labelItem, index) => {
|
|
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
|
+
}),
|
|
98280
98293
|
limitRect,
|
|
98281
98294
|
multiSegment,
|
|
98282
98295
|
mainSegmentIndex,
|
|
@@ -98285,7 +98298,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98285
98298
|
});
|
|
98286
98299
|
}
|
|
98287
98300
|
else {
|
|
98288
|
-
(
|
|
98301
|
+
(_e = this._markerComponent) === null || _e === void 0 ? void 0 : _e.setAttributes(updateAttrs);
|
|
98289
98302
|
}
|
|
98290
98303
|
}
|
|
98291
98304
|
_computeOptions() {
|
|
@@ -98639,8 +98652,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98639
98652
|
return 'cartesian';
|
|
98640
98653
|
}
|
|
98641
98654
|
_createMarkerComponent() {
|
|
98642
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
98643
|
-
const label = (_a = this._spec.label) !== null && _a !== void 0 ? _a : {};
|
|
98655
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
98656
|
+
const label = array((_a = this._spec.label) !== null && _a !== void 0 ? _a : {});
|
|
98644
98657
|
const markAreaAttrs = {
|
|
98645
98658
|
zIndex: this.layoutZIndex,
|
|
98646
98659
|
interactive: (_b = this._spec.interactive) !== null && _b !== void 0 ? _b : true,
|
|
@@ -98662,13 +98675,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98662
98675
|
endAngle: 0,
|
|
98663
98676
|
areaStyle: transformStyle(transformToGraphic((_e = this._spec.area) === null || _e === void 0 ? void 0 : _e.style), this._markerData, this._markAttributeContext),
|
|
98664
98677
|
clipInRange: (_f = this._spec.clip) !== null && _f !== void 0 ? _f : false,
|
|
98665
|
-
label:
|
|
98678
|
+
label: label.map((labelItem) => {
|
|
98679
|
+
return transformLabelAttributes(labelItem, this._markerData, this._markAttributeContext);
|
|
98680
|
+
}),
|
|
98666
98681
|
state: {
|
|
98667
98682
|
area: transformState((_g = this._spec.area) === null || _g === void 0 ? void 0 : _g.state, this._markerData, this._markAttributeContext),
|
|
98668
|
-
label:
|
|
98669
|
-
|
|
98683
|
+
label: label.map((labelItem) => {
|
|
98684
|
+
return transformState(labelItem.state, this._markerData, this._markAttributeContext);
|
|
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
|
+
})
|
|
98670
98690
|
},
|
|
98671
|
-
animation: (
|
|
98691
|
+
animation: (_h = this._spec.animation) !== null && _h !== void 0 ? _h : false,
|
|
98672
98692
|
animationEnter: this._spec.animationEnter,
|
|
98673
98693
|
animationExit: this._spec.animationExit,
|
|
98674
98694
|
animationUpdate: this._spec.animationUpdate
|
|
@@ -98677,7 +98697,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98677
98697
|
return markArea;
|
|
98678
98698
|
}
|
|
98679
98699
|
_markerLayout() {
|
|
98680
|
-
var _a
|
|
98700
|
+
var _a;
|
|
98681
98701
|
const spec = this._spec;
|
|
98682
98702
|
const data = this._markerData;
|
|
98683
98703
|
const startRelativeSeries = this._startRelativeSeries;
|
|
@@ -98691,7 +98711,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98691
98711
|
: data.latestData
|
|
98692
98712
|
: seriesData;
|
|
98693
98713
|
let limitRect;
|
|
98694
|
-
if (spec.clip || (
|
|
98714
|
+
if (spec.clip || array(spec.label).some(labelCfg => labelCfg === null || labelCfg === void 0 ? void 0 : labelCfg.confine)) {
|
|
98695
98715
|
const { minX, maxX, minY, maxY } = computeClipRange([
|
|
98696
98716
|
startRelativeSeries.getRegion(),
|
|
98697
98717
|
endRelativeSeries.getRegion(),
|
|
@@ -98705,10 +98725,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98705
98725
|
};
|
|
98706
98726
|
}
|
|
98707
98727
|
if (this._markerComponent) {
|
|
98708
|
-
|
|
98709
|
-
|
|
98710
|
-
|
|
98711
|
-
|
|
98728
|
+
const prevLabelAttrs = array((_a = this._markerComponent.attribute) === null || _a === void 0 ? void 0 : _a.label);
|
|
98729
|
+
const specLabels = array(this._spec.label);
|
|
98730
|
+
this._markerComponent.setAttributes(Object.assign(Object.assign({}, pointsAttr), { label: prevLabelAttrs.map((prevLabel, index) => {
|
|
98731
|
+
const specLabel = specLabels[index] || {};
|
|
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 }));
|
|
98712
98737
|
}
|
|
98713
98738
|
}
|
|
98714
98739
|
_initDataView() {
|