@visactor/vchart 2.0.7-alpha.2 → 2.0.7-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es5/index.js +1 -1
- package/build/index.es.js +1058 -564
- package/build/index.js +1058 -563
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/histogram/histogram.js +2 -2
- package/cjs/chart/histogram/histogram.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/series/index.d.ts +2 -2
- package/cjs/series/index.js +6 -1
- package/cjs/series/index.js.map +1 -1
- package/esm/chart/histogram/histogram.js +4 -1
- package/esm/chart/histogram/histogram.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/series/index.d.ts +2 -2
- package/esm/series/index.js +2 -2
- package/esm/series/index.js.map +1 -1
- package/package.json +12 -12
package/build/index.es.js
CHANGED
|
@@ -1036,43 +1036,187 @@ const extent$2 = (array, func) => {
|
|
|
1036
1036
|
return [min, max];
|
|
1037
1037
|
};
|
|
1038
1038
|
|
|
1039
|
+
function invNorm(p) {
|
|
1040
|
+
if (p <= 0 || p >= 1) return 0;
|
|
1041
|
+
const c1 = -.00778489400243029,
|
|
1042
|
+
c2 = -.322396458041136,
|
|
1043
|
+
c3 = -2.40075827716184,
|
|
1044
|
+
c4 = -2.54973253934373,
|
|
1045
|
+
c5 = 4.37466414146497,
|
|
1046
|
+
c6 = 2.93816398269878,
|
|
1047
|
+
d1 = .00778469570904146,
|
|
1048
|
+
d2 = .32246712907004,
|
|
1049
|
+
d3 = 2.445134137143,
|
|
1050
|
+
d4 = 3.75440866190742;
|
|
1051
|
+
let q, r;
|
|
1052
|
+
return p < .02425 ? (q = Math.sqrt(-2 * Math.log(p)), (((((c1 * q + c2) * q + c3) * q + c4) * q + c5) * q + c6) / ((((d1 * q + d2) * q + d3) * q + d4) * q + 1)) : p <= .97575 ? (q = p - .5, r = q * q, (((((-39.6968302866538 * r + 220.946098424521) * r - 275.928510446969) * r + 138.357751867269) * r - 30.6647980661472) * r + 2.50662827745924) * q / (((((-54.4760987982241 * r + 161.585836858041) * r - 155.698979859887) * r + 66.8013118877197) * r - 13.2806815528857) * r + 1)) : (q = Math.sqrt(-2 * Math.log(1 - p)), -(((((c1 * q + c2) * q + c3) * q + c4) * q + c5) * q + c6) / ((((d1 * q + d2) * q + d3) * q + d4) * q + 1));
|
|
1053
|
+
}
|
|
1054
|
+
function computeLinearCIComponents(data, x, y, predict) {
|
|
1055
|
+
let min = 1 / 0,
|
|
1056
|
+
max = -1 / 0,
|
|
1057
|
+
n = 0,
|
|
1058
|
+
sumX = 0;
|
|
1059
|
+
for (let i = 0; i < data.length; i++) {
|
|
1060
|
+
const d = data[i];
|
|
1061
|
+
let dx = x(d),
|
|
1062
|
+
dy = y(d);
|
|
1063
|
+
!isNil$1(dx) && (dx = +dx) >= dx && !isNil$1(dy) && (dy = +dy) >= dy && (dx < min && (min = dx), dx > max && (max = dx), n++, sumX += dx);
|
|
1064
|
+
}
|
|
1065
|
+
if (0 === n) return {
|
|
1066
|
+
min: min,
|
|
1067
|
+
max: max,
|
|
1068
|
+
n: n,
|
|
1069
|
+
X: 0,
|
|
1070
|
+
SSE: 0,
|
|
1071
|
+
Sxx: 0
|
|
1072
|
+
};
|
|
1073
|
+
const X = sumX / n;
|
|
1074
|
+
let SSE = 0,
|
|
1075
|
+
Sxx = 0;
|
|
1076
|
+
for (let i = 0; i < data.length; i++) {
|
|
1077
|
+
const d = data[i];
|
|
1078
|
+
let dx = x(d),
|
|
1079
|
+
dy = y(d);
|
|
1080
|
+
if (!isNil$1(dx) && (dx = +dx) >= dx && !isNil$1(dy) && (dy = +dy) >= dy) {
|
|
1081
|
+
const r = dy - predict(dx);
|
|
1082
|
+
SSE += r * r;
|
|
1083
|
+
const dxc = dx - X;
|
|
1084
|
+
Sxx += dxc * dxc;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
return {
|
|
1088
|
+
min: min,
|
|
1089
|
+
max: max,
|
|
1090
|
+
n: n,
|
|
1091
|
+
X: X,
|
|
1092
|
+
SSE: SSE,
|
|
1093
|
+
Sxx: Sxx
|
|
1094
|
+
};
|
|
1095
|
+
}
|
|
1096
|
+
function stdErrorsAt(px, comps) {
|
|
1097
|
+
const {
|
|
1098
|
+
n: n,
|
|
1099
|
+
X: X,
|
|
1100
|
+
Sxx: Sxx,
|
|
1101
|
+
SSE: SSE
|
|
1102
|
+
} = comps,
|
|
1103
|
+
s2 = n > 2 ? SSE / (n - 2) : 0;
|
|
1104
|
+
return {
|
|
1105
|
+
seMean: Sxx > 0 ? Math.sqrt(s2 * (1 / n + (px - X) * (px - X) / Sxx)) : Math.sqrt(s2 / n),
|
|
1106
|
+
sePred: Math.sqrt(s2 * (1 + 1 / n + (Sxx > 0 ? (px - X) * (px - X) / Sxx : 0)))
|
|
1107
|
+
};
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1039
1110
|
function ordinaryLeastSquares(uX, uY, uXY, uX2) {
|
|
1040
|
-
const
|
|
1041
|
-
|
|
1042
|
-
|
|
1111
|
+
const denom = uX2 - uX * uX;
|
|
1112
|
+
if (Math.abs(denom) < Number.EPSILON) return {
|
|
1113
|
+
a: uY,
|
|
1114
|
+
b: 0
|
|
1115
|
+
};
|
|
1116
|
+
const b = (uXY - uX * uY) / denom;
|
|
1117
|
+
return {
|
|
1118
|
+
a: uY - b * uX,
|
|
1119
|
+
b: b
|
|
1120
|
+
};
|
|
1043
1121
|
}
|
|
1044
1122
|
function visitPoints(data, x, y, callback) {
|
|
1045
|
-
let
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
}
|
|
1123
|
+
for (let i = 0; i < data.length; i++) {
|
|
1124
|
+
const d = data[i];
|
|
1125
|
+
let xi = x(d),
|
|
1126
|
+
yi = y(d);
|
|
1127
|
+
!isNil$1(xi) && (xi = +xi) >= xi && !isNil$1(yi) && (yi = +yi) >= yi && callback(xi, yi, i);
|
|
1128
|
+
}
|
|
1051
1129
|
}
|
|
1052
1130
|
function rSquared(data, x, y, uY, predict) {
|
|
1053
|
-
let
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
const
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1131
|
+
let ssr = 0,
|
|
1132
|
+
sst = 0;
|
|
1133
|
+
for (let i = 0; i < data.length; i++) {
|
|
1134
|
+
const d = data[i];
|
|
1135
|
+
let yi = y(d);
|
|
1136
|
+
if (!isNil$1(yi) && (yi = +yi) >= yi) {
|
|
1137
|
+
const r = yi - predict(x(d));
|
|
1138
|
+
ssr += r * r;
|
|
1139
|
+
const t = yi - uY;
|
|
1140
|
+
sst += t * t;
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
return 0 === sst ? 0 : 1 - ssr / sst;
|
|
1144
|
+
}
|
|
1145
|
+
function regressionLinear(data, x = d => d.x, y = d => d.y) {
|
|
1146
|
+
let n = 0,
|
|
1147
|
+
meanX = 0,
|
|
1148
|
+
meanY = 0,
|
|
1149
|
+
meanXY = 0,
|
|
1150
|
+
meanX2 = 0;
|
|
1151
|
+
visitPoints(data, x, y, (xi, yi) => {
|
|
1152
|
+
n++, meanX += (xi - meanX) / n, meanY += (yi - meanY) / n, meanXY += (xi * yi - meanXY) / n, meanX2 += (xi * xi - meanX2) / n;
|
|
1069
1153
|
});
|
|
1070
|
-
const
|
|
1071
|
-
|
|
1154
|
+
const {
|
|
1155
|
+
a: a,
|
|
1156
|
+
b: b
|
|
1157
|
+
} = ordinaryLeastSquares(meanX, meanY, meanXY, meanX2),
|
|
1158
|
+
predict = xx => a + b * xx,
|
|
1159
|
+
comps = computeLinearCIComponents(data, x, y, predict);
|
|
1072
1160
|
return {
|
|
1073
|
-
coef:
|
|
1161
|
+
coef: {
|
|
1162
|
+
a: a,
|
|
1163
|
+
b: b
|
|
1164
|
+
},
|
|
1074
1165
|
predict: predict,
|
|
1075
|
-
rSquared: rSquared(data, x, y,
|
|
1166
|
+
rSquared: rSquared(data, x, y, meanY, predict),
|
|
1167
|
+
evaluateGrid: function (N) {
|
|
1168
|
+
const out = [];
|
|
1169
|
+
if (0 === comps.n || N <= 0) return out;
|
|
1170
|
+
if (comps.min === comps.max) {
|
|
1171
|
+
for (let i = 0; i < N; i++) out.push({
|
|
1172
|
+
x: comps.min,
|
|
1173
|
+
y: predict(comps.min)
|
|
1174
|
+
});
|
|
1175
|
+
return out;
|
|
1176
|
+
}
|
|
1177
|
+
const step = (comps.max - comps.min) / (N - 1);
|
|
1178
|
+
for (let i = 0; i < N; i++) {
|
|
1179
|
+
const px = i === N - 1 ? comps.max : comps.min + step * i;
|
|
1180
|
+
out.push({
|
|
1181
|
+
x: px,
|
|
1182
|
+
y: predict(px)
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
return out;
|
|
1186
|
+
},
|
|
1187
|
+
confidenceInterval: function (N = 50, alpha = .05) {
|
|
1188
|
+
const out = [];
|
|
1189
|
+
if (0 === comps.n || N <= 0) return out;
|
|
1190
|
+
const z = invNorm(1 - alpha / 2);
|
|
1191
|
+
if (comps.min === comps.max) {
|
|
1192
|
+
const m = predict(comps.min),
|
|
1193
|
+
errs = stdErrorsAt(comps.min, comps);
|
|
1194
|
+
for (let i = 0; i < N; i++) out.push({
|
|
1195
|
+
x: comps.min,
|
|
1196
|
+
mean: m,
|
|
1197
|
+
lower: m - z * errs.seMean,
|
|
1198
|
+
upper: m + z * errs.seMean,
|
|
1199
|
+
predLower: m - z * errs.sePred,
|
|
1200
|
+
predUpper: m + z * errs.sePred
|
|
1201
|
+
});
|
|
1202
|
+
return out;
|
|
1203
|
+
}
|
|
1204
|
+
const step = (comps.max - comps.min) / (N - 1);
|
|
1205
|
+
for (let i = 0; i < N; i++) {
|
|
1206
|
+
const px = i === N - 1 ? comps.max : comps.min + step * i,
|
|
1207
|
+
m = predict(px),
|
|
1208
|
+
errs = stdErrorsAt(px, comps);
|
|
1209
|
+
out.push({
|
|
1210
|
+
x: px,
|
|
1211
|
+
mean: m,
|
|
1212
|
+
lower: m - z * errs.seMean,
|
|
1213
|
+
upper: m + z * errs.seMean,
|
|
1214
|
+
predLower: m - z * errs.sePred,
|
|
1215
|
+
predUpper: m + z * errs.sePred
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
return out;
|
|
1219
|
+
}
|
|
1076
1220
|
};
|
|
1077
1221
|
}
|
|
1078
1222
|
|
|
@@ -5968,6 +6112,59 @@ function sortData(a, b, sortFields) {
|
|
|
5968
6112
|
return 0;
|
|
5969
6113
|
}
|
|
5970
6114
|
|
|
6115
|
+
const bin = (data, options) => {
|
|
6116
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
6117
|
+
const field = null == options ? void 0 : options.field;
|
|
6118
|
+
if (!field) return [];
|
|
6119
|
+
const n = data.length;
|
|
6120
|
+
let thresholds,
|
|
6121
|
+
min = 1 / 0,
|
|
6122
|
+
max = -1 / 0;
|
|
6123
|
+
if (null == options ? void 0 : options.extent) min = options.extent[0], max = options.extent[1];else for (let i = 0; i < n; i++) {
|
|
6124
|
+
const v = data[i][field];
|
|
6125
|
+
if (isNil$1(v)) continue;
|
|
6126
|
+
const num = +v;
|
|
6127
|
+
Number.isFinite(num) && (num < min && (min = num), num > max && (max = num));
|
|
6128
|
+
}
|
|
6129
|
+
if (!Number.isFinite(min) || !Number.isFinite(max) || 0 === n) return [];
|
|
6130
|
+
if (options && options.thresholds && options.thresholds.length) thresholds = options.thresholds.slice(), thresholds.sort((a, b) => a - b);else if (options && "number" == typeof options.step && options.step > 0) {
|
|
6131
|
+
const stepSize = options.step;
|
|
6132
|
+
let startMin = min;
|
|
6133
|
+
for (options.extent || (startMin = Math.floor(min / stepSize) * stepSize), thresholds = [startMin]; startMin < max;) startMin += stepSize, thresholds.push(startMin);
|
|
6134
|
+
} else {
|
|
6135
|
+
const bins = (null == options ? void 0 : options.bins) && options.bins > 0 ? Math.floor(options.bins) : 10,
|
|
6136
|
+
stepSize = (max - min) / bins;
|
|
6137
|
+
thresholds = new Array(bins + 1);
|
|
6138
|
+
for (let i = 0; i <= bins; i++) thresholds[i] = i === bins ? max : min + stepSize * i;
|
|
6139
|
+
}
|
|
6140
|
+
const numBins = Math.max(0, thresholds.length - 1);
|
|
6141
|
+
if (0 === numBins) return [];
|
|
6142
|
+
const x0Name = null !== (_b = null === (_a = options.outputNames) || void 0 === _a ? void 0 : _a.x0) && void 0 !== _b ? _b : "x0",
|
|
6143
|
+
x1Name = null !== (_d = null === (_c = options.outputNames) || void 0 === _c ? void 0 : _c.x1) && void 0 !== _d ? _d : "x1",
|
|
6144
|
+
countName = null !== (_f = null === (_e = options.outputNames) || void 0 === _e ? void 0 : _e.count) && void 0 !== _f ? _f : "count",
|
|
6145
|
+
valuesName = null !== (_h = null === (_g = options.outputNames) || void 0 === _g ? void 0 : _g.values) && void 0 !== _h ? _h : "values",
|
|
6146
|
+
out = new Array(numBins);
|
|
6147
|
+
for (let i = 0; i < numBins; i++) out[i] = {
|
|
6148
|
+
[x0Name]: thresholds[i],
|
|
6149
|
+
[x1Name]: thresholds[i + 1],
|
|
6150
|
+
[countName]: 0
|
|
6151
|
+
}, (null == options ? void 0 : options.includeValues) && (out[i][valuesName] = []);
|
|
6152
|
+
for (let i = 0; i < n; i++) {
|
|
6153
|
+
const v = data[i][field];
|
|
6154
|
+
if (null == v) continue;
|
|
6155
|
+
const num = +v;
|
|
6156
|
+
if (Number.isFinite(num)) for (let j = 0; j < numBins; j++) {
|
|
6157
|
+
const left = out[j][x0Name],
|
|
6158
|
+
right = out[j][x1Name];
|
|
6159
|
+
if (num >= left && num < right || j === numBins - 1 && num <= right) {
|
|
6160
|
+
out[j][countName]++, options && options.includeValues && out[j][valuesName].push(data[i]);
|
|
6161
|
+
break;
|
|
6162
|
+
}
|
|
6163
|
+
}
|
|
6164
|
+
}
|
|
6165
|
+
return out;
|
|
6166
|
+
};
|
|
6167
|
+
|
|
5971
6168
|
var EOL = {},
|
|
5972
6169
|
EOF = {},
|
|
5973
6170
|
QUOTE = 34,
|
|
@@ -38696,7 +38893,9 @@ class BandScale extends OrdinalScale {
|
|
|
38696
38893
|
space = bandSpace(n, this._paddingInner, this._paddingOuter);
|
|
38697
38894
|
return this._step = (stop - start) / Math.max(1, space || 1), this._round && (this._step = Math.floor(this._step)), start += (stop - start - this._step * (n - this._paddingInner)) * this._align, this.isBandwidthFixed() || (this._bandwidth = this._step * (1 - this._paddingInner)), this._round && (start = Math.round(start), this.isBandwidthFixed() || (this._bandwidth = Math.round(this._bandwidth))), this._bandRangeState = {
|
|
38698
38895
|
reverse: reverse,
|
|
38699
|
-
start: reverse ? start + this._step * (n - 1) : start,
|
|
38896
|
+
start: reverse ? clamp$1(start + this._step * (n - 1), wholeRange[1], wholeRange[0]) : clamp$1(start, wholeRange[0], wholeRange[1]),
|
|
38897
|
+
min: reverse ? wholeRange[1] : wholeRange[0],
|
|
38898
|
+
max: stop,
|
|
38700
38899
|
count: n
|
|
38701
38900
|
}, this.generateFishEyeTransform(), this;
|
|
38702
38901
|
}
|
|
@@ -38713,10 +38912,12 @@ class BandScale extends OrdinalScale {
|
|
|
38713
38912
|
const {
|
|
38714
38913
|
count: count,
|
|
38715
38914
|
start: start,
|
|
38716
|
-
reverse: reverse
|
|
38915
|
+
reverse: reverse,
|
|
38916
|
+
min: min,
|
|
38917
|
+
max: max
|
|
38717
38918
|
} = this._bandRangeState,
|
|
38718
38919
|
output = start + (reverse ? -1 : 1) * ((i - 1) % count) * this._step;
|
|
38719
|
-
return this._fishEyeTransform ? this._fishEyeTransform(output) : output;
|
|
38920
|
+
return clamp$1(this._fishEyeTransform ? this._fishEyeTransform(output) : output, min, max);
|
|
38720
38921
|
}
|
|
38721
38922
|
_calculateWholeRange(range, changeProperty) {
|
|
38722
38923
|
if (this._wholeRange) return this._wholeRange;
|
|
@@ -42224,6 +42425,19 @@ class CircleAxisGrid extends BaseGrid {
|
|
|
42224
42425
|
}
|
|
42225
42426
|
mixin(CircleAxisGrid, CircleAxisMixin);
|
|
42226
42427
|
|
|
42428
|
+
var DataZoomActiveTag;
|
|
42429
|
+
!function (DataZoomActiveTag) {
|
|
42430
|
+
DataZoomActiveTag.startHandler = "startHandler", DataZoomActiveTag.endHandler = "endHandler", DataZoomActiveTag.middleHandler = "middleHandler", DataZoomActiveTag.background = "background";
|
|
42431
|
+
}(DataZoomActiveTag || (DataZoomActiveTag = {}));
|
|
42432
|
+
var IDataZoomInteractiveEvent;
|
|
42433
|
+
!function (IDataZoomInteractiveEvent) {
|
|
42434
|
+
IDataZoomInteractiveEvent.stateUpdate = "stateUpdate", IDataZoomInteractiveEvent.maskUpdate = "maskUpdate", IDataZoomInteractiveEvent.dataZoomUpdate = "dataZoomUpdate";
|
|
42435
|
+
}(IDataZoomInteractiveEvent || (IDataZoomInteractiveEvent = {}));
|
|
42436
|
+
var IDataZoomEvent;
|
|
42437
|
+
!function (IDataZoomEvent) {
|
|
42438
|
+
IDataZoomEvent.dataZoomChange = "dataZoomChange";
|
|
42439
|
+
}(IDataZoomEvent || (IDataZoomEvent = {}));
|
|
42440
|
+
|
|
42227
42441
|
const DEFAULT_HANDLER_PATH = "M -0.0544 0.25 C -0.0742 0.25 -0.0901 0.234 -0.0901 0.2143 L -0.0901 -0.1786 C -0.0901 -0.1983 -0.0742 -0.2143 -0.0544 -0.2143 L -0.0187 -0.2143 L -0.0187 -0.5 L 0.017 -0.5 L 0.017 -0.2143 L 0.0527 -0.2143 C 0.0724 -0.2143 0.0884 -0.1983 0.0884 -0.1786 L 0.0884 0.2143 C 0.0884 0.234 0.0724 0.25 0.0527 0.25 L 0.017 0.25 L 0.017 0.5 L -0.0187 0.5 L -0.0187 0.25 L -0.0544 0.25 Z M -0.0187 -0.1429 L -0.0544 -0.1429 L -0.0544 0.1786 L -0.0187 0.1786 L -0.0187 -0.1429 Z M 0.0527 -0.1429 L 0.017 -0.1429 L 0.017 0.1786 L 0.0527 0.1786 L 0.0527 -0.1429 Z";
|
|
42228
42442
|
const DEFAULT_DATA_ZOOM_ATTRIBUTES = {
|
|
42229
42443
|
orient: "bottom",
|
|
@@ -42341,14 +42555,17 @@ const DEFAULT_HANDLER_ATTR_MAP = {
|
|
|
42341
42555
|
}
|
|
42342
42556
|
};
|
|
42343
42557
|
|
|
42344
|
-
|
|
42345
|
-
|
|
42346
|
-
|
|
42347
|
-
|
|
42348
|
-
|
|
42349
|
-
|
|
42350
|
-
|
|
42351
|
-
|
|
42558
|
+
const isTextOverflow = (componentBoundsLike, textBounds, layout, isHorizontal) => {
|
|
42559
|
+
if (!textBounds) return !1;
|
|
42560
|
+
if (isHorizontal) {
|
|
42561
|
+
if ("start" === layout) {
|
|
42562
|
+
if (textBounds.x1 < componentBoundsLike.x1) return !0;
|
|
42563
|
+
} else if (textBounds.x2 > componentBoundsLike.x2) return !0;
|
|
42564
|
+
} else if ("start" === layout) {
|
|
42565
|
+
if (textBounds.y1 < componentBoundsLike.y1) return !0;
|
|
42566
|
+
} else if (textBounds.y2 > componentBoundsLike.y2) return !0;
|
|
42567
|
+
return !1;
|
|
42568
|
+
};
|
|
42352
42569
|
|
|
42353
42570
|
var __rest$1 = undefined && undefined.__rest || function (s, e) {
|
|
42354
42571
|
var t = {};
|
|
@@ -42359,176 +42576,96 @@ var __rest$1 = undefined && undefined.__rest || function (s, e) {
|
|
|
42359
42576
|
}
|
|
42360
42577
|
return t;
|
|
42361
42578
|
};
|
|
42362
|
-
|
|
42363
|
-
|
|
42364
|
-
|
|
42365
|
-
}
|
|
42366
|
-
|
|
42367
|
-
|
|
42368
|
-
|
|
42579
|
+
class DataZoomRenderer {
|
|
42580
|
+
get startHandlerMask() {
|
|
42581
|
+
return this._startHandlerMask;
|
|
42582
|
+
}
|
|
42583
|
+
get middleHandlerSymbol() {
|
|
42584
|
+
return this._middleHandlerSymbol;
|
|
42585
|
+
}
|
|
42586
|
+
get middleHandlerRect() {
|
|
42587
|
+
return this._middleHandlerRect;
|
|
42588
|
+
}
|
|
42589
|
+
get endHandlerMask() {
|
|
42590
|
+
return this._endHandlerMask;
|
|
42591
|
+
}
|
|
42592
|
+
get selectedBackground() {
|
|
42593
|
+
return this._selectedBackground;
|
|
42594
|
+
}
|
|
42595
|
+
get dragMask() {
|
|
42596
|
+
return this._dragMask;
|
|
42597
|
+
}
|
|
42598
|
+
get startText() {
|
|
42599
|
+
return this._startText;
|
|
42600
|
+
}
|
|
42601
|
+
get endText() {
|
|
42602
|
+
return this._endText;
|
|
42603
|
+
}
|
|
42604
|
+
get startValue() {
|
|
42605
|
+
return this._startValue;
|
|
42606
|
+
}
|
|
42607
|
+
get endValue() {
|
|
42608
|
+
return this._endValue;
|
|
42609
|
+
}
|
|
42610
|
+
set showText(showText) {
|
|
42611
|
+
this._showText = showText;
|
|
42612
|
+
}
|
|
42613
|
+
get background() {
|
|
42614
|
+
return this._background;
|
|
42615
|
+
}
|
|
42616
|
+
set previewData(previewData) {
|
|
42617
|
+
this._previewData = previewData;
|
|
42618
|
+
}
|
|
42619
|
+
get previewGroup() {
|
|
42620
|
+
return this._previewGroup;
|
|
42621
|
+
}
|
|
42622
|
+
get selectedPreviewGroup() {
|
|
42623
|
+
return this._selectedPreviewGroup;
|
|
42624
|
+
}
|
|
42625
|
+
set previewPointsX(previewPointsX) {
|
|
42626
|
+
this._previewPointsX = previewPointsX;
|
|
42627
|
+
}
|
|
42628
|
+
set previewPointsY(previewPointsY) {
|
|
42629
|
+
this._previewPointsY = previewPointsY;
|
|
42630
|
+
}
|
|
42631
|
+
set previewPointsX1(previewPointsX1) {
|
|
42632
|
+
this._previewPointsX1 = previewPointsX1;
|
|
42633
|
+
}
|
|
42634
|
+
set previewPointsY1(previewPointsY1) {
|
|
42635
|
+
this._previewPointsY1 = previewPointsY1;
|
|
42636
|
+
}
|
|
42637
|
+
set statePointToData(statePointToData) {
|
|
42638
|
+
this._statePointToData = statePointToData;
|
|
42639
|
+
}
|
|
42640
|
+
_initAttrs(props) {
|
|
42641
|
+
this.attribute = props.attribute, this._isHorizontal = "top" === this.attribute.orient || "bottom" === this.attribute.orient;
|
|
42369
42642
|
const {
|
|
42370
|
-
start: start,
|
|
42371
|
-
end: end,
|
|
42372
|
-
orient: orient,
|
|
42373
42643
|
previewData: previewData,
|
|
42374
42644
|
previewPointsX: previewPointsX,
|
|
42375
42645
|
previewPointsY: previewPointsY,
|
|
42376
42646
|
previewPointsX1: previewPointsX1,
|
|
42377
42647
|
previewPointsY1: previewPointsY1
|
|
42378
42648
|
} = this.attribute;
|
|
42379
|
-
|
|
42380
|
-
const {
|
|
42381
|
-
width: width,
|
|
42382
|
-
height: height
|
|
42383
|
-
} = this.getLayoutAttrFromConfig();
|
|
42384
|
-
this._spanCache = this.state.end - this.state.start, this._isHorizontal = "top" === orient || "bottom" === orient, this._layoutCache.max = this._isHorizontal ? width : height, this._layoutCache.attPos = this._isHorizontal ? "x" : "y", this._layoutCache.attSize = this._isHorizontal ? "width" : "height", previewData && (this._previewData = previewData), isFunction$1(previewPointsX) && (this._previewPointsX = previewPointsX), isFunction$1(previewPointsY) && (this._previewPointsY = previewPointsY), isFunction$1(previewPointsX1) && (this._previewPointsX1 = previewPointsX1), isFunction$1(previewPointsY1) && (this._previewPointsY1 = previewPointsY1);
|
|
42649
|
+
previewData && (this._previewData = previewData), isFunction$1(previewPointsX) && (this._previewPointsX = previewPointsX), isFunction$1(previewPointsY) && (this._previewPointsY = previewPointsY), isFunction$1(previewPointsX1) && (this._previewPointsX1 = previewPointsX1), isFunction$1(previewPointsY1) && (this._previewPointsY1 = previewPointsY1), this._getState = props.getState, this._getLayoutAttrFromConfig = props.getLayoutAttrFromConfig, this._getContainer = props.getContainer;
|
|
42385
42650
|
}
|
|
42386
|
-
constructor(
|
|
42387
|
-
|
|
42388
|
-
startPos: {
|
|
42389
|
-
x: 0,
|
|
42390
|
-
y: 0
|
|
42391
|
-
},
|
|
42392
|
-
lastPos: {
|
|
42393
|
-
x: 0,
|
|
42394
|
-
y: 0
|
|
42395
|
-
}
|
|
42396
|
-
}, this._layoutCache = {
|
|
42397
|
-
attPos: "x",
|
|
42398
|
-
attSize: "width",
|
|
42399
|
-
max: 0
|
|
42400
|
-
}, this.state = {
|
|
42401
|
-
start: 0,
|
|
42402
|
-
end: 1
|
|
42403
|
-
}, this._statePointToData = state => state, this._handleTouchMove = e => {
|
|
42404
|
-
this._activeState && e.preventDefault();
|
|
42405
|
-
}, this._onHandlerPointerDown = (e, tag) => {
|
|
42406
|
-
this._clearDragEvents(), "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);
|
|
42407
|
-
const evtTarget = "browser" === vglobal.env ? vglobal : this.stage,
|
|
42408
|
-
triggers = getEndTriggersOfDrag();
|
|
42409
|
-
evtTarget.addEventListener("pointermove", this._onHandlerPointerMove, {
|
|
42410
|
-
capture: !0
|
|
42411
|
-
}), this.addEventListener("pointermove", this._onHandlerPointerMove, {
|
|
42412
|
-
capture: !0
|
|
42413
|
-
}), triggers.forEach(trigger => {
|
|
42414
|
-
evtTarget.addEventListener(trigger, this._onHandlerPointerUp);
|
|
42415
|
-
});
|
|
42416
|
-
}, this._pointerMove = e => {
|
|
42417
|
-
const {
|
|
42418
|
-
start: startAttr,
|
|
42419
|
-
end: endAttr,
|
|
42420
|
-
brushSelect: brushSelect,
|
|
42421
|
-
realTime = !0
|
|
42422
|
-
} = this.attribute,
|
|
42423
|
-
pos = this.eventPosToStagePos(e),
|
|
42424
|
-
{
|
|
42425
|
-
attPos: attPos,
|
|
42426
|
-
max: max
|
|
42427
|
-
} = this._layoutCache,
|
|
42428
|
-
dis = (pos[attPos] - this._activeCache.lastPos[attPos]) / max;
|
|
42429
|
-
let {
|
|
42430
|
-
start: start,
|
|
42431
|
-
end: end
|
|
42432
|
-
} = this.state;
|
|
42433
|
-
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), realTime && this._dispatchEvent("change", {
|
|
42434
|
-
start: start,
|
|
42435
|
-
end: end,
|
|
42436
|
-
tag: this._activeTag
|
|
42437
|
-
}));
|
|
42438
|
-
}, this._onHandlerPointerMove = 0 === this.attribute.delayTime ? this._pointerMove : delayMap$2[this.attribute.delayType](this._pointerMove, this.attribute.delayTime), this._onHandlerPointerUp = e => {
|
|
42439
|
-
const {
|
|
42440
|
-
start: start,
|
|
42441
|
-
end: end,
|
|
42442
|
-
brushSelect: brushSelect,
|
|
42443
|
-
realTime = !0
|
|
42444
|
-
} = this.attribute;
|
|
42445
|
-
if (this._activeState && this._activeTag === DataZoomActiveTag.background) {
|
|
42446
|
-
const pos = this.eventPosToStagePos(e);
|
|
42447
|
-
this.backgroundDragZoom(this._activeCache.startPos, pos);
|
|
42448
|
-
}
|
|
42449
|
-
this._activeState = !1, brushSelect && this.renderDragMask(), this._dispatchEvent("change", {
|
|
42450
|
-
start: this.state.start,
|
|
42451
|
-
end: this.state.end,
|
|
42452
|
-
tag: this._activeTag
|
|
42453
|
-
}), this._clearDragEvents();
|
|
42454
|
-
};
|
|
42651
|
+
constructor(props) {
|
|
42652
|
+
this._previewData = [], this._statePointToData = state => state;
|
|
42455
42653
|
const {
|
|
42456
|
-
position: position,
|
|
42457
42654
|
showDetail: showDetail
|
|
42458
|
-
} =
|
|
42459
|
-
this.
|
|
42655
|
+
} = props.attribute;
|
|
42656
|
+
this._showText = "auto" !== showDetail && showDetail, this._initAttrs(props);
|
|
42460
42657
|
}
|
|
42461
|
-
setAttributes(
|
|
42462
|
-
|
|
42658
|
+
setAttributes(props) {
|
|
42659
|
+
this._initAttrs(props);
|
|
42463
42660
|
}
|
|
42464
|
-
|
|
42465
|
-
|
|
42661
|
+
renderDataZoom(onlyStateChange = !1) {
|
|
42662
|
+
var _a, _b, _c, _d, _e, _f;
|
|
42466
42663
|
const {
|
|
42467
|
-
|
|
42664
|
+
backgroundChartStyle = {},
|
|
42665
|
+
selectedBackgroundChartStyle = {},
|
|
42468
42666
|
brushSelect: brushSelect
|
|
42469
42667
|
} = this.attribute;
|
|
42470
|
-
this.
|
|
42471
|
-
const selectedTag = brushSelect ? "background" : "middleRect";
|
|
42472
|
-
this._selectedBackground && this._selectedBackground.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, selectedTag)), brushSelect && this._background && this._background.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "background")), brushSelect && this._previewGroup && this._previewGroup.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "background")), this._selectedPreviewGroup && this._selectedPreviewGroup.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, selectedTag)), "auto" === showDetail && (this.addEventListener("pointerenter", this._onHandlerPointerEnter), this.addEventListener("pointerleave", this._onHandlerPointerLeave)), ("browser" === vglobal.env ? vglobal : this.stage).addEventListener("touchmove", this._handleTouchMove, {
|
|
42473
|
-
passive: !1
|
|
42474
|
-
});
|
|
42475
|
-
}
|
|
42476
|
-
dragMaskSize() {
|
|
42477
|
-
const {
|
|
42478
|
-
position: position
|
|
42479
|
-
} = this.attribute,
|
|
42480
|
-
{
|
|
42481
|
-
attPos: attPos,
|
|
42482
|
-
max: max
|
|
42483
|
-
} = this._layoutCache;
|
|
42484
|
-
return this._activeCache.lastPos[attPos] - position[attPos] > max ? max + position[attPos] - this._activeCache.startPos[attPos] : this._activeCache.lastPos[attPos] - position[attPos] < 0 ? position[attPos] - this._activeCache.startPos[attPos] : this._activeCache.lastPos[attPos] - this._activeCache.startPos[attPos];
|
|
42485
|
-
}
|
|
42486
|
-
setStateAttr(start, end, shouldRender) {
|
|
42487
|
-
const {
|
|
42488
|
-
zoomLock = !1,
|
|
42489
|
-
minSpan = 0,
|
|
42490
|
-
maxSpan = 1
|
|
42491
|
-
} = this.attribute,
|
|
42492
|
-
span = end - start;
|
|
42493
|
-
span !== this._spanCache && (zoomLock || span < minSpan || span > maxSpan) || (this._spanCache = span, this.state.start = start, this.state.end = end, shouldRender && this.setAttributes({
|
|
42494
|
-
start: start,
|
|
42495
|
-
end: end
|
|
42496
|
-
}));
|
|
42497
|
-
}
|
|
42498
|
-
_clearDragEvents() {
|
|
42499
|
-
const evtTarget = "browser" === vglobal.env ? vglobal : this.stage,
|
|
42500
|
-
triggers = getEndTriggersOfDrag();
|
|
42501
|
-
evtTarget.removeEventListener("pointermove", this._onHandlerPointerMove, {
|
|
42502
|
-
capture: !0
|
|
42503
|
-
}), triggers.forEach(trigger => {
|
|
42504
|
-
evtTarget.removeEventListener(trigger, this._onHandlerPointerUp);
|
|
42505
|
-
}), this.removeEventListener("pointermove", this._onHandlerPointerMove, {
|
|
42506
|
-
capture: !0
|
|
42507
|
-
});
|
|
42508
|
-
}
|
|
42509
|
-
_onHandlerPointerEnter(e) {
|
|
42510
|
-
this._showText = !0, this.renderText();
|
|
42511
|
-
}
|
|
42512
|
-
_onHandlerPointerLeave(e) {
|
|
42513
|
-
this._showText = !1, this.renderText();
|
|
42514
|
-
}
|
|
42515
|
-
backgroundDragZoom(startPos, endPos) {
|
|
42516
|
-
const {
|
|
42517
|
-
attPos: attPos,
|
|
42518
|
-
max: max
|
|
42519
|
-
} = this._layoutCache,
|
|
42520
|
-
{
|
|
42521
|
-
position: position
|
|
42522
|
-
} = this.attribute,
|
|
42523
|
-
startPosInComponent = startPos[attPos] - position[attPos],
|
|
42524
|
-
endPosInComponent = endPos[attPos] - position[attPos],
|
|
42525
|
-
start = Math.min(Math.max(Math.min(startPosInComponent, endPosInComponent) / max, 0), 1),
|
|
42526
|
-
end = Math.min(Math.max(Math.max(startPosInComponent, endPosInComponent) / max, 0), 1);
|
|
42527
|
-
Math.abs(start - end) < .01 ? this.moveZoomWithMiddle(start) : this.setStateAttr(start, end, !1);
|
|
42528
|
-
}
|
|
42529
|
-
moveZoomWithMiddle(middle) {
|
|
42530
|
-
let offset = middle - (this.state.start + this.state.end) / 2;
|
|
42531
|
-
0 !== offset && (offset > 0 ? this.state.end + offset > 1 && (offset = 1 - this.state.end) : offset < 0 && this.state.start + offset < 0 && (offset = -this.state.start), this.setStateAttr(this.state.start + offset, this.state.end + offset, !1));
|
|
42668
|
+
this._renderBackground(), (null === (_a = backgroundChartStyle.line) || void 0 === _a ? void 0 : _a.visible) && !onlyStateChange && this._setPreviewAttributes("line", this._getContainer()), (null === (_b = backgroundChartStyle.area) || void 0 === _b ? void 0 : _b.visible) && !onlyStateChange && this._setPreviewAttributes("area", this._getContainer()), brushSelect && this.renderDragMask(), this._renderSelectedBackground(), (null === (_c = selectedBackgroundChartStyle.line) || void 0 === _c ? void 0 : _c.visible) && this._setSelectedPreviewClipAttributes("line", this._getContainer()), (null === (_d = selectedBackgroundChartStyle.line) || void 0 === _d ? void 0 : _d.visible) && !onlyStateChange && this._setSelectedPreviewAttributes("line"), (null === (_e = selectedBackgroundChartStyle.line) || void 0 === _e ? void 0 : _e.visible) && this._setSelectedPreviewClipAttributes("area", this._getContainer()), (null === (_f = selectedBackgroundChartStyle.area) || void 0 === _f ? void 0 : _f.visible) && !onlyStateChange && this._setSelectedPreviewAttributes("area"), this._renderHandler(), this._showText && this.renderText();
|
|
42532
42669
|
}
|
|
42533
42670
|
renderDragMask() {
|
|
42534
42671
|
const {
|
|
@@ -42538,254 +42675,104 @@ let DataZoom$1 = class DataZoom extends AbstractComponent {
|
|
|
42538
42675
|
position: position,
|
|
42539
42676
|
width: width,
|
|
42540
42677
|
height: height
|
|
42541
|
-
} = this.
|
|
42542
|
-
|
|
42543
|
-
|
|
42678
|
+
} = this._getLayoutAttrFromConfig(),
|
|
42679
|
+
{
|
|
42680
|
+
start: start,
|
|
42681
|
+
end: end
|
|
42682
|
+
} = this._getState();
|
|
42683
|
+
return this._isHorizontal ? this._dragMask = this._getContainer().createOrUpdateChild("dragMask", Object.assign({
|
|
42684
|
+
x: position.x + start * width,
|
|
42544
42685
|
y: position.y,
|
|
42545
|
-
width:
|
|
42686
|
+
width: (end - start) * width,
|
|
42546
42687
|
height: height
|
|
42547
|
-
}, dragMaskStyle), "rect") : this._dragMask = this.
|
|
42688
|
+
}, dragMaskStyle), "rect") : this._dragMask = this._getContainer().createOrUpdateChild("dragMask", Object.assign({
|
|
42548
42689
|
x: position.x,
|
|
42549
|
-
y:
|
|
42690
|
+
y: position.y + start * height,
|
|
42550
42691
|
width: width,
|
|
42551
|
-
height:
|
|
42552
|
-
}, dragMaskStyle), "rect")
|
|
42553
|
-
|
|
42554
|
-
|
|
42555
|
-
|
|
42556
|
-
if (this._isHorizontal) {
|
|
42557
|
-
if ("start" === layout) {
|
|
42558
|
-
if (textBounds.x1 < componentBoundsLike.x1) return !0;
|
|
42559
|
-
} else if (textBounds.x2 > componentBoundsLike.x2) return !0;
|
|
42560
|
-
} else if ("start" === layout) {
|
|
42561
|
-
if (textBounds.y1 < componentBoundsLike.y1) return !0;
|
|
42562
|
-
} else if (textBounds.y2 > componentBoundsLike.y2) return !0;
|
|
42563
|
-
return !1;
|
|
42692
|
+
height: (end - start) * height
|
|
42693
|
+
}, dragMaskStyle), "rect"), {
|
|
42694
|
+
start: start,
|
|
42695
|
+
end: end
|
|
42696
|
+
};
|
|
42564
42697
|
}
|
|
42565
|
-
|
|
42566
|
-
var _a
|
|
42698
|
+
_renderBackground() {
|
|
42699
|
+
var _a;
|
|
42567
42700
|
const {
|
|
42568
|
-
|
|
42569
|
-
|
|
42701
|
+
backgroundStyle: backgroundStyle,
|
|
42702
|
+
brushSelect: brushSelect,
|
|
42703
|
+
zoomLock: zoomLock
|
|
42570
42704
|
} = this.attribute,
|
|
42571
42705
|
{
|
|
42572
|
-
formatMethod: startTextFormat
|
|
42573
|
-
} = startTextStyle,
|
|
42574
|
-
restStartTextStyle = __rest$1(startTextStyle, ["formatMethod"]),
|
|
42575
|
-
{
|
|
42576
|
-
formatMethod: endTextFormat
|
|
42577
|
-
} = endTextStyle,
|
|
42578
|
-
restEndTextStyle = __rest$1(endTextStyle, ["formatMethod"]),
|
|
42579
|
-
{
|
|
42580
|
-
start: start,
|
|
42581
|
-
end: end
|
|
42582
|
-
} = this.state;
|
|
42583
|
-
this._startValue = this._statePointToData(start), this._endValue = this._statePointToData(end);
|
|
42584
|
-
const {
|
|
42585
42706
|
position: position,
|
|
42586
42707
|
width: width,
|
|
42587
42708
|
height: height
|
|
42588
|
-
} = this.
|
|
42589
|
-
|
|
42590
|
-
|
|
42591
|
-
componentBoundsLike = {
|
|
42592
|
-
x1: position.x,
|
|
42593
|
-
y1: position.y,
|
|
42594
|
-
x2: position.x + width,
|
|
42595
|
-
y2: position.y + height
|
|
42596
|
-
};
|
|
42597
|
-
let startTextPosition, endTextPosition, startTextAlignStyle, endTextAlignStyle;
|
|
42598
|
-
this._isHorizontal ? (startTextPosition = {
|
|
42599
|
-
x: position.x + start * width,
|
|
42600
|
-
y: position.y + height / 2
|
|
42601
|
-
}, endTextPosition = {
|
|
42602
|
-
x: position.x + end * width,
|
|
42603
|
-
y: position.y + height / 2
|
|
42604
|
-
}, startTextAlignStyle = {
|
|
42605
|
-
textAlign: this.isTextOverflow(componentBoundsLike, startTextBounds, "start") ? "left" : "right",
|
|
42606
|
-
textBaseline: null !== (_b = null === (_a = null == restStartTextStyle ? void 0 : restStartTextStyle.textStyle) || void 0 === _a ? void 0 : _a.textBaseline) && void 0 !== _b ? _b : "middle"
|
|
42607
|
-
}, endTextAlignStyle = {
|
|
42608
|
-
textAlign: this.isTextOverflow(componentBoundsLike, endTextBounds, "end") ? "right" : "left",
|
|
42609
|
-
textBaseline: null !== (_d = null === (_c = null == restEndTextStyle ? void 0 : restEndTextStyle.textStyle) || void 0 === _c ? void 0 : _c.textBaseline) && void 0 !== _d ? _d : "middle"
|
|
42610
|
-
}) : (startTextPosition = {
|
|
42611
|
-
x: position.x + width / 2,
|
|
42612
|
-
y: position.y + start * height
|
|
42613
|
-
}, endTextPosition = {
|
|
42614
|
-
x: position.x + width / 2,
|
|
42615
|
-
y: position.y + end * height
|
|
42616
|
-
}, startTextAlignStyle = {
|
|
42617
|
-
textAlign: null !== (_f = null === (_e = null == restStartTextStyle ? void 0 : restStartTextStyle.textStyle) || void 0 === _e ? void 0 : _e.textAlign) && void 0 !== _f ? _f : "center",
|
|
42618
|
-
textBaseline: this.isTextOverflow(componentBoundsLike, startTextBounds, "start") ? "top" : "bottom"
|
|
42619
|
-
}, endTextAlignStyle = {
|
|
42620
|
-
textAlign: null !== (_h = null === (_g = null == restEndTextStyle ? void 0 : restEndTextStyle.textStyle) || void 0 === _g ? void 0 : _g.textAlign) && void 0 !== _h ? _h : "center",
|
|
42621
|
-
textBaseline: this.isTextOverflow(componentBoundsLike, endTextBounds, "end") ? "bottom" : "top"
|
|
42622
|
-
}), this._startText = this.maybeAddLabel(this._container, merge$1({}, restStartTextStyle, {
|
|
42623
|
-
text: startTextValue,
|
|
42624
|
-
x: startTextPosition.x,
|
|
42625
|
-
y: startTextPosition.y,
|
|
42626
|
-
visible: this._showText,
|
|
42627
|
-
pickable: !1,
|
|
42628
|
-
childrenPickable: !1,
|
|
42629
|
-
textStyle: startTextAlignStyle
|
|
42630
|
-
}), `data-zoom-start-text-${position}`), this._endText = this.maybeAddLabel(this._container, merge$1({}, restEndTextStyle, {
|
|
42631
|
-
text: endTextValue,
|
|
42632
|
-
x: endTextPosition.x,
|
|
42633
|
-
y: endTextPosition.y,
|
|
42634
|
-
visible: this._showText,
|
|
42635
|
-
pickable: !1,
|
|
42636
|
-
childrenPickable: !1,
|
|
42637
|
-
textStyle: endTextAlignStyle
|
|
42638
|
-
}), `data-zoom-end-text-${position}`);
|
|
42639
|
-
}
|
|
42640
|
-
renderText() {
|
|
42641
|
-
let startTextBounds = null,
|
|
42642
|
-
endTextBounds = null;
|
|
42643
|
-
this.setTextAttr(startTextBounds, endTextBounds), startTextBounds = this._startText.AABBBounds, endTextBounds = this._endText.AABBBounds, this.setTextAttr(startTextBounds, endTextBounds), startTextBounds = this._startText.AABBBounds, endTextBounds = this._endText.AABBBounds;
|
|
42644
|
-
const {
|
|
42645
|
-
x1: x1,
|
|
42646
|
-
x2: x2,
|
|
42647
|
-
y1: y1,
|
|
42648
|
-
y2: y2
|
|
42649
|
-
} = startTextBounds,
|
|
42650
|
-
{
|
|
42651
|
-
dx: startTextDx = 0,
|
|
42652
|
-
dy: startTextDy = 0
|
|
42653
|
-
} = this.attribute.startTextStyle;
|
|
42654
|
-
if (new Bounds().set(x1, y1, x2, y2).intersects(endTextBounds)) {
|
|
42655
|
-
const direction = "bottom" === this.attribute.orient || "right" === this.attribute.orient ? -1 : 1;
|
|
42656
|
-
if (this._isHorizontal) {
|
|
42657
|
-
const boundsYDiff = Math.abs(endTextBounds.y1 - endTextBounds.y2);
|
|
42658
|
-
this._startText.setAttribute("dy", startTextDy + direction * (Number.isFinite(boundsYDiff) ? boundsYDiff : 0));
|
|
42659
|
-
} else {
|
|
42660
|
-
const boundsXDiff = Math.abs(endTextBounds.x1 - endTextBounds.x2);
|
|
42661
|
-
this._startText.setAttribute("dx", startTextDx + direction * (Number.isFinite(boundsXDiff) ? boundsXDiff : 0));
|
|
42662
|
-
}
|
|
42663
|
-
} else this._isHorizontal ? this._startText.setAttribute("dy", startTextDy) : this._startText.setAttribute("dx", startTextDx);
|
|
42664
|
-
}
|
|
42665
|
-
getLayoutAttrFromConfig() {
|
|
42666
|
-
var _a, _b, _c, _d, _e, _f;
|
|
42667
|
-
if (this._layoutAttrFromConfig) return this._layoutAttrFromConfig;
|
|
42668
|
-
const {
|
|
42669
|
-
position: positionConfig,
|
|
42670
|
-
size: size,
|
|
42671
|
-
orient: orient,
|
|
42672
|
-
middleHandlerStyle = {},
|
|
42673
|
-
startHandlerStyle = {},
|
|
42674
|
-
endHandlerStyle = {},
|
|
42675
|
-
backgroundStyle = {}
|
|
42676
|
-
} = this.attribute,
|
|
42677
|
-
{
|
|
42678
|
-
width: widthConfig,
|
|
42679
|
-
height: heightConfig
|
|
42680
|
-
} = size,
|
|
42681
|
-
middleHandlerSize = null !== (_b = null === (_a = middleHandlerStyle.background) || void 0 === _a ? void 0 : _a.size) && void 0 !== _b ? _b : 10;
|
|
42682
|
-
let width, height, position;
|
|
42683
|
-
middleHandlerStyle.visible ? this._isHorizontal ? (width = widthConfig, height = heightConfig - middleHandlerSize, position = {
|
|
42684
|
-
x: positionConfig.x,
|
|
42685
|
-
y: positionConfig.y + middleHandlerSize
|
|
42686
|
-
}) : (width = widthConfig - middleHandlerSize, height = heightConfig, position = {
|
|
42687
|
-
x: positionConfig.x + ("left" === orient ? middleHandlerSize : 0),
|
|
42688
|
-
y: positionConfig.y
|
|
42689
|
-
}) : (width = widthConfig, height = heightConfig, position = positionConfig);
|
|
42690
|
-
const startHandlerSize = null !== (_c = startHandlerStyle.size) && void 0 !== _c ? _c : this._isHorizontal ? height : width,
|
|
42691
|
-
endHandlerSize = null !== (_d = endHandlerStyle.size) && void 0 !== _d ? _d : this._isHorizontal ? height : width;
|
|
42692
|
-
return startHandlerStyle.visible && (this._isHorizontal ? (width -= (startHandlerSize + endHandlerSize) / 2, position = {
|
|
42693
|
-
x: position.x + startHandlerSize / 2,
|
|
42694
|
-
y: position.y
|
|
42695
|
-
}) : (height -= (startHandlerSize + endHandlerSize) / 2, position = {
|
|
42709
|
+
} = this._getLayoutAttrFromConfig(),
|
|
42710
|
+
group = this._getContainer();
|
|
42711
|
+
this._background = group.createOrUpdateChild("background", Object.assign(Object.assign({
|
|
42696
42712
|
x: position.x,
|
|
42697
|
-
y: position.y
|
|
42698
|
-
})), height += null !== (_e = backgroundStyle.lineWidth / 2) && void 0 !== _e ? _e : 1, width += null !== (_f = backgroundStyle.lineWidth / 2) && void 0 !== _f ? _f : 1, this._layoutAttrFromConfig = {
|
|
42699
|
-
position: position,
|
|
42713
|
+
y: position.y,
|
|
42700
42714
|
width: width,
|
|
42701
|
-
height: height
|
|
42702
|
-
|
|
42715
|
+
height: height,
|
|
42716
|
+
cursor: brushSelect ? "crosshair" : "auto"
|
|
42717
|
+
}, backgroundStyle), {
|
|
42718
|
+
pickable: !zoomLock && (null === (_a = backgroundStyle.pickable) || void 0 === _a || _a)
|
|
42719
|
+
}), "rect");
|
|
42703
42720
|
}
|
|
42704
|
-
|
|
42705
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2
|
|
42706
|
-
this._layoutAttrFromConfig = null;
|
|
42721
|
+
_renderHandler() {
|
|
42722
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
|
|
42707
42723
|
const {
|
|
42708
42724
|
orient: orient,
|
|
42709
|
-
backgroundStyle: backgroundStyle,
|
|
42710
|
-
backgroundChartStyle = {},
|
|
42711
|
-
selectedBackgroundStyle = {},
|
|
42712
|
-
selectedBackgroundChartStyle = {},
|
|
42713
42725
|
middleHandlerStyle = {},
|
|
42714
42726
|
startHandlerStyle = {},
|
|
42715
42727
|
endHandlerStyle = {},
|
|
42716
|
-
brushSelect: brushSelect,
|
|
42717
42728
|
zoomLock: zoomLock
|
|
42718
42729
|
} = this.attribute,
|
|
42719
42730
|
{
|
|
42720
42731
|
start: start,
|
|
42721
42732
|
end: end
|
|
42722
|
-
} = this.
|
|
42733
|
+
} = this._getState(),
|
|
42723
42734
|
{
|
|
42724
42735
|
position: position,
|
|
42725
42736
|
width: width,
|
|
42726
42737
|
height: height
|
|
42727
|
-
} = this.
|
|
42738
|
+
} = this._getLayoutAttrFromConfig(),
|
|
42728
42739
|
startHandlerMinSize = null !== (_a = startHandlerStyle.triggerMinSize) && void 0 !== _a ? _a : 40,
|
|
42729
42740
|
endHandlerMinSize = null !== (_b = endHandlerStyle.triggerMinSize) && void 0 !== _b ? _b : 40,
|
|
42730
|
-
group = this.
|
|
42731
|
-
if (this.
|
|
42732
|
-
x: position.x,
|
|
42733
|
-
y: position.y,
|
|
42734
|
-
width: width,
|
|
42735
|
-
height: height,
|
|
42736
|
-
cursor: brushSelect ? "crosshair" : "auto"
|
|
42737
|
-
}, backgroundStyle), {
|
|
42738
|
-
pickable: !zoomLock && (null === (_c = backgroundStyle.pickable) || void 0 === _c || _c)
|
|
42739
|
-
}), "rect"), (null === (_d = backgroundChartStyle.line) || void 0 === _d ? void 0 : _d.visible) && this.setPreviewAttributes("line", group), (null === (_e = backgroundChartStyle.area) || void 0 === _e ? void 0 : _e.visible) && this.setPreviewAttributes("area", group), brushSelect && this.renderDragMask(), this._isHorizontal ? this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
|
|
42740
|
-
x: position.x + start * width,
|
|
42741
|
-
y: position.y,
|
|
42742
|
-
width: (end - start) * width,
|
|
42743
|
-
height: height,
|
|
42744
|
-
cursor: brushSelect ? "crosshair" : "move"
|
|
42745
|
-
}, selectedBackgroundStyle), {
|
|
42746
|
-
pickable: !zoomLock && (null === (_f = selectedBackgroundChartStyle.pickable) || void 0 === _f || _f)
|
|
42747
|
-
}), "rect") : this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
|
|
42748
|
-
x: position.x,
|
|
42749
|
-
y: position.y + start * height,
|
|
42750
|
-
width: width,
|
|
42751
|
-
height: (end - start) * height,
|
|
42752
|
-
cursor: brushSelect ? "crosshair" : "move"
|
|
42753
|
-
}, selectedBackgroundStyle), {
|
|
42754
|
-
pickable: !zoomLock && (null === (_g = selectedBackgroundStyle.pickable) || void 0 === _g || _g)
|
|
42755
|
-
}), "rect"), (null === (_h = selectedBackgroundChartStyle.line) || void 0 === _h ? void 0 : _h.visible) && this.setSelectedPreviewAttributes("line", group), (null === (_j = selectedBackgroundChartStyle.area) || void 0 === _j ? void 0 : _j.visible) && this.setSelectedPreviewAttributes("area", group), this._isHorizontal) {
|
|
42741
|
+
group = this._getContainer();
|
|
42742
|
+
if (this._isHorizontal) {
|
|
42756
42743
|
if (middleHandlerStyle.visible) {
|
|
42757
|
-
const middleHandlerBackgroundSize = (null === (
|
|
42744
|
+
const middleHandlerBackgroundSize = (null === (_c = middleHandlerStyle.background) || void 0 === _c ? void 0 : _c.size) || 10;
|
|
42758
42745
|
this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign(Object.assign({
|
|
42759
42746
|
x: position.x + start * width,
|
|
42760
42747
|
y: position.y - middleHandlerBackgroundSize,
|
|
42761
42748
|
width: (end - start) * width,
|
|
42762
42749
|
height: middleHandlerBackgroundSize
|
|
42763
|
-
}, null === (
|
|
42764
|
-
pickable: !zoomLock && (null === (
|
|
42750
|
+
}, null === (_d = middleHandlerStyle.background) || void 0 === _d ? void 0 : _d.style), {
|
|
42751
|
+
pickable: !zoomLock && (null === (_g = null === (_f = null === (_e = middleHandlerStyle.background) || void 0 === _e ? void 0 : _e.style) || void 0 === _f ? void 0 : _f.pickable) || void 0 === _g || _g)
|
|
42765
42752
|
}), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
|
|
42766
42753
|
x: position.x + (start + end) / 2 * width,
|
|
42767
42754
|
y: position.y - middleHandlerBackgroundSize / 2,
|
|
42768
42755
|
strokeBoundsBuffer: 0,
|
|
42769
42756
|
angle: 0,
|
|
42770
|
-
symbolType: null !== (
|
|
42757
|
+
symbolType: null !== (_j = null === (_h = middleHandlerStyle.icon) || void 0 === _h ? void 0 : _h.symbolType) && void 0 !== _j ? _j : "square"
|
|
42771
42758
|
}, middleHandlerStyle.icon), {
|
|
42772
|
-
pickable: !zoomLock && (null === (
|
|
42759
|
+
pickable: !zoomLock && (null === (_k = middleHandlerStyle.icon.pickable) || void 0 === _k || _k)
|
|
42773
42760
|
}), "symbol");
|
|
42774
42761
|
}
|
|
42775
42762
|
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
|
|
42776
42763
|
x: position.x + start * width,
|
|
42777
42764
|
y: position.y + height / 2,
|
|
42778
42765
|
size: height,
|
|
42779
|
-
symbolType: null !== (
|
|
42766
|
+
symbolType: null !== (_l = startHandlerStyle.symbolType) && void 0 !== _l ? _l : "square"
|
|
42780
42767
|
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), startHandlerStyle), {
|
|
42781
|
-
pickable: !zoomLock && (null === (
|
|
42768
|
+
pickable: !zoomLock && (null === (_m = startHandlerStyle.pickable) || void 0 === _m || _m)
|
|
42782
42769
|
}), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
|
|
42783
42770
|
x: position.x + end * width,
|
|
42784
42771
|
y: position.y + height / 2,
|
|
42785
42772
|
size: height,
|
|
42786
|
-
symbolType: null !== (
|
|
42773
|
+
symbolType: null !== (_o = endHandlerStyle.symbolType) && void 0 !== _o ? _o : "square"
|
|
42787
42774
|
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), endHandlerStyle), {
|
|
42788
|
-
pickable: !zoomLock && (null === (
|
|
42775
|
+
pickable: !zoomLock && (null === (_p = endHandlerStyle.pickable) || void 0 === _p || _p)
|
|
42789
42776
|
}), "symbol");
|
|
42790
42777
|
const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize),
|
|
42791
42778
|
startHandlerHeight = Math.max(this._startHandler.AABBBounds.height(), startHandlerMinSize),
|
|
@@ -42814,38 +42801,38 @@ let DataZoom$1 = class DataZoom extends AbstractComponent {
|
|
|
42814
42801
|
}), "rect");
|
|
42815
42802
|
} else {
|
|
42816
42803
|
if (middleHandlerStyle.visible) {
|
|
42817
|
-
const middleHandlerBackgroundSize = (null === (
|
|
42804
|
+
const middleHandlerBackgroundSize = (null === (_q = middleHandlerStyle.background) || void 0 === _q ? void 0 : _q.size) || 10;
|
|
42818
42805
|
this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign(Object.assign({
|
|
42819
42806
|
x: "left" === orient ? position.x - middleHandlerBackgroundSize : position.x + width,
|
|
42820
42807
|
y: position.y + start * height,
|
|
42821
42808
|
width: middleHandlerBackgroundSize,
|
|
42822
42809
|
height: (end - start) * height
|
|
42823
|
-
}, null === (
|
|
42824
|
-
pickable: !zoomLock && (null === (
|
|
42810
|
+
}, null === (_r = middleHandlerStyle.background) || void 0 === _r ? void 0 : _r.style), {
|
|
42811
|
+
pickable: !zoomLock && (null === (_u = null === (_t = null === (_s = middleHandlerStyle.background) || void 0 === _s ? void 0 : _s.style) || void 0 === _t ? void 0 : _t.pickable) || void 0 === _u || _u)
|
|
42825
42812
|
}), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
|
|
42826
42813
|
x: "left" === orient ? position.x - middleHandlerBackgroundSize / 2 : position.x + width + middleHandlerBackgroundSize / 2,
|
|
42827
42814
|
y: position.y + (start + end) / 2 * height,
|
|
42828
42815
|
angle: Math.PI / 180 * 90,
|
|
42829
|
-
symbolType: null !== (
|
|
42816
|
+
symbolType: null !== (_w = null === (_v = middleHandlerStyle.icon) || void 0 === _v ? void 0 : _v.symbolType) && void 0 !== _w ? _w : "square",
|
|
42830
42817
|
strokeBoundsBuffer: 0
|
|
42831
42818
|
}, middleHandlerStyle.icon), {
|
|
42832
|
-
pickable: !zoomLock && (null === (
|
|
42819
|
+
pickable: !zoomLock && (null === (_y = null === (_x = middleHandlerStyle.icon) || void 0 === _x ? void 0 : _x.pickable) || void 0 === _y || _y)
|
|
42833
42820
|
}), "symbol");
|
|
42834
42821
|
}
|
|
42835
42822
|
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
|
|
42836
42823
|
x: position.x + width / 2,
|
|
42837
42824
|
y: position.y + start * height,
|
|
42838
42825
|
size: width,
|
|
42839
|
-
symbolType: null !== (
|
|
42826
|
+
symbolType: null !== (_z = startHandlerStyle.symbolType) && void 0 !== _z ? _z : "square"
|
|
42840
42827
|
}, DEFAULT_HANDLER_ATTR_MAP.vertical), startHandlerStyle), {
|
|
42841
|
-
pickable: !zoomLock && (null === (
|
|
42828
|
+
pickable: !zoomLock && (null === (_0 = startHandlerStyle.pickable) || void 0 === _0 || _0)
|
|
42842
42829
|
}), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
|
|
42843
42830
|
x: position.x + width / 2,
|
|
42844
42831
|
y: position.y + end * height,
|
|
42845
42832
|
size: width,
|
|
42846
|
-
symbolType: null !== (
|
|
42833
|
+
symbolType: null !== (_1 = endHandlerStyle.symbolType) && void 0 !== _1 ? _1 : "square"
|
|
42847
42834
|
}, DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), {
|
|
42848
|
-
pickable: !zoomLock && (null === (
|
|
42835
|
+
pickable: !zoomLock && (null === (_2 = endHandlerStyle.pickable) || void 0 === _2 || _2)
|
|
42849
42836
|
}), "symbol");
|
|
42850
42837
|
const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize),
|
|
42851
42838
|
startHandlerHeight = Math.max(this._startHandler.AABBBounds.height(), startHandlerMinSize),
|
|
@@ -42873,9 +42860,107 @@ let DataZoom$1 = class DataZoom extends AbstractComponent {
|
|
|
42873
42860
|
pickable: !zoomLock
|
|
42874
42861
|
}), "rect");
|
|
42875
42862
|
}
|
|
42876
|
-
this._showText && this.renderText();
|
|
42877
42863
|
}
|
|
42878
|
-
|
|
42864
|
+
_renderSelectedBackground() {
|
|
42865
|
+
var _a, _b;
|
|
42866
|
+
const {
|
|
42867
|
+
selectedBackgroundStyle = {},
|
|
42868
|
+
selectedBackgroundChartStyle = {},
|
|
42869
|
+
brushSelect: brushSelect,
|
|
42870
|
+
zoomLock: zoomLock
|
|
42871
|
+
} = this.attribute,
|
|
42872
|
+
{
|
|
42873
|
+
start: start,
|
|
42874
|
+
end: end
|
|
42875
|
+
} = this._getState(),
|
|
42876
|
+
{
|
|
42877
|
+
position: position,
|
|
42878
|
+
width: width,
|
|
42879
|
+
height: height
|
|
42880
|
+
} = this._getLayoutAttrFromConfig(),
|
|
42881
|
+
group = this._getContainer();
|
|
42882
|
+
this._isHorizontal ? this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
|
|
42883
|
+
x: position.x + start * width,
|
|
42884
|
+
y: position.y,
|
|
42885
|
+
width: (end - start) * width,
|
|
42886
|
+
height: height,
|
|
42887
|
+
cursor: brushSelect ? "crosshair" : "move"
|
|
42888
|
+
}, selectedBackgroundStyle), {
|
|
42889
|
+
pickable: !zoomLock && (null === (_a = selectedBackgroundChartStyle.pickable) || void 0 === _a || _a)
|
|
42890
|
+
}), "rect") : this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
|
|
42891
|
+
x: position.x,
|
|
42892
|
+
y: position.y + start * height,
|
|
42893
|
+
width: width,
|
|
42894
|
+
height: (end - start) * height,
|
|
42895
|
+
cursor: brushSelect ? "crosshair" : "move"
|
|
42896
|
+
}, selectedBackgroundStyle), {
|
|
42897
|
+
pickable: !zoomLock && (null === (_b = selectedBackgroundStyle.pickable) || void 0 === _b || _b)
|
|
42898
|
+
}), "rect");
|
|
42899
|
+
}
|
|
42900
|
+
_setPreviewAttributes(type, group) {
|
|
42901
|
+
this._previewGroup || (this._previewGroup = group.createOrUpdateChild("previewGroup", {
|
|
42902
|
+
pickable: !1
|
|
42903
|
+
}, "group")), "line" === type ? this._previewLine = this._previewGroup.createOrUpdateChild("previewLine", {}, "line") : this._previewArea = this._previewGroup.createOrUpdateChild("previewArea", {
|
|
42904
|
+
curveType: "basis"
|
|
42905
|
+
}, "area");
|
|
42906
|
+
const {
|
|
42907
|
+
backgroundChartStyle = {}
|
|
42908
|
+
} = this.attribute;
|
|
42909
|
+
"line" === type && this._previewLine.setAttributes(Object.assign({
|
|
42910
|
+
points: this._getPreviewLinePoints(),
|
|
42911
|
+
curveType: "basis",
|
|
42912
|
+
pickable: !1
|
|
42913
|
+
}, backgroundChartStyle.line)), "area" === type && this._previewArea.setAttributes(Object.assign({
|
|
42914
|
+
points: this._getPreviewAreaPoints(),
|
|
42915
|
+
curveType: "basis",
|
|
42916
|
+
pickable: !1
|
|
42917
|
+
}, backgroundChartStyle.area));
|
|
42918
|
+
}
|
|
42919
|
+
_setSelectedPreviewClipAttributes(type, group) {
|
|
42920
|
+
this._selectedPreviewGroupClip || (this._selectedPreviewGroupClip = group.createOrUpdateChild("selectedPreviewGroupClip", {
|
|
42921
|
+
pickable: !1
|
|
42922
|
+
}, "group"), this._selectedPreviewGroup = this._selectedPreviewGroupClip.createOrUpdateChild("selectedPreviewGroup", {}, "group"));
|
|
42923
|
+
const {
|
|
42924
|
+
start: start,
|
|
42925
|
+
end: end
|
|
42926
|
+
} = this._getState(),
|
|
42927
|
+
{
|
|
42928
|
+
position: position,
|
|
42929
|
+
width: width,
|
|
42930
|
+
height: height
|
|
42931
|
+
} = this._getLayoutAttrFromConfig();
|
|
42932
|
+
this._selectedPreviewGroupClip.setAttributes({
|
|
42933
|
+
x: this._isHorizontal ? position.x + start * width : position.x,
|
|
42934
|
+
y: this._isHorizontal ? position.y : position.y + start * height,
|
|
42935
|
+
width: this._isHorizontal ? (end - start) * width : width,
|
|
42936
|
+
height: this._isHorizontal ? height : (end - start) * height,
|
|
42937
|
+
clip: !0,
|
|
42938
|
+
pickable: !1
|
|
42939
|
+
}), this._selectedPreviewGroup.setAttributes({
|
|
42940
|
+
x: -(this._isHorizontal ? position.x + start * width : position.x),
|
|
42941
|
+
y: -(this._isHorizontal ? position.y : position.y + start * height),
|
|
42942
|
+
width: this._isHorizontal ? (end - start) * width : width,
|
|
42943
|
+
height: this._isHorizontal ? height : (end - start) * height,
|
|
42944
|
+
pickable: !1
|
|
42945
|
+
});
|
|
42946
|
+
}
|
|
42947
|
+
_setSelectedPreviewAttributes(type) {
|
|
42948
|
+
const {
|
|
42949
|
+
selectedBackgroundChartStyle = {}
|
|
42950
|
+
} = this.attribute;
|
|
42951
|
+
"line" === type ? this._selectedPreviewLine = this._selectedPreviewGroup.createOrUpdateChild("selectedPreviewLine", {}, "line") : this._selectedPreviewArea = this._selectedPreviewGroup.createOrUpdateChild("selectedPreviewArea", {
|
|
42952
|
+
curveType: "basis"
|
|
42953
|
+
}, "area"), "line" === type && this._selectedPreviewLine.setAttributes(Object.assign({
|
|
42954
|
+
points: this._getPreviewLinePoints(),
|
|
42955
|
+
curveType: "basis",
|
|
42956
|
+
pickable: !1
|
|
42957
|
+
}, selectedBackgroundChartStyle.line)), "area" === type && this._selectedPreviewArea.setAttributes(Object.assign({
|
|
42958
|
+
points: this._getPreviewAreaPoints(),
|
|
42959
|
+
curveType: "basis",
|
|
42960
|
+
pickable: !1
|
|
42961
|
+
}, selectedBackgroundChartStyle.area));
|
|
42962
|
+
}
|
|
42963
|
+
_computeBasePoints() {
|
|
42879
42964
|
const {
|
|
42880
42965
|
orient: orient
|
|
42881
42966
|
} = this.attribute,
|
|
@@ -42883,7 +42968,7 @@ let DataZoom$1 = class DataZoom extends AbstractComponent {
|
|
|
42883
42968
|
position: position,
|
|
42884
42969
|
width: width,
|
|
42885
42970
|
height: height
|
|
42886
|
-
} = this.
|
|
42971
|
+
} = this._getLayoutAttrFromConfig();
|
|
42887
42972
|
let basePointStart, basePointEnd;
|
|
42888
42973
|
return this._isHorizontal ? (basePointStart = [{
|
|
42889
42974
|
x: position.x,
|
|
@@ -42908,7 +42993,7 @@ let DataZoom$1 = class DataZoom extends AbstractComponent {
|
|
|
42908
42993
|
basePointEnd: basePointEnd
|
|
42909
42994
|
};
|
|
42910
42995
|
}
|
|
42911
|
-
|
|
42996
|
+
_simplifyPoints(points) {
|
|
42912
42997
|
var _a;
|
|
42913
42998
|
if (points.length > 1e4) {
|
|
42914
42999
|
const tolerance = null !== (_a = this.attribute.tolerance) && void 0 !== _a ? _a : this._previewData.length / 1e4;
|
|
@@ -42916,20 +43001,20 @@ let DataZoom$1 = class DataZoom extends AbstractComponent {
|
|
|
42916
43001
|
}
|
|
42917
43002
|
return points;
|
|
42918
43003
|
}
|
|
42919
|
-
|
|
43004
|
+
_getPreviewLinePoints() {
|
|
42920
43005
|
let previewPoints = this._previewData.map(d => ({
|
|
42921
43006
|
x: this._previewPointsX && this._previewPointsX(d),
|
|
42922
43007
|
y: this._previewPointsY && this._previewPointsY(d)
|
|
42923
43008
|
}));
|
|
42924
43009
|
if (0 === previewPoints.length) return previewPoints;
|
|
42925
|
-
previewPoints = this.
|
|
43010
|
+
previewPoints = this._simplifyPoints(previewPoints);
|
|
42926
43011
|
const {
|
|
42927
43012
|
basePointStart: basePointStart,
|
|
42928
43013
|
basePointEnd: basePointEnd
|
|
42929
|
-
} = this.
|
|
43014
|
+
} = this._computeBasePoints();
|
|
42930
43015
|
return basePointStart.concat(previewPoints).concat(basePointEnd);
|
|
42931
43016
|
}
|
|
42932
|
-
|
|
43017
|
+
_getPreviewAreaPoints() {
|
|
42933
43018
|
let previewPoints = this._previewData.map(d => ({
|
|
42934
43019
|
x: this._previewPointsX && this._previewPointsX(d),
|
|
42935
43020
|
y: this._previewPointsY && this._previewPointsY(d),
|
|
@@ -42937,99 +43022,459 @@ let DataZoom$1 = class DataZoom extends AbstractComponent {
|
|
|
42937
43022
|
y1: this._previewPointsY1 && this._previewPointsY1(d)
|
|
42938
43023
|
}));
|
|
42939
43024
|
if (0 === previewPoints.length) return previewPoints;
|
|
42940
|
-
previewPoints = this.
|
|
43025
|
+
previewPoints = this._simplifyPoints(previewPoints);
|
|
42941
43026
|
const {
|
|
42942
43027
|
basePointStart: basePointStart,
|
|
42943
43028
|
basePointEnd: basePointEnd
|
|
42944
|
-
} = this.
|
|
43029
|
+
} = this._computeBasePoints();
|
|
42945
43030
|
return basePointStart.concat(previewPoints).concat(basePointEnd);
|
|
42946
43031
|
}
|
|
42947
|
-
|
|
42948
|
-
|
|
42949
|
-
|
|
42950
|
-
|
|
42951
|
-
|
|
42952
|
-
|
|
42953
|
-
|
|
42954
|
-
|
|
42955
|
-
|
|
42956
|
-
|
|
42957
|
-
|
|
42958
|
-
|
|
42959
|
-
|
|
42960
|
-
|
|
42961
|
-
|
|
42962
|
-
|
|
42963
|
-
|
|
42964
|
-
|
|
43032
|
+
renderText() {
|
|
43033
|
+
let startTextBounds = null,
|
|
43034
|
+
endTextBounds = null;
|
|
43035
|
+
if (this._setTextAttr(startTextBounds, endTextBounds), this._showText) {
|
|
43036
|
+
startTextBounds = this._startText.AABBBounds, endTextBounds = this._endText.AABBBounds, this._setTextAttr(startTextBounds, endTextBounds), startTextBounds = this._startText.AABBBounds, endTextBounds = this._endText.AABBBounds;
|
|
43037
|
+
const {
|
|
43038
|
+
x1: x1,
|
|
43039
|
+
x2: x2,
|
|
43040
|
+
y1: y1,
|
|
43041
|
+
y2: y2
|
|
43042
|
+
} = startTextBounds,
|
|
43043
|
+
{
|
|
43044
|
+
dx: startTextDx = 0,
|
|
43045
|
+
dy: startTextDy = 0
|
|
43046
|
+
} = this.attribute.startTextStyle;
|
|
43047
|
+
if (new Bounds().set(x1, y1, x2, y2).intersects(endTextBounds)) {
|
|
43048
|
+
const direction = "bottom" === this.attribute.orient || "right" === this.attribute.orient ? -1 : 1;
|
|
43049
|
+
this._isHorizontal ? this._startText.setAttribute("dy", startTextDy + direction * Math.abs(endTextBounds.y1 - endTextBounds.y2)) : this._startText.setAttribute("dx", startTextDx + direction * Math.abs(endTextBounds.x1 - endTextBounds.x2));
|
|
43050
|
+
} else this._isHorizontal ? this._startText.setAttribute("dy", startTextDy) : this._startText.setAttribute("dx", startTextDx);
|
|
43051
|
+
}
|
|
42965
43052
|
}
|
|
42966
|
-
|
|
42967
|
-
|
|
42968
|
-
pickable: !1
|
|
42969
|
-
}, "group"), this._selectedPreviewGroup = this._selectedPreviewGroupClip.createOrUpdateChild("selectedPreviewGroup", {}, "group")), "line" === type ? this._selectedPreviewLine = this._selectedPreviewGroup.createOrUpdateChild("selectedPreviewLine", {}, "line") : this._selectedPreviewArea = this._selectedPreviewGroup.createOrUpdateChild("selectedPreviewArea", {
|
|
42970
|
-
curveType: "basis"
|
|
42971
|
-
}, "area");
|
|
43053
|
+
_setTextAttr(startTextBounds, endTextBounds) {
|
|
43054
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
42972
43055
|
const {
|
|
42973
|
-
|
|
43056
|
+
startTextStyle: startTextStyle,
|
|
43057
|
+
endTextStyle: endTextStyle
|
|
42974
43058
|
} = this.attribute,
|
|
43059
|
+
{
|
|
43060
|
+
formatMethod: startTextFormat
|
|
43061
|
+
} = startTextStyle,
|
|
43062
|
+
restStartTextStyle = __rest$1(startTextStyle, ["formatMethod"]),
|
|
43063
|
+
{
|
|
43064
|
+
formatMethod: endTextFormat
|
|
43065
|
+
} = endTextStyle,
|
|
43066
|
+
restEndTextStyle = __rest$1(endTextStyle, ["formatMethod"]),
|
|
42975
43067
|
{
|
|
42976
43068
|
start: start,
|
|
42977
43069
|
end: end
|
|
42978
|
-
} = this.
|
|
42979
|
-
|
|
43070
|
+
} = this._getState();
|
|
43071
|
+
this._startValue = this._statePointToData(start), this._endValue = this._statePointToData(end);
|
|
43072
|
+
const {
|
|
42980
43073
|
position: position,
|
|
42981
43074
|
width: width,
|
|
42982
43075
|
height: height
|
|
42983
|
-
} = this.
|
|
42984
|
-
|
|
42985
|
-
|
|
42986
|
-
|
|
42987
|
-
|
|
42988
|
-
|
|
42989
|
-
|
|
42990
|
-
|
|
42991
|
-
|
|
42992
|
-
|
|
42993
|
-
|
|
42994
|
-
|
|
42995
|
-
|
|
42996
|
-
|
|
42997
|
-
|
|
42998
|
-
|
|
42999
|
-
|
|
43000
|
-
|
|
43001
|
-
|
|
43002
|
-
|
|
43003
|
-
|
|
43004
|
-
|
|
43005
|
-
}
|
|
43076
|
+
} = this._getLayoutAttrFromConfig(),
|
|
43077
|
+
startTextValue = startTextFormat ? startTextFormat(this._startValue) : this._startValue,
|
|
43078
|
+
endTextValue = endTextFormat ? endTextFormat(this._endValue) : this._endValue,
|
|
43079
|
+
componentBoundsLike = {
|
|
43080
|
+
x1: position.x,
|
|
43081
|
+
y1: position.y,
|
|
43082
|
+
x2: position.x + width,
|
|
43083
|
+
y2: position.y + height
|
|
43084
|
+
};
|
|
43085
|
+
let startTextPosition, endTextPosition, startTextAlignStyle, endTextAlignStyle;
|
|
43086
|
+
this._isHorizontal ? (startTextPosition = {
|
|
43087
|
+
x: position.x + start * width,
|
|
43088
|
+
y: position.y + height / 2
|
|
43089
|
+
}, endTextPosition = {
|
|
43090
|
+
x: position.x + end * width,
|
|
43091
|
+
y: position.y + height / 2
|
|
43092
|
+
}, startTextAlignStyle = {
|
|
43093
|
+
textAlign: isTextOverflow(componentBoundsLike, startTextBounds, "start", this._isHorizontal) ? "left" : "right",
|
|
43094
|
+
textBaseline: null !== (_b = null === (_a = null == restStartTextStyle ? void 0 : restStartTextStyle.textStyle) || void 0 === _a ? void 0 : _a.textBaseline) && void 0 !== _b ? _b : "middle"
|
|
43095
|
+
}, endTextAlignStyle = {
|
|
43096
|
+
textAlign: isTextOverflow(componentBoundsLike, endTextBounds, "end", this._isHorizontal) ? "right" : "left",
|
|
43097
|
+
textBaseline: null !== (_d = null === (_c = null == restEndTextStyle ? void 0 : restEndTextStyle.textStyle) || void 0 === _c ? void 0 : _c.textBaseline) && void 0 !== _d ? _d : "middle"
|
|
43098
|
+
}) : (startTextPosition = {
|
|
43099
|
+
x: position.x + width / 2,
|
|
43100
|
+
y: position.y + start * height
|
|
43101
|
+
}, endTextPosition = {
|
|
43102
|
+
x: position.x + width / 2,
|
|
43103
|
+
y: position.y + end * height
|
|
43104
|
+
}, startTextAlignStyle = {
|
|
43105
|
+
textAlign: null !== (_f = null === (_e = null == restStartTextStyle ? void 0 : restStartTextStyle.textStyle) || void 0 === _e ? void 0 : _e.textAlign) && void 0 !== _f ? _f : "center",
|
|
43106
|
+
textBaseline: isTextOverflow(componentBoundsLike, startTextBounds, "start", this._isHorizontal) ? "top" : "bottom"
|
|
43107
|
+
}, endTextAlignStyle = {
|
|
43108
|
+
textAlign: null !== (_h = null === (_g = null == restEndTextStyle ? void 0 : restEndTextStyle.textStyle) || void 0 === _g ? void 0 : _g.textAlign) && void 0 !== _h ? _h : "center",
|
|
43109
|
+
textBaseline: isTextOverflow(componentBoundsLike, endTextBounds, "end", this._isHorizontal) ? "bottom" : "top"
|
|
43110
|
+
}), this._startText = this._maybeAddLabel(this._getContainer(), merge$1({}, restStartTextStyle, {
|
|
43111
|
+
text: startTextValue,
|
|
43112
|
+
x: startTextPosition.x,
|
|
43113
|
+
y: startTextPosition.y,
|
|
43114
|
+
visible: this._showText,
|
|
43115
|
+
pickable: !1,
|
|
43116
|
+
childrenPickable: !1,
|
|
43117
|
+
textStyle: startTextAlignStyle
|
|
43118
|
+
}), "data-zoom-start-text"), this._endText = this._maybeAddLabel(this._getContainer(), merge$1({}, restEndTextStyle, {
|
|
43119
|
+
text: endTextValue,
|
|
43120
|
+
x: endTextPosition.x,
|
|
43121
|
+
y: endTextPosition.y,
|
|
43122
|
+
visible: this._showText,
|
|
43123
|
+
pickable: !1,
|
|
43124
|
+
childrenPickable: !1,
|
|
43125
|
+
textStyle: endTextAlignStyle
|
|
43126
|
+
}), "data-zoom-end-text");
|
|
43006
43127
|
}
|
|
43007
|
-
|
|
43008
|
-
let labelShape =
|
|
43009
|
-
return labelShape ? labelShape.setAttributes(attributes) : (labelShape = new Tag(attributes), labelShape.name = name
|
|
43128
|
+
_maybeAddLabel(container, attributes, name) {
|
|
43129
|
+
let labelShape = container.find(node => node.name === name, !0);
|
|
43130
|
+
return labelShape ? labelShape.setAttributes(attributes) : (labelShape = new Tag(attributes), labelShape.name = name, container.add(labelShape)), labelShape;
|
|
43010
43131
|
}
|
|
43011
|
-
|
|
43132
|
+
}
|
|
43133
|
+
|
|
43134
|
+
const delayMap$2 = {
|
|
43135
|
+
debounce: debounce,
|
|
43136
|
+
throttle: throttle
|
|
43137
|
+
};
|
|
43138
|
+
class DataZoomInteraction extends EventEmitter {
|
|
43139
|
+
constructor(props) {
|
|
43140
|
+
super(), this._activeState = !1, this._activeCache = {
|
|
43141
|
+
startPos: {
|
|
43142
|
+
x: 0,
|
|
43143
|
+
y: 0
|
|
43144
|
+
},
|
|
43145
|
+
lastPos: {
|
|
43146
|
+
x: 0,
|
|
43147
|
+
y: 0
|
|
43148
|
+
}
|
|
43149
|
+
}, this._layoutCache = {
|
|
43150
|
+
attPos: "x",
|
|
43151
|
+
attSize: "width",
|
|
43152
|
+
size: 0
|
|
43153
|
+
}, this._handleTouchMove = e => {
|
|
43154
|
+
this._activeState && e.preventDefault();
|
|
43155
|
+
}, this._onHandlerPointerDown = (e, tag) => {
|
|
43156
|
+
this.clearDragEvents(), "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);
|
|
43157
|
+
const evtTarget = "browser" === vglobal.env ? vglobal : this.stage,
|
|
43158
|
+
triggers = getEndTriggersOfDrag();
|
|
43159
|
+
evtTarget.addEventListener("pointermove", this._onHandlerPointerMove, {
|
|
43160
|
+
capture: !0
|
|
43161
|
+
}), this.on("pointermove", this._onHandlerPointerMove, {
|
|
43162
|
+
capture: !0
|
|
43163
|
+
}), triggers.forEach(trigger => {
|
|
43164
|
+
evtTarget.addEventListener(trigger, this._onHandlerPointerUp);
|
|
43165
|
+
});
|
|
43166
|
+
}, this._pointerMove = e => {
|
|
43167
|
+
const {
|
|
43168
|
+
brushSelect: brushSelect
|
|
43169
|
+
} = this.attribute,
|
|
43170
|
+
{
|
|
43171
|
+
position: position
|
|
43172
|
+
} = this._getLayoutAttrFromConfig(),
|
|
43173
|
+
pos = this._eventPosToStagePos(e),
|
|
43174
|
+
{
|
|
43175
|
+
attPos: attPos,
|
|
43176
|
+
size: size,
|
|
43177
|
+
attSize: attSize
|
|
43178
|
+
} = this._layoutCache,
|
|
43179
|
+
dis = (pos[attPos] - this._activeCache.lastPos[attPos]) / size,
|
|
43180
|
+
statePos = (pos[attPos] - position[attPos]) / this._getLayoutAttrFromConfig()[attSize];
|
|
43181
|
+
let {
|
|
43182
|
+
start: start,
|
|
43183
|
+
end: end
|
|
43184
|
+
} = this._getState(),
|
|
43185
|
+
shouldRender = !0;
|
|
43186
|
+
this._activeState && (this._activeTag === DataZoomActiveTag.middleHandler ? ({
|
|
43187
|
+
start: start,
|
|
43188
|
+
end: end
|
|
43189
|
+
} = this._moveZoomWithMiddle(dis)) : this._activeTag === DataZoomActiveTag.startHandler ? ({
|
|
43190
|
+
start: start,
|
|
43191
|
+
end: end
|
|
43192
|
+
} = this._moveZoomWithHandler(statePos, "start")) : this._activeTag === DataZoomActiveTag.endHandler ? ({
|
|
43193
|
+
start: start,
|
|
43194
|
+
end: end
|
|
43195
|
+
} = this._moveZoomWithHandler(statePos, "end")) : this._activeTag === DataZoomActiveTag.background && brushSelect && (({
|
|
43196
|
+
start: start,
|
|
43197
|
+
end: end
|
|
43198
|
+
} = this._moveZoomWithBackground(statePos)), shouldRender = !1, this._dispatchEvent(IDataZoomInteractiveEvent.maskUpdate)), this._activeCache.lastPos = pos), this._getState().start === start && this._getState().end === end || (this._setStateAttr(start, end), this._dispatchEvent(IDataZoomInteractiveEvent.stateUpdate, {
|
|
43199
|
+
start: this._getState().start,
|
|
43200
|
+
end: this._getState().end,
|
|
43201
|
+
shouldRender: shouldRender,
|
|
43202
|
+
tag: this._activeTag
|
|
43203
|
+
}), this.attribute.realTime && this._dispatchEvent(IDataZoomInteractiveEvent.dataZoomUpdate, {
|
|
43204
|
+
start: this._getState().start,
|
|
43205
|
+
end: this._getState().end,
|
|
43206
|
+
shouldRender: !0,
|
|
43207
|
+
tag: this._activeTag
|
|
43208
|
+
}));
|
|
43209
|
+
}, this._onHandlerPointerUp = e => {
|
|
43210
|
+
this._activeState && this._activeTag === DataZoomActiveTag.background && (this._setStateAttr(this._getState().start, this._getState().end), this._dispatchEvent(IDataZoomInteractiveEvent.stateUpdate, {
|
|
43211
|
+
start: this._getState().start,
|
|
43212
|
+
end: this._getState().end,
|
|
43213
|
+
shouldRender: !0,
|
|
43214
|
+
tag: this._activeTag
|
|
43215
|
+
})), this._activeState = !1, this._dispatchEvent(IDataZoomInteractiveEvent.dataZoomUpdate, {
|
|
43216
|
+
start: this._getState().start,
|
|
43217
|
+
end: this._getState().end,
|
|
43218
|
+
shouldRender: !0,
|
|
43219
|
+
tag: this._activeTag
|
|
43220
|
+
}), this.clearDragEvents();
|
|
43221
|
+
}, this._initAttrs(props);
|
|
43222
|
+
}
|
|
43223
|
+
setAttributes(props) {
|
|
43224
|
+
var _a, _b, _c, _d, _e, _f;
|
|
43225
|
+
this._initAttrs(props), this._onHandlerPointerMove = 0 === (null !== (_b = null === (_a = this.attribute) || void 0 === _a ? void 0 : _a.delayTime) && void 0 !== _b ? _b : 0) ? this._pointerMove : delayMap$2[null !== (_d = null === (_c = this.attribute) || void 0 === _c ? void 0 : _c.delayType) && void 0 !== _d ? _d : "debounce"](this._pointerMove, null !== (_f = null === (_e = this.attribute) || void 0 === _e ? void 0 : _e.delayTime) && void 0 !== _f ? _f : 0);
|
|
43226
|
+
}
|
|
43227
|
+
_initAttrs(props) {
|
|
43228
|
+
this.stage = props.stage, this.attribute = props.attribute, this._startHandlerMask = props.startHandlerMask, this._endHandlerMask = props.endHandlerMask, this._middleHandlerSymbol = props.middleHandlerSymbol, this._middleHandlerRect = props.middleHandlerRect, this._selectedBackground = props.selectedBackground, this._background = props.background, this._previewGroup = props.previewGroup, this._selectedPreviewGroup = props.selectedPreviewGroup, this._getLayoutAttrFromConfig = props.getLayoutAttrFromConfig, this._getState = props.getState, this._setState = props.setState;
|
|
43012
43229
|
const {
|
|
43013
|
-
|
|
43014
|
-
|
|
43230
|
+
width: width,
|
|
43231
|
+
height: height
|
|
43232
|
+
} = this._getLayoutAttrFromConfig();
|
|
43233
|
+
this._spanCache = this._getState().end - this._getState().start;
|
|
43234
|
+
const isHorizontal = "top" === this.attribute.orient || "bottom" === this.attribute.orient;
|
|
43235
|
+
this._layoutCache.size = isHorizontal ? width : height, this._layoutCache.attPos = isHorizontal ? "x" : "y", this._layoutCache.attSize = isHorizontal ? "width" : "height", this._getGlobalTransMatrix = props.getGlobalTransMatrix;
|
|
43236
|
+
}
|
|
43237
|
+
clearDragEvents() {
|
|
43238
|
+
const evtTarget = "browser" === vglobal.env ? vglobal : this.stage,
|
|
43239
|
+
triggers = getEndTriggersOfDrag();
|
|
43240
|
+
evtTarget.removeEventListener("pointermove", this._onHandlerPointerMove, {
|
|
43241
|
+
capture: !0
|
|
43242
|
+
}), triggers.forEach(trigger => {
|
|
43243
|
+
evtTarget.removeEventListener(trigger, this._onHandlerPointerUp);
|
|
43244
|
+
}), this.off("pointermove", this._onHandlerPointerMove, {
|
|
43245
|
+
capture: !0
|
|
43246
|
+
});
|
|
43247
|
+
}
|
|
43248
|
+
clearVGlobalEvents() {
|
|
43249
|
+
("browser" === vglobal.env ? vglobal : this.stage).addEventListener("touchmove", this._handleTouchMove, {
|
|
43250
|
+
passive: !1
|
|
43251
|
+
});
|
|
43252
|
+
}
|
|
43253
|
+
bindEvents() {
|
|
43254
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
43255
|
+
const {
|
|
43256
|
+
brushSelect: brushSelect
|
|
43015
43257
|
} = this.attribute;
|
|
43016
|
-
|
|
43258
|
+
null === (_a = this._startHandlerMask) || void 0 === _a || _a.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "start")), null === (_b = this._endHandlerMask) || void 0 === _b || _b.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "end")), null === (_c = this._middleHandlerSymbol) || void 0 === _c || _c.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "middleSymbol")), null === (_d = this._middleHandlerRect) || void 0 === _d || _d.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "middleRect"));
|
|
43259
|
+
const selectedTag = brushSelect ? "background" : "middleRect";
|
|
43260
|
+
null === (_e = this._selectedBackground) || void 0 === _e || _e.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, selectedTag)), brushSelect && (null === (_f = this._background) || void 0 === _f || _f.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "background"))), brushSelect && (null === (_g = this._previewGroup) || void 0 === _g || _g.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "background"))), null === (_h = this._selectedPreviewGroup) || void 0 === _h || _h.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, selectedTag)), ("browser" === vglobal.env ? vglobal : this.stage).addEventListener("touchmove", this._handleTouchMove, {
|
|
43261
|
+
passive: !1
|
|
43262
|
+
});
|
|
43263
|
+
}
|
|
43264
|
+
_setStateAttr(start, end) {
|
|
43265
|
+
const {
|
|
43266
|
+
zoomLock = !1,
|
|
43267
|
+
minSpan = 0,
|
|
43268
|
+
maxSpan = 1
|
|
43269
|
+
} = this.attribute,
|
|
43270
|
+
span = end - start;
|
|
43271
|
+
span !== this._spanCache && (zoomLock || span < minSpan || span > maxSpan) || (this._spanCache = span, this._setState({
|
|
43272
|
+
start: start,
|
|
43273
|
+
end: end
|
|
43274
|
+
}));
|
|
43275
|
+
}
|
|
43276
|
+
_moveZoomWithMiddle(dis) {
|
|
43277
|
+
const {
|
|
43278
|
+
start: staetState,
|
|
43279
|
+
end: endState
|
|
43280
|
+
} = this._getState();
|
|
43281
|
+
return dis > 0 && endState + dis > 1 ? dis = 1 - endState : dis < 0 && staetState + dis < 0 && (dis = -staetState), {
|
|
43282
|
+
start: clamp$1(staetState + dis, 0, 1),
|
|
43283
|
+
end: clamp$1(endState + dis, 0, 1)
|
|
43284
|
+
};
|
|
43285
|
+
}
|
|
43286
|
+
_moveZoomWithHandler(statePos, handler) {
|
|
43287
|
+
const {
|
|
43288
|
+
start: start,
|
|
43289
|
+
end: end
|
|
43290
|
+
} = this._getState();
|
|
43291
|
+
let newStart = start,
|
|
43292
|
+
newEnd = end;
|
|
43293
|
+
return "start" === handler ? statePos > end ? (newStart = end, newEnd = statePos, this._activeTag = DataZoomActiveTag.endHandler) : newStart = statePos : "end" === handler && (statePos < start ? (newEnd = start, newStart = statePos, this._activeTag = DataZoomActiveTag.startHandler) : newEnd = statePos), {
|
|
43294
|
+
start: clamp$1(newStart, 0, 1),
|
|
43295
|
+
end: clamp$1(newEnd, 0, 1)
|
|
43296
|
+
};
|
|
43297
|
+
}
|
|
43298
|
+
_moveZoomWithBackground(statePos) {
|
|
43299
|
+
const {
|
|
43300
|
+
position: position
|
|
43301
|
+
} = this._getLayoutAttrFromConfig(),
|
|
43302
|
+
{
|
|
43303
|
+
attSize: attSize
|
|
43304
|
+
} = this._layoutCache,
|
|
43305
|
+
startPos = (this._activeCache.startPos[this._layoutCache.attPos] - position[this._layoutCache.attPos]) / this._getLayoutAttrFromConfig()[attSize],
|
|
43306
|
+
endPos = statePos;
|
|
43307
|
+
let start = clamp$1(startPos, 0, 1),
|
|
43308
|
+
end = clamp$1(endPos, 0, 1);
|
|
43309
|
+
return start > end && ([start, end] = [end, start]), {
|
|
43310
|
+
start: start,
|
|
43311
|
+
end: end
|
|
43312
|
+
};
|
|
43313
|
+
}
|
|
43314
|
+
_eventPosToStagePos(e) {
|
|
43315
|
+
var _a, _b;
|
|
43316
|
+
const result = {
|
|
43317
|
+
x: 0,
|
|
43318
|
+
y: 0
|
|
43319
|
+
},
|
|
43320
|
+
stagePoints = null !== (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.eventPointTransform(e)) && void 0 !== _b ? _b : {
|
|
43321
|
+
x: 0,
|
|
43322
|
+
y: 0
|
|
43323
|
+
};
|
|
43324
|
+
return this._getGlobalTransMatrix().transformPoint(stagePoints, result), result;
|
|
43325
|
+
}
|
|
43326
|
+
_dispatchEvent(eventName, details) {
|
|
43327
|
+
this.emit(eventName, details);
|
|
43328
|
+
}
|
|
43329
|
+
}
|
|
43330
|
+
|
|
43331
|
+
function loadDataZoomComponent() {
|
|
43332
|
+
loadTagComponent(), registerRect(), registerSymbol(), registerArea(), registerLine();
|
|
43333
|
+
}
|
|
43334
|
+
|
|
43335
|
+
loadDataZoomComponent();
|
|
43336
|
+
let DataZoom$1 = class DataZoom extends AbstractComponent {
|
|
43337
|
+
constructor(attributes, options) {
|
|
43338
|
+
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, DataZoom.defaultAttributes, attributes)), this.name = "dataZoom", this._state = {
|
|
43339
|
+
start: 0,
|
|
43340
|
+
end: 1
|
|
43341
|
+
}, this.getLayoutAttrFromConfig = () => {
|
|
43342
|
+
var _a, _b, _c, _d, _e, _f;
|
|
43343
|
+
if (this._layoutCacheFromConfig) return this._layoutCacheFromConfig;
|
|
43344
|
+
const {
|
|
43345
|
+
position: positionConfig,
|
|
43346
|
+
size: size,
|
|
43347
|
+
orient: orient,
|
|
43348
|
+
middleHandlerStyle = {},
|
|
43349
|
+
startHandlerStyle = {},
|
|
43350
|
+
endHandlerStyle = {},
|
|
43351
|
+
backgroundStyle = {}
|
|
43352
|
+
} = this.attribute,
|
|
43353
|
+
{
|
|
43354
|
+
width: widthConfig,
|
|
43355
|
+
height: heightConfig
|
|
43356
|
+
} = size,
|
|
43357
|
+
middleHandlerSize = null !== (_b = null === (_a = middleHandlerStyle.background) || void 0 === _a ? void 0 : _a.size) && void 0 !== _b ? _b : 10;
|
|
43358
|
+
let width, height, position;
|
|
43359
|
+
middleHandlerStyle.visible ? this._isHorizontal ? (width = widthConfig, height = heightConfig - middleHandlerSize, position = {
|
|
43360
|
+
x: positionConfig.x,
|
|
43361
|
+
y: positionConfig.y + middleHandlerSize
|
|
43362
|
+
}) : (width = widthConfig - middleHandlerSize, height = heightConfig, position = {
|
|
43363
|
+
x: positionConfig.x + ("left" === orient ? middleHandlerSize : 0),
|
|
43364
|
+
y: positionConfig.y
|
|
43365
|
+
}) : (width = widthConfig, height = heightConfig, position = positionConfig);
|
|
43366
|
+
const startHandlerSize = null !== (_c = startHandlerStyle.size) && void 0 !== _c ? _c : this._isHorizontal ? height : width,
|
|
43367
|
+
endHandlerSize = null !== (_d = endHandlerStyle.size) && void 0 !== _d ? _d : this._isHorizontal ? height : width;
|
|
43368
|
+
return startHandlerStyle.visible && (this._isHorizontal ? (width -= (startHandlerSize + endHandlerSize) / 2, position = {
|
|
43369
|
+
x: position.x + startHandlerSize / 2,
|
|
43370
|
+
y: position.y
|
|
43371
|
+
}) : (height -= (startHandlerSize + endHandlerSize) / 2, position = {
|
|
43372
|
+
x: position.x,
|
|
43373
|
+
y: position.y + startHandlerSize / 2
|
|
43374
|
+
})), height += (null !== (_e = backgroundStyle.lineWidth) && void 0 !== _e ? _e : 2) / 2, width += (null !== (_f = backgroundStyle.lineWidth) && void 0 !== _f ? _f : 2) / 2, this._layoutCacheFromConfig = {
|
|
43375
|
+
position: position,
|
|
43376
|
+
width: width,
|
|
43377
|
+
height: height
|
|
43378
|
+
}, this._layoutCacheFromConfig;
|
|
43379
|
+
};
|
|
43380
|
+
const {
|
|
43381
|
+
start: start,
|
|
43382
|
+
end: end,
|
|
43383
|
+
orient: orient
|
|
43384
|
+
} = this.attribute;
|
|
43385
|
+
this._isHorizontal = "top" === orient || "bottom" === orient, start && (this._state.start = start), end && (this._state.end = end), this._renderer = new DataZoomRenderer(this._getRendererAttrs()), this._interaction = new DataZoomInteraction(this._getInteractionAttrs());
|
|
43386
|
+
}
|
|
43387
|
+
_getRendererAttrs() {
|
|
43388
|
+
return {
|
|
43389
|
+
attribute: this.attribute,
|
|
43390
|
+
getLayoutAttrFromConfig: this.getLayoutAttrFromConfig,
|
|
43391
|
+
setState: state => {
|
|
43392
|
+
this._state = state;
|
|
43393
|
+
},
|
|
43394
|
+
getState: () => this._state,
|
|
43395
|
+
getContainer: () => this._container
|
|
43396
|
+
};
|
|
43397
|
+
}
|
|
43398
|
+
_getInteractionAttrs() {
|
|
43399
|
+
return {
|
|
43400
|
+
stage: this.stage,
|
|
43401
|
+
attribute: this.attribute,
|
|
43402
|
+
startHandlerMask: this._renderer.startHandlerMask,
|
|
43403
|
+
endHandlerMask: this._renderer.endHandlerMask,
|
|
43404
|
+
middleHandlerSymbol: this._renderer.middleHandlerSymbol,
|
|
43405
|
+
middleHandlerRect: this._renderer.middleHandlerRect,
|
|
43406
|
+
selectedBackground: this._renderer.selectedBackground,
|
|
43407
|
+
background: this._renderer.background,
|
|
43408
|
+
previewGroup: this._renderer.previewGroup,
|
|
43409
|
+
selectedPreviewGroup: this._renderer.selectedPreviewGroup,
|
|
43410
|
+
getLayoutAttrFromConfig: this.getLayoutAttrFromConfig,
|
|
43411
|
+
setState: state => {
|
|
43412
|
+
this._state = state;
|
|
43413
|
+
},
|
|
43414
|
+
getState: () => this._state,
|
|
43415
|
+
getGlobalTransMatrix: () => this.globalTransMatrix
|
|
43416
|
+
};
|
|
43417
|
+
}
|
|
43418
|
+
bindEvents() {
|
|
43419
|
+
this.attribute.disableTriggerEvent ? this.setAttribute("childrenPickable", !1) : (this._interaction.bindEvents(), this._interaction.on(IDataZoomInteractiveEvent.stateUpdate, ({
|
|
43420
|
+
shouldRender: shouldRender
|
|
43421
|
+
}) => {
|
|
43422
|
+
shouldRender && this._renderer.renderDataZoom(!0);
|
|
43423
|
+
}), this._interaction.on(IDataZoomInteractiveEvent.dataZoomUpdate, ({
|
|
43017
43424
|
start: start,
|
|
43018
43425
|
end: end,
|
|
43019
|
-
tag:
|
|
43426
|
+
tag: tag
|
|
43427
|
+
}) => {
|
|
43428
|
+
this._dispatchEvent(IDataZoomEvent.dataZoomChange, {
|
|
43429
|
+
start: start,
|
|
43430
|
+
end: end,
|
|
43431
|
+
tag: tag
|
|
43432
|
+
});
|
|
43433
|
+
}), this._interaction.on(IDataZoomInteractiveEvent.maskUpdate, () => {
|
|
43434
|
+
this._renderer.renderDragMask();
|
|
43435
|
+
}), "auto" === this.attribute.showDetail && (this._container.addEventListener("pointerenter", () => {
|
|
43436
|
+
this._renderer.showText = !0, this._renderer.renderText();
|
|
43437
|
+
}), this._container.addEventListener("pointerleave", () => {
|
|
43438
|
+
this._renderer.showText = !1, this._renderer.renderText();
|
|
43020
43439
|
})));
|
|
43021
43440
|
}
|
|
43441
|
+
setAttributes(params, forceUpdateTag) {
|
|
43442
|
+
const {
|
|
43443
|
+
start: start,
|
|
43444
|
+
end: end
|
|
43445
|
+
} = this.attribute;
|
|
43446
|
+
start && (this._state.start = start), end && (this._state.end = end), this._renderer.setAttributes(this._getRendererAttrs()), this._interaction.setAttributes(this._getInteractionAttrs()), super.setAttributes(params, forceUpdateTag);
|
|
43447
|
+
}
|
|
43448
|
+
render() {
|
|
43449
|
+
this._layoutCacheFromConfig = null, this._container = this.createOrUpdateChild("datazoom-container", {}, "group"), this._renderer.renderDataZoom(), this._interaction.setAttributes(this._getInteractionAttrs());
|
|
43450
|
+
}
|
|
43451
|
+
release(all) {
|
|
43452
|
+
super.release(all), this._interaction.clearDragEvents();
|
|
43453
|
+
}
|
|
43454
|
+
setStartAndEnd(start, end) {
|
|
43455
|
+
const {
|
|
43456
|
+
start: startState,
|
|
43457
|
+
end: endState
|
|
43458
|
+
} = this._state;
|
|
43459
|
+
isValid$1(start) && isValid$1(end) && (start !== startState || end !== endState) && (this._state = {
|
|
43460
|
+
start: start,
|
|
43461
|
+
end: end
|
|
43462
|
+
}, this._renderer.renderDataZoom(!0), this._dispatchEvent(IDataZoomEvent.dataZoomChange, {
|
|
43463
|
+
start: start,
|
|
43464
|
+
end: end
|
|
43465
|
+
}));
|
|
43466
|
+
}
|
|
43022
43467
|
setPreviewData(data) {
|
|
43023
|
-
this.
|
|
43468
|
+
this._renderer.previewData = data;
|
|
43024
43469
|
}
|
|
43025
43470
|
setText(text, tag) {
|
|
43026
|
-
"start" === tag ? this.
|
|
43471
|
+
"start" === tag ? this._renderer.startText.setAttribute("text", text) : this._renderer.endText.setAttribute("text", text);
|
|
43027
43472
|
}
|
|
43028
43473
|
getStartValue() {
|
|
43029
|
-
return this.
|
|
43474
|
+
return this._renderer.startValue;
|
|
43030
43475
|
}
|
|
43031
43476
|
getEndTextValue() {
|
|
43032
|
-
return this.
|
|
43477
|
+
return this._renderer.endValue;
|
|
43033
43478
|
}
|
|
43034
43479
|
getMiddleHandlerSize() {
|
|
43035
43480
|
var _a, _b, _c, _d;
|
|
@@ -43041,24 +43486,19 @@ let DataZoom$1 = class DataZoom extends AbstractComponent {
|
|
|
43041
43486
|
return Math.max(middleHandlerRectSize, ...array(middleHandlerSymbolSize));
|
|
43042
43487
|
}
|
|
43043
43488
|
setPreviewPointsX(callback) {
|
|
43044
|
-
isFunction$1(callback) && (this.
|
|
43489
|
+
isFunction$1(callback) && (this._renderer.previewPointsX = callback);
|
|
43045
43490
|
}
|
|
43046
43491
|
setPreviewPointsY(callback) {
|
|
43047
|
-
isFunction$1(callback) && (this.
|
|
43492
|
+
isFunction$1(callback) && (this._renderer.previewPointsY = callback);
|
|
43048
43493
|
}
|
|
43049
43494
|
setPreviewPointsX1(callback) {
|
|
43050
|
-
isFunction$1(callback) && (this.
|
|
43495
|
+
isFunction$1(callback) && (this._renderer.previewPointsX1 = callback);
|
|
43051
43496
|
}
|
|
43052
43497
|
setPreviewPointsY1(callback) {
|
|
43053
|
-
isFunction$1(callback) && (this.
|
|
43498
|
+
isFunction$1(callback) && (this._renderer.previewPointsY1 = callback);
|
|
43054
43499
|
}
|
|
43055
43500
|
setStatePointToData(callback) {
|
|
43056
|
-
isFunction$1(callback) && (this.
|
|
43057
|
-
}
|
|
43058
|
-
release(all) {
|
|
43059
|
-
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).addEventListener("touchmove", this._handleTouchMove, {
|
|
43060
|
-
passive: !1
|
|
43061
|
-
}), this._clearDragEvents();
|
|
43501
|
+
isFunction$1(callback) && (this._renderer.statePointToData = callback);
|
|
43062
43502
|
}
|
|
43063
43503
|
};
|
|
43064
43504
|
DataZoom$1.defaultAttributes = DEFAULT_DATA_ZOOM_ATTRIBUTES;
|
|
@@ -58325,7 +58765,7 @@ const lookup = (data, opt) => {
|
|
|
58325
58765
|
});
|
|
58326
58766
|
};
|
|
58327
58767
|
|
|
58328
|
-
const version = "2.0.7-alpha.
|
|
58768
|
+
const version = "2.0.7-alpha.4";
|
|
58329
58769
|
|
|
58330
58770
|
const addVChartProperty = (data, op) => {
|
|
58331
58771
|
const context = op.beforeCall();
|
|
@@ -78401,6 +78841,72 @@ const calculateNodeValue = subTree => {
|
|
|
78401
78841
|
isNil$1(node.value) && ((null === (_a = node.children) || void 0 === _a ? void 0 : _a.length) ? node.value = calculateNodeValue(node.children) : node.value = 0), sum += Math.abs(node.value);
|
|
78402
78842
|
}), sum;
|
|
78403
78843
|
};
|
|
78844
|
+
function makeHierarchicNodes(originalNodes, nodeKeyFunc, nodes = [], nodeMap = {}, originalLinks) {
|
|
78845
|
+
calculateNodeValue(originalNodes);
|
|
78846
|
+
const doSubTree = (subTree, depth, parents) => {
|
|
78847
|
+
subTree.forEach((node, index) => {
|
|
78848
|
+
const nodeKey = nodeKeyFunc ? nodeKeyFunc(node) : parents ? `${parents[parents.length - 1].key}-${index}` : `${depth}-${index}`,
|
|
78849
|
+
nodeValue = isNil$1(node.value) ? 0 : toValidNumber$1(node.value);
|
|
78850
|
+
if (nodeMap[nodeKey]) nodeMap[nodeKey].value = void 0;else {
|
|
78851
|
+
const nodeElement = {
|
|
78852
|
+
depth: depth,
|
|
78853
|
+
datum: node,
|
|
78854
|
+
index: index,
|
|
78855
|
+
key: nodeKey,
|
|
78856
|
+
value: nodeValue,
|
|
78857
|
+
sourceLinks: [],
|
|
78858
|
+
targetLinks: []
|
|
78859
|
+
};
|
|
78860
|
+
nodeMap[nodeKey] = nodeElement, nodes.push(nodeElement);
|
|
78861
|
+
}
|
|
78862
|
+
parents && originalLinks && originalLinks.push({
|
|
78863
|
+
source: parents[parents.length - 1].key,
|
|
78864
|
+
target: nodeKey,
|
|
78865
|
+
value: nodeValue,
|
|
78866
|
+
parents: parents
|
|
78867
|
+
}), node.children && node.children.length && doSubTree(node.children, depth + 1, parents ? parents.concat([nodeMap[nodeKey]]) : [nodeMap[nodeKey]]);
|
|
78868
|
+
});
|
|
78869
|
+
};
|
|
78870
|
+
return doSubTree(originalNodes, 0, null), nodes;
|
|
78871
|
+
}
|
|
78872
|
+
function computeHierarchicNodeLinks(originalNodes, nodeKeyFunc) {
|
|
78873
|
+
const nodes = [],
|
|
78874
|
+
links = [],
|
|
78875
|
+
nodeMap = {},
|
|
78876
|
+
linkMap = {},
|
|
78877
|
+
originalLinks = [];
|
|
78878
|
+
return makeHierarchicNodes(originalNodes, nodeKeyFunc, nodes, nodeMap, originalLinks), originalLinks.forEach((link, index) => {
|
|
78879
|
+
const key = `${link.source}-${link.target}`,
|
|
78880
|
+
linkDatum = pickWithout(link, ["parents"]);
|
|
78881
|
+
if (linkDatum.parents = link.parents.map(node => pickWithout(node, ["sourceLinks", "targetLinks"])), linkMap[key]) return linkMap[key].value += toValidNumber$1(link.value), void linkMap[key].datum.push(linkDatum);
|
|
78882
|
+
const linkElement = {
|
|
78883
|
+
index: index,
|
|
78884
|
+
key: `${link.source}-${link.target}`,
|
|
78885
|
+
source: link.source,
|
|
78886
|
+
target: link.target,
|
|
78887
|
+
datum: [linkDatum],
|
|
78888
|
+
value: link.value,
|
|
78889
|
+
parents: link.parents.map(parent => parent.key)
|
|
78890
|
+
};
|
|
78891
|
+
links.push(linkElement), nodeMap[link.source].sourceLinks.push(linkElement), nodeMap[link.target].targetLinks.push(linkElement), linkMap[key] = linkElement;
|
|
78892
|
+
}), {
|
|
78893
|
+
nodes: nodes,
|
|
78894
|
+
links: links,
|
|
78895
|
+
nodeMap: nodeMap
|
|
78896
|
+
};
|
|
78897
|
+
}
|
|
78898
|
+
function computeNodeValues(nodes) {
|
|
78899
|
+
for (let i = 0, len = nodes.length; i < len; i++) {
|
|
78900
|
+
const node = nodes[i];
|
|
78901
|
+
node.value = Math.max(isNil$1(node.value) ? 0 : toValidNumber$1(node.value), node.sourceLinks.reduce((sum, link) => {
|
|
78902
|
+
var _a;
|
|
78903
|
+
return sum + (null !== (_a = toValidNumber$1(link.value)) && void 0 !== _a ? _a : 0);
|
|
78904
|
+
}, 0), node.targetLinks.reduce((sum, link) => {
|
|
78905
|
+
var _a;
|
|
78906
|
+
return sum + (null !== (_a = toValidNumber$1(link.value)) && void 0 !== _a ? _a : 0);
|
|
78907
|
+
}, 0));
|
|
78908
|
+
}
|
|
78909
|
+
}
|
|
78404
78910
|
|
|
78405
78911
|
function left(node) {
|
|
78406
78912
|
return node.depth;
|
|
@@ -78534,55 +79040,7 @@ class SankeyLayout {
|
|
|
78534
79040
|
};
|
|
78535
79041
|
}
|
|
78536
79042
|
computeHierarchicNodeLinks(originalNodes) {
|
|
78537
|
-
|
|
78538
|
-
links = [],
|
|
78539
|
-
nodeMap = {},
|
|
78540
|
-
linkMap = {},
|
|
78541
|
-
originalLinks = [];
|
|
78542
|
-
calculateNodeValue(originalNodes);
|
|
78543
|
-
const doSubTree = (subTree, depth, parents) => {
|
|
78544
|
-
subTree.forEach((node, index) => {
|
|
78545
|
-
const nodeKey = this._getNodeKey ? this._getNodeKey(node) : parents ? `${parents[parents.length - 1].key}-${index}` : `${depth}-${index}`,
|
|
78546
|
-
nodeValue = isNil$1(node.value) ? 0 : toValidNumber$1(node.value);
|
|
78547
|
-
if (nodeMap[nodeKey]) nodeMap[nodeKey].value = void 0;else {
|
|
78548
|
-
const nodeElement = {
|
|
78549
|
-
depth: depth,
|
|
78550
|
-
datum: node,
|
|
78551
|
-
index: index,
|
|
78552
|
-
key: nodeKey,
|
|
78553
|
-
value: nodeValue,
|
|
78554
|
-
sourceLinks: [],
|
|
78555
|
-
targetLinks: []
|
|
78556
|
-
};
|
|
78557
|
-
nodeMap[nodeKey] = nodeElement, nodes.push(nodeElement);
|
|
78558
|
-
}
|
|
78559
|
-
parents && originalLinks.push({
|
|
78560
|
-
source: parents[parents.length - 1].key,
|
|
78561
|
-
target: nodeKey,
|
|
78562
|
-
value: nodeValue,
|
|
78563
|
-
parents: parents
|
|
78564
|
-
}), node.children && node.children.length && doSubTree(node.children, depth + 1, parents ? parents.concat([nodeMap[nodeKey]]) : [nodeMap[nodeKey]]);
|
|
78565
|
-
});
|
|
78566
|
-
};
|
|
78567
|
-
return doSubTree(originalNodes, 0, null), originalLinks.forEach((link, index) => {
|
|
78568
|
-
const key = `${link.source}-${link.target}`,
|
|
78569
|
-
linkDatum = pickWithout(link, ["parents"]);
|
|
78570
|
-
if (linkDatum.parents = link.parents.map(node => pickWithout(node, ["sourceLinks", "targetLinks"])), linkMap[key]) return linkMap[key].value += toValidNumber$1(link.value), void linkMap[key].datum.push(linkDatum);
|
|
78571
|
-
const linkElement = {
|
|
78572
|
-
index: index,
|
|
78573
|
-
key: `${link.source}-${link.target}`,
|
|
78574
|
-
source: link.source,
|
|
78575
|
-
target: link.target,
|
|
78576
|
-
datum: [linkDatum],
|
|
78577
|
-
value: link.value,
|
|
78578
|
-
parents: link.parents.map(parent => parent.key)
|
|
78579
|
-
};
|
|
78580
|
-
links.push(linkElement), nodeMap[link.source].sourceLinks.push(linkElement), nodeMap[link.target].targetLinks.push(linkElement), linkMap[key] = linkElement;
|
|
78581
|
-
}), {
|
|
78582
|
-
nodes: nodes,
|
|
78583
|
-
links: links,
|
|
78584
|
-
nodeMap: nodeMap
|
|
78585
|
-
};
|
|
79043
|
+
return computeHierarchicNodeLinks(originalNodes, this._getNodeKey);
|
|
78586
79044
|
}
|
|
78587
79045
|
computeSourceTargetNodeLinks(data) {
|
|
78588
79046
|
const nodes = [],
|
|
@@ -78652,16 +79110,7 @@ class SankeyLayout {
|
|
|
78652
79110
|
};
|
|
78653
79111
|
}
|
|
78654
79112
|
computeNodeValues(nodes) {
|
|
78655
|
-
|
|
78656
|
-
const node = nodes[i];
|
|
78657
|
-
node.value = Math.max(isNil$1(node.value) ? 0 : toValidNumber$1(node.value), node.sourceLinks.reduce((sum, link) => {
|
|
78658
|
-
var _a;
|
|
78659
|
-
return sum + (null !== (_a = toValidNumber$1(link.value)) && void 0 !== _a ? _a : 0);
|
|
78660
|
-
}, 0), node.targetLinks.reduce((sum, link) => {
|
|
78661
|
-
var _a;
|
|
78662
|
-
return sum + (null !== (_a = toValidNumber$1(link.value)) && void 0 !== _a ? _a : 0);
|
|
78663
|
-
}, 0));
|
|
78664
|
-
}
|
|
79113
|
+
return computeNodeValues(nodes);
|
|
78665
79114
|
}
|
|
78666
79115
|
computeNodeDepths(nodes) {
|
|
78667
79116
|
var _a;
|
|
@@ -79726,7 +80175,7 @@ function normalizeSolution(solution, orientation, orientationOrder) {
|
|
|
79726
80175
|
return ret;
|
|
79727
80176
|
}
|
|
79728
80177
|
|
|
79729
|
-
function scaleSolution(solution, width, height, x0, y0) {
|
|
80178
|
+
function scaleSolution(solution, width, height, x0, y0, hasEmptySet = !1) {
|
|
79730
80179
|
width = Math.max(width, 1), height = Math.max(height, 1);
|
|
79731
80180
|
const circles = [],
|
|
79732
80181
|
setIds = [];
|
|
@@ -79736,9 +80185,20 @@ function scaleSolution(solution, width, height, x0, y0) {
|
|
|
79736
80185
|
yRange = bounds.yRange;
|
|
79737
80186
|
if (xRange.max === xRange.min || yRange.max === yRange.min) return console.log("not scaling solution: zero size detected"), solution;
|
|
79738
80187
|
const xScaling = width / (xRange.max - xRange.min),
|
|
79739
|
-
yScaling = height / (yRange.max - yRange.min)
|
|
79740
|
-
|
|
79741
|
-
|
|
80188
|
+
yScaling = height / (yRange.max - yRange.min);
|
|
80189
|
+
let scaling;
|
|
80190
|
+
if (hasEmptySet) {
|
|
80191
|
+
const containerRadius = Math.min(width, height) / 2,
|
|
80192
|
+
centerX = (xRange.min + xRange.max) / 2,
|
|
80193
|
+
centerY = (yRange.min + yRange.max) / 2;
|
|
80194
|
+
let diagramRadius = 0;
|
|
80195
|
+
for (const circle of circles) {
|
|
80196
|
+
const maxDistanceForThisCircle = Math.sqrt(Math.pow(circle.x - centerX, 2) + Math.pow(circle.y - centerY, 2)) + circle.radius;
|
|
80197
|
+
diagramRadius = Math.max(diagramRadius, maxDistanceForThisCircle);
|
|
80198
|
+
}
|
|
80199
|
+
scaling = containerRadius / diagramRadius;
|
|
80200
|
+
} else scaling = Math.min(yScaling, xScaling);
|
|
80201
|
+
const xOffset = (width - (xRange.max - xRange.min) * scaling) / 2,
|
|
79742
80202
|
yOffset = (height - (yRange.max - yRange.min) * scaling) / 2,
|
|
79743
80203
|
scaled = {};
|
|
79744
80204
|
for (let i = 0; i < circles.length; ++i) {
|
|
@@ -79953,21 +80413,39 @@ const transform$2 = (options, upstreamData) => {
|
|
|
79953
80413
|
setField = "sets",
|
|
79954
80414
|
valueField = "size",
|
|
79955
80415
|
orientation = Math.PI / 2,
|
|
79956
|
-
orientationOrder = null
|
|
80416
|
+
orientationOrder = null,
|
|
80417
|
+
emptySetKey: emptySetKey
|
|
79957
80418
|
} = options;
|
|
79958
80419
|
let circles = {},
|
|
79959
80420
|
textCenters = {};
|
|
79960
|
-
|
|
79961
|
-
|
|
80421
|
+
const hasEmptySet = upstreamData.some(area => {
|
|
80422
|
+
const sets = array(area[setField]);
|
|
80423
|
+
return !sets || 0 === sets.length;
|
|
80424
|
+
}),
|
|
80425
|
+
nonEmptyData = hasEmptySet ? upstreamData.filter(area => !isEmpty(array(area[setField]))) : upstreamData;
|
|
80426
|
+
if (nonEmptyData.length > 0) {
|
|
80427
|
+
const vennData = nonEmptyData.map(area => ({
|
|
79962
80428
|
sets: array(area[setField]),
|
|
79963
80429
|
size: area[valueField]
|
|
79964
80430
|
}));
|
|
79965
80431
|
let solution = venn$1(vennData, options);
|
|
79966
|
-
solution = normalizeSolution(solution, orientation, orientationOrder), circles = scaleSolution(solution, x1 - x0, y1 - y0, x0, y0), textCenters = computeTextCenters(circles, vennData);
|
|
80432
|
+
solution = normalizeSolution(solution, orientation, orientationOrder), circles = scaleSolution(solution, x1 - x0, y1 - y0, x0, y0, hasEmptySet), textCenters = computeTextCenters(circles, vennData);
|
|
79967
80433
|
}
|
|
79968
80434
|
return upstreamData.map(area => {
|
|
79969
|
-
const sets = array(area[setField])
|
|
79970
|
-
|
|
80435
|
+
const sets = array(area[setField]);
|
|
80436
|
+
if (!sets || 0 === sets.length) return Object.assign(Object.assign({}, area), {
|
|
80437
|
+
datum: area,
|
|
80438
|
+
sets: sets,
|
|
80439
|
+
key: emptySetKey || "others",
|
|
80440
|
+
size: area[valueField],
|
|
80441
|
+
labelX: void 0,
|
|
80442
|
+
labelY: void 0,
|
|
80443
|
+
type: "circle",
|
|
80444
|
+
x: x0 + (x1 - x0) / 2,
|
|
80445
|
+
y: y0 + (y1 - y0) / 2,
|
|
80446
|
+
radius: Math.min(x1 - x0, y1 - y0) / 2
|
|
80447
|
+
});
|
|
80448
|
+
const key = sets.toString(),
|
|
79971
80449
|
textCenter = textCenters[key],
|
|
79972
80450
|
basicDatum = Object.assign(Object.assign({}, area), {
|
|
79973
80451
|
datum: area,
|
|
@@ -80247,11 +80725,11 @@ class CloudLayout extends BaseLayout {
|
|
|
80247
80725
|
if (1 === this._placeStatus) {
|
|
80248
80726
|
const maxSize0 = d.fontSize * this._originSize[0] / this.options.minFontSize,
|
|
80249
80727
|
distSize0 = Math.max(d.width, d.height);
|
|
80250
|
-
if (distSize0 <= maxSize0) this.expandBoard(this._board, this._bounds, distSize0 / this._size[0]);else {
|
|
80728
|
+
if (distSize0 <= maxSize0) this._board = this.expandBoard(this._board, this._bounds, distSize0 / this._size[0]);else {
|
|
80251
80729
|
if (!this.options.clip) return !0;
|
|
80252
|
-
this.expandBoard(this._board, this._bounds, maxSize0 / this._size[0]);
|
|
80730
|
+
this._board = this.expandBoard(this._board, this._bounds, maxSize0 / this._size[0]);
|
|
80253
80731
|
}
|
|
80254
|
-
} else this._placeStatus, this.expandBoard(this._board, this._bounds);
|
|
80732
|
+
} else this._placeStatus, this._board = this.expandBoard(this._board, this._bounds);
|
|
80255
80733
|
return this.updateBoardExpandStatus(d.fontSize), !1;
|
|
80256
80734
|
}
|
|
80257
80735
|
return this._tTemp = null, this._dtTemp = null, !0;
|
|
@@ -80262,7 +80740,7 @@ class CloudLayout extends BaseLayout {
|
|
|
80262
80740
|
width: 1,
|
|
80263
80741
|
height: 1
|
|
80264
80742
|
}));
|
|
80265
|
-
this.contextAndRatio = contextAndRatio, this._board = new
|
|
80743
|
+
this.contextAndRatio = contextAndRatio, this._board = new Uint32Array((this._size[0] >> 5) * this._size[1]).fill(0), this._bounds = null;
|
|
80266
80744
|
words.length;
|
|
80267
80745
|
this.result = [];
|
|
80268
80746
|
const data = words.map((d, i) => ({
|
|
@@ -80329,18 +80807,33 @@ class CloudLayout extends BaseLayout {
|
|
|
80329
80807
|
this._size = this._size.map(v => v * (1 - minRatio));
|
|
80330
80808
|
}
|
|
80331
80809
|
expandBoard(board, bounds, factor) {
|
|
80332
|
-
const
|
|
80810
|
+
const oldW = this._size[0],
|
|
80811
|
+
oldH = this._size[1],
|
|
80812
|
+
oldRowStride = oldW >> 5,
|
|
80813
|
+
expandedLeftWidth = oldW * (factor || 1.1) - oldW >> 5;
|
|
80333
80814
|
let diffWidth = 2 * expandedLeftWidth > 2 ? expandedLeftWidth : 2;
|
|
80334
80815
|
diffWidth % 2 != 0 && diffWidth++;
|
|
80335
|
-
let diffHeight = Math.ceil(
|
|
80816
|
+
let diffHeight = Math.ceil(oldH * (diffWidth << 5) / oldW);
|
|
80336
80817
|
diffHeight % 2 != 0 && diffHeight++;
|
|
80337
|
-
const
|
|
80338
|
-
|
|
80339
|
-
|
|
80340
|
-
|
|
80341
|
-
|
|
80342
|
-
|
|
80343
|
-
|
|
80818
|
+
const newW = oldW + (diffWidth << 5),
|
|
80819
|
+
newH = oldH + diffHeight,
|
|
80820
|
+
newRowStride = newW >> 5,
|
|
80821
|
+
paddingLeft = diffWidth / 2,
|
|
80822
|
+
paddingTop = diffHeight / 2,
|
|
80823
|
+
newBoard = new Uint32Array(newH * newRowStride).fill(0);
|
|
80824
|
+
for (let y = 0; y < oldH; y++) {
|
|
80825
|
+
const sourceStartIndex = y * oldRowStride,
|
|
80826
|
+
sourceEndIndex = sourceStartIndex + oldRowStride,
|
|
80827
|
+
destStartIndex = (y + paddingTop) * newRowStride + paddingLeft,
|
|
80828
|
+
rowData = board.slice(sourceStartIndex, sourceEndIndex);
|
|
80829
|
+
newBoard.set(rowData, destStartIndex);
|
|
80830
|
+
}
|
|
80831
|
+
if (this._size = [newW, newH], bounds) {
|
|
80832
|
+
const offsetX = (diffWidth << 5) / 2,
|
|
80833
|
+
offsetY = diffHeight / 2;
|
|
80834
|
+
bounds[0].x += offsetX, bounds[0].y += offsetY, bounds[1].x += offsetX, bounds[1].y += offsetY;
|
|
80835
|
+
}
|
|
80836
|
+
return newBoard;
|
|
80344
80837
|
}
|
|
80345
80838
|
insertZerosToArray(array, index, length) {
|
|
80346
80839
|
if (this.options.customInsertZerosToArray) return this.options.customInsertZerosToArray(array, index, length);
|
|
@@ -88829,6 +89322,7 @@ const registerHistogramChart = () => {
|
|
|
88829
89322
|
registerDimensionEvents();
|
|
88830
89323
|
registerDimensionHover();
|
|
88831
89324
|
registerBarSeries();
|
|
89325
|
+
Factory.registerTransform('bin', bin);
|
|
88832
89326
|
Factory.registerChart(HistogramChart.type, HistogramChart);
|
|
88833
89327
|
};
|
|
88834
89328
|
|
|
@@ -101801,4 +102295,4 @@ function registerSequentialAnimate() {
|
|
|
101801
102295
|
mixin(BaseMark, SequentialAnimate);
|
|
101802
102296
|
}
|
|
101803
102297
|
|
|
101804
|
-
export { ArcMark, AreaChart, AreaMark, AreaSeries, AttributeLevel, AxisSyncPlugin, BandAxisMixin, BarChart, BarChartSpecTransformer, BarSeries, BarSeriesSpecTransformer, BaseArcMark, BaseChart, BaseChartSpecTransformer, BaseComponent, BaseComponentSpecTransformer, BaseHistogramChart, BaseMark, BasePieChart, BasePieChartSpecTransformer, BasePieSeries, BasePlugin, BasePolygonMark, BaseSeries, BaseSeriesSpecTransformer, BaseSeriesTooltipHelper, BaseWordCloudChart, BaseWordCloudChartSpecTransformer, BaseWordCloudSeries, BoxPlotChart, BoxPlotSeries, Brush, CanvasTooltipHandler, CartesianAxis, CartesianBandAxis, CartesianChartSpecTransformer, CartesianCrossHair, CartesianLinearAxis, CartesianLogAxis, CartesianMarkArea, CartesianMarkLine, CartesianMarkPoint, CartesianSeries, CartesianSymlogAxis, CartesianTimeAxis, ChartEvent, CirclePackingChart, CirclePackingSeries, CircularProgressChart, CircularProgressSeries, CommonChart, CommonChartSpecTransformer, CompilableData, ComponentMark, ContinuousLegend, CorrelationChart, CorrelationSeries, CustomMark, DEFAULT_ANIMATION_CONFIG, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_WIDTH, DEFAULT_CLOSE_STROKE_JOIN, DEFAULT_DATA_INDEX, DEFAULT_DATA_KEY, DEFAULT_DATA_SERIES_FIELD, DEFAULT_KEY, DEFAULT_LAYOUT_RECT_LEVEL, DEFAULT_LAYOUT_RECT_LEVEL_MIN, DEFAULT_LINEAR_INTERPOLATE, DEFAULT_MEASURE_CANVAS_ID, DEFAULT_SERIES_STYLE_NAME, DEFAULT_SMOOTH_INTERPOLATE, DataZoom, DimensionClickEvent, DimensionEventEnum, DimensionHoverEvent, Direction, DiscreteLegend, DomTooltipHandler, DotSeries, ElementHighlight, ElementSelect, Event$1 as Event, Factory, FormatterPlugin, FunnelChart, FunnelChartSpecTransformer, FunnelSeries, FunnelSeriesSpecTransformer, GaugeChart, GaugePointerSeries, GaugeSeries, GeoCoordinate, GeoMarkPoint, GeoSeries, GlyphMark, GridLayout, GroupMark, HeatmapChart, HeatmapSeries, HistogramChart, HistogramChartSpecTransformer, ImageMark, Indicator, Label, Layout$1 as Layout, LayoutLevel, LayoutZIndex, LineChart, LineMark, LineSeries, LinearAxisMixin, LinearProgressChart, LinearProgressSeries, LinkSeries, LiquidChart, LiquidSeries, MOSAIC_CAT_END_PERCENT, MOSAIC_CAT_START_PERCENT, MOSAIC_VALUE_END_PERCENT, MOSAIC_VALUE_START_PERCENT, ManualTicker, MapChart, MapSeries, MarkTypeEnum, MediaQuery, MosaicChart, MosaicSeries, PREFIX, PathMark, PieChart, PieSeries, PieSeriesSpecTransformer, Player, PolarAxis, PolarBandAxis, PolarCrossHair, PolarLinearAxis, PolarMarkArea, PolarMarkLine, PolarMarkPoint, PolarSeries, PolygonMark, PositionEnum, ProgressLikeSeries, RadarChart, RadarSeries, RangeAreaChart, RangeAreaSeries, RangeColumnChart, RangeColumnSeries, RangeColumnSeriesSpecTransformer, RectMark, RenderModeEnum, RippleMark, RoseChart, RoseLikeSeries, RoseSeries, RuleMark, SEGMENT_FIELD_END, SEGMENT_FIELD_START, STACK_FIELD_END, STACK_FIELD_END_OffsetSilhouette, STACK_FIELD_END_PERCENT, STACK_FIELD_KEY, STACK_FIELD_START, STACK_FIELD_START_OffsetSilhouette, STACK_FIELD_START_PERCENT, STACK_FIELD_TOTAL, STACK_FIELD_TOTAL_BOTTOM, STACK_FIELD_TOTAL_PERCENT, STACK_FIELD_TOTAL_TOP, STATE_VALUE_ENUM, SankeyChart, SankeySeries, ScatterChart, ScatterSeries, ScrollBar, SequenceChart, SeriesMarkNameEnum, SeriesTypeEnum, SeriesTypeForThemeEnum, Stack, StackChartMixin, StreamLight, SunburstChart, SunburstSeries, SymbolMark, TextMark, ThemeManager, Title, Tooltip, TooltipResult, TotalLabel, TransformLevel, TreemapChart, TreemapSeries, USER_LAYOUT_RECT_LEVEL, VChart, VennChart, VennSeries, WaterfallChart, WaterfallSeries, WordCloudChart, WordCloudSeries, alternatingWave, animationConfig, barGrowIn, barGrowOut, barPresetAnimation, baseSeriesMark, boundsInRect, builtinThemes, calcLayoutNumber, calcPadding, centerToCorner, columnCenterToEdge, columnEdgeToCenter, columnLeftToRight, columnRightToLeft, computeActualDataScheme, convertPoint, cornerToCenter, createArc, createArea, createGroup, createLine, createRect, createRichText, createScale, createScaleWithSpec, createSymbol, createText, darkTheme, dataScheme, VChart as default, defaultThemeName, diagonalCenterToEdge, diagonalTopLeftToBottomRight, findMarkGraphic, functionTransform, getActualColor, getActualNumValue, getCartesianCrosshairRect, getCartesianDimensionInfo, getColorSchemeBySeries, getCombinedSizeOfRegions, getDataScheme, getDatumOfGraphic, getDiffAttributesOfGraphic, getDimensionInfoByValue, getFieldAlias, getFunnelTheme, getGroupAnimationParams, getMergedTheme, getPolarDimensionInfo, getRegionStackGroup, getSpecInfo, getTheme, hasThemeMerged, isCollectionMark, isColorKey, isPercent, isPercentOffset, isPolarAxisSeries, isProgressiveDataColorScheme, isSpecValueWithScale, isTokenKey, isValidOrient, isValueInScaleDomain, isXAxis, isYAxis, isZAxis, lightTheme, lookup, measureText, mergeFields, normalizeLayoutPaddingSpec, particleEffect, pieDisappear, pieEnter, pieExit, piePresetAnimation, pulseWave, queryColorFromColorScheme, queryToken, randomOpacity, registerAllEnv, registerAllMarks, registerAnimate, registerArcAnimation, registerArcMark, registerAreaChart, registerAreaMark, registerAreaSeries, registerBarChart, registerBarSeries, registerBoxplotChart, registerBoxplotSeries, registerBrowserEnv, registerBrush, registerCanvasTooltipHandler, registerCartesianBandAxis, registerCartesianCrossHair, registerCartesianLinearAxis, registerCartesianLogAxis, registerCartesianSymlogAxis, registerCartesianTimeAxis, registerChartPlugin, registerCirclePackingChart, registerCirclePackingSeries, registerCircularProgressChart, registerCircularProgressSeries, registerCommonChart, registerComponentMark, registerContinuousLegend, registerCorrelationChart, registerCustomAnimate, registerCustomMark, registerDataSetInstanceParser, registerDataSetInstanceTransform, registerDataZoom, registerDimensionEvents, registerDimensionHover, registerDimensionTooltipProcessor, registerDiscreteLegend, registerDomTooltipHandler, registerDotSeries, registerDragPlugin, registerElementActive, registerElementActiveByLegend, registerElementHighlight, registerElementHighlightByGroup, registerElementHighlightByKey, registerElementHighlightByLegend, registerElementHighlightByName, registerElementSelect, registerFormatPlugin, registerFunnelChart, registerFunnelSeries, registerGaugeChart, registerGaugePointerSeries, registerGaugeSeries, registerGeoCoordinate, registerGeoMarkPoint, registerGesturePlugin, registerGlyphMark, registerGridLayout, registerGroupMark, registerGroupTooltipProcessor, registerHarmonyEnv, registerHeatmapChart, registerHeatmapSeries, registerHistogramChart, registerHtmlAttributePlugin, registerImageMark, registerIndicator, registerLabel, registerLarkEnv, registerLineChart, registerLineMark, registerLineSeries, registerLinearProgressChart, registerLinearProgressSeries, registerLinkSeries, registerLiquidChart, registerLiquidSeries, registerLynxEnv, registerMapChart, registerMapSeries, registerMarkArea, registerMarkFilterTransform, registerMarkLine, registerMarkMapTransform, registerMarkPoint, registerMarkTooltipProcessor, registerMediaQuery, registerMosaicChart, registerMosaicSeries, registerNodeEnv, registerPathMark, registerPieChart, registerPieSeries, registerPlayer, registerPolarBandAxis, registerPolarCrossHair, registerPolarLinearAxis, registerPolarMarkArea, registerPolarMarkLine, registerPolarMarkPoint, registerPolygonAnimation, registerPolygonMark, registerPoptip, registerRadarChart, registerRadarSeries, registerRangeAreaChart, registerRangeAreaSeries, registerRangeColumnChart, registerRangeColumnSeries, registerReactAttributePlugin, registerRectAnimation, registerRectMark, registerRippleMark, registerRoseChart, registerRoseSeries, registerRuleMark, registerSankeyChart, registerSankeySeries, registerScaleInOutAnimation, registerScatterChart, registerScatterSeries, registerScrollBar, registerSequenceChart, registerSequentialAnimate, registerStateTransition, registerSunBurstSeries, registerSunburstChart, registerSymbolMark, registerTTEnv, registerTaroEnv, registerTextMark, registerTheme, registerTitle, registerTooltip, registerTotalLabel, registerTreemapChart, registerTreemapSeries, registerAnimate$1 as registerVRenderAnimate, registerVennChart, registerVennSeries, registerWXEnv, registerWaterfallChart, registerWaterfallSeries, registerWordCloudChart, registerWordCloudSeries, registerWordCloudShapeChart, removeTheme, rippleEffect, rotationScan, rowBottomToTop, rowCenterToEdge, rowEdgeToCenter, rowTopToBottom, setDefaultCrosshairForCartesianChart, shouldMarkDoMorph, snakeWave, sortDataInAxisHelper, sortStackValueGroup, specTransform, spiralEffect, stack, stackGroup, stackMosaic, stackMosaicTotal, stackOffsetSilhouette, stackTotal, themeExist, themes, token, transformColorSchemeToStandardStruct, transformToGraphic, userAnimationConfig, valueInScaleRange, version, vglobal, warn };
|
|
102298
|
+
export { ArcMark, AreaChart, AreaMark, AreaSeries, AttributeLevel, AxisSyncPlugin, BandAxisMixin, BarChart, BarChartSpecTransformer, BarSeries, BarSeriesSpecTransformer, BaseArcMark, BaseChart, BaseChartSpecTransformer, BaseComponent, BaseComponentSpecTransformer, BaseHistogramChart, BaseMark, BasePieChart, BasePieChartSpecTransformer, BasePieSeries, BasePlugin, BasePolygonMark, BaseSeries, BaseSeriesSpecTransformer, BaseSeriesTooltipHelper, BaseWordCloudChart, BaseWordCloudChartSpecTransformer, BaseWordCloudSeries, BoxPlotChart, BoxPlotSeries, Brush, CanvasTooltipHandler, CartesianAxis, CartesianBandAxis, CartesianChartSpecTransformer, CartesianCrossHair, CartesianLinearAxis, CartesianLogAxis, CartesianMarkArea, CartesianMarkLine, CartesianMarkPoint, CartesianSeries, CartesianSymlogAxis, CartesianTimeAxis, ChartEvent, CirclePackingChart, CirclePackingSeries, CircularProgressChart, CircularProgressSeries, CommonChart, CommonChartSpecTransformer, CompilableData, ComponentMark, ContinuousLegend, CorrelationChart, CorrelationSeries, CustomMark, DEFAULT_ANIMATION_CONFIG, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_WIDTH, DEFAULT_CLOSE_STROKE_JOIN, DEFAULT_DATA_INDEX, DEFAULT_DATA_KEY, DEFAULT_DATA_SERIES_FIELD, DEFAULT_KEY, DEFAULT_LAYOUT_RECT_LEVEL, DEFAULT_LAYOUT_RECT_LEVEL_MIN, DEFAULT_LINEAR_INTERPOLATE, DEFAULT_MEASURE_CANVAS_ID, DEFAULT_SERIES_STYLE_NAME, DEFAULT_SMOOTH_INTERPOLATE, DataZoom, DimensionClickEvent, DimensionEventEnum, DimensionHoverEvent, Direction, DiscreteLegend, DomTooltipHandler, DotSeries, ElementHighlight, ElementSelect, Event$1 as Event, Factory, FormatterPlugin, FunnelChart, FunnelChartSpecTransformer, FunnelSeries, FunnelSeriesSpecTransformer, GaugeChart, GaugePointerSeries, GaugeSeries, GeoCoordinate, GeoMarkPoint, GeoSeries, GlyphMark, GridLayout, GroupMark, HeatmapChart, HeatmapSeries, HistogramChart, HistogramChartSpecTransformer, ImageMark, Indicator, Label, Layout$1 as Layout, LayoutLevel, LayoutZIndex, LineChart, LineMark, LineSeries, LinearAxisMixin, LinearProgressChart, LinearProgressSeries, LinkSeries, LiquidChart, LiquidSeries, MOSAIC_CAT_END_PERCENT, MOSAIC_CAT_START_PERCENT, MOSAIC_VALUE_END_PERCENT, MOSAIC_VALUE_START_PERCENT, ManualTicker, MapChart, MapSeries, MarkTypeEnum, MediaQuery, MosaicChart, MosaicSeries, PREFIX, PathMark, PieChart, PieSeries, PieSeriesSpecTransformer, Player, PolarAxis, PolarBandAxis, PolarCrossHair, PolarLinearAxis, PolarMarkArea, PolarMarkLine, PolarMarkPoint, PolarSeries, PolygonMark, PositionEnum, ProgressLikeSeries, RadarChart, RadarSeries, RangeAreaChart, RangeAreaSeries, RangeColumnChart, RangeColumnSeries, RangeColumnSeriesSpecTransformer, RectMark, RenderModeEnum, RippleMark, RoseChart, RoseLikeSeries, RoseSeries, RuleMark, SEGMENT_FIELD_END, SEGMENT_FIELD_START, STACK_FIELD_END, STACK_FIELD_END_OffsetSilhouette, STACK_FIELD_END_PERCENT, STACK_FIELD_KEY, STACK_FIELD_START, STACK_FIELD_START_OffsetSilhouette, STACK_FIELD_START_PERCENT, STACK_FIELD_TOTAL, STACK_FIELD_TOTAL_BOTTOM, STACK_FIELD_TOTAL_PERCENT, STACK_FIELD_TOTAL_TOP, STATE_VALUE_ENUM, SankeyChart, SankeySeries, ScatterChart, ScatterSeries, ScrollBar, SequenceChart, SeriesMarkNameEnum, SeriesTypeEnum, SeriesTypeForThemeEnum, Stack, StackChartMixin, StreamLight, SunburstChart, SunburstSeries, SymbolMark, TextMark, ThemeManager, Title, Tooltip, TooltipResult, TotalLabel, TransformLevel, TreemapChart, TreemapSeries, USER_LAYOUT_RECT_LEVEL, VChart, VennChart, VennSeries, WaterfallChart, WaterfallSeries, WordCloudChart, WordCloudSeries, alternatingWave, animationConfig, barGrowIn, barGrowOut, barPresetAnimation, baseSeriesMark, boundsInRect, builtinThemes, calcLayoutNumber, calcPadding, centerToCorner, columnCenterToEdge, columnEdgeToCenter, columnLeftToRight, columnRightToLeft, computeActualDataScheme, convertPoint, cornerToCenter, createArc, createArea, createGroup, createLine, createRect, createRichText, createScale, createScaleWithSpec, createSymbol, createText, darkTheme, dataScheme, VChart as default, defaultThemeName, diagonalCenterToEdge, diagonalTopLeftToBottomRight, findMarkGraphic, functionTransform, getActualColor, getActualNumValue, getCartesianCrosshairRect, getCartesianDimensionInfo, getColorSchemeBySeries, getCombinedSizeOfRegions, getDataScheme, getDatumOfGraphic, getDiffAttributesOfGraphic, getDimensionInfoByValue, getFieldAlias, getFunnelTheme, getGroupAnimationParams, getMergedTheme, getPolarDimensionInfo, getRegionStackGroup, getSpecInfo, getTheme, hasThemeMerged, isCollectionMark, isColorKey, isPercent, isPercentOffset, isPolarAxisSeries, isProgressiveDataColorScheme, isSpecValueWithScale, isTokenKey, isValidOrient, isValueInScaleDomain, isXAxis, isYAxis, isZAxis, lightTheme, lookup, measureText, mergeFields, normalizeLayoutPaddingSpec, particleEffect, pieDisappear, pieEnter, pieExit, piePresetAnimation, pulseWave, queryColorFromColorScheme, queryToken, randomOpacity, registerAllEnv, registerAllMarks, registerAnimate, registerArcAnimation, registerArcMark, registerAreaChart, registerAreaMark, registerAreaSeries, registerBarAnimation, registerBarChart, registerBarSeries, registerBoxplotChart, registerBoxplotSeries, registerBrowserEnv, registerBrush, registerCanvasTooltipHandler, registerCartesianBandAxis, registerCartesianCrossHair, registerCartesianLinearAxis, registerCartesianLogAxis, registerCartesianSymlogAxis, registerCartesianTimeAxis, registerChartPlugin, registerCirclePackingChart, registerCirclePackingSeries, registerCircularProgressChart, registerCircularProgressSeries, registerCommonChart, registerComponentMark, registerContinuousLegend, registerCorrelationChart, registerCustomAnimate, registerCustomMark, registerDataSetInstanceParser, registerDataSetInstanceTransform, registerDataZoom, registerDimensionEvents, registerDimensionHover, registerDimensionTooltipProcessor, registerDiscreteLegend, registerDomTooltipHandler, registerDotSeries, registerDragPlugin, registerElementActive, registerElementActiveByLegend, registerElementHighlight, registerElementHighlightByGroup, registerElementHighlightByKey, registerElementHighlightByLegend, registerElementHighlightByName, registerElementSelect, registerFormatPlugin, registerFunnelChart, registerFunnelSeries, registerGaugeChart, registerGaugePointerSeries, registerGaugeSeries, registerGeoCoordinate, registerGeoMarkPoint, registerGesturePlugin, registerGlyphMark, registerGridLayout, registerGroupMark, registerGroupTooltipProcessor, registerHarmonyEnv, registerHeatmapChart, registerHeatmapSeries, registerHistogramChart, registerHtmlAttributePlugin, registerImageMark, registerIndicator, registerLabel, registerLarkEnv, registerLineChart, registerLineMark, registerLineSeries, registerLinearProgressChart, registerLinearProgressSeries, registerLinkSeries, registerLiquidChart, registerLiquidSeries, registerLynxEnv, registerMapChart, registerMapSeries, registerMarkArea, registerMarkFilterTransform, registerMarkLine, registerMarkMapTransform, registerMarkPoint, registerMarkTooltipProcessor, registerMediaQuery, registerMosaicChart, registerMosaicSeries, registerNodeEnv, registerPathMark, registerPieChart, registerPieSeries, registerPlayer, registerPolarBandAxis, registerPolarCrossHair, registerPolarLinearAxis, registerPolarMarkArea, registerPolarMarkLine, registerPolarMarkPoint, registerPolygonAnimation, registerPolygonMark, registerPoptip, registerRadarChart, registerRadarSeries, registerRangeAreaChart, registerRangeAreaSeries, registerRangeColumnChart, registerRangeColumnSeries, registerReactAttributePlugin, registerRectAnimation, registerRectMark, registerRippleMark, registerRoseChart, registerRoseSeries, registerRuleMark, registerSankeyChart, registerSankeySeries, registerScaleInOutAnimation, registerScatterChart, registerScatterSeries, registerScrollBar, registerSequenceChart, registerSequentialAnimate, registerStateTransition, registerSunBurstSeries, registerSunburstChart, registerSymbolMark, registerTTEnv, registerTaroEnv, registerTextMark, registerTheme, registerTitle, registerTooltip, registerTotalLabel, registerTreemapChart, registerTreemapSeries, registerAnimate$1 as registerVRenderAnimate, registerVennChart, registerVennSeries, registerWXEnv, registerWaterfallChart, registerWaterfallSeries, registerWordCloudChart, registerWordCloudSeries, registerWordCloudShapeChart, removeTheme, rippleEffect, rotationScan, rowBottomToTop, rowCenterToEdge, rowEdgeToCenter, rowTopToBottom, setDefaultCrosshairForCartesianChart, shouldMarkDoMorph, snakeWave, sortDataInAxisHelper, sortStackValueGroup, specTransform, spiralEffect, stack, stackGroup, stackMosaic, stackMosaicTotal, stackOffsetSilhouette, stackTotal, themeExist, themes, token, transformColorSchemeToStandardStruct, transformToGraphic, userAnimationConfig, valueInScaleRange, version, vglobal, warn };
|