@visactor/react-vchart 2.1.0-alpha.11 → 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/index.js +15 -7
- package/build/index.min.js +2 -2
- package/cjs/components/MarkArea.js +2 -1
- package/cjs/components/ScrollBar.js +1 -2
- package/cjs/containers/withContainer.js +1 -1
- package/cjs/context/chart.js +1 -1
- package/esm/components/MarkArea.js +2 -1
- package/esm/components/ScrollBar.js +1 -2
- package/esm/containers/withContainer.js +1 -1
- package/esm/context/chart.js +1 -1
- package/package.json +5 -5
package/build/index.js
CHANGED
|
@@ -63109,7 +63109,7 @@
|
|
|
63109
63109
|
}), res), []) : null;
|
|
63110
63110
|
}
|
|
63111
63111
|
_runPointsEncoder(newStyles, g, attrs = {}) {
|
|
63112
|
-
var _a, _b
|
|
63112
|
+
var _a, _b;
|
|
63113
63113
|
const data = g.context.data,
|
|
63114
63114
|
lineAttrs = [],
|
|
63115
63115
|
points = [],
|
|
@@ -63122,7 +63122,7 @@
|
|
|
63122
63122
|
this._isValidPointChannel(attrName) ? points[index][attrName] = newStyles[attrName](datum) : this._segmentStyleKeys.includes(attrName) && !progressive ? lineAttrs[index][attrName] = newStyles[attrName](datum) : 0 !== index || progressive && !isFirstFrame || (commonAttrs[attrName] = newStyles[attrName](datum));
|
|
63123
63123
|
}), points[index].context = null !== (_a = this._keyGetter(datum)) && void 0 !== _a ? _a : index;
|
|
63124
63124
|
}), progressive) {
|
|
63125
|
-
const segments =
|
|
63125
|
+
const segments = (null === (_b = g.attribute) || void 0 === _b ? void 0 : _b.segments) ? [...g.attribute.segments] : [];
|
|
63126
63126
|
return segments.push({
|
|
63127
63127
|
points: points
|
|
63128
63128
|
}), isFirstFrame ? Object.assign(Object.assign({}, commonAttrs), {
|
|
@@ -71570,6 +71570,14 @@
|
|
|
71570
71570
|
bandPosition: this._bandPosition
|
|
71571
71571
|
}));
|
|
71572
71572
|
}
|
|
71573
|
+
_isCategoryAxisInverse() {
|
|
71574
|
+
var _a, _b, _c, _e;
|
|
71575
|
+
return "horizontal" === this._direction ? null === (_b = null === (_a = this._yAxisHelper) || void 0 === _a ? void 0 : _a.isInverse) || void 0 === _b ? void 0 : _b.call(_a) : null === (_e = null === (_c = this._xAxisHelper) || void 0 === _c ? void 0 : _c.isInverse) || void 0 === _e ? void 0 : _e.call(_c);
|
|
71576
|
+
}
|
|
71577
|
+
_getLeaderLineCategoryPos(isStart, isDecrease) {
|
|
71578
|
+
const normalPos = isStart ? isDecrease ? 0 : 1 : isDecrease ? 1 : 0;
|
|
71579
|
+
return !!this._isCategoryAxisInverse() ? 1 - normalPos : normalPos;
|
|
71580
|
+
}
|
|
71573
71581
|
initMarkStyle() {
|
|
71574
71582
|
super.initMarkStyle();
|
|
71575
71583
|
const isDecrease = "decrease" === this._spec.calculationMode;
|
|
@@ -71577,12 +71585,12 @@
|
|
|
71577
71585
|
visible: datum => this.isVisibleLeaderLine(datum),
|
|
71578
71586
|
x: datum => this.totalPositionX(datum, "lastEnd", 0),
|
|
71579
71587
|
x1: datum => this.totalPositionX(datum, datum.isTotal ? "end" : "start", 0),
|
|
71580
|
-
y: datum => datum.lastIndex ? this.totalPositionY(datum, "lastIndex",
|
|
71581
|
-
y1: datum => this.totalPositionY(datum, "index",
|
|
71588
|
+
y: datum => datum.lastIndex ? this.totalPositionY(datum, "lastIndex", this._getLeaderLineCategoryPos(!0, isDecrease)) : 0,
|
|
71589
|
+
y1: datum => this.totalPositionY(datum, "index", this._getLeaderLineCategoryPos(!1, isDecrease))
|
|
71582
71590
|
}, "normal", AttributeLevel.Series) : this.setMarkStyle(this._leaderLineMark, {
|
|
71583
71591
|
visible: datum => this.isVisibleLeaderLine(datum),
|
|
71584
|
-
x: datum => datum.lastIndex ? this.totalPositionX(datum, "lastIndex",
|
|
71585
|
-
x1: datum => this.totalPositionX(datum, "index",
|
|
71592
|
+
x: datum => datum.lastIndex ? this.totalPositionX(datum, "lastIndex", this._getLeaderLineCategoryPos(!0, isDecrease)) : 0,
|
|
71593
|
+
x1: datum => this.totalPositionX(datum, "index", this._getLeaderLineCategoryPos(!1, isDecrease)),
|
|
71586
71594
|
y: datum => this.totalPositionY(datum, "lastEnd", 0),
|
|
71587
71595
|
y1: datum => this.totalPositionY(datum, datum.isTotal ? "end" : "start", 0)
|
|
71588
71596
|
}, "normal", AttributeLevel.Series));
|
|
@@ -86406,7 +86414,7 @@
|
|
|
86406
86414
|
return [this._legendComponent];
|
|
86407
86415
|
}
|
|
86408
86416
|
clear() {
|
|
86409
|
-
super.clear(), this._cacheAttrs = null, this._preSelectedData = null;
|
|
86417
|
+
super.clear(), this._legendComponent = null, this._cacheAttrs = null, this._preSelectedData = null;
|
|
86410
86418
|
}
|
|
86411
86419
|
}
|
|
86412
86420
|
BaseLegend.specKey = "legends";
|