@astrato-io/visualizations 0.10.1 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -1
- package/README.md +19 -1
- package/THIRD_PARTY_NOTICES.md +494 -0
- package/VISUALIZATION_DEFINITIONS.md +6 -145
- package/chunks/{Button-Dn3rJrYf.js → Button-CPG4WX8X.js} +3 -3
- package/chunks/{CircularProgress-BFeu06Yb.js → CircularProgress-PSLW8HmD.js} +12 -12
- package/chunks/FieldTypeIcon-5k2bkqd0.js +22 -0
- package/chunks/{LinearProgress-ClO6GUjN.js → LinearProgress-KQ2EQlGL.js} +16 -16
- package/chunks/{MenuOption-Czc34u4q.js → MenuOption-B-6K7kks.js} +151 -151
- package/chunks/{Title-BgYnaVTR.js → Title-BmvwZYkh.js} +32 -32
- package/chunks/{_createAggregator-BMu9uRax.js → _createAggregator-CFmH6gUN.js} +16 -16
- package/chunks/{app-filter-bar.compiler-CVir0wkl.js → app-filter-bar.compiler-BY5-T16I.js} +8 -8
- package/chunks/{bar-layout-C_UgRlVl.js → bar-layout-BNou0dZF.js} +2 -2
- package/chunks/{bar.compiler-DYuFdi9J.js → bar.compiler-BkhO7sDd.js} +58 -56
- package/chunks/{builder-C-TKA-My.js → builder-CNjuqD2z.js} +107 -56
- package/chunks/category-axis-D1OVyMrr.js +20 -0
- package/chunks/{coloring-BtnPiQ_o.js → coloring-BOiP0rmn.js} +51 -51
- package/chunks/{createSimplePaletteValueFilter--zrZxRV9.js → createSimplePaletteValueFilter-BkgQ7MFE.js} +166 -166
- package/chunks/defaults-B5_8S-J-.js +3 -0
- package/chunks/{definitions-CT304NDn.js → definitions-AS9GcavE.js} +228 -233
- package/chunks/{escobar-CvEV2ES1.js → escobar-cQ1eQ64G.js} +4183 -4183
- package/chunks/{extend-preset-D9-JP92b.js → extend-preset-BlCbcXKR.js} +427 -427
- package/chunks/{filter.compiler-CXeZznks.js → filter.compiler-CI7dDNM1.js} +10 -10
- package/chunks/{filtering-8_bFv-jb.js → filtering-Dwi7hDPZ.js} +308 -308
- package/chunks/{handlers-C6CZ0XJA.js → handlers-C63NVo7i.js} +4593 -4559
- package/chunks/{icon-picker-styles-BXiJ1SZS.js → icon-picker-styles-CBlxEu3s.js} +8 -8
- package/chunks/{isEqual-D8Ay63xR.js → isEqual-BdHo6wqq.js} +1 -1
- package/chunks/{isFocusVisible-Bu8gGZu5.js → isFocusVisible-C1nlVUwL.js} +9 -9
- package/chunks/line.compiler-DCv3h42f.js +198 -0
- package/chunks/linear-Bq_r9l5S.js +264 -0
- package/chunks/{logger-DdZpR7xZ.js → logger-Bc-DqDM_.js} +64 -64
- package/chunks/{lookup-BWllin0q.js → lookup-B3tWH2hX.js} +1 -0
- package/chunks/{map.compiler-Q_Y1Pvat.js → map.compiler-CRO6XpdI.js} +43 -43
- package/chunks/measure-format-default-B6ghxih7.js +22 -0
- package/chunks/{metadata-BQm_TXI1.js → metadata-CtkvZEhS.js} +1 -1
- package/chunks/number.compiler-kV4lobCZ.js +57 -0
- package/chunks/{operations-DKQWuLL7.js → operations-COl9wgqi.js} +8524 -8480
- package/chunks/{range-BdhzvYQ_.js → range-CMJ5yc5Z.js} +2 -2
- package/chunks/{react-dom-BGP4tbXV.js → react-dom-BjsCbYHq.js} +76 -76
- package/chunks/{render-wrappers-BZpyDnJy.js → render-wrappers-DFHi3Wkr.js} +1 -1
- package/chunks/{requirements-e8Fe96ag.js → requirements-C5YLmHKe.js} +250 -226
- package/chunks/{shared-C_2F90xq.js → shared-DyqxOie0.js} +504 -498
- package/chunks/standalone-06i1wmIX.js +6 -0
- package/chunks/{standalone-BDrXVxlP.js → standalone-9jrQ3zJT.js} +10 -10
- package/chunks/standalone-B6zUvxNQ.js +357 -0
- package/chunks/{standalone-BkbiH-o8.js → standalone-BYK2U0Vd.js} +418 -679
- package/chunks/standalone-Be5APcVv.js +762 -0
- package/chunks/{standalone-Cl0TSfqC.js → standalone-Bp4G3MDx.js} +123 -123
- package/chunks/{standalone-DNh9NcMa.js → standalone-BrjtMIdd.js} +145 -145
- package/chunks/{standalone-BTY3w_JA.js → standalone-Bsfz5vnJ.js} +53 -53
- package/chunks/standalone-BuXpKMnc.js +2 -0
- package/chunks/standalone-CIjNYyya.js +8378 -0
- package/chunks/{standalone-CsoMmE9T.js → standalone-CS5VGoja.js} +347 -347
- package/chunks/standalone-CUGt2FUF.js +2 -0
- package/chunks/{standalone-CaTxAydz.js → standalone-ChfEHb28.js} +2296 -1069
- package/chunks/standalone-CnF2OYLQ.js +355 -0
- package/chunks/standalone-CznEEiq3.js +422 -0
- package/chunks/{standalone-DflyWtuR.js → standalone-D9k5SCd8.js} +169 -169
- package/chunks/{standalone-Cc98Pdr6.js → standalone-DYVYccmY.js} +829 -829
- package/chunks/{standalone-CY_kjarf.js → standalone-DaNxWIKn.js} +22 -22
- package/chunks/{standalone-wOWRCpdn.js → standalone-Db_HNuWx.js} +48 -48
- package/chunks/standalone-DcuE8KBa.js +287 -0
- package/chunks/{standalone-BE_ONgiG.js → standalone-I5kRIsp8.js} +76 -76
- package/chunks/{standalone-B8ZSqauS.js → standalone-K2OvRAQM.js} +113 -113
- package/chunks/{standalone-z0o52o5t.js → standalone-c4CPN6ug.js} +1719 -1718
- package/chunks/{standalone-DHRalbVO.js → standalone-iOnJhCvA.js} +312 -312
- package/chunks/{standalone-CXY4FpF7.js → standalone-pCrzBiTy.js} +222 -222
- package/chunks/standalone-qrZaimgC.js +689 -0
- package/chunks/standalone-yqDJ8h3K.js +1012 -0
- package/chunks/{table.compiler-COaHE9VD.js → table.compiler-CMH_dtYs.js} +35 -35
- package/chunks/{useFieldName-CdnCWzhd.js → useFieldName-BfxBzhhH.js} +1 -1
- package/chunks/{utils-DganVptf.js → utils-BdJrEeIQ.js} +3924 -3910
- package/chunks/{view-Bzlros43.js → view-Q-_XIrWE.js} +1680 -1680
- package/chunks/{visualization-filters-D7i6oh1Z.js → visualization-filters-BwS0xUqs.js} +1705 -1686
- package/chunks/{with-html-element-CiIhFEa5.js → with-html-element-D_ooGNWI.js} +3962 -3950
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +30 -1
- package/docs/operations/combo.md +30 -1
- package/docs/operations/date-picker.md +1 -1
- package/docs/operations/distribution-gauge.md +1 -1
- package/docs/operations/dot.md +1 -1
- package/docs/operations/filter.md +1 -1
- package/docs/operations/gauge.md +1 -1
- package/docs/operations/heatMap.md +1 -1
- package/docs/operations/histogram.md +1 -1
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +5 -4
- package/docs/operations/line.md +30 -1
- package/docs/operations/map.md +5274 -0
- package/docs/operations/number.md +1 -1
- package/docs/operations/pie.md +1 -1
- package/docs/operations/radar.md +1 -1
- package/docs/operations/sankey.md +1 -1
- package/docs/operations/scatter.md +1 -1
- package/docs/operations/shape.md +1 -1
- package/docs/operations/simpleTextObject.md +1 -1
- package/docs/operations/slider.md +1 -1
- package/docs/operations/table.md +1 -1
- package/docs/operations/tree.md +1 -1
- package/docs/operations/treemap.md +1 -1
- package/docs/operations/waterfall.md +1 -1
- package/docs/operations/word-cloud.md +1 -1
- package/getters.js +3 -3
- package/index.js +524 -500
- package/metadata.js +2 -2
- package/operations.js +6 -6
- package/package.json +73 -68
- package/src/definitions/index.d.ts +1 -7
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +3 -48
- package/src/definitions/model/definitions/schema-registry.d.ts +2 -2
- package/src/definitions/model/definitions/schemas/bar.schema.d.ts +1 -1
- package/src/definitions/model/definitions/schemas/broad-chart.schema.d.ts +2 -2
- package/src/definitions/model/definitions/schemas/common.schema.d.ts +14 -2
- package/src/definitions/model/definitions/schemas/index.d.ts +1 -1
- package/src/definitions/model/definitions/schemas/line.schema.d.ts +1 -1
- package/src/visualization-catalog.d.ts +3 -0
- package/styles.css +1 -1
- package/chunks/FieldTypeIcon-DrMoGpHJ.js +0 -22
- package/chunks/defaults-Dtk7fg3C.js +0 -3
- package/chunks/line.compiler-DmHpmQCC.js +0 -198
- package/chunks/number.compiler-DQdg6zTy.js +0 -53
- package/chunks/standalone-4MsKiqs0.js +0 -355
- package/chunks/standalone-B794g9pE.js +0 -1012
- package/chunks/standalone-BA2YXyJS.js +0 -422
- package/chunks/standalone-BgumbdaJ2.js +0 -357
- package/chunks/standalone-Blh4qejk.js +0 -689
- package/chunks/standalone-DH0xTEes.js +0 -2
- package/chunks/standalone-DcnHjNnC.js +0 -2
- package/chunks/standalone-DrHdGkY7.js +0 -762
- package/chunks/standalone-c_rROMtx.js +0 -287
- package/chunks/standalone-drcFLeN6.js +0 -6
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { o as e, t } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "./logger-
|
|
6
|
-
import {
|
|
7
|
-
import { t as ae } from "./coloring-
|
|
2
|
+
import { Cc as n, Ec as r, Hc as i, N as a, Na as o, Pi as s, Uo as c, fa as l, fc as u, fs as d, ln as f, os as p, ri as m } from "./visualization-filters-BwS0xUqs.js";
|
|
3
|
+
import { Br as h, I as g, Mt as _, P as v, s as y } from "./utils-BdJrEeIQ.js";
|
|
4
|
+
import { v_ as ee } from "./handlers-C63NVo7i.js";
|
|
5
|
+
import "./logger-Bc-DqDM_.js";
|
|
6
|
+
import { $t as b, Cn as x, L as S, Mt as te, Pt as ne, R as C, Rt as w, Sn as T, Tn as E, _ as re, bt as D, i as ie, jn as O, ln as k } from "./escobar-cQ1eQ64G.js";
|
|
7
|
+
import { t as ae } from "./coloring-BOiP0rmn.js";
|
|
8
8
|
import { t as oe } from "./set-coloring-datafield-B3uIS1Pe.js";
|
|
9
|
-
import { t as se } from "./_createAggregator-
|
|
10
|
-
import { t as A } from "./range-
|
|
9
|
+
import { t as se } from "./_createAggregator-CFmH6gUN.js";
|
|
10
|
+
import { t as A } from "./range-CMJ5yc5Z.js";
|
|
11
11
|
var j = (e, t, n) => {
|
|
12
|
-
let
|
|
12
|
+
let r = e.dimensions.filter((e) => m(e)), a = e.measures.filter((e) => m(e)), o = i(r[0]?.dataItem), s = i(r[1]?.dataItem), c = {
|
|
13
13
|
key: "defaultCollection",
|
|
14
14
|
data: { extract: [{
|
|
15
15
|
field: o,
|
|
16
16
|
props: {
|
|
17
|
-
score: { field:
|
|
18
|
-
attribute: { field:
|
|
19
|
-
...
|
|
17
|
+
score: { field: i(a[0]?.dataItem) },
|
|
18
|
+
attribute: { field: s || o },
|
|
19
|
+
...s ? { stackedDimension: { field: o } } : {}
|
|
20
20
|
}
|
|
21
21
|
}] }
|
|
22
22
|
};
|
|
23
23
|
return {
|
|
24
24
|
...n,
|
|
25
|
-
collections: [
|
|
25
|
+
collections: [c]
|
|
26
26
|
};
|
|
27
27
|
}, M = (e, t, n) => {
|
|
28
|
-
let
|
|
28
|
+
let r = {
|
|
29
29
|
key: "defaultCollection",
|
|
30
|
-
data: { extract: e.measures.filter((e) =>
|
|
31
|
-
let t =
|
|
30
|
+
data: { extract: e.measures.filter((e) => m(e)).map((e) => {
|
|
31
|
+
let t = i(e.dataItem);
|
|
32
32
|
return {
|
|
33
33
|
field: t,
|
|
34
34
|
props: {
|
|
35
35
|
score: { field: t },
|
|
36
36
|
attribute: e.label,
|
|
37
37
|
color: t,
|
|
38
|
-
label:
|
|
38
|
+
label: f(e) || e.label || e.dataItem.name
|
|
39
39
|
},
|
|
40
40
|
getValue: () => e.label
|
|
41
41
|
};
|
|
@@ -43,84 +43,84 @@ var j = (e, t, n) => {
|
|
|
43
43
|
};
|
|
44
44
|
return {
|
|
45
45
|
...n,
|
|
46
|
-
collections: [
|
|
46
|
+
collections: [r]
|
|
47
47
|
};
|
|
48
|
-
}, N = (e, ...t) => e.dimensions.filter((e) =>
|
|
49
|
-
let
|
|
50
|
-
type:
|
|
51
|
-
key: `${
|
|
52
|
-
layout: { displayOrder:
|
|
48
|
+
}, N = (e, ...t) => e.dimensions.filter((e) => m(e)).length ? j(e, ...t) : M(e, ...t), P = (e, t, n, a, o, c) => {
|
|
49
|
+
let l = i(e.dimensions.filter((e) => m(e))[1]?.dataItem), u = new ae(e, t, o?.[0]?.itemsNotAffectedByFiltering), d = e.coloring?.color == null && e.coloring?.type === r.Single, f = {
|
|
50
|
+
type: O.Radar,
|
|
51
|
+
key: `${O.Radar}`,
|
|
52
|
+
layout: { displayOrder: b.VisualizationElement },
|
|
53
53
|
data: { collection: "defaultCollection" },
|
|
54
54
|
settings: {
|
|
55
55
|
dimensionAxis: e.dimensionAxis,
|
|
56
56
|
measureAxis: e.measureAxis,
|
|
57
57
|
gridType: e.gridType,
|
|
58
58
|
lineType: e.lineType,
|
|
59
|
-
isDefaultColor:
|
|
60
|
-
isSingleDimension: !
|
|
59
|
+
isDefaultColor: d,
|
|
60
|
+
isSingleDimension: !l,
|
|
61
61
|
scale: "attributes",
|
|
62
|
-
categoricalOpacity: e.coloring?.categoricalColorTransparency ??
|
|
62
|
+
categoricalOpacity: e.coloring?.categoricalColorTransparency ?? s.categoricalColorTransparency,
|
|
63
63
|
pointStyles: e.pointStyles,
|
|
64
|
-
fill:
|
|
65
|
-
overwriteSources: [
|
|
64
|
+
fill: u.getColorDefinition({
|
|
65
|
+
overwriteSources: [u.MAIN_FIELD],
|
|
66
66
|
ref: "color"
|
|
67
67
|
})
|
|
68
68
|
},
|
|
69
|
-
brush:
|
|
69
|
+
brush: k(F(e), c, { valuePickerMode: c?.valuePickerMode })
|
|
70
70
|
};
|
|
71
71
|
return {
|
|
72
72
|
...n,
|
|
73
|
-
components: [...n.components,
|
|
73
|
+
components: [...n.components, f]
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
76
|
function F(e) {
|
|
77
|
-
let t = [], n = e.dimensions.filter((e) =>
|
|
77
|
+
let t = [], n = e.dimensions.filter((e) => m(e));
|
|
78
78
|
return n[0] && t.push(""), n[1] && t.push("attribute"), t;
|
|
79
79
|
}
|
|
80
80
|
var I = (e, t, n) => {
|
|
81
|
-
let
|
|
81
|
+
let r = e.dimensions.filter((e) => m(e)), a = e.measures.filter((e) => m(e)), o = i(r[0]?.dataItem), s = i(r[1]?.dataItem), c = i(a[0]?.dataItem);
|
|
82
82
|
return {
|
|
83
83
|
...n,
|
|
84
84
|
scales: {
|
|
85
85
|
...n.scales,
|
|
86
86
|
...z(e, t, n),
|
|
87
87
|
values: {
|
|
88
|
-
data: { field:
|
|
88
|
+
data: { field: c },
|
|
89
89
|
include: [0],
|
|
90
90
|
nice: !0
|
|
91
91
|
},
|
|
92
|
-
attributes: { data: { extract: { field:
|
|
92
|
+
attributes: { data: { extract: { field: s || o } } }
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
}, L = (e, t, n) => {
|
|
96
|
-
let
|
|
96
|
+
let r = e.measures.filter((e) => m(e));
|
|
97
97
|
return {
|
|
98
98
|
...n,
|
|
99
99
|
scales: {
|
|
100
100
|
...n.scales,
|
|
101
101
|
...B(e, t),
|
|
102
102
|
values: {
|
|
103
|
-
data: { fields:
|
|
103
|
+
data: { fields: r.map((e) => i(e.dataItem)) },
|
|
104
104
|
include: [0],
|
|
105
105
|
nice: !0
|
|
106
106
|
},
|
|
107
107
|
attributes: {
|
|
108
|
-
type:
|
|
109
|
-
data:
|
|
108
|
+
type: E.Band,
|
|
109
|
+
data: r.map((e) => f(e) || e.label || e.dataItem.name)
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
|
-
}, R = (e, ...t) => e.dimensions.filter((e) =>
|
|
113
|
+
}, R = (e, ...t) => e.dimensions.filter((e) => m(e)).length ? I(e, ...t) : L(e, ...t);
|
|
114
114
|
function z(e, t, n) {
|
|
115
|
-
let
|
|
116
|
-
switch (
|
|
117
|
-
case
|
|
118
|
-
data: { extract: { field:
|
|
119
|
-
type:
|
|
115
|
+
let a = i(e.dimensions.filter((e) => m(e))[0]?.dataItem);
|
|
116
|
+
switch (te(n, 0, { color: { field: a } }), e.coloring?.type) {
|
|
117
|
+
case r.Single: return { [r.Single]: {
|
|
118
|
+
data: { extract: { field: a } },
|
|
119
|
+
type: E.CategoricalColor,
|
|
120
120
|
range: [e?.coloring?.color ?? t.colors.brandColors[0]]
|
|
121
121
|
} };
|
|
122
|
-
case
|
|
123
|
-
customPalette: e.coloring.customPalette ??
|
|
122
|
+
case r.Categorical: return { [r.Categorical]: w(oe(e, a), t, a, {
|
|
123
|
+
customPalette: e.coloring.customPalette ?? s.customPalette,
|
|
124
124
|
palette: e.coloring.palette,
|
|
125
125
|
sortOrder: e.coloring.sortOrder
|
|
126
126
|
}, n.collections) };
|
|
@@ -128,16 +128,16 @@ function z(e, t, n) {
|
|
|
128
128
|
return {};
|
|
129
129
|
}
|
|
130
130
|
function B(e, t) {
|
|
131
|
-
let n = e.measures.filter((e) =>
|
|
132
|
-
return { [
|
|
131
|
+
let n = e.measures.filter((e) => m(e));
|
|
132
|
+
return { [r.Single]: {
|
|
133
133
|
data: { items: n.map((e) => {
|
|
134
|
-
let t =
|
|
134
|
+
let t = f(e) || e.label || e.dataItem.name;
|
|
135
135
|
return {
|
|
136
|
-
value:
|
|
136
|
+
value: i(e.dataItem),
|
|
137
137
|
label: t
|
|
138
138
|
};
|
|
139
139
|
}) },
|
|
140
|
-
type:
|
|
140
|
+
type: E.CategoricalColor,
|
|
141
141
|
range: Array(n.length).fill(e?.coloring?.color ?? t.colors.brandColors[0]),
|
|
142
142
|
value: (e) => `${e.datum.value.value}`,
|
|
143
143
|
label: (e) => `${e.datum.value.label}`
|
|
@@ -167,8 +167,8 @@ var V = .9, H = "attributesLines", U = "dataPoint", W = "white", G = "rgba(128,
|
|
|
167
167
|
evenCustomBackgroundColor: null,
|
|
168
168
|
oddCustomBackgroundColor: null
|
|
169
169
|
},
|
|
170
|
-
gridType:
|
|
171
|
-
lineType:
|
|
170
|
+
gridType: d.Circles,
|
|
171
|
+
lineType: p.Straight,
|
|
172
172
|
isSingleDimension: !1,
|
|
173
173
|
scale: "attributes",
|
|
174
174
|
pointStyles: {
|
|
@@ -180,30 +180,30 @@ var V = .9, H = "attributesLines", U = "dataPoint", W = "white", G = "rgba(128,
|
|
|
180
180
|
} }, ce = (e, t, n, r, i, a) => {
|
|
181
181
|
if (!e.dimensionAxis.showLabel) return n;
|
|
182
182
|
let o = {
|
|
183
|
-
type:
|
|
183
|
+
type: O.Labels,
|
|
184
184
|
key: "radar-labels",
|
|
185
185
|
animations: { enabled: !1 },
|
|
186
|
-
layout: { displayOrder:
|
|
186
|
+
layout: { displayOrder: b.Labels },
|
|
187
187
|
settings: { sources: [{
|
|
188
|
-
component: `${
|
|
188
|
+
component: `${O.Radar}`,
|
|
189
189
|
selector: `.${H}`,
|
|
190
190
|
strategy: {
|
|
191
191
|
type: "slice",
|
|
192
192
|
settings: {
|
|
193
|
-
fontSize:
|
|
193
|
+
fontSize: T.dataPoint.valueFontSize,
|
|
194
194
|
fontFamily: t.fonts.general.fontFamily,
|
|
195
195
|
labels: [{
|
|
196
196
|
linkData: ({ data: e }) => e,
|
|
197
197
|
label: ({ data: e }) => e.label,
|
|
198
198
|
placements: [{
|
|
199
|
-
position:
|
|
199
|
+
position: ee.Outside,
|
|
200
200
|
fill: e.dimensionAxis.labelColor ?? void 0
|
|
201
201
|
}]
|
|
202
202
|
}]
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}] },
|
|
206
|
-
brush:
|
|
206
|
+
brush: k([""], a, { valuePickerMode: a?.valuePickerMode })
|
|
207
207
|
};
|
|
208
208
|
return {
|
|
209
209
|
...n,
|
|
@@ -247,51 +247,51 @@ function fe(e) {
|
|
|
247
247
|
}), t;
|
|
248
248
|
}
|
|
249
249
|
function J(e, t) {
|
|
250
|
-
let
|
|
251
|
-
e.forEach(({ x:
|
|
252
|
-
if (
|
|
253
|
-
let t = (
|
|
254
|
-
|
|
250
|
+
let n = [], { cp1: r, cp2: i } = pe(e), a = "M ";
|
|
251
|
+
e.forEach(({ x: o, y: s, ...c }, l) => {
|
|
252
|
+
if (a += `${o} ${s} `, t.lineType === p.Curve) {
|
|
253
|
+
let t = (l + 1) % e.length;
|
|
254
|
+
a += `C ${i[l].x} ${i[l].y}, ${r[t].x} ${r[t].y}, `;
|
|
255
255
|
}
|
|
256
|
-
if (!t.isGrid && "tooltip" in
|
|
257
|
-
let { fill: e, pointStyles:
|
|
258
|
-
|
|
259
|
-
type:
|
|
256
|
+
if (!t.isGrid && "tooltip" in c) {
|
|
257
|
+
let { fill: e, pointStyles: r } = t;
|
|
258
|
+
n.push({
|
|
259
|
+
type: x.Circle,
|
|
260
260
|
tag: U,
|
|
261
|
-
cx:
|
|
262
|
-
cy:
|
|
263
|
-
r:
|
|
264
|
-
stroke:
|
|
261
|
+
cx: o,
|
|
262
|
+
cy: s,
|
|
263
|
+
r: r.size / 2,
|
|
264
|
+
stroke: r.color ?? e,
|
|
265
265
|
strokeWidth: 1,
|
|
266
|
-
fill:
|
|
267
|
-
desc: { tooltip:
|
|
268
|
-
data:
|
|
266
|
+
fill: r.color ?? e,
|
|
267
|
+
desc: { tooltip: c.tooltip },
|
|
268
|
+
data: c?.data
|
|
269
269
|
});
|
|
270
270
|
}
|
|
271
|
-
}), t.lineType ===
|
|
272
|
-
let
|
|
273
|
-
t.isGrid ? (
|
|
274
|
-
type:
|
|
275
|
-
d: `${
|
|
276
|
-
stroke:
|
|
277
|
-
strokeWidth:
|
|
271
|
+
}), t.lineType === p.Curve && (a += `${e[0].x} ${e[0].y}`);
|
|
272
|
+
let o, s;
|
|
273
|
+
t.isGrid ? (o = t.lineStroke, s = t.lineStrokeWidth) : (o = me(t.fill), s = 1), n.push({
|
|
274
|
+
type: x.Path,
|
|
275
|
+
d: `${a}Z`,
|
|
276
|
+
stroke: o,
|
|
277
|
+
strokeWidth: s,
|
|
278
278
|
fill: "none",
|
|
279
279
|
tag: t.isGrid ? "gridline" : "dataline"
|
|
280
280
|
});
|
|
281
|
-
let
|
|
282
|
-
if (t.isGrid)
|
|
281
|
+
let c, l;
|
|
282
|
+
if (t.isGrid) c = t.backgroundColor, l = 1;
|
|
283
283
|
else {
|
|
284
|
-
|
|
284
|
+
c = t.fill;
|
|
285
285
|
let { isDefaultColor: e, opacity: n } = t;
|
|
286
|
-
|
|
286
|
+
l = e ? .4 : n ?? 1;
|
|
287
287
|
}
|
|
288
|
-
return
|
|
289
|
-
type:
|
|
290
|
-
d: `${
|
|
291
|
-
fill:
|
|
292
|
-
opacity:
|
|
288
|
+
return n.push({
|
|
289
|
+
type: x.Path,
|
|
290
|
+
d: `${a}Z`,
|
|
291
|
+
fill: c,
|
|
292
|
+
opacity: l,
|
|
293
293
|
tag: t.isGrid ? "gridarea" : "dataarea"
|
|
294
|
-
}),
|
|
294
|
+
}), n;
|
|
295
295
|
}
|
|
296
296
|
function pe(e) {
|
|
297
297
|
let t = e.length, n = [], r = [];
|
|
@@ -316,7 +316,7 @@ function me(e) {
|
|
|
316
316
|
var Y = /* @__PURE__ */ e(A());
|
|
317
317
|
function he(e, t, n) {
|
|
318
318
|
let r = [];
|
|
319
|
-
return t.gridType ===
|
|
319
|
+
return t.gridType === d.Lines ? r.push(..._e(e, t.measureAxis)) : r.push(...ge({
|
|
320
320
|
center: e.center,
|
|
321
321
|
radius: e.radius,
|
|
322
322
|
domain: e.domain
|
|
@@ -325,7 +325,7 @@ function he(e, t, n) {
|
|
|
325
325
|
function ge({ center: e, radius: t, domain: n }, r) {
|
|
326
326
|
let i = Z(r);
|
|
327
327
|
return X(r.rangeLayers, n).reverse().filter((e) => e > 0).map((a, o) => ({
|
|
328
|
-
type:
|
|
328
|
+
type: x.Circle,
|
|
329
329
|
cx: e.x,
|
|
330
330
|
cy: e.y,
|
|
331
331
|
r: t * a / n,
|
|
@@ -360,7 +360,7 @@ function ve(e, t, n) {
|
|
|
360
360
|
return c.forEach(({ x: e, y: r }, s) => {
|
|
361
361
|
let c = n[o[s]].source;
|
|
362
362
|
l.push({
|
|
363
|
-
type:
|
|
363
|
+
type: x.Line,
|
|
364
364
|
x1: i.x,
|
|
365
365
|
y1: i.y,
|
|
366
366
|
x2: e,
|
|
@@ -368,7 +368,7 @@ function ve(e, t, n) {
|
|
|
368
368
|
stroke: t.lineColor ?? "black",
|
|
369
369
|
strokeWidth: +!!t.showLine
|
|
370
370
|
}), l.push({
|
|
371
|
-
type:
|
|
371
|
+
type: x.Rect,
|
|
372
372
|
tag: H,
|
|
373
373
|
data: {
|
|
374
374
|
label: o[s],
|
|
@@ -416,21 +416,21 @@ var ye = {
|
|
|
416
416
|
render({ data: e }) {
|
|
417
417
|
let { chart: t, resolver: n } = this;
|
|
418
418
|
if (!t || !n) return [];
|
|
419
|
-
let { width:
|
|
420
|
-
if (!
|
|
421
|
-
let
|
|
419
|
+
let { width: i, height: a } = this.rect, o = ue(i, a), s = de(i, a), c = t.scale("attributes"), l = t.scale("values");
|
|
420
|
+
if (!c || !l) return [];
|
|
421
|
+
let u = c.ticks().length, d = c.domain(), f = l.domain()[1], p = this.settings.settings, { items: m } = n.resolve({
|
|
422
422
|
data: e,
|
|
423
|
-
settings:
|
|
424
|
-
}), h =
|
|
425
|
-
attributesAmount:
|
|
426
|
-
center:
|
|
427
|
-
radius:
|
|
423
|
+
settings: p
|
|
424
|
+
}), h = p.isSingleDimension ? [m] : Object.values((0, le.default)(m, "data.value")), g = q({
|
|
425
|
+
attributesAmount: u,
|
|
426
|
+
center: o,
|
|
427
|
+
radius: s
|
|
428
428
|
}), _ = [];
|
|
429
429
|
return h.forEach((e) => {
|
|
430
430
|
let n = e[0];
|
|
431
431
|
if (!n) return;
|
|
432
|
-
let
|
|
433
|
-
let t =
|
|
432
|
+
let i = e.map((e) => {
|
|
433
|
+
let t = d.findIndex((t) => t === e.data.attribute.value), n = e.data.score.value / f;
|
|
434
434
|
return {
|
|
435
435
|
...g(t, n),
|
|
436
436
|
tooltip: {
|
|
@@ -440,44 +440,44 @@ var ye = {
|
|
|
440
440
|
},
|
|
441
441
|
data: e.data?.stackedDimension
|
|
442
442
|
};
|
|
443
|
-
}),
|
|
443
|
+
}), a = {
|
|
444
444
|
isGrid: !1,
|
|
445
445
|
fill: n.fill,
|
|
446
|
-
isDefaultColor:
|
|
447
|
-
opacity: t.scale(
|
|
446
|
+
isDefaultColor: p.isDefaultColor ?? !1,
|
|
447
|
+
opacity: t.scale(r.Categorical) ? p.categoricalOpacity ?? null : null,
|
|
448
448
|
pointStyles: {
|
|
449
|
-
...
|
|
450
|
-
color:
|
|
449
|
+
...p.pointStyles,
|
|
450
|
+
color: p.pointStyles.color ?? n.fill
|
|
451
451
|
},
|
|
452
|
-
lineType:
|
|
452
|
+
lineType: p.lineType
|
|
453
453
|
};
|
|
454
|
-
_.push(...J(
|
|
454
|
+
_.push(...J(i, a));
|
|
455
455
|
}), [...he({
|
|
456
|
-
center:
|
|
457
|
-
domain:
|
|
458
|
-
radius:
|
|
459
|
-
attributesAmount:
|
|
460
|
-
labels:
|
|
461
|
-
},
|
|
456
|
+
center: o,
|
|
457
|
+
domain: f,
|
|
458
|
+
radius: s,
|
|
459
|
+
attributesAmount: u,
|
|
460
|
+
labels: c.labels()
|
|
461
|
+
}, p, fe(m)), ..._];
|
|
462
462
|
}
|
|
463
463
|
};
|
|
464
464
|
function be(e) {
|
|
465
|
-
e.component(
|
|
465
|
+
e.component(O.Radar, ye);
|
|
466
466
|
}
|
|
467
|
-
var xe = (e, t, n) =>
|
|
467
|
+
var xe = (e, t, n) => S(e, t, S(e, t, n, {
|
|
468
468
|
filter: Se,
|
|
469
469
|
placement: {
|
|
470
470
|
type: "bounds",
|
|
471
471
|
area: "target"
|
|
472
472
|
},
|
|
473
|
-
extract:
|
|
473
|
+
extract: C(e, t, we, $)
|
|
474
474
|
}, "points-tooltip"), {
|
|
475
475
|
filter: Ce,
|
|
476
476
|
placement: {
|
|
477
477
|
type: "slice",
|
|
478
478
|
area: "target"
|
|
479
479
|
},
|
|
480
|
-
extract:
|
|
480
|
+
extract: C(e, t, Q, $)
|
|
481
481
|
}, "attributes-lines-tooltip");
|
|
482
482
|
function Se(e) {
|
|
483
483
|
let t = e.find((e) => e.tag === U);
|
|
@@ -490,19 +490,19 @@ function Ce(e) {
|
|
|
490
490
|
}
|
|
491
491
|
var we = (e, t, { formatter: n }, r, i, a, o) => {
|
|
492
492
|
if (t.tag === "dataPoint" && t.desc?.tooltip) {
|
|
493
|
-
let r = e.filter((e) =>
|
|
494
|
-
return !o && r[0]?.formatter ?
|
|
495
|
-
value:
|
|
493
|
+
let r = e.filter((e) => m(e)), { label: i, value: a } = t.desc.tooltip, s = a;
|
|
494
|
+
return !o && r[0]?.formatter ? s = n(r[0].formatter)(s) : o && (s = n(D(r[0]?.formatter))(s)), [{
|
|
495
|
+
value: s,
|
|
496
496
|
label: i
|
|
497
497
|
}];
|
|
498
498
|
}
|
|
499
499
|
return [];
|
|
500
500
|
}, Q = (e, t, { formatter: n }, r, i, a, o) => {
|
|
501
501
|
if (t.tag === "attributesLines" && t.desc?.tooltip) {
|
|
502
|
-
let r = e.filter((e) =>
|
|
502
|
+
let r = e.filter((e) => m(e));
|
|
503
503
|
return t.desc.tooltip.values.map(({ label: e, value: t }) => {
|
|
504
504
|
let i = t;
|
|
505
|
-
return !o && r[0]?.formatter ? i = n(r[0].formatter)(i) : o && (i = n(
|
|
505
|
+
return !o && r[0]?.formatter ? i = n(r[0].formatter)(i) : o && (i = n(D(r[0]?.formatter))(i)), {
|
|
506
506
|
value: i,
|
|
507
507
|
label: e
|
|
508
508
|
};
|
|
@@ -511,7 +511,7 @@ var we = (e, t, { formatter: n }, r, i, a, o) => {
|
|
|
511
511
|
return [];
|
|
512
512
|
};
|
|
513
513
|
function $(e, t) {
|
|
514
|
-
let n = e.filter((e) =>
|
|
514
|
+
let n = e.filter((e) => m(e));
|
|
515
515
|
if (!n.length) return "";
|
|
516
516
|
if (n.length === 1) return n[0].label ?? "";
|
|
517
517
|
let r = t.desc?.tooltip;
|
|
@@ -519,7 +519,7 @@ function $(e, t) {
|
|
|
519
519
|
}
|
|
520
520
|
var Te = (e, t, n) => {
|
|
521
521
|
let r = {
|
|
522
|
-
type:
|
|
522
|
+
type: O.Axis,
|
|
523
523
|
key: "radar-axis",
|
|
524
524
|
scale: "values",
|
|
525
525
|
settings: {
|
|
@@ -542,15 +542,15 @@ var Te = (e, t, n) => {
|
|
|
542
542
|
}
|
|
543
543
|
},
|
|
544
544
|
layout: {
|
|
545
|
-
dock:
|
|
546
|
-
displayOrder:
|
|
545
|
+
dock: c.Center,
|
|
546
|
+
displayOrder: b.CustomComponent
|
|
547
547
|
}
|
|
548
548
|
};
|
|
549
549
|
return {
|
|
550
550
|
...n,
|
|
551
551
|
components: [...n.components, r]
|
|
552
552
|
};
|
|
553
|
-
}, Ee = class extends
|
|
553
|
+
}, Ee = class extends re {
|
|
554
554
|
constructor() {
|
|
555
555
|
super([
|
|
556
556
|
N,
|
|
@@ -559,20 +559,20 @@ var Te = (e, t, n) => {
|
|
|
559
559
|
ce,
|
|
560
560
|
Te,
|
|
561
561
|
xe,
|
|
562
|
-
|
|
562
|
+
ne
|
|
563
563
|
]);
|
|
564
564
|
}
|
|
565
|
-
}, De =
|
|
566
|
-
let
|
|
567
|
-
if (!e || !
|
|
568
|
-
let
|
|
569
|
-
...
|
|
570
|
-
valuePickerMode: !!
|
|
571
|
-
},
|
|
572
|
-
return
|
|
573
|
-
config:
|
|
574
|
-
definition:
|
|
575
|
-
size:
|
|
565
|
+
}, De = h(), Oe = new Ee(), ke = [be], Ae = _(({ vSpec: e, vTheme: t, data: r, elementSize: i, vizProperties: a }) => {
|
|
566
|
+
let o = v(), { activeKey: s } = y(), c = g();
|
|
567
|
+
if (!e || !r || !i || !u(e)) return null;
|
|
568
|
+
let d = {
|
|
569
|
+
...a,
|
|
570
|
+
valuePickerMode: !!s
|
|
571
|
+
}, f = t || l, p = Oe.compile(e, f, r, i, d, n.Radar, o, c);
|
|
572
|
+
return p ? /* @__PURE__ */ (0, De.jsx)(ie, {
|
|
573
|
+
config: d,
|
|
574
|
+
definition: p,
|
|
575
|
+
size: i,
|
|
576
576
|
vSpec: e,
|
|
577
577
|
escobarPlugins: ke
|
|
578
578
|
}) : null;
|