@milaboratories/miplots4 1.0.170 → 1.0.172
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/README.md +11 -6
- package/dist/_virtual/client.js +1 -1
- package/dist/_virtual/client2.js +2 -2
- package/dist/_virtual/index.js +1 -1
- package/dist/_virtual/index2.js +1 -1
- package/dist/_virtual/jsx-runtime.js +1 -1
- package/dist/_virtual/react-dom-client.development.js +5 -0
- package/dist/_virtual/react-dom-client.development.js.map +1 -0
- package/dist/_virtual/react-dom-client.production.js +5 -0
- package/dist/_virtual/react-dom-client.production.js.map +1 -0
- package/dist/_virtual/{react-dom-server-legacy.browser.production.min.js → react-dom-server-legacy.browser.production.js} +1 -1
- package/dist/_virtual/react-dom-server-legacy.browser.production.js.map +1 -0
- package/dist/_virtual/react-dom-server.browser.production.js +5 -0
- package/dist/_virtual/react-dom-server.browser.production.js.map +1 -0
- package/dist/_virtual/react-dom.production.js +5 -0
- package/dist/_virtual/react-dom.production.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.production.js +5 -0
- package/dist/_virtual/react-jsx-runtime.production.js.map +1 -0
- package/dist/_virtual/react.production.js +5 -0
- package/dist/_virtual/react.production.js.map +1 -0
- package/dist/_virtual/scheduler.production.js +5 -0
- package/dist/_virtual/scheduler.production.js.map +1 -0
- package/dist/_virtual/server.browser.js +1 -1
- package/dist/bubble/ChartRenderer.js +143 -146
- package/dist/bubble/ChartRenderer.js.map +1 -1
- package/dist/bubble/index.js.map +1 -1
- package/dist/common/ErrorBoundary.d.ts +1 -1
- package/dist/dendro/ChartRenderer.js +175 -174
- package/dist/dendro/ChartRenderer.js.map +1 -1
- package/dist/dendro/index.js.map +1 -1
- package/dist/discrete/index.js.map +1 -1
- package/dist/heatmap/index.js.map +1 -1
- package/dist/histogram/index.js.map +1 -1
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.development.js +17062 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.development.js.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.production.js +9790 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.production.js.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +6245 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +4106 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.browser.development.js +6763 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.browser.development.js.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.browser.production.js +4655 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.browser.production.js.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom.development.js +228 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom.development.js.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom.production.js +148 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom.production.js.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js +24 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js.map +1 -0
- package/dist/node_modules/.pnpm/{react-dom@18.3.1_react@18.3.1 → react-dom@19.2.4_react@19.2.4}/node_modules/react-dom/index.js +1 -1
- package/dist/node_modules/.pnpm/{react-dom@18.3.1_react@18.3.1 → react-dom@19.2.4_react@19.2.4}/node_modules/react-dom/index.js.map +1 -1
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/server.browser.js +16 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/server.browser.js.map +1 -0
- package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.development.js +246 -0
- package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -0
- package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.production.js +36 -0
- package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.production.js.map +1 -0
- package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.development.js +865 -0
- package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.development.js.map +1 -0
- package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.production.js +373 -0
- package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.production.js.map +1 -0
- package/dist/node_modules/.pnpm/{react@18.3.1 → react@19.2.4}/node_modules/react/index.js +1 -1
- package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/index.js.map +1 -0
- package/dist/node_modules/.pnpm/{react@18.3.1 → react@19.2.4}/node_modules/react/jsx-runtime.js +3 -3
- package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js.map +1 -0
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.development.js +237 -0
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.development.js.map +1 -0
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.production.js +234 -0
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.production.js.map +1 -0
- package/dist/node_modules/.pnpm/{scheduler@0.23.2 → scheduler@0.27.0}/node_modules/scheduler/index.js +1 -1
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/index.js.map +1 -0
- package/dist/scatterplot/ChartRenderer.js +149 -152
- package/dist/scatterplot/ChartRenderer.js.map +1 -1
- package/dist/scatterplot/index.js.map +1 -1
- package/dist/scatterplot-umap/ChartRenderer.js +152 -155
- package/dist/scatterplot-umap/ChartRenderer.js.map +1 -1
- package/dist/utils/arrangeLegendParts.js +35 -35
- package/dist/utils/arrangeLegendParts.js.map +1 -1
- package/dist/utils/getContinuousLegendTicks.js +5 -8
- package/dist/utils/getContinuousLegendTicks.js.map +1 -1
- package/dist/utils/getSizeLegendItem.d.ts +3 -0
- package/dist/utils/getSizeLegendItem.js +15 -0
- package/dist/utils/getSizeLegendItem.js.map +1 -0
- package/dist/utils/numberFormat.d.ts +1 -0
- package/dist/utils/numberFormat.js +9 -4
- package/dist/utils/numberFormat.js.map +1 -1
- package/package.json +7 -5
- package/dist/_virtual/react-dom-server-legacy.browser.production.min.js.map +0 -1
- package/dist/_virtual/react-dom-server.browser.production.min.js +0 -5
- package/dist/_virtual/react-dom-server.browser.production.min.js.map +0 -1
- package/dist/_virtual/react-dom.production.min.js +0 -5
- package/dist/_virtual/react-dom.production.min.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.production.min.js +0 -5
- package/dist/_virtual/react-jsx-runtime.production.min.js.map +0 -1
- package/dist/_virtual/react.production.min.js +0 -5
- package/dist/_virtual/react.production.min.js.map +0 -1
- package/dist/_virtual/scheduler.production.min.js +0 -5
- package/dist/_virtual/scheduler.production.min.js.map +0 -1
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +0 -3622
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js.map +0 -1
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +0 -1235
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js.map +0 -1
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server.browser.development.js +0 -3601
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server.browser.development.js.map +0 -1
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js +0 -1256
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js.map +0 -1
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.development.js +0 -13457
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.development.js.map +0 -1
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js +0 -5177
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js.map +0 -1
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/client.js +0 -33
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/client.js.map +0 -1
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/server.browser.js +0 -16
- package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/server.browser.js.map +0 -1
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js +0 -605
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js.map +0 -1
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -29
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js.map +0 -1
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js +0 -1274
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js.map +0 -1
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js +0 -209
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js.map +0 -1
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/index.js.map +0 -1
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js.map +0 -1
- package/dist/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.development.js +0 -278
- package/dist/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.development.js.map +0 -1
- package/dist/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js +0 -214
- package/dist/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js.map +0 -1
- package/dist/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -4,14 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
### Install ###
|
|
6
6
|
|
|
7
|
-
`
|
|
7
|
+
`pnpm install`
|
|
8
8
|
|
|
9
9
|
### Build and install locally ###
|
|
10
10
|
|
|
11
|
-
`
|
|
11
|
+
`pnpm run build && pnpm do-pack`
|
|
12
12
|
|
|
13
|
-
This command will generate a .tgz file at the directory's root
|
|
13
|
+
This command will generate a .tgz file at the directory's root: ./package.tgz
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
It can be installed in another project using 'overrides' in package.json:
|
|
16
|
+
```
|
|
17
|
+
"pnpm": {
|
|
18
|
+
"overrides": {
|
|
19
|
+
"@milaboratories/miplots4": "/path/to/folder/visualizations/packages/miplots4/package.tgz"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
```
|
package/dist/_virtual/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __require as r } from "../node_modules/.pnpm/react-dom@
|
|
1
|
+
import { __require as r } from "../node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js";
|
|
2
2
|
var i = r();
|
|
3
3
|
export {
|
|
4
4
|
i as c
|
package/dist/_virtual/client2.js
CHANGED
package/dist/_virtual/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as t } from "../node_modules/.pnpm/react@
|
|
2
|
+
import { __require as t } from "../node_modules/.pnpm/react@19.2.4/node_modules/react/index.js";
|
|
3
3
|
var e = t();
|
|
4
4
|
const s = /* @__PURE__ */ r(e);
|
|
5
5
|
export {
|
package/dist/_virtual/index2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __require as r } from "../node_modules/.pnpm/react-dom@
|
|
1
|
+
import { __require as r } from "../node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/index.js";
|
|
2
2
|
var o = r();
|
|
3
3
|
export {
|
|
4
4
|
o as r
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-dom-client.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-dom-client.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-dom-server-legacy.browser.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-dom-server.browser.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-dom.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-jsx-runtime.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __require as r } from "../node_modules/.pnpm/react-dom@
|
|
1
|
+
import { __require as r } from "../node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/server.browser.js";
|
|
2
2
|
var s = r();
|
|
3
3
|
export {
|
|
4
4
|
s
|
|
@@ -1,89 +1,90 @@
|
|
|
1
1
|
var W = Object.defineProperty;
|
|
2
2
|
var K = (c, t, e) => t in c ? W(c, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[t] = e;
|
|
3
|
-
var
|
|
3
|
+
var d = (c, t, e) => K(c, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import { j as N } from "../_virtual/jsx-runtime.js";
|
|
5
5
|
import { c as P } from "../_virtual/client.js";
|
|
6
6
|
import { Error as v } from "../common/Error.js";
|
|
7
|
-
import { DataFrameProvider as
|
|
8
|
-
import { DEFAULT_HEIGHT as H, DEFAULT_WIDTH as
|
|
7
|
+
import { DataFrameProvider as j } from "../common/useDataFrame.js";
|
|
8
|
+
import { DEFAULT_HEIGHT as H, DEFAULT_WIDTH as w, TITLE_LINE_HEIGHT as B, TITLE_MARGIN as F, MIN_LEGEND_GRADIENT_HEIGHT as k, MAX_LEGEND_GRADIENT_HEIGHT as V } from "../constants.js";
|
|
9
9
|
import { arrangeLegendParts as X } from "../utils/arrangeLegendParts.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
10
|
+
import { getSizeLegendItem as U } from "../utils/getSizeLegendItem.js";
|
|
11
|
+
import { getChartEdgeSides as Y } from "../utils/getChartEdgeSides.js";
|
|
12
|
+
import { getContinuousLegendTicks as q } from "../utils/getContinuousLegendTicks.js";
|
|
13
|
+
import { TextMeasurer as J } from "../utils/TextMeasurer/TextMeasurer.js";
|
|
14
|
+
import { ChartsGroup as O } from "./components/ChartsGroup.js";
|
|
15
|
+
import { MIN_MARGIN as T, TITLE_LINE as G, LEGEND_OFFSET as Q, CHART_SIDE_ELEMENTS as Z, MIN_PADDING as $ } from "./constants.js";
|
|
16
|
+
import { calculateChartSideElementSizes as tt } from "./utils/calculateChartSideElementSizes.js";
|
|
17
|
+
import { calculateSideElementsBBoxes as et } from "./utils/calculateSideElementsBBoxes.js";
|
|
18
|
+
import { calculateCaptionTails as st } from "./utils/calculateCaptionTails.js";
|
|
18
19
|
import M from "../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/ordinal.js";
|
|
19
|
-
import
|
|
20
|
-
import { sqrt as
|
|
21
|
-
const
|
|
22
|
-
const e = Math.min(...t),
|
|
23
|
-
if (e ===
|
|
24
|
-
const
|
|
25
|
-
for (let
|
|
26
|
-
|
|
27
|
-
return
|
|
20
|
+
import I from "../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/linear.js";
|
|
21
|
+
import { sqrt as b } from "../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/pow.js";
|
|
22
|
+
const it = (c, t) => {
|
|
23
|
+
const e = Math.min(...t), i = Math.max(...t);
|
|
24
|
+
if (e === i) {
|
|
25
|
+
const a = c % 2 === 0 ? [] : [e];
|
|
26
|
+
for (let p = 1; p < c / 2 + 1; p++)
|
|
27
|
+
a.push(e + p), a.unshift(e - p);
|
|
28
|
+
return a;
|
|
28
29
|
}
|
|
29
30
|
if (c < 2)
|
|
30
|
-
return [e,
|
|
31
|
-
const
|
|
32
|
-
for (let
|
|
33
|
-
|
|
34
|
-
return
|
|
31
|
+
return [e, i];
|
|
32
|
+
const r = (i - e) / (c - 1), s = [];
|
|
33
|
+
for (let a = 0; a < c - 1; a++)
|
|
34
|
+
s.push(e + r * a);
|
|
35
|
+
return s.push(i), s;
|
|
35
36
|
};
|
|
36
|
-
function
|
|
37
|
-
let
|
|
38
|
-
return c && (c.colorRange && (
|
|
37
|
+
function ot(c, t, e) {
|
|
38
|
+
let i = e;
|
|
39
|
+
return c && (c.colorRange && (i = c.colorRange), c.method === "standardScaling" && (i = [-2, 2]), c.method === "meanNormalization" && (i = [-0.75, 0.75])), it(t, i);
|
|
39
40
|
}
|
|
40
|
-
class
|
|
41
|
+
class Lt {
|
|
41
42
|
constructor() {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
chartWidth:
|
|
43
|
+
d(this, "reactRoot", null);
|
|
44
|
+
d(this, "parentNode", null);
|
|
45
|
+
d(this, "rootNode", null);
|
|
46
|
+
d(this, "component", /* @__PURE__ */ N.jsx(N.Fragment, {}));
|
|
47
|
+
d(this, "chartsDimensions", {});
|
|
48
|
+
d(this, "chartSizes", {
|
|
49
|
+
chartWidth: w,
|
|
49
50
|
// width of single chart
|
|
50
51
|
chartHeight: H,
|
|
51
52
|
// height of single chart
|
|
52
|
-
chartsWidth:
|
|
53
|
+
chartsWidth: w,
|
|
53
54
|
// width of all charts in charts row
|
|
54
55
|
chartsHeight: H,
|
|
55
56
|
// width of all charts in charts column, without axes
|
|
56
|
-
totalWidth:
|
|
57
|
+
totalWidth: w,
|
|
57
58
|
// width of all charts in charts row, plus left axis, plus legend
|
|
58
59
|
totalHeight: H
|
|
59
60
|
// width of all charts in charts height, plus bottom axis, plus top title
|
|
60
61
|
});
|
|
61
|
-
|
|
62
|
-
top:
|
|
63
|
-
bottom:
|
|
64
|
-
left:
|
|
65
|
-
right:
|
|
62
|
+
d(this, "margins", {
|
|
63
|
+
top: T,
|
|
64
|
+
bottom: T,
|
|
65
|
+
left: T,
|
|
66
|
+
right: T
|
|
66
67
|
});
|
|
67
|
-
|
|
68
|
+
d(this, "captionsSizes", {
|
|
68
69
|
xAxisCaptions: 100,
|
|
69
70
|
yAxisCaptions: 100,
|
|
70
71
|
xCaptionTail: 0,
|
|
71
72
|
yCaptionTail: 0
|
|
72
73
|
});
|
|
73
|
-
|
|
74
|
+
d(this, "labelAngles", {
|
|
74
75
|
xAxisLabels: 0,
|
|
75
76
|
yAxisLabels: 0
|
|
76
77
|
});
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
d(this, "columnsCount", 1);
|
|
79
|
+
d(this, "rowsCount", 1);
|
|
80
|
+
d(this, "scales", {
|
|
80
81
|
x: M().domain(["null"]).range([1]),
|
|
81
82
|
y: M().domain(["null"]).range([1])
|
|
82
83
|
});
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
d(this, "step", { x: 10, y: 10 });
|
|
85
|
+
d(this, "colorScale", I().domain([0, 1]).range(["white", "black"]));
|
|
86
|
+
d(this, "sizeScale", b().domain([0, 1]).range([3, 20]));
|
|
87
|
+
d(this, "legend", {
|
|
87
88
|
width: 0,
|
|
88
89
|
height: 0,
|
|
89
90
|
items: []
|
|
@@ -101,170 +102,166 @@ class At {
|
|
|
101
102
|
}
|
|
102
103
|
updateMargins(t) {
|
|
103
104
|
this.margins = {
|
|
104
|
-
top: t.show ?
|
|
105
|
-
bottom:
|
|
106
|
-
left:
|
|
105
|
+
top: t.show ? B + F * 2 : T,
|
|
106
|
+
bottom: T,
|
|
107
|
+
left: T,
|
|
107
108
|
right: this.legend.width
|
|
108
109
|
}, this.chartSizes.totalWidth = this.margins.left + this.chartSizes.chartsWidth + this.margins.right, this.chartSizes.totalHeight = this.margins.top + Math.max(this.chartSizes.chartsHeight, this.legend.height) + this.margins.bottom;
|
|
109
110
|
}
|
|
110
|
-
updateLegendSize(t, e,
|
|
111
|
+
updateLegendSize(t, e, i, r) {
|
|
111
112
|
if (!t.show) {
|
|
112
113
|
this.legend = { width: 0, height: 0, items: [] };
|
|
113
114
|
return;
|
|
114
115
|
}
|
|
115
|
-
const
|
|
116
|
-
Math.max(this.chartSizes.chartHeight,
|
|
116
|
+
const s = [], a = Math.min(
|
|
117
|
+
Math.max(this.chartSizes.chartHeight, k),
|
|
117
118
|
V
|
|
118
|
-
),
|
|
119
|
+
), p = Math.max(this.chartSizes.chartHeight, a), S = { width: 0, height: 0, left: 0, top: 0 }, h = this.colorScale.domain(), u = q(this.colorScale, [
|
|
119
120
|
h[0],
|
|
120
121
|
h[h.length - 1]
|
|
121
|
-
]),
|
|
122
|
-
|
|
122
|
+
]), A = e.label ?? e.value, x = I([u[0], u[u.length - 1]], [a, 0]);
|
|
123
|
+
s.push({
|
|
123
124
|
id: "colorValue",
|
|
124
125
|
type: "continuous",
|
|
125
126
|
scale: this.colorScale,
|
|
126
|
-
tickPositionScale:
|
|
127
|
-
values:
|
|
128
|
-
title:
|
|
129
|
-
...
|
|
127
|
+
tickPositionScale: x,
|
|
128
|
+
values: u,
|
|
129
|
+
title: A,
|
|
130
|
+
...S
|
|
130
131
|
});
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
values: A,
|
|
138
|
-
labels: m,
|
|
139
|
-
...x
|
|
140
|
-
}), !i.length) {
|
|
132
|
+
const m = U({
|
|
133
|
+
columnName: i,
|
|
134
|
+
domain: this.sizeScale.domain(),
|
|
135
|
+
range: this.sizeScale.range()
|
|
136
|
+
});
|
|
137
|
+
if (s.push({ ...m, id: "sizeValue" }), !s.length) {
|
|
141
138
|
this.legend = { width: 0, height: 0, items: [] };
|
|
142
139
|
return;
|
|
143
140
|
}
|
|
144
|
-
const
|
|
141
|
+
const E = X(s, p, a), l = E.reduce((L, C) => Math.max(L, C.left + C.width), 0) + 2 * Q, y = this.chartsDimensions[r[0]].padding;
|
|
145
142
|
this.legend = {
|
|
146
|
-
width:
|
|
147
|
-
height:
|
|
148
|
-
items:
|
|
143
|
+
width: l,
|
|
144
|
+
height: p + y.top,
|
|
145
|
+
items: E
|
|
149
146
|
};
|
|
150
147
|
}
|
|
151
|
-
updateCaptionsSize(t, e,
|
|
152
|
-
const
|
|
148
|
+
updateCaptionsSize(t, e, i) {
|
|
149
|
+
const r = new J("bold 14px Arial"), { xKeys: s, yKeys: a, xLabels: p, yLabels: S } = t.meta;
|
|
153
150
|
this.labelAngles = {
|
|
154
151
|
xAxisLabels: e.axisLabelsAngle,
|
|
155
|
-
yAxisLabels:
|
|
152
|
+
yAxisLabels: i.axisLabelsAngle
|
|
156
153
|
};
|
|
157
|
-
let h = 0,
|
|
158
|
-
for (const f of
|
|
159
|
-
const
|
|
160
|
-
|
|
154
|
+
let h = 0, u = 0;
|
|
155
|
+
for (const f of s) {
|
|
156
|
+
const l = r.getTextWidth(p[f]);
|
|
157
|
+
l > h && (h = l);
|
|
161
158
|
}
|
|
162
|
-
for (const f of
|
|
163
|
-
const
|
|
164
|
-
|
|
159
|
+
for (const f of a) {
|
|
160
|
+
const l = r.getTextWidth(S[f]);
|
|
161
|
+
l > u && (u = l);
|
|
165
162
|
}
|
|
166
|
-
const { xCaptionTail:
|
|
163
|
+
const { xCaptionTail: A, yCaptionTail: x } = st(
|
|
167
164
|
this.labelAngles,
|
|
168
165
|
this.step,
|
|
169
166
|
t,
|
|
170
|
-
|
|
171
|
-
),
|
|
167
|
+
r
|
|
168
|
+
), m = this.labelAngles.xAxisLabels / 180 * Math.PI, E = this.labelAngles.yAxisLabels / 180 * Math.PI;
|
|
172
169
|
this.captionsSizes = {
|
|
173
|
-
xCaptionTail:
|
|
174
|
-
yCaptionTail:
|
|
175
|
-
xAxisCaptions: h * Math.sin(
|
|
176
|
-
yAxisCaptions:
|
|
170
|
+
xCaptionTail: A,
|
|
171
|
+
yCaptionTail: x,
|
|
172
|
+
xAxisCaptions: h * Math.sin(m) || G,
|
|
173
|
+
yAxisCaptions: u * Math.sin(E) || G
|
|
177
174
|
};
|
|
178
175
|
}
|
|
179
|
-
updateChartDimensions(t, e,
|
|
180
|
-
const
|
|
181
|
-
this.columnsCount = e.nRows ? Math.ceil(
|
|
182
|
-
let
|
|
183
|
-
t.forEach((
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
176
|
+
updateChartDimensions(t, e, i, r) {
|
|
177
|
+
const s = t.length, a = Math.min(e.nRows ?? s, s), p = Math.min(e.nCols ?? s, s);
|
|
178
|
+
this.columnsCount = e.nRows ? Math.ceil(s / a) : p, this.rowsCount = Math.ceil(s / this.columnsCount), this.chartsDimensions = {};
|
|
179
|
+
let S = 0, h = 0;
|
|
180
|
+
t.forEach((x, m) => {
|
|
181
|
+
const E = m % this.columnsCount + 1, f = Y(m, t.length, this.columnsCount, this.rowsCount), l = this.chartSizes.chartWidth, y = this.chartSizes.chartHeight, L = tt(
|
|
182
|
+
i,
|
|
183
|
+
r,
|
|
187
184
|
this.captionsSizes,
|
|
188
185
|
f,
|
|
189
186
|
t,
|
|
190
187
|
this.step.x,
|
|
191
188
|
this.step.y
|
|
192
189
|
);
|
|
193
|
-
function
|
|
190
|
+
function C(R) {
|
|
194
191
|
return Math.max(
|
|
195
|
-
|
|
196
|
-
|
|
192
|
+
Z[R].reduce((_, D) => _ + L[R][D], 0),
|
|
193
|
+
$
|
|
197
194
|
);
|
|
198
195
|
}
|
|
199
196
|
const o = {
|
|
200
|
-
left:
|
|
201
|
-
right:
|
|
202
|
-
top:
|
|
203
|
-
bottom:
|
|
197
|
+
left: C("left"),
|
|
198
|
+
right: C("right"),
|
|
199
|
+
top: C("top"),
|
|
200
|
+
bottom: C("bottom")
|
|
204
201
|
};
|
|
205
202
|
o.left < this.captionsSizes.xCaptionTail && (o.left = this.captionsSizes.xCaptionTail), o.bottom < this.captionsSizes.yCaptionTail && (o.bottom = this.captionsSizes.yCaptionTail);
|
|
206
|
-
const n =
|
|
207
|
-
this.chartsDimensions[
|
|
208
|
-
left:
|
|
203
|
+
const n = et(L, l, y), g = l + o.left + o.right, z = y + o.top + o.bottom;
|
|
204
|
+
this.chartsDimensions[x] = {
|
|
205
|
+
left: S,
|
|
209
206
|
top: h,
|
|
210
|
-
inner: { width:
|
|
211
|
-
outer: { width:
|
|
207
|
+
inner: { width: l, height: y },
|
|
208
|
+
outer: { width: g, height: z },
|
|
212
209
|
padding: o,
|
|
213
210
|
sideElementBBoxes: n,
|
|
214
211
|
chartEdgeSides: f
|
|
215
|
-
},
|
|
212
|
+
}, S += g, E === this.columnsCount && (S = 0, h += z);
|
|
216
213
|
});
|
|
217
|
-
const
|
|
218
|
-
this.chartSizes.chartsWidth =
|
|
214
|
+
const u = t.slice(0, this.columnsCount).reduce((x, m) => x + this.chartsDimensions[m].outer.width, 0), A = t.filter((x, m) => m % this.columnsCount === 0).reduce((x, m) => x + this.chartsDimensions[m].outer.height, 0);
|
|
215
|
+
this.chartSizes.chartsWidth = u, this.chartSizes.chartsHeight = A;
|
|
219
216
|
}
|
|
220
217
|
updateChartsSizes(t, e) {
|
|
221
|
-
const { width:
|
|
222
|
-
|
|
218
|
+
const { width: i, height: r, cellSize: s } = e;
|
|
219
|
+
s && (this.chartSizes.chartWidth = t.meta.xKeys.length * s, this.chartSizes.chartHeight = t.meta.yKeys.length * s), i && r && (this.chartSizes.chartWidth = i, this.chartSizes.chartHeight = r);
|
|
223
220
|
}
|
|
224
221
|
// update scales for cell positions, x and y for each facet
|
|
225
|
-
updateScales(t, e,
|
|
226
|
-
const { width:
|
|
227
|
-
(
|
|
228
|
-
),
|
|
229
|
-
(
|
|
230
|
-
),
|
|
231
|
-
|
|
232
|
-
const
|
|
233
|
-
this.scales.x = M().domain(
|
|
222
|
+
updateScales(t, e, i, r, s) {
|
|
223
|
+
const { width: a, height: p, cellSize: S } = e, { meta: h } = t, u = (o, n = {}) => [...o].sort(
|
|
224
|
+
(g, z) => i.sorting === "asc" ? (n[g] ?? g).localeCompare(n[z] ?? z, "en", { numeric: !0 }) : (n[z] ?? z).localeCompare(n[g] ?? g, "en", { numeric: !0 })
|
|
225
|
+
), A = (o, n = {}) => [...o].sort(
|
|
226
|
+
(g, z) => r.sorting === "asc" ? (n[g] ?? g).localeCompare(n[z] ?? z, "en", { numeric: !0 }) : (n[z] ?? z).localeCompare(n[g] ?? g, "en", { numeric: !0 })
|
|
227
|
+
), x = s.xGroup ? h.xGroupKeys : u(h.xGroupKeys), m = s.yGroup ? h.yGroupKeys : A(h.yGroupKeys), { xKeysByGroups: E, yKeysByGroups: f } = h, l = x.reduce((o, n) => (o = o.concat(u(E[n], h.xLabels)), o), []), y = m.reduce((o, n) => (o = o.concat(A(f[n], h.yLabels)), o), []);
|
|
228
|
+
S ? (this.step.x = S, this.step.y = S) : a && p && (this.step.x = a / l.length, this.step.y = p / y.length);
|
|
229
|
+
const L = new Array(l.length).fill(null).map((o, n) => n * this.step.x), C = new Array(y.length).fill(null).map((o, n) => n * this.step.y);
|
|
230
|
+
this.scales.x = M().domain(l).range(L), this.scales.y = M().domain(y).range(C);
|
|
234
231
|
}
|
|
235
|
-
updateAesScale(t, e,
|
|
236
|
-
this.colorScale =
|
|
232
|
+
updateAesScale(t, e, i, r) {
|
|
233
|
+
this.colorScale = I().domain(ot(r, t.colorsList.length, i)).range(t.colorsList), this.sizeScale = b(e, [t.minRadius, t.maxRadius]);
|
|
237
234
|
}
|
|
238
|
-
render(t, e,
|
|
239
|
-
var
|
|
240
|
-
const { meta:
|
|
241
|
-
this.updateChartsSizes(
|
|
242
|
-
const n = /* @__PURE__ */ N.jsx(
|
|
243
|
-
|
|
235
|
+
render(t, e, i, r, s, a, p, S, h, u, A, x) {
|
|
236
|
+
var g;
|
|
237
|
+
const { meta: m, facets: E, meta: { facetKeys: f } } = s, { valueExtent: l } = m, { xAxis: y, yAxis: L, title: C, size: o } = i;
|
|
238
|
+
this.updateChartsSizes(s, o), this.updateAesScale(h, l.sizeValue, l.colorValue, S), this.updateScales(s, o, i.xAxis, i.yAxis, x), this.updateCaptionsSize(s, y, L), this.updateChartDimensions(f, r, y, L), this.updateLegendSize(i.legend, a, p, f), this.updateMargins(C);
|
|
239
|
+
const n = /* @__PURE__ */ N.jsx(j, { dataFrame: t, children: /* @__PURE__ */ N.jsx(
|
|
240
|
+
O,
|
|
244
241
|
{
|
|
245
242
|
aes: h,
|
|
246
243
|
captionsSizes: this.captionsSizes,
|
|
247
|
-
cellsMeta:
|
|
244
|
+
cellsMeta: m,
|
|
248
245
|
columnsCount: this.columnsCount,
|
|
249
246
|
chartsDimensions: this.chartsDimensions,
|
|
250
|
-
chartSettings:
|
|
247
|
+
chartSettings: i,
|
|
251
248
|
chartSizes: this.chartSizes,
|
|
252
249
|
sizeScale: this.sizeScale,
|
|
253
250
|
colorScale: this.colorScale,
|
|
254
251
|
facetKeys: f,
|
|
255
|
-
facetSettings:
|
|
256
|
-
groupedCells:
|
|
252
|
+
facetSettings: r,
|
|
253
|
+
groupedCells: E,
|
|
257
254
|
labelAngles: this.labelAngles,
|
|
258
255
|
legend: this.legend,
|
|
259
256
|
margins: this.margins,
|
|
260
257
|
scales: this.scales,
|
|
261
258
|
settingsId: e,
|
|
262
259
|
step: this.step,
|
|
263
|
-
getCellTooltip:
|
|
264
|
-
onTooltipHintSwitch:
|
|
260
|
+
getCellTooltip: u,
|
|
261
|
+
onTooltipHintSwitch: A
|
|
265
262
|
}
|
|
266
263
|
) });
|
|
267
|
-
this.component = n, (
|
|
264
|
+
this.component = n, (g = this.reactRoot) == null || g.render(n);
|
|
268
265
|
}
|
|
269
266
|
renderError(t) {
|
|
270
267
|
var e;
|
|
@@ -272,6 +269,6 @@ class At {
|
|
|
272
269
|
}
|
|
273
270
|
}
|
|
274
271
|
export {
|
|
275
|
-
|
|
272
|
+
Lt as default
|
|
276
273
|
};
|
|
277
274
|
//# sourceMappingURL=ChartRenderer.js.map
|