@orbcharts/core 3.0.0-beta.4 → 3.0.0-beta.5
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/LICENSE +200 -200
- package/dist/orbcharts-core.es.js +167 -163
- package/dist/orbcharts-core.umd.js +3 -3
- package/lib/core-types.ts +7 -7
- package/package.json +42 -42
- package/src/AbstractChart.ts +57 -57
- package/src/GridChart.ts +24 -24
- package/src/MultiGridChart.ts +24 -24
- package/src/MultiValueChart.ts +24 -24
- package/src/RelationshipChart.ts +24 -24
- package/src/SeriesChart.ts +24 -24
- package/src/TreeChart.ts +24 -24
- package/src/base/createBaseChart.ts +505 -505
- package/src/base/createBasePlugin.ts +153 -153
- package/src/base/validators/chartOptionsValidator.ts +23 -23
- package/src/base/validators/chartParamsValidator.ts +133 -133
- package/src/base/validators/elementValidator.ts +13 -13
- package/src/base/validators/pluginsValidator.ts +14 -14
- package/src/defaults.ts +235 -235
- package/src/defineGridPlugin.ts +3 -3
- package/src/defineMultiGridPlugin.ts +3 -3
- package/src/defineMultiValuePlugin.ts +3 -3
- package/src/defineNoneDataPlugin.ts +4 -4
- package/src/defineRelationshipPlugin.ts +3 -3
- package/src/defineSeriesPlugin.ts +3 -3
- package/src/defineTreePlugin.ts +3 -3
- package/src/grid/computedDataFn.ts +129 -129
- package/src/grid/contextObserverCallback.ts +176 -176
- package/src/grid/dataFormatterValidator.ts +101 -101
- package/src/grid/dataValidator.ts +12 -12
- package/src/index.ts +20 -20
- package/src/multiGrid/computedDataFn.ts +123 -123
- package/src/multiGrid/contextObserverCallback.ts +41 -41
- package/src/multiGrid/dataFormatterValidator.ts +115 -115
- package/src/multiGrid/dataValidator.ts +12 -12
- package/src/multiValue/computedDataFn.ts +110 -110
- package/src/multiValue/contextObserverCallback.ts +160 -160
- package/src/multiValue/dataFormatterValidator.ts +9 -9
- package/src/multiValue/dataValidator.ts +9 -9
- package/src/relationship/computedDataFn.ts +125 -125
- package/src/relationship/contextObserverCallback.ts +12 -12
- package/src/relationship/dataFormatterValidator.ts +9 -9
- package/src/relationship/dataValidator.ts +9 -9
- package/src/series/computedDataFn.ts +88 -88
- package/src/series/contextObserverCallback.ts +100 -100
- package/src/series/dataFormatterValidator.ts +41 -41
- package/src/series/dataValidator.ts +12 -12
- package/src/tree/computedDataFn.ts +129 -129
- package/src/tree/contextObserverCallback.ts +58 -58
- package/src/tree/dataFormatterValidator.ts +13 -13
- package/src/tree/dataValidator.ts +13 -13
- package/src/utils/commonUtils.ts +55 -55
- package/src/utils/d3Scale.ts +198 -198
- package/src/utils/errorMessage.ts +42 -42
- package/src/utils/gridObservables.ts +683 -671
- package/src/utils/index.ts +9 -9
- package/src/utils/multiGridObservables.ts +392 -392
- package/src/utils/multiValueObservables.ts +661 -642
- package/src/utils/observables.ts +219 -219
- package/src/utils/orbchartsUtils.ts +377 -377
- package/src/utils/seriesObservables.ts +175 -175
- package/src/utils/treeObservables.ts +105 -105
- package/src/utils/validator.ts +126 -126
- package/tsconfig.base.json +13 -13
- package/tsconfig.json +2 -2
- package/vite-env.d.ts +6 -6
- package/vite.config.js +22 -22
@@ -39,7 +39,7 @@ const _e = {
|
|
39
39
|
}, Ti = 800, Ci = 500, Yc = [], Uc = [], zc = [], Hc = [], jc = [], qc = {
|
40
40
|
nodes: [],
|
41
41
|
edges: []
|
42
|
-
},
|
42
|
+
}, X = {
|
43
43
|
position: "left",
|
44
44
|
scaleDomain: ["auto", "auto"],
|
45
45
|
scaleRange: [0, 0.9],
|
@@ -82,7 +82,7 @@ const qn = {
|
|
82
82
|
seriesDirection: "row",
|
83
83
|
rowLabels: [],
|
84
84
|
columnLabels: [],
|
85
|
-
valueAxis: { ...
|
85
|
+
valueAxis: { ...X },
|
86
86
|
groupAxis: { ...Mi },
|
87
87
|
separateSeries: !1
|
88
88
|
// slotIndex: 0,
|
@@ -118,8 +118,8 @@ const Kn = {
|
|
118
118
|
type: "multiValue",
|
119
119
|
visibleFilter: (t, e) => !0,
|
120
120
|
categoryLabels: [],
|
121
|
-
xAxis: { ...
|
122
|
-
yAxis: { ...
|
121
|
+
xAxis: { ...X },
|
122
|
+
yAxis: { ...X },
|
123
123
|
container: {
|
124
124
|
...ye
|
125
125
|
},
|
@@ -214,7 +214,7 @@ function Li(t, e) {
|
|
214
214
|
return !1;
|
215
215
|
});
|
216
216
|
}
|
217
|
-
function
|
217
|
+
function F(t, e) {
|
218
218
|
const n = Li(t, e);
|
219
219
|
if (n) {
|
220
220
|
const r = e[n], i = r.toBeTypes ? r.toBeTypes.join(" | ") : r.toBe ? r.toBe : r.toBeOption ? r.toBeOption : "";
|
@@ -236,7 +236,7 @@ function M(t, e) {
|
|
236
236
|
};
|
237
237
|
}
|
238
238
|
const Pi = (t) => {
|
239
|
-
const e =
|
239
|
+
const e = F(t, {
|
240
240
|
visibleFilter: {
|
241
241
|
toBeTypes: ["Function"]
|
242
242
|
},
|
@@ -257,7 +257,7 @@ const Pi = (t) => {
|
|
257
257
|
}
|
258
258
|
});
|
259
259
|
if (t.container) {
|
260
|
-
const n =
|
260
|
+
const n = F(t.container, {
|
261
261
|
gap: {
|
262
262
|
toBeTypes: ["number"]
|
263
263
|
},
|
@@ -601,10 +601,10 @@ function va(t, e) {
|
|
601
601
|
for (var a = i.length, o = new Array(a), s = new Array(a), u = new Array(a), l = 0; l < a; ++l) {
|
602
602
|
var f = r[l], c = i[l], h = c.length, p = ba(t.call(f, f && f.__data__, l, r)), d = p.length, m = s[l] = new Array(d), v = o[l] = new Array(d), w = u[l] = new Array(h);
|
603
603
|
n(f, c, m, v, w, p, e);
|
604
|
-
for (var
|
605
|
-
if (
|
606
|
-
for (
|
607
|
-
|
604
|
+
for (var A = 0, $ = 0, M, _; A < d; ++A)
|
605
|
+
if (M = m[A]) {
|
606
|
+
for (A >= $ && ($ = A + 1); !(_ = v[$]) && ++$ < d; ) ;
|
607
|
+
M._next = _ || null;
|
608
608
|
}
|
609
609
|
}
|
610
610
|
return o = new z(o, r), o._enter = s, o._exit = u, o;
|
@@ -1205,35 +1205,35 @@ function yn() {
|
|
1205
1205
|
}
|
1206
1206
|
function gt(t) {
|
1207
1207
|
var e, n;
|
1208
|
-
return t = (t + "").trim().toLowerCase(), (e = Mo.exec(t)) ? (n = e[1].length, e = parseInt(e[1], 16), n === 6 ? vn(e) : n === 3 ? new
|
1208
|
+
return t = (t + "").trim().toLowerCase(), (e = Mo.exec(t)) ? (n = e[1].length, e = parseInt(e[1], 16), n === 6 ? vn(e) : n === 3 ? new Y(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : n === 8 ? Jt(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : n === 4 ? Jt(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = Fo.exec(t)) ? new Y(e[1], e[2], e[3], 1) : (e = Eo.exec(t)) ? new Y(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = Lo.exec(t)) ? Jt(e[1], e[2], e[3], e[4]) : (e = Po.exec(t)) ? Jt(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = Oo.exec(t)) ? wn(e[1], e[2] / 100, e[3] / 100, 1) : (e = No.exec(t)) ? wn(e[1], e[2] / 100, e[3] / 100, e[4]) : mn.hasOwnProperty(t) ? vn(mn[t]) : t === "transparent" ? new Y(NaN, NaN, NaN, 0) : null;
|
1209
1209
|
}
|
1210
1210
|
function vn(t) {
|
1211
|
-
return new
|
1211
|
+
return new Y(t >> 16 & 255, t >> 8 & 255, t & 255, 1);
|
1212
1212
|
}
|
1213
1213
|
function Jt(t, e, n, r) {
|
1214
|
-
return r <= 0 && (t = e = n = NaN), new
|
1214
|
+
return r <= 0 && (t = e = n = NaN), new Y(t, e, n, r);
|
1215
1215
|
}
|
1216
1216
|
function Io(t) {
|
1217
|
-
return t instanceof Yt || (t = gt(t)), t ? (t = t.rgb(), new
|
1217
|
+
return t instanceof Yt || (t = gt(t)), t ? (t = t.rgb(), new Y(t.r, t.g, t.b, t.opacity)) : new Y();
|
1218
1218
|
}
|
1219
1219
|
function Pe(t, e, n, r) {
|
1220
|
-
return arguments.length === 1 ? Io(t) : new
|
1220
|
+
return arguments.length === 1 ? Io(t) : new Y(t, e, n, r ?? 1);
|
1221
1221
|
}
|
1222
|
-
function
|
1222
|
+
function Y(t, e, n, r) {
|
1223
1223
|
this.r = +t, this.g = +e, this.b = +n, this.opacity = +r;
|
1224
1224
|
}
|
1225
|
-
He(
|
1225
|
+
He(Y, Pe, mr(Yt, {
|
1226
1226
|
brighter(t) {
|
1227
|
-
return t = t == null ? ue : Math.pow(ue, t), new
|
1227
|
+
return t = t == null ? ue : Math.pow(ue, t), new Y(this.r * t, this.g * t, this.b * t, this.opacity);
|
1228
1228
|
},
|
1229
1229
|
darker(t) {
|
1230
|
-
return t = t == null ? kt : Math.pow(kt, t), new
|
1230
|
+
return t = t == null ? kt : Math.pow(kt, t), new Y(this.r * t, this.g * t, this.b * t, this.opacity);
|
1231
1231
|
},
|
1232
1232
|
rgb() {
|
1233
1233
|
return this;
|
1234
1234
|
},
|
1235
1235
|
clamp() {
|
1236
|
-
return new
|
1236
|
+
return new Y(mt(this.r), mt(this.g), mt(this.b), le(this.opacity));
|
1237
1237
|
},
|
1238
1238
|
displayable() {
|
1239
1239
|
return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
@@ -1290,7 +1290,7 @@ He(W, Vo, mr(Yt, {
|
|
1290
1290
|
},
|
1291
1291
|
rgb() {
|
1292
1292
|
var t = this.h % 360 + (this.h < 0) * 360, e = isNaN(t) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * e, i = 2 * n - r;
|
1293
|
-
return new
|
1293
|
+
return new Y(
|
1294
1294
|
Ae(t >= 240 ? t - 240 : t + 120, i, r),
|
1295
1295
|
Ae(t, i, r),
|
1296
1296
|
Ae(t < 120 ? t + 240 : t - 120, i, r),
|
@@ -2158,18 +2158,18 @@ function xu(t) {
|
|
2158
2158
|
var e = t.grouping === void 0 || t.thousands === void 0 ? Fn : mu(En.call(t.grouping, Number), t.thousands + ""), n = t.currency === void 0 ? "" : t.currency[0] + "", r = t.currency === void 0 ? "" : t.currency[1] + "", i = t.decimal === void 0 ? "." : t.decimal + "", a = t.numerals === void 0 ? Fn : gu(En.call(t.numerals, String)), o = t.percent === void 0 ? "%" : t.percent + "", s = t.minus === void 0 ? "−" : t.minus + "", u = t.nan === void 0 ? "NaN" : t.nan + "";
|
2159
2159
|
function l(c) {
|
2160
2160
|
c = me(c);
|
2161
|
-
var h = c.fill, p = c.align, d = c.sign, m = c.symbol, v = c.zero, w = c.width,
|
2162
|
-
|
2163
|
-
var R = m === "$" ? n : m === "#" && /[boxX]/.test(
|
2164
|
-
$ = $ === void 0 ? 6 : /[gprs]/.test(
|
2161
|
+
var h = c.fill, p = c.align, d = c.sign, m = c.symbol, v = c.zero, w = c.width, A = c.comma, $ = c.precision, M = c.trim, _ = c.type;
|
2162
|
+
_ === "n" ? (A = !0, _ = "g") : Mn[_] || ($ === void 0 && ($ = 12), M = !0, _ = "g"), (v || h === "0" && p === "=") && (v = !0, h = "0", p = "=");
|
2163
|
+
var R = m === "$" ? n : m === "#" && /[boxX]/.test(_) ? "0" + _.toLowerCase() : "", B = m === "$" ? r : /[%p]/.test(_) ? o : "", N = Mn[_], b = /[defgprs%]/.test(_);
|
2164
|
+
$ = $ === void 0 ? 6 : /[gprs]/.test(_) ? Math.max(1, Math.min(21, $)) : Math.max(0, Math.min(20, $));
|
2165
2165
|
function x(g) {
|
2166
|
-
var S = R, C =
|
2167
|
-
if (
|
2166
|
+
var S = R, C = B, I, it, lt;
|
2167
|
+
if (_ === "c")
|
2168
2168
|
C = N(g) + C, g = "";
|
2169
2169
|
else {
|
2170
2170
|
g = +g;
|
2171
2171
|
var j = g < 0 || 1 / g < 0;
|
2172
|
-
if (g = isNaN(g) ? u : N(Math.abs(g), $),
|
2172
|
+
if (g = isNaN(g) ? u : N(Math.abs(g), $), M && (g = vu(g)), j && +g == 0 && d !== "+" && (j = !1), S = (j ? d === "(" ? d : s : d === "-" || d === "(" ? "" : d) + S, C = (_ === "s" ? Ln[8 + Cr / 3] : "") + C + (j && d === "(" ? ")" : ""), b) {
|
2173
2173
|
for (I = -1, it = g.length; ++I < it; )
|
2174
2174
|
if (lt = g.charCodeAt(I), 48 > lt || lt > 57) {
|
2175
2175
|
C = (lt === 46 ? i + g.slice(I + 1) : g.slice(I)) + C, g = g.slice(0, I);
|
@@ -2177,9 +2177,9 @@ function xu(t) {
|
|
2177
2177
|
}
|
2178
2178
|
}
|
2179
2179
|
}
|
2180
|
-
|
2180
|
+
A && !v && (g = e(g, 1 / 0));
|
2181
2181
|
var qt = S.length + g.length + C.length, et = qt < w ? new Array(w - qt + 1).join(h) : "";
|
2182
|
-
switch (
|
2182
|
+
switch (A && v && (g = e(et + g, et.length ? w - C.length : 1 / 0), et = ""), p) {
|
2183
2183
|
case "<":
|
2184
2184
|
g = S + g + C + et;
|
2185
2185
|
break;
|
@@ -2670,7 +2670,7 @@ const Vu = (t) => {
|
|
2670
2670
|
throw Error(a);
|
2671
2671
|
}
|
2672
2672
|
return i;
|
2673
|
-
}, Gu = (t) =>
|
2673
|
+
}, Gu = (t) => F({ data: t }, {
|
2674
2674
|
data: {
|
2675
2675
|
toBe: "(DataSeriesDatum | DataSeriesValue)[][] | (DataSeriesDatum | DataSeriesValue)[]",
|
2676
2676
|
// 畢免資料量過大檢查不完,不深度檢查
|
@@ -3206,7 +3206,7 @@ function Ku(t) {
|
|
3206
3206
|
function Zu(t) {
|
3207
3207
|
return k(t == null ? void 0 : t.lift);
|
3208
3208
|
}
|
3209
|
-
function
|
3209
|
+
function G(t) {
|
3210
3210
|
return function(e) {
|
3211
3211
|
if (Zu(e))
|
3212
3212
|
return e.lift(function(n) {
|
@@ -3219,7 +3219,7 @@ function V(t) {
|
|
3219
3219
|
throw new TypeError("Unable to lift unknown Observable type");
|
3220
3220
|
};
|
3221
3221
|
}
|
3222
|
-
function
|
3222
|
+
function V(t, e, n, r, i) {
|
3223
3223
|
return new Qu(t, e, n, r, i);
|
3224
3224
|
}
|
3225
3225
|
var Qu = function(t) {
|
@@ -3698,8 +3698,8 @@ function at(t, e, n, r, i) {
|
|
3698
3698
|
return a;
|
3699
3699
|
}
|
3700
3700
|
function ai(t, e) {
|
3701
|
-
return e === void 0 && (e = 0),
|
3702
|
-
n.subscribe(
|
3701
|
+
return e === void 0 && (e = 0), G(function(n, r) {
|
3702
|
+
n.subscribe(V(r, function(i) {
|
3703
3703
|
return at(r, t, function() {
|
3704
3704
|
return r.next(i);
|
3705
3705
|
}, e);
|
@@ -3715,7 +3715,7 @@ function ai(t, e) {
|
|
3715
3715
|
});
|
3716
3716
|
}
|
3717
3717
|
function oi(t, e) {
|
3718
|
-
return e === void 0 && (e = 0),
|
3718
|
+
return e === void 0 && (e = 0), G(function(n, r) {
|
3719
3719
|
r.add(t.schedule(function() {
|
3720
3720
|
return n.subscribe(r);
|
3721
3721
|
}, e));
|
@@ -3806,9 +3806,9 @@ function xl(t) {
|
|
3806
3806
|
return t instanceof Date && !isNaN(t);
|
3807
3807
|
}
|
3808
3808
|
function D(t, e) {
|
3809
|
-
return
|
3809
|
+
return G(function(n, r) {
|
3810
3810
|
var i = 0;
|
3811
|
-
n.subscribe(
|
3811
|
+
n.subscribe(V(r, function(a) {
|
3812
3812
|
r.next(t.call(e, a, i++));
|
3813
3813
|
}));
|
3814
3814
|
});
|
@@ -3865,7 +3865,7 @@ function El(t, e, n) {
|
|
3865
3865
|
for (var i = t.length, a = new Array(i), o = i, s = i, u = function(f) {
|
3866
3866
|
Gn(e, function() {
|
3867
3867
|
var c = Ft(t[f], e), h = !1;
|
3868
|
-
c.subscribe(
|
3868
|
+
c.subscribe(V(r, function(p) {
|
3869
3869
|
a[f] = p, h || (h = !0, s--), s || r.next(n(a.slice()));
|
3870
3870
|
}, function() {
|
3871
3871
|
--o || r.complete();
|
@@ -3887,7 +3887,7 @@ function Ll(t, e, n, r, i, a, o, s) {
|
|
3887
3887
|
}, d = function(m) {
|
3888
3888
|
l++;
|
3889
3889
|
var v = !1;
|
3890
|
-
H(n(m, f++)).subscribe(
|
3890
|
+
H(n(m, f++)).subscribe(V(e, function(w) {
|
3891
3891
|
e.next(w);
|
3892
3892
|
}, function() {
|
3893
3893
|
v = !0;
|
@@ -3896,17 +3896,17 @@ function Ll(t, e, n, r, i, a, o, s) {
|
|
3896
3896
|
try {
|
3897
3897
|
l--;
|
3898
3898
|
for (var w = function() {
|
3899
|
-
var
|
3900
|
-
o || d(
|
3899
|
+
var A = u.shift();
|
3900
|
+
o || d(A);
|
3901
3901
|
}; u.length && l < r; )
|
3902
3902
|
w();
|
3903
3903
|
h();
|
3904
|
-
} catch (
|
3905
|
-
e.error(
|
3904
|
+
} catch (A) {
|
3905
|
+
e.error(A);
|
3906
3906
|
}
|
3907
3907
|
}));
|
3908
3908
|
};
|
3909
|
-
return t.subscribe(
|
3909
|
+
return t.subscribe(V(e, p, function() {
|
3910
3910
|
c = !0, h();
|
3911
3911
|
})), function() {
|
3912
3912
|
};
|
@@ -3916,7 +3916,7 @@ function li(t, e, n) {
|
|
3916
3916
|
return D(function(a, o) {
|
3917
3917
|
return e(r, a, i, o);
|
3918
3918
|
})(H(t(r, i)));
|
3919
|
-
}, n) : (typeof e == "number" && (n = e),
|
3919
|
+
}, n) : (typeof e == "number" && (n = e), G(function(r, i) {
|
3920
3920
|
return Ll(r, i, t, n);
|
3921
3921
|
}));
|
3922
3922
|
}
|
@@ -3964,15 +3964,15 @@ function Il(t) {
|
|
3964
3964
|
return t.length === 1 && Rl(t[0]) ? t[0] : t;
|
3965
3965
|
}
|
3966
3966
|
function Yn(t, e) {
|
3967
|
-
return
|
3967
|
+
return G(function(n, r) {
|
3968
3968
|
var i = 0;
|
3969
|
-
n.subscribe(
|
3969
|
+
n.subscribe(V(r, function(a) {
|
3970
3970
|
return t.call(e, a, i++) && r.next(a);
|
3971
3971
|
}));
|
3972
3972
|
});
|
3973
3973
|
}
|
3974
3974
|
function Bl(t, e) {
|
3975
|
-
return e === void 0 && (e = on),
|
3975
|
+
return e === void 0 && (e = on), G(function(n, r) {
|
3976
3976
|
var i = null, a = null, o = null, s = function() {
|
3977
3977
|
if (i) {
|
3978
3978
|
i.unsubscribe(), i = null;
|
@@ -3988,7 +3988,7 @@ function Bl(t, e) {
|
|
3988
3988
|
}
|
3989
3989
|
s();
|
3990
3990
|
}
|
3991
|
-
n.subscribe(
|
3991
|
+
n.subscribe(V(r, function(l) {
|
3992
3992
|
a = l, o = e.now(), i || (i = e.schedule(u, t), r.add(i));
|
3993
3993
|
}, function() {
|
3994
3994
|
s(), r.complete();
|
@@ -3998,9 +3998,9 @@ function Bl(t, e) {
|
|
3998
3998
|
});
|
3999
3999
|
}
|
4000
4000
|
function Vl(t) {
|
4001
|
-
return
|
4001
|
+
return G(function(e, n) {
|
4002
4002
|
var r = !1;
|
4003
|
-
e.subscribe(
|
4003
|
+
e.subscribe(V(n, function(i) {
|
4004
4004
|
r = !0, n.next(i);
|
4005
4005
|
}, function() {
|
4006
4006
|
r || n.next(t), n.complete();
|
@@ -4010,17 +4010,17 @@ function Vl(t) {
|
|
4010
4010
|
function Gl(t) {
|
4011
4011
|
return t <= 0 ? function() {
|
4012
4012
|
return Hr;
|
4013
|
-
} :
|
4013
|
+
} : G(function(e, n) {
|
4014
4014
|
var r = 0;
|
4015
|
-
e.subscribe(
|
4015
|
+
e.subscribe(V(n, function(i) {
|
4016
4016
|
++r <= t && (n.next(i), t <= r && n.complete());
|
4017
4017
|
}));
|
4018
4018
|
});
|
4019
4019
|
}
|
4020
4020
|
function K(t, e) {
|
4021
|
-
return e === void 0 && (e = Ct), t = t ?? Xl,
|
4021
|
+
return e === void 0 && (e = Ct), t = t ?? Xl, G(function(n, r) {
|
4022
4022
|
var i, a = !0;
|
4023
|
-
n.subscribe(
|
4023
|
+
n.subscribe(V(r, function(o) {
|
4024
4024
|
var s = e(o);
|
4025
4025
|
(a || !t(i, s)) && (a = !1, i = s, r.next(o));
|
4026
4026
|
}));
|
@@ -4030,9 +4030,9 @@ function Xl(t, e) {
|
|
4030
4030
|
return t === e;
|
4031
4031
|
}
|
4032
4032
|
function Yl(t) {
|
4033
|
-
return t === void 0 && (t = Ul),
|
4033
|
+
return t === void 0 && (t = Ul), G(function(e, n) {
|
4034
4034
|
var r = !1;
|
4035
|
-
e.subscribe(
|
4035
|
+
e.subscribe(V(n, function(i) {
|
4036
4036
|
r = !0, n.next(i);
|
4037
4037
|
}, function() {
|
4038
4038
|
return r ? n.complete() : n.error(t());
|
@@ -4054,7 +4054,7 @@ function Hl() {
|
|
4054
4054
|
for (var t = [], e = 0; e < arguments.length; e++)
|
4055
4055
|
t[e] = arguments[e];
|
4056
4056
|
var n = Mt(t), r = qr(t, 1 / 0);
|
4057
|
-
return t = Il(t),
|
4057
|
+
return t = Il(t), G(function(i, a) {
|
4058
4058
|
un(r)(Ft(st([i], ot(t)), n)).subscribe(a);
|
4059
4059
|
});
|
4060
4060
|
}
|
@@ -4073,24 +4073,24 @@ function Ye(t) {
|
|
4073
4073
|
c == null || c.unsubscribe(), c = void 0;
|
4074
4074
|
}, w = function() {
|
4075
4075
|
v(), f = h = void 0, d = m = !1;
|
4076
|
-
},
|
4076
|
+
}, A = function() {
|
4077
4077
|
var $ = f;
|
4078
4078
|
w(), $ == null || $.unsubscribe();
|
4079
4079
|
};
|
4080
|
-
return
|
4080
|
+
return G(function($, M) {
|
4081
4081
|
p++, !m && !d && v();
|
4082
|
-
var
|
4083
|
-
|
4084
|
-
p--, p === 0 && !m && !d && (c = Me(
|
4085
|
-
}),
|
4082
|
+
var _ = h = h ?? n();
|
4083
|
+
M.add(function() {
|
4084
|
+
p--, p === 0 && !m && !d && (c = Me(A, u));
|
4085
|
+
}), _.subscribe(M), !f && p > 0 && (f = new Gt({
|
4086
4086
|
next: function(R) {
|
4087
|
-
return
|
4087
|
+
return _.next(R);
|
4088
4088
|
},
|
4089
4089
|
error: function(R) {
|
4090
|
-
m = !0, v(), c = Me(w, i, R),
|
4090
|
+
m = !0, v(), c = Me(w, i, R), _.error(R);
|
4091
4091
|
},
|
4092
4092
|
complete: function() {
|
4093
|
-
d = !0, v(), c = Me(w, o),
|
4093
|
+
d = !0, v(), c = Me(w, o), _.complete();
|
4094
4094
|
}
|
4095
4095
|
}), H($).subscribe(f));
|
4096
4096
|
})(l);
|
@@ -4127,19 +4127,19 @@ function Fe() {
|
|
4127
4127
|
for (var t = [], e = 0; e < arguments.length; e++)
|
4128
4128
|
t[e] = arguments[e];
|
4129
4129
|
var n = Mt(t);
|
4130
|
-
return
|
4130
|
+
return G(function(r, i) {
|
4131
4131
|
(n ? Xn(t, r, n) : Xn(t, r)).subscribe(i);
|
4132
4132
|
});
|
4133
4133
|
}
|
4134
4134
|
function E(t, e) {
|
4135
|
-
return
|
4135
|
+
return G(function(n, r) {
|
4136
4136
|
var i = null, a = 0, o = !1, s = function() {
|
4137
4137
|
return o && !i && r.complete();
|
4138
4138
|
};
|
4139
|
-
n.subscribe(
|
4139
|
+
n.subscribe(V(r, function(u) {
|
4140
4140
|
i == null || i.unsubscribe();
|
4141
4141
|
var l = 0, f = a++;
|
4142
|
-
H(t(u, f)).subscribe(i =
|
4142
|
+
H(t(u, f)).subscribe(i = V(r, function(c) {
|
4143
4143
|
return r.next(e ? e(u, c, f, l++) : c);
|
4144
4144
|
}, function() {
|
4145
4145
|
i = null, s();
|
@@ -4150,20 +4150,20 @@ function E(t, e) {
|
|
4150
4150
|
});
|
4151
4151
|
}
|
4152
4152
|
function T(t) {
|
4153
|
-
return
|
4154
|
-
H(t).subscribe(
|
4153
|
+
return G(function(e, n) {
|
4154
|
+
H(t).subscribe(V(n, function() {
|
4155
4155
|
return n.complete();
|
4156
4156
|
}, Ge)), !n.closed && e.subscribe(n);
|
4157
4157
|
});
|
4158
4158
|
}
|
4159
4159
|
function ql(t, e) {
|
4160
|
-
return
|
4160
|
+
return G(function(n, r) {
|
4161
4161
|
var i = e ?? {}, a = i.leading, o = a === void 0 ? !0 : a, s = i.trailing, u = s === void 0 ? !1 : s, l = !1, f = null, c = null, h = !1, p = function() {
|
4162
4162
|
c == null || c.unsubscribe(), c = null, u && (v(), h && r.complete());
|
4163
4163
|
}, d = function() {
|
4164
4164
|
c = null, h && r.complete();
|
4165
4165
|
}, m = function(w) {
|
4166
|
-
return c = H(t(w)).subscribe(
|
4166
|
+
return c = H(t(w)).subscribe(V(r, p, d));
|
4167
4167
|
}, v = function() {
|
4168
4168
|
if (l) {
|
4169
4169
|
l = !1;
|
@@ -4171,7 +4171,7 @@ function ql(t, e) {
|
|
4171
4171
|
f = null, r.next(w), !h && m(w);
|
4172
4172
|
}
|
4173
4173
|
};
|
4174
|
-
n.subscribe(
|
4174
|
+
n.subscribe(V(r, function(w) {
|
4175
4175
|
l = !0, f = w, !(c && !c.closed) && (o ? v() : m(w));
|
4176
4176
|
}, function() {
|
4177
4177
|
h = !0, !(u && l && c && !c.closed) && r.complete();
|
@@ -4398,12 +4398,11 @@ const Ht = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
|
|
4398
4398
|
maxValue: t = 1,
|
4399
4399
|
minValue: e = 0,
|
4400
4400
|
axisWidth: n,
|
4401
|
-
scaleDomain: r =
|
4402
|
-
scaleRange: i =
|
4401
|
+
scaleDomain: r = X.scaleDomain,
|
4402
|
+
scaleRange: i = X.scaleRange,
|
4403
4403
|
reverse: a = !1
|
4404
4404
|
}) => {
|
4405
|
-
|
4406
|
-
const o = r[0] ?? G.scaleDomain[0], s = r[1] ?? G.scaleDomain[1], u = i[0] ?? G.scaleRange[0], l = i[1] ?? G.scaleRange[1];
|
4405
|
+
const o = r[0] ?? X.scaleDomain[0], s = r[1] ?? X.scaleDomain[1], u = i[0] ?? X.scaleRange[0], l = i[1] ?? X.scaleRange[1];
|
4407
4406
|
let f = o === "auto" ? e < 0 ? e : 0 : o === "min" ? e : o, c = s === "auto" ? t >= 0 ? t : 0 : s === "max" ? t : s;
|
4408
4407
|
const h = t - (t - f) / (1 - u), p = c / l;
|
4409
4408
|
return a ? Bt().domain([h, p]).range([n, 0]) : Bt().domain([h, p]).range([0, n]);
|
@@ -4411,12 +4410,12 @@ const Ht = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
|
|
4411
4410
|
maxValue: t = 1,
|
4412
4411
|
minValue: e = 0,
|
4413
4412
|
axisWidth: n,
|
4414
|
-
scaleDomain: r =
|
4415
|
-
scaleRange: i =
|
4413
|
+
scaleDomain: r = X.scaleDomain,
|
4414
|
+
scaleRange: i = X.scaleRange,
|
4416
4415
|
reverse: a = !1
|
4417
4416
|
}) => {
|
4418
4417
|
e === t && (t += 1, e -= 1);
|
4419
|
-
const o = r[0] ??
|
4418
|
+
const o = r[0] ?? X.scaleDomain[0], s = r[1] ?? X.scaleDomain[1], u = i[0] ?? X.scaleRange[0], l = i[1] ?? X.scaleRange[1];
|
4420
4419
|
let f = o === "auto" ? e < 0 ? e : 0 : o === "min" ? e : o, c = s === "auto" ? t >= 0 ? t : 0 : s === "max" ? t : s;
|
4421
4420
|
const h = t - (t - f) / (1 - u), p = c / l;
|
4422
4421
|
return a ? Bt().domain([n, 0]).range([h, p]) : Bt().domain([0, n]).range([h, p]);
|
@@ -4442,8 +4441,9 @@ const Ht = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
|
|
4442
4441
|
});
|
4443
4442
|
}
|
4444
4443
|
function i(a, o, s) {
|
4445
|
-
const u = o.grid.valueAxis.position === "left" || o.grid.valueAxis.position === "right" ? s.height : s.width, l = a.flat()
|
4446
|
-
|
4444
|
+
const u = o.grid.valueAxis.position === "left" || o.grid.valueAxis.position === "right" ? s.height : s.width, l = a.flat();
|
4445
|
+
let [f, c] = Iu(l);
|
4446
|
+
return f === c && c === 0 && (c = 1), ut({
|
4447
4447
|
maxValue: c,
|
4448
4448
|
minValue: f,
|
4449
4449
|
axisWidth: u,
|
@@ -4613,15 +4613,15 @@ const Ht = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
|
|
4613
4613
|
const a = new L();
|
4614
4614
|
function o({ data: s, groupAxis: u, valueAxis: l, groupScaleDomainValue: f, filteredMinMaxValue: c, width: h, height: p }) {
|
4615
4615
|
let d = 0, m = 0, v = 0, w = 0;
|
4616
|
-
const
|
4617
|
-
maxValue:
|
4616
|
+
const A = u.position === "top" || u.position === "bottom" ? h : p, $ = 0, M = s[0] ? s[0].length - 1 : 0, _ = ut({
|
4617
|
+
maxValue: M,
|
4618
4618
|
minValue: $,
|
4619
|
-
axisWidth:
|
4619
|
+
axisWidth: A,
|
4620
4620
|
// scaleDomain: groupAxis.scaleDomain,
|
4621
4621
|
scaleDomain: f,
|
4622
4622
|
scaleRange: [0, 1]
|
4623
|
-
}), R =
|
4624
|
-
$ ==
|
4623
|
+
}), R = _($), B = _(M);
|
4624
|
+
$ == M ? (d = 0, v = 1) : (d = R, v = (B - R) / A), c[0] === c[1] && c[1] === 0 && (c[1] = 1);
|
4625
4625
|
const N = l.position === "left" || l.position === "right" ? p : h, b = ut({
|
4626
4626
|
maxValue: c[1],
|
4627
4627
|
minValue: c[0],
|
@@ -4629,7 +4629,7 @@ const Ht = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
|
|
4629
4629
|
scaleDomain: l.scaleDomain,
|
4630
4630
|
scaleRange: l.scaleRange
|
4631
4631
|
}), x = Ir(s);
|
4632
|
-
x[0] === x[1] &&
|
4632
|
+
x[0] === x[1] && x[1] === 0 && (x[1] = 1);
|
4633
4633
|
const g = b(x[0] > 0 ? 0 : x[0]), S = b(x[1] < 0 ? 0 : x[1]);
|
4634
4634
|
return m = g, w = (S - g) / N, {
|
4635
4635
|
translate: [d, m],
|
@@ -4729,7 +4729,7 @@ const Ht = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
|
|
4729
4729
|
), w = pt(u.multiGridContainer[c]).pipe(
|
4730
4730
|
T(a),
|
4731
4731
|
y(1)
|
4732
|
-
),
|
4732
|
+
), A = di({
|
4733
4733
|
fullDataFormatter$: d,
|
4734
4734
|
layout$: n
|
4735
4735
|
}).pipe(
|
@@ -4740,12 +4740,12 @@ const Ht = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
|
|
4740
4740
|
).pipe(
|
4741
4741
|
T(a),
|
4742
4742
|
y(1)
|
4743
|
-
),
|
4743
|
+
), M = mi({
|
4744
4744
|
computedData$: m
|
4745
4745
|
}).pipe(
|
4746
4746
|
T(a),
|
4747
4747
|
y(1)
|
4748
|
-
),
|
4748
|
+
), _ = ln({
|
4749
4749
|
datumList$: $
|
4750
4750
|
}).pipe(
|
4751
4751
|
T(a),
|
@@ -4755,7 +4755,7 @@ const Ht = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
|
|
4755
4755
|
}).pipe(
|
4756
4756
|
T(a),
|
4757
4757
|
y(1)
|
4758
|
-
),
|
4758
|
+
), B = gi({
|
4759
4759
|
computedData$: m
|
4760
4760
|
}).pipe(
|
4761
4761
|
T(a),
|
@@ -4817,15 +4817,15 @@ const Ht = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
|
|
4817
4817
|
return {
|
4818
4818
|
isSeriesSeprate$: v,
|
4819
4819
|
gridContainerPosition$: w,
|
4820
|
-
gridAxesSize$:
|
4820
|
+
gridAxesSize$: A,
|
4821
4821
|
gridHighlight$: o,
|
4822
|
-
seriesLabels$:
|
4823
|
-
SeriesDataMap$:
|
4822
|
+
seriesLabels$: M,
|
4823
|
+
SeriesDataMap$: _,
|
4824
4824
|
GroupDataMap$: R,
|
4825
4825
|
dataFormatter$: d,
|
4826
4826
|
computedData$: m,
|
4827
4827
|
computedLayoutData$: N,
|
4828
|
-
visibleComputedData$:
|
4828
|
+
visibleComputedData$: B,
|
4829
4829
|
visibleComputedLayoutData$: b,
|
4830
4830
|
computedStackedData$: x,
|
4831
4831
|
groupScaleDomainValue$: g,
|
@@ -4892,7 +4892,7 @@ function ft({ columnName: t, expectToBe: e, from: n }) {
|
|
4892
4892
|
----> find in '${n}'`;
|
4893
4893
|
}
|
4894
4894
|
function uc(t) {
|
4895
|
-
return t ?
|
4895
|
+
return t ? F(t, {
|
4896
4896
|
width: {
|
4897
4897
|
toBe: '"auto" | number',
|
4898
4898
|
test: (n) => n === "auto" || typeof n == "number"
|
@@ -4907,7 +4907,7 @@ function uc(t) {
|
|
4907
4907
|
}) : { status: "success", columnName: "", expectToBe: "" };
|
4908
4908
|
}
|
4909
4909
|
function lc(t) {
|
4910
|
-
return
|
4910
|
+
return F({ element: t }, {
|
4911
4911
|
element: {
|
4912
4912
|
toBe: "Dom",
|
4913
4913
|
test: (n) => Ei(n)
|
@@ -4923,7 +4923,7 @@ function cc(t, e) {
|
|
4923
4923
|
relationship: ["category", "datum", "none"],
|
4924
4924
|
tree: ["category", "datum", "none"],
|
4925
4925
|
noneData: ["none"]
|
4926
|
-
}, r =
|
4926
|
+
}, r = F(e, {
|
4927
4927
|
padding: {
|
4928
4928
|
toBeTypes: ["object"]
|
4929
4929
|
},
|
@@ -4953,7 +4953,7 @@ function cc(t, e) {
|
|
4953
4953
|
}
|
4954
4954
|
});
|
4955
4955
|
if (e && e.padding) {
|
4956
|
-
const i =
|
4956
|
+
const i = F(e.padding, {
|
4957
4957
|
top: {
|
4958
4958
|
toBeTypes: ["number"]
|
4959
4959
|
},
|
@@ -4971,7 +4971,7 @@ function cc(t, e) {
|
|
4971
4971
|
return i;
|
4972
4972
|
}
|
4973
4973
|
if (e && e.colors) {
|
4974
|
-
const i =
|
4974
|
+
const i = F(e.colors, {
|
4975
4975
|
light: {
|
4976
4976
|
toBeTypes: ["object"]
|
4977
4977
|
},
|
@@ -4982,7 +4982,7 @@ function cc(t, e) {
|
|
4982
4982
|
if (i.status === "error")
|
4983
4983
|
return i;
|
4984
4984
|
if (e.colors.light) {
|
4985
|
-
const a =
|
4985
|
+
const a = F(e.colors.light, {
|
4986
4986
|
series: {
|
4987
4987
|
toBeTypes: ["string[]"]
|
4988
4988
|
},
|
@@ -5003,7 +5003,7 @@ function cc(t, e) {
|
|
5003
5003
|
return a;
|
5004
5004
|
}
|
5005
5005
|
if (e.colors.dark) {
|
5006
|
-
const a =
|
5006
|
+
const a = F(e.colors.dark, {
|
5007
5007
|
series: {
|
5008
5008
|
toBeTypes: ["string[]"]
|
5009
5009
|
},
|
@@ -5027,7 +5027,7 @@ function cc(t, e) {
|
|
5027
5027
|
return r;
|
5028
5028
|
}
|
5029
5029
|
function fc(t, e) {
|
5030
|
-
return
|
5030
|
+
return F({ pluginEntities: e }, {
|
5031
5031
|
pluginEntities: {
|
5032
5032
|
toBe: `PluginEntity<'${t}'>[]`,
|
5033
5033
|
test: (r) => Array.isArray(r) && r.every((i) => i.chartType === t || i.chartType === "noneData")
|
@@ -5157,17 +5157,17 @@ const hc = ({
|
|
5157
5157
|
// return EMPTY
|
5158
5158
|
// }),
|
5159
5159
|
y(1)
|
5160
|
-
),
|
5160
|
+
), A = w.pipe(
|
5161
5161
|
T(a),
|
5162
5162
|
Fe({}),
|
5163
5163
|
D((b) => dt(b.padding ?? {}, Hn))
|
5164
5164
|
);
|
5165
|
-
|
5165
|
+
A.pipe(
|
5166
5166
|
T(a),
|
5167
5167
|
zl()
|
5168
5168
|
).subscribe((b) => {
|
5169
5169
|
c.attr("transform", `translate(${b.left}, ${b.top})`);
|
5170
|
-
}),
|
5170
|
+
}), A.subscribe((b) => {
|
5171
5171
|
c.transition().attr("transform", `translate(${b.left}, ${b.top})`);
|
5172
5172
|
});
|
5173
5173
|
const $ = pt({
|
@@ -5187,7 +5187,7 @@ const hc = ({
|
|
5187
5187
|
)),
|
5188
5188
|
T(a),
|
5189
5189
|
Ye()
|
5190
|
-
),
|
5190
|
+
), M = pt().pipe(
|
5191
5191
|
jl(
|
5192
5192
|
$.pipe(
|
5193
5193
|
Bl(250)
|
@@ -5198,9 +5198,9 @@ const hc = ({
|
|
5198
5198
|
),
|
5199
5199
|
K((b, x) => JSON.stringify(b) === JSON.stringify(x)),
|
5200
5200
|
Ye()
|
5201
|
-
),
|
5202
|
-
rootSize:
|
5203
|
-
mergedPadding:
|
5201
|
+
), _ = M.subscribe(), R = O({
|
5202
|
+
rootSize: M,
|
5203
|
+
mergedPadding: A
|
5204
5204
|
}).pipe(
|
5205
5205
|
T(a),
|
5206
5206
|
E(async (b) => {
|
@@ -5221,7 +5221,7 @@ const hc = ({
|
|
5221
5221
|
R.subscribe((b) => {
|
5222
5222
|
f.attr("width", b.rootWidth).attr("height", b.rootHeight);
|
5223
5223
|
});
|
5224
|
-
const
|
5224
|
+
const B = O({
|
5225
5225
|
data: m,
|
5226
5226
|
dataFormatter: v,
|
5227
5227
|
chartParams: w
|
@@ -5256,7 +5256,7 @@ const hc = ({
|
|
5256
5256
|
)),
|
5257
5257
|
y(1)
|
5258
5258
|
);
|
5259
|
-
|
5259
|
+
B.subscribe();
|
5260
5260
|
const N = {};
|
5261
5261
|
return p.plugins$.subscribe((b) => {
|
5262
5262
|
try {
|
@@ -5282,7 +5282,7 @@ const hc = ({
|
|
5282
5282
|
fullParams$: new P(),
|
5283
5283
|
fullChartParams$: w,
|
5284
5284
|
fullDataFormatter$: v,
|
5285
|
-
computedData$:
|
5285
|
+
computedData$: B,
|
5286
5286
|
layout$: R
|
5287
5287
|
}, it = i({
|
5288
5288
|
observer: I,
|
@@ -5306,7 +5306,7 @@ const hc = ({
|
|
5306
5306
|
...p,
|
5307
5307
|
selection: f,
|
5308
5308
|
destroy() {
|
5309
|
-
Wt(u).selectAll("svg").remove(), a.next(void 0),
|
5309
|
+
Wt(u).selectAll("svg").remove(), a.next(void 0), _.unsubscribe();
|
5310
5310
|
}
|
5311
5311
|
};
|
5312
5312
|
};
|
@@ -5338,7 +5338,7 @@ class af extends Et {
|
|
5338
5338
|
}
|
5339
5339
|
}
|
5340
5340
|
const pc = (t) => {
|
5341
|
-
const e =
|
5341
|
+
const e = F(t, {
|
5342
5342
|
visibleFilter: {
|
5343
5343
|
toBeTypes: ["Function"]
|
5344
5344
|
},
|
@@ -5350,7 +5350,7 @@ const pc = (t) => {
|
|
5350
5350
|
}
|
5351
5351
|
});
|
5352
5352
|
if (t.grid) {
|
5353
|
-
const n =
|
5353
|
+
const n = F(t.grid, {
|
5354
5354
|
seriesDirection: {
|
5355
5355
|
toBe: '"row" | "column"',
|
5356
5356
|
test: (r) => r === "row" || r === "column"
|
@@ -5374,7 +5374,7 @@ const pc = (t) => {
|
|
5374
5374
|
if (n.status === "error")
|
5375
5375
|
return n;
|
5376
5376
|
if (t.grid.valueAxis) {
|
5377
|
-
const r =
|
5377
|
+
const r = F(t.grid.valueAxis, {
|
5378
5378
|
position: {
|
5379
5379
|
toBe: '"bottom" | "left" | "top" | "right"',
|
5380
5380
|
test: (i) => i === "bottom" || i === "left" || i === "top" || i === "right"
|
@@ -5395,7 +5395,7 @@ const pc = (t) => {
|
|
5395
5395
|
return r;
|
5396
5396
|
}
|
5397
5397
|
if (t.grid.groupAxis) {
|
5398
|
-
const r =
|
5398
|
+
const r = F(t.grid.groupAxis, {
|
5399
5399
|
position: {
|
5400
5400
|
toBe: '"bottom" | "left" | "top" | "right"',
|
5401
5401
|
test: (i) => i === "bottom" || i === "left" || i === "top" || i === "right"
|
@@ -5416,7 +5416,7 @@ const pc = (t) => {
|
|
5416
5416
|
}
|
5417
5417
|
}
|
5418
5418
|
if (t.container) {
|
5419
|
-
const n =
|
5419
|
+
const n = F(t.container, {
|
5420
5420
|
gap: {
|
5421
5421
|
toBeTypes: ["number"]
|
5422
5422
|
},
|
@@ -5503,7 +5503,7 @@ const dc = (t) => {
|
|
5503
5503
|
throw Error(a);
|
5504
5504
|
}
|
5505
5505
|
return i;
|
5506
|
-
}, mc = (t) =>
|
5506
|
+
}, mc = (t) => F({ data: t }, {
|
5507
5507
|
data: {
|
5508
5508
|
toBe: "(DataGridDatum | DataGridValue)[][]",
|
5509
5509
|
// 畢免資料量過大檢查不完,不深度檢查
|
@@ -5513,7 +5513,7 @@ const dc = (t) => {
|
|
5513
5513
|
const n = jt(e.fullChartParams$).pipe(
|
5514
5514
|
y(1)
|
5515
5515
|
), r = e.fullDataFormatter$.pipe(
|
5516
|
-
D((
|
5516
|
+
D((_) => _.grid.separateSeries),
|
5517
5517
|
K(),
|
5518
5518
|
y(1)
|
5519
5519
|
), i = rc({
|
@@ -5526,7 +5526,7 @@ const dc = (t) => {
|
|
5526
5526
|
}).pipe(
|
5527
5527
|
y(1)
|
5528
5528
|
), o = e.computedData$.pipe(
|
5529
|
-
D((
|
5529
|
+
D((_) => _.flat())
|
5530
5530
|
).pipe(
|
5531
5531
|
y(1)
|
5532
5532
|
), s = Ht({
|
@@ -5579,7 +5579,7 @@ const dc = (t) => {
|
|
5579
5579
|
layout$: e.layout$
|
5580
5580
|
}).pipe(
|
5581
5581
|
y(1)
|
5582
|
-
),
|
5582
|
+
), A = Di({
|
5583
5583
|
gridAxesTransform$: w
|
5584
5584
|
}).pipe(
|
5585
5585
|
y(1)
|
@@ -5591,7 +5591,7 @@ const dc = (t) => {
|
|
5591
5591
|
layout$: e.layout$
|
5592
5592
|
}).pipe(
|
5593
5593
|
y(1)
|
5594
|
-
),
|
5594
|
+
), M = _i({
|
5595
5595
|
gridContainerPosition$: i,
|
5596
5596
|
gridAxesTransform$: w,
|
5597
5597
|
gridGraphicTransform$: $
|
@@ -5617,9 +5617,9 @@ const dc = (t) => {
|
|
5617
5617
|
groupScaleDomainValue$: m,
|
5618
5618
|
filteredMinMaxValue$: v,
|
5619
5619
|
gridAxesTransform$: w,
|
5620
|
-
gridAxesReverseTransform$:
|
5620
|
+
gridAxesReverseTransform$: A,
|
5621
5621
|
gridGraphicTransform$: $,
|
5622
|
-
gridGraphicReverseScale$:
|
5622
|
+
gridGraphicReverseScale$: M
|
5623
5623
|
};
|
5624
5624
|
};
|
5625
5625
|
class of extends Et {
|
@@ -5638,7 +5638,7 @@ class of extends Et {
|
|
5638
5638
|
}
|
5639
5639
|
}
|
5640
5640
|
const yc = (t) => {
|
5641
|
-
const e =
|
5641
|
+
const e = F(t, {
|
5642
5642
|
visibleFilter: {
|
5643
5643
|
toBeTypes: ["Function"]
|
5644
5644
|
},
|
@@ -5654,7 +5654,7 @@ const yc = (t) => {
|
|
5654
5654
|
});
|
5655
5655
|
if (t.gridList) {
|
5656
5656
|
const r = t.gridList.map((i, a) => {
|
5657
|
-
const o =
|
5657
|
+
const o = F(i, {
|
5658
5658
|
seriesDirection: {
|
5659
5659
|
toBe: '"row" | "column"',
|
5660
5660
|
test: (s) => s === "row" || s === "column"
|
@@ -5678,7 +5678,7 @@ const yc = (t) => {
|
|
5678
5678
|
if (o.status === "error")
|
5679
5679
|
return o;
|
5680
5680
|
if (i.valueAxis) {
|
5681
|
-
const s =
|
5681
|
+
const s = F(i.valueAxis, {
|
5682
5682
|
position: {
|
5683
5683
|
toBe: '"top" | "bottom" | "left" | "right"',
|
5684
5684
|
test: (u) => u === "top" || u === "bottom" || u === "left" || u === "right"
|
@@ -5698,7 +5698,7 @@ const yc = (t) => {
|
|
5698
5698
|
if (s.status === "error")
|
5699
5699
|
return s;
|
5700
5700
|
} else if (i.groupAxis) {
|
5701
|
-
const s =
|
5701
|
+
const s = F(i.groupAxis, {
|
5702
5702
|
position: {
|
5703
5703
|
toBe: '"top" | "bottom" | "left" | "right"',
|
5704
5704
|
test: (u) => u === "top" || u === "bottom" || u === "left" || u === "right"
|
@@ -5727,7 +5727,7 @@ const yc = (t) => {
|
|
5727
5727
|
return r;
|
5728
5728
|
}
|
5729
5729
|
if (t.container) {
|
5730
|
-
const n =
|
5730
|
+
const n = F(t.container, {
|
5731
5731
|
gap: {
|
5732
5732
|
toBeTypes: ["number"]
|
5733
5733
|
},
|
@@ -5772,21 +5772,21 @@ const yc = (t) => {
|
|
5772
5772
|
gridIndex: h
|
5773
5773
|
});
|
5774
5774
|
let m = 0;
|
5775
|
-
return c.map((w,
|
5776
|
-
const
|
5777
|
-
id: $.id ? $.id :
|
5775
|
+
return c.map((w, A) => w.map(($, M) => {
|
5776
|
+
const _ = $e("multiGrid", h, A, M), R = d[M], B = p[A], N = {
|
5777
|
+
id: $.id ? $.id : _,
|
5778
5778
|
index: m,
|
5779
|
-
label: $.label ? $.label :
|
5779
|
+
label: $.label ? $.label : _,
|
5780
5780
|
description: $.description ?? "",
|
5781
5781
|
data: $.data,
|
5782
5782
|
value: $.value,
|
5783
5783
|
gridIndex: h,
|
5784
5784
|
// accSeriesIndex: seriesIndex, // 預設為seriesIndex
|
5785
|
-
seriesIndex:
|
5786
|
-
seriesLabel:
|
5787
|
-
groupIndex:
|
5785
|
+
seriesIndex: A,
|
5786
|
+
seriesLabel: B,
|
5787
|
+
groupIndex: M,
|
5788
5788
|
groupLabel: R,
|
5789
|
-
color: l.get(
|
5789
|
+
color: l.get(B),
|
5790
5790
|
visible: !0
|
5791
5791
|
// 先給一個預設值
|
5792
5792
|
};
|
@@ -5797,7 +5797,7 @@ const yc = (t) => {
|
|
5797
5797
|
throw Error(a);
|
5798
5798
|
}
|
5799
5799
|
return i;
|
5800
|
-
}, bc = (t) =>
|
5800
|
+
}, bc = (t) => F({ data: t }, {
|
5801
5801
|
data: {
|
5802
5802
|
toBe: "DataGrid[]",
|
5803
5803
|
// 畢免資料量過大檢查不完,不深度檢查
|
@@ -5929,9 +5929,10 @@ const wc = (t) => ({
|
|
5929
5929
|
})
|
5930
5930
|
), Ac = ({ computedData$: t, minMaxXY$: e, fullDataFormatter$: n, layout$: r }) => {
|
5931
5931
|
function i(o, s) {
|
5932
|
-
|
5933
|
-
|
5934
|
-
|
5932
|
+
let u = o.maxX, l = o.minX;
|
5933
|
+
return l === u && u === 0 && (u = 1), ut({
|
5934
|
+
maxValue: u,
|
5935
|
+
minValue: l,
|
5935
5936
|
axisWidth: s.width,
|
5936
5937
|
scaleDomain: ["auto", "auto"],
|
5937
5938
|
// 不使用dataFormatter設定 --> 以0為基準到最大或最小值為範圍( * 如果是使用[minValue, maxValue]的話,在兩者很接近的情況下有可能造成scale倍率過高而svg變型時失真的情況)
|
@@ -5940,9 +5941,10 @@ const wc = (t) => ({
|
|
5940
5941
|
});
|
5941
5942
|
}
|
5942
5943
|
function a(o, s) {
|
5943
|
-
|
5944
|
-
|
5945
|
-
|
5944
|
+
let u = o.maxY, l = o.minY;
|
5945
|
+
return l === u && u === 0 && (u = 1), ut({
|
5946
|
+
maxValue: u,
|
5947
|
+
minValue: l,
|
5946
5948
|
axisWidth: s.height,
|
5947
5949
|
scaleDomain: ["auto", "auto"],
|
5948
5950
|
// 不使用dataFormatter設定 --> 以0為基準到最大或最小值為範圍( * 如果是使用[minValue, maxValue]的話,在兩者很接近的情況下有可能造成scale倍率過高而svg變型時失真的情況)
|
@@ -6015,24 +6017,24 @@ const wc = (t) => ({
|
|
6015
6017
|
), Ec = ({ minMaxXY$: t, filteredMinMaxXYData$: e, fullDataFormatter$: n, layout$: r }) => {
|
6016
6018
|
const i = new L();
|
6017
6019
|
function a({ minMaxXY: o, filteredMinMaxXYData: s, xAxis: u, yAxis: l, width: f, height: c }) {
|
6018
|
-
let h = 0, p = 0, d = 0, m = 0, { minX: v, maxX: w, minY:
|
6019
|
-
|
6020
|
+
let h = 0, p = 0, d = 0, m = 0, { minX: v, maxX: w, minY: A, maxY: $ } = o, M = s.minXDatum.value[0] ?? 0, _ = s.maxXDatum.value[0] ?? 0, R = s.minYDatum.value[1] ?? 0, B = s.maxYDatum.value[1] ?? 0;
|
6021
|
+
M === _ && _ === 0 && (_ = 1), R === B && B === 0 && (B = 1), v === w && w === 0 && (w = 1), A === $ && $ === 0 && ($ = 1);
|
6020
6022
|
const N = ut({
|
6021
|
-
maxValue:
|
6022
|
-
minValue:
|
6023
|
+
maxValue: _,
|
6024
|
+
minValue: M,
|
6023
6025
|
axisWidth: f,
|
6024
6026
|
scaleDomain: u.scaleDomain,
|
6025
6027
|
scaleRange: u.scaleRange
|
6026
6028
|
}), b = N(v > 0 ? 0 : v), x = N(w < 0 ? 0 : w);
|
6027
6029
|
h = b, d = (x - b) / f;
|
6028
6030
|
const S = ut({
|
6029
|
-
maxValue:
|
6031
|
+
maxValue: B,
|
6030
6032
|
minValue: R,
|
6031
6033
|
axisWidth: c,
|
6032
6034
|
scaleDomain: l.scaleDomain,
|
6033
6035
|
scaleRange: l.scaleRange,
|
6034
6036
|
reverse: !0
|
6035
|
-
}), C = S(
|
6037
|
+
}), C = S(A > 0 ? 0 : A), I = S($ < 0 ? 0 : $);
|
6036
6038
|
return p = I, m = (C - I) / c, {
|
6037
6039
|
translate: [h, p],
|
6038
6040
|
scale: [d, m],
|
@@ -6051,6 +6053,8 @@ const wc = (t) => ({
|
|
6051
6053
|
T(i),
|
6052
6054
|
E(async (s) => s)
|
6053
6055
|
).subscribe((s) => {
|
6056
|
+
if (!s.filteredMinMaxXYData.minXDatum || !s.filteredMinMaxXYData.maxXDatum || s.filteredMinMaxXYData.minXDatum.value[0] == null || s.filteredMinMaxXYData.maxXDatum.value[0] == null || !s.filteredMinMaxXYData.minYDatum || !s.filteredMinMaxXYData.maxYDatum || s.filteredMinMaxXYData.minYDatum.value[1] == null || s.filteredMinMaxXYData.maxYDatum.value[1] == null)
|
6057
|
+
return;
|
6054
6058
|
const u = a({
|
6055
6059
|
minMaxXY: s.minMaxXY,
|
6056
6060
|
filteredMinMaxXYData: s.filteredMinMaxXYData,
|
@@ -6285,7 +6289,7 @@ class lf extends Et {
|
|
6285
6289
|
);
|
6286
6290
|
}
|
6287
6291
|
}
|
6288
|
-
const Ic = (t) =>
|
6292
|
+
const Ic = (t) => F(t, {
|
6289
6293
|
visibleFilter: {
|
6290
6294
|
toBeTypes: ["Function"]
|
6291
6295
|
},
|
@@ -6364,7 +6368,7 @@ const Ic = (t) => M(t, {
|
|
6364
6368
|
value: f.value,
|
6365
6369
|
visible: !0,
|
6366
6370
|
// 先給預設值
|
6367
|
-
children: (f.children ?? []).map((
|
6371
|
+
children: (f.children ?? []).map((A, $) => l(A, p, $))
|
6368
6372
|
};
|
6369
6373
|
return w.visible = n.visibleFilter(w, t), w;
|
6370
6374
|
};
|
@@ -6373,7 +6377,7 @@ const Ic = (t) => M(t, {
|
|
6373
6377
|
throw Error(s);
|
6374
6378
|
}
|
6375
6379
|
return o;
|
6376
|
-
}, Vc = (t) =>
|
6380
|
+
}, Vc = (t) => F({ data: t }, {
|
6377
6381
|
data: {
|
6378
6382
|
toBe: "DataTreeObj | DataTreeDatum[]",
|
6379
6383
|
// 畢免資料量過大檢查不完,不深度檢查
|
@@ -6441,7 +6445,7 @@ function Xc({ chartType: t, config: e, initFn: n }) {
|
|
6441
6445
|
D((c) => {
|
6442
6446
|
try {
|
6443
6447
|
const { status: h, columnName: p, expectToBe: d } = e.validator(c, {
|
6444
|
-
validateColumns:
|
6448
|
+
validateColumns: F
|
6445
6449
|
});
|
6446
6450
|
if (h === "error")
|
6447
6451
|
throw new Error(ct({
|
@@ -6516,7 +6520,7 @@ export {
|
|
6516
6520
|
Qn as DATA_FORMATTER_RELATIONAL_DEFAULT,
|
6517
6521
|
jn as DATA_FORMATTER_SERIES_DEFAULT,
|
6518
6522
|
Zn as DATA_FORMATTER_TREE_DEFAULT,
|
6519
|
-
|
6523
|
+
X as DATA_FORMATTER_VALUE_AXIS_DEFAULT,
|
6520
6524
|
Uc as DATA_GRID_DEFAULT,
|
6521
6525
|
zc as DATA_MULTI_GRID_DEFAULT,
|
6522
6526
|
Hc as DATA_MULTI_VALUE_DEFAULT,
|