@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,22 +1,211 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as s, A as c, B as l, C as u, E as d, F as f, G as
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import { C as
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { Cc as e, Tc as t, Za as n, r, ul as i, yc as a, za as o } from "./visualization-filters-D7i6oh1Z.js";
|
|
2
|
+
import { $ as s, A as c, B as l, C as u, E as d, F as f, G as ee, H as p, I as m, J as te, K as ne, L as re, N as ie, O as ae, P as oe, Q as se, R as ce, S as le, T as h, U as ue, V as de, W as fe, X as pe, Y as me, Z as he, _ as ge, a as _e, at as ve, c as ye, ct as be, d as g, et as xe, f as Se, g as _, h as v, i as Ce, it as we, j as y, k as Te, n as Ee, nt as De, o as Oe, ot as ke, q as Ae, r as je, rt as Me, s as Ne, st as Pe, t as b, tt as Fe, u as x, v as S, w as Ie, x as Le, y as C, z as Re } from "./shared-C_2F90xq.js";
|
|
3
|
+
import { Dm as ze, Fp as Be, Hp as Ve, Im as He, Lp as Ue, Mm as We, Nm as Ge, Pm as Ke, Sm as qe, Tm as Je, Zm as Ye, _m as Xe, gm as Ze, hm as Qe, jp as w, o_ as $e, om as et, pm as tt, sm as nt, um as rt, wm as it, zm as at, zp as ot } from "./handlers-C6CZ0XJA.js";
|
|
4
|
+
import { n as st } from "./label-format-type-C46pzgx7.js";
|
|
5
|
+
import { C as ct, S as T, _ as lt, b as ut, f as dt, v as ft, x as pt } from "./operations-DKQWuLL7.js";
|
|
6
|
+
import { n as mt } from "./bar-layout-C_UgRlVl.js";
|
|
7
|
+
import { z as E } from "zod";
|
|
8
|
+
var D = (e) => [{
|
|
9
|
+
ref: `${e}Latitude`,
|
|
10
|
+
fieldKey: "[Locations].[Latitude]",
|
|
11
|
+
aggregation: "AVG",
|
|
12
|
+
role: "geo"
|
|
13
|
+
}, {
|
|
14
|
+
ref: `${e}Longitude`,
|
|
15
|
+
fieldKey: "[Locations].[Longitude]",
|
|
16
|
+
aggregation: "AVG",
|
|
17
|
+
role: "secondGeo"
|
|
18
|
+
}], O = {
|
|
19
|
+
type: "map",
|
|
20
|
+
ref: "basemap",
|
|
21
|
+
presentation: { mapType: "openStreetMap" }
|
|
22
|
+
}, ht = {
|
|
23
|
+
type: "map",
|
|
24
|
+
documentation: {
|
|
25
|
+
title: "Map",
|
|
26
|
+
summary: "Layered geographic visualization with background maps, images, points, shapes, heatmaps and connections.",
|
|
27
|
+
dataRequirements: [
|
|
28
|
+
"Point, shape and heatmap layers require one dimension identifying locations. Connection layers require source and destination dimensions.",
|
|
29
|
+
"Location measures use geo for the first location and thirdGeo for a connection destination. For latLng, these are latitude; secondGeo and fourthGeo supply longitude.",
|
|
30
|
+
"Shape layers require a GeoJSON measure. Other data layers support latLng, geoPoint or geoHash.",
|
|
31
|
+
"Size measures use the size role on point/connection layers. Heat intensity uses the measure role. Background map and image layers have no data bindings."
|
|
32
|
+
],
|
|
33
|
+
constraints: [
|
|
34
|
+
"There is no fixed layer-count limit. Layers are ordered topmost first. Include a background map explicitly; the default basemap is replaced by the declared layers.",
|
|
35
|
+
"Layer and data-item references share one namespace and must all be unique across the definition. Display names may repeat.",
|
|
36
|
+
"resolvedRefs contains the data-item references. resolvedLayerRefs contains the layer references; pass the id of a layer entry as the layer selector in map operations.",
|
|
37
|
+
"Raw measure fields require an available aggregation. Semantic measures and calculations supply their own aggregation.",
|
|
38
|
+
"Assign each measure role at most once per layer. Set sizing.sizeType to byMeasurePixels/byMeasureDistance to use a size measure, or value.type to byMeasure to use heat intensity.",
|
|
39
|
+
"Definitions cover initial data bindings, static filters, view and basic presentation. Additional styling and interactions use the existing map operations.",
|
|
40
|
+
"Compile only against an empty or unconfigured default map vSpec. HERE backgrounds require an API key."
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
example: {
|
|
44
|
+
type: "map",
|
|
45
|
+
version: 1,
|
|
46
|
+
layers: [{
|
|
47
|
+
type: "point",
|
|
48
|
+
ref: "locations",
|
|
49
|
+
locationType: "latLng",
|
|
50
|
+
data: {
|
|
51
|
+
dimensions: [{
|
|
52
|
+
ref: "location",
|
|
53
|
+
fieldKey: "[Locations].[Name]"
|
|
54
|
+
}],
|
|
55
|
+
measures: D("location")
|
|
56
|
+
},
|
|
57
|
+
presentation: {
|
|
58
|
+
color: "#2563EB",
|
|
59
|
+
sizing: { size: 12 }
|
|
60
|
+
}
|
|
61
|
+
}, O]
|
|
62
|
+
},
|
|
63
|
+
additionalExamples: [
|
|
64
|
+
{
|
|
65
|
+
title: "Heatmap",
|
|
66
|
+
definition: {
|
|
67
|
+
type: "map",
|
|
68
|
+
version: 1,
|
|
69
|
+
layers: [{
|
|
70
|
+
type: "heatMap",
|
|
71
|
+
ref: "density",
|
|
72
|
+
locationType: "latLng",
|
|
73
|
+
data: {
|
|
74
|
+
dimensions: [{
|
|
75
|
+
ref: "location",
|
|
76
|
+
fieldKey: "[Locations].[Name]"
|
|
77
|
+
}],
|
|
78
|
+
measures: D("density")
|
|
79
|
+
},
|
|
80
|
+
presentation: {
|
|
81
|
+
heat: {
|
|
82
|
+
radius: 25,
|
|
83
|
+
blur: 15
|
|
84
|
+
},
|
|
85
|
+
value: {
|
|
86
|
+
type: "fixed",
|
|
87
|
+
value: 1
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}, O]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
title: "Connections",
|
|
95
|
+
definition: {
|
|
96
|
+
type: "map",
|
|
97
|
+
version: 1,
|
|
98
|
+
layers: [{
|
|
99
|
+
type: "pointConnection",
|
|
100
|
+
ref: "routes",
|
|
101
|
+
locationType: "latLng",
|
|
102
|
+
secondLocationType: "latLng",
|
|
103
|
+
data: {
|
|
104
|
+
dimensions: [{
|
|
105
|
+
ref: "origin",
|
|
106
|
+
fieldKey: "[Locations].[Name]"
|
|
107
|
+
}, {
|
|
108
|
+
ref: "destination",
|
|
109
|
+
fieldKey: "[Locations].[Destination]"
|
|
110
|
+
}],
|
|
111
|
+
measures: [
|
|
112
|
+
...D("origin"),
|
|
113
|
+
{
|
|
114
|
+
ref: "destinationLatitude",
|
|
115
|
+
fieldKey: "[Locations].[Destination Latitude]",
|
|
116
|
+
aggregation: "AVG",
|
|
117
|
+
role: "thirdGeo"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
ref: "destinationLongitude",
|
|
121
|
+
fieldKey: "[Locations].[Destination Longitude]",
|
|
122
|
+
aggregation: "AVG",
|
|
123
|
+
role: "fourthGeo"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
presentation: {
|
|
128
|
+
useGeodesicLines: !0,
|
|
129
|
+
arrow: { show: !0 }
|
|
130
|
+
}
|
|
131
|
+
}, O]
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
title: "GeoJSON shapes",
|
|
136
|
+
definition: {
|
|
137
|
+
type: "map",
|
|
138
|
+
version: 1,
|
|
139
|
+
layers: [{
|
|
140
|
+
type: "shape",
|
|
141
|
+
ref: "regions",
|
|
142
|
+
data: {
|
|
143
|
+
dimensions: [{
|
|
144
|
+
ref: "region",
|
|
145
|
+
fieldKey: "[Locations].[Name]"
|
|
146
|
+
}],
|
|
147
|
+
measures: [{
|
|
148
|
+
ref: "boundary",
|
|
149
|
+
fieldKey: "[Locations].[Boundary]",
|
|
150
|
+
aggregation: "ANY_VALUE",
|
|
151
|
+
role: "geo"
|
|
152
|
+
}]
|
|
153
|
+
},
|
|
154
|
+
presentation: {
|
|
155
|
+
color: "#2563EB",
|
|
156
|
+
opacity: 60,
|
|
157
|
+
strokeEnabled: !0
|
|
158
|
+
}
|
|
159
|
+
}, O]
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
title: "Image overlay",
|
|
164
|
+
definition: {
|
|
165
|
+
type: "map",
|
|
166
|
+
version: 1,
|
|
167
|
+
layers: [{
|
|
168
|
+
type: "image",
|
|
169
|
+
ref: "overlay",
|
|
170
|
+
image: { imageUrl: "https://example.com/overlay.png" },
|
|
171
|
+
position: {
|
|
172
|
+
topLeftLatitude: 52,
|
|
173
|
+
topLeftLongitude: 20,
|
|
174
|
+
bottomRightLatitude: 51,
|
|
175
|
+
bottomRightLongitude: 21
|
|
176
|
+
},
|
|
177
|
+
opacity: 60
|
|
178
|
+
}, O],
|
|
179
|
+
view: {
|
|
180
|
+
latitude: 51.5,
|
|
181
|
+
longitude: 20.5,
|
|
182
|
+
zoom: 7,
|
|
183
|
+
zoomMode: "manual"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
supportedFeatures: [
|
|
189
|
+
"dimensions",
|
|
190
|
+
"measures",
|
|
191
|
+
"filters",
|
|
192
|
+
"data-points",
|
|
193
|
+
"data-labels",
|
|
194
|
+
"object-settings"
|
|
195
|
+
]
|
|
196
|
+
}, gt = (e, ...t) => e, k = {
|
|
8
197
|
horsepower: "[Cars].[Horsepower]",
|
|
9
198
|
latestLaunch: "[Cars].[Latest Launch]",
|
|
10
199
|
manufacturer: "[Cars].[Manufacturer]",
|
|
11
200
|
model: "[Cars].[Model]",
|
|
12
201
|
sales: "[Cars].[Sales In Thousands]"
|
|
13
|
-
},
|
|
202
|
+
}, A = (e, t) => ({
|
|
14
203
|
fieldKey: t,
|
|
15
204
|
ref: e
|
|
16
|
-
}),
|
|
205
|
+
}), j = (e, t) => ({
|
|
17
206
|
fieldKey: t,
|
|
18
207
|
ref: e
|
|
19
|
-
}),
|
|
208
|
+
}), M = (e, t = k.sales, n = "SUM") => ({
|
|
20
209
|
aggregation: n,
|
|
21
210
|
fieldKey: t,
|
|
22
211
|
format: {
|
|
@@ -24,9 +213,9 @@ var ft = (e, ...t) => e, O = {
|
|
|
24
213
|
negativeType: "parenthesis"
|
|
25
214
|
},
|
|
26
215
|
ref: e
|
|
27
|
-
}),
|
|
216
|
+
}), N = {
|
|
28
217
|
filters: [{
|
|
29
|
-
fieldKey:
|
|
218
|
+
fieldKey: k.manufacturer,
|
|
30
219
|
operator: "inList",
|
|
31
220
|
values: [
|
|
32
221
|
"Acura",
|
|
@@ -35,18 +224,18 @@ var ft = (e, ...t) => e, O = {
|
|
|
35
224
|
]
|
|
36
225
|
}],
|
|
37
226
|
operator: "and"
|
|
38
|
-
},
|
|
39
|
-
fieldKey:
|
|
227
|
+
}, _t = {
|
|
228
|
+
fieldKey: k.latestLaunch,
|
|
40
229
|
ref: "launchMonth",
|
|
41
230
|
temporalGrouping: {
|
|
42
231
|
dateLevel: "month",
|
|
43
232
|
mode: "level"
|
|
44
233
|
}
|
|
45
|
-
},
|
|
234
|
+
}, P = {
|
|
46
235
|
position: "right",
|
|
47
236
|
title: "Cars comparison",
|
|
48
237
|
visible: !0
|
|
49
|
-
},
|
|
238
|
+
}, F = {
|
|
50
239
|
dimension: {
|
|
51
240
|
labelsVisible: !0,
|
|
52
241
|
title: "Manufacturer",
|
|
@@ -62,7 +251,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
62
251
|
title: "Horsepower",
|
|
63
252
|
titleVisible: !0
|
|
64
253
|
}
|
|
65
|
-
},
|
|
254
|
+
}, vt = {
|
|
66
255
|
dimension: {
|
|
67
256
|
labelsVisible: !0,
|
|
68
257
|
title: "Manufacturer",
|
|
@@ -78,7 +267,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
78
267
|
title: "Model",
|
|
79
268
|
titleVisible: !0
|
|
80
269
|
}
|
|
81
|
-
},
|
|
270
|
+
}, yt = {
|
|
82
271
|
dimension: {
|
|
83
272
|
labelsVisible: !0,
|
|
84
273
|
title: "Manufacturer",
|
|
@@ -89,7 +278,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
89
278
|
title: "Sales",
|
|
90
279
|
titleVisible: !0
|
|
91
280
|
}
|
|
92
|
-
},
|
|
281
|
+
}, bt = {
|
|
93
282
|
dimension: {
|
|
94
283
|
labelsVisible: !0,
|
|
95
284
|
title: "Horsepower",
|
|
@@ -100,7 +289,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
100
289
|
title: "Count",
|
|
101
290
|
titleVisible: !0
|
|
102
291
|
}
|
|
103
|
-
},
|
|
292
|
+
}, xt = {
|
|
104
293
|
primaryMeasure: {
|
|
105
294
|
labelsVisible: !0,
|
|
106
295
|
title: "Sales",
|
|
@@ -111,7 +300,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
111
300
|
title: "Horsepower",
|
|
112
301
|
titleVisible: !0
|
|
113
302
|
}
|
|
114
|
-
},
|
|
303
|
+
}, St = {
|
|
115
304
|
dimension: {
|
|
116
305
|
labelsVisible: !0,
|
|
117
306
|
title: "Measure",
|
|
@@ -122,18 +311,19 @@ var ft = (e, ...t) => e, O = {
|
|
|
122
311
|
title: "Value",
|
|
123
312
|
titleVisible: !0
|
|
124
313
|
}
|
|
125
|
-
},
|
|
314
|
+
}, I = "presentation.axes.primaryMeasure.bands shades the plot between two primary measure axis values; start and end are measure values, and the bands replace any on the base vSpec.", Ct = (e) => `Set range on ${e} to fix its min, max, or both, for example to give several charts one shared scale. To keep an auto-fitted axis anchored at zero, leave both unset and put startsAtZero inside range, not on the axis itself: "primaryMeasure": { "range": { "startsAtZero": true } }.`, L = `${Ct("a measure axis")} Set inverted on a measure axis to reverse its values, for example to put rank 1 at the top.`, wt = `${Ct("the primary measure axis")} Set inverted on the primary measure axis to reverse its values.`, R = [
|
|
126
315
|
"dimensions",
|
|
127
316
|
"filters",
|
|
128
317
|
"measures",
|
|
129
318
|
"value-formatting"
|
|
130
|
-
],
|
|
319
|
+
], Tt = gt([
|
|
320
|
+
ht,
|
|
131
321
|
{
|
|
132
322
|
additionalExamples: [{
|
|
133
323
|
definition: {
|
|
134
324
|
data: {
|
|
135
|
-
dimensions: [
|
|
136
|
-
measures: [
|
|
325
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
326
|
+
measures: [M("sales")]
|
|
137
327
|
},
|
|
138
328
|
presentation: { coloring: {
|
|
139
329
|
overwrites: [{
|
|
@@ -161,29 +351,31 @@ var ft = (e, ...t) => e, O = {
|
|
|
161
351
|
"Sorting and Top N refer to definition-local refs, not generated data-item IDs.",
|
|
162
352
|
"Every dimension and measure must resolve to an available field with a compatible role.",
|
|
163
353
|
"Set axis per measure to plot it against the primary or the secondary measure axis.",
|
|
164
|
-
F,
|
|
165
354
|
I,
|
|
166
|
-
|
|
355
|
+
L,
|
|
356
|
+
"Set scale to log on a measure axis to draw it logarithmically, with gridlines at powers of ten. Zero and negative values are drawn at the floor of a log axis.",
|
|
357
|
+
"Several measures on one dimension are drawn side by side unless presentation.layout is stacked. A second dimension is a series, stacked unless presentation.layout is groups. One dimension with one measure ignores layout.",
|
|
358
|
+
"Data label placements are tried in order; inside labels sit at the end of the bar. Set dataLabels.textColor to fix the label color in every placement."
|
|
167
359
|
],
|
|
168
|
-
dataRequirements: ["At least one
|
|
169
|
-
summary: "Categorical comparison chart with sorting, limiting, per-measure axes, labels, and orientation controls.",
|
|
360
|
+
dataRequirements: ["At least one measure.", "For a measure-only bar, send `dimensions: []` (the key is still required) with at least one measure. Several measures then stack into one bar unless presentation.layout is groups; a layout already set on the base vSpec is kept when presentation.layout is omitted."],
|
|
361
|
+
summary: "Categorical comparison chart with sorting, limiting, per-measure axes, labels, layout, and orientation controls.",
|
|
170
362
|
title: "Bar chart"
|
|
171
363
|
},
|
|
172
364
|
example: {
|
|
173
365
|
data: {
|
|
174
366
|
dimensions: [{
|
|
175
|
-
...
|
|
367
|
+
...A("manufacturer", k.manufacturer),
|
|
176
368
|
showNullValues: !1
|
|
177
369
|
}],
|
|
178
370
|
measures: [{
|
|
179
|
-
...
|
|
371
|
+
...M("sales"),
|
|
180
372
|
dataLabels: {
|
|
181
373
|
placements: ["outside", "inside"],
|
|
182
374
|
visible: !0
|
|
183
375
|
}
|
|
184
376
|
}]
|
|
185
377
|
},
|
|
186
|
-
filterGroup:
|
|
378
|
+
filterGroup: N,
|
|
187
379
|
limiting: {
|
|
188
380
|
queryLimit: 100,
|
|
189
381
|
topN: {
|
|
@@ -195,9 +387,9 @@ var ft = (e, ...t) => e, O = {
|
|
|
195
387
|
},
|
|
196
388
|
presentation: {
|
|
197
389
|
axes: {
|
|
198
|
-
...
|
|
390
|
+
...F,
|
|
199
391
|
primaryMeasure: {
|
|
200
|
-
...
|
|
392
|
+
...F.primaryMeasure,
|
|
201
393
|
bands: [{
|
|
202
394
|
color: "#E6E6E6",
|
|
203
395
|
end: 15e4,
|
|
@@ -206,7 +398,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
206
398
|
}]
|
|
207
399
|
}
|
|
208
400
|
},
|
|
209
|
-
legend:
|
|
401
|
+
legend: P,
|
|
210
402
|
orientation: "vertical"
|
|
211
403
|
},
|
|
212
404
|
sorting: [{
|
|
@@ -244,8 +436,8 @@ var ft = (e, ...t) => e, O = {
|
|
|
244
436
|
"Data labels apply only to bar series.",
|
|
245
437
|
"Sorting refers to definition-local refs, not generated data-item IDs.",
|
|
246
438
|
"Set axis per measure to plot it against the primary or the secondary measure axis. Bar series share one axis: state it on any bar measure, and every bar measure that states one must state the same axis.",
|
|
247
|
-
F,
|
|
248
439
|
I,
|
|
440
|
+
L,
|
|
249
441
|
"Set scale to log on a measure axis to draw it logarithmically, with gridlines at powers of ten. Zero and negative values are drawn at the floor of a log axis."
|
|
250
442
|
],
|
|
251
443
|
dataRequirements: ["Exactly one dimension.", "Between one and ten measures."],
|
|
@@ -254,23 +446,23 @@ var ft = (e, ...t) => e, O = {
|
|
|
254
446
|
},
|
|
255
447
|
example: {
|
|
256
448
|
data: {
|
|
257
|
-
dimensions: [
|
|
449
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
258
450
|
measures: [{
|
|
259
|
-
...
|
|
451
|
+
...M("sales"),
|
|
260
452
|
dataLabels: { visible: !0 },
|
|
261
453
|
seriesType: "bar"
|
|
262
454
|
}, {
|
|
263
|
-
...
|
|
455
|
+
...M("horsepower", k.horsepower, "AVG"),
|
|
264
456
|
axis: "secondary",
|
|
265
457
|
seriesType: "line"
|
|
266
458
|
}]
|
|
267
459
|
},
|
|
268
|
-
filterGroup:
|
|
460
|
+
filterGroup: N,
|
|
269
461
|
limiting: { queryLimit: 100 },
|
|
270
462
|
presentation: {
|
|
271
|
-
axes:
|
|
463
|
+
axes: yt,
|
|
272
464
|
dataLabels: { visible: !0 },
|
|
273
|
-
legend:
|
|
465
|
+
legend: P,
|
|
274
466
|
orientation: "vertical"
|
|
275
467
|
},
|
|
276
468
|
sorting: [{
|
|
@@ -305,13 +497,13 @@ var ft = (e, ...t) => e, O = {
|
|
|
305
497
|
},
|
|
306
498
|
example: {
|
|
307
499
|
data: {
|
|
308
|
-
dimensions: [
|
|
309
|
-
measures: [
|
|
500
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
501
|
+
measures: [M("sales"), M("averageSales", k.sales, "AVG")]
|
|
310
502
|
},
|
|
311
|
-
filterGroup:
|
|
503
|
+
filterGroup: N,
|
|
312
504
|
presentation: {
|
|
313
505
|
displayMode: "bar",
|
|
314
|
-
legend:
|
|
506
|
+
legend: P
|
|
315
507
|
},
|
|
316
508
|
type: "distribution-gauge",
|
|
317
509
|
version: 1
|
|
@@ -326,20 +518,20 @@ var ft = (e, ...t) => e, O = {
|
|
|
326
518
|
},
|
|
327
519
|
{
|
|
328
520
|
documentation: {
|
|
329
|
-
constraints: ["Dimension order is significant and maps to the two dot-chart dimension roles.",
|
|
521
|
+
constraints: ["Dimension order is significant and maps to the two dot-chart dimension roles.", wt],
|
|
330
522
|
dataRequirements: ["Exactly two dimensions.", "Exactly one measure."],
|
|
331
523
|
summary: "Dot comparison using two categorical dimensions and one measure.",
|
|
332
524
|
title: "Dot chart"
|
|
333
525
|
},
|
|
334
526
|
example: {
|
|
335
527
|
data: {
|
|
336
|
-
dimensions: [
|
|
337
|
-
measures: [
|
|
528
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
529
|
+
measures: [M("sales")]
|
|
338
530
|
},
|
|
339
|
-
filterGroup:
|
|
531
|
+
filterGroup: N,
|
|
340
532
|
presentation: {
|
|
341
|
-
axes:
|
|
342
|
-
legend:
|
|
533
|
+
axes: yt,
|
|
534
|
+
legend: P,
|
|
343
535
|
orientation: "horizontal"
|
|
344
536
|
},
|
|
345
537
|
type: "dot",
|
|
@@ -368,13 +560,13 @@ var ft = (e, ...t) => e, O = {
|
|
|
368
560
|
},
|
|
369
561
|
example: {
|
|
370
562
|
data: {
|
|
371
|
-
dimensions: [
|
|
372
|
-
measures: [
|
|
563
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
564
|
+
measures: [M("sales"), M("targetSales", k.sales, "AVG")]
|
|
373
565
|
},
|
|
374
|
-
filterGroup:
|
|
566
|
+
filterGroup: N,
|
|
375
567
|
presentation: {
|
|
376
568
|
displayMode: "radial",
|
|
377
|
-
legend:
|
|
569
|
+
legend: P
|
|
378
570
|
},
|
|
379
571
|
type: "gauge",
|
|
380
572
|
version: 1
|
|
@@ -396,14 +588,14 @@ var ft = (e, ...t) => e, O = {
|
|
|
396
588
|
},
|
|
397
589
|
example: {
|
|
398
590
|
data: {
|
|
399
|
-
dimensions: [
|
|
400
|
-
measures: [
|
|
591
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
592
|
+
measures: [M("sales"), M("horsepower", k.horsepower, "AVG")]
|
|
401
593
|
},
|
|
402
|
-
filterGroup:
|
|
594
|
+
filterGroup: N,
|
|
403
595
|
limiting: { queryLimit: 100 },
|
|
404
596
|
presentation: {
|
|
405
|
-
axes:
|
|
406
|
-
legend:
|
|
597
|
+
axes: vt,
|
|
598
|
+
legend: P
|
|
407
599
|
},
|
|
408
600
|
sorting: [{
|
|
409
601
|
by: "sales",
|
|
@@ -426,19 +618,19 @@ var ft = (e, ...t) => e, O = {
|
|
|
426
618
|
documentation: {
|
|
427
619
|
constraints: [
|
|
428
620
|
"The compiler creates the canonical generated count measure; callers do not provide measures.",
|
|
429
|
-
|
|
430
|
-
|
|
621
|
+
I,
|
|
622
|
+
wt
|
|
431
623
|
],
|
|
432
624
|
dataRequirements: ["Exactly one numeric dimension.", "No caller-supplied measures."],
|
|
433
625
|
summary: "Distribution of a numeric field into generated bins and counts.",
|
|
434
626
|
title: "Histogram"
|
|
435
627
|
},
|
|
436
628
|
example: {
|
|
437
|
-
data: { dimensions: [
|
|
438
|
-
filterGroup:
|
|
629
|
+
data: { dimensions: [A("horsepower", k.horsepower)] },
|
|
630
|
+
filterGroup: N,
|
|
439
631
|
presentation: {
|
|
440
|
-
axes:
|
|
441
|
-
legend:
|
|
632
|
+
axes: bt,
|
|
633
|
+
legend: P,
|
|
442
634
|
orientation: "vertical"
|
|
443
635
|
},
|
|
444
636
|
type: "histogram",
|
|
@@ -460,9 +652,9 @@ var ft = (e, ...t) => e, O = {
|
|
|
460
652
|
additionalExamples: [{
|
|
461
653
|
definition: {
|
|
462
654
|
data: {
|
|
463
|
-
dimensions: [
|
|
655
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
464
656
|
measures: [{
|
|
465
|
-
...
|
|
657
|
+
...M("sales"),
|
|
466
658
|
dataPointShape: "circle"
|
|
467
659
|
}]
|
|
468
660
|
},
|
|
@@ -481,9 +673,9 @@ var ft = (e, ...t) => e, O = {
|
|
|
481
673
|
}, {
|
|
482
674
|
definition: {
|
|
483
675
|
data: {
|
|
484
|
-
dimensions: [
|
|
676
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
485
677
|
measures: [{
|
|
486
|
-
...
|
|
678
|
+
...M("sales"),
|
|
487
679
|
dataPointShape: "circle"
|
|
488
680
|
}]
|
|
489
681
|
},
|
|
@@ -501,8 +693,8 @@ var ft = (e, ...t) => e, O = {
|
|
|
501
693
|
constraints: [
|
|
502
694
|
"Each measure may select the primary or secondary axis using its axis property.",
|
|
503
695
|
"Visible data labels require dataPointShape on every measure.",
|
|
504
|
-
F,
|
|
505
696
|
I,
|
|
697
|
+
L,
|
|
506
698
|
"Set scale to log on a measure axis to draw it logarithmically, with gridlines at powers of ten. Zero and negative values are drawn at the floor of a log axis.",
|
|
507
699
|
"Value colors in presentation.coloring require at least two dimensions; measure color rules are not supported.",
|
|
508
700
|
"For a trend over time, use a date field as the dimension with temporalGrouping, such as month, and sort by its ref in ascending order. Omit its format to show readable dates."
|
|
@@ -513,24 +705,24 @@ var ft = (e, ...t) => e, O = {
|
|
|
513
705
|
},
|
|
514
706
|
example: {
|
|
515
707
|
data: {
|
|
516
|
-
dimensions: [
|
|
708
|
+
dimensions: [_t],
|
|
517
709
|
measures: [{
|
|
518
|
-
...
|
|
710
|
+
...M("sales"),
|
|
519
711
|
axis: "primary",
|
|
520
712
|
dataPointShape: "circle"
|
|
521
713
|
}, {
|
|
522
|
-
...
|
|
714
|
+
...M("horsepower", k.horsepower, "AVG"),
|
|
523
715
|
axis: "secondary",
|
|
524
716
|
dataPointShape: "square"
|
|
525
717
|
}]
|
|
526
718
|
},
|
|
527
|
-
filterGroup:
|
|
719
|
+
filterGroup: N,
|
|
528
720
|
limiting: { queryLimit: 100 },
|
|
529
721
|
presentation: {
|
|
530
722
|
axes: {
|
|
531
|
-
...
|
|
723
|
+
...F,
|
|
532
724
|
dimension: {
|
|
533
|
-
...
|
|
725
|
+
...F.dimension,
|
|
534
726
|
title: "Launch month"
|
|
535
727
|
}
|
|
536
728
|
},
|
|
@@ -538,7 +730,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
538
730
|
density: "medium",
|
|
539
731
|
visible: !0
|
|
540
732
|
},
|
|
541
|
-
legend:
|
|
733
|
+
legend: P,
|
|
542
734
|
orientation: "vertical"
|
|
543
735
|
},
|
|
544
736
|
sorting: [{
|
|
@@ -581,11 +773,11 @@ var ft = (e, ...t) => e, O = {
|
|
|
581
773
|
},
|
|
582
774
|
example: {
|
|
583
775
|
data: {
|
|
584
|
-
dimensions: [
|
|
585
|
-
measures: [
|
|
776
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
777
|
+
measures: [M("sales")]
|
|
586
778
|
},
|
|
587
|
-
filterGroup:
|
|
588
|
-
presentation: { legend:
|
|
779
|
+
filterGroup: N,
|
|
780
|
+
presentation: { legend: P },
|
|
589
781
|
type: "radar",
|
|
590
782
|
version: 1
|
|
591
783
|
},
|
|
@@ -600,8 +792,8 @@ var ft = (e, ...t) => e, O = {
|
|
|
600
792
|
additionalExamples: [{
|
|
601
793
|
definition: {
|
|
602
794
|
data: {
|
|
603
|
-
dimensions: [
|
|
604
|
-
measures: [
|
|
795
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
796
|
+
measures: [M("sales")]
|
|
605
797
|
},
|
|
606
798
|
presentation: { coloring: { overwrites: [
|
|
607
799
|
{
|
|
@@ -630,12 +822,12 @@ var ft = (e, ...t) => e, O = {
|
|
|
630
822
|
},
|
|
631
823
|
example: {
|
|
632
824
|
data: {
|
|
633
|
-
dimensions: [
|
|
634
|
-
measures: [
|
|
825
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
826
|
+
measures: [M("sales")]
|
|
635
827
|
},
|
|
636
|
-
filterGroup:
|
|
828
|
+
filterGroup: N,
|
|
637
829
|
limiting: { queryLimit: 100 },
|
|
638
|
-
presentation: { legend:
|
|
830
|
+
presentation: { legend: P },
|
|
639
831
|
sorting: [{
|
|
640
832
|
by: "sales",
|
|
641
833
|
direction: "desc"
|
|
@@ -661,10 +853,10 @@ var ft = (e, ...t) => e, O = {
|
|
|
661
853
|
},
|
|
662
854
|
example: {
|
|
663
855
|
data: {
|
|
664
|
-
dimensions: [
|
|
665
|
-
measures: [
|
|
856
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
857
|
+
measures: [M("sales")]
|
|
666
858
|
},
|
|
667
|
-
filterGroup:
|
|
859
|
+
filterGroup: N,
|
|
668
860
|
limiting: { queryLimit: 100 },
|
|
669
861
|
presentation: { layout: {
|
|
670
862
|
compact: !0,
|
|
@@ -696,11 +888,11 @@ var ft = (e, ...t) => e, O = {
|
|
|
696
888
|
},
|
|
697
889
|
example: {
|
|
698
890
|
data: {
|
|
699
|
-
dimensions: [
|
|
700
|
-
measures: [
|
|
891
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
892
|
+
measures: [M("sales")]
|
|
701
893
|
},
|
|
702
|
-
filterGroup:
|
|
703
|
-
presentation: { legend:
|
|
894
|
+
filterGroup: N,
|
|
895
|
+
presentation: { legend: P },
|
|
704
896
|
type: "treemap",
|
|
705
897
|
version: 1
|
|
706
898
|
},
|
|
@@ -715,8 +907,8 @@ var ft = (e, ...t) => e, O = {
|
|
|
715
907
|
additionalExamples: [{
|
|
716
908
|
definition: {
|
|
717
909
|
data: {
|
|
718
|
-
dimensions: [
|
|
719
|
-
measures: [
|
|
910
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
911
|
+
measures: [M("sales")]
|
|
720
912
|
},
|
|
721
913
|
presentation: { coloring: { overwrites: [{
|
|
722
914
|
color: "#CA8A04",
|
|
@@ -736,10 +928,10 @@ var ft = (e, ...t) => e, O = {
|
|
|
736
928
|
},
|
|
737
929
|
example: {
|
|
738
930
|
data: {
|
|
739
|
-
dimensions: [
|
|
740
|
-
measures: [
|
|
931
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
932
|
+
measures: [M("sales")]
|
|
741
933
|
},
|
|
742
|
-
filterGroup:
|
|
934
|
+
filterGroup: N,
|
|
743
935
|
type: "sankey",
|
|
744
936
|
version: 1
|
|
745
937
|
},
|
|
@@ -753,7 +945,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
753
945
|
"The optional second dimension receives the image role.",
|
|
754
946
|
"Roles come from item order only; a ref is a label and does not select a role.",
|
|
755
947
|
"With a size measure, points scale between the setPointSize and setMaxPointSize operation values.",
|
|
756
|
-
|
|
948
|
+
L
|
|
757
949
|
],
|
|
758
950
|
dataRequirements: ["One or two dimensions.", "Two or three measures."],
|
|
759
951
|
summary: "Relationship chart using horizontal and vertical measures with optional size and image roles.",
|
|
@@ -761,17 +953,17 @@ var ft = (e, ...t) => e, O = {
|
|
|
761
953
|
},
|
|
762
954
|
example: {
|
|
763
955
|
data: {
|
|
764
|
-
dimensions: [
|
|
956
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
765
957
|
measures: [
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
958
|
+
M("sales"),
|
|
959
|
+
M("horsepower", k.horsepower, "AVG"),
|
|
960
|
+
M("size", k.sales, "AVG")
|
|
769
961
|
]
|
|
770
962
|
},
|
|
771
|
-
filterGroup:
|
|
963
|
+
filterGroup: N,
|
|
772
964
|
presentation: {
|
|
773
|
-
axes:
|
|
774
|
-
legend:
|
|
965
|
+
axes: xt,
|
|
966
|
+
legend: P
|
|
775
967
|
},
|
|
776
968
|
type: "scatter",
|
|
777
969
|
version: 1
|
|
@@ -791,11 +983,11 @@ var ft = (e, ...t) => e, O = {
|
|
|
791
983
|
additionalExamples: [{
|
|
792
984
|
definition: {
|
|
793
985
|
data: {
|
|
794
|
-
dimensions: [
|
|
795
|
-
measures: [
|
|
986
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
987
|
+
measures: [M("sales")],
|
|
796
988
|
structure: "expandable"
|
|
797
989
|
},
|
|
798
|
-
filterGroup:
|
|
990
|
+
filterGroup: N,
|
|
799
991
|
limiting: { queryLimit: 100 },
|
|
800
992
|
sorting: [{
|
|
801
993
|
by: "sales",
|
|
@@ -808,12 +1000,12 @@ var ft = (e, ...t) => e, O = {
|
|
|
808
1000
|
}, {
|
|
809
1001
|
definition: {
|
|
810
1002
|
data: {
|
|
811
|
-
columnDimensions: [
|
|
812
|
-
measures: [
|
|
813
|
-
rowDimensions: [
|
|
1003
|
+
columnDimensions: [A("model", k.model)],
|
|
1004
|
+
measures: [M("sales")],
|
|
1005
|
+
rowDimensions: [A("manufacturer", k.manufacturer)],
|
|
814
1006
|
structure: "pivot"
|
|
815
1007
|
},
|
|
816
|
-
filterGroup:
|
|
1008
|
+
filterGroup: N,
|
|
817
1009
|
limiting: { queryLimit: 100 },
|
|
818
1010
|
sorting: [{
|
|
819
1011
|
by: "sales",
|
|
@@ -845,26 +1037,26 @@ var ft = (e, ...t) => e, O = {
|
|
|
845
1037
|
data: {
|
|
846
1038
|
columns: [
|
|
847
1039
|
{
|
|
848
|
-
...
|
|
1040
|
+
...A("manufacturer", k.manufacturer),
|
|
849
1041
|
role: "dimension"
|
|
850
1042
|
},
|
|
851
1043
|
{
|
|
852
|
-
...
|
|
1044
|
+
...A("model", k.model),
|
|
853
1045
|
role: "dimension"
|
|
854
1046
|
},
|
|
855
1047
|
{
|
|
856
|
-
...
|
|
1048
|
+
...A("latestLaunch", k.latestLaunch),
|
|
857
1049
|
format: { formatType: "ddmmmyyyy" },
|
|
858
1050
|
role: "dimension"
|
|
859
1051
|
},
|
|
860
1052
|
{
|
|
861
|
-
...
|
|
1053
|
+
...M("sales"),
|
|
862
1054
|
role: "measure"
|
|
863
1055
|
}
|
|
864
1056
|
],
|
|
865
1057
|
structure: "normal"
|
|
866
1058
|
},
|
|
867
|
-
filterGroup:
|
|
1059
|
+
filterGroup: N,
|
|
868
1060
|
limiting: { queryLimit: 100 },
|
|
869
1061
|
presentation: {
|
|
870
1062
|
background: {
|
|
@@ -938,25 +1130,50 @@ var ft = (e, ...t) => e, O = {
|
|
|
938
1130
|
{
|
|
939
1131
|
documentation: {
|
|
940
1132
|
constraints: [
|
|
941
|
-
"
|
|
942
|
-
|
|
943
|
-
|
|
1133
|
+
"Without a dimension, measure order defines the waterfall sequence. With one dimension, the first measure supplies the opening total, each dimension value contributes the second measure minus the first, and the second measure supplies the closing total.",
|
|
1134
|
+
"Comparison totals sum the returned rows, rather than requesting a separate aggregate total. Use two numeric measures with comparable units.",
|
|
1135
|
+
wt,
|
|
1136
|
+
I
|
|
944
1137
|
],
|
|
945
|
-
dataRequirements: ["
|
|
946
|
-
summary: "Sequential contribution chart
|
|
1138
|
+
dataRequirements: ["No dimensions and between one and one hundred measures, or exactly one dimension and exactly two measures."],
|
|
1139
|
+
summary: "Sequential contribution chart, or a comparison of two measures across one dimension.",
|
|
947
1140
|
title: "Waterfall chart"
|
|
948
1141
|
},
|
|
1142
|
+
additionalExamples: [{
|
|
1143
|
+
definition: {
|
|
1144
|
+
data: {
|
|
1145
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
1146
|
+
measures: [M("totalSales"), M("averageSales", k.sales, "AVG")]
|
|
1147
|
+
},
|
|
1148
|
+
presentation: {
|
|
1149
|
+
axes: {
|
|
1150
|
+
dimension: {
|
|
1151
|
+
title: "Manufacturer",
|
|
1152
|
+
titleVisible: !0
|
|
1153
|
+
},
|
|
1154
|
+
primaryMeasure: {
|
|
1155
|
+
title: "Sales in thousands",
|
|
1156
|
+
titleVisible: !0
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1159
|
+
dataLabels: { visible: !0 }
|
|
1160
|
+
},
|
|
1161
|
+
type: "waterfall",
|
|
1162
|
+
version: 1
|
|
1163
|
+
},
|
|
1164
|
+
title: "Compare total and average sales by manufacturer"
|
|
1165
|
+
}],
|
|
949
1166
|
example: {
|
|
950
1167
|
data: { measures: [{
|
|
951
|
-
...
|
|
1168
|
+
...M("sales"),
|
|
952
1169
|
dataLabels: { visible: !0 }
|
|
953
1170
|
}, {
|
|
954
|
-
...
|
|
1171
|
+
...M("horsepower", k.horsepower, "AVG"),
|
|
955
1172
|
dataLabels: { visible: !0 }
|
|
956
1173
|
}] },
|
|
957
|
-
filterGroup:
|
|
1174
|
+
filterGroup: N,
|
|
958
1175
|
presentation: {
|
|
959
|
-
axes:
|
|
1176
|
+
axes: St,
|
|
960
1177
|
dataLabels: { visible: !0 },
|
|
961
1178
|
orientation: "vertical"
|
|
962
1179
|
},
|
|
@@ -968,6 +1185,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
968
1185
|
"axis-bands",
|
|
969
1186
|
"axis-range",
|
|
970
1187
|
"data-labels",
|
|
1188
|
+
"dimensions",
|
|
971
1189
|
"filters",
|
|
972
1190
|
"measures",
|
|
973
1191
|
"orientation",
|
|
@@ -984,10 +1202,10 @@ var ft = (e, ...t) => e, O = {
|
|
|
984
1202
|
},
|
|
985
1203
|
example: {
|
|
986
1204
|
data: {
|
|
987
|
-
dimensions: [
|
|
988
|
-
measures: [
|
|
1205
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
1206
|
+
measures: [M("sales")]
|
|
989
1207
|
},
|
|
990
|
-
filterGroup:
|
|
1208
|
+
filterGroup: N,
|
|
991
1209
|
type: "word-cloud",
|
|
992
1210
|
version: 1
|
|
993
1211
|
},
|
|
@@ -1002,7 +1220,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
1002
1220
|
title: "Date picker"
|
|
1003
1221
|
},
|
|
1004
1222
|
example: {
|
|
1005
|
-
data: { field:
|
|
1223
|
+
data: { field: j("latestLaunch", k.latestLaunch) },
|
|
1006
1224
|
settings: {
|
|
1007
1225
|
endDateLabel: "To",
|
|
1008
1226
|
pickerState: "expanded",
|
|
@@ -1026,7 +1244,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
1026
1244
|
title: "Filter"
|
|
1027
1245
|
},
|
|
1028
1246
|
example: {
|
|
1029
|
-
data: { field:
|
|
1247
|
+
data: { field: j("manufacturer", k.manufacturer) },
|
|
1030
1248
|
presentation: {
|
|
1031
1249
|
mode: "listbox",
|
|
1032
1250
|
quickSelect: !0,
|
|
@@ -1082,14 +1300,14 @@ var ft = (e, ...t) => e, O = {
|
|
|
1082
1300
|
{
|
|
1083
1301
|
additionalExamples: [{
|
|
1084
1302
|
definition: {
|
|
1085
|
-
data: { measure:
|
|
1303
|
+
data: { measure: M("sales") },
|
|
1086
1304
|
filterGroup: {
|
|
1087
1305
|
filters: [{
|
|
1088
|
-
fieldKey:
|
|
1306
|
+
fieldKey: k.model,
|
|
1089
1307
|
operator: "contains",
|
|
1090
1308
|
value: "Sport"
|
|
1091
1309
|
}, {
|
|
1092
|
-
fieldKey:
|
|
1310
|
+
fieldKey: k.horsepower,
|
|
1093
1311
|
operator: "greaterThanOrEqualTo",
|
|
1094
1312
|
value: "200"
|
|
1095
1313
|
}],
|
|
@@ -1111,8 +1329,8 @@ var ft = (e, ...t) => e, O = {
|
|
|
1111
1329
|
title: "Number"
|
|
1112
1330
|
},
|
|
1113
1331
|
example: {
|
|
1114
|
-
data: { measure:
|
|
1115
|
-
filterGroup:
|
|
1332
|
+
data: { measure: M("sales") },
|
|
1333
|
+
filterGroup: N,
|
|
1116
1334
|
type: "number",
|
|
1117
1335
|
version: 1
|
|
1118
1336
|
},
|
|
@@ -1235,7 +1453,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
1235
1453
|
title: "Slider"
|
|
1236
1454
|
},
|
|
1237
1455
|
example: {
|
|
1238
|
-
data: { field:
|
|
1456
|
+
data: { field: j("horsepower", k.horsepower) },
|
|
1239
1457
|
settings: {
|
|
1240
1458
|
layout: "multi",
|
|
1241
1459
|
quickSelect: !0,
|
|
@@ -1252,42 +1470,43 @@ var ft = (e, ...t) => e, O = {
|
|
|
1252
1470
|
type: "slider"
|
|
1253
1471
|
}
|
|
1254
1472
|
]), z = (e) => {
|
|
1255
|
-
let t =
|
|
1473
|
+
let t = Tt.find((t) => t.type === e);
|
|
1256
1474
|
if (!t) throw Error(`Missing visualization definition documentation for ${e}`);
|
|
1257
1475
|
return t;
|
|
1258
|
-
}, B = (e, t) =>
|
|
1476
|
+
}, B = (e, t) => E.toJSONSchema(e.meta({ title: t }), {
|
|
1259
1477
|
reused: "inline",
|
|
1260
1478
|
target: "draft-2020-12"
|
|
1261
1479
|
}), V = {
|
|
1262
|
-
"astrato-app-filter-bar":
|
|
1263
|
-
bar:
|
|
1264
|
-
combo:
|
|
1265
|
-
dot:
|
|
1266
|
-
scatter:
|
|
1267
|
-
histogram:
|
|
1480
|
+
"astrato-app-filter-bar": be,
|
|
1481
|
+
bar: ke,
|
|
1482
|
+
combo: ne,
|
|
1483
|
+
dot: te,
|
|
1484
|
+
scatter: Fe,
|
|
1485
|
+
histogram: he,
|
|
1268
1486
|
heatMap: pe,
|
|
1269
|
-
radar:
|
|
1270
|
-
gauge:
|
|
1271
|
-
"distribution-gauge":
|
|
1272
|
-
pie:
|
|
1273
|
-
tree:
|
|
1274
|
-
treemap:
|
|
1275
|
-
sankey:
|
|
1276
|
-
waterfall:
|
|
1277
|
-
"word-cloud":
|
|
1278
|
-
"date-picker":
|
|
1279
|
-
iframe:
|
|
1280
|
-
image:
|
|
1281
|
-
shape:
|
|
1282
|
-
simpleTextObject:
|
|
1487
|
+
radar: s,
|
|
1488
|
+
gauge: me,
|
|
1489
|
+
"distribution-gauge": Ae,
|
|
1490
|
+
pie: se,
|
|
1491
|
+
tree: De,
|
|
1492
|
+
treemap: Me,
|
|
1493
|
+
sankey: xe,
|
|
1494
|
+
waterfall: we,
|
|
1495
|
+
"word-cloud": ve,
|
|
1496
|
+
"date-picker": m,
|
|
1497
|
+
iframe: re,
|
|
1498
|
+
image: ce,
|
|
1499
|
+
shape: Re,
|
|
1500
|
+
simpleTextObject: de,
|
|
1283
1501
|
"atomic-input": f,
|
|
1284
1502
|
slider: l,
|
|
1285
|
-
line:
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1503
|
+
line: fe,
|
|
1504
|
+
map: ue,
|
|
1505
|
+
table: oe,
|
|
1506
|
+
number: p,
|
|
1507
|
+
filter: ee
|
|
1508
|
+
}, Et = new Map(Object.entries(V)), Dt = (e, t = 1) => t === 1 ? Et.get(e) : void 0, Ot = () => Object.keys(V), kt = (e) => {
|
|
1509
|
+
let t = w(e);
|
|
1291
1510
|
if (t) return {
|
|
1292
1511
|
code: "invalid_structure",
|
|
1293
1512
|
message: t,
|
|
@@ -1306,22 +1525,22 @@ var ft = (e, ...t) => e, O = {
|
|
|
1306
1525
|
path: ["version"]
|
|
1307
1526
|
};
|
|
1308
1527
|
let r = "type" in e ? e.type : void 0;
|
|
1309
|
-
if (!(typeof r == "string" &&
|
|
1310
|
-
allowedValues:
|
|
1528
|
+
if (!(typeof r == "string" && Dt(r, n))) return {
|
|
1529
|
+
allowedValues: Ot(),
|
|
1311
1530
|
code: "unsupported_visualization",
|
|
1312
1531
|
message: `Visualization type "${String(r)}" is not supported.`,
|
|
1313
1532
|
path: ["type"]
|
|
1314
1533
|
};
|
|
1315
|
-
},
|
|
1316
|
-
let t =
|
|
1534
|
+
}, At = (e) => {
|
|
1535
|
+
let t = kt(e);
|
|
1317
1536
|
if (t) return {
|
|
1318
1537
|
issues: [t],
|
|
1319
1538
|
success: !1
|
|
1320
1539
|
};
|
|
1321
|
-
let n =
|
|
1540
|
+
let n = Dt(e.type, e.version);
|
|
1322
1541
|
if (!n) return {
|
|
1323
1542
|
issues: [{
|
|
1324
|
-
allowedValues:
|
|
1543
|
+
allowedValues: Ot(),
|
|
1325
1544
|
code: "unsupported_visualization",
|
|
1326
1545
|
message: "Visualization definition descriptor is not available.",
|
|
1327
1546
|
path: ["type"]
|
|
@@ -1334,34 +1553,34 @@ var ft = (e, ...t) => e, O = {
|
|
|
1334
1553
|
issues: [],
|
|
1335
1554
|
success: !0
|
|
1336
1555
|
} : {
|
|
1337
|
-
issues:
|
|
1556
|
+
issues: h(r.error, e),
|
|
1338
1557
|
success: !1
|
|
1339
1558
|
};
|
|
1340
|
-
},
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
],
|
|
1559
|
+
}, jt = async (e) => (await import("./app-filter-bar.compiler-CVir0wkl.js")).compileAppFilterBarVisualizationDefinition(e), Mt = async (e) => (await import("./bar.compiler-DYuFdi9J.js")).compileBarVisualizationDefinition(e), Nt = async (e) => (await import("./filter.compiler-CXeZznks.js")).compileFilterVisualizationDefinition(e), Pt = async (e) => (await import("./line.compiler-DmHpmQCC.js")).compileLineVisualizationDefinition(e), Ft = async (e) => (await import("./number.compiler-DQdg6zTy.js")).compileNumberVisualizationDefinition(e), It = async (e) => (await import("./map.compiler-Q_Y1Pvat.js")).compileMapVisualizationDefinition(e), Lt = async (e) => (await import("./table.compiler-COaHE9VD.js")).compileTableVisualizationDefinition(e), H = i(), Rt = [
|
|
1560
|
+
H.FieldType.DATE,
|
|
1561
|
+
H.FieldType.TIMESTAMP,
|
|
1562
|
+
H.FieldType.TIMESTAMP_TZ
|
|
1563
|
+
], zt = ["none", "inherit"], Bt = [
|
|
1345
1564
|
"dimensions",
|
|
1346
1565
|
"rowDimensions",
|
|
1347
1566
|
"columnDimensions",
|
|
1348
1567
|
"columns"
|
|
1349
|
-
],
|
|
1350
|
-
if (
|
|
1351
|
-
dataType:
|
|
1568
|
+
], Vt = (n) => {
|
|
1569
|
+
if (n?.kind === "field") return {
|
|
1570
|
+
dataType: n.dataType,
|
|
1352
1571
|
hasOwnFormat: !1,
|
|
1353
1572
|
label: "field"
|
|
1354
1573
|
};
|
|
1355
|
-
if (
|
|
1356
|
-
let [
|
|
1574
|
+
if (n?.kind !== "dimension") return;
|
|
1575
|
+
let [r] = ie([n]);
|
|
1357
1576
|
return {
|
|
1358
|
-
dataType:
|
|
1359
|
-
hasOwnFormat: !!
|
|
1577
|
+
dataType: t(r),
|
|
1578
|
+
hasOwnFormat: !!e(r),
|
|
1360
1579
|
label: "dimension"
|
|
1361
1580
|
};
|
|
1362
|
-
},
|
|
1581
|
+
}, Ht = (e) => {
|
|
1363
1582
|
let t = "data" in e ? e.data : void 0;
|
|
1364
|
-
return
|
|
1583
|
+
return Bt.flatMap((e) => {
|
|
1365
1584
|
let n = t?.[e];
|
|
1366
1585
|
return Array.isArray(n) ? n.flatMap((t, n) => e === "columns" && t.role !== "dimension" ? [] : [{
|
|
1367
1586
|
dimension: t,
|
|
@@ -1372,9 +1591,9 @@ var ft = (e, ...t) => e, O = {
|
|
|
1372
1591
|
]
|
|
1373
1592
|
}]) : [];
|
|
1374
1593
|
});
|
|
1375
|
-
},
|
|
1376
|
-
let r = e.format?.formatType, i =
|
|
1377
|
-
if (r === void 0 || !
|
|
1594
|
+
}, Ut = (e, t) => Ht(e).flatMap(({ dimension: e, path: n }) => {
|
|
1595
|
+
let r = e.format?.formatType, i = Vt(t.find((t) => t.fieldKey === e.fieldKey));
|
|
1596
|
+
if (r === void 0 || !zt.includes(r) || e.temporalGrouping?.mode === "part" || i?.dataType === void 0 || !Rt.includes(i.dataType) || r === "inherit" && i.hasOwnFormat) return [];
|
|
1378
1597
|
let a = [
|
|
1379
1598
|
...n,
|
|
1380
1599
|
"format",
|
|
@@ -1388,133 +1607,142 @@ var ft = (e, ...t) => e, O = {
|
|
|
1388
1607
|
received: r,
|
|
1389
1608
|
ref: e.ref
|
|
1390
1609
|
},
|
|
1391
|
-
message: `${
|
|
1610
|
+
message: `${Ie(a)}: ${o} such as 1672531200000 instead of dates. ${s}`,
|
|
1392
1611
|
path: a
|
|
1393
1612
|
}];
|
|
1394
|
-
}),
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1613
|
+
}), Wt = (e) => {
|
|
1614
|
+
if (e.type !== "bar" || !mt(e)) return [];
|
|
1615
|
+
let t = ["presentation", "layout"];
|
|
1616
|
+
return [{
|
|
1617
|
+
code: "inapplicable_layout",
|
|
1618
|
+
details: { received: e.presentation?.layout },
|
|
1619
|
+
message: `${Ie(t)}: one dimension with one measure draws plain bars, so the layout is ignored. Omit layout, or add a measure or a series dimension.`,
|
|
1620
|
+
path: t
|
|
1621
|
+
}];
|
|
1622
|
+
}, Gt = (e, t) => [...Wt(e), ...Ut(e, t)], U = z("bar"), Kt = {
|
|
1623
|
+
compile: Mt,
|
|
1624
|
+
documentation: U.documentation,
|
|
1625
|
+
examples: [U.example, ...(U.additionalExamples ?? []).map(({ definition: e }) => e)],
|
|
1626
|
+
jsonSchema: B(V.bar, `${U.documentation.title} definition`),
|
|
1399
1627
|
schema: V.bar,
|
|
1400
|
-
supportedFeatures:
|
|
1628
|
+
supportedFeatures: U.supportedFeatures,
|
|
1401
1629
|
type: "bar",
|
|
1402
1630
|
version: 1
|
|
1403
|
-
},
|
|
1404
|
-
compile:
|
|
1405
|
-
documentation:
|
|
1406
|
-
examples: [
|
|
1407
|
-
jsonSchema: B(V["astrato-app-filter-bar"], `${
|
|
1631
|
+
}, W = z("astrato-app-filter-bar"), qt = {
|
|
1632
|
+
compile: jt,
|
|
1633
|
+
documentation: W.documentation,
|
|
1634
|
+
examples: [W.example],
|
|
1635
|
+
jsonSchema: B(V["astrato-app-filter-bar"], `${W.documentation.title} definition`),
|
|
1408
1636
|
schema: V["astrato-app-filter-bar"],
|
|
1409
|
-
supportedFeatures:
|
|
1637
|
+
supportedFeatures: W.supportedFeatures,
|
|
1410
1638
|
type: "astrato-app-filter-bar",
|
|
1411
1639
|
version: 1
|
|
1412
1640
|
};
|
|
1413
|
-
|
|
1414
|
-
var
|
|
1641
|
+
r();
|
|
1642
|
+
var Jt = {
|
|
1415
1643
|
combo: {
|
|
1416
|
-
coloringType:
|
|
1644
|
+
coloringType: a.PerEachMeasure,
|
|
1417
1645
|
queryLimit: !0,
|
|
1418
|
-
schema:
|
|
1646
|
+
schema: ne,
|
|
1419
1647
|
sorting: !0,
|
|
1420
1648
|
type: "combo",
|
|
1421
|
-
vSpecSchema:
|
|
1649
|
+
vSpecSchema: at
|
|
1422
1650
|
},
|
|
1423
1651
|
"distribution-gauge": {
|
|
1424
|
-
coloringType:
|
|
1425
|
-
measureRole: () =>
|
|
1426
|
-
schema:
|
|
1652
|
+
coloringType: a.PerEachMeasure,
|
|
1653
|
+
measureRole: () => o.GAUGE_VALUE,
|
|
1654
|
+
schema: Ae,
|
|
1427
1655
|
type: "distribution-gauge",
|
|
1428
|
-
vSpecSchema:
|
|
1656
|
+
vSpecSchema: Ge
|
|
1429
1657
|
},
|
|
1430
1658
|
dot: {
|
|
1431
|
-
coloringType:
|
|
1432
|
-
schema:
|
|
1659
|
+
coloringType: a.Categorical,
|
|
1660
|
+
schema: te,
|
|
1433
1661
|
type: "dot",
|
|
1434
|
-
vSpecSchema:
|
|
1662
|
+
vSpecSchema: We
|
|
1435
1663
|
},
|
|
1436
1664
|
gauge: {
|
|
1437
|
-
coloringType: (e) => (e.data.dimensions?.length ?? 0) > 0 ?
|
|
1438
|
-
measureRole: (
|
|
1439
|
-
schema:
|
|
1665
|
+
coloringType: (e) => (e.data.dimensions?.length ?? 0) > 0 ? a.Categorical : a.PerEachMeasure,
|
|
1666
|
+
measureRole: (e, t) => (t.data.dimensions?.length ?? 0) > 0 && e === 1 ? o.GAUGE_TARGET : o.GAUGE_VALUE,
|
|
1667
|
+
schema: me,
|
|
1440
1668
|
type: "gauge",
|
|
1441
|
-
vSpecSchema:
|
|
1669
|
+
vSpecSchema: Ke
|
|
1442
1670
|
},
|
|
1443
1671
|
heatMap: {
|
|
1444
|
-
coloringType:
|
|
1445
|
-
dimensionRole: (e) => e === 0 ?
|
|
1446
|
-
measureRole: (
|
|
1672
|
+
coloringType: a.Gradient,
|
|
1673
|
+
dimensionRole: (e) => e === 0 ? n.HEAT_MAP_HORIZONTAL : n.HEAT_MAP_VERTICAL,
|
|
1674
|
+
measureRole: (e) => e === 0 ? o.HEAT_MAP_COLOR : o.HEAT_MAP_SIZE,
|
|
1447
1675
|
queryLimit: !0,
|
|
1448
1676
|
schema: pe,
|
|
1449
1677
|
sorting: !0,
|
|
1450
1678
|
type: "heatMap",
|
|
1451
|
-
vSpecSchema:
|
|
1679
|
+
vSpecSchema: ze
|
|
1452
1680
|
},
|
|
1453
1681
|
histogram: {
|
|
1454
|
-
coloringType:
|
|
1455
|
-
schema:
|
|
1682
|
+
coloringType: a.Single,
|
|
1683
|
+
schema: he,
|
|
1456
1684
|
type: "histogram",
|
|
1457
|
-
vSpecSchema:
|
|
1685
|
+
vSpecSchema: Je
|
|
1458
1686
|
},
|
|
1459
1687
|
pie: {
|
|
1460
|
-
coloringType:
|
|
1461
|
-
measureRole: (
|
|
1688
|
+
coloringType: a.Categorical,
|
|
1689
|
+
measureRole: (e) => e === 0 ? o.PIE_CHART_SLICE : o.PIE_CHART_LENGTH,
|
|
1462
1690
|
queryLimit: !0,
|
|
1463
|
-
schema:
|
|
1691
|
+
schema: se,
|
|
1464
1692
|
sorting: !0,
|
|
1465
1693
|
type: "pie",
|
|
1466
|
-
vSpecSchema:
|
|
1694
|
+
vSpecSchema: Xe
|
|
1467
1695
|
},
|
|
1468
1696
|
radar: {
|
|
1469
|
-
conditionalColoringFallbackType:
|
|
1470
|
-
schema:
|
|
1697
|
+
conditionalColoringFallbackType: a.Single,
|
|
1698
|
+
schema: s,
|
|
1471
1699
|
type: "radar",
|
|
1472
|
-
vSpecSchema:
|
|
1700
|
+
vSpecSchema: Ze
|
|
1473
1701
|
},
|
|
1474
1702
|
sankey: {
|
|
1475
|
-
schema:
|
|
1703
|
+
schema: xe,
|
|
1476
1704
|
type: "sankey",
|
|
1477
1705
|
vSpecSchema: Qe
|
|
1478
1706
|
},
|
|
1479
1707
|
scatter: {
|
|
1480
|
-
coloringType:
|
|
1481
|
-
dimensionRole: (e) => e === 0 ?
|
|
1482
|
-
measureRole: (
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
][
|
|
1708
|
+
coloringType: a.Categorical,
|
|
1709
|
+
dimensionRole: (e) => e === 0 ? n.SCATTER_DIMENSION : n.SCATTER_IMAGE,
|
|
1710
|
+
measureRole: (e) => [
|
|
1711
|
+
o.SCATTER_HORIZONTAL,
|
|
1712
|
+
o.SCATTER_VERTICAL,
|
|
1713
|
+
o.SCATTER_SIZE
|
|
1714
|
+
][e],
|
|
1487
1715
|
queryLimit: !0,
|
|
1488
|
-
schema:
|
|
1716
|
+
schema: Fe,
|
|
1489
1717
|
sorting: !0,
|
|
1490
1718
|
type: "scatter",
|
|
1491
|
-
vSpecSchema:
|
|
1719
|
+
vSpecSchema: tt
|
|
1492
1720
|
},
|
|
1493
1721
|
tree: {
|
|
1494
1722
|
queryLimit: !0,
|
|
1495
|
-
schema:
|
|
1723
|
+
schema: De,
|
|
1496
1724
|
sorting: !0,
|
|
1497
1725
|
type: "tree",
|
|
1498
|
-
vSpecSchema:
|
|
1726
|
+
vSpecSchema: Ve
|
|
1499
1727
|
},
|
|
1500
1728
|
treemap: {
|
|
1501
|
-
schema:
|
|
1729
|
+
schema: Me,
|
|
1502
1730
|
type: "treemap",
|
|
1503
|
-
vSpecSchema:
|
|
1731
|
+
vSpecSchema: ot
|
|
1504
1732
|
},
|
|
1505
1733
|
waterfall: {
|
|
1506
|
-
schema:
|
|
1734
|
+
schema: we,
|
|
1507
1735
|
type: "waterfall",
|
|
1508
|
-
vSpecSchema:
|
|
1736
|
+
vSpecSchema: Ue
|
|
1509
1737
|
},
|
|
1510
1738
|
"word-cloud": {
|
|
1511
|
-
conditionalColoringFallbackType:
|
|
1512
|
-
schema:
|
|
1739
|
+
conditionalColoringFallbackType: a.Single,
|
|
1740
|
+
schema: ve,
|
|
1513
1741
|
type: "word-cloud",
|
|
1514
|
-
vSpecSchema:
|
|
1742
|
+
vSpecSchema: Be
|
|
1515
1743
|
}
|
|
1516
|
-
},
|
|
1517
|
-
let n = [], r = t.presentation, i =
|
|
1744
|
+
}, Yt = (e, t) => {
|
|
1745
|
+
let n = [], r = t.presentation, i = ge(r?.axes);
|
|
1518
1746
|
if (i) return Promise.resolve({
|
|
1519
1747
|
issue: i,
|
|
1520
1748
|
success: !1
|
|
@@ -1522,7 +1750,7 @@ var Bt = {
|
|
|
1522
1750
|
r?.orientation !== void 0 && n.push({
|
|
1523
1751
|
name: "setOrientation",
|
|
1524
1752
|
payload: r.orientation
|
|
1525
|
-
}), r?.legend && n.push(...
|
|
1753
|
+
}), r?.legend && n.push(...Se(e.vSpec, r.legend)), Object.entries(r?.axes ?? {}).forEach(([e, t]) => {
|
|
1526
1754
|
t.titleVisible !== void 0 && n.push({
|
|
1527
1755
|
name: "setShowAxisTitle",
|
|
1528
1756
|
payload: {
|
|
@@ -1553,8 +1781,8 @@ var Bt = {
|
|
|
1553
1781
|
axisName: e,
|
|
1554
1782
|
showAxisLine: t.lineVisible
|
|
1555
1783
|
}
|
|
1556
|
-
}), n.push(...
|
|
1557
|
-
name:
|
|
1784
|
+
}), n.push(...ye(e, t)), "scale" in t && t.scale !== void 0 && n.push({
|
|
1785
|
+
name: ft.SET_AXIS_SCALE,
|
|
1558
1786
|
payload: {
|
|
1559
1787
|
axisName: e,
|
|
1560
1788
|
scale: t.scale
|
|
@@ -1563,26 +1791,26 @@ var Bt = {
|
|
|
1563
1791
|
});
|
|
1564
1792
|
let a = r?.axes?.primaryMeasure?.bands;
|
|
1565
1793
|
return a && n.push({
|
|
1566
|
-
name:
|
|
1794
|
+
name: ut.SET_MEASURE_AXIS_BANDS,
|
|
1567
1795
|
payload: { bands: a }
|
|
1568
1796
|
}), (t.data.measures ?? []).forEach((i) => {
|
|
1569
1797
|
let a = i.dataLabels ?? (t.type !== "combo" || i.seriesType === "bar" ? r?.dataLabels : void 0);
|
|
1570
1798
|
a && n.push({
|
|
1571
1799
|
name: "setMeasureDataLabelsShow",
|
|
1572
1800
|
payload: {
|
|
1573
|
-
...
|
|
1801
|
+
...C(e.resolvedRefs[i.ref]),
|
|
1574
1802
|
show: a.visible
|
|
1575
1803
|
}
|
|
1576
1804
|
});
|
|
1577
|
-
}),
|
|
1578
|
-
},
|
|
1805
|
+
}), v(e, n, ["presentation"]);
|
|
1806
|
+
}, Xt = (e, t) => {
|
|
1579
1807
|
let n = [];
|
|
1580
1808
|
if (t.type === "combo") {
|
|
1581
1809
|
(t.data.measures ?? []).forEach((t) => {
|
|
1582
1810
|
t.seriesType && n.push({
|
|
1583
|
-
name:
|
|
1811
|
+
name: dt.SET_MEASURE_GRAPH_TYPE,
|
|
1584
1812
|
payload: {
|
|
1585
|
-
...
|
|
1813
|
+
...C(e.resolvedRefs[t.ref]),
|
|
1586
1814
|
graphType: t.seriesType
|
|
1587
1815
|
}
|
|
1588
1816
|
});
|
|
@@ -1590,16 +1818,16 @@ var Bt = {
|
|
|
1590
1818
|
let r = t.data.measures ?? [], i = r.find((e) => e.seriesType === "bar"), a = r.find((e) => e.seriesType === "bar" && e.axis)?.axis;
|
|
1591
1819
|
r.forEach((t) => {
|
|
1592
1820
|
t.seriesType !== "bar" && t.axis && n.push({
|
|
1593
|
-
name:
|
|
1821
|
+
name: lt.CHANGE_MEASURE_AXIS,
|
|
1594
1822
|
payload: {
|
|
1595
|
-
...
|
|
1823
|
+
...C(e.resolvedRefs[t.ref]),
|
|
1596
1824
|
secondaryAxis: t.axis === "secondary"
|
|
1597
1825
|
}
|
|
1598
1826
|
});
|
|
1599
1827
|
}), i && a && n.push({
|
|
1600
|
-
name:
|
|
1828
|
+
name: lt.CHANGE_MEASURE_AXIS,
|
|
1601
1829
|
payload: {
|
|
1602
|
-
...
|
|
1830
|
+
...C(e.resolvedRefs[i.ref]),
|
|
1603
1831
|
secondaryAxis: a === "secondary"
|
|
1604
1832
|
}
|
|
1605
1833
|
});
|
|
@@ -1607,44 +1835,44 @@ var Bt = {
|
|
|
1607
1835
|
if (t.type === "gauge" || t.type === "distribution-gauge") {
|
|
1608
1836
|
let e = t.type === "distribution-gauge";
|
|
1609
1837
|
e && n.push({
|
|
1610
|
-
name:
|
|
1838
|
+
name: pt.SET_GAUGE_COMPARISON_MODE,
|
|
1611
1839
|
payload: !0
|
|
1612
1840
|
}), t.presentation?.displayMode && n.push({
|
|
1613
|
-
name: e ?
|
|
1841
|
+
name: e ? pt.SET_GAUGE_BAR_MODE : ct.SET_GAUGE_BAR_MODE,
|
|
1614
1842
|
payload: t.presentation.displayMode === "bar"
|
|
1615
1843
|
}), !e && (t.data.dimensions?.length ?? 0) > 0 && (t.data.measures?.length ?? 0) > 1 && n.push({
|
|
1616
|
-
name:
|
|
1617
|
-
payload:
|
|
1844
|
+
name: ct.SET_GAUGE_TARGET_TYPE,
|
|
1845
|
+
payload: st.Data
|
|
1618
1846
|
});
|
|
1619
1847
|
}
|
|
1620
1848
|
if (t.type === "tree" && t.presentation?.layout) {
|
|
1621
1849
|
let e = t.presentation.layout;
|
|
1622
1850
|
e.compact !== void 0 && n.push({
|
|
1623
|
-
name:
|
|
1851
|
+
name: T.SET_TREE_COMPACT,
|
|
1624
1852
|
payload: e.compact
|
|
1625
1853
|
}), e.forceAutoFit !== void 0 && n.push({
|
|
1626
|
-
name:
|
|
1854
|
+
name: T.SET_TREE_FORCE_AUTO_FIT,
|
|
1627
1855
|
payload: e.forceAutoFit
|
|
1628
1856
|
}), e.direction !== void 0 && n.push({
|
|
1629
|
-
name:
|
|
1857
|
+
name: T.SET_TREE_DIRECTION_ORIGIN,
|
|
1630
1858
|
payload: e.direction
|
|
1631
1859
|
}), e.initialExpandedLevels !== void 0 && n.push({
|
|
1632
|
-
name:
|
|
1860
|
+
name: T.SET_TREE_INITIAL_EXPANDED_LEVELS,
|
|
1633
1861
|
payload: e.initialExpandedLevels
|
|
1634
1862
|
});
|
|
1635
1863
|
}
|
|
1636
|
-
return
|
|
1637
|
-
},
|
|
1864
|
+
return v(e, n, ["presentation"]);
|
|
1865
|
+
}, Zt = (e, t, n) => {
|
|
1638
1866
|
let r = "coloring" in e.vSpec && e.vSpec.coloring !== void 0, i = t.presentation?.legend, a = !!i && Object.keys(i).length > 0 && i.visible !== !1, o = t.presentation?.coloring !== void 0, s = n.coloringType ?? (o ? n.conditionalColoringFallbackType : void 0);
|
|
1639
1867
|
return !s || r || !a && !o ? Promise.resolve({
|
|
1640
1868
|
state: e,
|
|
1641
1869
|
success: !0
|
|
1642
|
-
}) :
|
|
1870
|
+
}) : v(e, [{
|
|
1643
1871
|
name: "setColoringType",
|
|
1644
1872
|
payload: typeof s == "function" ? s(t) : s
|
|
1645
1873
|
}], a ? ["presentation", "legend"] : ["presentation", "coloring"]);
|
|
1646
|
-
},
|
|
1647
|
-
let n =
|
|
1874
|
+
}, Qt = async (e, t) => {
|
|
1875
|
+
let n = Jt[t], r = w(e);
|
|
1648
1876
|
if (r) return {
|
|
1649
1877
|
issues: [{
|
|
1650
1878
|
code: "invalid_structure",
|
|
@@ -1655,27 +1883,27 @@ var Bt = {
|
|
|
1655
1883
|
};
|
|
1656
1884
|
let i = n.schema.safeParse(e.definition);
|
|
1657
1885
|
if (!i.success) return {
|
|
1658
|
-
issues:
|
|
1886
|
+
issues: h(i.error, e.definition),
|
|
1659
1887
|
success: !1
|
|
1660
1888
|
};
|
|
1661
1889
|
let a = n.vSpecSchema.safeParse(e.baseVSpec);
|
|
1662
1890
|
if (!a.success) return {
|
|
1663
|
-
issues: [
|
|
1891
|
+
issues: [g("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: a.error.issues } })],
|
|
1664
1892
|
success: !1
|
|
1665
1893
|
};
|
|
1666
1894
|
let o = a.data;
|
|
1667
|
-
if (!
|
|
1895
|
+
if (!S(o, [
|
|
1668
1896
|
"dimensions",
|
|
1669
1897
|
"measures",
|
|
1670
1898
|
"supportingMeasures",
|
|
1671
1899
|
"sortingMeasures"
|
|
1672
1900
|
])) return {
|
|
1673
|
-
issues: [
|
|
1901
|
+
issues: [g("non_fresh_base_vspec", ["baseVSpec"], `${t} definitions require a fresh base vSpec.`)],
|
|
1674
1902
|
success: !1
|
|
1675
1903
|
};
|
|
1676
|
-
let s = i.data, l = s.data.dimensions ?? [], f = s.data.measures ?? [],
|
|
1677
|
-
...
|
|
1678
|
-
...
|
|
1904
|
+
let s = i.data, l = s.data.dimensions ?? [], f = s.data.measures ?? [], ee = [...l, ...f].map((e) => e.ref), p = [
|
|
1905
|
+
...Te(l, e.availableFields, ["data", "dimensions"], "dimension"),
|
|
1906
|
+
...Te(f, e.availableFields, ["data", "measures"], "measure"),
|
|
1679
1907
|
...u([{
|
|
1680
1908
|
items: l,
|
|
1681
1909
|
path: ["data", "dimensions"]
|
|
@@ -1684,34 +1912,34 @@ var Bt = {
|
|
|
1684
1912
|
path: ["data", "measures"]
|
|
1685
1913
|
}]),
|
|
1686
1914
|
...c(s.filterGroup, e.availableFields),
|
|
1687
|
-
...
|
|
1688
|
-
...
|
|
1689
|
-
...t === "histogram" && l[0] ?
|
|
1915
|
+
...Le(s.sorting, ee),
|
|
1916
|
+
...le(s.presentation?.coloring, l.map((e) => e.ref), f.map((e) => e.ref)),
|
|
1917
|
+
...t === "histogram" && l[0] ? y(l[0], e.availableFields, [
|
|
1690
1918
|
"data",
|
|
1691
1919
|
"dimensions",
|
|
1692
1920
|
0
|
|
1693
1921
|
], [
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1922
|
+
H.FieldType.DECIMAL,
|
|
1923
|
+
H.FieldType.FLOAT,
|
|
1924
|
+
H.FieldType.INT,
|
|
1925
|
+
H.FieldType.REAL
|
|
1698
1926
|
], "a histogram dimension") : []
|
|
1699
1927
|
];
|
|
1700
|
-
if (
|
|
1701
|
-
issues:
|
|
1928
|
+
if (p.length > 0) return {
|
|
1929
|
+
issues: p,
|
|
1702
1930
|
success: !1
|
|
1703
1931
|
};
|
|
1704
|
-
let
|
|
1705
|
-
state:
|
|
1932
|
+
let m = {
|
|
1933
|
+
state: x(e, o),
|
|
1706
1934
|
success: !0
|
|
1707
1935
|
};
|
|
1708
1936
|
for (let [e, t] of l.entries()) {
|
|
1709
|
-
if ("issue" in
|
|
1710
|
-
issues: [
|
|
1937
|
+
if ("issue" in m) return {
|
|
1938
|
+
issues: [m.issue],
|
|
1711
1939
|
success: !1
|
|
1712
1940
|
};
|
|
1713
1941
|
let r = n.dimensionRole?.(e, s);
|
|
1714
|
-
|
|
1942
|
+
m = await b(m.state, t, "dimension", "addDimension", {
|
|
1715
1943
|
key: t.fieldKey,
|
|
1716
1944
|
...r ? { role: r } : {}
|
|
1717
1945
|
}, [
|
|
@@ -1721,40 +1949,40 @@ var Bt = {
|
|
|
1721
1949
|
]);
|
|
1722
1950
|
}
|
|
1723
1951
|
for (let [t, r] of f.entries()) {
|
|
1724
|
-
if ("issue" in
|
|
1725
|
-
issues: [
|
|
1952
|
+
if ("issue" in m) return {
|
|
1953
|
+
issues: [m.issue],
|
|
1726
1954
|
success: !1
|
|
1727
1955
|
};
|
|
1728
1956
|
let i = n.measureRole?.(t, s);
|
|
1729
|
-
|
|
1957
|
+
m = await b(m.state, r, "measure", "addMeasure", d(r, e.availableFields, i ? { role: i } : {}), [
|
|
1730
1958
|
"data",
|
|
1731
1959
|
"measures",
|
|
1732
1960
|
t
|
|
1733
1961
|
]);
|
|
1734
1962
|
}
|
|
1735
|
-
return "issue" in
|
|
1963
|
+
return "issue" in m || (m = await je(m.state, l, "updateDimension", ["data", "dimensions"]), "issue" in m) || (m = await Xt(m.state, s), "issue" in m) || (m = await Zt(m.state, s, n), "issue" in m) || (m = await Ne(m.state, l, "setDimensionTemporalGrouping", ["data", "dimensions"]), "issue" in m) || (m = await _e(m.state, l, {
|
|
1736
1964
|
formatString: "setDimensionFormatString",
|
|
1737
1965
|
formatType: "setDimensionFormatType"
|
|
1738
|
-
}, ["data", "dimensions"]), "issue" in
|
|
1966
|
+
}, ["data", "dimensions"]), "issue" in m) || (m = await _e(m.state, f, {
|
|
1739
1967
|
currency: "setMeasureCurrency",
|
|
1740
1968
|
currencyIsPrefix: "setMeasureCurrencyIsPrefix",
|
|
1741
1969
|
formatString: "setMeasureFormatString",
|
|
1742
1970
|
formatType: "setMeasureFormatType",
|
|
1743
1971
|
negativeType: "setMeasureNegativeType"
|
|
1744
|
-
}, ["data", "measures"]), "issue" in
|
|
1972
|
+
}, ["data", "measures"]), "issue" in m) || (m = await Ce(m.state, s.filterGroup), "issue" in m) || n.sorting && (m = await Oe(m.state, s.sorting, "changeSortOrderAndDirection", "toggleSortingItem"), "issue" in m) || n.queryLimit && s.limiting?.queryLimit !== void 0 && (m = await v(m.state, [{
|
|
1745
1973
|
name: "setQueryLimit",
|
|
1746
1974
|
payload: s.limiting.queryLimit
|
|
1747
|
-
}], ["limiting"]), "issue" in
|
|
1748
|
-
issues: [
|
|
1975
|
+
}], ["limiting"]), "issue" in m) || (m = await Yt(m.state, s), "issue" in m) ? {
|
|
1976
|
+
issues: [m.issue],
|
|
1749
1977
|
success: !1
|
|
1750
|
-
} : (
|
|
1751
|
-
issues: [
|
|
1978
|
+
} : (m = await Ee(m.state, s.presentation?.coloring), "issue" in m ? {
|
|
1979
|
+
issues: [m.issue],
|
|
1752
1980
|
success: !1
|
|
1753
|
-
} :
|
|
1754
|
-
},
|
|
1981
|
+
} : _(m.state, n.vSpecSchema));
|
|
1982
|
+
}, G = (e) => {
|
|
1755
1983
|
let t = z(e.type);
|
|
1756
1984
|
return {
|
|
1757
|
-
compile: (t) =>
|
|
1985
|
+
compile: (t) => Qt(t, e.type),
|
|
1758
1986
|
documentation: t.documentation,
|
|
1759
1987
|
examples: [t.example, ...(t.additionalExamples ?? []).map(({ definition: e }) => e)],
|
|
1760
1988
|
jsonSchema: B(e.schema, `${t.documentation.title} definition`),
|
|
@@ -1763,83 +1991,92 @@ var Bt = {
|
|
|
1763
1991
|
type: e.type,
|
|
1764
1992
|
version: 1
|
|
1765
1993
|
};
|
|
1766
|
-
},
|
|
1767
|
-
|
|
1994
|
+
}, $t = [
|
|
1995
|
+
G({
|
|
1768
1996
|
schema: V.combo,
|
|
1769
1997
|
type: "combo"
|
|
1770
1998
|
}),
|
|
1771
|
-
|
|
1999
|
+
G({
|
|
1772
2000
|
schema: V.dot,
|
|
1773
2001
|
type: "dot"
|
|
1774
2002
|
}),
|
|
1775
|
-
|
|
2003
|
+
G({
|
|
1776
2004
|
schema: V.scatter,
|
|
1777
2005
|
type: "scatter"
|
|
1778
2006
|
}),
|
|
1779
|
-
|
|
2007
|
+
G({
|
|
1780
2008
|
schema: V.histogram,
|
|
1781
2009
|
type: "histogram"
|
|
1782
2010
|
}),
|
|
1783
|
-
|
|
2011
|
+
G({
|
|
1784
2012
|
schema: V.heatMap,
|
|
1785
2013
|
type: "heatMap"
|
|
1786
2014
|
}),
|
|
1787
|
-
|
|
2015
|
+
G({
|
|
1788
2016
|
schema: V.radar,
|
|
1789
2017
|
type: "radar"
|
|
1790
2018
|
}),
|
|
1791
|
-
|
|
2019
|
+
G({
|
|
1792
2020
|
schema: V.gauge,
|
|
1793
2021
|
type: "gauge"
|
|
1794
2022
|
}),
|
|
1795
|
-
|
|
2023
|
+
G({
|
|
1796
2024
|
schema: V["distribution-gauge"],
|
|
1797
2025
|
type: "distribution-gauge"
|
|
1798
2026
|
}),
|
|
1799
|
-
|
|
2027
|
+
G({
|
|
1800
2028
|
schema: V.pie,
|
|
1801
2029
|
type: "pie"
|
|
1802
2030
|
}),
|
|
1803
|
-
|
|
2031
|
+
G({
|
|
1804
2032
|
schema: V.tree,
|
|
1805
2033
|
type: "tree"
|
|
1806
2034
|
}),
|
|
1807
|
-
|
|
2035
|
+
G({
|
|
1808
2036
|
schema: V.treemap,
|
|
1809
2037
|
type: "treemap"
|
|
1810
2038
|
}),
|
|
1811
|
-
|
|
2039
|
+
G({
|
|
1812
2040
|
schema: V.sankey,
|
|
1813
2041
|
type: "sankey"
|
|
1814
2042
|
}),
|
|
1815
|
-
|
|
2043
|
+
G({
|
|
1816
2044
|
schema: V.waterfall,
|
|
1817
2045
|
type: "waterfall"
|
|
1818
2046
|
}),
|
|
1819
|
-
|
|
2047
|
+
G({
|
|
1820
2048
|
schema: V["word-cloud"],
|
|
1821
2049
|
type: "word-cloud"
|
|
1822
2050
|
})
|
|
1823
|
-
],
|
|
1824
|
-
compile:
|
|
1825
|
-
documentation:
|
|
1826
|
-
examples: [
|
|
1827
|
-
jsonSchema: B(V.filter, `${
|
|
2051
|
+
], K = z("filter"), en = {
|
|
2052
|
+
compile: Nt,
|
|
2053
|
+
documentation: K.documentation,
|
|
2054
|
+
examples: [K.example],
|
|
2055
|
+
jsonSchema: B(V.filter, `${K.documentation.title} definition`),
|
|
1828
2056
|
schema: V.filter,
|
|
1829
|
-
supportedFeatures:
|
|
2057
|
+
supportedFeatures: K.supportedFeatures,
|
|
1830
2058
|
type: "filter",
|
|
1831
2059
|
version: 1
|
|
1832
|
-
},
|
|
1833
|
-
compile:
|
|
2060
|
+
}, q = z("line"), tn = {
|
|
2061
|
+
compile: Pt,
|
|
2062
|
+
documentation: q.documentation,
|
|
2063
|
+
examples: [q.example, ...(q.additionalExamples ?? []).map(({ definition: e }) => e)],
|
|
2064
|
+
jsonSchema: B(V.line, `${q.documentation.title} definition`),
|
|
2065
|
+
schema: V.line,
|
|
2066
|
+
supportedFeatures: q.supportedFeatures,
|
|
2067
|
+
type: "line",
|
|
2068
|
+
version: 1
|
|
2069
|
+
}, J = z("map"), nn = {
|
|
2070
|
+
compile: It,
|
|
1834
2071
|
documentation: J.documentation,
|
|
1835
2072
|
examples: [J.example, ...(J.additionalExamples ?? []).map(({ definition: e }) => e)],
|
|
1836
|
-
jsonSchema: B(V.
|
|
1837
|
-
schema: V.
|
|
2073
|
+
jsonSchema: B(V.map, "Map definition"),
|
|
2074
|
+
schema: V.map,
|
|
1838
2075
|
supportedFeatures: J.supportedFeatures,
|
|
1839
|
-
type: "
|
|
2076
|
+
type: "map",
|
|
1840
2077
|
version: 1
|
|
1841
|
-
}, Y = z("number"),
|
|
1842
|
-
compile:
|
|
2078
|
+
}, Y = z("number"), rn = {
|
|
2079
|
+
compile: Ft,
|
|
1843
2080
|
documentation: Y.documentation,
|
|
1844
2081
|
examples: [Y.example],
|
|
1845
2082
|
jsonSchema: B(V.number, `${Y.documentation.title} definition`),
|
|
@@ -1850,7 +2087,7 @@ var Bt = {
|
|
|
1850
2087
|
}, X = (e, t) => Object.entries(e).flatMap(([e, n]) => n === void 0 || !t[e] ? [] : [{
|
|
1851
2088
|
name: t[e],
|
|
1852
2089
|
payload: n
|
|
1853
|
-
}]),
|
|
2090
|
+
}]), an = {
|
|
1854
2091
|
"atomic-input": {
|
|
1855
2092
|
createRequests: (e) => {
|
|
1856
2093
|
let t = e.customLabel;
|
|
@@ -1870,16 +2107,16 @@ var Bt = {
|
|
|
1870
2107
|
},
|
|
1871
2108
|
schema: f,
|
|
1872
2109
|
type: "atomic-input",
|
|
1873
|
-
vSpecSchema:
|
|
2110
|
+
vSpecSchema: Ye
|
|
1874
2111
|
},
|
|
1875
2112
|
iframe: {
|
|
1876
2113
|
createRequests: (e) => [{
|
|
1877
2114
|
name: "setIframeUrl",
|
|
1878
2115
|
payload: e.url
|
|
1879
2116
|
}],
|
|
1880
|
-
schema:
|
|
2117
|
+
schema: re,
|
|
1881
2118
|
type: "iframe",
|
|
1882
|
-
vSpecSchema:
|
|
2119
|
+
vSpecSchema: it
|
|
1883
2120
|
},
|
|
1884
2121
|
image: {
|
|
1885
2122
|
createRequests: (e) => X(e, {
|
|
@@ -1890,9 +2127,9 @@ var Bt = {
|
|
|
1890
2127
|
shadow: "setImageShadow",
|
|
1891
2128
|
source: "setImageSource"
|
|
1892
2129
|
}),
|
|
1893
|
-
schema:
|
|
2130
|
+
schema: ce,
|
|
1894
2131
|
type: "image",
|
|
1895
|
-
vSpecSchema:
|
|
2132
|
+
vSpecSchema: qe
|
|
1896
2133
|
},
|
|
1897
2134
|
shape: {
|
|
1898
2135
|
createRequests: (e) => X(e, {
|
|
@@ -1910,9 +2147,9 @@ var Bt = {
|
|
|
1910
2147
|
shape: "setShapeType",
|
|
1911
2148
|
strokeColor: "setShapeBorderColor"
|
|
1912
2149
|
}),
|
|
1913
|
-
schema:
|
|
2150
|
+
schema: Re,
|
|
1914
2151
|
type: "shape",
|
|
1915
|
-
vSpecSchema:
|
|
2152
|
+
vSpecSchema: rt
|
|
1916
2153
|
},
|
|
1917
2154
|
simpleTextObject: {
|
|
1918
2155
|
createRequests: (e) => [...e.content === void 0 ? [] : [{
|
|
@@ -1931,12 +2168,12 @@ var Bt = {
|
|
|
1931
2168
|
textColor: "setTextColor",
|
|
1932
2169
|
wordWrap: "setTextWordWrap"
|
|
1933
2170
|
})],
|
|
1934
|
-
schema:
|
|
2171
|
+
schema: de,
|
|
1935
2172
|
type: "simpleTextObject",
|
|
1936
|
-
vSpecSchema:
|
|
2173
|
+
vSpecSchema: nt
|
|
1937
2174
|
}
|
|
1938
2175
|
}, Z = async (e, t) => {
|
|
1939
|
-
let n =
|
|
2176
|
+
let n = an[t], r = w(e);
|
|
1940
2177
|
if (r) return {
|
|
1941
2178
|
issues: [{
|
|
1942
2179
|
code: "invalid_structure",
|
|
@@ -1947,21 +2184,21 @@ var Bt = {
|
|
|
1947
2184
|
};
|
|
1948
2185
|
let i = n.schema.safeParse(e.definition);
|
|
1949
2186
|
if (!i.success) return {
|
|
1950
|
-
issues:
|
|
2187
|
+
issues: h(i.error, e.definition),
|
|
1951
2188
|
success: !1
|
|
1952
2189
|
};
|
|
1953
2190
|
let a = n.vSpecSchema.safeParse(e.baseVSpec);
|
|
1954
2191
|
if (!a.success) return {
|
|
1955
|
-
issues: [
|
|
2192
|
+
issues: [g("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: a.error.issues } })],
|
|
1956
2193
|
success: !1
|
|
1957
2194
|
};
|
|
1958
|
-
let o =
|
|
2195
|
+
let o = x(e, a.data), s = i.data.settings, c = await v(o, n.createRequests(s), ["settings"]);
|
|
1959
2196
|
return "issue" in c ? {
|
|
1960
2197
|
issues: [c.issue],
|
|
1961
2198
|
success: !1
|
|
1962
|
-
} :
|
|
1963
|
-
},
|
|
1964
|
-
let t =
|
|
2199
|
+
} : _(c.state, n.vSpecSchema);
|
|
2200
|
+
}, on = async (e) => {
|
|
2201
|
+
let t = w(e);
|
|
1965
2202
|
if (t) return {
|
|
1966
2203
|
issues: [{
|
|
1967
2204
|
code: "invalid_structure",
|
|
@@ -1970,37 +2207,37 @@ var Bt = {
|
|
|
1970
2207
|
}],
|
|
1971
2208
|
success: !1
|
|
1972
2209
|
};
|
|
1973
|
-
let n =
|
|
2210
|
+
let n = m.safeParse(e.definition);
|
|
1974
2211
|
if (!n.success) return {
|
|
1975
|
-
issues:
|
|
2212
|
+
issues: h(n.error, e.definition),
|
|
1976
2213
|
success: !1
|
|
1977
2214
|
};
|
|
1978
|
-
let r =
|
|
2215
|
+
let r = He.safeParse(e.baseVSpec);
|
|
1979
2216
|
if (!r.success) return {
|
|
1980
|
-
issues: [
|
|
2217
|
+
issues: [g("invalid_structure", ["baseVSpec"], "Base date-picker vSpec is invalid.", { details: { issues: r.error.issues } })],
|
|
1981
2218
|
success: !1
|
|
1982
2219
|
};
|
|
1983
2220
|
let i = r.data;
|
|
1984
|
-
if (!
|
|
1985
|
-
issues: [
|
|
2221
|
+
if (!S(i, ["dimensions", "measures"])) return {
|
|
2222
|
+
issues: [g("non_fresh_base_vspec", ["baseVSpec"], "Date-picker definitions require a fresh vSpec.")],
|
|
1986
2223
|
success: !1
|
|
1987
2224
|
};
|
|
1988
|
-
let a = n.data, o = [...
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
2225
|
+
let a = n.data, o = [...ae(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...y(a.data.field, e.availableFields, ["data", "field"], [
|
|
2226
|
+
H.FieldType.DATE,
|
|
2227
|
+
H.FieldType.TIMESTAMP,
|
|
2228
|
+
H.FieldType.TIMESTAMP_TZ
|
|
1992
2229
|
], "a date-picker field")];
|
|
1993
2230
|
if (o.length > 0) return {
|
|
1994
2231
|
issues: o,
|
|
1995
2232
|
success: !1
|
|
1996
2233
|
};
|
|
1997
|
-
let s = await x(
|
|
2234
|
+
let s = await b(x(e, i), a.data.field, "dimension", "addDatePickerDimension", { key: a.data.field.fieldKey }, ["data", "field"]);
|
|
1998
2235
|
if ("issue" in s) return {
|
|
1999
2236
|
issues: [s.issue],
|
|
2000
2237
|
success: !1
|
|
2001
2238
|
};
|
|
2002
2239
|
let { pickerType: c, ...l } = a.settings ?? {};
|
|
2003
|
-
return s = await
|
|
2240
|
+
return s = await v(s.state, X({
|
|
2004
2241
|
pickerType: c,
|
|
2005
2242
|
...l
|
|
2006
2243
|
}, {
|
|
@@ -2015,9 +2252,9 @@ var Bt = {
|
|
|
2015
2252
|
}), ["settings"]), "issue" in s ? {
|
|
2016
2253
|
issues: [s.issue],
|
|
2017
2254
|
success: !1
|
|
2018
|
-
} :
|
|
2019
|
-
},
|
|
2020
|
-
let t =
|
|
2255
|
+
} : _(s.state, He);
|
|
2256
|
+
}, sn = async (e) => {
|
|
2257
|
+
let t = w(e);
|
|
2021
2258
|
if (t) return {
|
|
2022
2259
|
issues: [{
|
|
2023
2260
|
code: "invalid_structure",
|
|
@@ -2028,39 +2265,39 @@ var Bt = {
|
|
|
2028
2265
|
};
|
|
2029
2266
|
let n = l.safeParse(e.definition);
|
|
2030
2267
|
if (!n.success) return {
|
|
2031
|
-
issues:
|
|
2268
|
+
issues: h(n.error, e.definition),
|
|
2032
2269
|
success: !1
|
|
2033
2270
|
};
|
|
2034
|
-
let r =
|
|
2271
|
+
let r = et.safeParse(e.baseVSpec);
|
|
2035
2272
|
if (!r.success) return {
|
|
2036
|
-
issues: [
|
|
2273
|
+
issues: [g("invalid_structure", ["baseVSpec"], "Base slider vSpec is invalid.", { details: { issues: r.error.issues } })],
|
|
2037
2274
|
success: !1
|
|
2038
2275
|
};
|
|
2039
2276
|
let i = r.data;
|
|
2040
|
-
if (!
|
|
2041
|
-
issues: [
|
|
2277
|
+
if (!S(i, ["dimensions", "measures"])) return {
|
|
2278
|
+
issues: [g("non_fresh_base_vspec", ["baseVSpec"], "Slider definitions require a fresh vSpec.")],
|
|
2042
2279
|
success: !1
|
|
2043
2280
|
};
|
|
2044
|
-
let a = n.data, o = [...
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2281
|
+
let a = n.data, o = [...ae(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...y(a.data.field, e.availableFields, ["data", "field"], [
|
|
2282
|
+
H.FieldType.DATE,
|
|
2283
|
+
H.FieldType.DECIMAL,
|
|
2284
|
+
H.FieldType.FLOAT,
|
|
2285
|
+
H.FieldType.INT,
|
|
2286
|
+
H.FieldType.REAL,
|
|
2287
|
+
H.FieldType.TIMESTAMP,
|
|
2288
|
+
H.FieldType.TIMESTAMP_TZ
|
|
2052
2289
|
], "a slider field")];
|
|
2053
2290
|
if (o.length > 0) return {
|
|
2054
2291
|
issues: o,
|
|
2055
2292
|
success: !1
|
|
2056
2293
|
};
|
|
2057
|
-
let s = await x(
|
|
2294
|
+
let s = await b(x(e, i), a.data.field, "dimension", "addSliderDimension", { key: a.data.field.fieldKey }, ["data", "field"]);
|
|
2058
2295
|
if ("issue" in s) return {
|
|
2059
2296
|
issues: [s.issue],
|
|
2060
2297
|
success: !1
|
|
2061
2298
|
};
|
|
2062
2299
|
let c = a.settings ?? {};
|
|
2063
|
-
return s = await
|
|
2300
|
+
return s = await v(s.state, [...c.range === void 0 ? [] : [{
|
|
2064
2301
|
name: "setSliderManualRangeEnabled",
|
|
2065
2302
|
payload: !0
|
|
2066
2303
|
}], ...X(c, {
|
|
@@ -2071,7 +2308,7 @@ var Bt = {
|
|
|
2071
2308
|
})], ["settings"]), "issue" in s ? {
|
|
2072
2309
|
issues: [s.issue],
|
|
2073
2310
|
success: !1
|
|
2074
|
-
} :
|
|
2311
|
+
} : _(s.state, et);
|
|
2075
2312
|
}, Q = (e) => {
|
|
2076
2313
|
let t = z(e.type);
|
|
2077
2314
|
return {
|
|
@@ -2084,9 +2321,9 @@ var Bt = {
|
|
|
2084
2321
|
type: e.type,
|
|
2085
2322
|
version: 1
|
|
2086
2323
|
};
|
|
2087
|
-
},
|
|
2324
|
+
}, cn = [
|
|
2088
2325
|
Q({
|
|
2089
|
-
compile:
|
|
2326
|
+
compile: on,
|
|
2090
2327
|
schema: V["date-picker"],
|
|
2091
2328
|
type: "date-picker"
|
|
2092
2329
|
}),
|
|
@@ -2116,12 +2353,12 @@ var Bt = {
|
|
|
2116
2353
|
type: "atomic-input"
|
|
2117
2354
|
}),
|
|
2118
2355
|
Q({
|
|
2119
|
-
compile:
|
|
2356
|
+
compile: sn,
|
|
2120
2357
|
schema: V.slider,
|
|
2121
2358
|
type: "slider"
|
|
2122
2359
|
})
|
|
2123
|
-
], $ = z("table"),
|
|
2124
|
-
compile:
|
|
2360
|
+
], $ = z("table"), ln = {
|
|
2361
|
+
compile: Lt,
|
|
2125
2362
|
documentation: $.documentation,
|
|
2126
2363
|
examples: [$.example, ...($.additionalExamples ?? []).map(({ definition: e }) => e)],
|
|
2127
2364
|
jsonSchema: B(V.table, `${$.documentation.title} definition`),
|
|
@@ -2129,24 +2366,25 @@ var Bt = {
|
|
|
2129
2366
|
supportedFeatures: $.supportedFeatures,
|
|
2130
2367
|
type: "table",
|
|
2131
2368
|
version: 1
|
|
2132
|
-
},
|
|
2133
|
-
zt,
|
|
2134
|
-
Rt,
|
|
2135
|
-
...Gt,
|
|
2136
|
-
...Qt,
|
|
2369
|
+
}, un = (e, t) => `${t}:${e}`, dn = [
|
|
2137
2370
|
qt,
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2371
|
+
Kt,
|
|
2372
|
+
...$t,
|
|
2373
|
+
...cn,
|
|
2374
|
+
tn,
|
|
2375
|
+
nn,
|
|
2376
|
+
ln,
|
|
2377
|
+
rn,
|
|
2378
|
+
en
|
|
2379
|
+
], fn = new Map(dn.map((e) => [un(e.type, e.version), e])), pn = (e, t = 1) => fn.get(un(e, t)), mn = () => [...fn.values()].map(({ documentation: e, examples: t, jsonSchema: n, supportedFeatures: r, type: i, version: a }) => ({
|
|
2142
2380
|
documentation: e,
|
|
2143
2381
|
examples: t,
|
|
2144
2382
|
jsonSchema: n,
|
|
2145
2383
|
supportedFeatures: r,
|
|
2146
2384
|
type: i,
|
|
2147
2385
|
version: a
|
|
2148
|
-
})),
|
|
2149
|
-
let t =
|
|
2386
|
+
})), hn = async (e) => {
|
|
2387
|
+
let t = w(e);
|
|
2150
2388
|
if (t) return {
|
|
2151
2389
|
issues: [{
|
|
2152
2390
|
code: "invalid_structure",
|
|
@@ -2155,14 +2393,14 @@ var Bt = {
|
|
|
2155
2393
|
}],
|
|
2156
2394
|
success: !1
|
|
2157
2395
|
};
|
|
2158
|
-
let n =
|
|
2396
|
+
let n = kt(e.definition);
|
|
2159
2397
|
if (n) return {
|
|
2160
2398
|
issues: [n],
|
|
2161
2399
|
success: !1
|
|
2162
2400
|
};
|
|
2163
|
-
let r = e.definition, i =
|
|
2401
|
+
let r = e.definition, i = pn(r.type, r.version), a = E.array(Pe).safeParse(e.availableFields);
|
|
2164
2402
|
if (!a.success) return {
|
|
2165
|
-
issues:
|
|
2403
|
+
issues: h(a.error, e.availableFields, ["availableFields"]),
|
|
2166
2404
|
success: !1
|
|
2167
2405
|
};
|
|
2168
2406
|
let o = /* @__PURE__ */ new Map(), s = a.data.flatMap((e, t) => {
|
|
@@ -2182,14 +2420,14 @@ var Bt = {
|
|
|
2182
2420
|
issues: s,
|
|
2183
2421
|
success: !1
|
|
2184
2422
|
};
|
|
2185
|
-
let c =
|
|
2423
|
+
let c = ie(a.data), l = E.array($e).safeParse(c);
|
|
2186
2424
|
if (!l.success) return {
|
|
2187
|
-
issues:
|
|
2425
|
+
issues: h(l.error, c, ["availableFields"]),
|
|
2188
2426
|
success: !1
|
|
2189
2427
|
};
|
|
2190
2428
|
if (!i) return {
|
|
2191
2429
|
issues: [{
|
|
2192
|
-
allowedValues:
|
|
2430
|
+
allowedValues: Ot(),
|
|
2193
2431
|
code: "unsupported_visualization",
|
|
2194
2432
|
message: "Visualization definition descriptor is not available.",
|
|
2195
2433
|
path: ["type"]
|
|
@@ -2201,10 +2439,10 @@ var Bt = {
|
|
|
2201
2439
|
availableFields: a.data
|
|
2202
2440
|
});
|
|
2203
2441
|
if (!u.success) return u;
|
|
2204
|
-
let d =
|
|
2442
|
+
let d = Gt(r, a.data);
|
|
2205
2443
|
return d.length > 0 ? {
|
|
2206
2444
|
...u,
|
|
2207
2445
|
warnings: d
|
|
2208
2446
|
} : u;
|
|
2209
2447
|
};
|
|
2210
|
-
export {
|
|
2448
|
+
export { At as i, pn as n, mn as r, hn as t };
|