@visactor/vchart 2.1.0-alpha.10 → 2.1.0-alpha.12
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 -12
- package/build/index.js +37 -12
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/component/legend/base-legend.js +1 -1
- package/cjs/component/legend/base-legend.js.map +1 -1
- package/cjs/component/marker/base-marker.js +11 -7
- package/cjs/component/marker/base-marker.js.map +1 -1
- package/cjs/component/marker/mark-point/base-mark-point.js +8 -7
- package/cjs/component/marker/mark-point/base-mark-point.js.map +1 -1
- package/cjs/constant/funnel.js +1 -2
- package/cjs/constant/scatter.js +2 -1
- package/cjs/constant/scroll-bar.js +1 -1
- package/cjs/constant/sunburst.js +1 -1
- package/cjs/constant/waterfall.js +1 -1
- package/cjs/constant/word-cloud.js +1 -1
- package/cjs/core/expression-function.js +1 -1
- package/cjs/core/factory.js +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/instance-manager.js +1 -1
- package/cjs/core/interface.js +1 -1
- package/cjs/core/util.js +1 -1
- package/cjs/core/vchart.js +1 -1
- package/cjs/data/data-view-utils.js +1 -1
- package/cjs/data/initialize.js +1 -1
- package/cjs/data/register.js +1 -1
- package/cjs/mark/base/base-line.js +2 -2
- package/cjs/mark/base/base-line.js.map +1 -1
- package/cjs/series/waterfall/waterfall.d.ts +2 -0
- package/cjs/series/waterfall/waterfall.js +12 -4
- package/cjs/series/waterfall/waterfall.js.map +1 -1
- package/esm/component/legend/base-legend.js +1 -1
- package/esm/component/legend/base-legend.js.map +1 -1
- package/esm/component/marker/base-marker.js +11 -7
- package/esm/component/marker/base-marker.js.map +1 -1
- package/esm/component/marker/mark-point/base-mark-point.js +7 -7
- package/esm/component/marker/mark-point/base-mark-point.js.map +1 -1
- package/esm/constant/funnel.js +1 -2
- package/esm/constant/scatter.js +2 -1
- package/esm/constant/scroll-bar.js +1 -1
- package/esm/constant/sunburst.js +1 -1
- package/esm/constant/waterfall.js +1 -1
- package/esm/constant/word-cloud.js +1 -1
- package/esm/core/expression-function.js +1 -1
- package/esm/core/factory.js +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/instance-manager.js +1 -1
- package/esm/core/interface.js +1 -1
- package/esm/core/util.js +1 -1
- package/esm/core/vchart.js +1 -1
- package/esm/data/data-view-utils.js +1 -1
- package/esm/data/initialize.js +1 -1
- package/esm/data/register.js +1 -1
- package/esm/mark/base/base-line.js +2 -2
- package/esm/mark/base/base-line.js.map +1 -1
- package/esm/series/waterfall/waterfall.d.ts +2 -0
- package/esm/series/waterfall/waterfall.js +12 -4
- package/esm/series/waterfall/waterfall.js.map +1 -1
- package/package.json +4 -4
package/build/index.es.js
CHANGED
|
@@ -71418,7 +71418,7 @@ class BaseLineMark extends BaseMark {
|
|
|
71418
71418
|
: null));
|
|
71419
71419
|
}
|
|
71420
71420
|
_runPointsEncoder(newStyles, g, attrs = {}) {
|
|
71421
|
-
var _a, _b
|
|
71421
|
+
var _a, _b;
|
|
71422
71422
|
const data = g.context.data;
|
|
71423
71423
|
const lineAttrs = [];
|
|
71424
71424
|
const points = [];
|
|
@@ -71443,7 +71443,7 @@ class BaseLineMark extends BaseMark {
|
|
|
71443
71443
|
points[index].context = (_a = this._keyGetter(datum)) !== null && _a !== void 0 ? _a : index;
|
|
71444
71444
|
});
|
|
71445
71445
|
if (progressive) {
|
|
71446
|
-
const segments = (
|
|
71446
|
+
const segments = ((_b = g.attribute) === null || _b === void 0 ? void 0 : _b.segments) ? [...g.attribute.segments] : [];
|
|
71447
71447
|
segments.push({
|
|
71448
71448
|
points
|
|
71449
71449
|
});
|
|
@@ -83113,6 +83113,17 @@ class WaterfallSeries extends BarSeries {
|
|
|
83113
83113
|
bandPosition: this._bandPosition
|
|
83114
83114
|
}));
|
|
83115
83115
|
}
|
|
83116
|
+
_isCategoryAxisInverse() {
|
|
83117
|
+
var _a, _b, _c, _e;
|
|
83118
|
+
return this._direction === "horizontal"
|
|
83119
|
+
? (_b = (_a = this._yAxisHelper) === null || _a === void 0 ? void 0 : _a.isInverse) === null || _b === void 0 ? void 0 : _b.call(_a)
|
|
83120
|
+
: (_e = (_c = this._xAxisHelper) === null || _c === void 0 ? void 0 : _c.isInverse) === null || _e === void 0 ? void 0 : _e.call(_c);
|
|
83121
|
+
}
|
|
83122
|
+
_getLeaderLineCategoryPos(isStart, isDecrease) {
|
|
83123
|
+
const inverse = !!this._isCategoryAxisInverse();
|
|
83124
|
+
const normalPos = isStart ? (isDecrease ? 0 : 1) : isDecrease ? 1 : 0;
|
|
83125
|
+
return inverse ? 1 - normalPos : normalPos;
|
|
83126
|
+
}
|
|
83116
83127
|
initMarkStyle() {
|
|
83117
83128
|
super.initMarkStyle();
|
|
83118
83129
|
const isDecrease = this._spec.calculationMode === 'decrease';
|
|
@@ -83126,9 +83137,9 @@ class WaterfallSeries extends BarSeries {
|
|
|
83126
83137
|
if (!datum.lastIndex) {
|
|
83127
83138
|
return 0;
|
|
83128
83139
|
}
|
|
83129
|
-
return this.totalPositionY(datum, 'lastIndex', isDecrease
|
|
83140
|
+
return this.totalPositionY(datum, 'lastIndex', this._getLeaderLineCategoryPos(true, isDecrease));
|
|
83130
83141
|
},
|
|
83131
|
-
y1: (datum) => this.totalPositionY(datum, 'index', isDecrease
|
|
83142
|
+
y1: (datum) => this.totalPositionY(datum, 'index', this._getLeaderLineCategoryPos(false, isDecrease))
|
|
83132
83143
|
}, 'normal', AttributeLevel.Series);
|
|
83133
83144
|
}
|
|
83134
83145
|
else {
|
|
@@ -83138,9 +83149,9 @@ class WaterfallSeries extends BarSeries {
|
|
|
83138
83149
|
if (!datum.lastIndex) {
|
|
83139
83150
|
return 0;
|
|
83140
83151
|
}
|
|
83141
|
-
return this.totalPositionX(datum, 'lastIndex', isDecrease
|
|
83152
|
+
return this.totalPositionX(datum, 'lastIndex', this._getLeaderLineCategoryPos(true, isDecrease));
|
|
83142
83153
|
},
|
|
83143
|
-
x1: (datum) => this.totalPositionX(datum, 'index', isDecrease
|
|
83154
|
+
x1: (datum) => this.totalPositionX(datum, 'index', this._getLeaderLineCategoryPos(false, isDecrease)),
|
|
83144
83155
|
y: (datum) => this.totalPositionY(datum, 'lastEnd', 0),
|
|
83145
83156
|
y1: (datum) => this.totalPositionY(datum, datum.isTotal ? 'end' : 'start', 0)
|
|
83146
83157
|
}, 'normal', AttributeLevel.Series);
|
|
@@ -102366,6 +102377,7 @@ class BaseLegend extends BaseComponent {
|
|
|
102366
102377
|
}
|
|
102367
102378
|
clear() {
|
|
102368
102379
|
super.clear();
|
|
102380
|
+
this._legendComponent = null;
|
|
102369
102381
|
this._cacheAttrs = null;
|
|
102370
102382
|
this._preSelectedData = null;
|
|
102371
102383
|
}
|
|
@@ -108171,6 +108183,7 @@ const MARKER_DOMAIN_POSITION_SPEC_KEYS = [
|
|
|
108171
108183
|
'radius1'
|
|
108172
108184
|
];
|
|
108173
108185
|
const MARKER_LAYOUT_POSITION_SPEC_KEYS = ['position', 'positions', 'coordinatesOffset', 'regionRelative'];
|
|
108186
|
+
const MARKER_ITEM_CONTENT_LAYOUT_SPEC_KEYS = ['offsetX', 'offsetY', 'confine'];
|
|
108174
108187
|
const normalizeMarkerLabelFormatMethod = (label) => {
|
|
108175
108188
|
if (Array.isArray(label)) {
|
|
108176
108189
|
return label.map(normalizeMarkerLabelFormatMethod);
|
|
@@ -108202,7 +108215,6 @@ const normalizeMarkerStyles = (value) => {
|
|
|
108202
108215
|
return normalized;
|
|
108203
108216
|
};
|
|
108204
108217
|
const normalizeMarkerSpecForComponentOnlyUpdate = (spec, options) => {
|
|
108205
|
-
var _a;
|
|
108206
108218
|
if (!spec || typeof spec !== 'object') {
|
|
108207
108219
|
return spec;
|
|
108208
108220
|
}
|
|
@@ -108226,9 +108238,18 @@ const normalizeMarkerSpecForComponentOnlyUpdate = (spec, options) => {
|
|
|
108226
108238
|
Object.keys(normalized).forEach(key => {
|
|
108227
108239
|
normalized[key] = normalizeMarkerStyles(normalized[key]);
|
|
108228
108240
|
});
|
|
108229
|
-
const
|
|
108230
|
-
if (
|
|
108231
|
-
normalized.itemContent = Object.assign(
|
|
108241
|
+
const itemContent = normalized.itemContent;
|
|
108242
|
+
if (itemContent && typeof itemContent === 'object') {
|
|
108243
|
+
normalized.itemContent = Object.assign({}, itemContent);
|
|
108244
|
+
MARKER_ITEM_CONTENT_LAYOUT_SPEC_KEYS.forEach(key => {
|
|
108245
|
+
if (key in normalized.itemContent) {
|
|
108246
|
+
normalized.itemContent[key] = MARKER_COORDINATE_PLACEHOLDER;
|
|
108247
|
+
}
|
|
108248
|
+
});
|
|
108249
|
+
const text = normalized.itemContent.text;
|
|
108250
|
+
if (text && typeof text === 'object') {
|
|
108251
|
+
normalized.itemContent.text = Object.assign(Object.assign({}, normalizeMarkerLabelFormatMethod(text)), { text: MARKER_TEXT_PLACEHOLDER });
|
|
108252
|
+
}
|
|
108232
108253
|
}
|
|
108233
108254
|
return normalized;
|
|
108234
108255
|
};
|
|
@@ -110664,6 +110685,7 @@ class BaseMarkPoint extends BaseMarker {
|
|
|
110664
110685
|
_createMarkerComponent() {
|
|
110665
110686
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
|
|
110666
110687
|
const { itemContent = {}, itemLine = {}, targetSymbol = {} } = this._spec;
|
|
110688
|
+
const region = this._relativeSeries.getRegion();
|
|
110667
110689
|
const _10 = itemContent, { type = 'text', text: label, symbol, image, richText, customMark, textStyle, symbolStyle, imageStyle, richTextStyle, customMarkStyle, style = {}, state = {} } = _10, restItemContent = __rest$h(_10, ["type", "text", "symbol", "image", "richText", "customMark", "textStyle", "symbolStyle", "imageStyle", "richTextStyle", "customMarkStyle", "style", "state"]);
|
|
110668
110690
|
let itemContentState = null;
|
|
110669
110691
|
let itemContentStyle = null;
|
|
@@ -110713,7 +110735,7 @@ class BaseMarkPoint extends BaseMarker {
|
|
|
110713
110735
|
select: (_u = this._spec.interactive) !== null && _u !== void 0 ? _u : true,
|
|
110714
110736
|
position: { x: 0, y: 0 },
|
|
110715
110737
|
clipInRange: (_v = this._spec.clip) !== null && _v !== void 0 ? _v : false,
|
|
110716
|
-
itemContent: Object.assign(Object.assign({ type, offsetX: transformOffset(itemContent.offsetX,
|
|
110738
|
+
itemContent: Object.assign(Object.assign({ type, offsetX: transformOffset(itemContent.offsetX, region), offsetY: transformOffset(itemContent.offsetY, region) }, restItemContent), { style: transformStyle(itemContentStyle, this._markerData, this._markAttributeContext) }),
|
|
110717
110739
|
targetSymbol: {
|
|
110718
110740
|
offset: (_w = targetSymbol.offset) !== null && _w !== void 0 ? _w : 0,
|
|
110719
110741
|
visible: (_x = targetSymbol.visible) !== null && _x !== void 0 ? _x : false,
|
|
@@ -110758,6 +110780,7 @@ class BaseMarkPoint extends BaseMarker {
|
|
|
110758
110780
|
: data.latestData
|
|
110759
110781
|
: seriesData;
|
|
110760
110782
|
const { itemLine = {}, itemContent = {} } = this._spec;
|
|
110783
|
+
const region = this._relativeSeries.getRegion();
|
|
110761
110784
|
const { visible: itemLineVisible, line = {} } = itemLine, restItemLine = __rest$h(itemLine, ["visible", "line"]);
|
|
110762
110785
|
const itemLineAttrs = itemLineVisible !== false
|
|
110763
110786
|
? Object.assign(Object.assign({}, restItemLine), { visible: true, lineStyle: transformToGraphic(line.style) })
|
|
@@ -110779,6 +110802,8 @@ class BaseMarkPoint extends BaseMarker {
|
|
|
110779
110802
|
const attribute = (_d = this._markerComponent.attribute) !== null && _d !== void 0 ? _d : {};
|
|
110780
110803
|
const textStyle = (_f = (_e = attribute.itemContent) === null || _e === void 0 ? void 0 : _e.textStyle) !== null && _f !== void 0 ? _f : {};
|
|
110781
110804
|
const specText = (_g = this._spec.itemContent.text) === null || _g === void 0 ? void 0 : _g.text;
|
|
110805
|
+
const offsetX = transformOffset(itemContent.offsetX, region);
|
|
110806
|
+
const offsetY = transformOffset(itemContent.offsetY, region);
|
|
110782
110807
|
this._markerComponent.setAttributes({
|
|
110783
110808
|
position: point === undefined ? { x: null, y: null } : point,
|
|
110784
110809
|
itemContent: Object.assign(Object.assign({}, attribute.itemContent), { panel: (_h = labelAttrs.panel) !== null && _h !== void 0 ? _h : (_j = attribute.itemContent) === null || _j === void 0 ? void 0 : _j.panel, padding: (_k = labelAttrs.padding) !== null && _k !== void 0 ? _k : (_l = attribute.itemContent) === null || _l === void 0 ? void 0 : _l.padding, textStyle: Object.assign(Object.assign(Object.assign({}, textStyle), ((_m = labelAttrs.textStyle) !== null && _m !== void 0 ? _m : {})), { text: ((_o = this._spec.itemContent.text) === null || _o === void 0 ? void 0 : _o.formatMethod)
|
|
@@ -110786,7 +110811,7 @@ class BaseMarkPoint extends BaseMarker {
|
|
|
110786
110811
|
this._spec.itemContent.text.formatMethod(dataPoints, seriesData)
|
|
110787
110812
|
: isValid$1(specText)
|
|
110788
110813
|
? specText
|
|
110789
|
-
: textStyle.text }), offsetX: computeOffsetFromRegion(point,
|
|
110814
|
+
: textStyle.text }), offsetX: computeOffsetFromRegion(point, offsetX, region), offsetY: computeOffsetFromRegion(point, offsetY, region) }),
|
|
110790
110815
|
itemLine: itemLineAttrs,
|
|
110791
110816
|
limitRect,
|
|
110792
110817
|
dx: this._layoutOffsetX,
|
package/build/index.js
CHANGED
|
@@ -71424,7 +71424,7 @@
|
|
|
71424
71424
|
: null));
|
|
71425
71425
|
}
|
|
71426
71426
|
_runPointsEncoder(newStyles, g, attrs = {}) {
|
|
71427
|
-
var _a, _b
|
|
71427
|
+
var _a, _b;
|
|
71428
71428
|
const data = g.context.data;
|
|
71429
71429
|
const lineAttrs = [];
|
|
71430
71430
|
const points = [];
|
|
@@ -71449,7 +71449,7 @@
|
|
|
71449
71449
|
points[index].context = (_a = this._keyGetter(datum)) !== null && _a !== void 0 ? _a : index;
|
|
71450
71450
|
});
|
|
71451
71451
|
if (progressive) {
|
|
71452
|
-
const segments = (
|
|
71452
|
+
const segments = ((_b = g.attribute) === null || _b === void 0 ? void 0 : _b.segments) ? [...g.attribute.segments] : [];
|
|
71453
71453
|
segments.push({
|
|
71454
71454
|
points
|
|
71455
71455
|
});
|
|
@@ -83119,6 +83119,17 @@
|
|
|
83119
83119
|
bandPosition: this._bandPosition
|
|
83120
83120
|
}));
|
|
83121
83121
|
}
|
|
83122
|
+
_isCategoryAxisInverse() {
|
|
83123
|
+
var _a, _b, _c, _e;
|
|
83124
|
+
return this._direction === "horizontal"
|
|
83125
|
+
? (_b = (_a = this._yAxisHelper) === null || _a === void 0 ? void 0 : _a.isInverse) === null || _b === void 0 ? void 0 : _b.call(_a)
|
|
83126
|
+
: (_e = (_c = this._xAxisHelper) === null || _c === void 0 ? void 0 : _c.isInverse) === null || _e === void 0 ? void 0 : _e.call(_c);
|
|
83127
|
+
}
|
|
83128
|
+
_getLeaderLineCategoryPos(isStart, isDecrease) {
|
|
83129
|
+
const inverse = !!this._isCategoryAxisInverse();
|
|
83130
|
+
const normalPos = isStart ? (isDecrease ? 0 : 1) : isDecrease ? 1 : 0;
|
|
83131
|
+
return inverse ? 1 - normalPos : normalPos;
|
|
83132
|
+
}
|
|
83122
83133
|
initMarkStyle() {
|
|
83123
83134
|
super.initMarkStyle();
|
|
83124
83135
|
const isDecrease = this._spec.calculationMode === 'decrease';
|
|
@@ -83132,9 +83143,9 @@
|
|
|
83132
83143
|
if (!datum.lastIndex) {
|
|
83133
83144
|
return 0;
|
|
83134
83145
|
}
|
|
83135
|
-
return this.totalPositionY(datum, 'lastIndex', isDecrease
|
|
83146
|
+
return this.totalPositionY(datum, 'lastIndex', this._getLeaderLineCategoryPos(true, isDecrease));
|
|
83136
83147
|
},
|
|
83137
|
-
y1: (datum) => this.totalPositionY(datum, 'index', isDecrease
|
|
83148
|
+
y1: (datum) => this.totalPositionY(datum, 'index', this._getLeaderLineCategoryPos(false, isDecrease))
|
|
83138
83149
|
}, 'normal', exports.AttributeLevel.Series);
|
|
83139
83150
|
}
|
|
83140
83151
|
else {
|
|
@@ -83144,9 +83155,9 @@
|
|
|
83144
83155
|
if (!datum.lastIndex) {
|
|
83145
83156
|
return 0;
|
|
83146
83157
|
}
|
|
83147
|
-
return this.totalPositionX(datum, 'lastIndex', isDecrease
|
|
83158
|
+
return this.totalPositionX(datum, 'lastIndex', this._getLeaderLineCategoryPos(true, isDecrease));
|
|
83148
83159
|
},
|
|
83149
|
-
x1: (datum) => this.totalPositionX(datum, 'index', isDecrease
|
|
83160
|
+
x1: (datum) => this.totalPositionX(datum, 'index', this._getLeaderLineCategoryPos(false, isDecrease)),
|
|
83150
83161
|
y: (datum) => this.totalPositionY(datum, 'lastEnd', 0),
|
|
83151
83162
|
y1: (datum) => this.totalPositionY(datum, datum.isTotal ? 'end' : 'start', 0)
|
|
83152
83163
|
}, 'normal', exports.AttributeLevel.Series);
|
|
@@ -102372,6 +102383,7 @@
|
|
|
102372
102383
|
}
|
|
102373
102384
|
clear() {
|
|
102374
102385
|
super.clear();
|
|
102386
|
+
this._legendComponent = null;
|
|
102375
102387
|
this._cacheAttrs = null;
|
|
102376
102388
|
this._preSelectedData = null;
|
|
102377
102389
|
}
|
|
@@ -108177,6 +108189,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
108177
108189
|
'radius1'
|
|
108178
108190
|
];
|
|
108179
108191
|
const MARKER_LAYOUT_POSITION_SPEC_KEYS = ['position', 'positions', 'coordinatesOffset', 'regionRelative'];
|
|
108192
|
+
const MARKER_ITEM_CONTENT_LAYOUT_SPEC_KEYS = ['offsetX', 'offsetY', 'confine'];
|
|
108180
108193
|
const normalizeMarkerLabelFormatMethod = (label) => {
|
|
108181
108194
|
if (Array.isArray(label)) {
|
|
108182
108195
|
return label.map(normalizeMarkerLabelFormatMethod);
|
|
@@ -108208,7 +108221,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
108208
108221
|
return normalized;
|
|
108209
108222
|
};
|
|
108210
108223
|
const normalizeMarkerSpecForComponentOnlyUpdate = (spec, options) => {
|
|
108211
|
-
var _a;
|
|
108212
108224
|
if (!spec || typeof spec !== 'object') {
|
|
108213
108225
|
return spec;
|
|
108214
108226
|
}
|
|
@@ -108232,9 +108244,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
108232
108244
|
Object.keys(normalized).forEach(key => {
|
|
108233
108245
|
normalized[key] = normalizeMarkerStyles(normalized[key]);
|
|
108234
108246
|
});
|
|
108235
|
-
const
|
|
108236
|
-
if (
|
|
108237
|
-
normalized.itemContent = Object.assign(
|
|
108247
|
+
const itemContent = normalized.itemContent;
|
|
108248
|
+
if (itemContent && typeof itemContent === 'object') {
|
|
108249
|
+
normalized.itemContent = Object.assign({}, itemContent);
|
|
108250
|
+
MARKER_ITEM_CONTENT_LAYOUT_SPEC_KEYS.forEach(key => {
|
|
108251
|
+
if (key in normalized.itemContent) {
|
|
108252
|
+
normalized.itemContent[key] = MARKER_COORDINATE_PLACEHOLDER;
|
|
108253
|
+
}
|
|
108254
|
+
});
|
|
108255
|
+
const text = normalized.itemContent.text;
|
|
108256
|
+
if (text && typeof text === 'object') {
|
|
108257
|
+
normalized.itemContent.text = Object.assign(Object.assign({}, normalizeMarkerLabelFormatMethod(text)), { text: MARKER_TEXT_PLACEHOLDER });
|
|
108258
|
+
}
|
|
108238
108259
|
}
|
|
108239
108260
|
return normalized;
|
|
108240
108261
|
};
|
|
@@ -110670,6 +110691,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
110670
110691
|
_createMarkerComponent() {
|
|
110671
110692
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
|
|
110672
110693
|
const { itemContent = {}, itemLine = {}, targetSymbol = {} } = this._spec;
|
|
110694
|
+
const region = this._relativeSeries.getRegion();
|
|
110673
110695
|
const _10 = itemContent, { type = 'text', text: label, symbol, image, richText, customMark, textStyle, symbolStyle, imageStyle, richTextStyle, customMarkStyle, style = {}, state = {} } = _10, restItemContent = __rest$h(_10, ["type", "text", "symbol", "image", "richText", "customMark", "textStyle", "symbolStyle", "imageStyle", "richTextStyle", "customMarkStyle", "style", "state"]);
|
|
110674
110696
|
let itemContentState = null;
|
|
110675
110697
|
let itemContentStyle = null;
|
|
@@ -110719,7 +110741,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
110719
110741
|
select: (_u = this._spec.interactive) !== null && _u !== void 0 ? _u : true,
|
|
110720
110742
|
position: { x: 0, y: 0 },
|
|
110721
110743
|
clipInRange: (_v = this._spec.clip) !== null && _v !== void 0 ? _v : false,
|
|
110722
|
-
itemContent: Object.assign(Object.assign({ type, offsetX: transformOffset(itemContent.offsetX,
|
|
110744
|
+
itemContent: Object.assign(Object.assign({ type, offsetX: transformOffset(itemContent.offsetX, region), offsetY: transformOffset(itemContent.offsetY, region) }, restItemContent), { style: transformStyle(itemContentStyle, this._markerData, this._markAttributeContext) }),
|
|
110723
110745
|
targetSymbol: {
|
|
110724
110746
|
offset: (_w = targetSymbol.offset) !== null && _w !== void 0 ? _w : 0,
|
|
110725
110747
|
visible: (_x = targetSymbol.visible) !== null && _x !== void 0 ? _x : false,
|
|
@@ -110764,6 +110786,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
110764
110786
|
: data.latestData
|
|
110765
110787
|
: seriesData;
|
|
110766
110788
|
const { itemLine = {}, itemContent = {} } = this._spec;
|
|
110789
|
+
const region = this._relativeSeries.getRegion();
|
|
110767
110790
|
const { visible: itemLineVisible, line = {} } = itemLine, restItemLine = __rest$h(itemLine, ["visible", "line"]);
|
|
110768
110791
|
const itemLineAttrs = itemLineVisible !== false
|
|
110769
110792
|
? Object.assign(Object.assign({}, restItemLine), { visible: true, lineStyle: transformToGraphic(line.style) })
|
|
@@ -110785,6 +110808,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
110785
110808
|
const attribute = (_d = this._markerComponent.attribute) !== null && _d !== void 0 ? _d : {};
|
|
110786
110809
|
const textStyle = (_f = (_e = attribute.itemContent) === null || _e === void 0 ? void 0 : _e.textStyle) !== null && _f !== void 0 ? _f : {};
|
|
110787
110810
|
const specText = (_g = this._spec.itemContent.text) === null || _g === void 0 ? void 0 : _g.text;
|
|
110811
|
+
const offsetX = transformOffset(itemContent.offsetX, region);
|
|
110812
|
+
const offsetY = transformOffset(itemContent.offsetY, region);
|
|
110788
110813
|
this._markerComponent.setAttributes({
|
|
110789
110814
|
position: point === undefined ? { x: null, y: null } : point,
|
|
110790
110815
|
itemContent: Object.assign(Object.assign({}, attribute.itemContent), { panel: (_h = labelAttrs.panel) !== null && _h !== void 0 ? _h : (_j = attribute.itemContent) === null || _j === void 0 ? void 0 : _j.panel, padding: (_k = labelAttrs.padding) !== null && _k !== void 0 ? _k : (_l = attribute.itemContent) === null || _l === void 0 ? void 0 : _l.padding, textStyle: Object.assign(Object.assign(Object.assign({}, textStyle), ((_m = labelAttrs.textStyle) !== null && _m !== void 0 ? _m : {})), { text: ((_o = this._spec.itemContent.text) === null || _o === void 0 ? void 0 : _o.formatMethod)
|
|
@@ -110792,7 +110817,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
110792
110817
|
this._spec.itemContent.text.formatMethod(dataPoints, seriesData)
|
|
110793
110818
|
: isValid$1(specText)
|
|
110794
110819
|
? specText
|
|
110795
|
-
: textStyle.text }), offsetX: computeOffsetFromRegion(point,
|
|
110820
|
+
: textStyle.text }), offsetX: computeOffsetFromRegion(point, offsetX, region), offsetY: computeOffsetFromRegion(point, offsetY, region) }),
|
|
110796
110821
|
itemLine: itemLineAttrs,
|
|
110797
110822
|
limitRect,
|
|
110798
110823
|
dx: this._layoutOffsetX,
|