@visactor/vchart 1.9.3-alpha.2 → 1.9.3-hotfix.0
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.js +179 -312
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/base/base-chart.d.ts +1 -1
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/component/axis/cartesian/axis.js +4 -4
- package/cjs/component/axis/cartesian/axis.js.map +1 -1
- package/cjs/component/axis/polar/axis.js +17 -9
- package/cjs/component/axis/polar/axis.js.map +1 -1
- package/cjs/component/axis/polar/util/common.d.ts +1 -5
- package/cjs/component/axis/polar/util/common.js +4 -8
- package/cjs/component/axis/polar/util/common.js.map +1 -1
- package/cjs/component/custom-mark/custom-mark.d.ts +2 -1
- package/cjs/component/custom-mark/custom-mark.js.map +1 -1
- package/cjs/component/label/util.js +3 -3
- package/cjs/component/label/util.js.map +1 -1
- package/cjs/component/marker/mark-area/mark-area.js +11 -16
- package/cjs/component/marker/mark-area/mark-area.js.map +1 -1
- package/cjs/component/marker/mark-line/mark-line.js +1 -1
- package/cjs/component/marker/mark-line/mark-line.js.map +1 -1
- package/cjs/component/marker/mark-point/mark-point.js +5 -2
- package/cjs/component/marker/mark-point/mark-point.js.map +1 -1
- package/cjs/component/player/utils/transform.js +2 -2
- package/cjs/component/player/utils/transform.js.map +1 -1
- package/cjs/constant/event.js +1 -2
- package/cjs/constant/scroll-bar.js +2 -1
- 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/data/transforms/pie.js +4 -4
- package/cjs/data/transforms/pie.js.map +1 -1
- package/cjs/data/transforms/waterfall.js +30 -105
- package/cjs/data/transforms/waterfall.js.map +1 -1
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/line/interface.d.ts +1 -1
- package/cjs/series/line/interface.js.map +1 -1
- package/cjs/series/sankey/interface.d.ts +2 -2
- package/cjs/series/sankey/interface.js.map +1 -1
- package/cjs/series/word-cloud/config.js +1 -1
- package/cjs/series/word-cloud/config.js.map +1 -1
- package/cjs/typings/spec/common.d.ts +20 -20
- package/cjs/typings/spec/common.js.map +1 -1
- package/cjs/util/math.d.ts +0 -1
- package/cjs/util/math.js +2 -18
- package/cjs/util/math.js.map +1 -1
- package/esm/chart/base/base-chart.d.ts +1 -1
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/component/axis/cartesian/axis.js +1 -1
- package/esm/component/axis/cartesian/axis.js.map +1 -1
- package/esm/component/axis/polar/axis.js +18 -9
- package/esm/component/axis/polar/axis.js.map +1 -1
- package/esm/component/axis/polar/util/common.d.ts +1 -5
- package/esm/component/axis/polar/util/common.js +4 -12
- package/esm/component/axis/polar/util/common.js.map +1 -1
- package/esm/component/custom-mark/custom-mark.d.ts +2 -1
- package/esm/component/custom-mark/custom-mark.js.map +1 -1
- package/esm/component/label/util.js +6 -1
- package/esm/component/label/util.js.map +1 -1
- package/esm/component/marker/mark-area/mark-area.js +10 -16
- package/esm/component/marker/mark-area/mark-area.js.map +1 -1
- package/esm/component/marker/mark-line/mark-line.js +1 -1
- package/esm/component/marker/mark-line/mark-line.js.map +1 -1
- package/esm/component/marker/mark-point/mark-point.js +5 -2
- package/esm/component/marker/mark-point/mark-point.js.map +1 -1
- package/esm/component/player/utils/transform.js +2 -2
- package/esm/component/player/utils/transform.js.map +1 -1
- package/esm/constant/event.js +1 -2
- package/esm/constant/scroll-bar.js +2 -1
- 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/data/transforms/pie.js +5 -5
- package/esm/data/transforms/pie.js.map +1 -1
- package/esm/data/transforms/waterfall.js +27 -103
- package/esm/data/transforms/waterfall.js.map +1 -1
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/line/interface.d.ts +1 -1
- package/esm/series/line/interface.js.map +1 -1
- package/esm/series/sankey/interface.d.ts +2 -2
- package/esm/series/sankey/interface.js.map +1 -1
- package/esm/series/word-cloud/config.js +1 -1
- package/esm/series/word-cloud/config.js.map +1 -1
- package/esm/typings/spec/common.d.ts +20 -20
- package/esm/typings/spec/common.js.map +1 -1
- package/esm/util/math.d.ts +0 -1
- package/esm/util/math.js +0 -16
- package/esm/util/math.js.map +1 -1
- package/package.json +14 -14
package/build/index.js
CHANGED
|
@@ -26305,45 +26305,6 @@
|
|
|
26305
26305
|
function distance(p1, p2 = { x: 0, y: 0 }) {
|
|
26306
26306
|
return PointService.distancePP(p1, p2);
|
|
26307
26307
|
}
|
|
26308
|
-
function getPercentValue(valueList, idx, precision = 2) {
|
|
26309
|
-
if (!valueList[idx]) {
|
|
26310
|
-
return 0;
|
|
26311
|
-
}
|
|
26312
|
-
const sum = valueList.reduce((a, c) => {
|
|
26313
|
-
return (a += isNaN(c) ? 0 : c);
|
|
26314
|
-
}, 0);
|
|
26315
|
-
if (sum === 0) {
|
|
26316
|
-
return 0;
|
|
26317
|
-
}
|
|
26318
|
-
const digits = Math.pow(10, precision);
|
|
26319
|
-
const votesPerQuota = valueList.map(val => {
|
|
26320
|
-
return ((isNaN(val) ? 0 : val) / sum) * digits * 100;
|
|
26321
|
-
});
|
|
26322
|
-
const targetSeats = digits * 100;
|
|
26323
|
-
const seats = votesPerQuota.map(votes => {
|
|
26324
|
-
return Math.floor(votes);
|
|
26325
|
-
});
|
|
26326
|
-
let currentSum = seats.reduce((a, c) => {
|
|
26327
|
-
return a + c;
|
|
26328
|
-
}, 0);
|
|
26329
|
-
const remainder = votesPerQuota.map((votes, idx) => {
|
|
26330
|
-
return votes - seats[idx];
|
|
26331
|
-
});
|
|
26332
|
-
while (currentSum < targetSeats) {
|
|
26333
|
-
let max = Number.NEGATIVE_INFINITY;
|
|
26334
|
-
let maxId = null;
|
|
26335
|
-
for (let i = 0; i < remainder.length; i++) {
|
|
26336
|
-
if (remainder[i] > max) {
|
|
26337
|
-
max = remainder[i];
|
|
26338
|
-
maxId = i;
|
|
26339
|
-
}
|
|
26340
|
-
}
|
|
26341
|
-
++seats[maxId];
|
|
26342
|
-
remainder[maxId] = 0;
|
|
26343
|
-
++currentSum;
|
|
26344
|
-
}
|
|
26345
|
-
return seats[idx] / digits;
|
|
26346
|
-
}
|
|
26347
26308
|
|
|
26348
26309
|
function eachSeries(regions, callback, filter) {
|
|
26349
26310
|
let flag = false;
|
|
@@ -37320,10 +37281,10 @@
|
|
|
37320
37281
|
}, this._statePointToData = state => state, this._onHandlerPointerDown = (e, tag) => {
|
|
37321
37282
|
e.stopPropagation(), "start" === tag ? (this._activeTag = DataZoomActiveTag.startHandler, this._activeItem = this._startHandlerMask) : "end" === tag ? (this._activeTag = DataZoomActiveTag.endHandler, this._activeItem = this._endHandlerMask) : "middleRect" === tag ? (this._activeTag = DataZoomActiveTag.middleHandler, this._activeItem = this._middleHandlerRect) : "middleSymbol" === tag ? (this._activeTag = DataZoomActiveTag.middleHandler, this._activeItem = this._middleHandlerSymbol) : "background" === tag && (this._activeTag = DataZoomActiveTag.background, this._activeItem = this._background), this._activeState = !0, this._activeCache.startPos = this.eventPosToStagePos(e), this._activeCache.lastPos = this.eventPosToStagePos(e), "browser" === vglobal.env && (vglobal.addEventListener("pointermove", this._onHandlerPointerMove, {
|
|
37322
37283
|
capture: !0
|
|
37323
|
-
}), vglobal.addEventListener("pointerup", this._onHandlerPointerUp)), this.addEventListener("pointermove", this._onHandlerPointerMove, {
|
|
37284
|
+
}), vglobal.addEventListener("pointerup", this._onHandlerPointerUp.bind(this))), this.addEventListener("pointermove", this._onHandlerPointerMove, {
|
|
37324
37285
|
capture: !0
|
|
37325
37286
|
});
|
|
37326
|
-
}, this.
|
|
37287
|
+
}, this._onHandlerPointerMove = delayMap$2[this.attribute.delayType](e => {
|
|
37327
37288
|
e.stopPropagation();
|
|
37328
37289
|
const {
|
|
37329
37290
|
start: startAttr,
|
|
@@ -37341,33 +37302,12 @@
|
|
|
37341
37302
|
start: start,
|
|
37342
37303
|
end: end
|
|
37343
37304
|
} = this.state;
|
|
37344
|
-
this._activeState && (this._activeTag === DataZoomActiveTag.middleHandler ? this.moveZoomWithMiddle((this.state.start + this.state.end) / 2 + dis) : this._activeTag === DataZoomActiveTag.startHandler ? start + dis > end ? (start = end, end = start + dis, this._activeTag = DataZoomActiveTag.endHandler) : start += dis : this._activeTag === DataZoomActiveTag.endHandler && (end + dis < start ? (end = start, start = end + dis, this._activeTag = DataZoomActiveTag.startHandler) : end += dis), this._activeCache.lastPos = pos, brushSelect && this.renderDragMask()), start = Math.min(Math.max(start, 0), 1), end = Math.min(Math.max(end, 0), 1),
|
|
37305
|
+
this._activeState && (this._activeTag === DataZoomActiveTag.middleHandler ? this.moveZoomWithMiddle((this.state.start + this.state.end) / 2 + dis) : this._activeTag === DataZoomActiveTag.startHandler ? start + dis > end ? (start = end, end = start + dis, this._activeTag = DataZoomActiveTag.endHandler) : start += dis : this._activeTag === DataZoomActiveTag.endHandler && (end + dis < start ? (end = start, start = end + dis, this._activeTag = DataZoomActiveTag.startHandler) : end += dis), this._activeCache.lastPos = pos, brushSelect && this.renderDragMask()), start = Math.min(Math.max(start, 0), 1), end = Math.min(Math.max(end, 0), 1), startAttr === start && endAttr === end || (this.setStateAttr(start, end, !0), this._dispatchEvent("change", {
|
|
37345
37306
|
start: start,
|
|
37346
37307
|
end: end,
|
|
37347
37308
|
tag: this._activeTag
|
|
37348
37309
|
}));
|
|
37349
|
-
}, this.
|
|
37350
|
-
e.preventDefault();
|
|
37351
|
-
const {
|
|
37352
|
-
start: start,
|
|
37353
|
-
end: end,
|
|
37354
|
-
brushSelect: brushSelect,
|
|
37355
|
-
realTime = !0
|
|
37356
|
-
} = this.attribute;
|
|
37357
|
-
if (this._activeState && this._activeTag === DataZoomActiveTag.background) {
|
|
37358
|
-
const pos = this.eventPosToStagePos(e);
|
|
37359
|
-
this.backgroundDragZoom(this._activeCache.startPos, pos);
|
|
37360
|
-
}
|
|
37361
|
-
this._activeState = !1, brushSelect && this.renderDragMask(), realTime && start === this.state.start && end === this.state.end || (this.setStateAttr(this.state.start, this.state.end, !0), this._dispatchEvent("change", {
|
|
37362
|
-
start: this.state.start,
|
|
37363
|
-
end: this.state.end,
|
|
37364
|
-
tag: this._activeTag
|
|
37365
|
-
})), "browser" === vglobal.env && (vglobal.removeEventListener("pointermove", this._onHandlerPointerMove, {
|
|
37366
|
-
capture: !0
|
|
37367
|
-
}), vglobal.removeEventListener("pointerup", this._onHandlerPointerUp)), this.removeEventListener("pointermove", this._onHandlerPointerMove, {
|
|
37368
|
-
capture: !0
|
|
37369
|
-
}), this.removeEventListener("pointerup", this._onHandlerPointerUp);
|
|
37370
|
-
};
|
|
37310
|
+
}, this.attribute.delayTime);
|
|
37371
37311
|
const {
|
|
37372
37312
|
position: position,
|
|
37373
37313
|
showDetail: showDetail
|
|
@@ -37420,6 +37360,28 @@
|
|
|
37420
37360
|
y: y - ((null === (_b = this.stage) || void 0 === _b ? void 0 : _b.y) || 0)
|
|
37421
37361
|
};
|
|
37422
37362
|
}
|
|
37363
|
+
_onHandlerPointerUp(e) {
|
|
37364
|
+
e.preventDefault();
|
|
37365
|
+
const {
|
|
37366
|
+
start: start,
|
|
37367
|
+
end: end,
|
|
37368
|
+
brushSelect: brushSelect,
|
|
37369
|
+
realTime = !0
|
|
37370
|
+
} = this.attribute;
|
|
37371
|
+
if (this._activeState && this._activeTag === DataZoomActiveTag.background) {
|
|
37372
|
+
const pos = this.eventPosToStagePos(e);
|
|
37373
|
+
this.backgroundDragZoom(this._activeCache.startPos, pos);
|
|
37374
|
+
}
|
|
37375
|
+
this._activeState = !1, brushSelect && this.renderDragMask(), realTime && start === this.state.start && end === this.state.end || (this.setStateAttr(this.state.start, this.state.end, !0), this._dispatchEvent("change", {
|
|
37376
|
+
start: this.state.start,
|
|
37377
|
+
end: this.state.end,
|
|
37378
|
+
tag: this._activeTag
|
|
37379
|
+
})), "browser" === vglobal.env && (vglobal.removeEventListener("pointermove", this._onHandlerPointerMove, {
|
|
37380
|
+
capture: !0
|
|
37381
|
+
}), vglobal.removeEventListener("pointerup", this._onHandlerPointerUp.bind(this))), this.removeEventListener("pointermove", this._onHandlerPointerMove, {
|
|
37382
|
+
capture: !0
|
|
37383
|
+
});
|
|
37384
|
+
}
|
|
37423
37385
|
_onHandlerPointerEnter(e) {
|
|
37424
37386
|
e.stopPropagation(), this._showText = !0, this.renderText();
|
|
37425
37387
|
}
|
|
@@ -37608,7 +37570,7 @@
|
|
|
37608
37570
|
}, this._layoutAttrFromConfig;
|
|
37609
37571
|
}
|
|
37610
37572
|
render() {
|
|
37611
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t
|
|
37573
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
37612
37574
|
this._layoutAttrFromConfig = null;
|
|
37613
37575
|
const {
|
|
37614
37576
|
orient: orient,
|
|
@@ -37641,15 +37603,15 @@
|
|
|
37641
37603
|
height: height,
|
|
37642
37604
|
cursor: brushSelect ? "crosshair" : "auto"
|
|
37643
37605
|
}, backgroundStyle), {
|
|
37644
|
-
pickable: !zoomLock
|
|
37645
|
-
}), "rect"), (null === (
|
|
37606
|
+
pickable: !zoomLock
|
|
37607
|
+
}), "rect"), (null === (_c = backgroundChartStyle.line) || void 0 === _c ? void 0 : _c.visible) && this.setPreviewAttributes("line", group), (null === (_d = backgroundChartStyle.area) || void 0 === _d ? void 0 : _d.visible) && this.setPreviewAttributes("area", group), brushSelect && this.renderDragMask(), this._isHorizontal ? this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
|
|
37646
37608
|
x: position.x + start * width,
|
|
37647
37609
|
y: position.y,
|
|
37648
37610
|
width: (end - start) * width,
|
|
37649
37611
|
height: height,
|
|
37650
37612
|
cursor: brushSelect ? "crosshair" : "move"
|
|
37651
37613
|
}, selectedBackgroundStyle), {
|
|
37652
|
-
pickable: !zoomLock
|
|
37614
|
+
pickable: !zoomLock
|
|
37653
37615
|
}), "rect") : this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
|
|
37654
37616
|
x: position.x,
|
|
37655
37617
|
y: position.y + start * height,
|
|
@@ -37657,41 +37619,41 @@
|
|
|
37657
37619
|
height: (end - start) * height,
|
|
37658
37620
|
cursor: brushSelect ? "crosshair" : "move"
|
|
37659
37621
|
}, selectedBackgroundStyle), {
|
|
37660
|
-
pickable: !zoomLock
|
|
37661
|
-
}), "rect"), (null === (
|
|
37622
|
+
pickable: !zoomLock
|
|
37623
|
+
}), "rect"), (null === (_e = selectedBackgroundChartStyle.line) || void 0 === _e ? void 0 : _e.visible) && this.setSelectedPreviewAttributes("line", group), (null === (_f = selectedBackgroundChartStyle.area) || void 0 === _f ? void 0 : _f.visible) && this.setSelectedPreviewAttributes("area", group), this._isHorizontal) {
|
|
37662
37624
|
if (middleHandlerStyle.visible) {
|
|
37663
|
-
const middleHandlerBackgroundSize = (null === (
|
|
37625
|
+
const middleHandlerBackgroundSize = (null === (_g = middleHandlerStyle.background) || void 0 === _g ? void 0 : _g.size) || 10;
|
|
37664
37626
|
this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign(Object.assign({
|
|
37665
37627
|
x: position.x + start * width,
|
|
37666
37628
|
y: position.y - middleHandlerBackgroundSize,
|
|
37667
37629
|
width: (end - start) * width,
|
|
37668
37630
|
height: middleHandlerBackgroundSize
|
|
37669
|
-
}, null === (
|
|
37670
|
-
pickable: !zoomLock
|
|
37631
|
+
}, null === (_h = middleHandlerStyle.background) || void 0 === _h ? void 0 : _h.style), {
|
|
37632
|
+
pickable: !zoomLock
|
|
37671
37633
|
}), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
|
|
37672
37634
|
x: position.x + (start + end) / 2 * width,
|
|
37673
37635
|
y: position.y - middleHandlerBackgroundSize / 2,
|
|
37674
37636
|
strokeBoundsBuffer: 0,
|
|
37675
37637
|
angle: 0,
|
|
37676
|
-
symbolType: null !== (
|
|
37638
|
+
symbolType: null !== (_k = null === (_j = middleHandlerStyle.icon) || void 0 === _j ? void 0 : _j.symbolType) && void 0 !== _k ? _k : "square"
|
|
37677
37639
|
}, middleHandlerStyle.icon), {
|
|
37678
|
-
pickable: !zoomLock
|
|
37640
|
+
pickable: !zoomLock
|
|
37679
37641
|
}), "symbol");
|
|
37680
37642
|
}
|
|
37681
37643
|
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
|
|
37682
37644
|
x: position.x + start * width,
|
|
37683
37645
|
y: position.y + height / 2,
|
|
37684
37646
|
size: height,
|
|
37685
|
-
symbolType: null !== (
|
|
37647
|
+
symbolType: null !== (_l = startHandlerStyle.symbolType) && void 0 !== _l ? _l : "square"
|
|
37686
37648
|
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), startHandlerStyle), {
|
|
37687
|
-
pickable: !zoomLock
|
|
37649
|
+
pickable: !zoomLock
|
|
37688
37650
|
}), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
|
|
37689
37651
|
x: position.x + end * width,
|
|
37690
37652
|
y: position.y + height / 2,
|
|
37691
37653
|
size: height,
|
|
37692
|
-
symbolType: null !== (
|
|
37654
|
+
symbolType: null !== (_m = endHandlerStyle.symbolType) && void 0 !== _m ? _m : "square"
|
|
37693
37655
|
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), endHandlerStyle), {
|
|
37694
|
-
pickable: !zoomLock
|
|
37656
|
+
pickable: !zoomLock
|
|
37695
37657
|
}), "symbol");
|
|
37696
37658
|
const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize),
|
|
37697
37659
|
startHandlerHeight = Math.max(this._startHandler.AABBBounds.height(), startHandlerMinSize),
|
|
@@ -37720,38 +37682,38 @@
|
|
|
37720
37682
|
}), "rect");
|
|
37721
37683
|
} else {
|
|
37722
37684
|
if (middleHandlerStyle.visible) {
|
|
37723
|
-
const middleHandlerBackgroundSize = (null === (
|
|
37685
|
+
const middleHandlerBackgroundSize = (null === (_o = middleHandlerStyle.background) || void 0 === _o ? void 0 : _o.size) || 10;
|
|
37724
37686
|
this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign(Object.assign({
|
|
37725
37687
|
x: "left" === orient ? position.x - middleHandlerBackgroundSize : position.x + width,
|
|
37726
37688
|
y: position.y + start * height,
|
|
37727
37689
|
width: middleHandlerBackgroundSize,
|
|
37728
37690
|
height: (end - start) * height
|
|
37729
|
-
}, null === (
|
|
37730
|
-
pickable: !zoomLock
|
|
37691
|
+
}, null === (_p = middleHandlerStyle.background) || void 0 === _p ? void 0 : _p.style), {
|
|
37692
|
+
pickable: !zoomLock
|
|
37731
37693
|
}), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
|
|
37732
37694
|
x: "left" === orient ? position.x - middleHandlerBackgroundSize / 2 : position.x + width + middleHandlerBackgroundSize / 2,
|
|
37733
37695
|
y: position.y + (start + end) / 2 * height,
|
|
37734
37696
|
angle: Math.PI / 180 * 90,
|
|
37735
|
-
symbolType: null !== (
|
|
37697
|
+
symbolType: null !== (_r = null === (_q = middleHandlerStyle.icon) || void 0 === _q ? void 0 : _q.symbolType) && void 0 !== _r ? _r : "square",
|
|
37736
37698
|
strokeBoundsBuffer: 0
|
|
37737
37699
|
}, middleHandlerStyle.icon), {
|
|
37738
|
-
pickable: !zoomLock
|
|
37700
|
+
pickable: !zoomLock
|
|
37739
37701
|
}), "symbol");
|
|
37740
37702
|
}
|
|
37741
37703
|
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
|
|
37742
37704
|
x: position.x + width / 2,
|
|
37743
37705
|
y: position.y + start * height,
|
|
37744
37706
|
size: width,
|
|
37745
|
-
symbolType: null !== (
|
|
37707
|
+
symbolType: null !== (_s = startHandlerStyle.symbolType) && void 0 !== _s ? _s : "square"
|
|
37746
37708
|
}, DEFAULT_HANDLER_ATTR_MAP.vertical), startHandlerStyle), {
|
|
37747
|
-
pickable: !zoomLock
|
|
37709
|
+
pickable: !zoomLock
|
|
37748
37710
|
}), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
|
|
37749
37711
|
x: position.x + width / 2,
|
|
37750
37712
|
y: position.y + end * height,
|
|
37751
37713
|
size: width,
|
|
37752
|
-
symbolType: null !== (
|
|
37714
|
+
symbolType: null !== (_t = endHandlerStyle.symbolType) && void 0 !== _t ? _t : "square"
|
|
37753
37715
|
}, DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), {
|
|
37754
|
-
pickable: !zoomLock
|
|
37716
|
+
pickable: !zoomLock
|
|
37755
37717
|
}), "symbol");
|
|
37756
37718
|
const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize),
|
|
37757
37719
|
startHandlerHeight = Math.max(this._startHandler.AABBBounds.height(), startHandlerMinSize),
|
|
@@ -58832,7 +58794,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
58832
58794
|
registerChartPlugin(MediaQuery);
|
|
58833
58795
|
};
|
|
58834
58796
|
|
|
58835
|
-
const version = "1.9.3-
|
|
58797
|
+
const version = "1.9.3-hotfix.0";
|
|
58836
58798
|
|
|
58837
58799
|
const addVChartProperty = (data, op) => {
|
|
58838
58800
|
const context = op.beforeCall();
|
|
@@ -66434,7 +66396,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
66434
66396
|
if (!lastData || lastData.length === 0) {
|
|
66435
66397
|
return lastData;
|
|
66436
66398
|
}
|
|
66437
|
-
const { indexField, total: totalSpec, groupData } = op;
|
|
66399
|
+
const { indexField, valueField, startAs, endAs, total: totalSpec, seriesField, seriesFieldName, groupData } = op;
|
|
66438
66400
|
const totalData = [];
|
|
66439
66401
|
const { dimensionValues, dimensionData } = groupData().latestData;
|
|
66440
66402
|
const indexValues = Array.from(dimensionValues[indexField]);
|
|
@@ -66449,163 +66411,82 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
66449
66411
|
isTotal: false
|
|
66450
66412
|
};
|
|
66451
66413
|
const indexData = dimensionData[key];
|
|
66452
|
-
|
|
66453
|
-
|
|
66454
|
-
|
|
66455
|
-
|
|
66456
|
-
|
|
66414
|
+
indexData.forEach(d => {
|
|
66415
|
+
let isTotalTag = false;
|
|
66416
|
+
if (!totalSpec || totalSpec.type === 'end') {
|
|
66417
|
+
if (index === indexValues.length - 1) {
|
|
66418
|
+
total.start = 0;
|
|
66419
|
+
d[startAs] = total.start;
|
|
66420
|
+
d[endAs] = total.end;
|
|
66421
|
+
isTotalTag = true;
|
|
66422
|
+
}
|
|
66423
|
+
}
|
|
66424
|
+
else if (totalSpec.type === 'field' || totalSpec.type === 'custom') {
|
|
66425
|
+
const tag = d[totalSpec.tagField];
|
|
66426
|
+
if (tag) {
|
|
66427
|
+
isTotalTag = true;
|
|
66428
|
+
if (totalSpec.type === 'custom') {
|
|
66429
|
+
const { start, end } = totalSpec.product(d, temp);
|
|
66430
|
+
d[startAs] = start;
|
|
66431
|
+
d[endAs] = end;
|
|
66432
|
+
total.end = end;
|
|
66433
|
+
total.start = start;
|
|
66434
|
+
}
|
|
66435
|
+
else {
|
|
66436
|
+
let start = 0;
|
|
66437
|
+
let end = total.end;
|
|
66438
|
+
if (totalSpec.collectCountField && !isNil$1(d[totalSpec.collectCountField])) {
|
|
66439
|
+
const startIndex = totalData.length - +d[totalSpec.collectCountField];
|
|
66440
|
+
const endIndex = totalData.length - 1;
|
|
66441
|
+
if (startIndex < 0) {
|
|
66442
|
+
console.warn('total.collectCountField error');
|
|
66443
|
+
}
|
|
66444
|
+
else {
|
|
66445
|
+
start = totalData[startIndex].start;
|
|
66446
|
+
}
|
|
66447
|
+
if (endIndex < 0) {
|
|
66448
|
+
console.warn('total.collectCountField error');
|
|
66449
|
+
}
|
|
66450
|
+
else {
|
|
66451
|
+
end = totalData[endIndex].end;
|
|
66452
|
+
}
|
|
66453
|
+
}
|
|
66454
|
+
else {
|
|
66455
|
+
if (totalSpec.startField && !isNil$1(d[totalSpec.startField])) {
|
|
66456
|
+
start = +d[totalSpec.startField];
|
|
66457
|
+
}
|
|
66458
|
+
if (totalSpec.valueField && !isNil$1(d[totalSpec.valueField])) {
|
|
66459
|
+
end = precisionAdd(start, +d[totalSpec.valueField]);
|
|
66460
|
+
}
|
|
66461
|
+
}
|
|
66462
|
+
d[startAs] = start;
|
|
66463
|
+
d[endAs] = end;
|
|
66464
|
+
d[valueField] = end - start;
|
|
66465
|
+
total.start = start;
|
|
66466
|
+
total.end = end;
|
|
66457
66467
|
}
|
|
66458
66468
|
}
|
|
66459
|
-
|
|
66460
|
-
|
|
66461
|
-
|
|
66469
|
+
}
|
|
66470
|
+
if (!isTotalTag) {
|
|
66471
|
+
d[startAs] = +total.end;
|
|
66472
|
+
d[endAs] = precisionAdd(d[startAs], +d[valueField]);
|
|
66473
|
+
total.end = d[endAs];
|
|
66474
|
+
}
|
|
66475
|
+
total.isTotal = isTotalTag;
|
|
66476
|
+
if (isNil$1(seriesField) || seriesField === WaterfallDefaultSeriesField) {
|
|
66477
|
+
if (isTotalTag) {
|
|
66478
|
+
d[WaterfallDefaultSeriesField] = seriesFieldName.total;
|
|
66479
|
+
}
|
|
66480
|
+
else {
|
|
66481
|
+
d[WaterfallDefaultSeriesField] = +d[valueField] >= 0 ? seriesFieldName.increase : seriesFieldName.decrease;
|
|
66462
66482
|
}
|
|
66463
|
-
return false;
|
|
66464
|
-
};
|
|
66465
|
-
const isTotalTag = indexData.some(d => isTotalCheck(d));
|
|
66466
|
-
if (isTotalTag) {
|
|
66467
|
-
temp = computeTotalWithMultipleData(indexData, key, total, totalData, temp, indexValues, index, op, isTotalCheck);
|
|
66468
|
-
totalData.push(total);
|
|
66469
|
-
return;
|
|
66470
66483
|
}
|
|
66471
|
-
}
|
|
66472
|
-
temp =
|
|
66484
|
+
});
|
|
66485
|
+
temp = Object.assign(Object.assign({}, total), { lastIndex: key });
|
|
66473
66486
|
totalData.push(total);
|
|
66474
66487
|
});
|
|
66475
66488
|
return totalData;
|
|
66476
66489
|
};
|
|
66477
|
-
function computeTotalWithMultipleData(indexData, key, total, totalData, temp, indexValues, index, op, isTotalCheck) {
|
|
66478
|
-
total.isTotal = true;
|
|
66479
|
-
const { valueField, startAs, endAs, total: totalSpec } = op;
|
|
66480
|
-
const _normalTemp = [];
|
|
66481
|
-
const _totalTemp = [];
|
|
66482
|
-
indexData.forEach(d => {
|
|
66483
|
-
if (isTotalCheck(d)) {
|
|
66484
|
-
_totalTemp.push(d);
|
|
66485
|
-
}
|
|
66486
|
-
else {
|
|
66487
|
-
_normalTemp.push(d);
|
|
66488
|
-
}
|
|
66489
|
-
});
|
|
66490
|
-
if (_totalTemp.length === indexData.length) {
|
|
66491
|
-
const result = computeNormalData([indexData[0]], key, total, totalData, temp, indexValues, index, op);
|
|
66492
|
-
_totalTemp.forEach(d => {
|
|
66493
|
-
d[startAs] = indexData[0][startAs];
|
|
66494
|
-
d[endAs] = indexData[0][endAs];
|
|
66495
|
-
d[valueField] = indexData[0][valueField];
|
|
66496
|
-
});
|
|
66497
|
-
return result;
|
|
66498
|
-
}
|
|
66499
|
-
const totalConfigData = _totalTemp[0];
|
|
66500
|
-
let { start, end } = getTotalStartEnd(totalConfigData, total, totalData, temp, totalSpec);
|
|
66501
|
-
total.start = start;
|
|
66502
|
-
total.end = end;
|
|
66503
|
-
let valueTemp = end - start;
|
|
66504
|
-
_normalTemp.forEach(d => {
|
|
66505
|
-
d[startAs] = +start;
|
|
66506
|
-
d[endAs] = precisionAdd(d[startAs], +d[valueField]);
|
|
66507
|
-
start = d[endAs];
|
|
66508
|
-
valueTemp = precisionSub(valueTemp, +d[valueField]);
|
|
66509
|
-
});
|
|
66510
|
-
_totalTemp.forEach(d => {
|
|
66511
|
-
d[startAs] = +start;
|
|
66512
|
-
d[endAs] = precisionAdd(d[startAs], valueTemp);
|
|
66513
|
-
d[valueField] = valueTemp;
|
|
66514
|
-
});
|
|
66515
|
-
return Object.assign(Object.assign({}, total), { lastIndex: key });
|
|
66516
|
-
}
|
|
66517
|
-
function computeNormalData(indexData, key, total, totalData, temp, indexValues, index, op) {
|
|
66518
|
-
const { valueField, startAs, endAs, total: totalSpec, seriesField, seriesFieldName } = op;
|
|
66519
|
-
indexData.forEach(d => {
|
|
66520
|
-
let isTotalTag = false;
|
|
66521
|
-
if (!totalSpec || totalSpec.type === 'end') {
|
|
66522
|
-
if (index === indexValues.length - 1) {
|
|
66523
|
-
total.start = 0;
|
|
66524
|
-
d[startAs] = total.start;
|
|
66525
|
-
d[endAs] = total.end;
|
|
66526
|
-
isTotalTag = true;
|
|
66527
|
-
}
|
|
66528
|
-
}
|
|
66529
|
-
else if (totalSpec.type === 'field' || totalSpec.type === 'custom') {
|
|
66530
|
-
const tag = d[totalSpec.tagField];
|
|
66531
|
-
if (tag) {
|
|
66532
|
-
isTotalTag = true;
|
|
66533
|
-
const { start, end } = getTotalStartEnd(d, total, totalData, temp, totalSpec);
|
|
66534
|
-
d[startAs] = start;
|
|
66535
|
-
d[endAs] = end;
|
|
66536
|
-
d[valueField] = end - start;
|
|
66537
|
-
total.start = start;
|
|
66538
|
-
total.end = end;
|
|
66539
|
-
}
|
|
66540
|
-
}
|
|
66541
|
-
if (!isTotalTag) {
|
|
66542
|
-
d[startAs] = +total.end;
|
|
66543
|
-
d[endAs] = precisionAdd(d[startAs], +d[valueField]);
|
|
66544
|
-
total.end = d[endAs];
|
|
66545
|
-
}
|
|
66546
|
-
total.isTotal = isTotalTag;
|
|
66547
|
-
if (isNil$1(seriesField) || seriesField === WaterfallDefaultSeriesField) {
|
|
66548
|
-
if (isTotalTag) {
|
|
66549
|
-
d[WaterfallDefaultSeriesField] = seriesFieldName.total;
|
|
66550
|
-
}
|
|
66551
|
-
else {
|
|
66552
|
-
d[WaterfallDefaultSeriesField] = +d[valueField] >= 0 ? seriesFieldName.increase : seriesFieldName.decrease;
|
|
66553
|
-
}
|
|
66554
|
-
}
|
|
66555
|
-
});
|
|
66556
|
-
return Object.assign(Object.assign({}, total), { lastIndex: key });
|
|
66557
|
-
}
|
|
66558
|
-
function getTotalStartEnd(d, total, totalData, temp, totalSpec) {
|
|
66559
|
-
if (!totalSpec || totalSpec.type === 'end') {
|
|
66560
|
-
return getTotalInEndType(total);
|
|
66561
|
-
}
|
|
66562
|
-
else if (totalSpec.type === 'field' || totalSpec.type === 'custom') {
|
|
66563
|
-
if (totalSpec.type === 'custom') {
|
|
66564
|
-
return getTotalInCustomType(d, temp, totalSpec);
|
|
66565
|
-
}
|
|
66566
|
-
if (totalSpec.collectCountField && !isNil$1(d[totalSpec.collectCountField])) {
|
|
66567
|
-
return getTotalInCollectField(d, totalData, total, totalSpec);
|
|
66568
|
-
}
|
|
66569
|
-
return getTotalInField(d, total, totalSpec);
|
|
66570
|
-
}
|
|
66571
|
-
return { start: 0, end: 0 };
|
|
66572
|
-
}
|
|
66573
|
-
function getTotalInEndType(total) {
|
|
66574
|
-
return { start: 0, end: total.end };
|
|
66575
|
-
}
|
|
66576
|
-
function getTotalInCustomType(d, temp, totalSpec) {
|
|
66577
|
-
return totalSpec.product(d, temp);
|
|
66578
|
-
}
|
|
66579
|
-
function getTotalInCollectField(d, totalData, total, totalSpec) {
|
|
66580
|
-
let start = 0;
|
|
66581
|
-
let end = total.end;
|
|
66582
|
-
const startIndex = totalData.length - +d[totalSpec.collectCountField];
|
|
66583
|
-
const endIndex = totalData.length - 1;
|
|
66584
|
-
if (startIndex < 0) {
|
|
66585
|
-
console.warn('total.collectCountField error');
|
|
66586
|
-
}
|
|
66587
|
-
else {
|
|
66588
|
-
start = totalData[startIndex].start;
|
|
66589
|
-
}
|
|
66590
|
-
if (endIndex < 0) {
|
|
66591
|
-
console.warn('total.collectCountField error');
|
|
66592
|
-
}
|
|
66593
|
-
else {
|
|
66594
|
-
end = totalData[endIndex].end;
|
|
66595
|
-
}
|
|
66596
|
-
return { start, end };
|
|
66597
|
-
}
|
|
66598
|
-
function getTotalInField(d, total, totalSpec) {
|
|
66599
|
-
let start = 0;
|
|
66600
|
-
let end = total.end;
|
|
66601
|
-
if (totalSpec.startField && !isNil$1(d[totalSpec.startField])) {
|
|
66602
|
-
start = +d[totalSpec.startField];
|
|
66603
|
-
}
|
|
66604
|
-
if (totalSpec.valueField && !isNil$1(d[totalSpec.valueField])) {
|
|
66605
|
-
end = precisionAdd(start, +d[totalSpec.valueField]);
|
|
66606
|
-
}
|
|
66607
|
-
return { start, end };
|
|
66608
|
-
}
|
|
66609
66490
|
const waterfallFillTotal = (data, op) => {
|
|
66610
66491
|
if (!data) {
|
|
66611
66492
|
return data;
|
|
@@ -68257,12 +68138,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68257
68138
|
max = Math.max(angleFieldValue, max);
|
|
68258
68139
|
data[index][ARC_TRANSFORM_VALUE] = angleFieldValue;
|
|
68259
68140
|
}
|
|
68260
|
-
const valueList = data.map(d => Number(d[angleField]));
|
|
68261
68141
|
const angleRange = endAngle - startAngle;
|
|
68262
68142
|
let lastAngle = startAngle;
|
|
68263
68143
|
let restAngle = angleRange;
|
|
68264
68144
|
let largeThanMinAngleTotal = 0;
|
|
68265
|
-
data.forEach(
|
|
68145
|
+
data.forEach(d => {
|
|
68266
68146
|
const angleFieldValue = d[ARC_TRANSFORM_VALUE];
|
|
68267
68147
|
const ratio = total ? angleFieldValue / total : 0;
|
|
68268
68148
|
let radian = ratio * angleRange;
|
|
@@ -68277,7 +68157,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68277
68157
|
const dEndAngle = lastAngle + radian;
|
|
68278
68158
|
d[asRatio] = ratio;
|
|
68279
68159
|
d[asK] = max ? angleFieldValue / max : 0;
|
|
68280
|
-
d._percent_ = getPercentValue(valueList, i);
|
|
68281
68160
|
appendArcInfo(d, dStartAngle, radian);
|
|
68282
68161
|
lastAngle = dEndAngle;
|
|
68283
68162
|
});
|
|
@@ -71051,8 +70930,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
71051
70930
|
'star',
|
|
71052
70931
|
'cardioid',
|
|
71053
70932
|
'circle',
|
|
71054
|
-
'pentagon'
|
|
71055
|
-
'rect'
|
|
70933
|
+
'pentagon'
|
|
71056
70934
|
];
|
|
71057
70935
|
|
|
71058
70936
|
const WORD_CLOUD_ANGLE = `${PREFIX}_WORD_CLOUD_ANGLE`;
|
|
@@ -81790,7 +81668,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81790
81668
|
}
|
|
81791
81669
|
else {
|
|
81792
81670
|
if (isXAxis(this.getOrient())) {
|
|
81793
|
-
field = s.
|
|
81671
|
+
field = s.fieldX2
|
|
81794
81672
|
? [...s.fieldX, s.fieldX2]
|
|
81795
81673
|
: s.fieldX;
|
|
81796
81674
|
}
|
|
@@ -81798,9 +81676,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81798
81676
|
field = s.fieldZ;
|
|
81799
81677
|
}
|
|
81800
81678
|
else {
|
|
81801
|
-
field = s.
|
|
81802
|
-
? [...s.fieldY, s.fieldY2]
|
|
81803
|
-
: s.fieldY;
|
|
81679
|
+
field = s.fieldY;
|
|
81804
81680
|
}
|
|
81805
81681
|
}
|
|
81806
81682
|
field = (isArray$1(field) ? (isContinuous(this._scale.type) ? field : [field[0]]) : [field]);
|
|
@@ -82821,20 +82697,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82821
82697
|
Factory.registerComponent(CartesianSymlogAxis.type, CartesianSymlogAxis);
|
|
82822
82698
|
};
|
|
82823
82699
|
|
|
82824
|
-
const getPolarAxisInfo = (spec
|
|
82825
|
-
var _a
|
|
82700
|
+
const getPolarAxisInfo = (spec) => {
|
|
82701
|
+
var _a;
|
|
82826
82702
|
const axisType = (_a = spec.type) !== null && _a !== void 0 ? _a : (spec.orient === 'angle' ? 'band' : 'linear');
|
|
82827
82703
|
const componentName = `${ComponentTypeEnum.polarAxis}-${axisType}`;
|
|
82828
|
-
|
|
82829
|
-
const endAngleFromSpec = (_c = spec.endAngle) !== null && _c !== void 0 ? _c : chartSpec.endAngle;
|
|
82830
|
-
return {
|
|
82831
|
-
axisType,
|
|
82832
|
-
componentName,
|
|
82833
|
-
startAngle: startAngleFromSpec !== null && startAngleFromSpec !== void 0 ? startAngleFromSpec : POLAR_START_ANGLE$1,
|
|
82834
|
-
endAngle: endAngleFromSpec !== null && endAngleFromSpec !== void 0 ? endAngleFromSpec : (isValid$1(startAngleFromSpec) ? startAngleFromSpec + 360 : POLAR_END_ANGLE$1),
|
|
82835
|
-
center: chartSpec.center,
|
|
82836
|
-
outerRadius: (_f = (_e = (_d = spec.radius) !== null && _d !== void 0 ? _d : chartSpec.outerRadius) !== null && _e !== void 0 ? _e : chartSpec.radius) !== null && _f !== void 0 ? _f : POLAR_DEFAULT_RADIUS
|
|
82837
|
-
};
|
|
82704
|
+
return { axisType, componentName };
|
|
82838
82705
|
};
|
|
82839
82706
|
|
|
82840
82707
|
class PolarAxis extends AxisComponent {
|
|
@@ -82854,6 +82721,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82854
82721
|
return this._groupScales;
|
|
82855
82722
|
}
|
|
82856
82723
|
static getSpecInfo(chartSpec) {
|
|
82724
|
+
var _a, _b;
|
|
82857
82725
|
const axesSpec = chartSpec[this.specKey];
|
|
82858
82726
|
if (!axesSpec) {
|
|
82859
82727
|
return null;
|
|
@@ -82862,11 +82730,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82862
82730
|
if (!isValidPolarAxis(axesSpec)) {
|
|
82863
82731
|
return null;
|
|
82864
82732
|
}
|
|
82865
|
-
const { axisType, componentName
|
|
82866
|
-
axesSpec.center = center;
|
|
82867
|
-
axesSpec.startAngle = startAngle;
|
|
82868
|
-
axesSpec.endAngle =
|
|
82869
|
-
|
|
82733
|
+
const { axisType, componentName } = getPolarAxisInfo(axesSpec);
|
|
82734
|
+
axesSpec.center = chartSpec.center;
|
|
82735
|
+
axesSpec.startAngle = (_a = chartSpec.startAngle) !== null && _a !== void 0 ? _a : POLAR_START_ANGLE$1;
|
|
82736
|
+
axesSpec.endAngle =
|
|
82737
|
+
(_b = chartSpec.endAngle) !== null && _b !== void 0 ? _b : (isValid$1(chartSpec.startAngle) ? chartSpec.startAngle + 360 : POLAR_END_ANGLE$1);
|
|
82870
82738
|
axesSpec.type = axisType;
|
|
82871
82739
|
return [
|
|
82872
82740
|
{
|
|
@@ -82881,14 +82749,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82881
82749
|
let angleAxisIndex;
|
|
82882
82750
|
const radiusAxisSpecInfos = [];
|
|
82883
82751
|
axesSpec.forEach((s, i) => {
|
|
82752
|
+
var _a, _b, _c, _d, _e;
|
|
82884
82753
|
if (!isValidPolarAxis(s)) {
|
|
82885
82754
|
return;
|
|
82886
82755
|
}
|
|
82887
|
-
const { axisType, componentName
|
|
82888
|
-
s.center = center;
|
|
82889
|
-
s.startAngle = startAngle;
|
|
82890
|
-
s.endAngle = endAngle;
|
|
82891
|
-
s.outerRadius = outerRadius;
|
|
82756
|
+
const { axisType, componentName } = getPolarAxisInfo(s);
|
|
82757
|
+
s.center = chartSpec.center;
|
|
82758
|
+
s.startAngle = (_a = chartSpec.startAngle) !== null && _a !== void 0 ? _a : POLAR_START_ANGLE$1;
|
|
82759
|
+
s.endAngle = (_b = chartSpec.endAngle) !== null && _b !== void 0 ? _b : (isValid$1(chartSpec.startAngle) ? chartSpec.startAngle + 360 : POLAR_END_ANGLE$1);
|
|
82760
|
+
s.outerRadius = (_e = (_d = (_c = s.radius) !== null && _c !== void 0 ? _c : chartSpec.outerRadius) !== null && _d !== void 0 ? _d : chartSpec.radius) !== null && _e !== void 0 ? _e : POLAR_DEFAULT_RADIUS;
|
|
82892
82761
|
s.type = axisType;
|
|
82893
82762
|
const info = {
|
|
82894
82763
|
spec: s,
|
|
@@ -82957,6 +82826,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82957
82826
|
this._coordinateType = 'polar';
|
|
82958
82827
|
}
|
|
82959
82828
|
setAttrFromSpec() {
|
|
82829
|
+
var _a, _b;
|
|
82960
82830
|
super.setAttrFromSpec();
|
|
82961
82831
|
if (this.visible) {
|
|
82962
82832
|
this._axisStyle = this._getAxisAttributes();
|
|
@@ -82965,8 +82835,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82965
82835
|
this._tick = this._spec.tick;
|
|
82966
82836
|
this._orient = this._spec.orient === 'angle' ? 'angle' : 'radius';
|
|
82967
82837
|
this._center = this._spec.center;
|
|
82968
|
-
|
|
82969
|
-
|
|
82838
|
+
const chartSpec = this.getChart().getSpec();
|
|
82839
|
+
const startAngle = (_a = this._spec.startAngle) !== null && _a !== void 0 ? _a : chartSpec.startAngle;
|
|
82840
|
+
const endAngle = (_b = this._spec.endAngle) !== null && _b !== void 0 ? _b : chartSpec.endAngle;
|
|
82841
|
+
this._startAngle = degreeToRadian(startAngle !== null && startAngle !== void 0 ? startAngle : POLAR_START_ANGLE$1);
|
|
82842
|
+
this._endAngle = degreeToRadian(endAngle !== null && endAngle !== void 0 ? endAngle : (isValid$1(startAngle) ? startAngle + 360 : POLAR_END_ANGLE$1));
|
|
82970
82843
|
this._inverse = this._spec.inverse;
|
|
82971
82844
|
}
|
|
82972
82845
|
onLayoutEnd(ctx) {
|
|
@@ -88774,12 +88647,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
88774
88647
|
options
|
|
88775
88648
|
});
|
|
88776
88649
|
}
|
|
88777
|
-
|
|
88778
|
-
|
|
88779
|
-
|
|
88780
|
-
|
|
88781
|
-
});
|
|
88782
|
-
}
|
|
88650
|
+
data.transform({
|
|
88651
|
+
type: 'markerFilter',
|
|
88652
|
+
options: this._getAllRelativeSeries()
|
|
88653
|
+
});
|
|
88783
88654
|
data.target.on('change', () => {
|
|
88784
88655
|
this._markerLayout();
|
|
88785
88656
|
});
|
|
@@ -88999,28 +88870,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
88999
88870
|
let lines = [];
|
|
89000
88871
|
if (isXYLayout) {
|
|
89001
88872
|
lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
|
|
89002
|
-
|
|
89003
|
-
|
|
89004
|
-
|
|
89005
|
-
|
|
89006
|
-
|
|
89007
|
-
|
|
89008
|
-
|
|
89009
|
-
|
|
89010
|
-
|
|
89011
|
-
|
|
89012
|
-
|
|
89013
|
-
|
|
89014
|
-
end[0]
|
|
89015
|
-
];
|
|
89016
|
-
}
|
|
88873
|
+
points = [
|
|
88874
|
+
{
|
|
88875
|
+
x: lines[0][0].x,
|
|
88876
|
+
y: lines[1][0].y
|
|
88877
|
+
},
|
|
88878
|
+
lines[0][0],
|
|
88879
|
+
{
|
|
88880
|
+
x: lines[1][0].x,
|
|
88881
|
+
y: lines[0][0].y
|
|
88882
|
+
},
|
|
88883
|
+
lines[1][0]
|
|
88884
|
+
];
|
|
89017
88885
|
}
|
|
89018
88886
|
else if (isXLayout || isYLayout) {
|
|
89019
88887
|
lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
|
|
89020
|
-
|
|
89021
|
-
if (start && start.length && end && end.length) {
|
|
89022
|
-
points = [...start, end[1], end[0]];
|
|
89023
|
-
}
|
|
88888
|
+
points = [...lines[0], lines[1][1], lines[1][0]];
|
|
89024
88889
|
}
|
|
89025
88890
|
else if (isCoordinateLayout) {
|
|
89026
88891
|
points = coordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset);
|
|
@@ -89094,12 +88959,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89094
88959
|
type: 'markerAggregation',
|
|
89095
88960
|
options
|
|
89096
88961
|
});
|
|
89097
|
-
|
|
89098
|
-
|
|
89099
|
-
|
|
89100
|
-
|
|
89101
|
-
});
|
|
89102
|
-
}
|
|
88962
|
+
data.transform({
|
|
88963
|
+
type: 'markerFilter',
|
|
88964
|
+
options: this._getAllRelativeSeries()
|
|
88965
|
+
});
|
|
89103
88966
|
data.target.on('change', () => {
|
|
89104
88967
|
this._markerLayout();
|
|
89105
88968
|
});
|
|
@@ -89125,7 +88988,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89125
88988
|
return result;
|
|
89126
88989
|
};
|
|
89127
88990
|
const transformToAttrs = (spec) => {
|
|
89128
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p
|
|
88991
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
89129
88992
|
const trackStyle = rectToAttribute((_b = (_a = spec === null || spec === void 0 ? void 0 : spec.slider) === null || _a === void 0 ? void 0 : _a.trackStyle) !== null && _b !== void 0 ? _b : {});
|
|
89130
88993
|
const railStyle = rectToAttribute((_d = (_c = spec === null || spec === void 0 ? void 0 : spec.slider) === null || _c === void 0 ? void 0 : _c.railStyle) !== null && _d !== void 0 ? _d : {});
|
|
89131
88994
|
const handlerStyle = symbolToAttribute((_f = (_e = spec === null || spec === void 0 ? void 0 : spec.slider) === null || _e === void 0 ? void 0 : _e.handlerStyle) !== null && _f !== void 0 ? _f : {});
|
|
@@ -89133,7 +88996,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89133
88996
|
const pause = baseToAttribute((_k = (_j = spec === null || spec === void 0 ? void 0 : spec.controller) === null || _j === void 0 ? void 0 : _j.pause) !== null && _k !== void 0 ? _k : {});
|
|
89134
88997
|
const backward = baseToAttribute((_m = (_l = spec === null || spec === void 0 ? void 0 : spec.controller) === null || _l === void 0 ? void 0 : _l.backward) !== null && _m !== void 0 ? _m : {});
|
|
89135
88998
|
const forward = baseToAttribute((_p = (_o = spec === null || spec === void 0 ? void 0 : spec.controller) === null || _o === void 0 ? void 0 : _o.forward) !== null && _p !== void 0 ? _p : {});
|
|
89136
|
-
return Object.assign(Object.assign({}, spec), { direction: spec.direction, interval: spec.interval, visible: spec.visible, orient:
|
|
88999
|
+
return Object.assign(Object.assign({}, spec), { direction: spec.direction, interval: spec.interval, visible: spec.visible, orient: spec.orient, slider: Object.assign(Object.assign({}, spec.slider), { trackStyle: trackStyle, railStyle: railStyle, handlerStyle: handlerStyle }), controller: Object.assign(Object.assign({}, spec.controller), { start: start, pause: pause, backward: backward, forward: forward }) });
|
|
89137
89000
|
};
|
|
89138
89001
|
const transformContinuousSpecToAttrs = (spec, data) => (Object.assign(Object.assign({}, transformToAttrs(spec)), { data, type: 'continuous' }));
|
|
89139
89002
|
const transformDiscreteSpecToAttrs = (spec, data) => (Object.assign(Object.assign({}, transformToAttrs(spec)), { data, type: 'discrete' }));
|
|
@@ -89453,6 +89316,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89453
89316
|
textAttribute.text = formatMethod(textAttribute.text, datum, { series });
|
|
89454
89317
|
}
|
|
89455
89318
|
if (formatter) {
|
|
89319
|
+
if (series.type === 'pie') {
|
|
89320
|
+
datum._percent_ = (datum[ARC_RATIO] * 100).toFixed(2) + '%';
|
|
89321
|
+
}
|
|
89322
|
+
else if (datum[STACK_FIELD_END_PERCENT]) {
|
|
89323
|
+
datum._percent_ = (datum[STACK_FIELD_END_PERCENT] * 100).toFixed(2) + '%';
|
|
89324
|
+
}
|
|
89456
89325
|
textAttribute.text = substitute(formatter, datum);
|
|
89457
89326
|
}
|
|
89458
89327
|
return textAttribute;
|
|
@@ -90283,7 +90152,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
90283
90152
|
const attribute = (_c = this._markerComponent.attribute) !== null && _c !== void 0 ? _c : {};
|
|
90284
90153
|
const textStyle = (_e = (_d = attribute.itemContent) === null || _d === void 0 ? void 0 : _d.textStyle) !== null && _e !== void 0 ? _e : {};
|
|
90285
90154
|
this._markerComponent.setAttributes({
|
|
90286
|
-
position: point,
|
|
90155
|
+
position: point === undefined ? { x: null, y: null } : point,
|
|
90287
90156
|
itemContent: Object.assign(Object.assign({}, attribute.itemContent), { textStyle: Object.assign(Object.assign({}, textStyle), { text: ((_f = this._spec.itemContent.text) === null || _f === void 0 ? void 0 : _f.formatMethod)
|
|
90288
90157
|
? this._spec.itemContent.text.formatMethod(dataPoints, seriesData)
|
|
90289
90158
|
: textStyle.text }) }),
|
|
@@ -90318,12 +90187,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
90318
90187
|
type: 'markerAggregation',
|
|
90319
90188
|
options
|
|
90320
90189
|
});
|
|
90321
|
-
|
|
90322
|
-
|
|
90323
|
-
|
|
90324
|
-
|
|
90325
|
-
});
|
|
90326
|
-
}
|
|
90190
|
+
data.transform({
|
|
90191
|
+
type: 'markerFilter',
|
|
90192
|
+
options: this._getAllRelativeSeries()
|
|
90193
|
+
});
|
|
90327
90194
|
data.target.on('change', () => {
|
|
90328
90195
|
this._markerLayout();
|
|
90329
90196
|
});
|