@orbcharts/core 3.0.0-alpha.43 → 3.0.0-alpha.45
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 +97 -97
- package/dist/orbcharts-core.umd.js +2 -2
- package/dist/src/series/seriesObservables.d.ts +3 -3
- package/dist/src/types/ContextObserverSeries.d.ts +1 -1
- package/dist/src/types/DataFormatterSeries.d.ts +3 -3
- package/package.json +41 -41
- package/src/AbstractChart.ts +48 -48
- package/src/GridChart.ts +20 -20
- package/src/MultiGridChart.ts +20 -20
- package/src/MultiValueChart.ts +20 -20
- package/src/RelationshipChart.ts +20 -20
- package/src/SeriesChart.ts +20 -20
- package/src/TreeChart.ts +20 -20
- package/src/base/createBaseChart.ts +368 -367
- package/src/base/createBasePlugin.ts +89 -89
- package/src/defaults.ts +220 -220
- 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/computeGridData.ts +134 -134
- package/src/grid/createGridContextObserver.ts +147 -147
- package/src/grid/gridObservables.ts +573 -573
- package/src/index.ts +21 -21
- package/src/multiGrid/computeMultiGridData.ts +130 -130
- package/src/multiGrid/createMultiGridContextObserver.ts +40 -40
- package/src/multiGrid/multiGridObservables.ts +350 -350
- package/src/multiValue/computeMultiValueData.ts +143 -143
- package/src/multiValue/createMultiValueContextObserver.ts +12 -12
- package/src/relationship/computeRelationshipData.ts +118 -118
- package/src/relationship/createRelationshipContextObserver.ts +12 -12
- package/src/series/computeSeriesData.ts +90 -90
- package/src/series/createSeriesContextObserver.ts +93 -93
- package/src/series/seriesObservables.ts +175 -175
- package/src/tree/computeTreeData.ts +131 -131
- package/src/tree/createTreeContextObserver.ts +61 -61
- package/src/tree/treeObservables.ts +94 -94
- package/src/types/Chart.ts +48 -48
- package/src/types/ChartParams.ts +51 -51
- package/src/types/ComputedData.ts +83 -83
- package/src/types/ComputedDataGrid.ts +13 -13
- package/src/types/ComputedDataMultiGrid.ts +2 -2
- package/src/types/ComputedDataMultiValue.ts +9 -9
- package/src/types/ComputedDataRelationship.ts +19 -19
- package/src/types/ComputedDataSeries.ts +7 -7
- package/src/types/ComputedDataTree.ts +19 -19
- package/src/types/ContextObserver.ts +38 -38
- package/src/types/ContextObserverGrid.ts +41 -41
- package/src/types/ContextObserverMultiGrid.ts +15 -15
- package/src/types/ContextObserverMultiValue.ts +4 -4
- package/src/types/ContextObserverRelationship.ts +4 -4
- package/src/types/ContextObserverSeries.ts +29 -29
- package/src/types/ContextObserverTree.ts +11 -11
- package/src/types/ContextSubject.ts +18 -18
- package/src/types/Data.ts +45 -45
- package/src/types/DataFormatter.ts +74 -74
- package/src/types/DataFormatterGrid.ts +67 -67
- package/src/types/DataFormatterMultiGrid.ts +44 -44
- package/src/types/DataFormatterMultiValue.ts +23 -23
- package/src/types/DataFormatterRelationship.ts +25 -25
- package/src/types/DataFormatterSeries.ts +20 -20
- package/src/types/DataFormatterTree.ts +12 -12
- package/src/types/DataGrid.ts +11 -11
- package/src/types/DataMultiGrid.ts +6 -6
- package/src/types/DataMultiValue.ts +12 -12
- package/src/types/DataRelationship.ts +27 -27
- package/src/types/DataSeries.ts +11 -11
- package/src/types/DataTree.ts +20 -20
- package/src/types/Event.ts +153 -153
- package/src/types/Layout.ts +11 -11
- package/src/types/Padding.ts +5 -5
- package/src/types/Plugin.ts +60 -60
- package/src/types/TransformData.ts +7 -7
- package/src/types/index.ts +37 -37
- package/src/utils/commonUtils.ts +50 -50
- package/src/utils/d3Utils.ts +89 -89
- package/src/utils/index.ts +4 -4
- package/src/utils/observables.ts +201 -201
- package/src/utils/orbchartsUtils.ts +349 -349
- package/tsconfig.json +13 -13
- package/vite.config.js +44 -44
@@ -2016,40 +2016,40 @@ function ou(t) {
|
|
2016
2016
|
c = se(c);
|
2017
2017
|
var h = c.fill, d = c.align, p = c.sign, m = c.symbol, v = c.zero, w = c.width, _ = c.comma, $ = c.precision, x = c.trim, A = c.type;
|
2018
2018
|
A === "n" ? (_ = !0, A = "g") : An[A] || ($ === void 0 && ($ = 12), x = !0, A = "g"), (v || h === "0" && d === "=") && (v = !0, h = "0", d = "=");
|
2019
|
-
var
|
2019
|
+
var P = m === "$" ? n : m === "#" && /[boxX]/.test(A) ? "0" + A.toLowerCase() : "", y = m === "$" ? r : /[%p]/.test(A) ? o : "", S = An[A], C = /[defgprs%]/.test(A);
|
2020
2020
|
$ = $ === void 0 ? 6 : /[gprs]/.test(A) ? Math.max(1, Math.min(21, $)) : Math.max(0, Math.min(20, $));
|
2021
|
-
function et(
|
2022
|
-
var R =
|
2021
|
+
function et(g) {
|
2022
|
+
var R = P, T = y, U, At, ot;
|
2023
2023
|
if (A === "c")
|
2024
|
-
T = S(
|
2024
|
+
T = S(g) + T, g = "";
|
2025
2025
|
else {
|
2026
|
-
|
2027
|
-
var Y =
|
2028
|
-
if (
|
2029
|
-
for (U = -1, At =
|
2030
|
-
if (ot =
|
2031
|
-
T = (ot === 46 ? i +
|
2026
|
+
g = +g;
|
2027
|
+
var Y = g < 0 || 1 / g < 0;
|
2028
|
+
if (g = isNaN(g) ? l : S(Math.abs(g), $), x && (g = iu(g)), Y && +g == 0 && p !== "+" && (Y = !1), R = (Y ? p === "(" ? p : s : p === "-" || p === "(" ? "" : p) + R, T = (A === "s" ? Cn[8 + vr / 3] : "") + T + (Y && p === "(" ? ")" : ""), C) {
|
2029
|
+
for (U = -1, At = g.length; ++U < At; )
|
2030
|
+
if (ot = g.charCodeAt(U), 48 > ot || ot > 57) {
|
2031
|
+
T = (ot === 46 ? i + g.slice(U + 1) : g.slice(U)) + T, g = g.slice(0, U);
|
2032
2032
|
break;
|
2033
2033
|
}
|
2034
2034
|
}
|
2035
2035
|
}
|
2036
|
-
_ && !v && (
|
2037
|
-
var Gt = R.length +
|
2038
|
-
switch (_ && v && (
|
2036
|
+
_ && !v && (g = e(g, 1 / 0));
|
2037
|
+
var Gt = R.length + g.length + T.length, j = Gt < w ? new Array(w - Gt + 1).join(h) : "";
|
2038
|
+
switch (_ && v && (g = e(j + g, j.length ? w - T.length : 1 / 0), j = ""), d) {
|
2039
2039
|
case "<":
|
2040
|
-
|
2040
|
+
g = R + g + T + j;
|
2041
2041
|
break;
|
2042
2042
|
case "=":
|
2043
|
-
|
2043
|
+
g = R + j + g + T;
|
2044
2044
|
break;
|
2045
2045
|
case "^":
|
2046
|
-
|
2046
|
+
g = j.slice(0, Gt = j.length >> 1) + R + g + T + j.slice(Gt);
|
2047
2047
|
break;
|
2048
2048
|
default:
|
2049
|
-
|
2049
|
+
g = j + R + g + T;
|
2050
2050
|
break;
|
2051
2051
|
}
|
2052
|
-
return a(
|
2052
|
+
return a(g);
|
2053
2053
|
}
|
2054
2054
|
return et.toString = function() {
|
2055
2055
|
return c + "";
|
@@ -3124,7 +3124,7 @@ var Iu = function(t) {
|
|
3124
3124
|
return function() {
|
3125
3125
|
t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
3126
3126
|
};
|
3127
|
-
}),
|
3127
|
+
}), F = function(t) {
|
3128
3128
|
tt(e, t);
|
3129
3129
|
function e() {
|
3130
3130
|
var n = t.call(this) || this;
|
@@ -3222,7 +3222,7 @@ var Iu = function(t) {
|
|
3222
3222
|
var r, i;
|
3223
3223
|
return (i = (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(n)) !== null && i !== void 0 ? i : Fr;
|
3224
3224
|
}, e;
|
3225
|
-
}(
|
3225
|
+
}(F), Qe = {
|
3226
3226
|
now: function() {
|
3227
3227
|
return (Qe.delegate || Date).now();
|
3228
3228
|
},
|
@@ -3250,7 +3250,7 @@ var Iu = function(t) {
|
|
3250
3250
|
u && a.splice(0, u + 1);
|
3251
3251
|
}
|
3252
3252
|
}, e;
|
3253
|
-
}(
|
3253
|
+
}(F), Vu = function(t) {
|
3254
3254
|
tt(e, t);
|
3255
3255
|
function e(n, r) {
|
3256
3256
|
return t.call(this) || this;
|
@@ -3904,7 +3904,7 @@ function Fl() {
|
|
3904
3904
|
function Ie(t) {
|
3905
3905
|
t === void 0 && (t = {});
|
3906
3906
|
var e = t.connector, n = e === void 0 ? function() {
|
3907
|
-
return new
|
3907
|
+
return new F();
|
3908
3908
|
} : e, r = t.resetOnError, i = r === void 0 ? !0 : r, a = t.resetOnComplete, o = a === void 0 ? !0 : a, s = t.resetOnRefCountZero, l = s === void 0 ? !0 : s;
|
3909
3909
|
return function(u) {
|
3910
3910
|
var f, c, h, d = 0, p = !1, m = !1, v = function() {
|
@@ -3921,11 +3921,11 @@ function Ie(t) {
|
|
3921
3921
|
x.add(function() {
|
3922
3922
|
d--, d === 0 && !m && !p && (c = _e(_, l));
|
3923
3923
|
}), A.subscribe(x), !f && d > 0 && (f = new Ot({
|
3924
|
-
next: function(
|
3925
|
-
return A.next(
|
3924
|
+
next: function(P) {
|
3925
|
+
return A.next(P);
|
3926
3926
|
},
|
3927
|
-
error: function(
|
3928
|
-
m = !0, v(), c = _e(w, i,
|
3927
|
+
error: function(P) {
|
3928
|
+
m = !0, v(), c = _e(w, i, P), A.error(P);
|
3929
3929
|
},
|
3930
3930
|
complete: function() {
|
3931
3931
|
p = !0, v(), c = _e(w, o), A.complete();
|
@@ -4024,7 +4024,7 @@ function Ll(t, e, n) {
|
|
4024
4024
|
}, n);
|
4025
4025
|
}
|
4026
4026
|
const ge = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
|
4027
|
-
const r = new
|
4027
|
+
const r = new F(), i = e.pipe(
|
4028
4028
|
M(r),
|
4029
4029
|
D((c) => ({
|
4030
4030
|
id: null,
|
@@ -4153,13 +4153,13 @@ const ge = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
|
|
4153
4153
|
}).pipe(
|
4154
4154
|
O(async (i) => i),
|
4155
4155
|
D((i) => i.fullDataFormatter.separateSeries ? Ln(i.layout, i.fullDataFormatter.container, i.computedData.length) : Ln(i.layout, i.fullDataFormatter.container, 1))
|
4156
|
-
), Rl = ({ seriesContainerPosition$: t, seriesLabels$: e,
|
4156
|
+
), Rl = ({ seriesContainerPosition$: t, seriesLabels$: e, separateSeries$: n }) => I({
|
4157
4157
|
seriesContainerPosition: t,
|
4158
4158
|
seriesLabels: e,
|
4159
|
-
|
4159
|
+
separateSeries: n
|
4160
4160
|
}).pipe(
|
4161
4161
|
O(async (r) => r),
|
4162
|
-
D((r) => r.
|
4162
|
+
D((r) => r.separateSeries ? new Map(r.seriesLabels.map((i, a) => [i, r.seriesContainerPosition[a] ?? r.seriesContainerPosition[0]])) : new Map(r.seriesLabels.map((i, a) => [i, r.seriesContainerPosition[0]])))
|
4163
4163
|
), Gl = ({ subject: t, observer: e }) => {
|
4164
4164
|
const n = ye(e.fullChartParams$).pipe(
|
4165
4165
|
b(1)
|
@@ -4199,7 +4199,7 @@ const ge = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
|
|
4199
4199
|
), h = Rl({
|
4200
4200
|
seriesContainerPosition$: c,
|
4201
4201
|
seriesLabels$: u,
|
4202
|
-
|
4202
|
+
separateSeries$: r
|
4203
4203
|
}).pipe(
|
4204
4204
|
b(1)
|
4205
4205
|
);
|
@@ -4212,7 +4212,7 @@ const ge = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
|
|
4212
4212
|
textSizePx$: n,
|
4213
4213
|
visibleComputedData$: i,
|
4214
4214
|
visibleComputedLayoutData$: o,
|
4215
|
-
|
4215
|
+
separateSeries$: r,
|
4216
4216
|
computedLayoutData$: a,
|
4217
4217
|
seriesHighlight$: l,
|
4218
4218
|
seriesLabels$: u,
|
@@ -4255,7 +4255,7 @@ function zn(t, e, n) {
|
|
4255
4255
|
})), r;
|
4256
4256
|
}
|
4257
4257
|
const zl = ({ defaultDataFormatter: t, computedDataFn: e, contextObserverFn: n }) => {
|
4258
|
-
const r = new
|
4258
|
+
const r = new F(), i = t.type;
|
4259
4259
|
return function(o, s) {
|
4260
4260
|
Vt(o).selectAll("svg").remove();
|
4261
4261
|
const l = Vt(o).append("svg");
|
@@ -4265,13 +4265,13 @@ const zl = ({ defaultDataFormatter: t, computedDataFn: e, contextObserverFn: n }
|
|
4265
4265
|
const f = u.append("g");
|
4266
4266
|
f.classed("orbcharts__plugins", !0);
|
4267
4267
|
const c = {
|
4268
|
-
data$: new
|
4269
|
-
dataFormatter$: new
|
4270
|
-
plugins$: new
|
4271
|
-
chartParams$: new
|
4272
|
-
event$: new
|
4273
|
-
}, h = ((
|
4274
|
-
const S =
|
4268
|
+
data$: new F(),
|
4269
|
+
dataFormatter$: new F(),
|
4270
|
+
plugins$: new F(),
|
4271
|
+
chartParams$: new F(),
|
4272
|
+
event$: new F()
|
4273
|
+
}, h = ((y) => {
|
4274
|
+
const S = y || ci, C = S.preset ? S.preset : {};
|
4275
4275
|
return {
|
4276
4276
|
chartParams: C.chartParams ? lt(C.chartParams, on) : on,
|
4277
4277
|
dataFormatter: C.dataFormatter ? zn(C.dataFormatter, t, i) : t,
|
@@ -4281,25 +4281,25 @@ const zl = ({ defaultDataFormatter: t, computedDataFn: e, contextObserverFn: n }
|
|
4281
4281
|
})(s), d = c.data$.pipe(b(1)), p = c.dataFormatter$.pipe(
|
4282
4282
|
M(r),
|
4283
4283
|
Kt({}),
|
4284
|
-
D((
|
4284
|
+
D((y) => zn(y, h.dataFormatter, i)),
|
4285
4285
|
b(1)
|
4286
4286
|
), m = c.chartParams$.pipe(
|
4287
4287
|
M(r),
|
4288
4288
|
Kt({}),
|
4289
|
-
D((
|
4289
|
+
D((y) => lt(y, h.chartParams)),
|
4290
4290
|
b(1)
|
4291
4291
|
), v = m.pipe(
|
4292
4292
|
M(r),
|
4293
4293
|
Kt({}),
|
4294
|
-
D((
|
4294
|
+
D((y) => lt(y.padding ?? {}, Un))
|
4295
4295
|
);
|
4296
4296
|
v.pipe(
|
4297
4297
|
M(r),
|
4298
4298
|
Cl()
|
4299
|
-
).subscribe((
|
4300
|
-
u.attr("transform", `translate(${
|
4301
|
-
}), v.subscribe((
|
4302
|
-
u.transition().attr("transform", `translate(${
|
4299
|
+
).subscribe((y) => {
|
4300
|
+
u.attr("transform", `translate(${y.left}, ${y.top})`);
|
4301
|
+
}), v.subscribe((y) => {
|
4302
|
+
u.transition().attr("transform", `translate(${y.left}, ${y.top})`);
|
4303
4303
|
});
|
4304
4304
|
const w = Vl(o).pipe(
|
4305
4305
|
M(r),
|
@@ -4313,30 +4313,30 @@ const zl = ({ defaultDataFormatter: t, computedDataFn: e, contextObserverFn: n }
|
|
4313
4313
|
Ll(250)
|
4314
4314
|
)
|
4315
4315
|
),
|
4316
|
-
at((
|
4316
|
+
at((y, S) => JSON.stringify(y) === JSON.stringify(S)),
|
4317
4317
|
Ie()
|
4318
4318
|
), $ = _.subscribe(), x = I({
|
4319
4319
|
rootSize: _,
|
4320
4320
|
mergedPadding: v
|
4321
4321
|
}).pipe(
|
4322
4322
|
M(r),
|
4323
|
-
O(async (
|
4324
|
-
const S =
|
4323
|
+
O(async (y) => {
|
4324
|
+
const S = y.rootSize.width > 0 ? y.rootSize.width : fi, C = y.rootSize.height > 0 ? y.rootSize.height : hi;
|
4325
4325
|
return {
|
4326
|
-
width: S -
|
4327
|
-
height: C -
|
4328
|
-
top:
|
4329
|
-
right:
|
4330
|
-
bottom:
|
4331
|
-
left:
|
4326
|
+
width: S - y.mergedPadding.left - y.mergedPadding.right,
|
4327
|
+
height: C - y.mergedPadding.top - y.mergedPadding.bottom,
|
4328
|
+
top: y.mergedPadding.top,
|
4329
|
+
right: y.mergedPadding.right,
|
4330
|
+
bottom: y.mergedPadding.bottom,
|
4331
|
+
left: y.mergedPadding.left,
|
4332
4332
|
rootWidth: S,
|
4333
4333
|
rootHeight: C
|
4334
4334
|
};
|
4335
4335
|
}),
|
4336
4336
|
b(1)
|
4337
4337
|
);
|
4338
|
-
x.subscribe((
|
4339
|
-
l.attr("width",
|
4338
|
+
x.subscribe((y) => {
|
4339
|
+
l.attr("width", y.rootWidth).attr("height", y.rootHeight);
|
4340
4340
|
});
|
4341
4341
|
const A = I({
|
4342
4342
|
data: d,
|
@@ -4345,8 +4345,8 @@ const zl = ({ defaultDataFormatter: t, computedDataFn: e, contextObserverFn: n }
|
|
4345
4345
|
// layout: iif(() => isAxesTypeMap[chartType] === true, layout$, of(undefined))
|
4346
4346
|
}).pipe(
|
4347
4347
|
M(r),
|
4348
|
-
O(async (
|
4349
|
-
O((
|
4348
|
+
O(async (y) => y),
|
4349
|
+
O((y) => Ft(y).pipe(
|
4350
4350
|
D((S) => {
|
4351
4351
|
try {
|
4352
4352
|
return e({ data: S.data, dataFormatter: S.dataFormatter, chartParams: S.chartParams });
|
@@ -4359,14 +4359,14 @@ const zl = ({ defaultDataFormatter: t, computedDataFn: e, contextObserverFn: n }
|
|
4359
4359
|
b(1)
|
4360
4360
|
);
|
4361
4361
|
A.subscribe();
|
4362
|
-
const
|
4363
|
-
return c.plugins$.subscribe((
|
4364
|
-
if (!
|
4362
|
+
const P = {};
|
4363
|
+
return c.plugins$.subscribe((y) => {
|
4364
|
+
if (!y)
|
4365
4365
|
return;
|
4366
|
-
const S = f.selectAll("g.orbcharts__plugin").data(
|
4367
|
-
S.exit().remove().each((
|
4368
|
-
|
4369
|
-
}), C.each((
|
4366
|
+
const S = f.selectAll("g.orbcharts__plugin").data(y, (g) => g.name), C = S.enter().append("g").attr("class", (g) => `orbcharts__plugin orbcharts__${g.name}`);
|
4367
|
+
S.exit().remove().each((g, R, T) => {
|
4368
|
+
P[g.name] && (P[g.name].destroy(), P[g.name] = void 0);
|
4369
|
+
}), C.each((g, R, T) => {
|
4370
4370
|
const U = {
|
4371
4371
|
fullParams$: new L(),
|
4372
4372
|
fullChartParams$: m,
|
@@ -4379,12 +4379,12 @@ const zl = ({ defaultDataFormatter: t, computedDataFn: e, contextObserverFn: n }
|
|
4379
4379
|
}), Y = {
|
4380
4380
|
selection: Vt(T[R]),
|
4381
4381
|
rootSelection: l,
|
4382
|
-
name:
|
4382
|
+
name: g.name,
|
4383
4383
|
chartType: i,
|
4384
4384
|
subject: c,
|
4385
4385
|
observer: At
|
4386
4386
|
};
|
4387
|
-
|
4387
|
+
g.setPresetParams(h.allPluginParams[g.name] ?? {}), g.setContext(Y), P[Y.name] = g, g.init();
|
4388
4388
|
});
|
4389
4389
|
}), {
|
4390
4390
|
...c,
|
@@ -4397,7 +4397,7 @@ const zl = ({ defaultDataFormatter: t, computedDataFn: e, contextObserverFn: n }
|
|
4397
4397
|
};
|
4398
4398
|
class Dt {
|
4399
4399
|
constructor({ defaultDataFormatter: e, computedDataFn: n, contextObserverFn: r }, i, a) {
|
4400
|
-
this.data$ = new
|
4400
|
+
this.data$ = new F(), this.dataFormatter$ = new F(), this.plugins$ = new F(), this.chartParams$ = new F(), this.event$ = new F();
|
4401
4401
|
const s = zl({ defaultDataFormatter: e, computedDataFn: n, contextObserverFn: r })(i, a);
|
4402
4402
|
this.selection = s.selection, this.destroy = s.destroy, this.data$ = s.data$, this.dataFormatter$ = s.dataFormatter$, this.plugins$ = s.plugins$, this.chartParams$ = s.chartParams$, this.event$ = s.event$;
|
4403
4403
|
}
|
@@ -4531,7 +4531,7 @@ const Ul = (t) => {
|
|
4531
4531
|
})
|
4532
4532
|
);
|
4533
4533
|
}, ni = ({ fullDataFormatter$: t, layout$: e }) => {
|
4534
|
-
const n = new
|
4534
|
+
const n = new F();
|
4535
4535
|
function r({ xAxis: i, yAxis: a, width: o, height: s }) {
|
4536
4536
|
if (!i || !a)
|
4537
4537
|
return {
|
@@ -4582,7 +4582,7 @@ const Ul = (t) => {
|
|
4582
4582
|
};
|
4583
4583
|
})
|
4584
4584
|
), ii = ({ computedData$: t, fullDataFormatter$: e, layout$: n }) => {
|
4585
|
-
const r = new
|
4585
|
+
const r = new F();
|
4586
4586
|
function i({ data: a, groupAxis: o, valueAxis: s, width: l, height: u }) {
|
4587
4587
|
let f = 0, c = 0, h = 0, d = 0;
|
4588
4588
|
const p = o.position === "top" || o.position === "bottom" ? l : u, m = 0, v = a[0] ? a[0].length - 1 : 0, w = o.scaleDomain[0] === "auto" ? m - o.scalePadding : o.scaleDomain[0] - o.scalePadding, _ = o.scaleDomain[1] === "auto" ? v + o.scalePadding : o.scaleDomain[1] + o.scalePadding, $ = wt({
|
@@ -4594,14 +4594,14 @@ const Ul = (t) => {
|
|
4594
4594
|
scaleRange: [0, 1]
|
4595
4595
|
}), x = $(m), A = $(v);
|
4596
4596
|
m == v ? (f = 0, h = 1) : (f = x, h = (A - x) / p);
|
4597
|
-
const
|
4598
|
-
maxValue:
|
4599
|
-
minValue:
|
4597
|
+
const P = a.map((U, At) => U.filter((ot, Y) => Y >= w && Y <= _ && ot.visible == !0)), y = En(P), S = s.position === "left" || s.position === "right" ? u : l, C = wt({
|
4598
|
+
maxValue: y[1],
|
4599
|
+
minValue: y[0],
|
4600
4600
|
axisWidth: S,
|
4601
4601
|
scaleDomain: s.scaleDomain,
|
4602
4602
|
scaleRange: s.scaleRange
|
4603
|
-
}), et = En(a),
|
4604
|
-
return c =
|
4603
|
+
}), et = En(a), g = C(et[0]), R = C(et[1]);
|
4604
|
+
return c = g, d = (R - g) / S, {
|
4605
4605
|
translate: [f, c],
|
4606
4606
|
scale: [h, d],
|
4607
4607
|
rotate: 0,
|
@@ -4643,7 +4643,7 @@ const Ul = (t) => {
|
|
4643
4643
|
1 / r.gridGraphicTransform.scale[1] / r.gridContainerPosition[a].scale[0]
|
4644
4644
|
]))
|
4645
4645
|
), oi = ({ fullDataFormatter$: t, layout$: e }) => {
|
4646
|
-
const n = new
|
4646
|
+
const n = new F();
|
4647
4647
|
function r({ xAxisPosition: i, yAxisPosition: a, width: o, height: s }) {
|
4648
4648
|
if ((i === "bottom" || i === "top") && (a === "left" || a === "right"))
|
4649
4649
|
return { width: o, height: s };
|
@@ -4819,7 +4819,7 @@ const ql = (t) => {
|
|
4819
4819
|
});
|
4820
4820
|
let m = 0;
|
4821
4821
|
return c.map((w, _) => w.map(($, x) => {
|
4822
|
-
const A = pe("multiGrid", h, _, x),
|
4822
|
+
const A = pe("multiGrid", h, _, x), P = p[x], y = d[_], S = {
|
4823
4823
|
id: $.id ? $.id : A,
|
4824
4824
|
index: m,
|
4825
4825
|
label: $.label ? $.label : A,
|
@@ -4829,10 +4829,10 @@ const ql = (t) => {
|
|
4829
4829
|
gridIndex: h,
|
4830
4830
|
// accSeriesIndex: seriesIndex, // 預設為seriesIndex
|
4831
4831
|
seriesIndex: _,
|
4832
|
-
seriesLabel:
|
4832
|
+
seriesLabel: y,
|
4833
4833
|
groupIndex: x,
|
4834
|
-
groupLabel:
|
4835
|
-
color: u.get(
|
4834
|
+
groupLabel: P,
|
4835
|
+
color: u.get(y),
|
4836
4836
|
visible: !0
|
4837
4837
|
// 先給一個預設值
|
4838
4838
|
};
|
@@ -4844,7 +4844,7 @@ const ql = (t) => {
|
|
4844
4844
|
}
|
4845
4845
|
return i;
|
4846
4846
|
}, Yl = ({ fullDataFormatter$: t, computedData$: e, layout$: n, fullChartParams$: r, event$: i }) => {
|
4847
|
-
const a = new
|
4847
|
+
const a = new F(), o = ge({
|
4848
4848
|
datumList$: e.pipe(
|
4849
4849
|
D((l) => l.flat().flat()),
|
4850
4850
|
b(1)
|
@@ -4920,23 +4920,23 @@ const ql = (t) => {
|
|
4920
4920
|
}).pipe(
|
4921
4921
|
M(a),
|
4922
4922
|
b(1)
|
4923
|
-
),
|
4923
|
+
), P = m.pipe(
|
4924
4924
|
D((T) => T.flat())
|
4925
4925
|
).pipe(
|
4926
4926
|
M(a),
|
4927
4927
|
b(1)
|
4928
|
-
),
|
4928
|
+
), y = si({
|
4929
4929
|
computedData$: m
|
4930
4930
|
}).pipe(
|
4931
4931
|
M(a),
|
4932
4932
|
b(1)
|
4933
4933
|
), S = an({
|
4934
|
-
datumList$:
|
4934
|
+
datumList$: P
|
4935
4935
|
}).pipe(
|
4936
4936
|
M(a),
|
4937
4937
|
b(1)
|
4938
4938
|
), C = Qr({
|
4939
|
-
datumList$:
|
4939
|
+
datumList$: P
|
4940
4940
|
}).pipe(
|
4941
4941
|
M(a),
|
4942
4942
|
b(1)
|
@@ -4945,7 +4945,7 @@ const ql = (t) => {
|
|
4945
4945
|
}).pipe(
|
4946
4946
|
M(a),
|
4947
4947
|
b(1)
|
4948
|
-
),
|
4948
|
+
), g = ei({
|
4949
4949
|
computedData$: m,
|
4950
4950
|
fullDataFormatter$: p,
|
4951
4951
|
layout$: n
|
@@ -4953,7 +4953,7 @@ const ql = (t) => {
|
|
4953
4953
|
M(a),
|
4954
4954
|
b(1)
|
4955
4955
|
), R = li({
|
4956
|
-
computedLayoutData$:
|
4956
|
+
computedLayoutData$: g
|
4957
4957
|
}).pipe(
|
4958
4958
|
M(a),
|
4959
4959
|
b(1)
|
@@ -4966,12 +4966,12 @@ const ql = (t) => {
|
|
4966
4966
|
gridGraphicReverseScale$: x,
|
4967
4967
|
gridAxesSize$: A,
|
4968
4968
|
gridHighlight$: o,
|
4969
|
-
seriesLabels$:
|
4969
|
+
seriesLabels$: y,
|
4970
4970
|
SeriesDataMap$: S,
|
4971
4971
|
GroupDataMap$: C,
|
4972
4972
|
dataFormatter$: p,
|
4973
4973
|
computedData$: m,
|
4974
|
-
computedLayoutData$:
|
4974
|
+
computedLayoutData$: g,
|
4975
4975
|
visibleComputedData$: et,
|
4976
4976
|
visibleComputedLayoutData$: R
|
4977
4977
|
// isSeriesSeprate$
|
@@ -5086,12 +5086,12 @@ const jl = (t) => {
|
|
5086
5086
|
];
|
5087
5087
|
let w = 0;
|
5088
5088
|
a = o.map((_, $) => _.map((x, A) => {
|
5089
|
-
const
|
5089
|
+
const P = w;
|
5090
5090
|
w++;
|
5091
|
-
const
|
5092
|
-
id: x.id ? x.id :
|
5093
|
-
index:
|
5094
|
-
label: x.label ? x.label :
|
5091
|
+
const y = pe(n.type, $, A), S = {
|
5092
|
+
id: x.id ? x.id : y,
|
5093
|
+
index: P,
|
5094
|
+
label: x.label ? x.label : y,
|
5095
5095
|
description: x.description ?? "",
|
5096
5096
|
// tooltipContent: _d.tooltipContent ? _d.tooltipContent : dataFormatter.tooltipContentFormat(_d, i, _i, context),
|
5097
5097
|
data: x.data,
|
@@ -5405,7 +5405,7 @@ class vc extends Dt {
|
|
5405
5405
|
}
|
5406
5406
|
}
|
5407
5407
|
function ic({ name: t, defaultParams: e, initFn: n }) {
|
5408
|
-
const r = new
|
5408
|
+
const r = new F(), i = new F(), a = /* @__PURE__ */ new WeakMap();
|
5409
5409
|
let o = () => {
|
5410
5410
|
}, s, l = e;
|
5411
5411
|
return {
|