@milaboratories/miplots4 1.0.127 → 1.0.128
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/scatterplot-umap/ChartRenderer.d.ts +3 -9
- package/dist/scatterplot-umap/ChartRenderer.d.ts.map +1 -1
- package/dist/scatterplot-umap/ChartRenderer.js +183 -186
- package/dist/scatterplot-umap/ChartRenderer.js.map +1 -1
- package/dist/scatterplot-umap/components/Lasso.js +97 -97
- package/dist/scatterplot-umap/components/Lasso.js.map +1 -1
- package/dist/scatterplot-umap/components/LowerSVG.d.ts +1 -5
- package/dist/scatterplot-umap/components/LowerSVG.d.ts.map +1 -1
- package/dist/scatterplot-umap/components/LowerSVG.js +51 -52
- 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 +29 -31
- package/dist/scatterplot-umap/components/SVGLayer.js.map +1 -1
- package/dist/scatterplot-umap/index.d.ts +0 -4
- package/dist/scatterplot-umap/index.d.ts.map +1 -1
- package/dist/scatterplot-umap/index.js +61 -66
- package/dist/scatterplot-umap/index.js.map +1 -1
- package/dist/scatterplot-umap/types.d.ts +0 -4
- package/dist/scatterplot-umap/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -48,23 +48,17 @@ declare class ChartRenderer {
|
|
|
48
48
|
init(node: HTMLElement): void;
|
|
49
49
|
updateChartSizes(size: ScatterplotUmapSettingsImpl['chartSettings']['size']): void;
|
|
50
50
|
updateViewport(xAxis: ScatterplotUmapSettingsImpl['chartSettings']['xAxis'], yAxis: ScatterplotUmapSettingsImpl['chartSettings']['yAxis'], dotsExtents: DotsExtents): void;
|
|
51
|
-
updateCaptionsSize(
|
|
51
|
+
updateCaptionsSize(): void;
|
|
52
52
|
createMainTitle(title: ScatterplotUmapSettingsImpl['chartSettings']['title']): void;
|
|
53
53
|
updateMargins(): void;
|
|
54
54
|
updateLegendSize(legend: ScatterplotUmapSettingsImpl['chartSettings']['legend'], legendLabels: ScatterplotUmapLegendInfo, grouping: ColumnName[], layers: ScatterplotUmapLayer[]): void;
|
|
55
|
-
initSettings(dots: Dot[], chartSettings: ScatterplotUmapSettingsImpl['chartSettings'], dotExtents: DotsExtents,
|
|
56
|
-
x: boolean;
|
|
57
|
-
y: boolean;
|
|
58
|
-
}, legendInfo: ScatterplotUmapLegendInfo, layers: ScatterplotUmapSettingsImpl['layers'], grouping: ColumnName[]): void;
|
|
55
|
+
initSettings(dots: Dot[], chartSettings: ScatterplotUmapSettingsImpl['chartSettings'], dotExtents: DotsExtents, legendInfo: ScatterplotUmapLegendInfo, layers: ScatterplotUmapSettingsImpl['layers'], grouping: ColumnName[]): void;
|
|
59
56
|
updateAes(legendInfo: ScatterplotUmapLegendInfo, layers: ScatterplotUmapSettingsImpl['layers']): void;
|
|
60
57
|
updatePointSize(): void;
|
|
61
58
|
updateByLasso(): void;
|
|
62
59
|
createQuadtree(dots: Dot[]): Quadtree<Dot>;
|
|
63
60
|
updateData(dots: Dot[]): void;
|
|
64
|
-
render(settingsId: string, chartSettings: ScatterplotUmapSettingsImpl['chartSettings'], keyColumn: ColumnName | null,
|
|
65
|
-
x: boolean;
|
|
66
|
-
y: boolean;
|
|
67
|
-
}, dots: Dot[], dotExtents: DotsExtents, dotsByGrouping: Record<string, Dot[]>, layers: ScatterplotUmapSettingsImpl['layers'], legendInfo: ScatterplotUmapLegendInfo, grouping: ColumnName[], allPossibleLabels: Label[], onPolygonUpdateOutside: ScatterplotEventHandlers['onPolygonUpdate'], onTooltipHintSwitch: (v: boolean) => void, onLassoControlsStateUpdate: (v: LassoControlsState) => void): void;
|
|
61
|
+
render(settingsId: string, chartSettings: ScatterplotUmapSettingsImpl['chartSettings'], keyColumn: ColumnName | null, dots: Dot[], dotExtents: DotsExtents, dotsByGrouping: Record<string, Dot[]>, layers: ScatterplotUmapSettingsImpl['layers'], legendInfo: ScatterplotUmapLegendInfo, grouping: ColumnName[], allPossibleLabels: Label[], onPolygonUpdateOutside: ScatterplotEventHandlers['onPolygonUpdate'], onTooltipHintSwitch: (v: boolean) => void, onLassoControlsStateUpdate: (v: LassoControlsState) => void): void;
|
|
68
62
|
renderWebglLayer(): void;
|
|
69
63
|
onPolygonUpdate: (p: Polygon[]) => void;
|
|
70
64
|
renderSvgLayer(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartRenderer.d.ts","sourceRoot":"","sources":["../../src/scatterplot-umap/ChartRenderer.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACR,UAAU,EACV,aAAa,EACb,GAAG,EACH,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,aAAa,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAC,WAAW,EAAE,UAAU,EAAE,OAAO,EAAC,MAAM,SAAS,CAAC;AAE9D,OAAO,KAAK,EAAC,UAAU,EAAa,MAAM,iBAAiB,CAAC;AAG5D,OAAO,KAAK,EAAwB,oBAAoB,EAAE,2BAA2B,EAAC,MAAM,gBAAgB,CAAC;AAI7G,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,uCAAuC,CAAC;AAEjE,OAAO,KAAK,EAAC,UAAU,EAAE,wBAAwB,EAAC,MAAM,UAAU,CAAC;AACnE,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AAIzE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAM1C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAE3C,OAAO,KAAK,EAAc,YAAY,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AAiDtE,cAAM,aAA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,EAAE;IAWtB,MAAM,CACF,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,2BAA2B,CAAC,eAAe,CAAC,EAC3D,SAAS,EAAE,UAAU,GAAG,IAAI,EAC5B,IAAI,EAAE,GAAG,EAAE,EACX,UAAU,EAAE,WAAW,EACvB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,EACrC,MAAM,EAAE,2BAA2B,CAAC,QAAQ,CAAC,EAC7C,UAAU,EAAE,yBAAyB,EACrC,QAAQ,EAAE,UAAU,EAAE,EACtB,iBAAiB,EAAE,KAAK,EAAE,EAC1B,sBAAsB,EAAE,wBAAwB,CAAC,iBAAiB,CAAC,EACnE,mBAAmB,EAAE,CAAC,CAAC,EAAC,OAAO,KAAK,IAAI,EACxC,0BAA0B,EAAE,CAAC,CAAC,EAAC,kBAAkB,KAAK,IAAI;IA0C9D,gBAAgB;IAMhB,eAAe,GAAI,GAAE,OAAO,EAAE,UAO5B;IAEF,cAAc;IAgCd,WAAW,CAAC,OAAO,EAAE,MAAM;CAG9B;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { j as
|
|
5
|
-
import { Error as
|
|
6
|
-
import { BLACK as
|
|
7
|
-
import { splitTextByWidth as
|
|
8
|
-
import { SVGLayer as
|
|
9
|
-
import { MIN_MARGIN as
|
|
10
|
-
import { PADDINGS as
|
|
11
|
-
import { createAesGetter as
|
|
12
|
-
import { getTicksAndFormat as
|
|
13
|
-
import { getFilteredLabels as
|
|
14
|
-
import { isContinuousAes as
|
|
1
|
+
var Q = Object.defineProperty;
|
|
2
|
+
var $ = (h, t, e) => t in h ? Q(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
|
|
3
|
+
var l = (h, t, e) => $(h, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { j as N } from "../node_modules/react/jsx-runtime.js";
|
|
5
|
+
import { Error as J } from "../common/Error.js";
|
|
6
|
+
import { BLACK as E, DEFAULT_HEIGHT as W, DEFAULT_WIDTH as H, TITLE_LINE_HEIGHT as Z, MAX_SHOWN_UNIQUE_VALUES_IN_LABELS as tt, TITLE_MARGIN as et } from "../constants.js";
|
|
7
|
+
import { splitTextByWidth as st } from "../discrete/utils/splitTextByWidth.js";
|
|
8
|
+
import { SVGLayer as it } from "./components/SVGLayer.js";
|
|
9
|
+
import { MIN_MARGIN as L, DEFAULT_DOT_AES as O } from "../scatterplot/constants.js";
|
|
10
|
+
import { PADDINGS as w, TITLE_LINE as _, LEGEND_OFFSET as ot } from "./constants.js";
|
|
11
|
+
import { createAesGetter as M } from "../scatterplot/utils/createAesGetter.js";
|
|
12
|
+
import { getTicksAndFormat as at } from "../scatterplot/utils/getTicksAndFormat.js";
|
|
13
|
+
import { getFilteredLabels as I, updateLabelsBBoxes as rt } from "../scatterplot/utils/getVisibleLabels.js";
|
|
14
|
+
import { isContinuousAes as U } from "../types/common.js";
|
|
15
15
|
import "../types/discrete.js";
|
|
16
16
|
import "../types/scatterplot.js";
|
|
17
17
|
import "../types/heatmap.js";
|
|
18
18
|
import "../types/dendro.js";
|
|
19
19
|
import "../types/histogram.js";
|
|
20
20
|
import "../types/bubble.js";
|
|
21
|
-
import { getContinuousColorScale as
|
|
22
|
-
import { getContinuousLegendTicks as
|
|
23
|
-
import { TextMeasurer as
|
|
24
|
-
import { createRoot as
|
|
25
|
-
import
|
|
21
|
+
import { getContinuousColorScale as lt } from "../utils/getContinuousColorScale.js";
|
|
22
|
+
import { getContinuousLegendTicks as nt } from "../utils/getContinuousLegendTicks.js";
|
|
23
|
+
import { TextMeasurer as ht } from "../utils/TextMeasurer.js";
|
|
24
|
+
import { createRoot as ct } from "../node_modules/react-dom/client.js";
|
|
25
|
+
import dt from "../node_modules/d3-zoom/src/zoom.js";
|
|
26
26
|
import "../node_modules/d3-zoom/src/transform.js";
|
|
27
|
-
import
|
|
27
|
+
import mt from "../node_modules/@d3fc/d3fc-chart/src/cartesian.js";
|
|
28
28
|
import "../node_modules/@d3fc/d3fc-webgl/src/scale/scaleMapper.js";
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import { arrangeLegendParts as
|
|
29
|
+
import pt from "../node_modules/@d3fc/d3fc-webgl/src/style/fillColor.js";
|
|
30
|
+
import gt from "../node_modules/@d3fc/d3fc-series/src/webgl/point.js";
|
|
31
|
+
import ut from "../node_modules/@d3fc/d3fc-series/src/svg/multi.js";
|
|
32
|
+
import ft from "../node_modules/@d3fc/d3fc-series/src/webgl/multi.js";
|
|
33
|
+
import yt from "../node_modules/@d3fc/d3fc-pointer/src/pointer.js";
|
|
34
|
+
import { arrangeLegendParts as St } from "../utils/arrangeLegendParts.js";
|
|
35
35
|
import C from "../node_modules/d3-scale/src/linear.js";
|
|
36
|
-
import
|
|
36
|
+
import B from "../node_modules/d3-scale/src/log.js";
|
|
37
37
|
import T from "../node_modules/d3-selection/src/select.js";
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import { sqrt as
|
|
41
|
-
import { rgb as
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
function
|
|
38
|
+
import vt from "../node_modules/d3-scale/src/ordinal.js";
|
|
39
|
+
import zt from "../node_modules/d3-scale/src/symlog.js";
|
|
40
|
+
import { sqrt as xt } from "../node_modules/d3-scale/src/pow.js";
|
|
41
|
+
import { rgb as D } from "../node_modules/d3-color/src/color.js";
|
|
42
|
+
import Lt from "../node_modules/d3-quadtree/src/quadtree.js";
|
|
43
|
+
import bt from "../node_modules/d3-polygon/src/contains.js";
|
|
44
|
+
function V(h) {
|
|
45
45
|
return h / 2.35 * (h / 2.35) * 64;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function G(h, t) {
|
|
48
48
|
return h + (1 - h) * (1 - t);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function F(h, t) {
|
|
51
51
|
return [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
G(h.r / 255, t),
|
|
53
|
+
G(h.g / 255, t),
|
|
54
|
+
G(h.b / 255, t),
|
|
55
55
|
1
|
|
56
56
|
];
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
return e.length === 0 ? !0 : e.some((i) => i.closed && i.points.length > 2 &&
|
|
58
|
+
function P(h, t, e) {
|
|
59
|
+
return e.length === 0 ? !0 : e.some((i) => i.closed && i.points.length > 2 && bt(i.points, [h, t]));
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function k(h, t) {
|
|
62
62
|
const e = t.find((c) => c.type === "dots"), i = t.find((c) => c.type === "curve");
|
|
63
63
|
return {
|
|
64
|
-
dotFill:
|
|
65
|
-
dotSize:
|
|
66
|
-
lineType:
|
|
64
|
+
dotFill: M(h, (e == null ? void 0 : e.aes.dotFill) ?? O.color, "dotFill"),
|
|
65
|
+
dotSize: M(h, (e == null ? void 0 : e.aes.dotSize) ?? O.size, "dotSize"),
|
|
66
|
+
lineType: M(h, (i == null ? void 0 : i.aes.lineShape) ?? "solid", "lineShape")
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
class
|
|
69
|
+
class de {
|
|
70
70
|
constructor() {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
l(this, "reactRoot", null);
|
|
72
|
+
l(this, "parentNode", null);
|
|
73
|
+
l(this, "rootNode", null);
|
|
74
|
+
l(this, "canvasNode", null);
|
|
75
|
+
l(this, "svgLayerElement", null);
|
|
76
|
+
l(this, "svgLayerComponent", /* @__PURE__ */ N.jsx(N.Fragment, {}));
|
|
77
|
+
l(this, "aesGetters", {
|
|
78
78
|
dotSize: () => 2,
|
|
79
|
-
dotFill: () =>
|
|
79
|
+
dotFill: () => E,
|
|
80
80
|
lineType: () => "solid"
|
|
81
81
|
});
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
top:
|
|
85
|
-
bottom:
|
|
86
|
-
left:
|
|
87
|
-
right:
|
|
82
|
+
l(this, "tools", null);
|
|
83
|
+
l(this, "margins", {
|
|
84
|
+
top: L,
|
|
85
|
+
bottom: L,
|
|
86
|
+
left: L,
|
|
87
|
+
right: L
|
|
88
88
|
});
|
|
89
|
-
|
|
90
|
-
chartWidth:
|
|
89
|
+
l(this, "chartSizes", {
|
|
90
|
+
chartWidth: H,
|
|
91
91
|
// width of single chart
|
|
92
|
-
chartHeight:
|
|
92
|
+
chartHeight: W,
|
|
93
93
|
// height of single chart
|
|
94
|
-
totalWidth:
|
|
94
|
+
totalWidth: H,
|
|
95
95
|
// width of all charts in charts row, plus left axis, plus legend
|
|
96
|
-
totalHeight:
|
|
96
|
+
totalHeight: W
|
|
97
97
|
// width of all charts in charts height, plus bottom axis, plus top title
|
|
98
98
|
});
|
|
99
|
-
|
|
100
|
-
x: C().domain([0, 10]).range([0,
|
|
101
|
-
y: C().domain([0, 10]).range([
|
|
102
|
-
xOriginal: C().domain([0, 10]).range([0,
|
|
103
|
-
yOriginal: C().domain([0, 10]).range([
|
|
99
|
+
l(this, "scales", {
|
|
100
|
+
x: C().domain([0, 10]).range([0, H]),
|
|
101
|
+
y: C().domain([0, 10]).range([W, 0]),
|
|
102
|
+
xOriginal: C().domain([0, 10]).range([0, H]),
|
|
103
|
+
yOriginal: C().domain([0, 10]).range([W, 0])
|
|
104
104
|
});
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
l(this, "polygons", []);
|
|
106
|
+
l(this, "onPolygonUpdateOutside", () => {
|
|
107
107
|
});
|
|
108
|
-
|
|
108
|
+
l(this, "onTooltipHintSwitch", () => {
|
|
109
109
|
});
|
|
110
|
-
|
|
110
|
+
l(this, "onLassoControlsStateUpdate", () => {
|
|
111
111
|
});
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
l(this, "zoomTransform", null);
|
|
113
|
+
l(this, "zoomStateKey", "");
|
|
114
|
+
l(this, "selectedDot", null);
|
|
115
|
+
l(this, "captionsSizes", {
|
|
116
116
|
xAxisCaptionsWidth: 30,
|
|
117
117
|
yAxisCaptionsWidth: 100
|
|
118
118
|
});
|
|
119
|
-
|
|
119
|
+
l(this, "mainTitle", []);
|
|
120
120
|
// can be multiline
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
121
|
+
l(this, "legend", { width: 0, height: 0, items: [] });
|
|
122
|
+
l(this, "notCalculatedProps", {});
|
|
123
|
+
l(this, "allDots", []);
|
|
124
|
+
l(this, "allPossibleLabels", []);
|
|
125
|
+
l(this, "visibleLabels", []);
|
|
126
|
+
l(this, "onPolygonUpdate", (t) => {
|
|
127
127
|
this.polygons = t, this.updateByLasso();
|
|
128
|
-
const e = this.allDots.filter((i) =>
|
|
128
|
+
const e = this.allDots.filter((i) => P(i.x, i.y, this.polygons)).map((i) => i.idx);
|
|
129
129
|
this.onPolygonUpdateOutside(e, t);
|
|
130
130
|
});
|
|
131
131
|
}
|
|
@@ -137,58 +137,58 @@ class me {
|
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
init(t) {
|
|
140
|
-
this.parentNode === null && (this.parentNode = t, this.rootNode = document.createElement("div"), this.canvasNode = document.createElement("div"), this.parentNode.appendChild(this.rootNode), this.parentNode.appendChild(this.canvasNode), this.reactRoot =
|
|
140
|
+
this.parentNode === null && (this.parentNode = t, this.rootNode = document.createElement("div"), this.canvasNode = document.createElement("div"), this.parentNode.appendChild(this.rootNode), this.parentNode.appendChild(this.canvasNode), this.reactRoot = ct(this.rootNode));
|
|
141
141
|
}
|
|
142
142
|
updateChartSizes(t) {
|
|
143
|
-
this.chartSizes.chartWidth = t.width, this.chartSizes.chartHeight = t.height;
|
|
143
|
+
(t.width !== this.chartSizes.chartWidth || t.height !== this.chartSizes.chartHeight) && (this.chartSizes.chartWidth = t.width, this.chartSizes.chartHeight = t.height, this.scales.x.range([0, this.chartSizes.chartWidth]), this.scales.y.range([this.chartSizes.chartHeight, 0]));
|
|
144
144
|
}
|
|
145
145
|
updateViewport(t, e, i) {
|
|
146
|
-
const c = t.scale === "log" ?
|
|
147
|
-
let { minX: n, minY: p, maxX:
|
|
148
|
-
if (t.lowerValue !== void 0 && (n = Math.max(n, t.lowerValue)), t.upperValue !== void 0 && (
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
const
|
|
152
|
-
n =
|
|
146
|
+
const c = t.scale === "log" ? B() : C();
|
|
147
|
+
let { minX: n, minY: p, maxX: m, maxY: f } = i;
|
|
148
|
+
if (t.lowerValue !== void 0 && (n = Math.max(n, t.lowerValue)), t.upperValue !== void 0 && (m = Math.min(m, t.upperValue)), e.lowerValue !== void 0 && (p = Math.max(p, e.lowerValue)), e.upperValue !== void 0 && (f = Math.min(f, e.upperValue)), t.symmetricRange !== void 0) {
|
|
149
|
+
const a = t.symmetricRange;
|
|
150
|
+
if (a >= n && a <= m) {
|
|
151
|
+
const y = Math.max(a - n, m - a);
|
|
152
|
+
n = a - y, m = a + y;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
if (typeof e.symmetricRange < "u") {
|
|
156
|
-
const
|
|
157
|
-
if (
|
|
158
|
-
const
|
|
159
|
-
p =
|
|
156
|
+
const a = e.symmetricRange;
|
|
157
|
+
if (a >= p && a <= f) {
|
|
158
|
+
const y = Math.max(a - p, f - a);
|
|
159
|
+
p = a - y, f = a + y;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
const v = [0, this.chartSizes.chartWidth], z = c.copy().domain([n,
|
|
162
|
+
const v = [0, this.chartSizes.chartWidth], z = c.copy().domain([n, m]).range([w.LEFT, this.chartSizes.chartWidth - w.RIGHT]);
|
|
163
163
|
c.domain([z.invert(0), z.invert(this.chartSizes.chartWidth)]).range(v).nice(), this.scales.x = c, this.scales.xOriginal = c.copy();
|
|
164
|
-
const
|
|
165
|
-
|
|
164
|
+
const d = e.scale === "log" ? B() : C(), r = [this.chartSizes.chartHeight, 0], u = d.copy().domain([p, f]).range([this.chartSizes.chartHeight - w.BOTTOM, w.TOP]);
|
|
165
|
+
d.domain([u.invert(this.chartSizes.chartHeight), u.invert(0)]).range(r).nice(), this.scales.y = d, this.scales.yOriginal = d.copy();
|
|
166
166
|
}
|
|
167
|
-
updateCaptionsSize(
|
|
168
|
-
const
|
|
169
|
-
function
|
|
170
|
-
return Math.max(...
|
|
167
|
+
updateCaptionsSize() {
|
|
168
|
+
const t = new ht("600 14px Arial");
|
|
169
|
+
function e(p) {
|
|
170
|
+
return Math.max(...p.map((m) => t.getTextWidth(m)));
|
|
171
171
|
}
|
|
172
|
-
const { ticks:
|
|
172
|
+
const { ticks: i, format: c } = at(this.scales.y, !1), n = e(i.map(c));
|
|
173
173
|
this.captionsSizes = {
|
|
174
174
|
xAxisCaptionsWidth: 20,
|
|
175
|
-
yAxisCaptionsWidth:
|
|
175
|
+
yAxisCaptionsWidth: n
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
178
|
createMainTitle(t) {
|
|
179
|
-
this.mainTitle =
|
|
179
|
+
this.mainTitle = st(
|
|
180
180
|
t.name,
|
|
181
181
|
this.chartSizes.totalWidth - this.margins.left - this.margins.right,
|
|
182
182
|
20
|
|
183
183
|
);
|
|
184
184
|
}
|
|
185
185
|
updateMargins() {
|
|
186
|
-
const t =
|
|
186
|
+
const t = Z * this.mainTitle.length, e = t > 0 ? t + et * 2 : 0;
|
|
187
187
|
this.margins = {
|
|
188
|
-
top: Math.max(e,
|
|
189
|
-
bottom:
|
|
190
|
-
left:
|
|
191
|
-
right: this.legend.width +
|
|
188
|
+
top: Math.max(e, L),
|
|
189
|
+
bottom: L + this.captionsSizes.xAxisCaptionsWidth + _,
|
|
190
|
+
left: L + this.captionsSizes.yAxisCaptionsWidth + _,
|
|
191
|
+
right: this.legend.width + L
|
|
192
192
|
}, this.chartSizes.totalWidth = this.margins.left + this.chartSizes.chartWidth + this.margins.right, this.chartSizes.totalHeight = this.margins.top + Math.max(this.chartSizes.chartHeight, this.legend.height) + this.margins.bottom, T(this.canvasNode).style("width", this.chartSizes.chartWidth + "px").style("height", this.chartSizes.chartHeight + "px").style("top", this.margins.top + "px").style("left", this.margins.left + "px");
|
|
193
193
|
}
|
|
194
194
|
updateLegendSize(t, e, i, c) {
|
|
@@ -197,131 +197,129 @@ class me {
|
|
|
197
197
|
return;
|
|
198
198
|
}
|
|
199
199
|
const n = [], p = { width: 0, height: 0, left: 0, top: 0 };
|
|
200
|
-
if (i.forEach((
|
|
201
|
-
const r = e[
|
|
200
|
+
if (i.forEach((d) => {
|
|
201
|
+
const r = e[d.value];
|
|
202
202
|
if (r.usedAes.length === 0 || !r.aesMap)
|
|
203
203
|
return;
|
|
204
|
-
if (r.values.length >
|
|
204
|
+
if (r.values.length > tt) {
|
|
205
205
|
console.warn(`Too many values for discrete legend (${r.values.length})`);
|
|
206
206
|
return;
|
|
207
207
|
}
|
|
208
|
-
const
|
|
209
|
-
r.values.forEach((
|
|
210
|
-
|
|
211
|
-
var
|
|
212
|
-
S === "dotFill" && (
|
|
208
|
+
const u = {};
|
|
209
|
+
r.values.forEach((g) => {
|
|
210
|
+
u[g] || (u[g] = { ...O }), r.usedAes.forEach((S) => {
|
|
211
|
+
var s, o;
|
|
212
|
+
S === "dotFill" && (u[g].color = ((s = r.aesMap[g]) == null ? void 0 : s[S]) ?? E), S === "dotSize" && (u[g].size = ((o = r.aesMap[g]) == null ? void 0 : o[S]) ?? 3);
|
|
213
213
|
});
|
|
214
214
|
});
|
|
215
|
-
const
|
|
216
|
-
n.push({ ...p, id:
|
|
217
|
-
}), c.forEach((
|
|
218
|
-
if (
|
|
219
|
-
const { domain: r, range:
|
|
220
|
-
n.push({ ...p, id: "dotFill", type: "continuous", title:
|
|
215
|
+
const a = d.label ?? d.value, y = vt().domain(r.values).range(r.values.map((g) => u[g]));
|
|
216
|
+
n.push({ ...p, id: d.value, type: "dots", title: a, scale: y, values: r.values, labels: r.labels });
|
|
217
|
+
}), c.forEach((d) => {
|
|
218
|
+
if (d.type === "dots" && U(d.aes.dotFill)) {
|
|
219
|
+
const { domain: r, range: u, columnName: a, type: y = "linear" } = d.aes.dotFill, g = a.label ?? a.value, S = lt(u, r, "linear"), s = (y === "log" ? zt() : C()).domain(r).range([this.chartSizes.chartHeight, 0]), o = nt(s, r);
|
|
220
|
+
n.push({ ...p, id: "dotFill", type: "continuous", title: g, scale: S, tickPositionScale: s, values: o });
|
|
221
221
|
}
|
|
222
|
-
if (
|
|
223
|
-
const { columnName: r, domain:
|
|
224
|
-
n.push({ ...p, id: r.value, type: "size", title:
|
|
222
|
+
if (d.type === "dots" && U(d.aes.dotSize)) {
|
|
223
|
+
const { columnName: r, domain: u, range: a } = d.aes.dotSize, y = r.label ?? r.value, g = xt(u, a), S = g.ticks(3), s = g.tickFormat(3), o = S.reduce((x, b) => (x[String(b)] = s(b), x), {});
|
|
224
|
+
n.push({ ...p, id: r.value, type: "size", title: y, scale: g, values: S, labels: o });
|
|
225
225
|
}
|
|
226
226
|
}), !n.length) {
|
|
227
227
|
this.legend = { width: 0, height: 0, items: [] };
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
230
|
-
const
|
|
230
|
+
const m = St(n, this.chartSizes.chartHeight), f = m[m.length - 1], v = f.left + f.width + ot, z = this.chartSizes.chartHeight;
|
|
231
231
|
this.legend = {
|
|
232
232
|
width: v,
|
|
233
233
|
height: z,
|
|
234
|
-
items:
|
|
234
|
+
items: m
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
initSettings(t, e, i, c, n, p
|
|
238
|
-
const { xAxis:
|
|
239
|
-
this.updateChartSizes(
|
|
240
|
-
const
|
|
241
|
-
const o =
|
|
242
|
-
return
|
|
243
|
-
}),
|
|
237
|
+
initSettings(t, e, i, c, n, p) {
|
|
238
|
+
const { xAxis: m, yAxis: f, size: v, title: z, legend: d } = e;
|
|
239
|
+
this.updateChartSizes(v), this.updateViewport(m, f, i), this.updateCaptionsSize(), this.updateLegendSize(d, c, p, n), this.createMainTitle(z), this.updateMargins(), this.aesGetters = k(c, n);
|
|
240
|
+
const r = pt().data(t).value((s) => {
|
|
241
|
+
const o = D(this.aesGetters.dotFill(s.data)), x = !s.dimmed && P(s.x, s.y, this.polygons) ? 1 : 0.4;
|
|
242
|
+
return F(o, x);
|
|
243
|
+
}), u = gt().equals((s, o) => s === o).size((s) => V(this.aesGetters.dotSize(s.data))).crossValue((s) => s.x).mainValue((s) => s.y).decorate((s) => r(s)), a = dt().scaleExtent([0.1, 1e3]).filter((s) => s.type === "wheel" || s.metaKey || s.ctrlKey).on("start", () => {
|
|
244
244
|
this.selectedDot = null;
|
|
245
245
|
}).on("zoom", (s) => {
|
|
246
|
-
const o = s.transform,
|
|
247
|
-
this.scales.x.domain(
|
|
246
|
+
const o = s.transform, x = o.rescaleX(this.scales.xOriginal), b = o.rescaleY(this.scales.yOriginal);
|
|
247
|
+
this.scales.x.domain(x.domain()), this.scales.y.domain(b.domain()), this.zoomTransform = o, this.zoomStateKey = `${o.x}_${o.y}_${o.k}`, this.renderSvgLayer(), this.renderWebglLayer();
|
|
248
248
|
}).on("end", () => {
|
|
249
249
|
this.allPossibleLabels.forEach((s) => {
|
|
250
250
|
s.x = this.scales.x(s.dot.x), s.y = this.scales.y(s.dot.y);
|
|
251
|
-
}), this.visibleLabels =
|
|
252
|
-
}),
|
|
253
|
-
var
|
|
251
|
+
}), this.visibleLabels = I(this.allPossibleLabels, this.chartSizes.chartWidth, this.chartSizes.chartHeight), this.renderSvgLayer();
|
|
252
|
+
}), y = this.createQuadtree(t), g = yt().on("point", ([s]) => {
|
|
253
|
+
var b, A, R;
|
|
254
254
|
let o;
|
|
255
255
|
if (s) {
|
|
256
|
-
const
|
|
257
|
-
o = (
|
|
256
|
+
const K = this.scales.x.invert(s.x), q = this.scales.y.invert(s.y), X = this.scales.xOriginal(K), Y = this.scales.yOriginal(q), j = 20 / (((b = this.zoomTransform) == null ? void 0 : b.k) || 1);
|
|
257
|
+
o = (A = this.tools) == null ? void 0 : A.qt.find(X, Y, j);
|
|
258
258
|
}
|
|
259
|
-
const
|
|
260
|
-
this.selectedDot = o ?? null,
|
|
261
|
-
}),
|
|
259
|
+
const x = this.selectedDot && !o || !this.selectedDot && o || ((R = this.selectedDot) == null ? void 0 : R.id) !== (o == null ? void 0 : o.id);
|
|
260
|
+
this.selectedDot = o ?? null, x && this.renderSvgLayer();
|
|
261
|
+
}), S = mt({
|
|
262
262
|
xScale: this.scales.x,
|
|
263
263
|
yScale: this.scales.y
|
|
264
|
-
}).xAxisHeight(() => "0").yAxisWidth(() => "0").svgPlotArea(
|
|
264
|
+
}).xAxisHeight(() => "0").yAxisWidth(() => "0").svgPlotArea(ut()).webglPlotArea(
|
|
265
265
|
// only render the point series on the WebGL layer
|
|
266
|
-
|
|
266
|
+
ft().series([u]).mapping((s) => s)
|
|
267
267
|
).decorate((s) => {
|
|
268
268
|
const o = s.enter();
|
|
269
|
-
o && !this.svgLayerElement && (o.style("grid-template-columns", "0 auto 1fr auto 0"), o.style("grid-template-rows", "0 auto 1fr auto 0"), this.svgLayerElement = o.select(".svg-plot-area.plot-area svg").node()), o.select(".svg-plot-area.plot-area").attr("class", "svg-plot-area plot-area miplots-scatterplot-plot-area").call(
|
|
269
|
+
o && !this.svgLayerElement && (o.style("grid-template-columns", "0 auto 1fr auto 0"), o.style("grid-template-rows", "0 auto 1fr auto 0"), this.svgLayerElement = o.select(".svg-plot-area.plot-area svg").node()), o.select(".svg-plot-area.plot-area").attr("class", "svg-plot-area plot-area miplots-scatterplot-plot-area").call(a).call(g);
|
|
270
270
|
});
|
|
271
271
|
this.tools = {
|
|
272
|
-
webglChart:
|
|
273
|
-
zoom:
|
|
274
|
-
qt:
|
|
275
|
-
fillColor:
|
|
276
|
-
pointSeries:
|
|
272
|
+
webglChart: S,
|
|
273
|
+
zoom: a,
|
|
274
|
+
qt: y,
|
|
275
|
+
fillColor: r,
|
|
276
|
+
pointSeries: u
|
|
277
277
|
}, T(this.canvasNode).datum(t).style("position", "absolute").style("width", this.chartSizes.chartWidth + "px").style("height", this.chartSizes.chartHeight + "px").style("top", this.margins.top + "px").style("left", this.margins.left + "px");
|
|
278
278
|
}
|
|
279
279
|
updateAes(t, e) {
|
|
280
|
-
this.tools !== null && (this.aesGetters =
|
|
281
|
-
const c = this.aesGetters.dotFill ?? (() =>
|
|
282
|
-
return
|
|
280
|
+
this.tools !== null && (this.aesGetters = k(t, e), this.tools.fillColor.value((i) => {
|
|
281
|
+
const c = this.aesGetters.dotFill ?? (() => E), n = D(c(i.data)), p = !i.dimmed && P(i.x, i.y, this.polygons) ? 1 : 0.4;
|
|
282
|
+
return F(n, p);
|
|
283
283
|
}));
|
|
284
284
|
}
|
|
285
285
|
updatePointSize() {
|
|
286
|
-
this.tools !== null && (T(this.canvasNode).datum([...this.allDots]), this.tools.pointSeries.size((t) =>
|
|
286
|
+
this.tools !== null && (T(this.canvasNode).datum([...this.allDots]), this.tools.pointSeries.size((t) => V(this.aesGetters.dotSize(t.data))));
|
|
287
287
|
}
|
|
288
288
|
updateByLasso() {
|
|
289
289
|
var t;
|
|
290
290
|
this.tools !== null && ((t = this.tools) == null || t.fillColor.value((e) => {
|
|
291
|
-
const i = this.aesGetters.dotFill ?? (() =>
|
|
292
|
-
return
|
|
291
|
+
const i = this.aesGetters.dotFill ?? (() => E), c = D(i(e.data)), n = !e.dimmed && P(e.x, e.y, this.polygons) ? 1 : 0.4;
|
|
292
|
+
return F(c, n);
|
|
293
293
|
}), this.renderWebglLayer());
|
|
294
294
|
}
|
|
295
295
|
createQuadtree(t) {
|
|
296
|
-
return
|
|
296
|
+
return Lt().x((e) => this.scales.xOriginal(e.x)).y((e) => this.scales.yOriginal(e.y)).addAll(t);
|
|
297
297
|
}
|
|
298
298
|
updateData(t) {
|
|
299
299
|
this.tools !== null && (T(this.canvasNode).datum(t), this.tools.fillColor.data(t), this.tools.qt = this.createQuadtree(t));
|
|
300
300
|
}
|
|
301
|
-
render(t, e, i, c, n, p,
|
|
301
|
+
render(t, e, i, c, n, p, m, f, v, z, d, r, u) {
|
|
302
302
|
if (this.tools === null)
|
|
303
303
|
this.initSettings(
|
|
304
|
-
n,
|
|
305
|
-
e,
|
|
306
|
-
p,
|
|
307
304
|
c,
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
305
|
+
e,
|
|
306
|
+
n,
|
|
307
|
+
f,
|
|
308
|
+
m,
|
|
309
|
+
v
|
|
310
|
+
), this.onPolygonUpdateOutside = d, this.onTooltipHintSwitch = r, this.onLassoControlsStateUpdate = u;
|
|
312
311
|
else {
|
|
313
|
-
const { title:
|
|
314
|
-
this.updateLegendSize(
|
|
312
|
+
const { title: a, legend: y, size: g } = e;
|
|
313
|
+
this.updateChartSizes(g), this.updateLegendSize(y, f, v, m), this.createMainTitle(a), this.updateMargins(), this.updateAes(f, m);
|
|
315
314
|
}
|
|
316
|
-
this.allDots =
|
|
317
|
-
|
|
318
|
-
}), this.visibleLabels =
|
|
315
|
+
this.allDots = c, this.allPossibleLabels = z, this.allPossibleLabels.forEach((a) => {
|
|
316
|
+
a.x = this.scales.x(a.dot.x), a.y = this.scales.y(a.dot.y);
|
|
317
|
+
}), this.visibleLabels = I(this.allPossibleLabels, this.chartSizes.chartWidth, this.chartSizes.chartHeight), this.notCalculatedProps = {
|
|
319
318
|
settingsId: t,
|
|
320
319
|
chartSettings: e,
|
|
321
|
-
onlyPositive: c,
|
|
322
320
|
keyColumn: i,
|
|
323
|
-
dotsByGrouping:
|
|
324
|
-
layers:
|
|
321
|
+
dotsByGrouping: p,
|
|
322
|
+
layers: m
|
|
325
323
|
}, this.renderWebglLayer(), this.renderSvgLayer();
|
|
326
324
|
}
|
|
327
325
|
renderWebglLayer() {
|
|
@@ -332,11 +330,10 @@ class me {
|
|
|
332
330
|
var e;
|
|
333
331
|
this.visibleLabels.forEach((i) => {
|
|
334
332
|
i.x = this.scales.x(i.dot.x), i.y = this.scales.y(i.dot.y);
|
|
335
|
-
}),
|
|
333
|
+
}), rt(this.visibleLabels);
|
|
336
334
|
const t = {
|
|
337
335
|
settingsId: this.notCalculatedProps.settingsId,
|
|
338
336
|
chartSettings: this.notCalculatedProps.chartSettings,
|
|
339
|
-
onlyPositive: this.notCalculatedProps.onlyPositive,
|
|
340
337
|
keyColumn: this.notCalculatedProps.keyColumn,
|
|
341
338
|
dotsByGrouping: this.notCalculatedProps.dotsByGrouping,
|
|
342
339
|
layers: this.notCalculatedProps.layers,
|
|
@@ -356,14 +353,14 @@ class me {
|
|
|
356
353
|
onTooltipHintSwitch: this.onTooltipHintSwitch,
|
|
357
354
|
onLassoControlsStateUpdate: this.onLassoControlsStateUpdate
|
|
358
355
|
};
|
|
359
|
-
this.svgLayerComponent = /* @__PURE__ */
|
|
356
|
+
this.svgLayerComponent = /* @__PURE__ */ N.jsx(it, { ...t }), (e = this.reactRoot) == null || e.render(this.svgLayerComponent);
|
|
360
357
|
}
|
|
361
358
|
renderError(t) {
|
|
362
359
|
var e;
|
|
363
|
-
(e = this.reactRoot) == null || e.render(/* @__PURE__ */
|
|
360
|
+
(e = this.reactRoot) == null || e.render(/* @__PURE__ */ N.jsx(J, { message: t }));
|
|
364
361
|
}
|
|
365
362
|
}
|
|
366
363
|
export {
|
|
367
|
-
|
|
364
|
+
de as default
|
|
368
365
|
};
|
|
369
366
|
//# sourceMappingURL=ChartRenderer.js.map
|