@opendata-ai/openchart-core 7.11.0 → 8.0.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1348 -132
- package/dist/index.js +556 -48
- package/dist/index.js.map +1 -1
- package/dist/styles.css +2 -1
- package/dist/styles.css.map +1 -0
- package/package.json +9 -3
- package/schema/chart.schema.json +9086 -0
- package/schema/table.schema.json +861 -0
- package/schema/vizspec.schema.json +17922 -0
- package/src/accessibility/alt-text.ts +39 -1
- package/src/accessibility/aria.ts +4 -2
- package/src/colors/__tests__/colorblind.test.ts +12 -0
- package/src/colors/colorblind.ts +11 -2
- package/src/colors/contrast.ts +11 -0
- package/src/colors/index.ts +9 -1
- package/src/colors/palettes.ts +47 -0
- package/src/helpers/__tests__/deep-merge.test.ts +54 -0
- package/src/helpers/__tests__/spec-builders.test.ts +3 -3
- package/src/helpers/deep-merge.ts +29 -0
- package/src/helpers/spec-builders.ts +7 -7
- package/src/index.ts +29 -1
- package/src/labels/collision.ts +1 -0
- package/src/layout/chrome.ts +24 -0
- package/src/layout/index.ts +1 -1
- package/src/locale/__tests__/format.test.ts +347 -11
- package/src/locale/format.ts +243 -18
- package/src/locale/index.ts +10 -1
- package/src/responsive/breakpoints.ts +7 -2
- package/src/responsive/index.ts +2 -0
- package/src/responsive/metrics.ts +77 -10
- package/src/schema/__tests__/generated-artifacts.test.ts +42 -0
- package/src/schema/__tests__/schema.test.ts +179 -0
- package/src/styles/__tests__/reduced-motion-selectors.test.ts +28 -0
- package/src/styles/animation.css +211 -168
- package/src/styles/base.css +89 -62
- package/src/styles/chrome.css +173 -179
- package/src/styles/dark.css +38 -35
- package/src/styles/graph.css +116 -111
- package/src/styles/index.css +5 -0
- package/src/styles/keyframes.css +130 -99
- package/src/styles/legend.css +14 -12
- package/src/styles/reduced-motion.css +61 -40
- package/src/styles/series-search.css +153 -0
- package/src/styles/sparkline.css +14 -12
- package/src/styles/table-animation.css +82 -80
- package/src/styles/table.css +314 -302
- package/src/styles/token-definitions.ts +199 -0
- package/src/styles/tokens.css +132 -128
- package/src/styles/tooltip.css +109 -115
- package/src/styles/you-draw-it.css +126 -0
- package/src/types/__tests__/encoding.test.ts +86 -17
- package/src/types/__tests__/spec.test.ts +16 -12
- package/src/types/encoding.ts +69 -25
- package/src/types/events.ts +107 -13
- package/src/types/index.ts +42 -3
- package/src/types/layout.ts +484 -11
- package/src/types/schema-roots.ts +32 -0
- package/src/types/spec.ts +718 -87
- package/src/types/table.ts +3 -2
package/src/types/encoding.ts
CHANGED
|
@@ -28,15 +28,11 @@ export interface EncodingRule {
|
|
|
28
28
|
y2?: ChannelRule;
|
|
29
29
|
color: ChannelRule;
|
|
30
30
|
size: ChannelRule;
|
|
31
|
-
shape?: ChannelRule;
|
|
32
31
|
opacity?: ChannelRule;
|
|
33
32
|
strokeDash?: ChannelRule;
|
|
34
33
|
text?: ChannelRule;
|
|
35
34
|
tooltip?: ChannelRule;
|
|
36
|
-
href?: ChannelRule;
|
|
37
|
-
order?: ChannelRule;
|
|
38
35
|
theta?: ChannelRule;
|
|
39
|
-
radius?: ChannelRule;
|
|
40
36
|
detail: ChannelRule;
|
|
41
37
|
}
|
|
42
38
|
|
|
@@ -70,6 +66,15 @@ function optional(...types: FieldType[]): ChannelRule {
|
|
|
70
66
|
* - point: both axes are quantitative
|
|
71
67
|
* - text/rule: fully optional positioning
|
|
72
68
|
* - tick/rect: both axes required, any type
|
|
69
|
+
* - beeswarm: both axes optional at the channel level; the compiler enforces
|
|
70
|
+
* the combination (exactly one quantitative value axis, the other axis an
|
|
71
|
+
* optional nominal/ordinal lane channel)
|
|
72
|
+
* - waffle: no positional axes; y is the share value (quantitative, with
|
|
73
|
+
* theta accepted as an alias like arc), color is the category
|
|
74
|
+
* - calendar: x is the daily date (temporal), color the per-day value
|
|
75
|
+
* (quantitative); no y channel (the calendar owns its own geometry)
|
|
76
|
+
* - parliament: no positional axes; theta (aliased to y) is the seat count
|
|
77
|
+
* (quantitative), color the party
|
|
73
78
|
*/
|
|
74
79
|
export const MARK_ENCODING_RULES: Record<MarkType, EncodingRule> = {
|
|
75
80
|
bar: {
|
|
@@ -81,8 +86,6 @@ export const MARK_ENCODING_RULES: Record<MarkType, EncodingRule> = {
|
|
|
81
86
|
size: optional(),
|
|
82
87
|
opacity: optional('quantitative'),
|
|
83
88
|
tooltip: optional(),
|
|
84
|
-
href: optional(),
|
|
85
|
-
order: optional('quantitative', 'ordinal'),
|
|
86
89
|
detail: optional('nominal'),
|
|
87
90
|
},
|
|
88
91
|
line: {
|
|
@@ -93,8 +96,6 @@ export const MARK_ENCODING_RULES: Record<MarkType, EncodingRule> = {
|
|
|
93
96
|
opacity: optional('quantitative'),
|
|
94
97
|
strokeDash: optional('nominal', 'ordinal'),
|
|
95
98
|
tooltip: optional(),
|
|
96
|
-
href: optional(),
|
|
97
|
-
order: optional('quantitative', 'ordinal'),
|
|
98
99
|
detail: optional('nominal'),
|
|
99
100
|
},
|
|
100
101
|
area: {
|
|
@@ -105,8 +106,6 @@ export const MARK_ENCODING_RULES: Record<MarkType, EncodingRule> = {
|
|
|
105
106
|
size: optional(),
|
|
106
107
|
opacity: optional('quantitative'),
|
|
107
108
|
tooltip: optional(),
|
|
108
|
-
href: optional(),
|
|
109
|
-
order: optional('quantitative', 'ordinal'),
|
|
110
109
|
detail: optional('nominal'),
|
|
111
110
|
},
|
|
112
111
|
point: {
|
|
@@ -114,11 +113,8 @@ export const MARK_ENCODING_RULES: Record<MarkType, EncodingRule> = {
|
|
|
114
113
|
y: required('quantitative', 'temporal', 'nominal', 'ordinal'),
|
|
115
114
|
color: optional('nominal', 'ordinal', 'quantitative'),
|
|
116
115
|
size: optional('quantitative'),
|
|
117
|
-
shape: optional('nominal', 'ordinal'),
|
|
118
116
|
opacity: optional('quantitative'),
|
|
119
117
|
tooltip: optional(),
|
|
120
|
-
href: optional(),
|
|
121
|
-
order: optional('quantitative', 'ordinal'),
|
|
122
118
|
detail: optional('nominal'),
|
|
123
119
|
},
|
|
124
120
|
circle: {
|
|
@@ -128,8 +124,6 @@ export const MARK_ENCODING_RULES: Record<MarkType, EncodingRule> = {
|
|
|
128
124
|
size: optional('quantitative'),
|
|
129
125
|
opacity: optional('quantitative'),
|
|
130
126
|
tooltip: optional(),
|
|
131
|
-
href: optional(),
|
|
132
|
-
order: optional('quantitative', 'ordinal'),
|
|
133
127
|
detail: optional('nominal'),
|
|
134
128
|
},
|
|
135
129
|
lollipop: {
|
|
@@ -139,21 +133,63 @@ export const MARK_ENCODING_RULES: Record<MarkType, EncodingRule> = {
|
|
|
139
133
|
size: optional('quantitative'),
|
|
140
134
|
opacity: optional('quantitative'),
|
|
141
135
|
tooltip: optional(),
|
|
142
|
-
|
|
143
|
-
|
|
136
|
+
detail: optional('nominal'),
|
|
137
|
+
},
|
|
138
|
+
beeswarm: {
|
|
139
|
+
x: optional('quantitative', 'nominal', 'ordinal'),
|
|
140
|
+
y: optional('quantitative', 'nominal', 'ordinal'),
|
|
141
|
+
color: optional('nominal', 'ordinal', 'quantitative'),
|
|
142
|
+
size: optional('quantitative'),
|
|
143
|
+
opacity: optional('quantitative'),
|
|
144
|
+
tooltip: optional(),
|
|
145
|
+
detail: optional('nominal'),
|
|
146
|
+
},
|
|
147
|
+
// Range: x+x2 with nominal y (horizontal) or y+y2 with nominal x (vertical).
|
|
148
|
+
// The orientation-dependent x2/y2 requirement is enforced by a dedicated
|
|
149
|
+
// check in the validator; the static table can only mark them optional.
|
|
150
|
+
range: {
|
|
151
|
+
x: required('quantitative', 'nominal', 'ordinal'),
|
|
152
|
+
y: required('quantitative', 'nominal', 'ordinal'),
|
|
153
|
+
x2: optional('quantitative'),
|
|
154
|
+
y2: optional('quantitative'),
|
|
155
|
+
color: optional('nominal', 'ordinal'),
|
|
156
|
+
size: optional(),
|
|
157
|
+
opacity: optional('quantitative'),
|
|
158
|
+
tooltip: optional(),
|
|
144
159
|
detail: optional('nominal'),
|
|
145
160
|
},
|
|
146
161
|
arc: {
|
|
162
|
+
x: optional(),
|
|
163
|
+
y: optional('quantitative'),
|
|
164
|
+
theta: required('quantitative'),
|
|
165
|
+
color: required('nominal', 'ordinal'),
|
|
166
|
+
size: optional(),
|
|
167
|
+
opacity: optional('quantitative'),
|
|
168
|
+
tooltip: optional(),
|
|
169
|
+
detail: optional('nominal'),
|
|
170
|
+
},
|
|
171
|
+
waffle: {
|
|
172
|
+
x: optional(),
|
|
173
|
+
y: required('quantitative'),
|
|
174
|
+
color: required('nominal', 'ordinal'),
|
|
175
|
+
size: optional(),
|
|
176
|
+
opacity: optional('quantitative'),
|
|
177
|
+
tooltip: optional(),
|
|
178
|
+
theta: optional('quantitative'),
|
|
179
|
+
detail: optional('nominal'),
|
|
180
|
+
},
|
|
181
|
+
// parliament: hemicycle seat chart. Like arc/waffle, no positional axes;
|
|
182
|
+
// color is the party (required), theta the seat count (aliased to y in the
|
|
183
|
+
// sugar pass). y is accepted so the theta alias resolves before the rules
|
|
184
|
+
// check runs.
|
|
185
|
+
parliament: {
|
|
147
186
|
x: optional(),
|
|
148
187
|
y: required('quantitative'),
|
|
149
188
|
color: required('nominal', 'ordinal'),
|
|
150
189
|
size: optional(),
|
|
151
190
|
opacity: optional('quantitative'),
|
|
152
191
|
tooltip: optional(),
|
|
153
|
-
href: optional(),
|
|
154
|
-
order: optional('quantitative', 'ordinal'),
|
|
155
192
|
theta: optional('quantitative'),
|
|
156
|
-
radius: optional('quantitative'),
|
|
157
193
|
detail: optional('nominal'),
|
|
158
194
|
},
|
|
159
195
|
text: {
|
|
@@ -164,7 +200,6 @@ export const MARK_ENCODING_RULES: Record<MarkType, EncodingRule> = {
|
|
|
164
200
|
opacity: optional('quantitative'),
|
|
165
201
|
text: required(),
|
|
166
202
|
tooltip: optional(),
|
|
167
|
-
href: optional(),
|
|
168
203
|
detail: optional('nominal'),
|
|
169
204
|
},
|
|
170
205
|
rule: {
|
|
@@ -177,7 +212,6 @@ export const MARK_ENCODING_RULES: Record<MarkType, EncodingRule> = {
|
|
|
177
212
|
opacity: optional('quantitative'),
|
|
178
213
|
strokeDash: optional('nominal', 'ordinal'),
|
|
179
214
|
tooltip: optional(),
|
|
180
|
-
href: optional(),
|
|
181
215
|
detail: optional('nominal'),
|
|
182
216
|
},
|
|
183
217
|
tick: {
|
|
@@ -187,7 +221,6 @@ export const MARK_ENCODING_RULES: Record<MarkType, EncodingRule> = {
|
|
|
187
221
|
size: optional(),
|
|
188
222
|
opacity: optional('quantitative'),
|
|
189
223
|
tooltip: optional(),
|
|
190
|
-
href: optional(),
|
|
191
224
|
detail: optional('nominal'),
|
|
192
225
|
},
|
|
193
226
|
rect: {
|
|
@@ -199,8 +232,19 @@ export const MARK_ENCODING_RULES: Record<MarkType, EncodingRule> = {
|
|
|
199
232
|
size: optional(),
|
|
200
233
|
opacity: optional('quantitative'),
|
|
201
234
|
tooltip: optional(),
|
|
202
|
-
|
|
203
|
-
|
|
235
|
+
detail: optional('nominal'),
|
|
236
|
+
},
|
|
237
|
+
// calendar: x is the daily date (temporal), color the per-day value
|
|
238
|
+
// (quantitative). No y channel: the calendar computes its own
|
|
239
|
+
// weeks-x-weekdays geometry, so y is left optional here and the dedicated
|
|
240
|
+
// validator rejects it with a pointed message.
|
|
241
|
+
calendar: {
|
|
242
|
+
x: required('temporal'),
|
|
243
|
+
y: optional(),
|
|
244
|
+
color: required('quantitative'),
|
|
245
|
+
size: optional(),
|
|
246
|
+
opacity: optional('quantitative'),
|
|
247
|
+
tooltip: optional(),
|
|
204
248
|
detail: optional('nominal'),
|
|
205
249
|
},
|
|
206
250
|
};
|
package/src/types/events.ts
CHANGED
|
@@ -36,22 +36,65 @@ export type ChromeKey = 'title' | 'subtitle' | 'source' | 'byline' | 'footer';
|
|
|
36
36
|
* and `index` (always available, position in the spec's annotations array).
|
|
37
37
|
*/
|
|
38
38
|
export type ElementRef =
|
|
39
|
-
| {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
| {
|
|
40
|
+
type: 'annotation';
|
|
41
|
+
index: number;
|
|
42
|
+
id?: string;
|
|
43
|
+
/** RFC 6901 JSON Pointer to the edited property in the spec. */
|
|
44
|
+
path?: string;
|
|
45
|
+
}
|
|
46
|
+
| {
|
|
47
|
+
type: 'chrome';
|
|
48
|
+
key: ChromeKey;
|
|
49
|
+
/** RFC 6901 JSON Pointer to the edited property in the spec. */
|
|
50
|
+
path?: string;
|
|
51
|
+
}
|
|
52
|
+
| {
|
|
53
|
+
type: 'series-label';
|
|
54
|
+
series: string;
|
|
55
|
+
/** RFC 6901 JSON Pointer to the edited property in the spec. */
|
|
56
|
+
path?: string;
|
|
57
|
+
}
|
|
58
|
+
| {
|
|
59
|
+
type: 'legend';
|
|
60
|
+
/** RFC 6901 JSON Pointer to the edited property in the spec. */
|
|
61
|
+
path?: string;
|
|
62
|
+
}
|
|
63
|
+
| {
|
|
64
|
+
type: 'legend-entry';
|
|
65
|
+
series: string;
|
|
66
|
+
index: number;
|
|
67
|
+
/** RFC 6901 JSON Pointer to the edited property in the spec. */
|
|
68
|
+
path?: string;
|
|
69
|
+
};
|
|
44
70
|
|
|
45
71
|
/** Helper constructors for ergonomic ElementRef creation. */
|
|
46
72
|
export const elementRef = {
|
|
47
|
-
annotation: (index: number, id?: string): ElementRef => ({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
73
|
+
annotation: (index: number, id?: string, path?: string): ElementRef => ({
|
|
74
|
+
type: 'annotation',
|
|
75
|
+
index,
|
|
76
|
+
...(id !== undefined ? { id } : {}),
|
|
77
|
+
...(path !== undefined ? { path } : {}),
|
|
78
|
+
}),
|
|
79
|
+
chrome: (key: ChromeKey, path?: string): ElementRef => ({
|
|
80
|
+
type: 'chrome',
|
|
81
|
+
key,
|
|
82
|
+
...(path !== undefined ? { path } : {}),
|
|
83
|
+
}),
|
|
84
|
+
seriesLabel: (series: string, path?: string): ElementRef => ({
|
|
85
|
+
type: 'series-label',
|
|
86
|
+
series,
|
|
87
|
+
...(path !== undefined ? { path } : {}),
|
|
88
|
+
}),
|
|
89
|
+
legend: (path?: string): ElementRef => ({
|
|
90
|
+
type: 'legend',
|
|
91
|
+
...(path !== undefined ? { path } : {}),
|
|
92
|
+
}),
|
|
93
|
+
legendEntry: (series: string, index: number, path?: string): ElementRef => ({
|
|
52
94
|
type: 'legend-entry',
|
|
53
95
|
series,
|
|
54
96
|
index,
|
|
97
|
+
...(path !== undefined ? { path } : {}),
|
|
55
98
|
}),
|
|
56
99
|
} as const;
|
|
57
100
|
|
|
@@ -71,19 +114,50 @@ export const elementRef = {
|
|
|
71
114
|
* - To persist a drag edit back into your spec: `{ ...edit.annotation, offset: edit.offset }`
|
|
72
115
|
*/
|
|
73
116
|
export type ElementEdit =
|
|
74
|
-
| {
|
|
117
|
+
| {
|
|
118
|
+
type: 'annotation';
|
|
119
|
+
element: ElementRef;
|
|
120
|
+
annotation: TextAnnotation;
|
|
121
|
+
offset: AnnotationOffset;
|
|
122
|
+
}
|
|
75
123
|
| {
|
|
76
124
|
type: 'annotation-connector';
|
|
125
|
+
element: ElementRef;
|
|
77
126
|
annotation: TextAnnotation;
|
|
78
127
|
endpoint: 'from' | 'to';
|
|
79
128
|
offset: AnnotationOffset;
|
|
80
129
|
}
|
|
81
|
-
| {
|
|
82
|
-
|
|
130
|
+
| {
|
|
131
|
+
type: 'range-label';
|
|
132
|
+
element: ElementRef;
|
|
133
|
+
annotation: RangeAnnotation;
|
|
134
|
+
labelOffset: AnnotationOffset;
|
|
135
|
+
}
|
|
136
|
+
| {
|
|
137
|
+
type: 'refline-label';
|
|
138
|
+
element: ElementRef;
|
|
139
|
+
annotation: RefLineAnnotation;
|
|
140
|
+
labelOffset: AnnotationOffset;
|
|
141
|
+
}
|
|
142
|
+
| {
|
|
143
|
+
type: 'annotation-anchor';
|
|
144
|
+
element: ElementRef;
|
|
145
|
+
annotation: TextAnnotation;
|
|
146
|
+
x: string | number;
|
|
147
|
+
y: string | number;
|
|
148
|
+
}
|
|
83
149
|
| { type: 'chrome'; key: ChromeKey; text: string; offset: AnnotationOffset }
|
|
84
150
|
| { type: 'series-label'; series: string; offset: AnnotationOffset }
|
|
85
151
|
| { type: 'legend'; offset: AnnotationOffset }
|
|
152
|
+
/**
|
|
153
|
+
* Transient legend visibility toggle. Reports the same runtime show/hide
|
|
154
|
+
* a reader triggers; not persisted by openchart. To author default-hidden
|
|
155
|
+
* series, set `spec.hiddenSeries` directly. Hosts building spec
|
|
156
|
+
* persistence should generally not write legend-toggle edits back into
|
|
157
|
+
* the authored spec. `hidden: true` means the series was just hidden.
|
|
158
|
+
*/
|
|
86
159
|
| { type: 'legend-toggle'; series: string; hidden: boolean }
|
|
160
|
+
| { type: 'add'; annotation: TextAnnotation }
|
|
87
161
|
| { type: 'delete'; element: ElementRef }
|
|
88
162
|
| { type: 'text-edit'; element: ElementRef; oldText: string; newText: string };
|
|
89
163
|
|
|
@@ -119,6 +193,14 @@ export interface MarkEvent {
|
|
|
119
193
|
* or ChartProps (React component) to receive interaction callbacks.
|
|
120
194
|
*/
|
|
121
195
|
export interface ChartEventHandlers {
|
|
196
|
+
/**
|
|
197
|
+
* Explicitly enable or disable edit interactions (drag, select, keyboard
|
|
198
|
+
* delete/edit). When true, the interaction layer is wired even without
|
|
199
|
+
* onEdit. When false, all edit interactions are suppressed even when
|
|
200
|
+
* onEdit is provided. When omitted, each interaction block uses its
|
|
201
|
+
* existing callback-presence gate.
|
|
202
|
+
*/
|
|
203
|
+
editable?: boolean;
|
|
122
204
|
/** Called when a data mark is clicked. */
|
|
123
205
|
onMarkClick?: (event: MarkEvent) => void;
|
|
124
206
|
/** Called when the mouse enters a data mark. */
|
|
@@ -127,6 +209,12 @@ export interface ChartEventHandlers {
|
|
|
127
209
|
onMarkLeave?: () => void;
|
|
128
210
|
/** Called when a legend entry is toggled (clicked to show/hide a series). */
|
|
129
211
|
onLegendToggle?: (series: string, visible: boolean) => void;
|
|
212
|
+
/**
|
|
213
|
+
* Called when the series search (`seriesSearch`) changes the highlight set.
|
|
214
|
+
* Receives the full set of highlighted values after the change, including
|
|
215
|
+
* the authored `encoding.color.highlight` baseline.
|
|
216
|
+
*/
|
|
217
|
+
onHighlightChange?: (values: string[]) => void;
|
|
130
218
|
/** Called when an annotation element is clicked. */
|
|
131
219
|
onAnnotationClick?: (annotation: Annotation, event: MouseEvent) => void;
|
|
132
220
|
/** Called when a text annotation label is dragged to a new position. */
|
|
@@ -139,4 +227,10 @@ export interface ChartEventHandlers {
|
|
|
139
227
|
onDeselect?: (element: ElementRef) => void;
|
|
140
228
|
/** Fired when inline text editing commits. Also flows through onEdit as a 'text-edit' event. */
|
|
141
229
|
onTextEdit?: (element: ElementRef, oldText: string, newText: string) => void;
|
|
230
|
+
/**
|
|
231
|
+
* Fired when a "you draw it" (`youDrawIt`) drawing is revealed (button click
|
|
232
|
+
* or programmatic reveal), with the reader's guess in data coordinates,
|
|
233
|
+
* ordered by x. For newsrooms aggregating reader guesses.
|
|
234
|
+
*/
|
|
235
|
+
onReveal?: (guess: Array<{ x: string | number; y: number }>) => void;
|
|
142
236
|
}
|
package/src/types/index.ts
CHANGED
|
@@ -12,7 +12,6 @@ export type {
|
|
|
12
12
|
GraphChannelRule,
|
|
13
13
|
} from './encoding';
|
|
14
14
|
export {
|
|
15
|
-
CHART_ENCODING_RULES,
|
|
16
15
|
GRAPH_ENCODING_RULES,
|
|
17
16
|
MARK_ENCODING_RULES,
|
|
18
17
|
} from './encoding';
|
|
@@ -43,10 +42,15 @@ export type {
|
|
|
43
42
|
ChartLayout,
|
|
44
43
|
CompileOptions,
|
|
45
44
|
CompileTableOptions,
|
|
45
|
+
CompileWarning,
|
|
46
|
+
ContinuousLegendBin,
|
|
47
|
+
ContinuousLegendLayout,
|
|
48
|
+
ContinuousLegendTick,
|
|
46
49
|
EndpointLabelEntry,
|
|
47
50
|
EndpointLabelsLayout,
|
|
48
51
|
FacetLayout,
|
|
49
52
|
FacetPanelLayout,
|
|
53
|
+
FillPatternType,
|
|
50
54
|
FlagTableCell,
|
|
51
55
|
GradientColorStop,
|
|
52
56
|
GradientLegendLayout,
|
|
@@ -56,10 +60,16 @@ export type {
|
|
|
56
60
|
Gridline,
|
|
57
61
|
HeatmapTableCell,
|
|
58
62
|
ImageTableCell,
|
|
63
|
+
LegendChannel,
|
|
59
64
|
LegendEntry,
|
|
60
65
|
LegendEntryPosition,
|
|
61
66
|
LegendLayout,
|
|
62
67
|
LineMark,
|
|
68
|
+
MapBorders,
|
|
69
|
+
MapFeatureMark,
|
|
70
|
+
MapFocusLayout,
|
|
71
|
+
MapLayout,
|
|
72
|
+
MapPointMark,
|
|
63
73
|
Margins,
|
|
64
74
|
Mark,
|
|
65
75
|
MarkAria,
|
|
@@ -75,13 +85,19 @@ export type {
|
|
|
75
85
|
ResolvedChrome,
|
|
76
86
|
ResolvedChromeElement,
|
|
77
87
|
ResolvedColumn,
|
|
88
|
+
ResolvedFillPattern,
|
|
78
89
|
ResolvedLabel,
|
|
79
90
|
ResolvedMetricBar,
|
|
80
91
|
ResolvedMetricCell,
|
|
92
|
+
ResolvedSeriesSearch,
|
|
93
|
+
ResolvedYouDrawIt,
|
|
81
94
|
RuleMarkLayout,
|
|
82
95
|
SankeyLayout,
|
|
83
96
|
SankeyLinkMark,
|
|
84
97
|
SankeyNodeMark,
|
|
98
|
+
ScaleInvert,
|
|
99
|
+
SizeLegendCircle,
|
|
100
|
+
SizeLegendLayout,
|
|
85
101
|
SortState,
|
|
86
102
|
SparklineData,
|
|
87
103
|
SparklineTableCell,
|
|
@@ -97,9 +113,12 @@ export type {
|
|
|
97
113
|
TileMapTileMark,
|
|
98
114
|
TooltipContent,
|
|
99
115
|
TooltipField,
|
|
116
|
+
YouDrawItSample,
|
|
117
|
+
YouDrawItYInvert,
|
|
100
118
|
} from './layout';
|
|
101
119
|
// Spec types (user input)
|
|
102
120
|
export type {
|
|
121
|
+
A11yConfig,
|
|
103
122
|
AggregateOp,
|
|
104
123
|
AggregateTransform,
|
|
105
124
|
AnimationConfig,
|
|
@@ -117,14 +136,15 @@ export type {
|
|
|
117
136
|
BarListEncoding,
|
|
118
137
|
BarListSpec,
|
|
119
138
|
BarListSpecWithoutData,
|
|
139
|
+
BeeswarmEncoding,
|
|
120
140
|
BinParams,
|
|
121
141
|
BinTransform,
|
|
122
142
|
CalculateExpression,
|
|
123
143
|
CalculateTransform,
|
|
144
|
+
CalendarEncoding,
|
|
124
145
|
ChartSpec,
|
|
125
146
|
ChartSpecOverride,
|
|
126
147
|
ChartSpecWithoutData,
|
|
127
|
-
ChartType,
|
|
128
148
|
Chrome,
|
|
129
149
|
ChromeText,
|
|
130
150
|
ChromeTextStyle,
|
|
@@ -132,11 +152,14 @@ export type {
|
|
|
132
152
|
CircleEncoding,
|
|
133
153
|
Condition,
|
|
134
154
|
ConditionalValueDef,
|
|
155
|
+
ConnectorConfig,
|
|
156
|
+
ConnectorType,
|
|
135
157
|
DarkMode,
|
|
136
158
|
DataRow,
|
|
137
159
|
Display,
|
|
138
160
|
Encoding,
|
|
139
161
|
EncodingChannel,
|
|
162
|
+
EndpointLabelContent,
|
|
140
163
|
EndpointLabelsConfig,
|
|
141
164
|
FacetChannel,
|
|
142
165
|
FieldPredicate,
|
|
@@ -164,13 +187,22 @@ export type {
|
|
|
164
187
|
LogicalNot,
|
|
165
188
|
LogicalOr,
|
|
166
189
|
LollipopEncoding,
|
|
190
|
+
MapEncoding,
|
|
191
|
+
MapFocus,
|
|
192
|
+
MapGeo,
|
|
193
|
+
MapPointsLayer,
|
|
194
|
+
MapProjection,
|
|
195
|
+
MapSpec,
|
|
196
|
+
MapSpecWithoutData,
|
|
167
197
|
MarkDef,
|
|
168
198
|
MarkType,
|
|
169
199
|
Metric,
|
|
170
200
|
NodeOverride,
|
|
201
|
+
ParliamentEncoding,
|
|
171
202
|
PointEncoding,
|
|
172
203
|
RadialGradient,
|
|
173
204
|
RangeAnnotation,
|
|
205
|
+
RangeEncoding,
|
|
174
206
|
RectEncoding,
|
|
175
207
|
RefLineAnnotation,
|
|
176
208
|
RelativeTimeRef,
|
|
@@ -184,7 +216,9 @@ export type {
|
|
|
184
216
|
SankeySpecWithoutData,
|
|
185
217
|
ScaleConfig,
|
|
186
218
|
ScaleType,
|
|
219
|
+
SeriesSearchConfig,
|
|
187
220
|
SeriesStyle,
|
|
221
|
+
SortByField,
|
|
188
222
|
StoredVizSpec,
|
|
189
223
|
TableSpec,
|
|
190
224
|
TableSpecWithoutData,
|
|
@@ -199,15 +233,18 @@ export type {
|
|
|
199
233
|
TimeUnit,
|
|
200
234
|
TimeUnitTransform,
|
|
201
235
|
Transform,
|
|
236
|
+
ValueDef,
|
|
202
237
|
VizSpec,
|
|
238
|
+
WaffleEncoding,
|
|
203
239
|
WindowFieldDef,
|
|
204
240
|
WindowOp,
|
|
205
241
|
WindowSortField,
|
|
206
242
|
WindowTransform,
|
|
243
|
+
YouDrawItConfig,
|
|
207
244
|
} from './spec';
|
|
208
245
|
export {
|
|
209
|
-
CHART_TYPES,
|
|
210
246
|
getRepresentativeColor,
|
|
247
|
+
isAxislessMark,
|
|
211
248
|
isBarListSpec,
|
|
212
249
|
isChartSpec,
|
|
213
250
|
isConditionalDef,
|
|
@@ -215,12 +252,14 @@ export {
|
|
|
215
252
|
isGradientDef,
|
|
216
253
|
isGraphSpec,
|
|
217
254
|
isLayerSpec,
|
|
255
|
+
isMapSpec,
|
|
218
256
|
isRangeAnnotation,
|
|
219
257
|
isRefLineAnnotation,
|
|
220
258
|
isSankeySpec,
|
|
221
259
|
isTableSpec,
|
|
222
260
|
isTextAnnotation,
|
|
223
261
|
isTileMapSpec,
|
|
262
|
+
isValueDef,
|
|
224
263
|
MARK_DISPLAY_NAMES,
|
|
225
264
|
MARK_TYPES,
|
|
226
265
|
resolveMarkDef,
|