tvcharts 0.8.79 → 0.8.80
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/dist/echarts.js +283 -129
- package/dist/echarts.js.map +2 -2
- package/lib/chart/labels/LabelsView.js +121 -4
- package/lib/chart/labels/labelsLayout.js +25 -10
- package/lib/component/tooltip/TooltipTextHtmlContent.js +1 -1
- package/package.json +1 -1
- package/types/src/chart/labels/LabelsSeries.d.ts +1 -0
- package/types/src/chart/labels/LabelsView.d.ts +11 -1
package/dist/echarts.js
CHANGED
|
@@ -11506,9 +11506,9 @@ function isPlot(type) {
|
|
|
11506
11506
|
|
|
11507
11507
|
// src/chart/helper/createRenderPlanner.ts
|
|
11508
11508
|
function createRenderPlanner() {
|
|
11509
|
-
const
|
|
11509
|
+
const inner26 = makeInner();
|
|
11510
11510
|
return function(seriesModel) {
|
|
11511
|
-
const fields =
|
|
11511
|
+
const fields = inner26(seriesModel);
|
|
11512
11512
|
const pipelineContext = seriesModel.pipelineContext;
|
|
11513
11513
|
const originalLarge = !!fields.large;
|
|
11514
11514
|
const originalProgressive = !!fields.progressiveRender;
|
|
@@ -16325,9 +16325,9 @@ function getNearestPalette(palettes, requestColorNum) {
|
|
|
16325
16325
|
}
|
|
16326
16326
|
return palettes[paletteNum - 1];
|
|
16327
16327
|
}
|
|
16328
|
-
function getFromPalette(that,
|
|
16328
|
+
function getFromPalette(that, inner26, defaultPalette, layeredPalette, name, scope, requestNum) {
|
|
16329
16329
|
scope = scope || that;
|
|
16330
|
-
const scopeFields =
|
|
16330
|
+
const scopeFields = inner26(scope);
|
|
16331
16331
|
const paletteIdx = scopeFields.paletteIdx || 0;
|
|
16332
16332
|
const paletteNameMap = scopeFields.paletteNameMap = scopeFields.paletteNameMap || {};
|
|
16333
16333
|
if (paletteNameMap.hasOwnProperty(name)) {
|
|
@@ -16345,9 +16345,9 @@ function getFromPalette(that, inner25, defaultPalette, layeredPalette, name, sco
|
|
|
16345
16345
|
scopeFields.paletteIdx = (paletteIdx + 1) % palette.length;
|
|
16346
16346
|
return pickedPaletteItem;
|
|
16347
16347
|
}
|
|
16348
|
-
function clearPalette(that,
|
|
16349
|
-
|
|
16350
|
-
|
|
16348
|
+
function clearPalette(that, inner26) {
|
|
16349
|
+
inner26(that).paletteIdx = 0;
|
|
16350
|
+
inner26(that).paletteNameMap = {};
|
|
16351
16351
|
}
|
|
16352
16352
|
|
|
16353
16353
|
// src/model/Global.ts
|
|
@@ -36651,9 +36651,9 @@ var LineView = class extends Chart_default {
|
|
|
36651
36651
|
});
|
|
36652
36652
|
}
|
|
36653
36653
|
if (valueAnimation) {
|
|
36654
|
-
const
|
|
36655
|
-
if (typeof
|
|
36656
|
-
|
|
36654
|
+
const inner26 = labelInner(endLabel);
|
|
36655
|
+
if (typeof inner26.setLabelText === "function") {
|
|
36656
|
+
inner26.setLabelText(value);
|
|
36657
36657
|
}
|
|
36658
36658
|
}
|
|
36659
36659
|
}
|
|
@@ -56123,7 +56123,42 @@ var PolyPlotPath = class extends Path_default {
|
|
|
56123
56123
|
return new PolyPlotShape();
|
|
56124
56124
|
}
|
|
56125
56125
|
buildPath(ctx2, shape) {
|
|
56126
|
-
const {points: points4, baseY} = shape;
|
|
56126
|
+
const {points: points4, baseY, connectSelf, barWidth} = shape;
|
|
56127
|
+
if (connectSelf) {
|
|
56128
|
+
const offset = barWidth / 2;
|
|
56129
|
+
let isMove = false;
|
|
56130
|
+
let lastExistIndex = -1;
|
|
56131
|
+
for (let index = 0; index < points4.length; index++) {
|
|
56132
|
+
const point = points4[index];
|
|
56133
|
+
if (point === 0 || isPointNull4(point)) {
|
|
56134
|
+
isMove = true;
|
|
56135
|
+
continue;
|
|
56136
|
+
}
|
|
56137
|
+
const [x, y] = point;
|
|
56138
|
+
const nextPoint = points4[index + 1];
|
|
56139
|
+
const nextIsNull = !nextPoint || nextPoint === 0 || isPointNull4(nextPoint);
|
|
56140
|
+
if (lastExistIndex < 0 || isMove) {
|
|
56141
|
+
ctx2.moveTo(x - offset, y);
|
|
56142
|
+
if (nextIsNull) {
|
|
56143
|
+
ctx2.lineTo(x + offset, y);
|
|
56144
|
+
ctx2.lineTo(x + offset, baseY);
|
|
56145
|
+
ctx2.lineTo(x - offset, baseY);
|
|
56146
|
+
ctx2.lineTo(x - offset, y);
|
|
56147
|
+
}
|
|
56148
|
+
isMove = false;
|
|
56149
|
+
} else {
|
|
56150
|
+
ctx2.lineTo(x + offset, y);
|
|
56151
|
+
if (nextIsNull) {
|
|
56152
|
+
ctx2.lineTo(x + offset, baseY);
|
|
56153
|
+
const startPoint = points4[lastExistIndex];
|
|
56154
|
+
ctx2.lineTo(startPoint[0] - x, baseY);
|
|
56155
|
+
ctx2.lineTo(startPoint[0] - x, startPoint[1]);
|
|
56156
|
+
}
|
|
56157
|
+
}
|
|
56158
|
+
lastExistIndex = index;
|
|
56159
|
+
}
|
|
56160
|
+
return;
|
|
56161
|
+
}
|
|
56127
56162
|
let startIndex = 0;
|
|
56128
56163
|
for (let index = 0; index < points4.length; index++) {
|
|
56129
56164
|
const point = points4[index];
|
|
@@ -56643,13 +56678,18 @@ var LinesPlotView2 = class extends Chart_default {
|
|
|
56643
56678
|
const z2 = seriesModel.get("z2");
|
|
56644
56679
|
const baseY = seriesModel.coordinateSystem.dataToPoint([0, histbase], true)[1];
|
|
56645
56680
|
const visualColor = getAreaGradient(data, seriesModel, api2);
|
|
56681
|
+
const connectNulls = seriesModel.get("connectNulls");
|
|
56682
|
+
const step = seriesModel.get("step");
|
|
56683
|
+
const barSpace = Math.floor((seriesModel.coordinateSystem.getAxesByScale("ordinal")[0].scale.barSpace || calculatebandWidth(seriesModel, data)) * 0.8) || 1;
|
|
56646
56684
|
each(linePointsByKey, function(item, key) {
|
|
56647
56685
|
const [stroke] = key.split(":");
|
|
56648
56686
|
const {color: color2, isDefaultColor} = getFormatColor(stroke);
|
|
56649
56687
|
const el = new PolyPlotPath_default({
|
|
56650
56688
|
shape: {
|
|
56651
56689
|
points: item,
|
|
56652
|
-
baseY
|
|
56690
|
+
baseY,
|
|
56691
|
+
connectSelf: !connectNulls && !step,
|
|
56692
|
+
barWidth: barSpace
|
|
56653
56693
|
},
|
|
56654
56694
|
style: {
|
|
56655
56695
|
stroke: "none",
|
|
@@ -60547,6 +60587,8 @@ var variableMap = {
|
|
|
60547
60587
|
lCross: 1
|
|
60548
60588
|
};
|
|
60549
60589
|
var lineSymbols = ["xCross", "lCross"];
|
|
60590
|
+
var isBottomSymbols = ["labelUp", "labelUpperLeft", "labelUpperRight"];
|
|
60591
|
+
var inner12 = makeInner();
|
|
60550
60592
|
var LabelsView2 = class extends Chart_default {
|
|
60551
60593
|
constructor() {
|
|
60552
60594
|
super(...arguments);
|
|
@@ -60554,8 +60596,11 @@ var LabelsView2 = class extends Chart_default {
|
|
|
60554
60596
|
}
|
|
60555
60597
|
render(seriesModel, ecModel, api2) {
|
|
60556
60598
|
const data = seriesModel.getData();
|
|
60599
|
+
this.seriesModel = seriesModel;
|
|
60600
|
+
this.api = api2;
|
|
60557
60601
|
this._renderSymbol(data, seriesModel);
|
|
60558
60602
|
this._renderText(data, seriesModel);
|
|
60603
|
+
this._renderTooltipSymbol(data, seriesModel);
|
|
60559
60604
|
toggleHoverEmphasis(this.group, null, null, false);
|
|
60560
60605
|
const groupId = seriesModel.get("groupId");
|
|
60561
60606
|
getECData(this.group).groupId = groupId;
|
|
@@ -60633,6 +60678,46 @@ var LabelsView2 = class extends Chart_default {
|
|
|
60633
60678
|
symbolGroup.add(el);
|
|
60634
60679
|
});
|
|
60635
60680
|
}
|
|
60681
|
+
_renderTooltipSymbol(data, seriesModel) {
|
|
60682
|
+
if (!this._toolTipGroup) {
|
|
60683
|
+
this._toolTipGroup = new Group_default();
|
|
60684
|
+
this.group.add(this._toolTipGroup);
|
|
60685
|
+
this.group.on("mouseover", this._mouseover, this);
|
|
60686
|
+
this.group.on("mouseout", this._mouseout, this);
|
|
60687
|
+
} else {
|
|
60688
|
+
this._toolTipGroup.removeAll();
|
|
60689
|
+
}
|
|
60690
|
+
const emphasisState = seriesModel.get("emphasis").emphasisState;
|
|
60691
|
+
const toolTipGroup = this._toolTipGroup;
|
|
60692
|
+
const tooltipSymbols = data.getLayout("tooltipSymbols");
|
|
60693
|
+
each(tooltipSymbols, function({point, size, color: color2, offset, shape, index, symbol}) {
|
|
60694
|
+
const isLine = lineSymbols.includes(symbol);
|
|
60695
|
+
const [xOffset, yOffset] = offset;
|
|
60696
|
+
const [x, y] = point;
|
|
60697
|
+
if (isNaN(x) || isNaN(y)) {
|
|
60698
|
+
return;
|
|
60699
|
+
}
|
|
60700
|
+
const needCenter = !variableMap[symbol];
|
|
60701
|
+
const [width, height] = size;
|
|
60702
|
+
const el = createSymbol(symbol, 0, 0, 0, 0);
|
|
60703
|
+
el.style = {
|
|
60704
|
+
fill: color2,
|
|
60705
|
+
stroke: isLine ? color2 : "none",
|
|
60706
|
+
lineWidth: isLine ? 2 : void 0
|
|
60707
|
+
};
|
|
60708
|
+
el.shape = {
|
|
60709
|
+
...el.shape,
|
|
60710
|
+
x: x - (needCenter ? width / 2 : 0) + xOffset,
|
|
60711
|
+
y: y - (needCenter ? height / 2 : 0) + yOffset,
|
|
60712
|
+
width,
|
|
60713
|
+
height,
|
|
60714
|
+
...shape
|
|
60715
|
+
};
|
|
60716
|
+
inner12(el).index = index;
|
|
60717
|
+
el.states.emphasis = emphasisState;
|
|
60718
|
+
toolTipGroup.add(el);
|
|
60719
|
+
});
|
|
60720
|
+
}
|
|
60636
60721
|
_getClipShape(seriesModel) {
|
|
60637
60722
|
if (!seriesModel.get("clip", true)) {
|
|
60638
60723
|
return;
|
|
@@ -60640,13 +60725,60 @@ var LabelsView2 = class extends Chart_default {
|
|
|
60640
60725
|
const coordSys = seriesModel.coordinateSystem;
|
|
60641
60726
|
return coordSys && coordSys.getArea && coordSys.getArea(0.1);
|
|
60642
60727
|
}
|
|
60643
|
-
|
|
60728
|
+
_mouseover(e2) {
|
|
60729
|
+
const obj = inner12(e2.target);
|
|
60730
|
+
if (typeof obj.index !== "number") {
|
|
60731
|
+
return;
|
|
60732
|
+
}
|
|
60733
|
+
const data = this.seriesModel.getData();
|
|
60734
|
+
const dataModal = data.getItemModel(obj.index);
|
|
60735
|
+
const rect = e2.target._rect;
|
|
60736
|
+
const tooltip = dataModal.get("tooltipText");
|
|
60737
|
+
const symbol = dataModal.get("symbol");
|
|
60738
|
+
const position2 = isBottomSymbols.includes(symbol) ? "bottom" : "top";
|
|
60739
|
+
const x = rect.x + rect.width / 2;
|
|
60740
|
+
const y = position2 === "bottom" ? rect.y + rect.height : rect.y;
|
|
60741
|
+
this._clearTimer();
|
|
60742
|
+
this._timer = setTimeout(() => {
|
|
60743
|
+
this.api.dispatchAction({
|
|
60744
|
+
type: "showTipText",
|
|
60745
|
+
escapeConnect: true,
|
|
60746
|
+
text: tooltip,
|
|
60747
|
+
x,
|
|
60748
|
+
y,
|
|
60749
|
+
position: position2
|
|
60750
|
+
});
|
|
60751
|
+
this._isTooltipOpen = true;
|
|
60752
|
+
}, 300);
|
|
60753
|
+
}
|
|
60754
|
+
_mouseout() {
|
|
60755
|
+
this._clearTimer();
|
|
60756
|
+
if (this._isTooltipOpen) {
|
|
60757
|
+
this.api.dispatchAction({
|
|
60758
|
+
type: "hideTipText",
|
|
60759
|
+
escapeConnect: true
|
|
60760
|
+
});
|
|
60761
|
+
this._isTooltipOpen = false;
|
|
60762
|
+
}
|
|
60763
|
+
}
|
|
60764
|
+
_clearTimer() {
|
|
60765
|
+
if (this._timer) {
|
|
60766
|
+
clearTimeout(this._timer);
|
|
60767
|
+
this._timer = null;
|
|
60768
|
+
}
|
|
60769
|
+
}
|
|
60770
|
+
remove() {
|
|
60644
60771
|
this._symbolGroup && this._symbolGroup.removeAll();
|
|
60645
60772
|
this._symbolGroup = null;
|
|
60646
60773
|
this._textGroup && this._textGroup.removeAll();
|
|
60647
60774
|
this._textGroup = null;
|
|
60775
|
+
this._toolTipGroup && this._toolTipGroup.removeAll();
|
|
60776
|
+
this._toolTipGroup = null;
|
|
60777
|
+
this.seriesModel = null;
|
|
60778
|
+
this.api = null;
|
|
60648
60779
|
}
|
|
60649
60780
|
dispose() {
|
|
60781
|
+
this.remove();
|
|
60650
60782
|
}
|
|
60651
60783
|
};
|
|
60652
60784
|
var LabelsView = LabelsView2;
|
|
@@ -60967,6 +61099,7 @@ var labelsLayout = {
|
|
|
60967
61099
|
return {
|
|
60968
61100
|
progress(params, labelsData) {
|
|
60969
61101
|
const symbolStyleMap = {};
|
|
61102
|
+
const tooltipSymbols = [];
|
|
60970
61103
|
const textList = [];
|
|
60971
61104
|
const tmpIn = [];
|
|
60972
61105
|
const lastIndex = data.count(true) - 1;
|
|
@@ -61049,15 +61182,28 @@ var labelsLayout = {
|
|
|
61049
61182
|
symbolPoint[1] = symbolPoint[1] + symbolRect[1] / 2;
|
|
61050
61183
|
}
|
|
61051
61184
|
if (symbol !== "none" && itemModel.option.itemStyle.color) {
|
|
61052
|
-
const
|
|
61053
|
-
|
|
61054
|
-
|
|
61055
|
-
|
|
61056
|
-
|
|
61057
|
-
|
|
61058
|
-
|
|
61059
|
-
|
|
61060
|
-
|
|
61185
|
+
const tooltip = itemModel.get("tooltipText");
|
|
61186
|
+
if (tooltip) {
|
|
61187
|
+
tooltipSymbols.push({
|
|
61188
|
+
point: symbolPoint,
|
|
61189
|
+
size: symbolRect,
|
|
61190
|
+
offset: symbolOffset,
|
|
61191
|
+
color: itemModel.option.itemStyle.color,
|
|
61192
|
+
shape: symbolShape,
|
|
61193
|
+
index: i,
|
|
61194
|
+
symbol
|
|
61195
|
+
});
|
|
61196
|
+
} else {
|
|
61197
|
+
const symbolStyles = symbolStyleMap[symbol] || [];
|
|
61198
|
+
symbolStyles.push({
|
|
61199
|
+
point: symbolPoint,
|
|
61200
|
+
size: symbolRect,
|
|
61201
|
+
offset: symbolOffset,
|
|
61202
|
+
color: itemModel.option.itemStyle.color,
|
|
61203
|
+
shape: symbolShape
|
|
61204
|
+
});
|
|
61205
|
+
symbolStyleMap[symbol] = symbolStyles;
|
|
61206
|
+
}
|
|
61061
61207
|
}
|
|
61062
61208
|
if (textShow) {
|
|
61063
61209
|
const labelPoint = symbolPoint.slice();
|
|
@@ -61085,7 +61231,8 @@ var labelsLayout = {
|
|
|
61085
61231
|
}
|
|
61086
61232
|
labelsData.setLayout({
|
|
61087
61233
|
symbolStyleMap,
|
|
61088
|
-
textList
|
|
61234
|
+
textList,
|
|
61235
|
+
tooltipSymbols
|
|
61089
61236
|
});
|
|
61090
61237
|
}
|
|
61091
61238
|
};
|
|
@@ -65380,7 +65527,7 @@ GraphicComponentModel.defaultOption = {
|
|
|
65380
65527
|
};
|
|
65381
65528
|
|
|
65382
65529
|
// src/component/axisPointer/BaseAxisPointer.ts
|
|
65383
|
-
var
|
|
65530
|
+
var inner13 = makeInner();
|
|
65384
65531
|
var elInner = makeInner();
|
|
65385
65532
|
var clone4 = clone;
|
|
65386
65533
|
var bind3 = bind;
|
|
@@ -65466,26 +65613,26 @@ var BaseAxisPointer = class {
|
|
|
65466
65613
|
createPointerEl(group, elOption, axisModel, axisPointerModel) {
|
|
65467
65614
|
const pointerOption = elOption.pointer;
|
|
65468
65615
|
if (pointerOption) {
|
|
65469
|
-
const pointerEl =
|
|
65616
|
+
const pointerEl = inner13(group).pointerEl = new graphic_exports[pointerOption.type](clone4(elOption.pointer));
|
|
65470
65617
|
group.add(pointerEl);
|
|
65471
65618
|
}
|
|
65472
65619
|
}
|
|
65473
65620
|
createLabelEl(group, elOption, axisModel, axisPointerModel) {
|
|
65474
65621
|
if (elOption.label) {
|
|
65475
|
-
const labelEl =
|
|
65622
|
+
const labelEl = inner13(group).labelEl = new Text_default(clone4(elOption.label));
|
|
65476
65623
|
group.add(labelEl);
|
|
65477
65624
|
updateLabelShowHide(labelEl, axisPointerModel);
|
|
65478
65625
|
}
|
|
65479
65626
|
}
|
|
65480
65627
|
updatePointerEl(group, elOption, updateProps3) {
|
|
65481
|
-
const pointerEl =
|
|
65628
|
+
const pointerEl = inner13(group).pointerEl;
|
|
65482
65629
|
if (pointerEl && elOption.pointer) {
|
|
65483
65630
|
pointerEl.setStyle(elOption.pointer.style);
|
|
65484
65631
|
updateProps3(pointerEl, {shape: elOption.pointer.shape});
|
|
65485
65632
|
}
|
|
65486
65633
|
}
|
|
65487
65634
|
updateLabelEl(group, elOption, updateProps3, axisPointerModel) {
|
|
65488
|
-
const labelEl =
|
|
65635
|
+
const labelEl = inner13(group).labelEl;
|
|
65489
65636
|
if (labelEl) {
|
|
65490
65637
|
labelEl.setStyle(elOption.label.style);
|
|
65491
65638
|
updateProps3(labelEl, {
|
|
@@ -65646,7 +65793,7 @@ var BaseAxisPointer = class {
|
|
|
65646
65793
|
this._payloadInfo = trans;
|
|
65647
65794
|
handle.stopAnimation();
|
|
65648
65795
|
handle.attr(getHandleTransProps(trans));
|
|
65649
|
-
|
|
65796
|
+
inner13(handle).lastProp = null;
|
|
65650
65797
|
this._doDispatchAxisPointer();
|
|
65651
65798
|
}
|
|
65652
65799
|
_doDispatchAxisPointer() {
|
|
@@ -65711,8 +65858,8 @@ var BaseAxisPointer = class {
|
|
|
65711
65858
|
}
|
|
65712
65859
|
};
|
|
65713
65860
|
function updateProps2(animationModel, moveAnimation, el, props) {
|
|
65714
|
-
if (!propsEqual(
|
|
65715
|
-
|
|
65861
|
+
if (!propsEqual(inner13(el).lastProp, props)) {
|
|
65862
|
+
inner13(el).lastProp = props;
|
|
65716
65863
|
moveAnimation ? updateProps(el, props, animationModel) : (el.stopAnimation(), el.attr(props));
|
|
65717
65864
|
}
|
|
65718
65865
|
}
|
|
@@ -66037,23 +66184,23 @@ AxisPointerModel.defaultOption = {
|
|
|
66037
66184
|
var AxisPointerModel_default = AxisPointerModel;
|
|
66038
66185
|
|
|
66039
66186
|
// src/component/axisPointer/globalListener.ts
|
|
66040
|
-
var
|
|
66187
|
+
var inner14 = makeInner();
|
|
66041
66188
|
var each14 = each;
|
|
66042
66189
|
function register(key, api2, handler) {
|
|
66043
66190
|
if (env_default.node) {
|
|
66044
66191
|
return;
|
|
66045
66192
|
}
|
|
66046
66193
|
const zr = api2.getZr();
|
|
66047
|
-
|
|
66194
|
+
inner14(zr).records || (inner14(zr).records = {});
|
|
66048
66195
|
initGlobalListeners(zr, api2);
|
|
66049
|
-
const record =
|
|
66196
|
+
const record = inner14(zr).records[key] || (inner14(zr).records[key] = {});
|
|
66050
66197
|
record.handler = handler;
|
|
66051
66198
|
}
|
|
66052
66199
|
function initGlobalListeners(zr, api2) {
|
|
66053
|
-
if (
|
|
66200
|
+
if (inner14(zr).initialized) {
|
|
66054
66201
|
return;
|
|
66055
66202
|
}
|
|
66056
|
-
|
|
66203
|
+
inner14(zr).initialized = true;
|
|
66057
66204
|
useHandler("click", curry(doEnter, "click"));
|
|
66058
66205
|
useHandler("mousemove", curry(doEnter, "mousemove"));
|
|
66059
66206
|
useHandler("mouseup", curry(doEnter, "mouseup"));
|
|
@@ -66062,7 +66209,7 @@ function initGlobalListeners(zr, api2) {
|
|
|
66062
66209
|
function useHandler(eventType, cb) {
|
|
66063
66210
|
zr.on(eventType, function(e2) {
|
|
66064
66211
|
const dis = makeDispatchAction(api2);
|
|
66065
|
-
each14(
|
|
66212
|
+
each14(inner14(zr).records, function(record) {
|
|
66066
66213
|
record && cb(record, e2, dis.dispatchAction);
|
|
66067
66214
|
});
|
|
66068
66215
|
dispatchTooltipFinally(dis.pendings, api2);
|
|
@@ -66113,9 +66260,9 @@ function unregister(key, api2) {
|
|
|
66113
66260
|
return;
|
|
66114
66261
|
}
|
|
66115
66262
|
const zr = api2.getZr();
|
|
66116
|
-
const record = (
|
|
66263
|
+
const record = (inner14(zr).records || {})[key];
|
|
66117
66264
|
if (record) {
|
|
66118
|
-
|
|
66265
|
+
inner14(zr).records[key] = null;
|
|
66119
66266
|
}
|
|
66120
66267
|
}
|
|
66121
66268
|
|
|
@@ -66233,7 +66380,7 @@ function findPointFromSeries(finder, ecModel) {
|
|
|
66233
66380
|
}
|
|
66234
66381
|
|
|
66235
66382
|
// src/component/axisPointer/axisTrigger.ts
|
|
66236
|
-
var
|
|
66383
|
+
var inner15 = makeInner();
|
|
66237
66384
|
function axisTrigger(payload, ecModel, api2) {
|
|
66238
66385
|
const currTrigger = payload.currTrigger;
|
|
66239
66386
|
let point = [payload.x, payload.y];
|
|
@@ -66497,8 +66644,8 @@ function dispatchPointer(ecModel, shouldHide, point, dispatchAction3) {
|
|
|
66497
66644
|
function dispatchHighDownActually(axesInfo, dispatchAction3, api2) {
|
|
66498
66645
|
const zr = api2.getZr();
|
|
66499
66646
|
const highDownKey = "axisPointerLastHighlights";
|
|
66500
|
-
const lastHighlights =
|
|
66501
|
-
const newHighlights =
|
|
66647
|
+
const lastHighlights = inner15(zr)[highDownKey] || {};
|
|
66648
|
+
const newHighlights = inner15(zr)[highDownKey] = {};
|
|
66502
66649
|
each(axesInfo, function(axisInfo, key) {
|
|
66503
66650
|
const option = axisInfo.axisPointerModel.option;
|
|
66504
66651
|
option.status === "show" && axisInfo.triggerEmphasis && each(option.seriesDataIndices, function(batchItem) {
|
|
@@ -66733,7 +66880,7 @@ RadiusAxis.prototype.radiusToData = Axis_default.prototype.coordToData;
|
|
|
66733
66880
|
var RadiusAxis_default = RadiusAxis;
|
|
66734
66881
|
|
|
66735
66882
|
// src/coord/polar/AngleAxis.ts
|
|
66736
|
-
var
|
|
66883
|
+
var inner16 = makeInner();
|
|
66737
66884
|
var AngleAxis = class extends Axis_default {
|
|
66738
66885
|
constructor(scale4, angleExtent) {
|
|
66739
66886
|
super("angle", scale4, angleExtent || [0, 360]);
|
|
@@ -66758,7 +66905,7 @@ var AngleAxis = class extends Axis_default {
|
|
|
66758
66905
|
let dh = maxH / unitH;
|
|
66759
66906
|
isNaN(dh) && (dh = Infinity);
|
|
66760
66907
|
let interval = Math.max(0, Math.floor(dh));
|
|
66761
|
-
const cache =
|
|
66908
|
+
const cache = inner16(axis.model);
|
|
66762
66909
|
const lastAutoInterval = cache.lastAutoInterval;
|
|
66763
66910
|
const lastTickCount = cache.lastTickCount;
|
|
66764
66911
|
if (lastAutoInterval != null && lastTickCount != null && Math.abs(lastAutoInterval - interval) <= 1 && Math.abs(lastTickCount - tickCount) <= 1 && lastAutoInterval > interval) {
|
|
@@ -68803,7 +68950,7 @@ var nonShapeGraphicElements = {
|
|
|
68803
68950
|
image: Image_default,
|
|
68804
68951
|
text: Text_default
|
|
68805
68952
|
};
|
|
68806
|
-
var
|
|
68953
|
+
var inner17 = makeInner();
|
|
68807
68954
|
var GraphicComponentView2 = class extends Component_default2 {
|
|
68808
68955
|
constructor() {
|
|
68809
68956
|
super(...arguments);
|
|
@@ -68848,6 +68995,7 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
68848
68995
|
});
|
|
68849
68996
|
}
|
|
68850
68997
|
_dataZoomUpdateElements(graphicModel, ecIns) {
|
|
68998
|
+
const elMap = this._elMap;
|
|
68851
68999
|
const existList = graphicModel.option.elements || [];
|
|
68852
69000
|
existList.filter((item) => item.getDataZoomElements).forEach((item) => {
|
|
68853
69001
|
const element = item.getDataZoomElements();
|
|
@@ -68857,6 +69005,10 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
68857
69005
|
if (element.getElementLabels) {
|
|
68858
69006
|
item.getElementLabels = element.getElementLabels;
|
|
68859
69007
|
}
|
|
69008
|
+
const el = elMap.get(item.id);
|
|
69009
|
+
if (el && element.ignore !== el.ignore) {
|
|
69010
|
+
el.ignore = element.ignore;
|
|
69011
|
+
}
|
|
68860
69012
|
});
|
|
68861
69013
|
}
|
|
68862
69014
|
_updateElements(graphicModel, ecModel, api2) {
|
|
@@ -68907,7 +69059,7 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
68907
69059
|
}
|
|
68908
69060
|
el2 = createEl2(id, targetElParent, elOption.type, elMap);
|
|
68909
69061
|
} else {
|
|
68910
|
-
el2 && (
|
|
69062
|
+
el2 && (inner17(el2).isNew = false);
|
|
68911
69063
|
stopPreviousKeyframeAnimationAndRestore(el2);
|
|
68912
69064
|
}
|
|
68913
69065
|
if (el2) {
|
|
@@ -68945,7 +69097,7 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
68945
69097
|
let isInit = false;
|
|
68946
69098
|
if (isMerge) {
|
|
68947
69099
|
const oldClipPath = el.getClipPath();
|
|
68948
|
-
isInit = !oldClipPath ||
|
|
69100
|
+
isInit = !oldClipPath || inner17(oldClipPath).type !== clipPathType;
|
|
68949
69101
|
clipPath = isInit ? newEl(clipPathType) : oldClipPath;
|
|
68950
69102
|
} else if (isReplace) {
|
|
68951
69103
|
isInit = true;
|
|
@@ -68955,7 +69107,7 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
68955
69107
|
applyUpdateTransition(clipPath, clipPathOption, graphicModel, {isInit});
|
|
68956
69108
|
applyKeyframeAnimation(clipPath, clipPathOption.keyframeAnimation, graphicModel);
|
|
68957
69109
|
}
|
|
68958
|
-
const elInner2 =
|
|
69110
|
+
const elInner2 = inner17(el);
|
|
68959
69111
|
el.setTextConfig(textConfig);
|
|
68960
69112
|
elInner2.option = elOption;
|
|
68961
69113
|
setEventData(el, graphicModel, elOption);
|
|
@@ -68985,8 +69137,8 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
68985
69137
|
}
|
|
68986
69138
|
const parentEl = el.parent;
|
|
68987
69139
|
const isParentRoot = parentEl === rootGroup;
|
|
68988
|
-
const elInner2 =
|
|
68989
|
-
const parentElInner =
|
|
69140
|
+
const elInner2 = inner17(el);
|
|
69141
|
+
const parentElInner = inner17(parentEl);
|
|
68990
69142
|
elInner2.width = parsePercent2(elInner2.option.width, isParentRoot ? apiWidth : parentElInner.width) || 0;
|
|
68991
69143
|
elInner2.height = parsePercent2(elInner2.option.height, isParentRoot ? apiHeight : parentElInner.height) || 0;
|
|
68992
69144
|
}
|
|
@@ -68998,7 +69150,7 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
68998
69150
|
continue;
|
|
68999
69151
|
}
|
|
69000
69152
|
const parentEl = el.parent;
|
|
69001
|
-
const parentElInner =
|
|
69153
|
+
const parentElInner = inner17(parentEl);
|
|
69002
69154
|
const containerInfo = parentEl === rootGroup ? {
|
|
69003
69155
|
width: apiWidth,
|
|
69004
69156
|
height: apiHeight
|
|
@@ -69008,7 +69160,7 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
69008
69160
|
};
|
|
69009
69161
|
const layoutPos = {};
|
|
69010
69162
|
const layouted = positionElement(el, elOption, containerInfo, null, {hv: elOption.hv, boundingMode: elOption.bounding}, layoutPos);
|
|
69011
|
-
if (!
|
|
69163
|
+
if (!inner17(el).isNew && layouted) {
|
|
69012
69164
|
const transition = elOption.transition;
|
|
69013
69165
|
const animatePos = {};
|
|
69014
69166
|
for (let k = 0; k < xy.length; k++) {
|
|
@@ -69039,13 +69191,13 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
69039
69191
|
if (isInit) {
|
|
69040
69192
|
el = createEl2(id, targetElParent, labelOption.type, elLabelMap);
|
|
69041
69193
|
} else {
|
|
69042
|
-
el && (
|
|
69194
|
+
el && (inner17(el).isNew = false);
|
|
69043
69195
|
}
|
|
69044
69196
|
if (el) {
|
|
69045
69197
|
const elOptionCleaned = getCleanedElOption(labelOption);
|
|
69046
69198
|
updateCommonAttrs(el, labelOption, globalZ, globalZLevel);
|
|
69047
69199
|
applyUpdateTransition(el, elOptionCleaned, graphicModel, {isInit});
|
|
69048
|
-
|
|
69200
|
+
inner17(el).y = el.y;
|
|
69049
69201
|
}
|
|
69050
69202
|
if (labelOption.children) {
|
|
69051
69203
|
each(labelOption.children, (childLabelOption) => {
|
|
@@ -69072,10 +69224,10 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
69072
69224
|
const elMap = this._elMap;
|
|
69073
69225
|
const elLabelMap = this._elLabelMap;
|
|
69074
69226
|
elMap.each((el) => {
|
|
69075
|
-
removeEl(el,
|
|
69227
|
+
removeEl(el, inner17(el).option, elMap, this._lastGraphicModel);
|
|
69076
69228
|
});
|
|
69077
69229
|
elLabelMap.each((el) => {
|
|
69078
|
-
removeEl(el,
|
|
69230
|
+
removeEl(el, inner17(el).option, elLabelMap, this._lastGraphicModel);
|
|
69079
69231
|
});
|
|
69080
69232
|
this._clearSeriesLabels();
|
|
69081
69233
|
this._elMap = createHashMap();
|
|
@@ -69099,15 +69251,15 @@ function newEl(graphicType) {
|
|
|
69099
69251
|
assert(Clz, `graphic type ${graphicType} can not be found`);
|
|
69100
69252
|
}
|
|
69101
69253
|
const el = new Clz({});
|
|
69102
|
-
|
|
69254
|
+
inner17(el).type = graphicType;
|
|
69103
69255
|
return el;
|
|
69104
69256
|
}
|
|
69105
69257
|
function createEl2(id, targetElParent, graphicType, elMap) {
|
|
69106
69258
|
const el = newEl(graphicType);
|
|
69107
69259
|
targetElParent.add(el);
|
|
69108
69260
|
elMap.set(id, el);
|
|
69109
|
-
|
|
69110
|
-
|
|
69261
|
+
inner17(el).id = id;
|
|
69262
|
+
inner17(el).isNew = true;
|
|
69111
69263
|
return el;
|
|
69112
69264
|
}
|
|
69113
69265
|
function removeEl(elExisting, elOption, elMap, graphicModel) {
|
|
@@ -69117,7 +69269,7 @@ function removeEl(elExisting, elOption, elMap, graphicModel) {
|
|
|
69117
69269
|
removeEl(el, elOption, elMap, graphicModel);
|
|
69118
69270
|
});
|
|
69119
69271
|
applyLeaveTransition(elExisting, elOption, graphicModel);
|
|
69120
|
-
elMap.removeKey(
|
|
69272
|
+
elMap.removeKey(inner17(elExisting).id);
|
|
69121
69273
|
}
|
|
69122
69274
|
}
|
|
69123
69275
|
function removeLabelEl(elOption, elMap) {
|
|
@@ -69131,7 +69283,7 @@ function removeLabelEl(elOption, elMap) {
|
|
|
69131
69283
|
removeLabelEl(option, elMap);
|
|
69132
69284
|
});
|
|
69133
69285
|
}
|
|
69134
|
-
elMap.removeKey(
|
|
69286
|
+
elMap.removeKey(inner17(elExisting).id);
|
|
69135
69287
|
}
|
|
69136
69288
|
}
|
|
69137
69289
|
function updateCommonAttrs(el, elOption, defaultZ, defaultZlevel) {
|
|
@@ -71056,7 +71208,7 @@ var DataView_default = DataView;
|
|
|
71056
71208
|
|
|
71057
71209
|
// src/component/dataZoom/history.ts
|
|
71058
71210
|
var each16 = each;
|
|
71059
|
-
var
|
|
71211
|
+
var inner18 = makeInner();
|
|
71060
71212
|
function push(ecModel, newSnapshot) {
|
|
71061
71213
|
const storedSnapshots = getStoreSnapshots(ecModel);
|
|
71062
71214
|
each16(newSnapshot, function(batchItem, dataZoomId) {
|
|
@@ -71098,13 +71250,13 @@ function pop(ecModel) {
|
|
|
71098
71250
|
return snapshot;
|
|
71099
71251
|
}
|
|
71100
71252
|
function clear2(ecModel) {
|
|
71101
|
-
|
|
71253
|
+
inner18(ecModel).snapshots = null;
|
|
71102
71254
|
}
|
|
71103
71255
|
function count(ecModel) {
|
|
71104
71256
|
return getStoreSnapshots(ecModel).length;
|
|
71105
71257
|
}
|
|
71106
71258
|
function getStoreSnapshots(ecModel) {
|
|
71107
|
-
const store =
|
|
71259
|
+
const store = inner18(ecModel);
|
|
71108
71260
|
if (!store.snapshots) {
|
|
71109
71261
|
store.snapshots = [{}];
|
|
71110
71262
|
}
|
|
@@ -72145,11 +72297,11 @@ var TooltipTextHtmlContent = class {
|
|
|
72145
72297
|
style.transform = "translateX(-50%) translateY(-100%)";
|
|
72146
72298
|
} else {
|
|
72147
72299
|
style.top = y + margin2 + "px";
|
|
72148
|
-
style.transform = "translateX(-50%)
|
|
72300
|
+
style.transform = "translateX(-50%)";
|
|
72149
72301
|
triangleStyle = "transform: translateX(-50%) translateY(-50%) rotate(45deg); position: absolute; top: 0px;";
|
|
72150
72302
|
}
|
|
72151
72303
|
el.innerHTML = `<div>
|
|
72152
|
-
<div style="min-width: 32px; padding: 2px 8px; color: #fff; background-color: rgb(42, 46, 57); font-size: 12px; border-radius: 6px; box-shadow: rgba(0, 0, 0, 0.08) 0px 6px 16px 0px, rgba(0, 0, 0, 0.12) 0px 3px 6px -4px, rgba(0, 0, 0, 0.05) 0px 9px 28px 8px;">${text}</div>
|
|
72304
|
+
<div style="min-width: 32px; padding: 2px 8px; color: #fff; background-color: rgb(42, 46, 57); font-size: 12px; border-radius: 6px; box-shadow: rgba(0, 0, 0, 0.08) 0px 6px 16px 0px, rgba(0, 0, 0, 0.12) 0px 3px 6px -4px, rgba(0, 0, 0, 0.05) 0px 9px 28px 8px; white-space: pre;">${text}</div>
|
|
72153
72305
|
<div style="width: 6px; height: 6px; ${triangleStyle} left: 50%; background-color: rgb(42, 46, 57);"></div>
|
|
72154
72306
|
</div>`;
|
|
72155
72307
|
}
|
|
@@ -72755,7 +72907,8 @@ var TooltipView2 = class extends Component_default2 {
|
|
|
72755
72907
|
const ordinalMeta = scale4.getOrdinalMeta();
|
|
72756
72908
|
const dataIndex = typeof time === "number" ? time : ordinalMeta.getOrdinal(time) ?? ordinalMeta.getClosestTime(time);
|
|
72757
72909
|
const data = mainSeriesModal.getData();
|
|
72758
|
-
const
|
|
72910
|
+
const dim = isCandle(mainSeriesModal.subType) ? position2 === "top" ? "highest" : "lowest" : "y";
|
|
72911
|
+
const price2 = data.getByRawIndex(dim, dataIndex);
|
|
72759
72912
|
const yAxisModel = coordSys.getAxis("y");
|
|
72760
72913
|
y = yAxisModel.toGlobalCoord(yAxisModel.dataToCoord(price2));
|
|
72761
72914
|
x = xAxisModal.toGlobalCoord(xAxisModal.dataToCoord(dataIndex));
|
|
@@ -76153,6 +76306,7 @@ var PlaybackOrderView4 = class extends Component_default2 {
|
|
|
76153
76306
|
if (!this.orderGroup) {
|
|
76154
76307
|
return;
|
|
76155
76308
|
}
|
|
76309
|
+
this.clearTimer();
|
|
76156
76310
|
if (this.mouseSelected || this.selected) {
|
|
76157
76311
|
this.api.dispatchAction({
|
|
76158
76312
|
type: "hideTipText",
|
|
@@ -77144,7 +77298,7 @@ function checkMarkerInSeries(seriesOpts, markerType) {
|
|
|
77144
77298
|
function fillLabel(opt) {
|
|
77145
77299
|
defaultEmphasis(opt, "label", ["show"]);
|
|
77146
77300
|
}
|
|
77147
|
-
var
|
|
77301
|
+
var inner19 = makeInner();
|
|
77148
77302
|
var MarkerModel2 = class extends Component_default {
|
|
77149
77303
|
constructor() {
|
|
77150
77304
|
super(...arguments);
|
|
@@ -77175,9 +77329,9 @@ var MarkerModel2 = class extends Component_default {
|
|
|
77175
77329
|
if (!createdBySelf) {
|
|
77176
77330
|
ecModel.eachSeries(function(seriesModel) {
|
|
77177
77331
|
const markerOpt = seriesModel.get(this.mainType, true);
|
|
77178
|
-
let markerModel =
|
|
77332
|
+
let markerModel = inner19(seriesModel)[componentType];
|
|
77179
77333
|
if (!markerOpt || !markerOpt.data) {
|
|
77180
|
-
|
|
77334
|
+
inner19(seriesModel)[componentType] = null;
|
|
77181
77335
|
return;
|
|
77182
77336
|
}
|
|
77183
77337
|
if (!markerModel) {
|
|
@@ -77203,7 +77357,7 @@ var MarkerModel2 = class extends Component_default {
|
|
|
77203
77357
|
} else {
|
|
77204
77358
|
markerModel._mergeOption(markerOpt, ecModel, true);
|
|
77205
77359
|
}
|
|
77206
|
-
|
|
77360
|
+
inner19(seriesModel)[componentType] = markerModel;
|
|
77207
77361
|
}, this);
|
|
77208
77362
|
}
|
|
77209
77363
|
}
|
|
@@ -77228,7 +77382,7 @@ var MarkerModel2 = class extends Component_default {
|
|
|
77228
77382
|
this._data = data;
|
|
77229
77383
|
}
|
|
77230
77384
|
static getMarkerModelFromSeries(seriesModel, componentType) {
|
|
77231
|
-
return
|
|
77385
|
+
return inner19(seriesModel)[componentType];
|
|
77232
77386
|
}
|
|
77233
77387
|
};
|
|
77234
77388
|
var MarkerModel = MarkerModel2;
|
|
@@ -77387,7 +77541,7 @@ function numCalculate(data, valueDataDim, type) {
|
|
|
77387
77541
|
}
|
|
77388
77542
|
|
|
77389
77543
|
// src/component/marker/MarkerView.ts
|
|
77390
|
-
var
|
|
77544
|
+
var inner20 = makeInner();
|
|
77391
77545
|
var MarkerView2 = class extends Component_default2 {
|
|
77392
77546
|
constructor() {
|
|
77393
77547
|
super(...arguments);
|
|
@@ -77399,18 +77553,18 @@ var MarkerView2 = class extends Component_default2 {
|
|
|
77399
77553
|
render(markerModel, ecModel, api2) {
|
|
77400
77554
|
const markerGroupMap = this.markerGroupMap;
|
|
77401
77555
|
markerGroupMap.each(function(item) {
|
|
77402
|
-
|
|
77556
|
+
inner20(item).keep = false;
|
|
77403
77557
|
});
|
|
77404
77558
|
ecModel.eachSeries((seriesModel) => {
|
|
77405
77559
|
const markerModel2 = MarkerModel_default.getMarkerModelFromSeries(seriesModel, this.type);
|
|
77406
77560
|
markerModel2 && this.renderSeries(seriesModel, markerModel2, ecModel, api2);
|
|
77407
77561
|
});
|
|
77408
77562
|
markerGroupMap.each((item) => {
|
|
77409
|
-
!
|
|
77563
|
+
!inner20(item).keep && this.group.remove(item.group);
|
|
77410
77564
|
});
|
|
77411
77565
|
}
|
|
77412
77566
|
markKeep(drawGroup) {
|
|
77413
|
-
|
|
77567
|
+
inner20(drawGroup).keep = true;
|
|
77414
77568
|
}
|
|
77415
77569
|
toggleBlurSeries(seriesModelList, isBlur) {
|
|
77416
77570
|
each(seriesModelList, (seriesModel) => {
|
|
@@ -77609,7 +77763,7 @@ MarkLineModel.defaultOption = {
|
|
|
77609
77763
|
var MarkLineModel_default = MarkLineModel;
|
|
77610
77764
|
|
|
77611
77765
|
// src/component/marker/MarkLineView.ts
|
|
77612
|
-
var
|
|
77766
|
+
var inner21 = makeInner();
|
|
77613
77767
|
var markLineTransform = function(seriesModel, coordSys, mlModel, item) {
|
|
77614
77768
|
const data = seriesModel.getData();
|
|
77615
77769
|
let itemArray;
|
|
@@ -77730,8 +77884,8 @@ var MarkLineView2 = class extends MarkerView_default {
|
|
|
77730
77884
|
const mlModel = MarkerModel_default.getMarkerModelFromSeries(seriesModel, "markLine");
|
|
77731
77885
|
if (mlModel) {
|
|
77732
77886
|
const mlData = mlModel.getData();
|
|
77733
|
-
const fromData =
|
|
77734
|
-
const toData =
|
|
77887
|
+
const fromData = inner21(mlModel).from;
|
|
77888
|
+
const toData = inner21(mlModel).to;
|
|
77735
77889
|
fromData.each(function(idx) {
|
|
77736
77890
|
updateSingleMarkerEndLayout(fromData, idx, true, seriesModel, api2);
|
|
77737
77891
|
updateSingleMarkerEndLayout(toData, idx, false, seriesModel, api2);
|
|
@@ -77757,8 +77911,8 @@ var MarkLineView2 = class extends MarkerView_default {
|
|
|
77757
77911
|
const fromData = mlData.from;
|
|
77758
77912
|
const toData = mlData.to;
|
|
77759
77913
|
const lineData = mlData.line;
|
|
77760
|
-
|
|
77761
|
-
|
|
77914
|
+
inner21(mlModel).from = fromData;
|
|
77915
|
+
inner21(mlModel).to = toData;
|
|
77762
77916
|
mlModel.setData(lineData);
|
|
77763
77917
|
let symbolType = mlModel.get("symbol");
|
|
77764
77918
|
let symbolSize = mlModel.get("symbolSize");
|
|
@@ -77920,7 +78074,7 @@ MarkAreaModel.defaultOption = {
|
|
|
77920
78074
|
var MarkAreaModel_default = MarkAreaModel;
|
|
77921
78075
|
|
|
77922
78076
|
// src/component/marker/MarkAreaView.ts
|
|
77923
|
-
var
|
|
78077
|
+
var inner22 = makeInner();
|
|
77924
78078
|
var markAreaTransform = function(seriesModel, coordSys, maModel, item) {
|
|
77925
78079
|
const item0 = item[0];
|
|
77926
78080
|
const item1 = item[1];
|
|
@@ -78090,7 +78244,7 @@ var MarkAreaView2 = class extends MarkerView_default {
|
|
|
78090
78244
|
}
|
|
78091
78245
|
areaData.setItemVisual(idx, "style", style);
|
|
78092
78246
|
});
|
|
78093
|
-
areaData.diff(
|
|
78247
|
+
areaData.diff(inner22(polygonGroup).data).add(function(idx) {
|
|
78094
78248
|
const layout18 = areaData.getItemLayout(idx);
|
|
78095
78249
|
if (!layout18.allClipped) {
|
|
78096
78250
|
const polygon = new Polygon_default({
|
|
@@ -78102,7 +78256,7 @@ var MarkAreaView2 = class extends MarkerView_default {
|
|
|
78102
78256
|
polygonGroup.group.add(polygon);
|
|
78103
78257
|
}
|
|
78104
78258
|
}).update(function(newIdx, oldIdx) {
|
|
78105
|
-
let polygon =
|
|
78259
|
+
let polygon = inner22(polygonGroup).data.getItemGraphicEl(oldIdx);
|
|
78106
78260
|
const layout18 = areaData.getItemLayout(newIdx);
|
|
78107
78261
|
if (!layout18.allClipped) {
|
|
78108
78262
|
if (polygon) {
|
|
@@ -78124,7 +78278,7 @@ var MarkAreaView2 = class extends MarkerView_default {
|
|
|
78124
78278
|
polygonGroup.group.remove(polygon);
|
|
78125
78279
|
}
|
|
78126
78280
|
}).remove(function(idx) {
|
|
78127
|
-
const polygon =
|
|
78281
|
+
const polygon = inner22(polygonGroup).data.getItemGraphicEl(idx);
|
|
78128
78282
|
polygonGroup.group.remove(polygon);
|
|
78129
78283
|
}).execute();
|
|
78130
78284
|
areaData.eachItemGraphicEl(function(polygon, idx) {
|
|
@@ -78141,7 +78295,7 @@ var MarkAreaView2 = class extends MarkerView_default {
|
|
|
78141
78295
|
toggleHoverEmphasis(polygon, null, null, itemModel.get(["emphasis", "disabled"]));
|
|
78142
78296
|
getECData(polygon).dataModel = maModel;
|
|
78143
78297
|
});
|
|
78144
|
-
|
|
78298
|
+
inner22(polygonGroup).data = areaData;
|
|
78145
78299
|
polygonGroup.group.silent = maModel.get("silent") || seriesModel.get("silent");
|
|
78146
78300
|
}
|
|
78147
78301
|
};
|
|
@@ -78378,7 +78532,7 @@ var markerTypeCalculator2 = {
|
|
|
78378
78532
|
return markerTypeCalculator2.last(item, seriesModel, backgroundColor2);
|
|
78379
78533
|
}
|
|
78380
78534
|
};
|
|
78381
|
-
var
|
|
78535
|
+
var inner23 = makeInner();
|
|
78382
78536
|
var MarkLabelView2 = class extends Component_default2 {
|
|
78383
78537
|
constructor() {
|
|
78384
78538
|
super(...arguments);
|
|
@@ -78497,8 +78651,8 @@ var MarkLabelView2 = class extends Component_default2 {
|
|
|
78497
78651
|
this._labelCountDown(item, countDownTextEl, key);
|
|
78498
78652
|
}
|
|
78499
78653
|
}
|
|
78500
|
-
|
|
78501
|
-
|
|
78654
|
+
inner23(el).yAxisIndex = yAxisModel.index;
|
|
78655
|
+
inner23(el).isSort = item.showName || showCountDown;
|
|
78502
78656
|
});
|
|
78503
78657
|
markerGroupMapBySeries.set(seriesName, markerGroupMap);
|
|
78504
78658
|
});
|
|
@@ -78598,11 +78752,11 @@ var MarkLabelView2 = class extends Component_default2 {
|
|
|
78598
78752
|
el = createText({gridRect, position: position2, option, ecModel, y, offset, fontSize});
|
|
78599
78753
|
graphLabelGroup.add(el);
|
|
78600
78754
|
graphicLabelElMap.set(option.id, el);
|
|
78601
|
-
|
|
78755
|
+
inner23(el).yAxisIndex = yAxisModel.index;
|
|
78602
78756
|
}
|
|
78603
|
-
|
|
78604
|
-
|
|
78605
|
-
|
|
78757
|
+
inner23(el).originalValue = option.y;
|
|
78758
|
+
inner23(el).isSort = true;
|
|
78759
|
+
inner23(el).style = style;
|
|
78606
78760
|
});
|
|
78607
78761
|
});
|
|
78608
78762
|
});
|
|
@@ -78611,16 +78765,16 @@ var MarkLabelView2 = class extends Component_default2 {
|
|
|
78611
78765
|
const graphicLabelElMap = this._graphicLabelElMap;
|
|
78612
78766
|
const yAxisModels = ecModel.queryComponents({mainType: "yAxis"});
|
|
78613
78767
|
graphicLabelElMap.each((el) => {
|
|
78614
|
-
const yAxisModel = yAxisModels[
|
|
78768
|
+
const yAxisModel = yAxisModels[inner23(el).yAxisIndex].axis;
|
|
78615
78769
|
if (!yAxisModel) {
|
|
78616
78770
|
return;
|
|
78617
78771
|
}
|
|
78618
78772
|
const gridRect = yAxisModel.grid.getRect();
|
|
78619
78773
|
const position2 = yAxisModel.position;
|
|
78620
|
-
const y = yAxisModel.toGlobalCoord(yAxisModel.dataToCoord(
|
|
78774
|
+
const y = yAxisModel.toGlobalCoord(yAxisModel.dataToCoord(inner23(el).originalValue));
|
|
78621
78775
|
const offset = yAxisModel.model.get("offset") || 0;
|
|
78622
78776
|
const formatter = yAxisModel.model.get(["axisLabel", "formatter"]);
|
|
78623
|
-
let style =
|
|
78777
|
+
let style = inner23(el).style;
|
|
78624
78778
|
if (yAxisModel.scale.type === "percentage") {
|
|
78625
78779
|
const formatLabel2 = yAxisModel.scale.getLabel({value: +style.text});
|
|
78626
78780
|
style = Object.assign({}, style, {text: formatLabel2});
|
|
@@ -78663,8 +78817,8 @@ var MarkLabelView2 = class extends Component_default2 {
|
|
|
78663
78817
|
const markerGroupMapBySeries = this.markerGroupMapBySeries;
|
|
78664
78818
|
markerGroupMapBySeries.each((markerGroupMap) => {
|
|
78665
78819
|
markerGroupMap.each((item) => {
|
|
78666
|
-
const yAxisId =
|
|
78667
|
-
const isSort =
|
|
78820
|
+
const yAxisId = inner23(item).yAxisIndex;
|
|
78821
|
+
const isSort = inner23(item).isSort;
|
|
78668
78822
|
if (item.ignore || !isSort) {
|
|
78669
78823
|
return;
|
|
78670
78824
|
}
|
|
@@ -78674,8 +78828,8 @@ var MarkLabelView2 = class extends Component_default2 {
|
|
|
78674
78828
|
});
|
|
78675
78829
|
});
|
|
78676
78830
|
this._graphicLabelElMap.each((item) => {
|
|
78677
|
-
const yAxisId =
|
|
78678
|
-
const isSort =
|
|
78831
|
+
const yAxisId = inner23(item).yAxisIndex;
|
|
78832
|
+
const isSort = inner23(item).isSort;
|
|
78679
78833
|
if (item.ignore || !isSort) {
|
|
78680
78834
|
return;
|
|
78681
78835
|
}
|
|
@@ -78690,7 +78844,7 @@ var MarkLabelView2 = class extends Component_default2 {
|
|
|
78690
78844
|
const yAxisId = view.yAxisModel.index;
|
|
78691
78845
|
const labels = labelsByYAxisId[yAxisId] || [];
|
|
78692
78846
|
each(view.labels, (item) => {
|
|
78693
|
-
|
|
78847
|
+
inner23(item).y = item.y + 9;
|
|
78694
78848
|
labels.push(item);
|
|
78695
78849
|
});
|
|
78696
78850
|
labelsByYAxisId[yAxisId] = labels;
|
|
@@ -78709,8 +78863,8 @@ function textYChange(label, y, height) {
|
|
|
78709
78863
|
} else {
|
|
78710
78864
|
each(label.children(), (item) => {
|
|
78711
78865
|
if (item.type === "text") {
|
|
78712
|
-
if (
|
|
78713
|
-
item.attr("style", {y: y +
|
|
78866
|
+
if (inner23(item).labelType === "countDown") {
|
|
78867
|
+
item.attr("style", {y: y + inner23(item).parentHeight});
|
|
78714
78868
|
return;
|
|
78715
78869
|
}
|
|
78716
78870
|
item.attr("style", {y});
|
|
@@ -78722,20 +78876,20 @@ function labelAvoidOverlap(labels, isAvoidOverlap, marginTop = 0) {
|
|
|
78722
78876
|
if (labels.length === 0) {
|
|
78723
78877
|
return;
|
|
78724
78878
|
}
|
|
78725
|
-
labels.sort((a, b) =>
|
|
78879
|
+
labels.sort((a, b) => inner23(a).y - inner23(b).y);
|
|
78726
78880
|
const height = labels[0].isGroup ? labels[0].children().find((item) => item.type === "text").getBoundingRect().height : labels[0].getBoundingRect().height;
|
|
78727
78881
|
const sortYbyId = {};
|
|
78728
78882
|
const offestY = height / 2;
|
|
78729
78883
|
for (let i = 0; i < labels.length; i++) {
|
|
78730
78884
|
const currentLabel = labels[i];
|
|
78731
|
-
let currentLabelY =
|
|
78885
|
+
let currentLabelY = inner23(currentLabel).y;
|
|
78732
78886
|
if (i === 0 || !isAvoidOverlap) {
|
|
78733
78887
|
textYChange(currentLabel, currentLabelY - offestY, height);
|
|
78734
78888
|
continue;
|
|
78735
78889
|
}
|
|
78736
78890
|
const prevLabel = labels[i - 1];
|
|
78737
|
-
const prevLabelY = sortYbyId[prevLabel.id] ??
|
|
78738
|
-
const prevHeight =
|
|
78891
|
+
const prevLabelY = sortYbyId[prevLabel.id] ?? inner23(prevLabel).y;
|
|
78892
|
+
const prevHeight = inner23(prevLabel).showCountDown ? height * 2 + marginTop - 1 : height + marginTop;
|
|
78739
78893
|
if (prevLabelY > currentLabelY || Math.abs(currentLabelY - prevLabelY) < prevHeight) {
|
|
78740
78894
|
currentLabelY = prevLabelY + prevHeight;
|
|
78741
78895
|
}
|
|
@@ -78762,7 +78916,7 @@ function createText({option, gridRect, position: position2, ecModel, y, offset,
|
|
|
78762
78916
|
z: 101,
|
|
78763
78917
|
zlevel
|
|
78764
78918
|
});
|
|
78765
|
-
|
|
78919
|
+
inner23(textEl).y = y;
|
|
78766
78920
|
return textEl;
|
|
78767
78921
|
}
|
|
78768
78922
|
function updateText({option, gridRect, position: position2, ecModel, el, y, offset, fontSize}) {
|
|
@@ -78773,7 +78927,7 @@ function updateText({option, gridRect, position: position2, ecModel, el, y, offs
|
|
|
78773
78927
|
el.x = x;
|
|
78774
78928
|
el.y = y;
|
|
78775
78929
|
el.attr("style", fontSize ? Object.assign(style, {fontSize, padding: getPaddingByStyle(fontSize, style.borderWidth)}) : style);
|
|
78776
|
-
|
|
78930
|
+
inner23(el).y = y;
|
|
78777
78931
|
}
|
|
78778
78932
|
function createLabel({x, y, labelData, markerModel, gridRect, position: position2, labelTextStyle = {}, fontSize}) {
|
|
78779
78933
|
const {zlevel} = markerModel.option;
|
|
@@ -78825,10 +78979,10 @@ function createLabel({x, y, labelData, markerModel, gridRect, position: position
|
|
|
78825
78979
|
z: 100,
|
|
78826
78980
|
ignore: !showLine
|
|
78827
78981
|
});
|
|
78828
|
-
|
|
78829
|
-
|
|
78830
|
-
|
|
78831
|
-
|
|
78982
|
+
inner23(lineEl).labelType = "line";
|
|
78983
|
+
inner23(textNameEl).labelType = "nameLabel";
|
|
78984
|
+
inner23(textEl).labelType = "textLabel";
|
|
78985
|
+
inner23(group).y = labelY;
|
|
78832
78986
|
group.add(lineEl);
|
|
78833
78987
|
group.add(textEl);
|
|
78834
78988
|
group.add(textNameEl);
|
|
@@ -78847,9 +79001,9 @@ function createLabel({x, y, labelData, markerModel, gridRect, position: position
|
|
|
78847
79001
|
zlevel,
|
|
78848
79002
|
ignore: !show
|
|
78849
79003
|
});
|
|
78850
|
-
|
|
78851
|
-
|
|
78852
|
-
|
|
79004
|
+
inner23(group).showCountDown = show;
|
|
79005
|
+
inner23(countDownEl).labelType = "countDown";
|
|
79006
|
+
inner23(countDownEl).parentHeight = offsetY;
|
|
78853
79007
|
group.add(countDownEl);
|
|
78854
79008
|
}
|
|
78855
79009
|
return group;
|
|
@@ -78871,9 +79025,9 @@ function updateLabel({x, y, labelData, markerModel, gridRect, position: position
|
|
|
78871
79025
|
const textElWidth = textRect.width + paddings[1] + paddings[3];
|
|
78872
79026
|
const textElx = isLeft ? x - textElWidth - borderWidth - 1 : x + borderWidth;
|
|
78873
79027
|
const labelY = y;
|
|
78874
|
-
|
|
79028
|
+
inner23(el).y = labelY;
|
|
78875
79029
|
each(el.children(), (element) => {
|
|
78876
|
-
const labelType =
|
|
79030
|
+
const labelType = inner23(element).labelType;
|
|
78877
79031
|
switch (labelType) {
|
|
78878
79032
|
case "line":
|
|
78879
79033
|
if (!showLine) {
|
|
@@ -78919,13 +79073,13 @@ function updateLabel({x, y, labelData, markerModel, gridRect, position: position
|
|
|
78919
79073
|
case "countDown":
|
|
78920
79074
|
if (!countDown.show || countDown.value <= 0) {
|
|
78921
79075
|
element.ignore = true;
|
|
78922
|
-
|
|
78923
|
-
|
|
79076
|
+
inner23(el).showCountDown = false;
|
|
79077
|
+
inner23(element).parentHeight = 0;
|
|
78924
79078
|
return;
|
|
78925
79079
|
}
|
|
78926
79080
|
const offsetY = showName ? textRect.height + paddings[0] + paddings[2] - 1 : 0;
|
|
78927
|
-
|
|
78928
|
-
|
|
79081
|
+
inner23(el).showCountDown = true;
|
|
79082
|
+
inner23(element).parentHeight = offsetY;
|
|
78929
79083
|
const fill = textStyle.fill === "#ffffff" ? "rgba(255,255,255,0.8)" : "rgba(0,0,0,0.8)";
|
|
78930
79084
|
element.attr("style", Object.assign({
|
|
78931
79085
|
text: countDownText,
|
|
@@ -80164,9 +80318,9 @@ var KineticAnimation = class {
|
|
|
80164
80318
|
};
|
|
80165
80319
|
|
|
80166
80320
|
// src/component/dataZoom/roams.ts
|
|
80167
|
-
var
|
|
80321
|
+
var inner24 = makeInner();
|
|
80168
80322
|
function setViewInfoToCoordSysRecord(api2, dataZoomModel, getRange) {
|
|
80169
|
-
|
|
80323
|
+
inner24(api2).coordSysRecordMap.each(function(coordSysRecord) {
|
|
80170
80324
|
const dzInfo = coordSysRecord.dataZoomInfoMap.get(dataZoomModel.uid);
|
|
80171
80325
|
if (dzInfo) {
|
|
80172
80326
|
dzInfo.getRange = getRange;
|
|
@@ -80174,7 +80328,7 @@ function setViewInfoToCoordSysRecord(api2, dataZoomModel, getRange) {
|
|
|
80174
80328
|
});
|
|
80175
80329
|
}
|
|
80176
80330
|
function disposeCoordSysRecordIfNeeded(api2, dataZoomModel) {
|
|
80177
|
-
const coordSysRecordMap =
|
|
80331
|
+
const coordSysRecordMap = inner24(api2).coordSysRecordMap;
|
|
80178
80332
|
const coordSysKeyArr = coordSysRecordMap.keys();
|
|
80179
80333
|
for (let i = 0; i < coordSysKeyArr.length; i++) {
|
|
80180
80334
|
const coordSysKey = coordSysKeyArr[i];
|
|
@@ -80345,7 +80499,7 @@ function mergeControllerParams(dataZoomInfoMap) {
|
|
|
80345
80499
|
}
|
|
80346
80500
|
function installDataZoomRoamProcessor(registers) {
|
|
80347
80501
|
registers.registerProcessor(registers.PRIORITY.PROCESSOR.FILTER, function(ecModel, api2) {
|
|
80348
|
-
const apiInner =
|
|
80502
|
+
const apiInner = inner24(api2);
|
|
80349
80503
|
const coordSysRecordMap = apiInner.coordSysRecordMap || (apiInner.coordSysRecordMap = createHashMap());
|
|
80350
80504
|
coordSysRecordMap.each(function(coordSysRecord) {
|
|
80351
80505
|
coordSysRecord.dataZoomInfoMap = null;
|
|
@@ -83101,7 +83255,7 @@ var DEFAULT_OPTION = {
|
|
|
83101
83255
|
show: false
|
|
83102
83256
|
}
|
|
83103
83257
|
};
|
|
83104
|
-
var
|
|
83258
|
+
var inner25 = makeInner();
|
|
83105
83259
|
var decalPaletteScope = {};
|
|
83106
83260
|
function ariaVisual(ecModel, api2) {
|
|
83107
83261
|
const ariaModel = ecModel.getModel("aria");
|
|
@@ -83127,7 +83281,7 @@ function ariaVisual(ecModel, api2) {
|
|
|
83127
83281
|
decalScope = {};
|
|
83128
83282
|
paletteScopeGroupByType.set(seriesModel.type, decalScope);
|
|
83129
83283
|
}
|
|
83130
|
-
|
|
83284
|
+
inner25(seriesModel).scope = decalScope;
|
|
83131
83285
|
});
|
|
83132
83286
|
ecModel.eachRawSeries((seriesModel) => {
|
|
83133
83287
|
if (ecModel.isSeriesFiltered(seriesModel)) {
|
|
@@ -83141,7 +83295,7 @@ function ariaVisual(ecModel, api2) {
|
|
|
83141
83295
|
if (!seriesModel.isColorBySeries()) {
|
|
83142
83296
|
const dataAll = seriesModel.getRawData();
|
|
83143
83297
|
const idxMap = {};
|
|
83144
|
-
const decalScope =
|
|
83298
|
+
const decalScope = inner25(seriesModel).scope;
|
|
83145
83299
|
data.each(function(idx) {
|
|
83146
83300
|
const rawIdx = data.getRawIndex(idx);
|
|
83147
83301
|
idxMap[rawIdx] = idx;
|