@visactor/vchart 1.12.0 → 1.12.1
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 +104 -66
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/base/base-chart-transformer.js +2 -2
- package/cjs/chart/base/base-chart-transformer.js.map +1 -1
- package/cjs/chart/base/base-chart.js +12 -1
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/compile/compilable-base.js +2 -1
- package/cjs/compile/util.js +1 -2
- package/cjs/component/axis/polar/axis.d.ts +1 -1
- package/cjs/component/axis/polar/axis.js +11 -9
- package/cjs/component/axis/polar/axis.js.map +1 -1
- package/cjs/component/axis/polar/util/common.d.ts +4 -1
- package/cjs/component/axis/polar/util/common.js +7 -2
- package/cjs/component/axis/polar/util/common.js.map +1 -1
- package/cjs/component/brush/brush.js +1 -1
- package/cjs/component/brush/brush.js.map +1 -1
- package/cjs/component/player/player.d.ts +1 -0
- package/cjs/component/player/player.js +16 -12
- package/cjs/component/player/player.js.map +1 -1
- package/cjs/component/title/title.js +4 -2
- package/cjs/component/title/title.js.map +1 -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/add-property.js +1 -1
- package/cjs/data/transforms/add-property.js.map +1 -1
- package/cjs/data/transforms/copy-data-view.js +1 -1
- package/cjs/data/transforms/copy-data-view.js.map +1 -1
- package/cjs/data/transforms/dimension-statistics.js +1 -1
- package/cjs/data/transforms/dimension-statistics.js.map +1 -1
- package/cjs/data/transforms/stack-split.js +1 -1
- package/cjs/data/transforms/stack-split.js.map +1 -1
- package/cjs/plugin/chart/media-query/util/filter.js +5 -2
- package/cjs/plugin/chart/media-query/util/filter.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/base.js +3 -3
- package/cjs/plugin/components/tooltip-handler/base.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/dom/dom-tooltip-handler.js +1 -1
- package/cjs/plugin/components/tooltip-handler/dom/dom-tooltip-handler.js.map +1 -1
- package/cjs/series/pie/pie.js +4 -1
- package/cjs/series/pie/pie.js.map +1 -1
- package/cjs/series/progress/linear/linear.js +4 -2
- package/cjs/series/progress/linear/linear.js.map +1 -1
- package/esm/chart/base/base-chart-transformer.js +2 -2
- package/esm/chart/base/base-chart-transformer.js.map +1 -1
- package/esm/chart/base/base-chart.js +12 -1
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/compile/compilable-base.js +2 -1
- package/esm/compile/util.js +1 -2
- package/esm/component/axis/polar/axis.d.ts +1 -1
- package/esm/component/axis/polar/axis.js +11 -9
- package/esm/component/axis/polar/axis.js.map +1 -1
- package/esm/component/axis/polar/util/common.d.ts +4 -1
- package/esm/component/axis/polar/util/common.js +7 -2
- package/esm/component/axis/polar/util/common.js.map +1 -1
- package/esm/component/brush/brush.js +1 -1
- package/esm/component/brush/brush.js.map +1 -1
- package/esm/component/player/player.d.ts +1 -0
- package/esm/component/player/player.js +16 -12
- package/esm/component/player/player.js.map +1 -1
- package/esm/component/title/title.js +4 -2
- package/esm/component/title/title.js.map +1 -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/add-property.js +1 -1
- package/esm/data/transforms/add-property.js.map +1 -1
- package/esm/data/transforms/copy-data-view.js +1 -1
- package/esm/data/transforms/copy-data-view.js.map +1 -1
- package/esm/data/transforms/dimension-statistics.js +1 -1
- package/esm/data/transforms/dimension-statistics.js.map +1 -1
- package/esm/data/transforms/stack-split.js +1 -1
- package/esm/data/transforms/stack-split.js.map +1 -1
- package/esm/plugin/chart/media-query/util/filter.js +5 -2
- package/esm/plugin/chart/media-query/util/filter.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/base.js +3 -3
- package/esm/plugin/components/tooltip-handler/base.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/dom/dom-tooltip-handler.js +1 -1
- package/esm/plugin/components/tooltip-handler/dom/dom-tooltip-handler.js.map +1 -1
- package/esm/series/pie/pie.js +4 -1
- package/esm/series/pie/pie.js.map +1 -1
- package/esm/series/progress/linear/linear.js +3 -2
- package/esm/series/progress/linear/linear.js.map +1 -1
- package/package.json +7 -7
package/build/index.js
CHANGED
|
@@ -591,7 +591,7 @@
|
|
|
591
591
|
const length = objValue.length;
|
|
592
592
|
for (; ++index < length;) newValue[index] = objValue[index];
|
|
593
593
|
}
|
|
594
|
-
} else isPlainObject$1(srcValue) ? (newValue = objValue, "function" != typeof objValue && "object" == typeof objValue || (newValue = {})) : isCommon = !1;
|
|
594
|
+
} else isPlainObject$1(srcValue) ? (newValue = null != objValue ? objValue : {}, "function" != typeof objValue && "object" == typeof objValue || (newValue = {})) : isCommon = !1;
|
|
595
595
|
isCommon && baseMerge(newValue, srcValue, shallowArray, skipTargetArray), assignMergeValue(target, key, newValue);
|
|
596
596
|
}
|
|
597
597
|
function assignMergeValue(target, key, value) {
|
|
@@ -55135,7 +55135,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
55135
55135
|
if (_deep) {
|
|
55136
55136
|
return cloneDeep(d.latestData);
|
|
55137
55137
|
}
|
|
55138
|
-
return d.latestData.slice();
|
|
55138
|
+
return d.latestData && d.latestData.slice();
|
|
55139
55139
|
}
|
|
55140
55140
|
const copyDataView = (data, options) => {
|
|
55141
55141
|
if (data.length === 0) {
|
|
@@ -60732,11 +60732,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
60732
60732
|
};
|
|
60733
60733
|
registerVChartCore();
|
|
60734
60734
|
|
|
60735
|
-
const version = "1.12.
|
|
60735
|
+
const version = "1.12.1";
|
|
60736
60736
|
|
|
60737
60737
|
const addVChartProperty = (data, op) => {
|
|
60738
60738
|
const context = op.beforeCall();
|
|
60739
|
-
data.forEach((d, i) => op.call(d, i, context));
|
|
60739
|
+
data && data.forEach((d, i) => op.call(d, i, context));
|
|
60740
60740
|
if (context.keyMap) {
|
|
60741
60741
|
context.keyMap.clear();
|
|
60742
60742
|
context.keyMap = null;
|
|
@@ -61028,11 +61028,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61028
61028
|
const isNumberField = operations.some(op => op === 'min' || op === 'max' || op === 'allValid');
|
|
61029
61029
|
let allValid = true;
|
|
61030
61030
|
fValues.length = 0;
|
|
61031
|
-
latestData
|
|
61032
|
-
|
|
61033
|
-
|
|
61034
|
-
|
|
61035
|
-
|
|
61031
|
+
latestData &&
|
|
61032
|
+
latestData.forEach((d) => {
|
|
61033
|
+
if (d) {
|
|
61034
|
+
fValues.push(d[key]);
|
|
61035
|
+
}
|
|
61036
|
+
});
|
|
61036
61037
|
const len = fValues.length;
|
|
61037
61038
|
if (isNumberField) {
|
|
61038
61039
|
nextFValues.length = 0;
|
|
@@ -67413,11 +67414,19 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67413
67414
|
}
|
|
67414
67415
|
updateComponentSpec(result) {
|
|
67415
67416
|
const componentCache = {};
|
|
67417
|
+
const checkVisibleComponents = {
|
|
67418
|
+
[ComponentTypeEnum.title]: true,
|
|
67419
|
+
[ComponentTypeEnum.brush]: true,
|
|
67420
|
+
[ComponentTypeEnum.mapLabel]: true
|
|
67421
|
+
};
|
|
67416
67422
|
this._components.forEach(c => {
|
|
67417
67423
|
var _a, _b;
|
|
67418
67424
|
if (c.type === ComponentTypeEnum.label || c.type === ComponentTypeEnum.totalLabel) {
|
|
67419
67425
|
return;
|
|
67420
67426
|
}
|
|
67427
|
+
if (checkVisibleComponents[c.type]) {
|
|
67428
|
+
checkVisibleComponents[c.type] = false;
|
|
67429
|
+
}
|
|
67421
67430
|
const compSpecKey = c.specKey || c.type;
|
|
67422
67431
|
const cmpSpec = (_a = this._spec[compSpecKey]) !== null && _a !== void 0 ? _a : {};
|
|
67423
67432
|
if (isArray$1(cmpSpec)) {
|
|
@@ -67440,6 +67449,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67440
67449
|
}
|
|
67441
67450
|
}
|
|
67442
67451
|
}
|
|
67452
|
+
Object.keys(checkVisibleComponents).forEach(type => {
|
|
67453
|
+
if (checkVisibleComponents[type]) {
|
|
67454
|
+
const compSpec = this._spec[type];
|
|
67455
|
+
const switchToVisible = isArray$1(compSpec) ? compSpec.some(entry => entry === null || entry === void 0 ? void 0 : entry.visible) : compSpec === null || compSpec === void 0 ? void 0 : compSpec.visible;
|
|
67456
|
+
if (switchToVisible) {
|
|
67457
|
+
result.reMake = true;
|
|
67458
|
+
}
|
|
67459
|
+
}
|
|
67460
|
+
});
|
|
67443
67461
|
}
|
|
67444
67462
|
updateSeriesSpec(result) {
|
|
67445
67463
|
if (this._spec.series.length !== this._series.length) {
|
|
@@ -67843,7 +67861,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67843
67861
|
transform = (constructor, specInfo, chartSpecInfo) => {
|
|
67844
67862
|
const { spec, specPath, specInfoPath, type } = specInfo;
|
|
67845
67863
|
const transformer = new constructor.transformerConstructor(Object.assign(Object.assign({}, this._option), { type }));
|
|
67846
|
-
|
|
67864
|
+
const transformResult = transformer.transformSpec(spec, chartSpec, chartSpecInfo);
|
|
67865
|
+
setProperty(chartSpecInfo, specInfoPath !== null && specInfoPath !== void 0 ? specInfoPath : specPath, Object.assign(Object.assign(Object.assign({}, specInfo), transformResult), { theme: transformer.getTheme(spec, chartSpec) }));
|
|
67847
67866
|
};
|
|
67848
67867
|
}
|
|
67849
67868
|
const currentChartSpecInfo = {};
|
|
@@ -68195,33 +68214,34 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68195
68214
|
let nextNode;
|
|
68196
68215
|
let leaf;
|
|
68197
68216
|
data.forEach(dv => {
|
|
68198
|
-
dv.latestData
|
|
68199
|
-
|
|
68200
|
-
|
|
68201
|
-
|
|
68202
|
-
|
|
68203
|
-
|
|
68204
|
-
|
|
68205
|
-
|
|
68206
|
-
|
|
68207
|
-
|
|
68217
|
+
dv.latestData &&
|
|
68218
|
+
dv.latestData.forEach((d) => {
|
|
68219
|
+
temp = result;
|
|
68220
|
+
for (let i = 0; i < fields.length; i++) {
|
|
68221
|
+
const f = fields[i];
|
|
68222
|
+
const fV = d[f];
|
|
68223
|
+
if (isNil$1(fV)) {
|
|
68224
|
+
break;
|
|
68225
|
+
}
|
|
68226
|
+
temp.groupField = f;
|
|
68227
|
+
if (!temp.nodes[fV]) {
|
|
68228
|
+
if (i === lastFieldIndex) {
|
|
68229
|
+
temp.nodes[fV] = { values: [] };
|
|
68230
|
+
}
|
|
68231
|
+
else {
|
|
68232
|
+
nextNode = { nodes: {} };
|
|
68233
|
+
temp.nodes[fV] = nextNode;
|
|
68234
|
+
}
|
|
68235
|
+
}
|
|
68208
68236
|
if (i === lastFieldIndex) {
|
|
68209
|
-
temp.nodes[fV]
|
|
68237
|
+
leaf = temp.nodes[fV];
|
|
68238
|
+
leaf.values.push(d);
|
|
68210
68239
|
}
|
|
68211
68240
|
else {
|
|
68212
|
-
|
|
68213
|
-
temp.nodes[fV] = nextNode;
|
|
68241
|
+
temp = temp.nodes[fV];
|
|
68214
68242
|
}
|
|
68215
68243
|
}
|
|
68216
|
-
|
|
68217
|
-
leaf = temp.nodes[fV];
|
|
68218
|
-
leaf.values.push(d);
|
|
68219
|
-
}
|
|
68220
|
-
else {
|
|
68221
|
-
temp = temp.nodes[fV];
|
|
68222
|
-
}
|
|
68223
|
-
}
|
|
68224
|
-
});
|
|
68244
|
+
});
|
|
68225
68245
|
});
|
|
68226
68246
|
return result;
|
|
68227
68247
|
};
|
|
@@ -73831,7 +73851,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
73831
73851
|
layoutRadius: chartSpec.layoutRadius
|
|
73832
73852
|
};
|
|
73833
73853
|
};
|
|
73834
|
-
const computeLayoutRadius = (
|
|
73854
|
+
const computeLayoutRadius = (getLayoutRadius, getLayoutRect, getCenter, getAngles) => {
|
|
73855
|
+
const layoutRadius = getLayoutRadius();
|
|
73835
73856
|
if (isNumber$1(layoutRadius)) {
|
|
73836
73857
|
return layoutRadius;
|
|
73837
73858
|
}
|
|
@@ -73840,6 +73861,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
73840
73861
|
}
|
|
73841
73862
|
const rect = getLayoutRect();
|
|
73842
73863
|
if (layoutRadius === 'auto' && rect.width > 0 && rect.height > 0) {
|
|
73864
|
+
const { startAngle = 0, endAngle = 2 * Math.PI } = getAngles();
|
|
73843
73865
|
return calculateMaxRadius(rect, getCenter(), startAngle, endAngle);
|
|
73844
73866
|
}
|
|
73845
73867
|
return Math.min(rect.width / 2, rect.height / 2);
|
|
@@ -73962,7 +73984,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
73962
73984
|
return field$2(ARC_END_ANGLE)(datum);
|
|
73963
73985
|
}
|
|
73964
73986
|
_computeLayoutRadius() {
|
|
73965
|
-
return computeLayoutRadius(this._spec.layoutRadius, this.getLayoutRect, this.getCenter, this._startAngle, this._endAngle);
|
|
73987
|
+
return computeLayoutRadius(() => this._spec.layoutRadius, this.getLayoutRect, this.getCenter, () => ({ startAngle: this._startAngle, endAngle: this._endAngle }));
|
|
73966
73988
|
}
|
|
73967
73989
|
initMarkStyle() {
|
|
73968
73990
|
const initialStyle = {
|
|
@@ -74511,6 +74533,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
74511
74533
|
const region = (_a = this.getRegions()) === null || _a === void 0 ? void 0 : _a[0];
|
|
74512
74534
|
return region ? region.getLayoutStartPoint() : pos;
|
|
74513
74535
|
};
|
|
74536
|
+
this.getCenter = () => {
|
|
74537
|
+
var _a, _b;
|
|
74538
|
+
const layoutRect = this.getRefLayoutRect();
|
|
74539
|
+
const { width, height } = layoutRect;
|
|
74540
|
+
return {
|
|
74541
|
+
x: calcLayoutNumber((_a = this._center) === null || _a === void 0 ? void 0 : _a.x, width, layoutRect, width / 2),
|
|
74542
|
+
y: calcLayoutNumber((_b = this._center) === null || _b === void 0 ? void 0 : _b.y, height, layoutRect, height / 2)
|
|
74543
|
+
};
|
|
74544
|
+
};
|
|
74514
74545
|
this.getRefLayoutRect = () => {
|
|
74515
74546
|
return this.getRegions()[0].getLayoutRect();
|
|
74516
74547
|
};
|
|
@@ -74653,15 +74684,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
74653
74684
|
angle: radian
|
|
74654
74685
|
};
|
|
74655
74686
|
}
|
|
74656
|
-
getCenter() {
|
|
74657
|
-
var _a, _b;
|
|
74658
|
-
const layoutRect = this.getRefLayoutRect();
|
|
74659
|
-
const { width, height } = layoutRect;
|
|
74660
|
-
return {
|
|
74661
|
-
x: calcLayoutNumber((_a = this._center) === null || _a === void 0 ? void 0 : _a.x, width, layoutRect, width / 2),
|
|
74662
|
-
y: calcLayoutNumber((_b = this._center) === null || _b === void 0 ? void 0 : _b.y, height, layoutRect, height / 2)
|
|
74663
|
-
};
|
|
74664
|
-
}
|
|
74665
74687
|
getOuterRadius() {
|
|
74666
74688
|
return this.computeLayoutOuterRadius();
|
|
74667
74689
|
}
|
|
@@ -74745,7 +74767,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
74745
74767
|
return undefined;
|
|
74746
74768
|
}
|
|
74747
74769
|
_computeLayoutRadius() {
|
|
74748
|
-
return computeLayoutRadius(this._spec.layoutRadius, this.getRefLayoutRect, this.getCenter, this._startAngle, this._endAngle);
|
|
74770
|
+
return computeLayoutRadius(() => this._spec.layoutRadius, this.getRefLayoutRect, this.getCenter, () => ({ startAngle: this._startAngle, endAngle: this._endAngle }));
|
|
74749
74771
|
}
|
|
74750
74772
|
computeLayoutOuterRadius() {
|
|
74751
74773
|
var _a;
|
|
@@ -76661,7 +76683,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
76661
76683
|
this._progressMark = null;
|
|
76662
76684
|
this._trackMark = null;
|
|
76663
76685
|
this._defaultProgressCustomShape = (datum, attrs, path) => {
|
|
76664
|
-
|
|
76686
|
+
var _a, _b;
|
|
76687
|
+
const cornerRadius = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.cornerRadius;
|
|
76665
76688
|
const width = isValid$1(attrs.width) ? attrs.width : attrs.x1 - attrs.x;
|
|
76666
76689
|
const height = isValid$1(attrs.height) ? attrs.height : attrs.y1 - attrs.y;
|
|
76667
76690
|
const x0 = Math.min(0, width);
|
|
@@ -76670,7 +76693,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
76670
76693
|
const y1 = Math.max(0, height);
|
|
76671
76694
|
if (cornerRadius > 0) {
|
|
76672
76695
|
let realCornerRadius = cornerRadius;
|
|
76673
|
-
if (this._spec.direction === 'vertical') {
|
|
76696
|
+
if (((_b = this._spec) === null || _b === void 0 ? void 0 : _b.direction) === 'vertical') {
|
|
76674
76697
|
realCornerRadius = Math.min(Math.abs(width / 2), cornerRadius);
|
|
76675
76698
|
if (2 * realCornerRadius > Math.abs(height)) {
|
|
76676
76699
|
const angle = Math.acos((realCornerRadius - Math.abs(height) / 2) / realCornerRadius);
|
|
@@ -94817,7 +94840,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
94817
94840
|
}
|
|
94818
94841
|
_compareSpec(spec, prevSpec) {
|
|
94819
94842
|
const result = super._compareSpec(spec, prevSpec);
|
|
94820
|
-
if ((prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.orient) !== (spec === null || spec === void 0 ? void 0 : spec.orient)) {
|
|
94843
|
+
if ((prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.orient) !== (spec === null || spec === void 0 ? void 0 : spec.orient) || (prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.visible) !== spec.visible) {
|
|
94821
94844
|
result.reMake = true;
|
|
94822
94845
|
}
|
|
94823
94846
|
result.change = true;
|
|
@@ -94869,6 +94892,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
94869
94892
|
_getTitleAttrs() {
|
|
94870
94893
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
94871
94894
|
const realWidth = Math.max(0, (_a = this._spec.width) !== null && _a !== void 0 ? _a : this.getLayoutRect().width);
|
|
94895
|
+
if (this._spec.visible === false) {
|
|
94896
|
+
return { visible: false };
|
|
94897
|
+
}
|
|
94872
94898
|
return Object.assign(Object.assign({}, pickWithout(this._spec, ['padding'])), { textType: (_b = this._spec.textType) !== null && _b !== void 0 ? _b : 'text', text: (_c = this._spec.text) !== null && _c !== void 0 ? _c : '', subtextType: (_d = this._spec.subtextType) !== null && _d !== void 0 ? _d : 'text', subtext: (_e = this._spec.subtext) !== null && _e !== void 0 ? _e : '', x: (_f = this._spec.x) !== null && _f !== void 0 ? _f : 0, y: (_g = this._spec.y) !== null && _g !== void 0 ? _g : 0, width: realWidth, height: this._spec.height, minWidth: this._spec.minWidth, maxWidth: this._spec.maxWidth, minHeight: this._spec.minHeight, maxHeight: this._spec.maxHeight, padding: this._spec.innerPadding, align: (_h = this._spec.align) !== null && _h !== void 0 ? _h : 'left', verticalAlign: (_j = this._spec.verticalAlign) !== null && _j !== void 0 ? _j : 'top', textStyle: Object.assign({ width: realWidth }, this._spec.textStyle), subtextStyle: Object.assign({ width: realWidth }, this._spec.subtextStyle) });
|
|
94873
94899
|
}
|
|
94874
94900
|
_createOrUpdateTitleComponent(attrs) {
|
|
@@ -95360,19 +95386,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
95360
95386
|
});
|
|
95361
95387
|
this._playerComponent.addEventListener(PlayerEventEnum.change, (e) => {
|
|
95362
95388
|
const { index } = e.detail;
|
|
95363
|
-
|
|
95364
|
-
array(spec.data).forEach(data => {
|
|
95365
|
-
var _a, _b;
|
|
95366
|
-
(_b = (_a = this._option) === null || _a === void 0 ? void 0 : _a.globalInstance) === null || _b === void 0 ? void 0 : _b.updateData(data.id, data.values);
|
|
95367
|
-
});
|
|
95368
|
-
this.event.emit(ChartEvent.playerChange, {
|
|
95369
|
-
model: this,
|
|
95370
|
-
value: {
|
|
95371
|
-
spec: spec,
|
|
95372
|
-
index: index,
|
|
95373
|
-
specs: this._specs
|
|
95374
|
-
}
|
|
95375
|
-
});
|
|
95389
|
+
this.changePlayerIndex(index);
|
|
95376
95390
|
});
|
|
95377
95391
|
this._playerComponent.addEventListener(PlayerEventEnum.backward, (e) => {
|
|
95378
95392
|
const { index } = e.detail;
|
|
@@ -95546,6 +95560,21 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
95546
95560
|
}
|
|
95547
95561
|
return rect.height - this._height;
|
|
95548
95562
|
}
|
|
95563
|
+
changePlayerIndex(index) {
|
|
95564
|
+
const spec = this._specs[index];
|
|
95565
|
+
array(spec.data).forEach(data => {
|
|
95566
|
+
var _a, _b;
|
|
95567
|
+
(_b = (_a = this._option) === null || _a === void 0 ? void 0 : _a.globalInstance) === null || _b === void 0 ? void 0 : _b.updateData(data.id, data.values);
|
|
95568
|
+
});
|
|
95569
|
+
this.event.emit(ChartEvent.playerChange, {
|
|
95570
|
+
model: this,
|
|
95571
|
+
value: {
|
|
95572
|
+
spec: spec,
|
|
95573
|
+
index: index,
|
|
95574
|
+
specs: this._specs
|
|
95575
|
+
}
|
|
95576
|
+
});
|
|
95577
|
+
}
|
|
95549
95578
|
}
|
|
95550
95579
|
Player.specKey = 'player';
|
|
95551
95580
|
Player.type = ComponentTypeEnum.player;
|
|
@@ -96723,7 +96752,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
96723
96752
|
const endPercent = dataZoom.dataToStatePoint(endValue);
|
|
96724
96753
|
const newStartPercent = this._stateClamp(startPercent - axisRangeExpand);
|
|
96725
96754
|
const newEndPercent = this._stateClamp(endPercent + axisRangeExpand);
|
|
96726
|
-
dataZoom.setStartAndEnd(newStartPercent, newEndPercent,
|
|
96755
|
+
dataZoom.setStartAndEnd(Math.min(newStartPercent, newEndPercent), Math.max(newStartPercent, newEndPercent), [
|
|
96756
|
+
'percent',
|
|
96757
|
+
'percent'
|
|
96758
|
+
]);
|
|
96727
96759
|
this._zoomRecord.push({
|
|
96728
96760
|
operateComponent: dataZoom,
|
|
96729
96761
|
start: newStartPercent,
|
|
@@ -98473,7 +98505,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98473
98505
|
return 0;
|
|
98474
98506
|
};
|
|
98475
98507
|
this._getActualTooltipPosition = (actualTooltip, params, tooltipBoxSize) => {
|
|
98476
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
98508
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
98477
98509
|
const event = params.event;
|
|
98478
98510
|
const { tooltipSpec } = params;
|
|
98479
98511
|
const firstDimensionInfo = (_a = params.dimensionInfo) === null || _a === void 0 ? void 0 : _a[0];
|
|
@@ -98509,8 +98541,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98509
98541
|
containerSize.width = window.innerWidth;
|
|
98510
98542
|
containerSize.height = window.innerHeight;
|
|
98511
98543
|
if (!isCanvas) {
|
|
98512
|
-
tooltipParentElementRect = (_f = tooltipParentElement === null || tooltipParentElement === void 0 ? void 0 : tooltipParentElement.getBoundingClientRect()) !== null &&
|
|
98513
|
-
const chartElement = ((
|
|
98544
|
+
tooltipParentElementRect = (_g = (_f = tooltipParentElement === null || tooltipParentElement === void 0 ? void 0 : tooltipParentElement.getBoundingClientRect) === null || _f === void 0 ? void 0 : _f.call(tooltipParentElement)) !== null && _g !== void 0 ? _g : invalidPosition;
|
|
98545
|
+
const chartElement = ((_h = this._compiler.getCanvas()) !== null && _h !== void 0 ? _h : this._chartContainer);
|
|
98514
98546
|
const chartElementRect = chartElement === null || chartElement === void 0 ? void 0 : chartElement.getBoundingClientRect();
|
|
98515
98547
|
relativePosOffset = {
|
|
98516
98548
|
x: chartElementRect.x - tooltipParentElementRect.x,
|
|
@@ -99845,7 +99877,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
99845
99877
|
initEl() {
|
|
99846
99878
|
const tooltipSpec = this._component.getSpec();
|
|
99847
99879
|
const parentElement = tooltipSpec.parentElement;
|
|
99848
|
-
if (domDocument && parentElement) {
|
|
99880
|
+
if (domDocument && parentElement && parentElement.children && parentElement.children.length) {
|
|
99849
99881
|
for (let i = 0; i < parentElement.children.length; i++) {
|
|
99850
99882
|
if (parentElement.children[i].classList.contains(TOOLTIP_CONTAINER_EL_CLASS_NAME)) {
|
|
99851
99883
|
this._container = parentElement.children[i];
|
|
@@ -100615,9 +100647,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
100615
100647
|
const infoList = array((_f = (_e = chartSpecInfo.component) === null || _e === void 0 ? void 0 : _e[specKey]) !== null && _f !== void 0 ? _f : []);
|
|
100616
100648
|
(_h = array((_g = chartSpec[specKey]) !== null && _g !== void 0 ? _g : [])) === null || _h === void 0 ? void 0 : _h.forEach((componentSpec, i) => {
|
|
100617
100649
|
const specInfo = infoList[i];
|
|
100618
|
-
if (specInfo.type === filterType) {
|
|
100650
|
+
if (specInfo && specInfo.type === filterType) {
|
|
100619
100651
|
result.modelInfo.push(Object.assign(Object.assign({}, specInfo), { spec: componentSpec }));
|
|
100620
100652
|
}
|
|
100653
|
+
else if (componentSpec && componentSpec.visible === false) {
|
|
100654
|
+
result.modelInfo.push({
|
|
100655
|
+
type: filterType,
|
|
100656
|
+
spec: componentSpec
|
|
100657
|
+
});
|
|
100658
|
+
}
|
|
100621
100659
|
});
|
|
100622
100660
|
}
|
|
100623
100661
|
else {
|