@milaboratories/miplots4 1.0.131 → 1.0.132
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/heatmap/components/Annotations/Annotation.d.ts.map +1 -1
- package/dist/heatmap/components/Annotations/Annotation.js +34 -33
- package/dist/heatmap/components/Annotations/Annotation.js.map +1 -1
- package/dist/heatmap/components/Chart.d.ts.map +1 -1
- package/dist/heatmap/components/Chart.js +90 -85
- package/dist/heatmap/components/Chart.js.map +1 -1
- package/dist/heatmap/components/types.d.ts +2 -1
- package/dist/heatmap/components/types.d.ts.map +1 -1
- package/dist/scatterplot/ScatterplotSettingsImpl.d.ts +6 -3
- package/dist/scatterplot/ScatterplotSettingsImpl.d.ts.map +1 -1
- package/dist/scatterplot/ScatterplotSettingsImpl.js +56 -57
- package/dist/scatterplot/ScatterplotSettingsImpl.js.map +1 -1
- package/dist/scatterplot/dots.d.ts +2 -1
- package/dist/scatterplot/dots.d.ts.map +1 -1
- package/dist/scatterplot/dots.js +24 -27
- package/dist/scatterplot/dots.js.map +1 -1
- package/dist/scatterplot/getLayersData.d.ts.map +1 -1
- package/dist/scatterplot/getLayersData.js +15 -12
- package/dist/scatterplot/getLayersData.js.map +1 -1
- package/dist/scatterplot/index.d.ts.map +1 -1
- package/dist/scatterplot/index.js +66 -72
- package/dist/scatterplot/index.js.map +1 -1
- package/dist/scatterplot/utils/createLegendInfo.d.ts +3 -3
- package/dist/scatterplot/utils/createLegendInfo.d.ts.map +1 -1
- package/dist/scatterplot/utils/createLegendInfo.js +44 -39
- package/dist/scatterplot/utils/createLegendInfo.js.map +1 -1
- package/dist/scatterplot/utils/sortDotsByGrouping.d.ts +8 -0
- package/dist/scatterplot/utils/sortDotsByGrouping.d.ts.map +1 -0
- package/dist/scatterplot/utils/sortDotsByGrouping.js +18 -0
- package/dist/scatterplot/utils/sortDotsByGrouping.js.map +1 -0
- package/dist/scatterplot-umap/SettingsImpl.d.ts +6 -3
- package/dist/scatterplot-umap/SettingsImpl.d.ts.map +1 -1
- package/dist/scatterplot-umap/SettingsImpl.js +38 -39
- package/dist/scatterplot-umap/SettingsImpl.js.map +1 -1
- package/dist/scatterplot-umap/index.d.ts.map +1 -1
- package/dist/scatterplot-umap/index.js +69 -65
- package/dist/scatterplot-umap/index.js.map +1 -1
- package/dist/types/bubble.d.ts +12 -12
- package/dist/types/dendro.d.ts +8 -8
- package/dist/types/discrete.d.ts +20 -20
- package/dist/types/heatmap.d.ts +28 -28
- package/dist/types/histogram.d.ts +22 -22
- package/dist/types/scatterplot-umap.d.ts +126 -76
- package/dist/types/scatterplot-umap.d.ts.map +1 -1
- package/dist/types/scatterplot-umap.js +22 -16
- package/dist/types/scatterplot-umap.js.map +1 -1
- package/dist/types/scatterplot.d.ts +126 -76
- package/dist/types/scatterplot.d.ts.map +1 -1
- package/dist/types/scatterplot.js +16 -10
- package/dist/types/scatterplot.js.map +1 -1
- package/dist/utils/arraysAreDifferent.d.ts +2 -0
- package/dist/utils/arraysAreDifferent.d.ts.map +1 -0
- package/dist/utils/arraysAreDifferent.js +7 -0
- package/dist/utils/arraysAreDifferent.js.map +1 -0
- package/dist/utils/getChartEdgeSides.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Annotation.d.ts","sourceRoot":"","sources":["../../../../src/heatmap/components/Annotations/Annotation.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAqB1F,UAAU,eAA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,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;IAC7F,aAAa,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,MAAM,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;IAC7F,YAAY,EAAE,YAAY,CAAC,IAAI,GAAG,qBAAqB,CAAC,CAAC;IACzD,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACpC;AAMD,wBAAgB,UAAU,CAAC,EACvB,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,KAAK,EACL,KAAK,EACL,CAAC,EACD,CAAC,EACD,UAAU,EACV,SAAS,EACT,KAAK,EACL,MAAM,EACN,UAAU,EACV,GAAG,EACH,KAAK,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACb,aAAa,EACb,YAAY,EACZ,sBAAsB,EACzB,EAAE,eAAe,2CA8IjB"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as h } from "../../../node_modules/react/jsx-runtime.js";
|
|
2
2
|
import { r as S } from "../../../node_modules/react-dom/index.js";
|
|
3
3
|
import { BLACK as O } from "../../../constants.js";
|
|
4
4
|
import { ANNOTATION_WIDTH as s } from "../../constants.js";
|
|
5
|
-
function q(g, f, r,
|
|
5
|
+
function q(g, f, r, m, x) {
|
|
6
6
|
if (g) {
|
|
7
|
-
const k = s / 2,
|
|
8
|
-
return { x: k, y:
|
|
7
|
+
const k = s / 2, v = r === "top" ? -5 : x + 5;
|
|
8
|
+
return { x: k, y: v, rotate: f === "left" ? -90 : 90, anchor: f === "left" && r === "top" ? "start" : "end" };
|
|
9
9
|
}
|
|
10
|
-
const c = r === "right" ?
|
|
10
|
+
const c = r === "right" ? m + 5 : -5, i = s / 2;
|
|
11
11
|
return { x: c, y: i, rotate: 0, anchor: r === "right" ? "start" : "end" };
|
|
12
12
|
}
|
|
13
13
|
function J(g) {
|
|
@@ -17,13 +17,13 @@ function Z({
|
|
|
17
17
|
facetKey: g,
|
|
18
18
|
data: f,
|
|
19
19
|
scales: r,
|
|
20
|
-
stepX:
|
|
21
|
-
stepY:
|
|
20
|
+
stepX: m,
|
|
21
|
+
stepY: x,
|
|
22
22
|
x: c,
|
|
23
23
|
y: i,
|
|
24
|
-
annotation:
|
|
24
|
+
annotation: C,
|
|
25
25
|
showTitle: k,
|
|
26
|
-
width:
|
|
26
|
+
width: v,
|
|
27
27
|
height: w,
|
|
28
28
|
colorScale: d,
|
|
29
29
|
aes: X,
|
|
@@ -32,47 +32,48 @@ function Z({
|
|
|
32
32
|
yGroupKeys: _,
|
|
33
33
|
xKeysByGroups: a,
|
|
34
34
|
yKeysByGroups: $,
|
|
35
|
-
tooltipsData:
|
|
35
|
+
tooltipsData: l,
|
|
36
36
|
activeElementContainer: E
|
|
37
37
|
}) {
|
|
38
|
-
const { position: p, titlePosition: Y, valueColumn: j } =
|
|
39
|
-
return /* @__PURE__ */
|
|
38
|
+
const { position: p, titlePosition: Y, valueColumn: j } = C, o = p === "left" || p === "right", z = (o ? r.y : r.x).domain(), A = q(o, p, Y, v, w), F = l.fixed && E;
|
|
39
|
+
return /* @__PURE__ */ h.jsxs("g", { children: [
|
|
40
40
|
z.map((n) => {
|
|
41
|
-
const t = f == null ? void 0 : f[n],
|
|
41
|
+
const t = f == null ? void 0 : f[n], u = d.type === "continuous" ? d.scale(Number(t)) : d.scale(String(t)), e = c + (o ? 0 : r.x(n)), I = i + (o ? r.y(n) : 0), M = o ? s : m, N = o ? x : s, W = o ? null : n, H = o ? n : null, R = F && J(l.selectedData) && l.selectedData.xKey === W && l.selectedData.yKey === H && g === l.currentFacet, L = /* @__PURE__ */ h.jsx(
|
|
42
42
|
"rect",
|
|
43
43
|
{
|
|
44
44
|
x: e,
|
|
45
45
|
y: I,
|
|
46
46
|
width: M,
|
|
47
47
|
height: N,
|
|
48
|
-
fill:
|
|
48
|
+
fill: u,
|
|
49
49
|
stroke: X.cellStrokeColor,
|
|
50
|
-
onMouseEnter: () =>
|
|
50
|
+
onMouseEnter: () => l.onMouseEnter({
|
|
51
51
|
isAnnotation: !0,
|
|
52
52
|
x: e + M,
|
|
53
53
|
y: I + N / 2,
|
|
54
54
|
xKey: W,
|
|
55
55
|
yKey: H,
|
|
56
56
|
value: t,
|
|
57
|
-
title: j.label ?? j.value
|
|
57
|
+
title: j.label ?? j.value,
|
|
58
|
+
column: C.valueColumn
|
|
58
59
|
}, g),
|
|
59
|
-
onMouseLeave: () =>
|
|
60
|
+
onMouseLeave: () => l.onMouseLeave()
|
|
60
61
|
},
|
|
61
62
|
n
|
|
62
63
|
);
|
|
63
64
|
return R ? S.createPortal(L, E) : L;
|
|
64
65
|
}),
|
|
65
|
-
|
|
66
|
+
l.fixed && !o && T.map((n) => {
|
|
66
67
|
const t = a[n].length;
|
|
67
68
|
if (t === 0)
|
|
68
69
|
return null;
|
|
69
|
-
const
|
|
70
|
-
return /* @__PURE__ */
|
|
70
|
+
const u = t * m, e = r.x(a[n][0]);
|
|
71
|
+
return /* @__PURE__ */ h.jsx(
|
|
71
72
|
"rect",
|
|
72
73
|
{
|
|
73
74
|
x: e + c,
|
|
74
75
|
y: i,
|
|
75
|
-
width:
|
|
76
|
+
width: u,
|
|
76
77
|
height: s,
|
|
77
78
|
stroke: "none",
|
|
78
79
|
fill: "rgba(255, 255, 255, 0.8)"
|
|
@@ -80,18 +81,18 @@ function Z({
|
|
|
80
81
|
`${e}_${i}`
|
|
81
82
|
);
|
|
82
83
|
}),
|
|
83
|
-
|
|
84
|
+
l.fixed && o && _.map((n) => {
|
|
84
85
|
const t = $[n].length;
|
|
85
86
|
if (t === 0)
|
|
86
87
|
return null;
|
|
87
|
-
const
|
|
88
|
-
return /* @__PURE__ */
|
|
88
|
+
const u = t * x, e = r.y($[n][0]);
|
|
89
|
+
return /* @__PURE__ */ h.jsx(
|
|
89
90
|
"rect",
|
|
90
91
|
{
|
|
91
92
|
x: c,
|
|
92
93
|
y: e + i,
|
|
93
94
|
width: s,
|
|
94
|
-
height:
|
|
95
|
+
height: u,
|
|
95
96
|
stroke: "none",
|
|
96
97
|
fill: "rgba(255, 255, 255, 0.8)"
|
|
97
98
|
},
|
|
@@ -102,13 +103,13 @@ function Z({
|
|
|
102
103
|
const t = a[n].length;
|
|
103
104
|
if (t === 0)
|
|
104
105
|
return null;
|
|
105
|
-
const
|
|
106
|
-
return /* @__PURE__ */
|
|
106
|
+
const u = t * m, e = r.x(a[n][0]);
|
|
107
|
+
return /* @__PURE__ */ h.jsx(
|
|
107
108
|
"rect",
|
|
108
109
|
{
|
|
109
110
|
x: e + c,
|
|
110
111
|
y: i,
|
|
111
|
-
width:
|
|
112
|
+
width: u,
|
|
112
113
|
height: s,
|
|
113
114
|
stroke: O,
|
|
114
115
|
fill: "none"
|
|
@@ -120,27 +121,27 @@ function Z({
|
|
|
120
121
|
const t = $[n].length;
|
|
121
122
|
if (t === 0)
|
|
122
123
|
return null;
|
|
123
|
-
const
|
|
124
|
-
return /* @__PURE__ */
|
|
124
|
+
const u = t * x, e = r.y($[n][0]);
|
|
125
|
+
return /* @__PURE__ */ h.jsx(
|
|
125
126
|
"rect",
|
|
126
127
|
{
|
|
127
128
|
x: c,
|
|
128
129
|
y: e + i,
|
|
129
130
|
width: s,
|
|
130
|
-
height:
|
|
131
|
+
height: u,
|
|
131
132
|
stroke: O,
|
|
132
133
|
fill: "none"
|
|
133
134
|
},
|
|
134
135
|
`${c}_${e}`
|
|
135
136
|
);
|
|
136
137
|
}),
|
|
137
|
-
k && /* @__PURE__ */
|
|
138
|
+
k && /* @__PURE__ */ h.jsx(
|
|
138
139
|
"g",
|
|
139
140
|
{
|
|
140
141
|
fontWeight: "500",
|
|
141
142
|
fontSize: "14px",
|
|
142
143
|
transform: `translate(${c + A.x},${i + A.y}) rotate(${A.rotate})`,
|
|
143
|
-
children: /* @__PURE__ */
|
|
144
|
+
children: /* @__PURE__ */ h.jsx("text", { textAnchor: A.anchor, dominantBaseline: "central", children: j.label ?? j.value })
|
|
144
145
|
}
|
|
145
146
|
)
|
|
146
147
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Annotation.js","sources":["../../../../src/heatmap/components/Annotations/Annotation.tsx"],"sourcesContent":["import { createPortal } from 'react-dom';\nimport type { TooltipsData } from '../../../common/Tooltip';\nimport { BLACK } from '../../../constants';\nimport type { DataValue } from '../../../types';\nimport { ANNOTATION_WIDTH } from '../../constants';\nimport type { Cell, GroupedCellsData } from '../../getCells';\nimport type { HeatmapSettingsImpl } from '../../HeatmapSettingsImpl';\nimport type { AnnotationColorScales, AnnotationTooltipData, ChartScales } from '../types';\n\nfunction getTextPosition(\n vertical: boolean,\n annotationPosition: string,\n titlePosition: string,\n width: number,\n height: number\n) {\n if (vertical) {\n const x = ANNOTATION_WIDTH / 2;\n const y = titlePosition === 'top' ? -5 : height + 5;\n const rotate = annotationPosition === 'left' ? -90 : 90;\n const anchor = annotationPosition === 'left' && titlePosition === 'top' ? 'start' : 'end';\n return {x, y, rotate, anchor};\n }\n const x = titlePosition === 'right' ? width + 5 : -5;\n const y = ANNOTATION_WIDTH / 2;\n const anchor = titlePosition === 'right' ? 'start' : 'end';\n return {x, y, rotate: 0, anchor};\n}\ninterface AnnotationProps {\n facetKey: string;\n scales: ChartScales;\n data: Record<string, DataValue>;\n annotation: HeatmapSettingsImpl['annotations'][0];\n stepX: number;\n stepY: number;\n vertical?: boolean;\n x: number;\n y: number;\n width: number;\n height: number;\n showTitle: boolean;\n colorScale: AnnotationColorScales[string];\n aes: HeatmapSettingsImpl['aes'];\n frame: HeatmapSettingsImpl['chartSettings']['frame'];\n xGroupKeys: string[];\n yGroupKeys: string[];\n xKeysByGroups: GroupedCellsData['facets'][keyof GroupedCellsData['facets']]['xKeysByGroups'];\n yKeysByGroups: GroupedCellsData['facets'][keyof GroupedCellsData['facets']]['yKeysByGroups'];\n tooltipsData: TooltipsData<Cell | AnnotationTooltipData>;\n activeElementContainer?: Element;\n}\n\nfunction isAnnotationTooltip(d:Cell|AnnotationTooltipData|null):d is AnnotationTooltipData {\n return d !== null && ('isAnnotation' in d);\n}\n\nexport function Annotation({\n facetKey,\n data,\n scales,\n stepX,\n stepY,\n x,\n y,\n annotation,\n showTitle,\n width,\n height,\n colorScale,\n aes,\n frame,\n xGroupKeys,\n yGroupKeys,\n xKeysByGroups,\n yKeysByGroups,\n tooltipsData,\n activeElementContainer\n}: AnnotationProps) {\n const {position, titlePosition, valueColumn} = annotation;\n const vertical = position === 'left' || position === 'right';\n const keys = (vertical ? scales.y : scales.x).domain();\n const textPosition = getTextPosition(vertical, position, titlePosition, width, height);\n const isDimmedBackground = tooltipsData.fixed && activeElementContainer;\n\n return (\n <g>\n {keys.map(key => {\n const value = data?.[key];\n const fillColor = colorScale.type === 'continuous'\n ? colorScale.scale(Number(value))\n : colorScale.scale(String(value));\n const xInner= x + (vertical ? 0 : scales.x(key));\n const yInner= y + (vertical ? scales.y(key) : 0);\n const width = vertical ? ANNOTATION_WIDTH : stepX;\n const height = vertical ? stepY : ANNOTATION_WIDTH;\n const xKey = vertical ? null : key;\n const yKey = vertical ? key : null;\n const highlighted = isDimmedBackground\n && isAnnotationTooltip(tooltipsData.selectedData)\n && tooltipsData.selectedData.xKey === xKey\n && tooltipsData.selectedData.yKey === yKey\n && facetKey === tooltipsData.currentFacet;\n const cellElement = (\n <rect\n key={key}\n x={xInner}\n y={yInner}\n width={width}\n height={height}\n fill={fillColor}\n stroke={aes.cellStrokeColor}\n onMouseEnter={() => tooltipsData.onMouseEnter({\n isAnnotation: true,\n x: xInner + width,\n y: yInner + height / 2,\n xKey,\n yKey,\n value,\n title: valueColumn.label ?? valueColumn.value\n } satisfies AnnotationTooltipData, facetKey)}\n onMouseLeave={() => tooltipsData.onMouseLeave()}\n />\n );\n return highlighted ? createPortal(cellElement, activeElementContainer) : cellElement;\n })}\n {tooltipsData.fixed && !vertical && xGroupKeys.map(xGroupKey => {\n const keysCountX = xKeysByGroups[xGroupKey].length;\n if (keysCountX === 0) {\n return null;\n }\n const groupWidth = keysCountX * stepX;\n const groupX = scales.x(xKeysByGroups[xGroupKey][0]);\n return (\n <rect\n key={`${groupX}_${y}`}\n x={groupX + x}\n y={y}\n width={groupWidth}\n height={ANNOTATION_WIDTH}\n stroke=\"none\"\n fill=\"rgba(255, 255, 255, 0.8)\"\n />\n );\n })}\n {tooltipsData.fixed && vertical && yGroupKeys.map(yGroupKey => {\n const keysCountY = yKeysByGroups[yGroupKey].length;\n if (keysCountY === 0) {\n return null;\n }\n const groupHeight = keysCountY * stepY;\n const groupY = scales.y(yKeysByGroups[yGroupKey][0]);\n return (\n <rect\n key={`${x}_${groupY}`}\n x={x}\n y={groupY + y}\n width={ANNOTATION_WIDTH}\n height={groupHeight}\n stroke=\"none\"\n fill=\"rgba(255, 255, 255, 0.8)\"\n />\n );\n })}\n {frame.type === 'groups' &&\n !vertical &&\n xGroupKeys.map(xGroupKey => {\n const keysCountX = xKeysByGroups[xGroupKey].length;\n if (keysCountX === 0) {\n return null;\n }\n const groupWidth = keysCountX * stepX;\n const groupX = scales.x(xKeysByGroups[xGroupKey][0]);\n return (\n <rect\n key={`${groupX}_${y}`}\n x={groupX + x}\n y={y}\n width={groupWidth}\n height={ANNOTATION_WIDTH}\n stroke={BLACK}\n fill=\"none\"\n />\n );\n })}\n {frame.type === 'groups' &&\n vertical &&\n yGroupKeys.map(yGroupKey => {\n const keysCountY = yKeysByGroups[yGroupKey].length;\n if (keysCountY === 0) {\n return null;\n }\n const groupHeight = keysCountY * stepY;\n const groupY = scales.y(yKeysByGroups[yGroupKey][0]);\n return (\n <rect\n key={`${x}_${groupY}`}\n x={x}\n y={groupY + y}\n width={ANNOTATION_WIDTH}\n height={groupHeight}\n stroke={BLACK}\n fill=\"none\"\n />\n );\n })}\n {showTitle && (\n <g\n fontWeight=\"500\"\n fontSize=\"14px\"\n transform={`translate(${x + textPosition.x},${y + textPosition.y}) rotate(${textPosition.rotate})`}\n >\n <text textAnchor={textPosition.anchor} dominantBaseline=\"central\">\n {valueColumn.label ?? valueColumn.value}\n </text>\n </g>\n )}\n </g>\n );\n}\n"],"names":["getTextPosition","vertical","annotationPosition","titlePosition","width","height","x","ANNOTATION_WIDTH","y","anchor","isAnnotationTooltip","d","Annotation","facetKey","data","scales","stepX","stepY","annotation","showTitle","colorScale","aes","frame","xGroupKeys","yGroupKeys","xKeysByGroups","yKeysByGroups","tooltipsData","activeElementContainer","position","valueColumn","keys","textPosition","isDimmedBackground","key","value","fillColor","xInner","yInner","xKey","yKey","highlighted","cellElement","jsx","createPortal","xGroupKey","keysCountX","groupWidth","groupX","yGroupKey","keysCountY","groupHeight","groupY","BLACK"],"mappings":";;;;AASA,SAASA,EACLC,GACAC,GACAC,GACAC,GACAC,GACF;AACE,MAAIJ,GAAU;AACV,UAAMK,IAAIC,IAAmB,GACvBC,IAAIL,MAAkB,QAAQ,KAAKE,IAAS;AAGlD,WAAO,EAAC,GAAAC,GAAG,GAAAE,GAAG,QAFCN,MAAuB,SAAS,MAAM,IAE/B,QADPA,MAAuB,UAAUC,MAAkB,QAAQ,UAAU,MAC9DM;AAAAA,EAC1B;AACA,QAAMH,IAAIH,MAAkB,UAAUC,IAAQ,IAAI,IAC5CI,IAAID,IAAmB;AAE7B,SAAO,EAAC,GAAAD,GAAG,GAAAE,GAAG,QAAQ,GAAG,QADVL,MAAkB,UAAU,UAAU,MAC5B;AAC7B;AAyBA,SAASO,EAAoBC,GAA8D;AACvF,SAAOA,MAAM,QAAS,kBAAkBA;AAC5C;AAEO,SAASC,EAAW;AAAA,EACvB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAAX;AAAA,EACA,GAAAE;AAAA,EACA,YAAAU;AAAA,EACA,WAAAC;AAAA,EACA,OAAAf;AAAA,EACA,QAAAC;AAAA,EACA,YAAAe;AAAA,EACA,KAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,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Q,kBAAiB,WACnD,UAAAF,EAAY,SAASA,EAAY,MAAA,CACtC;AAAA,MAAA;AAAA,IAAA;AAAA,EACJ,GAER;AAER;"}
|
|
1
|
+
{"version":3,"file":"Annotation.js","sources":["../../../../src/heatmap/components/Annotations/Annotation.tsx"],"sourcesContent":["import { createPortal } from 'react-dom';\nimport type { TooltipsData } from '../../../common/Tooltip';\nimport { BLACK } from '../../../constants';\nimport type { DataValue } from '../../../types';\nimport { ANNOTATION_WIDTH } from '../../constants';\nimport type { Cell, GroupedCellsData } from '../../getCells';\nimport type { HeatmapSettingsImpl } from '../../HeatmapSettingsImpl';\nimport type { AnnotationColorScales, AnnotationTooltipData, ChartScales } from '../types';\n\nfunction getTextPosition(\n vertical: boolean,\n annotationPosition: string,\n titlePosition: string,\n width: number,\n height: number\n) {\n if (vertical) {\n const x = ANNOTATION_WIDTH / 2;\n const y = titlePosition === 'top' ? -5 : height + 5;\n const rotate = annotationPosition === 'left' ? -90 : 90;\n const anchor = annotationPosition === 'left' && titlePosition === 'top' ? 'start' : 'end';\n return {x, y, rotate, anchor};\n }\n const x = titlePosition === 'right' ? width + 5 : -5;\n const y = ANNOTATION_WIDTH / 2;\n const anchor = titlePosition === 'right' ? 'start' : 'end';\n return {x, y, rotate: 0, anchor};\n}\ninterface AnnotationProps {\n facetKey: string;\n scales: ChartScales;\n data: Record<string, DataValue>;\n annotation: HeatmapSettingsImpl['annotations'][0];\n stepX: number;\n stepY: number;\n vertical?: boolean;\n x: number;\n y: number;\n width: number;\n height: number;\n showTitle: boolean;\n colorScale: AnnotationColorScales[string];\n aes: HeatmapSettingsImpl['aes'];\n frame: HeatmapSettingsImpl['chartSettings']['frame'];\n xGroupKeys: string[];\n yGroupKeys: string[];\n xKeysByGroups: GroupedCellsData['facets'][keyof GroupedCellsData['facets']]['xKeysByGroups'];\n yKeysByGroups: GroupedCellsData['facets'][keyof GroupedCellsData['facets']]['yKeysByGroups'];\n tooltipsData: TooltipsData<Cell | AnnotationTooltipData>;\n activeElementContainer?: Element;\n}\n\nfunction isAnnotationTooltip(d:Cell|AnnotationTooltipData|null):d is AnnotationTooltipData {\n return d !== null && ('isAnnotation' in d);\n}\n\nexport function Annotation({\n facetKey,\n data,\n scales,\n stepX,\n stepY,\n x,\n y,\n annotation,\n showTitle,\n width,\n height,\n colorScale,\n aes,\n frame,\n xGroupKeys,\n yGroupKeys,\n xKeysByGroups,\n yKeysByGroups,\n tooltipsData,\n activeElementContainer\n}: AnnotationProps) {\n const {position, titlePosition, valueColumn} = annotation;\n const vertical = position === 'left' || position === 'right';\n const keys = (vertical ? scales.y : scales.x).domain();\n const textPosition = getTextPosition(vertical, position, titlePosition, width, height);\n const isDimmedBackground = tooltipsData.fixed && activeElementContainer;\n\n return (\n <g>\n {keys.map(key => {\n const value = data?.[key];\n const fillColor = colorScale.type === 'continuous'\n ? colorScale.scale(Number(value))\n : colorScale.scale(String(value));\n const xInner= x + (vertical ? 0 : scales.x(key));\n const yInner= y + (vertical ? scales.y(key) : 0);\n const width = vertical ? ANNOTATION_WIDTH : stepX;\n const height = vertical ? stepY : ANNOTATION_WIDTH;\n const xKey = vertical ? null : key;\n const yKey = vertical ? key : null;\n const highlighted = isDimmedBackground\n && isAnnotationTooltip(tooltipsData.selectedData)\n && tooltipsData.selectedData.xKey === xKey\n && tooltipsData.selectedData.yKey === yKey\n && facetKey === tooltipsData.currentFacet;\n const cellElement = (\n <rect\n key={key}\n x={xInner}\n y={yInner}\n width={width}\n height={height}\n fill={fillColor}\n stroke={aes.cellStrokeColor}\n onMouseEnter={() => tooltipsData.onMouseEnter({\n isAnnotation: true,\n x: xInner + width,\n y: yInner + height / 2,\n xKey,\n yKey,\n value,\n title: valueColumn.label ?? valueColumn.value,\n column: annotation.valueColumn\n } satisfies AnnotationTooltipData, facetKey)}\n onMouseLeave={() => tooltipsData.onMouseLeave()}\n />\n );\n return highlighted ? createPortal(cellElement, activeElementContainer) : cellElement;\n })}\n {tooltipsData.fixed && !vertical && xGroupKeys.map(xGroupKey => {\n const keysCountX = xKeysByGroups[xGroupKey].length;\n if (keysCountX === 0) {\n return null;\n }\n const groupWidth = keysCountX * stepX;\n const groupX = scales.x(xKeysByGroups[xGroupKey][0]);\n return (\n <rect\n key={`${groupX}_${y}`}\n x={groupX + x}\n y={y}\n width={groupWidth}\n height={ANNOTATION_WIDTH}\n stroke=\"none\"\n fill=\"rgba(255, 255, 255, 0.8)\"\n />\n );\n })}\n {tooltipsData.fixed && vertical && yGroupKeys.map(yGroupKey => {\n const keysCountY = yKeysByGroups[yGroupKey].length;\n if (keysCountY === 0) {\n return null;\n }\n const groupHeight = keysCountY * stepY;\n const groupY = scales.y(yKeysByGroups[yGroupKey][0]);\n return (\n <rect\n key={`${x}_${groupY}`}\n x={x}\n y={groupY + y}\n width={ANNOTATION_WIDTH}\n height={groupHeight}\n stroke=\"none\"\n fill=\"rgba(255, 255, 255, 0.8)\"\n />\n );\n })}\n {frame.type === 'groups' &&\n !vertical &&\n xGroupKeys.map(xGroupKey => {\n const keysCountX = xKeysByGroups[xGroupKey].length;\n if (keysCountX === 0) {\n return null;\n }\n const groupWidth = keysCountX * stepX;\n const groupX = scales.x(xKeysByGroups[xGroupKey][0]);\n return (\n <rect\n key={`${groupX}_${y}`}\n x={groupX + x}\n y={y}\n width={groupWidth}\n height={ANNOTATION_WIDTH}\n stroke={BLACK}\n fill=\"none\"\n />\n );\n })}\n {frame.type === 'groups' &&\n vertical &&\n yGroupKeys.map(yGroupKey => {\n const keysCountY = yKeysByGroups[yGroupKey].length;\n if (keysCountY === 0) {\n return null;\n }\n const groupHeight = keysCountY * stepY;\n const groupY = scales.y(yKeysByGroups[yGroupKey][0]);\n return (\n <rect\n key={`${x}_${groupY}`}\n x={x}\n y={groupY + y}\n width={ANNOTATION_WIDTH}\n height={groupHeight}\n stroke={BLACK}\n fill=\"none\"\n />\n );\n })}\n {showTitle && (\n <g\n fontWeight=\"500\"\n fontSize=\"14px\"\n transform={`translate(${x + textPosition.x},${y + textPosition.y}) rotate(${textPosition.rotate})`}\n >\n <text textAnchor={textPosition.anchor} dominantBaseline=\"central\">\n {valueColumn.label ?? valueColumn.value}\n </text>\n </g>\n )}\n </g>\n );\n}\n"],"names":["getTextPosition","vertical","annotationPosition","titlePosition","width","height","x","ANNOTATION_WIDTH","y","anchor","isAnnotationTooltip","d","Annotation","facetKey","data","scales","stepX","stepY","annotation","showTitle","colorScale","aes","frame","xGroupKeys","yGroupKeys","xKeysByGroups","yKeysByGroups","tooltipsData","activeElementContainer","position","valueColumn","keys","textPosition","isDimmedBackground","key","value","fillColor","xInner","yInner","xKey","yKey","highlighted","cellElement","jsx","createPortal","xGroupKey","keysCountX","groupWidth","groupX","yGroupKey","keysCountY","groupHeight","groupY","BLACK"],"mappings":";;;;AASA,SAASA,EACLC,GACAC,GACAC,GACAC,GACAC,GACF;AACE,MAAIJ,GAAU;AACV,UAAMK,IAAIC,IAAmB,GACvBC,IAAIL,MAAkB,QAAQ,KAAKE,IAAS;AAGlD,WAAO,EAAC,GAAAC,GAAG,GAAAE,GAAG,QAFCN,MAAuB,SAAS,MAAM,IAE/B,QADPA,MAAuB,UAAUC,MAAkB,QAAQ,UAAU,MAC9DM;AAAAA,EAC1B;AACA,QAAMH,IAAIH,MAAkB,UAAUC,IAAQ,IAAI,IAC5CI,IAAID,IAAmB;AAE7B,SAAO,EAAC,GAAAD,GAAG,GAAAE,GAAG,QAAQ,GAAG,QADVL,MAAkB,UAAU,UAAU,MAC5B;AAC7B;AAyBA,SAASO,EAAoBC,GAA8D;AACvF,SAAOA,MAAM,QAAS,kBAAkBA;AAC5C;AAEO,SAASC,EAAW;AAAA,EACvB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAAX;AAAA,EACA,GAAAE;AAAA,EACA,YAAAU;AAAA,EACA,WAAAC;AAAA,EACA,OAAAf;AAAA,EACA,QAAAC;AAAA,EACA,YAAAe;AAAA,E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EAAa,MAAM;AAAA,QAE/F,UAAAW,gBAAAA,EAAAA,IAAC,QAAA,EAAK,YAAYX,EAAa,QAAQ,kBAAiB,WACnD,UAAAF,EAAY,SAASA,EAAY,MAAA,CACtC;AAAA,MAAA;AAAA,IAAA;AAAA,EACJ,GAER;AAER;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../src/heatmap/components/Chart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../src/heatmap/components/Chart.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAMzD,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAKlE,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,aAAa,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,WAAW,EAAE,UAAU,EAAE,mBAAmB,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAgDtM,wBAAgB,KAAK,CAAC,SAAS,EAAE,EAC7B,WAAW,EACX,QAAQ,EACR,UAAU,EACV,MAAM,EACN,KAAK,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACb,aAAa,EACb,UAAU,EACV,aAAa,EACb,SAAS,EACT,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,WAAW,EACX,qBAAqB,EACrB,mBAAmB,EACnB,GAAG,EACH,WAAW,EACX,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,YAAY,GACf,EAAE;IACC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC;IAC7B,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,WA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
|
import { r as ne } from "../../node_modules/react-dom/index.js";
|
|
4
4
|
import { Tooltip as S } from "../../common/Tooltip.js";
|
|
@@ -6,52 +6,57 @@ import { useDataFrame as oe } from "../../common/useDataFrame.js";
|
|
|
6
6
|
import { FONT_SIZE as re, FACET_TITLE_OFFSET as ie } from "../constants.js";
|
|
7
7
|
import { Annotations as fe } from "./Annotations/index.js";
|
|
8
8
|
import { Captions as ue } from "./Captions/index.js";
|
|
9
|
-
import { Dendrograms as
|
|
9
|
+
import { Dendrograms as me } from "./Dendrograms.js";
|
|
10
10
|
import { Frames as le } from "./Frames.js";
|
|
11
|
-
|
|
11
|
+
import { format as xe } from "../../node_modules/d3-format/src/defaultLocale.js";
|
|
12
|
+
function j(e, n) {
|
|
12
13
|
if (e === null)
|
|
13
14
|
return "null";
|
|
14
15
|
if (typeof e == "number") {
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
if (n)
|
|
17
|
+
return xe(n)(e);
|
|
18
|
+
const o = e > 0 ? Math.floor(e) : Math.ceil(e), r = e - o;
|
|
19
|
+
return o + Number(r.toPrecision(2));
|
|
17
20
|
}
|
|
18
21
|
return e;
|
|
19
22
|
}
|
|
20
|
-
function
|
|
21
|
-
const
|
|
23
|
+
function ae(e, n, o, r = []) {
|
|
24
|
+
const a = [
|
|
22
25
|
`X: ${o.xLabels[n.x]}`,
|
|
23
26
|
`Y: ${o.yLabels[n.y]}`,
|
|
24
|
-
`Value: ${
|
|
27
|
+
`Value: ${j(n.value)}${n.value !== n.normalizedValue ? ` (${j(n.normalizedValue)})` : ""}`
|
|
25
28
|
];
|
|
26
|
-
for (const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
for (const l of r) {
|
|
30
|
+
const h = e.getColumnValue(l.value, n.idx);
|
|
31
|
+
a.push(`${l.label}: ${j(h, l.format)}`);
|
|
32
|
+
}
|
|
33
|
+
return a;
|
|
29
34
|
}
|
|
30
|
-
function
|
|
35
|
+
function ce(e, n) {
|
|
31
36
|
const o = [];
|
|
32
|
-
return e.xKey && o.push(`X: ${n.xLabels[e.xKey]}`), e.yKey && o.push(`Y: ${n.yLabels[e.yKey]}`), o.push(`${e.title}: ${
|
|
37
|
+
return e.xKey && o.push(`X: ${n.xLabels[e.xKey]}`), e.yKey && o.push(`Y: ${n.yLabels[e.yKey]}`), o.push(`${e.title}: ${j(e.value, e.column.format)}`), o;
|
|
33
38
|
}
|
|
34
|
-
function
|
|
39
|
+
function de(e) {
|
|
35
40
|
return e !== null && "isAnnotation" in e;
|
|
36
41
|
}
|
|
37
42
|
function W(e) {
|
|
38
43
|
return e !== null && "isCell" in e;
|
|
39
44
|
}
|
|
40
|
-
function
|
|
45
|
+
function Le({
|
|
41
46
|
dendrograms: e,
|
|
42
47
|
facetKey: n,
|
|
43
48
|
dimensions: o,
|
|
44
|
-
scales:
|
|
45
|
-
cells:
|
|
46
|
-
xGroupKeys:
|
|
47
|
-
yGroupKeys:
|
|
48
|
-
xKeysByGroups:
|
|
49
|
-
yKeysByGroups:
|
|
49
|
+
scales: r,
|
|
50
|
+
cells: a,
|
|
51
|
+
xGroupKeys: l,
|
|
52
|
+
yGroupKeys: h,
|
|
53
|
+
xKeysByGroups: b,
|
|
54
|
+
yKeysByGroups: p,
|
|
50
55
|
colorScale: z,
|
|
51
|
-
chartSettings:
|
|
56
|
+
chartSettings: s,
|
|
52
57
|
cellsMeta: f,
|
|
53
58
|
stepX: c,
|
|
54
|
-
stepY:
|
|
59
|
+
stepY: g,
|
|
55
60
|
sharedX: H,
|
|
56
61
|
sharedY: I,
|
|
57
62
|
annotations: N,
|
|
@@ -59,24 +64,24 @@ function pe({
|
|
|
59
64
|
dendrogramAesScales: R,
|
|
60
65
|
aes: T,
|
|
61
66
|
labelAngles: Z,
|
|
62
|
-
chartSizes:
|
|
67
|
+
chartSizes: y,
|
|
63
68
|
margins: $,
|
|
64
69
|
tooltipsContainer: A,
|
|
65
70
|
tooltipsData: t
|
|
66
71
|
}) {
|
|
67
|
-
const q = oe(), [
|
|
68
|
-
left: $.left + o.left +
|
|
69
|
-
right:
|
|
70
|
-
top: $.top + o.top +
|
|
71
|
-
bottom:
|
|
72
|
-
}, k = !1, M =
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
/* @__PURE__ */
|
|
72
|
+
const q = oe(), [C, J] = te.useState(), { xAxis: Q, yAxis: U, tooltips: E } = s, { width: V, height: v } = o.inner, { padding: m, chartEdgeSides: D, sideElementBBoxes: x } = o, { xGroupLabels: K, yGroupLabels: G, xLabels: Y, yLabels: X } = f, L = r.x.domain(), w = r.y.domain(), _ = {
|
|
73
|
+
left: $.left + o.left + m.left,
|
|
74
|
+
right: y.totalWidth - ($.left + o.left + m.left),
|
|
75
|
+
top: $.top + o.top + m.top,
|
|
76
|
+
bottom: y.totalHeight - ($.top + o.top + m.top)
|
|
77
|
+
}, k = !1, M = C && t.fixed;
|
|
78
|
+
return /* @__PURE__ */ i.jsxs("g", { transform: `translate(${o.left},${o.top})`, fontSize: re, children: [
|
|
79
|
+
/* @__PURE__ */ i.jsxs("g", { transform: `translate(${m.left},${m.top})`, children: [
|
|
80
|
+
/* @__PURE__ */ i.jsx(
|
|
76
81
|
fe,
|
|
77
82
|
{
|
|
78
83
|
facetKey: n,
|
|
79
|
-
sideElementBBoxes:
|
|
84
|
+
sideElementBBoxes: x,
|
|
80
85
|
annotations: N,
|
|
81
86
|
cellsMeta: f,
|
|
82
87
|
annotationColorScales: P,
|
|
@@ -85,24 +90,24 @@ function pe({
|
|
|
85
90
|
chartEdgeSides: D,
|
|
86
91
|
width: V,
|
|
87
92
|
height: v,
|
|
88
|
-
scales:
|
|
93
|
+
scales: r,
|
|
89
94
|
stepX: c,
|
|
90
|
-
stepY:
|
|
95
|
+
stepY: g,
|
|
91
96
|
aes: T,
|
|
92
|
-
frame:
|
|
93
|
-
xGroupKeys:
|
|
94
|
-
yGroupKeys:
|
|
95
|
-
xKeysByGroups:
|
|
96
|
-
yKeysByGroups:
|
|
97
|
+
frame: s.frame,
|
|
98
|
+
xGroupKeys: l,
|
|
99
|
+
yGroupKeys: h,
|
|
100
|
+
xKeysByGroups: b,
|
|
101
|
+
yKeysByGroups: p,
|
|
97
102
|
tooltipsData: t,
|
|
98
|
-
activeElementContainer:
|
|
103
|
+
activeElementContainer: C
|
|
99
104
|
}
|
|
100
105
|
),
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
|
|
106
|
+
/* @__PURE__ */ i.jsx(
|
|
107
|
+
me,
|
|
103
108
|
{
|
|
104
109
|
dendrograms: e,
|
|
105
|
-
sideElementBBoxes:
|
|
110
|
+
sideElementBBoxes: x,
|
|
106
111
|
xGroupKeys: f.xGroupKeys,
|
|
107
112
|
yGroupKeys: f.yGroupKeys,
|
|
108
113
|
xDataByKeys: f.xDataByKeys,
|
|
@@ -110,68 +115,68 @@ function pe({
|
|
|
110
115
|
aesScales: R
|
|
111
116
|
}
|
|
112
117
|
),
|
|
113
|
-
|
|
118
|
+
x.top.facetTitle.isVisible && /* @__PURE__ */ i.jsx(
|
|
114
119
|
"text",
|
|
115
120
|
{
|
|
116
|
-
x:
|
|
117
|
-
y:
|
|
121
|
+
x: x.top.facetTitle.x,
|
|
122
|
+
y: x.top.facetTitle.y + x.top.facetTitle.height - ie,
|
|
118
123
|
fontWeight: "500",
|
|
119
124
|
fontSize: "20px",
|
|
120
125
|
children: f.facetKeyValues[n].join(", ")
|
|
121
126
|
}
|
|
122
127
|
),
|
|
123
128
|
k,
|
|
124
|
-
|
|
125
|
-
(d) => w.map((
|
|
129
|
+
L.map(
|
|
130
|
+
(d) => w.map((F) => {
|
|
126
131
|
var O;
|
|
127
|
-
const u = (O =
|
|
132
|
+
const u = (O = a == null ? void 0 : a[d]) == null ? void 0 : O[F], ee = M && W(t.selectedData) && (u == null ? void 0 : u.id) === t.selectedData.id, B = u ? /* @__PURE__ */ i.jsx(
|
|
128
133
|
"rect",
|
|
129
134
|
{
|
|
130
|
-
x:
|
|
131
|
-
y:
|
|
135
|
+
x: r.x(d),
|
|
136
|
+
y: r.y(F),
|
|
132
137
|
width: c,
|
|
133
|
-
height:
|
|
138
|
+
height: g,
|
|
134
139
|
stroke: T.cellStrokeColor,
|
|
135
140
|
fill: u.value === null ? T.emptyCellColor : z(u.normalizedValue),
|
|
136
141
|
onMouseOver: () => t.onMouseEnter(u, n),
|
|
137
142
|
onMouseLeave: () => t.onMouseLeave()
|
|
138
143
|
},
|
|
139
|
-
u ? u.id : `${d}_${
|
|
144
|
+
u ? u.id : `${d}_${F}`
|
|
140
145
|
) : null;
|
|
141
|
-
return ee ? ne.createPortal(B,
|
|
146
|
+
return ee ? ne.createPortal(B, C) : B;
|
|
142
147
|
})
|
|
143
148
|
),
|
|
144
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ i.jsx(
|
|
145
150
|
le,
|
|
146
151
|
{
|
|
147
|
-
frame:
|
|
148
|
-
xGroupKeys:
|
|
149
|
-
yGroupKeys:
|
|
150
|
-
xKeysByGroups:
|
|
151
|
-
yKeysByGroups:
|
|
152
|
-
scales:
|
|
152
|
+
frame: s.frame,
|
|
153
|
+
xGroupKeys: l,
|
|
154
|
+
yGroupKeys: h,
|
|
155
|
+
xKeysByGroups: b,
|
|
156
|
+
yKeysByGroups: p,
|
|
157
|
+
scales: r,
|
|
153
158
|
stepX: c,
|
|
154
|
-
stepY:
|
|
159
|
+
stepY: g,
|
|
155
160
|
width: V,
|
|
156
161
|
height: v
|
|
157
162
|
}
|
|
158
163
|
),
|
|
159
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ i.jsx(
|
|
160
165
|
ue,
|
|
161
166
|
{
|
|
162
167
|
xAxis: Q,
|
|
163
168
|
yAxis: U,
|
|
164
|
-
scales:
|
|
169
|
+
scales: r,
|
|
165
170
|
stepX: c,
|
|
166
|
-
stepY:
|
|
171
|
+
stepY: g,
|
|
167
172
|
debug: k,
|
|
168
|
-
sideElementBBoxes:
|
|
169
|
-
xKeys:
|
|
173
|
+
sideElementBBoxes: x,
|
|
174
|
+
xKeys: L,
|
|
170
175
|
yKeys: w,
|
|
171
|
-
xGroupKeys:
|
|
172
|
-
yGroupKeys:
|
|
173
|
-
xKeysByGroups:
|
|
174
|
-
yKeysByGroups:
|
|
176
|
+
xGroupKeys: l,
|
|
177
|
+
yGroupKeys: h,
|
|
178
|
+
xKeysByGroups: b,
|
|
179
|
+
yKeysByGroups: p,
|
|
175
180
|
xGroupLabels: K,
|
|
176
181
|
yGroupLabels: G,
|
|
177
182
|
labelAngles: Z,
|
|
@@ -180,13 +185,13 @@ function pe({
|
|
|
180
185
|
}
|
|
181
186
|
)
|
|
182
187
|
] }),
|
|
183
|
-
|
|
188
|
+
s.tooltips.show && W(t.selectedData) && t.currentFacet === n && /* @__PURE__ */ i.jsx(
|
|
184
189
|
S,
|
|
185
190
|
{
|
|
186
|
-
content:
|
|
187
|
-
x:
|
|
188
|
-
y:
|
|
189
|
-
offset:
|
|
191
|
+
content: ae(q, t.selectedData, f, E == null ? void 0 : E.content),
|
|
192
|
+
x: r.x(String(t.selectedData.x)) + c / 2,
|
|
193
|
+
y: r.y(String(t.selectedData.y)) + g / 2,
|
|
194
|
+
offset: L.length > 1 ? c / 2 : 0,
|
|
190
195
|
active: !0,
|
|
191
196
|
sideDistances: _,
|
|
192
197
|
fixed: t.fixed,
|
|
@@ -194,10 +199,10 @@ function pe({
|
|
|
194
199
|
container: A
|
|
195
200
|
}
|
|
196
201
|
),
|
|
197
|
-
|
|
202
|
+
s.tooltips.show && de(t.selectedData) && t.currentFacet === n && /* @__PURE__ */ i.jsx(
|
|
198
203
|
S,
|
|
199
204
|
{
|
|
200
|
-
content:
|
|
205
|
+
content: ce(t.selectedData, f),
|
|
201
206
|
x: t.selectedData.x,
|
|
202
207
|
y: t.selectedData.y,
|
|
203
208
|
offset: 0,
|
|
@@ -208,13 +213,13 @@ function pe({
|
|
|
208
213
|
container: A
|
|
209
214
|
}
|
|
210
215
|
),
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
t.fixed && /* @__PURE__ */
|
|
213
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ i.jsxs("g", { transform: `translate(${m.left},${m.top})`, children: [
|
|
217
|
+
t.fixed && /* @__PURE__ */ i.jsx("rect", { width: y.chartWidth, height: y.chartHeight, fill: "rgba(255, 255, 255, 0.8)" }),
|
|
218
|
+
/* @__PURE__ */ i.jsx(
|
|
214
219
|
"g",
|
|
215
220
|
{
|
|
216
221
|
ref: (d) => {
|
|
217
|
-
d && !
|
|
222
|
+
d && !C && J(d);
|
|
218
223
|
}
|
|
219
224
|
}
|
|
220
225
|
)
|
|
@@ -222,6 +227,6 @@ function pe({
|
|
|
222
227
|
] });
|
|
223
228
|
}
|
|
224
229
|
export {
|
|
225
|
-
|
|
230
|
+
Le as Chart
|
|
226
231
|
};
|
|
227
232
|
//# sourceMappingURL=Chart.js.map
|