@milaboratories/miplots4 1.0.178 → 1.1.0
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/bubble/BubbleSettingsImpl.d.ts +2 -0
- package/dist/bubble/BubbleSettingsImpl.d.ts.map +1 -1
- package/dist/bubble/BubbleSettingsImpl.js +3 -1
- package/dist/bubble/BubbleSettingsImpl.js.map +1 -1
- package/dist/bubble/getGroupedCellsData.d.ts +1 -1
- package/dist/bubble/getGroupedCellsData.d.ts.map +1 -1
- package/dist/bubble/getGroupedCellsData.js +30 -10
- package/dist/bubble/getGroupedCellsData.js.map +1 -1
- package/dist/bubble/index.d.ts.map +1 -1
- package/dist/bubble/index.js +3 -3
- package/dist/bubble/index.js.map +1 -1
- package/dist/heatmap/ChartRenderer.d.ts.map +1 -1
- package/dist/heatmap/ChartRenderer.js +26 -20
- package/dist/heatmap/ChartRenderer.js.map +1 -1
- package/dist/heatmap/HeatmapSettingsImpl.d.ts +2 -0
- package/dist/heatmap/HeatmapSettingsImpl.d.ts.map +1 -1
- package/dist/heatmap/HeatmapSettingsImpl.js +3 -1
- package/dist/heatmap/HeatmapSettingsImpl.js.map +1 -1
- package/dist/heatmap/fillCellsData.d.ts +22 -2
- package/dist/heatmap/fillCellsData.d.ts.map +1 -1
- package/dist/heatmap/fillCellsData.js +60 -47
- package/dist/heatmap/fillCellsData.js.map +1 -1
- package/dist/heatmap/getCells.d.ts +22 -1
- package/dist/heatmap/getCells.d.ts.map +1 -1
- package/dist/heatmap/getCells.js +23 -3
- package/dist/heatmap/getCells.js.map +1 -1
- package/dist/heatmap/getDendrograms.d.ts +5 -1
- package/dist/heatmap/getDendrograms.d.ts.map +1 -1
- package/dist/heatmap/getDendrograms.js +33 -11
- package/dist/heatmap/getDendrograms.js.map +1 -1
- package/dist/heatmap/index.d.ts.map +1 -1
- package/dist/heatmap/index.js +30 -6
- package/dist/heatmap/index.js.map +1 -1
- package/dist/scatterplot/ChartRenderer.d.ts +2 -2
- package/dist/scatterplot/ChartRenderer.d.ts.map +1 -1
- package/dist/scatterplot/ChartRenderer.js +155 -115
- package/dist/scatterplot/ChartRenderer.js.map +1 -1
- package/dist/scatterplot/ScatterplotSettingsImpl.d.ts +11 -1
- package/dist/scatterplot/ScatterplotSettingsImpl.d.ts.map +1 -1
- package/dist/scatterplot/ScatterplotSettingsImpl.js +20 -0
- package/dist/scatterplot/ScatterplotSettingsImpl.js.map +1 -1
- package/dist/scatterplot/components/ChartLayersData.d.ts +5 -0
- package/dist/scatterplot/components/ChartLayersData.d.ts.map +1 -1
- package/dist/scatterplot/components/ChartLayersData.js +115 -35
- package/dist/scatterplot/components/ChartLayersData.js.map +1 -1
- package/dist/scatterplot/components/types.d.ts +2 -0
- package/dist/scatterplot/components/types.d.ts.map +1 -1
- package/dist/scatterplot/getLayersData.d.ts +11 -2
- package/dist/scatterplot/getLayersData.d.ts.map +1 -1
- package/dist/scatterplot/getLayersData.js +36 -19
- package/dist/scatterplot/getLayersData.js.map +1 -1
- package/dist/scatterplot/index.d.ts.map +1 -1
- package/dist/scatterplot/index.js +51 -33
- package/dist/scatterplot/index.js.map +1 -1
- package/dist/scatterplot/linearRegression.js +1 -1
- package/dist/scatterplot/utils/createAesGetter.d.ts.map +1 -1
- package/dist/scatterplot/utils/createAesGetter.js +5 -3
- package/dist/scatterplot/utils/createAesGetter.js.map +1 -1
- package/dist/scatterplot/utils/createLegendInfo.d.ts +11 -2
- package/dist/scatterplot/utils/createLegendInfo.d.ts.map +1 -1
- package/dist/scatterplot/utils/createLegendInfo.js +21 -16
- package/dist/scatterplot/utils/createLegendInfo.js.map +1 -1
- package/dist/scatterplot-umap/ChartRenderer.d.ts +6 -6
- package/dist/scatterplot-umap/ChartRenderer.d.ts.map +1 -1
- package/dist/scatterplot-umap/ChartRenderer.js +99 -57
- package/dist/scatterplot-umap/ChartRenderer.js.map +1 -1
- package/dist/scatterplot-umap/SettingsImpl.d.ts +11 -1
- package/dist/scatterplot-umap/SettingsImpl.d.ts.map +1 -1
- package/dist/scatterplot-umap/SettingsImpl.js +21 -1
- package/dist/scatterplot-umap/SettingsImpl.js.map +1 -1
- package/dist/scatterplot-umap/components/LowerSVG.d.ts +3 -2
- package/dist/scatterplot-umap/components/LowerSVG.d.ts.map +1 -1
- package/dist/scatterplot-umap/components/LowerSVG.js +159 -108
- package/dist/scatterplot-umap/components/LowerSVG.js.map +1 -1
- package/dist/scatterplot-umap/components/SVGLayer.d.ts +1 -1
- package/dist/scatterplot-umap/components/SVGLayer.d.ts.map +1 -1
- package/dist/scatterplot-umap/components/SVGLayer.js +9 -8
- package/dist/scatterplot-umap/components/SVGLayer.js.map +1 -1
- package/dist/scatterplot-umap/index.d.ts +6 -1
- package/dist/scatterplot-umap/index.d.ts.map +1 -1
- package/dist/scatterplot-umap/index.js +65 -31
- package/dist/scatterplot-umap/index.js.map +1 -1
- package/dist/scatterplot-umap/types.d.ts +7 -0
- package/dist/scatterplot-umap/types.d.ts.map +1 -1
- package/dist/types/bubble.d.ts +6 -0
- package/dist/types/bubble.d.ts.map +1 -1
- package/dist/types/bubble.js +3 -1
- package/dist/types/bubble.js.map +1 -1
- package/dist/types/heatmap.d.ts +6 -0
- package/dist/types/heatmap.d.ts.map +1 -1
- package/dist/types/heatmap.js +2 -0
- package/dist/types/heatmap.js.map +1 -1
- package/dist/types/scatterplot-umap.d.ts +763 -87
- package/dist/types/scatterplot-umap.d.ts.map +1 -1
- package/dist/types/scatterplot-umap.js +19 -3
- package/dist/types/scatterplot-umap.js.map +1 -1
- package/dist/types/scatterplot.d.ts +1377 -44
- package/dist/types/scatterplot.d.ts.map +1 -1
- package/dist/types/scatterplot.js +27 -3
- package/dist/types/scatterplot.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,160 +1,211 @@
|
|
|
1
1
|
import { BLACK as e } from "../../constants.js";
|
|
2
2
|
import t from "../../common/fonts.js";
|
|
3
3
|
import { Tooltip as n } from "../../common/Tooltip.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
4
|
+
import { getPointShape as r } from "../../utils/getPointShape.js";
|
|
5
|
+
import { useDataFrame as i } from "../../common/useDataFrame.js";
|
|
6
|
+
import { getLineShape as a } from "../../utils/getLineShape.js";
|
|
7
|
+
import { ChartsTitle as o } from "../../common/ChartsTitle.js";
|
|
8
|
+
import { Legend as s } from "../../common/Legend.js";
|
|
9
|
+
import { ContinuousAxis as c } from "../../common/ContinuousAxis.js";
|
|
10
|
+
import { ContinuousGrid as l } from "../../common/ContinuousGrid.js";
|
|
11
|
+
import { formatColumnValue as u } from "../../scatterplot/utils/formatColumnValue.js";
|
|
12
|
+
import d, { useEffect as f, useState as p } from "react";
|
|
13
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
14
|
+
import { format as _ } from "d3-format";
|
|
15
|
+
import { curveBasis as v, line as y } from "d3-shape";
|
|
16
|
+
var b = "21", x = 3;
|
|
17
|
+
function S({ dots: e, scales: t, stroke: n, strokeWidth: r, dash: i, smoothing: a }) {
|
|
18
|
+
return a ? /* @__PURE__ */ h("path", {
|
|
19
|
+
d: y().curve(v).x((e) => t.x(e.x)).y((e) => t.y(e.y))(e) ?? "",
|
|
20
|
+
fill: "none",
|
|
21
|
+
stroke: n,
|
|
22
|
+
strokeWidth: r,
|
|
23
|
+
strokeDasharray: i
|
|
24
|
+
}) : /* @__PURE__ */ h("polyline", {
|
|
25
|
+
points: e.map((e) => `${t.x(e.x)},${t.y(e.y)}`).join(" "),
|
|
26
|
+
fill: "none",
|
|
27
|
+
stroke: n,
|
|
28
|
+
strokeWidth: r,
|
|
29
|
+
strokeDasharray: i
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function C({ dots: e, scales: t, stroke: n, keyPrefix: i }) {
|
|
33
|
+
return /* @__PURE__ */ h(m, { children: e.map((e, a) => /* @__PURE__ */ h("g", {
|
|
34
|
+
transform: `translate(${t.x(e.x)},${t.y(e.y)})`,
|
|
35
|
+
children: r(b, x, n)
|
|
36
|
+
}, `${i}-dot-${a}`)) });
|
|
37
|
+
}
|
|
38
|
+
function w({ curveData: t, entryIdx: n, scales: r, aesGetters: i }) {
|
|
39
|
+
let { entry: o, dotsByGrouping: s, smoothing: c } = t, l = i.additionalCurveLineColor[n] ?? (() => "#110529"), u = a(o.lineShape);
|
|
40
|
+
return /* @__PURE__ */ h("g", {
|
|
41
|
+
clipPath: "url(#viewportClipPath)",
|
|
42
|
+
opacity: o.opacity,
|
|
43
|
+
children: Object.entries(s).map(([t, n]) => {
|
|
44
|
+
let i = n.length > 0 ? l(n[0].idx) : e;
|
|
45
|
+
return /* @__PURE__ */ g(d.Fragment, { children: [/* @__PURE__ */ h(S, {
|
|
46
|
+
dots: n,
|
|
47
|
+
scales: r,
|
|
48
|
+
stroke: i,
|
|
49
|
+
strokeWidth: o.lineWidth,
|
|
50
|
+
dash: u,
|
|
51
|
+
smoothing: c
|
|
52
|
+
}), o.showDots && /* @__PURE__ */ h(C, {
|
|
53
|
+
dots: n,
|
|
54
|
+
scales: r,
|
|
55
|
+
stroke: i,
|
|
56
|
+
keyPrefix: t
|
|
57
|
+
})] }, t);
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function T(e, t, n = []) {
|
|
15
62
|
let r = [];
|
|
16
63
|
for (let i of n) {
|
|
17
|
-
let n = i?.format ?
|
|
18
|
-
r.push(`${i.label}: ${
|
|
64
|
+
let n = i?.format ? _(i.format) : void 0;
|
|
65
|
+
r.push(`${i.label}: ${u(e, t.idx, i, n)}`);
|
|
19
66
|
}
|
|
20
67
|
return r;
|
|
21
68
|
}
|
|
22
|
-
function
|
|
69
|
+
function E(e) {
|
|
23
70
|
return typeof e == "string" ? e : e.label ?? e.value;
|
|
24
71
|
}
|
|
25
|
-
var
|
|
26
|
-
function
|
|
27
|
-
let
|
|
72
|
+
var D = y().curve(v);
|
|
73
|
+
function O({ scales: r, chartSettings: a, mainTitle: u, keyColumn: d, margins: m, chartSizes: _, container: v, zoomStateKey: y, legendData: b, dotsByGrouping: x, layers: S, additionalCurves: C, aesGetters: O, tooltipData: k }) {
|
|
74
|
+
let A = i(), { title: j, xAxis: M, yAxis: N, frame: P, legend: F } = a, I = M.showTicks ? 4 : 0, L = N.showTicks ? 4 : 0, R = M.title, z = N.title, B = {
|
|
28
75
|
left: 0,
|
|
29
|
-
right:
|
|
76
|
+
right: _.chartWidth,
|
|
30
77
|
top: 0,
|
|
31
|
-
bottom:
|
|
78
|
+
bottom: _.chartHeight
|
|
32
79
|
};
|
|
33
|
-
if (!
|
|
34
|
-
let
|
|
35
|
-
function
|
|
36
|
-
|
|
80
|
+
if (!v) return null;
|
|
81
|
+
let V = S.find((e) => e.type === "curve"), [H, U] = p([]);
|
|
82
|
+
function W() {
|
|
83
|
+
U(Object.entries(x).map(([e, t]) => ({
|
|
37
84
|
key: e,
|
|
38
|
-
d:
|
|
85
|
+
d: V?.smoothing ? D(t) ?? "" : t.map((e) => `${r.x(e.x)},${r.y(e.y)}`).join(" "),
|
|
39
86
|
dot: t[0]
|
|
40
87
|
})));
|
|
41
88
|
}
|
|
42
|
-
return
|
|
43
|
-
|
|
89
|
+
return f(() => {
|
|
90
|
+
V && (D.x((e) => r.x(e.x)).y((e) => r.y(e.y)), W());
|
|
44
91
|
}, [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
]),
|
|
49
|
-
|
|
50
|
-
}, [
|
|
92
|
+
y,
|
|
93
|
+
_.chartWidth,
|
|
94
|
+
_.chartHeight
|
|
95
|
+
]), f(() => {
|
|
96
|
+
V && W();
|
|
97
|
+
}, [V?.smoothing]), /* @__PURE__ */ g("svg", {
|
|
51
98
|
xmlns: "http://www.w3.org/2000/svg",
|
|
52
|
-
viewBox: `0 0 ${
|
|
53
|
-
width:
|
|
54
|
-
height:
|
|
99
|
+
viewBox: `0 0 ${_.totalWidth} ${_.totalHeight}`,
|
|
100
|
+
width: _.totalWidth,
|
|
101
|
+
height: _.totalHeight,
|
|
55
102
|
style: { pointerEvents: "none" },
|
|
56
|
-
children: [/* @__PURE__ */
|
|
57
|
-
transform: `translate(${
|
|
103
|
+
children: [/* @__PURE__ */ h("defs", { children: t }), /* @__PURE__ */ g("g", {
|
|
104
|
+
transform: `translate(${m.left},${m.top})`,
|
|
58
105
|
fontFamily: "Manrope",
|
|
59
106
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ h("clipPath", {
|
|
61
108
|
id: "viewportClipPath",
|
|
62
|
-
children: /* @__PURE__ */
|
|
109
|
+
children: /* @__PURE__ */ h("rect", {
|
|
63
110
|
x: "0",
|
|
64
111
|
y: "0",
|
|
65
|
-
width:
|
|
66
|
-
height:
|
|
112
|
+
width: _.chartWidth,
|
|
113
|
+
height: _.chartHeight
|
|
67
114
|
})
|
|
68
115
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
title:
|
|
71
|
-
show:
|
|
72
|
-
position:
|
|
73
|
-
leftPadding: -
|
|
74
|
-
rightPadding:
|
|
75
|
-
chartsWidth:
|
|
116
|
+
/* @__PURE__ */ h(o, {
|
|
117
|
+
title: u,
|
|
118
|
+
show: j.show,
|
|
119
|
+
position: j.position,
|
|
120
|
+
leftPadding: -m.left,
|
|
121
|
+
rightPadding: m.right,
|
|
122
|
+
chartsWidth: _.totalWidth
|
|
76
123
|
}),
|
|
77
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ g("g", {
|
|
78
125
|
dominantBaseline: "central",
|
|
79
126
|
textAnchor: "middle",
|
|
80
127
|
fontWeight: "500",
|
|
81
128
|
fontSize: "14px",
|
|
82
129
|
fill: e,
|
|
83
|
-
children: [
|
|
84
|
-
x:
|
|
85
|
-
y:
|
|
86
|
-
children:
|
|
87
|
-
}),
|
|
88
|
-
x: -
|
|
89
|
-
y:
|
|
90
|
-
transform: `rotate(-90,${-
|
|
91
|
-
children:
|
|
130
|
+
children: [R && /* @__PURE__ */ h("text", {
|
|
131
|
+
x: _.chartWidth / 2,
|
|
132
|
+
y: _.chartHeight + m.bottom - 20 / 2,
|
|
133
|
+
children: E(R)
|
|
134
|
+
}), z && /* @__PURE__ */ h("text", {
|
|
135
|
+
x: -m.left + 20 / 2,
|
|
136
|
+
y: _.chartHeight / 2,
|
|
137
|
+
transform: `rotate(-90,${-m.left + 20 / 2},${_.chartHeight / 2})`,
|
|
138
|
+
children: E(z)
|
|
92
139
|
})]
|
|
93
140
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
width:
|
|
96
|
-
height:
|
|
97
|
-
scaleX:
|
|
98
|
-
scaleY:
|
|
99
|
-
axisX:
|
|
100
|
-
axisY:
|
|
101
|
-
updatingKey:
|
|
102
|
-
frameType:
|
|
141
|
+
/* @__PURE__ */ h(l, {
|
|
142
|
+
width: _.chartWidth,
|
|
143
|
+
height: _.chartHeight,
|
|
144
|
+
scaleX: r.x,
|
|
145
|
+
scaleY: r.y,
|
|
146
|
+
axisX: M,
|
|
147
|
+
axisY: N,
|
|
148
|
+
updatingKey: y,
|
|
149
|
+
frameType: P.type
|
|
103
150
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
transform: `translate(0,${
|
|
106
|
-
children: /* @__PURE__ */
|
|
107
|
-
scale:
|
|
151
|
+
/* @__PURE__ */ h("g", {
|
|
152
|
+
transform: `translate(0,${_.chartHeight})`,
|
|
153
|
+
children: /* @__PURE__ */ h(c, {
|
|
154
|
+
scale: r.x,
|
|
108
155
|
orient: "bottom",
|
|
109
|
-
tickSize:
|
|
110
|
-
hiddenLabels:
|
|
156
|
+
tickSize: I,
|
|
157
|
+
hiddenLabels: M.hiddenLabels
|
|
111
158
|
})
|
|
112
159
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
scale:
|
|
160
|
+
/* @__PURE__ */ h("g", { children: /* @__PURE__ */ h(c, {
|
|
161
|
+
scale: r.y,
|
|
115
162
|
orient: "left",
|
|
116
|
-
tickSize:
|
|
117
|
-
hiddenLabels:
|
|
163
|
+
tickSize: L,
|
|
164
|
+
hiddenLabels: N.hiddenLabels
|
|
118
165
|
}) }),
|
|
119
|
-
|
|
120
|
-
clipPath: "url(#viewportClipPath)",
|
|
121
|
-
children: B.map(({ key: e, d: t, dot: n }) => /* @__PURE__ */ f("path", {
|
|
122
|
-
d: t,
|
|
123
|
-
fill: "none",
|
|
124
|
-
stroke: E.dotFill(n.idx),
|
|
125
|
-
strokeWidth: z.aes?.lineWidth,
|
|
126
|
-
strokeDasharray: E.lineType(n.idx)
|
|
127
|
-
}, e))
|
|
128
|
-
}),
|
|
129
|
-
z && !z.smoothing && /* @__PURE__ */ f("g", {
|
|
166
|
+
V && /* @__PURE__ */ h("g", {
|
|
130
167
|
clipPath: "url(#viewportClipPath)",
|
|
131
|
-
children:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
168
|
+
children: H.map(({ key: e, d: t, dot: n }) => {
|
|
169
|
+
let r = {
|
|
170
|
+
fill: "none",
|
|
171
|
+
stroke: O.dotFill(n.idx),
|
|
172
|
+
strokeWidth: V.aes?.lineWidth,
|
|
173
|
+
strokeDasharray: O.lineType(n.idx)
|
|
174
|
+
};
|
|
175
|
+
return V.smoothing ? /* @__PURE__ */ h("path", {
|
|
176
|
+
d: t,
|
|
177
|
+
...r
|
|
178
|
+
}, e) : /* @__PURE__ */ h("polyline", {
|
|
179
|
+
points: t,
|
|
180
|
+
...r
|
|
181
|
+
}, e);
|
|
182
|
+
})
|
|
138
183
|
}),
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
184
|
+
C.map((e, t) => /* @__PURE__ */ h(w, {
|
|
185
|
+
curveData: e,
|
|
186
|
+
entryIdx: t,
|
|
187
|
+
scales: r,
|
|
188
|
+
aesGetters: O
|
|
189
|
+
}, `additional-${t}`)),
|
|
190
|
+
a.tooltips.show && k.selectedData && /* @__PURE__ */ h(n, {
|
|
191
|
+
content: T(A, k.selectedData, a.tooltips?.content),
|
|
192
|
+
x: r.x(k.selectedData.x),
|
|
193
|
+
y: r.y(k.selectedData.y),
|
|
143
194
|
active: !0,
|
|
144
|
-
fixed:
|
|
145
|
-
sideDistances:
|
|
146
|
-
container:
|
|
147
|
-
onClose:
|
|
195
|
+
fixed: k.fixed,
|
|
196
|
+
sideDistances: B,
|
|
197
|
+
container: v,
|
|
198
|
+
onClose: k.onClose
|
|
148
199
|
}),
|
|
149
|
-
|
|
150
|
-
transform: `translate(${
|
|
151
|
-
children: /* @__PURE__ */
|
|
200
|
+
F.show && /* @__PURE__ */ h("g", {
|
|
201
|
+
transform: `translate(${_.chartWidth + 24},0)`,
|
|
202
|
+
children: /* @__PURE__ */ h(s, { legendData: b })
|
|
152
203
|
})
|
|
153
204
|
]
|
|
154
205
|
})]
|
|
155
206
|
});
|
|
156
207
|
}
|
|
157
|
-
var
|
|
158
|
-
export {
|
|
208
|
+
var k = d.memo(O);
|
|
209
|
+
export { k as default };
|
|
159
210
|
|
|
160
211
|
//# sourceMappingURL=LowerSVG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LowerSVG.js","names":[],"sources":["../../../src/scatterplot-umap/components/LowerSVG.tsx"],"sourcesContent":["import {format} from 'd3-format';\nimport { curveBasis, line } from 'd3-shape';\nimport React, { useEffect, useState } from 'react';\nimport { ChartsTitle } from '../../common/ChartsTitle';\nimport { ContinuousGrid } from '../../common/ContinuousGrid';\nimport fonts from '../../common/fonts';\nimport { Legend } from '../../common/Legend';\nimport type { TooltipsData } from '../../common/Tooltip';\nimport { Tooltip } from '../../common/Tooltip';\nimport type { LegendData } from '../../common/types';\nimport { useDataFrame } from '../../common/useDataFrame';\nimport { BLACK } from '../../constants';\nimport type { DataFrame } from '../../DataFrame';\nimport { ContinuousAxis } from '../../common/ContinuousAxis';\nimport {formatColumnValue} from '../../scatterplot/utils/formatColumnValue';\nimport type { ColumnName } from '../../types';\nimport type { CurveUmapLayer } from '../../types/scatterplot-umap';\nimport { DEFAULT_TICKS_SIZE, LEGEND_OFFSET, TITLE_LINE } from '../constants';\nimport type { ScatterplotUmapSettingsImpl } from '../SettingsImpl';\nimport type { CaptionsSizes, ChartScales, ChartSizes, Dot, DotInfo, Margins, SVGLayerProps } from '../types';\n\nfunction getTooltipContent(dataFrame: DataFrame, dot: DotInfo, columnsList: ColumnName[] = []) {\n const lines: string[] = [];\n for (const column of columnsList) {\n const columnFormatter = column?.format ? format(column.format) : undefined;\n lines.push(`${column.label}: ${formatColumnValue(dataFrame, dot.idx, column, columnFormatter)}`);\n }\n return lines;\n}\n\nfunction getTitle(title: string | ColumnName): string {\n if (typeof title === 'string') {\n return title;\n }\n return title.label ?? title.value;\n}\n\nconst lineGenerator = line<Dot>().curve(curveBasis);\n\nfunction LowerSvg({\n scales,\n chartSettings,\n mainTitle,\n keyColumn: _,\n margins,\n chartSizes,\n container,\n zoomStateKey,\n legendData,\n dotsByGrouping,\n layers,\n aesGetters,\n tooltipData\n}: {\n aesGetters: SVGLayerProps['aesGetters'];\n scales: ChartScales;\n chartSettings: ScatterplotUmapSettingsImpl['chartSettings'];\n mainTitle: string[];\n keyColumn: ColumnName | null;\n margins: Margins;\n chartSizes: ChartSizes;\n captionsSizes: CaptionsSizes;\n selectedDot?: DotInfo | null;\n container: SVGElement | null;\n zoomStateKey: string;\n legendData: LegendData;\n dotsByGrouping: Record<string, Dot[]>;\n layers: ScatterplotUmapSettingsImpl['layers'];\n tooltipData: TooltipsData<DotInfo>;\n}) {\n const dataFrame = useDataFrame();\n const {title, xAxis, yAxis, frame, legend} = chartSettings;\n const tickSizeX = xAxis.showTicks ? DEFAULT_TICKS_SIZE : 0;\n const tickSizeY = yAxis.showTicks ? DEFAULT_TICKS_SIZE : 0;\n const xTitle = xAxis.title;\n const yTitle = yAxis.title;\n const needLeftAxis = true;\n const needBottomAxis = true;\n\n const sideDistances = {\n left: 0,\n right: chartSizes.chartWidth,\n top: 0,\n bottom: chartSizes.chartHeight,\n };\n\n if (!container) {\n return null;\n }\n\n const curveLayer = layers.find(layer => layer.type === 'curve') as CurveUmapLayer | undefined;\n const [lines, setLines] = useState<{key: string, d:string, dot: Dot}[]>([]);\n\n function updateLines() {\n const data = Object.entries(dotsByGrouping);\n const nextLines = data.map(([key, dots]) => ({\n key,\n d: curveLayer?.smoothing ? lineGenerator(dots) ?? '' : dots.map(d => `${scales.x(d.x)},${scales.y(d.y)}`).join(' '),\n dot: dots[0]\n }));\n setLines(nextLines);\n }\n useEffect(() => {\n if (!curveLayer) {\n return;\n }\n lineGenerator\n .x((d: Dot) => scales.x(d.x))\n .y((d: Dot) => scales.y(d.y));\n updateLines();\n }, [zoomStateKey, chartSizes.chartWidth, chartSizes.chartHeight]);\n\n useEffect(() => {\n if (!curveLayer) {\n return;\n }\n updateLines();\n }, [curveLayer?.smoothing]);\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox={`0 0 ${chartSizes.totalWidth} ${chartSizes.totalHeight}`}\n width={chartSizes.totalWidth}\n height={chartSizes.totalHeight}\n style={{pointerEvents: 'none'}}\n >\n <defs>{fonts}</defs>\n <g transform={`translate(${margins.left},${margins.top})`} fontFamily=\"Manrope\">\n <clipPath id=\"viewportClipPath\">\n <rect x=\"0\" y=\"0\" width={chartSizes.chartWidth} height={chartSizes.chartHeight}/>\n </clipPath>\n <ChartsTitle\n title={mainTitle}\n show={title.show}\n position={title.position}\n leftPadding={-margins.left}\n rightPadding={margins.right}\n chartsWidth={chartSizes.totalWidth}\n />\n <g dominantBaseline=\"central\" textAnchor=\"middle\" fontWeight=\"500\" fontSize=\"14px\" fill={BLACK}>\n {xTitle && (\n <text\n x={chartSizes.chartWidth / 2}\n y={chartSizes.chartHeight + margins.bottom - TITLE_LINE / 2}\n >\n {getTitle(xTitle)}\n </text>\n )}\n {yTitle && (\n <text\n x={-margins.left + TITLE_LINE / 2}\n y={chartSizes.chartHeight / 2}\n transform={`rotate(-90,${-margins.left + TITLE_LINE / 2},${\n chartSizes.chartHeight / 2\n })`}\n >\n {getTitle(yTitle)}\n </text>\n )}\n </g>\n <ContinuousGrid\n width={chartSizes.chartWidth}\n height={chartSizes.chartHeight}\n scaleX={scales.x}\n scaleY={scales.y}\n axisX={xAxis}\n axisY={yAxis}\n updatingKey={zoomStateKey}\n frameType={frame.type}\n />\n {needBottomAxis && (\n <g transform={`translate(0,${chartSizes.chartHeight})`}>\n <ContinuousAxis scale={scales.x} orient=\"bottom\" tickSize={tickSizeX} hiddenLabels={xAxis.hiddenLabels} />\n </g>\n )}\n {needLeftAxis && (\n <g>\n <ContinuousAxis scale={scales.y} orient=\"left\" tickSize={tickSizeY} hiddenLabels={yAxis.hiddenLabels} />\n </g>\n )}\n {curveLayer && curveLayer.smoothing && (\n <g clipPath=\"url(#viewportClipPath)\">\n {lines.map(({key, d, dot}) => (\n <path\n key={key}\n d={d}\n fill=\"none\"\n stroke={aesGetters.dotFill(dot.idx)}\n strokeWidth={curveLayer.aes?.lineWidth}\n strokeDasharray={aesGetters.lineType(dot.idx)}\n />\n ))}\n </g>\n )}\n {curveLayer && !curveLayer.smoothing && (\n <g clipPath=\"url(#viewportClipPath)\">\n {lines.map(({key, d, dot}) => (\n <polyline\n key={key}\n points={d}\n fill=\"none\"\n stroke={aesGetters.dotFill(dot.idx)}\n strokeWidth={curveLayer.aes?.lineWidth}\n strokeDasharray={aesGetters.lineType(dot.idx)}\n />\n ))}\n </g>\n )}\n {chartSettings.tooltips.show && tooltipData.selectedData && (\n <Tooltip\n content={getTooltipContent(dataFrame, tooltipData.selectedData, chartSettings.tooltips?.content)}\n x={scales.x(tooltipData.selectedData.x)}\n y={scales.y(tooltipData.selectedData.y)}\n active={true}\n fixed={tooltipData.fixed}\n sideDistances={sideDistances}\n container={container}\n onClose={tooltipData.onClose}\n />\n )}\n {legend.show && (\n <g transform={`translate(${chartSizes.chartWidth + LEGEND_OFFSET},0)`}>\n <Legend legendData={legendData} />\n </g>\n )}\n </g>\n </svg>\n );\n}\n\nexport default React.memo(LowerSvg);\n"],"mappings":";;;;;;;;;;;;;AAqBA,SAAS,EAAkB,GAAsB,GAAc,IAA4B,EAAE,EAAE;CAC3F,IAAM,IAAkB,EAAE;AAC1B,MAAK,IAAM,KAAU,GAAa;EAC9B,IAAM,IAAkB,GAAQ,SAAS,EAAO,EAAO,OAAO,GAAG,KAAA;AACjE,IAAM,KAAK,GAAG,EAAO,MAAM,IAAI,EAAkB,GAAW,EAAI,KAAK,GAAQ,EAAgB,GAAG;;AAEpG,QAAO;;AAGX,SAAS,EAAS,GAAoC;AAIlD,QAHI,OAAO,KAAU,WACV,IAEJ,EAAM,SAAS,EAAM;;AAGhC,IAAM,IAAgB,GAAW,CAAC,MAAM,EAAW;AAEnD,SAAS,EAAS,EACd,WACA,kBACA,cACA,WAAW,GACX,YACA,eACA,cACA,iBACA,eACA,mBACA,WACA,eACA,kBAiBD;CACC,IAAM,IAAY,GAAc,EAC1B,EAAC,UAAO,UAAO,UAAO,UAAO,cAAU,GACvC,IAAY,EAAM,YAAA,IAAiC,GACnD,IAAY,EAAM,YAAA,IAAiC,GACnD,IAAS,EAAM,OACf,IAAS,EAAM,OAIf,IAAgB;EAClB,MAAM;EACN,OAAO,EAAW;EAClB,KAAK;EACL,QAAQ,EAAW;EACtB;AAED,KAAI,CAAC,EACD,QAAO;CAGX,IAAM,IAAa,EAAO,MAAK,MAAS,EAAM,SAAS,QAAQ,EACzD,CAAC,GAAO,KAAY,EAA8C,EAAE,CAAC;CAE3E,SAAS,IAAc;AAOnB,IANa,OAAO,QAAQ,EAAe,CACpB,KAAK,CAAC,GAAK,QAAW;GACzC;GACA,GAAG,GAAY,YAAY,EAAc,EAAK,IAAI,KAAK,EAAK,KAAI,MAAK,GAAG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AO,EAAE,EAAY,aAAa,EAAE;KACvC,QAAQ;KACR,OAAO,EAAY;KACJ;KACJ;KACX,SAAS,EAAY;KACvB,CAAA;IAEL,EAAO,QACJ,kBAAC,KAAD;KAAG,WAAW,aAAa,EAAW,aAAA,GAA2B;eAC7D,kBAAC,GAAD,EAAoB,eAAc,CAAA;KAClC,CAAA;IAER;KACF;;;AAId,IAAA,IAAe,EAAM,KAAK,EAAS"}
|
|
1
|
+
{"version":3,"file":"LowerSVG.js","names":[],"sources":["../../../src/scatterplot-umap/components/LowerSVG.tsx"],"sourcesContent":["import {format} from 'd3-format';\nimport { curveBasis, line } from 'd3-shape';\nimport React, { useEffect, useState } from 'react';\nimport { ChartsTitle } from '../../common/ChartsTitle';\nimport { ContinuousGrid } from '../../common/ContinuousGrid';\nimport fonts from '../../common/fonts';\nimport { Legend } from '../../common/Legend';\nimport type { TooltipsData } from '../../common/Tooltip';\nimport { Tooltip } from '../../common/Tooltip';\nimport type { LegendData } from '../../common/types';\nimport { useDataFrame } from '../../common/useDataFrame';\nimport { BLACK } from '../../constants';\nimport type { DataFrame } from '../../DataFrame';\nimport { ContinuousAxis } from '../../common/ContinuousAxis';\nimport {formatColumnValue} from '../../scatterplot/utils/formatColumnValue';\nimport type { ColumnName } from '../../types';\nimport type { CurveUmapLayer } from '../../types/scatterplot-umap';\nimport { getLineShape } from '../../utils/getLineShape';\nimport { getPointShape } from '../../utils/getPointShape';\nimport { DEFAULT_TICKS_SIZE, LEGEND_OFFSET, TITLE_LINE } from '../constants';\nimport type { ScatterplotUmapSettingsImpl } from '../SettingsImpl';\nimport type { AdditionalCurveRenderData, CaptionsSizes, ChartScales, ChartSizes, Dot, DotInfo, Margins, SVGLayerProps } from '../types';\n\nconst ADDITIONAL_CURVE_DOT_SHAPE = '21';\nconst ADDITIONAL_CURVE_DOT_SIZE = 3;\n\nfunction UmapAdditionalCurveLine({\n dots, scales, stroke, strokeWidth, dash, smoothing,\n}: {\n dots: Dot[];\n scales: ChartScales;\n stroke: string;\n strokeWidth: number | undefined;\n dash: string | undefined;\n smoothing: boolean;\n}) {\n if (smoothing) {\n const gen = line<Dot>().curve(curveBasis).x((d) => scales.x(d.x)).y((d) => scales.y(d.y));\n return <path d={gen(dots) ?? ''} fill=\"none\" stroke={stroke} strokeWidth={strokeWidth} strokeDasharray={dash} />;\n }\n const points = dots.map(d => `${scales.x(d.x)},${scales.y(d.y)}`).join(' ');\n return <polyline points={points} fill=\"none\" stroke={stroke} strokeWidth={strokeWidth} strokeDasharray={dash} />;\n}\n\nfunction UmapAdditionalCurveDots({ dots, scales, stroke, keyPrefix }: {\n dots: Dot[];\n scales: ChartScales;\n stroke: string;\n keyPrefix: string;\n}) {\n return <>\n {dots.map((dot, i) => (\n <g key={`${keyPrefix}-dot-${i}`} transform={`translate(${scales.x(dot.x)},${scales.y(dot.y)})`}>\n {getPointShape(ADDITIONAL_CURVE_DOT_SHAPE, ADDITIONAL_CURVE_DOT_SIZE, stroke)}\n </g>\n ))}\n </>;\n}\n\nfunction UmapAdditionalCurveEntry({\n curveData, entryIdx, scales, aesGetters,\n}: {\n curveData: AdditionalCurveRenderData;\n entryIdx: number;\n scales: ChartScales;\n aesGetters: SVGLayerProps['aesGetters'];\n}) {\n const { entry, dotsByGrouping, smoothing } = curveData;\n const lineColorGetter = aesGetters.additionalCurveLineColor[entryIdx] ?? (() => BLACK);\n const dash = getLineShape(entry.lineShape);\n return (\n <g clipPath=\"url(#viewportClipPath)\" opacity={entry.opacity}>\n {Object.entries(dotsByGrouping).map(([groupKey, dots]) => {\n const stroke = dots.length > 0 ? lineColorGetter(dots[0].idx) : BLACK;\n return <React.Fragment key={groupKey}>\n <UmapAdditionalCurveLine\n dots={dots}\n scales={scales}\n stroke={stroke}\n strokeWidth={entry.lineWidth}\n dash={dash}\n smoothing={smoothing}\n />\n {entry.showDots && <UmapAdditionalCurveDots\n dots={dots}\n scales={scales}\n stroke={stroke}\n keyPrefix={groupKey}\n />}\n </React.Fragment>;\n })}\n </g>\n );\n}\n\nfunction getTooltipContent(dataFrame: DataFrame, dot: DotInfo, columnsList: ColumnName[] = []) {\n const lines: string[] = [];\n for (const column of columnsList) {\n const columnFormatter = column?.format ? format(column.format) : undefined;\n lines.push(`${column.label}: ${formatColumnValue(dataFrame, dot.idx, column, columnFormatter)}`);\n }\n return lines;\n}\n\nfunction getTitle(title: string | ColumnName): string {\n if (typeof title === 'string') {\n return title;\n }\n return title.label ?? title.value;\n}\n\nconst lineGenerator = line<Dot>().curve(curveBasis);\n\nfunction LowerSvg({\n scales,\n chartSettings,\n mainTitle,\n keyColumn: _,\n margins,\n chartSizes,\n container,\n zoomStateKey,\n legendData,\n dotsByGrouping,\n layers,\n additionalCurves,\n aesGetters,\n tooltipData\n}: {\n aesGetters: SVGLayerProps['aesGetters'];\n scales: ChartScales;\n chartSettings: ScatterplotUmapSettingsImpl['chartSettings'];\n mainTitle: string[];\n keyColumn: ColumnName | null;\n margins: Margins;\n chartSizes: ChartSizes;\n captionsSizes: CaptionsSizes;\n selectedDot?: DotInfo | null;\n container: SVGElement | null;\n zoomStateKey: string;\n legendData: LegendData;\n dotsByGrouping: Record<string, Dot[]>;\n layers: ScatterplotUmapSettingsImpl['layers'];\n additionalCurves: AdditionalCurveRenderData[];\n tooltipData: TooltipsData<DotInfo>;\n}) {\n const dataFrame = useDataFrame();\n const {title, xAxis, yAxis, frame, legend} = chartSettings;\n const tickSizeX = xAxis.showTicks ? DEFAULT_TICKS_SIZE : 0;\n const tickSizeY = yAxis.showTicks ? DEFAULT_TICKS_SIZE : 0;\n const xTitle = xAxis.title;\n const yTitle = yAxis.title;\n const needLeftAxis = true;\n const needBottomAxis = true;\n\n const sideDistances = {\n left: 0,\n right: chartSizes.chartWidth,\n top: 0,\n bottom: chartSizes.chartHeight,\n };\n\n if (!container) {\n return null;\n }\n\n const curveLayer = layers.find(layer => layer.type === 'curve') as CurveUmapLayer | undefined;\n const [lines, setLines] = useState<{key: string, d:string, dot: Dot}[]>([]);\n\n function updateLines() {\n const data = Object.entries(dotsByGrouping);\n const nextLines = data.map(([key, dots]) => ({\n key,\n d: curveLayer?.smoothing ? lineGenerator(dots) ?? '' : dots.map(d => `${scales.x(d.x)},${scales.y(d.y)}`).join(' '),\n dot: dots[0]\n }));\n setLines(nextLines);\n }\n useEffect(() => {\n if (!curveLayer) {\n return;\n }\n lineGenerator\n .x((d: Dot) => scales.x(d.x))\n .y((d: Dot) => scales.y(d.y));\n updateLines();\n }, [zoomStateKey, chartSizes.chartWidth, chartSizes.chartHeight]);\n\n useEffect(() => {\n if (!curveLayer) {\n return;\n }\n updateLines();\n }, [curveLayer?.smoothing]);\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox={`0 0 ${chartSizes.totalWidth} ${chartSizes.totalHeight}`}\n width={chartSizes.totalWidth}\n height={chartSizes.totalHeight}\n style={{pointerEvents: 'none'}}\n >\n <defs>{fonts}</defs>\n <g transform={`translate(${margins.left},${margins.top})`} fontFamily=\"Manrope\">\n <clipPath id=\"viewportClipPath\">\n <rect x=\"0\" y=\"0\" width={chartSizes.chartWidth} height={chartSizes.chartHeight}/>\n </clipPath>\n <ChartsTitle\n title={mainTitle}\n show={title.show}\n position={title.position}\n leftPadding={-margins.left}\n rightPadding={margins.right}\n chartsWidth={chartSizes.totalWidth}\n />\n <g dominantBaseline=\"central\" textAnchor=\"middle\" fontWeight=\"500\" fontSize=\"14px\" fill={BLACK}>\n {xTitle && (\n <text\n x={chartSizes.chartWidth / 2}\n y={chartSizes.chartHeight + margins.bottom - TITLE_LINE / 2}\n >\n {getTitle(xTitle)}\n </text>\n )}\n {yTitle && (\n <text\n x={-margins.left + TITLE_LINE / 2}\n y={chartSizes.chartHeight / 2}\n transform={`rotate(-90,${-margins.left + TITLE_LINE / 2},${\n chartSizes.chartHeight / 2\n })`}\n >\n {getTitle(yTitle)}\n </text>\n )}\n </g>\n <ContinuousGrid\n width={chartSizes.chartWidth}\n height={chartSizes.chartHeight}\n scaleX={scales.x}\n scaleY={scales.y}\n axisX={xAxis}\n axisY={yAxis}\n updatingKey={zoomStateKey}\n frameType={frame.type}\n />\n {needBottomAxis && (\n <g transform={`translate(0,${chartSizes.chartHeight})`}>\n <ContinuousAxis scale={scales.x} orient=\"bottom\" tickSize={tickSizeX} hiddenLabels={xAxis.hiddenLabels} />\n </g>\n )}\n {needLeftAxis && (\n <g>\n <ContinuousAxis scale={scales.y} orient=\"left\" tickSize={tickSizeY} hiddenLabels={yAxis.hiddenLabels} />\n </g>\n )}\n {curveLayer && (\n <g clipPath=\"url(#viewportClipPath)\">\n {lines.map(({key, d, dot}) => {\n const shared = {\n fill: 'none',\n stroke: aesGetters.dotFill(dot.idx),\n strokeWidth: curveLayer.aes?.lineWidth,\n strokeDasharray: aesGetters.lineType(dot.idx),\n };\n return curveLayer.smoothing\n ? <path key={key} d={d} {...shared} />\n : <polyline key={key} points={d} {...shared} />;\n })}\n </g>\n )}\n {additionalCurves.map((curveData, entryIdx) => (\n <UmapAdditionalCurveEntry\n key={`additional-${entryIdx}`}\n curveData={curveData}\n entryIdx={entryIdx}\n scales={scales}\n aesGetters={aesGetters}\n />\n ))}\n {chartSettings.tooltips.show && tooltipData.selectedData && (\n <Tooltip\n content={getTooltipContent(dataFrame, tooltipData.selectedData, chartSettings.tooltips?.content)}\n x={scales.x(tooltipData.selectedData.x)}\n y={scales.y(tooltipData.selectedData.y)}\n active={true}\n fixed={tooltipData.fixed}\n sideDistances={sideDistances}\n container={container}\n onClose={tooltipData.onClose}\n />\n )}\n {legend.show && (\n <g transform={`translate(${chartSizes.chartWidth + LEGEND_OFFSET},0)`}>\n <Legend legendData={legendData} />\n </g>\n )}\n </g>\n </svg>\n );\n}\n\nexport default React.memo(LowerSvg);\n"],"mappings":";;;;;;;;;;;;;;;AAuBA,IAAM,IAA6B,MAC7B,IAA4B;AAElC,SAAS,EAAwB,EAC7B,SAAM,WAAQ,WAAQ,gBAAa,SAAM,gBAQ1C;AAMC,QALI,IAEO,kBAAC,Q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;;AAId,IAAA,IAAe,EAAM,KAAK,EAAS"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SVGLayerProps } from '../types';
|
|
2
|
-
export declare function SVGLayer({ settingsId, scales, chartSettings, mainTitle, keyColumn, margins, chartSizes, captionsSizes, container, zoomStateKey, aesGetters, legendData, labels, onPolygonUpdate, onTooltipHintSwitch, onLassoControlsStateUpdate, dotsByGrouping, layers, defaultPolygons, selectedDot, }: SVGLayerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
2
|
+
export declare function SVGLayer({ settingsId, scales, chartSettings, mainTitle, keyColumn, margins, chartSizes, captionsSizes, container, zoomStateKey, aesGetters, legendData, labels, onPolygonUpdate, onTooltipHintSwitch, onLassoControlsStateUpdate, dotsByGrouping, layers, additionalCurves, defaultPolygons, selectedDot, }: SVGLayerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
//# sourceMappingURL=SVGLayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SVGLayer.d.ts","sourceRoot":"","sources":["../../../src/scatterplot-umap/components/SVGLayer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAW,aAAa,EAAE,MAAM,UAAU,CAAC;AAIvD,wBAAgB,QAAQ,CAAC,EACrB,UAAU,EACV,MAAM,EACN,aAAa,EACb,SAAS,EACT,SAAS,EACT,OAAO,EACP,UAAU,EACV,aAAa,EACb,SAAS,EACT,YAAY,EACZ,UAAU,EACV,UAAU,EACV,MAAM,EACN,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,cAAc,EACd,MAAM,EACN,eAAe,EACf,WAAkB,GACrB,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"SVGLayer.d.ts","sourceRoot":"","sources":["../../../src/scatterplot-umap/components/SVGLayer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAW,aAAa,EAAE,MAAM,UAAU,CAAC;AAIvD,wBAAgB,QAAQ,CAAC,EACrB,UAAU,EACV,MAAM,EACN,aAAa,EACb,SAAS,EACT,SAAS,EACT,OAAO,EACP,UAAU,EACV,aAAa,EACb,SAAS,EACT,YAAY,EACZ,UAAU,EACV,UAAU,EACV,MAAM,EACN,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,cAAc,EACd,MAAM,EACN,gBAAgB,EAChB,eAAe,EACf,WAAkB,GACrB,EAAE,aAAa,kDAoDf"}
|
|
@@ -5,17 +5,18 @@ import r from "./UpperSVG.js";
|
|
|
5
5
|
import { useEffect as i } from "react";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
import { createPortal as s } from "react-dom";
|
|
8
|
-
function c({ settingsId: c, scales: l, chartSettings: u, mainTitle: d, keyColumn: f, margins: p, chartSizes: m, captionsSizes: h, container: g, zoomStateKey: _, aesGetters: v, legendData: y, labels: b, onPolygonUpdate: x, onTooltipHintSwitch: S, onLassoControlsStateUpdate: C, dotsByGrouping: w, layers: T,
|
|
8
|
+
function c({ settingsId: c, scales: l, chartSettings: u, mainTitle: d, keyColumn: f, margins: p, chartSizes: m, captionsSizes: h, container: g, zoomStateKey: _, aesGetters: v, legendData: y, labels: b, onPolygonUpdate: x, onTooltipHintSwitch: S, onLassoControlsStateUpdate: C, dotsByGrouping: w, layers: T, additionalCurves: E, defaultPolygons: D, selectedDot: O = null }) {
|
|
9
9
|
if (!g) return null;
|
|
10
|
-
let
|
|
10
|
+
let k = e(S, u.tooltips);
|
|
11
11
|
return i(() => {
|
|
12
|
-
|
|
13
|
-
}, [
|
|
12
|
+
O ? k.onMouseEnter(O) : k.onMouseLeave();
|
|
13
|
+
}, [O]), /* @__PURE__ */ a("div", { children: /* @__PURE__ */ o(t, {
|
|
14
14
|
dataId: c,
|
|
15
15
|
children: [/* @__PURE__ */ a(n, {
|
|
16
16
|
aesGetters: v,
|
|
17
17
|
dotsByGrouping: w,
|
|
18
18
|
layers: T,
|
|
19
|
+
additionalCurves: E,
|
|
19
20
|
scales: l,
|
|
20
21
|
keyColumn: f,
|
|
21
22
|
margins: p,
|
|
@@ -26,7 +27,7 @@ function c({ settingsId: c, scales: l, chartSettings: u, mainTitle: d, keyColumn
|
|
|
26
27
|
container: g,
|
|
27
28
|
zoomStateKey: _,
|
|
28
29
|
legendData: y,
|
|
29
|
-
tooltipData:
|
|
30
|
+
tooltipData: k
|
|
30
31
|
}), s(/* @__PURE__ */ a(r, {
|
|
31
32
|
scales: l,
|
|
32
33
|
container: g,
|
|
@@ -34,11 +35,11 @@ function c({ settingsId: c, scales: l, chartSettings: u, mainTitle: d, keyColumn
|
|
|
34
35
|
labels: b,
|
|
35
36
|
chartSizes: m,
|
|
36
37
|
zoomStateKey: _,
|
|
37
|
-
selectedDot:
|
|
38
|
-
defaultPolygons:
|
|
38
|
+
selectedDot: O,
|
|
39
|
+
defaultPolygons: D,
|
|
39
40
|
onPolygonUpdate: x,
|
|
40
41
|
onLassoControlsStateUpdate: C,
|
|
41
|
-
tooltipData:
|
|
42
|
+
tooltipData: k
|
|
42
43
|
}), g)]
|
|
43
44
|
}) });
|
|
44
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SVGLayer.js","names":[],"sources":["../../../src/scatterplot-umap/components/SVGLayer.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport { ErrorBoundary } from '../../common/ErrorBoundary';\nimport { useTooltip } from '../../common/Tooltip';\nimport type { DotInfo, SVGLayerProps } from '../types';\nimport LowerSvg from './LowerSVG';\nimport UpperSVG from './UpperSVG';\n\nexport function SVGLayer({\n settingsId,\n scales,\n chartSettings,\n mainTitle,\n keyColumn,\n margins,\n chartSizes,\n captionsSizes,\n container,\n zoomStateKey,\n aesGetters,\n legendData,\n labels,\n onPolygonUpdate,\n onTooltipHintSwitch,\n onLassoControlsStateUpdate,\n dotsByGrouping,\n layers,\n defaultPolygons,\n selectedDot = null,\n}: SVGLayerProps) {\n if (!container) {\n return null;\n }\n const tooltipData = useTooltip<DotInfo>(onTooltipHintSwitch, chartSettings.tooltips);\n useEffect(() => {\n if (selectedDot) {\n tooltipData.onMouseEnter(selectedDot);\n } else {\n tooltipData.onMouseLeave();\n }\n }, [selectedDot]);\n\n return (\n <div>\n <ErrorBoundary dataId={settingsId}>\n <LowerSvg\n aesGetters={aesGetters}\n dotsByGrouping={dotsByGrouping}\n layers={layers}\n scales={scales}\n keyColumn={keyColumn}\n margins={margins}\n mainTitle={mainTitle}\n captionsSizes={captionsSizes}\n chartSettings={chartSettings}\n chartSizes={chartSizes}\n container={container}\n zoomStateKey={zoomStateKey}\n legendData={legendData}\n tooltipData={tooltipData}\n />\n {createPortal(\n <UpperSVG\n scales={scales}\n container={container}\n aesGetters={aesGetters}\n labels={labels}\n chartSizes={chartSizes}\n zoomStateKey={zoomStateKey}\n selectedDot={selectedDot}\n defaultPolygons={defaultPolygons}\n onPolygonUpdate={onPolygonUpdate}\n onLassoControlsStateUpdate={onLassoControlsStateUpdate}\n tooltipData={tooltipData}\n />,\n container\n )}\n </ErrorBoundary>\n </div>\n );\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,EAAS,EACrB,eACA,WACA,kBACA,cACA,cACA,YACA,eACA,kBACA,cACA,iBACA,eACA,eACA,WACA,oBACA,wBACA,+BACA,mBACA,WACA,oBACA,iBAAc,QACA;AACd,KAAI,CAAC,EACD,QAAO;CAEX,IAAM,IAAc,EAAoB,GAAqB,EAAc,SAAS;AASpF,QARA,QAAgB;AACZ,EAAI,IACA,EAAY,aAAa,EAAY,GAErC,EAAY,cAAc;IAE/B,CAAC,EAAY,CAAC,EAGb,kBAAC,OAAD,EAAA,UACA,kBAAC,GAAD;EAAe,QAAQ;YAAvB,CACI,kBAAC,GAAD;GACgB;GACI;GACR;
|
|
1
|
+
{"version":3,"file":"SVGLayer.js","names":[],"sources":["../../../src/scatterplot-umap/components/SVGLayer.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport { ErrorBoundary } from '../../common/ErrorBoundary';\nimport { useTooltip } from '../../common/Tooltip';\nimport type { DotInfo, SVGLayerProps } from '../types';\nimport LowerSvg from './LowerSVG';\nimport UpperSVG from './UpperSVG';\n\nexport function SVGLayer({\n settingsId,\n scales,\n chartSettings,\n mainTitle,\n keyColumn,\n margins,\n chartSizes,\n captionsSizes,\n container,\n zoomStateKey,\n aesGetters,\n legendData,\n labels,\n onPolygonUpdate,\n onTooltipHintSwitch,\n onLassoControlsStateUpdate,\n dotsByGrouping,\n layers,\n additionalCurves,\n defaultPolygons,\n selectedDot = null,\n}: SVGLayerProps) {\n if (!container) {\n return null;\n }\n const tooltipData = useTooltip<DotInfo>(onTooltipHintSwitch, chartSettings.tooltips);\n useEffect(() => {\n if (selectedDot) {\n tooltipData.onMouseEnter(selectedDot);\n } else {\n tooltipData.onMouseLeave();\n }\n }, [selectedDot]);\n\n return (\n <div>\n <ErrorBoundary dataId={settingsId}>\n <LowerSvg\n aesGetters={aesGetters}\n dotsByGrouping={dotsByGrouping}\n layers={layers}\n additionalCurves={additionalCurves}\n scales={scales}\n keyColumn={keyColumn}\n margins={margins}\n mainTitle={mainTitle}\n captionsSizes={captionsSizes}\n chartSettings={chartSettings}\n chartSizes={chartSizes}\n container={container}\n zoomStateKey={zoomStateKey}\n legendData={legendData}\n tooltipData={tooltipData}\n />\n {createPortal(\n <UpperSVG\n scales={scales}\n container={container}\n aesGetters={aesGetters}\n labels={labels}\n chartSizes={chartSizes}\n zoomStateKey={zoomStateKey}\n selectedDot={selectedDot}\n defaultPolygons={defaultPolygons}\n onPolygonUpdate={onPolygonUpdate}\n onLassoControlsStateUpdate={onLassoControlsStateUpdate}\n tooltipData={tooltipData}\n />,\n container\n )}\n </ErrorBoundary>\n </div>\n );\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,EAAS,EACrB,eACA,WACA,kBACA,cACA,cACA,YACA,eACA,kBACA,cACA,iBACA,eACA,eACA,WACA,oBACA,wBACA,+BACA,mBACA,WACA,qBACA,oBACA,iBAAc,QACA;AACd,KAAI,CAAC,EACD,QAAO;CAEX,IAAM,IAAc,EAAoB,GAAqB,EAAc,SAAS;AASpF,QARA,QAAgB;AACZ,EAAI,IACA,EAAY,aAAa,EAAY,GAErC,EAAY,cAAc;IAE/B,CAAC,EAAY,CAAC,EAGb,kBAAC,OAAD,EAAA,UACA,kBAAC,GAAD;EAAe,QAAQ;YAAvB,CACI,kBAAC,GAAD;GACgB;GACI;GACR;GACU;GACV;GACG;GACF;GACE;GACI;GACA;GACH;GACD;GACG;GACF;GACC;GACf,CAAA,EACD,EACG,kBAAC,GAAD;GACY;GACG;GACC;GACJ;GACI;GACE;GACD;GACI;GACA;GACW;GACf;GACf,CAAA,EACF,EACH,CACW;KACV,CAAA"}
|
|
@@ -18,6 +18,11 @@ export declare class ChartScatterplotUmap extends AbstractChart {
|
|
|
18
18
|
dotsByGrouping: Record<string, Dot[]>;
|
|
19
19
|
dotsExtents: DotsExtents;
|
|
20
20
|
legendLabels: ScatterplotUmapLegendInfo;
|
|
21
|
+
additionalCurves: {
|
|
22
|
+
entry: NonNullable<ScatterplotUmapSettingsImpl['additionalCurves']>['curves'][number];
|
|
23
|
+
dotsByGrouping: Record<string, Dot[]>;
|
|
24
|
+
smoothing: boolean;
|
|
25
|
+
}[];
|
|
21
26
|
} | null;
|
|
22
27
|
constructor(data: DataFrame, settings: ScatterplotUmapSettings, eventHandlers?: ScatterplotEventHandlers);
|
|
23
28
|
mount(node: HTMLElement): void;
|
|
@@ -25,7 +30,7 @@ export declare class ChartScatterplotUmap extends AbstractChart {
|
|
|
25
30
|
updateSettingsAndData(data: DataFrame, settings: ScatterplotUmapSettings): void;
|
|
26
31
|
updateChartState(field: string, value: unknown): void;
|
|
27
32
|
export(): string;
|
|
28
|
-
_needUpdateCalculatedDataBySettings(prevSettings: ScatterplotUmapSettingsImpl, settings: ScatterplotUmapSettingsImpl): boolean
|
|
33
|
+
_needUpdateCalculatedDataBySettings(prevSettings: ScatterplotUmapSettingsImpl, settings: ScatterplotUmapSettingsImpl): boolean;
|
|
29
34
|
_needUpdateCalculatedDataByData(prevData: DataFrame, data: DataFrame): boolean;
|
|
30
35
|
_updateData(): void;
|
|
31
36
|
_updateAesInData(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scatterplot-umap/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,OAAO,EAA2F,KAAK,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAClJ,OAAO,KAAK,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpG,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,kBAAkB,EAAa,OAAO,EAAE,MAAM,SAAS,CAAC;AAmBxF,qBAAa,oBAAqB,SAAQ,aAAa;IACnD,QAAQ,EAAE,2BAA2B,CAAC;IACtC,aAAa,EAAE,aAAa,CAAC;IAE7B,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,IAAI,CAAmB;IACjF,mBAAmB,EAAE,CAAC,CAAC,EAAC,OAAO,KAAK,IAAI,CAAmB;IAC3D,0BAA0B,EAAE,CAAC,CAAC,EAAE,kBAAkB,KAAK,IAAI,CAAmB;IAC9E,YAAY,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAmB;IAEjE,cAAc,EAAE;QACZ,IAAI,EAAE,GAAG,EAAE,CAAC;QACZ,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,C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