@visactor/vchart 2.0.23-alpha.5 → 2.0.23-alpha.6
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 +37 -57
- package/build/index.js +37 -57
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/base/base-chart.js +13 -7
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/chart/radar/radar-transformer.js +4 -4
- package/cjs/chart/radar/radar-transformer.js.map +1 -1
- package/cjs/component/index.js +1 -1
- package/cjs/component/marker/mark-line/cartesian-mark-line.js +18 -7
- package/cjs/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/cjs/component/marker/mark-line/interface/spec.d.ts +9 -2
- package/cjs/component/marker/mark-line/interface/spec.js.map +1 -1
- package/cjs/component/util.js +1 -2
- package/cjs/constant/attribute.js +2 -1
- package/cjs/constant/scroll-bar.js +1 -2
- package/cjs/constant/waterfall.js +2 -1
- package/cjs/core/interface.js +1 -1
- package/cjs/core/util.js +1 -1
- package/cjs/interaction/triggers/element-active.js +2 -1
- package/cjs/interaction/triggers/element-active.js.map +1 -1
- package/cjs/series/scatter/scatter.d.ts +0 -3
- package/cjs/series/scatter/scatter.js +6 -24
- package/cjs/series/scatter/scatter.js.map +1 -1
- package/esm/chart/base/base-chart.js +12 -7
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/chart/radar/radar-transformer.js +4 -4
- package/esm/chart/radar/radar-transformer.js.map +1 -1
- package/esm/component/index.js +1 -1
- package/esm/component/marker/mark-line/cartesian-mark-line.js +18 -8
- package/esm/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/esm/component/marker/mark-line/interface/spec.d.ts +9 -2
- package/esm/component/marker/mark-line/interface/spec.js.map +1 -1
- package/esm/component/util.js +1 -2
- package/esm/constant/attribute.js +2 -1
- package/esm/constant/scroll-bar.js +1 -2
- package/esm/constant/waterfall.js +2 -1
- package/esm/core/interface.js +1 -1
- package/esm/core/util.js +1 -1
- package/esm/interaction/triggers/element-active.js +2 -1
- package/esm/interaction/triggers/element-active.js.map +1 -1
- package/esm/series/scatter/scatter.d.ts +0 -3
- package/esm/series/scatter/scatter.js +5 -27
- package/esm/series/scatter/scatter.js.map +1 -1
- package/package.json +5 -5
package/build/index.es.js
CHANGED
|
@@ -70221,21 +70221,24 @@ class BaseChart extends CompilableBase {
|
|
|
70221
70221
|
this._interaction = new Interaction();
|
|
70222
70222
|
const series = this.getAllSeries();
|
|
70223
70223
|
const mergedTriggers = [];
|
|
70224
|
-
const
|
|
70224
|
+
const groupedTriggers = [];
|
|
70225
70225
|
series.forEach(s => {
|
|
70226
70226
|
const triggers = s.getInteractionTriggers();
|
|
70227
70227
|
if (triggers && triggers.length) {
|
|
70228
70228
|
const regionId = s.getRegion().id;
|
|
70229
70229
|
triggers.forEach(({ trigger, marks }) => {
|
|
70230
|
-
const
|
|
70231
|
-
if (
|
|
70232
|
-
marks.
|
|
70233
|
-
mergedTriggersMarks[interactionId].marks.push(m);
|
|
70234
|
-
});
|
|
70230
|
+
const sameTrigger = groupedTriggers.find(item => item.regionId === regionId && isEqual(item.config, trigger));
|
|
70231
|
+
if (sameTrigger) {
|
|
70232
|
+
sameTrigger.trigger.marks.push(...marks);
|
|
70235
70233
|
}
|
|
70236
70234
|
else {
|
|
70237
|
-
|
|
70238
|
-
|
|
70235
|
+
const mergedTrigger = Object.assign(Object.assign({}, trigger), { marks: [...marks] });
|
|
70236
|
+
groupedTriggers.push({
|
|
70237
|
+
regionId,
|
|
70238
|
+
config: Object.assign({}, trigger),
|
|
70239
|
+
trigger: mergedTrigger
|
|
70240
|
+
});
|
|
70241
|
+
mergedTriggers.push(mergedTrigger);
|
|
70239
70242
|
}
|
|
70240
70243
|
});
|
|
70241
70244
|
}
|
|
@@ -74007,10 +74010,6 @@ class ScatterSeries extends CartesianSeries {
|
|
|
74007
74010
|
if (this._symbolMark.getProduct()) {
|
|
74008
74011
|
this._symbolMark.compileEncode();
|
|
74009
74012
|
}
|
|
74010
|
-
if (this._isGeoCoordinateSeries()) {
|
|
74011
|
-
this._updateSymbolGraphicPosition();
|
|
74012
|
-
this._refreshLabelComponent(true, true);
|
|
74013
|
-
}
|
|
74014
74013
|
}
|
|
74015
74014
|
initLabelMarkStyle(labelMark) {
|
|
74016
74015
|
if (!labelMark) {
|
|
@@ -74058,38 +74057,6 @@ class ScatterSeries extends CartesianSeries {
|
|
|
74058
74057
|
}
|
|
74059
74058
|
return labelGraphic;
|
|
74060
74059
|
}
|
|
74061
|
-
_isGeoCoordinateSeries() {
|
|
74062
|
-
var _a, _b;
|
|
74063
|
-
return ((_b = (_a = this.getXAxisHelper()) === null || _a === void 0 ? void 0 : _a.getAxisType) === null || _b === void 0 ? void 0 : _b.call(_a)) === ComponentTypeEnum.geoCoordinate;
|
|
74064
|
-
}
|
|
74065
|
-
_refreshLabelComponent(resetPostMatrix = false, disableAnimation = false) {
|
|
74066
|
-
var _a, _b;
|
|
74067
|
-
const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
|
|
74068
|
-
const labelGraphic = (_b = vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.getComponent) === null || _b === void 0 ? void 0 : _b.call(vgrammarLabel);
|
|
74069
|
-
if (resetPostMatrix) {
|
|
74070
|
-
if (labelGraphic === null || labelGraphic === void 0 ? void 0 : labelGraphic.attribute.postMatrix) {
|
|
74071
|
-
labelGraphic.setAttributes({
|
|
74072
|
-
postMatrix: new Matrix()
|
|
74073
|
-
});
|
|
74074
|
-
}
|
|
74075
|
-
}
|
|
74076
|
-
if (disableAnimation && (labelGraphic === null || labelGraphic === void 0 ? void 0 : labelGraphic.disableAnimation)) {
|
|
74077
|
-
labelGraphic.disableAnimation();
|
|
74078
|
-
if (!this._enableLabelAnimationHook) {
|
|
74079
|
-
this._enableLabelAnimationHook = () => {
|
|
74080
|
-
var _a, _b, _c, _d;
|
|
74081
|
-
const currentLabelGraphic = (_c = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
74082
|
-
(_d = currentLabelGraphic === null || currentLabelGraphic === void 0 ? void 0 : currentLabelGraphic.enableAnimation) === null || _d === void 0 ? void 0 : _d.call(currentLabelGraphic);
|
|
74083
|
-
this.event.off(HOOK_EVENT.AFTER_MARK_RENDER_END, this._enableLabelAnimationHook);
|
|
74084
|
-
this._enableLabelAnimationHook = undefined;
|
|
74085
|
-
};
|
|
74086
|
-
this.event.on(HOOK_EVENT.AFTER_MARK_RENDER_END, this._enableLabelAnimationHook);
|
|
74087
|
-
}
|
|
74088
|
-
}
|
|
74089
|
-
if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.getProduct()) {
|
|
74090
|
-
vgrammarLabel.renderInner();
|
|
74091
|
-
}
|
|
74092
|
-
}
|
|
74093
74060
|
handleZoom(e) {
|
|
74094
74061
|
const { scale, scaleCenter } = e;
|
|
74095
74062
|
if (scale === 1) {
|
|
@@ -74113,7 +74080,7 @@ class ScatterSeries extends CartesianSeries {
|
|
|
74113
74080
|
}
|
|
74114
74081
|
}
|
|
74115
74082
|
onLayoutEnd() {
|
|
74116
|
-
var _a, _b;
|
|
74083
|
+
var _a, _b, _c;
|
|
74117
74084
|
super.onLayoutEnd();
|
|
74118
74085
|
this._updateSymbolGraphicPosition();
|
|
74119
74086
|
const labelGraphic = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent();
|
|
@@ -74122,7 +74089,10 @@ class ScatterSeries extends CartesianSeries {
|
|
|
74122
74089
|
postMatrix: new Matrix()
|
|
74123
74090
|
});
|
|
74124
74091
|
}
|
|
74125
|
-
this.
|
|
74092
|
+
const vgrammarLabel = (_c = this._labelMark) === null || _c === void 0 ? void 0 : _c.getComponent();
|
|
74093
|
+
if (vgrammarLabel) {
|
|
74094
|
+
vgrammarLabel.renderInner();
|
|
74095
|
+
}
|
|
74126
74096
|
}
|
|
74127
74097
|
getDefaultShapeType() {
|
|
74128
74098
|
return 'circle';
|
|
@@ -93869,16 +93839,17 @@ const registerRoseChart = () => {
|
|
|
93869
93839
|
|
|
93870
93840
|
class RadarChartSpecTransformer extends RoseLikeChartSpecTransformer {
|
|
93871
93841
|
_getDefaultSeriesSpec(spec) {
|
|
93872
|
-
var _a;
|
|
93842
|
+
var _a, _b, _c, _d;
|
|
93873
93843
|
const series = super._getDefaultSeriesSpec(spec);
|
|
93844
|
+
const areaTheme = (_b = (_a = this._option).getTheme) === null || _b === void 0 ? void 0 : _b.call(_a, 'series', 'radar', 'area');
|
|
93874
93845
|
series.line = spec.line;
|
|
93875
93846
|
series.point = spec.point;
|
|
93876
93847
|
series.stack = spec.stack;
|
|
93877
93848
|
series.percent = spec.percent;
|
|
93878
93849
|
series.area = mergeSpec({
|
|
93879
|
-
visible: false
|
|
93850
|
+
visible: (_c = areaTheme === null || areaTheme === void 0 ? void 0 : areaTheme.visible) !== null && _c !== void 0 ? _c : false
|
|
93880
93851
|
}, spec.area);
|
|
93881
|
-
series.seriesMark = (
|
|
93852
|
+
series.seriesMark = (_d = spec.seriesMark) !== null && _d !== void 0 ? _d : 'area';
|
|
93882
93853
|
series.activePoint = spec.activePoint;
|
|
93883
93854
|
series.pointDis = spec.pointDis;
|
|
93884
93855
|
series.pointDisMul = spec.pointDisMul;
|
|
@@ -101703,13 +101674,23 @@ class CartesianMarkLine extends BaseMarkLine {
|
|
|
101703
101674
|
return { points };
|
|
101704
101675
|
}
|
|
101705
101676
|
_markerLayout() {
|
|
101706
|
-
var _a, _b, _c, _d, _e;
|
|
101677
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
101707
101678
|
const updateAttrs = this._getUpdateMarkerAttrs();
|
|
101708
101679
|
if (this._spec.type === 'type-step') {
|
|
101709
101680
|
const startRelativeSeries = this._startRelativeSeries;
|
|
101710
101681
|
const endRelativeSeries = this._endRelativeSeries;
|
|
101711
101682
|
const { multiSegment, mainSegmentIndex } = this._spec.line || {};
|
|
101712
|
-
const { connectDirection
|
|
101683
|
+
const { connectDirection } = this._spec;
|
|
101684
|
+
let { expandDistance = 0 } = this._spec;
|
|
101685
|
+
const { points, limitRect } = updateAttrs;
|
|
101686
|
+
const coordinatePoints = array(points).filter(Boolean);
|
|
101687
|
+
if (isFunction$1(expandDistance)) {
|
|
101688
|
+
const startRegion = (_a = startRelativeSeries === null || startRelativeSeries === void 0 ? void 0 : startRelativeSeries.getRegion) === null || _a === void 0 ? void 0 : _a.call(startRelativeSeries);
|
|
101689
|
+
const endRegion = (_b = endRelativeSeries === null || endRelativeSeries === void 0 ? void 0 : endRelativeSeries.getRegion) === null || _b === void 0 ? void 0 : _b.call(endRelativeSeries);
|
|
101690
|
+
expandDistance = expandDistance(this._markerData, Object.assign(Object.assign({}, this.getMarkAttributeContext()), { region: (_d = (_c = this._relativeSeries) === null || _c === void 0 ? void 0 : _c.getRegion) === null || _d === void 0 ? void 0 : _d.call(_c), startRegion,
|
|
101691
|
+
endRegion,
|
|
101692
|
+
coordinatePoints }));
|
|
101693
|
+
}
|
|
101713
101694
|
let expandDistanceValue;
|
|
101714
101695
|
if (isPercent(expandDistance)) {
|
|
101715
101696
|
const regionStart = startRelativeSeries.getRegion();
|
|
@@ -101730,9 +101711,8 @@ class CartesianMarkLine extends BaseMarkLine {
|
|
|
101730
101711
|
else {
|
|
101731
101712
|
expandDistanceValue = expandDistance;
|
|
101732
101713
|
}
|
|
101733
|
-
const { points, limitRect } = updateAttrs;
|
|
101734
101714
|
if (!points || points.length < 2) {
|
|
101735
|
-
(
|
|
101715
|
+
(_e = this._markerComponent) === null || _e === void 0 ? void 0 : _e.setAttributes(updateAttrs);
|
|
101736
101716
|
return;
|
|
101737
101717
|
}
|
|
101738
101718
|
const joinPoints = getInsertPoints(points[0], points[1], connectDirection, expandDistanceValue);
|
|
@@ -101746,11 +101726,11 @@ class CartesianMarkLine extends BaseMarkLine {
|
|
|
101746
101726
|
else {
|
|
101747
101727
|
labelPositionAttrs = Object.assign({ position: 'start', autoRotate: false }, getTextOffset(points[0], points[1], connectDirection, expandDistanceValue));
|
|
101748
101728
|
}
|
|
101749
|
-
const markerComponentAttr = (
|
|
101729
|
+
const markerComponentAttr = (_g = (_f = this._markerComponent) === null || _f === void 0 ? void 0 : _f.attribute) !== null && _g !== void 0 ? _g : {};
|
|
101750
101730
|
const prevLabelAttrs = array(markerComponentAttr.label);
|
|
101751
101731
|
const updateLabels = array(updateAttrs.label);
|
|
101752
101732
|
const labelsInSpec = array(this._spec.label);
|
|
101753
|
-
(
|
|
101733
|
+
(_h = this._markerComponent) === null || _h === void 0 ? void 0 : _h.setAttributes({
|
|
101754
101734
|
points: multiSegment
|
|
101755
101735
|
? [
|
|
101756
101736
|
[joinPoints[0], joinPoints[1]],
|
|
@@ -101790,7 +101770,7 @@ class CartesianMarkLine extends BaseMarkLine {
|
|
|
101790
101770
|
});
|
|
101791
101771
|
}
|
|
101792
101772
|
else {
|
|
101793
|
-
(
|
|
101773
|
+
(_j = this._markerComponent) === null || _j === void 0 ? void 0 : _j.setAttributes(updateAttrs);
|
|
101794
101774
|
}
|
|
101795
101775
|
}
|
|
101796
101776
|
_computeOptions() {
|
|
@@ -106379,7 +106359,7 @@ class ElementActive extends BaseTrigger {
|
|
|
106379
106359
|
const { interaction, state } = this.options;
|
|
106380
106360
|
const statedGraphics = interaction.getStatedGraphics(this);
|
|
106381
106361
|
const g = graphic !== null && graphic !== void 0 ? graphic : statedGraphics === null || statedGraphics === void 0 ? void 0 : statedGraphics[0];
|
|
106382
|
-
if (g && statedGraphics.includes(g)) {
|
|
106362
|
+
if (g && (statedGraphics === null || statedGraphics === void 0 ? void 0 : statedGraphics.includes(g))) {
|
|
106383
106363
|
g.removeState(state);
|
|
106384
106364
|
interaction.setStatedGraphics(this, statedGraphics.filter(sg => sg !== g));
|
|
106385
106365
|
}
|
package/build/index.js
CHANGED
|
@@ -70227,21 +70227,24 @@
|
|
|
70227
70227
|
this._interaction = new Interaction();
|
|
70228
70228
|
const series = this.getAllSeries();
|
|
70229
70229
|
const mergedTriggers = [];
|
|
70230
|
-
const
|
|
70230
|
+
const groupedTriggers = [];
|
|
70231
70231
|
series.forEach(s => {
|
|
70232
70232
|
const triggers = s.getInteractionTriggers();
|
|
70233
70233
|
if (triggers && triggers.length) {
|
|
70234
70234
|
const regionId = s.getRegion().id;
|
|
70235
70235
|
triggers.forEach(({ trigger, marks }) => {
|
|
70236
|
-
const
|
|
70237
|
-
if (
|
|
70238
|
-
marks.
|
|
70239
|
-
mergedTriggersMarks[interactionId].marks.push(m);
|
|
70240
|
-
});
|
|
70236
|
+
const sameTrigger = groupedTriggers.find(item => item.regionId === regionId && isEqual(item.config, trigger));
|
|
70237
|
+
if (sameTrigger) {
|
|
70238
|
+
sameTrigger.trigger.marks.push(...marks);
|
|
70241
70239
|
}
|
|
70242
70240
|
else {
|
|
70243
|
-
|
|
70244
|
-
|
|
70241
|
+
const mergedTrigger = Object.assign(Object.assign({}, trigger), { marks: [...marks] });
|
|
70242
|
+
groupedTriggers.push({
|
|
70243
|
+
regionId,
|
|
70244
|
+
config: Object.assign({}, trigger),
|
|
70245
|
+
trigger: mergedTrigger
|
|
70246
|
+
});
|
|
70247
|
+
mergedTriggers.push(mergedTrigger);
|
|
70245
70248
|
}
|
|
70246
70249
|
});
|
|
70247
70250
|
}
|
|
@@ -74013,10 +74016,6 @@
|
|
|
74013
74016
|
if (this._symbolMark.getProduct()) {
|
|
74014
74017
|
this._symbolMark.compileEncode();
|
|
74015
74018
|
}
|
|
74016
|
-
if (this._isGeoCoordinateSeries()) {
|
|
74017
|
-
this._updateSymbolGraphicPosition();
|
|
74018
|
-
this._refreshLabelComponent(true, true);
|
|
74019
|
-
}
|
|
74020
74019
|
}
|
|
74021
74020
|
initLabelMarkStyle(labelMark) {
|
|
74022
74021
|
if (!labelMark) {
|
|
@@ -74064,38 +74063,6 @@
|
|
|
74064
74063
|
}
|
|
74065
74064
|
return labelGraphic;
|
|
74066
74065
|
}
|
|
74067
|
-
_isGeoCoordinateSeries() {
|
|
74068
|
-
var _a, _b;
|
|
74069
|
-
return ((_b = (_a = this.getXAxisHelper()) === null || _a === void 0 ? void 0 : _a.getAxisType) === null || _b === void 0 ? void 0 : _b.call(_a)) === ComponentTypeEnum.geoCoordinate;
|
|
74070
|
-
}
|
|
74071
|
-
_refreshLabelComponent(resetPostMatrix = false, disableAnimation = false) {
|
|
74072
|
-
var _a, _b;
|
|
74073
|
-
const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
|
|
74074
|
-
const labelGraphic = (_b = vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.getComponent) === null || _b === void 0 ? void 0 : _b.call(vgrammarLabel);
|
|
74075
|
-
if (resetPostMatrix) {
|
|
74076
|
-
if (labelGraphic === null || labelGraphic === void 0 ? void 0 : labelGraphic.attribute.postMatrix) {
|
|
74077
|
-
labelGraphic.setAttributes({
|
|
74078
|
-
postMatrix: new Matrix()
|
|
74079
|
-
});
|
|
74080
|
-
}
|
|
74081
|
-
}
|
|
74082
|
-
if (disableAnimation && (labelGraphic === null || labelGraphic === void 0 ? void 0 : labelGraphic.disableAnimation)) {
|
|
74083
|
-
labelGraphic.disableAnimation();
|
|
74084
|
-
if (!this._enableLabelAnimationHook) {
|
|
74085
|
-
this._enableLabelAnimationHook = () => {
|
|
74086
|
-
var _a, _b, _c, _d;
|
|
74087
|
-
const currentLabelGraphic = (_c = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
74088
|
-
(_d = currentLabelGraphic === null || currentLabelGraphic === void 0 ? void 0 : currentLabelGraphic.enableAnimation) === null || _d === void 0 ? void 0 : _d.call(currentLabelGraphic);
|
|
74089
|
-
this.event.off(HOOK_EVENT.AFTER_MARK_RENDER_END, this._enableLabelAnimationHook);
|
|
74090
|
-
this._enableLabelAnimationHook = undefined;
|
|
74091
|
-
};
|
|
74092
|
-
this.event.on(HOOK_EVENT.AFTER_MARK_RENDER_END, this._enableLabelAnimationHook);
|
|
74093
|
-
}
|
|
74094
|
-
}
|
|
74095
|
-
if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.getProduct()) {
|
|
74096
|
-
vgrammarLabel.renderInner();
|
|
74097
|
-
}
|
|
74098
|
-
}
|
|
74099
74066
|
handleZoom(e) {
|
|
74100
74067
|
const { scale, scaleCenter } = e;
|
|
74101
74068
|
if (scale === 1) {
|
|
@@ -74119,7 +74086,7 @@
|
|
|
74119
74086
|
}
|
|
74120
74087
|
}
|
|
74121
74088
|
onLayoutEnd() {
|
|
74122
|
-
var _a, _b;
|
|
74089
|
+
var _a, _b, _c;
|
|
74123
74090
|
super.onLayoutEnd();
|
|
74124
74091
|
this._updateSymbolGraphicPosition();
|
|
74125
74092
|
const labelGraphic = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent();
|
|
@@ -74128,7 +74095,10 @@
|
|
|
74128
74095
|
postMatrix: new Matrix()
|
|
74129
74096
|
});
|
|
74130
74097
|
}
|
|
74131
|
-
this.
|
|
74098
|
+
const vgrammarLabel = (_c = this._labelMark) === null || _c === void 0 ? void 0 : _c.getComponent();
|
|
74099
|
+
if (vgrammarLabel) {
|
|
74100
|
+
vgrammarLabel.renderInner();
|
|
74101
|
+
}
|
|
74132
74102
|
}
|
|
74133
74103
|
getDefaultShapeType() {
|
|
74134
74104
|
return 'circle';
|
|
@@ -93875,16 +93845,17 @@
|
|
|
93875
93845
|
|
|
93876
93846
|
class RadarChartSpecTransformer extends RoseLikeChartSpecTransformer {
|
|
93877
93847
|
_getDefaultSeriesSpec(spec) {
|
|
93878
|
-
var _a;
|
|
93848
|
+
var _a, _b, _c, _d;
|
|
93879
93849
|
const series = super._getDefaultSeriesSpec(spec);
|
|
93850
|
+
const areaTheme = (_b = (_a = this._option).getTheme) === null || _b === void 0 ? void 0 : _b.call(_a, 'series', 'radar', 'area');
|
|
93880
93851
|
series.line = spec.line;
|
|
93881
93852
|
series.point = spec.point;
|
|
93882
93853
|
series.stack = spec.stack;
|
|
93883
93854
|
series.percent = spec.percent;
|
|
93884
93855
|
series.area = mergeSpec({
|
|
93885
|
-
visible: false
|
|
93856
|
+
visible: (_c = areaTheme === null || areaTheme === void 0 ? void 0 : areaTheme.visible) !== null && _c !== void 0 ? _c : false
|
|
93886
93857
|
}, spec.area);
|
|
93887
|
-
series.seriesMark = (
|
|
93858
|
+
series.seriesMark = (_d = spec.seriesMark) !== null && _d !== void 0 ? _d : 'area';
|
|
93888
93859
|
series.activePoint = spec.activePoint;
|
|
93889
93860
|
series.pointDis = spec.pointDis;
|
|
93890
93861
|
series.pointDisMul = spec.pointDisMul;
|
|
@@ -101709,13 +101680,23 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101709
101680
|
return { points };
|
|
101710
101681
|
}
|
|
101711
101682
|
_markerLayout() {
|
|
101712
|
-
var _a, _b, _c, _d, _e;
|
|
101683
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
101713
101684
|
const updateAttrs = this._getUpdateMarkerAttrs();
|
|
101714
101685
|
if (this._spec.type === 'type-step') {
|
|
101715
101686
|
const startRelativeSeries = this._startRelativeSeries;
|
|
101716
101687
|
const endRelativeSeries = this._endRelativeSeries;
|
|
101717
101688
|
const { multiSegment, mainSegmentIndex } = this._spec.line || {};
|
|
101718
|
-
const { connectDirection
|
|
101689
|
+
const { connectDirection } = this._spec;
|
|
101690
|
+
let { expandDistance = 0 } = this._spec;
|
|
101691
|
+
const { points, limitRect } = updateAttrs;
|
|
101692
|
+
const coordinatePoints = array(points).filter(Boolean);
|
|
101693
|
+
if (isFunction$1(expandDistance)) {
|
|
101694
|
+
const startRegion = (_a = startRelativeSeries === null || startRelativeSeries === void 0 ? void 0 : startRelativeSeries.getRegion) === null || _a === void 0 ? void 0 : _a.call(startRelativeSeries);
|
|
101695
|
+
const endRegion = (_b = endRelativeSeries === null || endRelativeSeries === void 0 ? void 0 : endRelativeSeries.getRegion) === null || _b === void 0 ? void 0 : _b.call(endRelativeSeries);
|
|
101696
|
+
expandDistance = expandDistance(this._markerData, Object.assign(Object.assign({}, this.getMarkAttributeContext()), { region: (_d = (_c = this._relativeSeries) === null || _c === void 0 ? void 0 : _c.getRegion) === null || _d === void 0 ? void 0 : _d.call(_c), startRegion,
|
|
101697
|
+
endRegion,
|
|
101698
|
+
coordinatePoints }));
|
|
101699
|
+
}
|
|
101719
101700
|
let expandDistanceValue;
|
|
101720
101701
|
if (isPercent(expandDistance)) {
|
|
101721
101702
|
const regionStart = startRelativeSeries.getRegion();
|
|
@@ -101736,9 +101717,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101736
101717
|
else {
|
|
101737
101718
|
expandDistanceValue = expandDistance;
|
|
101738
101719
|
}
|
|
101739
|
-
const { points, limitRect } = updateAttrs;
|
|
101740
101720
|
if (!points || points.length < 2) {
|
|
101741
|
-
(
|
|
101721
|
+
(_e = this._markerComponent) === null || _e === void 0 ? void 0 : _e.setAttributes(updateAttrs);
|
|
101742
101722
|
return;
|
|
101743
101723
|
}
|
|
101744
101724
|
const joinPoints = getInsertPoints(points[0], points[1], connectDirection, expandDistanceValue);
|
|
@@ -101752,11 +101732,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101752
101732
|
else {
|
|
101753
101733
|
labelPositionAttrs = Object.assign({ position: 'start', autoRotate: false }, getTextOffset(points[0], points[1], connectDirection, expandDistanceValue));
|
|
101754
101734
|
}
|
|
101755
|
-
const markerComponentAttr = (
|
|
101735
|
+
const markerComponentAttr = (_g = (_f = this._markerComponent) === null || _f === void 0 ? void 0 : _f.attribute) !== null && _g !== void 0 ? _g : {};
|
|
101756
101736
|
const prevLabelAttrs = array(markerComponentAttr.label);
|
|
101757
101737
|
const updateLabels = array(updateAttrs.label);
|
|
101758
101738
|
const labelsInSpec = array(this._spec.label);
|
|
101759
|
-
(
|
|
101739
|
+
(_h = this._markerComponent) === null || _h === void 0 ? void 0 : _h.setAttributes({
|
|
101760
101740
|
points: multiSegment
|
|
101761
101741
|
? [
|
|
101762
101742
|
[joinPoints[0], joinPoints[1]],
|
|
@@ -101796,7 +101776,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101796
101776
|
});
|
|
101797
101777
|
}
|
|
101798
101778
|
else {
|
|
101799
|
-
(
|
|
101779
|
+
(_j = this._markerComponent) === null || _j === void 0 ? void 0 : _j.setAttributes(updateAttrs);
|
|
101800
101780
|
}
|
|
101801
101781
|
}
|
|
101802
101782
|
_computeOptions() {
|
|
@@ -106385,7 +106365,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
106385
106365
|
const { interaction, state } = this.options;
|
|
106386
106366
|
const statedGraphics = interaction.getStatedGraphics(this);
|
|
106387
106367
|
const g = graphic !== null && graphic !== void 0 ? graphic : statedGraphics === null || statedGraphics === void 0 ? void 0 : statedGraphics[0];
|
|
106388
|
-
if (g && statedGraphics.includes(g)) {
|
|
106368
|
+
if (g && (statedGraphics === null || statedGraphics === void 0 ? void 0 : statedGraphics.includes(g))) {
|
|
106389
106369
|
g.removeState(state);
|
|
106390
106370
|
interaction.setStatedGraphics(this, statedGraphics.filter(sg => sg !== g));
|
|
106391
106371
|
}
|