@astrato-io/visualizations 0.9.0 → 0.10.1
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 +10 -0
- package/README.md +7 -3
- package/THIRD_PARTY_NOTICES.md +163 -14
- package/VISUALIZATION_DEFINITIONS.md +376 -36
- package/chunks/{Button-5CxPEACP.js → Button-Dn3rJrYf.js} +4 -4
- package/chunks/{CircularProgress-DFS-LQb7.js → CircularProgress-BFeu06Yb.js} +39 -39
- package/chunks/FieldTypeIcon-DrMoGpHJ.js +22 -0
- package/chunks/{LinearProgress-CjIQfkNA.js → LinearProgress-ClO6GUjN.js} +9 -9
- package/chunks/{MenuOption-Cb7B7x6z.js → MenuOption-Czc34u4q.js} +143 -142
- package/chunks/{Title-CtFw1bVg.js → Title-BgYnaVTR.js} +22 -22
- package/chunks/_createAggregator-BMu9uRax.js +50 -0
- package/chunks/{app-filter-bar.compiler-B9775gLJ.js → app-filter-bar.compiler-CVir0wkl.js} +10 -10
- package/chunks/bar-layout-C_UgRlVl.js +9 -0
- package/chunks/{bar.compiler-B7wlH_Ro.js → bar.compiler-DYuFdi9J.js} +100 -82
- package/chunks/{builder-Dxo7D7c6.js → builder-C-TKA-My.js} +70 -37
- package/chunks/color-rules-DYJL4fIW.js +15 -0
- package/chunks/color-settings-DJFoFTip.js +5 -0
- package/chunks/{coloring-B-Wa8D5P.js → coloring-BtnPiQ_o.js} +37 -37
- package/chunks/createSimplePaletteValueFilter--zrZxRV9.js +2005 -0
- package/chunks/defaults-Dtk7fg3C.js +3 -0
- package/chunks/{definitions-DNpzD9tY.js → definitions-CT304NDn.js} +655 -417
- package/chunks/{escobar-C4Nm3eJ7.js → escobar-CvEV2ES1.js} +7441 -7127
- package/chunks/{extend-preset-BVKFtoe-.js → extend-preset-D9-JP92b.js} +998 -933
- package/chunks/{filter.compiler-BlS3zoy_.js → filter.compiler-CXeZznks.js} +7 -7
- package/chunks/{filtering-CGuLpg7u.js → filtering-8_bFv-jb.js} +333 -377
- package/chunks/handlers-C6CZ0XJA.js +15399 -0
- package/chunks/{icon-picker-styles-DYQgVEKG.js → icon-picker-styles-BXiJ1SZS.js} +11 -11
- package/chunks/isEqual-D8Ay63xR.js +16 -0
- package/chunks/{isFocusVisible-B1_z03UT.js → isFocusVisible-Bu8gGZu5.js} +1 -1
- package/chunks/label-format-type-C46pzgx7.js +17 -0
- package/chunks/{line.compiler-Bo9i9qag.js → line.compiler-DmHpmQCC.js} +9 -9
- package/chunks/{logger-3lng-wOw.js → logger-DdZpR7xZ.js} +79 -72
- package/chunks/map.compiler-Q_Y1Pvat.js +343 -0
- package/chunks/{metadata-Fmx1swpK.js → metadata-BQm_TXI1.js} +1 -1
- package/chunks/{number.compiler-CdLd5aGW.js → number.compiler-DQdg6zTy.js} +7 -7
- package/chunks/operations-DKQWuLL7.js +31315 -0
- package/chunks/{range-CzO4isKK.js → range-BdhzvYQ_.js} +2 -2
- package/chunks/{react-dom-BwZT0N3F.js → react-dom-BGP4tbXV.js} +70 -70
- package/chunks/{render-wrappers-CAuvgMxi.js → render-wrappers-BZpyDnJy.js} +1 -1
- package/chunks/{requirements-CYpVh65U.js → requirements-e8Fe96ag.js} +60 -58
- package/chunks/shared-C_2F90xq.js +1337 -0
- package/chunks/standalone-4MsKiqs0.js +355 -0
- package/chunks/standalone-B794g9pE.js +1012 -0
- package/chunks/{standalone-C6XDHYAM.js → standalone-B8ZSqauS.js} +110 -110
- package/chunks/{standalone-5DnapeHH.js → standalone-BA2YXyJS.js} +126 -124
- package/chunks/{standalone-CXniic5x.js → standalone-BDrXVxlP.js} +6 -5
- package/chunks/{standalone-B6s_xG2u.js → standalone-BE_ONgiG.js} +116 -116
- package/chunks/{standalone-CPUiiWNP.js → standalone-BTY3w_JA.js} +37 -37
- package/chunks/standalone-BgumbdaJ2.js +357 -0
- package/chunks/{standalone-DWPfdP0A.js → standalone-BkbiH-o8.js} +482 -482
- package/chunks/standalone-Blh4qejk.js +689 -0
- package/chunks/standalone-CXY4FpF7.js +773 -0
- package/chunks/{standalone-BvWdpUL3.js → standalone-CY_kjarf.js} +34 -31
- package/chunks/{standalone-DuwTOBXH.js → standalone-CaTxAydz.js} +587 -587
- package/chunks/{standalone-BDrQMxLi.js → standalone-Cc98Pdr6.js} +1799 -1015
- package/chunks/{standalone-DMCwtebn.js → standalone-Cl0TSfqC.js} +125 -125
- package/chunks/{standalone-CoQxJ6ov.js → standalone-CsoMmE9T.js} +778 -778
- package/chunks/standalone-DH0xTEes.js +2 -0
- package/chunks/{standalone-LFVgLhia.js → standalone-DHRalbVO.js} +311 -303
- package/chunks/standalone-DNh9NcMa.js +580 -0
- package/chunks/standalone-DcnHjNnC.js +2 -0
- package/chunks/{standalone-r4ObFvys.js → standalone-DflyWtuR.js} +217 -215
- package/chunks/standalone-DrHdGkY7.js +762 -0
- package/chunks/standalone-c_rROMtx.js +287 -0
- package/chunks/standalone-drcFLeN6.js +6 -0
- package/chunks/{standalone-CNkHsynO.js → standalone-wOWRCpdn.js} +54 -56
- package/chunks/{standalone-Cu73fzSr.js → standalone-z0o52o5t.js} +5128 -4908
- package/chunks/{table.compiler-C1qjqXaT.js → table.compiler-COaHE9VD.js} +18 -18
- package/chunks/{useFieldName-mWrD_uk_.js → useFieldName-CdnCWzhd.js} +1 -1
- package/chunks/{utils-DYYD4Zzf.js → utils-DganVptf.js} +4758 -4747
- package/chunks/{view-7fH6mGmY.js → view-Bzlros43.js} +2021 -1665
- package/chunks/{visualization-filters-mVnsnvLP.js → visualization-filters-D7i6oh1Z.js} +3177 -2425
- package/chunks/{with-html-element-B0Clt4jY.js → with-html-element-CiIhFEa5.js} +3740 -3547
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +303 -2
- package/docs/operations/combo.md +262 -1
- package/docs/operations/date-picker.md +1 -1
- package/docs/operations/distribution-gauge.md +1 -1
- package/docs/operations/dot.md +148 -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 +262 -1
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +7 -7
- package/docs/operations/line.md +280 -1
- 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 +148 -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 +374 -157
- 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 +2 -2
- package/index.js +482 -434
- package/metadata.js +2 -2
- package/operations.js +5 -5
- package/package.json +72 -67
- package/src/definitions/index.d.ts +7 -1
- package/src/definitions/model/definitions/available-fields.d.ts +2 -2
- package/src/definitions/model/definitions/compilers/compile.d.ts +1 -0
- package/src/definitions/model/definitions/data-item-resolution.d.ts +3 -3
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +219 -7
- package/src/definitions/model/definitions/index.d.ts +2 -1
- package/src/definitions/model/definitions/schema-registry.d.ts +305 -0
- package/src/definitions/model/definitions/schemas/bar.schema.d.ts +2 -0
- package/src/definitions/model/definitions/schemas/common.schema.d.ts +4 -3
- package/src/definitions/model/definitions/schemas/index.d.ts +1 -0
- package/src/definitions/model/definitions/schemas/map.schema.d.ts +590 -0
- package/src/definitions/model/definitions/types/compilation.types.d.ts +9 -1
- package/src/definitions/model/definitions/types/definition.types.d.ts +2 -2
- package/src/definitions/model/definitions/types/index.d.ts +1 -1
- package/src/index.d.ts +1 -1
- package/src/operations/index.d.ts +1 -1
- package/src/types.d.ts +17 -13
- package/chunks/FieldTypeIcon-pSVQFemC.js +0 -22
- package/chunks/ToggleButton-Br9HCPCv.js +0 -150
- package/chunks/color-rules-CN7TcGrC.js +0 -6
- package/chunks/color-settings-3VRlf_Vw.js +0 -6
- package/chunks/handlers-CMbyj5y1.js +0 -12930
- package/chunks/isEqual-DBg_b35N.js +0 -12
- package/chunks/label-format-type-weq1XfcX.js +0 -8
- package/chunks/operations-HSqnCRvv.js +0 -26324
- package/chunks/shared-DFoJxjVN.js +0 -1218
- package/chunks/standalone-530a5lvf.js +0 -1003
- package/chunks/standalone-B4jrf4KE.js +0 -354
- package/chunks/standalone-BMoJXGYe.js +0 -2
- package/chunks/standalone-BfvGggeM2.js +0 -355
- package/chunks/standalone-CMJJIi9v.js +0 -2
- package/chunks/standalone-C_Jd4gkj.js +0 -6
- package/chunks/standalone-CiaaibTa.js +0 -518
- package/chunks/standalone-DBeXQrwH.js +0 -468
- package/chunks/standalone-DpSRmAWx.js +0 -287
- package/chunks/standalone-kzAhwH19.js +0 -689
- package/chunks/standalone-mb7LwEiq.js +0 -3874
- /package/chunks/{src-BOS6SqkZ2.js → src-BOS6SqkZ.js} +0 -0
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import { Ds as t, Gs as n, Hi as r, Ia as i, It as a, La as o, Tt as s, Us as c, Za as l, jt as u, ws as d, zi as f, zr as p } from "./visualization-filters-mVnsnvLP.js";
|
|
3
|
-
import { F as m, N as h, Ot as g, ei as _, jr as v } from "./utils-DYYD4Zzf.js";
|
|
4
|
-
import { jm as y } from "./handlers-CMbyj5y1.js";
|
|
5
|
-
import { r as b } from "./label-format-type-weq1XfcX.js";
|
|
6
|
-
import { t as x } from "./stroke-dash-UgMEcCS4.js";
|
|
7
|
-
import "./logger-3lng-wOw.js";
|
|
8
|
-
import { $ as S, At as C, B as w, Bt as T, Et as E, F as D, I as O, L as k, Nt as A, St as ee, Ut as j, V as M, W as N, Y as P, Yt as F, _n as I, an as L, bt as R, dt as z, gt as B, ht as V, i as H, in as U, ln as W, lt as G, mt as K, n as te, on as q, pn as J, rn as Y, vt as X, yt as Z, zt as Q } from "./escobar-C4Nm3eJ7.js";
|
|
9
|
-
import { o as ne, t as re } from "./coloring-B-Wa8D5P.js";
|
|
10
|
-
import { t as ie } from "./set-coloring-datafield-B3uIS1Pe.js";
|
|
11
|
-
var ae = /* @__PURE__ */ e(_()), oe = (e, r, i) => {
|
|
12
|
-
let o = e.dimensions.filter((e) => p(e)), l = e.measures.filter((e) => p(e)), u = o[0], f = l[0], m = !1, h = {}, { coloring: g } = e || {}, _ = g?.fieldId ?? null;
|
|
13
|
-
if (g?.type === t.Categorical && (_ ||= u ? c(u.dataItem) : null), g?.type === t.Gradient && (_ ||= f ? c(f.dataItem) : null), _ && Z(i, 0, { color: { field: _ } }), u && e?.axes?.dimension?.continuousAxis) {
|
|
14
|
-
let e = n(u.dataItem), t = !!u.datePart, r = s(e) || a(e);
|
|
15
|
-
m = !t && r;
|
|
16
|
-
}
|
|
17
|
-
if (h = E(ie(e, _), r, h), h = P(e, h, i.collections, m, !0), l.filter((e) => e.graphType === d.Bar).length > 1 && !e.barSettings?.grouped) {
|
|
18
|
-
let t = L(e, l.find((e) => e.graphType === d.Bar));
|
|
19
|
-
h[t].data = { collection: C.ComboChartCollection };
|
|
20
|
-
}
|
|
21
|
-
return {
|
|
22
|
-
...i,
|
|
23
|
-
scales: h
|
|
24
|
-
};
|
|
25
|
-
}, $ = (e, t, n) => {
|
|
26
|
-
let r = e.measures.filter((e) => p(e)), i = e.dimensions.filter((e) => p(e)), a = (e.supportingMeasures ?? []).filter((e) => p(e)), o = r.reduce((e, t) => {
|
|
27
|
-
let n = c(t.dataItem);
|
|
28
|
-
return e[n] = { field: n }, e;
|
|
29
|
-
}, {}), s = O(a), l = i.reduce((e, t) => {
|
|
30
|
-
let n = c(t.dataItem);
|
|
31
|
-
return e[n] = { field: n }, e;
|
|
32
|
-
}, {}), u = i[0];
|
|
33
|
-
if (!u) return n;
|
|
34
|
-
let f = c(u.dataItem), m = {
|
|
35
|
-
key: C.ComboChartCollection,
|
|
36
|
-
data: { extract: [] }
|
|
37
|
-
};
|
|
38
|
-
if (m.data.extract = r.map((e, t) => {
|
|
39
|
-
let n = c(e.dataItem);
|
|
40
|
-
return {
|
|
41
|
-
field: f,
|
|
42
|
-
props: {
|
|
43
|
-
end: { field: n },
|
|
44
|
-
...o,
|
|
45
|
-
...s,
|
|
46
|
-
...l,
|
|
47
|
-
start: 0,
|
|
48
|
-
graphType: e.graphType,
|
|
49
|
-
measureIndex: t,
|
|
50
|
-
fieldId: n
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
}), r.filter((e) => e.graphType === d.Bar).length > 1) {
|
|
54
|
-
let t = !!r.find((e) => e.graphType === d.Bar)?.secondaryAxis, n = new Map(r.map((e) => [c(e.dataItem), !!e.secondaryAxis]));
|
|
55
|
-
e.barSettings?.grouped || (m.data.stack = {
|
|
56
|
-
stackKey: (e) => e.graphType.value === d.Bar ? `${e.value}` : `${e.value}-${e.graphType.value}-${e.measureIndex.value}`,
|
|
57
|
-
value: (e) => {
|
|
58
|
-
let r = e.fieldId?.value;
|
|
59
|
-
if (typeof r != "string" || n.get(r) !== t) return 0;
|
|
60
|
-
let i = e.end.value;
|
|
61
|
-
return typeof i == "number" || typeof i == "string" ? i : 0;
|
|
62
|
-
},
|
|
63
|
-
offset: b.Diverging
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
return {
|
|
67
|
-
...n,
|
|
68
|
-
collections: [...n.collections ?? [], m]
|
|
69
|
-
};
|
|
70
|
-
}, se = (e, t, n, r, i, a) => {
|
|
71
|
-
let o = [];
|
|
72
|
-
return e.measures.filter((e) => p(e)).forEach((r) => {
|
|
73
|
-
let s = c(r.dataItem), l = (e) => e.fieldId.value === s;
|
|
74
|
-
switch (r.graphType || e.type) {
|
|
75
|
-
case d.Bar:
|
|
76
|
-
o.push(le(e, t, i ?? [], n, r, a, l));
|
|
77
|
-
break;
|
|
78
|
-
case d.Point:
|
|
79
|
-
o.push(B(e, t, n, r, !1, C.ComboChartCollection, l));
|
|
80
|
-
break;
|
|
81
|
-
default: o.push(ce(e, t, n, r, l)), o.push(B(e, t, n, r, !r.showDataPoints, C.ComboChartCollection, l));
|
|
82
|
-
}
|
|
83
|
-
}), o.sort((e) => e.type === I.Box ? -1 : 0), {
|
|
84
|
-
...n,
|
|
85
|
-
components: [...n.components, ...o]
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
function ce(e, t, n, r, i) {
|
|
89
|
-
let a = e.dimensions.filter((e) => p(e));
|
|
90
|
-
if (!a[0]) throw Error("Combo chart without dimension is not supported.");
|
|
91
|
-
if (a.length > 1) throw Error("Combo chart currently support only one dimension.");
|
|
92
|
-
let o = x(r.strokeDash), s = c(r.dataItem), u = ne(e, n, t, r, s);
|
|
93
|
-
return {
|
|
94
|
-
type: I.Line,
|
|
95
|
-
layout: { displayOrder: T.VisualizationElement },
|
|
96
|
-
key: X(e, r, d.Line),
|
|
97
|
-
data: {
|
|
98
|
-
collection: C.ComboChartCollection,
|
|
99
|
-
filter: i
|
|
100
|
-
},
|
|
101
|
-
settings: {
|
|
102
|
-
orientation: e.orientation === l.Horizontal ? l.Vertical : l.Horizontal,
|
|
103
|
-
coordinates: {
|
|
104
|
-
major: { scale: U(e) },
|
|
105
|
-
minor: {
|
|
106
|
-
scale: L(e, r),
|
|
107
|
-
ref: s
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
layers: {
|
|
111
|
-
curve: e.lineSettings?.lineCurve,
|
|
112
|
-
skipCollisions: !0,
|
|
113
|
-
line: {
|
|
114
|
-
stroke: u,
|
|
115
|
-
strokeWidth: r.strokeWidth,
|
|
116
|
-
strokeDasharray: o
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
animations: {
|
|
121
|
-
enabled: !0,
|
|
122
|
-
presetId: "simple-opacity"
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
function le(e, t, n, r, i, a, o) {
|
|
127
|
-
let s = e.dimensions.filter((e) => p(e)), f = e.measures.filter((e) => p(e) && e.graphType === d.Bar);
|
|
128
|
-
if (!s[0]) throw Error("Combo chart without dimension is not supported.");
|
|
129
|
-
let m = { scale: U(e) }, h = {
|
|
130
|
-
scale: L(e, i),
|
|
131
|
-
end: { ref: "end" }
|
|
132
|
-
}, g = {
|
|
133
|
-
minWidthPx: 2,
|
|
134
|
-
rx: u(e?.barSettings.barRadius, 0),
|
|
135
|
-
roundAllEdges: e?.barSettings?.roundAllEdges,
|
|
136
|
-
useCustomBoxRounding: !0,
|
|
137
|
-
boxPadding: e?.barSettings?.barPadding ?? J.scale.padding
|
|
138
|
-
};
|
|
139
|
-
g.fill = new re(e, t, n?.[0]?.itemsNotAffectedByFiltering).getColorDefinition({ ref: "fieldId" });
|
|
140
|
-
let _ = {
|
|
141
|
-
enabled: !0,
|
|
142
|
-
presetId: "bar-chart"
|
|
143
|
-
}, v = i?.graphType !== d.Bar;
|
|
144
|
-
if (f.length > 1 && e.barSettings?.grouped) {
|
|
145
|
-
let t = 1 * (1 / f.length), n = (1 - (e.barSettings?.barPadding ?? 0)) * t, r = .5 / f.length, a = (1 + 0 * (f.length - 1)) * r, o = f.findIndex((e) => c(e.dataItem) === c(i.dataItem));
|
|
146
|
-
m.fn = (n) => {
|
|
147
|
-
let r = n.resources.scale(U(e));
|
|
148
|
-
return r(n.datum.value) + a * r.bandwidth?.() + o * r.bandwidth?.() * t;
|
|
149
|
-
}, g.width = n;
|
|
150
|
-
}
|
|
151
|
-
return {
|
|
152
|
-
type: I.Box,
|
|
153
|
-
layout: { displayOrder: T.VisualizationElement },
|
|
154
|
-
key: X(e, i, d.Bar),
|
|
155
|
-
data: {
|
|
156
|
-
collection: C.ComboChartCollection,
|
|
157
|
-
filter: o
|
|
158
|
-
},
|
|
159
|
-
settings: {
|
|
160
|
-
orientation: e.orientation ?? l.Vertical,
|
|
161
|
-
major: m,
|
|
162
|
-
minor: h,
|
|
163
|
-
box: g
|
|
164
|
-
},
|
|
165
|
-
animations: _,
|
|
166
|
-
brush: v ? null : F([""], a)
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
var ue = (e, t) => {
|
|
170
|
-
let n = t ? [y.Inside] : [
|
|
171
|
-
y.Inside,
|
|
172
|
-
y.Outside,
|
|
173
|
-
y.Opposite
|
|
174
|
-
];
|
|
175
|
-
return (e || [
|
|
176
|
-
{
|
|
177
|
-
position: y.Inside,
|
|
178
|
-
justify: 1
|
|
179
|
-
},
|
|
180
|
-
{ position: y.Outside },
|
|
181
|
-
{ position: y.Opposite }
|
|
182
|
-
]).map((e) => ({
|
|
183
|
-
...e,
|
|
184
|
-
possible: n.includes(e.position)
|
|
185
|
-
}));
|
|
186
|
-
}, de = ({ data: e }) => e ? e.end.value > e.start.value ? "up" : "down" : null, fe = ({ data: e }) => e ? e.end.value > e.start.value ? "right" : "left" : null, pe = (e, t, n, a, s, l) => {
|
|
187
|
-
let u = e.measures.filter((e) => p(e)), f = u.filter((e) => e.graphType === d.Bar), m = f.filter((e) => e.dataLabels?.show), h = f.length >= 2 && !("barSettings" in e && e.barSettings?.grouped), g = q(e), _ = m.map((n) => {
|
|
188
|
-
let i = !!n.dataLabels?.barLabelPlacements, a = ue(n.dataLabels?.barLabelPlacements, h).filter((e) => e.possible).map((e) => ({
|
|
189
|
-
position: e.position,
|
|
190
|
-
fill: e.position === y.Inside ? r.white : "#242424",
|
|
191
|
-
...e.justify === void 0 ? {} : { justify: e.justify },
|
|
192
|
-
...i ? { overflow: [y.Outside, y.Opposite].includes(e.position) } : {}
|
|
193
|
-
}));
|
|
194
|
-
return n.dataLabels?.showBackdrop && !h && (a = a.map((e) => k(e, t, g))), {
|
|
195
|
-
key: `combo-bar-labels-${n.dataItem.uniqueSignature}`,
|
|
196
|
-
type: I.Labels,
|
|
197
|
-
layout: { displayOrder: T.Labels },
|
|
198
|
-
settings: { sources: [{
|
|
199
|
-
component: X(e, n, d.Bar),
|
|
200
|
-
selector: W.Rect,
|
|
201
|
-
strategy: {
|
|
202
|
-
type: "bar",
|
|
203
|
-
settings: {
|
|
204
|
-
direction: g ? fe : de,
|
|
205
|
-
fontSize: Y(n.dataLabels?.size),
|
|
206
|
-
fontFamily: t.fonts.general.fontFamily,
|
|
207
|
-
labels: [{
|
|
208
|
-
label: w(n),
|
|
209
|
-
placements: a
|
|
210
|
-
}]
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}] },
|
|
214
|
-
animations: {
|
|
215
|
-
enabled: !0,
|
|
216
|
-
presetId: "chart-labels"
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
}), v = {}, b = {}, x = u.filter((e) => e.graphType !== d.Bar).map((t) => {
|
|
220
|
-
let n = c(t.dataItem), r = X(e, t, d.Point);
|
|
221
|
-
return b[r] = n, v[r] = {
|
|
222
|
-
enabled: t.dataLabels?.show || !1,
|
|
223
|
-
fontSize: Y(t.dataLabels?.size),
|
|
224
|
-
backdropColor: t.dataLabels?.backdropColor,
|
|
225
|
-
textColor: t.dataLabels?.textColor,
|
|
226
|
-
isColored: t.dataLabels?.isColored,
|
|
227
|
-
colorType: t.dataLabels?.showBackdrop ? i.Backdrop : i.Text,
|
|
228
|
-
density: t.dataLabels?.density || o.Medium
|
|
229
|
-
}, r;
|
|
230
|
-
}).filter((e) => v[e].enabled), S = x.length ? [N({
|
|
231
|
-
targetComponentKeys: x,
|
|
232
|
-
targetSelector: `.${V}`,
|
|
233
|
-
label: ({ data: e, node: t }) => e[b[t.key]]?.label,
|
|
234
|
-
skipBrush: !0
|
|
235
|
-
}, v, l, t)] : [];
|
|
236
|
-
if (_.length && S.length) {
|
|
237
|
-
let e = {
|
|
238
|
-
...S[0],
|
|
239
|
-
settings: {
|
|
240
|
-
...S[0].settings,
|
|
241
|
-
sources: [..._.flatMap((e) => e.settings?.sources ?? []), ...S[0].settings?.sources ?? []]
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
return {
|
|
245
|
-
...n,
|
|
246
|
-
components: [...n.components, e]
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
return {
|
|
250
|
-
...n,
|
|
251
|
-
components: [
|
|
252
|
-
...n.components,
|
|
253
|
-
..._,
|
|
254
|
-
...S
|
|
255
|
-
]
|
|
256
|
-
};
|
|
257
|
-
}, me = class extends D {
|
|
258
|
-
constructor() {
|
|
259
|
-
super([
|
|
260
|
-
$,
|
|
261
|
-
oe,
|
|
262
|
-
j,
|
|
263
|
-
ee,
|
|
264
|
-
se,
|
|
265
|
-
z,
|
|
266
|
-
R,
|
|
267
|
-
pe,
|
|
268
|
-
G,
|
|
269
|
-
S,
|
|
270
|
-
A,
|
|
271
|
-
Q,
|
|
272
|
-
K,
|
|
273
|
-
M
|
|
274
|
-
]);
|
|
275
|
-
}
|
|
276
|
-
}, he = v(), ge = g(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
|
|
277
|
-
let a = h(), [o] = (0, ae.useState)(() => new me()), s = m(), c = te();
|
|
278
|
-
if (!e || !r) return null;
|
|
279
|
-
let l = t || f, u = o.compile(e, l, n, r, i, d.Combo, a, s, c);
|
|
280
|
-
return u ? /* @__PURE__ */ (0, he.jsx)(H, {
|
|
281
|
-
config: i,
|
|
282
|
-
definition: u,
|
|
283
|
-
size: r,
|
|
284
|
-
vSpec: e
|
|
285
|
-
}) : null;
|
|
286
|
-
});
|
|
287
|
-
export { ge as ComboChart };
|