@visactor/vchart 2.0.23-alpha.6 → 2.0.23-alpha.8
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 +57 -28
- package/build/index.js +57 -28
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/compile/compiler.d.ts +2 -0
- package/cjs/compile/compiler.js +14 -2
- package/cjs/compile/compiler.js.map +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/mark-line/cartesian-mark-line.js +7 -18
- package/cjs/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/cjs/component/marker/mark-line/interface/spec.d.ts +2 -9
- package/cjs/component/marker/mark-line/interface/spec.js.map +1 -1
- package/cjs/mark/base/base-line.js +2 -2
- package/cjs/mark/base/base-line.js.map +1 -1
- package/cjs/series/rose/rose.js +3 -7
- package/cjs/series/rose/rose.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/compile/compiler.d.ts +2 -0
- package/esm/compile/compiler.js +14 -2
- package/esm/compile/compiler.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/mark-line/cartesian-mark-line.js +8 -18
- package/esm/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/esm/component/marker/mark-line/interface/spec.d.ts +2 -9
- package/esm/component/marker/mark-line/interface/spec.js.map +1 -1
- package/esm/mark/base/base-line.js +2 -2
- package/esm/mark/base/base-line.js.map +1 -1
- package/esm/series/rose/rose.js +3 -7
- package/esm/series/rose/rose.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
|
@@ -55398,6 +55398,33 @@ class Compiler {
|
|
|
55398
55398
|
updateLayoutTag() {
|
|
55399
55399
|
this._layoutState = LayoutState.before;
|
|
55400
55400
|
}
|
|
55401
|
+
_isGeoRegionRoamDragEnabled() {
|
|
55402
|
+
var _a, _b;
|
|
55403
|
+
const chartSpec = (_b = (_a = this._compileChart) === null || _a === void 0 ? void 0 : _a.getSpec) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
55404
|
+
const regions = chartSpec === null || chartSpec === void 0 ? void 0 : chartSpec.region;
|
|
55405
|
+
if (!isArray$1(regions)) {
|
|
55406
|
+
return false;
|
|
55407
|
+
}
|
|
55408
|
+
return regions.some((region) => {
|
|
55409
|
+
var _a;
|
|
55410
|
+
if ((region === null || region === void 0 ? void 0 : region.coordinate) !== 'geo' || !region.roam) {
|
|
55411
|
+
return false;
|
|
55412
|
+
}
|
|
55413
|
+
if (region.roam === true) {
|
|
55414
|
+
return true;
|
|
55415
|
+
}
|
|
55416
|
+
return (_a = region.roam.drag) !== null && _a !== void 0 ? _a : true;
|
|
55417
|
+
});
|
|
55418
|
+
}
|
|
55419
|
+
_shouldDisableCanvasTouchAction() {
|
|
55420
|
+
if (!isTrueBrowser(this._option.mode)) {
|
|
55421
|
+
return false;
|
|
55422
|
+
}
|
|
55423
|
+
const supportsTouchEvents = isValid$1(this._option.supportsTouchEvents)
|
|
55424
|
+
? this._option.supportsTouchEvents
|
|
55425
|
+
: vglobal.supportsTouchEvents;
|
|
55426
|
+
return supportsTouchEvents === false && this._isGeoRegionRoamDragEnabled();
|
|
55427
|
+
}
|
|
55401
55428
|
_setCanvasStyle() {
|
|
55402
55429
|
if (!this._stage) {
|
|
55403
55430
|
return;
|
|
@@ -55408,6 +55435,7 @@ class Compiler {
|
|
|
55408
55435
|
const canvas = this.getCanvas();
|
|
55409
55436
|
if (canvas) {
|
|
55410
55437
|
canvas.style.display = 'block';
|
|
55438
|
+
canvas.style.touchAction = this._shouldDisableCanvasTouchAction() ? 'none' : '';
|
|
55411
55439
|
}
|
|
55412
55440
|
}
|
|
55413
55441
|
}
|
|
@@ -55426,6 +55454,7 @@ class Compiler {
|
|
|
55426
55454
|
this._cachedMarks = null;
|
|
55427
55455
|
}
|
|
55428
55456
|
chart.compile();
|
|
55457
|
+
this._setCanvasStyle();
|
|
55429
55458
|
chart.afterCompile();
|
|
55430
55459
|
}
|
|
55431
55460
|
clearNextRender() {
|
|
@@ -65394,7 +65423,7 @@ class BaseLineMark extends BaseMark {
|
|
|
65394
65423
|
: null));
|
|
65395
65424
|
}
|
|
65396
65425
|
_runPointsEncoder(newStyles, g, attrs = {}) {
|
|
65397
|
-
var _a, _b
|
|
65426
|
+
var _a, _b;
|
|
65398
65427
|
const data = g.context.data;
|
|
65399
65428
|
const lineAttrs = [];
|
|
65400
65429
|
const points = [];
|
|
@@ -65419,7 +65448,7 @@ class BaseLineMark extends BaseMark {
|
|
|
65419
65448
|
points[index].context = (_a = this._keyGetter(datum)) !== null && _a !== void 0 ? _a : index;
|
|
65420
65449
|
});
|
|
65421
65450
|
if (progressive) {
|
|
65422
|
-
const segments = (
|
|
65451
|
+
const segments = ((_b = g.attribute) === null || _b === void 0 ? void 0 : _b.segments) ? [...g.attribute.segments] : [];
|
|
65423
65452
|
segments.push({
|
|
65424
65453
|
points
|
|
65425
65454
|
});
|
|
@@ -76518,6 +76547,17 @@ class WaterfallSeries extends BarSeries {
|
|
|
76518
76547
|
bandPosition: this._bandPosition
|
|
76519
76548
|
}));
|
|
76520
76549
|
}
|
|
76550
|
+
_isCategoryAxisInverse() {
|
|
76551
|
+
var _a, _b, _c, _e;
|
|
76552
|
+
return this._direction === "horizontal"
|
|
76553
|
+
? (_b = (_a = this._yAxisHelper) === null || _a === void 0 ? void 0 : _a.isInverse) === null || _b === void 0 ? void 0 : _b.call(_a)
|
|
76554
|
+
: (_e = (_c = this._xAxisHelper) === null || _c === void 0 ? void 0 : _c.isInverse) === null || _e === void 0 ? void 0 : _e.call(_c);
|
|
76555
|
+
}
|
|
76556
|
+
_getLeaderLineCategoryPos(isStart, isDecrease) {
|
|
76557
|
+
const inverse = !!this._isCategoryAxisInverse();
|
|
76558
|
+
const normalPos = isStart ? (isDecrease ? 0 : 1) : isDecrease ? 1 : 0;
|
|
76559
|
+
return inverse ? 1 - normalPos : normalPos;
|
|
76560
|
+
}
|
|
76521
76561
|
initMarkStyle() {
|
|
76522
76562
|
super.initMarkStyle();
|
|
76523
76563
|
const isDecrease = this._spec.calculationMode === 'decrease';
|
|
@@ -76531,9 +76571,9 @@ class WaterfallSeries extends BarSeries {
|
|
|
76531
76571
|
if (!datum.lastIndex) {
|
|
76532
76572
|
return 0;
|
|
76533
76573
|
}
|
|
76534
|
-
return this.totalPositionY(datum, 'lastIndex', isDecrease
|
|
76574
|
+
return this.totalPositionY(datum, 'lastIndex', this._getLeaderLineCategoryPos(true, isDecrease));
|
|
76535
76575
|
},
|
|
76536
|
-
y1: (datum) => this.totalPositionY(datum, 'index', isDecrease
|
|
76576
|
+
y1: (datum) => this.totalPositionY(datum, 'index', this._getLeaderLineCategoryPos(false, isDecrease))
|
|
76537
76577
|
}, 'normal', AttributeLevel.Series);
|
|
76538
76578
|
}
|
|
76539
76579
|
else {
|
|
@@ -76543,9 +76583,9 @@ class WaterfallSeries extends BarSeries {
|
|
|
76543
76583
|
if (!datum.lastIndex) {
|
|
76544
76584
|
return 0;
|
|
76545
76585
|
}
|
|
76546
|
-
return this.totalPositionX(datum, 'lastIndex', isDecrease
|
|
76586
|
+
return this.totalPositionX(datum, 'lastIndex', this._getLeaderLineCategoryPos(true, isDecrease));
|
|
76547
76587
|
},
|
|
76548
|
-
x1: (datum) => this.totalPositionX(datum, 'index', isDecrease
|
|
76588
|
+
x1: (datum) => this.totalPositionX(datum, 'index', this._getLeaderLineCategoryPos(false, isDecrease)),
|
|
76549
76589
|
y: (datum) => this.totalPositionY(datum, 'lastEnd', 0),
|
|
76550
76590
|
y1: (datum) => this.totalPositionY(datum, datum.isTotal ? 'end' : 'start', 0)
|
|
76551
76591
|
}, 'normal', AttributeLevel.Series);
|
|
@@ -79898,14 +79938,11 @@ class RoseSeries extends RoseLikeSeries {
|
|
|
79898
79938
|
fill: this.getColorAttribute(),
|
|
79899
79939
|
outerRadius: (datum) => valueInScaleRange(this.radiusAxisHelper.dataToPosition([datum[this._radiusField[0]]]), this.radiusAxisHelper.getScale(0)),
|
|
79900
79940
|
innerRadius: (datum) => {
|
|
79901
|
-
var _a;
|
|
79902
79941
|
if (!this.getStack()) {
|
|
79903
|
-
return
|
|
79942
|
+
return this._computeLayoutRadius() * this._innerRadius;
|
|
79904
79943
|
}
|
|
79905
79944
|
const stackStart = valueInScaleRange(this.radiusAxisHelper.dataToPosition([datum[this._innerRadiusField[0]]]), this.radiusAxisHelper.getScale(0));
|
|
79906
|
-
return stackStart <= Number.MIN_VALUE
|
|
79907
|
-
? this._computeLayoutRadius() * ((_a = this._spec.innerRadius) !== null && _a !== void 0 ? _a : 0)
|
|
79908
|
-
: stackStart;
|
|
79945
|
+
return stackStart <= Number.MIN_VALUE ? this._computeLayoutRadius() * this._innerRadius : stackStart;
|
|
79909
79946
|
}
|
|
79910
79947
|
});
|
|
79911
79948
|
}
|
|
@@ -79931,7 +79968,7 @@ class RoseSeries extends RoseLikeSeries {
|
|
|
79931
79968
|
const appearPreset = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.animationAppear) === null || _b === void 0 ? void 0 : _b.preset;
|
|
79932
79969
|
if (this._roseMark) {
|
|
79933
79970
|
const animationParams = {
|
|
79934
|
-
innerRadius: () =>
|
|
79971
|
+
innerRadius: () => this._computeLayoutRadius() * this._innerRadius
|
|
79935
79972
|
};
|
|
79936
79973
|
this._roseMark.setAnimationConfig(animationConfig((_c = Factory.getAnimationInKey('rose')) === null || _c === void 0 ? void 0 : _c(animationParams, appearPreset), userAnimationConfig("rose", this._spec, this._markAttributeContext)));
|
|
79937
79974
|
}
|
|
@@ -95609,6 +95646,7 @@ class BaseLegend extends BaseComponent {
|
|
|
95609
95646
|
}
|
|
95610
95647
|
clear() {
|
|
95611
95648
|
super.clear();
|
|
95649
|
+
this._legendComponent = null;
|
|
95612
95650
|
this._cacheAttrs = null;
|
|
95613
95651
|
this._preSelectedData = null;
|
|
95614
95652
|
}
|
|
@@ -101674,23 +101712,13 @@ class CartesianMarkLine extends BaseMarkLine {
|
|
|
101674
101712
|
return { points };
|
|
101675
101713
|
}
|
|
101676
101714
|
_markerLayout() {
|
|
101677
|
-
var _a, _b, _c, _d, _e
|
|
101715
|
+
var _a, _b, _c, _d, _e;
|
|
101678
101716
|
const updateAttrs = this._getUpdateMarkerAttrs();
|
|
101679
101717
|
if (this._spec.type === 'type-step') {
|
|
101680
101718
|
const startRelativeSeries = this._startRelativeSeries;
|
|
101681
101719
|
const endRelativeSeries = this._endRelativeSeries;
|
|
101682
101720
|
const { multiSegment, mainSegmentIndex } = this._spec.line || {};
|
|
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
|
-
}
|
|
101721
|
+
const { connectDirection, expandDistance = 0 } = this._spec;
|
|
101694
101722
|
let expandDistanceValue;
|
|
101695
101723
|
if (isPercent(expandDistance)) {
|
|
101696
101724
|
const regionStart = startRelativeSeries.getRegion();
|
|
@@ -101711,8 +101739,9 @@ class CartesianMarkLine extends BaseMarkLine {
|
|
|
101711
101739
|
else {
|
|
101712
101740
|
expandDistanceValue = expandDistance;
|
|
101713
101741
|
}
|
|
101742
|
+
const { points, limitRect } = updateAttrs;
|
|
101714
101743
|
if (!points || points.length < 2) {
|
|
101715
|
-
(
|
|
101744
|
+
(_a = this._markerComponent) === null || _a === void 0 ? void 0 : _a.setAttributes(updateAttrs);
|
|
101716
101745
|
return;
|
|
101717
101746
|
}
|
|
101718
101747
|
const joinPoints = getInsertPoints(points[0], points[1], connectDirection, expandDistanceValue);
|
|
@@ -101726,11 +101755,11 @@ class CartesianMarkLine extends BaseMarkLine {
|
|
|
101726
101755
|
else {
|
|
101727
101756
|
labelPositionAttrs = Object.assign({ position: 'start', autoRotate: false }, getTextOffset(points[0], points[1], connectDirection, expandDistanceValue));
|
|
101728
101757
|
}
|
|
101729
|
-
const markerComponentAttr = (
|
|
101758
|
+
const markerComponentAttr = (_c = (_b = this._markerComponent) === null || _b === void 0 ? void 0 : _b.attribute) !== null && _c !== void 0 ? _c : {};
|
|
101730
101759
|
const prevLabelAttrs = array(markerComponentAttr.label);
|
|
101731
101760
|
const updateLabels = array(updateAttrs.label);
|
|
101732
101761
|
const labelsInSpec = array(this._spec.label);
|
|
101733
|
-
(
|
|
101762
|
+
(_d = this._markerComponent) === null || _d === void 0 ? void 0 : _d.setAttributes({
|
|
101734
101763
|
points: multiSegment
|
|
101735
101764
|
? [
|
|
101736
101765
|
[joinPoints[0], joinPoints[1]],
|
|
@@ -101770,7 +101799,7 @@ class CartesianMarkLine extends BaseMarkLine {
|
|
|
101770
101799
|
});
|
|
101771
101800
|
}
|
|
101772
101801
|
else {
|
|
101773
|
-
(
|
|
101802
|
+
(_e = this._markerComponent) === null || _e === void 0 ? void 0 : _e.setAttributes(updateAttrs);
|
|
101774
101803
|
}
|
|
101775
101804
|
}
|
|
101776
101805
|
_computeOptions() {
|
package/build/index.js
CHANGED
|
@@ -55404,6 +55404,33 @@
|
|
|
55404
55404
|
updateLayoutTag() {
|
|
55405
55405
|
this._layoutState = LayoutState.before;
|
|
55406
55406
|
}
|
|
55407
|
+
_isGeoRegionRoamDragEnabled() {
|
|
55408
|
+
var _a, _b;
|
|
55409
|
+
const chartSpec = (_b = (_a = this._compileChart) === null || _a === void 0 ? void 0 : _a.getSpec) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
55410
|
+
const regions = chartSpec === null || chartSpec === void 0 ? void 0 : chartSpec.region;
|
|
55411
|
+
if (!isArray$1(regions)) {
|
|
55412
|
+
return false;
|
|
55413
|
+
}
|
|
55414
|
+
return regions.some((region) => {
|
|
55415
|
+
var _a;
|
|
55416
|
+
if ((region === null || region === void 0 ? void 0 : region.coordinate) !== 'geo' || !region.roam) {
|
|
55417
|
+
return false;
|
|
55418
|
+
}
|
|
55419
|
+
if (region.roam === true) {
|
|
55420
|
+
return true;
|
|
55421
|
+
}
|
|
55422
|
+
return (_a = region.roam.drag) !== null && _a !== void 0 ? _a : true;
|
|
55423
|
+
});
|
|
55424
|
+
}
|
|
55425
|
+
_shouldDisableCanvasTouchAction() {
|
|
55426
|
+
if (!isTrueBrowser(this._option.mode)) {
|
|
55427
|
+
return false;
|
|
55428
|
+
}
|
|
55429
|
+
const supportsTouchEvents = isValid$1(this._option.supportsTouchEvents)
|
|
55430
|
+
? this._option.supportsTouchEvents
|
|
55431
|
+
: vglobal.supportsTouchEvents;
|
|
55432
|
+
return supportsTouchEvents === false && this._isGeoRegionRoamDragEnabled();
|
|
55433
|
+
}
|
|
55407
55434
|
_setCanvasStyle() {
|
|
55408
55435
|
if (!this._stage) {
|
|
55409
55436
|
return;
|
|
@@ -55414,6 +55441,7 @@
|
|
|
55414
55441
|
const canvas = this.getCanvas();
|
|
55415
55442
|
if (canvas) {
|
|
55416
55443
|
canvas.style.display = 'block';
|
|
55444
|
+
canvas.style.touchAction = this._shouldDisableCanvasTouchAction() ? 'none' : '';
|
|
55417
55445
|
}
|
|
55418
55446
|
}
|
|
55419
55447
|
}
|
|
@@ -55432,6 +55460,7 @@
|
|
|
55432
55460
|
this._cachedMarks = null;
|
|
55433
55461
|
}
|
|
55434
55462
|
chart.compile();
|
|
55463
|
+
this._setCanvasStyle();
|
|
55435
55464
|
chart.afterCompile();
|
|
55436
55465
|
}
|
|
55437
55466
|
clearNextRender() {
|
|
@@ -65400,7 +65429,7 @@
|
|
|
65400
65429
|
: null));
|
|
65401
65430
|
}
|
|
65402
65431
|
_runPointsEncoder(newStyles, g, attrs = {}) {
|
|
65403
|
-
var _a, _b
|
|
65432
|
+
var _a, _b;
|
|
65404
65433
|
const data = g.context.data;
|
|
65405
65434
|
const lineAttrs = [];
|
|
65406
65435
|
const points = [];
|
|
@@ -65425,7 +65454,7 @@
|
|
|
65425
65454
|
points[index].context = (_a = this._keyGetter(datum)) !== null && _a !== void 0 ? _a : index;
|
|
65426
65455
|
});
|
|
65427
65456
|
if (progressive) {
|
|
65428
|
-
const segments = (
|
|
65457
|
+
const segments = ((_b = g.attribute) === null || _b === void 0 ? void 0 : _b.segments) ? [...g.attribute.segments] : [];
|
|
65429
65458
|
segments.push({
|
|
65430
65459
|
points
|
|
65431
65460
|
});
|
|
@@ -76524,6 +76553,17 @@
|
|
|
76524
76553
|
bandPosition: this._bandPosition
|
|
76525
76554
|
}));
|
|
76526
76555
|
}
|
|
76556
|
+
_isCategoryAxisInverse() {
|
|
76557
|
+
var _a, _b, _c, _e;
|
|
76558
|
+
return this._direction === "horizontal"
|
|
76559
|
+
? (_b = (_a = this._yAxisHelper) === null || _a === void 0 ? void 0 : _a.isInverse) === null || _b === void 0 ? void 0 : _b.call(_a)
|
|
76560
|
+
: (_e = (_c = this._xAxisHelper) === null || _c === void 0 ? void 0 : _c.isInverse) === null || _e === void 0 ? void 0 : _e.call(_c);
|
|
76561
|
+
}
|
|
76562
|
+
_getLeaderLineCategoryPos(isStart, isDecrease) {
|
|
76563
|
+
const inverse = !!this._isCategoryAxisInverse();
|
|
76564
|
+
const normalPos = isStart ? (isDecrease ? 0 : 1) : isDecrease ? 1 : 0;
|
|
76565
|
+
return inverse ? 1 - normalPos : normalPos;
|
|
76566
|
+
}
|
|
76527
76567
|
initMarkStyle() {
|
|
76528
76568
|
super.initMarkStyle();
|
|
76529
76569
|
const isDecrease = this._spec.calculationMode === 'decrease';
|
|
@@ -76537,9 +76577,9 @@
|
|
|
76537
76577
|
if (!datum.lastIndex) {
|
|
76538
76578
|
return 0;
|
|
76539
76579
|
}
|
|
76540
|
-
return this.totalPositionY(datum, 'lastIndex', isDecrease
|
|
76580
|
+
return this.totalPositionY(datum, 'lastIndex', this._getLeaderLineCategoryPos(true, isDecrease));
|
|
76541
76581
|
},
|
|
76542
|
-
y1: (datum) => this.totalPositionY(datum, 'index', isDecrease
|
|
76582
|
+
y1: (datum) => this.totalPositionY(datum, 'index', this._getLeaderLineCategoryPos(false, isDecrease))
|
|
76543
76583
|
}, 'normal', exports.AttributeLevel.Series);
|
|
76544
76584
|
}
|
|
76545
76585
|
else {
|
|
@@ -76549,9 +76589,9 @@
|
|
|
76549
76589
|
if (!datum.lastIndex) {
|
|
76550
76590
|
return 0;
|
|
76551
76591
|
}
|
|
76552
|
-
return this.totalPositionX(datum, 'lastIndex', isDecrease
|
|
76592
|
+
return this.totalPositionX(datum, 'lastIndex', this._getLeaderLineCategoryPos(true, isDecrease));
|
|
76553
76593
|
},
|
|
76554
|
-
x1: (datum) => this.totalPositionX(datum, 'index', isDecrease
|
|
76594
|
+
x1: (datum) => this.totalPositionX(datum, 'index', this._getLeaderLineCategoryPos(false, isDecrease)),
|
|
76555
76595
|
y: (datum) => this.totalPositionY(datum, 'lastEnd', 0),
|
|
76556
76596
|
y1: (datum) => this.totalPositionY(datum, datum.isTotal ? 'end' : 'start', 0)
|
|
76557
76597
|
}, 'normal', exports.AttributeLevel.Series);
|
|
@@ -79904,14 +79944,11 @@
|
|
|
79904
79944
|
fill: this.getColorAttribute(),
|
|
79905
79945
|
outerRadius: (datum) => valueInScaleRange(this.radiusAxisHelper.dataToPosition([datum[this._radiusField[0]]]), this.radiusAxisHelper.getScale(0)),
|
|
79906
79946
|
innerRadius: (datum) => {
|
|
79907
|
-
var _a;
|
|
79908
79947
|
if (!this.getStack()) {
|
|
79909
|
-
return
|
|
79948
|
+
return this._computeLayoutRadius() * this._innerRadius;
|
|
79910
79949
|
}
|
|
79911
79950
|
const stackStart = valueInScaleRange(this.radiusAxisHelper.dataToPosition([datum[this._innerRadiusField[0]]]), this.radiusAxisHelper.getScale(0));
|
|
79912
|
-
return stackStart <= Number.MIN_VALUE
|
|
79913
|
-
? this._computeLayoutRadius() * ((_a = this._spec.innerRadius) !== null && _a !== void 0 ? _a : 0)
|
|
79914
|
-
: stackStart;
|
|
79951
|
+
return stackStart <= Number.MIN_VALUE ? this._computeLayoutRadius() * this._innerRadius : stackStart;
|
|
79915
79952
|
}
|
|
79916
79953
|
});
|
|
79917
79954
|
}
|
|
@@ -79937,7 +79974,7 @@
|
|
|
79937
79974
|
const appearPreset = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.animationAppear) === null || _b === void 0 ? void 0 : _b.preset;
|
|
79938
79975
|
if (this._roseMark) {
|
|
79939
79976
|
const animationParams = {
|
|
79940
|
-
innerRadius: () =>
|
|
79977
|
+
innerRadius: () => this._computeLayoutRadius() * this._innerRadius
|
|
79941
79978
|
};
|
|
79942
79979
|
this._roseMark.setAnimationConfig(animationConfig((_c = Factory.getAnimationInKey('rose')) === null || _c === void 0 ? void 0 : _c(animationParams, appearPreset), userAnimationConfig("rose", this._spec, this._markAttributeContext)));
|
|
79943
79980
|
}
|
|
@@ -95615,6 +95652,7 @@
|
|
|
95615
95652
|
}
|
|
95616
95653
|
clear() {
|
|
95617
95654
|
super.clear();
|
|
95655
|
+
this._legendComponent = null;
|
|
95618
95656
|
this._cacheAttrs = null;
|
|
95619
95657
|
this._preSelectedData = null;
|
|
95620
95658
|
}
|
|
@@ -101680,23 +101718,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101680
101718
|
return { points };
|
|
101681
101719
|
}
|
|
101682
101720
|
_markerLayout() {
|
|
101683
|
-
var _a, _b, _c, _d, _e
|
|
101721
|
+
var _a, _b, _c, _d, _e;
|
|
101684
101722
|
const updateAttrs = this._getUpdateMarkerAttrs();
|
|
101685
101723
|
if (this._spec.type === 'type-step') {
|
|
101686
101724
|
const startRelativeSeries = this._startRelativeSeries;
|
|
101687
101725
|
const endRelativeSeries = this._endRelativeSeries;
|
|
101688
101726
|
const { multiSegment, mainSegmentIndex } = this._spec.line || {};
|
|
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
|
-
}
|
|
101727
|
+
const { connectDirection, expandDistance = 0 } = this._spec;
|
|
101700
101728
|
let expandDistanceValue;
|
|
101701
101729
|
if (isPercent(expandDistance)) {
|
|
101702
101730
|
const regionStart = startRelativeSeries.getRegion();
|
|
@@ -101717,8 +101745,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101717
101745
|
else {
|
|
101718
101746
|
expandDistanceValue = expandDistance;
|
|
101719
101747
|
}
|
|
101748
|
+
const { points, limitRect } = updateAttrs;
|
|
101720
101749
|
if (!points || points.length < 2) {
|
|
101721
|
-
(
|
|
101750
|
+
(_a = this._markerComponent) === null || _a === void 0 ? void 0 : _a.setAttributes(updateAttrs);
|
|
101722
101751
|
return;
|
|
101723
101752
|
}
|
|
101724
101753
|
const joinPoints = getInsertPoints(points[0], points[1], connectDirection, expandDistanceValue);
|
|
@@ -101732,11 +101761,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101732
101761
|
else {
|
|
101733
101762
|
labelPositionAttrs = Object.assign({ position: 'start', autoRotate: false }, getTextOffset(points[0], points[1], connectDirection, expandDistanceValue));
|
|
101734
101763
|
}
|
|
101735
|
-
const markerComponentAttr = (
|
|
101764
|
+
const markerComponentAttr = (_c = (_b = this._markerComponent) === null || _b === void 0 ? void 0 : _b.attribute) !== null && _c !== void 0 ? _c : {};
|
|
101736
101765
|
const prevLabelAttrs = array(markerComponentAttr.label);
|
|
101737
101766
|
const updateLabels = array(updateAttrs.label);
|
|
101738
101767
|
const labelsInSpec = array(this._spec.label);
|
|
101739
|
-
(
|
|
101768
|
+
(_d = this._markerComponent) === null || _d === void 0 ? void 0 : _d.setAttributes({
|
|
101740
101769
|
points: multiSegment
|
|
101741
101770
|
? [
|
|
101742
101771
|
[joinPoints[0], joinPoints[1]],
|
|
@@ -101776,7 +101805,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101776
101805
|
});
|
|
101777
101806
|
}
|
|
101778
101807
|
else {
|
|
101779
|
-
(
|
|
101808
|
+
(_e = this._markerComponent) === null || _e === void 0 ? void 0 : _e.setAttributes(updateAttrs);
|
|
101780
101809
|
}
|
|
101781
101810
|
}
|
|
101782
101811
|
_computeOptions() {
|