@milaboratories/graph-maker 1.1.163 → 1.1.165
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GraphMaker/constantsCommon.d.ts +1 -0
- package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
- package/dist/GraphMaker/constantsCommon.js +1 -0
- package/dist/GraphMaker/constantsCommon.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/Line.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/Line.vue.js +63 -52
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/Line.vue.js.map +1 -1
- package/dist/GraphMaker/index.vue.js +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +1 -0
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js +14 -14
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.d.ts +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js +11 -10
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js.map +1 -1
- package/dist/lib.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js +24 -24
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +13 -13
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/lines.js +31 -40
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/lines.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js +84 -84
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +7 -7
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/createColorScales.js +21 -16
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/createColorScales.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js +11 -10
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import { createRoot as
|
|
4
|
-
import { Error as
|
|
5
|
-
import { DataFrameProvider as
|
|
6
|
-
import { TITLE_LINE_HEIGHT as
|
|
7
|
-
import { arrangeLegendParts as
|
|
8
|
-
import { getChartEdgeSides as
|
|
9
|
-
import { getContinuousLegendTicks as
|
|
10
|
-
import { TextMeasurer as
|
|
11
|
-
import { ChartsGroup as
|
|
12
|
-
import { LEGEND_OFFSET as
|
|
13
|
-
import { calculateChartSideElementSizes as
|
|
14
|
-
import { calculateSideElementsBBoxes as
|
|
15
|
-
import { createDiscreteColorScale as
|
|
16
|
-
import { calculateAnnotationTitleSizes as
|
|
17
|
-
import { calculateCaptionTails as
|
|
1
|
+
import { j as $ } from "../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import it from "../node_modules/lodash/lodash.js";
|
|
3
|
+
import { createRoot as ot } from "../node_modules/react-dom/client.js";
|
|
4
|
+
import { Error as at } from "../common/Error.js";
|
|
5
|
+
import { DataFrameProvider as rt } from "../common/useDataFrame.js";
|
|
6
|
+
import { TITLE_LINE_HEIGHT as nt, TITLE_MARGIN as lt, DEFAULT_HEIGHT as X, DEFAULT_WIDTH as Y } from "../constants.js";
|
|
7
|
+
import { arrangeLegendParts as ht } from "../utils/arrangeLegendParts.js";
|
|
8
|
+
import { getChartEdgeSides as ct } from "../utils/getChartEdgeSides.js";
|
|
9
|
+
import { getContinuousLegendTicks as q } from "../utils/getContinuousLegendTicks.js";
|
|
10
|
+
import { TextMeasurer as ut } from "../utils/TextMeasurer/TextMeasurer.js";
|
|
11
|
+
import { ChartsGroup as dt } from "./components/ChartsGroup.js";
|
|
12
|
+
import { LEGEND_OFFSET as pt, DEFAULT_AES as Q, CHART_SIDE_ELEMENTS as mt, TITLE_LINE as J, MIN_MARGIN as j } from "./constants.js";
|
|
13
|
+
import { calculateChartSideElementSizes as gt } from "./utils/calculateChartSideElementSizes.js";
|
|
14
|
+
import { calculateSideElementsBBoxes as ft } from "./utils/calculateSideElementsBBoxes.js";
|
|
15
|
+
import { createDiscreteColorScale as yt, createDiscreteRoundColorScale as St, createContinuousColorScale as xt } from "./utils/createColorScales.js";
|
|
16
|
+
import { calculateAnnotationTitleSizes as Ct } from "./utils/calculateAnnotationTitleSizes.js";
|
|
17
|
+
import { calculateCaptionTails as bt } from "./utils/calculateCaptionTails.js";
|
|
18
18
|
import W from "../node_modules/d3-scale/src/ordinal.js";
|
|
19
19
|
import N from "../node_modules/d3-scale/src/linear.js";
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
var
|
|
23
|
-
const
|
|
24
|
-
function
|
|
20
|
+
import At from "../node_modules/d3-array/src/extent.js";
|
|
21
|
+
import Z from "../node_modules/d3-hierarchy/src/cluster.js";
|
|
22
|
+
var Gt = Object.defineProperty, zt = (m, s, e) => s in m ? Gt(m, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[s] = e, A = (m, s, e) => zt(m, typeof s != "symbol" ? s + "" : s, e);
|
|
23
|
+
const Lt = Math.cos(Math.PI / 4), Tt = 5;
|
|
24
|
+
function tt(m, s, e) {
|
|
25
25
|
function t(r) {
|
|
26
26
|
r[e] = s(r.data.height), r.children && r.children.forEach(t);
|
|
27
27
|
}
|
|
28
28
|
t(m);
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function et(m, s, e, t = e) {
|
|
31
31
|
function r(o) {
|
|
32
32
|
o[t] = o[e] + s, o.children && o.children.forEach(r);
|
|
33
33
|
}
|
|
@@ -48,7 +48,7 @@ const Et = (m, s) => {
|
|
|
48
48
|
o.push(e + r * n);
|
|
49
49
|
return o.push(t), o;
|
|
50
50
|
};
|
|
51
|
-
function
|
|
51
|
+
function st(m, s, e) {
|
|
52
52
|
let t = e;
|
|
53
53
|
return m && (m.colorRange && (t = m.colorRange), m.method === "standardScaling" && (t = [-2, 2]), m.method === "meanNormalization" && (t = [-0.75, 0.75])), Et(s, t);
|
|
54
54
|
}
|
|
@@ -62,20 +62,20 @@ function k(m, s, e) {
|
|
|
62
62
|
return t;
|
|
63
63
|
}
|
|
64
64
|
function F(m, s) {
|
|
65
|
-
return s === 90 ? m : s === 45 ? m *
|
|
65
|
+
return s === 90 ? m : s === 45 ? m * Lt + (m > 0 ? 2 * Tt : 0) : J;
|
|
66
66
|
}
|
|
67
|
-
class
|
|
67
|
+
class Ut {
|
|
68
68
|
constructor() {
|
|
69
|
-
A(this, "reactRoot", null), A(this, "parentNode", null), A(this, "rootNode", null), A(this, "component", /* @__PURE__ */
|
|
70
|
-
chartWidth:
|
|
69
|
+
A(this, "reactRoot", null), A(this, "parentNode", null), A(this, "rootNode", null), A(this, "component", /* @__PURE__ */ $.jsx($.Fragment, {})), A(this, "chartsDimensions", {}), A(this, "chartSizes", {
|
|
70
|
+
chartWidth: Y,
|
|
71
71
|
// width of single chart
|
|
72
72
|
chartHeight: X,
|
|
73
73
|
// height of single chart
|
|
74
|
-
chartsWidth:
|
|
74
|
+
chartsWidth: Y,
|
|
75
75
|
// width of all charts in charts row
|
|
76
76
|
chartsHeight: X,
|
|
77
77
|
// width of all charts in charts column, without axes
|
|
78
|
-
totalWidth:
|
|
78
|
+
totalWidth: Y,
|
|
79
79
|
// width of all charts in charts row, plus left axis, plus legend
|
|
80
80
|
totalHeight: X
|
|
81
81
|
// width of all charts in charts height, plus bottom axis, plus top title
|
|
@@ -87,8 +87,8 @@ class Yt {
|
|
|
87
87
|
}), A(this, "captionsSizes", {
|
|
88
88
|
xAxisCaptions: 100,
|
|
89
89
|
yAxisCaptions: 100,
|
|
90
|
-
xGroupCaptions:
|
|
91
|
-
yGroupCaptions:
|
|
90
|
+
xGroupCaptions: J,
|
|
91
|
+
yGroupCaptions: J,
|
|
92
92
|
xCaptionTail: 0,
|
|
93
93
|
yCaptionTail: 0
|
|
94
94
|
}), A(this, "labelAngles", {
|
|
@@ -114,11 +114,11 @@ class Yt {
|
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
init(s) {
|
|
117
|
-
this.parentNode === null && (this.parentNode = s, this.rootNode = document.createElement("div"), this.parentNode.appendChild(this.rootNode), this.reactRoot =
|
|
117
|
+
this.parentNode === null && (this.parentNode = s, this.rootNode = document.createElement("div"), this.parentNode.appendChild(this.rootNode), this.reactRoot = ot(this.rootNode));
|
|
118
118
|
}
|
|
119
119
|
updateMargins(s, e) {
|
|
120
120
|
this.margins = {
|
|
121
|
-
top: s.show ?
|
|
121
|
+
top: s.show ? nt + lt * 2 : e.outerOffset,
|
|
122
122
|
bottom: e.outerOffset,
|
|
123
123
|
left: e.outerOffset,
|
|
124
124
|
right: this.legend.width + e.outerOffset
|
|
@@ -131,7 +131,7 @@ class Yt {
|
|
|
131
131
|
}
|
|
132
132
|
const n = this.chartSizes.chartHeight, l = [], u = { width: 0, height: 0, left: 0, top: 0 }, f = (c) => c.reduce((h, i) => (h[i] = String(i), h), {});
|
|
133
133
|
if (s === "continuous") {
|
|
134
|
-
const c = this.colorScale, h =
|
|
134
|
+
const c = this.colorScale, h = q(c, o), i = N([h[0], h[h.length - 1]], [n, 0]), a = r.label ?? r.value;
|
|
135
135
|
l.push({
|
|
136
136
|
...u,
|
|
137
137
|
type: "continuous",
|
|
@@ -148,7 +148,7 @@ class Yt {
|
|
|
148
148
|
if (t.forEach((c) => {
|
|
149
149
|
const h = c.valueColumn.label ?? c.valueColumn.value;
|
|
150
150
|
if (c.type === "continuous") {
|
|
151
|
-
const i = this.annotationColorScales[c.id].scale, a =
|
|
151
|
+
const i = this.annotationColorScales[c.id].scale, a = q(i, o), y = N([a[0], a[a.length - 1]], [n, 0]);
|
|
152
152
|
l.push({ ...u, type: "continuous", id: c.id, tickPositionScale: y, title: h, scale: i, values: a });
|
|
153
153
|
}
|
|
154
154
|
if (c.type === "discrete") {
|
|
@@ -159,7 +159,7 @@ class Yt {
|
|
|
159
159
|
this.legend = { width: 0, height: 0, items: [] };
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
|
-
const d =
|
|
162
|
+
const d = ht(l, this.chartSizes.chartHeight), p = d[d.length - 1], L = p.left + p.width + pt;
|
|
163
163
|
this.legend = {
|
|
164
164
|
width: L,
|
|
165
165
|
height: n,
|
|
@@ -167,14 +167,14 @@ class Yt {
|
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
169
|
updateCaptionsSize(s, e, t, r) {
|
|
170
|
-
const o = new
|
|
170
|
+
const o = new ut("bold 16px Manrope"), { xGroupKeys: n, yGroupKeys: l, xGroupLabels: u, yGroupLabels: f, xKeysByGroups: d, yKeysByGroups: p, xLabels: L, yLabels: c } = s.meta;
|
|
171
171
|
this.labelAngles = {
|
|
172
172
|
xAxisLabels: e.axisLabelsAngle,
|
|
173
173
|
yAxisLabels: t.axisLabelsAngle,
|
|
174
174
|
xGroupLabels: e.groupLabelsAngle,
|
|
175
175
|
yGroupLabels: t.groupLabelsAngle
|
|
176
176
|
};
|
|
177
|
-
const h = n.reduce((C, g) => Math.max(C, k(d[g], L, o)), 0), i = l.reduce((C, g) => Math.max(C, k(p[g], c, o)), 0), a = k(n, u, o), y = k(l, f, o), { xCaptionTail: x, yCaptionTail:
|
|
177
|
+
const h = n.reduce((C, g) => Math.max(C, k(d[g], L, o)), 0), i = l.reduce((C, g) => Math.max(C, k(p[g], c, o)), 0), a = k(n, u, o), y = k(l, f, o), { xCaptionTail: x, yCaptionTail: E } = bt(
|
|
178
178
|
this.labelAngles,
|
|
179
179
|
r,
|
|
180
180
|
this.scales,
|
|
@@ -184,7 +184,7 @@ class Yt {
|
|
|
184
184
|
);
|
|
185
185
|
this.captionsSizes = {
|
|
186
186
|
xCaptionTail: x,
|
|
187
|
-
yCaptionTail:
|
|
187
|
+
yCaptionTail: E,
|
|
188
188
|
xGroupCaptions: F(a, this.labelAngles.xGroupLabels),
|
|
189
189
|
yGroupCaptions: F(y, this.labelAngles.yGroupLabels),
|
|
190
190
|
xAxisCaptions: F(h, this.labelAngles.xAxisLabels),
|
|
@@ -198,7 +198,7 @@ class Yt {
|
|
|
198
198
|
this.chartsDimensions = {};
|
|
199
199
|
let a = 0, y = 0;
|
|
200
200
|
e.forEach((C, g) => {
|
|
201
|
-
const b = g % this.columnsCount + 1, S =
|
|
201
|
+
const b = g % this.columnsCount + 1, S = ct(g, e.length, this.columnsCount, this.rowsCount), G = this.step.x[C], M = this.step.y[C], w = gt(
|
|
202
202
|
n,
|
|
203
203
|
l,
|
|
204
204
|
this.captionsSizes,
|
|
@@ -213,34 +213,34 @@ class Yt {
|
|
|
213
213
|
r,
|
|
214
214
|
G,
|
|
215
215
|
M
|
|
216
|
-
),
|
|
216
|
+
), D = Ct(u, S, h, i);
|
|
217
217
|
function v(B) {
|
|
218
218
|
return Math.max(
|
|
219
|
-
|
|
220
|
-
|
|
219
|
+
mt[B].reduce((O, _) => O + w[B][_], 0),
|
|
220
|
+
D[B],
|
|
221
221
|
s.innerOffset
|
|
222
222
|
);
|
|
223
223
|
}
|
|
224
|
-
const
|
|
224
|
+
const T = {
|
|
225
225
|
left: v("left"),
|
|
226
226
|
right: v("right"),
|
|
227
227
|
top: v("top"),
|
|
228
228
|
bottom: v("bottom")
|
|
229
229
|
};
|
|
230
|
-
|
|
231
|
-
const
|
|
230
|
+
T.left < this.captionsSizes.xCaptionTail && (T.left = this.captionsSizes.xCaptionTail), T.bottom < this.captionsSizes.yCaptionTail && (T.bottom = this.captionsSizes.yCaptionTail);
|
|
231
|
+
const H = ft(w, this.chartSizes.chartWidth, this.chartSizes.chartHeight), R = this.chartSizes.chartWidth + T.left + T.right, I = this.chartSizes.chartHeight + T.top + T.bottom;
|
|
232
232
|
this.chartsDimensions[C] = {
|
|
233
233
|
left: a,
|
|
234
234
|
top: y,
|
|
235
235
|
inner: { width: this.chartSizes.chartWidth, height: this.chartSizes.chartHeight },
|
|
236
|
-
outer: { width: R, height:
|
|
237
|
-
padding:
|
|
238
|
-
sideElementBBoxes:
|
|
236
|
+
outer: { width: R, height: I },
|
|
237
|
+
padding: T,
|
|
238
|
+
sideElementBBoxes: H,
|
|
239
239
|
chartEdgeSides: S
|
|
240
|
-
}, a += R, b === this.columnsCount && (a = 0, y +=
|
|
240
|
+
}, a += R, b === this.columnsCount && (a = 0, y += I);
|
|
241
241
|
});
|
|
242
|
-
const x = e.slice(0, this.columnsCount).reduce((C, g) => C + this.chartsDimensions[g].outer.width, 0),
|
|
243
|
-
this.chartSizes.chartsWidth = x, this.chartSizes.chartsHeight =
|
|
242
|
+
const x = e.slice(0, this.columnsCount).reduce((C, g) => C + this.chartsDimensions[g].outer.width, 0), E = e.filter((C, g) => g % this.columnsCount === 0).reduce((C, g) => C + this.chartsDimensions[g].outer.height, 0);
|
|
243
|
+
this.chartSizes.chartsWidth = x, this.chartSizes.chartsHeight = E;
|
|
244
244
|
}
|
|
245
245
|
updateChartsSizes(s, e, t, r) {
|
|
246
246
|
const { width: o, height: n, cellWidth: l, cellHeight: u } = s, f = t.meta.facetKeys[0];
|
|
@@ -257,54 +257,54 @@ class Yt {
|
|
|
257
257
|
}
|
|
258
258
|
// update scales for cell positions, x and y for each facet
|
|
259
259
|
updateScales(s, e, t, r, o, n, l, u, f, d) {
|
|
260
|
-
const { width: p, height: L, cellWidth: c, cellHeight: h } = o, { meta: i, facets: a } = e, { sharedX: y, sharedY: x } = r,
|
|
260
|
+
const { width: p, height: L, cellWidth: c, cellHeight: h } = o, { meta: i, facets: a } = e, { sharedX: y, sharedY: x } = r, E = (g, b = {}) => g.sort(
|
|
261
261
|
(S, G) => n.sorting === "asc" ? (b[S] ?? S).localeCompare(b[G] ?? G, "en", { numeric: !0 }) : (b[G] ?? G).localeCompare(b[S] ?? S, "en", { numeric: !0 })
|
|
262
262
|
), C = (g, b = {}) => g.sort(
|
|
263
263
|
(S, G) => l.sorting === "asc" ? (b[S] ?? S).localeCompare(b[G] ?? G, "en", { numeric: !0 }) : (b[G] ?? G).localeCompare(b[S] ?? S, "en", { numeric: !0 })
|
|
264
264
|
);
|
|
265
265
|
s.forEach((g) => {
|
|
266
|
-
const b = a[g], S = d.xGroup ? i.xGroupKeys :
|
|
267
|
-
let
|
|
266
|
+
const b = a[g], S = d.xGroup ? i.xGroupKeys : E(i.xGroupKeys), G = d.yGroup ? i.yGroupKeys : C(i.yGroupKeys), { xKeysByGroups: M } = y ? i : b, { yKeysByGroups: w } = x ? i : b, D = S.map((z) => M[z].length), v = G.map((z) => w[z].length), T = D.reduce((z, K) => z + K, 0), H = v.reduce((z, K) => z + K, 0), R = y && c ? c : (p - (D.filter((z) => z > 0).length - 1) * t) / T, I = x && h ? h : (L - (v.filter((z) => z > 0).length - 1) * t) / H, B = [], O = [];
|
|
267
|
+
let _ = 0;
|
|
268
268
|
S.forEach((z) => {
|
|
269
|
-
const K = u || d.x ? M[z] :
|
|
269
|
+
const K = u || d.x ? M[z] : E(M[z], i.xLabels);
|
|
270
270
|
O.push(...K), K.forEach(() => {
|
|
271
|
-
B.push(
|
|
272
|
-
}), K.length > 0 && (
|
|
271
|
+
B.push(_), _ += R;
|
|
272
|
+
}), K.length > 0 && (_ += t);
|
|
273
273
|
});
|
|
274
|
-
const U = [],
|
|
274
|
+
const U = [], V = [];
|
|
275
275
|
let P = 0;
|
|
276
276
|
G.forEach((z) => {
|
|
277
277
|
const K = f || d.y ? w[z] : C(w[z], i.yLabels);
|
|
278
|
-
|
|
279
|
-
U.push(P), P +=
|
|
278
|
+
V.push(...K), K.forEach(() => {
|
|
279
|
+
U.push(P), P += I;
|
|
280
280
|
}), K.length > 0 && (P += t);
|
|
281
|
-
}), this.scales.x[g] = W().domain(O).range(B), this.scales.y[g] = W().domain(
|
|
281
|
+
}), this.scales.x[g] = W().domain(O).range(B), this.scales.y[g] = W().domain(V).range(U), this.step.x[g] = R, this.step.y[g] = I;
|
|
282
282
|
});
|
|
283
283
|
}
|
|
284
284
|
updateAesScale(s, e, t, r, o, n, l) {
|
|
285
285
|
if (s === "continuous")
|
|
286
|
-
t.valueColors ? this.colorScale = N().domain(t.valuesByColors ??
|
|
286
|
+
t.valueColors ? this.colorScale = N().domain(t.valuesByColors ?? st(l, t.valueColors.length, e)).range(t.valueColors) : t.colorsList && (this.colorScale = N().domain(st(l, t.colorsList.length, e)).range(t.colorsList));
|
|
287
287
|
else if (t.colorsMap) {
|
|
288
288
|
const d = Object.entries(t.colorsMap);
|
|
289
289
|
this.colorScale = W().domain(d.map((p) => p[0])).range(d.map((p) => p[1])).unknown("#ccc");
|
|
290
|
-
} else t.colorsList && (this.colorScale =
|
|
290
|
+
} else t.colorsList && (this.colorScale = yt(t.colorsList, n.map(String)));
|
|
291
291
|
const { xDataByKeys: u, yDataByKeys: f } = o.meta;
|
|
292
292
|
r.forEach((d) => {
|
|
293
293
|
const { colors: p, type: L, axis: c, valueColumn: h } = d, i = (c === "x" ? u : f)[h.valueLabels ?? h.value];
|
|
294
294
|
if (L === "discrete") {
|
|
295
|
-
const a =
|
|
295
|
+
const a = it.uniq(Object.values(i).map(String)).sort();
|
|
296
296
|
this.annotationColorScales[d.id] = {
|
|
297
297
|
type: "discrete",
|
|
298
|
-
scale:
|
|
298
|
+
scale: St(p, a)
|
|
299
299
|
};
|
|
300
300
|
} else {
|
|
301
301
|
const a = Object.values(i).map(Number);
|
|
302
302
|
if (!a.length)
|
|
303
303
|
return;
|
|
304
|
-
const [y = a[0], x = a[0]] =
|
|
304
|
+
const [y = a[0], x = a[0]] = At(a);
|
|
305
305
|
this.annotationColorScales[d.id] = {
|
|
306
306
|
type: "continuous",
|
|
307
|
-
scale:
|
|
307
|
+
scale: xt(p, y, x, 0, 0.5, 1)
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
310
|
});
|
|
@@ -320,11 +320,11 @@ class Yt {
|
|
|
320
320
|
}, 0);
|
|
321
321
|
this.dendrograms[u].x.treesByGroupKey = e.reduce((h, i) => {
|
|
322
322
|
const a = p[i], y = f[i];
|
|
323
|
-
|
|
323
|
+
Z().separation(() => 1).size([y.length * this.step.x[u], n.size])(
|
|
324
324
|
a
|
|
325
325
|
);
|
|
326
|
-
const x = a,
|
|
327
|
-
return
|
|
326
|
+
const x = a, E = N().domain(n.position === "top" ? [0, c] : [c, 0]).range([n.size, 0]);
|
|
327
|
+
return tt(x, E, "y"), et(x, this.scales.x[u](y[0]), "x"), h[i] = x, h;
|
|
328
328
|
}, {}), this.dendrograms[u].x.data = n;
|
|
329
329
|
}
|
|
330
330
|
if (l) {
|
|
@@ -334,11 +334,11 @@ class Yt {
|
|
|
334
334
|
}, 0);
|
|
335
335
|
this.dendrograms[u].y.treesByGroupKey = t.reduce((h, i) => {
|
|
336
336
|
const a = L[i], y = d[i];
|
|
337
|
-
|
|
337
|
+
Z().separation(() => 1).size([y.length * this.step.y[u], l.size])(
|
|
338
338
|
a
|
|
339
339
|
);
|
|
340
|
-
const x = a,
|
|
341
|
-
return
|
|
340
|
+
const x = a, E = N().domain(l.position === "left" ? [0, c] : [c, 0]).range([l.size, 0]);
|
|
341
|
+
return et(x, this.scales.y[u](y[0]), "x", "y"), tt(x, E, "x"), h[i] = x, h;
|
|
342
342
|
}, {}), this.dendrograms[u].y.data = l;
|
|
343
343
|
}
|
|
344
344
|
});
|
|
@@ -359,8 +359,8 @@ class Yt {
|
|
|
359
359
|
}
|
|
360
360
|
render(s, e, t, r, o, n, l, u, f, d, p, L, c, h, i, a, y) {
|
|
361
361
|
var x;
|
|
362
|
-
const { meta:
|
|
363
|
-
this.updateChartsSizes(v, r, n, o.groupGap), this.updateAesScale(
|
|
362
|
+
const { meta: E, facets: C } = n, { facetKeys: g, xGroupKeys: b, yGroupKeys: S, valueExtent: G } = E, { xAxis: M, yAxis: w, title: D, size: v, valueType: T } = t;
|
|
363
|
+
this.updateChartsSizes(v, r, n, o.groupGap), this.updateAesScale(T, G, o, l, n, c, h), this.updateScales(g, n, o.groupGap, r, v, t.xAxis, t.yAxis, f, d, a), this.updateCaptionsSize(n, M, w, r), this.updateChartDimensions(
|
|
364
364
|
v,
|
|
365
365
|
g,
|
|
366
366
|
b,
|
|
@@ -371,15 +371,15 @@ class Yt {
|
|
|
371
371
|
l,
|
|
372
372
|
f,
|
|
373
373
|
d
|
|
374
|
-
), this.updateLegendSize(
|
|
375
|
-
const
|
|
376
|
-
|
|
374
|
+
), this.updateLegendSize(T, t.legend, l, u, G), this.updateMargins(D, v), this.updateDendrogram(g, b, S, C, p, f, d), this.updateDendrogramAesScales(L);
|
|
375
|
+
const H = /* @__PURE__ */ $.jsx(rt, { dataFrame: s, children: /* @__PURE__ */ $.jsx(
|
|
376
|
+
dt,
|
|
377
377
|
{
|
|
378
378
|
aes: o,
|
|
379
379
|
annotations: l,
|
|
380
380
|
annotationColorScales: this.annotationColorScales,
|
|
381
381
|
captionsSizes: this.captionsSizes,
|
|
382
|
-
cellsMeta:
|
|
382
|
+
cellsMeta: E,
|
|
383
383
|
columnsCount: this.columnsCount,
|
|
384
384
|
chartsDimensions: this.chartsDimensions,
|
|
385
385
|
chartSettings: t,
|
|
@@ -402,14 +402,14 @@ class Yt {
|
|
|
402
402
|
cellsRenderingMode: y
|
|
403
403
|
}
|
|
404
404
|
) });
|
|
405
|
-
this.component =
|
|
405
|
+
this.component = H, (x = this.reactRoot) == null || x.render(H);
|
|
406
406
|
}
|
|
407
407
|
renderError(s) {
|
|
408
408
|
var e;
|
|
409
|
-
(e = this.reactRoot) == null || e.render(/* @__PURE__ */
|
|
409
|
+
(e = this.reactRoot) == null || e.render(/* @__PURE__ */ $.jsx(at, { message: s }));
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
export {
|
|
413
|
-
|
|
413
|
+
Ut as default
|
|
414
414
|
};
|
|
415
415
|
//# sourceMappingURL=ChartRenderer.js.map
|